LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Backward Euler Integration

Solved!
Go to solution

Hello everyone,

 

I am writing a VI to simulate the response of a hydraulic system. Most of the program runs perfectly, but certain sections require integration which has proved to be a problem.

 

I have attempted to use 'Numeric Integration.vi', and have written a forward Euler subVI, which both fail to converge due to the nature of hydraulic systems. It seems that Backward Euler integration is the solution, but I have been unable to find a way to implement it.

 

I have tried evaluating the 'Control Design and Simulation' module, which has a range of integration methods, but the module itself seems unsuitable.

 

I was hoping somebody would have a better understanding of the equations than me, as the implicit nature of Backward Euler is causing me some difficulty.

 

Edit: I have attached a snippet which I have been using to test out possible solutions. It provides testing data and compares the result to the value I am aiming for, which was generated using different software.

 

Integration Options.png

 

Thanks,

Cameron

0 Kudos
Message 1 of 6
(3,567 Views)

If anyone gets an opportunity to try out this code, the iteration value should be connected to subset length, not subset index.

0 Kudos
Message 2 of 6
(3,522 Views)

Just a side note: Your upper code can be replaced by a simple integral x(t).vi. Same result.

 

0 Kudos
Message 3 of 6
(3,505 Views)

No dice with existing methods if you decrease your simulation timestep?

0 Kudos
Message 4 of 6
(3,489 Views)

Thanks altenbach, I'll put that into my testing version.

 

Unfortunately not ToeCutter, I've reduced it to the lowest value I can and it still diverges after less than a second.

I've tried running simulations on some other software (which has various built in integrators) and Backward Euler seems to be the only method I can use.

0 Kudos
Message 5 of 6
(3,463 Views)
Solution
Accepted by topic author CamW

Hi CamW,

 

You can do the backward euler integration in labview by using the Discrete integrator funtion from the control design and simulation module as shown below:

 

backward_euler.png

 

Thanks and Regards,

Thanks and Regards,
Supreeth.K

0 Kudos
Message 6 of 6
(3,411 Views)