5,667 questions
-1
votes
1
answer
72
views
Spectral Leakage in Resampled FFT (and how to fix it)
I have a 10 second signal of a pure 50 Hz sine wave sampled at 40.96 kSa/s (409,600 samples). I apply a Hanning window and the magnitude plot of my (numpy) FFT shows (ignoring negative image ...
0
votes
1
answer
46
views
ESP32 + INMP441: Frequency response measurement fails despite chirp sweep playback from Python
I'm trying to measure the frequency response of an INMP441 microphone using an ESP32 and a Python script. The ESP32 captures 6000 samples via I²S and sends them over serial. I play a 62.5 ms ...
2
votes
0
answers
113
views
Trying to do FFT on a CSV with known data
Data table image
I am trying to do an FFT on a dataset with two data columns: Time and Amplitude. I am analyzing the periodicity of the data, so the data may not be perfectly periodic, which is the ...
0
votes
0
answers
66
views
Why am I getting mirrored peaks in Javascript AudioContext AnalyserNode frequency spectra around specific frequencies?
I've been having a problem with the Javascript AudioContext using AnalyserNode to get frequency data from a microphone on a HTML page. Using getByteFrequencyData() to get the frequency info and a ...
1
vote
1
answer
110
views
FFT in swift/Accelerate gives strange result
I am trying to use FFT transformation in Swift, using the Accelerate framework from Apple, but I get strange results. When I use fftw3 in a small C program, everything looks fine.
As a test case, I ...
1
vote
0
answers
82
views
How to implement range doppler map on Infineon CY8KIT-062S2-AI
Recently, I have been trying to take the raw output from the Infineon BGT60TR13C mmWave radar on the CY8KIT-062S2-AI board and process it into a Range Doppler Map using the onboard CPU.
One issue that ...
5
votes
0
answers
128
views
Why does my real-time FFT of a logarithmic sweep keep sinking — and why does this weird normalization fix it? [closed]
I’m building an open-source audio spectrum analyzer for loudspeaker manufacturing. The “killer feature” is using a logarithmic sweep as the excitation signal, and analyzing the response as the sweep ...
0
votes
0
answers
64
views
What is the fastest way to compute a filter in Fourier space?
I am currently working on a beam propagation code. The code basically consists of a transversal profile (a 2000x2000 array) which is propagated a small distance, then has its borders filtered, then ...
1
vote
1
answer
110
views
How is the imaginary part of scipy fft normalized?
I am trying to understand how the imaginary part of scipy.fft is normalized.
By looking at the documentation here, it seems that the exponent in the definition of the discrete fourier transform (first ...
13
votes
2
answers
2k
views
What's wrong with this Python assignment on signal processing - mostly Fourier series and transform
In this assignment I created the basic rect signal a[n] such that over the domain [-1000, 1000] it's 1 only at |n|<100, meaning it's an array (complex one with zero in the imaginary part) that ...
2
votes
1
answer
115
views
I can't understand recursive part of FFT in Python
So basically I have this code of FFT implemented in Python for 2^m samples.
def fft(x):
N = len(x)
if N == 1:
return x
even = fft(x[0::2])
odd = fft(x[1::2])
result = [0] *...
1
vote
0
answers
58
views
Is it possible to reduce the memory requirements for (I)FFT by chunking?
I'm trying to run an IFFT on a very long signal (10^9 data points) and I'm running into RAM constraints. I'd like to be able to chop up the signal and run it in batches (as I am not time constrained ...
0
votes
1
answer
102
views
Fourier propagation is propagating backwards
I am trying to write a code which propagates a beam a certain distance through Fourier propagation. Here is the relevant excerpt of the code:
import numpy as np
import scipy
from matplotlib import ...
0
votes
1
answer
57
views
Restore an image through Matlab with noise and psf
I'm trying to solve a problem where I'm given the magnitude and phase spectrum of an image. I know the spectrum information is centered and compressed, so I'm working backward, but I'm getting lost ...
4
votes
0
answers
138
views
Fourier Neural Operator in tensorflow nearly good
I try to implement in tensorflow a Fourier Neural Operator from this paper in 2D. As simple example, i have a single layer that learns to perform a gaussian blur.
However, there are littles errors ...
3
votes
1
answer
152
views
How to compute the power spectral density of a vector-valued process without mirroring the autocorrelation function?
I'm simulating a 2D Ornstein-Uhlenbeck process (Langevin equation for velocity), and I'm interested in computing the power spectral density (PSD) of the vector-valued velocity process.
Following the ...
1
vote
1
answer
52
views
`numpy.irfftn` returns incorrect shape after multiplying `numpy.rfft`-transformed array by scalar factors
I'm writing a code to perform differential operations on 3D fields by exploiting the fact that derivatives in configuration space (x, y, z) become products in Fourier space (kx, ky, kz).
This is my ...
0
votes
0
answers
75
views
Trouble implementing a super resolution algorithm with a frequency method
I'm currently trying to implement the following algorithm for image super resolution https://ieeexplore.ieee.org/document/56062 (doi:10.1109/29.56062) (there is a paywall but it's available on scihub)
...
0
votes
0
answers
120
views
Power spectrum and power spectral density in Matlab
I'm currently trying to analyze the spectrum of a prbs signal in order to better desing inputs for my experiments. However, I have some confusion so far. On one side, we can use Matlab's cpsd function ...
2
votes
2
answers
148
views
What is the correct way to perform 4D FFT in Cuda by implementing 1D FFT in each dimension using cufftPlanMany API
Cuda does not have any direct implementation of 4D FFT. Hence I want to decompose a 4D FFT into 4 x 1D FFTs into X, Y, Z, and W dimensions. I understand that the cufftPlanMany API is best suited for ...
-1
votes
1
answer
122
views
Get the maximum frequency of an audio spectrum [closed]
I want to detect the cutoff frequency of the AAC audio encoder used to compress an M4A audio file.
This cutoff frequency (or maximum frequency) is an indicator of audio quality.
High-quality audio has ...
0
votes
1
answer
67
views
Incorrect modeling of the spectrum of a sequence of pulse signals [closed]
I have a task to simulate a sequence of rectangular pulses. As a result, I wrote Python code, but the end results are not encouraging.
#!/bin/python
import numpy as np
from numpy.fft import fft
...
1
vote
2
answers
96
views
FFT Does Not Detect Expected Frequencies in Experimental Data with Known Periodicities
I am analyzing experimental data where resistance Rxx is measured as a function of an angle Phi, which ranges from 0 to 360 degrees in steps of 2 degrees. The dataset consists of two columns:
Phi (...
0
votes
1
answer
77
views
Discrepancy Between NumPy and TensorFlow FFT Outputs: Missing Imaginary Components in TensorFlow
I am working on a project where I need to perform Fourier Transform on synthetic periodic data using both NumPy and TensorFlow. However, I am encountering a discrepancy between the FFT outputs of ...
0
votes
0
answers
31
views
How to use low-frequency filtering to process the rising signal
My strain time-domain data shown in figure 1 contains significant high-frequency noise. The segment I focus on is the strain rising phase shown in figure 2, where the amplitude can be truncated at 1e4....
-1
votes
1
answer
83
views
How to calculate the phase response?
Good afternoon. I want to write a code to output experimental frequency response for system identification. For verification I use the modeled sinusoid and the response of the modeled system. To ...
0
votes
0
answers
28
views
How can I calculate the output frequency steps of the rpmfreqmap function in matlab
The rpmfreqmap function in matlab has an input option resfor frequency resolution. With the output there is also a frequency resolution option res. If I specify a frequency resolution of 1 Hz:
[map,...
2
votes
1
answer
71
views
How to Apply Band Pass Filter to a 3D Stack in DigitalMicrograph
In Gatan software, I found that the Band Pass Filter in Process Image can only be applied to a single 2D image or a specific frame of a 3D image. My dataset is a 3D stack (multiple frames), and I need ...
1
vote
1
answer
80
views
The error of manually computed inverse-FFT increase along x_axis
I am manually compute the inverse FFT using the NumPy FFT components by the below code, to compare the rebuild signal with the original signal (sin function). As shown in the results, the error (...
1
vote
0
answers
55
views
Why CuFFT throughput increases as the transform size gets larger?
(Updated) I am trying to understand how CUDA parallelism works in CuFFT while learning CUDA coding.
I wrote my version of 1-D FFT in CUDA C++ and compared it with cuFFT. Below are the throughputs I ...
1
vote
0
answers
51
views
How do I simulate image magnification using Angular Spectrum Method?
I have written a code that forms the image of an input image at some distance z. All the parameters I have used (pixel size, no. of pixels, z, etc.) are mentioned later in the question. The objective ...
0
votes
0
answers
37
views
Is this code and answer is correct ? (EMG data with FFT)
I'm wondering if I got some errors in my emg data + fft code
[I got 0Hz filtered emg data]
plt.figure(figsize=(20,10))
sns.lineplot(data = DF_newemg, x = DF_newemg.index, y = 'emg[2]', label = '...
0
votes
1
answer
104
views
How to find the most common frequeny in Time series
I have a TimeSeries shown below. We can clearly see that there is a cyclical behavior in the data, where rise and fall happens every 12 months and so on, irrespective of if trend is rising/falling. I ...
5
votes
1
answer
386
views
How to do fft based convolution with long doubles/float128s quickly and accurately
On my linux system I have:
np.finfo(np.float128)
info(resolution=1e-18, min=-1.189731495357231765e+4932, max=1.189731495357231765e+4932, dtype=float128)
So that is an 80-bit long double. I want to ...
0
votes
0
answers
48
views
STM32 frequency identification giving wrong results using analog input
I am trying to use stm32f411 and libopencm3 with CMSIS DSP lib to identify sine wave generated by a function signal generator but without sucess, I just cant compreend what I am doing wrong, i know ...
0
votes
1
answer
70
views
Pyserial and fft
I want to read real time data from my arduibo, plot it in time domain and then do fft of that data and plot that (frequency domain) but I have no clue how to do it.
can’t seem to transfer data array ...
0
votes
1
answer
71
views
Why does the power spectrum E(k) of my velocity field follow 𝑘 ^(−(n−1)) instead of 𝑘^(−n)?
I am generating a random velocity field. Generally, the energy in Fourier space is defined as E(k) = (vx(k)^2+vy(k)^2)/2. In some cases, the energy follows a power-law spectrum,
𝐸(𝑘)∼𝑘^(−𝑛) in 2D ...
4
votes
1
answer
335
views
How to accelerate the cross-correlation computation of two 2D matrices in Python?
I am using Python to compute the cross-correlation of two 2D matrices, and I have implemented three different methods. Below is my experimental code along with their execution times:
import numpy as ...
0
votes
0
answers
54
views
FFT Binning Application using ARM CMSIS DSP Library on LPCXpresso860-MAX
I am working on a project using the LPCXpresso860-MAX board, and I need to implement FFT binning using the ARM CMSIS DSP library.
Could you provide guidance on the following:
How to use CMSIS DSP ...
3
votes
1
answer
103
views
Inverse Fast Fourier Transform (ifft2) of scipy not working for fourier optics
I'm following a tutorial on youtube on Fourier Optics in python, to simulate diffraction of light through a slit.
The video in question
Source Code of video
Now, I'm trying to implement the get_U(z,...
0
votes
0
answers
76
views
Heart rate detection with FMCW radar
I have this data set which is recorded from 50 children with FMCW radar to detect their heart rate and respiration rate. I am using this data set and I want to just calculate the range FFT and after ...
0
votes
1
answer
122
views
STM32C031C6 - FLASH Overflow Error During FFT Implementation with ARM CMSIS-DSP
I am working on an embedded project with the STM32C031C6 microcontroller using STM32CubeIDE. My goal is to perform an FFT on ADC input data and transmit the results over UART. I am utilizing the ARM ...
1
vote
1
answer
46
views
Efficient Computation of convolution-like expression [closed]
Let p(z_i | x_i) for i=1...m be some probabilities, where x_i and z_i are in {0,1}. I want to efficiently compute the following:
for all z_1...z_m.
I know that convolutions can be computed ...
0
votes
0
answers
80
views
Inverse Fast Fourier Transform from One-Sided Fourier Amplitude Spectra at Matlab
I am writing down a code that first apply Butterworth (low pass filter) to a earthquake time history and then create the one sided fourier amplitude of the filtered motion and multiply it with a ...
0
votes
0
answers
36
views
How to make 3 stage pipeline for a 16 points FFT to shorten the critical path delay to 𝑇𝑚(multiplier) +𝑇𝑎(adder)
If I try to make a 16-point radix-2 FFT like this image, how can I shorten its delay 𝑇𝑚+𝑇𝑎, where 𝑇𝑚 is the propagation delay of a multiplier and 𝑇𝑎 is the propagation delay of an adder, just ...
2
votes
0
answers
146
views
How to identify an specific Beep frequency on audio files (.Wav, .Mp3)?
I have a problem where I have a dataset of audio's files, and I need to cut every single of it in 2 pieces: one piece after and one before a determined "beep" sound.
I examined some audios ...
0
votes
1
answer
112
views
Sinc-like feature removal with an FFT
Outline
I have some Raman spectroscopy data that contains features that I want to remove. I'll point them out in the figure below:
Here you can see two sets of peaks that I am interested in, with the ...
0
votes
0
answers
62
views
I want to compute FFT and IFFT on a large image via GPU. But my GPU is low on memory
I’m working on a MATLAB project that requires FFT and IFFT computations on large images using GPUs. Currently, the image size is
32000×25600 with double precision data. Although we need to process ...
0
votes
0
answers
77
views
Determination of cutoff frequency for filtering
I would like to determine the choice of cutoff frequency for e.g., a second-order low-pass Butterworth filter using frequency spectrum analysis. For this purpose, I would like to implement Fast ...
0
votes
0
answers
55
views
Defining length for fft in Matlab
I have a question to the command fft in Matlab. By using the default settings Matlab assumes the signal to be periodic with a periodicity of 2π. However, for my problem I need to apply the FFT to a ...