Download presentation
Presentation is loading. Please wait.
1
Introduction to Digital Signal Processing
Byeong Gi Lee
2
Chapter1. INTRODUCTION to DSP
1.1 Analog vs. Digital 1.2 Applications 1.3 Why Digital? 1.4 Digital Signal Processing 1.5 Course Description BGL/SNU
3
Analog : voice, audio, video, ….
1.1. Analog vs. Digital i) Signal Analog : voice, audio, video, …. Digital : digitized analog signal, data ii) Processing Analog : passive/active filtering AM, FM, PM modulation Fourier, Laplace transform Digital : FIR/IIR filtering AM, windowing Discrete Fourier transform, z-transform BGL/SNU
4
1.1. Analog vs. Digital (cont’d)
iii) System Analog : R, L, C, Op-amp, switch, … differential equation Digital : adder, multiplier, memory, … difference equation iv) Theory Circuit theory DSP theory BGL/SNU
5
1.2. Applications Information Processing system Recognition Signal
- radar, sonar, seismic, … Storage Media Storage Processing system Display Transmission Communications Information BGL/SNU
6
1.2. Applications (cont’d)
i) Processing - filtering, modulation, transform, deconvolution - A/D, D/A conversion, coding ii) Storage - LP, tape (analog) - CD, DVD (digital) iii) Transmission - FDM, FDMA, TDMA (analog) - TDM(PCM), CDMA (digital) BGL/SNU
7
- Environmental change!
1.3. Why Digital? - Environmental change! Global communication - noise immunity Multimedia communication - integration Networking - encryption, packetizing Wireless, mobile - encryption, compression BGL/SNU
8
1.4. Digital Signal Processing
Computer-aided approximation Exact self-containing processing Processing complexity FAST-ENOUGH Computing capability Implementation means * invention of FFT, Cooley Tukey, 1965 DSP is realizable (real-time processing) BGL/SNU
9
It is time, time is matured for “DSP-only”!
1.4. Digital Signal Processing (cont’d) It is time, time is matured for “DSP-only”! Theoretical support - DSP theory Environmental demand Microelectronics support - processing + storage + logic devices BGL/SNU
10
1.5. Course Description Objective : To study the theoretical fundamentals on Digital Signal Processing and the mathematical foundations for sampling, discrete-time Fourier Transform, filtering, fast computation techniques and confirm them through computer programming. Text : Discrete-Time Signal Processing, 2nd ed., A. V. Oppenheim & R. W. Schafer, Prentice-Hall Reference : Digital Signal Processing, 2nd ed., Sanjit K. Mitra, McGraw-Hill Homepage : tsp.snu.ac.kr BGL/SNU
11
1.5. Course Description (cont’d) Fall 2003
Week 1 Chap 1. Introduction, Chap 2. Discrete-time signals and systems Week 2 Chap 2. Discrete-time signals and systems (CHUSEOK) Week 3 Chap 3. z-transform Week 4 Chap 4. Sampling & Discrete- and continuous-time signal processing Week 5 Chap 5. Frequency response of LTI systems Week 6 Chap 5. All-pass and Minimum-phase system Week 7 Midterm (Univ. Anniversary, Student Festival) Week 8 Chap 6. Basic structure for LTI systems Week 9 Chap 6. FIR & IIR systems, Chap 7. FIR & IIR filter design Week 10 Chap 7. FIR & IIR filter design Week 11 Chap 8. Discrete Fourier Transform Week 12 Chap 8. Discrete Fourier Transform Week 13 Chap 9. Fast transform computation Week 14 Overall Review and Problem Solving (GLOBECOM) Week 15 Final Exam BGL/SNU
12
Chapter2. DISCRETE-TIME SIGNALS AND SYSTEMS
2.0 Introduction 2.1 Discrete-Time Signals : Sequences 2.2 Discrete-Time Systems 2.3 Linear Time-Invariant Systems 2.4 Properties of Linear Time-Invariant Systems 2.5 Linear Constant-Coefficient Difference Equations 2.6 Frequency-Domain Representation 2.7 Representation of Sequences of the Fourier Transform 2.8 Symmetry Properties of the Fourier Transform 2.9 Fourier Transform Theorems BGL/SNU
13
2.1.Discrete - Time Signals
x[n]= x(t)|t=nT n : -1,0,1,2,… T: sampling period x(t) : analog signal i) unit impulse signal(sequence) d[n] = , n=0 0, n0 ii) unit step sequence u[n] = , n0 0, n0 BGL/SNU
14
iii) exponential/sinusoidal sequence x[n]= Aej(won+), Acos(won+)
- not necessarily periodic in n with period 2p/wo - periodic in n with period N (discrete number) for woN=2pk or wo = 2pk/N [note] x(t)= Ae j(wo t +) is periodic in t with period T= 2p/wo (continuous value) iv) general expression x[n] = S x[k]d[n-k] BGL/SNU
15
2.2Discrete-Time Systems
x[n] y[n] System : signal processor i) memoryless or with memory y[n] = f(x[n]), y[n]=f(x[n-k]) with delay ii) linearity x1[n]y1[n] x2[n]y2[n] a1x1[n] + a2x2[n] a1y1[n] + a2 y2[n] - e.g. T[a1x1[n] + a2x2[n]] = T[a1x1[n]] + T[a2x2[n]] = a1T[x1[n]] + a2T[x2[n]] BGL/SNU
16
x[n] y[n] x[n-n0] y[n-n0]
iii) time-invariance x[n] y[n] x[n-n0] y[n-n0] - e.g., T[x [n-n0]] = T[x [n]] | n n-no - e.g., d[n] h[n] d[n-k] h[n-k] - counter-example : decimator T[ ] = x[Mn] iv) causality y[n] for n=n1, depends on x[n] for nn1 only - counter-example : y[n] = x[n+1] - x[n] BGL/SNU
17
bounded input yields bounded output(BIBO)
v) stability bounded input yields bounded output(BIBO) |x[n]| < for all n |y[n]| < for all n - counter-example : y[n] = S u[k] = 0, n<0 n+1, n0 unbounded ( no fixed value By exists that keeps y[n] By < .) n k=- BGL/SNU
18
= S x[k]T[d[n-k]] = S x[k]h[n-k] = x[n]*h[n] = S x[n-r]h[r]
2.3 Linear Time-Invariant Systems d[n] h[n] LTI T[d[n]] : impulse response x[n] y[n] In general, let x[n] = S x[k]d[n-k] k=- y[n] = T[ S x[k]d[n-k]] k ( by linearity) = S x[k]T[d[n-k]] k ( by time-invariance) = S x[k]h[n-k] coefficient = x[n]*h[n] = S x[n-r]h[r] r=- Convolution! BGL/SNU
19
S h[k] x[n-k] = S h[k] x[n-k] In summary, h[n] x[n] y[n]
y[n] = x[n]*h[n] LTI h[n] : unique characteristic of the LTI system - causal LTI system S h[k] x[n-k] k=0 y[n] = S h[k] x[n-k] = k=- [note] h[n] = T[d[n]] = 0 n<0. as d[n] = , n=0 0, n0 BGL/SNU
20
S h[k] x[n-k] | S | x[n-k] | • | h[k] | S | h[k] | S | h[k] |
- Stable LTI System S h[k] x[n-k] | S | x[n-k] | • | h[k] | |y[n]| = | k=- k=- S | h[k] | Bx By < k=- Therefore, S | h[k] | < k=- In fact, this is necessary and sufficient condition for stability of a BIBO system. ( You prove it! )(*1) BGL/SNU
21
- Example of non-LTI system - Decimator
x[n] Decimator M y[n] = x[Mn] ? ~ x[n] = x[n-1] ~ y[n] = y[n-1] = x[M[n-1]] M=3 y[n] = x[Mn] ~ y[n] BGL/SNU
22
y[n] y[n-1] No! = x[Mn-1] x[M[n-1]] = y[n-1] ~ y[n] BGL/SNU
23
2.4 Properties of LTI System
h[n] x[n] y[n] = x[n]*h[n] LTI i) parallel connection h[n] = h1[n] + h2[n] BGL/SNU
24
ii) cascade connection
h[n] = h1[n]*h2[n] =h2[n]* h1[n] [note] distinctive feature of digital LTI system (*2) BGL/SNU
25
S ak y[n-k] = S br x[n-r] = S br x[n-r]
2.5 Linear Difference Equations LTI x[n] y[n] N S ak y[n-k] k = 0 M = S br x[n-r] r = 0 i) Case 1 : N=0 FIR System (set a0 =1, for convenience) y[n] For impulse input, x[n]=d[n], the response is h[n]= 0, n<0 or n>M br 0 n M finite impulse response! M = S br x[n-r] r = 0 BGL/SNU
26
= S br x[n-r] S ak y[n-k] ii) Case 2 : N 0 IIR System
(set a0 =1, for convenience) y[n] e.g., set N=1 (lst order), and a1 = -a y[n] = b0 x[n] + ay[n-1] M = S br x[n-r] r = 0 N S ak y[n-k] k = 1 - For impulse input x[n] = d[n], the response is 1) If assume a causal system, i.e., y[n]=0 n<0. y[0] = b0 d[0] + ay[-1] = b0 y[1] = b0 d[1] + ay[0] = ab0 • • • y[n] = b0 d[n] + ay[n-1] = anb0 h[n] = anb0u[n] infinite impulse response! BGL/SNU
27
2) If assume an anti-causal system, i.e., y[n]=0 n>0.
y[n-1] = a-1(-b0 d[n] + y[n]) y[0] = a-1(-b0 d[1] + y[1]) = 0 y[-1] = a-1(-b0 d[0] + y[0]) = a-1b h[n] = -anb0u[-n-1] • • • y[-n] = a-1(- b0 d[n+1] + y[n+1]) = -anb0 BGL/SNU
28
A y[n] = S h[k] ejw(n-k) ( S h[k] e-jwk )ejwn =H(ejw) ejwn
2.6 Frequency-Domain Representation • Linear System x y = Ax A x ^ ^ y = Ax=lx scalar, eigenvalue for eigenvector input x ^ • LTI System x[n] y[n]=x[n]*h[n] h[n] ejwn y[n]=ejwn*h[n] = H(ejw)ejwn Fourier transform y[n] = S h[k] ejw(n-k) k = - = ( S h[k] e-jwk )ejwn =H(ejw) ejwn k = - BGL/SNU
29
S h[k] e-jwk • Fourier Transform H(ejw) = p h[k] = 1/2p H(ejw) ejwkdw
H(ejw) = h[k] = 1/2p H(ejw) ejwkdw p -p You prove this! (*3) • Condition for existence of FT | X(ejw) | < S | x[n] | < “ absolutely summable” (BIBO stable condition) • Real - imaginary H(ejw) = HR(ejw) + j HI(ejw) BGL/SNU
30
H(ejw) = | H(ejw) |ej H(ejw)
• Magnitude-phase H(ejw) = | H(ejw) |ej H(ejw) (e.g.) ideal delay system x[n] y[n] = x[n-nd] h[n] ejwn y[n] = ejw(n-nd) = H(ejw) ejwn H(ejw) = e-jwnd HR(ejw) = coswnd HI(ejw) = - sinwnd | H(ejw) | = 1 H(ejw) = -wnd BGL/SNU
31
x[n] = Acos(w0n + j) = (A/2) ejjejw0n + (A/2) e-jje-jw0n
(e.g.) sinusoidal input x[n] = Acos(w0n + j) = (A/2) ejjejw0n + (A/2) e-jje-jw0n y[n] = H(ejw0) (A/2) ejjejw0n + H(e-jw0) (A/2) e-jje-jw0n = (A/2)(H(ejw0) ejjejw0n + H(e-jw0) e-jje-jw0n) y[n] = H(ejw) ejwn <1> = (A/2){ (H(ejw0) ejjejw0n ) + (H(ejw0) ejjejw0n)* } = ARe{H(ejw0) ejjejw0n} = A | H(ejw0) |(cosw0n + j + q) = A cos (w0(n-nd) + j) <2> <3> BGL/SNU
32
= ( S h*[n] e-jw0n)* = H*(ejw0)
<1> if h[n] real h[n] = hR[n]+jhI[n] = hR[n] = h*[n] H(e-jw0) = S h[n] e-(-jw0n) = ( S h*[n] e-jw0n)* = H*(ejw0) n n <2> H(ejw) = | H(ejw) |ejq <3> if ideal delay system with | H(ejw) | = 1, H(ejw) = q = -wnd BGL/SNU
33
(e.g.) ideal lowpass filter (LPF)
x[n] y[n] 1 -wc wc Hl(ejw) = e-jwnd |w| 0. elsewhere wc periodic with period 2p Input x[n] = Acos(w0n + j) output y[n] = Acos(w0(n-nd )+ j) , if , otherwise wo < wc BGL/SNU
34
= S ane-jwn = S (ae-jw)n (e.g.) Fourier transform of anu[n] |a|<1
X(ejw) = S ane-jwn = S (ae-jw)n = n = 0 n = 0 (e.g.) inverse Fourier transform of ideal LPF hl [k] = e-jwnd ejwndw wc -wc sinw0[n-nd ] p[n-nd ] = - <n < BGL/SNU
35
- Data length vs. Spectrum Change
- Gibb’s phenomenon (page 52) BGL/SNU
36
- Error reduces in RMS sense but not in Chebyshev sense.
Limitation of rectangular windowing BGL/SNU
37
2.8 Symmetry Properties (table 2.1)
i) even / odd e : conjugate symmetric even o : conjugate anti-symmetric odd BGL/SNU
38
ii) real/imaginary iii) conjugation/reversal S = ( S )* BGL/SNU
39
iv) real/imaginary - even/odd
v) for real x[n] real even imaginary odd BGL/SNU
40
(e.g.) x[n] = anu[n] |a|<1, real (example 2.25)
even odd even odd BGL/SNU
41
Dashed line : a = 0.5 Solid line : a = 0.9
BGL/SNU
42
2.9 Fourier Transform Theorems (table 2.2)
i) linearity ii) time shifting iii) frequency shifting iv) time reversal BGL/SNU
43
v) differentiation in frequency
vi) Parserval’s relation vii) convolution relation BGL/SNU
44
viii) modulation/windowing relation
ix) fundamental functions BGL/SNU
45
1. 0. BGL/SNU
46
H.W. of Chapter 2 Matlab: [1] Consider the following discrete-time systems characterized by the difference equations: y[n]=0.5x[n]+0.27x[n-1]+0.77x[n-2] Write a MATLAB program to compute the output of the above systems for an input x[n]=cos(20n/256)+cos(200n/256), with 0n<299 and plot the output. [2] The Matlab command y=impz(num,den,N) can be used to compute the first N samples of the impulse response of the causal LTI discrete-time system. Compute the impulse response of the system described by y[n]-0.4y[n-1]+0.75y[n-2] =2.2403x[n] x[n-1] x[n-2] and plot the output using the stem function. BGL/SNU
47
H.W. of Chapter 2 Text: [3]2-15 [4]2-30 [5]2-42 [6]2-56 [7]2-58
BGL/SNU
48
Chapter4. Sampling of Continuous-Time Signals
1. A/D Conversion and Sampling 2. Reconstruction of a Bandlimited Signals 3. Continuous-Discrete Frequency Characteristics 4. Digital Processing of Continuous-Time Signals 5. Changing the Sampling Rate Using Discrete-Time Processing 6. Multirate Signal Processing 7. Practical Considerations in A/D and D/A Conversions 8. Multirate Processing for A/D and D/A Conversions BGL/SNU
49
1. Analog-to-Digital Conversion and Sampling
A-to-D Conversion D-to-A Conversion Conti Disc DSP D C Sampling BGL/SNU
50
Ideal C/D Conversion Ideal D/C conversion BGL/SNU
51
Sampling <Input> <Impulse train> <Impulsed input>
Sampling frequency <Impulsed input> BGL/SNU
52
Nyquist Sampling Theorem
<output> T If is an ideal LPF Nyquist Sampling Theorem When xc (t) is bandlimited s.t. If we do sampling by taking Then xc (t) is uniquely reconstructed from x[n]= xc (nT) BGL/SNU
53
Illustration of Sampling
1 t t 0 T ... t BGL/SNU
54
t What if Aliasing BGL/SNU
55
Illustration of aliasing
Sampling period (note, to avoid aliasing, ) (*1000) Then the reconstructed output has component BGL/SNU
56
Original signal Aliased signal BGL/SNU
57
2. Reconstruction of Band-limited Signal
(note 1) T BGL/SNU
58
(note 1) t T 2T BGL/SNU
59
3. Continuous/Discrete Frequency Characteristics
vs. C/D - (i) BGL/SNU
60
-(ii) BGL/SNU
61
(i)+(ii) - (iii) In summary, 1 normalized frequency! BGL/SNU
62
4. Digital Processing of Analog Signal
BGL/SNU
63
or equivalently, take Then, BGL/SNU
64
5. Changing the Sampling Rate
Decimation BGL/SNU
65
(e.g) If set p 1 , w < H ( e ) = M , otherwise Then 1 Y ( e ) = X (
j w ) = M , otherwise Then 1 Y ( e j w ) = X ( e j w / M ), w < p M (e.g) BGL/SNU
66
Interpolation BGL/SNU
67
Anti- imaging filter If set p L , w < H ( e ) = L , otherwise Then
j w ) = L Anti- imaging filter , otherwise Then Y ( e j w ) = LX ( e j w L ), w < p / L BGL/SNU
68
M/L Sampling Rate Conversion
BGL/SNU
69
Illustration of Decimation and Interpolation
BGL/SNU
70
6. Multirate Signal Processing
- Interchange of Filtering and Up/Down-Sampling BGL/SNU
71
Polyphase Decomposition
BGL/SNU
72
K K BGL/SNU
73
Polyphase Implementation of Decimation Filters
BGL/SNU
74
Polyphase Implementation of Decimation Filters
Likewise ( you derive it! ) What is the computational saving? 1. Before : KM multiplications/sample-out 2. After : K multiplications/sample-out (1/M reduction!) You show it! BGL/SNU
75
7. Practical Considerations
(1) Prefiltering – Anti-aliasing filtering - analog filter, costly to implement sharp analog filters use over-sampling technique BGL/SNU
76
(2) A/D Conversion BGL/SNU
77
-Signal-to-Quantizing Noise Ratio
BGL/SNU
78
(3) D/A Conversion BGL/SNU
79
BGL/SNU
80
8. Multirate Processing for A/D and D/A Conversions
(1)Oversampling-Decimation based A/D Conversion (2) Interpolation - Low-order Reconstruction based D/A conversion BGL/SNU
81
Oversampling-Decimation based A/D Conversion
BGL/SNU
82
Interpolation - Low-order Reconstruction based D/AC
BGL/SNU
83
5.Linear Time-Invariant System
5.1 The Frequency Response of LTI systems 5.2 System Functions for Systems Characterized by Linear Constant-Coefficient Difference 5.3 Frequency Response for Rational System Functions 5.4 Relationship between Magnitude and Phase 5.5 All-Pass Systems 5.6 Minimum-Phase Systems 5.7 Linear Systems with Generalized Linear Phase 5.8 Summary BGL/SNU
84
5.1 Frequency Response (e.q) Frequency selective filter - ideal
( : delay,centerpoint of sync function) BGL/SNU
85
Group dalay BGL/SNU
86
5.2 System Functions for Constant Coefficient Systems
Stable if Causal if Roc includes BGL/SNU
87
Inverse system, stable if all poles and zeros, inside the uc
minimum-phase system BGL/SNU
88
-FIR vs IIR FIR part IIR part BGL/SNU
89
5.3 Frequency Response of Rational System Functions
(note) arg : continuous phase ARG : its principal value in BGL/SNU
90
Check how they change as r and vary.
(example) Check how they change as r and vary. BGL/SNU
91
5.4 Relationship between Magnitude and Phase
F F (complex cepstrum of x[n]) from Eqs. (11.28) and (11.29) (pp. 781) BGL/SNU
92
※Relationship between real part and imaginary part of complex sequence (single-side band)
single-side band sequence (complex sequence) F or Hilbert Transform BGL/SNU
93
Illustration of decomposition of a one-sided Fourier transform
BGL/SNU
94
Inverse Hilbert transform
xr[n] xr[n] x[n] Hilbert transformer xi[n] impulse response of an ideal Hilbert transformer BGL/SNU
95
5.5 Allpass System BGL/SNU
96
- 2nd order allpass function
- Nth order allpass function ( real-coeff) BGL/SNU
97
5.6 Minimum phase System BGL/SNU
98
BGL/SNU
99
Sequences all having the same frequency response magnitude
( zeros are at all combinations of 0.9ej0.6 and 0.8ej0.8 and their reciprocals) BGL/SNU
100
since BGL/SNU
101
- Frequency response Compensation
BGL/SNU
102
5.7 Generalized Linear Phase System
BGL/SNU
103
BGL/SNU
104
BGL/SNU
105
BGL/SNU
106
BGL/SNU
107
BGL/SNU
108
BGL/SNU
109
Chapter 6. Structures for Discrete-Time Systems
6.1 Block Diagram Representation of Linear Constant-Coefficient Difference Equations 6.2 Signal Flow Graph Representation of Linear Constant-Coefficient Difference Equations 6.3 Basic Structures for IIR Systems 6.4 Transposed Forms 6.5 Basic Network Structures for FIR Systems 6.6 Overview of Finite-Precision Numerical Effects 6.7 The Effects of Coefficient Quantization 6.8 Effects of Round-off Noise in Digital Filters 6.9 Zero-Input Limit Cycles in Fixed-Point Realizations of IIR Digital Filters BGL/SNU
110
1. Digital circuits vs. Analog circuits
(1) Expression (2) Circuit Elements + - BGL/SNU
111
Discrete – time Continuous - time
DIGITAL ANALOG (3) Time - Domain Discrete – time Continuous - time (4) Transform - Domain BGL/SNU
112
Conversion via KCL, KVL and branch equations
DIGITAL ANALOG (5) Signal Flow Graph Straightforward Conversion via KCL, KVL and branch equations ( no delay-free loop allowed) ( no improper Source-sink ) BGL/SNU
113
Examples BGL/SNU
114
Mason’s rule for signal flow graph
BGL/SNU
115
2. Circuit Structure for IIR System
(1) Direct Form BGL/SNU
116
BGL/SNU
117
- Second order factored form - pole-zero pairing
(2) Cascade Form - Second order factored form - pole-zero pairing BGL/SNU
118
- Partial fraction expansion
(3) Parallel Form - Partial fraction expansion BGL/SNU
119
- Reverse the flow of a structure,
(4) Transposed Form - Reverse the flow of a structure, then you will get the identical transfer function BGL/SNU
120
3. Circuit Structures for FIR Systems
(1) Direct Form x ( n - N + 1 ) Z-1 Z-1 Z-1 BGL/SNU
121
(3) Parallel Form (Frequency Sampling)
(2) Cascade Form (3) Parallel Form (Frequency Sampling) 1 N - 1 2 p - j h ( n ) = H ( k ) W - kn IDFT ( W = e N ) N N N k = BGL/SNU
122
BGL/SNU
123
(4) Linear Phase FIR Structure
= h ( M - n ) h ( ) = h ( 1 ) = h ( M ) h ( M - 1 ) h ( ) = h ( M ) BGL/SNU
124
(5) Linear Phase FIR Structure in Quad Form
zeros : factors : coefficients in A BGL/SNU
125
IIR Structure of special interest
B coefficients in BGL/SNU
126
* Observation grid denser grid uniform top and bottom BGL/SNU
127
(1) Effects of pole-clustering
4. Effects of Coefficient Quantization (1) Effects of pole-clustering - after quantization - sensitivity of (in denominator) on H(z) is larger than that of : Change poles changed denominator of H(z) changed BGL/SNU
128
Therefore, a small change in could cause a large change in
Let Then Therefore, a small change in could cause a large change in when is close to , (or when poles are clustered), causing a large change in H(z) or its frequency spectrum BGL/SNU
129
Effects of quantization on the zeros of a 27th order polynomial P(z)
Illustration: Effects of quantization on the zeros of a 27th order polynomial P(z) BGL/SNU
130
(2) pole-zero pairing to realize low-sensitivity 2nd order cascade
Due to the quantization effect discussed above, it is desirable to separate out closely located poles into different 2nd order blocks. Jackson (1970, 1986) : How to pair poles and zeros 1) The pole that is closest to the unit circle should be paired with the zero that is closest to it in the z-plane 2) This rule should be repeatedly applied until all the poles and zeros have been paired BGL/SNU
131
3) The resulting second order sections should be ordered
according to the closeness of the poles to the unit circle, either in increasing closeness to the unit circle or in its reverse order a11 a21 b11 b21 (1) (2) (3) BGL/SNU
132
Illustration: a 12th order IIR bandpass filter
- with the cutoff frequencies at 0.3pi, 0.4pi - stopband attenuation of -40dB Cascaded Structure Direct-form Structure BGL/SNU
133
(A) Arrangement 1: direct-form implementation
(3) Grid granularity and Filter Structure (A) Arrangement 1: direct-form implementation (A) BGL/SNU
134
Illustration: zero locations for direct-form implementation
4 bit quantization 7 bit quantization Put Figure 6.42 (a) below Put Figure 6.42 (b) below BGL/SNU
135
(B) Arrangement 2: coupled-form implementation
( Note) the cross points are physically realizable pole points -guantization moves a pole from one crosspoint to another -if poles are on the upper region take arrangement 1 (structure (A)), otherwise, take arrangement 2 (structure (B)) BGL/SNU
136
Illustration: zero locations for coupled-form implementation
4 bit quantization 7 bit quantization Put Figure 6.44 (a) below Put Figure 6.44 (b) below BGL/SNU
137
Y(n) = ay(n-1) - x(n) -> y(n) = Q[ay(n-1)] - x(n)
5 Limit Cycle Y(n) = ay(n-1) - x(n) -> y(n) = Q[ay(n-1)] - x(n) y[n] y[n] x[n] x[n] a a z-1 Q[] z-1 BGL/SNU
138
Chapter 7. Filter Design Techniques
7.1 Introduction - Digital Filter Design 7.2 IIR Filter Design by Impulse Invariance 7.3 IIR Filter Design by Bilinear Transformation 7.4 FIR Filter Design by Windowing 7.5 Kaiser Window based FIR Filter Design 7.6 Approximation based Optimal FIR Filter Design BGL/SNU
139
1. Introduction -- Digital Filter Design
(1) Frequency selective filters : spectral shapers lowpass highpass bandpass bandstop (2)Filter Design Techniques IIR : - mapping from analog filters - impulse invariance FIR: - windowing - equiripple design BGL/SNU
140
In some IIR filter design
(3)Filter Specification(LPF) In some IIR filter design 1 2 3 1 2 3 BGL/SNU
141
2. IIR Filter Design by Impulse Invariance
(1) Design Concept - Utilize existing analog filter design technique - Convert analog impulse response into digital impulse response h[n] by taking samples - Take Then by fundamental sampling property, we get - If analog filter were bandlimited, Then BGL/SNU
142
- But the issue is that the above assumption is not likely,
(2) Aliasing Problem - But the issue is that the above assumption is not likely, so aliasing is inevitable in reality aliasing Therefore this design technique is useful only when designing a narrowband sharp lowpass filters BGL/SNU
143
(3) Parameter Conversion
- Let the analog filter has the partial-fraction expansion - After sampling, h [ n ] = T h (nT ) = d c d Therefore, pole at in is mapped to Pole at BGL/SNU
144
* Impulse Invariance Filter Design Procedure
1) Given specification in domain. 2) Convert it into specification in domain 3) Design analog filter meeting the specification 4) Convert it into digital filter function H(z) by putting [ 5) Implement it in 2nd order cascade form] BGL/SNU
145
Design Example 1 2 * Choose Td=1 3 BGL/SNU
146
* You plot the pole locations in the z-plans!
4 * You plot the pole locations in the z-plans! BGL/SNU
147
3. IIR Filter Design by Bilinear Transformation
(1) Design Concept - s-plane to z-plane conversion any mapping than maps stable region is s-plane (left half plane) to stable region in z-plane (inside u.c) ? or bilinear transform! * Td inserted for convention may put to any convenient value for practical use.
148
(2) Properties
149
* IIR Filter Design Procedure
Given specification in digital domain Convert it into analog filter specification Design analog filter (Butterworth, Chebyshov, elliptic):H(s) Apply bilinear transform to get H(z) out of H(s) 1 2 3 4 3 2 4 1
150
Design Example (Butterworth Filter)
Given specification 1 2 Specification Conversion (Set Td=1) Butterworth filter design 3 N c j H 2 ) / ( 1 | W + =
151
Bilinear Transform 4
152
*Comparison of Butterworth, Chebyshev, elliptic filters
-Filter equations 1 Butterworth filter B Chebyshev filter (type I) C 1 Chebyshev polynomial
153
*Comparison of Butterworth, Chebyshev, elliptic filters (Cont’d)
Chebyshev filter (type II) 1 Elliptic filter E 1 Jacobian elliptic function
154
*Comparison of Butterworth, Chebyshev, elliptic filters: Example
-Given specification -Order Butterworth Filter : N=14. ( max flat) Chebyshev Filter : N= ( Cheby 1, Cheby 2) Elliptic Filter : N= ( equiripple) B C E
155
-Pole-zero plot (analog)
B C1 C2 E -Pole-zero plot (digital) B C1 C2 E (14) (8)
156
-Magnitude -Group delay C1 B B E C1 E C2 C2
157
4. FIR Filter Design by Windowing
(1) Design Concept - Given a desired frequency response evaluate - Then, is the desired filter coefficients. However, is infinitely long, so not practical. Therefore, take a finite segment of , or such that the resulting frequency spectrum fall in the given specification. This process of getting out of is called Windowing
158
(2) Rectangular Windowing
159
W ( e j ( w ) )
161
But M cannot improve this. (due to Gibb’s phenomena).
(3) Design Point e ( w ) : depends on the attenuation of the peak sidelobe of W ( e j w ). But M cannot improve this. (due to Gibb’s phenomena). Therefore, once a specific window is given, is fixed. e ( w ) D w : depends on the width of main lobe of W ( e j w ). This can be improved by increasing M.
162
(4) Commonly Used Windows
BGL/SNU
163
BGL/SNU
164
Frequency Spectrum of Windows
(a) Rectangular, (b) Bartlett, (c) Hanning, (d) Hamming, (e) Blackman , (M=50) BGL/SNU
165
5. Kaiser Window based FIR Filter Design
(1) Design Concept ( I : 0th order modified Bessel function) targets at limited duration in time and energy concentration at low frequency - compromisable. (choose appropriate ) Performance comparable to Hamming window ( when ) BGL/SNU
166
Frequency Spectrum of Kaiser Window
(a) Window shape, M=20, (b) Frequency spectrum, M=20, (c) beta=6 BGL/SNU
167
(2) Determination of Filter Order ( Kaiser, 1974 )
① ② ③ BGL/SNU
168
- Design Example : ① ② ③ ④ (Note)
169
BGL/SNU
170
6. Approximation based Optimal FIR Filter Design
(1) Design Concept - Linear phase filters possess the property - More Generally, constant delay filters have the expression BGL/SNU
171
- Approximation error BGL/SNU
172
- Approximation ( Chebyshev)
BGL/SNU
173
(2) Type I Lowpass Filter case
- desired : - approximation - weighting BGL/SNU
174
- Error function
175
(3) Type II Lowpass Filter case
- desired (original) : - approximation BGL/SNU
176
- Weighting (modified)
- Desired (modified) - error function BGL/SNU
177
BGL/SNU
178
(4) Alternation Theorem
BGL/SNU
179
BGL/SNU
180
BGL/SNU
181
(5) Parks-McClellan Algorithm
① ② ③ ④ BGL/SNU
182
Remez Exchange Algorithm (1934) (multiple exchange)
⑤ Remez Exchange Algorithm (1934) (multiple exchange) ① ② BGL/SNU
183
③ BGL/SNU
184
④ ⑤ ⑥ BGL/SNU
185
Selection of new extrema
BGL/SNU
186
Remez Exchange Algorithm
Initial guess of (L+2) extremal frequencies Remez Exchange Algorithm Calculate the optimum On extremal set Interpolate through (L+1) Points to obtain Ae(ej) Best approximation Calculate error E() And find local maxima Where | E()|>= Unchanged Check whether the Extremal points changed Changed More than (L+2) extrema? Yes Retain (L+2) Largest extrema No BGL/SNU
187
Design Examples ① Kaiser, (1974) BGL/SNU
188
DSP Sample & Hold Comp. Reconst. filter
② DSP Sample & Hold Comp. Reconst. filter BGL/SNU
189
BGL/SNU
190
H.W. of Chapter 7 Due 11/17 (Mon.)
[1] Design a IIR lowpass filter whose specification is the same as that given in Example 7.3 (page 454) except the passband and stopband edges are shifted to 0.7pi and 0.8pi respectively, using bilinear transform technique. Text : [2] [3] 7.3 [4] 7.17 BGL/SNU
191
H.W. of Chapter 7 Due 11/24 (Mon.) [1] Design a Length-21 FIR Filter
Use the MATLAB command h=remez(20, [0,0.4,0.5,1], [1,1,0,0]) to design a length-21 filter with a passband from 0 to wp=0.4pi and a stopband from ws=0.5pi to pi with a desired response of 1 in the passband and zero in the stopband. Plot the impulse response, the zero locations, and the amplitude response. How many “ripples” are there? How many extremal frequencies are there (places where the ripples are the same maximum size)? How many “small ripples” are there that do not give extremal frequencies, and if there are any, are they in the passband or stopband? Are there zeros that do not contribute directly to a ripple? Most zero pairs off the unit circle in the z-plane cause a maximum-size ripple in the passband or stopband. Some cause only a “small ripple,” and some cause no ripple. Text : [2] 7.28 [3] 7.23 [6] 7.36 BGL/SNU
192
Chapter 8. The Discrete Fourier Transform
8.1 Laplace, z-, and Fourier Transforms 8.2 Fourier Transform 8.3 Fourier Series 8.4 Discrete Fourier Transform (DFT) 8.5 Properties of DFS/DFT 8.6 DFT and z-Transform 8.7 Linear Convolution vs. Circular Convolution 8.8 Discrete Cosine Transform(DCT) BGL/SNU
193
1. Laplace, z-, Fourier Transforms
Analog systems (continuous time) Digital Systems (discrete time) H(s) H(z) BGL/SNU
194
Laplace transform -z-transform LHP inside u.c Fouier transforms
BGL/SNU
195
2. Fourier Transform (1) continuous aperiodic signals conti aper
aper conti x(t) 1 t BGL/SNU
196
(2) Discrete aperiodic signals
conti per aper discr x(n) 1 t ω
197
3. Fourier Series (1) continuous periodic signals discrete aper
per conti BGL/SNU
198
(2) discrete periodic signals (*Discrete Fourier Series)
X(t) 1 k t T (2) discrete periodic signals (*Discrete Fourier Series) discrete per per discre BGL/SNU
199
x[n] 1 BGL/SNU
200
4. Discrete Fourier Transform (DFT)
-For a numerical evaluation of Fourier transform and its inversion, (i.e,computer-aided computation), we need discrete expression of of both the time and the transform domain data. -For this,take the advantage of discrete Fourier series(DFS, on page 4), in which the data for both domain are discrete and periodic. discrete periodic periodic discrete -Therefore, given a time sequence x[n], which is aperiodic and discrete, take the following approach. BGL/SNU
201
Mip Top Top Mip DFS DFT Reminding that, in DFS BGL/SNU
202
Define DFT as (eq) X[k] x[n] 1 k n N N BGL/SNU
203
Graphical Development of DFT
204
DFS BGL/SNU
205
DFT BGL/SNU
206
5. Property of DFS/DFT (8.2 , 8.6) (1) Linearity (2) Time shift
(3) Frequency shift BGL/SNU
207
(4) Periodic/circular convolution in time
(5) Periodic/circular convolution in frequency BGL/SNU
208
(6) Symmetry DFS DFT BGL/SNU
209
6. DFT and Z-Transform (1) Evaluation of from
①If length limited in time, (I.e., x[n]=0, n<0, n>=N) then BGL/SNU
210
② What if x[n] is not length-limited? then aliasing unavoidable.
… … … … … …
211
(2) Recovery of [or ] from (in the length-limited case)
BGL/SNU
212
BGL/SNU
213
7. Linear Convolution vs. Circular Convolution
(1) Definition ① Linear convolution BGL/SNU
214
Rectangular window of length N
② Circular convolution N Rectangular window of length N Periodic convolution N BGL/SNU
215
(2) Comparison N H[n] 2N 2N Omit chap. 8.7
216
Test signal for computing DFT and DCT
8. Discrete cosine transform (DCT) Definition - Effects of Energy compaction BGL/SNU Test signal for computing DFT and DCT
217
(a) Real part of N-point DFT; (b) Imaginary part of N-point DFT; (c) N-point DCT-2 of the test signal BGL/SNU
218
Comparison of truncation errors for DFT and DCT-2
BGL/SNU
219
Appendix: Illustration of DFTs for Derived Signals
BGL/SNU
220
BGL/SNU
221
BGL/SNU
222
BGL/SNU
223
BGL/SNU
224
Chapter 9. Computation of Discrete Fourier Transform
9.1 Introduction 9.2 Decimation-in-Time Factorization 9.3 Decimation-in-Frequency Factorization 9.4 Application of FFT 9.5 Fast Computation of DCT 9.6 Matrix Approach 9.7 Prime Factor Algorithm BGL/SNU
225
1. Introduction BGL/SNU
226
BGL/SNU
227
BGL/SNU
228
- Example of fast computation
BGL/SNU
229
BGL/SNU
230
2. Decimation-in-Time Factorization
BGL/SNU
231
BGL/SNU
232
BGL/SNU
233
BGL/SNU
234
Decimation-in-time FFT flow graphs
BGL/SNU
235
Decimation-in-time FFT flow graphs
BGL/SNU
236
Decimation-in-time FFT flow graphs
BGL/SNU
237
3. Decimation-in-frequency Factorization
(Sande- Tuckey) FFT BGL/SNU
238
g(n) h(n) g[0] x[0] X[0] g[1] g[2] g[3] h[0] h[1] h[2] h[3] x[1] x[2]
239
Final flow graph x[0] X[0] BGL/SNU x[1] x[2] x[3] x[4] x[5] x[6] x[7]
240
-Remarks # Stages # butterflies # computations inplace computations output data ordering : bit-reversed -Question The flow graph for D-I-F is obtained by reversing. The direction of the flow graph for D-I-T. Why? -Omit Sections BGL/SNU
241
4. Applications of FFT (1) Spectrum Analysis -
is the spectrum of x[n] , n=0,1,…,N-1 - Inverse transform can be done through the same mechanism i) Take the complex conjugate of X[k] ii) Pass it through the FFT process, But with one shift right(/2) operation at each stage iii) Finally, take the complex conjugate of the result BGL/SNU
242
- Operation reduction :
(2) Convolution ( Filtering ) h[n] x[n] y[n] N N N x[n] N n h[n] N n #computation(multi)? 1+2+…+N+N-1+…+1+0 =N2 y[n N n
243
-Utilize FFT of 2N-point
~ h[n] N N n x[n] N N n y[n] N-2 2N n R2N[n] 1 N-1 n ~ 2N-pt DFTs BGL/SNU
244
X[k] 2N-pt FFT x[n] Y[k] 2N-pt IFFT y[n] 2N-pt FFT h[n] H[k] 2N # operation (multi) operation reduction : BGL/SNU
245
(3) Correlation /Power Spectrum
2N-point DFTs # Operation : Power spectrum P[k] = X[k] X*[k] BGL/SNU
246
$ Comparison of # computation
Direct Computation 106 1M 250k 105 FFT-based Convolution Correlation 62.5k 104 35k 16k 16k 7.25k FFT 103 3.3k 5k 2k 1k 102 0.45k 10 1 N 512 1024 BGL/SNU
247
5. Fast Computation of DCT
BGL/SNU
248
- Example: Lee’s Algorithm (1984, IEEE Trans , ASSP, Dec) 1D x[0]
BGL/SNU
249
- Example: 2D DCT Algorithm (1991, N.I.Cho and S.U.Lee)
Separable Transform NxN 2D DCT = N 1-D DCT into row direction followed by N 1-D DCT into column direction. Totally 2N 1-D DCT (each N-point) are required. BGL/SNU
250
Fast Algorithm reduces the number of 1-D DCTs into N.
By using the trigonometric properties, 2D DCT is decomposed into 1-D DCTs.
251
Signal flow graph of 2-D DCT
8x8 DCT 4x4 DCT
252
6. Matrix Approach · Decimation-in-time BGL/SNU
253
BGL/SNU
254
· Decimation-in-frequency
BGL/SNU
255
· General expression for N=2 case
256
· Extension to general N (Cooley/Tuckey)
BGL/SNU
257
· # computations (complex)
BGL/SNU
258
7. Prime Factor Algorithm (Thomas/Good)
(1) Basics from Number Theory Euler’s Phi function Euler’s Theorem If ( a , N ) = 1 , then a f ( N ) = 1 mod N . ( eg ) a = 5 , N = 6 , f ( N ) = 2 , a f ( N ) = 25 = 1 mod 6 Chinese Remainder Theorem (CRT)
259
Second Integer Representation (SIR)
BGL/SNU
260
BGL/SNU
261
(2) Prime Factor Algorithm
Set Then BGL/SNU
262
Therefore Note that the only difference is in the “twiddle factor” BGL/SNU
263
(3) Comparison Example 12-Point DFT (N=12, p=3, q=4)
C/T : Cooley/Tuckey T/G : Thomas/Good · Transform · Index Mappings
264
· Diagram X ( k , k ) (0,0) (0,0) (0,0) 3 3 (1,0) (0,1) (0,1) 4 4 6 6
1 ) , ( n k x 1 2 ) , ( k x X ( k , k ) (0,0) 4pt DFT 3pt DFT 1 (0,0) (0,0) 3 3 (1,0) (0,1) (0,1) 4 4 6 6 (2,0) (0,2) 9 9 (3,0) (0,3) (0,2) 8 8 3pt DFT (1,0) 1 9 (1,1) 5 1 4 1 (0,1) 4pt DFT (1,0) (1,2) 9 5 7 4 (1,1) (1,1) 10 7 (2,1) (1,2) 3pt DFT (2,0) 2 6 1 10 (3,1) (1,3) (2,1) 6 10 (2,2) 10 2 8 2 (0,2) 4pt DFT (2,0) 3pt DFT (3,0) 3 3 11 5 (1,2) (2,1) (3,1) 7 7 2 8 (2,2) (2,2) 5 11 (3,2) (2,3) (3,2) 11 11 T/G C/T C/T C/T T/G BGL/SNU
265
Radix-4 algorithm - Radix-2 algorithms: algorithms in textbook :
BGL/JWL/SNU
266
- Radix-4 butterfly BGL/JWL/SNU
267
- Radix-4 butterfly -j -1 j -1 1 -1 j -1 -j BGL/JWL/SNU
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.