54 / 78

Lesson 54 of 78 · Modeling & Feedback

PID Tuning, Saturation & Digital Implementation

A parallel PID controller is

\[ u=K_pe+K_i\int e\,dt+K_d\frac{de}{dt}. \]

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

  1. Verify sensor sign, actuator direction, scaling, and open-loop bounds.
  2. Start with a validated low-order model or safe low-gain test.
  3. Raise proportional gain to obtain useful response without exciting flexible modes.
  4. Add integral slowly to meet offset requirements.
  5. Add derivative or lead only when damping benefit exceeds noise cost.
  6. 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

  1. What does integral action primarily address?
  2. What is integrator windup?