PidStepResponseFeatures【免费下载链接】mat-chem-sim-pred面向工业领域聚焦计算仿真、预测两大核心场景构建面向流程工业机理数据双轮驱动的领域计算层推动AI for Science在材料化学领域的深度应用。项目地址: https://gitcode.com/cann/mat-chem-sim-pred功能说明PidStepResponseFeatures是 PID 候选轨迹的批量特征提取原型。它假设上游已经得到候选过程变量轨迹pv_candidates[B, C, N], sp[B, N] - features[B, C, 12]该方向不做闭环递推只做 device-side 后处理适合与 rollout 或仿真流水线拼接。与 batch rollout 的关系当前pid_fopdt_batch_rollout_score、pid_ipdt_batch_rollout_score、pid_sopdt_batch_rollout_score已经在闭环仿真过程中融合了部分特征累计、固定评分和 best reduce模型参数 PID 候选 - 闭环仿真 - IAE/ISE/overshoot/settling_time/score - best_result/best_idx因此如果主链直接使用 batch rollout 输出最优 PID通常不需要再调用本算子。本算子适用于另一条模块化链路上游已经生成完整候选轨迹pv_candidates[B,C,N]并且希望保留每个候选的 12 维可解释特征再由 host 侧策略或后续评分算子做可配置评分与选优。两条路线的区别batch_rollout_score: 仿真 固定特征 固定评分 选优融合高效只输出 best step_response_features downstream scorer: 不负责仿真处理已有轨迹保留每个候选特征更灵活但链路更长特征initial_value, final_value, final_abs_error, peak_value, trough_value, overshoot_ratio, undershoot_ratio, rise_time, peak_time, settling_time, iae, ise计算说明与小例子对单条候选轨迹target sp[b, N-1] initial pv_candidates[b,c,0] final pv_candidates[b,c,N-1] delta target - initial算子扫描整条pv得到峰值、谷值、首次到达 10%/90% 的时间、最后一次跑出稳定带的时间以及误差积分IAE sum(abs(sp - pv)) * sample_interval ISE sum((sp - pv)^2) * sample_interval例如sp [10, 10, 10, 10, 10, 10] pv_A [0, 4, 8, 10, 10, 10] pv_B [0, 8, 12, 11, 10, 10]候选 A 没有超调但前期跟踪较慢IAE 10 6 2 0 0 0 18 ISE 100 36 4 140候选 B 跟踪更快但存在超调peak_value 12 overshoot_ratio (12 - 10) / (10 - 0) 0.2 IAE 10 2 2 1 0 0 15 ISE 100 4 4 1 109后续评分器可以根据业务权重决定更偏好“快”还是“稳”。当前定位该目录已从 Python reference 探索池推进为 Ascend C 原型算子包含aclnnPidStepResponseFeatureshost API。pid_step_response_features_kerneldevice kernel。ACLNN smoke 示例。ACLNN benchmark。Python reference、测试和本机 benchmark。该算子按(batch,candidate)切分任务在 kernel 内融合峰值、误差积分、rise/settling time 扫描不显式输出或回传中间轨迹特征。已验证结果本地 Python reference4 passed。node202 / Ascend910B3 CANN 构建通过。ACLNN smoke 通过known case 输出initial0 final10 peak11 overshoot0.1 rise_time2 peak_time4 settling_time5 iae15 ise91。node202 benchmark 中等和较大规模均与 CPU reference 完全对齐feature_max_abs0。详细材料算法说明API ReferenceBenchmark Note交付说明本机验证python -m pytest prediction/ProcessControl/PIDModelFit/pid_step_response_features/tests/test_pid_step_response_features.py -q python prediction/ProcessControl/PIDModelFit/pid_step_response_features/tests/benchmark_pid_step_response_features.pyAscend C 构建与 smokecd prediction/ProcessControl/PIDModelFit/pid_step_response_features cmake -S . -B build -DCMAKE_BUILD_TYPERelease -DSOC_VERSIONAscend910B3 cmake --build build -j 2 ./build/test_aclnn_pid_step_response_features 0 ./build/benchmark_pid_step_response_features 0 64 32 1024 5 64【免费下载链接】mat-chem-sim-pred面向工业领域聚焦计算仿真、预测两大核心场景构建面向流程工业机理数据双轮驱动的领域计算层推动AI for Science在材料化学领域的深度应用。项目地址: https://gitcode.com/cann/mat-chem-sim-pred创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考