Serial communication system of electric steering engine

By independently designing the response data transceiving component and the telemetry data sending component in the electric steering gear communication system, combined with sending timeout detection and receiving status detection, the problems of long electric steering gear communication links and abnormal reception are solved, and the reliability of the missile system is improved. sex and stability.

CN118573218APending Publication Date: 2024-08-30BEIJING MECHANICAL EQUIP INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310177856.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing electric steering gear communication link is long, resulting in long communication time, increasing the data processing burden of the integrated control device on the missile, reducing the reliability and stability of the missile system, and there are problems with receiving exceptions and sending timeouts.

Method used

An electric steering gear serial communication system is designed, which optimizes the data transmission path through independent response data sending and receiving components and telemetry data sending components, adds sending timeout detection and data length verification functions, and combines data receiving status and receiving interruption detection. Reinitialize the response data sending and receiving components to improve communication reliability.

Benefits of technology

The data transmission path is optimized, reducing the data processing burden of the integrated control device on the missile, improving the reliability and stability of the missile system, avoiding data transmission anomalies and timeout problems, and improving communication reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118573218A
    Figure CN118573218A
Patent Text Reader

Abstract

The invention relates to an electric steering engine serial communication system, belongs to the technical field of serial communication, and solves the problems of long communication link, long sending time and the like in the prior art. The communication system comprises: an interface initialization component, which initializes a response data transmit-receive component and a telemetry data sending component based on initialization parameters; the response data transceiving component is used for receiving and processing the control instruction to obtain effective data; corresponding response data are returned to the missile-borne comprehensive control device; the telemetering data sending component is used for sending the telemetering data to telemetering equipment; the interface receiving state detection and reset component is used for detecting the interface receiving state of the response data transceiving component; when it is detected that the interface receiving state is abnormal, the response data receiving and transmitting component is initialized again; and the Baud rate query component is used for receiving and feeding back the Baud rates of the response number transmitting and receiving component and the telemetry data transmitting component to the steering engine control software main function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of serial communication, and in particular to a serial communication system for an electric steering gear. Background Art

[0002] The electric servo is an important part of the aircraft flight control system. The electric servo receives the control instructions (including self-test, zeroing, and action instructions) sent by the on-board integrated control device, completes the electric servo self-test, zeroing, controls the servo deflection, drives the rudder surface deflection, and realizes the adjustment and control of the missile attitude. At the same time, the action instructions and servo status information (including self-test results, zeroing results, servo angular displacement or linear displacement feedback, voltage, current, temperature and other information) are returned to the on-board integrated control device for servo working status detection, and then the on-board integrated control device sends the received action instructions and servo status information to the telemetry equipment, which realizes the real-time storage and recording of the action instructions and servo status information.

[0003] At present, in the communication process between the electric servo and external equipment such as the missile integrated control device, the function of the telemetry equipment to store and record action instructions and servo status information in real time requires the missile integrated control device as an intermediate link to transmit information. In this process, the information transmission link is long and the reliability is low. At the same time, the electric servo sends the action instructions and all the servo status information to be recorded to the missile integrated control device through the same data packet, which will cause the communication time to be too long, increase the data processing burden of the missile integrated control device, and reduce the reliability and stability of the missile system.

[0004] In addition, at present, most electric servos use DSP, FPGA, and ARM as the main control chips. In the communication technology using DSP and ARM as the main control chips, the interrupt reception and query transmission mode is usually adopted. This mode occupies less chip resources and is simple to implement, but there is a possibility of reception anomalies, which leads to communication errors and inability to continue communication; and when the amount of data to be sent is large, the query transmission method has the disadvantage of taking too long to send, which leads to the exception of sending timeout, reducing the reliability of the system. At present, there is a lack of effective means to solve the reception anomaly in the project. Summary of the invention

[0005] In view of the above analysis, an embodiment of the present invention aims to provide an electric servo serial communication system to solve the problems of long communication link and long transmission time in the prior art.

[0006] The present invention provides an electric steering gear serial communication system, comprising:

[0007] The interface initialization component is used to receive the initialization parameters sent by the main function of the steering gear control software, and initialize the response data transceiver component and the telemetry data sending component based on the initialization parameters;

[0008] The response data transceiver component is used to receive and process the control instructions of the missile integrated control device to obtain valid data; it is also used to receive the response data obtained by the main function of the steering gear control software processing the valid data, and return the response data to the missile integrated control device;

[0009] A telemetry data sending component is used to receive the telemetry data fed back by the main function of the steering gear control software and send the telemetry data to the telemetry device;

[0010] The interface receiving state detection and reset component is used to detect the interface receiving state of the response data transceiver component; and when an abnormal interface receiving state is detected, the response data transceiver component is reinitialized;

[0011] The baud rate query component is used to receive the baud rate of the response number receiving and sending component and the telemetry data sending component output by the interface initialization component, and send it to the main function of the steering gear control software.

[0012] On the basis of the above scheme, the present invention also makes the following improvements:

[0013] Further, the response data transceiver component includes:

[0014] The response data receiving unit is used to receive and analyze the control instructions sent by the integrated control device on the missile to obtain valid data;

