From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

(Control Design & Simulation) State-Space block doesn't give output

Solved!
Go to solution

I've tried and tried but can't get the State-Space block module to give me a graph / output.

 

I have no idea what the problem is and hope that somebody can help me. The numbers and calculations work in Matlab (Simulink) but i can't get it to simulate in labview. 

 

Anybody got any ideas?

Download All
0 Kudos
Message 1 of 3
(2,478 Views)
Solution
Accepted by topic author Firas_M

The problem is that you are assuming that LabVIEW executes left to right. Dataflow doesn't work this way. Your code as this:

punt.png

does not tell LabVIEW that it has to execute everything from left to right. What is happening is that he is executing the 3 'island' of code in parallel and, in this case, it will have 'empty' values. You have to remove the local variables to make this work and dataflow paradigm will execute your code from left to right, as you want. here is the code:

punt 2.png

 

Also, one more thing. Your input to the "CD Linear Simulation" is all zero. That means that you are trying to input zero input to a linear system, which will give you a zero output to the response. You probably do not want that since zero as input doesn't give you any more information. If you want to see how to system goes to zero after initial conditions, you should use "CD Initial Response". Or you should modify the input signal to the system. Please study this shipping example to understand how to use Linear Simulation and Initial Response:

 

C:\Program Files (x86)\National Instruments\LabVIEW 2012\examples\Control and Simulation\Control Design\Time Analysis\CDEx Time Domain Analysis.vi

 

Hope this helps...

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 2 of 3
(2,458 Views)

That helped alot, i thought that the the variables were empty and it would wait to execute until calculated but as you stated it gives matrixes [0 0 ; 0 0 ].

 

The example you sent also got me a few steps forward. Thanks alot! (for now atleast 🙂 )

0 Kudos
Message 3 of 3
(2,439 Views)