how to control the cart position in the inverted pendulum?
Show older comments
this is a great tutorial for inverted pendulum study. but using the pid controller, the cart moves with the constant velocity in one direction. but practically we would like the cart to stay with in some range. also practically , we could move the cart in both directions(+ve and -ve x axis) with the help of motors.so how could be implement this system to make the cart stay within certain boundary limits given that cart could move in both directions? plz help out. thanks!
Accepted Answer
More Answers (5)
ragesh r menon
on 31 Mar 2014
Hi there, This is a bench mark problem in control engineering why because
1)system is nonlinear (not a big deal as almost all practical systems are)
2)system identification of the pendulum in upright position is difficult because the system itself is unstable
3)there are two variables (cart position and pendulum position) to be controlled with only one input(force applied with the help of a motor)
So in order to do both, you need two different controllers. One PID control to control the upright position of the pendulum and another PID control so that the cart movement is limited within the specified rail limit. Note that the designed PID controllers will work only in the neighbourhood of your "trim". Also this controller may get destabilized with high disturbances (do this by intentionally giving a push to the pendulum when it is in upright);(as the disturbance increases, the pendulum falls down and to counter this the cart needs to run to max limit of the rail activating the limit switch designed for protection and the motor gets switched off). This model is fine for your purpose of designing a PID loop. And to further refine the mathematical model you can also add a coefficient of friction for pendulum (b*thetadot). For better control design an LQR controller (full state feedback) and see the difference.
apps download
on 20 Jan 2014
0 votes
2 Comments
Mischa Kim
on 20 Jan 2014
OK. Well in this case you'd choose as trim point ve = 0. To demonstrate that the model is working you would set the applied force equal to zero and/or replace it with some small, random disturbance force. You should see the cart zig-zaging around the stationary point.
Mischa Kim
on 20 Jan 2014
[commenting on your "answer" below] Typically the (external) forces acting on a dynamical system are split up into the control force (e.g. from a PID controller) and the external, disturbance forces (e.g. wind gust). Control forces are required to counter the disturbance forces. With "applied force" I was referring to the external disturbance forces.
apps download
on 20 Jan 2014
0 votes
JITHIN
on 23 Apr 2015
0 votes
when i tried to design swing up controller for my pendulum system based on 'energy control', the results obtained are not correct can anyone help me?
Categories
Find more on Tuning, Analysis, and Validation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!