08-16-2016 07:35 AM
I tried implementing zero phase filter for filtering noisy EEG signals.
It is behaving like a bandstop filter when tried bandpass mode.
but bandstop, HPF, LPF are working properly.
I tried cascading of ZPHPF & ZPLPF but it also didn't work.
What would be the problem with my VI?
08-16-2016 02:17 PM
It appears that the typecast function in Zero Phase Filter.vi is sending the wrong information to Butterworth Coefficients.vi. I placed U32 numeric indicators on the Type output of the Unbundle and on the output of the typecast.
Type Unbundle Typecast out
Lowpass 0 0
Highpass 1 3
Bandpass 2 3
Bandstop 4 3
That may not be the only problem however. When I bypassed the typecast, I still get NaN outputs for both bandpass and bandstop filters.
Why are you sampling at 500 kHz and then resampling to a much slower rate? When I apply the same filter specifications to the raw data, I get the results shown below.
This was using Digital IIR Filter.vi from the Waveform Conditioning palette (LV2015). I am not sure whether the filter VIs have changed since LV 2011.
Why are you worried about a zero phase filter? The spectrum of the raw signal appears to be essentially random.
Lynn
08-17-2016 10:32 AM - edited 08-17-2016 10:36 AM
Numeric filter don't like to have a 500kHz Samplerate and a filtersetting of 1Hz to 45Hz.
Think of a 1Hz sine sampled at 500kHz and a 4th order filter. the coefficients will scrap at the lower end of the numerical resolution .... add noise and the filter is quickly lost 😄
Decimate (with filter) to 500Hz samplrate and try again 😉
Another way to compensate the filter phase of finite samples is to filter twice with reversed data.
data -> filter -> reverse data -> filter - reverse data
08-29-2016 07:29 AM
Hi Lynn & Henrik,
I got a problem in calcualation of percentatge of similarity between two EEG signals which are acquired by diffent type of electrodes by using correlation technique. I tried avearaging the data 500Khz at 1000 samples also.
I believe that i am not getting the correct value of percentage.
I am auto correlating the referance signal and maximum of autocorrelation was found out.
similarly i am crosscorrelating the referance signal with test signal and finding out the maximum.
from those two vaues i am tryoing to find out percentage of similarity.., is it correct aproach??
Please lookinto the attached VI.