butterworth band pass filter
이전 댓글 표시
can you tell me how to apply a butterworth bandwith filter which only allows frequency of 0.5-25hz where sampling frequency is 1000 samples per second to a signal .
답변 (1개)
Star Strider
2020년 5월 13일
Try this:
Fs = 1000; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency (Hz)
Wp = [1 25]/Fn; % Normalised Passband (Passband = 1 Hz To 25 Hz)
Ws = [0.5 35]/Fn; % Normalised Stopband (Passband = ½ Hz To 35 Hz)
Rp = 1; % Passband Ripple/Attenuation
Rs = 60; % Stopband Ripple/Attenuation
[n,Wn] = buttord(Wp, Ws, Rp, Rs); % Calculate Filter Optimum Order
[z,p,k] = butter(n, Wn,'bandpass'); % Create Filter
[sos,g] = zp2sos(z,p,k); % Second-Order-Section For Stability
figure
freqz(sos, 2^26, Fs)
That is a (reasonably) complete way to design filters using the individual function syntax.
댓글 수: 4
Udit Narayan
2020년 5월 14일
Star Strider
2020년 5월 14일
Udit Narayan
2020년 5월 14일
편집: Udit Narayan
2020년 5월 14일
Star Strider
2020년 5월 14일
Yes.
Use ‘sos’ and ‘g’ as:
y_filt = filtfilt(sos, g, y);
.
카테고리
도움말 센터 및 File Exchange에서 Digital Filter Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!