PCM Encoding
PCM Encoding
PCM Encoding
SUBMITTED BY
Mamba, Cyrel Ann
SUBMITTED TO
ENGR. JENNY ARUTA
BS-ECE
st
1 Semester A.Y. 2024-2025
Experiment 12 - PCM encoding
Preliminary discussion
As you know, digital transmission systems are steadily replacing analog systems in
commercial communications applications. This is especially true in
telecommunications. That being the case, an understanding of digital transmission
systems is crucial for technical people in the communications and
telecommunications industries. The remaining experiments in this book use the
Emona Telecoms-Trainer 101 to introduce you to several of these systems starting
with pulse code modulation (PCM).
PCM is a system for converting analog message signals to a serial stream of Os and
1s. The conversion process is called encoding. At its simplest, encoding involves:
An issue that is crucial to the performance of the PCM system is the encoder's clock
frequency. The clock tells the PCM encoder when to sample and, as the previous
experiment shows, this must be at least twice the message frequency to avoid
aliasing (or, if the message contains more than one sinewave, at least twice its
highest frequency).
Another important PCM performance issue relates to the difference between the
sample voltage and the quantisation levels that it is compared to. To explain, most
sampled voltages will not be the same as any of the quantisation levels. As
mentioned above, the PCM Encoder assigns to the sample the quantisation level
that is closest to it. However, in the process, the original sample's value is lost, and
the difference is known as quantisation error. Importantly, the error is reproduced
when the PCM data is decoded by the receiver because there is no way for the
receiver to know what the original sample voltage was. The size of the error is
affected by the _number of quantisation levels. The more quantisation levels there
are (for a given range of sample voltages) the closer they are together and the
smaller the difference between them and the samples.
Each binary number is transmitted in serial form in frames. The number's most
significant bit (called bit-7) is sent first, bit-6 is sent next and so on to the least
significant bit (bit-0). The PCM Encoder module also outputs a separate Frame
Synchronisation signal (FS) that goes high while bit-O is outputted. The FS signal
has been included to help with PCM decoding (discussed in the preliminary
discussion of Experiment 13) but it can also be used to help "trigger" a scope when
looking at the signals that the PCM Encoder module generates.
The experiment
In this experiment you'll use the PCM Encoder module on the Emona Telecoms-
Trainer 101 to convert the following to PCM: a fixed DC voltage, a variable DC
voltage and a continuously changing signal. In the process, you'll verify the
operation of PCM encoding and investigate quantisation error a little.
Equipment
Note: Insert the black plugs of the oscilloscope leads into a ground (GND) socket.
The set-up in Figure 2 can be represented by the block diagram in Figure 3 below.
The PCM Encoder module is clocked by the Master Signals module’s 8kHz DIGITAL
output. Its analog input is connected to 0V DC.
5. Adjust
the scope’s Time base control to view three pulses of the PCM Encoder
module’s FS output.
6. Set the scope’s Slope control to the “- “position.
Setting the Slope control to the “- “position makes the scope start its sweep across
the screen when the FS signal goes from high to low instead of low to high. You can
really notice the difference between the two settings if you flip the scope’s Slope
control back and forth. If you do this, make sure that the Slope control finishes on
the “- “position.
10.Set the scope's Mode control to the DUAL position to view the PCM Encoder
module's CLK input as well as its FS output.
11.Draw the two waveforms to scale in the space provided on page 12-8 leaving
enough room for a third digital signal.
Tip: Draw the clock signal in the upper third of the graph paper and the FS
signal in the middle third.
12.Connect the scope’s Channel 2 input to the PCM Encoder module’s output as
shown in Figure 5 below.
This set-up can be represented by the block diagram in Figure 6 below. Channel
2 should now display 10 bits of the PCM Encoder module’s data output. The first
8 bits belong to one frame and the last two bits belong to the next frame.
13.Draw this waveform to scale in the space that you left on the graph paper.
Tip: If you’re having trouble triggering the CRO set its Trigger Source
Coupling to the HF REJ position.
Question 1
Indicate on your drawing the start and end of the frame. Tip: If you’re not sure
where these points are, see the preliminary discussion.
Question 2
Question 3
Question 4
What is the binary number that the PCM Encoder module is outputting?
Question 5
Why does the code change even though the input voltage is steady?
Question 6
Why does the PCM Encoder module output this code 0V and not 0000000?
So far, you have used the PCM Encoder module to convert a fixed DC voltage (OV)
to PCM. The next part of the experiment lets you see what happens when you vary
the DC voltage.
Note: Notice that the third input on the scope is being used. This input is usually
labelled EXT or EXTERNAL, but its position varies from one scope to another. If you
can’t find it, ask the instructor for help.
This set-up can be represented by the block diagram in Figure 8 on the next page.
The variable DCV module is used to let you change the DC voltage on the PCM
Encoder module’s input. The scope’s external trigger input is used so that you can
view the DC voltage on its Channel 1 input as a stable display.
18.Set the scope's Channel 1 Vertical Attenuation control to the IV/div position.
19.Set the scope's Channel 1 Input Coupling control to the GND position.
20.Use the scope's Channel 1 Vertical Position control to align the Channel 1
trace with one of the horizontal lines on the scope's screen.
Note: This line on the scope’s screen is now your zero-volt reference which you
can use to see whether the Variable DCV module’s output is positive or negative.
21.Set the scope's Channel 1 and Channel 2 Input Coupling controls to the DC
position.
22.Set the scope's Mode control to the DUAL position.
23.Adjust the Variable DCV module’s Variable DC control until the PCM Encoder
module outputs the code that you drew earlier.
24.Use the scope to measure the Variable DCV module's output voltage.
25.Turn the Variable DCV module’s DC control clockwise while watching the
scope’s display.
Question 7
Question 8
In what way does the binary number that the PCM Encoder module outputs change?
26.Continue to turn the Variable DCV module’s Variable DC control clockwise and
stop the moment the PCM Encoder module’s output is 11111111.
Note: You may not be able to obtain 11111111 on the PCM Encoder module's
output. If this is the case, for the moment, settle for an input that generates the
highest binary number possible.
27.Use the scope to measure the PCM Encoder module's input voltage. Record
your measurement in Table 1 on the next page.
Question 9
It's possible that you were unable to obtain 11111111 on the PCM Encoder
module's output at Step 26. Explain why. Tip: Use the User Manual to compare the
operating specifications of the Variable DCV and PCM Encoder modules.
Question 10
Devise a method of obtaining a variable DC voltage that can reach (or exceed) the
upper and lower limits of the PCM Encoder module’s input range. Describe your
solution below.
Note: Make this change even if you were able to obtain 11111111 on the PCM
Encoder module’s output. This will ensure that you’ll be able to successfully
complete Step 31.
Table 1
29.Make the necessary adjustments to the set-up so that the PCM Encoder
module’s input voltage is a small negative value (say -0.2V).
30.Increase the size of the negative voltage on the PCM Encoder module’s input
and note the effect on the binary number on its output.
Question 11
What happens to the binary number on the PCM Encoder module’s output as the
size of the negative input voltage increases?
31.Continue to increase the PCM Encoder module’s input voltage and stop the
moment its output is 00000000.
32.Measure the Variable DCV module’s output voltage and record the value in
Table 1 on the previous page.
Question 12
Part C - Quantisation
33.Remove the Buffer (or Adder) module to return the set-up that shown in
Figure 7 and set the Variable DCV module's Variable DC control to about the
middle of its travel.
34.See if you can vary the Variable DC control left and right without causing the
output code to change.
The sampled voltage can be changed without causing the output code to change
because it is compared to a set of quantisation levels but there are a finite number
of them. This means that, in practice, there's a range of sample voltages for each
quantisation level.
Question 13
What's the name for the difference between a sampled voltage and its closest
quantisation level? Tip: If you're not sure, see the preliminary discussion.
It's possible to calculate how far apart a PCM encoder's quantisation levels are using
the information you've gathered so far. To do so, answer the following question.
Question 14
Calculate the difference between the quantisation levels in the PCM Encoder module
by subtracting the values in Table 1 and dividing the number by 256 (the number of
codes).
Question 15
Now let's see what happens when the PCM encoder is used to convert continuously
changing signals like a sinewave.
35.Return the scope's Trigger Source control to the CHI (or INT) position.
36.Return the scope's Trigger Source Coupling control to the AC position.
37.Set the scope's Channel 1 and Channel 2 Vertical Attenuation controls to the
2V/div position.
38.Locate the VCO module and set its Range control to the HI position.
39.Turn the VCO module's Frequency Adjust control fully anticlockwise.
Note: The VCO module will be used to provide the PCM Encoder module with a
50KHz (approx) clock.
42.
Set the scope’s Timebase control to the 50µ/div position.
43.Watch the PCM Encoder module’s PCM DATA output on the scope’s display.
Question 16
44.Return the scope’s Variable Sweep control to the detent (locked) position.
QUESTIONS AND ANSWERS
PART A- FIGURE 2
PART A- FIGURE 5
PART B- FIGURE 7
PART B- FIGURE 7 NO. 23
PART D- FIGURE 9
OBSERVATION
CONCLUSION