Stability and responsible tuning
Recognize unstable or weakly damped behavior and tune a bounded loop from evidence rather than gain folklore.
- Distinguish stable, marginal, and unstable response from a time trace.
- Tune a low-energy loop systematically while respecting delay, saturation, and mechanical limits.
Understand
The working idea
A controller can reduce error at first and still be unsafe. Stability asks what happens to bounded disturbances and initial errors over time. If deviations decay, the operating point is asymptotically stable; if they persist without decay it may be marginal; if they grow, it is unstable. A practical response can also be stable yet poor because it rings, overshoots a stop, or settles too slowly.
For a common second-order model, ÿ + 2ζω_n ẏ + ω_n²y = ω_n²u. Natural frequency ω_n sets a time scale, while damping ratio ζ shapes the transient. For 0 < ζ < 1, percent overshoot is approximately 100 exp[-ζπ/√(1-ζ²)]. Delay adds phase lag: sensing, filtering, computation, communication, and actuator response all mean correction arrives late. Raising loop gain then makes the controller chase old information and can turn damping into oscillation.
Responsible tuning begins with verified feedback sign, conservative output and travel limits, a repeatable test input, and logged signals. Increase proportional gain gradually until response is useful but not persistently oscillatory, then add only the action needed for a diagnosed limitation. Change one parameter at a time and return to a known-safe setting after anomalies. The build decision may be to reduce sample delay or mechanical backlash rather than “tune around” them.
A common misconception is that the highest gain before obvious oscillation is optimal. Noise, payload changes, battery voltage, and untested positions can erase that narrow margin. Another is interpreting a clipped oscillation as stable because its amplitude no longer grows; actuator saturation may merely bound an unstable linear tendency while heating hardware. Do not use aggressive self-oscillation tuning on fragile mechanisms. A clean simulation trace is evidence about its model, not proof that a camera arm or toy car will behave identically.
Follow the reasoning
Worked example
A measured step response peaks at 12.0° for a 10.0° command, then settles at 10.0°. Estimate percent overshoot and damping ratio using the second-order approximation.
- 1
Percent overshoot is (12.0 - 10.0)/10.0 × 100 = 20%.
- 2
Let M_p = 0.20. Rearranging the overshoot relation gives ζ = -ln(M_p)/√(π² + ln²(M_p)).
- 3
ζ = 1.609/√(9.870 + 2.590) = 1.609/3.530 = 0.456.
The response has 20% overshoot and an estimated damping ratio of about 0.46 under the second-order assumption.
Sanity checkA damping ratio between 0 and 1 is consistent with an oscillatory response, and ζ near 0.45 commonly implies noticeable overshoot rather than none.
Try it yourself
Independent check
Move to the bench
Compare settling, overshoot, and disturbance recovery across conservative gain settings.
- Low-voltage closed-loop axis
- Current-limited supply
- Microcontroller logger
- Soft travel stops
- Small removable payload
Experiment
- Verify sign and limits, choose a small step away from end stops, and define metrics before enabling motion.
- Run three conservative proportional gains one at a time, returning to zero output between trials; log reference, output, and command.
- Choose the least aggressive acceptable gain and repeat with a small payload disturbance.
- Deliberate fault: add a known software measurement delay at low output limit; diagnose increased overshoot or oscillation from aligned timestamps, then remove it.
Observe
- Expected: gain initially speeds correction, but delay and higher gain reduce damping and robustness.
- Measure: actual peak, settling band, sample interval, delay, command clipping, and payload; expected trends are not substitute data.
Write acceptance limits for a screen-tilt mechanism, including maximum overshoot, settling time, and a safe rollback setting.
- Keep energy, current, speed, and travel limited; stop on growing oscillation, impact, unexpected heat, or sensor dropout.
Keep evidence
Bench note
Record what you expected, what you actually measured or observed, and one difference worth investigating. This is self-reported evidence, not a certification.