fft

how use fft in accelemetros data to transform in spectrum power?

how use fft in accelemetros data to transform in spectrum power? Question: I placed vibrations of a component using accelerometers, then produced a dataframe with accelerations, that is, dataframe with the following columns: accX, accY and accZ. It is a variable in time, that is, a time series. My idea is to transform the domain …

Total answers: 1

FFT: time-domain features to frequency domain

FFT: time-domain features to frequency domain Question: I am not from Physics or electrical engineering, so the answers I read related to my only confused me the more. So I asked this case-specific question. I work with a sensor data (time series). The data consists of sensor values for 4 quantities (4 features), captured at …

Total answers: 1

Issue with implementing inverse FFT for polynoms

Issue with implementing inverse FFT for polynoms Question: I am studying the FFT algorithm for fast polynomial multiplication. We went over the algorithm and I decided to try and implement it in Python. from typing import List import numpy as np def fft(p: List[int]) -> List[int]: n = len(p) if n == 1: return p …

Total answers: 1

Fourier series columns don't appear in Deterministicprocess()

Fourier series columns don't appear in Deterministicprocess() Question: I have been refreshing my time-series skills and I’m having trouble with creating Fourier series. Here is the data (if you run everything together it will give you the same plots and final table): import pandas as pd import matplotlib.pyplot as plt from statsmodels.tsa.deterministic import CalendarFourier, DeterministicProcess …

Total answers: 2

Power of 2 requirement when using python rfft

Power of 2 requirement when using python rfft Question: I’m using numpy.fft in python to compute Fast Fourier Transforms. In particular, I’m using rfft as I have a real signal and don’t need negative frequencies. My question is this: when I go to compute the FFT, does the length of my signal have to be …

Total answers: 1

Changing axis values with imshow and showing data points

Changing axis values with imshow and showing data points Question: I would like to properly change the axes so I can see the values of the x and y components of the two frequencies. I have two sets of code: the first shows the proper data but the axes are wrong, the second shows the …

Total answers: 1

Unable to distinguish four cosines from a FFT

Unable to distinguish four cosines from a FFT Question: I have four cosines with frequencies 400e-3, 500e-3, 600e-3 and 700e-3 and I am trying to do the FFT of them but under the time I need, I cannot distinguish the four. Is there a way to distinguish the peaks without changing the tmax time of …

Total answers: 1

Load an audio file and find the frequency

Load an audio file and find the frequency Question: I have a following code: rate, data = wav.read(‘C.wav’) Fourier = abs(fftpk.fft(data)) max = np.argmax(Fourier, axis=None, out=None) print(max) # get 787 freq = fftpk.fftfreq(len(Fourier), (1.0/rate)) plt.plot(freq[range(len(Fourier)//2)], Fourier[range(len(Fourier)//2)]) plt.xlabel(‘Frequency (Hz)’) plt.ylabel(‘Amplitude’) plt.show() I want this program to give me the frequency in Hz with the highest amplitude, …

Total answers: 1