Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem PowerFreqEstimate

What am I doing wrong in using the PowerFrequencyEstimate

I generate a Sine wave with a signal generator. Ex 60Hz

The Wave form is sampled (2 orders) and handed to the AutoPowerSpectrum

CWDSP1.AutoPowerSpectrum FFTXRawDataHold, dt, FFTYRawDataHold, df

The results are then handed to the PowerFrequencyEstimate

CWDSP1.PowerFrequencyEstimate FFTYRawDataHold, SearchFreq, 0, 0, df, 80,
FreqPeak, PowerPeak

The PowerFrequencyEstimate hands back the correct frequency. Increase the
waveform to 62Hz Sample at
a dt for 60 hz and the PowerFrequencyEstimate correctly hands back
approximatly 62 hz just what I want.
I can change the frequency 10% sample at a dt for 60 hz and get back what
the actual frequency of the waveform is.

Here is my problem. Note
the span is 80, if I reduce the span to 10 or 20 I
get a FreqPeak of 59.829 with the generator set at 62 Hz.

Thanks

Rod
0 Kudos
Message 1 of 2
(3,221 Views)
Hello

Its not really a problem with the control itself. This function basically goes thru and and tries to estimate the dominant frequency in the data that you send it. So the more summations you perform on the data, the more accurate your estimate would be. The span decides how many chunks you break the data set into . So by having a larger span, you break in into smaller peieces, and hence do more averaging on the data set. Check the formula that the operation uses, and you'll see where the span comes into play

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(3,221 Views)