Remote control decoding device and decoding method based on hamming code
By using a remote control decoding device and method based on Hamming code, the encoding method is extended to double (12, 8) code, and 4 check bits are added. This solves the problem that the remote control equipment cannot meet the number of commands for the space station series, and realizes the expansion of the number of commands and the improvement of decoding reliability.
Patent Information
- Application Number
- CN202310055339.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-16
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-01-16
AI Technical Summary
Existing remote control equipment is insufficient to meet the number of remote control commands required for the space station series of spacecraft, and it consumes a lot of hardware resources, which cannot meet the needs of current technology.
A remote decoding device and method based on Hamming code is adopted. By extending the encoding method to double (12, 8) code, the source code is extended to 16 bits, 4 check bits are added, and a check bit decoding circuit is designed. The decoding result is latched by a generator matrix and the latching unit is latched for a preset time to send the decoding result to the preset decoding result.
The method of shortening the code by extending the double Chinese plaintext code is implemented. The decoding result is sent to the corresponding instruction processing unit through the latch unit of the embodiment.
Smart Images

Figure CN116054845B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of spaceflight measurement and control, and particularly relates to a remote control decoding device and method based on Hamming code and electronic equipment. BACKGROUND
[0002] In a spaceflight measurement and control system, ground control instructions are converted into radio signals and transmitted to a spacecraft or rocket at a long distance to realize control over them. A ground command center can not only track a spaceship and master its working state, but also actively intervene in and control it. Remote control is used for orbit control of a spacecraft in flight, such as orbit change, rendezvous and recovery, for attitude control, and for control of backup switching and switching, to ensure normal operation and running of the spacecraft, and is also used for data injection of the spacecraft and starting of autonomous programs of the spacecraft. Spacecraft remote control instructions have the characteristics of multiple contents, long execution time and complex requirements.
[0003] Space station series spacecraft remote control equipment provides functions of transmission, encoding, decoding and driving output of control instructions on the spacecraft, to realize reliable instruction code transmission and decoding. With the requirement of a large number of remote control instructions, the original remote control equipment is difficult to meet the requirements. Therefore, upgrading of the original remote control equipment is needed to meet the current needs. SUMMARY
[0004] To solve the above problems, the purpose of the present application is to provide a remote control decoding device and method based on Hamming code, which can meet the code distance requirement without occupying more hardware resources, and has good versatility and expansibility.
[0005] The technical scheme of the present application is: a remote control decoding device based on Hamming code, comprising: a shift register for converting acquired serial data based on a clock signal; two code table storage units for storing preset Hamming code tables respectively; a count comparison module for intercepting corresponding comparison bits based on the clock signal; a comparator for comparing the comparison bits intercepted by the count comparison module with comparison bits corresponding to the serial data, and performing decoding based on a preset decoding control logic and sending a decoding result to a preset instruction processing unit if the comparison result meets a preset condition.
[0006] Preferably, the preset Hamming code tables stored in the two code table storage units are Hamming code tables designed based on a shortened code of a cyclic Hamming code.
[0007] Preferably, the shortened code polynomial of the cyclic Hamming code is 1+X+X 4 which can be divided by 1+X 15 , and the polynomial 1+X+X 4A cyclic code can be generated, with generator polynomial g(X) = 1 + X + X 4 ;
[0008] From the generator polynomial, we have:
[0009] X 4 = g(X) + 1 + X;
[0010] X 5 = Xg(X) + X + X 2 ;
[0011] X 6 = X 2 g(X) + X 2 + X 3 ;
[0012] X 7 = (1 + X 3 )g(X) + 1 + X + X 3 ;
[0013] X 8 = (1 + X + X 4 )g(X) + 1 + X 2 ;
[0014] X 9 = (X + X 2 + X 5 )g(X) + X + X 3 ;
[0015] X 10 = (1 + X 2 + X 3 + X 6 )g(X) + 1 + X + X 2 ;
[0016] X 11 = (X + X 3 + X 4 + X 7 )g(X) + X + X 2 + X 3 ;
[0017] X 12 = (1 + X 2 + X 4 + X 5 + X 8 )g(X) + 1 + X + X 2 + X 3 ;
[0018] X 13 = (1 + X + X 3 + X 5 + X6 +X 9 )g(X)+1+X 2 +X 3 ;
[0019] X 14 =(1+X+X 2 +X 4 +X 6 +X 7 +X 10 )g(X)+1+X 3 ;
[0020] The generating matrix is:
[0021]
[0022] The supervision matrix can be obtained from the generating matrix:
[0023]
[0024] Since there are no two identical columns in H, the minimum code distance d≥3, which meets the design requirements of the command code. The Hamming code encoding algebraic expression is obtained from the generating matrix:
[0025] U is an 8-bit input code word, and V is a 12-bit output code word, which is represented as follows:
[0026] U(P7P6P5P4P3P2P1P0), V(P7P6P5P4P3P2P1P0Q3Q2Q1Q0);
[0027] The supervision bit algebraic expression can be obtained from the supervision matrix H:
[0028] Q3=P7+P5+P3+P2;
[0029] Q2=P7+P6+P4+P2+P1;
[0030] Q1=P7+P6+P5+P3+P1+P0;
[0031] Q0=P6+P4+P3+P0;
[0032] According to the algebraic expression, 8-bit to 12-bit encoding is realized.
[0033] Preferably, the device further comprises a remote interface, through which the decoding result is sent to the corresponding instruction processing unit.
[0034] Preferably, the decoding device further comprises a latch unit, which retains the decoding result for a preset time.
[0035] Based on the same concept, the application also provides a Hamming code-based remote control decoding method applied to the decoding device, including the following steps: obtaining serial transmission data, selecting serial transmission data based on a preset Hamming code table and comparing preset bits; in the case that the comparison result meets preset conditions, decoding based on a preset decoding control logic; and sending the decoding result to a preset instruction processing unit.
[0036] Preferably, the decoding result is latched by a latch unit for a preset time period, and then sent to the corresponding instruction processing unit through a remote interface.
[0037] Preferably, 8-bit decoding results are stored in an 8*8kByte memory, and a 12-bit address of the memory is used for decoding input to find the result in the memory.
[0038] Preferably, the source code is expanded to 16 bits by using a double Hamming code shortening code mode to expand the number of instructions.
[0039] Based on the same concept, the application also provides an electronic device, including a memory for storing a processing program and a processor for realizing the Hamming code-based remote control decoding method when executing the processing program.
[0040] The application has the following advantages and positive effects compared with the prior art due to the above technical solutions:
[0041] 1. Since the shortening code (12, 8) code of the cyclic Hamming code can only provide a maximum of 255 instructions, it cannot meet the demand for the number of instructions of space station series. The application expands the encoding mode to double (12, 8) code, expands the source code to 16 bits, and uses the low 8 bits as the low bits of the instruction code, the high 8 bits as the high 2 bits of the instruction code plus 4 parity bits plus 1 clear instruction flag bit and 1 fixed bit. The 10-bit instruction code is expanded, and the number of instructions can reach 1023, which can meet the design needs of space station series spacecraft.
[0042] 2. The application adds 4 parity bits, and a parity bit decoding circuit is designed in the later stage of hardware design. Only the correct instruction can be output, which further improves the reliability of the remote control code table design. BRIEF DESCRIPTION OF DRAWINGS
[0043] The specific embodiments of the application will be further described in detail below with reference to the accompanying drawings, in which:
[0044] Figure 1 The figure is a schematic diagram of the device of the application. DETAILED DESCRIPTION
[0045] The application will be described in further detail below with reference to the drawings and specific embodiments. The advantages and features of the application will become more apparent from the following description and claims. It should be noted that the drawings are in extremely simplified form and are not drawn to precise scale, and are merely used to facilitate, clarify and aid in the understanding of the embodiments of the application.
[0046] It should be noted that all directional indications, such as upper, lower, left, right, front, back, etc., are only used to explain the relative position relationship, movement condition, etc. between components in a certain posture (as shown in the drawings), and if the certain posture changes, the directional indications will also change accordingly.
[0047] First embodiment
[0048] As shown in Figure 1 , the embodiment of the application provides a remote control decoding device based on Hamming code, comprising: a shift register, configured to convert the obtained serial data based on a clock signal; two code table storage units, respectively configured to store preset Hamming code tables; a counting comparison module, configured to intercept corresponding comparison bits based on the clock signal; a comparator, configured to compare the comparison bits intercepted by the counting comparison module with the comparison bits corresponding to the serial data, and in the case that the comparison result meets a preset condition, perform decoding based on a preset decoding control logic, and send the decoding result to a preset instruction processing unit.
[0049] The shortened code (12, 8) of the cyclic Hamming code can only provide a maximum of 255 instructions, which cannot meet the demand for the number of space station series instructions. The application expands the encoding mode to double (12, 8) code, and expands the source code to 16 bits, of which the lower 8 bits are the low bits of the instruction code, the upper 8 bits are the high 2 bits of the instruction code plus 4 parity bits plus 1 clear instruction flag bit and 1 fixed bit. The 10-bit instruction code is expanded, and the number of instructions can reach 1023, which can meet the design needs of space station series spacecraft.
[0050] Preferably, the preset Hamming code tables stored in the two code table storage units are Hamming code tables designed based on the shortened code of the cyclic Hamming code.
[0051] Preferably, the shortened code polynomial of the cyclic Hamming code is 1+X+X 4 , and the polynomial 1+X 15 +X 4 can generate a cyclic code, that is, the generating polynomial is g(X) = 1+X+X 4 .
[0052] From the generating polynomial, we have:
[0053] X 4 = g(X) + 1+X.
[0054] X 5 =Xg(X)+X+X 2 ;
[0055] X 6 =X 2 g(X)+X 2 +X 3 ;
[0056] X 7 =(1+X 3 )g(X)+1=X+X 3 ;
[0057] X 8 =(1+X+X 4 )g(X)+1+X 2 ;
[0058] X 9 =(X+X 2 +X 5 )g(X)+X+X 3 ;
[0059] X 10 =(1+X 2 +X 3 +X 6 )g(X)+1+X+X 2 ;
[0060] X 11 =(X+X 3 +X 4 +X 7 )g(X)+X+X 2 +X 3 ;
[0061] X 12 =(1+X 2 +X 4 +X 5 +X 8 )g(X)+1+X+X 2 +X 3 ;
[0062] X 13 =(1+X+X 3 +X 5 +X 6 +X 9 )g(X)+1+X 2 +X 3 ;
[0063] X 14 =(1+X+X 2 +X 4+X 6 +X 7 +X 10 )g(X)+1+X 3 ;
[0064] The generating matrix is:
[0065]
[0066] The supervision matrix can be obtained from the generating matrix:
[0067]
[0068] Since there are no two identical columns in H, the minimum code distance d is greater than or equal to 3, which meets the design requirements of the command code, and the algebraic expression of the Hamming code encoding is obtained from the generating matrix:
[0069] U is an 8-bit input code word, and V is a 12-bit output code word, which is represented as follows:
[0070] U (P7P6P5P4P3P2P1P0), V (P7P6P5P4P3P2P1P0Q3Q2Q1Q0);
[0071] The algebraic expression of the supervision bit can be obtained from the supervision matrix H:
[0072] Q3 = P7 + P5 + P3 + P2;
[0073] Q2 = P7 + P6 + P4 + P2 + P1;
[0074] Q1 = P7 + P6 + P5 + P3 + P1 + P0;
[0075] Q0 = P6 + P4 + P3 + P0;
[0076] According to the algebraic expression, 8-bit to 12-bit encoding is realized.
[0077] The present application increases 4 check bits, and a check bit decoding circuit is designed in the later stage of hardware design, and only the correct instruction decoding can be output, which further improves the reliability of the remote code table design.
[0078] Preferably, the device further comprises a remote interface, and the decoding result is sent to the corresponding instruction processing unit through the remote interface.
[0079] Preferably, the decoding device further comprises a latch unit, and the latch unit retains the decoding result for a preset time.
[0080] Based on the same idea, the application further provides a Hamming code-based remote control decoding method applied to the decoding device, which comprises the following steps: obtaining serial transmission data, and comparing the serial transmission data with preset bits based on a preset Hamming code table; in the case that the comparison result meets preset conditions, decoding based on preset decoding control logic; and sending the decoding result to a preset instruction processing unit.
[0081] Preferably, the decoding result is latched by a latch unit for a preset time period, and then sent to the corresponding instruction processing unit through a remote interface.
[0082] Preferably, 8-bit decoding results are stored in an 8*8 kByte memory, and a 12-bit address of the memory is used for decoding input, and the result in the memory is found by using the address, thus completing the decoding.
[0083] Preferably, the source code is expanded to 16 bits by using a double Hamming code shortening code encoding mode to expand the number of instructions.
[0084] Based on the same idea, the application further provides an electronic device, which comprises a memory for storing a processing program, and a processor for realizing the Hamming code-based remote control decoding method when executing the processing program.
[0085] The embodiments of the application are described in detail above with reference to the drawings, but the application is not limited to the above-described embodiments. Even if various changes are made to the application, as long as the changes fall within the scope of the claims of the application and equivalent technologies thereof, they still fall within the protection scope of the application.
Claims
1. A Hamming code-based remote control decoding apparatus characterized by comprising: The device comprises: a shift register for converting the acquired serial data based on a clock signal; two code table storage units for storing preset Hamming code tables respectively; a count comparison module for intercepting corresponding comparison bits based on the clock signal; a comparator for comparing the comparison bits intercepted by the count comparison module with comparison bits corresponding to the serial data, and performing decoding based on preset decoding control logic in the case that the comparison result meets a preset condition, and sending the decoding result to a preset instruction processing unit; The two preset Hamming code tables stored in the two code table storage units are respectively Hamming code tables based on shortened code design of a cyclic Hamming code, and the shortened code polynomial of the cyclic Hamming code is 1+X+X 4 , which can be divided by 1+X 15 , and the polynomial 1+X+X 4 , which can generate a cyclic code, and the generating polynomial is g(X)=1+X+X 4 . The generating polynomial is: X 4 = g(X) + 1 + X; X 5 = Xg(X) + X + X 2 ; X 6 = X 2 g(X) + X 2 + X 3 ; X 7 = (1 + X 3 )g(X) + 1 + X + X 3 ; X 8 = (1 + X + X 4 )g(X) + 1 + X 2 ; X 9 = (X+X 2 +X 5 )g(X)+X+X 3 ; X 10 = (1 + X 2 + X 3 + X 6 )g(X) + 1 + X + X 2 ; X 11 = (X+X 3 +X 4 +X 7 )g(X)+X+X 2 +X 3 ; X 12 = (1 + X 2 + X 4 + X 5 + X 8 )g(X) + 1 + X + X 2 + X 3 ; X 13 = (1 + X + X 3 + X 5 + X 6 + X 9 )g(X) + 1 + X 2 + X 3 ; X 14 = (1 + X + X 2 + X 4 + X 6 + X 7 + X 10 ) g(X) + 1 + X 3 ; The generating matrix is: The supervision matrix is obtained from the generating matrix: Since there are no two identical columns in H, the minimum code distance d≥3, which meets the design requirements of instruction code, and the Hamming code encoding algebraic expression is obtained from the generating matrix: U is an 8-bit input code word, and V is a 12-bit output code word, which is represented as follows: U(P7P6P5P4P3P2P1P0), V(P7P6P5P4P3P2P1P0Q3Q2Q1Q0); The supervision bit algebraic expression is obtained from the supervision matrix H: Q3=P7+P5+P3+P2; Q2=P7+P6+P4+P2+P1; Q1=P7+P6+P5+P3+P1+P0; Q0=P6+P4+P3+P0; According to the algebraic expression, 8-bit to 12-bit encoding is realized.
2. The Hamming code-based remote control decoding apparatus according to claim 1, characterized by The device further comprises a remote interface through which the decoding result is sent to the corresponding instruction processing unit.
3. The Hamming code-based remote control decoding apparatus according to claim 1, characterized by The decoding device further comprises a latch unit that retains the decoding result for a preset time.
4. A Hamming code-based remote control decoding method applied to the decoding device according to any one of claims 1 to 3, characterized in that, The method comprises the following steps: acquiring serial transmission data, and comparing the serial transmission data with comparison beat preset bits based on a preset Hamming code table; in the case that the comparison result meets a preset condition, performing decoding based on a preset decoding control logic; sending the decoding result to a preset instruction processing unit.
5. The Hamming code-based remote control decoding method according to claim 4, characterized in that, The decoding result is latched by the latch unit for a preset period of time, and then sent to the corresponding instruction processing unit through the remote interface.
6. The Hamming code-based remote control decoding method according to claim 5, characterized in that, An 8*8kByte memory is used to store 8-bit decoding results, and a 12-bit address of the memory is used to find the result in the memory by address, thereby completing decoding.
7. The Hamming code-based remote control decoding method according to claim 5, wherein, The encoding mode of the double Hamming code is used to expand the source code to 16 bits to expand the number of instructions.
8. An electronic device, comprising: The device comprises: a memory for storing a processing program; a processor for implementing the Hamming code-based remote control decoding method of any one of claims 4-7 when executing the processing program.
Citation Information
Patent Citations
Method and apparatus for confirming Hamming error correcting code check bit
CN101345606A
Error correction method of cyclic hamming code based on parallel coding and decoding
CN103309766A