The following animation illustrates the operation of a PID controller using the example of a water level control system. Control behavior, manipulated variable, and disturbance influence are visualized in real time.
Links
Animation Description
The animation shows a water tank as the controlled system (plant) with an inflow (manipulated variable) and an outflow (disturbance variable). A PID controller compares the current water level (process value) with the desired water level (setpoint) and adjusts the inflow accordingly. The setpoint level is displayed as a dashed red line in the tank.
A real-time graph shows the time history of the setpoint and process value, allowing the transient response, overshoot, and steady-state accuracy to be observed directly.
The manipulated variable ( u(t) ) of the PID controller is calculated from three components:
\[ u(t) = K_p \cdot e(t) + K_i \cdot \int e(t)\,dt + K_d \cdot \frac{de(t)}{dt} \]
Where the control error is \( e(t) = w(t) – x(t) \), with \( w \) being the setpoint and \( x \) the process value.
Interactive Controls
The following parameters can be adjusted using the sliders:
- Setpoint w (10–90%): Desired water level of the tank
- Outflow (Disturbance) (0–100%): Simulates an external disturbance through variable outflow
- Kp (0–10): Proportional gain – responds to the current control error
- Ki (0–2): Integral gain – eliminates steady-state error
- Kd (0–10): Derivative gain – dampens rapid changes and reduces overshoot
The simulation can be paused using the Pause button and reset to its initial state using the Reset button.
Physical Background
The PID controller is the most widely used controller type in automation engineering. It combines three modes of action: The P component produces a manipulated variable proportional to the control error – the greater the deviation, the stronger the response. The I component accumulates the control error over time, thereby eliminating any remaining steady-state error. The D component responds to the rate of change of the control error, thus having a dampening effect on overshoot.
The water tank example clearly demonstrates the interplay of these components: A pure P controller (( K_i = 0, K_d = 0 )) leaves a residual steady-state error. Adding the I component eliminates this error, but may cause overshoot. The D component can reduce this overshoot and improve the transient response.
Practical Applications
- Temperature control: Heating systems, air conditioning, and industrial furnaces
- Speed control: Electric motors in manufacturing and robotics
- Level control: Tanks and vessels in process engineering
- Attitude control: Drones, aircraft, and self-balancing systems