news 2026/7/4 7:13:48

CANN/mat-chem-sim-pred SOPDT批处理滚动评分

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
CANN/mat-chem-sim-pred SOPDT批处理滚动评分

PidSopdtBatchRolloutScore

【免费下载链接】mat-chem-sim-pred面向工业领域,聚焦计算仿真、预测两大核心场景,构建面向流程工业"机理+数据"双轮驱动的领域计算层,推动AI for Science在材料化学领域的深度应用。项目地址: https://gitcode.com/cann/mat-chem-sim-pred

Overview

PidSopdtBatchRolloutScoreis an independent SOPDT batch closed-loop rollout operator for PID candidate scoring. It evaluates a batch of SOPDT process models against a shared PID candidate set on NPU and returns the best candidate per loop.

This operator is used in the tuning stage as the SOPDT candidate simulation and selection kernel:

  • input is process model parameters plus PID candidate arrays
  • output is per-loop best score and best PID gains
  • implementation is independent from the earlier model-fit operators

The plant dynamics are a second-order process plus dead time:

y[k+1] = a1 * y[k] + a2 * y[k-1] + b * u[k - delay]

Versus the FOPDT rollout this adds one history statey[k-1]and one coefficient (a1,a2instead of a singlea). The PID control law, scoring, candidate-axis SIMD, delay ring and tiling are identical toPidFopdtBatchRolloutScore.

工程语义

SOPDT rollout 与 FOPDT/IPDT rollout 的候选评估框架相同:输入已辨识出的模型参数和一批 PID 候选,kernel 内部闭环递推,累计IAE/ISE/overshoot/settling_time/control_energy,计算固定 score 并选出每条回路的最优候选。

区别在被控对象动态。SOPDT 多了一个历史输出状态:

y[k+1] = a1 * y[k] + a2 * y[k-1] + b * u[k - delay]

它能表达二阶惯性、较慢过渡和更复杂的动态形态。相比 FOPDT,SOPDT 需要输入a1/a2/b/delay,并在 kernel 中维护y[k]y[k-1]两个输出历史。

PID 候选不由本算子生成;本算子只接收kp[M]ki[M]kd[M]并评估。候选可以来自整定规则、规则附近扰动、人工网格或外部优化器。

当前 batch rollout 已经融合了候选特征、候选评分和候选选优;如果使用本算子直接输出best_result/best_idx,通常不需要再接独立候选评分/选优算子。pid_step_response_features仅用于需要保留完整候选轨迹特征表的另一条模块化链路。

Current status:

  • correctness is validated against the in-process CPU reference (thebenchmarkprogram), max quality rel-err< 1e-3
  • the rollout is a serial time recurrence; the candidate axis is evaluated with a wide vector SIMD lane (kLane=768) so the inner loop is throughput-bound rather than latency-bound

See benchmark report for the measured results.

Inputs And Outputs

TensorDtypeShapeMeaning
a1float32[B]first output-history coefficient (y[k]term)
a2float32[B]second output-history coefficient (y[k-1]term)
bfloat32[B]input gain term (u[k-delay]term)
delayint32[B]input delay, clamped to0..31in kernel
y0float32[B]initial output
spfloat32[B]setpoint
kpfloat32[M]PID candidate Kp
kifloat32[M]PID candidate Ki
kdfloat32[M]PID candidate Kd
best_resultfloat32[B, 8]best candidate metrics per loop
best_idxint32[B]best candidate index per loop

best_resultlayout:

best_score,best_kp,best_ki,best_kd,best_iae,best_ise,best_overshoot,best_settling_time

Build

cd prediction/ProcessControl/PIDModelFit/pid_sopdt_batch_rollout_score cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSOC_VERSION=Ascend910B3 cmake --build build -j$(nproc)

Note:

  • this project now defaults toReleaseifCMAKE_BUILD_TYPEis not specified
  • onnode202, runtime typically needs:
export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/lib64:$PWD/build:$PWD/build/lib:${LD_LIBRARY_PATH}

Test

Python reference test:

python tests/test_pid_sopdt_batch_rollout_score.py

NPU smoke:

./build/test_aclnn_pid_sopdt_batch_rollout_score 0

NPU / CPU benchmark:

./build/benchmark_pid_sopdt_batch_rollout_score 0 64 1024 1024 0 2 0 64 # candidate_tile=0 => auto (min(C, kLane=768))

Documents

  • Algorithm
  • API Reference
  • Benchmark Report

【免费下载链接】mat-chem-sim-pred面向工业领域,聚焦计算仿真、预测两大核心场景,构建面向流程工业"机理+数据"双轮驱动的领域计算层,推动AI for Science在材料化学领域的深度应用。项目地址: https://gitcode.com/cann/mat-chem-sim-pred

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/7/4 7:13:43

jqjq管道运算符深度解析:数据流处理的核心机制

jqjq管道运算符深度解析&#xff1a;数据流处理的核心机制 【免费下载链接】jqjq jq implementation of jq 项目地址: https://gitcode.com/gh_mirrors/jq/jqjq jqjq作为jq的实现版本&#xff0c;其管道运算符&#xff08;|&#xff09;是实现高效数据转换与处理的核心机…

作者头像 李华
网站建设 2026/7/4 7:13:26

status-go API使用手册:从C绑定到HTTP服务的完整接口指南

status-go API使用手册&#xff1a;从C绑定到HTTP服务的完整接口指南 【免费下载链接】status-go The "backend" library for Status Apps 项目地址: https://gitcode.com/gh_mirrors/st/status-go status-go作为Status应用的核心后端库&#xff0c;提供了从C…

作者头像 李华
网站建设 2026/7/4 7:13:14

CANN/Ascend C SIMD对齐加载解压缩函数

asc_loadalign_unpack 【免费下载链接】asc-devkit 本项目是CANN 推出的昇腾AI处理器专用的算子程序开发语言&#xff0c;原生支持C和C标准规范&#xff0c;主要由类库和语言扩展层构成&#xff0c;提供多层级API&#xff0c;满足多维场景算子开发诉求。 项目地址: https://g…

作者头像 李华
网站建设 2026/7/4 7:10:45

CANN/GE Python张量API

Tensor 【免费下载链接】ge GE&#xff08;Graph Engine&#xff09;是面向昇腾的图编译器和执行器&#xff0c;提供了计算图优化、多流并行、内存复用和模型下沉等技术手段&#xff0c;加速模型执行效率&#xff0c;减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友…

作者头像 李华
网站建设 2026/7/4 7:07:07

从deprecated到新方案:Grafonnet-lib迁移指南与最佳实践

从deprecated到新方案&#xff1a;Grafonnet-lib迁移指南与最佳实践 【免费下载链接】grafonnet-lib Jsonnet library for generating Grafana dashboard files. 项目地址: https://gitcode.com/gh_mirrors/gr/grafonnet-lib Grafonnet-lib是用于以代码方式编写Grafana仪…

作者头像 李华
网站建设 2026/7/4 7:05:22

Touch WX与Touch UI:两个框架的区别与联系详解

Touch WX与Touch UI&#xff1a;两个框架的区别与联系详解 【免费下载链接】touchwx 小程序组件化解决方案。官网&#xff1a;https://www.wetouch.net/wx.html 项目地址: https://gitcode.com/gh_mirrors/to/touchwx Touch WX和Touch UI是一对强大的移动端开发框架组合…

作者头像 李华