Butterworth bandpassfilter transfer function

5 views (last 30 days)
Hi,
I have second order butterworth bandpassfilter with central frequency 800Hz. Damping ratio is 0.707. Sampling frequency 20k. How can derive continuous time transfer function and discreate transfer function from it in Matlab?
  3 Comments
Janne Hamalainen
Janne Hamalainen on 3 Dec 2020
Hi,
Sorry can you specify, how to generate the discreate fcn?
Mathieu NOE
Mathieu NOE on 3 Dec 2020
everything is explained in the help :
help butter
butter Butterworth digital and analog filter design.
[B,A] = butter(N,Wn) designs an Nth order lowpass digital
Butterworth filter and returns the filter coefficients in length
N+1 vectors B (numerator) and A (denominator). The coefficients
are listed in descending powers of z. The cutoff frequency
Wn must be 0.0 < Wn < 1.0, with 1.0 corresponding to
half the sample rate.
If Wn is a two-element vector, Wn = [W1 W2], butter returns an
order 2N bandpass filter with passband W1 < W < W2.
[B,A] = butter(N,Wn,'high') designs a highpass filter.
[B,A] = butter(N,Wn,'low') designs a lowpass filter.
[B,A] = butter(N,Wn,'stop') is a bandstop filter if Wn = [W1 W2].
When used with three left-hand arguments, as in
[Z,P,K] = butter(...), the zeros and poles are returned in
length N column vectors Z and P, and the gain in scalar K.
When used with four left-hand arguments, as in
[A,B,C,D] = butter(...), state-space matrices are returned.
butter(N,Wn,'s'), butter(N,Wn,'high','s') and butter(N,Wn,'stop','s')
design analog Butterworth filters. In this case, Wn is in [rad/s]
and it can be greater than 1.0.
% Example 1:
% For data sampled at 1000 Hz, design a 9th-order highpass
% Butterworth filter with cutoff frequency of 300Hz.
Wn = 300/500; % Normalized cutoff frequency
[z,p,k] = butter(9,Wn,'high'); % Butterworth filter
[sos] = zp2sos(z,p,k); % Convert to SOS form
h = fvtool(sos); % Plot magnitude response
% Example 2:
% Design a 4th-order butterworth band-pass filter which passes
% frequencies between 0.15 and 0.3.
[b,a]=butter(2,[.15,.3]); % Bandpass digital filter design
h = fvtool(b,a); % Visualize filter
See also buttord, besself, cheby1, cheby2, ellip, freqz,
filter, designfilt.
Documentation for butter

Sign in to comment.

Answers (0)

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!