KEMBAR78
Line Coding and Bit Clock Recovery | PDF | Spectral Density | Electrical Engineering
0% found this document useful (0 votes)
88 views16 pages

Line Coding and Bit Clock Recovery

The document discusses line coding and bit-clock regeneration in digital communication systems, explaining how different line codes represent digital signals and their implications for transmission. It details four specific line codes (NRZ-L, Bi-phase level, RZ-AMI, and NRZ-M) and compares their bandwidth requirements and effectiveness in bit-clock regeneration. The document also outlines an experiment to observe these line codes in both time and frequency domains, and to analyze their spectral compositions for practical applications in telecommunications.

Uploaded by

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

Line Coding and Bit Clock Recovery

The document discusses line coding and bit-clock regeneration in digital communication systems, explaining how different line codes represent digital signals and their implications for transmission. It details four specific line codes (NRZ-L, Bi-phase level, RZ-AMI, and NRZ-M) and compares their bandwidth requirements and effectiveness in bit-clock regeneration. The document also outlines an experiment to observe these line codes in both time and frequency domains, and to analyze their spectral compositions for practical applications in telecommunications.

Uploaded by

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

Line coding and bit-clock regeneration

Preliminary discussion

Line coding
As you know, logic-0 and logic-1 in digital systems are represented by assigned voltages.
For example, the TTL logic-0 is represented by 0V and the TTL logic-1 is represented by
5V (or by acceptable voltages relatively close to 0V and 5V). As you also know, the logic
levels for other logic families like CMOS, ECL, etc are not necessarily 0V and 5V. This tells
us that logic levels can be represented by any pair of voltages we like. That said, the
choice of which voltages to use is not as arbitrary as that may seem. It’s usually an
engineering decision made to confer an advantage.

Importantly, this is also true for the choice of voltages used when sending digital signals
over transmission lines like telephone lines. Standard TTL and CMOS voltages are less
than ideal for this purpose. Moreover, even the basic premise of holding the voltage at a
particular value for the entire duration of the logic state’s value can be disadvantageous.
For these reasons, digital signals within systems are often conditioned for transmission
line communications and this is called line coding.

There are quite a few line codes. Four of them are:

 Non-return to zero – level (bipolar) (NRZ-L)


As you can see from Figure 1 on the next page, this code is a simple scale and level
shift of the original digital signal.

 Bi-phase – level (BiΦ-L also known as Manchester code)


Figure 1 shows that this code changes state from +V to –V in the middle of the bit
period for all logic-1s and changes from –V to +V in the middle of the bit period for all
logic-0s. For consecutive bits with the same logic level, the voltage must invert after
half a bit length in order to satisfy this rule for the next bit.

 Return to zero – alternate mark inversion (RZ-AMI)


Figure 1 shows that this code uses 0V to represent logic-0 and a half-bit pulse to
represent logic-1. Importantly, the polarity of the pulses alternates for every
successive logic-1 (even if they’re not consecutive bits).

 Non-return to zero – mark (bipolar) (NRZ-M)


Figure 1 shows that this code changes state for each new logic-1 and doesn’t change
state for any logic-0s.
Figure 1

Table 1 below compares the minimum bandwidth requirements for propagating these
signals along transmission lines. It also shows the line code’s usefulness for bit-clock
regeneration.

Table 1
Line code Minimum Bit-clock
bandwidth regeneratio
n
NRZ-L Poor

BiΦ-L fb Very good

RZ-AMI Good

NRZ-M Poor

As you can see, RZ-AMI offers the best compromise of the four between bandwidth and
bit-clock regeneration (as well as other line code characteristics not mentioned here) and
so it is widely used.

Bit-clock regeneration

15-2
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
In digital communications, once the transmitted signal has been demodulated by the
receiver and the digital data signal cleaned up, the data bits are read. Whatever the
circuit or device that does the reading, it must have a bit-clock that is synchronised to
the bit-clock of the original digital data. If not, some bits are read more than once and/or
other bits are not read at all. Both result in data errors.

When implementing other Telecoms-Trainer 101 digital experiments, bit-clock


