IMC-based PID Controller for unstable system

8 replies · 3K views · last reply
gfd43tg
Gold Member
Messages
949
Reaction score
48

Homework Statement


Typed homework problem: process transfer function gp(s) = -1.43 / (s^2 + 3.687s - 7.117), with parts (a) to (d) asking for time constants, a filter form, IMC-based PID tuning with lambda = 5, and a Simulink step test.


Homework Equations

The Attempt at a Solution


I'm working on parts (c) and (d) now, but I will show my work for (a) and (b) for completeness.

(a)
Starting with the process transfer function

$$ g_{p} = \frac {-1.43}{s^{2}+3.687s-7.177} $$

The denominator is factorized,

$$ g_{p} = \frac {-1.43}{(s-1.399)(s+5.086)} $$

$$ = \frac {-1.43}{-1.399(\frac {-1}{1.399}s+1)5.086(\frac
{1}{5.086}s+1)} $$

$$ g_{p} = \frac {0.201}{(-0.715s+1)(0.197s+1)} $$

where ##\tau_{1}= -0.715## and ##\tau_{2} = 0.197##. The first time constant makes the process unstable. A singularity occurs at

##s = \frac {1}{\tau_{1}} = \frac {1}{0.715} = 1.399##
-------------------------------------------------------------------------------------------------------------------------------------------------
(b)
$$ f(s) = \frac {\gamma s + 1}{(\lambda s + 1)^{n}} $$
The controller must be semi-proper with an unstable system.
-------------------------------------------------------------------------------------------------------------------------------------------------
(c)

The invertible part of the process transfer function is found,

$$ \tilde {g_{p-}} = \frac {0.201}{0.197s+1} $$
with a filter
$$ f = \frac {\gamma s+1}{5s+1} $$
$$ q = \tilde {g_{p-}}^{-1}f = \frac {0.197s+1}{0.201} \cdot \frac {\gamma s+1}{5s+1} $$

The controller transfer function is determined,

$$ g_{c} = \frac {q}{1-q \tilde {g_{p-}}} $$

$$ = \frac { \frac {0.197s+1}{0.201} \frac {\gamma s+1}{5s+1}}{1 - \frac
{0.201}{0.197s+1} \cdot \frac {0.197s+1}{0.201} \cdot \frac {\gamma s+1}{5s+1} } $$

$$ = \frac {\frac {0.197s+1}{0.201} \cdot \gamma s+1} {(5- \gamma)s} $$

$$ = 4.975 \bigg [ \frac {0.197 \gamma s^{2}+(0.197+ \gamma)s + 1}{(5- \gamma)s} \bigg ] $$

Which is of the form of an ideal PID controller,

$$ g_{c,PID} = k_{c} \bigg [ \frac {\tau_{I} \tau_{D} s^{2} + \tau_{I}s + 1}{\tau_{I}s} \bigg ] $$
Therefore, for the ##\tau_{I}## term to be equal, ##5- \gamma = 0.197+ \gamma##, so ##\gamma = 2.402##.

$$ g_{c} = 4.975 \bigg [ \frac {0.473s^{2}+2.599s+1}{2.599s} \bigg ] $$
##k_{c} = 4.975##, ##\tau_{I} = 2.599##, ##\tau_{D} = 0.473/2.599 = 0.182##
-------------------------------------------------------------------------------------------------------------------------------------------------
(d)
Here is my simulink model
Simulink block diagram of a closed-loop feedback control system: a Step block feeds a summing junction with negative feedback, then a PID Controller block, then a Transfer Fcn block with numerator -1.43 and denominator s^2+3.687s-7.177, with outputs to simout and simout1 To Workspace blocks and a Scope.

And the inputs to the PID controller
Screenshot of a PID controller parameter dialog with Main tab selected: Proportional (P) = kc, Integral (I) = kc/tauI, Derivative (D) = kc*tauD, Filter coefficient (N) = 100, and the compensator formula P + I(1/s) + D(N/(1+N(1/s))) shown at right.

However, my output and manipulated inputs look totally wrong, this controller is not working at all!
Two MATLAB plots side by side: left, flow rate u in kg/s against time 0 to 10 s, staying near zero then rising sharply after about 8 s to about 7 x 10^11; right, temperature y in degrees C against time, staying near zero then falling sharply after about 8 s to about -8 x 10^10.

So I am wondering if I may have done part (c) incorrectly.
 
