Hi, I am new to signal processing and matlab and I would appreciate your help.. I want to use a bandpass filter to filter my data between the frequencies of 5Hz and 30Hz. My sampling rate is 250Hz and I assumed passband ripple and stopband attenuation 3 and 40dB respectively. What I have been doing so far is:
[n,Wn] = buttord(Wp,Ws,Rp,Rs);[z,p,k] = butter(n,Wn,'bandpass');[sos,g] = zp2sos(z,p,k);filteredSignal_butter = filtfilt(sos,g,unfilteredSignal);
I tried the same with Cheby1,2 and elliptic filters. My problem is that: a.the filtfilt is supposed to zero-phase digital filtering while I see something different than a horizontal line in the phase response (filter visualisation tool), b. I don't know how to assess which of the filters used provide the best filtering of my data. I can see the obvious differences in the final form of the waveform but when the form of the signal is similar but just the magnitudes change then how do I chose? and c. with what criteria (practically) do we choose the ideal passband ripple and stopband attenuation?
Best Answer