LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Smith predictor in Control loop

Hi,
I´ve been developing a .vi for controlling a lung simulator.
My hardware is not NI, so all my input/output is through 3 different VISA Serial-USB (Air Flow sensor, Pressure sensor, Motor controller).
The problem I have, is the delay of the flow measures (+- 160ms), so I am searching the way adding a Smith Predictor to the control routine.

 

In the attached, is part of what I am doing, but don´t know if this is ok?
I know that the Simulation Loop is used for simulate certain plant/control, and I also know that the Simulation loop can be put inside a general while loop, so that in every execution of the general while loop, only one step of the ODE solver is executed....

But, can I use a Simulation loop to actually control a real system??


I haven´t found any example of this, all the examples are of simulations, but not real stuff.
Which is the correct way of Deploying complex control in labview for real systems? (not modeling, nor design, nor simulation, neither optimization)

Thank you very much for your time!!
Best regards, Pablo

0 Kudos
Message 1 of 3
(2,613 Views)

Hi baguala,

 

The idea of simulation loop is exaclty this, you simulate a control loop, validade this control algorithm and then you use the validated code to the real world control by changing simulated I/Os to hardware interface functions.

 

Best regards,

Abel Souza
Engenheiro Eletrônico
LabVIEW User since 8.5
0 Kudos
Message 2 of 3
(2,576 Views)

Hey Pablo,

To achieve the behavior you want - where a single step is executed for each step of a while loop you should use a single-stepped simulation subsystem (http://zone.ni.com/reference/en-XX/help/371894G-01/lvsimhowto/sim_h_subsyssa/) instead of using the CD+Sim loop.  This will let you configure your code to run just one step per while loop iteration.

 

Let me know if this helps and if you have any additional questions.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 3 of 3
(2,537 Views)