Fast Fourier Transforms - Page 1
Forum section: electronics / beginners

author: andybarrett1
author_rank: Regular Contributor
timestamp: February 21, 2020, 03:21:24 pm
content: Thank you for readingLooking at obtaining some FFT details from domestic mains voltage...... Wondering if you can point me in the right direction as to circuit needed. Also Processor.Am thinking someway of dropping mains to a safe working level then for a bit of fun attempting to look at the harmonics caused by a Diode / Bridge / SCR / Lighting arrangement.... Fundamental 3rd 5th 7th 11th ......etcI am hoping to use a Microchip device 18Fxxx or a DSP ..... Options welcome ?Early days yet but any advice welcomeAndy

author: coppice
author_rank: Super Contributor
timestamp: February 21, 2020, 03:39:28 pm
content: Quote from: andybarrett1 on February 21, 2020, 03:21:24 pmIf you are interested in the behaviour of loads, then the mains voltage is not very interesting. It just doesn't do very much. Its the mains current that has the interesting load related harmonic structure. You can easily isolate that by sensing with a CT. As for processing power, an 18Fxxx is a bit feeble. For a reasonable sample rate any mid range ARM based MCU should be fast enough for real time Fourier analysis.

author: fcb
author_rank: Super Contributor
timestamp: February 21, 2020, 03:43:37 pm
content: If you look at many of the commercial power analysers (ours included) - they use DFT.You will need something bigger than an 18F though.

author: andybarrett1
author_rank: Regular Contributor
timestamp: February 21, 2020, 03:52:07 pm
content: Have just been looking at the STM32F4 it seems to tick a few boxes ?You are right it is the current I am more interested in :-)Andy

author: coppice
author_rank: Super Contributor
timestamp: February 21, 2020, 04:25:17 pm
content: Quote from: fcb on February 21, 2020, 03:43:37 pmMost commercial power analysers synchronise their sampling to a specific multiple of the fundamental frequency of the incoming mains. Either by using a PLL, so the digitisation occurs at the exact desired multiple of the mains frequency, or by digitising at a fixed frequency, assessing the precise fundamental frequency from the samples (e.g with a DSP based PLL), and then digitally resampling the signal at the exact desired multiple of the mains frequency. This means that when they perform the Fourier transform the mains harmonics sit exactly at the centre of specifc transform bins. If they arranged the sampling rate to be a multiple of the mains that works well for an FFT (e.g. an exact power of 2 multiple), they use an FFT. If they arrange the sampling to be at some other multiple they usually have to accept the higher compute load of a DFT.Although it is easy to interpolate between transform bins, it is not easy to do that with great precision. Power analysers are typically trying to measure the harmonics to 0.1% or better. At this accuracy life is much easier if you align the bins. If you are only interested in the general makeup of the harmonics, rather than their precise magnitude, you can simply use an FFT at any old sample rate.

author: rstofer
author_rank: Super Contributor
timestamp: February 21, 2020, 05:47:24 pm
content: I would pick a current transformer with a suitable range and then pick a burden resistor that would give me a voltage in the range of the Digilent Analog Discovery 2. In the power business we usually pick a secondary current of 5A as all of the instrumentation makes an matching assumption. So, 1000:5 or 500:5 or whatever seems reasonable. The real question is whether the transformer is accurate at frequencies other than 60 Hz.https://www.powerelectronics.com/content/article/21863556/exploring-current-transformer-applicationsI coded up an FFT one time many years ago. I wanted to watch the 11th and 13th harmonics on the 12kV power source to a plant with a 20 MW heater. Mu actual concern was the heating effect on a power transformers caused by the 12 pulse rectifier. Interesting project!In terms of low frequency FFTs, I think I would prefer the AD2 to an oscilloscope.