LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

enhanced Smith Predictor for modelled plant

Solved!
Go to solution

Hi guys,

 

I am starting the study of control design field. I have a plant 0.04 / (5s+1)^3 (third order) with a time-delay model 0.04e^5.5s / (5s+1)^3. I saw this in one of the process dynamics books which am using to try some LabVIEW simulation problems. I want to use Smith Predictor for it and make a comparison with a PI controller of the same models and see which will have a favourable control or determine the mismatches.

 

I have seen the PID-SP example on NI and used this idea to start so I used it to test but I don't even get the proper time response (see attachement); how are the P-I controller parameters are calculated? I read some stuff on PID tuning but I think I am missing something in my understanding. If you can point me in the right direction I would be very grateful.

Thanks for your help,

Raz

Download All
0 Kudos
Message 1 of 16
(4,419 Views)

http://en.wikipedia.org/wiki/PID_controller

 

One of the base concept is finding the P which causes oscillation (Kp), and at what period it'll oscillate (Pu).

 

Then you basically set:

Kp = 0.6Ku

Ki = 2Kp/Pu

Kd = KpPu/8

 

Check out the Ziegler–Nichols method in that article, it's a good start.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 16
(4,390 Views)

Hi Yamaeda,

 

Thanks for the response. I am using PI control so on my VI I have simply set the derivative function to zero. I have altered the gain but I do not see much change apart from the shape of the curve and doesn't get to oscillate so I wondered if the actual VI is wrong.

I read some stuff on the tuning methods; Ziegler-Nichols, Cohen and Coon etc to see if I can apply one of them. I decided to try ZN first then I realised I can not generate a proper time response. What I did is use the Smith Predictor in the Example and input the plant and model transfer functions.

Would this be the right code for the PI controller? I was thinking you could find controller parameters if you had the plant and time-delay model transfer functions

 

Please help,

Cheers, R

0 Kudos
Message 3 of 16
(4,385 Views)

Hi,

 

Thanks for posting. I recommend that you have a read of the following articles that talk you through PID control with LabVIEW. These will give you a better idea of what is neccesary and how the functions are meant to behave. It should be a good starting point, as you're uncertain of the way that the parameters are controlled at the moment. 

 

http://www.ni.com/pdf/manuals/322192a.pdf

 

http://www.ni.com/white-paper/3782/en


ShalimarA | CLA
0 Kudos
Message 4 of 16
(4,367 Views)

When you work with Smith Predictor, the PI tuning is done as you did not have the delay on the plant and then, you should use the 3rd order model, approximate to a first order model with delay and use any of the techniques available for tuning as ZN or Cohen-Coon.

 

The PID toolkit (After 2011) has a VI that allow you to obtain a continuous model based on the input/output signal of the model WITHOUT the delay. You could easily do that by using your Control and Simulation Loop (using RK1) and collecting the signal and using a step response.

 

Another option is to use the 3rd order linear model and use the Control Design functions to obtain the step response and then use the CD Get Time Response Data.vi to 'feed' this response to the PID Autotuning Design function.

 

Hopefull this helps.

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 5 of 16
(4,359 Views)

OR you can just tune by hand... 🙂

I had to extend the final time to 100s and I put controls on the P and I constants. And by just changing the values, I was able to get this response... and that is why LV is a cool language to tune controllers... 🙂

 

SPred.PNG

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 6 of 16
(4,354 Views)

And if you change the solver to RK 1, you can use the derivative action and get this image below. I also plotted the Open-loop response, you can compare both results.

SPred2.PNG

 

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 7 of 16
(4,351 Views)

Hi Barp,

 

Thanks for the replies which were helpful. I had a go at the tuning by hand. I got slighly different values, I wonder if I made a mistake; I attached the VI below. Kc = 1.2 and Ti = 0.7

 

I used the Control Design functions and put the linear model with delay transfer function, used CD Feedback and CD Step Response.vi to get the closed-loop. I allowed about 25% overshoot though.

I am also wondering why the modelled delay would only really start responding after 10s. I had to extend the final time beyond 100s like you did?

 

Thanks for your assistence

 

Cheers

0 Kudos
Message 8 of 16
(4,312 Views)

Remmix

 

The reason you have values so different was because you used the "Academic" version of PID instead of the "Parallel" version, which was used on the PID Smith VI. The Control Design PID VI has a selector that you can choose the same version. Also, depending of the version of LabVIEW you have, we have a function in the palette that calculates the closed-loop feedback with controller and plant directly. It is called CD Unit Feedback. But your code is correct, though. Notice that you don't need ot wire the second input of the CD Feedback to obtain the unit feedback on that VI.

 

Out of curiosity, which version of LV are you using?

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 9 of 16
(4,299 Views)

Hi Barp,

 

Thanks for your suggestions again.

 

I don't have a Smith Predictor utilising the PID.vi 'parallel' function, I only know the Simulation . I have changed my the version to parallel but still certainly don't get Kc=0.2 and Ti=10 that you got before from your closed-loop response graph. I have unwired the unit gain second input to CD Feedback.vi and replaced with CD Unit Feedback.vi

I am using LabVIEW 2010 Stud. Edition

 

Any lower gain seem to increase the settling time and eventually unstable; and if you decrease the integral time further it reduces the overshoot which would seem to imply the PI controller is working correctly.

 

Why do we get different parameter values? I have gain K more than 10 and T more than 2 which quite different to what you have (K=0.2; Ti=10). I am wondering if our codes are the same why then do I get different results?

 

My response:

closed-loop response.jpg

 

And my code snap is also attached:

snapshot

Thanks for your help

Cheers,

Remmix

0 Kudos
Message 10 of 16
(4,282 Views)