Swing-Up and PD Control of an Inverted Pendulum
An energy-driven swing-up strategy combined with a PD controller to stabilize an inverted pendulum. The swing-up phase pumps energy into the system by applying torque in the direction of motion whenever total mechanical energy is below the upright target.
Once the pendulum enters a defined angular window around the upright equilibrium, control switches to a PD controller that linearizes about the unstable fixed point and damps perturbations. Swing-up handles the large-angle, nonlinear regime; PD exploits the locally linear dynamics near the top.