Physics
Magnetic levitation under control
A feedback controller holds a steel ball below an electromagnet. A nonlinear force law, coil lag, current saturation and contact stops make disturbances and loss of control visible.

Try this
The controller regulates coil current to hold the steel sphere. The red optical line marks the target height. Disturb the ball or disable feedback. Blue curves illustrate the field; their brightness follows current.
Equations used in the module
Equations m x″ = m g − c i²/x² − b x′ i* = x √[m(g + Kp(x − x*) + Kd x′)/c] τ i′ = i* − i; 0 ≤ i ≤ 5 A


