Title: ???????????????????????? Advanced Digital Signal Processing Chapter 1 Introduction to ADSP
1????????????????????????Advanced Digital Signal
ProcessingChapter 1 Introduction to ADSP
- Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD,DIC
- Department of Electronic Engineering
- and
- Graduate School of Electrical Engineering
- Mahanakorn University of Technology
2Course Web page
- http//embedsigproc.wordpress.com/eeet0772/
3What is DSP ?
- ?????? (Signals) ??? ???????????????????????????
??????????????????? ??????????????????
???????????????????????? ????????????????????? - ???????????? ???????? ????????? ???????????
????????? ??????????????????? ???????????
????????????????? ????????? ????????? ??? ?????
?????????...
4Digital Signal Processing v.s. Advanced Digital
Signal Processing
- Digital Signal Processing ????????? (Process)
??????????????????????????? ????????? (signals)
????????????????????????? ?? ?? ???? ???? ??????
??????????????????????????? (deterministic
signals) - Advanced Digital Signal Processing ?????????
DSP ?????????????????????? (Random Signals)
5Radar System
- ?????????? ?????????????????????????
????????????????????? (delay) ????????????????????
?????????????????
?????????????????
???????????????????????????
6Transmitted and Received Sine Radar Signal
- ??????????????????????? ????
??????? ???? ????? ?????????????
(???????????????????? ????) ??????????????????????
? ??????????
7Received Radar with Noise
- ?????????????????????????? ??? ?????? Noise
??????? - ??????????????? ????????????????????? (??????)
??????????????????????? - ?????????????????????????????????????????????
(Operation) ????? ??????????????????????????
Noise
8Correlation
- ????? Correlation ???????? ????????????
???????????? - ????????? ?????? Correlation ???
- ???????? ??? ???????????? (???? Integration)
A
A
X
C
C
B
B
9Detected Radar SignalNo Noise
- ?????? Correlation ???????????????????????????????
????????????? ????????? Noise
A
B
10Detected Radar SignalWith Noise
- ??????????????? Correlation ???
????????????????????????????????? delay ?????????
Noise
C
A
B
11Mobile Communication
- ??????????????????????
- ?????????????? Channel
- ????? channel ?????????? ?????????? Multipath
channel
1
2
12Channel Model
- ?????????????????????????????? FIR
Multipath Channel (FIR)
13Equalisation of Signal
- ?????????????????????????? ????????????????
Multipath Channel
Equaliser
14Continuous-Time V.S. Discrete-Time Signals
15Sampled Signal
- ?????????????? sampled output ????????????
??????
Input
Sampled Output
16Other Discrete-time
17DSP System Block Diagram
DSP Processor
A/D
D/A
18Sampling
- ????????????? x(t) ?????????????? x(n)
- ?????????? x(n) ?????????
???????????????
...
19Combination of Sampling
- ?????? x(n) ?????????? s(n) ??? ?????? x(t)
- S(n) ????????? ????????????? ??? ????????
t
n
n
T
20Elements of the Sampling Signal
- S(n) ??????????????????????
n
s(n)
n
n
T
n
n
T
2T
3T
21An Impulse is Delta Function
- ???????? ??? ??????????????
?????? 1 ????? n0 - ??? ?????? 0 ????? n ????????????
- ?????????
1
????????
n
0
22- ????????????????????????? s(n) ??????????????????
1
????????????????????????????
n
0
1
?????????????????????????????? 1 ?????
n
1
0
23Summing of Shifted Delta
n
n
n
n
T
2T
3T
0
n
24Sampling SignalsSumming of Impulses
- ?????????????????????????????????????
????????????????????????????????????????? - ???? ?????????????????????????????
25Discrete-time Signal x(n)
- x(n) ???????? ???????? x(t) ??? s(n)
n
X
t
n
26System with Delta function
???????????????
????
27Sampled Signal
n
n
n
n
1
2
0
3
28System with Delayed Delta function
???????????????
????
29Delayed Signal
n0
n1
n2
n3
1
2
0
3
30Convolution
- ???????????????? ???????????????????????????
- ?????????????????????????? Convolution ????
?????????
????
31Convolved Signal
n0
n1
n2
n3
1
2
0
3
1
2
0
3
32Convolution Effect
????? h(1)
????? h(0)
?????????
???????????????????
33Nyquist Frequency
- ??????????????????????????????????????? 2
???????????????????????? - ????? Fs ??????????? sampling ??? B
????????????????? - 2B ????? ????????????? (Nyquist Rate)
- ??? ????? Fs/2 ??????? ??????????????? (Nyquist
Frequency)
Fs gt 2B
34Aliasing
- ???????????????????????????????????????? ???????
- ????? ????????? (moire pattern) ????????????????
???????? Image processing
??????????????????
?????????????????????
35Signal Reconstruction
- ????????????????????????????????? (filter)
??????????? copy ????? - ?????????????????? copy ?????????
filtering
f
f
36Fourier Transform Pair
sinc(t)
Rectangular(f)
FT
f
t
sinc(f)
Rectangular(t)
FT
f
t
37DFT Discrete Fourier Transform
- ??????????????????????????????????????
??????????????????????????????? - Fourier Transform ?????????????????????????? (t)
?????????????????? (f)
FT
t
???????
????
38Time Domain Signal and its Frequency
- ???????????????? time domain
-
39DFTs of Various Functions
- ???? DC ????? ????????
- ???? ???????? ????? DC
- ???????????
- ???? sine
- ?????????
40DFT Fundamental
- ????????? FT ??????????????????????
- DFT ???? FT ??????????--?????????????????????????
x(t)
FT
t
f
x(n)
DFT
n
k
41DFT Frequency
radians
0
f
Fs
Fs/2
Hz
fnorm
0
1
1/2
42Number of Points in DFT
- ????????? DFT ??????????? ???????????? ????? k
- N ???? ???????? (N-point) ??? DFT
4-point
0
1
2
3
k
????????? DFT ??? x(n)
????????? FT
438-point DFT
- ????????????????????????????? 8 ???
????????????????????
8-point
k
0
1
2
3
????????? DFT ??? x(n)
????????? FT
4416-point DFT
- ????????????????????????????? 16 ???
???????????????????? ??????????? resolution
16-point
k
15
0
8
????????? DFT ??? x(n)
????????? FT
45FFT Fast Fourier Transform
- FFT ?????????????????????? DFT ?????????????
??????????????????????????????????? - ??????????
- ????????? Matlab ??? Simulink ?????????????????
????????????? DFT ?????????? FFT
FFT DFT
46Fourier Series
- ??????????????????? (Fourier) ???????????????????
???????????????????? (periodic) ??? ????
??????????????????????????????????????????????????
?? ??? Sine ??? Cosine ???????????????????????? - ??????????????????????????????? ??????????????
(Fourier Series)
47Fourier Series of Square Wave
- ?????????????? ??????????
- ????????? ?????????????????
?????????
????????????
48Fourier Series of Sawtooth
- ??????????? ?????????????????????? ??. ????
- ????????????????????????(Sawtooth)
49Part IIDigital Filters Design
50Digital Filters
- ?????????????? (Digital Filters) ???
??????????????????? ??????? ??????
??????????????? ??? ???????? - ???????????????????? Finite Impulse Response
(FIR) ??? Infinite Impulse Response (IIR) - ?????????????? ?????????? ????????????? ??????
???????????? ??? ???????????? - FIR ???????????? feedback
- IIR ?????? feedback
51Finite Impulse Response (FIR)
- FIR ???????????? feedback
Delay
52Infinite Impulse Response (IIR)
Feedback
53Transfer Function I
- ??????????????? (transfer function) ???
??????????????????? ??????? z ???????????
?????????????? - ??????? z ????????????????????????
z -Transform
????????? ???????????? k ?????????????? z-k
54Transfer Function VS Frequency Response
???????????????
??????????????????????????????????? ???????
????? (zero) (o) ??? (pole) (x)
55Z-Transform
?????????????????????
??????????????????????????
56Frequency Response from Poles and Zeros
- ???????????????????????? ????????????
???????????????????? ??????? ?????????????????????
????????? ? ????????????
A
B
???????
57Example for Frequency Response
???????? ??? .8 ????? 0
??????????
????????????
??????????
B
A
B
A
A
B
B gt A
B A
B lt A
???
?????
????
58Example for Frequency Response
???????
59Basic Filter Topology
Lowpass filter (LPF )
Highpass filter (HPF)
Bandpass filter (BPF)
Bandstop filter (BSF)
60FIR Filter Design
Ideal lowpass
61FIR Filter Design Parameters
Ideal
???????
???????
??? ???????
62FIR Design with Window Method
- ????????? FIR ??????????????????????????????????
????????????????????????????? - ??????????? Sinc Function ????????????????????????
???????? inf ??? inf ????????????????????? nlt0
????
Sinc function
Inverse FT
f
63Realizable Filter
- ?????????????????????? ??? sinc ??? ????????
????????
w(n)
Sinc function
1
x
f
n
0
N-1
h(n)
?????????????????? ???????????????????????
n
0
N-1
64Different Windows
- ???????????????? ????????????????????????
1
1
1
n
n
n
0
N-1
0
N-1
0
N-1
Rectangular
Hamming
Kaiser
65Windows Performance
Big sidelobes Narrow transition
Small sidelobes Broad transition
66Analogue Filter Prototypes
- ??????????????????????????????????????????????????
- ????????????????????????
- ????????????????????????????????????????????
???????????? - Butterworth, Chebychev, Elliptic
67IIR Filter Design
0 dB
-3 dB
????????????? ???
Cutoff Frequency
Attenuation Frequency
68Filter Design and Analysis (FDA) Tool
- ?????? FDA Tool ?? Signal Processing Toolbox ???
MATLAB ?????????????? digital filter
??????????????? - gtgtfdatool
69FIR Design by FDA Tool
- ???????? ????????? FIR ???????????????????
- ????????????????????????????????
- ????????????
- ?????? (order)
70FIR Design by FDA Tool
Realize Filter
Realize Filter
71Frequency Response of Filter
Lowpass
Lowpass
72Two ways to find Freq. Resp.
- ???????????????????????????????? --- Chirp Signal
- ?????????????????? ??????? --- White Noise
Lowpass
Chirp
Lowpass
f
f
73White Noise Generator
- ?????????????????????????????????????????? ???
??? Random Source
time
frequency
74Lab 4 Filter Testing
- Chirp Signal input ????????????? IIR
75Lab 4 Filter Testing
76Lab 4 Filter Testing
- Impulse response ??????? FIR
77Lab 4 Filter Testing
- ???????? Random Source ??? Digital Filter
Short-Time FFT
White noise Generator
???????
FFT
?????
78Lab 4 Filter Testing
- ?????????? ???????????????????????????????????????
?????
79Lab 5 FIR Design by Fdatool
- ?????????????????? FIR ???? fdatool
80Lab 5 FIR Design by Fdatool
81Lab 5 FIR Design by Fdatool
82Lab 5 FIR Design by Fdatool
83Lab 5 FIR Design by Fdatool
84Lab 5 FIR Design by Fdatool
85Lab 5 FIR Design by Fdatool
86Lab 5 FIR Design by Fdatool
- ??? export ?????????????????????? simulink
87Lab 5 FIR Design by Fdatool
88Lab 5 FIR Design by Fdatool
- ???????? sine wave ??? scope ?????
89Lab 5 FIR Design by Fdatool
90Lab 5 FIR Design by Fdatool
91Lab 5 FIR Design by Fdatool
92Lab 5 FIR Design by Fdatool
10,800 Hz -6 dB (0.5V)
93Lab 5 FIR Design by Fdatool
15,100 Hz -20 dB (0.1 V)
94Lab 5 FIR Design by Fdatool
95Lab 5 FIR Design by Fdatool
96Lab 5 FIR Design by Fdatool
97Lab 5 FIR Design by Fdatool
10.8 kHz -6 dB
98Lab 6 IIR Design by Fdatool
- IIR design ???????????? Butterworth
99Lab 6 IIR Design by Fdatool
- ?????????????? order ??????
-3 dB _at_Fc
100Lab 6 IIR Design by Fdatool
101Lab 6 IIR Design by Fdatool
102Lab 6 IIR Design by Fdatool
103Lab 6 IIR Design by Fdatool
104Lab 6 IIR Design by Fdatool
105Lab 6 IIR Design by Fdatool
- ??????????????????????????????????????????????????
106Lab 6 IIR Design by Fdatool
107Lab 6 IIR Design by Fdatool
108Lab 6 IIR Design by Fdatool
- ?????????? sos2tf ?? MATLAB
109Lab 6 IIR Design by Fdatool
110Lab 6 IIR Design by Fdatool
12 kHz -3 dB
111Part IIIFundamental of Random Signals
112Random Signals
- ??????????????????????????????????????????????
- ??????????????????????????????????????????????
(Random Signal) - ???????????
??????????? Matlab
113Statistics Values
- ???????????? ??? spectrum ????????????????????????
???? ??? - ?????? ???????? (Statistics)
- ????????? (Mean)
- ??? Correlation
114Expectation Value
- ?????????????????? (mean) ???? ???????????????????
Ex(n) ?????????? (expected value) ?????????
115Correlation
- ??? correlation ??????????????????????????????????
??????????????? ?????????????????????? - ??????????????????????????????????????????????
- ?????????????????????????????????? ??????????
(expectation value) - ??????????? correlation ??? A ??? B ?? ?????????
Cross-correlation
Auto-correlation
E Expectation operator
116Auto and Cross correlation
- Autocorrelation
- Cross-correlation
A
C
A
A
D
B
117Random Signal
- ???????? ?????????? (???? ????????) ??????????
118AutoCorrelation
- ?????????? autocorrelation ??? ??????????
A
A
119Different Signals
- ??????????????? B ??? ????????? A
120Different Random Signals
A
A
A
B
A-A
A-B
121Cross Correlation
- ?????????????????????????????????????
(????????????) ??? ??????? ???????????? cross
correlation ??????????
A
B
122Cross Correlation
- ??????????????????????????? ????? crosscorrelation
A
C
123Communication Signal
- ????????????????????????? ???? ???????????????????
??????????????????????????????? (information) - ?????????????? (Information Theory) ??? C.E.
Shannon ???? ?????????????????????????????
?????????????????????????????????
1
0
1
0
1
0
1
1
1
0
0
1
????????????? ??????????
124Cross Correlation ApplicationCode Division
Multiple Access (CDMA)
DATA
1
1
0
.
0
1
0
1
1
1
Modulation
X
Code
Chip
1
.
1
0
1
0
1
0
1
1
1
0
1
1
Bit 1
Bit 2
125CDMA Receiver
Bit 2
Chip
Bit 1
1
.
1
0
1
0
1
0
1
1
1
0
1
1
0
1
0
1
1
1
X
Correlation
Code
Integration
1
1
0
126Simulink Model of CDMA
- Note ???????????? ?????? 1 ??? -1 ????????? 1
??? 0 ????????
127Decoding
?????? mod
?????? Demod
Code ???????
?????? mod
?????? Demod
Code ??????????
128Adaptive Signal Processing
- ????????????????????????????????? ??????????
???????? ?????? ??????????????????????????????
(adaptive signal processing) - ?????????????? ????????????????????????? ????
- ????? channel ???????? Equalisation
- ????? room ??????????? Echo Cancellation
- ????? transfer function ?????????????????? ecg
129Channel Equalisation
Multipath Channel
????? multipath
I)
1
0
1
0
1
?? multipath
II)
1
2
0
1
?
?
130Transfer Function
- ?????????????? channel ???????????????? z
- ????????? multipath H(z) 1
- Multipath ?????????????????????????????????
- ?????????????????????? Multipath ???????????????
H(z)1
????? multipath
1
z
f
t
?? multipath
1
H(z)?
z
2
f
t
131Basic Equalisation I
- ?????? Equaliser ???????????? channel ???
- ????? H(z) ???? 1 ????????? inverse
Channel
Equaliser
H(z)
1/H(z)
132Basic Equalisation II
- ??????? ??????? channel H(z) ???????????????????
????????? error
d
y
x
Channel
e
Adaptive Equaliser
-
H(z)
1/H(z)
133Adaptive Algorithm
??????? ??????? ???? ????????????????
???????? Least-Mean Square (LMS) algorithm
134LMS Algorithm Block
Normalization
135Adaptive Equalisation
- ??????????????????? LMS ????????? Adaptive
Equaliser
136Noise Cancellation
- ???????????????????????????????????
- ????????????????????????? ??????? ?????????????
137Basic of Noise Cancellation
- ?????????????????????????????????????????
- Active Noise Canceller ???????????????????????????
????? DSP
n
???????????
-n
Loudspeaker
n
Pilot Mic
???????????
Feedback ANC
138Active Noise Cancellation Headphones
- ????????? ANC ?????????? ??? ?? Headphones
LX-18 Active Noise Cancelling Headphones
139Diagram of Active Noise Cancellation Headphones
Quiet Zone
Pilot Mic
n
1
n
2
1. ?????????? n ??? Ext.Mic 2. n ?????????????? n
??? H(z) ??? Pilot Mic. 3. ANC ??????????? y ????
n ?????????? (??? n)
H(z)
3
Ext.Mic
y
H(z) ???????????? Acoustic
140ANC
n
Loudspeaker
Pilot Mic
Exterior Mic
FIR
n
y
e
Algorithm
ANC
141ANC Simulink Model
142Adaptive Time Delay Estimation
- ????????????????? Adaptive Time Delay
d
d
y
x
error
Adaptive Equaliser
-
Delay
Noise
143ADTE Simulink Model
?????????????????????? ??????????????????????
9
9
144ECG Measurement
- ?????? ECG ?????????????????? ???????????????????
?????????? ??? ?????
145ECG Signal
- ??? Matlab ?????????? ecg
146ECG Measuring Circuit
- ???????????????????????????????? ECG
147Diagram of ECG Measurement with Noise
3
ECG
???????
????????????? 220 V ?????????????????? H(z)
1
2
ECG Sensor
H(z)
50 Hz
220 Vac 50Hz
H(z) ????Transfer Function ??????????
50 Hz
4
14850Hz Notch Filtering
- ??????????????????? 50 Hz ???? Notch filter
From ECG Sensor
Filtered ECG
Notch Filter
50 Hz
f
50 Hz
149Lab 7 50Hz Canceling in ECG
- ?????? Notch filter ???? Fdatool ??????? Simulink
Fpass2 55 Hz
Fpass1 40 Hz
Fstop2 60 Hz
50Hz
Fstop1 45 Hz
50 Hz
f
150Lab 7 50Hz Canceling in ECG
- ???? 50Hz Canceling ???? Notch filter
Notch Filter
151Lab 7 50Hz Canceling in ECG
152Lab 7 50Hz Canceling in ECG
- ?????????????????????? distortion ????
????????????? sine ??????? ???? ????? clipping
Transfer Function??????????
Nonlinear Wave
153Lab 7 50Hz Canceling in ECG
154Lab 7 50Hz Canceling in ECG
- ?????????? adaptive filter ????????? nLMS
155Lab 7 50Hz Canceling in ECG
????????? ????
156Conclusion
- Matlab ??? Simulink ?????????????????????????????
DSP ??????????????????????????? - DSP BLockset ?????????????????????????????????????
????? DSP??????????? - ?????? DSP ???? Matlab Simulink ??? DSP BLockset
??????????????????????? ??????????????????????????
????????????????????? - ??????????? DSP ??????????????????????????????????
?????????
157Thank You