4 ms·
>anyone has a more rigorous explanation of the in-between frequencies part I think it's because the DFT is one period of the sampled version of the DTFT of you
by krackers 4y ago
>anyone has a more rigorous explanation of the in-between frequencies part
I think it's because the DFT is one period of the sampled version of the DTFT of your discrete input signal, or equivalently one period of the DTFT of the periodic continuation of your discrete input. (Equivalence here is that convolving by a dirac comb in time domain is multiplying by a dirac comb = sampling in the frequency domain)
When you use a windowing function (e.g. multiplication by a rect) to convert an infinite continuous signal into a time-limited one, the fourier spectrum of the original becomes convolved by the spectrum of the window (e.g. sinc). For a given sample length (window size), I guess if you capture the signal at a period boundary then your discretization of the DTFT is done exactly at peaks and zeroes. Otherwise if there's a mismatch, then you're not sampling the DTFT exactly at the peaks/zeroes so you get the spectral leakage. See [1] for a nice interactive example. Figure 3 shows as input a pure sin. If this was infinite, the fourier transform would be a dirac delta at the correpsonding frequency. But since it's windowed by a fixed window of 12 samples, the DTFT is the dirac convolved with a sinc.
Another perspective might be that if you don't capture it at a period boundary, when you create a periodic summation of your input you're introducing higher frequencies at the discontinuity.
[1] https://jackschaedler.github.io/circles-sines-signals/dft_leakage.html https://jackschaedler.github.io/circles-sines-signals/dft_le...
[2] https://geo-ant.github.io/blog/2021/dft-spectral-leakage-and-windowing https://geo-ant.github.io/blog/2021/dft-spectral-leakage-and...
[3] https://dspillustrations.com/pages/posts/misc/spectral-leakage-zero-padding-and-frequency-resolution.html https://dspillustrations.com/pages/posts/misc/spectral-leaka...
[4] https://dsp.stackexchange.com/questions/34211/is-spectral-leakage-due-to-windowing-different-for-the-dtft-and-dft https://dsp.stackexchange.com/questions/34211/is-spectral-le...
Or you can just grind through the computation and see that the power spectrum is indeed sinc-like https://ccs.fau.edu/~bressler/EDU/STSA/Modules/VIII.pdf https://ccs.fau.edu/~bressler/EDU/STSA/Modules/VIII.pdf
- krackers 4y agoCan't edit, but I just realized that when you go from continuous to discrete via the sampling step you also introduce replication in the frequency domain. So you have Continuous sin wave: Spectrum is a single dirac Sampling: Infinite samples of sin wave - spectrum is periodic train of impulses Windowing: Fixed number of samples - spectrum is sinc convolved with that impulse train. The DTFT would end here. DFT: Windowed samples are then periodically extended - spectrum is spectrum of DTFT multiplied by a comb. Even assuming nyquist is satisfied, the tails of the sinc would still interact with each other, so the shape of the DTFT isn't _just_ a sinc, right? It'd be almost a sinc but with some additional wonkiness from the tails?
- geokon 4y agoI understand what you're saying on a high level, but it's tricky for me to then translate that into practice One issue is that all this interactive stuff always just give you a "Frequency Domain" when really you have complex values and weights. At the end of the day I need to find a way to work backwards. From a sinc ringing back to both a frequency and phase. Say I have data that's got some high frequency relatively low amplitude noise and I have say several thousand samples. The samples in my case are actually not exactly evenly spaces in time unfortunately, but I can interpolate. And I want to extract a strong very low frequency component. It's got maybe 10 oscillations in my dataset. If I do an FFT I'll get some sinc around 10Hz. There is other stuff in the spectrum, but not much around 10Hz. Now I want to work from that sinc and get back to an original frequency and phase. How do I go about that? (without truncating my data) In my usecase it might be a bit trickier. There are probably several distinct frequencies but the phase need to be known very accurately. Normally when playing with FFTs it's a bit problematic when it comes to determining frequency b/c the naiive interpretation limits you to discreet values. But when it comes to the phase offset there is no such limit. The limit is determined by the accuracy of your input (though I don't actually know how to go from data error-values to a phase error-value. The error propagation is a little confusing to calculate)
- krackers 4y agoI'm not quite sure I follow: evaluating the fourier transform (whether continuous or discrete) at a given frequency omega gives you a complex value that encodes both the magnitude and the phase. Usually for the sake of plotting we just take the magnitude of this. Given these values for all frequencies, the FT et al. are perfectly invertible and you'll get back to your original sampled signal. But it seems like you want to go from the spectrum of the windowed signal to the spectrum of the "true" signal. I.e. undo the effects of the sinc ringing, which would involve reconstructing a posteriori the most probable signal. I don't know much here, but for DTFT maybe deconvolution techniques are something to look at? Alternatively for the DFT since we only have information about discrete frequencies, some sort of technique that tries to interpolate samples at the edges to ensure the periodic summed waveform doesn't have discontinuities?