
Instructor: Hasan A. Poonawala
Mechanical and Aerospace Engineering
University of Kentucky, Lexington, KY, USA
Topics:
Equation of motion
State space
Equilibria
Phase portrait
Swing-up goal
A torque-controlled pendulum of length , mass , damping :
Normalised (divide by , absorb constants into coefficients):
where is the normalised torque input.
State vector:
State-space form:
is measured from the upright vertical
| Position | |
|---|---|
| Straight up | |
| Horizontal | |
| Hanging down |
Positive applies torque in the direction of increasing .

At equilibrium: with , so and .
Two physically distinct equilibria in :
| Physical position | Stability | |
|---|---|---|
| Upright (balanced) | Unstable | |
| Hanging down | Stable |
Linearisation at each equilibrium — let :
Takeaway: without control, the pendulum settles at (hanging). Reaching (upright) requires active control — even to stay there.
Plot vs — each point is a state, arrows show .
Closed loops around → oscillations near the downward equilibrium (pendulum swings back and forth without enough energy to go over the top).
Separatrix — the curves passing through and the unstable equilibria. Trajectories inside the separatrix loop; trajectories outside spin continuously.
Damping causes the loops to spiral inward toward — energy is gradually lost, and the pendulum settles at rest.
The initial condition for our swing-up problem is — just to the left of the downward equilibrium.
Starting at with :
The trajectory spirals inward toward the downward equilibrium .
The upright equilibrium is far away in phase space — zero control cannot get us there, regardless of the initial condition (unless we start exactly there).
The swing-up problem: choose a control sequence that drives the state from to and keeps it there.
Nonlinearity. Linear control (e.g., LQR at the upright) only works near the goal. Starting at places us far outside the linear region.
The goal is unstable. Even if we reach , we must immediately switch to a stabilising controller — or include that requirement in the trajectory optimisation.
Energy must be added at the right time. The pendulum must build enough angular momentum to carry it over the top, without overshooting.
iLQR solves this by: starting from an initial (e.g., zero-control) trajectory, then iteratively refining it via local quadratic approximations of the cost and linear approximations of the dynamics — until the trajectory reaches the goal.
| Concept | Value |
|---|---|
| State | |
| Dynamics | |
| Stable eq. | — pendulum hanging down |
| Unstable eq. | — pendulum upright |
| Initial state | — near downward eq. |
| Goal | — upright, balanced |
The phase portrait makes clear why swing-up requires a nontrivial trajectory: the goal lies on the other side of the separatrix from the natural free motion.
Optimal Control • ME 676 Home