System Model & Variables
The nonlinear equations of motion for the 2D Inverted Pendulum on a cart are given by:
State Variables:
x: Cart Position (m)xdot: Cart Velocity (m/s)theta: Pendulum Angle (rad)thetadot: Angular Velocity (rad/s)
Parameters:
M= 1.0 kg (Cart Mass)m= 0.1 kg (Pendulum Mass)l= 0.5 m (Length to CoM)g= 9.81 m/s² (Gravity)
Visualization & Charts
Control Law Design
Define the control law `u`. You have access to `x, xdot, theta, thetadot`.