# PID Control of a Tank Level

PID Control of a Tank Level

The dynamic behavior of the tank height (in meters) is governed by the following ODE:

h

A

dh

dt

F

0

F

1

A=1

2

m

F

0

F

1

3

m

The flow equation is given by: =K where is the valve constant expressed in /(s).

F

1

h

K=0.5

3

m

0.5

m

The setpoint for the tank height is chosen to equal 2 meters.

The inlet flow rate is varied in order to achieve the desired setpoint value using a P, PI, or PID (proportional–integral–derivative) control: =1+e+edt+, where is the error, is the proportional gain, and and are the integral and differential time constants, respectively.

F

0

K

p

1

τ

i

τ

d

de

dt

e=(2-h)

K

p

τ

i

τ

d

For large and =0, the control simplifies to the usual proportional control, which is usually characterized by a small offset value (i.e., the final steady-state height is not exactly equal to the setpoint value).

τ

i

τ

d

PI control is achieved when is taken to be zero. PI control can show an overshoot and dumped oscillations around the setpoint. No offset is observed and the final steady-state tank height is exactly equal to the setpoint value.

τ

d

In the most general case, when ≠0and is not too large, one gets PID control of the tank height.

τ

d

τ

i