Nonlinear cart-pole dynamics
Tilt is measured toward the right from upright. The rod is massless and the bob is a point mass.
Control & mechanics · Force limits
Can a cart's motor catch a falling pole and then bring the cart back to its start? Yes, if the release tilt is small and the motor can push hard enough. To catch a pole leaning right, the cart must first accelerate right and get back under it. The push also depends on the cart's position and speed, so once the pole is upright the cart is steered back to its start. If the push needed is larger than the motor's limit, the pole falls.
Tilt a three-dimensional cart-pole and let it go. Watch the feedback controller catch the pole and bring the cart back, and see balance fail when the motor cannot push as hard as the controller asks.
Physics tutorial
BackgroundStanding straight up is an unstable equilibrium: any small lean grows. To hold it there, feedback has to respond to the actual motion, using a motor that can only push so hard.
Why it mattersRead the motion, the drive the controller asks for and the mechanical work together, as parts of one experiment.
Start with the essentials
Tilt is measured toward the right from upright. The rod is massless and the bob is a point mass.
The gains are recalculated whenever you change the length or the response rate. They put all four poles of the linearized, unsaturated system at minus the response rate. Every gain sign follows the angle convention above.
The cross term that couples cart and pole cannot be dropped. Potential energy is zero at upright. Only the change in energy is compared with the motor's work, so the choice of zero does not matter.
Typical misconceptionOnce feedback is on, the system will recover from any release.
Better mental modelCompare the limit presets. These controllers balance only near upright and have limited drive strength. They are not swing-up controllers.
Typical misconceptionFeeding back the angle alone will bring the cart back to its start.
Better mental modelThe control force depends on the cart's position and velocity as well as the pole's tilt and angular velocity.
Drag the gold handle to set the initial tilt, then press play.
What to observe: Watch the rod, and watch how hard and in which direction the controller drives the motor.Choose Too little force, then raise the force limit.
What to observe: Look for the moment when the motor stops delivering what the controller asks for.Go to the end of the playback and export the record. Then compare standard and fine integration.
What to observe: The change in mechanical energy matches the work done by the motor, which is negative whenever the motor brakes.Primary theory: MIT · Cart-Pole · ETH Zürich · 1D reaction-wheel model, Section II