디지털신호처리 digital signal processing 전남대학교 공과대학...
TRANSCRIPT
디지털신호처리DIGITAL SIGNAL PROCESSING전남대학교 공과대학 전자컴퓨터공학부 김진영2010.3.
DSP Introduction
왜 DSP 인가 ? : 통신의 역사 1
1790 semaphore lines
490 BC heliograph19C signal lamp
1150 homing pigeon
왜 DSP 인가 ? : 통신의 역사 2
우리나라의 통신정낭 : 3bits
봉화
왜 DSP 인가 ? : 통신의 역사 2
1895 년 마르코니(Marconi) 는 최초
의 무선 시스템을 시작하였다 . 마르
코니의 초기spark-gap 송신기
는 매우 낮은 주파 수에서부터 단파대
이상 까지의 넓은 스펙트럼을 점유하
였으며 이들 시스템 은 수동으로 시간
도메인에서 모르스 부호를 사람들이 송
· 수신함으로써 동작하였다 .
왜 DSP 인가 ?
All communications circuits contain some noise. This is true whether the signals are analog or digital, and regardless of the type of information conveyed. Noise is the eternal bane of communications engineers, who are always striving to find new ways to improve the signal-to-noise ratio in communications systems. Traditional methods of optimizing S/N ratio include increasing the transmitted signal power and increasing the receiver sensitivity. (In wireless systems, specialized antenna systems can also help.) Digital signal processing dramatically improves the sensitivity of a receiving unit. The effect is most noticeable when noise competes with a desired signal. A good DSP circuit can sometimes seem like an electronic miracle worker. But there are limits to what it can do. If the noise is so strong that all traces of the signal are obliterated, a DSP circuit cannot find any order in the chaos, and no signal will be received.
Battle against Noise
Contents
DSP definition and application Frequency and sinusoids Discrete time signals Basic DSP operations Discrete time systems DSP system
Digital Signal
What is Signal? Any physical quantities that varies with time,
space or any other independent variable Carriers of information
Classification of signals Scalar vs. vector Continuous-time vs. discrete-time Continuous-valued vs. discrete-valued Deterministic vs. random
Digital Signal=discrete-time+discrete-valued
DSP 정의 및 응용
System and Signal processing System
a Physical device that performs an operation on a signal : Extracting or enhancing the useful information from a mix of conflicting information
Signal processing Any operation on signal : software and
hardware Digital Signal Processing : any operation on
digital signal
DSP 정의 및 응용
Why DSP
Guaranteed accuracy: better control of accuracy requirements
Perfect reproducibility Stable processing capability: no drift in
performance with temperature or age Greater flexibility Superior performance Cheaper Portability: using software running
DSP 정의 및 응용
Disadvantage of DSPDSP 정의 및
응용
Speed Bandwidths in the 100MHz range is still
processed only by analogue device Design time Quantization error Finite wordlength effect
DSP Category
Digital Signal
Analysis Digital filter
∙Spectrum analysis∙Speech Recognition∙Speaker verification∙Target detection
∙Removal of unwanted background noise∙Removal of interference∙Separation of frequency bands∙Shaping of the signal spectrum
ApplicationDSP 정의 및
응용
Image processing: pattern recognition, robotic vision, image enhancement, facsimile, satellite weather map, animation
Instrumentation/control: spectrum analysis, position and rate control, noise reduction, data compression
Speech/Audio: speech recognition, speech synthesis, digital audio, equalization
Military: secure communication, radar & sonar processing, missile guidance
Telecommunications: echo cancellation, adaptive equalization, codec, spread spectrum, video conference, data communication
Biomedical : patient monitoring, scanners, EEG brain mapers, ECG analysis, X-ray storage/enhancement
Etc
Frequency?주파수 개념 및
삼각함수들
Definition 1. Physics: The rate at which a repeating event
occurs, such as the full cycle of a wave. Frequencies are usually measured in hertz. Compare amplitude. See also period.
2. Mathematics: The ratio of the number of occurrences of some event to the number of opportunities for its occurrence.
Why sinusoids?
The most basic signals in the theory of signals and systems
Sinusoidal function is an eigen-function of the linear system
주파수 개념 및 삼각함수들
Continuous/discrete-time sinusoidal signal
Continuous-time
Discrete-time
주파수 개념 및 삼각함수들
Continuous/discrete-time sinusoidal signal
주파수 개념 및 삼각함수들
Phasor 1
Phasor vector: a representation of a sine wave whose amplitude(A), phase(θ) and frequency(ω)
Rotating phasor interpretation
Phasor addition
주파수 개념 및 삼각함수들
))(( )(~)(
)(~
0)(
)(
0
00
ttAetxAeXXe
eAeAetx
tj
jtj
tjjtj
)180/79.141)10(2cos(532.1)()()()180/200)10(2cos(9.1)(
)180/70)10(2cos(7.1)(
213
2
1
ttxtxtxttxttx
Phasor 2
Phasor arithmetic Scalar multiplication
Differentiation and integration addition
주파수 개념 및 삼각함수들
Phasor 3
http://en.wikipedia.org/wiki/Phasor_(electronics)
주파수 개념 및 삼각함수들
Types of Sequence
Unit sample sequence Unit step function Real-valued exponential sequence
(Geometric series) Complex-valued exponential sequence Sinusoidal sequence Random sequence Periodic sequence
이산 - 시간 신호
Some useful sequence
Unit sample synthesis Even and odd synthesis
이산 - 시간 신호
( ) ( ) ( )x n x k n k
( ) ( ), ( ) ( )
( ) ( ) ( )
1( ) ( ) ( )
21
( ) ( ) ( )2
e e o o
e o
e
o
x n x n x n x n
x n x n x n
x n x n x n
x n x n x n
DSP Operation 1
Signal addition Signal multiplication Scaling Time shifting and advancing Sample summation Sample product
Signal energy and power (signal measure)
주요 DSP 조작
1 2( ) ( )x n x n
1 2( ) ( )x n x n
( )x n( ) ( )
( ) ( )
y n x n k
y n x n k
2
1
( )n
n n
x n
2
1
( )n
n n
x n
* 2 2
0
1( ) ( ) | ( ) | , | ( ) |
N
x xn
E x n x n x n P x nN
DSP Operation 2
Convolution
Correlation
Digital filter
Discrete transform: discrete Fourier transform
Modulation: digital modulation
주요 DSP 조작
( ) ( ) ( ) ( ) ( )k
y n h n x n h k x n k
( ) ( ) ( ) ( ) ( )k
y n h n x n h k x k n
0
( ) ( ) ( )n
k
y n h k x n k
Properties of discrete time system1 Static v.s dynamic systems
Static: memoryless
Dynamic: memory
Time-invariant vs. time-variant systems (Def) Time-invariant(shift invariant) iff
x(n)→y(n) implies that x(n-k) →y(n-k) for every input signal x(n) and every time shift
(test) y(n,k)=H[x(n-k)] if y(n,k)=y(n-k) for all possible k: time invariant
Discrete time system
3( ) ( ), ( ) ( ) ( )
( ) [ ( ), ]
y n a x y n nx n bx x
y n F x n n
0
( ) ( ) 3 ( 1); finite memory
( ) ( ); infinite memoryk
y n x n x n
y n x n k
Properties of discrete time system 2
(Ex) time-multiplier
Linear vs. nonlinear systems (Def) A system H is linear iff H[a1x1 (n)+a2x2 (n)]=a1H[x1 (n)]+a2H[x2 (n)]
( ) [ ( )] ( )
1) ( , ) [ ( )] ( )
2) ( ) ( ) ( ) ( ) ( )
1) 2) time variant
y n h x n nx n
y n k H x n k nx n k
y n k n k x n k nx n k kx n k
Discrete time system
Properties of discrete time system 3 Causal vs. noncausal systems
(Def) causal if the output of the system at any time n depends only on present and post inputs; y(n)=F[x(n),x(n-1),x(n-2),….]
(ex) y(n)=x(-n): noncausal Stable vs. unstable system
(Def) Bounded input-bound output(BIBO) iff every bounded input produces a bounded output;
Discrete time system
| ( ) | | ( ) |x yx n M y n M
Properties of discrete time system 4 Invertible linear system
(TH) L:X→Y be an invertible linear transformation of X onto Y, where X, Y are linear spaces, then L-1 is linear
(proof)
Discrete time system
Linear System 1
General linear system
Linear time-invariant (LTI) system: an input-output pair, x(n) and y(n), is invariant to shift in time n.
Discrete time system
( ) [ ( )] [ ( ) ( )] ( ) [ ( )]k k
y n L x n L x k n k x k L n k
[ ( )]: the response of a linear system at time n due to a unit sample
at time k, denoted by ( , ) ( ) ( ) ( , )k
L n k
h n k y n x k h n k
( ) [ ( )] ( ) ( ) ( ) ( ) ( ) ( )n n
y n L x n x k h n k x n h n h k x n k
Linear System 2
Why difference equations:
Difference equations: An LTI system can be described by a linear constant coefficient difference equation of the form.
Discrete time system
0 0
0 1
( ) ( )
( ) ( ) ( )
N M
k mk m
M N
m km k
a y n k b x n m
y n b x n m a y n k
0 0
( ) ( ) ( ) ( )( ) lim lim
( ) (( 1) )
t t
d x t x t t x t t x tx t
dt t tx nT x n T
T
0 0
( ) ( )k kN M
k kk kk k
d da y t b x tdt dt
Block diagram of DSP system A/D conversion DSP DA conversion
Digital signal processing system
Block diagram of a simplified, generalized real-time digital signal
processing system
Analog-to-digital conversion process 1 A/D process
The (band limited) signal is first sampled in time (t=nT, x(nT)→x(n))
The amplitude of each signal sample is quantized into one of 2B levels
The discrete amplitude levels are represented or encoded into distinct binary words each of length B bits
Digital signal processing system
Sampling 1
Sampling Sampling theorem: If the highest frequency
contained in an analog signal xa(t) is Fmax=B and the signal is sampled at a rate Fs≥2fmax=2B, then xa(t) can be exactly recovered from its sample values using the interpolation function g(t)=(sin2πBT)/(2πBT). Thus xa(t) may be expressed as
where xa(n/Fs)=xa(nT)=x(n) are the samples of xa(t).
Digital signal processing system
0
( ) ( / ) ( / )M
a a s sm
x t x n F g t n F
http://en.wikipedia.org/wiki/File:Sinc_function_(normalized).svg
Sampling 2
Xs(f)=XaⓧP(f) where P(f) is periodic signal in frequency domain with period Fs, because
If Fs<Fmax, aliasing occurs. If Fs<Fmax, anti-aliasing filters
are necessary.
Digital signal processing system
( ) ( ), ( ) ( )s s sk k
P f A f F k X f X f F k
0
0
/ 2
/ 2
0
2 /
1 1[ ] ( )
2( ) ( )
Tjk t
T
k
T
P k t e dtT T
P j kT
Sampling 3Digital signal processing
system
Sampling 4Digital signal processing
system
622x756 pixels
205x250 pixels (Moire pattern of bricks)
Quantization and encoding 1 Linear quantization
v(t)=(Vfs/2)sinωt=Asinωt Quantization step=q=Vfs(2B-1)≈Vfs/2B=2A/2B
Quantization error
Signal-to-quantization noise power ratio(SQNR)
Digital signal processing system
2/ 2 / 22 2 2
/ 2 / 2
1( )
12
q q
e q q
qe P e de e de
q
2 2 2
2 2
/ 2 ( 2 / 2) / 2 3 210log 10log 10log
/12 /12 2
6.02 1.76( )
B BA qSQNR
q q
B dB
Quantization and encoding 2
Quantization of a signal for 4bit PCM
Digital signal processing system
Digital-to-analog conversion process: Signal recovery 1 Basic idea: Because there is no ideal low
pass filter, the perfect reconstruction is impossible and the impulse signal is not possible in real world ( 참조 )
Real implementation
Anti-imaging filter: Attenuate the high frequency image spectrum(post-filter)
Digital signal processing system
( ) ( )sinc[ ( )]a s sn
x t x n F t nT
Digital-to-analog conversion process: Signal recovery 2 ( 참조 )
Zero-order hold(ZOH) interpolation
Digital signal processing system
0
( ) ( ), ( 1)
1, 0( )
0, otherwise
a s s
s
x t x n nT t n T
t Th t
Digital signal processing system
Digital-to-analog conversion process: Signal recovery 3
First-order-hold(FOH) interpolation
1
, 0
( )( ) 1 , 2
0, otherwise
ss
ss s
s
tt T
T
t Th t T t T
T