New answers tagged

0

The STFT is an instance of an Analysis/Synthesis system. If we restrict to windows of finite length, it amounts to windowing blocks of length $L$, taking the DFT, and hopping by $K$ samples to perform the same operation. An A/S system is said invertible, or perfect, if you can recover the original signal from the blocks of DFT coefficients. If $K>L$, ...


0

I worked it out by myself, after reading a bunch of posts mentioning different methods of FFT output scaling. I still find this aspect of FFT processing heavily unsdocumented everywhere. I have not yet found any reliable source that explains what is the use of these scalings, which fields of sciences or what processing methods use them. I have yet found ...


2

I think your problem might be in this line: FFTSpectrum = fft(sampledsignal,N)'; Note that in MATLAB, ' is the complex conjugate transpose. Use .' to transpose a matrix without applying the complex conjugation.


3

Zeroing out bins / attenuating them in discrete Fourier domain is universally a bad idea, due to the undesirable time-domain effects of that. Instead, use a audio processing program to apply an adjustable equalizer to the song of choice. Let's walk you through Free software: Get audacity; load your song in that, open "Effects"->"Equalizer" start with one ...


2

Under the assumption that your words "extract the amplitude of those four components" actually mean "extract the spectral magnitudes of those four components", then the initial phases of the original four periodic signals do not matter. It's straightforward to prove this behavior by modeling your down-conversion process using software.


0

Focusing on your question (the final part of your text), You don't really have to impose any "boundary conditions" (forgive the somewhat abusive use of the term). You have to keep in mind though, that any kind of tapering (or any kind of modification of the signal), will affect the result of the analysis. Roughly speaking, in order to perform the Fourier ...


1

