0

I am developing Test automation in GeoTest ATEasy and LabWindows\CVI, in the tests i measure analog and digital outputs\inputs.

In one of the test i need to measure an Analog input which contains an audio signal - and verify its Hz and Volt DC RMS.

The audio Signal is 5Hz and 2 Volt DC in RMS.

I have the possibilty to measure multiple Volt samples into an array, but i need to decide what is the sample rate and the # of samples i want to sample.

After measuring, i need to verify that the signal is 5Hz and 2 Volt DC in RMS.

Any suggestion on how to analyze the data to see if the signal is actually 5Hz and 2 Volt DC in RMS?

I Need an algorithm, or a library function that can do these calculations.

What should my sample rate and # of samples (its also the size of the array) be?

5
  • 1
    the sample rate will need to be about the Nyquist (sp) rate, I.E. more that 2x the max frequency in the signal. for such a slow signal, I would suggest once each milli second would work very nicely. The resulting data will need to be pasted through a Fast Fourier transform to extract the frequency(s) . If you have the memory, I would sample for 1 second (1000 samples) and pass the resulting buffer of samples to the Fast Fourier transform function. Mar 22, 2016 at 9:00
  • 1
    for the check for the 2 volts RMS, suggest implement a running 'average' of the positive values and a running 'average' of the negative values (only use the peak values and remember to multiply the calculated 'average peak values by 1/.707 to transform RMS to actual peak values. Mar 22, 2016 at 9:03
  • You said to do an average with the positive and negative values, then what to do with them? multiple the highest average with 1/0.707 to convert to RMS?
    – Raz
    Mar 22, 2016 at 9:19
  • the math: 1.0/.707 is the conversion from RMS to peak voltage. not the other way around. To perform the average, you need to only use the peak values from the samples, and use a low pass filter to get their average, For instance with 15 peak samples, add sample 16 then divide by 16 to get your new average. at the next sample that seems to be peak value, take your prior average, multiply by 15, add sample 17, divide by 16, etc to get the running average with a low pass filter applied Mar 22, 2016 at 9:32
  • 1
    If you don't own the power to perform a FFT you could although only look for the zero crossing points assuming pure sinoids. You just have to calculate the number of samples between the zero crossings devided by the sample rate and multiplide by 2. I would suggest to use an average of more results since this computation is not as good as a FFT.
    – Schafwolle
    Mar 22, 2016 at 15:48

1 Answer 1

1

If you have the Advanced Analysis Library (part of the LabWindows/CVI Full Development System), NI provides these capabilities for you in the functions RMS() and PulseMeas().

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.