Fft For Ac Measurement - ST STM32 Application Note

How to get the best adc accuracy in microcontrollers
Hide thumbs Also See for STM32:
Table of Contents

Advertisement

AN2834
3.3.3

FFT for AC measurement

In some specific cases the application needs to know the amplitude of an AC signal with a
given frequency. In this case the effective value of an AC signal can also be obtained by
using a relatively slow sampling speed (in comparison to the measured signal frequency).
For example, when measuring an AC mains signal (which is near-to-sinusoidal and has
relatively low harmonics content), it is sufficient to choose a sampling frequency 32 times
greater than the mains frequency (50 Hz). In this case harmonics of up to the 15th order can
be obtained. The amplitude of 15th harmonics in the main signal is very small (the next
order harmonics can be neglected). The calculated effective value of the mains signal is
obtained with high precision because the effective values of harmonics are added to the
total AC harmonic value as:
U
=
ef
So if the 15th harmonics amplitude is only 1% (0.01) from the 1st harmonics (50 Hz), then
its contribution to the total effective value will be only 0.01% (because the square addition in
the above equation gives: 0.01
The principle of this method is therefore to sample the AC signal with a known frequency
and then perform post-processing on the FFT for each measured period. Because the
number of sampling points per measured signal period is small (32 points for example) then
the performance needed for FFT processing is not so high (only 32-point FFT for example).
This method is well adapted for AC measurement of signals with lower distortion. The
drawback is that it requires precise signal sampling:
The frequency of the measured signal must be known and the ADC sampling
frequency must be set exactly as a 2
The input signal frequency is measured by another method.
The ADC sampling frequency is tuned by programming the prescaler and MCU master
clock selection (if sampling is performed with an inaccurate clock an interpolation can
be used to obtain samples at the required points).
2
2
2
U
U
... U
+
+
+
1
2
n
2
= 0.0001).
n
multiplier of the measured frequency.
DocID15067 Rev 3
How to get the best ADC accuracy
37/49
48

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents