The filter-Hilbert method

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ธ.ค. 2024

ความคิดเห็น • 36

  • @user-hk3ej4hk7m
    @user-hk3ej4hk7m 2 ปีที่แล้ว +2

    Thanks uploading this! However I think there's a bit of confusion regarding what the Hilbert transform yields as a result. If I'm not mistaken, the analytical function is the original function, plus i times the Hilbert transform of it. The Hilbert transform doesn't yield the entire analytical function, but only its complex part. Is this correct?

  • @exponentmantissa5598
    @exponentmantissa5598 16 วันที่ผ่านมา

    AS you add more taps you also get more delay. The same applies for the steepness of the filter.

    • @mikexcohen1
      @mikexcohen1  12 วันที่ผ่านมา

      Indeed. Great point. On the other hand, if you're doing offline filtering, then a zero-phase-shift filter will handle the additional delays.

  • @vokincho
    @vokincho 4 ปีที่แล้ว +2

    I'm wondering why you're saying that applying a FIR filter is not formally a convolution. Could you please explain?

  • @tobi3497
    @tobi3497 4 ปีที่แล้ว +1

    Is it possible to not only band-pass filter, but apply a variable attenuation to the power of each frequency in the band, using a method like filter-hilbert. My instinct was to simply apply an gain-envelope over the frequency spectrum, however, this doesn't seem like it would work as expected. Mainly because the Gilbert transform works by doubling the low end of the FFT spectrum, which results in a unique transformation of the signal, not in the doubling of all frequency powers. So, applying an envelope over the signal will equivalent result in a unique transformation of the signal - not the desired attenuations of each frequency power over time. Essentially, something like: *abs(half_power(hilbert(narrow_banded_signal))) = abs(hilbert(narrow_banded_signal)) / 2*

    • @mikexcohen1
      @mikexcohen1  4 ปีที่แล้ว

      Yes, you can create any arbitrary shape of the filter you want. That's an advantage of FIR over wavelets for narrowband filtering. The interpretation gets trickier with the Hilbert transform. The analytic signal resulting from the Hilbert transform will reflect whatever frequency has the most power at that time point. So if the filter itself biases the signal towards some frequency, then the analytic amplitude and phase will be dominated by that frequency. That's not necessarily a problem, but seems a bit suboptimal. My intuition is that it's best to have either (1) a flat spectrum across some range, or (2) a symmetric peak around some frequency of interest. An asymetric filter would introduce a systematic bias in the spectral content of the results, which is something I'd prefer to avoid.

    • @tobi3497
      @tobi3497 4 ปีที่แล้ว

      @@mikexcohen1 some of that has gone over my head, as I'm not too knowledgeable in this field, but what I'm trying to do is exponentially attenuate higher frequencies - to give a more representative diagram for audio spectrograms (humans hear higher frequencies less than low). The end goal is to actually apply an actual human frequency envelope to the frequency spectrum (as opposed to a basic exponential line) to nearly exactly match how a human would hear the frequencies. Side note I watched some videos from the new PlayStation 4 teasers where they talk about advancements in their real time audio processing in games. In here, they use envelopes calculated empirically calculated (unique to each person's ear) to provide more realistic 3d/audio

    • @tobi3497
      @tobi3497 4 ปีที่แล้ว

      @@mikexcohen1 to sum. It seems your concern is that this will introduce bias for certain frequencies - but this is exactly what I'm trying to introduce, to match human hearing

    • @mikexcohen1
      @mikexcohen1  4 ปีที่แล้ว

      I see. Then yes, go for an FIR filter. You can use an algorithm like firls and use, e.g., 15 points to specify the shape of the spectrum.

    • @tobi3497
      @tobi3497 4 ปีที่แล้ว

      @@mikexcohen1 Do you have a series including FIR with least squares?

  • @tobi3497
    @tobi3497 4 ปีที่แล้ว

    Great video. I was trying to do something similar - as opposed to morlet wavelets with a gaussian frequency resolution

  • @me-ou8rf
    @me-ou8rf หลายเดือนก่อน

    What do you think of Hilbert-Huang transform ?

    • @mikexcohen1
      @mikexcohen1  หลายเดือนก่อน +1

      I very much like the theory of it. In practice, I don't think it's great for typical neuroscience data (LFP, EEG, MEG). In my experience, the results are too dependent on minor choices of filters, e.g., a low-pass filter of 90 vs 100 Hz can change the estimates of spectral dynamics at 10 Hz. I think the HH method is best suited for signals that have most of the energy concentrated in very narrow ranges.

  • @vagabond683
    @vagabond683 4 ปีที่แล้ว +1

    How narrowband is narrow enough to use Hilbert without filtering first?

    • @mikexcohen1
      @mikexcohen1  4 ปีที่แล้ว +1

      Good question. That's difficult to say because it depends on the characteristics of the data to some extent. But generally, a band of several Hz is probably a good range. For example, 6-8 Hz.

  • @jyanguas3251
    @jyanguas3251 2 ปีที่แล้ว

    Great video!
    I have a question. How do you get the time-frequency power plot with this Hilbert method? For the time, we have to apply the Hilbert transform to each segment, right? While, for the frequency, do we need to compute a filter in each step? to get the different frequency components
    Thank you!

    • @mikexcohen1
      @mikexcohen1  2 ปีที่แล้ว +1

      You first narrowband filter the data, then apply the Hilbert transform, then extract the power time series. That creates one row in the TF plot. Then repeat for however many frequencies you want.

    • @jyanguas3251
      @jyanguas3251 2 ปีที่แล้ว

      @@mikexcohen1 thats what I thought
      Thank you!

  • @babotvoj
    @babotvoj 3 ปีที่แล้ว

    why does the FIR hilbert filter has a sawtooth phase in frequency domain?

    • @mikexcohen1
      @mikexcohen1  3 ปีที่แล้ว

      Phase values are undefined when power is zero. In practice, on digital computers, the power spectrum isn't true zero, but some really tiny numbers due to rounding errors. So those phase values are not interpretable.

  • @matteldcar
    @matteldcar 4 ปีที่แล้ว

    Hi Mike, great to see a whole new series of videos out!
    I have a question regarding preprocessing, when one's purpose is to perform time-frequency analyses on a specific narrow frequency band, either based on power or phase. Would you say that it is better to skip the 'traditional' preprocessing filtering steps (hi-pass / low-pass / band-stop at 50 or 60Hz) and apply a narrow-band FIR filter alone on the raw signal correcting for phase-shifts? If not, what is the added value of applying the above mentioned filters during the stage of pre-processing?

    • @mikexcohen1
      @mikexcohen1  4 ปีที่แล้ว +2

      You don't need those extra filters for the time-frequency analysis, but those preprocessing steps will improve the ICA decomposition, which in turn will give you cleaner data. So it's still a good idea.

    • @matteldcar
      @matteldcar 4 ปีที่แล้ว

      Thanks for the reply, got it!

  • @zmlin
    @zmlin 4 ปีที่แล้ว

    Hi Mike, my bandwidth of interest is essentially all the major frequency bands (0.1-50hz). In terms of wavelet parameters, should I set my min_freq = 0.1 and max_freq = 50? or min_freq = 1 is enough?

    • @mikexcohen1
      @mikexcohen1  4 ปีที่แล้ว +1

      Hi Zhongmin. It sounds like an FIR filter might be a better option for you, considering the wide band. If you want to use wavelets, you'll need to have multiple wavelets spanning that range. Maybe 20 or 30 wavelets will suffice.

    • @zmlin
      @zmlin 4 ปีที่แล้ว

      @@mikexcohen1 Thanks Mike! I think I can FIR filter it in preprocessing (is 0.1-50hz ok or do I need more like 0.1-100hz?) to get better ICA results.
      And by the way, do you have any recommendations on doing TF decomposition on signals with long time duration? My task A take 40s and B takes 60s, and I am trying to compare them.

    • @mikexcohen1
      @mikexcohen1  4 ปีที่แล้ว +1

      Time-frequency decomposition is mainly useful if you expect temporal dynamics that are time-locked to some event. For really long time periods, it might be better to do something like Welch's method and compare the spectra. That's essentially equivalent to doing a time-frequency analysis and then averaging over all time points.

    • @zmlin
      @zmlin 4 ปีที่แล้ว

      @@mikexcohen1 Thank you!!

  • @rodrigo100kk
    @rodrigo100kk 3 ปีที่แล้ว

    Another way to see it is imagine that the negative amplitudes in the frequency domain are multiplied by -1 and then added to the positive amplitudes. So you actually double the signal.

  • @tengs_fan
    @tengs_fan 4 ปีที่แล้ว

    Clear Explanation

  • @chloeqin505
    @chloeqin505 3 ปีที่แล้ว

    Mr. Infinite impulse response.. lmao

    • @mikexcohen1
      @mikexcohen1  3 ปีที่แล้ว +1

      Yes, truly one of humanity's great geniuses ;)