LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Data input to transfer function / state space model

I am trying to implement a transfer function or state space based controller in an experiment. I am reading the signal that I need to send to my controller (a state space or transfer function block hopefully) from a DAQ board.  I then need to send the output of the state space/ transfer function block (my controller) to the DAQ as an analog out.

 

Is there a block that I can use to do this easily? 

 

I am not sure if the transfer function block in the simulation section will work.

 

 

 

 

0 Kudos
Message 1 of 7
(4,618 Views)

Hi,

 

First, what type of DAQ board are you using?  Does it connect through USB or PCI?  How fast are you expecting to sample and then respond? 

 

The reason that I ask, is that usually using the USB bus introduces too much lag for a system to be responsive.  However, PCI could work.

 

I'd recommend starting in the example finder under Toolkits and Modules>Control Design and Simulation.

 

Cheers,

 

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 2 of 7
(4,600 Views)

Hello craunm,

 

You can do something like this, where AI and AO are essentially your DAQmx Read/Write.

 

20283iA57B12EEE7B377AC

Andy Chang
National Instruments
0 Kudos
Message 3 of 7
(4,595 Views)

I have a PCI nased DAQ.  As far as how fast I will be be sampling...  The faster the better I suppose.  Maybe about .01 or .001 seconds.

0 Kudos
Message 4 of 7
(4,589 Views)

To Andy C,

 

I like your idea.  I was thinking of doing just that.  I am only concerned that the simulation solver will not be able to provide me with an output fast enough.  I suppose I will just have to try and see.  If I may ask, is there any reason that you used the array index block other than for adding a reference signal?

 

 

0 Kudos
Message 5 of 7
(4,572 Views)

The loop rate that you wants to run at (0.01 or 0.001 sec) is not too demanding. Another option would be to use Simulation Loop instead and configure the timing parameter to match your need.

Andy Chang
National Instruments
0 Kudos
Message 6 of 7
(4,565 Views)

Hi, were you able to do the state space control?

I am working on something similar. So, it would be really helpful if you could share the code for reference. The difference is that I am using DAQ NI USB 6211.

 

Thank You.

Suraj

0 Kudos
Message 7 of 7
(3,153 Views)