I might as well post my work for the next set, which asks to make the controller transfer function semiproper
Typed problem parts (e), (f) and (g) asking for a new filter gamma with lambda = 5, a semiproper IMC controller transfer function, and a Simulink comparison with PID plots.

(e) & (f)
$$ q = \frac {0.197s+1}{0.201} \cdot \frac {\gamma s + 1}{(5s+1)^{2}} $$
So here is my controller transfer function worked out
$$ g_{c} = \frac { \frac {0.197s+1}{0.201} \cdot \frac {\gamma s + 1}{(5s+1)^{2}}}{1 - \frac {0.201}{0.197s+1} \cdot \frac {0.197s+1}{0.201} \cdot \frac {\gamma s+1}{(5s+1)^{2}}} $$

$$ = 4.975 \bigg [ \frac {0.197 \gamma s^{2} + (0.197 + \gamma)s + 1}{25s^{2} + (10-\gamma)s} \bigg ] $$
$$ = 4.975 \bigg [ \frac {0.197 \gamma s^{2} + (0.197 + \gamma)s + 1}{(10- \gamma)s( \frac {25}{10-\gamma}s + 1)} \bigg ] $$
Which is of the form
$$ g_{c} = k_{c} \bigg [ \frac { \tau_{I} \tau_{D} s^{2} + \tau_{I} s + 1}{\tau_{I} s(\tau_{F}s+1)} \bigg ] $$
So ##10 - \gamma = 0.197 + \gamma##, so ##\gamma = 4.902##,
This reduces to
$$ 4.975 \bigg [ \frac {0.966 s^{2} + 5.099s + 1}{5.099s( 4.904s + 1)} \bigg ] $$
Where ##\tau_{F} = 4.904## and ##\tau_{D} = 0.966/5.099 = 0.189##
Then I make a new model in simulink
Simulink block diagram: Step1 feeds a summing junction with negative feedback, then PID Controller1, then Transfer Fcn2 (1/(tauF2.s+1)), then Transfer Fcn1 (-1.43/(s^2+3.687s-7.177)), with outputs to To Workspace2, To Workspace3 and Scope1.

And my output is still diverging
Simulink Scope1 plot, Student Version: a yellow curve starts near zero around t=6.5 and falls steeply to about -15 x 10^4 at t=10, on axes marked 0 to 10 and 0 to -15 x 10^4.

So it seems neither of these controllers are working
 
Last edited:
I think you have a sign-error in (c).

kc must be negative because kp is negative.

Otherwise you will have a positive feed-back in your control-loop.
 
It means something might have gone wrong in (b)? Because when I take out the -1.399, it makes the numerator positive
 
Maylis said:
It means something might have gone wrong in (b)?
I don't know. I've just sketched a root locus and can see that the rightmost pole ( s = 1.399 ) will cause a root moving to the right if kc → +∞.
But if you let kc → -∞, the root will move to the left ( toward the stable area ).
 
I don't think I made a sign error, but it's possible that the ##k_{p}## is the problem statement is wrong. Another classmate had the same issue as me, we have not resolved it.
 
Simulink block diagram: Step block feeds a summing junction with signs plus and minus, then a PID(s) Controller, then a Transfer Fcn block with numerator -1.43 and denominator s^2+3.687s-7.177, with outputs to simout and simout1 To Workspace blocks and a Scope, plus a negative feedback loop back to the summing junction.

Well, anyway you can see, that if you follow the circulation path in the loop, the sign will be positive. You are not allowed to change the sign of the transferfunction ( -1.43 ) because it can be due to some inverting amplifier in the hardware, or whatever. But you may change the sign of the PID-controller: You are the one to make that decision.

Try it out, see what happens! Don't make a problem out of that.
 
This is what the grad student responded with in response to the sign of kc and kp being different
Be careful with logic like this. A process gain is the long-time output response of a system. If you have an unstable process, the true long-time response is undefined (infinity). The gain for an unstable process transfer function is no longer meaningful physically so it is not reliable to draw conclusions from the sign.

Also, I changed the sign of the PID controller, and all that happened was a divergence in the opposite direction.
 
Last edited:
The grad student says: Be careful with logic like this.
Well, then be careful. Know what you are doing.

By inserting a PID-controller in the loop, you will increase the system order by 1 ( 3. order characteristic equation ). I don't have the "tools" to handle that right now, calculating the optimal zero/pole/amplification. But for simplification, try to set PID = -7 ( just a P-controller ).

The characteristic equation for the system will be: ( s + 1.092 )( s + 2.595 ) = 0.
Thus it must be stable.