[0015] The user protocol parsing unit is used to parse valid data according to the user protocol parsing function pointed to by the user protocol parsing function pointer, and pass the parsed valid data to the main function of the steering gear control software, which generates response data after processing the valid data and feeds back the response data to the user protocol parsing unit; and is also used to package the received response data and pass it to the response data sending unit;

[0016] The response data sending unit is used to send the packaged data to be sent to the integrated control device on the missile.

[0017] Furthermore, the control instructions include self-check instructions, zero adjustment instructions and action instructions; wherein,

[0018] When the control instruction is a self-test instruction, the response data includes the self-test result;

[0019] When the control instruction is a zeroing instruction, the response data includes a zeroing result;

[0020] When the servo command is an action command, the response data includes the action command and the servo feedback.

[0021] Furthermore, the telemetry data sending component receives the packaged telemetry data sent by the main function of the steering gear control software in each cyclic control period, and uses the packaged telemetry data as the data to be sent and sends it to the telemetry device;

[0022] In each cyclic control period, the telemetry data includes voltage information, current information and temperature information;

[0023] If the main function of the servo control software also generates action instructions and servo feedback, then the telemetry data also includes the action instructions and servo feedback.

[0024] Further, the data to be sent is sent, and the following is executed:

[0025] Step C1: Initialize the sent data byte length, delay counters Count_d1 and Count_d2 to 0;

[0026] Step C2: Compare the size relationship between the data packet length PacketTL of the data to be sent and the maximum communication data packet length:

[0027] If PacketTL is greater than the maximum communication data packet length, the maximum communication data packet length is assigned to PacketTL; intercept the first PacketTL frame data in the data to be sent, which is sorted from low to high in terms of bytes, as the updated data to be sent; then, jump to step C3;

[0028] Otherwise, no operation is performed and the process directly jumps to step C3;

[0029] Step C3: Take the remainder of PacketTL with respect to 16, and the remainder length is RemaL.

[0030] If the remainder length RemaL is greater than or equal to 1, jump to step C4;

[0031] Otherwise, jump to step C5;

[0032] Step C4: Determine whether the sending buffer is empty.

[0033] If it is empty, write the first RemaL frame data in the data to be sent into the FIFO send register in sequence according to the byte order from low to high for sending; then, update the byte length of the sent data and the unsent data, and clear Count_d1; then, jump to step C5;

[0034] Otherwise, delay 1μs, Count_d1=Count_d1+1, determine whether Count_d1 is greater than or equal to the send timeout time SciWaitUs,

[0035] If yes, return the byte length of the sent data, clear Count_d1, and exit the sending process of the data to be sent;

[0036] If not, jump to step C4;

[0037] Step C5: Determine whether the length of the unsent data is greater than or equal to 1.

[0038] If yes, jump to step C6;

[0039] If not, return the byte length of the sent data and exit the sending process of the data to be sent;

[0040] Step C6: Determine whether the sending buffer is empty.

[0041] If it is empty, write the first 16 frames of data in the unsent data as a group and write them into the FIFO send register in sequence in the order of bytes from low to high for sending; then, update the sent data byte length and unsent data, clear Count_d2, and then jump to step C5;

[0042] Otherwise, delay 1μs, Count_d2=Count_d2+1, determine whether Count_d2 is greater than or equal to the send timeout time SciWaitUs,

[0043] If yes, return the byte length of the sent data, clear Count_d2, and exit the sending process of the data to be sent;

[0044] If not, jump to step C6.

[0045] Further, the data to be sent is sent, and the following steps are also performed:

[0046] Step C7: According to the byte length of the sent data, obtain the data sending status; determine whether the byte length of the sent data is 0,

[0047] If it is 0, the data sending status is not sent;

[0048] Otherwise, determine whether the byte length of the sent data is equal to PacketTL.

[0049] If so, the data sending status is sending normally;

[0050] Otherwise, the data sending status is incompletely sent.

[0051] Further, the interface receiving state detection and reset component detects the interface receiving state of the response data transceiver component,

[0052] When it is detected that the interface receiving state flag is 1, the response data transceiver component is reinitialized; after reinitialization, the interface receiving state flag of the response data transceiver component is set to 0.

[0053] Furthermore, the interface receiving state detection and reset component also performs receiving interrupt detection on the response data transceiving component. If no control instruction triggers the receiving interrupt of the response data transceiving component for more than one communication cycle, the response data transceiving component is reinitialized.

[0054] Further, the response data transceiver component is reinitialized:

[0055] Turn off the receiving interrupt of the response data transceiver component;

[0056] Perform software reset on the response data transceiver component;

[0057] A control instruction receiving interface enabling a response data transceiver component;

[0058] Enable the receive interrupt of the response data transceiver component.

[0059] Further, the functions of the interface initialization component and the baud rate query component are executed in the system initialization stage in the main function of the steering gear control software;

[0060] The functions of the telemetry data sending component and the interface receiving state detection and reset component are executed in the loop control in the main function of the steering gear control software;

[0061] The function of the response data transceiver component is executed in the receive interrupt in the main function of the servo control software.

[0062] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

[0063] The electric steering gear serial communication system provided by the present invention has the following beneficial effects:

