Clear Filters
Clear Filters

How to filter my noisy square wave so that i can recover my signal using the Chebyshev Filter

7 views (last 30 days)
I have a noisy square signal as input but it has a lot of noise. I should use a Bandpass filter to recover my signal.
I know that the Chebyshev Filter is a bandpass filter; but it doesn't work. the data is still noisy after filtering.
Chebyshev Filter: The Chebyshev filter gives a sharper cutoff than a Butterworth filter in the pass band. A disadvantage of the Chebyshev filter is the exterior of gain minima and maxima below the cutoff frequency. Due to the ripples in the pass-band, it is not used in the audio systems. Though it is far better in some applications where there is only one frequency available in the pass band, but numerous other frequencies are required to eliminate.
%I use A picoscope2000 serie for data acquisition. (MATLAB)
ps2000_getdata;
%The data is saved a cha_a (MATLAB)
cha_a = (bufferChA/1000);
% Here i use the Butterworth bandpass filter to filter the noisy data(MATLAB)
[A,B,C,D] = cheby2(10,40,[900 1100]/1500);
d = designfilt('bandpassiir','FilterOrder',20, ...
'StopbandFrequency1',900,'StopbandFrequency2',1100, ...
'StopbandAttenuation',40,'SampleRate',8000);
y= filter(d,cha_a); % convolution
sos = ss2sos(A,B,C,D);
fvt = fvtool(d,y,'Fs',8000);
legend(fvt,'cheby2','designfilt')
This is the result of the magnitude response :
magnituderesponse.png
And this is the impulse response :
impulseresponse.png
My input data is suppose to be a squared data. And when you look at the impulse response of the output, it does not look like the impulse response of a square signal. There is stil noise. How can i adjust my filter ? Or did i used the filter well ?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!