help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filter raw EEG by frequency bands in time domain


From: Sergei Steshenko
Subject: Re: filter raw EEG by frequency bands in time domain
Date: Sun, 3 May 2020 20:38:29 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0


On 03/05/2020 19:01, ingber via Help-octave wrote:
Additional note (in reply to one person):


I have readhttps://www.mathworks.com/help/signal/ref/bandpass.html  , but
I'm not sure if this is the best way to proceed.

bandpass() seems able to deliver results without an additional step, e.g.,
not needing both fft and ifft.



-----
https://www.PhysicalStudiesInstitute.org
--
Sent from:https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


"bandpass() seems able to deliver results without an additional step, e.g., not needing both fft and ifft" - you have to decide what you really want.


If you are using a typical IIR filter, it's most likely a minimum phase system. This by itself is neither bad nor good, though quite often good - unless you want to compensate for linear distortions introduced by a non-minimum phase system.


With fft -> filter -> ifft approach you can have a filter with arbitrary magnitude response and arbitrary phase response. In a minimum phase system there is strict relation between magnitude and phase responses: https://en.wikipedia.org/wiki/Kramers%E2%80%93Kronig_relations -> https://en.wikipedia.org/wiki/Kramers%E2%80%93Kronig_relations#Magnitude_(gain)%E2%80%93phase_relation , https://en.wikipedia.org/wiki/Minimum_phase#Relationship_of_magnitude_response_to_phase_response .


So, with fft -> filter -> ifft approach you can easily test various filters - because you can arbitrarily assign both magnitude and phase responses. But you have to understand really well what you are doing, especially taking into account wrap around - read the https://dsp.stackexchange.com/questions/51427/how-to-get-around-the-circular-shift-property-of-discrete-fourier-transform thread. You can still use traditional filter - you simply measure its complex frequency response and multiply the signal spectrum by the measured frequency response, then perform ifft.


--Sergei.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]