[0064] First, by independently designing the response data transceiver component and the telemetry data sending component, the telemetry data and the response data are separated, and the response data is directly sent to the on-board integrated control device, and the telemetry data is sent to the telemetry equipment, thereby optimizing the data transmission path, saving the time of packaging the telemetry data and the response data and sending them to the on-board integrated control device, and saving the time of the on-board integrated control device transmitting the telemetry data to the telemetry equipment, reducing the data processing burden of the on-board integrated control device, and improving the reliability and stability of the missile system.

[0065] Secondly, by designing the sending timeout detection and sending data length verification functions, when the data sending function is abnormal, or the sending time exceeds the preset time, the frame data can be discarded and the sending process can be exited to avoid the servo control software from getting stuck or the program running away.

[0066] Third, by combining the detection of data reception status and data reception interruption, when the data reception status is found to be wrong, or no data triggers the reception interruption of the response data transceiver component for more than one communication cycle, the response data transceiver component is reinitialized, thereby effectively improving the communication reliability.

[0067] In summary, the electric servo serial communication system provided by the present invention effectively solves the problems of low system reliability and poor stability caused by long communication link, occasional reception interruption exceptions, long transmission time and transmission timeout in the existing electric servo communication mode.

[0068] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.

[0070] Figure 1 A schematic diagram of the structure of a serial communication system for an electric servo provided by an embodiment of the present invention;

[0071] Figure 2 A schematic diagram of a working method of an electric servo serial communication system provided by an embodiment of the present invention;

[0072] Figure 3 The control method of the main function of the steering gear control software provided by the embodiment of the present invention; wherein, Figure 3 (a) is an existing communication control method; Figure 3 (b) is the improved communication control method in this embodiment;

[0073] Figure 4 A flowchart of initialization parameter verification provided by an embodiment of the present invention;

[0074] Figure 5 A flow chart of the interface receiving state of the detection response data transceiver component provided by the embodiment of the present invention;

[0075] Figure 6 A flowchart of a response data transceiver component responding to a self-test instruction provided by an embodiment of the present invention;

[0076] Figure 7A sampling schematic diagram of a steering gear deflection command and a steering gear feedback provided by an embodiment of the present invention;

[0077] Figure 8 A schematic diagram of interactive data between the electric servo serial communication system and the missile integrated control device and telemetry equipment provided by an embodiment of the present invention;

[0078] Fig. 9 A flow chart of sending data to be sent provided by an embodiment of the present invention;

[0079] Fig.10 A detection and reset flow chart of an interface receiving state detection and reset component provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0080] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0081] A specific embodiment of the present invention discloses an electric servo serial communication system, the structural diagram of which is shown in FIG. Figure 1 As shown, the communication system includes an interface initialization component, a response data transceiver component, a telemetry data transmission component, an interface receiving state detection and reset component, and a baud rate query component; wherein,

[0082] The interface initialization component is used to receive the initialization parameters sent by the main function of the steering gear control software, and initialize the response data transceiver component and the telemetry data sending component based on the initialization parameters;

[0083] The response data transceiver component is used to receive and process the control instructions of the missile integrated control device to obtain valid data; it is also used to receive the response data obtained by the main function of the steering gear control software processing the valid data, and return the response data to the missile integrated control device;

[0084] A telemetry data sending component is used to receive the telemetry data fed back by the main function of the steering gear control software and send the telemetry data to the telemetry device;

[0085] The interface receiving state detection and reset component is used to detect the interface receiving state of the response data transceiver component; and when an abnormal interface receiving state is detected, the response data transceiver component is reinitialized;

[0086] The baud rate query component is used to receive the baud rate of the response number receiving and sending component and the telemetry data sending component output by the interface initialization component, and send it to the main function of the steering gear control software.

[0087] Compared with the prior art, the electric servo serial communication system provided in this embodiment, by independently designing the response data transceiver component and the telemetry data sending component, separates the telemetry data and the response data, directly sends the response data to the on-board integrated control device, and sends the telemetry data to the telemetry equipment, thereby optimizing the data transmission path, saving the time of packaging the telemetry data and the response data and sending them to the on-board integrated control device, and the time of the on-board integrated control device transmitting the telemetry data to the telemetry equipment, reducing the data processing burden of the on-board integrated control device, and improving the reliability and stability of the missile system.

[0088] In the specific implementation process, the main function of the servo control software includes three stages: system initialization, loop control, and receiving interrupt. Figure 2 As shown, in the specific implementation process, the system initialization is performed first, and then the loop control is performed; the receiving interrupt is executed when the response data transceiver component receives the control instruction, and it is not executed if the control instruction is not received. Specifically,

[0089] The functions of the interface initialization component and the baud rate query component are executed in the system initialization stage of the main function of the servo control software;

[0090] The functions of the telemetry data sending component and the interface receiving state detection and reset component are executed in the loop control in the main function of the steering gear control software;

[0091] The function of the response data transceiver component is executed in the receive interrupt in the main function of the servo control software.

