LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Transfer Function with Initial Outputs in Simulink to LabVIEW

Hi,

 

I need help for converting/design a Transfer Function in Simulink called "Transfer Function with Initial Outputs" into LabVIEW. This transfer function has an option to set Initial input and Initial Output that the normal transfer function in LabVIEW does not have. Really appriciate if someone could help me in this.

 

I tried few experiment using the normal transfer function thats available in LabVIEW and compare it with the simualtion using Transfer Function with Initial Outputs in Simulink and the results varies. With certain values the result are similar but when I keep changing the values randomly sometimes it produce different results. Was wondering if anyone ever had the same problem before?

 

 

Thanks

 

 

Ridhwan Ali

0 Kudos
Message 1 of 9
(6,974 Views)
There isnt a native LabVIEW VI for Transfer Function with Iniial Outputs, but in NI_CD_Time Response.lvlib, there's a cd_IC_Conversion VI that you can use to construct that VI. Let me know if you are able to locate that VI. Can you post your TF and IC along with the response?
Andy Chang
National Instruments
0 Kudos
Message 2 of 9
(6,966 Views)

Hi Andy,

 

What do you mean by IC? I found  NI_CD_Time Response.lvlib but could not see d_IC_Conversion VI that you were saying.

 

The transfer function that I've used is:

 

 

TF 1: 1/(0.001s + 1)

 

TF 2: 1/(0.02s + 1)

 

 

at this moment, for both TF, I set the initial input and output to 0.

 

Btw, is there a tutorial available on how I could contruct the transfer function using NI_CD_Time Response.lvlib?

0 Kudos
Message 3 of 9
(6,958 Views)

You can find that VI here

 

C:\Program Files\National Instruments\LabVIEW 2009\vi.lib\addons\Control Design\_Time Response Analysis\Time Response.llb\Time Response subVI\cd_IC Conversion VI

 

Something like this should do the trick.

 

Untitled.png

Andy Chang
National Instruments
0 Kudos
Message 4 of 9
(6,929 Views)

Hi Andy,

 

I build the example you gave. I did some testing but I gets a different results when while running both TF in Simulink and LabVIEW. Can you check if I'm doing it right? I posted the image of the both simulation below.

 

Btw, I was wondering how could I set the initial input in LabVIEW?

 

 

TF Test.JPG

 

 

 

Thank you.

 

0 Kudos
Message 5 of 9
(6,918 Views)

Here's a screen shot from my result which looks correct.

Could you post your code here?

 

I have posted an example on TF with Initial Condition, which you can find it here.

http://decibel.ni.com/content/docs/DOC-11082

 

Cheers

Andy Chang
National Instruments
0 Kudos
Message 6 of 9
(6,903 Views)
Untitled.png
Andy Chang
National Instruments
0 Kudos
Message 7 of 9
(6,902 Views)

Hi Andy,

 

Attached is the VI I created following the first model you post. In Simulink, there are 2 initial conditions. One for the initial input and the second one for initial output. How could I implement that using the model you created?

 

 

Thanks.

0 Kudos
Message 8 of 9
(6,884 Views)

Hello Tebu,

 

I'm not too familiar with TF with Initial Input. From what I recall, there are TF with initial outputs and TF with initial states/Initial condition. Could you point me to the reference to TF with initial input?

Andy Chang
National Instruments
0 Kudos
Message 9 of 9
(6,860 Views)