0% found this document useful (0 votes)
99 views

3008 Lecture6 A-D

The document discusses analog and digital signals and digital communications. It begins by explaining that analog signals have continuous amplitudes over time while digital signals have discrete amplitudes. It then describes the process of converting an analog signal to a digital signal, which involves sampling the analog signal to make it discrete-time, and then quantizing the discrete-time signal into a series of binary bits. The document focuses on the concepts of sampling and quantization in analog-to-digital conversion.

Uploaded by

balkyder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views

3008 Lecture6 A-D

The document discusses analog and digital signals and digital communications. It begins by explaining that analog signals have continuous amplitudes over time while digital signals have discrete amplitudes. It then describes the process of converting an analog signal to a digital signal, which involves sampling the analog signal to make it discrete-time, and then quantizing the discrete-time signal into a series of binary bits. The document focuses on the concepts of sampling and quantization in analog-to-digital conversion.

Uploaded by

balkyder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

1

Digital Communications

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
2

Analog Signal and Digital Signal

Analog signal
t (continuous amplitude)

111010101100001 1 110 1
Digital signal
t (discrete amplitude)

Why digital?

• easier to be regenerated • complete theory

• flexible hardware implementation and efficient storage

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
3

Digital Communications
Analog Signal
Bit sequence
t 0001101110……

A-D Digital Digital


Source Baseband Bandpass
Conversion
SOURCE Modulation Modulation

t t

Baseband Bandpass
Channel Channel

D-A Digital Digital


User Baseband Bandpass
Conversion Demodulation Demodulation

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
4

Lecture 6. Digital Communications


Part I. Analog-to-Digital (A-D) and
Digital-to-Analog (D-A) Conversion

• Sampling
• Quantization
Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
5

A-D Conversion

Analog signal Bit sequence


A-D Conversion

Sampling Quantization

000010011010000…
t t

• Sampling
• A continuous-time analog signal is transformed into a discrete-time
signal.

• Quantization
• A discrete-time signal is transformed into a series of binary bits.
Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
6

Sampling

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
7

Sampling

Time Domain 
xS (t )  x(t )   (t  nTS )
n 
x(t)

Sampling

t t
Ts

  (t  nT )
n 
S

TS: Sampling period


fS=1/TS: Sampling rate
TS t

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
8

Sampling
 
Frequency Domain X S ( f )  X ( f )  ( fS   ( f  nf
n 
S ))  f S  X ( f  nf
n 
S )

Harmonic components
X(f)
XS(f)
Sampling

…... …...

0 B f -2fS -fS 0 B fS 2fS f


fS   ( f  nf
n 
S )
• How to recover the original signal x(t)?

Lowpass filtering
fS f

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
9

Aliasing

XS(f)

…... …...

-2fS -fS 0 B fS 2fS f

fS-B  B
XS(f)

Aliasing

…... -2fS -fS 0 B fS 2fS …... f

Distortion will be incurred if there’s aliasing.

• What is the requirement on the sampling rate to avoid aliasing?

f S  2B
Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
10

Nyquist Sampling Theorem

Nyquist Sampling Criteria : A baseband signal with limited


bandwidth B can be uniquely determined by its values at uniformly
spaced intervals if and only if the sampling rate f S  2 B.

fS=2B is called the Nyquist sampling rate, representing the minimum


requirement without introducing distortion.

• A signal with a larger bandwidth requires a higher sampling rate.

What about a signal which is not strictly bandlimited to B?

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
11

Practical Considerations on Sampling


X(f)
XS(f) Aliasing

…... …...

0 B f 0 B f

XS(f)
• Use a sampling rate fS>2B
…... …...

• Pre-filtering 0 B fS>2B f
X(f)
XS(f)

…... …...

0 B f -2B 0 B fS=2B f

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
12

Quantization

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
13

Quantization
xS(t)
1

0
t

-1 Quantization

11 11 11 11 11 10 10 10 11 10 10 10 00 00 00 10 10…

• Quantization: to transform a discrete-time signal into a series of


binary bits.
– Step 1: Use a finite number of values to represent the amplitude;
− Step 2: Assign binary codes to different quantization level.
Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
14

Uniform Quantization
xS(t)
xmax

Dynamic range
t of xs(t)

xmin

• Suppose the sampled signal amplitude x varies from xmin to xmax.

• Suppose the number of quantization levels L  2


b
(use b bits to represent
a sampling symbol)

Uniform Quantization: the dynamic range is divided into L equal-width


quantization regions.
Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
15

Uniform Quantization

• Uniform Quantization: the dynamic range is divided into L equal-width


quantization regions.

x0 x1 x2 x3 xL-1 xL
xmin
s0 ŝ0 …… xmax x

xmax  xmin
Step size  
L Quantization threshold

Let ŝ0 represent the quantized value of the input value s0.

Midriser: ŝ0 =xi+/2 if xi<s0≤xi+1.

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
16

Transfer Function of Midriser

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
17

Example 1: Midriser