synchronisation is achieved by simply stealing the bit-clock using a patch lead. This is
obviously not possible in practice for wireless communications and is impractical for
transmission line communications because an additional line is needed. As such, a
method of remotely synchronising the two bit-clocks is necessary. This is the aim of bit-
clock regeneration (BCR).

There are many ways of implementing bit-clock regeneration. To understand open-loop


methods of BCR, you have to understand that the spectral composition of the digital data
signal consists of a fundamental and harmonics that are sub-multiples and multiples of
the original data’s bit-clock (this issue is examined in Experiment 14). Usefully, the
spectral composition of line codes such as Bi-phase – level (BiΦ-L or Manchester code)
consist of a significant harmonic at the original bit-clock. In which case, this harmonic can
be recovered using an appropriately selective band-pass filter.

Others line codes (like the other three mentioned on page 15-2) don’t have a significant
harmonic at the bit-clock frequency. However, their spectral composition is such that, if
the digital data signal is mathematically squared, a significant sinewave at the original
digital data signal’s bit-clock is generated. Again, this signal can be recovered using an
appropriately selective band-pass filter.

Once the sinewave at the bit-clock frequency has been filtered, it is sent to a comparator
to convert it into a digital signal and is then ready to be used as the local bit-clock
(notwithstanding other bit-clock regeneration issues such as jitter).

The experiment
For this experiment you’ll examine the four Telecoms-Trainer 101 line code equivalents
of a standard TTL data signal in the time domain and compare them to their theoretically
predicted waveshape. Next you’ll examine the signals in the frequency domain to
establish that one of them is different to the other three in terms of its spectral
composition. Finally, you’ll square the line codes to observe the effect on the component
in them at the bit-clock frequency.

It should take you about 50 minutes to complete this experiment.

15-3
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
Equipment

 Emona Telecoms-Trainer 101 (plus power-pack)

 Dual Channel 20MHz oscilloscope

 Three Emona Telecoms-Trainer 101 oscilloscope leads

 Assorted Emona Telecoms-Trainer 101 patch leads

Parts B, C and D

 Spectrum analyser (such as the PicoScope 3204)

 An additional oscilloscope lead

Procedure

Part A – Observations of line codes in the time domain


Part A gets you observe the four Emona Telecoms-Trainer 101 line code outputs in the
time domain.

1. Gather a set of the equipment listed on the previous page.

2. Locate the Sequence Generator module and set its DIP-switches to 00.

Note: This selects NRZ-L as the line code for the Sequence Generator module’s
LINE CODE output.

3. Connect the set-up shown in Figure 2 on the next page.


Note: Insert the black plugs of the oscilloscope leads into a ground (GND) socket.

Figure 2

15-4
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
This set-up can be represented by the block diagram in Figure 3 below. The Master
Signals module’s 2kHz DIGITAL output is used to provide the Sequence Generator
module’s bit-clock. The Sequence Generator module’s X output is a continuous 31-bit
sequential binary number. The Sequence Generator module’s LINE CODE output is a copy
of its X output using the line code scheme set by the DIP-switches. The module’s SYNC
output is a pulse that corresponds with the same bit in the X output’s sequence on every
repetition and is used to trigger the scope.

Figure 3

4. Set up the scope per the instructions in the Appendix.

5. Adjust the following scope controls as indicated:

 Vertical Attenuation control for both channels to the 2V/div position


 Input Coupling controls for both channels to the DC position
 Timebase control to the 1ms/div position
 Trigger Source control to the EXT position

Note: You’ll now be viewing a portion of the X output’s 31-bit sequence.

6. Set the scope’s Mode control to the DUAL position to view both the Sequence
Generator module’s X and LINE CODE outputs.

Note 1: You may need to adjust the scope’s Trigger Level control to obtain a
stable display.

Note 2: Once done, you’ll be observing the model of a standard TTL digital data
signal and its NRZ-L equivalent.

7. Draw the two waveforms to scale and time-coincident with each other in the
space provided on the next page.

Note: Leave room for three more signals.

8. Set the scope’s Channel 1 Input Coupling control to the Ground (GND) position.

