09-13-2009 01:44 AM - edited 09-13-2009 01:48 AM
Hello All,
I'm using LabVIEW 8.5. I managed to represent the curve of Solar Cel standard equivalent circuit which has an equation that needed to be solved using Newton-Raphson method.
Iph - (I0 * (( exp((V + (I*Rs))/(Ut*m)))-1)) - ((V + (I*Rs))/Rp) - I = 0
then I represent a curve of a measured values of I (Y-Axis) and V(X-axis)
but now with trying to make fitting of a measured curve with to best parameters, I'm facing many problems.
I started to make the fitting using Nonlinear Curve Fitting VI , first I tried to make the model description using a formula String , but the VI can't understand a formula with both X, Y in it.
1,Then F(x,a) as a VI.
2, where the VI solves the Formula using Newton-Raphson zero finder.
3, but then the fitting VI shows an error of input and returns the intial parameters as Best Fit ..
however it used to work well when F(x,a) was given as an ideal model equation " Iph - ((I0/1000000) *( exp( V / (Ut*m) ) -1 ) ) " as long as Ut initial guess is over 0.5 which isn't practical either.
I hope it wasn't too long post, hopefully you have the clue of the problem now.
09-13-2009 12:44 PM
09-13-2009 04:01 PM
Here ar ethe actuals VIs , and the typical measurement files will follow in the next post
09-13-2009 04:28 PM
here are some of the measurment files .. normally I need only the I and V values for the whole optimization process
09-13-2009 06:43 PM
Here are a few tips:
09-14-2009 07:45 AM
first of all thank you for the simplified VI ,
1- I think I do use the same number of Parameters and estimates .. Iph, I0, m, Rp, Rs they are five in both cases.
I don't really understand point 3 and 4 .. from my experience I could only solve this equation using the NR zero finder only..
I think the biggest confusion is what is X and Y , because mainly I is Y and V(or U) is X .. but in NR formula X is I.
09-14-2009 11:20 AM - edited 09-14-2009 11:24 AM
The "Fitting with VI model.vi" you have attached builds an array of only 4 elements for the estimates. (Iph, I0, Rp, Rs) and you also have a disconnected array with only three elements. Maybe you attached the wrong VI.
09-15-2009 02:43 AM - edited 09-15-2009 02:48 AM
I'm sorry . When I checked tha attached file I found it was absolutely the wrong file . Here there again 🙂
please ignore the two non-connected nodes , because I just forgot o remove them
09-15-2009 04:30 AM
I found out that the error I get from the fitting VI is due to "some" values of the Model function that are N/A which could be ignored in practical but the fitting VI couldn't ignore them .. How can I tell the model function to only send values and hide N/A values ?
09-15-2009 11:12 AM
Well, first you need to know why some values are NaN. Maybe there is a division by zero?
It really depends on the problem, but you can do whatever you want in the model, e.g. replace all NaN with a finite large number, for example.