# IMC-based PID Controller

1. Nov 3, 2015

### Maylis

1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
Hello,
I know for a second order process, the tuning parameters are given as $k_{c} = \frac {\tau_{1}+\tau_{2}}{k_{p} \lambda}$, $\tau_{I} = \tau_{1} + \tau_{2}$, and $\tau_{D} = \frac {\tau_{1}+\tau_{2}}{\tau_{1} \tau_{2}}$
Code (Text):

syms s
lambda = 1;
kp = -0.2735;
gp = kp/(s^2+6.035*s+4.146);
[num,den] = numden(gp);
factors = eval(solve(den,s));
tau1 = factors(1); tau2 = factors(2);
kc = (tau1+tau2)/(kp*lambda)
tauI = tau1+tau2
tauD = (tau1+tau2)/(tau1*tau2)
These are my process time constants
Code (Text):

tau1 =

-0.7906

tau2 =

-5.2444

This gives my controller parameters
Code (Text):

kc =

22.0658

tauI =

-6.0350

tauD =

-1.4556
I go into simulink, and here is my model

And here are my PID controller inputs

But I haven't figured out why my controller is not working, here is the output

File size:
1.8 KB
Views:
45
2. Nov 3, 2015

### Maylis

I realized that $\tau_{D} = \frac {\tau_{1} \tau_{2}}{\tau_{1} + \tau_{2}}$, but still my output is not correct even after changing my $\tau_{D}$ term

3. Nov 4, 2015

### Maylis

I figured it out. My time constants were not correct or in the right form