Control Systems - Level 4

The I Term

Back to Module

Concept

The plant in this level has gravity pulling the mass down. With only a proportional controller, the mass settles at some point below the setpoint: once you’re there, the residual error generates just enough upward force to balance gravity. The P controller can’t eliminate this steady-state error without infinite gain.

Enter the integral term. It accumulates error over time:

u(t) = Kp · e(t) + Ki · ∫ e(t) dt

As long as there’s any nonzero error, the integral keeps growing and pumping up the command. The only steady state is one where e = 0, which is exactly what we want!


Try it:

  • Set Kp = 4, Ki = 0. Watch the mass settle below the setpoint.
  • Slowly raise Ki. The steady-state error vanishes.
  • Raise Ki too far: oscillation and sluggish overshoot (the integral accumulates too much before the error flips).

Aside, integral windup: if the actuator is saturated for a long time, the integral can grow huge and cause massive overshoot later. Real implementations clamp the integral (we do, via iMax).

Goal

Bring the mass to the setpoint (±0.05) and hold it there for 2 seconds despite gravity pulling it down. Try Kp around 4 and Ki around 0.8, and let the sim run for a few seconds so the integrator has time to work.

Tune

0.00
0.00

Plant

Response