Sensor-Actuator Feedback Loop Simulator — Proportional Level Control, Open Loop vs Closed Loop & Sensor Bias

Interactive feedback-loop simulator — a pump fills a tank, a level transmitter feeds a proportional controller, and you compare closed-loop control with open-loop drive, sensor bias and an extra drain load.

← Mechatronics Labs
About this tool — how it works & FAQOpen ▾Close ▴

About the Sensor-Actuator Feedback Loop Simulator

A pump feeds a transparent tank while a bottom valve drains it. You follow the level-sensor signal into a proportional controller and back to pump flow, then compare open-loop drive with feedback, sensor bias and an extra drain load.

What the simulator shows

• A process tank with a variable-speed pump, a level transmitter, a comparator and proportional controller, and an outlet valve with a disturbance branch. • Controls for pump command (closed-loop proportional or open-loop fixed drive), target level (0.2-0.8 m), proportional gain (0-4 drive/m), sensor bias (-0.2 to 0.2 m), drain coefficient and an extra drain that opens after 10 s. • Readouts of actual water level, sensor reading, control error, pump command, pump flow and drain flow. • Experiments: closed-loop disturbance rejection, open-loop disturbance, and a biased transmitter.

The model behind it

The tank area is 0.25 m² and the level follows A dh/dt = Qin − Qout − overflow, with Qin = 0.04u and Qout = k√h plus an optional 0.01 m³/s branch. The controller computes u = clamp[0.4 + Kp(r − (h + bias)), 0, 1], or holds u = 0.4 in open-loop mode.

Model boundaries

This is a nonlinear lumped tank with an ideal pump and sensor and deterministic fixed integration. Because the controller is proportional, a steady offset generally remains. There is no pump curve, fluid inertia or sensor noise, and overflow is recorded in the model rather than allowing impossible level growth.

Frequently asked questions

Does proportional control always eliminate steady error?

No. A sustained correction often requires a nonzero error, so with proportional control only a steady offset generally remains.

Does a biased sensor report the true level?

No. Feedback acts on the measurement, including its error. In the lab a sensor bias can produce a small indicated error while the actual level is wrong.

What is the difference between the open-loop and closed-loop pump modes?

In open-loop mode the pump command is fixed at 0.4 and cannot respond to the measured level. In closed-loop mode the command is 0.4 + Kp times the error between target and measured level, limited to 0-1.

What disturbance does the lab apply?

An optional extra drain branch that adds 10 L/s after ten seconds. The closed-loop pump increases its drive after the added drain lowers the level; the open-loop pump cannot.

Related tools & guides