Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
14

If you want the shifted output of the IFFT to be real, the phase twist/rotation in the frequency domain has to be conjugate symmetric, as well as the data. This can be accomplished by adding an appropriate offset to your complex exp()'s exponent, for the given phase slope, so that the phase of the upper (or negative) half, modulo 2 Pi, mirrors the lower ...


8

Now, I would like to show what frequencies the speech has. However, I'm not sure what would be the best way to do that. It seems sometimes one calculates the absolute value of a Fourier transform, and sometimes power spectral density. If you want to attach physical meaning to your analysis, then go with the power spectral density, (PSD). This is ...


8

Real-time low-latency partitioned convolution reverb with a long impulse response works by dividing the impulse response into unequally sized partitions. The shortest partitions (blocks) are at the beginning of the impulse response, and the partition length grows towards the end of the impulse response: Each partition length can be processed separately, ...


7

You're overlooking four things: The $\frac{1}{FFT\_size}$ normalization coefficient. Some FFT implementations have or do not have this factor. Check the definition of FFT as performed by matlab on the Mathworks site! Why are you looking at the real part only? The amplitude is conveyed by the modulus (magnitude) of the complex number. Here, the real part is ...


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 get the exact same information you will receive if you analyse a 1-D signal using the Fourier analysis tools, for example. To illustrate this consider the following examples We perform Fourier Transform on it and obtain the following spectrum As you can see there are two symmetric dots representing the frequency that is present in the image and ...


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

