0
votes

I am trying to perform Scipy FFT on my dataset. Basically, I have the acceleration in the time domain(obtained numerically) and I am just trying to perform Fourier transform, to obtain the spectrum. I have a theoretical expression for Fourier transformed acceleration in a small and large frequency limit. For large frequency, the Fourier transformed acceleration should drop exponentially. However, I am getting a valley in the graph after an initial decay. Below are my code and graphenter image description here

a_w = []
for k in range(len(b)): # b is paramter to be varied
 window = signal.kaiser(N, 30) # I am not sure about using Kaiser wind
 ft = fft(solaccarr[k]*window)
 ft = np.abs(ft[:N // 2])*1/N
 freq = fftfreq(N, T)[:N // 2]
 xf = np.linspace(0.0, 1.0 / (2.0 * float(T)), N // 2)
 a_w.append(ft)

I am plotting the graph on a log-log scale. My question is that whether it's possible to get rid of the kinks in graph by appropriate use of windows or any other techniques? Here is the dataset which I used

1
Where's the data?Stephen Rauch
@StephenRauch It's a large dataset, with 4096 values for each b. Do you want me to post the dataset?Prav001
Anyway here is the data for b=10 pastebin.com/pTvVx82dPrav001
I have edited the question and added dataset for all b's.Prav001

1 Answers

1
votes

These valleys may correspond to the end of the main lobe of the Kaiser window after translations.

If the input signal features a finite number of well-defined frequencies (ex: a sum of two sine waves), its Fourier transform is a Dirac comb. Multiplying the signal and the window corresponds to convolving the DFT transform of the signal by the DFT transform of the window. As convolving with a Dirac signal corresponds to a translation, the outcome of the process is a finite sum of translated DFT transforms of the window.

The transform of the Kaiser window features a main lobe and side lobes separated by such valleys. Hence, the outcome may also features translated valleys. It can be tested by modifying 30 in window = signal.kaiser(N, 30): could you try figures like 0, 5, 6 and 8.6? It should translate the valley from left to right or right to left, as it modifies the width of the main lobe.

If you just want to get rid of the deep valleys, you can explore the exponential window eventually combined to an Hann window to form a Hann–Poisson window. This window does not feature any side lobes.

Finally, if your signal is periodic and if the length of the frame is a multiple of the period, there is no need for a window!