Frequency resolution and zero-padding

Sdílet
Vložit
  • čas přidán 23. 08. 2024

Komentáře • 30

  • @Jay_Ribz
    @Jay_Ribz Před 2 lety +3

    Random music producer just passin thru lol. This is next level!

  • @elsharko87
    @elsharko87 Před 2 měsíci

    Thank you for sharing this amazing work!

  • @victorziegler6001
    @victorziegler6001 Před 3 měsíci

    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

    • @mikexcohen1
      @mikexcohen1  Před 3 měsíci

      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.

    • @victorziegler6001
      @victorziegler6001 Před 3 měsíci

      Dear Mike, many thanks for your response. It's clearer now. Best, Victor

  • @patrickjdarrow
    @patrickjdarrow Před 3 lety +1

    Your stuff is SO good.

  • @JDG022664
    @JDG022664 Před 5 měsíci

    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

    • @mikexcohen1
      @mikexcohen1  Před 5 měsíci +1

      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.

  • @yacineterriche6883
    @yacineterriche6883 Před 4 lety

    very good explaining, would you please talk as well about hunning and hamming windowing?

    • @mikexcohen1
      @mikexcohen1  Před 4 lety

      Find my video called "Welch's method for smooth spectral decomposition."

  • @angelosika253
    @angelosika253 Před 11 měsíci

    It's a metod for oversampling? When a plugin make it?

  • @arash4232
    @arash4232 Před rokem

    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?

    • @mikexcohen1
      @mikexcohen1  Před rokem

      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.

    • @arash4232
      @arash4232 Před rokem

      @@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.

    • @mikexcohen1
      @mikexcohen1  Před rokem

      Math is often unintuitive, sometimes even counter-intuitive...

  • @MrHjld
    @MrHjld Před 3 lety

    at 3:34, didn't you mean "decrease the resolution" ? Because if you are lowering the sample rate, the buckets move closer together.

    • @MrHjld
      @MrHjld Před 3 lety +1

      nvm, the closer the buckets move together, the higher the resolution. Not the opposite.

    • @mikexcohen1
      @mikexcohen1  Před 3 lety

      Exactly. It's confusing stuff ;)
      It would be equally accurate to say that we're decreasing the frequency spacing.

  • @dieptruong5178
    @dieptruong5178 Před 2 lety

    Character In the video It's great, I like it a lot $$

  • @hugochiang1072
    @hugochiang1072 Před 3 lety

    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?

    • @mikexcohen1
      @mikexcohen1  Před 3 lety +1

      This is called reflection and is usually done to attenuate edge effects during filtering.

    • @hugochiang1072
      @hugochiang1072 Před 3 lety

      @@mikexcohen1 so can it increase the frequency resolution or it's totally nonsense for increasing freq resolution?

    • @mikexcohen1
      @mikexcohen1  Před 3 lety

      Technically it would increase frequency resolution, but the goal of reflection is to attenuate edge effects in (time-domain) filtering.

  • @JsoProductionChannel
    @JsoProductionChannel Před 3 lety

    Zero-padding does not increase frequency resolution. It is only a technique which interpolates the signal points.

    • @mikexcohen1
      @mikexcohen1  Před 3 lety

      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.

    • @JsoProductionChannel
      @JsoProductionChannel Před 3 lety

      @@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.

    • @serhatarslan4138
      @serhatarslan4138 Před 4 měsíci

      @@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. "