Hi Peter,
I've seen your series of notes "Alvin's tank level control" and definitely lost the plot part way through so I'll get the ball rolling with the basics. My application is controlling the head pond of small hydro plants 150kW to 30 MW with surface areas from 21 m^2 to 50,000 m^2.
we know the tank level changes when flow in and flow out are not equal. The change in level depends on the surface area of the tank.
let
Qin = flow in to the tank (m^3/s)
Qout = flow out of the tank (m^3/s)
A = surface area of the tank (m^2)
z = liquid level in the tank (m)
dz/dt = change in level (m/s)
(1) dz/dt = 1/A(Qin-Qout)
If we use a PI controller to control Qout
let
K=controller gain (m^3/s/m)
zref = tank level setpoint (m)
Tr = reset time (s)
(2) Qout = K{ (z-zref) + 1/Tr∫(z-zref)dt }
substituting 2 in to 1
(3) dz/dt = 1/A (Qin - K{ (z-zref) + 1/Tr∫(z-zref)dt })
differentiating the (3) and multiplying both sides by A, the differential equation for the controlled system is
(4) A*d2z/dt = d/dt Qin - K * d/dt (z-zref) - K * 1/Tr * (z-zref)
or
(5) A * dz2/dt + K * dz/dt + K * z/Tr = d/dt Qin + K * d/dt zref + K * zref/Tr
Writing these equations in text on the forum is kind of awkward and to me makes it more difficult to understand than the notes I am copying from. Does anybody know a better way? Posting PDFs from sage/some kind of latex editor?
edit: looks like I replied to the wrong thread. Let's continue in
http://www.plctalk.net/qanda/showthread.php?t=86229 instead of this "me too" thread.