LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using newton raphsson zero finder

Solved!
Go to solution

Dear all,

 

I'm trying to use Newton Raphson zero finder VI, but till now I can't get any result from it.. I want to know the proper way to feed it with an equation.. I need it to solve a Photovoltaic iterative equation

 

I= Iph - Io*(exp(V+I*Rs) - 1)  + (V+I*Rs)/Rp

 

 

I'm looking forward for your help

0 Kudos
Message 1 of 12
(7,630 Views)

As mentioned in the original thread, you need to help us too. 🙂

 

Could you give a bit more details and possibly attach your VI and some typical data?

0 Kudos
Message 2 of 12
(7,627 Views)

Hi,

 

You could specify the equation as a formula string, such as

10.0-1.0*(exp(2.0+x*15.0)-1)+(2.0+x*15.0)/20.0-x

where x is the unknown variable which **MUST NOT** be in captial letter. And, I suppose that

Iph = 10.0, Io = 1.0, V = 2.0, Rs = 1.5, Rp = 20.0

are known coefficients. You have to explicitly code those values in the formula string.

 

Starting from LabVIEW 2009, the Newton Raphson Zero Finder VI has a new instance for VI reference input. That is to say, you could create a VI to implement your function and pass the reference of that VI to the zero finder VI. Moreover, you can pass arbitrary values to your function VI. By using this way, it is able to solve the problem where you want to find zeros in a loop and the known coefficients are varied in each iteration.

 

0 Kudos
Message 3 of 12
(7,607 Views)

Thanks a lot for your answer,  I do want to specify the equation into a formula string , but all my tries with converting the Formula into string never works and the result of the Zero is always NaN + there is an error message appears from the "Scan from String" function refering to invalid input.

 

would you please give an example of creating a formula string for the Newton ............ VI ?

 

 

 

0 Kudos
Message 4 of 12
(7,593 Views)
I attached the try I made to convert the formula into string for the N-R zero finder
0 Kudos
Message 5 of 12
(7,588 Views)

Maybe this will help?

 

Also, you are reducing all your inputs to a single DBL. How is the subVI supposed to know all the variables?

Message Edited by altenbach on 08-20-2009 08:58 AM
0 Kudos
Message 6 of 12
(7,580 Views)
Also remember that array indices start with zero. Thus there is no element 6 for a size=6 array. The last one is index 5.
0 Kudos
Message 7 of 12
(7,574 Views)
Solution
Accepted by 049
NR.PNG
帖子被ttrr在 08-20-2009 08:14 PM
时编辑过了
0 Kudos
Message 8 of 12
(7,548 Views)

thanks a lot !! , only How do you input the a,b,c,d... variables into the for loop ? I couldn't find this string table in my Labview 8.5 ... can you give me the right name of it ?

 

0 Kudos
Message 9 of 12
(7,515 Views)
That is a string array.  Array container.  Drop a string constant into it.  Expand it.  Type in the values you want for each element
0 Kudos
Message 10 of 12
(7,507 Views)