Experiment 7 Pulse Code Modulation (PCM) : 1.0 Objectives
Experiment 7 Pulse Code Modulation (PCM) : 1.0 Objectives
EXPERIMENT 7
1.0 OBJECTIVES:
1.2 To generate the pulse code modulation (PCM) signal using MATLAB.
1.3 To plot the pulse code modulation (PCM) signal using MATLAB.
MATLAB Software
3.0 INTRODUCTION
A PCM signal is generated at the transmitter by carrying out three basic operations: sampling,
quantizing, and encoding. The pulse code modulation (PCM) process samples an input analog
signal, quantizes the sampled signal, and codes the quantized signal into binary-coded digits. A
functional block diagram of a PCM transmitter is shown in Figure 1.
3.1 Sampling
1
COMMUNICATION SYSTEMS (PLT 208) LABORATORY MODULE
It is the process of obtaining an instantaneous value of the input analog signal amplitude at
regular intervals. The signal m(t) entering the sampler is band-limited to B Hz. Usually there
exists a filter with bandwidth B Hz prior to the sampler to cutoff the out-of-band components. The
sampling rate must be sufficiently large so that the analog signal can be reconstructed from its
samples ms(n) with sufficient accuracy. The input analog signal is sampled at a rate higher than
the Nyquist rate to allow for some guard-band. Thus, the sampling frequency, fs, can be restricted
by
fs ≥ 2B (1)
fs = 1/ Ts (2)
3.2 Quantization
It is the process of converting the voltage level of the sampled amplitude to the voltage
value of the nearest standard level, or quantization level. At the end of this stage, the signal mq(n)
will be represented discretely in both time and amplitude. The quantizers can be classified as
uniform quantizers or non-uniform quantizers. In uniform quantization, the quantization regions
are chosen to have equal length where as in non-uniform quantization, regions of variable length
are used.
3.3 Encoding
It is the process of representing a particular quantization level of the analog signal with a
binary codeword. After quantization, the quantized levels are encoded using R bits for each
quantization level. The encoding scheme that is usually employed is natural binary coding (NBC),
meaning that the lowest quantization level is mapped into a sequence of all 0’s and the highest
level is mapped into a level of all 1’s.
4.0 EXAMPLES
2
COMMUNICATION SYSTEMS (PLT 208) LABORATORY MODULE
The examples below show how to use MATLAB Software to apply the pulse code
modulation (PCM) technique. Study the source code given and simulate to see the
plotting signal.
EXAMPLE 1:
EXAMPLE 2:
3
COMMUNICATION SYSTEMS (PLT 208) LABORATORY MODULE
5.0 EXERCISES
4
COMMUNICATION SYSTEMS (PLT 208) LABORATORY MODULE
1. What is the frequency of the analog signal that has been used in the Example 1?
2. Generate a 2 KHz sinusoid with a Peak to Peak Voltage of 2V (+/- 1V), and generate a
quantized signal when N=8 and N=16 levels. Calculate Signal to Quantization Noise
Ratio (SQNR).