Links

Filtering

Transform Analysis of LTI Systems

LTI filters are characterized by their impulse response. The two broad categories of LTI systems are those with finite impulse responses (FIR) and those with infinite impulse responses (IIR). LTI systems are frequently characterized by linear constant-coefficient difference equations which look as follows:
k=0Naky[nk]=k=0Mx[nk].\sum_{k=0}^{N}a_ky[n-k] = \sum_{k=0}^Mx[n-k].

Definition 13

The system function
H(z)H(z)
is the z-transform of the impulse response of the system. For LCCDE's, it is a ratio of polynomials in
z1z^{-1}
.
H(z)=k=0Mbizik=0Naizi=b0k=1M(1ckz1)a0k=1N(1dkz1)H(z) = \frac{\sum_{k=0}^Mb_iz^{-i}}{\sum_{k=0}^Na_iz^{-i}} = \frac{b_0\prod_{k=1}^M(1-c_kz^{-1})}{a_0\prod_{k=1}^N(1-d_kz^{-1})}
We call
ckc_k
(the roots of the numerator) the zerosof the system and
dkd_k
(the roots of the denominator) the polesof the system.

Definition 14

The Magnitude Response
H(ejω)|H(e^{j\omega})|
desribes how the system will scale a complex exponential.
H(ejω)=b0k=1M1ckejωa0k=1N1dkejω|H(e^{j\omega})| = \frac{|b_0|\prod_{k=1}^M|1-c_ke^{-j\omega}|}{|a_0|\prod_{k=1}^N|1-d_ke^{-j\omega}|}

Definition 15

The Phase Response
arg[H(ejω)]\arg[H(e^{j\omega})]
describes how the system will shift the phase of a complex exponential.
arg[H(ejω)]=arg[b0]+k=1Marg[1ckejω]arg[a0]k=1Narg[1dkejω]\arg[H(e^{j\omega})] = \arg[b_0]+\sum_{k=1}^{M}\arg[1-c_ke^{-j\omega}] - \arg[a_0] - \sum_{k=1}^{N}\arg[1-d_ke^{-j\omega}]

Definition 16

The Group Delay of the system
grd[H(ejω)]grd[H(e^{j\omega})]
tells us how much a complex exponential will be delayed.
grd[H(ejω)]=ddωarg[H(ejω)]=k=1Mgrd[1ckejω]k=1Ngrd[1dkejω]grd[H(e^{j\omega})] = -\frac{d}{d\omega}\arg[H(e^{j\omega})] = \sum_{k=1}^{M}grd[1-c_ke^{-j\omega}] - \sum_{k=1}^{N}grd[1-d_ke^{-j\omega}]
We can systematically analyze these by drawing a vector from
ejωe^{-j\omega}
to each
dkd_k
or
ckc_k
and analyze each one individually. For example, if we look at one pole in the magnitude response
1dkejω=ejωdk=vk.|1-d_ke^{-j\omega}| = |e^{j\omega}-d_k| = |v_k|.
In general, the effects of poles and zeros on each of these quantities is described by the following table.
Magnitude Response
Phase Response
Group Delay
Poles
Increase
Phase Lag
Increase
Zeros
Decrease
Phase Advance
Decrease
These effects are larger when
ckc_k
or
dkd_k
are close the unit circle (i.e
ck,dk1|c_k|, |d_k|\approx 1
).

All Pass Systems

Definition 17

All pass systems are those where
H(ejω)=k|H(e^{j\omega})| = k
where
kk
is some constant gain.
H(z)=kk=1Mrz1dk1dkz1k=1Mc(z1ek)(z1ek)(1ekz1)(1ekz1)H(z) = k\prod_{k=1}^{M_r}\frac{z^{-1}-d_k}{1-d_kz^{-1}}\prod_{k=1}^{M_c}\frac{(z^{-1}-e_k^\star)(z^{-1}-e_k)}{(1-e_kz^{-1})(1-e_k^\star z^{-1})}
Their Z-transform has the real poles
dkd_k
cancelled by real zeros, and complex poles
eke_k
cancelled by the conjugates
eke_k^\star
.

Theorem 5

If an All-Pass system is stable, then
grd[H(ejω)]>0    grd[H(e^{j\omega})] > 0 \implies
Causal and
arg[H(ejω)]0    \arg[H(e^{j\omega})] \le 0 \implies
Phase Lag.

Minimum Phase Systems

Definition 18

A stable and causal system
H(z)H(z)
whose inverse
1H(z)\frac{1}{H(z)}
is also stable and causal is called a Minimum Phase System.
What this means is that all poles are zeros must be inside the unit circle, and the region of convergence is right sided. Minimum phase systems are called minimum phase because of all
H(z)H(z)
with the same magnitude response, a minimum phase system has the minimum phase and the minimum group delay.

Theorem 6

Any stable and causual system can be decomposed into a minimum phase system and an all-pass system.
H(z)=Hmin(z)Hap(z)H(z) = H_{min}(z)H_{ap}(z)
This is useful because if a signal undergoes a distortion, we can at least undo the minimum phase part of it (since
HminH_{min}
has a guaranteed inverse).

Generalized Linear Phase Systems

Definition 19

A linear phase system is one with constant group delay.
H(ejω)=A(ejω)ejαω    grd[H(ejω)]=αH(e^{j\omega}) = A(e^{j\omega})e^{-j\alpha\omega} \implies grd[H(e^{j\omega})] = \alpha
Note that
A(ejω)A(e^{j\omega})
is a real function.

Definition 20

