Turbo coding circuit design and Turbo decoding correction method and system oriented to HPLC-OFDM (High Performance Liquid Chromatography-Orthogonal Frequency Division Multiplexing) system
By designing eight-state dual-bit PCCC Turbo encoding circuit and Turbo decoding correction method in HPLC-OFDM system, the state zeroing and frame synchronization problems of Turbo encoding in high-speed power line communication are solved, and the decoding performance and error recognition are improved. , and achieve higher communication reliability.
Patent Information
- Application Number
- CN202410951695.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-22
AI Technical Summary
Turbo encoding has problems such as state zeroing, inaccurate frame synchronization, complex hardware implementation, long decoding delay of soft output Viterbi algorithm, large external information and difficulty in identifying errors in codes. It performs poorly especially in low signal-to-noise ratio environments.
An eight-state dual-bit PCCC Turbo encoding circuit is designed, using address mapping and lookup table to shorten the interleaving delay, using shift operation to reduce multiplication and division, introducing a Mealy state machine to achieve tail biting termination, and communicating with the interleaver through the controller; at the same time, Provide Turbo decoding correction method, use the root function to correct soft output information, introduce tansig neurons and lightweight BNN networks for error recognition and iterative control.
Improves the state stability and frame synchronization accuracy of Turbo encoding, simplifies hardware implementation, shortens decoding delay, improves the accuracy of soft judgments and code error recognition capabilities, and enhances the system's anti-burst error capability and digital communication. reliability.
Smart Images

