I know peter, but block gives me opportunity to fast manipulate with them, connect here and there. I understand that the best way to learn and to remember is hard way with equations.
I tried to limit controller output with saturation block. saturation block in Matlab is easy, if input is lower than the low limit, outpu is equal to low limit. if input is higher than upper limit, output from the block is equal to upper limit. If input value is between upper and lower limit, output from the block is equal to input value.
There is a problem. Since PID gains are large and negative and PID form is:
Gpid = -605.4-807.2/s, If I limit controller output between 0 and 100% I'll have following problem. In the begining PV = 0, SP =2, error is 2, when multiplying this with PID's gain, this value becomes negative and large and thus, controller output is 0. I used disturbance block in my model to simulate inlet flow. So, when controller output is zero, Flow (25.3) is entering tank blok and level is going up. At one point when Pv become grater than Sp, error becomes negative, after multiplying with larg negative gain constant, output from saturation block that is used to limit controller output jumps istanteniously to 100% and finally in effect I don't have nearly PV values I want.
I simply don't know how to compare this state space simulation and clasical PID simulation with transfer functions...?!!
I'm becoming frustrated because I want to make this simulation with transfer function blocks working first.
This is simulink model, really don't know what to change...
http://www.plctalk.net/qanda/uploads/Tank_simulation_answ.jpg
I'll start working on your simulation step by step until i understand it, but this Simulink simulation with transfer function really starts to worry me...