Lesson 54 of 78 · Modeling & Feedback
PID Tuning, Saturation & Digital Implementation
A parallel PID controller is
Proportional action reacts now, integral action remembers persistent error, and derivative action anticipates change but amplifies high-frequency noise. Real implementations filter derivative and manage limits.
Tune from requirements and physics
- Verify sensor sign, actuator direction, scaling, and open-loop bounds.
- Start with a validated low-order model or safe low-gain test.
- Raise proportional gain to obtain useful response without exciting flexible modes.
- Add integral slowly to meet offset requirements.
- Add derivative or lead only when damping benefit exceeds noise cost.
- Test load, speed, temperature, supply, and configuration extremes.
Do not tune a hazardous machine by provoking uncontrolled oscillation. Use simulation, low-energy fixtures, travel limits, remote observation, and qualified review.
Saturation changes the system
Motors have current, voltage, speed, and thermal limits. When output saturates, the assumed linear loop no longer applies. Use anti-windup: stop or back-calculate integral growth when the requested and delivered control differ. Coordinate position, velocity, and torque limits so inner loops remain faster than outer loops.
Digital details
Sampling, computation, and network transport add delay. Timestamp measurements when timing varies. Define behavior for stale data, missed deadlines, encoder wrap, numeric overflow, startup, parameter changes, and controller reset. Bumpless transfer prevents a large output jump when switching manual/automatic or changing modes.
Acceptance tests
Test reference tracking, disturbance rejection, sensor noise, load variation, saturation recovery, communications loss, restart, and safe stop. Record raw reference, measurement, command, delivered effort, mode, limits, and timestamps.
Course project
Model and tune a simulated or low-energy tabletop axis. Submit requirements, model card, controller rationale, saturation strategy, plots across three load cases, and a discrepancy log between predicted and measured response. The goal is stable, explainable behavior—not the most aggressive gains.
Source trail
References
Further reading
- Analysis and Design of Feedback Control Systems. MIT OpenCourseWare. verifiedUndergraduate course in transfer functions, time and frequency response, stability, loop shaping, state variables, observers, and digital control.
- Dynamics and Control II. MIT OpenCourseWare. verifiedModeling, parameter estimation, time and frequency response, feedback compensation, implementation, and experimental verification.
- Design of Electromechanical Robotic Systems. MIT OpenCourseWare. verifiedOpen textbook, assignments, laboratories, and projects for system design under measurement, environmental, and modeling uncertainty.
Check your understanding
- What does integral action primarily address?
- Persistent steady-state error
- Sensor wiring
- Structural mass
- Gear tooth count
Integral action accumulates error and can remove constant-offset error, but it also adds phase lag and windup risk.
- What is integrator windup?
- Integral state keeps accumulating while the actuator is saturated
- A wire twists
- The sensor samples too fast
- Proportional gain becomes zero
When commanded effort cannot be produced, continued integration can cause large overshoot and slow recovery unless managed.