Web animation: Principle of a PID controller using the example of ship navigation

The following animation illustrates the functional principle of a PID controller. A ship is shown in top view. The ship can be steered manually using the arrow keys on the keyboard. Alternatively, it is possible to adjust the ship’s course using a PID controller.

PID controllers and the simpler P or PI controllers can be found in almost every household. Typical examples are the central heating, the refrigerator, the oven or the processor cooling in a PC/laptop.

Description

The three gain constants Kp, Ki and Kd can be adjusted in the top left-hand area of the animation using the sliders. The optimum settings are marked in green.

The animation can be used to visualise the following phenomena: When operating a pure P controller, a high Kp value leads to a reduction in the permanent control deviation. However, this initially leads to an overshoot. If the permanent control deviation is to be minimised via the Kp value alone, a stable state is only reached late.

A PI controller enables a more precise and faster course adjustment. Overshoot does not occur if the Kp and Ki values are set moderately.

A Kd value (PID controller) can be used to slightly improve the speed of the course adjustment.

Basics

Proportional component (Kp): This proportion determines how strongly the output variable is influenced depending on the current control deviation. A higher Kp value leads to a faster response to control deviations, but at the same time this can lead to increased overshoot.

Integral component (Ki): The Ki value influences the control in relation to the total previous control deviation over time. This is particularly useful for correcting permanent control deviations. A moderate Ki value helps to achieve a stable state without unwanted overshoot.

Differential component (Kd): The Kd value influences the control based on the speed of the control deviation change. This enables improved stability and a faster response to changes in the system.

Requirements

PlatformPC/Mac or Tablet
Resolution (min)1280 x 720

Further information

The GUI elements used in this animation are published under the MIT license:

https://github.com/sebriko/animiert

Leave a Reply

Your email address will not be published. Required fields are marked *