登录
首页 » SCM » 这是一个比较典型的PID处理程序,在使用单片机作为控制cpu时,请稍作简化,具体的PID 参数必须由具体对象通过实验确定。由于单片机的处理速度和ram资源的限制...

这是一个比较典型的PID处理程序,在使用单片机作为控制cpu时,请稍作简化,具体的PID 参数必须由具体对象通过实验确定。由于单片机的处理速度和ram资源的限制...

于 2022-03-19 发布 文件大小:10.63 kB
0 54
下载积分: 2 下载次数: 1

代码说明:

这是一个比较典型的PID处理程序,在使用单片机作为控制cpu时,请稍作简化,具体的PID 参数必须由具体对象通过实验确定。由于单片机的处理速度和ram资源的限制,一般不采用浮点数运算,而将所有参数全部用整数,运算 到最后再除以一个2的N次方数据(相当于移位),作类似定点数运算,可大大提高运算速度,根据控制精度的不同要求,当精度要求很 高时,注意保留移位引起的“余数”,做好余数补偿。这个程序只是一般常用pid算法的基本架构,没有包含输入输出处理部分。-This is a typical PID process, as in the use of SCM control cpu, please slightly simplified, specific PID parameters to be specific targets identified by experiments. As SCM processing speed and ram resource constraints, generally do not use floating-point operations, and will use all the parameters of all integers, and the final calculations to divide one of the Nth 2 data (the equivalent displacement), will count for a similar operation, it will greatly increase the computing speed, control Accuracy of different requirements and high precision, displacement caused reservations to the attention of the "I", which I do several compensation. This procedure is commonly used algorithm pid the basic structure does not include input and output processing.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696521资源总数
  • 104077会员总数
  • 0今日下载