[0092] It should be noted that the main function loop control runs periodically. The loop control period consists of a running period and an idle period. Communication data transmission will occupy the loop control time. Figure 3 As shown. The existing communication control method is as follows Figure 3 As shown in (a), since the communication data is long, the transmission of the communication data takes a long time for the loop control, which affects the periodicity of the loop control and further affects the stability of the control software. In this embodiment, the response data and telemetry data in the communication data are stripped, thereby effectively shortening the data length of the communication data, and optimizing the communication control method by sending in a time-sharing manner. At the same time, the response data and telemetry data are sent in the form of a FIFO sending register. After the data is written into the FIFO, the sending process can be exited immediately, which can save the sending time. Therefore, the improved communication control method in this embodiment is as follows: Figure 3 As shown in (b), since the communication data takes up a short period of time for loop control or does not take up any time for loop control when being sent, the periodicity of loop control is slightly affected, and the stability of the control software is little affected or has no effect.

[0093] The following is a detailed description of each component in the communication system provided in this embodiment:

[0094] (1) Interface initialization component

[0095] 1) Initialize the response data transceiver

[0096] The reply data transceiver component sequentially completes the reception interrupt initialization, GPIO initialization, initialization parameter verification, register initialization, baud rate calculation, and transmission timeout calculation of the reply data transceiver component based on the initialization parameters; and obtains the interface initialization state of the reply data transceiver component according to the result of the initialization parameter verification of the reply data transceiver component;

[0097] After the initialization is completed, the interface initialization component returns the interface initialization status of the response data transceiver component to the main function of the steering gear control software so that the main function of the steering gear control software can make control decisions.

[0098] 2) Initialize the telemetry data sending component

[0099] The telemetry data sending component completes the GPIO initialization, initialization parameter verification, register initialization, baud rate calculation, and sending timeout calculation of the telemetry data sending component in sequence based on the initialization parameters; and also obtains the interface initialization state of the telemetry data sending component according to the result of the initialization parameter verification of the telemetry data sending component;

[0100] After the initialization is completed, the interface initialization component returns the interface initialization status of the telemetry data sending component to the main function of the servo control software.

[0101] If the interface initialization status of the response data transceiver component and the telemetry data sending component received by the main function of the servo control software are both normal, then the system initialization is completed.

[0102] Initialization parameter verification is to verify the legitimacy of initialization parameters. The initialization parameter verification method of the response data receiving and sending component and the telemetry data sending component is the same, as described below:

[0103] In this embodiment, the initialization parameters include the number of data bits, parity check enable, parity check selection, the number of stop bits, the baud rate division number, the maximum communication data packet length, the system clock frequency and the user protocol parsing function pointer.

[0104] The legal ranges of initialization parameters are described as follows:

[0105] Number of data bits: 1-8 bits;

[0106] Parity check enable: 0 for disable, 1 for enable;

[0107] Parity check selection: 0 for odd check, 1 for even check;

[0108] Number of stop bits: 1-2 bits;

[0109] Baud rate division number: 0-400;

[0110] Maximum communication data packet length: 1-128 frames;

[0111] System clock frequency: 60-300Mhz;

[0112] User protocol parsing function pointer: The user protocol parsing function pointer of the response data transceiver component is non-null; the user protocol parsing function pointer of the telemetry data sending component is null.

[0113] The result of the initialization parameter check is reflected in the form of a status code;

[0114] When the initialization parameters are normal, the status codes corresponding to each item in the initialization parameters are all 0x0000.

[0115] When the initialization parameters are abnormal, the corresponding status code is assigned according to the abnormal content in the initialization parameters;

[0116] The status code when the number of data bits is abnormal is 0x0001;

[0117] The status code when parity check is enabled abnormally is 0x0002;

[0118] The status code when the parity selection is abnormal is 0x0004;

[0119] The status code when the number of stop bits is abnormal is 0x0008;

[0120] The status code when the baud rate division number is abnormal is 0x0010;

[0121] The status code when the maximum communication data packet length is abnormal is 0x0020;

[0122] The status code when the system clock frequency is abnormal is 0x0040;

[0123] The status code when the user protocol parsing function pointer is abnormal is 0x0080.

[0124] The flowchart of initialization parameter verification is as follows Figure 4 shown.

[0125] The baud rate BaudRate is calculated as shown in formula (1):

[0126]

[0127] BRR is the baud rate division number, which is composed of the SCI (Serial Communication Interface) baud rate selection register SCIHBAUD (high byte) and SCILBAUD (low byte).

[0128] LSPCLK is the low-speed peripheral clock frequency, calculated as shown in formula (2):

[0129]

[0130] SYSCLKOUT is the system clock frequency; LOSPCP is the low-speed peripheral clock prescaler.

[0131] The sending timeout SciWaitUs is calculated by the baud rate BaudRate, the data frame length Fralen, and the single communication data packet length ByteLen. The calculation of the sending timeout SciWaitUs is shown in formula (3):

[0132]

[0133] In this embodiment, the maximum communication data packet length is the total number of data frames of a data packet, wherein a data packet is sent in several times, and the byte length of each transmission is the single communication data packet length ByteLen. Exemplarily, in this embodiment, ByteLen is 16.

[0134] (2) Response data transceiver

[0135] The response data transceiver component includes a response data receiving unit, a user protocol parsing unit and a response data sending unit.

[0136] 1) Response data receiving unit, used to receive and analyze the control instructions sent by the integrated control device on the missile to obtain valid data;

