u(t)=kperror(t)+ki(sum(error))+kd(error(t)-error(t-1))
u(t)-u(t-1)=kp*(error(t)-error(t-1))+ki*(error(t))+kd*(error(t)-2*error(t-1)+error(t-2))
如果你想了解更多关于两种pid算法的更多信息参见我的CSDN博客:https://blog.csdn.net/qq_40464599/article/details/106439213
linux ubuntu
sudo apt-get install gnuplot
sudo apt-get install python-matplotlib sudo apt-get install python2.7-dev
在代码的当前路径下打开终端: (1)mkdir build (2)cd build (3)cmake .. (4)make