DATA ALIGNMENT

Abstract: In a method of aligning a data receiver (2) with a data transmission from, e.g., a head-end station (1), data is encoded for transmission with a hybrid differential coding scheme including at least one invalid codeword, and the coding scheme for the differential part of the codewords includes the invalid codeword(s) used for word alignment of the receiver (2). At the receiver (2) the data is detected in phase with a local clock. The phase of the local clock is modified in response to any occurrence in the detected data of an invalid codeword.

Description: DATA ALIGNMENT The present invention relates to the alignment of a receiver in a digital data transmission system so that the decoding of words of data in the receiver is synchronised with the transmission of data from the transmitter or other data source. The invention is of particular value in the handling of digitally encoded composite video signals distributed over optical networks, but may also be used with other forms of data and different transmission media. It has previously been proposed to encode video signals for distribution on an optical network using techniques such as pulse density modulation (PDM) or pulse code modulation (PCM). However such techniques require relatively high bit rates. To overcome this problem more complex coding schemes such as differential PCM (DPCM) may be used. An input video signal at a head-end station is applied to an encoder which generates and outputs appropriate codewords in accordance with the particular coding scheme adopted. These codewords are converted into a serial bit stream- and modulated onto an optical signal which is transmitted onto the optical network and subsequently detected by an optical receiver. The output from the optical receiver is decoded using a complementary process to that adopted in the head-end station. In carrying out this decoding process the serial bit stream transmitted over the network has first to be assembled into the appropriate codewords and this requires alignment at the word-level as well as the bit-level between the decoder and the transmitter. Conventionally this has been achieved by transmitting some form of alignment signal in addition to the video data, this however gives rise to an undesirable overhead in the transmission rate. To avoid such an overhead it is possible alternatively to replace some of the least significant bits of the video signal with synchronisation words but this has the disadvantage of introducing small but regular errors into the video signal which may be visible when that signal is decoded. According to the present invention there is provided a method of aligning a data receiver with a data transmission, comprising encoding data for transmission with a coding scheme including at least one invalid codeword, detecting data bits at the receiver in accordance with a local clock, and modifying the phase of the local clock in response to an occurrence in the detected data of the invalid codeword, . characterised in that the data is encoded with a hybrid differential coding scheme, whereby a first code representative of an absolute value and a second code representative of a differential value are assigned to each input signal, the coding scheme for the differential codes including the at least one invalid codeword. By an "invalid codeword" is meant a word which is never normally assigned to any of the possible input signals. The detection of such an invalid codeword then indicates that data has been corrupted by an error in alignment between the receiver and the transmitter and may be used to prompt a correction in the phase of the decoder clock. A hybrid differential coding scheme is of particular advantage when the encoded data is a video signal, in which composite codewords representing both a coarsely quantised absolute level and a difference value are transmitted. The invalid codeword(s) is provided only for the differential part of the composite code. The differential code is then decoded separately at the receiver and the invalid codeword used to maintain word alignment. The differential coding scheme will in general have many quantisation levels so that the loss of one quantisation level in order to provide the invalid codeword does not significantly degrade the performance of the system. The present invention is able to maintain word alignment without the disadvantages of a transmission overhead or the introduction of errors in the transmitted data. In practice, when correct word alignment is achieved invalid codewords may still be detected occasionally as a result of noise in the transmission medium. Preferably therefore the receiver compares the rate of occurrence of invalid codewords with a predetermined threshold and modifies the phase of the local clock only when that threshold is exceeded. A method in accordance with the present invention will now be described in detail with reference to the accompanying drawings in which: Figure 1 is a block diagram of a data transmission system; Figure 2 is a block diagram of a codec for use in the system of Figure 1; Figure 3 is an encoder suitable for hybrid differential coding; Figure 4 is a decoder suitable for hybrid differential coding; Figure 5 is a table showing equivalence of numbers with sign bit omitted; Figure 6 is a diagram showing the characteristic of a Bostelmann quantiser; Figure 7 is a diagram showing a full Bostelmaunn characteristic; Figure 8 is a diagram of quantisation levels for hybrid D-PCM; Figure 9 is a diagram showing the decoding of hybrid D-PCM signals; and Figure 10 is a diagram showing error propagation for hybrid D-PCM. A video signal is transmitted from a head-end station 1 to a number of receivers 2 via a fibre network 3. The head-end station 1 includes an A/D converter 4 which receives an input analogue video signal, and a codec (coder/decoder) 5 which encodes the output from the converter 4 for transmission onto the network 3. The output from the codec 5 is transmitted onto the network 3 in bit-serial form and is modulated onto an optical carrier in a conventional manner. At each receiver 2 the serial bit stream is assembled into codewords and decoded by the receiver' s codec 6. The output from the receiver codec 6 is fed to a D/A converter 7 where the composite video signal is reconstituted. The codecs 5, 6 use hybrid differential PCM to encode and decode the video signals. A transmitter codec 5 is shown schematically in Figure 2. The codec 5 achieves bit rate reduction by having a predictor which makes an estimate of the next sample value based upon the value of one or more previous (and in some cases future) samples. This means that if the prediction is good, the PCM difference words will be small in value. The current PCM word and the predicted value are compared in a comparator 8 and the resulting difference word is coded by a non-linear quantiser 9. Then if the non-linear quantiser 9 is arranged such that it codes small values accurately and larger values less accurately, provided that the predictor makes a good estimate most input signals will be accurately coded at a reduced bit-rate. Additionally, the eye is less sensitive to errors in parts of the picture which are rapidly changing, hence any error introduced by the coarse grained coding of larger changes is generally acceptable. It is mainly the complexity of the predictor which determines how many output codewords are required, and hence the overall transmission rate. Apart from low-frequency components from the synchronisation signals and slow changes in the picture, the major spectral components in a composite video signal are in the vicinity of the colour sub-carriers (4.433 MHz for PAL, 3.58 MHz for NTSC, and 4.25 MHz and 4.41 MHz for SECAM). In order to provide good quality transmission by DPCM of composite video signals it is necessary to encode these components accurately. Hence the predictor must be well suited to predicting the colour sub-carrier. A number of different structures are possible for the predictor, and it is found to be particularly advantageous to sample the input signal at an integral multiple (n) of the sub-carrier frequency and to use the nth previous sample as the prediction value. Although such techniques allow sampling at a rate as low as three times the sub-carrier frequency they do suffer one significant drawback in that once an error is made, because each sample is dependent upon the previous one, this error propagates through the rest of the picture until the system is reset, typically at the start of the next line. This gives rise to streaks appearing in the received pictures under error conditions. To overcome this problem the structure shown in Figure 2 is modified as shown in Figure 3 to provide hybrid differential PCM. In this system the word which is actually transmitted over the network 3 is the sum of the quantised difference value and a coarsely quantised estimate of the absolute value. Such a system is described in the paper by M. C. W. Van Buul, "Hybrid D-PCM, A Combination of DPCM and PCM", IEEE Trans, on Communications, Vol. COM-26, No. 3, 3/78, pp 362-8. In the present embodiment the differential signal is encoded using a Bostelmann quantiser 10 having a reflected characteristic. As a result, it is possible to transmit this hybrid word in the same number of bits as would be required for the difference word alone. The concept of hybrid DPCM and the Bostelmann quantiser are discussed in more detail later. As shown in Figure 3 the output from the codec 5 is a composite codeword e' +i, where e' is the differential codeword as quantised by the Bostelmann quantiser 10 and i is the coarsely quantised predicted absolute value output by the predictor 11. The composite codeword is then converted to a serial bit stream by a parallel-to-serial converter 12 before being output onto the network 3. In the receiver codec 6 shown in Figure 4 a complementary structure is used. The serial data received from the network 3 is converted into parallel codewords by a serial-to-parallel converter 13. The output of a predictor 14 matched to that in the head-end station is then subtracted from the composite codeword e' +i to leave the differential codeword e' which is applied to a de-quantiser 15 having characteristics matched to the Bostelmann quantiser 10 in the head-end station 1. Further subtraction of the predictor value i then leaves the true absolute value i which is fed to the D/A converter 7 and output. For correct operation the receiver described above must be aligned at the word level with the transmitter. To this end the Bostelmann quantiser 10 used to encode the differential part of the composite codeword is modified so that only 31 of the 32 levels possible with a five bit system are assigned, leaving one codeword which is "invalid" in the sense that it would never be generated in response to any input signal in the head-end station 1. In the receiver codec 6 the alignment of the serial-to-parallel converter 13 is governed by a local clock 17. A monitor circuit 16 is provided between the output of the serial-to-parallel converter and the de-quantiser 15. This monitor detects any occurrences of the invalid codeword. When the rate at which any such invalid codewords are detected exceeds a predetermined threshold then the monitor outputs a signal to the local clock for the serial-to-parallel converter 13, advancing the phase of that clock step-wise by one bit. If after that correction to the phase of the local clock the serial-to-parallel converter 13 is correctly aligned then invalid codewords will cease to appear at the input to the monitor and the current phase of the local clock is maintained until any further error in alignment occurs. However, if a step of one bit is insufficient to correct the misalignment then further invalid codewords are detected, in response to which the monitor further advances the phase of the clock until alignment is reached. In this manner the monitoring of the differential codewords to detect the invalid codes provides a control loop which locks the serial-to-parallel converter to the phase of the transmitter at the word level. As an alternative to the arrangement adopted in the above embodiment, the phase of the local clock can be modified by advancing it stepwise by an integral number of bits. The number of bits in each step must not be equal to, or an integral multiple of, the number of bits in each codeword. The description below discusses the properties of the Bostelmann quantiser and hybrid DPCM in further detail. The Bostelmann Quantiser This is a non-linear quantiser which provides the necessary bit reduction for the video compression. It is used to quantise the 8-bit DPCM difference word obtained when the prediction value is subtracted from the incoming signal. As the difference (e) between the prediction and incoming signal can be either positive or negative, then a sign bit is needed in the DPCM difference word. The Bostelmann quantiser, however, makes it possible to omit this sign bit, and still be able to decode the signal correctly. If there are 2 quantisation levels, then the possible positive differences range from 0 to 2 n -1; while the negative differences range from -1 down to -(2 -1). This gives a total of 2x2 levels. For n=8, this would mean a range of difference values from -255 to 255. With the sign bit omitted, then a positive number will remain the same, while a twos complement negative number & will now appear as the positive number 2 n - e. This is shown in Figure 5. For example, ' 24' in decimal, represented in 8-bits, and prefixed by a sign bit is written as '000011000'. Remove the sign bit and the binary word ' 00011000' is obtained, which still represents decimal ' 24' . However, if we take the decimal value ' -24' , then this is written in binary as ' 111101000'. If the sign bit is omitted, then this becomes ' 11101000' , which is equivalent to ' 232' in decimal. (This is the result obtained from 256-24. ) Thus each binary word, which will be in the range 0 to 2 -1, will have two possible values, one positive and one negative (e. g. the pair ' -24' and ' 232' ). At the receiver, the difference word is added to the prediction, which will give a result in the range 0 to 2 ( n+l ) _ j _ (f} to 511 for n=8)- It is known that t h e sample to be reconstructed must lie in the original quantiser range 0 to 2 -1. Thus the ambiguity in the received word is removed, as a sum greater than 2 -1 will indicate that it represented a negative difference. The word can easily be decoded by omitting the carry bit ffrroomm tthhee ssuumm,, wwhhiicchh iiss eeqquuivalent to subtracting 2 , giving the result required. For example, if ' 11101000' (' -24' ) was received, and a prediction value of '01111110' (' 126' ) was to be added, the resulting binary word would be ' 101100110' (' 358' ). This clearly cannot represent a valid input value as it is greater than 255, the maximum output available from the ADC. By omitting the carry bit this becomes '01100110', representing ' 102' (126-24), and so the sample has been decoded correctly. Therefore the error word is quantised without a sign bit, and is reconstructed without using the carry bit. The Bostelmann quantiser has the characteristic shown in Figure 6. It is symmetrical about the mid-point because of the sign ambiguity. As positive and negative errors (e. g. ' -1' and ' +1' ) should be encoded with the same accuracy, then these must be represented by the same step sizes. As e is equivalent to 2 n -&, then these must also be represented by the same step size. Therefore +e, -e, 2 +e and 2 -e must all be encoded with the same accuracy. This leads to the full effective characteristic shown in Figure 7, with the negative portion being implied due to this sign ambiguity. The Van Buul Hybrid D-PCM Principle The idea behind hybrid D-PCM as suggested by Van Buul is to combine PCM and DCPM to achieve the bit rate reduction of DPCM while retaining the low error propagation of PCM. This is done by measuring each quantised sample on two scales. One being a coarse fixed PCM scale, and the other a sliding scale (ideally non-linear) as is used in DPCM. It is the sum of these two values (a hybrid DPCM word) that is transmitted. Each of these scales will have lower resolution than that with which the signal was initially quantised, to provide the required bit reduction. The Encoder The signal is sampled and quantised, then measured using the fixing scale, to the nearest lower level as for PCM. This is then compared to the previous sample on the sliding scale to give the difference value, as in DPCM. Thus each sample can be represented in two ways - as an absolute PCM value (p), or as a difference DPCM value (d). These two values are added to give the hybrid D-PCM word h (h = p+d), which is transmitted. This gives an adaptive system, since the range of differences allowed depends upon the level of the input signal, so effectively the quantisation characteristic used depends on the input level. As the difference value has ranges from -(2 n -l) to 2 n -l, while the absolute value will lie in the range 0 to 2 n -l, then this sum can take any value between -(2 n -l) and 2 n+ -1. In the basic system, this hybrid value is restricted to lie in the range 0 to 2 -1, requring two less bits to represent the information than if the full range was used, though this means that not all the difference values are available. This is shown in Figure 8, with only eight quantisation levels (n=3) for simplification, and with a non-linear differential scale. The unavailable levels are indicated by dashed lines. Example Working from the left of Figure 8, the first incoming level measures ' 2' on the fixed scale. The second incoming sample, measured to the nearest lower level on the fixed scale gives p=5. Comparing the actual level of both this and the previous sample, gives a value of d=+5 when measured on the differential scale to the nearest lower level. The second sample is thus represented by the hybrid word ' 7' , which is generated by adding the previous fixed scale value and the difference value between the previous and current samples. The third word measures - 6' on the fixed scale, and the difference between this, and the second, is ' +2' . Summing this with the previous fixed scale value of ' 5' gives a transmitted hybrid word of ' 7' . And so this process is repeated to give the hybrid words for transmission shown. The Decoder The hybrid words arriving at the receiver are decoded using the preceding fixed scale value p. It is assumed that the previous sample was decoded correctly, so that is amplitude can be measured on the fixed scale, to give the same value p as was obtained in the encoder. This is subtracted from the incoming hybrid word h, to regenerate the difference number d, as measured on the non-linear sliding scale. This value is added to the fixed scale value, to give the amplitude of the sample being decoded. This gives the reverse of the encoding process, and is demonstrated by Figure 9. The error introduced by this system is indicated by arrows. The coarse scale with which the PCM word is coded has little effect on the accuracy with which the signal is decoded, as the output level obtained is constructed from the sum of the PCM values and the more finely quantised difference values, which effectively gives more levels than are available on just the fixed scale. This means that, for example, near eight-bit accuracy can be obtained from a hybrid system transmitting just five bits. Looking at the left hand side of Figure 9, a sample has been decoded correctly as '2', and a value of ' +T has been received. The difference value this represents is given by 7-2=5. A value of ' +5' on the difference scale from ' 2' on the fixed scale gives a value p of ' 4' for the purpose of decoding the next sample. (The actual decoded output will be found from the level the amplitude represents on a finer measuring scale. ) It can be seen from comparisons with Figure 8, that the value for p used in the encoding of this sample was ' 5' rather than ' 4' . However, as Figure 9 shows, the actual error in the output level is small. As p at the decoder is lower that in the encoder, then this will result in the next hybrid word received generating a higher difference word, which helps to cancel out the initial decoding error. This problem is exaggerated in the diagrams given, due to the few quantisation levels used. Error Propagation Hybrid DPCM has improved error recovery compared with DPCM. This is because each transmitted word contains both absolute and relative information, and so the effect of transmission errors are reduced. Figure 10 demonstrates the effect of an error in the first transmitted word of Figure 8 and shows that it is corrected within three samples. The transmission error has caused the first hybrid word to be received as ' 3' , instead of the ' 7' which was sent. This will -give the difference word 3-2=+l (instead of '+5' ). This difference, added to the initial correct PCM value ' 2' , gives a p value of ' 2' (instead of ' 5' ). The next hybrid word, ' 7' is received correctly, and gives a difference value of 7-2=+5. This sliding scale value is added to the previously decoded, but incorrect, p value. This results in a fixed scale p value of ' 4' (rather than ' 6' ). The next hybrid word is correctly received as ' 0' , resulting in a difference word of 0-4=-4, and gives a p value of ' 2' . Therefore the error has been corrected since as this gives the same fixed scale value as would have resulted if the initial transmission error had not been present, as described by Figure 10. The actual error in the decoded output can be seen to reduce, until after four samples the only error remaining will be caused by the encoding-decoding process. (Though this actual error will be different from that which would have been present without the transmission error. ) Problems with the System With the system described above, then a severe overload problem is possible, due to the limited range of allowable difference values (i. e. only transmitting hybrid values in the range 0 to 2 n -l). For example, in Figure 8, with an initial PCM value of ' 2' , only differences from ' -2' to ' +5' give hybrid words in the correct range of '0' to ' 7' . This represents PCM values from ' 1' to ' 5' . Thus if the next sample was ' 6' , the system would overload. One way of overcoming this problem is to limit the input signal, so that it can never reach the limits of the fixed scale, and so will never be such as to cause overload. Alternatively the quantisation characteristics can be chosen so that the fixed and sliding scales are better matched. This is what is done for the system described in the next section. Practical Hybrid DPCM System By using the folded quantisation characteristic described by Bostelmann, the overload problem is eliminated. This is because it is no longer necessary to limit the range of the differential words allowable so that the transmitted word lies in a certain range. If a negative difference occurs, then the Bostelmann quantiser will represent this without the sign bit, so it will appear as a positive number. Thus the resulting hybrid word will still be in the required range, without the difference values having to lie in a limited range, due to positive and negative values being indistinguishable. The result is a DPCM circuit with effectively twice as many quantisation levels as normally available for the number of bits, by virtue of the double characteristic. This gives a complete ciruit with approaching the same number of bits as the original PCM since the coarse and fine scales are added to give effectively the original PCM resolution.