[0137] In order to ensure the normal reception of the control instruction, during the process of the response data receiving unit receiving the control instruction, it is also necessary to detect the interface receiving state of the response data transceiver component to obtain the interface receiving state flag of the response data transceiver component. The flowchart of detecting the interface receiving state of the response data transceiver component is shown in FIG. Figure 5 The specific process is described as follows:

[0138] Step S1: Initialize the data frame counter Count_N and the low-level cumulative bit counter Count_L to 0; initialize the interface receiving status flag, data discontinuity error flag, data frame error flag and data overflow error flag to 0;

[0139] Step S2: Detect the level signal of the receiving interface of the response data transceiver component,

[0140] When a low level (i.e., the start bit) of a baud cycle length is detected, jump to step S3 (i.e., receiving data bit by bit);

[0141] Otherwise, jump to step S2; that is, continue to detect the start bit.

[0142] The main function of step S3 is to detect data discontinuity errors. The specific process is described as follows:

[0143] Step S3: Receive one bit of data, data frame counter Count_N=Count_N+1; determine whether the current bit of data is at a low level,

[0144] If yes, then Count_L=Count_L+1; determine whether Count_L is greater than or equal to the data frame length Fralen,

[0145] If yes, it means data discontinuity error; at this time, the data discontinuity error flag is set to 1, Count_L is cleared, and the process jumps to step S6;

[0146] Otherwise, Count_L is cleared;

[0147] Determine whether Count_N is equal to the data frame length Fralen,

[0148] If not, it indicates that the current frame data has not been received yet, and the process jumps to step S3, at which point the next bit of data is received.

[0149] If not, Count_N is reset and the process goes to step S4;

[0150] The function of step S4 is to perform data frame error detection, and the specific process is described as follows:

[0151] Step S4: Determine whether the currently received data is at a high level (when the data frame is normal, it ends at a high level).

[0152] If yes, it means that a complete frame of data has been received, and the process goes to step S5;

[0153] If not, it means the data frame is wrong, the data frame error flag is set to 1, and the process jumps to step S6.

[0154] After receiving a complete frame of data, the frame data needs to be cached. Therefore, it is necessary to determine whether the receiving buffer is idle, that is, to perform data overflow error detection. The specific process of data overflow error detection is described as follows:

[0155] Step S5: Determine whether the receive buffer status flag is equal to 1 (the receive buffer status flag is 1, indicating that there is data in the receive buffer and the receive buffer is busy; the receive buffer status flag is 0, indicating that there is no data in the receive buffer and the receive buffer is idle).

[0156] If yes, it indicates a data overflow error, the data overflow error flag is set to 1, and the process jumps to step S6;

[0157] Otherwise, it means that the receiving buffer is idle. At this time, a complete frame of data received in step S4 is stored in the receiving buffer, and the receiving buffer status flag is set to 1, and the data of this frame is read by the response data receiving unit; after the reading is completed, the receiving buffer status flag is set to 0 (before the reading is completed, the receiving buffer status flag remains 1); then, jump to step S1 to continue the detection of the start bit of the next data frame;

[0158] Step S6: If the data discontinuity error flag, the data frame error flag or the data overflow error flag is detected to be 1, the interface receiving status flag of the response data transceiver component is set to 1.

[0159] In this embodiment, after receiving the complete data frame (i.e., the control instruction), the response data receiving unit extracts valid data from the control instruction according to the format of the control instruction. For example, if the lower 8 bits of data in the control instruction format are valid data, the response data receiving unit uses the lower 8 bits of data in the control instruction as valid data.

[0160] 2) A user protocol parsing unit, which is used to parse valid data according to the user protocol parsing function pointed to by the user protocol parsing function pointer, and pass the parsed valid data to the main function of the steering gear control software, which generates response data after processing the valid data and feeds back the response data to the user protocol parsing unit; and is also used to package the received response data and pass it to the response data sending unit;

[0161] In this embodiment, the user protocol parsing function is to parse the data received by the response data receiving unit and to package the response data.

[0162] The user agreement parsing function is agreed upon by the user.

[0163] 3) A response data sending unit, used to send the packaged data to be sent to the missile integrated control device.

[0164] In this embodiment, the control instructions of the missile integrated control device mainly include self-test instructions, zeroing instructions and action instructions. Correspondingly, the response data output by the response data transceiver mainly include the following: self-test results, zeroing results, action instructions and steering gear feedback (for example, steering gear angular displacement or linear displacement feedback). Specifically,

[0165] When the control instruction is a self-test instruction, the response data includes the self-test result;

[0166] When the control instruction is a zeroing instruction, the response data includes a zeroing result;

[0167] When the servo command is an action command, the response data includes the action command and the servo feedback.

[0168] Next, taking the self-test instruction as an example, the working process of the response data transceiver component responding to the self-test instruction is described. The working process diagram of the response data transceiver component responding to the self-test instruction is shown in FIG. Figure 6 As shown, the description is as follows:

[0169] The response data receiving unit receives the self-test command sent by the integrated control device on the missile and parses the valid data from the self-test command;