Suppose that a signal x(t) with dynamic range (-4,4) volts is


applied to a 3-bit midriser.

1. Plot the transfer function;


2. Determine the quantized values of 0.15V and -3.1V.

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
18

Solution

The quantization step size at the output is   (4  (4)) / 23  1

1. y 2. Quantized values of
0.15V and -3.1V are
3.5
2.5
0.5V and -3.5V,
1.5 respectively.
0.5 1 2 3 4
x x
-4 -3 -2 -1 -0.5 x
-1.5
-2.5
-3.5

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
19

Quantization Error

x0 x1 x2 x3 xL-1 xL
xmin
s0 ŝ0
…… xmax x

xmax  xmin
Step size  
L Quantization threshold

• What is the maximal difference between the input s0 and its quantized
value ŝ0 ? /2

Let e  sˆ0  s0 .  / 2  e   / 2

Quantization Error (noise)

e can be regarded as a uniformly distributed random variable with pdf

1/   / 2  x   / 2
e  0,  e2  2 /12
f e ( x)  
 0 otherwise
Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
20

Signal-to-Quantization-Noise-Ratio (SQNR)

 xmax  xmin   xmax  xmin 


2 2

• Quantization error power =  e   /12  


2 2
12 L2 12  22b
xmax  xmin
Step size  
L
Number of quantization levels L  2b

 A larger b leads to a lower quantization error power.


(We can use more bits to improve the quantization precision.)

• SQNR:
SQNR  Px /  e2

Px and  e2 are the power of the signal and the quantization error, respectively.

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
21

Example 2: SQNR

A sinusoidal signal with peak amplitude Am is applied to a


uniform quantizer with a dynamic range of (-Am, Am).
Determine the output SQNR.

x  x   2 Am 
2 2
We have  max min 
Px  Am2 / 2 and  e2  2 /12
12  22b 12  22b
Px
Therefore, SQNR   1.5  22b
 2
e

Write it in the form of decibels:

10log10 (SQNR)  10log10 1.5  2b 10log10 2  1.8  6b (dB)

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
22

Non-Uniform Quantization

Human speech:
volts • Small samples have a
larger percentage;
• Small samples are more
0 susceptive to noise.
t (msec)

Give the small samples more priority!


(more bits!)
Use small intervals for signals with small amplitudes and large intervals for
signals with large amplitudes:

…… ……
xmin 0
xmax x
Step size  increases with the signal magnitude.
Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
23

Non-Uniform Quantization
Compress the original
How to perform non-uniform quantization? signal such that its
amplitude roughly
• non-linear compression on the analog signal;
follows a uniform
• uniform quantization. distribution!

-law :
ln 1   (| x | / xmax )
y  ymax sgn( x)
ln(1   )
sgn( x)  1 if x  0
sgn( x)  1 if x  0

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
24

SQNR of -Law Quantization


Uniform Quantization -law Quantization
y(t) y(t)

 

x(t) x(t)
1<  2 <  3 < 4

• For weak signals (with low power), -law has better SQNR as   law  uniform
• For strong signals (with large power), -law has lower SQNR as   law  uniform

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
25

Example 3: -Law Quantizer

Suppose that a signal x(t) with dynamic range (-4,4) volts is


applied to a 3-bit -law quantizer. Determine the quantization
thresholds at both input and output sides.

For simplicity, we assume that ymax=xmax and ymin=xmin, and


=255.

Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
26

Solution

The quantization step size at the output is   (4  (4)) / 23  1


The quantization thresholds at the output are then given by
yth  [4, 3, 2, 1,0,1, 2,3, 4]

ln 1   (| x | / xmax )
According to y  ymax sgn( x)
ln(1   )
x   xmax /   1     1  sgn( y)
| y|/ ymax
We have  

xth   xmax /   1     1 sgn( yth )


yth / xmax
Finally, according to  
The quantization thresholds at the input are then given by
xth  [4, 0.9882, 0.2353, 0.0471,0,0.0471,0.2353,0.9882, 4]
Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
27

Code Assignment

output
Gray Code
100
7
Generation: for an N-bit binary code,
5
101
111 bN bN-1 …… b3 b2 b1
3

1110
-8 -6 -4 -2010 2 4 6
   
8 input
-1
011 -3 gN gN-1 gN-2 …… g2 g1
001
-5
modulo-2 addition
000 -7
Properties:
1. The first bit is the sign bit;
2. Adjacent words differ only by one bit;
000000 001001 3. Except for the sign bit, the codewords are
010011 011010 …… mirror symmetrical about the horizontal axis.
Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6
28

A-D and D-A


Analog
Baseband Signal 0001101110……

Source A-D Conversion

• Sampling
• Quantization

0001101110……
User Analog
D-A Conversion Baseband Signal

• Decoding (0001101110…  0.1 -0.3 0.2 …)


• Generate a pulse the amplitude of which is the quantized value (repeat)
• Lowpass filtering
Lin Dai (City University of Hong Kong) EE3008 Principles of Communications Lecture 6

You might also like