Figure CN119011076A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of high-speed power line communication, orthogonal frequency division multiplexing technology, FPGA digital signal processing, and deep neural network, and specifically to a Turbo coding circuit design and Turbo decoding correction method and system for HPLC-OFDM system. Background Art
[0002] With the rapid development of the Internet and multimedia technology, people's demand for high-speed and stable data transmission is growing. Traditional power line communication (PLC) uses high-voltage transmission lines as the transmission channel for high-frequency signals, with a narrow application range and low transmission rate. High-speed power line communication (HPLC) instead uses low-voltage distribution networks for carrier communication, using orthogonal frequency division multiplexing (OFDM) technology as a dedicated modulation method, with a typical operating frequency band of 2 to 12 MHz and a communication rate of more than 1 Mbps.
[0003] However, as an important part of forward error correction (FEC) technology, Turbo coding has problems such as difficulty in returning to zero, inaccurate frame synchronization, and complex hardware implementation. The soft output Viterbi (SOVA) algorithm used for Turbo decoding is the optimal maximum likelihood (ML) algorithm, which is less complex than the maximum a posteriori probability (MAP) algorithm, but has a long decoding delay, and there are also problems such as large external information, inaccurate soft decision values, and easy overflow of accumulated measurement data, which leads to poor decoding performance, which is more significant in low signal-to-noise ratio environments. Turbo coding is the first and last link in the data processing of the HPLC-OFDM system, and the above defects will have a significant impact on the overall function. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention designs an eight-state dual-bit PCCC Turbo coding circuit based on Q / GDW 11612.41-2018, uses address mapping and lookup table to shorten the interleaving delay, and uses shift operations to reduce multiplication and division; adopts a Mealy state machine to achieve tail-biting termination through primary coding and secondary coding; the controller communicates with the interleaver to ensure synchronous coding, and then starts 1 / 2 code rate puncturing and multiplexing.
[0005] The present invention provides a Turbo decoding correction method and system for HPLC-OFDM system, adopts a root function applicable to real numbers to correct soft output information, introduces tansig neurons to correct external information, and performs error bit identification and iterative control through a lightweight BNN network to improve the above problems.
[0006] Terminology explanation:
[0007] 1. HPLC, high-speed power line communication, is a technology that uses the deployed power distribution network as a high-speed communication infrastructure. The physical layer is responsible for encoding and modulating the data transmission message that needs to be distributed by the data link layer into a carrier signal and sending it to the power line. It is also responsible for receiving the carrier signal transmitted on the power line, demodulating and decoding it, and sending it to the data link layer for transmission.
[0008] 2. OFDM, orthogonal frequency division multiplexing, is a method that uses orthogonality to overlap the bandwidth of each carrier with the bandwidth of the adjacent carrier. Since this method allows hundreds to thousands of carriers to be used simultaneously within a limited bandwidth, its frequency utilization rate is very high, and the transmission rate can reach tens to hundreds of Mbps. In addition, OFDM also has the advantages of strong resistance to frequency selective fading, and has been widely used in field bus communication, smart grid communication, etc.
[0009] 3. FEC, forward error correction. At the transmitting end, k bits of information are encoded as a group, and (nk) bits of redundant check information are added to form a codeword of length n bits. After the codeword reaches the receiving end through the channel, if the error is within the correctable range, the error bit can be checked and corrected through decoding, thereby resisting the interference caused by the channel and improving the reliability of the communication system.
[0010] 4. Turbo code, also known as parallel concatenated convolutional code, has three coding structures: PCCC, SCCC, and HCCC. It combines convolutional code and random interleaver together. While realizing random coding, it constructs long code from short code through interleaver. It uses soft output iterative decoding to approximate maximum likelihood decoding, and has performance close to the Shannon limit.
[0011] 5. MAP, maximum a posteriori probability algorithm. For the decoder input R and the encoder output C, if it can be in 2 k Select a code sequence C from the code words that maximizes P(C'=C|R) i (i=1,2,…,2 k ) as the estimation sequence C' of C, then this decoding rule must minimize the probability of decoding output error.
[0012] 6. ML, maximum likelihood algorithm. If the decoding rules can be used in 2 k Choose one of the codewords so that max{P(C i |R)}=max{P(R|C i )}(i=1,2,…,2 k )The maximum C i , then the decoding rule is called maximum likelihood decoding, and P(R|C) is called the likelihood function.
[0013] 7. Viterbi, the Viterbi algorithm, whose core is "add-compare-select". For an (n,k,m) convolutional code encoder, consider the trellis diagram when the length of the information sequence is h. In the first step, at time unit t = m, calculate the partial metric of a single path entering each state, and store the surviving path and its metric for each state. In the second step, at time unit t+1, calculate the partial metric for all 2 k paths entering each state, and add the metric from the previous time unit. For each state, compare the metrics of all 2 k paths entering that state, select the path with the maximum metric, store its metric, and discard the other paths. In the third step, if t < h + m, return to the second step; otherwise, stop.
[0014] 8. SOVA, the Soft Output Viterbi Algorithm. The basic operations of SOVA are the same as those of the Viterbi algorithm. The only difference is that an indication of reliability is attached to the hard decision output for each information bit, and the hard decision output and the reliability indication are combined to obtain the soft output. SOVA can reduce the negative impact of an error in one component decoder on another component decoder, and can greatly improve the performance of the concatenated code through the exchange of soft information between the component decoders.
[0015] 9. BNN, the Binary Neural Network. BNN is based on the network of CNN, and restricts the input, output, and weights of neurons within the binary range. Due to its sparsity, BNN has the advantages of high computational efficiency, low storage requirements, and strong interpretability.
[0016] The technical solution of the present invention is as follows:
[0017] A Turbo coding circuit design and Turbo decoding correction method for an HPLC-OFDM system, including:
[0018] S1: Perform random interleaving;
[0019] S2: Perform component coding to obtain systematic bits and parity bits;
[0020] S3: Communicate with the interleaver to ensure synchronous coding of component coding, punch holes and output according to the required code rate, and complete data multiplexing;
[0021] S4: During the decoding process, perform soft decision correction;
[0022] S5: Perform error recognition until the iterative decoding terminates.
[0023] Preferably according to the present invention, the random interleaving includes:
[0024] S11: Perform address mapping with operations of lookup table, modulo, multiplication, division, addition, and subtraction to obtain the intermediate variable I(x);
[0025] S12: Combine the intermediate variable I(x) and adopt the opposite input-output mapping method according to the parity of the output address;
[0026] S13: Write information sequentially through the dual-port RAM according to the write address expression, use the write address register, set the write address to traverse 0 to L-1, L is the double-bit interleaving length, and reserve invalid write addresses; when writing is completed, set the write address to be invalid and the read enable signal to be valid;
[0027] S14: Information is read out in random order through the dual-port RAM, using a read address register with a small number of digits, and x is set to traverse 0 to L-1. The data at address I(x) in the RAM is read out according to the input-output mapping method to obtain the second member code input.
[0028] Further preferably, in step S11, the specific method of obtaining the intermediate variable I(x) by address mapping is:
[0029] I(x)=[S(x mod N)-(x div N)×N+L]mod L
[0030] Wherein, S is the lookup table; N is the length of the lookup table; mod is the modulus operation; div is the integer division operation; L is the double-bit interleaving length; x = 0, 1, ..., L-1;
[0031] In step S12, in combination with the intermediate variable I(x), according to the parity of the input information bit, the opposite input-output mapping method is adopted; the mapping method is specifically:
[0032]
[0033] Among them, Data is the input of random interleaving; IntData is the output of random interleaving;
[0034] In step S12, if the randomly interleaved output address is an even number, the high and low bits of the interleaved 2-bit information are swapped, wherein the output address is a unit of 2 bits, which is numerically equal to the variable x;
[0035] Preferably, according to the present invention, component encoding comprises:
[0036] S21: Set the initial state of the status register to [0,0,0];
[0037] S22: Input information bits to the two component encoders until the last bit, obtain the final state of the end of encoding, and temporarily store the data;
[0038] S23: Multiply the final state of the first encoding by the matrix [0 0 1; 1 0 1; 1 1 1] to obtain the initial state of the formal encoding;
[0039] S24: Read out the temporarily stored data, encode it again, implement tail-biting termination, and obtain the check bit;
[0040] S25: infer the expression of each bit and check code of the status register from the coding architecture;
[0041] S26: Determine a state transition table including eight states and 2-bit input;
[0042] S27: Write a Mealy state machine, express the output decoding part with a parallel selection circuit, and express the state decoding part with a priority selection circuit;
[0043] S28: Implement temporary storage of input data, leave an appropriate margin when determining the RAM / register depth, and complete the output after filtering out invalid signals;
[0044] S29: Tail-biting termination is achieved through primary encoding, matrix operation, and secondary encoding. The expression of each bit of the status register is converted into a matrix form and extended to the case of secondary encoding to obtain a mapping formula and a lookup table for determining the initial state of the secondary encoding.
[0045] Further preferably, in step S25, the expression of each bit of the status register at time t inferred from the coding architecture in Q / GDW 11612.41-2018 is specifically:
[0046]
[0047] Among them, s represents a bit in the status register, u represents a bit in the input information; x0 represents the check bit;
[0048] Further preferably, in step S27, a Mealy state machine is written, wherein, in the output decoding part, when the flag for ending the first encoding and starting the second encoding arrives, an assign statement is used for assignment, and the output decoding formula is specifically:
[0049] parity=(cnt=L+1and rst and count <L)?A:0
[0050] A=(S0=a0 or S0=a1 or S0=a2 or S0=a3)? B:C
[0051] B=(ib_keep=01or ib_keep=10)? 1:0
[0052] C=(S0=a4 or S0=a5 or S0=a6 or S0=a7)? D:0
[0053] D = (ib_keep == 00 || ib_keep == 11)? 1 : 0
[0054] Among them, parity is the output check bit; cnt = L + 1 and rst and count < L is the flag to end the first encoding and start the second encoding; S0 is the current state of the status register during the second encoding; ib_keep is the temporarily stored input information bit; and represents the AND logic; or represents the OR logic; a0, a1, a2, a3, a4, a5, a6, a7 represent the 8 states of the status register;
[0055] Write a Mealy state machine, among which, the state decoding formula is specifically:
[0056] SN_prime = (ib_keep == 00)? W : (ib_keep == 01)? X : (ib_keep == 10)? Y : Z
[0057] Among them, SN_prime is the next state of the status register during the second encoding; for each current state S0, W, X, Y, Z are the 4 next states corresponding to the row of the state transition schematic table;
[0058] For the first encoding, change S0 to the current state state of the status register during the first encoding, and change SN_prime to the next state SN of the status register during the first encoding.
[0059] Further preferably, in step S28, the data temporary storage formula is specifically:
[0060] data_ram[cnt] = input_bits, cnt = 0, 1,..., L
[0061] ib_keep = data_ram[count + 1], count = 0, 1,..., L - 1
[0062] Among them, cnt is the write data counter; count is the read data counter; ib_keep is the information bit that enters the encoder again after being temporarily stored; data_ram is the register for storing input data, with a width of 2 and a depth of L + 1.
[0063] Further preferably, in step S29, converting the expression of each bit of the status register at time t into a matrix expression is specifically:
[0064]
[0065] S t = S t-1 A^U t B
[0066] S0 =(0 0 0)
[0067] P 0 =S t M
[0068] P t =P t-1 A^U t B
[0069] P 0 =P t
[0070] Among them, S represents the 3 bits of the state register; U represents the 2 bits of input information; A and B correspond to the two intermediate matrices of the first formula; P represents the 3 bits of the state register during secondary encoding; M is the matrix used to determine the initial state of the state register during secondary encoding;
[0071] Traverse each possible final state of the first encoding and manually calculate the initial state of the second encoding. The mapping formula is as follows:
[0072] S0_prime=Q(m)
[0073] Among them, S0_prime represents the initial state of the status register during the secondary encoding; m represents the final state of the first encoding.
[0074] Preferably, according to the present invention, punctured multiplexing includes:
[0075] S31: Determine whether puncturing is allowed;
[0076] S32: If yes, perform redundancy deletion and alternating arrangement on the two check bits; otherwise, output 0;
[0077] S33: If puncturing is completed, the 128-bit system code and the 128-bit check code are multiplexed using a counter whose upper limit of the number of counts is 2 times the interleaving length; otherwise, 0 is output.
[0078] Further preferably, in step S31, two flag bits are used to determine whether puncturing has started and has not ended.
[0079] Further preferably, in step S32, if puncturing is allowed, two paths of 1-bit information are combined into 2 bits by bit splicing and then output; otherwise, 0 is output.
[0080] Further preferably, in step S33, the formula for sequentially multiplexing the 128-bit system code and the 128-bit check code is specifically:
[0081] out=(d_over=1)?F:0
[0082] F = (cnt < L)? mid1[cnt] : mid[cnt - L]
[0083] Where d_over = 1 indicates that puncturing has ended and multiplexing begins; cnt < L corresponds to outputting system bits, and vice versa corresponds to outputting parity bits; mid1 is a register for temporarily storing the original input data; mid is a register for temporarily storing the punctured parity bit data stream; cnt is an 8-bit reg type counter for multiplexing. After multiplexing begins, it increments by 1 whenever the rising edge of the clock arrives, otherwise it remains unchanged, thereby traversing all elements in mid1 and mid.
[0084] Preferably according to the present invention, frame synchronization control includes:
[0085] S31-1: When the original information m is written into the random interleaver, m is simultaneously written into the mid1 register;
[0086] S32-2: If the read flag of the internal RAM of the random interleaver arrives, m is read out and sent to the component encoder that does not pass through the random interleaver; at the same time, the output of the random interleaver is generated and sent to the component encoder that passes through the random interleaver through a wire type variable, so that the component encoder generates a flag bit;
[0087] S33-3: If the allowable puncturing flag arrives, the incoming parity code data stream is written into the mid register;
[0088] S34-4: If puncturing ends, start a single count from 0 to 127, read out the original information and parity code to complete multiplexing.
[0089] Preferably according to the present invention, soft decision correction includes:
[0090] S41: Set upper and lower limits for the soft output information;
[0091] S42: Take the optimal threshold, introduce a radical function applicable to real numbers, and correct the soft output information in segments;
[0092] S43: Introduce a tansig neuron, select appropriate weights, and correct the extrinsic information in each iteration.
[0093] Further preferably, in step S41, take the output threshold to limit the soft output information, and the formula is specifically:
[0094] L_all(t) = [|L_all(t)| > |L_TH|]? L_TH : L_all(t), t = 1, 2,..., L_tot
[0095] Where L_all(t) is the log-likelihood function; L_TH is the soft output threshold; L_tot is the frame length; || represents taking the absolute value.
[0096] Further preferably, in step S42, the best L_TH is taken, and a soft output information correction function applicable to real numbers is introduced, and the specific formula is:
[0097]
[0098] Among them, L_TH is the optimal soft output threshold; H(x) is the modified L_all(t), which is a one-dimensional sequence with a length equal to the frame length 4L, and x needs to traverse each bit of the sequence.
[0099] Further preferably, in step S43, the external information calculation formula in a single iteration is specifically:
[0100] L_e=W1×tansig(W2×L_all-W3×2×rec_s-W4×L_a)
[0101] Among them, L_e is the extrinsic information generated by the decoder at time t; L_all is the soft output information; L_a is the extrinsic information generated by another decoder in the last iteration;
[0102] The specific expression of the tansig function is:
[0103]
[0104] rec_s is the scaled code element, and its specific expression is:
[0105] rec_s=0.5×L_c×r
[0106] Among them, r is the system code element of the received sequence; L_c is the channel confidence, and its specific expression is:
[0107] L_c=4×a×SNR×rate
[0108] Where a is the fading amplitude of the AWGN channel; SNR is the signal-to-noise ratio; and rate is the bit rate.
[0109] Preferably, according to the present invention, performing bit error identification until iteration is terminated includes:
[0110] S51: constructing the original decoding system and the decoding system for soft decision correction, collecting a large amount of external information of the two component decoders after a certain number of iterations, calculating the cross entropy, attaching classification labels, and quantizing;
[0111] S52: convert the cross entropy into an image and compress it, and use the OTSU threshold segmentation algorithm for binarization;
[0112] S53: The data set is divided into training set, test set and cross-validation set;
[0113] S54: BNN network construction. The BNN network includes two convolutional pooling layers and two fully connected layers, using custom weight binarization functions binary_sig and binary_tanh;
[0114] S55: Use Adam to train the BNN network, determine the learning rate decay factor, and evaluate the BNN network with categorical_crossentropy as the loss function;
[0115] S56: round the output data to an even number using the round function to perform bit error detection;
[0116] S57: Indicates decoding correctness through 1 flag bit; intervenes in iteration control through 1 flag bit.
[0117] Further preferably, in step S51, in the original decoding system and the decoding system for soft decision correction, under a certain communication environment, the external information L_e1 and L_e2 of the two component decoders are collected after 5 iterations, and the cross entropy CE is calculated, and the specific formula is:
[0118]
[0119] Among them, EP is the expectation factor.
[0120] Further preferably, in step S54, a BNN network is built;
[0121] The convolution layer uses binary_sig to binarize the weights. The specific formula is:
[0122]
[0123] Among them, the clip(x,a,b) function limits the linear function x to between a and b, taking a and b as 0 and 1; the round(x) function rounds x to an even number; the stop_gradient(x) function indicates that the gradient of x is not calculated in the back propagation;
[0124] The fully connected layer uses binary_tanh to binarize the weights. The specific formula is:
[0125] binary_tanh=2×binary_sig-1
[0126] The activation function uses binary_tanh; the pooling layer uses maximum pooling; the flattening layer converts the multi-dimensional input data into a one-dimensional linear form.
[0127] Further preferably, in step S56, error detection is performed according to the output of the Softmax output layer, and the specific formula is:
[0128] (err,cor)=[round(a),round(b)]
[0129] Among them, a and b are the 2-bit outputs of the Softmax layer; err is 1, indicating a decoding error; cor is 1, indicating a correct decoding.
[0130] A Turbo coding circuit design and Turbo decoding correction system for HPLC-OFDM system, including:
[0131] The random interleaving module is configured to: perform random interleaving;
[0132] The component encoding module is configured to: perform component encoding;
[0133] The puncturing multiplexing and frame synchronization control module is configured to: communicate with the interleaver, ensure the synchronous encoding of the component codes, puncture the output according to the required code rate, and complete the data multiplexing;
[0134] The soft decision correction module is configured to: perform soft decision correction during the decoding process;
[0135] The error detection feedback module is configured to: perform error identification until the iterative decoding is terminated.
[0136] The beneficial effects of the present invention are:
[0137] 1. A hardware implementation method for the random interleaving module is provided, which saves logic resources; longer burst errors are discretized into random errors, thereby enhancing the ability to resist burst errors.
[0138] 2. A hardware implementation method of the component coding module based on a state machine is provided to achieve tail-biting termination of coding, obtain systematic bits and check bits, and improve the problem of difficulty in returning the Turbo coding state to zero. In addition, the timing is optimized, the area is saved, the propagation of unsteady states is allowed, and high coverage verification is easy. By performing error control coding at the transmitting end, error detection and correction can be achieved at the receiving end, thereby improving the reliability of digital communication.
[0139] 3. Provides a hardware implementation method for puncturing multiplexing and frame control modules to achieve communication with the interleaver, ensure synchronous encoding of the component encoding modules, then puncture output according to the required code rate, and finally complete data multiplexing. Improves the problem of inaccurate frame synchronization in Turbo encoding.
[0140] 4. A soft decision correction module is designed, and correction functions and tansig neurons are introduced to reduce the soft output information and external information according to reasonable rules, thereby improving the accuracy of soft decisions in the SOVA decoding process.
[0141] 5. An error detection feedback module is designed, which uses the low-resource BNN network to detect and prompt possible decoding errors during the iteration process, and feeds back the error information to the component decoder to achieve early termination of invalid iterations and improve decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0142] Figure 1 This is a PCCC Turbo encoder architecture diagram of the present invention;
[0143] Figure 2 A block diagram of the random interleaving process of the present invention;
[0144] Figure 3 This is a schematic diagram of the mapping relationship of data before and after random interleaving of the present invention;
[0145] Figure 4 A block diagram of the processing steps for component encoding of the present invention;
[0146] Figure 5 A block diagram of the processing steps of punctured multiplexing and frame synchronization control of the present invention;
[0147] Figure 6 A block diagram of the processing steps of soft decision correction of the present invention;
[0148] Figure 7 The present invention adopts the SOVA algorithm to construct a processing step block diagram of the decoder;
[0149] Figure 8 This is a schematic diagram of the calculation of the tansig neuron correcting external information of the present invention;
[0150] Fig. 9 A block diagram of the processing steps from error identification to termination of iterative decoding according to the present invention;
[0151] Fig.10 This is a schematic diagram of the flow process of data flow in the BNN network of the present invention. DETAILED DESCRIPTION
[0152] The present invention is further described below in conjunction with specific embodiments and drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Those skilled in the art may make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the claims attached to this application.
[0153] Example 1
[0154] A Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system, comprising:
[0155] S1: random interleaving;
[0156] S2: Perform component coding to obtain systematic bits and check bits; by performing error control coding at the sending end, error detection and correction can be achieved at the receiving end, thereby improving the reliability of digital communications.
[0157] S3: communicates with the interleaver to ensure synchronous coding of component codes, punctures and outputs according to the required code rate, and completes data multiplexing;
[0158] S4: During the decoding process, soft decision correction is performed;
[0159] S5: Perform error identification until the iterative decoding is terminated.
[0160] Example 2
[0161] The difference between the Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system described in Example 1 is that:
[0162] Random interweaving; Figure 2 As shown, including:
[0163] S11: performing address mapping with table lookup, modulo, multiplication, division, addition, and subtraction operations to obtain an intermediate variable I(x);
[0164] S12: Combine the intermediate variable I(x) and adopt the opposite input-output mapping method according to the parity of the output address;
[0165] S13: Write information sequentially through the dual-port RAM according to the write address expression, use the write address register, set the write address to traverse 0 to L-1, L is the double-bit interleaving length, and reserve invalid write addresses; when writing is completed, set the write address to be invalid and the read enable signal to be valid;
[0166] S14: Information is read out in random order through the dual-port RAM, using a read address register with a small number of digits, and x is set to traverse 0 to L-1. The data at address I(x) in the RAM is read out according to the input-output mapping method to obtain the second member code input.
[0167] In step S11, the specific method of obtaining the intermediate variable I(x) by address mapping is:
[0168] I(x)=[S(x mod N)-(x div N)×N+L]mod L
[0169] Wherein, S is the lookup table; N is the length of the lookup table; mod is the modulus operation; div is the integer division operation; L is the double-bit interleaving length; x = 0, 1, ..., L-1;
[0170] The present invention sets N = 8 and L = 64; for the coding block length of PB16, the S look-up table adopted is shown in Table 1. Since the independent variable of S is x mod N < N, only the low log2N bits of x, that is, bits 0 to 2, need to be examined, thus avoiding a modulo operation:
[0171] Table 1
[0172] x 0 1 2 3 4 5 6 7 S(x) 53 20 9 32 62 39 51 18
[0173] In step S12, in combination with the intermediate variable I(x), according to the parity of the input information bits, the opposite input-output mapping method is adopted; the specific mapping method is:
[0174]
[0175] where Data is the randomly interleaved input; IntData is the randomly interleaved output;
[0176] In step S12, if the output address of the random interleaving is even, the high and low bits of the 2-bit information after interleaving are exchanged, where the output address is in units of 2 bits and numerically equal to the variable x;
[0177] In step S13, information is sequentially written through a simple dual-port RAM. The widths of its Port A and Port B are 2 bits and the depth is 64. Select Port B as the Primitives output register to reduce latches and thus optimize the timing. Set the Enable port type to always enabled. A 7-bit write address register is used, and 1 invalid write address L is reserved. When the write address addra traverses from 0 to L - 1 and ends, set addra equal to L, and at the same time make the read enable signal r_en valid.
[0178] In step S14, data is randomly read out through a simple dual-port RAM. A 6-bit read address register is used to save resources. Let x traverse from 0 to L - 1 to obtain the input of the second member code. Shift operations are used instead of multiplication and division to simplify the logic resources. As Figure 3 shown, the specific read-out method is:
[0179] addrb = {S - [(x >> 3) << 3] + L} % L, x = 0, 1,..., L - 1;
[0180]
[0181] dout = y, x = 1, 3, 5,..., L - 1
[0182] where addrb is the address of the data read out in the RAM; y is the original output of the interleaver; dout is the final output of the interleaver.
[0183] See also Figure 4 , component encoding; including:
[0184] S21: Set the initial state of the status register to [0,0,0]; the status register is a 3-bit reg type variable, which can represent 8 possible states;
[0185] S22: Input information bits to the two component encoders of the PCCC Turbo encoder (such as Figure 1 As shown), until the last bit, the final state of the encoding is obtained, and the data is temporarily stored;
[0186] S23: Multiply the final state of the first encoding by the matrix [0 0 1; 1 0 1; 1 1 1] to obtain the initial state of the formal encoding;
[0187] S24: Read out the temporarily stored data, encode it again, implement tail-biting termination, and obtain the check bit;
[0188] S25: infer the expression of each bit and check code of the status register from the coding architecture;
[0189] S26: Determine a state transition table including eight states and 2-bit input;
[0190] S27: Write a Mealy state machine, express the output decoding part with a parallel selection circuit, and express the state decoding part with a priority selection circuit;
[0191] S28: Implement temporary storage of input data, leave an appropriate margin when determining the RAM / register depth, and complete the output after filtering out invalid signals;
[0192] S29: Tail-biting termination is achieved through primary encoding, matrix operation, and secondary encoding. The expression of each bit of the status register is converted into a matrix form and extended to the case of secondary encoding to obtain a mapping formula and a lookup table for determining the initial state of the secondary encoding.
[0193] In this embodiment, the method of single convolution encoding and calculating the check bit is specifically:
[0194] In step S25, the expression of each bit of the status register at time t inferred from the coding architecture in Q / GDW 11612.41-2018 is specifically:
[0195]
[0196] Among them, s represents a certain bit of the status register, the superscript t corresponds to the time t, the subscripts 1, 2, and 3 correspond to the highest bit, middle bit, and lowest bit of the status register; ^ represents an exclusive OR operation; u represents a certain bit of the input information; x0 represents the check bit;
[0197] In step S26, the specific state transition schematic table is Table 2:
[0198] Table 2
[0199] u1u2 / 00 u1u2 / 01 u1u2 / 10 u1u2 / 11 a0 / 000 a0 / 0 a2 / 1 a3 / 1 a1 / 0 a1 / 001 a5 / 1 a7 / 0 a6 / 0 a4 / 1 a2 / 010 a1 / 0 a3 / 1 a2 / 1 a0 / 0 a3 / 011 a4 / 1 a6 / 0 a7 / 0 a5 / 1 a4 / 100 a2 / 0 a0 / 1 a1 / 1 a3 / 0 a5 / 101 a7 / 1 a5 / 0 a4 / 0 a6 / 1 a6 / 110 a3 / 0 a1 / 1 a0 / 1 a2 / 0 a7 / 111 a6 / 1 a4 / 0 a5 / 0 a7 / 1
[0200] Among them, the 2nd to 9th rows in the first column represent the current state; the 2nd to 4th columns in the first row represent the input information bits; the 2nd column in the 2nd row to the 5th column in the 9th row represent the next state / output information bits.
[0201] In step S27, a Mealy state machine is written. Among them, in the output decoding part, when the flag indicating the start of the second encoding after the end of the first encoding arrives, an assign statement is used for assignment to generate a parallel selection circuit, avoiding the disadvantages that the case / if-else syntax cannot propagate the indefinite state and the large area of the generated priority selection circuit. The specific output decoding formula is:
[0202] parity = (cnt == L + 1 && rst && count < L)? A : 0
[0203] A = (S0 == a0 || S0 == a1 || S0 == a2 || S0 == a3)? B : C
[0204] B = (ib_keep == 01 || ib_keep == 10)? 1 : 0
[0205] C = (S0 == a4 || S0 == a5 || S0 == a6 || S0 == a7)? D : 0
[0206] D = (ib_keep == 00 || ib_keep == 11)? 1 : 0
[0207] Among them, parity is the output check bit; cnt == L + 1 && rst && count < L is the flag indicating the start of the second encoding after the end of the first encoding; S0 is the current state of the state register during the second encoding; ib_keep is the temporarily stored input information bit; && represents the AND logic; || represents the OR logic; a0, a1, a2, a3, a4, a5, a6, a7 represent 8 states of the state register;
[0208] Write a Mealy state machine, expressed by a priority selection circuit, in order to improve the coverage rate during verification. The specific state decoding formula is:
[0209] SN_prime = (ib_keep == 00)? W : (ib_keep == 01)? X : (ib_keep == 10)? Y : Z
[0210] Among them, SN_prime is the next state of the state register during secondary encoding; for each current state S0, W, X, Y, and Z are the four next states of the corresponding row of the state transition diagram;
[0211] For the first encoding, S0 is changed to the current state of the state register during the first encoding, and SN_prime is changed to the next state SN of the state register during the first encoding.
[0212] In this embodiment, the method used for temporarily storing input data is specifically:
[0213] In step S28, due to the influence of timing constraints, an invalid bit will be introduced when the information bit is input into the component coding module. Therefore, it is necessary to increase the depth of the register by at least 1 when writing data, and filter out the invalid bit when reading the temporarily stored data. The data temporary storage formula is specifically:
[0214] data_ram[cnt]=input_bits,cnt=0,1,…,L
[0215] ib_keep=data_ram[count+1],count=0,1,…,L-1
[0216] Among them, cnt is the write data counter; count is the read data counter; ib_keep is the information bit that enters the encoder again after temporary storage; data_ram is the register for storing input data, with a width of 2 and a depth of L+1.
[0217] In this embodiment, the specific method used to terminate tail biting is:
[0218] In step S29, the expression of each bit of the status register at time t is converted into a matrix expression:
[0219]
[0220] S t =S t-1 A^U t B
[0221] S 0 =(0 0 0)
[0222] P 0 =S t M
[0223] P t =P t-1 A^U t B
[0224] P 0 =Pt
[0225] Among them, S represents the 3 bits of the state register; U represents the 2 bits of input information; A and B correspond to the two intermediate matrices of the first formula; P represents the 3 bits of the state register during secondary encoding; M is the matrix used to determine the initial state of the state register during secondary encoding; the superscript 0 represents the initial state; it can be proved through recursion and matrix operations that P'=P t .
[0226] Traverse each possible final state of the first encoding and manually calculate the initial state of the second encoding. The mapping formula is as follows:
[0227] S0_prime=Q(m)
[0228] Among them, S0_prime represents the initial state of the status register during the secondary encoding; m represents the final state of the first encoding.
[0229] The Q lookup table used is shown in Table 3:
[0230] Table 3
[0231] m a0 a1 a2 a3 a4 a5 a6 a7 Q(m) a0 a7 a5 a2 a1 a6 a4 a3
[0232] See also Figure 5 , deletion and multiplexing, including:
[0233] S31: Determine whether puncturing is allowed;
[0234] S32: If yes, perform redundancy deletion and alternating arrangement on the two check bits; otherwise, output 0;
[0235] S33: If puncturing is completed, a counter whose upper limit of counting times is 2 times of the interleaving length is used to multiplex the 128-bit system code and the 128-bit check code according to a certain rule; otherwise, 0 is output.
[0236] In step S31, two flag bits are used to determine whether puncturing has started and has not ended.
[0237] In step S32, if puncturing is allowed, the two 1-bit information is combined into 2 bits by bit concatenation and then output; otherwise, 0 is output. Specifically, the check bits p and q of the two component encoders are interleaved (via the interleaver), with p in front and q in the back. The puncturing formula is:
[0238] delete_out=[delete_start and (not delete_over)]? {delete_in1,delete_in2}:0
[0239] Among them, delete_start and (not delete_over) are used to judge the puncturing permission status, which can be controlled by a counter; not represents non-logic; delete_in is a certain input information; delete_out is the output information.
[0240] In step S33, the specific formula for multiplexing the 128-bit systematic code and the 128-bit parity check code successively is as follows:
[0241] out = (d_over == 1)? F : 0
[0242] F = (cnt < L)? mid1[cnt] : mid[cnt - L]
[0243] Among them, d_over == 1 indicates that the puncturing has ended and the multiplexing starts; cnt < L corresponds to the output systematic bits, and vice versa corresponds to the output parity bits; mid1 is a register for temporarily storing the original input data; that is, a two-dimensional reg array with a width of 2 and a depth of 64; mid is a register for temporarily storing the punctured parity bit data stream; that is, a two-dimensional reg array with a width of 2 and a depth of 64; cnt is an 8-bit reg counter used for multiplexing. After the multiplexing starts, it increments by 1 whenever the rising edge of the clock arrives, otherwise it remains unchanged, so as to traverse all elements in mid1 and mid.
[0244] Frame synchronization control includes:
[0245] S31-1: When the original information m is written into the random interleaver, m is simultaneously written into the mid1 register;
[0246] S32-2: If the read flag of the internal RAM of the random interleaver arrives, m is read out and sent to the component encoder that does not pass through the random interleaver; at the same time, the output of the random interleaver is generated and sent to the component encoder that passes through the random interleaver through a wire-type variable, so that the component encoder generates a flag bit;
[0247] S33-3: If the puncturing permission flag arrives, the incoming parity check code data stream is written into the mid register;
[0248] S34-4: If the puncturing ends, start a single count from 0 to 127, and read out the original information and the parity check code to complete the multiplexing.
[0249] See Figure 6 , for soft decision correction, including:
[0250] S41: Set the upper and lower limits for the soft output information;
[0251] S42: Take the best threshold, introduce a radical function applicable to real numbers, and correct the soft output information in segments;
[0252] S43: Introduce tansig neurons, select appropriate weights, and correct external information in each iteration.
[0253] In step S41, the output threshold is taken to limit the soft output information. The specific formula is:
[0254] L_all(t)=[|L_all(t)|>|L_TH|]? L_TH:L_all(t),t=1,2,…,L_tot
[0255] Among them, L_all(t) is the log-likelihood function, such as Figure 7 The figure shows the general process of constructing a decoder using the SOVA algorithm, where the soft output information bit can be obtained through soft decision. The principle is that if L_all(t) is a positive value, the soft output at time t is 1, otherwise it is 0; L_TH is the soft output threshold; L_tot is the frame length; || means taking the absolute value.
[0256] In step S42, the best L_TH is obtained, and a soft output information correction function applicable to real numbers is introduced, and the specific formula is:
[0257]
[0258] Among them, L_TH is the optimal soft output threshold; H(x) is the modified L_all(t), which is a one-dimensional sequence with a length equal to the frame length 4L, and x needs to traverse each bit of the sequence.
[0259] Among them, the square root and cube root operations can be implemented in hardware using the bisection method and Newton's iteration method.
[0260] In step S43, see Figure 8 , the external information calculation formula in a single iteration is:
[0261] L_e=W1×tansig(W2×L_all-W3×2×rec_s-W4×L_a)
[0262] Among them, L_e is the external information generated by the decoder at time t; L_all is the soft output information; L_a is the external information generated by another decoder in the last iteration; from the perspective of the neuron computing unit, L_all, 2rec_s, and L_a are the three input features of the input layer, W2, -W3, and -W4 are the weights of these features respectively, and the bias is not considered here. tansig is the activation function, which is equivalent to the tanh function, W1 is the scaling factor, and L_e is the value of the output layer.
[0263] The specific expression of the tansig function is:
[0264]
[0265] rec_s is the scaled code element, and its specific expression is:
[0266] rec_s=0.5×L_c×r
[0267] Among them, r is the system code element of the received sequence, which comes from the demultiplexer; L_c is the channel confidence, and its specific expression is:
[0268] L_c=4×a×SNR×rate
[0269] Where a is the fading amplitude of the AWGN channel; SNR is the signal-to-noise ratio; and rate is the bit rate.
[0270] See also Fig. 9 , perform error identification until the iteration is terminated, including:
[0271] S51: constructing the original decoding system and the decoding system for soft decision correction, collecting a large amount of external information of the two component decoders after a certain number of iterations, calculating the cross entropy, attaching classification labels, and quantizing;
[0272] S52: convert the cross entropy into an image and compress it, and use the OTSU threshold segmentation algorithm for binarization;
[0273] S53: The data set is divided into training set, test set and cross-validation set;
[0274] S54: BNN network construction. The BNN network includes two convolutional pooling layers and two fully connected layers, using custom weight binarization functions binary_sig and binary_tanh;
[0275] S55: Use Adam to train the BNN network, determine the learning rate decay factor, and evaluate the BNN network with categorical_crossentropy as the loss function;
[0276] S56: round the output data to an even number using the round function to perform bit error detection;
[0277] S57: Indicates decoding correctness through 1 flag bit; intervenes in iteration control through 1 flag bit.
[0278] In step S51, in the original decoding system and the decoding system for soft decision correction, under a certain communication environment, the external information L_e1 and L_e2 of the two component decoders are collected after 5 iterations to calculate the cross entropy CE, which is specifically formulated as follows:
[0279]
[0280] Among them, EP is the expected factor. Statistical analysis shows that the cross entropy of Turbo decoding output is nonlinearly correlated with the decoding error. Under certain conditions, the bit error rate and frame error rate of the two systems have been experimentally verified to be significantly different, so their respective cross entropies can be labeled as "error" or "no error" and quantified with [1,0] and [0,1].
[0281] In step S52, the cross entropy is converted into an image, compressed to a certain size, and the image is binarized using the OTSU threshold segmentation algorithm. The graythresh function of Matlab and the threshold function of OpenCV use the maximum inter-class variance method to obtain the threshold of the image.
[0282] In step S53, the data set is divided into training set, test set and cross-validation set in a ratio of 6:2:2.
[0283] In step S54, the BNN network is built; the network structure is input-convolution-batch normalization-activation-pooling-convolution-batch normalization-activation-pooling-flat layer-full connection-batch normalization-activation-full connection-batch normalization-output. See Fig.10 , we can see the data flow of 50*50 image in BNN hardware accelerator.
[0284] The convolution layer uses binary_sig to binarize the weights. The specific formula is:
[0285]
[0286] Among them, the clip(x,a,b) function limits the linear function x to between a and b, taking a and b as 0 and 1; the round(x) function rounds x to an even number; the stop_gradient(x) function indicates that the gradient of x is not calculated in the back propagation;
[0287] The fully connected layer uses binary_tanh to binarize the weights. The specific formula is:
[0288] binary_tanh=2×binary_sig-1
[0289] The activation function uses binary_tanh; the pooling layer uses maximum pooling; the flattening layer converts the multi-dimensional input data into a one-dimensional linear form.
[0290] In step S55, the network is trained and evaluated using the Adam optimizer, with categorical_crossentropy as the loss function, and Batch_size selected as 256. Correspondingly, the batch normalization layer parameter epsilon is 1e-3 and momentum is 0.99. The specific learning rate attenuation factor is:
[0291]
[0292] Wherein, lr_end is the learning rate of the last iteration; lr_start is the learning rate of the first iteration; epochs is the number of iterations. In step S56, error detection is performed based on the output of the Softmax output layer, and the specific formula is:
[0293] (err,cor)=[round(a),round(b)]
[0294] Among them, a and b are the 2-bit outputs of the Softmax layer; err is 1, indicating a decoding error; cor is 1, indicating a correct decoding.
[0295] In step S57, if err is 1, the decoding error flag and the iteration end flag are enabled, and the subsequent code elements of the received sequence are iteratively decoded.
[0296] Example 3
[0297] The difference between the Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system described in Example 2 is that:
[0298] For the soft decision correction for Turbo decoding, run the SOVA decoding program in MATLAB, set the frame length to 128, the code rate to 1 / 3 (no redundancy), the signal-to-noise ratio to 2dB, the generation matrix to [1,1,1; 1,0,1], and the number of iterations to 5. When 15 frames of the decoding result are wrong, take the optimal results of the number of transmitted frames, bit error rate, frame error rate and the corresponding soft output information threshold, and draw Table 4:
[0299] Table 4
[0300] Soft output threshold NA ±50 ±40 ±30 ±20 ±15 ±10 ±5 ±3 ±1 Transmission frame number 309 290 349 284 327 348 387 385 303 91 Bit Error Rate / E-3 2.5 3.1 1.7 2.2 3.0 2.1 1.7 3.4 3.1 9.7 Frame Error Rate / E-2 4.9 5.2 4.3 5.3 4.6 4.3 3.9 3.9 5.0 16.5
[0301] It can be seen that when the soft output threshold is ±10, the bit error rate can be reduced by 0.8E-3 and the frame error rate can be reduced by 1.0E-2 at most compared with the original system. In addition, when the threshold is too large, the communication quality does not improve significantly; when the threshold is gradually reduced, the communication quality shows a clear upward trend; however, when the threshold is too small, the communication quality drops sharply.
[0302] Among them, the soft output information limiting formula is specifically:
[0303] L_all(t)=[|L_all(t)|>|L_TH|]? L_TH:L_all(t),t=1,2,…,L_tot
[0304] In the same communication environment, the correction function introduced is:
[0305]
[0306] Take L_TH as 10, change the variable n and signal-to-noise ratio, repeat the above experiment and get Table 5:
[0307] Table 5
[0308] Correction function n 2 3 2 3 Transmission frame number 458 799 152 138 Bit Error Rate / E-3 1.2 0.9 5.9 5.8 Frame Error Rate / E-2 3.3 1.9 9.9 10.9 Signal-to-noise ratio / dB 2.0 2.0 1.5 1.5
[0309] It can be seen that when n is 3 and the signal-to-noise ratio is 2, the bit error rate can be reduced by 1.6E-3 and the frame error rate can be reduced by 3.0E-2 compared with the original system. This is a confirmation of the rationality of the source of the BNN dataset. When the signal-to-noise ratio is low, at 1.5, taking n as 2 is better.
[0310] In the same communication environment, the soft output information correction function is removed and the tansig neuron is introduced separately. The external information calculation formula in a single iteration is:
[0311] L_e=W1×tansig(W2×L_all-W3×2×rec_s-W4×L_a)
[0312] Take W1=7, W2=W3=W4=1 / 8, repeat the above experiment to obtain Table 6:
[0313] Table 6
[0314] External Information Correction NA tansig Transmission frame number 309 549 Bit Error Rate / E-3 2.5 1.5 Frame Error Rate / E-2 4.9 2.7
[0315] It can be seen that the introduction of tansig neurons to correct external information can reduce the bit error rate by 1E-3 and the frame error rate by 2.2E-2 at most compared with the original system.
[0316] Example 4
[0317] A Turbo coding circuit design and Turbo decoding correction system for HPLC-OFDM system, including:
[0318] The random interleaving module is configured to: perform random interleaving;
[0319] The component encoding module is configured to: perform component encoding;
[0320] The puncturing multiplexing and frame synchronization control module is configured to: communicate with the interleaver, ensure the synchronous encoding of the component codes, puncture the output according to the required code rate, and complete the data multiplexing;
[0321] The soft decision correction module is configured to: perform soft decision correction during the decoding process;
[0322] The error detection feedback module is configured to: perform error identification until the iterative decoding is terminated.
[0323] The above description is only part of typical embodiments of the present invention and is not intended to limit the present invention. When applied by relevant technical personnel, the present invention may have various modifications and changes. Any easily conceivable modifications, equivalent substitutions, improvements, etc. made within the technical scope indicated by the present invention should be included in the protection scope of the present invention. The scope of the present invention is defined by the attached claims and other equivalents.
Claims
1. A Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system, characterized in that: include: S1: random interleaving; S2: perform component encoding to obtain systematic bits and check bits; S3: communicates with the interleaver to ensure synchronous coding of component codes, punctures and outputs according to the required code rate, and completes data multiplexing; S4: During the decoding process, soft decision correction is performed; S5: Perform error identification until the iterative decoding is terminated.
2. The Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system according to claim 1, characterized in that: Random interweaving; including: S11: performing address mapping with table lookup, modulo, multiplication, division, addition, and subtraction operations to obtain an intermediate variable I(x); S12: Combine the intermediate variable I(x) and adopt the opposite input-output mapping method according to the parity of the output address; S13: Write information sequentially through the dual-port RAM according to the write address expression, use the write address register, set the write address to traverse 0 to L-1, L is the double-bit interleaving length, and reserve invalid write addresses; when writing is completed, set the write address to be invalid and the read enable signal to be valid; S14: read out information in random order through the dual-port RAM, use a read address register with a small number of digits, let x traverse 0 to L-1, then the data with address I(x) in the RAM is read out according to the input-output mapping method, and the second member code input is obtained; Further preferably, in step S11, the specific method of obtaining the intermediate variable I(x) by address mapping is: I(x)=[S(x mod N)-(x div N)×N+L]mod L Wherein, S is the lookup table; N is the length of the lookup table; mod is the modulus operation; div is the integer division operation; L is the double-bit interleaving length; x = 0, 1, ..., L-1; In step S12, in combination with the intermediate variable I(x), according to the parity of the input information bit, the opposite input-output mapping method is adopted; the mapping method is specifically: Among them, Data is the input of random interleaving; IntData is the output of random interleaving; In step S12, if the randomly interleaved output address is an even number, the high and low bits of the interleaved 2-bit information are swapped, wherein the output address is a unit of 2 bits, which is numerically equal to the variable x.
3. The Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system according to claim 1, characterized in that: Component encoding; including: S21: Set the initial state of the status register to [0,0,0]; S22: Input information bits to the two component encoders until the last bit, obtain the final state of the end of encoding, and temporarily store the data; S23: Multiply the final state of the first encoding by the matrix [0 0 1; 1 0 1; 1 1 1] to obtain the initial state of the formal encoding; S24: Read out the temporarily stored data, encode it again, implement tail-biting termination, and obtain the check bit; S25: infer the expression of each bit and check code of the status register from the coding architecture; S26: Determine a state transition table including eight states and 2-bit input; S27: Write a Mealy state machine, express the output decoding part with a parallel selection circuit, and express the state decoding part with a priority selection circuit; S28: Implement temporary storage of input data, leave an appropriate margin when determining the RAM / register depth, and complete the output after filtering out invalid signals; S29: Achieve tail-biting termination through first encoding, matrix operation, and second encoding, transform the expression of each bit of the status register into matrix form, and extend it to the case of second encoding to obtain the mapping formula and look-up table for determining the initial state of the second encoding.
4. The Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system according to claim 3, characterized in that: In step S25, the expression of each bit of the status register inferred from the encoding architecture in Q / GDW 11612.41—2018 at time t is specifically: where s represents a certain bit of the status register, u represents a certain bit of the input information; x0 represents the parity bit; Further preferably, in step S27, a Mealy state machine is written. Among them, in the output decoding part, when the flag indicating the start of the second encoding after the end of the first encoding arrives, the assign statement is used for assignment, and the output decoding formula is specifically: parity = (cnt == L + 1 && rst && count < L)? A : 0 A = (S0 == a0 || S0 == a1 || S0 == a2 || S0 == a3)? B : C B = (ib_keep == 01 || ib_keep == 10)? 1 : 0 C = (S0 == a4 || S0 == a5 || S0 == a6 || S0 == a7)? D : 0 D = (ib_keep == 00 || ib_keep == 11)? 1 : 0 where parity is the output parity bit; cnt == L + 1 && rst && count < L is the flag indicating the start of the second encoding after the end of the first encoding; S0 is the current state of the status register during the second encoding; ib_keep is the temporarily stored input information bit; && represents the AND logic; || represents the OR logic; a0, a1, a2, a3, a4, a5, a6, a7 represent 8 states of the status register; Write a Mealy state machine, where the state decoding formula is specifically: SN_prime = (ib_keep == 00)? W : (ib_keep == 01)? X : (ib_keep == 10)? Y : Z where SN_prime is the next state of the status register during the second encoding; for each current state S0, W, X, Y, Z are the 4 next states corresponding to the row of the state transition schematic table; For the first encoding, change S0 to the current state state of the status register during the first encoding, and change SN_prime to the next state SN of the status register during the first encoding; Further preferably, in step S28, the data temporary storage formula is specifically: data_ram[cnt] = input_bits, cnt = 0, 1,..., L ib_keep = data_ram[count + 1], count = 0, 1,..., L - 1 where cnt is the write data counter; count is the read data counter; ib_keep is the information bit that enters the encoder again after being temporarily stored; data_ram is the register for storing input data, with a width of 2 and a depth of L + 1; Further preferably, in step S29, the transformation of the expression of each bit of the status register at time t into a matrix expression is specifically: S t =S T-1 A^U t B S 0 =(0 0 0) P 0 =S t M P t =P t-1 A^U t B Among them, S represents 3 bits of the status register; U represents 2 bits of the input information; A and B correspond to 2 intermediate matrices of the first formula; P represents 3 bits of the status register during secondary coding; M is a matrix used to determine the initial state of the status register during secondary coding; Traverse each possible final state of the first coding, and manually calculate the initial state of the secondary coding. The mapping formula is specifically: S0_prime = Q(m) Among them, S0_prime represents the initial state of the status register during secondary coding; m represents the final state of the first coding.
5. The Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system according to claim 1, characterized in that: Puncture and multiplexing includes: S31: Determine whether puncture is allowed; S32: If so, perform puncture and alternate arrangement on the two parity bits, otherwise, output 0; S33: If the puncture ends, use a counter with a counting limit of 2 times the interleaving length to multiplex 128-bit systematic code and 128-bit parity code, otherwise, output 0.
6. The Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system according to claim 5, characterized in that: In step S31, determine whether the puncture has started and not ended through two flag bits; Further preferably, in step S32, if puncture is allowed, merge two 1-bit information into 2 bits through bit concatenation and then output; otherwise, output 0; Further preferably, in step S33, the formula for multiplexing 128-bit systematic code and 128-bit parity code successively is specifically: out = (d_over == 1)? F : 0 F = (cnt < L)? mid1[cnt] : mid[cnt - L] Among them, d_over == 1 means that the puncture ends and the multiplexing starts; cnt < L corresponds to outputting the systematic bit, and vice versa corresponds to outputting the parity bit; mid1 is a register for temporarily storing the original input data; mid is a register for temporarily storing the punctured parity bit data stream; cnt is an 8-bit reg-type counter for multiplexing. After the multiplexing starts, it increments by 1 whenever the rising edge of the clock arrives, otherwise it remains unchanged, so as to traverse all elements in mid1 and mid.
7. The Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system according to claim 1, characterized in that: Frame synchronization control includes: S31-1: When the original information m is written into the random interleaving, at the same time, write m into the mid1 register; S32-2: If the read flag of the internal RAM of the random interleaving arrives, read m and send it to the component encoder that does not go through the random interleaving; at the same time, the output of the random interleaving is generated and sent to the component encoder that goes through the random interleaving through a wire-type variable, so that the component encoder generates a flag bit; S33-3: If the puncture allowed flag arrives, write the sent parity code data stream into the mid register; S34-4: If the puncture ends, start a single count from 0 to 127, and read the original information and parity code to complete the multiplexing.
8. The Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system according to claim 1, characterized in that: Perform soft decision correction, including: S41: Set the upper and lower limits for the soft output information; S42: Take the best threshold, introduce a radical function applicable to real numbers, and correct the soft output information in segments; S43: Introduce a tansig neuron, select appropriate weights, and correct the extrinsic information in each iteration; Further preferably, in step S41, take the output threshold to limit the soft output information. The formula is specifically: L_all(t) = [|L_all(t)| > |L_TH|]? L_TH : L_all(t), t = 1, 2,..., L_tot Among them, L_all(t) is the log-likelihood function; L_TH is the soft output threshold; L_tot is the frame length; || means taking the absolute value; Further preferably, in step S42, the best L_TH is taken, and a soft output information correction function applicable to real numbers is introduced, and the specific formula is: Among them, L_TH is the optimal soft output threshold; H(x) is the modified L_all(t), which is a one-dimensional sequence with a length equal to the frame length 4L, and x needs to traverse each bit of the sequence; Further preferably, in step S43, the external information calculation formula in a single iteration is specifically: L_e=W1×tansig(W2×L_all-W3×2×rec_s-W4×L_a) Among them, L_e is the extrinsic information generated by the decoder at time t; L_all is the soft output information; L_a is the extrinsic information generated by another decoder in the last iteration; The specific expression of the tansig function is: rec_s is the scaled code element, and its specific expression is: rec_s=0.5×L_c×r Among them, r is the system code element of the received sequence; L_c is the channel confidence, and its specific expression is: L_c=4×a×SNR×rate Where a is the fading amplitude of the AWGN channel; SNR is the signal-to-noise ratio; and rate is the bit rate.
9. The Turbo coding circuit design and Turbo decoding correction method for HPLC-OFDM system according to claim 1, characterized in that: Perform bit error identification until the iteration is terminated, including: S51: constructing the original decoding system and the decoding system for soft decision correction, collecting a large amount of external information of the two component decoders after a certain number of iterations, calculating the cross entropy, attaching classification labels, and quantizing; S52: convert the cross entropy into an image and compress it, and use the OTSU threshold segmentation algorithm for binarization; S53: The data set is divided into training set, test set and cross-validation set; S54: BNN network construction. The BNN network includes two convolutional pooling layers and two fully connected layers, using custom weight binarization functions binary_sig and binary_tanh; S55: Use Adam to train the BNN network, determine the learning rate decay factor, and evaluate the BNN network with categorical_crossentropy as the loss function; S56: round the output data to an even number using the round function to perform bit error detection; S57: Indicates decoding correctness through 1 flag bit; intervenes in iteration control through 1 flag bit; Further preferably, in step S51, in the original decoding system and the decoding system for soft decision correction, under a certain communication environment, the external information L_e1 and L_e2 of the two component decoders are collected after 5 iterations, and the cross entropy CE is calculated, and the specific formula is: Among them, EP is the expected factor; Further preferably, in step S54, a BNN network is built; The convolution layer uses binary_sig to binarize the weights. The specific formula is: Among them, the clip(x,a,b) function limits the linear function x to between a and b, taking a and b as 0 and 1; the round(x) function rounds x to an even number; the stop_gradient(x) function indicates that the gradient of x is not calculated in the back propagation; The fully connected layer uses binary_tanh to binarize the weights. The specific formula is: binary_tanh=2×binary_sig-1 The activation function uses binary_tanh; the pooling layer uses maximum pooling; the flattening layer converts multi-dimensional input data into a one-dimensional linear form; Further preferably, in step S56, error detection is performed according to the output of the Softmax output layer, and the specific formula is: (err,cor)=[round(a),round(b)] Among them, a and b are the 2-bit outputs of the Softmax layer; err is 1, indicating a decoding error; cor is 1, indicating a correct decoding.
10. A Turbo coding circuit design and Turbo decoding correction system for HPLC-OFDM system, characterized in that: include: The random interleaving module is configured to: perform random interleaving; The component encoding module is configured to: perform component encoding; The puncturing multiplexing and frame synchronization control module is configured to: communicate with the interleaver, ensure the synchronous encoding of the component codes, puncture the output according to the required code rate, and complete the data multiplexing; The soft decision correction module is configured to: perform soft decision correction; The error detection feedback module is configured to: perform error identification until the iteration is terminated.
