From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Feedback loop for taking integral

Hello. I'm trying to model some mathematical equations in LabVIEW and trying to the find the integral using feedback node.

 

Here is the equation I'm trying to model:

i = integral([VBATT - i*R - i*(dL/dt)]/L), where L is a function as well. problem1.JPG

 

At the output of i I get 0. I'm assuming I have to put an input into the feedback loop but I'm not sure what to do here. Any help would be appreciated. Attached is my VI as well.

0 Kudos
Message 1 of 3
(2,642 Views)

Why are you using a feedback node?

 

Feedback nodes are for storing information from one iteration and using it in the next.  Since you don't have any loop and your VI runs once, it will return the default value that the feedback node is initialized with.  Thuse zero.

Message 2 of 3
(2,616 Views)

@OriolesFan wrote:

Why are you using a feedback node?

 

Feedback nodes are for storing information from one iteration and using it in the next.  Since you don't have any loop and your VI runs once, it will return the default value that the feedback node is initialized with.  Thuse zero.


The i I solved for is needed as an input. Those are differential equations.

 

I think I did this wrong actually. I modeled these equations in Simulink but used a transient response to get the results, so I think I need some other module in my LabVIEW to do this. I was trying to take my equations from Simulink and trying to model it in LabVIEW.

0 Kudos
Message 3 of 3
(2,573 Views)