[0170] The user protocol parsing unit passes the valid data parsed from the self-test command to the main function of the servo control software, which generates the corresponding servo deflection command to drive the servo deflection. The main function of the servo control software synchronously collects the servo feedback, and performs self-test according to the servo deflection command and servo feedback. After the self-test is completed, the self-test result is obtained. The main function of the servo control software uses the self-test result as the response data and sends the response data to the user protocol parsing unit;

[0171] The user protocol parsing unit packages the response data and sends it to the response data sending unit. The response data sending unit sends the packaged response data as data to be sent to the missile integrated control device.

[0172] For example, it is assumed that the steering gear deflection command is a sine wave with an amplitude of 2° and a period of 2s, and a total of one period is sent. The operating period Tk of the main function of the steering gear control software is 1ms.

[0173] In each operation cycle of the main function, a servo deflection command is sent to the servo. A total of 2000 sampling points are set within a 2s cycle, and 2000 servo deflection commands are sent. The main function of the servo control software synchronously collects servo feedback once in each operation cycle of the main function, and a total of 2000 servo feedbacks are collected within a 2s cycle. The sampling diagram of the servo deflection command and servo feedback is shown in the figure below. Figure 7 shown.

[0174] In the main function of the servo control software, the servo feedback filtered value is compared with the servo deflection command. If the number of points where the absolute value of the difference is not greater than 0.2° accounts for more than 95% of the total number of points, it means that the self-test result is normal; otherwise, it means that the self-test result is abnormal. Specifically,

[0175] The servo feedback of each sampling point is filtered to obtain the filtered value of the servo feedback. The specific process is shown in formula (4):

[0176]

[0177] Among them, u f (k) represents the servo feedback at the kth sampling point, u fw (k) represents the filtered value of the servo feedback at the kth sampling point;

[0178] The filtered value of the servo feedback is subtracted from the servo deflection command:

[0179] Δu(k)=u i (k)-u fw (k) (5)

[0180] Among them, u i (k) represents the servo deflection command at the kth sampling point, and Δu(k) represents the difference between the servo feedback filtered value at the kth sampling point and the servo deflection command.

[0181] If the absolute value of the difference at the kth sampling point is not greater than 0.2°, that is, |Δu(k)|≤0.2, the normal sampling point cumulative counter Count_Z is incremented by 1. After the servo deflection command is completed, the accumulated Count_Z is obtained.

[0182] like If the self-test is normal; Self-test abnormality.

[0183] After the self-test result is output, the counter Count_Z is cleared.

[0184] (3) Telemetry data transmission component

[0185] The telemetry data sending component receives the packaged telemetry data sent by the main function of the servo control software in each cyclic control period, and uses the packaged telemetry data as the data to be sent and sends it to the telemetry device.

[0186] During the specific implementation, in each cyclic control period, the telemetry data includes voltage information, current information and temperature information.

[0187] In addition, during the cyclic control period, if the response data transceiver component happens to trigger a receiving interrupt, the telemetry data also includes action instructions and servo feedback.

[0188] The interactive data diagram of the electric servo serial communication system and the missile integrated control device and telemetry equipment is as follows: Figure 8 shown.

[0189] In this embodiment, the data to be sent in the response data transceiver component and the telemetry data sending component are sent by performing the following operations. The sending flow chart of the data to be sent is as follows: Fig. 9 As shown:

[0190] Step C1: Initialize the sent data byte length, delay counters Count_d1 and Count_d2 to 0;

[0191] Step C2: Compare the size relationship between the data packet length PacketTL of the data to be sent and the maximum communication data packet length:

[0192] If PacketTL is greater than the maximum communication data packet length, it indicates that PacketTL is too long. If the data to be sent is sent based on this, data overflow and sending timeout will occur, causing the program to run away. At this time, the maximum communication data packet length is assigned to PacketTL; the first PacketTL frame data in the data to be sent, which is sorted from low to high in terms of bytes, is intercepted as the updated data to be sent; then, jump to step C3;

[0193] Otherwise, no operation is performed and the process directly jumps to step C3;

[0194] Step C3: Take the remainder of PacketTL with respect to 16, and the remainder length is RemaL.

[0195] If the remainder length RemaL is greater than or equal to 1, jump to step C4;

[0196] Otherwise, jump to step C5.

[0197] Step C4: Determine whether the sending buffer is empty.

[0198] If it is empty, write the first RemaL frame data in the data to be sent into the FIFO send register in sequence according to the byte order from low to high for sending; then, update the byte length of the sent data and the unsent data, and clear Count_d1; then, jump to step C5;

[0199] Otherwise, delay 1μs, Count_d1=Count_d1+1, determine whether Count_d1 is greater than or equal to the send timeout time SciWaitUs,

[0200] If yes, return the byte length of the sent data, clear Count_d1, and exit the sending process of the data to be sent;

[0201] If not, jump to step C4;

[0202] Step C5: Determine whether the length of the unsent data is greater than or equal to 1.

[0203] If yes, jump to step C6;

[0204] If not, return the byte length of the sent data and exit the sending process of the data to be sent;

[0205] Step C6: Determine whether the sending buffer is empty.

[0206] If it is empty, write the first 16 frames of data in the unsent data as a group and write them into the FIFO send register in sequence in the order of bytes from low to high for sending; then, update the sent data byte length and unsent data, clear Count_d2, and then jump to step C5;

