1

I just want to double check that I'm understanding the method followed in this paper.

They provide a flow chart with the method followed here.

The equations used are provided here:

Specifically equation 12,18,19.

I'm doing the procedure using python's scipy.optimize.newton lib.

So for the first procedure I initialize Vt,Rs and Rsh to a guess that is some common value.

  • Step 1: Then they say to do Vt = f(Rs,Rsh) so what I did was take equation 12, move the Impp to the right to form -Impp + rest of equation = 0. I then use newton rhapson to return a value of Vt where the equation is equal to 0 for the guessed Rs and Rsh.

  • Step 2: I then move onto the next step Rsh = f(Rs, Vt) and here I take equation 19, take -1/Rsh over so that the equation is -1/Rsh + the rest of equation = 0. Then I sub in the prior calculated Vt from step 1 and the guess of Rs.

  • Step 3: After this I check whether equation 18 is equal to zero subbing in the calculated Rsh and Vt from step 2 and 1 respectively.

  • Step 4: If the obtained value doesn't fulfil Step 3, I select a random value between credible values for Rsh and repeat Steps 1-3.

I just want to double check whether I'm understanding this correctly, namely how there applying newton rhapson to these equations, because I haven't been able to obtain an answer close to something logical using this. Are I doing these three steps correctly as outlined by the flow diagram?

Thank you in advance for any help!

kimchi lover
  • 24,277
  • I suggest you ignore that paper and consult any of the credible articles or books on the web about finding roots of functions of one more more variables. There are several methods depending on context. – Somos Feb 27 '19 at 21:18
  • @Somos, Thank you. I think I'll have a look at a few different articles. This one seemed great when I read it the first time, but has become extremely confusing. I appreciate the input! – Engjunkie Feb 28 '19 at 08:06

1 Answers1

1

That's very peculiar! At that website it says "Newton-Raphson or Bisection Method" but those are very different. In either case you do NOT "select a random value between credible values". Newton-Raphson and bisection can be used to solve equations of the form f(x)= 0, where "x" can represent a multivariable vector.

To use "bisection" you have to initially find values, a and b, such that f(a)< 0 and f(b)> 0 (or f(a)> 0 and f(b)< 0). As long as f is a continuous function, there must be a point between a and b where f(x)= 0. We have no idea exactly where that point is but it is reasonable to try the midpoint, c= (a+ b)/2. If f(c) is not 0 it must differ in sign from either f(a) or f(b) so we know there is a zero in one of those two intervals, a to c or c to b. Every time we do that we reduce the size of the interval by 1/2.

To use "Newton-Raphson" we must first require that f be differentiable. Choose a to be any value of x. If f(a) is not 0 (and if is we are done), we calculate f'(a). Then y= f'(a)(x- a)+ f(a) is the line tangent to the curve y= f(x) at x= a. Since the tangent line is a good approximation to the curve (most often) we can approximate a root of the equation by a root of that linear function: f'(a)(x- a)+ f(a)= 0. That gives f'(a)(x- a)= -f(a) so x- a= -f(a)/f'(a) and then x= a- f(a)/f'(a). If that value of x does not satisfy the equation, repeat with a= that value of x.

user247327
  • 18,710
  • Hi @user247327, I had a look at the website and it seems that if you fon't supply the derivative it uses the secant method. " In either case you do NOT "select a random value between credible values" -> this is what's weird to me, in the flow diagram it says to initialize it to some value and then if the criterion isn't met then you select a new value for Rsh and for Rs, it doesn't mention selecting a value for Vt. I've tried looking for a point where the function changes from + to - or vice versa for the bisection method but it becomes quite hard seeing as the function – Engjunkie Feb 27 '19 at 19:37
  • also depends on two other variables. By the website I mentioned previously I'm referring to scipy.optimize.newton just realized you were referring to the flow chart. I have no idea how to derive these functions though. for instance, would I derive them with respect to the unknown variable? For instance the first block in the flow chart has Vt = f(Rs,Rsh) would I derive it to with in this way d(f(Rs,Rsh)/dVt? Thanks for all the help thus far. I'm slightly extremely confused! – Engjunkie Feb 27 '19 at 19:41