Hello!,
I want to calculate the phase difference between two Signals. One signal looks like a sine, and the second one is a square wave signal from an inductive sensor.
In the process the signal from the sine is shifted - and i wanted to know this phase difference.
so i tried two different methods:
the first is: i use the " extract single tone information VI" for both signals and calculate the phase difference between this two signals.
the second is: (this is my favorite solution, because the calculated phase is smoother.)
i use the extrac single tone information VI to calculate the phase and the frequence of the signals and generate
a "perfect" square wave and sawtooth from the sine signal and than a calculate the phase difference by evaluate the falling edge of both signals.
My question is:
i have problems with the calculation, because sometimes the signals jumps?? ( in my example by a simulated phase difference of -20degree ) - and i dont know why? .. how can i avoid ths behavior?
what would be a better / proper solution?
Another question is: are there any function where i can calculate / evaluate / the useful signal to the noise signal?
Is it better to do filtering on the FPGA? or on the real time system? - i havent found some possibilities to influence the frequence of the filter during the runtime.?
Thank you very much for your time!
With best regards
Stefan