Norming in FFT/DFT

Give some feedback on openEMS.

Moderators: thorsten, sebastian

Post Reply
lebedevalexey
Posts: 11
Joined: Tue 05 May 2015, 15:28

Norming in FFT/DFT

Post by lebedevalexey » Tue 05 May 2015, 15:54

Hello, guys!

A couple days ago I came across that matlab functions FFT_time2freq and DFT_time2freq do not use norming of spectral components to the number of samples (NFFT) or period of a signal (T) respectively. Previously I worked only with relative variables and this factor did not play any role. But once I wanted to estimate absolute values of current and voltage harmonics and E-field as well I faced with a problem that these values are significantly below an expected level. When I introduced the mentioned divisors results became reasonable. Therefore I wonder if the norming was missed intentionally and if yes, then FFT or DFT is used in the nf2ff binary program?

thorsten
Posts: 1393
Joined: Mon 27 Jun 2011, 12:26

Re: Norming in FFT/DFT

Post by thorsten » Tue 05 May 2015, 20:05

Hi,

yes any of this factors are left out for a very good reason. Because it would just make no sense.
Let me explain.
Usually you use a Gaussian pulse as excitation and you wait until any signal has decayed away.
First question, what would a period for that be? There is none, it is not a periodic signal. Any period T would have no meaning.
And the same holds for the number of samples. After the energy is decayed there is no more additional input to the dft/ftt. But it would make no sense that you get a different value depending on the number of samples or in other words, how long you let it run with zero energy in the system.

Maybe you can give some more details why you think it would make sense?

A different story is if you use a sinusoidal excitation, but in this case you have a completely different set of problems. You would be required to only use one period in the DFT and then of course normalize to that period or corresponding number of samples.
Neither of this openEMS is doing currently.

What you can always do is run the DFT on the file "et" as well. It contains the normalized excitation signal only. If you use the dft of this signal to normalize your "value of interest" you should get a correctly normalized value in any cases...

Lastly, I have never had the desire to look at absolute values. If I wanted to know say the electric field at some point depending on the input power. I would calculate the input power and re-normalize the electric field to the e.g. desired input power...
Maxwell's equations are linear, no need for absolute values in my opinion...

I hope I could help... but maybe I missed your point.

regards
Thorsten

lebedevalexey
Posts: 11
Joined: Tue 05 May 2015, 15:28

Re: Norming in FFT/DFT

Post by lebedevalexey » Wed 06 May 2015, 12:19

Thank you for the answer, Thorsten!

Yes, I understood you. All you mentioned makes sense if we work with relative variables and such signals. But in my case I do not use a standard excitation. I construct my own ideal current source which has a certain form and spectra with SetCustomExcite. For instance, one of my task is to estimate levels of radiated field caused by the heat sink, PCB and other elements of power converters. What I actually do is that I simulate a certain schematics in LTSpice to evaluate currents which I am interested in. And then I use these currents written in a Fourier series in OpenEMS model. This is so to say "off-line FDTD-PSPICE" approach. I need absolute quantities to check if I meet EMC requirements.

One more question - if I guessed correctly, in the nf2ff program DFT method is used? So, if I want to evaluate absolute values of field I must divide by the period of a signal, right?

thorsten
Posts: 1393
Joined: Mon 27 Jun 2011, 12:26

Re: Norming in FFT/DFT

Post by thorsten » Wed 06 May 2015, 20:19

Hi,

yes the nf2ff uses the same DFT. See hdf5_file_reader.cpp

I still think that you could just use a regular Gaussian pulse as excitation and record your input power or current or voltage or whatever and use that for (re)normalization of your desired fields/current/voltages etc...
It's all just a set of linear equations and only a matter of finding the appropriate reference value...

regards
Thorsten

lebedevalexey
Posts: 11
Joined: Tue 05 May 2015, 15:28

Re: Norming in FFT/DFT

Post by lebedevalexey » Wed 06 May 2015, 21:46

Thanks again!
Yes, I agree with you, Thorsten. I asked for my own interest as well. And by the way - thank you and your colleagues for such a good program, or a set of programs, it helps us a lot!

Post Reply