Author Topic: Fast Fourier Transforms  (Read 756 times)

0 Members and 1 Guest are viewing this topic.

Offline andybarrett1Topic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: gb
Fast Fourier Transforms
« on: February 21, 2020, 03:21:24 pm »
Thank you  for reading

Looking 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 ......etc

I am hoping to use a Microchip device 18Fxxx or a DSP ..... Options welcome ?

 Early days yet but any advice welcome

Andy
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 10035
  • Country: gb
Re: Fast Fourier Transforms
« Reply #1 on: February 21, 2020, 03:39:28 pm »
Thank you  for reading

Looking 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 ......etc

I am hoping to use a Microchip device 18Fxxx or a DSP ..... Options welcome ?

 Early days yet but any advice welcome

Andy
If 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.
 
The following users thanked this post: andybarrett1

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2135
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Fast Fourier Transforms
« Reply #2 on: February 21, 2020, 03:43:37 pm »
If you look at many of the commercial power analysers (ours included) - they use DFT.

You will need something bigger than an 18F though.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 
The following users thanked this post: andybarrett1

Offline andybarrett1Topic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: gb
Re: Fast Fourier Transforms
« Reply #3 on: February 21, 2020, 03:52:07 pm »
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


 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 10035
  • Country: gb
Re: Fast Fourier Transforms
« Reply #4 on: February 21, 2020, 04:25:17 pm »
If you look at many of the commercial power analysers (ours included) - they use DFT.

You will need something bigger than an 18F though.
Most 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.
 
The following users thanked this post: andybarrett1, radiolistener

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Fast Fourier Transforms
« Reply #5 on: February 21, 2020, 05:47:24 pm »
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-applications


I 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.
 
The following users thanked this post: andybarrett1


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf