# Tag Info

15

If the spectrogram was computed as the magnitude of short time fourrier transforms from overlapping windows, then the spectrogram contains implicitly some phase information. The following iterations do the job : $$x_{n+1} = \text{istft}(S\cdot\exp(i\cdot\text{angle}(\text{stft}(x_n))))$$ $S$ is the spectrogram, $\text{stft}$ is the forward-short time ...

13

No. Why do you think it would? First of all, the human brain works very different then any human constructed computer (to date); so the assumption that it runs mathematical "algorithms" is somewhat dicey.. Here is roughly how it works: Sound wiggles the air drum That vibration is transferred by the ossicles to the cochlea. The ossicles act mainly as a ...

10

Conjugate symmetric means $$f(-x) = f^{\ast}(x)$$ i.e. the sign of the imaginary part is opposite when $x<0$ The FFT of a real signal is conjugate symmetric. One half of the spectrum is the positive frequencies, and the other half is the negative. The negative coefficients are conjugate of the positive. So if you do filtering, your envelope must do ...

10

The concept is based on the convolution theorem, which states that for two signals $x(t)$ and $y(t)$, the product of their Fourier transforms $X(f)$ and $Y(f)$ is equal to the Fourier transform of the convolution of the two signals. That is: $$\mathcal{F}\{x(t) * y(t)\} = \mathcal{F}\{x(t)\}\mathcal{F}\{y(t)\}$$ You can read more on the derivation of ...

7

The (linear or aperiodic) convolution of two vectors $\mathbf x = (x, x, \ldots, x[N-1])$ and $\mathbf y = (y, y, \ldots, y[N-1])$ is a vector $$\mathbf z = {\mathbf x}\star {\mathbf y} = (z, z, \ldots, z[2N-1]).$$ On the other hand, their cross-correlation is a vector $$\mathbf w = {\mathbf x}\otimes {\mathbf y} = (w[-(N-1)], w[-(N-2)], \... 7 You can say the null subcarriers have their own bandwidth if you define an alphabet including "zeros" and use null carriers to transmit these "zeros". As the comment of MBaz, If we start with the discrete-time OFDM symbol s[n], and increase the sampling rate (defined by the time interval between successive samples of s[n]), then the OFDM symbol ... 6 Regarding example 1: first of all, either the fft or the ifft needs to be normalised by the number of sampling points as you have done (actually you can normalise each by a factor of the square root of the number of points, it is just a meter of definition). However, in your case the ifft is half the length of the fft you performed. Hence your signal is ... 6 You just have to make sure that$$H_k = H^*_{N-k},\quad k=1,2,\ldots N-1,\quad (N\ldots\text{FFT length})$$and that H_0 is real-valued. 6 The FFT of the FFT bascially gets you the original signal again, it's just scaled and time flipped, i.e.$$FFT\left \{ FFT \left \{ x(n) \right \} \right \} = N \cdot x(-n)$$That's a simple consequence of the fact that the forward and inverse Fourier Transforms are almost the same. I have no idea what all the acronyms in the second question mean. 6 you don't have to set X\left(\frac{N}{2} \right)=0 if you don't want to. it will correspond to this component:$$ X(k)\frac{1}{N}e^{j 2 \pi \frac{nk}{N}}\bigg|_{k=\frac{N}{2}} = X\left(\frac{N}{2} \right)\frac{1}{N}(-1)^n $$but when you sample some x[n], FFT it and find that X\left(\frac{N}{2} \right) \ne 0, you do not know the phase of that ... 6 The scaling convention used by Matlab is common in DSP. You could also use the unitary DFT where both the DFT and the IDFT are scaled by a factor of 1/\sqrt{N}. You could also use the factor 1/N for the DFT and the factor 1 for the IDFT. As long as you're consistent it doesn't really matter (apart from numerical considerations, especially when using ... 6 Whether or not to scale the forward FFT by 1/N depends on which result you want for further analysis: energy (preserving Parseval's identity), or amplitude (measuring height or volts, etc.). If you want to measure or analyze energy, then don't scale by 1/N, and a longer sinusoid of the same amplitude will produce a larger FFT result, proportional to the ... 5 What you're looking for is called a pruned DFT. In principle, it is possible to calculate a subset of outputs from a DFT using fewer mathematical operations. In practice, however, existing highly-optimized FFT implementations like FFTW are designed for full-output transforms. You'll find in many cases, unless you're only concerned with a very small ... 5 The basic concept of OFDM is to divide a high-bitrate datastream into N low-bitrate datastreams and to multiplex these low-bitrate datastreams in frequency. That is, every datastream is assigned to a distinct frequency band (so-called subcarrier) that does not interfere with the other frequency bands. Orthogonality allows the frequency bands to be packed ... 5 Re-construction using just the magnitude (and an assumed phase of zero) will only work for exactly symmetric images. The phase is needed to make the top look different from the bottom and left look different from the right side of the image, etc. That's because all the cosine waveform DFT basis vectors are exactly symmetric around the center of an FFT or ... 5 If you'd like to think analog, an OFDM signal can be written as a sum of weighted complex sinusoidals:$$ x(t)=\sum_{k=0}^{N-1}X_k \exp{\left( \mathrm j 2\pi\frac{kf_\mathrm{s}}{N}t \tag{1}\right)}, $$where N is the number of subcarriers, f_\mathrm{s} is the sampling frequency and X_k denotes the subcarrier values. For a digital implementation, (1) is ... 5 Say you want to transmit complex symbols s_0,s_2,\ldots,s_{N-1} using frequency-division multiplexing. In the "bank of modulators" approach, you would assign a carrier frequency f_k to each symbol and create the signal$$x(t) = \sum_{k=0}^{N-1} s_k \exp(j2\pi f_kt).$$Contrast this with the definition of the inverse discrete Fourier transform:$$x[n] =...

5

particularly since this is a question about convention, i will not reinforce the ridiculous convention of MATLAB and will answer only with the right and proper convention or conventions. i.e. MATLAB's indexing for the DFT is not right and proper, but i am pretty much agnostic about the which of the three common scaling conventions. also, i am not ...

5

Your code uses the phase for the reconstruction. Have a look at the output of fft2(x); they are complex numbers, i.e. the contain phase and magnitude. Have a look at this code: %% [x,map] = imread('http://www.cs.cmu.edu/~chuck/lennapg/lena_std.tif'); %import image %% i = rgb2gray(x); % to greyscale I = fft2(i); % 2D FFT I = fftshift(I); % centre mag = ...

4

You need as many samples as you have subcarriers. If you have 64 carriers, then you need 64 samples.

4

You must keep in mind that for a real-valued signal, second half of your spectrum is a complex conjugate of all values below the Nyquist frequency. In your case: X(2) = -32 X(N) = 32 as you can see the coefficients are not the complex conjugate of each other. Because of that you are ending up with round-off errors, since two frequency components are ...

4

An FFT possesses linear features. Let us use a linear analogy. If one tells you that the sum of two numbers is $a+b=3$, what can you say about these numbers? Not much. More generally, $n$ linear equations on $m$ variables is underdetermined when $n<m$: you do not have enough information to retrieve the variables without more conditions. This can be ...

4

The Windowing method for filter design uses samples of the impulse response for the filter coefficients, truncated to the filter length (and then possibly, but not required, tapered by a higher performing window). The Frequency Sampling method for filter design uses the IDFT (Inverse Discrete Fourier Transform) of the desired frequency response for the ...

4

Suppose, I have this image in my hand and nothing else. Clearly, this is a Magnitude-plot of some unknown image. Sounds like you're losing the phase information in the signal; you only have the pixel values, correct? Is it possible to apply an Inverse Fast Fourier Transform (I-FFT) operation to recover the original Grayscale image from this image? The ...

4

$N=1000$ and your signal frequency is $10000$. So there should be a peak at bin $k=10$. And another one at $N-k=1000-10=990$. However since MATLAB starts indexing at $1$ instead of zero, you see peaks at $11$ and $991$.

4

In your link I cannot find a reference to the time-reversal. However, here are some additions: The time reversal $y(t)$ of a continuous signal $x(t)$ is given by $y(t)=x(-t)$. Similarly, for a discrete signal we have $y[n]=x[-n]$. However, here the delicate issue occurs that $n=0...N-1$, where $N$ is the signal length. Now, noting that in the finite ...

4

First note that when you use a logarithmic function you shall avoid negative arguments if it's output should be real valued. Then consider the following relation: $$y[n] = \ln( 1 + x[n] )$$ where the input $x[n]$ is conditioned such that $0 < 1 + x[n] \leq2$ is maintained. Then a Maclaurin series expansion of this expression will be  y[n] = \ln(1 + ...

3

The problem appears to be that your windowing function doesn't preserve complex conjugate symmetry. So ifft(y1) has a significant imaginary part. By discarding this through the real() operation you induce a significant error which results in the discrepancy. To verify try z = ifft(y1); plot(imag(z));

3

This is tricky. The phase information impacts the time domain form very much. For example white noise and a delta impulse have exactly the same amplitude spectrum, the only difference is in the phase. Without any further assumptions or extra knowledge this can't be done. For example if you know that the signal is stationary, you could just try a random ...

3

I had a bit of a hard time to understand the answer of @edouard, which is doing the right thing. Compare to https://dsp.stackexchange.com/a/3410/9031 , which I used to implement my reconstruction. Note that $i$ is the imaginary number, and $x_n$ is the reconstructed signal at the $n^{\text{th}}$ iteration. Start with $x_0$ being a random vector of length ...

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