Chapter 6
Transfer function and Digital Filter
Realization
Nguyen Thanh Tuan, Click
[Link].
to edit Master subtitle style
Department of Telecommunications (113B3) Nguyen Khanh Loi, [Link].
Ho Chi Minh City University of Technologynkloi@[Link]
Email: nttbk97@[Link]
Content
1. Transfer functions
q Impulse response
q Difference equation
q Frequency response
q Block diagram of realization
2. Digital filter realization
q Direct form
q Canonical form
q Cascade form
Digital Signal Processing 2 Transfer function
and Digital Filter Realization
1. Transfer functions
v With the aid of z-transforms, we can describe the FIR and IIR filters
in several mathematically equivalent way
Digital Signal Processing 3 Transfer function
and Digital Filter Realization
Impulse response
v Taking the inverse z-transform of H(z) yields the impulse response
h(n)
Example: consider the transfer function
To obtain the impulse response, we use partial fraction expansion to
write
Assuming the filter is causal, we find
Digital Signal Processing 4 Transfer function
and Digital Filter Realization
Difference equation for impulse response
v The standard approach is to eliminate the denominator polynomial
of H(z) and then transfer back to the time domain.
Example: consider the transfer function
Multiplying both sides by denominator, we find
Taking inverse z-transform of both sides and using the linearity and
delay properties, we obtain the difference equation for h(n):
Digital Signal Processing 5 Transfer function
and Digital Filter Realization
I/O difference equation
v Write then eliminate the denominators and go back
to the time domain.
Example: consider the transfer function
We have
which can write
Taking the inverse z-transforms of both sides, we have
Thus, the I/O difference equation is
Digital Signal Processing 6 Transfer function
and Digital Filter Realization
Block diagram
v One the I/O difference equation is determined, one can mechanize it
by block diagram
Example: consider the transfer function
We have the I/O difference equation
The direct form realization is given by
Digital Signal Processing 7 Transfer function
and Digital Filter Realization
Sample processing algorithm
v From the block diagram, we assign internal state variables to all the
delays:
We define v1(n) to be the content of the x-delay at time n:
Similarly, w1(n) is the content of the y-delay at time n:
Digital Signal Processing 8 Transfer function
and Digital Filter Realization
Frequency response and pole/zero pattern
v Given H(z) whose ROC contains unit circle, the frequency response
H(w) can be obtained by replacing z=ejw.
Example:
Using the identity
The magnitude response
q Drawing peaks when
passing near poles
q Drawing dips when
passing near zeros
Digital Signal Processing 9 Transfer function
and Digital Filter Realization
Example
v Consider the system which has the I/O equation:
a) Determine the transfer function
b) Determine the casual impulse response
c) Determine the frequency response and plot the magnitude response
of the filter.
d) Plot the block diagram of the system and write the sample
processing algorithm
Digital Signal Processing 10 Transfer function
and Digital Filter Realization
2. Digital filter realizations
v Construction of block diagram of the filter is called a realization of
the filter.
v Realization of a filter at a block diagram level is essentially a flow
graph of the signals in the filter.
v It includes operations: delays, additions and multiplications of signals
by a constant coefficients.
v The block diagram realization of a transfer function is not unique.
v Note that for implementation of filter we must concerns the
accuracy of signal values, accuracy of coefficients and accuracy of
arithmetic operations. We must analyze the effect of such
imperfections on the performance of the filter.
Digital Signal Processing 12 Transfer function
and Digital Filter Realization
Direct form realization
v Use the I/O difference equation
q The b-multipliers are feeding forward
q The a-multipliers are feeding backward
Digital Signal Processing 13 Transfer function
and Digital Filter Realization
Example 1
v Consider IIR filter with h(n)=0.5nu(n)
a) Draw the direct form realization of this digital filter ?
b) Given x=[2, 8, 4], find the first 6 samples of the output by using the
sample processing algorithm ?
Digital Signal Processing 14 Transfer function
and Digital Filter Realization
Example 2
v Consider transfer functions:
a) Determine the corresponding I/O difference equation?
b) Draw the direct form realization of this digital filter ?
c) Given x=[1, -1, 2], find the first 6 samples of the output by using the
sample processing algorithm ?
Digital Signal Processing 15 Transfer function
and Digital Filter Realization
Example 2
c) Given x=[1, -1, 2], find the first 6 samples of the output by using the
sample processing algorithm ?
Digital Signal Processing 16 Transfer function
and Digital Filter Realization
Canonical form realization (Direct form 2)
1 1
v Note that Y ( z) = H ( z) X ( z) = N ( z) X ( z) = N ( z) X ( z)
D( z ) D( z )
Digital Signal Processing 17 Transfer function
and Digital Filter Realization
Canonical form realization (Direct form 2)
1 1
v Note that 𝑌 𝑧 =𝐻 𝑧 𝑋 𝑧 =𝑁 𝑧 𝑋 𝑧 = 𝑁 𝑧 𝑋 𝑧
𝐷 𝑧 𝐷 𝑧
1
𝑌(𝑧) = 𝑁 𝑧 𝑊 𝑧 , 𝑊 𝑧 = 𝑋(𝑧)
𝐷 𝑧
and rewrite them in the form
or, equivalently
which become in the time domain:
Digital Signal Processing 18 Transfer function
and Digital Filter Realization
Canonical form realization (Direct form 2)
1 1
v Note that 𝑌 𝑧 =𝐻 𝑧 𝑋 𝑧 =𝑁 𝑧 𝑋 𝑧 = 𝑁 𝑧 𝑋 𝑧
𝐷 𝑧 𝐷 𝑧
1
𝑌(𝑧) = 𝑁 𝑧 𝑊 𝑧 , 𝑊 𝑧 = 𝑋(𝑧)
𝐷 𝑧
q The maximum number of common
delays: K=max(L,M)
M=L
Digital Signal Processing 19 Transfer function
and Digital Filter Realization
Example 3
v Draw the canonical form realization of this digital filter
Digital Signal Processing 20 Transfer function
and Digital Filter Realization
Cascade form
v The cascade realization form of a general functions assumes that the
transfer functions is the product of such second-order sections
(SOS):
Digital Signal Processing 22 Transfer function
and Digital Filter Realization
Cascade form
Digital Signal Processing 23 Transfer function
and Digital Filter Realization
Exercise 1
Biết rằng ngõ vào của một hệ thống nhân quả và LTI là tín hiệu
n
1æ 1 ö 4
x(n) = - ç ÷ u (n) - 2 n u (- n - 1)
3è 2 ø 3
có tín hiệu ngõ ra tương ứng ở miền Z là
1 + z -1
Y ( z) =
(1 - z )(
-1
)(
1 + 0.5z -1 1 - 2 z -1 )
a) Tìm biến đổi Z cho tín hiệu x(n) và xác định tính chất nhân quả, phản nhân quả
hay hỗn hợp của x(n).
b) Tìm đáp ứng H(z) của hệ thống trong miền Z và xác định miền hội tụ ROC và
tính chất ổn định của hệ thống.
c) Xác định miền hội tụ ROC của Y(z)
d) Tìm đáp ứng xung nhân quả của hệ thống.
e) Hiện thực (vẽ) sơ đồ khối hệ thống theo dạng chính tắc (trực tiếp 2)
f) Xác định 4 giá trị đầu tiên của y(n) khi biết x(n) = [1,-1,2] bằng giải thuật dạng
chính tắc
Digital Signal Processing 24 Transfer function
and Digital Filter Realization
Exercise 2
Cho một hệ thống LTI nhân quả như hình dưới trong đó h(n) = (0,5)n u (n)
a) Tìm đáp ứng xung nhân quả 𝑔 𝑛 của hệ thống.
b) Vẽ phác thảo đáp ứng tần số của bộ lọc (hệ thống) này. Đây là bộ lọc gì ?
c) Cho đầu vào là tín hiệu 𝑥 𝑛 = 𝑢 𝑛 . Tìm tín hiệu ra y(n) của hệ thống.
Digital Signal Processing 25 Transfer function
and Digital Filter Realization
Homework 1
Digital Signal Processing 26 Transfer function
and Digital Filter Realization
Homework 2
Digital Signal Processing 27 Transfer function
and Digital Filter Realization
Homework 3
Digital Signal Processing 28 Transfer function
and Digital Filter Realization
Homework 4
Digital Signal Processing 29 Transfer function
and Digital Filter Realization
Homework 5
Digital Signal Processing 30 Transfer function
and Digital Filter Realization
Homework 6
Digital Signal Processing 31 Transfer function
and Digital Filter Realization
Homework 7
Digital Signal Processing 32 Transfer function
and Digital Filter Realization
Homework 8
Digital Signal Processing 33 Transfer function
and Digital Filter Realization
Homework 9
Digital Signal Processing 34 Transfer function
and Digital Filter Realization
Homework 10
Digital Signal Processing 35 Transfer function
and Digital Filter Realization
Homework 11
Digital Signal Processing 36 Transfer function
and Digital Filter Realization
Homework 12
Digital Signal Processing 37 Transfer function
and Digital Filter Realization
Homework 13
Digital Signal Processing 38 Transfer function
and Digital Filter Realization
Homework 14
Digital Signal Processing 39 Transfer function
and Digital Filter Realization
Homework 15
Digital Signal Processing 40 Transfer function
and Digital Filter Realization
Homework 16
Digital Signal Processing 41 Transfer function
and Digital Filter Realization
Homework 17
Digital Signal Processing 42 Transfer function
and Digital Filter Realization
Homework 18
Digital Signal Processing 43 Transfer function
and Digital Filter Realization
Homework 19
Digital Signal Processing 44 Transfer function
and Digital Filter Realization
Homework 20
Digital Signal Processing 45 Transfer function
and Digital Filter Realization
Homework 21
Digital Signal Processing 46 Transfer function
and Digital Filter Realization
Homework 22
Cho hệ thống rời rạc LTI có đáp ứng xung h(n) = 0.5n u(n–1).
1) Viết phương trình sai phân vào-ra và vẽ 1 sơ đồ khối thực hiện hệ
thống.
2) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào
x(n) = δ(n–1).
3) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào
x(n) = u(–n–1).
4) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào
x(n) = 1.
Digital Signal Processing 47 Transfer function
and Digital Filter Realization
Homework 23
z -1 2
Cho hệ thống LTI nhân quả có hàm truyền +
H(z)= 1 - 0.5z -1 1 + 0.5z -1 .
1) Kiểm tra tính ổn định của hệ thống.
2) Tìm đáp ứng xung của hệ thống.
3) Viết phương trình sai phân vào-ra và vẽ 1 sơ đồ khối thực hiện hệ
thống.
4) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào
x(n) = 4δ(n) – δ(n – 2).
Digital Signal Processing 48 Transfer function
and Digital Filter Realization
Homework 24
Cho hệ thống rời rạc LTI nhân quả có phương trình vào-ra y(n) =
x(n–1) – 0.5y(n–1).
1) Vẽ 1 sơ đồ khối thực hiện hệ thống.
2) Tìm đáp ứng xung của hệ thống.
3) Vẽ phác thảo biên độ đáp ứng tần số và xác định đặc tính tần
số (thông thấp, thông cao, thông dải hay chắn dải) của hệ
thống.
4) Tìm tín hiệu ngõ vào x(n) để tín hiệu ngõ ra y(n) = δ(n–1).
Digital Signal Processing 49 Transfer function
and Digital Filter Realization
Homework 25
Cho hệ thống rời rạc LTI nhân quả có phương trình vào-ra y(n) =
x(n–1) + 0.5y(n–1)
1) Vẽ sơ đồ khối thực hiện hệ thống trên với số bộ trễ ít nhất có
thể.
2) Tìm đáp ứng xung của hệ thống trên.
3) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào
x(n) = 2δ(n–2).
4) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào
x(n) = u(–n–1).
5) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào
x(n) = 2.
Digital Signal Processing 50 Transfer function
and Digital Filter Realization
Homework 26
1 + z -2
Cho hệ thống rời rạc LTI nhân quả có hàm truyền H(z) = -2
.
4- z
1) Vẽ sơ đồ cực-zero và kiểm tra tính ổn định của hệ thống trên.
2) Viết phương trình sai phân vào-ra và vẽ sơ đồ khối thực hiện hệ thống trên với
số bộ trễ là ít nhất.
3) Vẽ phác họa đáp ứng biên độ và chỉ ra đặc tính tần số (thông thấp, thông cao,
thông dải hay chắn dải) của hệ thống trên.
4) Xác định biểu thức và chỉ ra đặc tính đáp ứng xung (FIR hay IIR) của hệ thống
trên.
5) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào x(n) =
2cos(pn/2)u(n).
6) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào x(n) = u(-n) –
2δ(n).
7) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào x(n) = 2.
8) Tìm tín hiệu ngõ vào x(n) để tín hiệu ngõ ra y(n) = {2, 0, 2}.
Digital Signal Processing 51 Transfer function
and Digital Filter Realization
Homework 27
z -1 2
Cho hệ thống LTI nhân quả có hàm truyền H(z) = + .
1 - 0.5 z -1 1 + 0.5 z -1
1) Vẽ sơ đồ cực-zero và kiểm tra tính ổn định của hệ thống trên.
2) Viết phương trình sai phân vào-ra và vẽ sơ đồ khối thực hiện hệ
thống trên với số bộ trễ là ít nhất.
3) Vẽ phác họa đáp ứng biên độ và chỉ ra đặc tính tần số (thông thấp,
thông cao, thông dải hay chắn dải) của hệ thống trên.
4) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào
x(n) = 2δ(n – 2).
5) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào
x(n) = {2, 1}.
6) Tìm giá trị của mẫu tín hiệu ngõ ra y(n=2) khi tín hiệu ngõ vào
x(n) = 2.
Digital Signal Processing 52 Transfer function
and Digital Filter Realization
Homework 28
Cho hệ thống tuyến tính bất biến có tín hiệu ngõ ra y(n) = {1, 0, 0,
0, -1} khi tín hiệu ngõ vào x(n) = {1, 0, 1}.
1) Viết phương trình sai phân vào-ra của hệ thống trên.
2) Xác định tín hiệu ngõ ra y(n) khi tín hiệu ngõ vào x(n) = {1, 0,
0, 0, -1}.
3) Xác định tín hiệu ngõ vào x(n) để tín hiệu ngõ ra y(n) = {1, 1}.
4) Tìm đáp ứng xung nhân quả của hệ thống khôi phục ghép nối
tiếp ngay sau hệ thống trên để ngõ ra hệ thống khôi phục đúng
bằng tín hiệu ngõ vào của hệ thống ban đầu.
Digital Signal Processing 53 Transfer function
and Digital Filter Realization