9. Align the scope’s Channel 1 trace with one of the horizontal lines on the graticule.

10 Return the scope’s Channel 1 Input Coupling control to the DC position.


.

11 Measure the absolute voltage of the X output’s two states and indicate these on
. your drawing.

15-5
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
12 Repeat Steps 8 to 11 for the NRZ-L signal on the scope’s Channel 2 input.
.

15-6
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
13. Select the BiΦ-L line code by setting the Sequence Generator module’s DIP-
switches to 01.

14 Draw the line code signal time-coincident with the other two.
.

15 Measure and record the absolute voltage of the signal’s two states.
.

16. Select the RZ-AMI line code by setting the Sequence Generator module’s DIP-
switches to 10 and draw the signal time-coincident with the others.

17 Measure and record the absolute voltage of the signal’s three states.
.

18. Select the NRZ-M line code by setting the Sequence Generator module’s DIP-
switches to 11 and draw the signal time-coincident with the others.

19 Measure and record the absolute voltage of the signal’s two states.
.

20. Compare each of the line code signals with the rules underpinning them
summarised in the preliminary discussion.

Note: If any the signals appear to change when they shouldn’t or don’t change
when they should, check your drawing. If your drawing is correct, call the instructor
for assistance.

Question 1
Which of the four line codes is bipolar?

Question 2
Which of the four line codes represents the logic-0 in the data using 0V?

Question 3
Use the rule for RZ-AMI to determine the number of logic-1s in the portion of the X
output’s data sequence being displayed.

Part B – Observations of line codes in the frequency domain


Part B gets you examine the four Emona Telecoms-Trainer 101 line code outputs in the
frequency domain using a spectrum analyser.

21. Select the NRZ-L line code by returning the Sequence Generator module’s DIP-
switches to 00.
22. Modify the set-up to include the spectrum analyser as shown in Figure 4 below.

Note: The following instructions relate to a PC-based spectrum analyser called the
PicoScope 3204. Other spectrum analysis devices can be used provided the
bandwidth is at least 250kHz.

15-7
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
Figure 4

23 Launch the PicoScope software and set its spectrum analyser controls as follows:
.
General
 Spectrum Range to 48.83kHz
 Horizontal Zoom to ×1
 Channel A Input Range to Auto
 Channel B Input Range to Off

Spectrum Options
 Spectrum Bins to 16384
 Window Function to Blackman-Harris
 Display Mode to Magnitude
 Scale to Logarithmic
 Logarithmic Unit to dBV

Note 1: If you’re using a spectrum analyser other than the PicoScope 3204, see
your instructor for a list of the controls to adjust and their appropriate settings.

Note 2: If the spectrum analyser has been set up correctly, its display will be
similar to Figure 5 below.

15-8
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
Figure 5

The pattern of humps (or lobes) and nulls in the NRZ-L line code’s spectrum is typical of
digital data signals (for reasons explained in Experiment 14). Let’s compare it to the
spectral pattern of the other three line codes.

24. Click File on the PicoScope software’s menu toolbar and select Save Current
Waveform As...

25. Select Desktop in the Save In line of the window that appears.

Note: This will save the file on the desktop making it easier to find later.

26. Change the filename to NRZ-L and click on Save.

27 Select each of the remaining three line codes one at a time and repeat Steps 24
. to 26 using an appropriate filename for the line codes.

28. To compare the four line codes, locate the files that you saved on the desktop
and open them all.

Note: You’ll need to resize and reposition the windows to compare the spectra
side-by-side.

Although all four codes exhibit the pattern mentioned above, you should be able to see
that their spectral composition is different. Recall that this is one of the reasons for
choosing to use one code over another.

One of the disadvantages of BiΦ-L (Manchester code) is that it requires twice the
bandwidth of the other three codes to propagate the signal along a transmission line.
While this limitation cannot be demonstrated using the Telecoms-Trainer 101 directly, we
can examine the spectrum of the four signals more closely to see that BiΦ-L is spectrally
different to the other three line codes.

