# IMC-based PID Controller for unstable system

• gfd43tg
In summary: But that was what we wanted. The first zero gives a time constant of 0.908, and the second gives 0.385. I don't think the teacher will give you a system which is never stable, as a homework. So I'm quite confident that the process transferfunction is just fine.This conversation is discussing the process of finding a suitable PID controller for a given process transfer function. In summary, the conversation involves discussing possible errors in the process and trying out different values for the PID controller in order to achieve stability for the system. The process transfer function has been factorized and a PID controller has been determined, but there is still uncertainty about the values of the controller and further work needs to be done to find a suitable
gfd43tg
Gold Member

## 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)

And the inputs to the PID controller

However, my output and manipulated inputs look totally wrong, this controller is not working at all!

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

(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

And my output is still diverging

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.

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.

## 1. What is an IMC-based PID controller?

An IMC-based PID controller is a type of proportional-integral-derivative (PID) controller that is designed using the Internal Model Control (IMC) method. This method involves modeling the system and using the model to design the controller, resulting in better performance for unstable systems.

## 2. How does an IMC-based PID controller work?

An IMC-based PID controller works by using the model of the system to predict the system's response to a control input. It then calculates the control signal based on this prediction and the desired response, taking into account the system's dynamics and stability. This process is repeated in a closed-loop fashion to continuously adjust the control signal and achieve the desired response.

## 3. What are the advantages of using an IMC-based PID controller?

Some of the advantages of using an IMC-based PID controller include improved stability, better performance for unstable systems, and the ability to handle time-varying and nonlinear systems. It also allows for the incorporation of additional control objectives, such as disturbance rejection and setpoint tracking.

## 4. How is an IMC-based PID controller designed?

The design process for an IMC-based PID controller involves several steps, including system identification, model selection, controller tuning, and performance evaluation. The system is first identified using data or a mathematical model. The model is then selected, and the controller is tuned using methods such as the IMC tuning rules. The controller's performance is evaluated by simulating its response to different inputs.

## 5. What are some applications of an IMC-based PID controller?

An IMC-based PID controller can be used in various applications, such as controlling industrial processes, robotics, and automotive systems. It is particularly useful for controlling unstable systems, such as those with long time delays or varying dynamics. It can also be used in systems that require fast response times and precise control, such as in aerospace and medical applications.

• Engineering and Comp Sci Homework Help
Replies
4
Views
3K
• Engineering and Comp Sci Homework Help
Replies
2
Views
1K
• Engineering and Comp Sci Homework Help
Replies
5
Views
2K
• Engineering and Comp Sci Homework Help
Replies
26
Views
3K
• Engineering and Comp Sci Homework Help
Replies
4
Views
4K
• Engineering and Comp Sci Homework Help
Replies
15
Views
2K
• Precalculus Mathematics Homework Help
Replies
3
Views
2K
• Engineering and Comp Sci Homework Help
Replies
1
Views
3K
• Engineering and Comp Sci Homework Help
Replies
3
Views
1K
• Engineering and Comp Sci Homework Help
Replies
1
Views
3K