Asked by OHSEONG KWON
on 16 Nov 2018

I have a system, it's Transfer function is :

1

------------

s^3 + 1

and I want to design a Discrete PID Controller so discretized the plant at sampling time 0.05s :

0.000019z^2 + 0.00008z + 0.000021

------------------------------------------------- (Sorry, it is not clean..)

z^3 -2.99994z^2 + 3.00006z - 1

This system is unstable and Discrete PID Controller Block's autotuner cannot find Kp, Ki, Kd to stablize the system.

I want to design a PID Controller, not another Controller.

I think it should be added such a filter, derivative filter(Differtiator?) or a Integrator...

How can I design the PID Controller in Matlab and Simulink? It can be designed?

Thanks for read my ask.

Answer by Aquatris
on 16 Nov 2018

Edited by Aquatris
on 16 Nov 2018

Accepted Answer

So you have a transfer function G(s) = 1/(s^3+1) and you want to find gains P,I,D for your controller K(s) = P+D*s+I/s. As commonly known, the closed loop transfer function T(s) can be written as;

T(s) = K(s)*G(s)/(1+G(s)*K(s))

If you plugin G(s) and K(s) functions, you will obtain;

T(s) = (D*s^2 + P*s + I) / (s^4 + D*s^2 + (P+1)*s + I)

From here, it should be clear that a simple controller, K(s) = P+D*s+I/s, cannot stabilize the system (hint: routh-hurwitz stability criterion). That's why your controller needs to have a term that will show up as the s^3 term.

One option is to add a C*s^2 term to your controller. This way your K(s) = P+D*s+I/s+C*s^2, and resulting closed loop transfer function is;

T(s) = (C*s^3 + D*s^2 + P*s + I)/( s^4 + C*s^3 + D*s^2 + (P+1)*s + I )

For instance, imagine you want to place your poles to (-4+0i) (continous time model), then your characteristic equation needs to be;

(s+4)^4 = s^4 + 16*s^3 + +96*s^2 + 256*s + 256 = ( s^4 + C*s^3 + D*s^2 + (P+1)*s + I )

From here, by matching the coefficients, you can find the controller

K(s) = 255+96*s+256/s+16*s^2;

This controller stabilizes G(s), and also places all 4 of the closed loop poles to (-4+0i).

Another method to tune the gains of your controller is to perform Ruth-Hurwitz stability analysis and determine the range of controller gains that achieves closed loop stability.

These calculation are done for continous time however they are valid for discrete time as well, with some modification due to conversion from s to z domain.

Hope this helps.

s = tf('s');

G = 1/(s^3+1);

K = 255+96*s+256/s+16*s^2;

T = minreal(G*K/(1+G*K));

step(T)

Aquatris
on 17 Nov 2018

Keep in mind selecting the poles is important since it will determine the performance of your controller, or in other words the response of your closed loop (overshoot,settling time etc.).

Glad this helped :)

OHSEONG KWON
on 17 Nov 2018

Thank you but Can I ask you one more question?

I got P, I, D and C what I hoped as you said me, and It works in continuous time model.

But I discretized The plant 1/(s^3+1) at Ts=0.05s :

2.083e-05 z^2 + 8.333e-05 z + 2.083e-05

--------------------------------------- (Now I can use the function c2d :) )

z^3 - 3 z^2 + 3 z - 1

but it do not work for same Controller(PIDC Controller). I use SImulink, but I can't what is wrong.

This picture is the continuous and discrete plant and output. In discrete plant, sampling time Ts is set for step input parameter.

What is wrong..?

Aquatris
on 17 Nov 2018

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 0 Comments

Sign in to comment.