15-9
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
29. Close the four “snapshots” and return to the “live” PicoScope window.

30. Set the Sequence Generator module’s output to the NRZ-L line code.

31. Count the number of lobes in the NRZ-L line code’s spectrum. Record your count in
Table 2 below.

Note: This figure is not the total number of lobes in the signals’ spectrum –
Remember that the spectrum analyser’s Frequency Range is set to 48.83kHz.

32. Repeat Steps 30 and 31 for the other three line codes.

Table 2
Lobes
Line code
(in 40kHz span)
NRZ-L

BiΦ-L

RZ-AMI

NRZ-M

To compare BiΦ-L to the other codes in another way, you’ll use one of the spectrum
analyser’s rulers to examine the null frequencies.

33. Set the Sequence Generator module’s output to the NRZ-L line code.

34. Set the spectrum analyser’s Spectrum Range to 24.41kHz.

35. Move the mouse to the junction of the display’s X and Y axes.

Note: When you do, the mouse cursor will change shape and a label will pop up
declaring
“1: Inactive”.

36 Click and hold the left mouse button and then move it left and right.
.
Note 1: When you do this, a dashed line representing frequency ruler #1
appears.

Note 2: A ruler legend also appears indicating the absolute frequency at the
ruler.
37 Align the ruler with the NRZ-L line code’s first null (that is, the deep trough
. between the first and second lobes at the left end of the signal’s spectrum).

38. Measure the null’s frequency and record this in Table 3 below.

39. Repeat Steps 37 and 38 for the other three line codes.

Table 3
Frequency of
Line code
first null
NRZ-L

15-10
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
BiΦ-L

RZ-AMI

NRZ-M

Question 4
Based on your results in Tables 2 and 3, which of the four codes is the odd one out?

Part C – Bit-clock regeneration without “squaring”


Recall from the preliminary discussion that some line codes contain a spectral
component at the bit-clock frequency. Line codes vary in terms of the significance of
their bit-clock component and Part C of the experiment demonstrates this.

Setting up…

40. Set the Sequence Generator module’s output to the NRZ-L line code.

41 Set the spectrum analyser’s Spectrum Range to 6.104kHz.


.
Note: It’ll now take a couple of seconds for the spectrum analyser’s display to
update periodically.

42. Use the ruler to locate the sinewave in the line code signal’s spectrum that is at the
bit-clock frequency.

Note 1: The Master Signals module’s 2kHz DIGITAL output is actually 2.083kHz.
So, the bit-clock component is the sinewave at or very near this frequency.

Note 2: Don’t be surprised if the bit-clock component is quite small relative to the
other sinewaves in the signal’s spectrum.

The PicoScope is able to perform some quite sophisticated measurements using the
rulers. You can take advantage of these to compare the size of the bit-clock component
in the Sequence Generator module’s four line codes.

43 In Spectrum Options, set the Scale to Linear then click on Apply and then Close.
.
Note: Once this change is made, the apparent size of the sinewaves should all
drop substantially.

44 If the spectrum analyser is measuring the signal’s spectrum already (there will be
. a row of measurement information displayed at the bottom of the PicoScope
window), check to see if one of the measurements has the following attributes:

 Name: Amplitude at Peak


 Span: Peak nearest ruler 1

45. If “Amplitude at Peak” is being measured for “Peak nearest ruler 1”, jump to Step
49. Otherwise continue on to the next step.

46 Click on Measurements in the PisoScope File menu.

15-11
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
.

47 Click on Add Measurement.


.

48 Select the following options (if they’ve not already selected) and then click on OK.
.
 Select the channel to measure: A
 Select the type of measurement: Amplitude at Peak
 Choose which section of the graph will be measured: Peak nearest ruler 1

49 Assuming the ruler is set correctly (per Step 42), the Value column of this row of
. measurements indicates the size of the bit-clock component in the NRZ-L line
code. Make a note of this voltage.

Note 1: It should be quite small – In the order of milli volts.

Note 2: The measurement will jump around a little. Pick the voltage that it most
commonly rests on.

50 In Spectrum Options, return the Scale to Logarithmic but don’t click on Apply yet.
.

