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: 

nonlinear state space equations

Hi!

I want to ask if anybody knows how to solve a nonlinear state space equation using labview

for example:

 

initial conditionx0 = [298; 305];

xdot(1)=(1/(Mg*cvout))*((mdot*cpin*Tg1)-(mdot*cpout*x(1))+U*A*(x(2)-x(1)));
xdot(2)=1/(mH*cpH)*(Q-U*A*(x(2)-x(1)));

output equ : y=x

 

And in equations above cpout is a nonlinear function of  x(1):
cpout=cp1*y(1)+cp2*y(2)+cp3*y(3)+cp4*y(4);

cp4=R*(3.28+.593e-3*x(1)+.04e5/x(1)^2);

 

so we can not calculate A,B,C and D matrix for this to use in labview.( we have nonlinear system)

How can i model and solve this state space equation in labview?

 

Thanks for your help

 

0 Kudos
Message 1 of 10
(4,159 Views)

Howdy iman-d!

There is a VI under Mathematics >> Scripts & Formulas >> Zeros called "nd Nonlinear System Solver". This may be exactly what you are looking for. Give this VI a shot and let me know if this works!

Collin D.
Software Product Manager
0 Kudos
Message 2 of 10
(4,108 Views)

i don't know the important of this solver VI. it gives for example x,y,z that is unkown to us,,, than from that how we can find the state space or transfer function of that equation...

0 Kudos
Message 3 of 10
(3,776 Views)

The best way to solve this equation is to use the "LabVIEW Control Design and Simulation Module (CDSiM)". If you have it installed, you can see a very good example in:

 

C:\Program Files (x86)\National Instruments\LabVIEW 2016\examples\Control and Simulation\Case Studies\Nonlinear\Pendulum\SimEx Nonlinear and Linear Pendulum Simulation.vi

 

This example, shows three different ways to obtain the State-Space and the transfer function of a pendulum. The key way to do that is using the "SIM Linearizer" function.

image.pnglinearizer_2.PNG

Hopefully this gives you the right direction to solve this exercise.

 

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 4 of 10
(3,725 Views)

wow ... i mean just wow...i really exactly want the same direction... just wana say you,,, love u bro,,,, 

can you please share this example as my labview version is 2014 and so i don't have this example.. i will be very thankful...

0 Kudos
Message 5 of 10
(3,707 Views)
0 Kudos
Message 6 of 10
(3,695 Views)

yes i have this module,,, there is also pendulum example but not so much in detail as you have shown,,i just need this example and also same like this if available in 2016 labview examples,,, please.

0 Kudos
Message 7 of 10
(3,687 Views)

Hello shami_jadoon,

 

It looks like the example that Barp references is from the LabVIEW 2016 Control and Simulation examples. If you have the Module installed, you should be able to access the example by following his link.

C:\Program Files (x86)\National Instruments\LabVIEW 2016\examples\Control and Simulation\Case Studies\Nonlinear\Pendulum\SimEx Nonlinear and Linear Pendulum Simulation.vi

 

Best of luck on your project! 

 

0 Kudos
Message 8 of 10
(3,660 Views)

labVIEW 2014 is installed in my computer and in that version this example is not available that's why i ask for that example...

0 Kudos
Message 9 of 10
(3,654 Views)

That makes sense, however, I also have LabVIEW 2014 and the example is available with the toolkit installed. Examples have stayed fairly similar between LabVIEW versions since LabVIEW 2011. If you can't find it through example finder, I have also uploaded it here for your convenience. 

0 Kudos
Message 10 of 10
(3,637 Views)