The application of industrial robots has greatly increased in recent years making production systems more and more efficient. With this in mind, increasingly efficient controllers are needed for those robots.
The LQR control technique represents a intermediate control solution between the simple techniques, such as PID, and more complex ones, such as predictive control, when it comes to design and equation .
Whereas sometimes, LQR controllers are robust and produce a very low steady state error, but with a big transition delay and using multiple feedback gains, that makes them a bad choice when the system needs fast parameters update and has no direct access to all states of the plant. On the other hand, a PID controller gives a faster response but not with robust gains as the previous controller. [1]
So the best controller depends on the problem and which one might perform well is something that one gains by experience .
The inverted pendulum DOES represent many real-world systems. Examples include the Segway, the human posture systems, the launching of a rocket, and so on. Basically, any system that requires vertical stabilization has dynamics that are similar to an inverted pendulum. Sure, the dynamics in these real-world systems are more complex, but they are related. The work involved in modeling and controlling an inverted pendulum carries over to many engineering areas. [2]
Also the maths is easy .
Check out the solutions folder .
Self_Balance_withLQR.py : Simple standing bot on 2 wheels
Self_Balance_withLQR2.py : Bot on 2 wheels with extra feature of up/down/right/left movement
Self_Balance_withPID.py : Standing bot using PID
solution.webm : Video of Self_Balance_withLQR2.py
File Structure :
- exercise : This folder contains the incomplete code for LQR and PID
- experiment : Some example codes to get familiar with pybullet environment
- solution : Solution code for LQR and PID
- urdf : 2-wheel bot urdf
Implementation of LQR , PID for self balancing bot.