LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numerically solve an equation in Labview 7.1.1

Is there a way to have Labview solve an equation numberically. Basically I have the following equation:
 
exp(-pi*Ra/Rs)+exp(-pi*Rb/Rs)=1, I measure Ra and Rb and need to solve for Rs. I would like to do this calcution real time and plot the results. Any help would be great.
 
I'm running labview 7.1.1 and have the toolkits but have yet to install any of them.
 
Thanks,
Bryan
0 Kudos
Message 1 of 6
(3,301 Views)
Just a quick question.  Maybe I lost my math skills, but is that equation solvable??

Here is my math: 1=e^(-pi*Ra/Rs)+e^(-pi*Rb/Rs) > ln(1) = ln (e^(-pi*Ra/Rs)+e^(-pi*Rb/Rs)) > 0= (-pi*Ra/Rs)+(-pi*Rb/Rs) = unsolvable (or Rs = 0 or infinite).

If I got it wrong, please let me know.

Kenny
Kenny

0 Kudos
Message 2 of 6
(3,280 Views)
I didnt mean to make it confusing.  The > is a segway between iterations fo my math, not a boolean or greater/less than sign.
Kenny

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

Correct, this equation can not be solved analytically, it must be solved numberically. For example, if Ra=2 and Rb=2.5 then Rs=10.15.

 

Bryan

 
0 Kudos
Message 4 of 6
(3,273 Views)
What if you used the Nonlinear Lev-Mar Fit VI? I haven't tried this in LabVIEW 7.1.1 (it looks like it's implemented a little more elegantly in LabVIEW 8), but it still looks like it might work.
0 Kudos
Message 5 of 6
(3,264 Views)
try this and see if it works.  if you put in a wait ms, it will obvioulsy take much longer to complete the calculations.  It is not the most elegant solution, but it does give me the correct answer each time (Ra=2, Rb=2.5).

to graph it you can use a case structure and using the new Rs value recalc the equation and plot it.

Kenny
Kenny

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