Coding technology detailed

xiaoxiao2021-03-06  110

Level 1 Connection Code Principle

Error correction coding technology is to improve system reliability by introducing controlled redundancy. Its theoretical cornerstone is the famous atroiographic coding theorem proposed in "Communication Digital Theory" in 1948. The error correction code has different classification according to different classification standards. We are commonly used to classify different methods of information element processing, divided into packet codes and convolutional codes. The grouping code is a sequence of information outputted by the source, divided into a section in K symbols, and generates the K information elements of this section through the encoder, generates R check (supervision) yuan according to a certain rule, and the output length is n = A code group of K R. Comparable for BCH code, RS code, Hamming code, etc. The volume code is a sequence of information output to the output source, divided into segments in K0 (K0, typically less than k) symbol, and outputs a length of N0 (≥ usually less than k) symbol by encoder to a segment, by encoder The output length is N0 (≥ usually less than k) symbols are divided into a segment, and a code is output to N0 (≥ K0) by the encoder. However, the N0-k0 calibration elements of the code segment are not only related to the information of this group, but also related to the previous M segment information elements, called M is encoded storage. Therefore, the convolution code is represented by (N0, K0, K).

As can be seen from the channel coding theory, as the code length N increases, the decoding error probability is approximately zero in an index mode. Therefore, in order to improve the effectiveness of the error correction code, long code must be used. However, the code length increases, and the code rate will decrease, and the complexity and calculation amount of the decoding device also increases accordingly, and the cascade code has targeted solution. It divides the encoding process into several levels of front and rear serials, which can meet the requirements of the channel error correction to the length of the encoding, get the same error correction ability and high coding gain as the long code; and increased / decoded complexity is not very large . The schematic block diagram of the principle is shown in Figure 1.

Class Co-code has an internal code and outer code, the internal code is a [n, k] code on GF (2), the outer code is [N, K] on GF (2K), the encoding rules are as follows.

1 First divide K × K binary information tunages into K segments, there are K information elements per period.

2 The k information per segment can be seen as a symbol on GF (2K). The K symbols are composed of an external code, the code length is n, with K information symbol, N-k check symbol, the minimum line rate RO = k / n.

3 Each symbol of the outer code, see the code group of k binary symbols, input the internal code encoder, get a memory, code length n, have NK calibration dollar, minimum code distance is Di, code rate ri = k / N, thereby obtaining N [N, K] code preface. The 2-stage code has a total of N × N binary code elements, K × K information elements, composition [K × N, K × K, DO × Di] cascade code.

The outer code we choose is RS (31, 15) code, generate polynomials to g (x) = 1 x2 x3, the internal code convolution (2, 1, 7), which generates polynomial G0 = 171, G1 = 131 (all eight). The RS code is GF (Q) (q! = 2), the BCH code of the code length n = q-1, has a strong error correction ability, the maximum minimum distance is the number of calibrations. 1. Therefore, the RS code is a very minimum distance-free (MDS), is an optimal linear cycle code. The Hamming distance of the RS (31, 15) code used in this example is 17, and 8 errors can be corrected. Interleaving technology is an important means of anti-sudden interference. It is an interleaving matrix, and the storage direction is different from the direction of transmission, thereby disseminating sudden dispersion, improving anti-sudden interference. In this scenario, the RS encoding is stored in line, and the seminars are sent, and each column is convoluted, and the 8 × long interference can be resistant. Convolution encoding the Viterbi soft decision decoding, which can sufficiently utilize the correlation between each code group, improve high coding gain. The error correction performance simulation diagram of each component code and cascading is shown in Figure 2. Test point ---- check code

The binary data passes through the transmission, access, etc., and the error occurs (1 becomes 0 or 0 to 1), which has a problem that the error is found and correcting the error. All methods for resolving this class 4 is to add several check (redundant) bits based on raw data (digital bit).

First, code distance

Any two-way (bit) number between any two legal encoding (codewords) in an encoding system calls the code distance of the two codewords, and the minimum distance of any two codewords in the entire encoding system is The code distance of the encoding system.

As shown in Figure 1, the three bits are used to represent eight different information. In this system, the number of bits between the two codes is from 1 to 3, but the minimum is 1, so the code distance of this system is 1. If one or more of the codewords are reversed, the code word cannot be separated from other valid information. For example, if the information 001 is transmitted, 011 is missed, because 011 is still a legal code word in the table, the receiver will still be considered to be correct information.

