Engineering With Python Rotating Header Image

Dynamics of a Heated Tank with Proportional/Integral (PI) Control – Solution

Solve the problem:

Okay, let’s open our IPython window, pull up our script and set Kc = 0.0.  Also, be sure that both the proportional and integral parts of your controller is on.  It doesn’t make a lot of difference since Kc is zero, but it keeps everything straight.  Also, ensure that Ti is ‘on’ for the step and Tr is ‘off’ so it is a constant.

Problem 10 Part 1 Plot

Problem 10 Part 1 Plot

Essentially, you have turned off the controller and therefore the heater.  The tank equilibrates after a little more than a half hour at the feed temperture. The plot of the heater output is what?  It is a straight line at zero.  Now you know what the ‘open loop’ system performancd looks like.  Let’s move on.

prob10part2Temperatureprob10part2HeaterOutput

Now you see the temperature begin to drop, but the heater turns on and heats the solution (closed loop response).  You get a little overshoot and then the temperature is back to the setpoint.  Let’s go to part 3.

Problem 10 Part 3 Kc = 500 Temperature Profile

Problem 10 Part 3 Kc = 500 Temperature Profile

Problem 10 Part 3 Kc = 500 Heater Output

Problem 10 Part 3 Kc = 500 Heater Output

With the gain turned up, the system is not stable.  Essentially, it is over-correcting, you could try tweaking the integral time constants, but probably just need to turn down the gain.  Also, you can see that the heater is ‘maxing’ out and provide the system all of the ‘heat’ is is asking for.  Let’s go to Part 4.

Problem 10 Part 4 Kc = 500 Integral Action = off Temperature Profile

Problem 10 Part 4 Kc = 500 Integral Action = off Temperature Profile

Problem 10 Part 4 Kc = 500 Integral Action = off Heater Output

Problem 10 Part 4 Kc = 500 Integral Action = off Heater Output

Without the integral action, you have a large temperature offset from the setpoint.  The oscillations in the previous part were from the controller trying to drive the temperature to the setpoint, overshoot, off then repeat.  Now, let’s go to part 5.

Problem 10 Part 5 Kc = 5000 Integral Action = off Temperature Profile

Problem 10 Part 5 Kc = 5000 Integral Action = off Temperature Profile

Problem 10 Part 5 Kc = 5000 Integral Action = off Heater Output

Problem 10 Part 5 Kc = 5000 Integral Action = off Heater Output

Whoa!  We’ve got some ‘crazy’ stuff going on with the heater output before the step output.  Now, is that correct or is that an artifact of the program?  You’re seeing some interesting stuff, with the oscillations damping out to a new steady-state and the weird stuff with the heater.  Anyone have a good comment on that?  Next post is our last problem from the 10 on fitting data.  Then, we’ll move on to some other problems.  Comments are welcome.

Leave a Reply