LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create a feedback control system in labview with an integration block?

Hallo,
 
I design a model of a simple mechanic system composed by one damper, one mass and one spring.
I would simulate a free response of this mechanic system, but I don't be able to integrate the mechanic state in Labview.
Seeming that the integration block in LabView produce a wrong answer.
 
I've attached this model create in Labview 8.2.1.
 
Thanks in Advance
 
Michele
0 Kudos
Message 1 of 2
(4,492 Views)
 

Michele,

First of all, when you are trying to develop a Dynamic Simulation, I strongly recommend that you use the LabVIEW Control Design and Simulation Module, or, for LabVIEW 8.2.1, the LabVIEW Simulation Module. They allow you to develop your dynamic simulation natively in LabVIEW, specially in the case that you have feedback loop in your code (which is your case).

Now, looking at your program, I have several recommendations that would help you to better control your simulation. First, avoid using the Dynamic Datatype (Blue wire) in you simulation. For example, you are generating a Waveform inside the loop and you are just getting one element of the first batch. Probably, you want to generate only one element per iteration of the while loop and apply that to your equation. If that is the case, you should remove the "Simulation Signal" express VI and use the Point-by-point VI (located at Signal Processing Pallette). There you can also find an integration VI that allow you to define the sampling time for your application.

Also, the feedback node that you are using will introduce one sampling time to your simulation, which mean that, if your simulation and equations are not correctly setup to take that into account, your simulation will be incorrect. If you were using the Simulation Module, it would take care for your to do the correct integration, additional to allow using different solvers (like RK 4-5) to reduce the error on the integration.

Hope this helps. Let me know if you have more questions.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 2 of 2
(4,471 Views)