LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parameters for the ODE solvers for stiff problems.

Hello,

I have a number of ODE that I solved in few seconds in Matlab with ODE15s and I am trying to reproduce the result with the available stiff ODE solver and I think they are

According to this help link

https://zone.ni.com/reference/en-XX/help/371894G-01/lvsimconcepts/sim_c_ode/

 

In my matlab system I have to choose relative and absolueerror tolerance 1E-10 and 1E- 18.

Labview seems to fail or to be too slow to integrate my ODEs.

I attached my code here and how the integration should look like.111.jpg

0 Kudos
Message 1 of 6
(4,510 Views)

Hi ziedhosni,

 

What does LabVIEW failing mean in this case? Are you not able to run the code? Is it returning something unexpected? Any clarification you can provide would be helpful!

 

Best regards, 

Ross S.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 6
(4,468 Views)
Hi Ross,
Indeed, the code runs with no error but I cannot reproduce the graph that I got with matlab. I was expecting the gear solver to work but it gives a weird signal. I think it is a problem in the solver parameters that I should define in advance.
Cheers,
Zied
0 Kudos
Message 3 of 6
(4,463 Views)

ziedhosni,

 

I think you’re on the right track; what differences in parameters are you seeing/setting between programs? If the LabVIEW code is working, you might just need to tune the solver itself. Also, can you be sure that both solvers are using the same solver method?

Ross S.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 6
(4,446 Views)
Dear Ross,
In matlab, I am using ode15s solver which is very good for stiff equations. In labview, I found other names for stiff ode solvers like gear solver but it seems very slow and stuck in few seconds. I have a paper where this method (gear) was used and it is working perfectly in lanview when I Used the differential equations of that paper.
Is there a specific documentation for the each of the solvers in labview and Box of parameters for the simulation loop . All what I found is a short paragraph and no details about this important loop.
Best regards,
Zied
0 Kudos
Message 5 of 6
(4,431 Views)

Hi Zied,

 

Take a look at this link:

 

https://zone.ni.com/reference/en-XX/help/371894G-01/lvsim/sim_simulation_loop/

 

Here you should find helpful resources outlining how the parameters you mention can be configured (Configure Simulation Parameters under the Input Node heading).

 

Best regards,  

Ross S.
Applications Engineering
National Instruments
Message 6 of 6
(4,377 Views)