51 Set Logarithmic Unit to Arbitrary dB.


.

52 Beneath the Logarithmic Unit window there is an untitled window. Inside this
. window type the voltage you measured at Step 49.

53. Click on Apply then Close.

Note: Figure 6 below shows an example of what you should now be seeing on the
PicoScope display before you click on Close.

Figure 6

15-12
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
The Value column in this measurement is now a number that should always be very near
to 0dB (like in Figure 6 above) though it will bounce around a little. The amplitude of the
NRZ-L line code’s bit-clock component is now the reference voltage for amplitude
measurements at this ruler. Sinewaves at this ruler that are bigger than the bit-clock
component will have positive dB figures and sinewaves at this ruler that are smaller will
have negative dB figures. You can check this for yourself by moving the ruler left and
right. If you do though, return it to 2.083kHz before continuing on to the next step of the
experiment.

54. Set the Sequence Generator module’s output to the BiΦ-L line code.

55. Determine the bit-clock component’s relative size and record the value in Table 4
below.

Note: The relative size of this sinewave can simply be read from the Value column
of this measurement.

56. Convert the dB figure to a ratio using the equation:

57. Determine the relative size of the component at the bit-clock frequency in the
remaining two line codes (in both dB and as a ratio).

Table 4
Bit-clock Bit-clock comp.
Line code
component (in (as a ratio)
dB)
NRZ-L 0dB 1

BiΦ-L

RZ-AMI

NRZ-M

Question 5
Which of the Telecoms-Trainer 101 line codes has the biggest component at the
original bit-clock frequency?

Part D – Bit-clock regeneration with “squaring”


BCR for line codes without a significant spectral component at the bit-clock frequency
necessarily involves squaring the signal first. This generates a more significant spectral
component at the bit-clock frequency that may be significant enough to be readily
filtered and cleaned-up with a comparator for use as a local bit-clock. The Part D of the
experiment demonstrates this.

58. Set the Sequence Generator module’s output to the NRZ-L line code.

59. Use the scope to accurately measure the NRZ-L line code’s peak-to-peak output

15-13
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
voltage.

60. Locate the Tuneable Low-pass Filter module and set its Gain control to about the
middle of its travel.

61. Turn the Tuneable Low-pass Filter module’s Cut-off Frequency Adjust control fully
clockwise.

62. Modify the set-up as shown in Figure 7 below.

Figure 7

The set-up in Figure 7 can be represented by the block diagram in Figure 8 below. The
Tuneable Low-pass Filter module is used to model signal-shaping to reduce signal’s
bandwidth. The Multiplier module is used to multiply the shaped line code signal with
itself effectively squaring it. This multiplies every sinewave in the signal with each other
producing a multitude of sum and difference frequencies. Some of these sinewaves are
the same frequency as the component in the signal at the original data signal’s bit-clock
frequency and so add to and enlarge it.

Figure 8

15-14
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
63. Adjust the Tuneable Low-pass Filter module’s Gain control so that its output
voltage is as close to your measured value at Step 59 as you can obtain.

64 Determine the relative size of the component at the bit-clock frequency in the
. four line codes (as you did before but in dB only). Record your measurements in
Table 5 below.

Note: The adjustment you made at Step 63 means that all of these
measurements are relative to the amplitude of the original bit-clock component of
the unsquared NRZ-L line code (per Steps 43 to 52). This means that, not only
can you compare them with each other, you can also compare them with the
values in Table 4.

Table 5
Bit-clock
Line code
component (in
dB)
NRZ-L

BiΦ-L

RZ-AMI

NRZ-M

Question 6
Compare the Figures in Table 5 with those in Table 4. What effect does squaring
the line code’s signal have on the sinewave in its spectrum at the bit-clock
frequency?

Question 7
Which of the squared line codes now has the biggest component at the original bit-
clock frequency?

Question 8
What is needed to pick this sinewave out of the signal’s spectrum and turn it into a
squarewave?

15-15
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments
15-16
Experiment 15 – Line coding & bit clock regeneration © Emona Instruments

You might also like