【文件属性】:
文件名称:PID算法源码
文件大小:3KB
文件格式:TXT
更新时间:2016-11-03 08:10:34
PID
#include <string h>
#include <stdio h>
PID Function
The PID 比例 积分 微分 function is used in mainly
control applications PIDCalc performs one iteration of the PID
algorithm
While the PID function works main is just a dummy program showing
a typical usage
typedef struct PID {
double SetPoint; 设定目标 Desired Value
double Proportion; 比例常数 Proportional Const
double Integral; 积分常数 Integral Const
double Derivative; 微分常数 Derivative Const
double LastError; Error[ 1]
double PrevError; Error[ 2]
double SumError; Sums of Errors
} PID;
PID计算部分
double PIDCalc PID pp double NextPoint
{
double dError
Error;">#include <string h>
#include <stdio h>
PID Function
The PID 比例 积分 微分 function is used in mainly
control applications PIDCalc performs one iteration of the PID
[更多]
网友评论
- 没能运行起来,但还是有借鉴意义的 ,赞一个
- without tunning part..but not bad!