Please see this post that details most of the noise considerations for an ADC What are advantages of having higher sampling rate of a signal? In particular the relationship for the noise floor given a full scale sine wave: $$SNR = 6.02 \text{ dB/bit} + 1.76 \text{ dB}$$ Using your numbers: 1.5Vpp sinewave. If we assume this sinewave is full scale (any ...


2

So called spectral leakage always occurs when transforming any finite length observation. That's because it's an artifact of windowing, and any non-infinite length observation (-t/2 ... +t/2) requires some sort of window, inherent rectangular or otherwise. A window function allow you to choose your artifact: from window "distortion" to Sinc effects, and/or ...


0

Look for peaks N dB above the localized noise floor. Calculate the noise floor by taking the mean of all your samples (or choose an observation window size). You can throw out the top 1-3 samples (or however many you want) to reduce the bias on the mean. After that you can covert your mean to log and then look for peaks N dB above the mean.


0

Do an fftshift before the FFT (rotate your sample vector by N/2), this relocates the phase reference to the center of your sample window (instead of at a potential circular discontinuity around the ends). This also often requires less unwrapping, as well as making phase interpolation (between FFT result bins) and phase differences more intuitive.


0

If your intention is to cross-correlate the two signals, they will only disappear (zero result) if you are judicious with your time duration of the signals. The description and question is somewhat confusing however since "cross-correlation in the frequency domain" typically means using the following relationship to perform (circular) cross-correlation: $$...


2

There are two issues / concerns with this approach in that you may not be getting what you want. The primary one is the equivalent of post detection averaging by using the post-processed results from a spectrum analyzer, and the second is that the result of your complex conjugate multiplied FFT is actually in the time domain since you started in the ...


1

Assuming the OP wants to manipulate a time domain function such that zeros are inserted in the frequency domain result, here is a simple approach: Simply replicate the time domain samples and then divide by the number of repetitions to normalize and this will result in the same frequency domain result as the series that was replicated, with additional zeros ...


0

I am just reading Quantitative characterization of surface topography using spectral analysis and recalled seeing your post today. The paper makes distinction between $C^{iso}$ (radially averaged) and $C^{pseudo-1D}$ (radially averaged but scaled by the factor of $\frac{q}{\pi}$, for reasons described in there), that looks like the issue you have. This is ...


1

Probably the value of the DCT coefficient and its frequency (i.e., a histogram plot). However, it's impossible to say that with certainty given the information you have provided. If you found that plot in the linked paper, then the definitions of the x- and y-axes are in all likelihood given therein. The paper is behind a paywall, so it's not helpful to ...


2

You explain in the comments that the signal is sampled at 50 KHz, then low pass filtered at 128 Hz with a 2nd order biquad filter and then resampled and stored at 256 Hz. If you weren't prudent with choice of sampling rate and low pass filtering, then the harmonics of 10 Hz could create a component at 5 Hz through aliasing. For example this would occur if ...


2

Since $\vert X_1 \vert$ is a real even function, its FFT (IFFT) is a real function. This is a basic property of Fourier transforms. The power spectrum can be real but not even, in which case the ifft will give complex coefficients. In the example you linked, they start with a non-even real signal and then take the FFT. This will give complex values ...


0

What is the expected signal? I assume that you expect the variation with respect to some periodic variation. Over this variation, you might expect modulation which might be caused by the first mode of the structure which can be at the (1 Hz - not 0.5 Hz). This modulation should appear as sidebands around the main peak and its harmonics. I suggest that you ...


1

I assume that your experiment where you saw no effect was with signals that underwent a linear phase vs frequency process in their delay (constant group delay). Under many situations the phase of the channel in the frequency domain is non-linear, causing different frequency components to experience different delays (group delay variation). When you frequency ...


2

(1) is it possible that the point-wise multiplication of two discrete, band-limited functions is aliased itself? Yes. Or at least it's possible that the result won't fit in a tidy manner into your sampling rate. Because multiplying two signals together creates energy at different frequencies than the frequencies of the original (this is easiest to do by a ...


4

As pointed out by Dan Boschen in a comment, these number aren't really surprising. Usually the DFT is defined as $$X[k]=\sum_{n=0}^{N-1}x[n]e^{-j2\pi kn/N}\tag{1}$$ where $x[n]$ is the input sequence and $N$ is the DFT length. So bin zero, i.e., $X[0]$, is just the average value of your input sequence multiplied by the DFT length. The maximum value of $|X[...


1

The result is expected as you are simply appending zeros to the product fft(A1).*fft(A2) Which does the time domain interpolation as you describe. However the ifft of the above product results in a series of constant values in the time domain since it is a circular convolution. Appending additional zeroes simply interpolates this for more constant values (...


1

clear; N = 4; M = 2*N-1; a = 1:4; r = ones(1, N); % Rectangular window A1 = fft(a); W = fft(r, N); A2 = (A1).*W; A3 = ifft(A2, N); B = 3:6; x = xcorr(A3,B) A4 = fft(A3,M); % A3 is interpolated by a factor of M B2 = fft(B, M); Freq_Multiplication = (A4.*conj(B2)); x2 = fftshift(abs(ifft(Freq_Multiplication, M))) % Zeropadding A2 ...


1

An FFT extracts frequency bands, similar to a bank of (mediocre) bandpass filters. An FFT is just a bank of bandpass FIR filters, all of equal length, that because they are in default form rectangularly windowed, have very poor stop-band characteristics (except for deep notches at periodic orthogonal-in-window frequencies), but steep transitions. But ...


0

THE FFT of a 1 second block of data that has not been further windowed has an equivalent noise power bandwidth per bin of 1 Hz (the frequency response of each bin approaches a Sinc function for a large number of samples, so the result is actually the result of all energy under that Sinc--- if the signal was white noise this would be equivalent to the result ...


1

You can pad zeros in frequency domain. But you need to take care about Nyquist bin when N is even. A3 = [A2(1:N/2) A2(N/2+1)/2 zeros(1, 2*N-length(A2)-1) A2(N/2+1)/2 A2(N/2+2:end)]; Here Nyquist bin is A2(N/2+1)/2 and zeros are padded in the middle of the spectrum For N-odd A3 = [A2(1:(N-1)/2+1) zeros(1, 2*N-length(A2)) A2((N-1)/2+2:end)]; This is only ...


0

MATLAB's fft returns the FFT of the columns of a matrix X, so by transposing your input matrix before feeding it to the algorithm should work fine: F = fft(X.'); and then you will have the FFT for each channel of yours. The FFT can be used to obtain the power spectrum. Here is a link with examples and explanations. Once you have your power spectrum, then ...


0

Check out the numpy docs ( https://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfft.html ) To sum up, real DFT normally takes a real input of N samples and returns a complex output of N/2+1 values. What you end up with are the positive frequencies (up to the Nyquist frequency) and the negative frequencies, which are just complex conjugates of ...


1

Fast Fourier transform does not extract any frequency bands. It only shows the frequency content of a given signal. But while applying FFT, one should be careful about choosing the sampling frequency. As an example, if a signal contains a frequency range of $0-100\,\text{Hz}$ and $f_{max}=100\,\text{Hz}$ $$f_{max} = \dfrac{F_s}{2}$$ and the sampling ...


1

Discrete time sequence have frequency $$-\dfrac{1}{2}\leq f\leq \dfrac{1}{2}\tag{1}$$ Continuous time signal $x(t)=A\cdot\sin(2\pi Ft)\tag{2}$ The discrete sequence can be obtained from CT signal through periodic sampling. $$t=n\cdot T= \dfrac{n}{F_s}\tag{3}$$ Plugging the above relation in $(2)$ we get $$f=F/F_s\tag{4}$$ Again plugging the $f$ in $(1)...


0

You should compute the magnitude of the complex output of the FFT instead of just taking the magnitude of its real part. If $X[k]$ is the (complex-valued) $k^{th}$ frequency bin, its magnitude is $$\big|X[k]\big|=\sqrt{\left(\textrm{Re}\big\{X[k]\big\}\right)^2+\left(\textrm{Im}\big\{X[k]\big\}\right)^2}$$


1

The maximum frequency of a discrete-time signal is half the sampling frequency. A signal with maximum frequency in discrete time is an alternating sequence, and since its period is two sample intervals, its frequency is $f_s/2$. All frequencies in the discrete domain are normalized by that maximum frequency. This implies that a discrete-time system's ...


1

There are a few things going on here: Does this thought process look correct? Strictly, No. The main reason for this is that you are not performing a resampling step that is the differentiating point between the Discrete Fourier Transform (DFT) and order analysis. Is it correct to say that the final fft plot is in the frequency domain? From this link,...


0

This is a machine learning problem, and it can be classified using any good classification algorithm like 1) Linear Classifiers: Logistic Regression, 2) Naive Bayes Classifier, 3) Nearest Neighbor, 4) Support Vector Machines, 5) Decision Trees, 6) Boosted Trees, 7) Random Forest, 8) Neural Networks. Matlab has in-built classifiers, and you can train your ...


1

If you use random real valued frequencies (e.g. just magnitudes), they all correspond to cosine functions, which all peak at zero (cos(0 * f) == 0). To get more random peak locations, use random complex frequencies as the input to your ifft2d, which randomizes the phase so all the peaks don't line up at zero.


1

import sounddevice as sd import scipy import numpy as np from scipy.io import wavfile as wav from scipy.io.wavfile import write ,read from scipy import fftpack as scfft from matplotlib import pyplot as plt fs = 44100 seconds = 3 myrecording = sd.rec(int(seconds * fs), samplerate=fs, channels=1) sd.wait() write('output.wav', fs, myrecording) fs_rate, ...


3

I would assume by faults you mean breaks in a signal line such that a reflection occurs. This is indeed an application of the autocorrelation: You transmit a sequence down a transmission line. If there is any change in impendance in the the line (such a break or kink etc) then a portion of your signal will be reflected back according to the reflection ...


Top 50 recent answers are included