However, if you use four binary numbers to edit 8 codewords, the minimum distance between the code characters can be increased to 2, as shown in the table of FIG.

Information number

Binary word

A2

A1

A0

0

0

0

0

1

0

0

1

2

0

1

0

3

0

1

1

4

1

0

0

5

1

0

1

6

1

1

0

Seduce

1

1

1

figure 1

Information number

Binary word

A3

A2

A1

A0

0

0

0

0

0

1

1

0

0

1

2

1

0

1

0

3

0

0

1

1

4

1

1

0

0

5

0

1

0

1

6

0

1

1

0

Seduce

1

1

1

1

figure 2

Note that the eight codewords in Figure 8-2 have the least two bits differences in each other. Therefore, if a number of information is reversed, it becomes a unused codeword, and the receiver can check it out. For example, the information is 1001, misconnected is 1011, the receiver knows a mistake, because 1011 is not a codeword (not in the table). However, errors cannot be corrected. It is assumed that only one digit is wrong, the correct code word can be 1001, 1111, 10011 or 1010. The recipient cannot determine the one of these 4 codewords. It can also be seen that in this system, even (2 or 4) errors cannot be found. In order to enable a system to check and correct an error, the minimum distance between the code must be at least "3". When the minimum distance is 3, you can correct a fault, or you can check two faults, but you can't correct and check two faults at the same time. Further increase in encoding information error correction and error error requires further increasing minimum distance between code. Figure 8-3 of the table summarizes the error correction and error error of the minimum distance from 1 to 7. Code distance

Code energy

Error correction

1

2

3

4

5

6

Seduce

0 0

1 0

2 or 1

2 plus 1

2 plus 2

3 plus 2

3 plus 3

The larger the code distance, the stronger the error correction ability, but the larger the data redundancy, that is, the coded efficiency is low. Therefore, the choice of code distance depends on the parameters of a particular system. The designer of the digital system must consider the probability of errors and the minimum error rate that the system can allow. There must be special research to solve these problems.

Second, parity

The parity code is a simple and widely used method for increasing the minimum distance of the binary transmission system. For example, a single parity will make the minimum distance of the code from one to two.

A binary code word, if its symbols are odd 1, it is called a genity. For example, the code word "10110101" has five 1, so this codeword has a generous. Similarly, the even codeword has even several 1. Pay attention to the model two plus all symbols of all symbols, and can be determined by the different or calculations of all symbols. For a n-bit word, the singularity is given by the following formula:

Single = a0 ⊕⊕1⊕a2⊕ ... ⊕⊕

The parity can be described as: add a check bit to each codeword, use it to constitute a strategy or even check. For example, in Figure 8-2, it is done. It can be seen that additional symbol D2 is simply used to make each word even. Therefore, if a symbol is wrong, it can be distinguished, because the parity check will become ace. Parity coding By increasing a check bit to make 1 number of odd numbers (odd-calibrated) or an even (even check), so that the code distance is 2. Because it is based on the parity of the number of numbers in the encoding, the even bit error cannot be found.

In the case of the seven ASCII code (0110000) of the number 0, if the right side of the right is wrong, 0 becomes 1. The receiving end is also considered a legitimate code 0110001 (ASCII code of the number 1). If a odd calibration bit is added to the left, the encoding becomes 10110000. If the first bit is wrong after transmission, the number of 10110001, 1 becomes an even number, which is not a legally qualified code code. However, if there are two (assuming is the first, 2) error, the number of 10110011, 1 is 5 or odd. The receiving end is also considered a legitimate code (the number 3 ASCII code). Therefore, parity cannot be found.

The parity bit can be generated by the hardware circuit (exclusive or door) or software:

Even Audition AN = A0⊕A1 ⊕A2 ⊕ ... ⊕an-1, odd calibration block AN = NOT (A0⊕a1⊕a2⊕ ... ⊕an-1). In a typical system, the parity bit is added to each word by the parity generator before transmission. The numbers in the original information are detected in the receiver. If there is no correct odd, even, this information is calibrated, and this system will throw the wrong word or request retransmission.

In actual work, the coding system of the vertical and accepted statement of the packets is often used in the actual work - packet parity code.

