# LabVIEW

cancel
Showing results for
Did you mean:

## Newton-Raphson method (or else) for equation sollution in LabVIEW

I have some equations (third and fourth order implicit equations) that I would like to solve, but wouldn't like to mess with them. So i would like a method to simply insert the equation and one of the variables and get the other. This is easy using formula node when the variable i want is in the left side of = but what if it's in the right side powered by two three or more? Has anyone done something like this? I know about GMath toolkit, but is not an option. Sollutions should be available for LabVIEW 5.0.1.
Message 1 of 10
(4,732 Views)

## Re: Newton-Raphson method (or else) for equation sollution in LabVIEW

Hi Gorka,
Netwon-Raphson is indeed a powerful method for solving equations. In LabVIEW version 6i there is an excellent implementation of this a method along with another method called Ridders algoritm. With this function (Zeroes and Extrema) you not only get one solution, you get all zeros within an intervall!

However, if you are using 5.0.1 maybe you can use a simple implementation of the Newton-Raphson method I put toghether recently. I attach three files; Function. vi which is the VI where you enter your function, Derivative.vi where you enter the derivative of the function, and NewtonRahpson.vi which is the equation solver. You can enter the function using Formula nodes or hard-wire it and the derivatie can be numerically calculated if your functio
n is complicated (just put the calculation inside Derivative.vi). All VIs can be used in LabVIEW versions 4.1 and up.

As I said, this is nothing fancy, but it works really well for my applications.

Hope this helps.
/Mikael
Message 2 of 10
(4,732 Views)

## Re: Newton-Raphson method (or else) for equation sollution in LabVIEW

Hey! Thanks for the fast answer (just joking), i finally got it by other way, as i knew there was only one sollution, i selected a range in which the function got from positive to negative, and selected the mid point, if it is positive, take a part of the range, if not, the other one, that way untill the sollution fits in a tolerance.
Anyway, i appreciate your help (four stars for you man)
Message 3 of 10
(4,732 Views)

## Re: Newton-Raphson method (or else) for equation sollution in LabVIEW

plz convert this to 2012 labview vi plz i cant open it sir garcia the files you attach function , derivative , and newton raphson.

Message 4 of 10
(3,648 Views)

## Re: Newton-Raphson method (or else) for equation sollution in LabVIEW

@buewow wrote:

plz convert this to 2012 labview vi plz i cant open it sir garcia the files you attach function , derivative , and newton raphson.

Coversion request belong in the version coversion forum.

Here are the converted VIs in 8.0, you should be able to open them. LabVIEW Champion. It all comes together in GCentral What does "Engineering Redefined" mean??
Message 5 of 10
(3,635 Views)

## Re: Newton-Raphson method (or else) for equation sollution in LabVIEW

Can anyone help me?

How to find the coefficients of a0,a1,a2,a3 from the below equations using Newton Raphson method

a0+13.2651a1+175.9619a2+2334.1460a3=0.00364764
a0+13.1080a1+171.8199a2+2252.2178a3=0.00360166
a0+12.6566a1+160.1904a2+2027.4717a3=0.00347041
a0+12.5125a1+156.5620a2+1958.9772a3=0.00342877
a0+12.2920a1+151.0922a2+1857.2188a3=0.0033653
a0+12.0977a1+146.3532a2+1770.5298a3=0.00330961
a0+11.9650a1+143.1612a2+1712.9243a3=0.00327172

Thanks,

Brabin

Message 6 of 10
(2,390 Views)

## Re: Newton-Raphson method (or else) for equation sollution in LabVIEW

Migth have been better to start a new thread... however ...

This seems to perfect for a linear least square fit, see math/fit/linear fit .. help and examples.

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

Message 7 of 10
(2,376 Views)

## Re: Newton-Raphson method (or else) for equation sollution in LabVIEW

coffee break solution using the general linear fit Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

Message 8 of 10
(2,370 Views)

## Re: Newton-Raphson method (or else) for equation sollution in LabVIEW

But using above if i use any four equations out seven, am getting the correct coefficient output.

While using Seven equations the output am getting is not correct

Thank you

Message 9 of 10
(2,363 Views)

## Re: Newton-Raphson method (or else) for equation sollution in LabVIEW

Hi Henrick,

Thank you very much.

The VI which you provided is working fine.

Regards,

Brabin

Message 10 of 10
(2,340 Views)