Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem wtih measuring THD with PCI-4461

I want to measure the THD with sampling frequency 51200Hz, sample size 2048, df 25Hz. The input siganl is a 1000Hz sine wave. But the recieved siganl frequency is 985Hz. This means fundamental will be on the 39th(985/25) bin. The problems are:
 
1. How to caculate the fundamental and harmonics energy?
2. How to compute the bins of 2nd/3rd.... integer harmonic? Are they still on the 78th,117th.... bin?
 
Thanks in advance.
0 Kudos
Message 1 of 2
(6,868 Views)
If you have LabVIEW Full or Pro, you can use the Harmonic Distortion Analyzer VI from the Signal Processing>>Waveform Measurements palette.

If you also have the LabVIEW Sound and Vibration Toolkit, use the SVT THD and Harmonic Components VI from the Sound and Vibration>>Distortion palette.

Both of these VIs will correctly identify the fundamental frequency (even when the frequency is not on bin). You should still expect to find harmonics at multiples of the frequency of the fundamental. Once you have identified the fundamental and the harmonics of interest, the power in each component can be computed from the power in the spectral bins closest to each component. Generally, using just the magnitude of the highest bin is prone to errors when the frequencies are not exactly on bin.

I am curious as to why the signal peaks at 985 Hz. Did you mean 975 Hz as this is the nearest bin frequency? Is 985 close enough to 1000? Your post indicated that the input signal is a 1000 Hz sine wave. What causes the shift in frequency? If this is not expected, you might want to double check your array indexing.

I recommend that you use one of the two measurement VIs provided by National Instruments. If you are intent on reimplementing this measurement, I recommend that you test your measurement with various simulated test signals (on bin, off bin, low noise, high noise, etc.).
Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 2 of 2
(6,855 Views)