Transform lowpass analog filters to bandpass
[bt,at] = lp2bp(b,a,Wo,Bw)
[At,Bt,Ct,Dt] = lp2bp(A,B,C,D,Wo,Bw)
lp2bp transforms analog lowpass filter prototypes with a cutoff angular frequency of 1 rad/s into bandpass filters with desired bandwidth and center frequency. The transformation is one step in the digital filter design process for the butter, cheby1, cheby2, and ellip functions.
[bt,at] = lp2bp(b,a,Wo,Bw) transforms an analog lowpass filter prototype given by polynomial coefficients into a bandpass filter with center frequency Wo and bandwidth Bw. Row vectors b and a specify the coefficients of the numerator and denominator of the prototype in descending powers of s.
Scalars Wo and Bw specify the center frequency and bandwidth in units of rad/s. For a filter with lower band edge w1 and upper band edge w2, use Wo = sqrt(w1*w2) and Bw = w2-w1.
lp2bp returns the frequency transformed filter in row vectors bt and at.
into a bandpass filter with center frequency Wo and bandwidth Bw. For a filter with lower band edge w1 and upper band edge w2, use Wo = sqrt(w1*w2) and Bw = w2-w1.
The bandpass filter is returned in matrices At, Bt, Ct, Dt.
lp2bp is a highly accurate state-space formulation of the classic analog filter frequency transformation. Consider the state-space system
where u is the input, x is the state vector, and y is the output. The Laplace transform of the first equation (assuming zero initial conditions) is
Now if a bandpass filter is to have center frequency ω0 and bandwidth Bw, the standard s-domain transformation is
where Q = ω0/Bw and p = s/ω0. Substituting this for s in the Laplace transformed state-space equation, and considering the operator p as d/dt results in
which, when substituted, leads to
The last two equations give equations of state. Write them in standard form and multiply the differential equations by ω0 to recover the time/frequency scaling represented by p and find state matrices for the bandpass filter:
Q = Wo/Bw; [ma,m] = size(A); At = Wo*[A/Q eye(ma,m);-eye(ma,m) zeros(ma,m)]; Bt = Wo*[B/Q; zeros(ma,n)]; Ct = [C zeros(mc,ma)]; Dt = d;
If the input to lp2bp is in transfer function form, the function transforms it into state-space form before applying this algorithm.