Frequency vector and FFT

Discuss the effects of turbulence on wind turbines and its simulation.

Moderator: Bonnie.Jonkman

Francesco.Perrone
Posts: 30
Joined: Wed Mar 30, 2011 10:07 am
Organization: Nordex Energy
Location: Germany
Location: Hamburg

Frequency vector and FFT

Postby Francesco.Perrone » Wed Apr 24, 2013 12:09 pm

Hi everybody,

I've got a question concerning the definition of the frequency array and the FFT usage. For simplicity, let's assume that:

Code: Select all

Nx = 4096;
T = 600 [s];


This means that the Nyquist frequency (or cut-off frequency) is

Code: Select all

 fn = Nx/T = 4096/600 [Hz] = 6.82667 [Hz];


while the minimum frequency value will be

Code: Select all

 fmin = 1/600 [Hz] = 0.00167 [Hz]
.

Generally, for FFT application's purposes, I would define a frequency vector which spans between -fn/2 and (fn-df)/2.

In the end, by using a frequency vector such as the one mentioned above, for each simulation I would get two time series: one due to the real components and one due to the imaginary component.

But, generally and especially in our case, we can take advantage of this FFT feature, defining only half of the frequency vector: in the end, imaginary and real part of the FFT will be merged and retrieve our desired 4096 sample time series (for each of the grid point of course).

It seems to me that TurbSim makes use of such a procedure; my question concerns therefore the definition of the frequency range: how shall I define it properly? At the moment I would do this:

Code: Select all

 f = (0:2048)*0.00167; 


But this vector contains 2049 elements and when merging real and imaginary part, the zero order is counted twice.

Would you mind to give me a hunch?

I warmly thank you in advance and look forward to hearing from you.

Best regards,
Francesco Perrone
Mit freundlichen Grüßen / Best regards

Francesco Perrone
Researcher
ForWind - University of Oldenburg

Jason.Jonkman
Posts: 4843
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Frequency vector and FFT

Postby Jason.Jonkman » Wed May 01, 2013 5:08 pm

Dear Francesco,

Actually, the Nyquist frequency (cut-off frequency) is 1/2 the sampling rate. In your example:

fn = Nx/(2*T) = 3.41333 Hz

And when defining the discrete Fourier transform (DFT) of the time series, it is customary to write the frequencies from -fn+df to fn.

If the time series is real-valued, you are correct that the discrete Fourier transform (DFT) will be such that frequencies with negative value are the complex conjugates of the frequencies with positive value, so, only the frequencies with positive value are unique and need to be stored. The frequency range you've specified (f = (0:2048)*0.00167) is correct (this is how it is defined in FAST's HydroDyn module) because in your example there are 2047 negative-valued frequencies, from -fn+df to -df.

I hope that helps.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Francesco.Perrone
Posts: 30
Joined: Wed Mar 30, 2011 10:07 am
Organization: Nordex Energy
Location: Germany
Location: Hamburg

Re: Frequency vector and FFT

Postby Francesco.Perrone » Tue May 07, 2013 12:22 pm

Dear Jason,

I really thank you for the prompt reaction and response.

I'm questioning not that much on the definition of the frequency array itself, but more about its relation to the FFT operation.

Assuming that I define my frequency as follows (only half out of 4096 samples):

f = (1:2048)*0.00167;

Hence, f spans between 0.00167 Hz and 3.413 Hz, as you correctly pointed out.

This way, I do have 2048 FFT orders, and the 0-th order (constant term allowing for the mean wind speed superimposition) is missing.

Now, assuming that my FFT series are only on the real axis of the Gauss plane, I can pad each time series with the supplementary 2048 imaginary conjugate components, reaching the desired 4096 samples. Then I feed this to the FFT, which retrieves the desired time series in the time domain.

My question is: how can I account for the 0-th order component? Well, padding with the imaginary complex gives back the 4096 samples but they are distributed as follows:

-2048, -2047,...,-1,1,...,2047,2048 --> 4096.

I hope I explained everything in a comprehensible way.

Any support would be more than appreciated.

Best regards from Germany,
Francesco
Mit freundlichen Grüßen / Best regards

Francesco Perrone
Researcher
ForWind - University of Oldenburg

Jason.Jonkman
Posts: 4843
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Frequency vector and FFT

Postby Jason.Jonkman » Tue May 07, 2013 3:46 pm

Dear Francesco,

As I said in my prior post, when defining the discrete Fourier transform (DFT) of a real time series, it is customary to write the frequencies from -fn+df to fn. Notice that the lowest frequency is -fn+df and not -fn. In terms of the indices of your example, this would be from -2047, -2046, ..., -1, 0, 1, ..., 2046, 2047, 2048 for a total of 4096 steps. Because there is no -fn to balance with +fn, in HydroDyn we set the DFT associated with fn (index 2048) to zero.

I hope that helps.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov


Return to “Inflow Turbulence”

Who is online

Users browsing this forum: No registered users and 1 guest