The difference between PID algorithm rotating inverted pendulum and balance car. This post will be updated.

  My background and experience in PID algorithm: I am a major in electronic information science and technology. Now I am a third-year student. I am very interested in the direction of control. When I first went to college, I heard the laboratory teacher talk about PID algorithm. The training camp is preparing for the National Electronic Design Competition. I am practicing a topic from a former specialist, windsurfing angle control system. I still don’t understand what PID is. The teacher asked me to add PID to this topic. At that time, I gave some electronic versions of some tutorials, but I didn't understand them. . . . . . . Later, I was very interested in quadrotors. I wanted to get one to play and then write the program myself to make one. I bought a PIX flight controller and played with it for a long time. I did make a simple flight controller myself. Fly up, there is no innovative function. . . (This process took more than a year, and it is a long story. Because the cost of playing airplanes is high and the efficiency is relatively low, I just stopped continuing. Anyway, I am very familiar with PID now. During this period, I also made a balance car and an inverted pendulum. , If you want to ask PID questions, you can contact me at QQ522414928, online at any time.)

I used to play with quadrotors and spent a lot of money on planes:

 

  1. The most popular understanding and explanation of the inverted pendulum and the balance car (also the experience I have worked hard for a long time to summarize) : How abnormal is the rotating inverted pendulum in the electronic competition that year, many people think that a PID can be solved as long as the parameters are moderate. Solved , because the balance car can stand up with only one PID. Many people think that the inverted pendulum is the same as the balance car. Many people have worked hard for a long time and give up because the mechanical structure is not well done or the program and parameters are written incorrectly. I also I have always thought that 1 PID can solve this problem, and ended up giving up after doing it for a while. Simply controlling the angle and following a PID can really make the pendulum stand up, but it ignores a very important detail, that is, the pendulum is balanced when the motor speed is fast, and the motor speed must be very fast when the pendulum is balanced. It will maintain the state of high-speed operation of the motor, but this high-speed rotation is obviously a short-term balance, so the inverted pendulum made with a single-stage PID will instantly balance and fall down immediately.

  Therefore, for the inverted pendulum system, a single-stage PID algorithm cannot be implemented, and at least two stages of PID control are required to stand firm.

 

当年做的平衡车,做过好几个,有单级PID算法的,还有多级PID算法的:

 

 

 

 

     以下是研究倒立摆时遇到的PID串级和并集的困扰:

  2.折腾了很长时间PID的问题,尤其是串级PID,以前还想不明白串级PID的外环输出为什么给内环PID的输入,后来想明白了。但是,今天又有了新的发现,研究了这么长时间的串级PID,今天恍然大悟了,把串级PID的公式推导,把串级的两个PID的两个公式合并成一个公式不就是并级的PID公式吗,感谢平衡小车之家的店主提醒,以前从来没推导过,竟然:串级PID=并级PID,以后研究各种平衡跟踪的问题完全不用考虑难以理解的串级pid了,直接一个PID不行,再并一个PID就可以了,一直纠结的问题原来这么简单,并且把串级PID和并级PID都用倒立摆试了一下,结果效果是一样的。只是并级第二个PID的参数=原来串级外环PID的参数*(乘)原来串级PID内环的参数
 
 
结果:串级PID=并级PID,MD其实是一个玩意,但是并级PID要比串级PID更容易实现一些
 

 用openmv做的PID小球颜色追踪:

 

旋转倒立摆:

 

 

 

想看更多的资料或教程可以到我的QQ空间https://user.qzone.qq.com/522414928/infocenter

或加QQ522414928共同学习

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324503111&siteId=291194637