This is a nice question. I will try solving it using 2 approaches (Which are basically the same). The solution is the Least Squares Solution: $$ \hat{h} = \arg \min_{h} \frac{1}{2} \left\| h \ast x - y \right\|_{2}^{2} $$ We assume data is given in finite discrete form (As it is in practice). The convolution is done in valid mode (Like in MATLAB valid ...


6

The term Doppler Shift is actually a bit of a misnomer. The frequencies are not actually shifted but they are scaled (see http://fourier.eng.hmc.edu/e101/lectures/handout3/node2.html for definition of shifting vs. scaling). It's a relative change not an absolute one. Both time and frequency domains are scaled: when the source is moving towards you, the ...


6

Clipping is a non-linear operation. Consider a system that clips all input whose absolute value is larger than 1: $$ y(t) = \begin{cases}x(t)\text{ if }|x(t)|\leq 1 \\ 1 \text{ if } x(t) > 1 \\ -1 \text{ if } x(t) < -1 \end{cases}$$ While this system is linear for small inputs, it becomes non-linear as soon as the input becomes large enough. Non-...


6

Consider a liner discrete-time system. Assume we can define it in terms of an input-output relation as follows (you can assume a more general model but it is enough for our purpose): $$a_0y[n]+a_{1}y[n-1]+\cdots+a_{N}y[n-N]=b_0x[n]+b_{1}x[n-1]+\cdots+b_{M}x[n-M]\tag{1}$$ When the coefficients $\{a_i\}$ and $\{b_i\}$ are constant, we call it a finite-order ...


6

This is just "faking" the magnitude response of an IIR filter. The output's magnitude spectrum looks just like it has been filtered by the IIR filter with the given frequency response. Although it may somehow work, there are some limitations: Frequency-domain filtering is usually much more computationally demanding. It is not for real-time. The problem ...


6

There can't be. One man's signal is another man's noise. In fact, a communication system making the absolute most of a bandwidth would be spectrally white, just like white noise, and hence be indistinguishable from noise to anyone but the receiver for that specific system.


5

I think the FFT is a bad choice of representation for your problem - it captures many properties of the signal irrelevant to your application, and as you are suspecting, it generates a huge amount of data to process if you extract the FFT of the whole signal. It seems to me that the most important quantity to consider when studying birdsongs is pitch (...


5

Nope. Difference between overtones is a good point to start, i,e F3-F2, F2-F1. The differences should be all the same or multiple of each other. The smallest one is often the fundamental. It gets more tricky of the spectrum is "sparse", i.e. a lot of the harmonics are missing. Then you need to find a largest possible divisor that turns all frequencies into ...


5

The resolution in the DFT is given by: $ \frac{{F}_{s}}{N} $. Hence you need 10e6 / 100 = 100,000 samples to get the resolution you want. You may bring the signal to the baseband (demodulation) and then you'll need a lower frequency of sampling to achieve what you want. Since the effective bandwidth of the signal is (Two Sided) 50 [KHz], it can be sampled at ...


5

assuming there were no harmonics (frequency components other than the fundamental that are at integer multiples of the fundamental frequency) in the first place, that means the input to the clipping operation is a pure sine wave. a Fourier series analysis of that periodic sinusoid will show non-zero amplitude at only one frequency, the frequency of the ...


5

We usually talk of $j\omega$ when we're also interested in the Laplace transform of a signal / system, but want to just talk about the frequency response. The physical meaning of the imaginary part is that it refers to purely sinusoidal signals and are constant "amplitude". The real part refers to signals for which the "amplitude" decays or grows ...


5

This sort of filtering is done all the time, but it doesn't have the effect you think it should. Suppose you have an IIR filter with an impulse response of $h[n]$ which is represented in the $z$ domain as: $$ H\left(z^{-1}\right) = \frac{h_n\left(z^{-1}\right)}{h_d\left(z^{-1}\right)} $$ where $h_n$ is the numerator polynomial in $z^{-1}$ of order $N$ and $...


5

Your parameters aren't correct for producing a whole number of cycles for each component. For each $i$ the value of $ \frac{\omega_{i}}{\omega_{s}} N $ has to be a multiple of $ 2 \pi $. Hope this helps. Ced Followup: Suppose your signal is $$ x[n] = A \cos( \alpha n + \phi ) $$ If $ \phi \neq 0 $ there is a possible solution which will give you a ...


4

Here is how you should do it. The two spikes in the FFT will have an amplitude of 1 each (sum those and you get the time domain amplitude of 2) clc close all clear all f = 1000; A = 2; Fs = 16000; t = 0:1/Fs:100/f; x=A*sin(2*pi*f*t); subplot(2,1 ,1) plot(x) % 100,000 = Fs % 10,000 = Length of the Signal % 100,000/10,000 = 100Hz <- First point in FFT =...


4

FFT -> zeroing coefficients -> IFFT is not a good approach for implementing filters. This will lead to a filter with poor performances and/or complicated implementation and/or inefficient implementation. This has been frequently discussed on this site, for example in this question. Look into digital filters instead.


4

It is not clear if you want to visualize the signal or process/transform it ("graphic equalizer" is an effect/transformation adjusting the signal level independently in various frequency bands, not a visualization - a more correct term for the representation you posted an image of is "spectrum analyzer"). It is not clear if you are working in the analog ...


4

Look up the Harmonic Product Spectrum algorithm, which given a sufficient number of actual overtones, is a bit more robust against missing overtones and added noise spectra, than just subtracting all successive tones frequency pairs.


4

The coefficients of the Fourier series that you have computed are, in effect, the spectrum of the periodic signal consisting of the sum of signals $f(t)$ delayed in time or advanced in time by integer multiples of $1$ second. Mathematically, the Fourier transform of a periodic function has impulses in it with the impulse amplitudes being the Fourier series ...


4

Windowing artifacts can be considered as due to a loss of information about a larger data set (e.g.what the window cut out or zeroed). The "spread" of the Sync is related to the shortness of the data window (what's left after the information loss). Thus other information about the original data from outside the FFT results can be used to help "solve" this ...


4

If I understand correctly, you are taking the entropy in the image from the distribution of black and white pixels. In image (a) you have 50% black, 50% white, so the entropy is 1 bit. In image (b) you have 85% black, 15% white, so the entropy is 0.6 bits. If you make another image (c) with black and white stripes equal in width to the black stripes in ...


4

Each DCT output bin is a (weighted) correlation against a cosine function of a certain frequency. A negative value would represent a negative correlation, e.g. something in the image data is of the opposite phase to that cosine (e.g. maybe dark when the cosine is 1, and light when the cosine is -1, instead of vice-versa for a positive correlation).


4

This can be explained by the Convolution theorem As you state, in the time domain you have the kernel (f) multiplied by a sinusoid (g). If we take the Fourier transform of f·g (i.e., F(f·g)), this is equivalent to the convolution between F(f) and F(g) (i.e., F(f)*F(g)). Note that the Fourier transform of the sinusoid is proportional to two delta functions ...


4

Remember that as part of computing the gradients of an image, you are really just convolving your image, with (two) spatial filters. This then gives you two 'gradient' images, which you can then combine. For example, to compute the x-direction-gradient-image $G_x$, you would convolve your image with a filter $f_x$ that might look like this $\begin{bmatrix} ...


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