Control Systems - Level 6

Tuning Challenge

Back to Module

Concept

Time to put all three terms together against a harder plant: a mass with friction, gravity pulling down, and a spring that wants to drag everything back to zero. The dynamics are now second-order with a resonance of its own.

m·ẍ + b·ẋ + k·x = u − m·g + d

A real-world tuning strategy:

  1. Zero Ki and Kd. Raise Kp until the response is fast with manageable overshoot.
  2. Add Kd to trim the overshoot — push Kp a little higher if you have headroom.
  3. Add Ki to eliminate the steady-state offset caused by gravity + spring.
  4. Iterate.


This is the classic Ziegler-Nichols flavor of manual tuning. Real practitioners also look at rise time, phase margin, and disturbance rejection.


Once you’ve settled, drag the d slider to push the mass with an external disturbance. A well-tuned PID rejects it; a poorly-tuned one oscillates or drifts.

Goal

Second-order plant with inertia, friction, gravity, AND a spring pulling back to zero. Settle within ±0.05 of the setpoint. Once stable, try poking with the d slider - a well-tuned controller should reject the push.

Tune

0.00
0.00
0.00
0.00

d is an external disturbance force applied to the plant.

Plant

Response