## Coding

Older PCM systems used a 7-bit code, and modern systems use an 8-bit code with its improved quantizing distortion performance. The companding and coding are carried out together, simultaneously. The compression and later expansion functions are logarithmic. A pseudologarithmic curve made up of linear segments imparts finer granularity to low-level signals and less granularity to the higher-level signals. The logarithmic curve follows one of two laws, the A-law and the ^-law (pronounced mu-law). The curve for the A-law may be plotted from the formula

Ajx I

where A = 87.6. (Note: The notation ln indicates a logarithm to the natural base called e. Its value is 2.7182818340.) The A-law is used with the E1 system. The curve for the

Figure 6.4 Simple graphic representation of compression. Six-bit coding, eight six-bit sequences per segment.

114 DIGITAL NETWORKS ¡-law is plotted from the formula ln(1 + ¡\x\)

where x is the signal input amplitude and ¡x = 100 for the original North American T1 system (now outdated), and 255 for later North American (DS1) systems and the CCITT 24-channel system (CCITT Rec. G.733) (see Ref. 3).

A common expression used in dealing with the "quality" of a PCM signal is signal-to-distortion ratio (S/D, expressed in dB). Parameters A and for the respective companding laws, determine the range over which the signal-to-distortion ratio is comparatively constant, about 26 dB. For A-law companding, an S/D = 37.5 dB can be expected (A = 87.6). And for ¡-law companding, we can expect S/D = 37 dB(x = 255) (Ref. 4).

Turn now to Figure 6.5, which shows the companding curve and resulting coding for the European E1 system. Note that the curve consists of linear piecewise segments, seven above and seven below the origin. The segment just above and the segment just below the origin consist of two linear elements. Counting the collinear elements by the origin, there are 16 segments. Each segment has 16 8-bit PCM codewords assigned. These are the codewords that identify the voltage level of a sample at some moment in time. Each codeword, often called a PCM "word," consists of 8 bits. The first bit (most significant

Figure 6.5 The 13-segment approximation of the A-law curve used with E1 PCM equipment.

bit) tells the distant-end receiver if the sample is a positive or negative voltage. Observe that all PCM words above the origin start with a binary 1, and those below the origin start with a binary 0. The next 3 bits in sequence identify the segment. There are eight segments (or collinear equivalents) above the origin and eight below (23 = 8). The last 4 bits, shown in the figure as XXXX, indicate exactly where in a particular segment that voltage line is located.

Suppose the distant end received the binary sequence 11010100 in an E1 system. The first bit indicates that the voltage is positive (i.e., above the origin in Figure 6.5). The next three bits, 101, indicate that the sample is in segment 4 (positive). The last 4 bits, 0100, tell the distant end where it is in that segment as illustrated in Figure 6.6. Note that the 16 steps inside the segment are linear. Figure 6.7 shows an equivalent logarithmic curve for the North American DS1 system.2 It uses a 15-segment approximation of the logarithmic f-law curve (f = 255). The segments cutting the origin are collinear and are counted as one. So, again, we have a total of 16 segments.

The coding process in PCM utilizes straightforward binary codes. Examples of such codes are illustrated in Figure 6.5 and are expanded in Figure 6.6 and Figure 6.7.

The North American DS1 (T1) PCM system uses a 15-segment approximation of the logarithmic f-law (f = 255), shown in Figure 6.7. The segments cutting the origin are collinear and are counted as one. As can be seen in Figure 6.7, similar to Figure 6.5, the first code element (bit), whether a 1 or a 0, indicates to the distant end whether the sample voltage is positive or negative, above or below the horizontal axis. The next three elements (bits) identify the segment, and the last four elements (bits) identify the actual quantum level inside the segment.

6.2.3.1 Concept of Frame. As is illustrated in Figure 6.2, PCM multiplexing is carried out with the sampling process, sampling the analog sources sequentially. These sources may be the nominal 4-kHz voice channels or other information sources that have a 4-kHz bandwidth, such as data or freeze-frame video. The final result of the sampling and subsequent quantization and coding is a series of electrical pulses, a serial bit stream of 1s and 0s that requires some identification or indication of the beginning of a sampling

Figure 6.7 Piecewise linear approximation of the ^-law logarithmic curve used with the DS1 format.

sequence. This identification is necessary so that the far-end receiver knows exactly when the sampling sequence starts. Once the receiver receives the "indication," it knows a priori (in the case of DS1) that 24 eight-bit slots follow. It synchronizes the receiver. Such identification is carried out by a framing bit, and one full sequence or cycle of samples is called a frame in PCM terminology.

Consider the framing structure of the two widely implemented PCM systems: the North American DS1 and the European E1. The North American DS1 system is a 24-channel PCM system using 8-level coding (e.g., 28 = 256 quantizing steps or distinct PCM code words). Supervisory signaling is "in-band" where bit 8 of every sixth frame is "robbed" for supervisory signaling.3-5 The DS1 format shown in Figure 6.8 has one bit added as a framing bit. (This is that indication to tell the distant end receiver where the frame starts.) It is called the "S" bit. The DS1 frame then consists of

(8 x 24) + 1 = 193 bits, making up a full sequence or frame. By definition, 8000 frames are transmitted per second (i.e., 4000 x 2, the Nyquist sampling rate), so the bit rate of DS1 is

3"In-band," an unfortunate expression harking back to the analog world.

4In the DS1 system it should be noted that in each frame that has bit 8 "robbed," 7-bit coding is used versus 8-bit coding employed on the other five frames.

5Supervisory signaling is discussed in Chapter 7. All supervisory signaling does is tell us if the channel is busy or idle.

The S-bit is time-shared between terminal framing (F|) and signal framing <Fs>-

Figure 6.8 DS1 signal format.

The S-bit is time-shared between terminal framing (F|) and signal framing <Fs>-

### Figure 6.8 DS1 signal format.

The E1 European PCM system is a 32-channel system. Of the 32 channels, 30 transmit speech (or data) derived from incoming telephone trunks and the remaining 2 channels transmit synchronization-alignment and signaling information. Each channel is allotted an 8-bit time slot (TS), and we tabulate TS 0 through 31 as follows:

Type of Information

0 Synchronizing (framing)

1-15 Speech

16 Signaling

17-31 Speech

In TS 0 a synchronizing code or word is transmitted every second frame, occupying digits 2 through 8 as follows:

### 0011011

In those frames without the synchronizing word, the second bit of TS 0 is frozen at a 1 so that in these frames the synchronizing word cannot be imitated. The remaining bits of TS 0 can be used for the transmission of supervisory information signals (Ref. 16).

Again, E1 in its primary rate format transmits 32 channels of 8-bit time slots. An E1 frame therefore has 8 x 32 = 256 bits. There is no framing bit. Framing alignment is carried out in TS 0. The E1 bit rate to the line is

Framing and basic timing should be distinguished. "Framing" ensures that the PCM receiver is aligned regarding the beginning (and end) of a bit sequence or frame; "timing" refers to the synchronization of the receiver clock, specifically, that it is in step with its companion far-end transmit clock. Timing at the receiver is corrected via the incoming "1"-to-"0" and "0"-to-"1" transitions.6 It is mandatory that long periods of no transitions

6A transition in this context is a change of electrical state. We often use the term "mark" for a binary 1 and "space" for a binary 0. The terms mark and space come from old-time automatic telegraphy and have been passed on through the data world to the parlance of digital communications technology.

do not occur. This important point is discussed later in reference to line codes and digit inversion.

0 0