LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

plotting waveform of the harmonics

hi all,

I am working on ni-measurement system. I had to check the waveforms of the standard phase reference. I got the waveform of my signal using the scop. but now to see the harmonics of that signal I should use the FFT as I been advised by some people. when I used that way I just got weird thins and it dosn't seem to be like the harmonics. could any one please help me to solve this problem. I would attach the file that I got from the scope which included two colmns the second one is for the waveform which should be used to plot the harmonics.  

 

 

 

thank you in advance for your attention

 

0 Kudos
Message 1 of 6
(3,810 Views)

A major problem is the lack of data. FFT-based spectral analyses work best with many cycles of the input signal or exact integer numbers of cycles if the number of cycles is small. Your data hasa about two and one fourth cycles. Further, the frequency resolution, df, is given by fs/N, where fs is the sampling frequency and N is the number of samples. For your data df = 1 MHz. Since the fundamental frequency of your signal is slightly greater than 2 MHz, it is very difficult to determine the actual frequency. Resolving the harmonics is harder.  The fundamental and 2nd and 3rd harmonics are fairly easy to see (but not so easy to quantify) on a graph but the higher harmonics are lost in spectral leakage.

 

Lynn

 

Spectrum.png

Message 2 of 6
(3,804 Views)

thank you for your kind reply. 

so, could you tell me what i have to do in this situation. and how can i plot the waveforms for faundamental, second, third harmonics. 

 

thank you

best regrds

0 Kudos
Message 3 of 6
(3,799 Views)

Hi toalfukar,

 

did you try to calculate the FFT on you rown? What did you get?

What do you expect?

 

Your csv file contains no header lines so I have to guess it's the time scale in column 1 and the signal in column 2.

You have a signal with 2ns resolution with a duration of 500 samples or 1µs. When you do a FFT you get a df of 1MHz with just 250 frequency values (PSD spectra).

 

So what do you expect?

 

Edit: It took me too long to write this message, Lynn already told you the same.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 6
(3,793 Views)

Can you record 10 or 20 microseconds of data at the same sample rate?  Then the frequency resolution would be 100 or 50 kHz. That would help locate the harmonic frequencies more accurately.  

 

Near the zero crossings of the signal the amplitude changes almost 3 mV between samples. While the relationship is not straightforward, this tends to mask signals smaller than that. If you look at the spectrum graph I posted you see that the third harmonic is ~400 uV and all higher ones are <10 uV. Sampling at a higher sampling rate (which may not be supported by your hardware) would allow you to get samples closer together in time, and thus also in amplitude.

 

Lynn

Message 5 of 6
(3,787 Views)

Thank you for your attention. 

Regarding to to the frequency resolution, there is only one option in the scop called Resolution, I don't know if you meant that. I changed it and got two sets of data. could you please see the attached file. there is another thing I would tell, which is the frequency I used for this signal is 1GH and because I used this signal as a phase reference standard I already know that for the faundamental the power should be -14.44 dbm which I don't see after using the FFT. 

I wish that will make my problem more cleare to you. 

 

 

best regards

Thoalfukar

Download All
0 Kudos
Message 6 of 6
(3,738 Views)