A generalized linear phase system has frequency response given by
H(ejω)=A(ejω)ejαω+β    grd[H(ejω)]=αH(e^{j\omega}) = A(e^{j\omega})e^{-j\alpha\omega + \beta} \implies grd[H(e^{j\omega})] = \alpha
If we limit ourselves to using FIR filters, then a GLP system must have either even or odd symmetry, meaning for some
MM
h[n]=h[Mn] or h[n]=h[Mn].h[n]=h[M-n] \text{ or } h[n] = -h[M-n].
This restricts us to 4 different filter types.
Symmetry
M
Filter Types
Notes
Type I
Even
Even
All
Type II
Even
Odd
Low Pass
H(ejπ)=0H(e^{j\pi})=0
Type III
Odd
Even
Bandpass
H(ej0)=H(ejπ)=0H(e^{j0})=H(e^{j\pi})=0
Type IV
Odd
Odd
High
H(ej0)=0H(e^{j0})=0
Because of their symmetry, FIR systems are limited in where their zeros.
Type I, II: H(z)=zMH(z1)Type III, IV: H(z)=zMH(z1)\textbf{Type I, II: }H(z) = z^{-M}H(z^{-1}) \qquad \textbf{Type III, IV: } H(z) = -z^{-M}H(z^{-1})
In other words, if
a=rejθa = re^{j\theta}
is a zero, then
1a\frac{1}{a^\star}
is too. We can decompose GLP systems into a minimum phase, maximum phase, and unit circle system.

Filter Design

The idea of filter design is to take a desired frequency response and design a filter which has that frequency response. Some frequency responses can only be described by IIR systems which are impractical for real applications, so we make various tradeoffs when we design FIR filters to implement in our systems. We also like our filters to be causal because it makes them usable in real-time systems.
A Mth order causal filter has
M+1M+1
coefficients.

Definition 21

The time-bandwidth product describes how sinc-like a filter looks like.
TBW=(M+1)ωcπTBW = (M+1)\frac{\omega_c}{\pi}
The TBW is also the number of zero-crossings in the impulse response (including the zeros crossings at the end of the filter). To generate a High Pass filter, we can design a Low-Pass filter and then modulate it
hhp[n]=(1)nhlp[n].h_{hp}[n] = (-1)^nh{lp}[n].
We can do the same for a bandpass filter
hbp[n]=2hlpcos(ω0n).h_{bp}[n] = 2h_{lp}cos(\omega_0 n).

Windowing Method

One way to generate a filter which matches a desired frequency response is through windowing.
  1. 1.
    Choose a desired frequency response (often non-causal and IIR)
  2. 2.
    Window the Impulse Response
  3. 3.
    Module to shift the impulse response to make it casual
The length of the window impacts the transition width (how long it takes to transition). A longer window means a smaller width. The window type will impact the ripples in the frequency response. The choice of of window and its sidelobes impact these magnitudes.

Optimal Filter Design

With optimal filter design, we set up constraints to find a
Hd(ejω)H_d(e^{j\omega})
which approximates
H(ejω)H(e^{j\omega})
based on our optimization requirements. In general, we have some regions
Wc[0,π]W_c\subseteq [0, \pi]
that we care about and other regions that we don’t care about. We can first design a noncausal filter
H(ejω)~\tilde{H(e^{j\omega})}
and then shift it to make it causal. We do this by sampling and discretizing the frequency response to
ωk=kπp\omega_k = k\frac{\pi}{p}
where
πω1...ωpπ-\pi \le \omega_1 \le ... \le \omega_p \le \pi
. We choose
PP
to be sufficiently big and make sure the
ωkωc\omega_k \in \omega_c
(the region we care about). In a least squares setup, we can solve
argminh~Ah~b2A=[ejω1(N)...ejω1(N)ejωp(N)...ejωp(N)]b=[H(ejω1)H(ejωp)]\text{argmin}_{\tilde{h}}||A\tilde{h}-b||^2 \qquad A = \left[ \begin{array}{ccc} e^{-j\omega_1(-N)} & ... & e^{-j\omega_1(N)}\\ \vdots & \ddots & \vdots\\ e^{-j\omega_p(-N)} & ... & e^{-j\omega_p(N)} \end{array} \right]\qquad \vec{b} = \left[ \begin{array}{c} H(e^{j\omega_1})\\ \vdots\\ H(e^{j\omega_p}) \end{array} \right]
Other possible optimizations are Weightest Least Squares or Chebyshev Design.
WLS: minππW(ω)H(ejω)Hd(ejω)2dω\textbf{WLS: }\min\int_{-\pi}^{\pi}W(\omega)|H(e^{j\omega}) - H_d(e^{j\omega})|^2d\omega
Chebyshev: minwWcmaxH(ejωHd(ejω)\textbf{Chebyshev: }\min_{w\in W_c} \max|H(e^{j\omega}-H_d(e^{j\omega})|
Another optimization technique is the min-max ripple design where we try and control the deviations of the filter from the desired response. We can set up a linear program to do this for us. For example, if we were designing a low pass filter, we could write the LP
minδ1δHd(ejωk)1+δ0ωkωcδHd(ejωk)δωcωkπδ>0\begin{aligned} \min \delta\\ 1-\delta \le H_d(e^{j\omega_k})\le 1+\delta &\qquad 0\le \omega_k \le \omega_c\\ -\delta \le H_d(e^{j\omega_k})\le \delta &\qquad \omega_c\le \omega_k \le \pi\\ \delta > 0\end{aligned}
Last modified 1yr ago