LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the phase values of harmonic component numerically?

Solved!
Go to solution

Hi,

 

Basically what i am trying to do is to analyze the quality of acquired waveforms. What i am interested are both magnitude and phase at some certain frequencies (say 50Hz, 150Hz, 250Hz etc) of a waveform. I tried to use 'spectral measurment express VI' to achieve my goals. It works well, but so far i can only manage to show the spectrums in the graphs. Then , i tried to use 'harmonic distortion Vi' to get the magnitudes of different harmonic components numerically and it is absolutely fine. My question is that how i can get the phase of different harmonic components numerically?  

 

Many Thanks

Hao

0 Kudos
Message 1 of 7
(2,979 Views)
Solution
Accepted by topic author Hao_Liu

FFT plus some manipulation of the outputs seems to work fairly well.

 

I used Tones and Noise Waveform.vi to generate a test signal. The FFT Spectrum (Mag-Phase).vi analyzes the signal. I find the magnitude peaks and extract the phases at those locations. The results are quite close to the input values even when the noise is larger than some of the harmonics.

 

Lynn

0 Kudos
Message 3 of 7
(2,942 Views)

Thanks for your answer. It is really helpful. There is one point i don't understand. Why you add 90 degree for the phase output? 

 

 

Regards, 

Hao 

0 Kudos
Message 4 of 7
(2,873 Views)

Hi,

 

I met some problem again by using this method. I change the input of FFT VI to my acquired current measurment (by using DAQ Assistant express). I can obtain the two plots for magnitude and phase. But when i connected the 'unbundle by name ' VI, some broken wire displayed. Do you have any idea about what happened? 

 

 

Many Thanks,

Hao 

 

0 Kudos
Message 5 of 7
(2,868 Views)

Hao,

 

90 degrees: I did not go back and check now but I think I found that the FFT uses cosine as the phase reference rather than sine (or the other way around). The 90 degree correction made the results match the signal you are using as reference.

 

Broken wire: With the Context Help window open (you do keep it open all the time while coding, right?) move the wiring tool cursor over the broken wire. The Help window will display a message explaining the problem. Either the source and sink data types are different or the wire has loose ends are the most common reasons.

 

Lynn

0 Kudos
Message 6 of 7
(2,853 Views)

Hi,

 

Thank you very much. It was a mistake of the data type. i have sorted it out.

 

Many Thanks

 

Hao

0 Kudos
Message 7 of 7
(2,821 Views)