Discussion:
Phase Spectrum
(too old to reply)
K_seeker
2008-06-23 23:40:09 UTC
Permalink
Hi
I am trying to understand how to extract the phase information from the Phase Spectrum generated by the Amplitude and Phase Spectrum.vi. The attached VI is using the above function. In the example VI we are adding three signals. Two of them are of same frequency (400 Hz) but with a some phase difference. The third signal is 60 Hz. The main goal here is not only to calculate the power of 400 Hz signal but distinguish if more than one 400 Hz signal is present with some phase shift. Also we need to get an idea what's the phase difference is.
 
I am working with a resolver based system to determine the position information. We are getting a very small error and we suspect that some 400 Hz of capacitive or inductive coupling with a phase shift is causing this problem. If you have any idea how to detect this please post it here.
 
Thanks.
 


SIGNAL ANALYSIS.vi:
http://forums.ni.com/attachments/ni/250/41045/1/SIGNAL ANALYSIS.vi
Jennifer_R
2008-06-26 16:10:15 UTC
Permalink
Hi K_seeker,
You may be interested in the LabVIEW Help topic <a href="http://zone.ni.com/reference/en-XX/help/371361B-01/lvanlsconcepts/compute_amp_phase_spectrums/" target="_blank">Computing the Amplitude and Phase Spectrums</a>.&nbsp;
In addition, application-specific information and tutorials can be found at the <a href="http://zone.ni.com/devzone/cda/tut/p/id/6685" target="_blank">Signal Processing Resource Center</a>.&nbsp;
K_seeker
2008-06-26 16:10:15 UTC
Permalink
Jennifer,
&nbsp;
Thanks I looked over those resources you listed in your posting. I am not quite clear about interpreting the Phase Spectrum graph that is generated with the VI. Can you look at it (or some one in your team) and let me know how it should be read. The included vi will allow you to mix three signals (two 400 Hz and one 6 60 Hz) and run it through the vi I mentioned in the my post. Signals can be phase (Time shifted) any where between 0 to 360 degrees.
&nbsp;
Let me know. THanks.
&nbsp;
&nbsp;
Chris R.
2008-06-26 17:10:13 UTC
Permalink
You find the phase information for a given frequency by looking at the graph reading at the X-axis value corresponding to the location of your frequency of interest. The easy way would be to just use Extract Multiple Tone Information.vi, which I believe does exactly what you want, generating a list of detected frequencies with their respective amplitudes and phases. The problem will be that it sounds like you want to be able to distinguish two tones that have the same frequency but different phases. Unfortunately, that's impossible because when you add two tones of the same frequency, you get just one tone with a magnitude and phase that are a function of the magnitudes and phases of the two original tones. So you're trying to solve for 4 unknowns (magnitude and phase for two tones) given only two equations (the magnitude and phase of the resulting tone). Unless you can get some more information about one of your tones somehow, it will be impossible to distinguish the desired tone from the interfering one.Chris
rpursley8
2008-06-26 19:10:09 UTC
Permalink
If you can figure out the magnitude of one of the signals when the other is zero, then you use that as a reference to determine the other (phase = 0, amplitude = a). c*sin(wt+phi) = a*sin(wt) + b*sin(wt+theta) where c is the measured amplitude of the 400 Hz signal, and phi is the measured phase.The result is two equations:(1)&nbsp;&nbsp;&nbsp; c*cos(phi) = a + b*cos(theta)(2)&nbsp;&nbsp;&nbsp; c*sin(phi) = b*sin(theta)remember if b=0, then c=a and phi=0, and if a=0, then c=b and phi=thetaIf you solve for theta, then you can get(3)&nbsp;&nbsp;&nbsp; cot(theta) = [cos(phi) - (a/c)]/[sin(phi)]substitute theta into (2) to solve for b.The only limitation to this is it is only valid from +90 to -90
Loading...