Now consider a system, it transmits information of several lengths of M bits. If this information is composed of packets of each group of N information, the different information is also possible, such as the single information, like a single information. One packet of N information in Figure 4 is arranged in a torque form, and a parity bit is selected in the form of a horizontal parity (HP) and longitudinal parity (VP).

M-bit number

Horizontal parity

n

A

code

word

A1

A2

...

AM-1

AM

HP1

B1

B2

...

BM-1

BM

HP2

C1

C2

...

CM-1

cm

HP3

...

...

...

...

...

...

n1

n2

...

NM-1

nm

HPN

VP1

VP2

...

VPM-1

VPM

HPN 1

Portrait parity

Figure 4 Packet parity code with a cross-vocal parity

Research FIG. 4 is known that the packet parity code may not only detect a number of errors. And when an isolated error is generated in a given row or column, the error can also be corrected.

In the primary programmer test (early in the programmer test), there is often a topic of a synthetic check. The general solution should be like this: first find a row or a column of known data is complete, determine that the line (or column) is aqi calibration or even check. And assume that the line and column use the same check (this assumption is correct, you can get verification after all do it). Then find only one unknown row or column, determine the unknown in accordance with the quality of the verification, so that the unknown number can be obtained.

[Example] 2001 primary programmer questions

Arranged from 7-bit ASCII coded, coupled with horizontal vertical parity blocks constitutes the following matrix (the last list is a horizontal parity bit, the last behavior vertical parity bit):

character

7 ASCII code

HP

3

0

X1

X2

0

0

1

1

0

Y1

1

0

0

1

0

0

X3

1

X4

1

0

1

0

1

1

0

Y2

0

1

X5

X6

1

1

1

1

Di

1

0

0

X7

1

0

X8

0

=

0

X9

1

1

1

X10

1

1

VP

0

0

1

1

1

X11

1

X12

The bits at the X1 X2 X3 X4 are __ (36) __; X5 X6 X7 X8, respectively, ____;

Bits at X9 X10 XI1 X12 are __ (38) __;, respectively, the characters at __ (38) __; __ (39) __ and __ (40) __.

[solution]

Vertical is known from the ASCII code to the 5th column. then:

From the first column, X4 = 0 is known; the level is known from the third line of the third line.

From the second line, X3 = 1 is known; X8 = 0 is known from the 7th column; X12 = 1 is known from the column 8;

From the 7th line, X11 = 1 is known; X10 = 0 is known from the sixth column; X9 = 1 is known from the sixth line; X1 = 1 is known from the second column;

The X2 = 1 is known from the first line; X5 = 1 is known from the third column; X6 = 0 is known from the fourth line; X7 = 0 is known from the fourth column (or 5th line); sorting:

(36) x1x2x3x4 = 1110 (37) x5x6x7x8 = 1000 (38) x9x10x11x12 = 1011

(39) Ascii code 1001001 = 49h by character Y1, Y1 is "i" (by "D" ASCII code is pushed to 1000100 = 44 h)

(40) ASCII code 0110111 = 37h by character Y2, Y2 is "7" (from "3" ASCII code is pushed to 0110011 = 33H)

If you can remember "0" ASCII code is 0110000 = 30h; "A" ASCII code is 1000001 = 41h, it is more convenient to solve it.

Third, Hayming Terminal We pointed out that the minimum distance required for correcting the information word is 3. One of the ways to implement this correction is the Haiming code. Hai Ming code is a multiple (double) parity error system. It encodes information in logical form to detect the wrong and error correction. All transmission codewords used in the Hay Ming Code are composed of the original information and the additional parity block. Each such parity bit is composed at a particular location of the transmission codeword. When implementing is appropriate, this system can separate it from the original information bits, both of the original information bits, or the additional check digits. The sea code for deriving and using the length of the codeword is used, and the desired steps are as follows: 1. Determine the minimum check bitk, record them into D1, D2, ..., DK, each check bit is in line with different Parity test regulations. 2, the original information and K calibration blocks together have a new codeword that grows into a M K bit. Select the k check digit (0 or 1) to meet the necessary parity. 3. The K parcel check required for the received information. 4. If all the parity results are correct, it is considered that the information is not wrong. If there is one or more faults, the error bit is uniquely determined by the results of these inspections. Number of check digits