智能车程序电磁组int SetPoint=0; //设定目标 Desired Value setpoint选点定位 int FeedBack=0; float KKp=1.5; //比例常数 Proportional Const float KKi=0; float KKd=0.6; //微分常数 Derivative Const signed int EE0=0; //当前误差 signed int EE1=0; //Error[-1] signed int EE2=0; //Error[-
#include #include 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 PI