multirate signal processingece413/sections/section10.pdfmultirate signal processing discrete-time...
TRANSCRIPT
Multirate signal processing
Discrete-time systems with different sampling rates at variousparts of the system are called multirate systems.
The need for such systems arises in many applications, includingdigital audio, communication, image processing, and HDTV.
Conceptually, the process of sampling rate conversion consists oftwo steps: 1) reconstruction of a continuous-time signal, and 2)resampling at a different rate.
In practice, however, the conversion is implemented by means ofdiscrete-time signal processing.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 1/38
Downsampling by an integer factor
A sampling rate compressor or simply compressor is a systemsthat reduced the sampling rate of an input discrete-time signalby an integer factor of D.
The spectrum of the “sampled” discrete-time signal xD[m] isgiven by
XD(eΩTD ) =1
TD
∑l∈Z
Xc ((Ω− lΩD)) =
=1
DT
∑l∈Z
Xc
((
Ω− l 2π
DT
)),
where ΩD = 2π/TD = Ωs/D is the reduced sampling rate.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 2/38
Downsampling by an integer factor (cont.)
Expressing l = m+ kD, with m = 0, 1, . . . , D − 1, we obtain
XD(eΩTD ) =1
D
D−1∑m=0
[1
T
∑k∈Z
Xc
(
(Ω−m 2π
DT− k 2π
T
))︸ ︷︷ ︸
X(e(Ω−2πm/DT )T )
].
We note that the above observation is true since
1
T
∑k∈Z
Xc
(
(Ω− k 2π
T
))= X
(eΩT
).
Consequently, we obtain
XD(eΩTD ) =1
D
D−1∑m=0
X(e(Ω−mΩD)T
),
which relates directly the spectra of x[n] and xD[n].
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 3/38
Downsampling by an integer factor (cont.)
If we define the normalized frequency variable as
ω = ΩTD,
and note that ΩT = ΩTD/D = ω/D, we obtain
XD(eω) =1
D
D−1∑m=0
X(e(ω−2πm)/D
)Hence, the process of computing XD(eω) directly from X(eω)consists of:
1 Stretching X(eω) by a factor of D to obtain X(eω/D);
2 Placing D copies of X(eω/D) at the frequencies ω = 2πm, wherem = 0, 1, . . . , D − 1;
3 Adding the D stretched and shifted replicas and then dividing theresult by D to obtain XD(eω).
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 4/38
Example: D = 3
In the case of downsampling by a factor of D = 3, we have
XD(eω) =1
3
[X(eω/3) +X(e(ω/3+2π/3)) +X(e(ω/3+4π/3))
].
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 5/38
Sampling rate conversion
To establish a closer analogy between CT and DT sampling, wedefine the discrete-time sampling rate as
fs = 1/D or ωs = 2π/D,
which simply means “keep one out of every D samples.”
Then, to avoid aliasing, we should have the following conditions
If X(eω) = 0, ωH ≤ ω ≤ π then ωs =2π
D≥ 2ωH .
If the above condition is not satisfied, we will have aliasing dis-tortion.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 6/38
Sampling rate conversion (cont.)
To avoid aliasing distortion we precede the downsampling by alowpass filter with cutoff frequency ωc = π/D.
The combined system is called a decimator and the correspondingprocess is known as decimation.
If we use an FIR lowpass filter of order M , the output of the de-cimator is given by
xD[m] = v[mD] =
M∑k=0
h[k]x[mD − k].
How is it different from convolution?Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 7/38
Example: D = 2
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 8/38
Back reconstruction
In the absence of aliasing, xc(t) can be recovered from xD[m]according to
xc(t) =∑m∈Z
xD[m]sin [π(t−mDT )/DT ]
π(t−mDT )/DT.
Evaluating xc(t) at t = nT results in
x[n] =∑m∈Z
xD[m]sin [π(n−mD)/D]
π(n−mD)/D,
which provides perfect reconstruction of x[n] directly from xD[m].
Clearly, the ideal discrete-time interpolator is not practically rea-lizable, which necessitates the use of approximations.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 9/38
Upsampling by an integer factor
Increasing the sampling rate of x[n] by an integer factor I requi-res the insertion of (I − 1) samples between consecutive samplesof x[n].
Thus, upsampling is an information preserving operation.
The interpolated signal xI [n] can be obtained using the formula
xI [n] =∑m∈Z
x[m]sin [π(n−mI)/I]
π(n−mI)/I,
which is a special case of a more general interpolation formula
xI [n] =∑m∈Z
x[m]gr[n−mI],
where gr[n] is an interpolating filter (aka “interpolator”).
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 10/38
Upsampling by an integer factor (cont.)
In the domain of DTFT, xI [n] =∑m∈Z x[m]gr[n−mI] becomes
XI(eω) = Gr(e
ω)X(eωI),
where X(eωI) is the DTFT of sequence xu[n] obtained by inser-ting (I − 1) zeros between consecutive samples of x[n], that is, by
xu[n] =
x[n/I], n is a multiple of I,
0, otherwise,
with Xu(eω) = X(eωI).
The above system is called upsampler or sampling rate expander.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 11/38
Upsampling by an integer factor (cont.)
Thus, the interpolation can be alternatively implemented as
XI(eω) = Gr(e
ω)Xu(eω),
which corresponds to an LTI system described by
xI [n] =∑m∈Z
xu[m]gr[n−m].
Schematically, we have
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 12/38
Example: I = 3
In practice, the ideal interpolators are replaced by their realizable ap-proximations.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 13/38
Example: Linear interpolation
Due to its computational efficiency, linear interpolation has longbeen a “default” choice of many multirate systems.
Let m and n = mI + k (with k = 0, 1, . . . , I − 1) be a slow and afast time index, respectively.
Then, linear interpolation is defined as
xI [(m− 1)I + k] = x[m− 1] + (x[m]− x[m− 1]) (k/I),
for k = 0, 1, . . . , I − 1.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 14/38
Example: Linear interpolation (cont.)
It is easy to verify that, in this case, xI [n] is obtained by convol-ving xu[n] with the triangular interpolator
glin[n] =
1− |n|/I, −I < n < I,
0, otherwise.
The frequency response of the linear interpolation filter is givenby
Glin(eω) =1
I
[sin(ωI/2)
ω/2
]2
.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 15/38
Example: Linear interpolation (cont.)
Despite the limited ability of linear interpolation to cope withaliasing, its performance is often deemed satisfactory.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 16/38
Sampling rate change by a rational factor
Interpolation and decimation can be combined to change thesampling rate by a rational factor I/D.
Let’s consider the cascade connection of an interpolator and adecimator.
The effective sampling rate of the output signal is T0 = TD/I.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 17/38
Sampling rate change by a rational factor (cont.)
Since the interpolation and decimation filters are in cascade andoperate at the same sampling rate, they can be replaced by a sin-gle lowpass filter
H(eω) =
I, 0 ≤ |ω| ≤ ωc0, ωc ≤ |ω| ≤ π
where ωc = minπI,π
D
.
When I > D (sampling rate increase), H(eω) acts as a postfilterto remove the replicas introduced by the upsampling operation.
When I < D (sampling rate decrease), H(eω) acts as an antialia-sing filter for the downsampling operation.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 18/38
Half-band FIR filters
Decimation and interpolation by a factor of two require lowpassfilters with ωc = π/2, that is, ideal half-band filters.
The impulse response of this filter is given by
h[n] =ωcπ
sin(ωcn)
ωcn=
1/2, n = 0,
0, n = ±2,±4, . . . ,
where, for simplicity, we assumed a zero-phase response.
In general, any filter with h[n] = h[−n] that satisfies h[n] = 0, forn = ±2,±4, . . ., and h[0] = 1/2 is called a half-band filter.
Such filters can be shown to satisfy
H(z) +H(−z) = 1,
or, on the unit circle,
H(eω) +H(e(ω−π)) = 1.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 19/38
Half-band FIR filters (cont.)
H(eω) can be shown to have odd symmetric about ω = ±π/2.
As a result, we have δp = δs and ωp = π − ωs.Moreover, M/2 must be an odd number.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 20/38
Equiripple half-band filter design
1 Given the specifications ωs, Ap, and As of the half-band filter,compute
δ = minδs, δp, ωp = π − ωs.
2 Design a single band Type II FIR filter G(z) of order M/2 (odd)with ωp = 2ωp, ωs = π, and δ = 2δ using minimax optimization(i.e., equiripple design). Note that since G is Type II, G(eπ) = 0.
3 Scale the impulse response g[n] by 1/2, upsample the result by afactor of 2, and set the middle coefficient to 1/2.
4 The result is an impulse response h[n] with system function H(z)given by
H(z) =1
2
[z−M/2 +G(z2)
],
which is a half-band filter with passband cutoff frequency ωp.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 21/38
Filter banks
A filter bank is a collection of filters with a common input or acommon output.
The analysis filter bank splits x[n] into K sub-band signals vk[n],using the analysis filters Hk(z).
The synthesis filter bank consists of K synthesis filters Gk(z) thatcombine K signals sk[n] into a signal y[n].
If sk[n] = vk[n], for all k, we would like to have y[n] = x[n].
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 22/38
Two-channel filter banks
Maximally decimated two-channel filter banks use K = 2.
In this case, y[n] can be shown to be given by
Y (z) =1
2[T (z)X(z) +A(z)X(−z)] ,
where
T (z) = H0(z)G0(z) +H1(z)G1(z),
A(z) = H0(−z)G0(z) +H1(−z)G1(z).
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 23/38
Two-channel filter banks (cont.)
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 24/38
Two-channel filter banks (cont.)
The system function A(z) (between X(−z) and Y (z)) causesaliasing.
The system function T (z) (between X(z) and Y (z)) may causemagnitude and phase distortion.
That the alias-free filter bank is obtained by enforcing A(z) = 0,in which case we obtain an LTI system with a transfer functionT (z)/2.
In fact, the filters G0(z) (lowpass) and G1(z) (highpass) are de-signed to eliminate the aliasing term.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 25/38
Perfect reconstruction
Perfect reconstruction is possible if and only if
A(z) = H0(−z)G0(z) +H1(−z)G1(z) = 0,
T (z) = H0(z)G0(z) +H1(z)G1(z) = 2z−nD ,
where nD is an arbitrary integer delay.
The condition can also be written as[H0(z) H1(z)H0(−z) H1(−z)
] [G0(z)G1(z)
]=
[2z−nD
0
].
Given H0(z) & H1(z), the above system can be solved for G0(z)& G1(z) as long as
∆m(z) = H0(z)H1(−z)−H0(−z)H1(z) 6= 0.
The resulting synthesis filters guarantee cancellation of aliasingerror for any choice of analysis filters.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 26/38
Perfect reconstruction (cont.)
In particular, defining
G0(z) = 2z−nDH1(−z)∆m(z)
and G1(z) = −2z−nDH0(−z)∆m(z)
,
the condition for perfect reconstruction becomes
R(z) +R(−z) = 2
where R(z) is a product filter defined as R(z) = znDH0(z)G0(z).
The product filter R(z) plays a crucial role in analyzing and de-signing filter banks.
It can be shown that R(z) has the form of
R(z) = 1 + z−1R1(z2),
and, therefore, it must be a half-band filter.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 27/38
Perfect reconstruction (cont.)
Thus, to design a two-channel perfect reconstruction filter bank,it is necessary and sufficient to
1 obtain an R(z) = 1 + z−1R1(z2),
2 perform the factorization R(z) = znDH0(z)G0(z),
3 assign the synthesis filters G0(z) and G1(z).
The choice of R(z) and the particular factorization determine theproperties of the filter bank.
Choosing R(z) = H(z)H(z−1) requires the design of a single fil-ter and leads to orthogonal or para-unitary filter banks.
Choosing R(z) = H0(z)G0(z) requires the design of two filtersand leads to the more general bi-orthogonal filter banks.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 28/38
Orthogonal FIR filter banks
If H0(z) and H1(z) are FIR filters and ∆m(z) = c0z−n0 , then the
synthesis filters G0(z) and G1(z) will be FIR as well.
For example, given an M th-order FIR filter H(z), one can define
H0(z) = H(z) and H1(z) = −z−MH(−z−1),
which are called conjugate quadrature filters (CQFs).
To ensure that the synthesis filters are also FIR we require that
H(z)H(z−1) +H(−z)H(−z−1) = 1,
or, alternatively,
|H(eω)|2 + |H(e(ω−π))|2 = 1,
since H(z) has real coefficients (implying H(e−ω) = H∗(eω)).
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 29/38
Orthogonal FIR filter banks (cont.)
In this case, ∆m(z) = z−M (suggesting c0 = 1 and n0 = M).
If we also choose nD = M , the synthesis filters are given by
G0(z) = 2H1(−z) = −2z−MH(−z−1),
G1(z) = −2H0(−z) = −2H(−z).
We note that the product filter is given by
R(z) = znDH0(z)G0(z) = 2H(z)H(z−1),
in which case
R(z) +R(−z) = 2H(z)H(z−1) + 2H(−z)H(−z−1) = 2.
Thus, the proposed filter bank has the perfect reconstruction pro-perty.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 30/38
Orthogonal FIR filter banks (cont.)
When the solution of the spectral factorization problem R(z) == znDH0(z)G0(z) = 2H(z)H(z−1) exists?
It is straightforward to show that H(z) satisfying H(z)H(z−1)++H(−z)H(−z−1) = 1 exists if R(eω) ≥ 0.
Moreover, since R(z) is a half-band filter, we have∑k
h[k]h[n+ k] = δ[n]
assuming that h[n] is normalized so that ‖h‖2 = 1.
The above condition suggests that h[n] is orthogonal to its owneven translates (with the exception of n = 0), thus leading to thename orthogonal filter banks.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 31/38
Design of a perfect reconstruction CQF bank
1 Design a lowpass zero-phase half-band FIR filter R0(z) of order2M , where M is an odd integer.
2 If δmin = minω R0(eω) < 0, replace R0(eω) by
R+(eω) = R0(eω) + |δmin|,
or, alternatively, replace r[n] by
r+[n] = r0[n] + |δmin|δ[n].
3 Scale R+(z) so that R+(eπ/2) = 1/2, viz.
R(z) =1
1 + 2|δmin|R+(z).
4 Determine the minimum-phase filter H(z) by solving the spectralfactorization problem R(z) = H(z)H(z−1).
5 Specify the remaining filters of the bank.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 32/38
Example
First, we design an FIR prototype H(z) of order 2M = 14 using[r0,deltamin]=firpm(14,[0 0.425 0.575 1],[1 1 0 0],[1
1]). Note that, in this case, deltamin is negative.
We can also obtain various mixed-phase filters. Yet, no linear-phase filter is possible.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 33/38
Example (cont.)
The figure below shows the magnitude responses of the originalhalf-band filter R0(z) and the conjugate quadrature filters H0(z)and H1(z).
Note that R0(z) and H0(z) have the same stopband edge freq-uency, but different stopband attenuations.
Rule of thumb: to obtain H0(z) with As dB, one should startwith R0(z) having stopband attenuation larger than (2As + 6)dB.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 34/38
Tree-structured filter banks
Two-channel filter banks can be used to split a signal into mul-tiple sub-bands.
A simple way to design the required filters is by cascading two-channel filter banks.
The above is the uniform-band tree structure.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 35/38
Tree-structured filter banks (cont.)
Alternatively, we can use the octave-band tree structure.
The octave-band tree structure provides a logarithmic decompo-sition of the spectrum, very useful in coding.
This filter bank produces a multiresolution decomposition of x[n],which is closely related to the discrete wavelet transform.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 36/38
Example
In many real-life applications, the sub-band signals x1[n], x01[n],x001[n], ... tend to be sparse (i.e., dominated by small values).
It means that the energy of x[n] is encoded in a relatively smallnumber of relatively large values of its details (i.e., x1[n], x01[n],x001[n], ...).
Thus, retaining these large values while setting the rest to zerowill not have any significant impact on x[n] after reconstruction.
As the small-amplitude details are mainly associated with noisesand inessential features, the procedure of thresholding has foundnumerous applications in such areas as
1 signal compression and coding,
2 signal enhancement (de-noising),
3 signal modelling and representation,
4 pattern recognition and machine learning.
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 37/38
Example: Image de-noising
Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 10 38/38