Hot answers tagged

7

[EDITED FROM DISCUSSION] On the first order, your data looks like a decay with a positive origin on a small-valued range $[0.7 \; 0.49]\times 10^{-7}$, and very tiny fluctuations with respect to the area under the curve. So from afar, your data is much closer to an almost constant function than to some putative oscillations. So the the zero, or DC-...


4

Because your data is (I assume) composed of some interesting stuff times a teeny number, plus the -- presumably uninteresting -- $k_0 + N\,k_1 + N^2\,k_2$, where $N$ is your "epoch". So the Fourier transform of the data as a whole is dominated by the Fourier transform of $k_0 + N\,k_1 + N^2\,k_2$.


4

Generally the relationship between the sampling frequency $f_s$ and the frequency spacing of each bin $\Delta f$ is given by: $$\Delta f= f_s/N$$ For example if you have 1000 bins and the sampling rate is $f_s = 1$ KHz, then each bin is spaced by 1 Hz given by $f_s/N$. So if the frequencies $f_1, f_2, ..., f_N$ (using the OP's indexing) were associated ...


2

The continuous-time Fourier transform of a single rectangular pulse $p(t)$ of duration $[-d,d]$ is : $$ P(\Omega) = \frac{ 2 \sin(\Omega d) }{\Omega } = 2 d \cdot \text{sinc}( \frac{\Omega d}{\pi} ) \tag{1} $$ where $\Omega$ is the frequency in radians per second. You can not represent $p(t)$ or $P(\Omega)$ using a sampled-data computer system because $p(...


2

These are similar and provide the same result. In the c code every other sample: w[k+1], w[k+3], etc, are the imaginary twiddle factors in the MATLAB code: For instance the lines in C: w[k] = cos (2 * PI * i / n); w[k + 1] = sin (2 * PI * i / n); Corresponds to this line in MATLAB : twiddle(mm+1) = cos(theta) + (1i*(sin(theta))); Where "theta" in ...


2

Without having the original data it is difficult to confirm, but the DC offset is due to bin 0 in the DFT. Bin 0 corresponds to the DC term or average offset value for the sequence. The plot in the DFT result shows a large value for bin 0 while the time domain waveform appears to be closer to 0 average. I would need to see the original data to determine how ...


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 ...


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

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 ...


1

This is the general solution to recover N real samples using an N/2 Length IFFT. N/2+1 samples of the FFT are required for an even sequence N. First generating a sample sequence of the N/2+1 samples of an FFT of a real signal: x = [1 2 3 4 5 6 7 8]; N = length(x); N2 = N/2; fx = fft(x); X = fx(1:N2+1); % starting result: positive spectrum of ...


1

Your decision to normalize or not does not change the accuracy of your answer, as it is simply a scaling factor. If you use the common scaling of $1/N$, then the output for each DFT bin will represent the average of the portion of the input signal that is at the frequency defined by that bin, scaled to the same units as the input. So that is convenient and ...


1

This elaborates on my comment and my linked FTIR example. Once the FTIR spectrum is obtained, the phase spectrum can be obtained via the Hilbert Transform of the spectrum and that can be performed as a convolution. The Hilbert Transform can be performed by various software packages. In Igor Pro (v. 6.3), the Help text on Hilbert Transforms (page 723 of the ...


1

Y and Z should show the same values clear; %Create random vector x x = randn(32,8); %take ifft along each column y = ifft(x); Y = reshape(y,[],1); z = reshape(x,[],1); % d=conj(dftmtx(32))/32; X = kron(eye(8),d); Z = X*z;


1

@Amelia. Hi. I tried to run your MATLAB code, but it contains several errors regarding vector lengths and produces error messages. But that's not the main issue here. The answer to your question is: If you compute the DFT of an N-point x(n) sequence you produce an N-point complex-valued xDFT(m) frequency-domain sequence. You can only reconstruct the original ...


1

There are a few possible answers depending on the signal and your meaning of "normal calculation". If the signal is stationary, then you might be able to use an old fashioned analog spectrum analyzer, the kind that works by sweeping a narrow-band analog filter across the input signal, and graphing the amplitude results on an X-Y pen plotter. Then you could ...


1

If we have an OFDM system with $N$ subcarriers, the modulated data based on Fourier exponential function can be expressed as follows: $S_{ofdm} = \frac{1}{\sqrt T} e^{j2nπFt}$ where $T$ is the OFDM symbol period, $F = 1/T$ denotes the minimum spacing required to guarantee the orthogonality between subcarriers. Regarding the OFDM-based DCT, the modulated ...


1

This question is longstanding, and not fully resolved, IMO. It hinges upon data dimensionality (1D, 2D, 3D), size (short, large), sampling (loose, tight), and mostly morphology (smooth vs. sharp). Basically, in natural images with distinguishable objects of different contrast/texture at different scales, the data is far from stationary. Fourier applies, but ...


1

If you have an exactly conjugate-symmetric frequency domain vector, the values at DC and at Nyquist must be real-valued. The 'symmetric' flag of Matlab's ifft command makes sure that the result of the inverse FFT is real-valued, implying that the values at DC and Nyquist must also be real-valued. Let $X[k]$ be the length $N$ DFT of a real-valued sequence $...


1

Removing the 2nd term -> array = np.asarray(array, dtype=float) should work


1

When you know that the process that generated the data is non-linear (and you are lucky to be in full control of the acquisition), you can try Attractor Reconstruction. This technique attempts to reconstruct the trajectory a system may be taking through phase space, that results in the complex signal that is being recorded. The signal itself, may be showing ...


1

I agree with @user28715 answer. The best method is to apply a filter to your timeseries to get calibrated timeseries. Filter You did not specify which language you are using, but in Matlab I use the designfilt function. https://www.mathworks.com/help/signal/ref/designfilt.html d = designfilt('arbmagfir',...); a = 1; b = d.Coefficients; or you ...


1

Zero padded OFDM (i.e.) adding zeros after IFFT is used to combat Inter symbol interference, suppose that there is multi path in the system that spans over L samples then atleast L zero samples are prefixed at the transmitter after IFFT so that these can be thrown away at the receiver and then recover ISI free IFFT frame / OFDM symbol. The advantage of ...


Only top voted, non community-wiki answers of a minimum length are eligible