Dear Mike, Thanks a lot, I just started EEG research, your channel has been a great help! I'm confused about the scientific validity of zero padding with regards to your example of wanting a Fourier coefficient for the exact frequence of a flickering lightbulb: If I think of an extreme case, i.e. a sampling rate of 1 Hz over 1 second, then the EEG signal only tells us the mean current for this given second. However, if you zeropad the signal with 99 seconds of null activity, you get Fourier coefficients for increments of 1/100 Hzs. As you said at the end of the video, it helps in smoothing out a curve. I see that, but I have a hard time figuring how you could draw new conclusions from it e.g. with the light bulb experiment. Many thanks, Victor
Hi Victor. Zero-padding is valid as long as you understand the correct interpretation: The values in between the "true" frequencies are sinc-interpolated values. You can trust them as much as you can trust any other interpolated signal. If the resolution is already fairly good, then interpolating a bit higher is fine. In extreme cases, it would be good to exert caution. Anyway, zero-padding is necessary for some applications like convolution, so it's used even if the interpolated points are not interpreted.
I am having trouble understanding WHY the zeros are added after the actual readings. Intuitively adding zeros between valid data points and interpolating between data points makes sense- please help
Zero-padding is indeed confusing. Imagine what would happen if you put zeros in between data points -- that would actually change the frequency characteristics of the signal and introduce a lot of artifacts. Imagine, for example, a sine wave. Then you put zeros between each time point in the sine wave. The signal would have a sine wave at 1/2 the frequency, and it would keep bouncing between zero and a valid sine point.
Dear Mike, Thank you so much. I have a question please: By zero padding, a new signal is generated; the result of the fft should change in a way that in ifft the straight part of the new signal be covered as well. It causes change in frequency content of the signal! Where is my mistake, please?
Hi Arash. Zero padding increases the frequency resolution, but it doesn't change the frequencies or the shape of the spectrum except to make it smoother.
@@mikexcohen1 thanks. You are totally correct. I checked that in some examples as well. (There is just a conflict between my feeling and the way which mathematics works in this case 😃). Thank you so much.
Indeed, zero-padding is sinc-interpolation (a.k.a. the zero-padding theorem). Frequency resolution is the spacing between successive frequencies, and so with more time points in the signal, the frequency resolution increases.
@@mikexcohen1 ok, I think there is different definitions on frequency resolution. From what I have learn frequency spacing and frequency resolution is not the same.
@@JsoProductionChannel " I have heard it said that it increases frequency resolution because it extends the signal, but I don't agree as by just adding zeros you haven't added any new information to the signal. "
Random music producer just passin thru lol. This is next level!
Thanks :)
Thank you for sharing this amazing work!
Glad you enjoyed it!
Dear Mike,
Thanks a lot, I just started EEG research, your channel has been a great help!
I'm confused about the scientific validity of zero padding with regards to your example of wanting a Fourier coefficient for the exact frequence of a flickering lightbulb:
If I think of an extreme case, i.e. a sampling rate of 1 Hz over 1 second, then the EEG signal only tells us the mean current for this given second. However, if you zeropad the signal with 99 seconds of null activity, you get Fourier coefficients for increments of 1/100 Hzs.
As you said at the end of the video, it helps in smoothing out a curve. I see that, but I have a hard time figuring how you could draw new conclusions from it e.g. with the light bulb experiment.
Many thanks, Victor
Hi Victor. Zero-padding is valid as long as you understand the correct interpretation: The values in between the "true" frequencies are sinc-interpolated values. You can trust them as much as you can trust any other interpolated signal. If the resolution is already fairly good, then interpolating a bit higher is fine. In extreme cases, it would be good to exert caution.
Anyway, zero-padding is necessary for some applications like convolution, so it's used even if the interpolated points are not interpreted.
Dear Mike, many thanks for your response. It's clearer now. Best, Victor
Your stuff is SO good.
Thanks bro
I am having trouble understanding WHY the zeros are added after the actual readings. Intuitively adding zeros between valid data points and interpolating between data points makes sense- please help
Zero-padding is indeed confusing. Imagine what would happen if you put zeros in between data points -- that would actually change the frequency characteristics of the signal and introduce a lot of artifacts. Imagine, for example, a sine wave. Then you put zeros between each time point in the sine wave. The signal would have a sine wave at 1/2 the frequency, and it would keep bouncing between zero and a valid sine point.
very good explaining, would you please talk as well about hunning and hamming windowing?
Find my video called "Welch's method for smooth spectral decomposition."
It's a metod for oversampling? When a plugin make it?
Dear Mike,
Thank you so much.
I have a question please:
By zero padding, a new signal is generated; the result of the fft should change in a way that in ifft the straight part of the new signal be covered as well. It causes change in frequency content of the signal!
Where is my mistake, please?
Hi Arash. Zero padding increases the frequency resolution, but it doesn't change the frequencies or the shape of the spectrum except to make it smoother.
@@mikexcohen1 thanks. You are totally correct. I checked that in some examples as well.
(There is just a conflict between my feeling and the way which mathematics works in this case 😃).
Thank you so much.
Math is often unintuitive, sometimes even counter-intuitive...
at 3:34, didn't you mean "decrease the resolution" ? Because if you are lowering the sample rate, the buckets move closer together.
nvm, the closer the buckets move together, the higher the resolution. Not the opposite.
Exactly. It's confusing stuff ;)
It would be equally accurate to say that we're decreasing the frequency spacing.
Character In the video It's great, I like it a lot $$
if I add a window to the sampled signal, then reverse it and inverse it, and pad this reverse-inverse signal with the original signal, can it work?
This is called reflection and is usually done to attenuate edge effects during filtering.
@@mikexcohen1 so can it increase the frequency resolution or it's totally nonsense for increasing freq resolution?
Technically it would increase frequency resolution, but the goal of reflection is to attenuate edge effects in (time-domain) filtering.
Zero-padding does not increase frequency resolution. It is only a technique which interpolates the signal points.
Indeed, zero-padding is sinc-interpolation (a.k.a. the zero-padding theorem). Frequency resolution is the spacing between successive frequencies, and so with more time points in the signal, the frequency resolution increases.
@@mikexcohen1 ok, I think there is different definitions on frequency resolution. From what I have learn frequency spacing and frequency resolution is not the same.
@@JsoProductionChannel " I have heard it said that it increases frequency resolution because it extends the signal, but I don't agree as by just adding zeros you haven't added any new information to the signal. "