Main Content

Transform lowpass analog filters to bandpass

`lp2bp`

transforms analog lowpass filter prototypes with a cutoff
angular frequency of 1 rad/s into bandpass filters with the desired bandwidth and center
frequency. The transformation is one step in the digital filter design process for the
`butter`

, `cheby1`

, `cheby2`

, and `ellip`

functions.

`lp2bp`

is a highly accurate state-space formulation of the classic
analog filter frequency transformation. Consider the state-space system

$$\begin{array}{l}\dot{x}=Ax+Bu\\ y=Cx+Du\end{array}$$

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

$$sX(s)=AX(s)+BU(s)$$

Now if a bandpass filter has center frequency ω_{0} and bandwidth
*B*_{w}, the standard
*s*-domain transformation is

$$s=Q({p}^{2}+1)/p$$

where *Q* =
ω_{0}/*B*_{w} 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

$$Q\ddot{x}+Qx=\dot{A}x+B\dot{u}$$

or

$$Q\ddot{x}-\dot{A}x-B\dot{u}=-Qx$$

Now define

$$Q\dot{\omega}=-Qx$$

which, when substituted, leads to

$$Q\dot{x}=Ax+Q\omega +Bu$$

The last two equations give equations of state. Write them in standard form and
multiply the differential equations by ω_{0} to recover the time or
frequency scaling represented by *p* and find state matrices for the
bandpass filter:

$$Q=\frac{{\omega}_{0}}{{B}_{w}}$$

$$At={\omega}_{0}\left[\frac{A\text{\hspace{0.17em}}}{Q}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{eye}(ma,m);-\mathrm{eye}(ma,m)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{zeros}(ma,m)\right]$$

$$Bt={\omega}_{0}\left[\frac{B}{Q};\mathrm{zeros}(ma,n)\right]$$

$$Ct=\left[C\text{\hspace{0.17em}}\mathrm{zeros}(mc,ma)\right]$$

$$Dt=D$$

where $$\left[ma,m\right]=\mathrm{size}(A)$$.

`lp2bp`

can perform the transformation on two different linear system
representations: transfer function form and state-space form. If the input to
`lp2bp`

is in transfer function form, the function transforms it
into state-space form before applying this algorithm.