Upload
trandiep
View
277
Download
5
Embed Size (px)
Citation preview
CHAPTER 4
PULSE MODULATION Part 2
Pulse Modulation
• Analog pulse modulation: Sampling, i.e., information is transmitted only at discrete time instants. e.g. PAM, PPM and PDM
• Digital pulse modulation: Sampling and quantization, i.e., information is discretized in both time and amplitude. e.g. PCM
2
Digital Pulse Modulation
3
Analog input signal
Sample at discrete time instants
Analog pulse modulation, PAM signal
Digital pulse modulation, PCM code
4
PCM- PULSE CODE MODULATION
• DEFINITION: Pulse code modulation (PCM) is essentially analog-to-digital (A/D) conversion where the information contained in the instantaneous samples of an analog signal is represented by digital words in a serial bit stream.
5
PCM Block Diagram
6
• Most common form of analog to digital modulation
Sampling, Quantizing, and Encoding➢ The PCM signal is generated by carrying out three
basic operations: 1. Sampling 2. Quantizing 3. Encoding
➢ Sampling operation generates a flat-top PAM signal. ➢ Quantizing operation approximates the analog values
by using a finite number of levels, L. ➢ PCM signal is obtained from the quantized PAM signal
by encoding each quantized sample value into a digital word.
7
8
111 110 101 100 011 010 001 000
ADC
Sample
Quantize
Analog Input Signal
Encode
Digital Output Signal111 111 001 010 011 111 011
9Eeng 360 9
◾Sampling ◾Makes the signal discrete in time. ◾ the minimum sample frequency
such that the signal can be reconstructed without distortion, fs >= 2fmax
◾Quantization ◾Makes the signal discrete in
amplitude. ◾Round off to one of q discrete
levels.
◾Encode ◾Maps the quantized values to
digital words that are n bits long.
ADC
Sample
Quantize
Analog Input Signal
Encode
111 110 101 100 011 010 001 000
Digital Output Signal
111 111 001 010 011 111 011
Definition of Quantization
• A process of converting an infinite number of possibilities to a finite number of conditions (rounding off the amplitudes of flat-top samples to a manageable number of levels).
• In other words, quantization is a process of assigning the analog signal samples to a pre-determined discrete levels. The number of quantization levels, L determine the number of bits per sample, n.
10
nL 2= Ln 2log=
Quantization➢ The output of a sampler is still continuous in amplitude.
– Each sample can take on any amplitude value e.g. 3.752 V, 0.001 V, etc.
– The number of possible values is infinite. ➢ To transmit as a digital signal we must restrict the
number of possible values. ➢ Quantization is the process of “rounding off” a sample
according to some rule. – E.g. suppose we must round to the nearest discrete
value, then: �3.752 --> 3.8 0.001 --> 0
11
Quantization Example
Analogue signal
Sampling TIMING
Quantization levels. Quantized to 5-levels
Quantization levels Quantized 10-levels
12
13
1. Uniform type : The levels of the quantized amplitude are uniformly spaced. 2. Non-uniform type : The levels are not uniform.
Types of Uniform Quantization
14
Midtread: Origin lies in the middle of a tread of the staircase like graph in (a),
utilized for odd levels
Midrise: Origin lies in the middle of a rising part of the staircase like graph (b),
utilized for even levels
15Eeng 360 15
● Most ADC’s use uniform quantizers.
● The quantization levels of a uniform quantizer are equally spaced apart.
● Uniform quantizers are optimal when the input distribution is uniform. When all values within the Dynamic Range of the quantizer are equally likely.
Input sample X
Example: Uniform n =3 bit quantizer L=8 and XQ = {±1,±3,±5,±7}
2 4 6 8
1
5
3
Output sample XQ
-2-4-6-8
Dynamic Range: (-8, 8)
7
-7
-3
-5
-1
Quantization Characteristic
Dynamic Range (DR)• Largest possible magnitude/smallest possible magnitude.
• Where • DR = absolute value of dynamic range • Vmax = the maximum voltage magnitude • Vmin = the quantum value (resolution) • n = number of bits in the PCM code
resolutionV
VV
DR max
min
max ==
12 −= nDR
16
)log(20)( DRdBDR =
ndBDR 6)( ≈ for n > 4
Coding Efficiency
• A numerical indication of how efficiently a PCM code is utilized.
• The ratio of the minimum number of bits required to achieve a certain dynamic range to the actual number of PCM bits used.
17
Coding Efficiency = Minimum number of bits x 100 Actual number of PCM bits
Example 1
1. Calculate the dynamic range for a linear PCM system using 16-bit quantizing.
2. Calculate the number of bits in PCM code if the DR = 192.6 dB. Determine the coding efficiency in this case.
18
❑ The quantization interval @ quantum = the magnitude difference between adjacent steps,
❑ The resolution = the magnitude of a quantum = the voltage of the minimum step size.
❑ The quantization error = the quantization noise = ½ quantum = (orig. sample voltage – quantize level)
❑ The quantization range: is the range of input voltages that will be converted to a particular code.
19
vΔ
• A difference between the exact value of the analog signal & the nearest quantization level.
• Quantization error is a round-off error in the transmitted signal that is reproduced when the code is converted back to analog in the receiver.
20
Quantization Error
Quantization Noise
➢ The process of quantization can be interpreted as an additive noise process.
• The signal to quantization noise ratio (SNR)Q=S/N is given as:
21
Signal X
Quantized Signal, XQ
Quantization Noise, nQ
Average Power{ }( )
Average Power{ }QQ
XSNRn
=
Signal to Quantization Noise Ratio (SQR)
• The worst possible signal voltage-to-quantization noise voltage ratio (SQR) occurs when input signal is at its minimum amplitude. SQR is directly proportional to resolution.
• The worst-case voltage SQR
22
eQresolution
SQR =(min)
• SQR for a maximum input signal
• The signal power-to-quantizing noise power ratio
eQVSQR max
(max) =
23
qvv
R
SQR
qqR
v
dB
log208.10log10)(
log10
power noiseon quantizati averagepower signal average
log10
12
2
12
)(
22
2
+=⎥⎦
⎤⎢⎣
⎡==
=
R =resistance (ohm) v = rms signal voltage
q = quantization interval
Qe = quantization error
Example 2
1. Calculate the SQR (dB) if the input signal = 2 Vrms and the quantization noise magnitudes = 0.02 V.
2. Determine the voltage of the input signals if the SQR = 36.82 dB and q =0.2 V.
24
Nonuniform Quantization
➢Many signals such as speech have a nonuniform distribution.
! The amplitude is more likely to be close to zero than to be at higher levels.
➢Nonuniform quantizers have unequally spaced levels
! The spacing can be chosen to optimize the SNR for a particular type of signal.
25
2 4 6 8
2
4
6
-2
-4
-6
Input sample X
Output sample XQ
-2-4-6-8
Example: Nonuniform 3 bit quantizer
• Nonuniform quantizers are difficult to make and expensive. • An alternative is to first pass the speech signal through a
nonlinearity before quantizing with a uniform quantizer. • The nonlinearity causes the signal amplitude to be
Compressed. ▫ The input to the quantizer will have a more uniform distribution. • At the receiver, the signal is Expanded by an inverse to
the nonlinearity. • The process of compressing and expanding is called
Companding.
26
Cont'd
27
• The process of compressing and then expanding.
• The higher amplitude analog signals are compressed
prior to transmission and then expanded in receiver.
• Improving the DR of a communication system.
Companding Functions
28
Method of Companding! For the compression, two laws are adopted: the µ-law in US and
Japan and the A-law in Europe.
! µ-law !
! A-law
! The typical values used in practice are: µ=255 and A=87.6. ! After quantization the different quantized levels have to be
represented in a form suitable for transmission. This is done via an encoding process.
( ))1ln(
)1ln(maxmax
µ
µ
+
+= V
V
out
inVV
( )
( )⎪⎪⎩
⎪⎪⎨
⎧
≤≤+
+
≤≤+
=1
1ln1
)ln(1
10
ln1
max
maxmax
max
max
VV
AAA
AVV
AA
VV
inVV
inVV
out in
in
29
Vmax= Max uncompressed analog input voltage
Vin= amplitude of the input signal at a particular of instant time
Vout= compressed output amplitude
A,µ = parameter define the amount of compression
Cont’d...
30
µ-law A-law
Example 3
• A companding system with µ = 255 used to compand from 0V to 15 V sinusoid signal. Draw the characteristic of the typical system.
31
Example 4 • A companding system with µ = 200 is used to compand
-4V to 4V signal. Calculate the system output voltage for Vin = -4, -2, 0, 2 and 4V.
Equation:
32
Vin (V) -4 -2 0 2 4
Vout (V) -4 -3.48 0 3.48 4
( ))1ln(
)1ln(maxmax
µ
µ
+
+= V
V
out
inVV
Plot the compression characteristic that will handle input voltage in the given range and draw an 8 level non-uniform quantizer characteristic that corresponds to the given µ.
33
SNR Performance of Compander
34
• The output SNR is a function of input signal level for uniform quantizing.
• But it is relatively insensitive for input level for a compander.
• α = 4.77 - 20 Log ( V/xrms) for Uniform Quantizer V is the peak signal level and xrms is the rms value
• α = 4.77 - 20 log[Ln(1 + µ)] for µ-law companding • α = 4.77 - 20 log[1 + Ln A] for A-law companding
35Eeng 360 35
● The output of the quantizer is one of L possible signal levels. ◾ If we want to use a binary transmission system, then we need to
map each quantized sample into an n bit binary word.
● Encoding is the process of representing each quantized sample by n bit code word. ◾The mapping is one-to-one so there is no distortion introduced
by encoding.
nL 2= Ln 2log=
PCM encoding example
Chart 1. Quantization and digitalization of a signal. Signal is quantized in 11 time points & 8 quantization segments.
Chart 2. Process of restoring a signal. PCM encoded signal in binary form: 101 111 110 001 010 100 111 100 011 010 101 Total of 33 bits were used to encode a signal
Table: Quantization levels with belonging code words
Levels are encoded using this table
L=8
36
PCM Example
37
11 6 3 3
1011 0110 0011 0011
Nonlinear Encoding
• Quantization levels not evenly spaced
• Same concept as non-uniform quantization
• Reduces overall signal distortion
• Can also be done by companding
38
PCM Line Speed
• The data rate at which serial PCM bits are clocked out of the PCM encoder onto the transmission line.
• Where • Line speed = the transmission rate in bits per
second • Sample/second = sample rate, fs • Bits/sample = no of bits in the compressed PCM
code
• Line speed also known as bit rate
samplebits
Xsecondsamples
speed line =
39
Example 5
• For a single PCM system with a sample rate fs = 6000 samples per second and a 7 bits compressed PCM code, calculate the line speed.
40
Channel Bandwidth
• The channel bandwidth, B required to transmit a pulse is given by
• Where • κ = a constant with a value between 1 to 2 • n = number of bits • W = signal bandwidth
• Channel BW = transmission BW
41
nWB κ=
Bandwidth of PCM Signals
❑ The spectrum of the PCM signal is not directly related to the spectrum of the input signal.
❑ The bandwidth of (serial) binary PCM waveforms depends on the bit rate R and the waveform pulse shape used to represent the data.
❑ The Bit Rate R is R=nfs
Where n is the number of bits in the PCM word (M=2n) and fs is the sampling rate.
42
❑ For no aliasing case (fs≥ 2B), the MINIMUM Bandwidth of PCM Bpcm(Min) is:
Bpcm(Min) = R/2 = nfs//2
The Minimum Bandwidth of nfs//2 is obtained only when sin(x)/x pulse is used to generate the PCM waveform.
❑ For PCM waveform generated by rectangular pulses, the First-null Bandwidth is:
Bpcm = R = nfs
43
Example 6 A signal with a bandwidth of 4.2 MHz is transmitted
using binary PCM. The number of representation
levels is 512. Calculate
(a)The code word length
(b)The bit rate
(c)The transmission bandwidth, assuming that, κ = 2
(d)Find the SQR in dB for the signal given that peak
signal voltage is 5Vp
44
PCM transmitter/receiver
45
LPF BW=B
Sampler & Hold
Quantizer No. of levels=MEncoder
Analog signal
Bandlimited Analog signal
Flat-top PAM signal
Quantized PAM signal
PCM signal
Channel, Telephone lines with regenerative repeater
DecoderPCM signal
Quantized PAM signal
Reconstruction LPF
Analog Signal output
Noise in PCM Systems
➢Two main effects produce the noise or distortion in the PCM output: – Quantizing noise that is caused by the M-step quantizer at the PCM
transmitter. – Bit errors in the recovered PCM signal, caused by channel noise and
improper filtering.
• If the input analog signal is band limited and sampled fast enough so that the aliasing noise on the recovered signal is negligible, the ratio of the recovered analog peak signal power to the total average noise power is:
46
Cont’d
• The ratio of the average signal power to the average noise power is
– M is the number of quantized levels used in the PCM system. – Pe is the probability of bit error in the recovered binary PCM signal at
the receiver DAC before it is converted back into an analog signal.
47
Effects of Quantizing Noise
• If Pe is negligible, there are no bit errors resulting from channel noise and no ISI, the Peak SNR resulting from only quantizing error is:
• The Average SNR due to quantizing errors is:
• Above equations can be expresses in decibels as,
48
Where, M = 2n
α = 4.77 for peak SNR
α = 0 for average SNR
Virtues & Limitation of PCM
The most important advantages of PCM are: – Robustness to channel noise and
interference. – Efficient regeneration of the coded signal
along the channel path. – Efficient exchange between BT and SNR. – Uniform format for different kind of base-
band signals. – Flexible TDM.
49
Cont’d…– Secure communication through the use of
special modulation schemes of encryption. – These advantages are obtained at the cost of
more complexity and increased BT.
– With cost-effective implementations, the cost issue no longer a problem of concern.
– Wi th the ava i l ab i l i t y o f w ide -band communication channels and the use of sophisticated data compression techniques, the large bandwidth is not a serious problem.
50
Application: PCM in Wired Telephony
• Voice circuit bandwidth is 3400 Hz.
• Sampling rate is 8 KHz (samples are 125 µs apart) above Nyquist rate,
6.8KHz to avoid unrealizable filters required for signal
reconstruction.
• Each sample is quantized to one of 256 levels (n=8).
• The 8-bit words are transmitted serially (one bit at a time) over a
digital transmission channel. The bit rate is 8x8,000 = 64 Kb/s.
• The bits are regenerated at digital repeaters.The received words are
decoded back to quantized samples, and filtered to reconstruct the
analog signal.
51
PCM in Compact Disk (CD)
• High definition Audio signal bandwidth is band limited to 15kHz.
• Although the Nyquist rate is only 30kHz, the actual sampling of 44.1kHz is used to avoid unrealizable filters required for signal construction
• The signal is quantized into a rather large number of levels, L=65,536 (n=16) to reduce quantization noise
52
Exercise 1
• A compact disc(CD) records audio signals digitally by using PCM. Assume the audio signal bandwidth to be 15 kHz. – (a) What is the Nyquist rate? – (b) If the Nyquist samples are quantized into L=
65, 536 levels and then binary coded, determine the number of binary digits required to encode the sample.
– (c) Determine the number of binary digits per second(bits/s) required to encode the audio signals.
53
Exercise 2
• This problem addresses the digitization of a television signal using pulse code modulation. The signal bandwidth is 4.5 MHz. Specifications of the modulator include the following: – Sampling : 15% in excess of Nyquist rate – Quantization: uniform with 1024 levels – Encoding : binary
• Determine (a) sampling rate and (b) minimum permissible bit rate
54