I want to implement a Smith predictor on a distillation column feed temperature. This system has 20 to 30 second time delay. The smith predictor uses an iternal model to give perfect performance for time delay systems. I first want to get some things working before i try it though. In the VI test.vi there is a PID-controller and a simulation of the temperature model, but I don't get the transient behavior what it should be theoretically, with that transfer function. The simulation and PID are not the ones standard in labview PID toolkit or a simulation loop for the model. I tried it first with standard labview blocks and I didn't get the correct transient behavior, so I tried it with a self written version, but I am seeing the same things. Normally they are correctly written (but sloppy ).
Also I included a picture of the correct transient behavior and the behavior I am getting, I don't know why I am not getting the correct behavior.I would be very gratefull if someone could get the correct transient behavior with a simulation loop and PID-block, not necessarily mine! The transferfunction is: 0.0003656/(0.0008248+0.06385*s+1*s²), I removed the time delay. PID-settings: K: 20, Ti (s):77, Td (s): 15. The blue line in PID.jpeg is the correct behavior, I am getting the white line.
Thanks in advance
I am curious here. You said that you tried to use the "LabVIEW Control Design and Simulation" but the behavior is not standard. However, I noticed that you are just trying to implement a RK-2 solver and a PID with some specific features. Could you elaborate more about what is different from the "Control and Simulation Loop"? The Module also has an example of it:
C:\Program Files\National Instruments\LabVIEW 2009\examples\Control and Simulation\Case Studies\Process Control\Smith Predictor\Smith Predictor.vi
Have you exam this example?
Thanks for your reply.
Nothing is different from the control and simulation loop. But I didn't get the correct transient behavior with the simulation loop, so I tried to write something myself (thinking maybe it has something to do with simulation loop), but I am seeing the same thing. I dont know why I don't get the blue line in the figure, that's basically my question. I have added a.vi with a control loop and also a picture of the output compared to to right output now with a simulation loop. The settling time is much higher and there is overshoot + transient behavior is not of first order which it should be.
I didn't see that example yet, I will check it out.
First I calculated the needed Kc Ti and Td to get a first order closed loop response like the blue line. Then I checked the response with matlab and labview (the blue line in the figure), and I got the response I calculated. I just used the CD step response in labview to check and this gives the desired response. But to simulate it in realtime like I tried, I don't get this. I assume every vi and also matlab uses discretization, so why would they give the correct result and not the test.vi. I tried to make really small steps in my VI and I still get the same + the difference in settling time is pretty big.
I implemented the PID formula Kc*(1+1/(Ti*s)+Td*s), and the parameters I gave Kc= 20, Ti= 77 s en Td=15 s are calculated for this PID formula form. I also tested it with a PID block from the control design box along the way, I got the same results. According to the theory, the parameters I use, should give a first order closed loop response with a time constant of 20 s if I remember correctly (and they are calculated for this PID formula). And with Matlab or the Labview CD step response block I get this exact result.
What do you mean with a good result, one that agrees with theory or just a good transient response?
-Do you have the VI or script that does the design?- For a transferfunction without Time delay,it is quite a simple formula to get a certain closed loop response if the transfer function is of 1st or 2nd order.
I attached the VI with the CD step response, which gives the good response according to theory. If I give "Kc=40", "Ti=400 s", "Td=15 s" as parameters in this VI, the overall settling time is quite long, altho it reaches the vicinity of 1 quite fast. But my concern is, what is causing the different transient response with my parameters when I simulate it like test.vi or with a control simulation loop.
I hope i answered the questions you had in mind.