We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

9

The answer from Bird has it right. The described setup is an implementation of a lock-in amplifier. Lock in amplifiers act as very narrow band filters for detecting the presence of a known signal that is buried in noise. If you multiply two signals (both simple sine waves) you get a new signal that contains a frequency that is the sum of the original two ...


8

What's going on is a variant of I/Q demodulation, done in batch mode using the FFT. First, the fast Fourier transform is just an algorithm that realizes the discrete Fourier transform quickly; so it's a perfect subset of the DFT. What you're doing applies to the DFT as a whole. (Now I get all math-y. Or maths-y, if I want to emigrate to some place they ...


2

For sinusoids that are not exactly integer periodic in the FFT length, an FFT measures the phase at a circular discontinuity. And that discontinuity flips direction as frequency changes from slightly below to slightly above an exact integer periodic-in-aperture frequency. This is part of the effect of the default rectangular windowing of any finite length ...


2

if $$\text{FFT}\{[a, b, c, d]\} = [p, q, r, s]$$ then $$\text{FFT}\{[a, b, c, d, a, b, c, d]\} = [p, 0, q, 0, r, 0, s, 0]$$ or $$=[2p, 0, 2q, 0, 2r, 0, 2s, 0]\text,$$ depending on normalization. Edit: Using this property, we can make FFT nearly 2x faster on this specialized data. But the complexity is still $O(n \log n)$. I mean, big O notation doesn'...


2

I think $\Delta t$ in the formula you wrote is NOT the sampling period, but the sampling interval, which is the total observation time of your sample time series.


2

When you multiply an $x(n)$ time-domain sequence by $e^{-j2\pi f_on/F_s}=\cos(2\pi f_on/F_s)-j\sin(2\pi f_on/F_s)$ you obtain a complex-valued sequence whose spectrum is $x(n)$'s spectrum shifted in the negative-frequency direction by $f_o$ Hz. So if $x(n)$ had a spectral component at $+f_o$ Hz, that spectral component will show up at DC (zero Hz) in the new ...


2

Looks to me like a Lock-In Amplifier


2

There are two interpretations of the term harmonics here. The first refers to the Fourier series expansion of a periodic signal $x(t)$ with a fundamental period of $T_0$ seconds and a fundamental frequency of $f_0 = 1/T_0$ in Hz. In this representation, the harmomics family of sine waves at the frequencies of $f_0$, $2f_0$, $3f_0$,... are assumed to make ...


2

Harmonics "happen" when your input to an FFT isn't a pure unmodulated sine wave. Any unexpected distortion in your input waveform generation (from being exactly identical to mix of sin(wt) + cos(wt)) can be the cause of harmonics appearing in an FFT result (above the noise floor and any windowing artifacts). Those harmonics are required to represent the ...


2

Multiplying a kernel and signal spectrum in Fourier domain lead to a circular convolution and not a linear convolution, so in order to it become linear convolution you must zero pad your signal and kernel before taking the Fourier transform (up to M+N-1 where M is the signal's length and N is the kernels's length). (if you compare the blue and orange signals,...


2

Humans do not use FFTs or fixed size windows when perceiving sound. So the mechanism of displaying STFTs can't be used to categorize what a human will "detect", or to produce data that will have a "clean audio quality". For high frequencies, humans can perceive with a higher time resolution than STFTs that are spaced apart by 1024 when overlapped. The ...


2

Regarding the first paragraph of your question: The number of samples used in a discrete Fourier transform (DFT) depends on your desired DFT bin spacing (the frequency difference between adjacent DFT bins) in the frequency domain. If that desired bin spacing is Fo Hz, and the time-domain signal sample rate is Fs samples/second, then the number time samples, ...


1

For a set of exact equations that describe how a pure real tone works in a DFT check out equations (23)-(25) in my blog article: DFT Bin Value Formulas for Pure Real Tones The phenomenon you have found can be seen clearer if you consider the complex definition of a real valued sinusiodal. $$ \cos( \theta ) = \frac{e^{i\theta}+e^{-i\theta}}{2} $$ So, when ...


1

If you're starting with a 10Hz sine wave, doing an FFT, and seeing harmonics, it's because the FFT is operating on a fixed size chunk of samples (normally a power of 2) that doesn't happen to be a multiple of the period of the wave. If you've got, say, a 48KHz sample rate, then there are 4800 samples in each cycle, so a Fourier transform would have to be ...


1

i do not know what the latter half of step 1 is. step 2 is unnecessary (assuming $f_0$ is not zero). step 4 and step 5 are unnecessary. step 6 can be done with averaging. because you bumped the spectrum down by multiplying by $ e^{-j 2 \pi f_0 t} = \cos(2 \pi f_0 t) -j \sin(2 \pi f_0 t)$, the component at frequency $f_0$ is now bumped down, real and ...


1

"integrator is unstable since it has a pole on the unit circle" -- not true. This Z-1 is done all the time in CIC resamplers. The pole is --on-- the unit circle exactly, and is therefore stable. Fun fact, if you use floating point math this falls apart and the integrator blows up bc the value is not exactly 1, its 1.000000000001 (or something larger than 1)


1

For non-periodic signals (size(y) -1) has to be substracted from the index of R_xy to get the actual lag. N = size(x) + size(y) - 1; lags = [0, N] - (size(y) - 1);


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