Real time with DFT is a bit sketchy.
Just view it as a matrix vector multiplication.
The vector is the sampled signal at discrete time steps of equal spacing, the matrix is the DFT of fixed size.
You need to fill your vector before the multiplication. This time needs to pass. You might shift it by just one value in time to create a sliding DFT, but nonetheless you will need to sample your time vector first.
The length of each chunk is fixed by the size of the DFT.
Let's say it is 1 millisecond long, each sample is 1 microsecond spaced, so it has a length of 1000. You may then create a spectrogram that captures 1 millisecond and then advances by 1 microsecond every step and this will be as close as real time as you can get.
The initial delay of your analysis vector, then advancing by one sample, plus all the time you need for the calculations included cause a delay. Although this is sometimes called real time DFT. Since you may observe the change in the signal basically in real time, but after some delay.
short loops made from single chunks, actually. since frequencies are in a limited band, signal must be infinite and repeating. That is the reason analysis usually multiplies signal by window function before FFT, to "fade out" discontinuity at the loop point
Multiplication is used because when a frequency is present and in phase (meaning peaks are aligned), it would result in more 'positive curves' sitting above the x-axis than negative curves below.
https://www.dspguide.com/ is a great, general introduction to digital signal processing and includes coverage of the Fourier Transform. I'd recommend checking it out for anyone struggling to grok DSP concepts.
This article seems to have the right intent, but I felt the quality of the writing would need to improve for it to become truly useful for learners.
I think the writing was poor, but also there are some things that are just wrong. Like most of the time people sample at 10x Nyquist. That would be a huge waste of processing given that it doesn't give you any more information about the signal than just Nyquist.
That's true but sampling beyond your target domain bounds seems pointless, right? If, say, you're sampling audio oversampling will just give you a bunch of frequencies you'd end up throwing away regardless. It's extra work for no benefit if the domain already has well-prescribed bounds.
I guess it could be useful in cases where you don't have bounds to work against.
This comes back to the poor writing, though, as I believe the author meant to indicate that the industry standard for sampling audio is 10x their cited sampling rate of 2000HZ in the text (though this is incorrect, too. Audio is sampled at 44100HZ because the general upper bound on hearing is 22000HZ, so by Nyquist's theorem, sampling at 44100 gives you enough range to avoid aliasing within the 0-22000 band).
Here's what I've never understood, isn't Nyquist sampling discrete in time but continuous in amplitude? If the amplitude is instead (as is normal in digital) being sampled discretely (in steps), wouldn't that introduce errors, and wouldn't more samples make up for these errors?
what would Nyquist in amplitude, continuous in time look like? that's sort of a class D amplifier, and even sort of CVSD.
There are Sigma Delta ADCs, which sample quantised to one bit at a higher frequency. They need to do some processing in the analogue domain though. IIRC you need to multiply the sample rate by 4*N to get the equivalent of an N but DAC
Thank you. I read a lot of papers drive equations from Euler's formula, which helped with result, but I didn't have any intuitive understanding, but when I watched geometric breakdown of it, it suddenly made sense. It's just my attempt to share my excitement. I do agree my writing could definitely be improved.
23 comments
[ 2.3 ms ] story [ 64.7 ms ] threadYou need to fill your vector before the multiplication. This time needs to pass. You might shift it by just one value in time to create a sliding DFT, but nonetheless you will need to sample your time vector first.
The length of each chunk is fixed by the size of the DFT.
Let's say it is 1 millisecond long, each sample is 1 microsecond spaced, so it has a length of 1000. You may then create a spectrogram that captures 1 millisecond and then advances by 1 microsecond every step and this will be as close as real time as you can get.
The initial delay of your analysis vector, then advancing by one sample, plus all the time you need for the calculations included cause a delay. Although this is sometimes called real time DFT. Since you may observe the change in the signal basically in real time, but after some delay.
It is always done in chunks. Hope this helps.
This is also the principle behind DSSS modulation ( https://en.wikipedia.org/wiki/Direct-sequence_spread_spectru... ), which is used in numerous communications systems.
This article seems to have the right intent, but I felt the quality of the writing would need to improve for it to become truly useful for learners.
If you have any noise at all, oversampling will be very helpful to improve the signal to noise ratio.
I guess it could be useful in cases where you don't have bounds to work against.
This comes back to the poor writing, though, as I believe the author meant to indicate that the industry standard for sampling audio is 10x their cited sampling rate of 2000HZ in the text (though this is incorrect, too. Audio is sampled at 44100HZ because the general upper bound on hearing is 22000HZ, so by Nyquist's theorem, sampling at 44100 gives you enough range to avoid aliasing within the 0-22000 band).
what would Nyquist in amplitude, continuous in time look like? that's sort of a class D amplifier, and even sort of CVSD.
[0]: https://www.youtube.com/watch?v=spUNpyF58BY
It seems a bit childish, but it actually explains everything perfectly.
https://www.goodreads.com/en/book/show/706622