Beruflich Dokumente
Kultur Dokumente
Lesson #1: A big picture about Digital Signal Processing Lesson #2: Analog-to-Digital and Digital-to-Analog conversion
Lesson #3: The concept of frequency in CT & DT signals Duration: 5 hrs
Duration: 1 hr
Outline: 1. Signals
Learning Digital Signal Processing is not something you accomplish; its a journey you take.
Signals
1-D signals
EEG ECG
Speech signal
Color image
Binary image???
Grey image
Color image
(indexed image)
Duration: 1 hr Outline:
1. Signals 2. Digital Signal Processing (DSP) 3. Why DSP? 4. DSP applications
Modify this sequence of numbers by a computing process to change or extract information from the original signal
The "computing process" is a system that converts one digital signal into another it is a "discrete-time system or "digital system. Transforms are tools using in computing process
Continuous-time signal: - define for a continuous duration of time - sound, voice Discrete-time signal: - define only for discrete points in time (hourly, every second, ) - an image in computer, a MP3 music file - amplitude could be discrete or continuous - if the amplitude is also discrete, the signal is digital.
00
10
00
10
11
Analog signal
Digital signal
Processing
Analog signal processing
Processing
D/A
{ 1/3 1 7/3 -1 0 -1/3 8/3 1 } What is the relation between input and output signal?
Digital Signals
Analysis
Filtering
Measurement
Digital Signals
Duration: 1 hr Outline:
1. Signals 2. Digital Signal Processing (DSP) 3. Why DSP? 4. DSP applications
A/D and D/A needed aliasing error and quantization error Not suitable to high-frequency signal Require high technology
Duration: 1 hr Outline:
1. Signals 2. Digital Signal Processing (DSP) 3. Why DSP? 4. DSP applications
Radar
Biomedical
Analysis of biomedical signals, diagnosis, patient monitoring, preventive health care
Speech compression
Speech recognition
Communication
Digital telephony: transmission of information in digital form via telephone lines, modern technology, mobile phone
Image processing
Image enhancement: processing an image to be more suitable than the original image for a specific application
It makes all the difference whether one sees darkness through the light or brightness through the shadows
David Lindsay
Image processing
Image compression: reducing the redundancy in the image data
UW Campus (jpg) 13 kb
Image processing
Image restoration: reconstruct a degraded image using a priori knowledge of the degradation phenomenon
Music
Recording, encoding, storing
Playback Manipulation/mixing
Noise removal
Duration: 2 hr
Outline: 1. A/D conversion 2. D/A conversion
ADC
Sampling
Analog world
Sampling
Digital world
Sampling
Taking samples at intervals and dont know what happens in between cant distinguish higher and lower frequencies:
aliasing
To guarantee that an analog signal can be perfectly recovered from its sample value
Theory: a signal with maximum of frequency of W Hz must be sampled at least 2W times per second to make it possible to reconstruct the original signal from the samples Nyquist sampling rate: minimum sampling frequency Nyquist frequency: half the sampling rate Nyquist range: 0 to Nyquist frequency range
To remove all signal elements above the Nyquist frequency antialiasing filter
Anti-aliasing filter
magnitude
magnitude
frequency
0 W 2W =fs 3W 4W
Audio CDs:
Audio hi-fi, e.g., MPEG-2 (moving picture experts group), AAC (advanced audio coding), MP3 (MPEG layer 3):
Analog signal
Sample-and-hold signal
Quantization
Quantization step
Coding
1.5V
1.1V
1.25V
1.0V 0.82V 0.5V 0.0V
Level (V)
000
001 010 011 100
0.0
0.375 0.75 1.125
0.0-0.1875
0.1875-0.5625 0.5625-0.9375 0.9375-1.3125
1.5 1.875
2.25 2.625
1.3125-1.6875 1.6875-2.0625
2.0625-2.4375 2.4375-3.0
101 110
111
Level (V)
100
101 110 111 000
-5.0
-3.75 -2.5 -1.25
-5.0 -4.375
-4.375-3.125 -3.125-1.875 -1.875-0.625
0.0 1.25
2.5 3.75
-0.6250.625 0.6251.875
1.8753.125 3.1255.0
001 010
011
Quantization parameters
Number of bits: N
Full scale analog range: R Resolution: the gap between levels Q = R/2N
Quantization error = quantized value actual value Dynamic range: number of levels, in decibel Dynamic range = 20log(R/Q) = 20log(2N) = 6.02N dB
Signal-to-noise ratio SNR = 10log(signal power/noise power) Or SNR = 10log(signal amplitude/noise amplitude)
Noise
Q Q/2
After re-quantization
Non-uniform quantization
Quantization with variable quantization step Q value is variable Q value is directly proportional to signal amplitude SNR is constant
Most used in speech
Output
Nonuniform
Uniform
Input
1 ln( A s1 ( t ) ) 1 ln A
s2(t)
1
1.0
s1(t)
- 1.0
Step size
2
Part 1
000
Part 2
0000 ... 1111 0000 ... 1111 0000 ... 1111 0000 ... 1111 0000 ... 1111 0000 ... 1111
Decoding output
1 ... 31 33 ... 63 66 ... 126 132 ... 252 264 ... 504 528 ... 1008
001
010
011
16
100
32
101
64
110
96 ... 111
112 ... 127
128
111
2
3 4
5/8
4/8 3/8 2/8 1/8 8 0
5
6 7
1/16 1/8
1/4
1/2
1.0
Duration: 2 hr
Outline: 1. A/D conversion 2. D/A conversion
DAC
Anti-imaging filter
magnitude
Anti-imaging filter
Images
2W =fs
4W = 2fs
Functions:
x a (t )
A cos( t A cos(2 f t
), ),
Acos
t t
Plot:
xa(t)
Tp = 1/f
1. For every fixed value of the frequency f, xa(t) is periodic: xa(t+Tp) = xa(t)
Tp = 1/f: fundamental period 2. CT sinusoidal signals with different frequencies are themselves different 3. Increasing the frequency f results in an increase in the rate of oscillation of the signal (more periods in a given time interval)
xa (t )
A cos( t
A j( e 2
A e 2
j( t
Functions:
x (n )
A cos( n A cos(2 Fn
), ),
n n
Plot:
x(n N) x(n)
A cos[2 F0 (n N)
n
) n
)] A cos(2 F0 n
2 F0 N 2 k
F0 k N
2. DT sinusoidal signals whose frequencies are separated by an integer multiple of 2 are identical
x(n) cos[(
All
2 )n
] cos(
k
n 2 n
) cos(
x k (n )
k
A cos(
0
), k
0
0, 1, 2, ...
2k ,
are identical
(or
or, equivalently,
1 (or F 2
1 ) 2
x(n)
F0 = 1/8
cos(2 F0 n)
F0 = 1/4
F0 = 1/2
F0 = 3/4
CT signal
Sampling
DT signal
xa(t)
xa(nT)
A cos(2 f nT
A cos(2 f t
2 fn A cos fS
f fs
Normalized frequency
2 f
2 F
F
/T fs / 2 f /T fs / 2
f fs
1/ 2 F
1/ 2
Exercise
c) Suppose that the signal is sampled at the rate fs = 75 Hz. What is the DT signal obtained after sampling?
d) What is the frequency 0 < f < fs/2 of a sinusoidal signal that yields samples identical to those obtained in part (c)?
Solution
Solution
HW
Prob.1. An analog signal is converted to digital and then back to analog signal again, without intermediate DSP.
In what ways will the analog signal at the output differ from the one at the input?
HW
Prob.2. An analog signal is sampled at its Nyquist rate 1/Ts, and quantized using L quantization levels. The derived signal is then transmitted on some channels. (a) Show that the time duration, T, of one bit of the transmitted binary encoded signal must satisfy
T Ts /(log 2 L)
(b) When is the equality sign valid?
HW
n 0 1 2 3 4 5 6 7 8
Sample(V) 0.5715 4.9575 0.6250 3.6125 4.0500 0.9555 2.8755 1.5625 2.7500
Prob.3. A set of analog samples, listed in table 1, is digitized using the quantization table 2. Determine the digital codes, the quantized level, and the quantization error for each
Quantization
Digital code
000 001 010 011
0.625
1.250 1.875
0.93751.5625
1.56252.1875 2.18752.8125 2.81253.4375 3.43754.0625 4.06255.0
100
101 110
2.500
3.125 3.750
111
4.375
HW
Prob.4. Consider that you desire an A/D conversion system, such that the quantization distortion does not exceed 2% of the full scale range of analog signal. (a) If the analog signals maximum frequency is 4000 Hz, and sampling takes place at the Nyquist rate, what value of sampling frequency is required? (b) How many quantization levels of the analog signal are needed?
(c) How many bits per sample are needed for the number of levels found in part (b)?
(d) What is the data rate in bits/s?
HW
Prob.5. An analog voice signal with voltage between -5V and 5V must be quantized using ITU G.711 standard. Encode each of the following samples; and record the quantization error for each:
(a) -3.45198 V (b) 1.01119 V
HW
Prob.6. A 3-bit D/A converter produces a 0 V output for the code 000 and a 5 V output for the code 111, with other codes distributed evenly between 0 and 5 V. Draw the zero order hold output from the converter for the input below:
111 101 011 101 000 001 011 010 100 110
HW
HW
d) Can you find a sampling rate so that x(n) reaches its peak value?