5 l lEC533: Digital Signal Processing
Lecture 7Realization of Discrete-Time
SystemsSystems
7.1 – Discrete-Time System Components
1) Unit DelayTX(n) y(n)= x(n-1)T
Y(z)= z-1 X(z)
2) AdderX1(z)X2(z)
3) M lti li
Xn(z)
3) Multiplier
XX(z)
k
Y(z)= k X(z)
N.B. Delay in the time domain by k-periods corresponds to multiplication by z-k.X
7.2 – Discrete System Networks
FIR Network T TX(z)z-1 X(z) z-2 X(z)
X XXa0 a1 a2
IIR Network Y(z)
X(z)Y(z)
T-1 Y( )
- m
Xz-1 Y(z)
‐ ve Feedback
Find the transfer function for the following IIR Network
ExampleFind the transfer function for the following IIR Network
XX(z) Y(z)
a0
TXX
a1- b1
TX
X
X- b2
X1
2
From 1 & 2
7.3 – Realization of Discrete Systems
• We will study the following realization topologies:
1) Direct Form I (for FIR & IIR).(named as transversal for FIR)( f )
2) Direct Form II – Canonical Form. (for IIR).3) Cascaded Realization (IIR).4) Parallel Realization (IIR).
7.3.1.a - FIR Direct or Transversal form
1( )x(n-1) x(n-2)
z -1
x
z -1
x
z -1
x x
x(n)
h0 h1 hN-1 hN
x(n 1) x(n 2)
+
y(n)
7.3.1.b - IIR Direct Form I
FeedforwardFeedback
iM
ii zbzD −
=∑=′
1)(
x(n) y(n)
7.3.1.b - Direct Form I – cont.a0
XT
0
Xx(n)
a1 - b1
y(n)
TXX
XT
T
a2 - b2 T
T
X
X
XT a3
TX
- b3
- b1
y(n)
TT
a0
Xx(n)
a1 b1
- b2
T
TX
X
X
X
T
T
a1
a2
TX
X- b3
X
XT a3
7.3.2 – IIR Direct Form II (Canonical Form)
T
a0
Xx(n)
b
y(n)
TX
T
T
a1
a2
- b1
- b2
T
TX
X
XT a3
TX
X- b3
a0
Xx(n)
a1- b1
y(n)
TX
X
a1
a2
b1
- b2
T
TX
X No of Delays= Order of the X
Xa3
TX
X- b3
ySystem.
Less than the previous method
7.3.3 – Cascaded Realization
• The transfer function is decomposed into cascaded combination of second order or first order z-transforms.second order or first order z transforms.
where is either a 2nd or a 1st order section.
2nd d2nd order
1st order
x(n) y(n)
7.3.4 – Parallel Realization
• The transfer function is decomposed into parallel combination of second order or first order z-transforms.f f
Xx(n) y(n)
Example
Parallel
Cascaded
• For high order filters, cascaded or parallel realization is mainly used because large errors is caused by direct realization due to the accumulation of truncation errors. But in cascaded & parallel, the coefficients are more integer, & mathematical p , ff g ,operations are small so truncation error decreases.
• Truncation error arises due to the specific number of bits ll t d t th d i l t ti f th d i l iallocated to the decimal notation so some of the decimals is
truncated.
7.4 – Digital Filters
• A digital filters is a mathematical algorithm, implemented in hardware and/or software that operates on a digital input signal tohardware and/or software, that operates on a digital input signal to produce a digital output signal for achieving a filtering objective.
• Digital filters are systems, but not all systems are filters.
MUXDSP
System/FiltersDMUX
So as the filter may be used for more than one signal at the same time
7.4.1 – Advantages & Disadvantages of Digital Filtersg
• Advantages of Digital Filters1) No impedance matching problem.2) Size is small, made from IC’s.3) Programmable if made software3) Programmable if made software.4) Can achieve linear phase; No phase distortion.
5) One digital filter can be used for several inputs at the same time.
• Disadvantages of Digital Filters1) E i1) Expensive.2) Harder to design.3) Quantization noise is present.
7.4.2 – Types of Digital Filters
Finite Impulse Response (FIR)open loop systemNon-recursive.
Infinite Impulse Response (IIR)closed loop system (Feedback).Recursive (Depends on previous O/p).
(N-1) is the filter order.ak’s are the filter coefficients.
(N) is the filter order.ak , bk’s are the filter coefficients.ak s are the filter coefficients.
Only zeros are available. ak , bk s are the filter coefficients.Poles & zeros are available.
7.4.3 – Choosing between FIR & IIR Filters
1) FIR filter can have exactly linear phase response, while that of IIR filter is nonlinear. (needed in some applications like digital audio).
2) FIR filters are always stable (have zeros only), while IIR filters are not guaranteed.
3) Finite word length effects are much less severe in FIR than IIR.) g ff4) FIR requires more coefficients for sharp cut-off filters than IIR. more
processing time, storage will be needed.5) Analogue filters can be readily transformed into equivalent IIR digital filters5) Analogue filters can be readily transformed into equivalent IIR digital filters
meeting similar specifications. This is not possible with FIR, as they have no analogue counterpart.
6) FIR is algebraically more difficult to synthesize if CAD tool is not available6) FIR is algebraically more difficult to synthesize, if CAD tool is not available.
Use IIR if sharp cut‐off filters is needed.So
Use FIR if no of coefficients is not too large & if no phase distortion is required
7.4.4 – Design Steps of Digital FiltersStart
Performance Specification
y
Approximation
• Type of the filter.• Amplitude & phase responses (performance we are willing to accept).
Filter Coefficients Calculation
ulate
Resepcify
g p )• Sampling Frequency.• Wordlength of the I/p data
Realization Structure
Error Error Analysi Yes Re
structure
Recalcu
sAnalysi
s
Hardware &/or Software
No Due to finite wordlengtheffectHardware &/or Software
Implementation
TestingTesting
End
7.5 - Digital Filter Specification
• Digital Filter designed to pass signal components of certain g g p g p ffrequencies without distortion.
• The frequency response should be equal to the signal’s frequencies to pass the signal. (passband)
• The frequency response should be equal to zero to block the signal. (stopband)
7.5 - Digital Filter Specification – cont.
• The main four Filter Types:
7.5 - Digital Filter Specification – cont.
• The magnitude response specifications are given some acceptable tolerances.
)H(e jw
7.5 - Digital Filter Specification – cont.
• Transition band is specified between the passband and the b d h d d ff hlstopband to permit the magnitude to drop off smoothly.
• In Passband
• In Stopband
ppj
p foreH ωωδδ ω ≤+≤≤− ,1)(1
• In Stopband
πωωδω ≤≤≤ ssj foreH ,)(
• Where δp and δs are peak ripple values, ωp are passband edge frequency and ωs are stopband edge p g f q y s p gfrequency
7.5 - Digital Filter Specification – cont.
• Digital filter specification are often given in terms of loss g f p f f g ffunction,
A(ω) = -20 log10 |H(ejω)|• Loss specification of a digital filter
– Peak passband ripple, Ap = 20 log10 (1 + δp) dBMi i t b d tt ti A 20 l (δ ) dB– Minimum stopband attenuation, As = -20 log10 (δs) dB
• The magnitude response specifications may be given in a
7.5 - Digital Filter Specification – cont.• The magnitude response specifications may be given in a
normalized form. )H(e jw
pδ
Passband ripple parameter
sδ
•Assume peak passband gain = 1
then the passband ripple (Ap)= pδεε
−−=+=+
− 1log201log101
1log20 2
2ε+1•Assume Peak passband gain is A larger than peak stopband gain
Hence, minimum stopband attenuation(As)= Alog20 )log(20 sδ−=