Claims: CLAIMS 1. A method of aligning a data receiver with a data transmission, comprising encoding data for transmission with a coding scheme including at least one invalid codeword, detecting data bits at the receiver in accordance with a local clock, and modifying the phase of the local clock in response to an occurrence in the detected data of the invalid codeword, characterised in that the data is encoded with a hybrid differential coding scheme, whereby a first code representative of an absolute value and a second code representative of a differential value are assigned to each input signal, the coding scheme for the differential codes including the at least one invalid codeword. 2. A method according to claim 1, further comprising comparing the rate of occurrence of invalid codewords with a predetermined threshold and modifying the phase of the local clock only when that threshold is exceeded. 3. A method according to claim 1 or claim 2, in which the data encoded for transmission is a video signal. 4. A method according to any one of claims 1 to 3, in which the phase of the local clock is modified εtepwise by k bits, where k is an integer and not equal to, or an integral multiple of, the number of bits in each codeword.

Inventors: COOK ANDREW ROBERT JOHN, FAULKNER DAVID WYNFORD, COOK, ANDREW, ROBERT, JOHN, FAULKNER, DAVID, WYNFORD
Applicants: BRITISH TELECOMM, BRITISH TELECOMMUNICATIONS PUBLIC LIMITED COMPANY
Application year: 1991
Main classification: H04L7
IPC codes: H03M9, H03M13, H04B14, H04L7, H04N7