[0207] Otherwise, delay 1μs, Count_d2=Count_d2+1, determine whether Count_d2 is greater than or equal to the send timeout time SciWaitUs,

[0208] If yes, return the byte length of the sent data, clear Count_d2, and exit the sending process of the data to be sent;

[0209] If not, jump to step C6.

[0210] Step C7: According to the byte length of the sent data, obtain the data sending status; determine whether the byte length of the sent data is 0,

[0211] If it is 0, the data sending status is not sent;

[0212] Otherwise, determine whether the byte length of the sent data is equal to PacketTL.

[0213] If so, the data sending status is sending normally;

[0214] Otherwise, the data sending status is incompletely sent.

[0215] It should be noted that when PacketTL is greater than the maximum communication data packet length, even if all the data has been sent, an error of incomplete transmission should be reported, because not all the required data has been sent out at this time, but part of the data has been intercepted and sent for security reasons.

[0216] In the above process, by designing the sending timeout detection and sending data length verification functions, when the data sending function is abnormal, or the sending time exceeds the preset time, the frame data can be discarded and the sending process can be exited to avoid the servo control software from getting stuck or the program running away.

[0217] In this embodiment, the response data transceiver component and the telemetry data sending component return to the data sending state after the data to be sent is sent.

[0218] In addition, in this embodiment, the FIFO sending registers in the response data transceiver component and the telemetry data sending component are both 16-level deep first-in first-out dual-port buffer FIFOs, and the data to be sent is written from the input port of the FIFO sending register and output from the output port in the order of writing. After the data is written into the FIFO, the sending process can be exited immediately, which can save the sending time and effectively reduce the impact of the system time occupied by data sending on the electric steering gear control system.

[0219] (4) Interface receiving status detection and reset component

[0220] The interface receiving state detection and reset component detects the interface receiving state of the reply data transceiver component. When it is detected that the interface receiving state flag is 1, the reply data transceiver component is reinitialized to ensure that the interface receiving state is restored to normal, that is, to ensure that the reply data transceiver component can normally receive the control instructions of the integrated control device on the missile. After reinitialization, the interface receiving state flag of the reply data transceiver component is set to 0.

[0221] Since the interface receiving status flag may be misreported or falsely reported, this embodiment further adds the following operations:

[0222] Perform reception interrupt detection on the response data transceiver component. If no control instruction triggers the reception interrupt of the response data transceiver component for more than one communication cycle, the response data transceiver component is reinitialized. The specific method is:

[0223] Step A1: At the beginning of each communication cycle Tc, initialize the cycle counter Count_T to 0;

[0224] Step A2: In each operation cycle Tk of the main function of the steering gear control software, determine whether the control instruction triggers the receiving interrupt of the response data transceiver component.

[0225] If triggered, it jumps to the receive interrupt and receives the control instruction;

[0226] If not, Count_T=Count_T+1; and determine whether CountT>Tc / Tk is true.

[0227] If so, reinitialize the response data transceiver component; and jump to step A1;

[0228] Otherwise, jump to step A2.

[0229] The method to reinitialize the response data transceiver component is:

[0230] First, turn off the receive interrupt of the response data transceiver component;

[0231] Then, the response data transceiver component is reset by software;

[0232] Afterwards, enabling the control instruction receiving interface of the response data transceiver component;

[0233] Finally, enable the receive interrupt of the response data transceiver component.

[0234] The interface receiving status detection and reset component feeds back the interface receiving status flag of the response data transceiver component to the main function of the steering gear control software in each loop control period.

[0235] Since the execution process of the receive interrupt does not affect the loop control process, the interface receive status flags before and after the response data transceiver component is reset can be output to the main function of the servo control software as function return values ​​in the corresponding loop control period.

[0236] The detection and reset flow chart of the interface receiving status detection and reset components is as follows: Fig.10 shown.

[0237] In summary, this embodiment combines the detection of data reception status and data reception interruption. When it is found that the data reception status is wrong, or there is no data triggering the reception interruption of the response data transceiver component for more than one communication cycle, the response data transceiver component is reinitialized, thereby effectively improving the communication reliability.

[0238] (5) Baud rate query component

[0239] The function of the baud rate query component is relatively simple and has been described previously, so it will not be repeated here.

[0240] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0241] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. An electric servo serial communication system, characterized in that: include: The interface initialization component is used to receive the initialization parameters sent by the main function of the steering gear control software, and initialize the response data transceiver component and the telemetry data sending component based on the initialization parameters; The response data transceiver component is used to receive and process the control instructions of the missile integrated control device to obtain valid data; it is also used to receive the response data obtained by the main function of the steering gear control software processing the valid data, and return the response data to the missile integrated control device; A telemetry data sending component is used to receive the telemetry data fed back by the main function of the steering gear control software and send the telemetry data to the telemetry device; The interface receiving state detection and reset component is used to detect the interface receiving state of the response data transceiver component; and when an abnormal interface receiving state is detected, the response data transceiver component is reinitialized; The baud rate query component is used to receive the baud rate of the response number receiving and sending component and the telemetry data sending component output by the interface initialization component, and send it to the main function of the steering gear control software.

