4.5.4 Pulse Code Modulation PDF
4.5.4 Pulse Code Modulation PDF
Learning Objectives:
1
Module ET4 – Communication Systems
This topic draws together many of the ideas discussed throughout this entire
module and as such detailed descriptions of circuits like a low pass filter will
not be duplicated again, however you should be aware of all of the issues
relating to these functional blocks from our work in earlier topics.
The sampling gate circuit repeatedly samples and stores for a brief period,
the value of the analogue voltage at some moment in time (remember that the
analogue signal varies continuously with time). The rate at which such samples
are taken is governed by the frequency of the sampling clock.
2
Topic 4.5.4 – Pulse Code Modulation
The ADC converts each sample of the analogue information into a code of n
bits. These n-bit codes are transmitted in parallel along n wires, one sample
after another, to a matching n-bit digital-to-analogue converter (DAC). This
produces a stepped analogue voltage from the incoming codes.
The reconstitution filter is essentially a filter circuit that smoothes out the
quantisation steps from the DAC. It operates in such a way that it appears to
change the staircase waveform into a smooth curve.
3
Module ET4 – Communication Systems
Now we will take a look in more detail at the individual parts of the system to
determine their critical importance to the system. We will start at the very
beginning with the first process, which is the sampling of the analogue
waveform.
The ability of this system to transmit and more importantly recover the
original analogue information is dependent on the sampling rate (sampling
frequency) relative to the information frequency. To illustrate this effect,
consider the series of diagrams below.
Diagram (b) shows the result of sampling every 2.5 ms (i.e. the sampling
frequency is 400 Hz);
4
Topic 4.5.4 – Pulse Code Modulation
It can be seen that the recovered information signal is not at all like the
original. Indeed, the original signal has been lost and a lower-frequency signal
has replaced it. This lower-frequency signal is called an alias and has
appeared because the sampling frequency is far too low.
Great care must be taken to avoid aliasing when converting analogue signals
into digital. In 1924, the Dutch mathematician Harry Nyquist first showed
that to recover an information signal from a series of samples, the sampling
frequency must be greater than twice the maximum frequency fmax in the
information. This is known as the sampling theorem and the frequency 2xfmax
is known as the Nyquist frequency.
The diagram below shows the same 500 Hz information signal but this time
sampled at a frequency of 2 kHz (i.e. greater than the Nyquist frequency,
which is 2 x 500 Hz).
The recovered output can clearly be seen to be a rough copy of the original.
5
Module ET4 – Communication Systems
The sampling clock frequency must therefore be greater than 2 x fmax of the
signal to be sampled.
Anti-alias examples
When making a compact disc, the recording studio passes the music
signal through a low pass filter that limits the maximum frequency to 20
kHz. Sampling is then taken at a frequency of 44.1 kHz, which again
satisfies the Nyquist criterion of being greater than twice the 20 kHz
maximum.
6
Topic 4.5.4 – Pulse Code Modulation
Student Exercise 1
1. An audio signal has a baseband that ranges from 0.5 kHz to 4.5 kHz. If
this signal is to be digitised, state which of the following frequencies
would be a suitable sampling frequency:
A: 4.0 kHz,
B: 5.0 kHz,
C: 6.8 kHz,
D: 8.2 kHz,
E: 9.8 kHz,
F: 18 kHz
Answer(s): ………………………………………………….
Now that we have established the criteria for making the sampling gate
operate at an appropriate frequency, we will turn our attention to the ADC
and the conversion process in general. The construction of the ADC circuit
will be covered in module ET5, so we do not need to worry about that here.
However there are a few things we need to consider about its operation.
Firstly we need to think about what the ADC is actually doing, that is
changing an analogue voltage into a series of digital pulses. The accuracy with
which this can be achieved will depend on how many bits are available for the
digital coding. Let us look at some examples to illustrate this.
In a two bit system only 4 possible digital codes, 00, 01, 10, 11 are possible.
Each one of these would be allocated to a voltage level in the original signal.
For example with an input voltage range of 0-16V, only 4 digital codes are
available so the input voltage range can only be split into 4 different levels, in
this case with each being equal to 16/4 = 4V.
7
Module ET4 – Communication Systems
So an input voltage
between 0 and 4V would be coded as 00,
between 4.001V and 8V would be coded as 01,
between 8.001V and 12V would be coded as 10,
between 12.001V and 16V would be coded as 11.
At the receiver the reverse process takes place where digital codes are
converted into analogue voltage values using a device called a summing
amplifier which again will be discussed in detail in Module ET5. At the
receiver the codes would be interpreted as follows:
V1 is the analogue input voltage range and V2 would be the output from a
corresponding 2 bit DAC. Even early observations show that the output is
nothing like the original, the voltage is always lower than the original and the
steps are far too large to make this suitable for any form of communication
system.
8
Topic 4.5.4 – Pulse Code Modulation
In a three bit system an extra 4 digital codes are available making 8 in total,
000, 001, 010, 011, 100, 101, 110, 111 are possible. Each one of these would be
allocated to a voltage level in the original signal. For example with an input
voltage range of 0-16V, and 8 digital codes are available so the input voltage
range can only be split into 8 different levels, in this case with each being
equal to 16/8 = 2V.
So an input voltage
between 0 and 2V would be coded as 000,
between 2.001V and 4V would be coded as 001,
between 4.001V and 6V would be coded as 010,
between 6.001V and 8V would be coded as 011,
between 8.001V and 10V would be coded as 100,
between 10.001V and 12V would be coded as 101,
between 12.001V and 14V would be coded as 110,
between 14.001V and 16V would be coded as 111.
V1 is the analogue input voltage range and V2 would be the output from a
corresponding 3 bit DAC. Whilst this is better than the 2-bit example it still
does not come close to reproducing the original signal. It should now be
obvious that if we are to get anywhere close to the original signal at the
receiver the number of bits required will have to be increased dramatically so
that the step size at the receiver is reduced as much as possible. In practice
a minimum of 8 bits is required to allow a good reproduction of the original
signal.
For an 8-bit digital code there will be 28 possible combinations, i.e. 256. This
means that the step size would now be 16/256=0.0625V or 62.5mV.
You should be able to see now that even with just 8 bits, the size of the step
is becoming very small, and therefore we will be getting very close to the
original signal value. In general we can quote the resolution of an ADC using
the following formula:
Student Exercise 2
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
10
Topic 4.5.4 – Pulse Code Modulation
Parallel to Serial
Consequently, the parallel transmission of digital data is only used where fast
data transfer is required over short distances, for example in the link
between a computer and a printer.
Transmission
Parallel to medium Serial to
Serial Shift Parallel Shift
Register PISO Register SIPO
PISO SIPO
Clock Clock
The diagram above shows how a single link can be used to transfer the
information, and you should recognise another two of the functional blocks in
this diagram from our previous work.
11
Module ET4 – Communication Systems
The diagram shows the basic arrangement for transmitting the n bits of code
along a single link. These n bits of code from the ADC are input to a parallel-
to-serial shift register. As we found out in topic 4.5.3 this circuit loads the
entire n-bit word on one clocking pulse and then transmits it, one bit at a time
(under the control of another clocking pulse). These n bits progress along the
single link to the receiver and it is in this single link that the digital signal
exists. If a serially transmitted digital signal is examined on an oscilloscope
then it is observed to be an apparently random procession of 1s and 0s, as
shown below.
12
Topic 4.5.4 – Pulse Code Modulation
From
Communications
Link
In practice the signal arriving from the end of the communication link will be
attenuated and more than likely to suffer from the effects of noise. It will
pass through a Schmitt trigger (topic 4.5.2) in order to regenerate the signal
before it is passed to the SIPO shift register.
For example:
If the original sampling clock is running at 2kHz, i.e. with a period of 0.5ms,
and the ADC is a 12-bit device, then the 12 bits have to be loaded into the
PISO and output before the next sample arrives. Therefore the maximum
time permissible per bit is 0.5ms/12=41.6µs. This gives a minimum PISO
frequency of 24kHz. To allow some tolerance a frequency of 30kHz could be
used.
13
Module ET4 – Communication Systems
Before we look at some examination style questions on this topic there is just
one more issue to deal with, and that is related to maximising the use of the
serial communications link. The most common use of PCM is in the
telecommunications business and being able to maximise the use of a serial
link between two places is of paramount importance. This is best illustrated
by considering an example.
If the ADC is a 12-bit device, the PISO will have to output these 12 bits
before the end of the 125µs period otherwise the next sample will be taken
by the sampling gate and overwrite some of the data still stored in the PISO
before it has completed the output sequence. If we assume that the PISO
clock has a period of 10µs, then 12 bits will take 12 x 10µs = 120µs to output.
This can be seen on the graph below.
Sampling Pulse
14
Topic 4.5.4 – Pulse Code Modulation
This would change our previous graph to the one shown below.
Sampling Pulse
Transmission of data
We can now see that we have created a large time gap in the communication
link between samples where the line is now effectively idle. This would be
very expensive, and a waste of resource so during this period where the
current conversation sample is not being transmitted, another sample from a
different conversation is fed into the communication link as shown below.
Sampling Pulse
15
Module ET4 – Communication Systems
There are still opportunities to fit other conversations into the gaps that still
remain before having to return to pick up the next sample from the original
conversation as shown below.
Sampling Pulse
1 2 3 4 5 1 2 3 4 5 1 2
0 125 250 time (µs)
Here we can see that 5 conversations fit easily into the space between
sampling of the original conversation. This technique makes maximum use of
the communications link, and is called time division multiplexing. Each
conversation shares the communications link for a short period, which makes
maximum use of the link.
A multiplexer selects the conversations in turn and feeds them into the
communications link. At the end of the link a demultiplexer passes the
information back to the appropriate receiver. The diagram below should help
you to visualise this.
16
Topic 4.5.4 – Pulse Code Modulation
The PCM transmitter and receiver have a slightly different design to the
ones shown for a non multiplexed link. Each channel has individual low pass
filters, but to make the system more cost effective the rest of the
transmitter circuitry is shared by all channels.
The Schmitt trigger in the decoder regenerates the binary bit stream before
the SIPO produces blocks of binary digits which are reconstructed into a
PAM signal of each channel in turn. The demultiplexer routes each
reconstructed PAM signal to the correct channel
You will need to know how to calculate how many signals can be transmitted
using this technique given the relative information for a given system. This is
achieved by dividing the period between samples by the time needed to
transmit the individual bits from the PISO. In general
sampling period
Number of channels
No of bits PISO period
For the above example the number of channels that can be transmitted is
sampling period
Number of channels
No of bits PISO period
125s
10.41 10 channels
12 1s
17
Module ET4 – Communication Systems
18
Topic 4.5.4 – Pulse Code Modulation
Student Exercise 3.
1. (a) Complete the diagram for the receiver for a Pulse Code Modulation
(PCM) communication system.
[1]
(b) The digital-to-analogue converter has a 12-bit input and output
voltage range of 0V to 8V. What is the resolution of the DAC?
..............................................................................................................................
..............................................................................................................................
..............................................................................................................................
[2]
(c) The low pass filter cuts off frequencies above 10kHz. Why is this
needed in this system?
..............................................................................................................................
..............................................................................................................................
..............................................................................................................................
..............................................................................................................................
..............................................................................................................................
[1]
19
Module ET4 – Communication Systems
Read the passage below and use the information given to answer the
questions which follow.
..............................................................................................................................
..............................................................................................................................
[1]
(b) Calculate the PCM sampling period.
..............................................................................................................................
[1]
(c) Calculate the time needed to transmit a single 10-bit PCM sample
at a PISO clock rate of 2MHz.
..............................................................................................................................
..............................................................................................................................
[2]
20
Topic 4.5.4 – Pulse Code Modulation
(d) Calculate how many PCM channels can be combined using the TDM
on the communication link.
..............................................................................................................................
..............................................................................................................................
[1]
(e) (i) How many sampling levels are available using a 10 bit code?
..............................................................................................................................
[1]
(ii) Calculate the resolution.
..............................................................................................................................
..............................................................................................................................
..............................................................................................................................
[1]
21
Module ET4 – Communication Systems
3. The block diagram shows the transmitter for a Pulse Code Modulation
(PCM) system.
22
Topic 4.5.4 – Pulse Code Modulation
Student Exercise 1
Student Exercise 2.
Student Exercise 3.
1. (a)
Serial In
Parallel Out
Shift Register
[1]
(b)
input voltage range 8 8
resolution n
12 1.95mV
2 2 4096
[2]
(c) The low pass filter removes quantisation error / creates the
analogue signal from the DAC staircase signal.
[1]
23
Module ET4 – Communication Systems
(d)
sampling period
Number of channels
No of bits PISO period
40 s
8 channels
10 0.5s
[1]
n 10
(e) (i) No of sampling levels = 2 = 2 = 1024 levels
[1]
(ii)
input voltage range 5 5
resolution n
10 4.88mV
2 2 1024
[1]
3. (a) Block X = Low Pass Filter Block Y = ADC
[2]
(b) Time Division Multiplexing
[1]
(c) (i) 4kHz (since sampling freq = 2 x fmax)
24
Topic 4.5.4 – Pulse Code Modulation
..................................................................................................................................................
..................................................................................................................................................
[1]
(b) Calculate the PCM sampling period.
..................................................................................................................................................
[1]
(c) Calculate the time needed to transmit a single 14-bit PCM sample at a PISO clock rate of
1MHz.
..................................................................................................................................................
..................................................................................................................................................
[2]
(d) Calculate how many PCM channels can be combined using the TDM on the
communication link.
..................................................................................................................................................
..................................................................................................................................................
[1]
(e) (i) How many sampling levels are available using a 14 bit code?
..................................................................................................................................................
[1]
(ii) Calculate the resolution.
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
[1]
25
Module ET4 – Communication Systems
(a) (i) Draw the block diagram for the transmitter, consisting of the following sub-
systems.
[2]
(ii) What is the highest signal frequency that this system can process and reproduce it at
the receiver?
.....................................................
[1]
(iii) Which sub-system cuts out frequencies greater than this ?
........................................................................
[1]
(iv) Which block(s) produce a PAM output signal?
.........................................................................
[1]
(v) What is meant by the resolution of the ADC ?
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
[2]
(vi) The PCM system must cope with an analogue input voltage range of 0 to 10V. The
resolution must be less than 0.01V. What is the minimum number of bits the ADC
must output?
.................................................................................................................................................
.................................................................................................................................................
.................................................................................................................................................
[2]
26
Topic 4.5.4 – Pulse Code Modulation
(b) The PCM receiver also contains a Schmitt trigger, which has the voltage characteristic
shown below.
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
[1]
(ii) What are the two switching thresholds for this Schmitt trigger?
27
Module ET4 – Communication Systems
Draw the block diagram for this receiver, using these sub-systems.
[3]
(b) The circuit diagram shows a 3-bit shift register, made from rising-edge triggered D-type
flip-flops.
28
Topic 4.5.4 – Pulse Code Modulation
What is the smallest number of bits needed for the input in order to meet this specification?
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
[2]
29
Module ET4 – Communication Systems
(b) The ADC has an 8-bit output and has an input range of 0 – 5.00V.
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
[2]
(ii) The input voltage is set to 4.75V. What is the output of the ADC?
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
[2]
30
Topic 4.5.4 – Pulse Code Modulation
(c) The analogue input signal shown is applied to the above system. The sampling clock signal
is also shown.
[3]
31
Module ET4 – Communication Systems
5. The following block diagram shows a Pulse Code Modulation (PCM) transmitter.
(a) The output of the Low Pass Filter and the output of Clock A are shown below.
(i) What is the relationship between the input signal frequency range and the minimum
sampling frequency required to allow the signal from the Low Pass Filter to be
reconstructed at the receiver?
..................................................................................................................................................
(ii) Hence, what is the minimum frequency that can be used for Clock A in this
transmitter?
..................................................................................................................................................
[2]
32
Topic 4.5.4 – Pulse Code Modulation
(c) Clock B must operate at a higher frequency than Clock A for the system to work properly.
Explain why this is the case.
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
[1]
(d) For this system, the analogue to digital converter (ADC) has an input voltage range of 0 to
4V.
.................................................................................................................................................
.................................................................................................................................................
(ii) What is the resolution of the system?
.................................................................................................................................................
.................................................................................................................................................
[2]
(e) A PCM receiver requires a serial-in-parallel-out shift register (SIPO) which can be
constructed using D-Type flip-flops.
33
Module ET4 – Communication Systems
6. The following block diagram shows a Pulse Code Modulation (PCM) transmitter.
(a) The output of the Low Pass Filter and the output of Clock A are shown below.
Complete the graph to show the output of the sampling gate.
[3]
34
Topic 4.5.4 – Pulse Code Modulation
(b) The signal from the low pass filter contains frequencies in the range 100Hz – 4kHz.
(i) What is the relationship between the input signal frequency range and the minimum
sampling frequency required to allow the signal from the low pass filter to be
reconstructed at the receiver ?
......................................................................................................................................
[1]
(ii) Hence, what is the minimum frequency that can be used for Clock A in this
transmitter.
......................................................................................................................................
[1]
(c) Clock B must operate at a higher frequency that clock A for the system to work properly.
Explain why this is the case.
.................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
[1]
(d) The 12-bit analogue to digital converter (ADC) has an input voltage range of 0-6V.
(i) How many sampling (voltage) levels are provided by the ADC?
..................................................................................................................................................
..................................................................................................................................................
[1]
(ii) What is the resolution of the system?
..................................................................................................................................................
..................................................................................................................................................
[1]
35
Module ET4 – Communication Systems
7. The block diagram below shows a transmitter for a Pulse Code Modulation (PCM) system which
is used in a telephone exchange.
(a) Complete the block diagram by correctly labelling the missing blocks.
[3]
(b) The highest frequency present in the input signal is 4 kHz. Choose from the list of possible
frequencies below two frequencies that could be used for clock A to enable the signal to be
regenerated without distortion.
Frequency 1: ...............................................
Frequency 2: ...............................................
[2]
(c) Several PCM systems can be combined using Time Division Multiplexing.
Explain what is meant by Time Division Multiplexing.
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
[2]
36
Topic 4.5.4 – Pulse Code Modulation
8. The receiver of a Pulse Code Modulation system is constructed from the following subsystems.
(a) Draw the block diagram for this receiver, using only these sub-systems.
[2]
(b) The following graphs show the output of two sub-systems in the PCM receiver.
..................................................................................................................................................
[1]
(ii) Which sub-system produces the output shown by Graph B?
..................................................................................................................................................
[1]
37
Module ET4 – Communication Systems
(b) The ADC has an 10-bit output and has an input range of 0 – 5.00V.
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
[2]
(ii) The input voltage is set to 2.44V. What is the output of the ADC?
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
[2]
38
Topic 4.5.4 – Pulse Code Modulation
(c) The analogue input signal shown is applied to the above system. The sampling clock signal
is also shown.
[3]
39
Module ET4 – Communication Systems
Targets: 1. ………………………………………………………………………………………………
………………………………………………………………………………………………
2. ………………………………………………………………………………………………
………………………………………………………………………………………………
40