SystemTest × Positron

Controllers in automatic control

Controllers are needed to keep a controlled variable at a set level. For example, maintaining a constant room temperature or a steady flow of water from a tap requires a temperature or pressure controller. The most widely used type is the PID controller.

Our demonstration project shows how the liquid level in a tank is controlled.

The setup has two water tanks. Water flows by gravity from the first tank into the second and is pumped back from the second to the first. A sensor in the tank measures the water level. The PLC (Programmable Logic Controller) processes this information and calculates the output using the PID control equation. This output controls the pump's flow rate. The change in water level in the tank therefore depends on the difference between inflow and outflow. The PID controller keeps the water level constant even when external conditions change.

Measure · compare · control
max 43 cm
Pressure sensor → Siemens PLC → Pump
Illustration of the control principle

Measurement accuracy. Scaling and the zero point must match the sensor range and mounting height. The maximum water height in the tank is 43 cm.

43 cmmaximum water height in the tank
3 difficulty levelsNOOB · MID · TUDENG
Level 01 / NOOB

Manual pump control

At the first level, you control the pump output directly, without a PID controller. The panel shows the measured water level so you can see how changing the pump output affects it.

Try it yourselfAdjust the pump output as a percentage and watch how the water level changes.
NOOB · pump output and measured water levelClick the image to enlarge ↗
Level 02 / MID

Automatic water level control

At the second level, set the desired water level, or setpoint SP, in centimetres. The PID controller compares it with the measured water level PV and adjusts the pump speed command Y. All three values appear on the panel.

Try it yourselfChange the water level setpoint SP and observe the measured level PV and the pump control output Y.
MID · water level setpoint and automatic controlClick the image to enlarge ↗
Level 03 / TUDENG

Explore the PID control loop

The TUDENG level shows a diagram of the water level control loop. SP is the desired water level, PV is the measured level, and Y is the controller output that drives the pump. The PID controller compares the setpoint with the measurement and adjusts the pump speed.

Try it yourselfFind SP, PV and Y in the diagram. Trace how the measured water level feeds back to the controller and how the controller output drives the pump.
TUDENG · control diagram with SP, PV and YClick the image to enlarge ↗
Additional information / Learning guide

PID parameters

The additional PID screen lets you adjust proportional gain Kp, integral time Ti, derivative time Td and cycle time. These parameters determine how the controller responds to a difference in water level.

What the parameters meanKp sets the strength of the proportional response. Ti sets the integral time scale, and Td the derivative time scale. Cycle time sets how often the controller recalculates its output (0.1, 1, 2 or 5 s). The roles of P, I and D are explained below.
PID · Kp, Ti, Td and cycle timeClick the image to enlarge ↗