2. The electric steering gear serial communication system according to claim 1, characterized in that: The response data transceiver component comprises: The response data receiving unit is used to receive and analyze the control instructions sent by the integrated control device on the missile to obtain valid data; The user protocol parsing unit is used to parse valid data according to the user protocol parsing function pointed to by the user protocol parsing function pointer, and pass the parsed valid data to the main function of the steering gear control software, which generates response data after processing the valid data and feeds back the response data to the user protocol parsing unit; and is also used to package the received response data and pass it to the response data sending unit; The response data sending unit is used to send the packaged data to be sent to the integrated control device on the missile.

3. The electric steering gear serial communication system according to claim 2, characterized in that: The control instructions include self-check instructions, zero adjustment instructions and action instructions; wherein, When the control instruction is a self-test instruction, the response data includes the self-test result; When the control instruction is a zeroing instruction, the response data includes a zeroing result; When the servo command is an action command, the response data includes the action command and the servo feedback.

4. The electric steering gear serial communication system according to claim 2, characterized in that: The telemetry data sending component receives the packaged telemetry data sent by the main function of the steering gear control software in each cyclic control period, and uses the packaged telemetry data as data to be sent and sends it to the telemetry device; In each cyclic control period, the telemetry data includes voltage information, current information and temperature information; If the main function of the servo control software also generates action instructions and servo feedback, then the telemetry data also includes the action instructions and servo feedback.

5. The electric servo serial communication system according to any one of claims 2 to 4, characterized in that: To send the data to be sent, execute: Step C1: Initialize the sent data byte length, delay counters Count_d1 and Count_d2 to 0; Step C2: Compare the size relationship between the data packet length PacketTL of the data to be sent and the maximum communication data packet length: If PacketTL is greater than the maximum communication data packet length, the maximum communication data packet length is assigned to PacketTL; intercept the first PacketTL frame data in the data to be sent, which is sorted from low to high in terms of bytes, as the updated data to be sent; then, jump to step C3; Otherwise, no operation is performed and the process directly jumps to step C3; Step C3: Take the remainder of PacketTL with respect to 16, and the remainder length is RemaL. If the remainder length RemaL is greater than or equal to 1, jump to step C4; Otherwise, jump to step C5; Step C4: Determine whether the sending buffer is empty. If it is empty, write the first RemaL frame data in the data to be sent into the FIFO send register in sequence according to the byte order from low to high for sending; then, update the byte length of the sent data and the unsent data, and clear Count_d1; then, jump to step C5; Otherwise, delay 1μs, Count_d1=Count_d1+1, determine whether Count_d1 is greater than or equal to the send timeout time SciWaitUs, If yes, return the byte length of the sent data, clear Count_d1, and exit the sending process of the data to be sent; If not, jump to step C4; Step C5: Determine whether the length of the unsent data is greater than or equal to 1. If yes, jump to step C6; If not, return the byte length of the sent data and exit the sending process of the data to be sent; Step C6: Determine whether the sending buffer is empty. If it is empty, write the first 16 frames of data in the unsent data as a group and write them into the FIFO send register in sequence in the order of bytes from low to high for sending; then, update the sent data byte length and unsent data, clear Count_d2, and then jump to step C5; Otherwise, delay 1μs, Count_d2=Count_d2+1, determine whether Count_d2 is greater than or equal to the send timeout time SciWaitUs, If yes, return the byte length of the sent data, clear Count_d2, and exit the sending process of the data to be sent; If not, jump to step C6.

6. The electric steering gear serial communication system according to claim 5, characterized in that: Send the data to be sent, and further execute: Step C7: According to the byte length of the sent data, obtain the data sending status; determine whether the byte length of the sent data is 0, If it is 0, the data sending status is not sent; Otherwise, determine whether the byte length of the sent data is equal to PacketTL. If yes, the data sending status is sending normally; Otherwise, the data sending status is incompletely sent.

7. The electric steering gear serial communication system according to claim 2, characterized in that: The interface receiving state detection and reset component detects the interface receiving state of the response data transceiver component. When it is detected that the interface receiving state flag is 1, the response data transceiving component is reinitialized; after reinitialization, the interface receiving state flag of the response data transceiving component is set to 0.

8. The electric steering gear serial communication system according to claim 7, characterized in that: The interface receiving state detection and reset component also performs receiving interrupt detection on the response data transceiving component. If no control instruction triggers the receiving interrupt of the response data transceiving component for more than one communication cycle, the response data transceiving component is reinitialized.

9. The electric steering gear serial communication system according to claim 7 or 8, characterized in that: Reinitialize the response data transceiver component: Turn off the receiving interrupt of the response data transceiver component; Perform software reset on the response data transceiver component; A control instruction receiving interface enabling a response data transceiver component; Enable the receive interrupt of the response data transceiver component.

10. The electric servo serial communication system according to claim 1, characterized in that: The functions of the interface initialization component and the baud rate query component are executed in the system initialization stage of the main function of the servo control software; The functions of the telemetry data sending component and the interface receiving state detection and reset component are executed in the loop control in the main function of the steering gear control software; The function of the response data transceiver component is executed in the receive interrupt in the main function of the servo control software.