Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5417

NonLinearFitWithMaxIters does not give correct results for phase

$
0
0

Dear all,
I am trying to fit a sin cuve with NonLinearFitWithMaxIters function of labwindows, but the results given by this function are dispersed a lot (the function does not give same results).

In fact, I have two waveforms signals v and i (of 104 points), and I  find the phase between the two signals with NonLinearFitWithMaxIters.

The two singals v and i are  measured with an osciloscope.

I use the following fit functions :
v=p1*sin(wt+p2) ;
i=p3*sin(wt+p4) ;

I use the NonLinearFitWithMaxIters function to fit the data and to have the parameters  p1, p2, p3, p4. Then, the phase is claculated as follow phase=p4-p3.

The problem is that the phase calculted between the two signals (v and i) is different for each run for the same conditions.
In fact, for a same condition, I measure different times the signals v and i, and I calculate the phase p4-p3, using NonLinearFitWithMaxIters. The goal is to calculate a mean of phases for the same condition. For example, there are cases where the phase=-5 degree, and other cases when phase=12 degree.
 
For ten measures of v and i, the phase calculated is different. I get a big dispersion between the phases.
I would like to know please why I have a big difference in phases calculated with the same condition?whern using NonLinearFitWithMaxIters.
I read that this function does not give all time the correct results, is there a way to know when the results are not corrects and when they are correct ?
And is there any solution to find accuratly the phase between the two waveforms.

Thank you for your precious answer.


Viewing all articles
Browse latest Browse all 5417

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>