| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Co-authored-by: liuhaidong<aliutec@163.com> # message auto-generated for no-merge-commit merge: !21 merge devin/1781921853-pid-modelfit-ops into master feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Created-by: haikuo Commit-by: liuhaidong Merged-by: cann-robot Description: ## Summary 本次为 **PIDModelFit** 算子系列提交:当前正式口径共 **12 个 NPU 自定义算子**,其中包括前序已提交的 **3 个 *_basis_gemm_fit 模型辨识算子**,以及本轮新增并保留的 **9 个诊断、整定、候选仿真、特征提取和评估类算子**。这 12 个算子共同覆盖 PID 整定主流程:模型辨识 → 模型诊断 → PID 参数生成 → 候选闭环仿真/评分/选优 → 候选特征提取 → 控制性能与过程能力评估。 > 重点(committer 第一眼):本次正式合入范围已从早期探索口径收敛为 **12 个正式算子**。前序 3 个 *_basis_gemm_fit 辨识算子作为模型辨识基础能力保留,并补充 benchmark、docs/benchmark.md 与 README 描述;本轮新增并保留 9 个下游算子,补齐 PIDModelFit 从“能辨识模型”到“能诊断、能整定、能仿真选优、能验收评估”的完整工程链路。探索/历史原型算子不进入本次正式提交范围。 ## 算子清单(9 新 + 3 已有 = 12),按 PID 整定 6 阶段 1. **模型辨识**:pid_fopdt_basis_gemm_fit · pid_ipdt_basis_gemm_fit · pid_sopdt_basis_gemm_fit 2. **模型质量诊断**:pid_residual_diagnostics · pid_windowed_residual_diagnostics 3. **PID 参数生成**:pid_tuning_rule_batch(Ziegler-Nichols / IMC / Cohen-Coon) 4. **候选闭环仿真、评分与选优**:pid_fopdt_batch_rollout_score · pid_ipdt_batch_rollout_score · pid_sopdt_batch_rollout_score 5. **候选响应特征提取**:pid_step_response_features 6. **控制性能与过程能力评估**:pid_control_performance_metrics · pid_process_capability_metrics → 新增的 IPDT / SOPDT rollout 补齐了候选仿真阶段对 FOPDT / IPDT / SOPDT 三类模型的覆盖;三个 batch rollout 算子已融合候选特征、候选评分和 best 选择,直接输出每条回路的最优 PID 候选结果。 ## E2E 验证:算子有效且具备 NPU resident 链路价值(Ascend910B3 / node202 真编真跑) - **有效(精度)**:12/12 算子均提供 Python/CPU reference、精度测试或 NPU smoke/benchmark 入口;NPU 输出与 CPU reference 在 float32 容差内对齐。FOPDT 全链路 E2E 覆盖 fit -> tuning_rule -> fopdt_rollout -> performance_metrics,分阶段与 CPU reference 对齐,链路语义自洽。 - **高效(vs CPU 64 线程)**:模型辨识 pipeline 是最明确 NPU 价值点,MatMul + reduce resident e2e 约 28x-180x;三类 batch rollout 在典型候选规模下约 4x-7x;残差诊断、窗口残差、候选特征和指标类算子适合作为 NPU resident 后处理,避免中间轨迹回传 CPU。 - **工程定位清晰**:pid_tuning_rule_batch 算术强度较低,不作为单独性能卖点,但它支撑 E2E 中“模型参数 -> PID 候选”的 device 侧候选生成阶段;评估类算子推荐挂在 NPU resident 流水线后端使用。 ## 主要改动 - 9 个新增正式算子目录,均包含 op_host / op_kernel / examples / tests / docs / README 等标准交付件结构。 - 3 个前序 *_basis_gemm_fit 模型辨识算子作为基础能力保留,并补充 benchmark、README 和文档说明。 - common/ 提供 CPU / NumPy reference 与共享辅助实现。 - e2e/ 提供全链路验证驱动,包括 e2e_perf、e2e_orchestrator.py 和 build_e2e.sh。 - 顶层 docs/ 收敛为正式交付文档:design.md、test_report.md、pid_operator_catalog_by_purpose.md。 ## 验证环境 Ascend910B3,CANN toolkit,g++ 10.3.1 See merge request: cann/mat-chem-sim-pred!21 | 1 个月前 | |
feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Co-authored-by: liuhaidong<aliutec@163.com> # message auto-generated for no-merge-commit merge: !21 merge devin/1781921853-pid-modelfit-ops into master feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Created-by: haikuo Commit-by: liuhaidong Merged-by: cann-robot Description: ## Summary 本次为 **PIDModelFit** 算子系列提交:当前正式口径共 **12 个 NPU 自定义算子**,其中包括前序已提交的 **3 个 *_basis_gemm_fit 模型辨识算子**,以及本轮新增并保留的 **9 个诊断、整定、候选仿真、特征提取和评估类算子**。这 12 个算子共同覆盖 PID 整定主流程:模型辨识 → 模型诊断 → PID 参数生成 → 候选闭环仿真/评分/选优 → 候选特征提取 → 控制性能与过程能力评估。 > 重点(committer 第一眼):本次正式合入范围已从早期探索口径收敛为 **12 个正式算子**。前序 3 个 *_basis_gemm_fit 辨识算子作为模型辨识基础能力保留,并补充 benchmark、docs/benchmark.md 与 README 描述;本轮新增并保留 9 个下游算子,补齐 PIDModelFit 从“能辨识模型”到“能诊断、能整定、能仿真选优、能验收评估”的完整工程链路。探索/历史原型算子不进入本次正式提交范围。 ## 算子清单(9 新 + 3 已有 = 12),按 PID 整定 6 阶段 1. **模型辨识**:pid_fopdt_basis_gemm_fit · pid_ipdt_basis_gemm_fit · pid_sopdt_basis_gemm_fit 2. **模型质量诊断**:pid_residual_diagnostics · pid_windowed_residual_diagnostics 3. **PID 参数生成**:pid_tuning_rule_batch(Ziegler-Nichols / IMC / Cohen-Coon) 4. **候选闭环仿真、评分与选优**:pid_fopdt_batch_rollout_score · pid_ipdt_batch_rollout_score · pid_sopdt_batch_rollout_score 5. **候选响应特征提取**:pid_step_response_features 6. **控制性能与过程能力评估**:pid_control_performance_metrics · pid_process_capability_metrics → 新增的 IPDT / SOPDT rollout 补齐了候选仿真阶段对 FOPDT / IPDT / SOPDT 三类模型的覆盖;三个 batch rollout 算子已融合候选特征、候选评分和 best 选择,直接输出每条回路的最优 PID 候选结果。 ## E2E 验证:算子有效且具备 NPU resident 链路价值(Ascend910B3 / node202 真编真跑) - **有效(精度)**:12/12 算子均提供 Python/CPU reference、精度测试或 NPU smoke/benchmark 入口;NPU 输出与 CPU reference 在 float32 容差内对齐。FOPDT 全链路 E2E 覆盖 fit -> tuning_rule -> fopdt_rollout -> performance_metrics,分阶段与 CPU reference 对齐,链路语义自洽。 - **高效(vs CPU 64 线程)**:模型辨识 pipeline 是最明确 NPU 价值点,MatMul + reduce resident e2e 约 28x-180x;三类 batch rollout 在典型候选规模下约 4x-7x;残差诊断、窗口残差、候选特征和指标类算子适合作为 NPU resident 后处理,避免中间轨迹回传 CPU。 - **工程定位清晰**:pid_tuning_rule_batch 算术强度较低,不作为单独性能卖点,但它支撑 E2E 中“模型参数 -> PID 候选”的 device 侧候选生成阶段;评估类算子推荐挂在 NPU resident 流水线后端使用。 ## 主要改动 - 9 个新增正式算子目录,均包含 op_host / op_kernel / examples / tests / docs / README 等标准交付件结构。 - 3 个前序 *_basis_gemm_fit 模型辨识算子作为基础能力保留,并补充 benchmark、README 和文档说明。 - common/ 提供 CPU / NumPy reference 与共享辅助实现。 - e2e/ 提供全链路验证驱动,包括 e2e_perf、e2e_orchestrator.py 和 build_e2e.sh。 - 顶层 docs/ 收敛为正式交付文档:design.md、test_report.md、pid_operator_catalog_by_purpose.md。 ## 验证环境 Ascend910B3,CANN toolkit,g++ 10.3.1 See merge request: cann/mat-chem-sim-pred!21 | 1 个月前 | |
feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Co-authored-by: liuhaidong<aliutec@163.com> # message auto-generated for no-merge-commit merge: !21 merge devin/1781921853-pid-modelfit-ops into master feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Created-by: haikuo Commit-by: liuhaidong Merged-by: cann-robot Description: ## Summary 本次为 **PIDModelFit** 算子系列提交:当前正式口径共 **12 个 NPU 自定义算子**,其中包括前序已提交的 **3 个 *_basis_gemm_fit 模型辨识算子**,以及本轮新增并保留的 **9 个诊断、整定、候选仿真、特征提取和评估类算子**。这 12 个算子共同覆盖 PID 整定主流程:模型辨识 → 模型诊断 → PID 参数生成 → 候选闭环仿真/评分/选优 → 候选特征提取 → 控制性能与过程能力评估。 > 重点(committer 第一眼):本次正式合入范围已从早期探索口径收敛为 **12 个正式算子**。前序 3 个 *_basis_gemm_fit 辨识算子作为模型辨识基础能力保留,并补充 benchmark、docs/benchmark.md 与 README 描述;本轮新增并保留 9 个下游算子,补齐 PIDModelFit 从“能辨识模型”到“能诊断、能整定、能仿真选优、能验收评估”的完整工程链路。探索/历史原型算子不进入本次正式提交范围。 ## 算子清单(9 新 + 3 已有 = 12),按 PID 整定 6 阶段 1. **模型辨识**:pid_fopdt_basis_gemm_fit · pid_ipdt_basis_gemm_fit · pid_sopdt_basis_gemm_fit 2. **模型质量诊断**:pid_residual_diagnostics · pid_windowed_residual_diagnostics 3. **PID 参数生成**:pid_tuning_rule_batch(Ziegler-Nichols / IMC / Cohen-Coon) 4. **候选闭环仿真、评分与选优**:pid_fopdt_batch_rollout_score · pid_ipdt_batch_rollout_score · pid_sopdt_batch_rollout_score 5. **候选响应特征提取**:pid_step_response_features 6. **控制性能与过程能力评估**:pid_control_performance_metrics · pid_process_capability_metrics → 新增的 IPDT / SOPDT rollout 补齐了候选仿真阶段对 FOPDT / IPDT / SOPDT 三类模型的覆盖;三个 batch rollout 算子已融合候选特征、候选评分和 best 选择,直接输出每条回路的最优 PID 候选结果。 ## E2E 验证:算子有效且具备 NPU resident 链路价值(Ascend910B3 / node202 真编真跑) - **有效(精度)**:12/12 算子均提供 Python/CPU reference、精度测试或 NPU smoke/benchmark 入口;NPU 输出与 CPU reference 在 float32 容差内对齐。FOPDT 全链路 E2E 覆盖 fit -> tuning_rule -> fopdt_rollout -> performance_metrics,分阶段与 CPU reference 对齐,链路语义自洽。 - **高效(vs CPU 64 线程)**:模型辨识 pipeline 是最明确 NPU 价值点,MatMul + reduce resident e2e 约 28x-180x;三类 batch rollout 在典型候选规模下约 4x-7x;残差诊断、窗口残差、候选特征和指标类算子适合作为 NPU resident 后处理,避免中间轨迹回传 CPU。 - **工程定位清晰**:pid_tuning_rule_batch 算术强度较低,不作为单独性能卖点,但它支撑 E2E 中“模型参数 -> PID 候选”的 device 侧候选生成阶段;评估类算子推荐挂在 NPU resident 流水线后端使用。 ## 主要改动 - 9 个新增正式算子目录,均包含 op_host / op_kernel / examples / tests / docs / README 等标准交付件结构。 - 3 个前序 *_basis_gemm_fit 模型辨识算子作为基础能力保留,并补充 benchmark、README 和文档说明。 - common/ 提供 CPU / NumPy reference 与共享辅助实现。 - e2e/ 提供全链路验证驱动,包括 e2e_perf、e2e_orchestrator.py 和 build_e2e.sh。 - 顶层 docs/ 收敛为正式交付文档:design.md、test_report.md、pid_operator_catalog_by_purpose.md。 ## 验证环境 Ascend910B3,CANN toolkit,g++ 10.3.1 See merge request: cann/mat-chem-sim-pred!21 | 1 个月前 | |
feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Co-authored-by: liuhaidong<aliutec@163.com> # message auto-generated for no-merge-commit merge: !21 merge devin/1781921853-pid-modelfit-ops into master feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Created-by: haikuo Commit-by: liuhaidong Merged-by: cann-robot Description: ## Summary 本次为 **PIDModelFit** 算子系列提交:当前正式口径共 **12 个 NPU 自定义算子**,其中包括前序已提交的 **3 个 *_basis_gemm_fit 模型辨识算子**,以及本轮新增并保留的 **9 个诊断、整定、候选仿真、特征提取和评估类算子**。这 12 个算子共同覆盖 PID 整定主流程:模型辨识 → 模型诊断 → PID 参数生成 → 候选闭环仿真/评分/选优 → 候选特征提取 → 控制性能与过程能力评估。 > 重点(committer 第一眼):本次正式合入范围已从早期探索口径收敛为 **12 个正式算子**。前序 3 个 *_basis_gemm_fit 辨识算子作为模型辨识基础能力保留,并补充 benchmark、docs/benchmark.md 与 README 描述;本轮新增并保留 9 个下游算子,补齐 PIDModelFit 从“能辨识模型”到“能诊断、能整定、能仿真选优、能验收评估”的完整工程链路。探索/历史原型算子不进入本次正式提交范围。 ## 算子清单(9 新 + 3 已有 = 12),按 PID 整定 6 阶段 1. **模型辨识**:pid_fopdt_basis_gemm_fit · pid_ipdt_basis_gemm_fit · pid_sopdt_basis_gemm_fit 2. **模型质量诊断**:pid_residual_diagnostics · pid_windowed_residual_diagnostics 3. **PID 参数生成**:pid_tuning_rule_batch(Ziegler-Nichols / IMC / Cohen-Coon) 4. **候选闭环仿真、评分与选优**:pid_fopdt_batch_rollout_score · pid_ipdt_batch_rollout_score · pid_sopdt_batch_rollout_score 5. **候选响应特征提取**:pid_step_response_features 6. **控制性能与过程能力评估**:pid_control_performance_metrics · pid_process_capability_metrics → 新增的 IPDT / SOPDT rollout 补齐了候选仿真阶段对 FOPDT / IPDT / SOPDT 三类模型的覆盖;三个 batch rollout 算子已融合候选特征、候选评分和 best 选择,直接输出每条回路的最优 PID 候选结果。 ## E2E 验证:算子有效且具备 NPU resident 链路价值(Ascend910B3 / node202 真编真跑) - **有效(精度)**:12/12 算子均提供 Python/CPU reference、精度测试或 NPU smoke/benchmark 入口;NPU 输出与 CPU reference 在 float32 容差内对齐。FOPDT 全链路 E2E 覆盖 fit -> tuning_rule -> fopdt_rollout -> performance_metrics,分阶段与 CPU reference 对齐,链路语义自洽。 - **高效(vs CPU 64 线程)**:模型辨识 pipeline 是最明确 NPU 价值点,MatMul + reduce resident e2e 约 28x-180x;三类 batch rollout 在典型候选规模下约 4x-7x;残差诊断、窗口残差、候选特征和指标类算子适合作为 NPU resident 后处理,避免中间轨迹回传 CPU。 - **工程定位清晰**:pid_tuning_rule_batch 算术强度较低,不作为单独性能卖点,但它支撑 E2E 中“模型参数 -> PID 候选”的 device 侧候选生成阶段;评估类算子推荐挂在 NPU resident 流水线后端使用。 ## 主要改动 - 9 个新增正式算子目录,均包含 op_host / op_kernel / examples / tests / docs / README 等标准交付件结构。 - 3 个前序 *_basis_gemm_fit 模型辨识算子作为基础能力保留,并补充 benchmark、README 和文档说明。 - common/ 提供 CPU / NumPy reference 与共享辅助实现。 - e2e/ 提供全链路验证驱动,包括 e2e_perf、e2e_orchestrator.py 和 build_e2e.sh。 - 顶层 docs/ 收敛为正式交付文档:design.md、test_report.md、pid_operator_catalog_by_purpose.md。 ## 验证环境 Ascend910B3,CANN toolkit,g++ 10.3.1 See merge request: cann/mat-chem-sim-pred!21 | 1 个月前 | |
feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Co-authored-by: liuhaidong<aliutec@163.com> # message auto-generated for no-merge-commit merge: !21 merge devin/1781921853-pid-modelfit-ops into master feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Created-by: haikuo Commit-by: liuhaidong Merged-by: cann-robot Description: ## Summary 本次为 **PIDModelFit** 算子系列提交:当前正式口径共 **12 个 NPU 自定义算子**,其中包括前序已提交的 **3 个 *_basis_gemm_fit 模型辨识算子**,以及本轮新增并保留的 **9 个诊断、整定、候选仿真、特征提取和评估类算子**。这 12 个算子共同覆盖 PID 整定主流程:模型辨识 → 模型诊断 → PID 参数生成 → 候选闭环仿真/评分/选优 → 候选特征提取 → 控制性能与过程能力评估。 > 重点(committer 第一眼):本次正式合入范围已从早期探索口径收敛为 **12 个正式算子**。前序 3 个 *_basis_gemm_fit 辨识算子作为模型辨识基础能力保留,并补充 benchmark、docs/benchmark.md 与 README 描述;本轮新增并保留 9 个下游算子,补齐 PIDModelFit 从“能辨识模型”到“能诊断、能整定、能仿真选优、能验收评估”的完整工程链路。探索/历史原型算子不进入本次正式提交范围。 ## 算子清单(9 新 + 3 已有 = 12),按 PID 整定 6 阶段 1. **模型辨识**:pid_fopdt_basis_gemm_fit · pid_ipdt_basis_gemm_fit · pid_sopdt_basis_gemm_fit 2. **模型质量诊断**:pid_residual_diagnostics · pid_windowed_residual_diagnostics 3. **PID 参数生成**:pid_tuning_rule_batch(Ziegler-Nichols / IMC / Cohen-Coon) 4. **候选闭环仿真、评分与选优**:pid_fopdt_batch_rollout_score · pid_ipdt_batch_rollout_score · pid_sopdt_batch_rollout_score 5. **候选响应特征提取**:pid_step_response_features 6. **控制性能与过程能力评估**:pid_control_performance_metrics · pid_process_capability_metrics → 新增的 IPDT / SOPDT rollout 补齐了候选仿真阶段对 FOPDT / IPDT / SOPDT 三类模型的覆盖;三个 batch rollout 算子已融合候选特征、候选评分和 best 选择,直接输出每条回路的最优 PID 候选结果。 ## E2E 验证:算子有效且具备 NPU resident 链路价值(Ascend910B3 / node202 真编真跑) - **有效(精度)**:12/12 算子均提供 Python/CPU reference、精度测试或 NPU smoke/benchmark 入口;NPU 输出与 CPU reference 在 float32 容差内对齐。FOPDT 全链路 E2E 覆盖 fit -> tuning_rule -> fopdt_rollout -> performance_metrics,分阶段与 CPU reference 对齐,链路语义自洽。 - **高效(vs CPU 64 线程)**:模型辨识 pipeline 是最明确 NPU 价值点,MatMul + reduce resident e2e 约 28x-180x;三类 batch rollout 在典型候选规模下约 4x-7x;残差诊断、窗口残差、候选特征和指标类算子适合作为 NPU resident 后处理,避免中间轨迹回传 CPU。 - **工程定位清晰**:pid_tuning_rule_batch 算术强度较低,不作为单独性能卖点,但它支撑 E2E 中“模型参数 -> PID 候选”的 device 侧候选生成阶段;评估类算子推荐挂在 NPU resident 流水线后端使用。 ## 主要改动 - 9 个新增正式算子目录,均包含 op_host / op_kernel / examples / tests / docs / README 等标准交付件结构。 - 3 个前序 *_basis_gemm_fit 模型辨识算子作为基础能力保留,并补充 benchmark、README 和文档说明。 - common/ 提供 CPU / NumPy reference 与共享辅助实现。 - e2e/ 提供全链路验证驱动,包括 e2e_perf、e2e_orchestrator.py 和 build_e2e.sh。 - 顶层 docs/ 收敛为正式交付文档:design.md、test_report.md、pid_operator_catalog_by_purpose.md。 ## 验证环境 Ascend910B3,CANN toolkit,g++ 10.3.1 See merge request: cann/mat-chem-sim-pred!21 | 1 个月前 | |
feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Co-authored-by: liuhaidong<aliutec@163.com> # message auto-generated for no-merge-commit merge: !21 merge devin/1781921853-pid-modelfit-ops into master feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Created-by: haikuo Commit-by: liuhaidong Merged-by: cann-robot Description: ## Summary 本次为 **PIDModelFit** 算子系列提交:当前正式口径共 **12 个 NPU 自定义算子**,其中包括前序已提交的 **3 个 *_basis_gemm_fit 模型辨识算子**,以及本轮新增并保留的 **9 个诊断、整定、候选仿真、特征提取和评估类算子**。这 12 个算子共同覆盖 PID 整定主流程:模型辨识 → 模型诊断 → PID 参数生成 → 候选闭环仿真/评分/选优 → 候选特征提取 → 控制性能与过程能力评估。 > 重点(committer 第一眼):本次正式合入范围已从早期探索口径收敛为 **12 个正式算子**。前序 3 个 *_basis_gemm_fit 辨识算子作为模型辨识基础能力保留,并补充 benchmark、docs/benchmark.md 与 README 描述;本轮新增并保留 9 个下游算子,补齐 PIDModelFit 从“能辨识模型”到“能诊断、能整定、能仿真选优、能验收评估”的完整工程链路。探索/历史原型算子不进入本次正式提交范围。 ## 算子清单(9 新 + 3 已有 = 12),按 PID 整定 6 阶段 1. **模型辨识**:pid_fopdt_basis_gemm_fit · pid_ipdt_basis_gemm_fit · pid_sopdt_basis_gemm_fit 2. **模型质量诊断**:pid_residual_diagnostics · pid_windowed_residual_diagnostics 3. **PID 参数生成**:pid_tuning_rule_batch(Ziegler-Nichols / IMC / Cohen-Coon) 4. **候选闭环仿真、评分与选优**:pid_fopdt_batch_rollout_score · pid_ipdt_batch_rollout_score · pid_sopdt_batch_rollout_score 5. **候选响应特征提取**:pid_step_response_features 6. **控制性能与过程能力评估**:pid_control_performance_metrics · pid_process_capability_metrics → 新增的 IPDT / SOPDT rollout 补齐了候选仿真阶段对 FOPDT / IPDT / SOPDT 三类模型的覆盖;三个 batch rollout 算子已融合候选特征、候选评分和 best 选择,直接输出每条回路的最优 PID 候选结果。 ## E2E 验证:算子有效且具备 NPU resident 链路价值(Ascend910B3 / node202 真编真跑) - **有效(精度)**:12/12 算子均提供 Python/CPU reference、精度测试或 NPU smoke/benchmark 入口;NPU 输出与 CPU reference 在 float32 容差内对齐。FOPDT 全链路 E2E 覆盖 fit -> tuning_rule -> fopdt_rollout -> performance_metrics,分阶段与 CPU reference 对齐,链路语义自洽。 - **高效(vs CPU 64 线程)**:模型辨识 pipeline 是最明确 NPU 价值点,MatMul + reduce resident e2e 约 28x-180x;三类 batch rollout 在典型候选规模下约 4x-7x;残差诊断、窗口残差、候选特征和指标类算子适合作为 NPU resident 后处理,避免中间轨迹回传 CPU。 - **工程定位清晰**:pid_tuning_rule_batch 算术强度较低,不作为单独性能卖点,但它支撑 E2E 中“模型参数 -> PID 候选”的 device 侧候选生成阶段;评估类算子推荐挂在 NPU resident 流水线后端使用。 ## 主要改动 - 9 个新增正式算子目录,均包含 op_host / op_kernel / examples / tests / docs / README 等标准交付件结构。 - 3 个前序 *_basis_gemm_fit 模型辨识算子作为基础能力保留,并补充 benchmark、README 和文档说明。 - common/ 提供 CPU / NumPy reference 与共享辅助实现。 - e2e/ 提供全链路验证驱动,包括 e2e_perf、e2e_orchestrator.py 和 build_e2e.sh。 - 顶层 docs/ 收敛为正式交付文档:design.md、test_report.md、pid_operator_catalog_by_purpose.md。 ## 验证环境 Ascend910B3,CANN toolkit,g++ 10.3.1 See merge request: cann/mat-chem-sim-pred!21 | 1 个月前 | |
feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Co-authored-by: liuhaidong<aliutec@163.com> # message auto-generated for no-merge-commit merge: !21 merge devin/1781921853-pid-modelfit-ops into master feat(PIDModelFit): 新增 9个 PID 整定算子 + E2E 验证(系列共 12个,完整覆盖 PID 整定流程) Created-by: haikuo Commit-by: liuhaidong Merged-by: cann-robot Description: ## Summary 本次为 **PIDModelFit** 算子系列提交:当前正式口径共 **12 个 NPU 自定义算子**,其中包括前序已提交的 **3 个 *_basis_gemm_fit 模型辨识算子**,以及本轮新增并保留的 **9 个诊断、整定、候选仿真、特征提取和评估类算子**。这 12 个算子共同覆盖 PID 整定主流程:模型辨识 → 模型诊断 → PID 参数生成 → 候选闭环仿真/评分/选优 → 候选特征提取 → 控制性能与过程能力评估。 > 重点(committer 第一眼):本次正式合入范围已从早期探索口径收敛为 **12 个正式算子**。前序 3 个 *_basis_gemm_fit 辨识算子作为模型辨识基础能力保留,并补充 benchmark、docs/benchmark.md 与 README 描述;本轮新增并保留 9 个下游算子,补齐 PIDModelFit 从“能辨识模型”到“能诊断、能整定、能仿真选优、能验收评估”的完整工程链路。探索/历史原型算子不进入本次正式提交范围。 ## 算子清单(9 新 + 3 已有 = 12),按 PID 整定 6 阶段 1. **模型辨识**:pid_fopdt_basis_gemm_fit · pid_ipdt_basis_gemm_fit · pid_sopdt_basis_gemm_fit 2. **模型质量诊断**:pid_residual_diagnostics · pid_windowed_residual_diagnostics 3. **PID 参数生成**:pid_tuning_rule_batch(Ziegler-Nichols / IMC / Cohen-Coon) 4. **候选闭环仿真、评分与选优**:pid_fopdt_batch_rollout_score · pid_ipdt_batch_rollout_score · pid_sopdt_batch_rollout_score 5. **候选响应特征提取**:pid_step_response_features 6. **控制性能与过程能力评估**:pid_control_performance_metrics · pid_process_capability_metrics → 新增的 IPDT / SOPDT rollout 补齐了候选仿真阶段对 FOPDT / IPDT / SOPDT 三类模型的覆盖;三个 batch rollout 算子已融合候选特征、候选评分和 best 选择,直接输出每条回路的最优 PID 候选结果。 ## E2E 验证:算子有效且具备 NPU resident 链路价值(Ascend910B3 / node202 真编真跑) - **有效(精度)**:12/12 算子均提供 Python/CPU reference、精度测试或 NPU smoke/benchmark 入口;NPU 输出与 CPU reference 在 float32 容差内对齐。FOPDT 全链路 E2E 覆盖 fit -> tuning_rule -> fopdt_rollout -> performance_metrics,分阶段与 CPU reference 对齐,链路语义自洽。 - **高效(vs CPU 64 线程)**:模型辨识 pipeline 是最明确 NPU 价值点,MatMul + reduce resident e2e 约 28x-180x;三类 batch rollout 在典型候选规模下约 4x-7x;残差诊断、窗口残差、候选特征和指标类算子适合作为 NPU resident 后处理,避免中间轨迹回传 CPU。 - **工程定位清晰**:pid_tuning_rule_batch 算术强度较低,不作为单独性能卖点,但它支撑 E2E 中“模型参数 -> PID 候选”的 device 侧候选生成阶段;评估类算子推荐挂在 NPU resident 流水线后端使用。 ## 主要改动 - 9 个新增正式算子目录,均包含 op_host / op_kernel / examples / tests / docs / README 等标准交付件结构。 - 3 个前序 *_basis_gemm_fit 模型辨识算子作为基础能力保留,并补充 benchmark、README 和文档说明。 - common/ 提供 CPU / NumPy reference 与共享辅助实现。 - e2e/ 提供全链路验证驱动,包括 e2e_perf、e2e_orchestrator.py 和 build_e2e.sh。 - 顶层 docs/ 收敛为正式交付文档:design.md、test_report.md、pid_operator_catalog_by_purpose.md。 ## 验证环境 Ascend910B3,CANN toolkit,g++ 10.3.1 See merge request: cann/mat-chem-sim-pred!21 | 1 个月前 |
PidStepResponseFeatures
功能说明
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 reference:
4 passed。 - node202 / Ascend910B3 CANN 构建通过。
- ACLNN smoke 通过:known case 输出
initial=0 final=10 peak=11 overshoot=0.1 rise_time=2 peak_time=4 settling_time=5 iae=15 ise=91。 - node202 benchmark 中等和较大规模均与 CPU reference 完全对齐,
feature_max_abs=0。
详细材料:
本机验证
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.py
Ascend C 构建与 smoke
cd prediction/ProcessControl/PIDModelFit/pid_step_response_features
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSOC_VERSION=Ascend910B3
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