Method and device for solving the abnormal matching between the main controller and the fiber optic gyroscope frequency
By identifying and adjusting the mismatch between the main controller and the fiber optic gyroscope frequency, the problem of sampling signal jumps was solved, improving the system's accuracy and stability, and making it suitable for handling various mismatches.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEBEI HANGUANG HEAVY IND
- Filing Date
- 2022-11-30
- Publication Date
- 2026-06-16
AI Technical Summary
An abnormal match between the main controller and the fiber optic gyroscope frequency causes abrupt changes in the sampling signal, which is difficult to detect and affects the system's accuracy and stability.
The sampling frequency of the main controller is determined by triggering the DSP interrupt frequency through the FPGA, the data transmission length is calculated, matching anomalies are identified, and the data update rate of the fiber optic gyroscope or the sampling period of the main controller is adjusted according to the frequency variability, or the data signal modulation rate is modified to perform fault tolerance processing and angle transformation.
It improves the design feasibility of the system, reduces the workload of troubleshooting, enhances the accuracy and stability of the system, is suitable for various anomaly matching processes, and eliminates hidden data jump risks.
Smart Images

Figure CN116124115B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of sensors, and specifically relates to a solution and apparatus for anomaly in the frequency matching between a main controller and a fiber optic gyroscope. Background Technology
[0002] Modern warfare places higher demands on the performance of weaponry, which also imposes stricter requirements on optoelectronic turntables that provide rotational functionality and real-time information for detection, tracking, and monitoring. To improve control accuracy, optoelectronic turntables often employ closed-loop control. In closed-loop control systems, the information acquisition from sensors, such as fiber optic gyroscopes, directly affects the system's accuracy, stability, and other performance characteristics. When the main controller acquires signals from the sensors, inconsistencies in sampling frequencies or data transmission speeds can cause jumps in the sampled signals, such as... Figure 1 As shown, the fault resembles a hardware failure in the sensor or sampling circuit and is not easily detected. This is especially true when the sampling frequency of the main controller is higher than the data refresh rate of the peripherals. Therefore, resolving the mismatch between the main controller and the fiber optic gyroscope frequency is a key concern. Summary of the Invention
[0003] In view of this, the present invention provides a solution to the mismatch anomaly between the main controller and the fiber optic gyroscope frequency. This method resolves the mismatch anomaly between the main controller and the fiber optic gyroscope frequency by including:
[0004] Step 1: Determine the sampling frequency of the main controller by the frequency at which the FPGA triggers the DSP interrupt;
[0005] Step 2: Calculate the length of the transmitted data based on the data update frequency of the fiber optic gyroscope as an external sensor and the modulation rate of the data signal to the carrier wave.
[0006] Step 3: If the length of the transmitted data is greater than the buffer of the main controller, or if the main controller fails to sample and obtain all the data of the fiber optic gyroscope within one cycle, then it is determined that there is a mismatch between the sampling frequency of the main controller and the data update frequency of the fiber optic gyroscope.
[0007] Step 4: Based on the matching anomaly, determine the cause of the matching anomaly; and based on whether the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope can be changed, determine a solution to the matching anomaly.
[0008] Specifically, in step 3, if the length of the transmitted data is greater than the buffer of the main controller, the cause of the matching anomaly is determined to be that the sampling frequency of the main controller is lower than the frequency of the peripheral device.
[0009] Specifically, in step 3, if the main controller fails to sample all the data of the fiber optic gyroscope within one cycle, the cause of the matching anomaly is determined to be that the clock of the main controller and the clock of the fiber optic gyroscope are not the same reference.
[0010] Specifically, if the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope can be changed, the mismatch can be resolved by reducing the data update rate of the fiber optic gyroscope or increasing the sampling period of the main controller; if the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope cannot be changed, the mismatch can be resolved by modifying the modulation rate of the data signal to the carrier.
[0011] Specifically, the process of communication between the main controller and the fiber optic gyroscope via a serial port chip in this method includes: when the main controller samples the data of the fiber optic gyroscope, it configures the same communication mode with the fiber optic gyroscope via the serial port chip, performs fault tolerance processing and angle transformation processing, and then sends the result to the main controller.
[0012] This invention also proposes a device for resolving mismatch issues between the main controller and the fiber optic gyroscope frequency, comprising:
[0013] The main controller sampling frequency determination module is used to determine the sampling frequency of the main controller based on the frequency at which the FPGA triggers the DSP interrupt.
[0014] The data transmission length determination module is used to calculate the length of the transmitted data based on the data update frequency of the fiber optic gyroscope as an external sensor and the modulation rate of the data signal to the carrier wave.
[0015] The matching anomaly determination module is used to determine that there is a matching anomaly between the sampling frequency of the main controller and the data update frequency of the fiber optic gyroscope if the length of the transmitted data is greater than the buffer of the main controller, or if the main controller fails to sample and obtain all the data of the fiber optic gyroscope within one cycle.
[0016] The matching anomaly resolution module is used to determine the cause of the matching anomaly based on the matching anomaly, and to determine a solution to the matching anomaly based on whether the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope can be changed.
[0017] Specifically, in the matching anomaly determination module, if the length of the transmitted data is greater than the buffer of the main controller, the cause of the matching anomaly is determined to be that the sampling frequency of the main controller is lower than the frequency of the peripheral device.
[0018] Specifically, in the matching anomaly determination module, if the main controller fails to sample and obtain all the data of the fiber optic gyroscope within one cycle, the cause of the matching anomaly is determined to be that the clock of the main controller and the clock of the fiber optic gyroscope are not the same reference.
[0019] Specifically, if the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope can be changed, the mismatch can be resolved by reducing the data update rate of the fiber optic gyroscope or increasing the sampling period of the main controller; if the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope cannot be changed, the mismatch can be resolved by modifying the modulation rate of the data signal to the carrier.
[0020] Specifically, the process of communication between the main controller and the fiber optic gyroscope via a serial port chip includes: when the main controller samples the data of the fiber optic gyroscope, it configures the same communication mode with the fiber optic gyroscope via the serial port chip, performs fault tolerance processing and angle transformation processing, and then sends the result to the main controller.
[0021] Beneficial effects:
[0022] 1) In this invention, the frequency of the main controller and peripherals is analyzed and matched in the early stage of design, which improves the feasibility of the design and reduces the workload of troubleshooting in the later stage.
[0023] 2) This invention can determine different solutions based on whether the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope can be changed, thus having wide applicability;
[0024] 3) This invention eliminates hidden and difficult-to-reproduce data jump risks, greatly improving the accuracy and stability of the system;
[0025] 4) This invention is applicable to handling various abnormal matching issues between the main controller frequency and the fiber optic gyroscope refresh rate, and has a wide range of applications. Attached Figure Description
[0026] Figure 1 This is a diagram illustrating the sampling process when data jumps occur in existing technologies.
[0027] Figure 2 This is a flowchart of the program for sampling peripherals by the main controller in this invention;
[0028] Figure 3 This is a circuit diagram showing the communication between the peripherals and the main controller in this invention;
[0029] Figure 4 This diagram illustrates the normal sampling process when the sampling frequency of the main controller is twice the peripheral data refresh rate in this invention.
[0030] Figure 5This is a flowchart of the sampling process after frequency reduction of the peripheral device in this invention;
[0031] Figure 6 This is a flowchart illustrating the sampling process after increasing the communication rate in this invention. Detailed Implementation
[0032] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0033] This invention provides a solution to the mismatch between the frequencies of the main controller and the fiber optic gyroscope. Specifically, it addresses situations where the main controller's operating frequency is higher than the peripheral's data refresh rate. The analysis process includes determining the sampling period, calculating the data transmission rate, analyzing the feasibility of normal sampling, processing the digital signal, and analyzing potential anomalies. In this embodiment, the main controller needs to process the digital signal. The main controller samples the peripheral's digital signal, configures the serial port chip to use the same communication mode as the peripheral, performs fault tolerance processing and angle transformation, and sends the result to the main controller. The flowchart of the main controller's sampling process is shown below. Figure 2 As shown.
[0034] The specific steps for identifying and resolving frequency mismatch anomalies between the main controller and the fiber optic gyroscope include:
[0035] Step 1: Determine the sampling frequency of the main controller by the frequency at which the FPGA triggers the DSP interrupt;
[0036] The sampling frequency of the main controller is determined. Based on the system's control requirements, this is determined by the frequency at which the FPGA triggers the DSP interrupt. Assuming the FPGA triggers the DSP interrupt every 0.25ms, the DSP's sampling frequency is 4kHz. The communication circuit diagram between the peripherals and the main controller in this invention is shown below. Figure 3 As shown.
[0037] Step 2: Calculate the length of the transmitted data based on the data update frequency of the fiber optic gyroscope as an external sensor and the modulation rate of the data signal to the carrier wave.
[0038] Taking 7 bytes as an example, assuming the peripheral frequency is 2kHz, the mathematical conversion formula between the number of bytes the peripheral can send in one cycle and the frequency is:
[0039] n = (Baud / 10) * (1 / 2000)
[0040] Where n is the number of data bytes sent in one cycle, Baud / 10 represents the number of data bytes that can be transmitted per second (data is 10 bits), and Baud is the baud rate, which is the modulation rate of the data signal to the carrier wave. When Baud = 115200, n = 5, and it is impossible to complete the transmission in one cycle. However, when Baud = 230400, n = 11, and the peripheral can complete the transmission of all bytes in one cycle, thus eliminating the data misalignment phenomenon caused by the peripheral transmitting data in multiple cycles.
[0041] The normal sampling process diagram is shown when the main controller's sampling frequency is twice the peripheral data refresh rate. Figure 4 As shown;
[0042] Step 3: If the length of the transmitted data is greater than the buffer of the main controller, or if the main controller fails to sample and obtain all the data of the fiber optic gyroscope within one cycle, then it is determined that there is a mismatch between the sampling frequency of the main controller and the data update frequency of the fiber optic gyroscope.
[0043] In the first scenario, if the sampling frequency of the main controller is lower than that of the peripheral device, multiple sets of data will be sampled within one cycle. In this case, the main controller needs more than 16 levels of buffer to store these data and then select a correct set of data from these data for sampling, which greatly wastes the resources of the main controller. Furthermore, the 28xx series DSPs only have 16 levels of buffer.
[0044] In the second scenario, after prolonged sampling, five out of the seven bytes may be scattered across one cycle of the main controller, while the remaining two bytes may be scattered across two cycles each. This results in the main controller actually using three cycles to sample the data transmitted from the peripheral device. This mismatch in actual frequencies between the two systems can lead to data errors.
[0045] Step 4: Based on the matching anomaly, determine the cause of the matching anomaly; and based on whether the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope can be changed, determine a solution to the matching anomaly.
[0046] In the first scenario, if the sampling frequency of the main controller is lower than that of the peripheral device, multiple sets of data will be sampled within one cycle; therefore, using a low frequency to sample a high frequency is not feasible. However, assuming that the sampling frequency of the main controller is twice that of the peripheral device, theoretically, sampling can be completed within two cycles.
[0047] In the second scenario, because the main controller's clock and the peripheral's clock are not based on the same reference, after a long period of sampling, five of the seven bytes mentioned above will be scattered across one cycle of the main controller, while the other two bytes will be scattered across two cycles respectively. This results in the main controller actually taking three cycles to sample the data transmitted from the peripheral. This mismatch in their actual frequencies will cause data errors.
[0048] We may solve the above problem in the following two ways:
[0049] 1. After analysis, the data update rate of the peripheral device can be reduced or the sampling period of the main controller can be increased. Assuming the sampling frequency of the main controller remains unchanged, if the data update rate of the peripheral device is halved, the main controller will sample in four cycles instead of two, ensuring that all seven bytes fall within these four sampling cycles. Similarly, increasing the sampling period of the main controller achieves the same result. A flowchart of the sampling process after reducing the peripheral device's frequency is shown below. Figure 5 As shown.
[0050] 2. If the main controller sampling frequency and peripheral data update rate cannot be changed, the baud rate can be modified. Assuming the main controller sampling frequency and peripheral data refresh rate remain unchanged, changing the baud rate from 230400bps to 460800bps will transmit 11 bytes per sampling cycle, ensuring that peripheral signal sampling can be completed within two sampling cycles. The sampling flowchart after increasing the communication rate is shown below. Figure 6 As shown.
[0051] This invention also proposes a device for resolving mismatch issues between the main controller and the fiber optic gyroscope frequency, comprising:
[0052] The main controller sampling frequency determination module is used to determine the sampling frequency of the main controller based on the frequency at which the FPGA triggers the DSP interrupt.
[0053] The data transmission length determination module is used to calculate the length of the transmitted data based on the data update frequency of the fiber optic gyroscope as an external sensor and the modulation rate of the data signal to the carrier wave.
[0054] The matching anomaly determination module is used to determine that there is a matching anomaly between the sampling frequency of the main controller and the data update frequency of the fiber optic gyroscope if the length of the transmitted data is greater than the buffer of the main controller, or if the main controller fails to sample and obtain all the data of the fiber optic gyroscope within one cycle.
[0055] The matching anomaly resolution module is used to determine the cause of the matching anomaly based on the matching anomaly, and to determine a solution to the matching anomaly based on whether the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope can be changed.
[0056] This device corresponds one-to-one with the features in the previous method embodiment, so it will not be described again.
[0057] In summary, the above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0058] It will be apparent to those skilled in the art that the embodiments of the present invention are not limited to the details of the exemplary embodiments described above, and that the embodiments of the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the embodiments of the present invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the embodiments of the present invention is defined by the appended claims rather than the foregoing description. Therefore, all variations falling within the meaning and scope of equivalents of the claims are intended to be encompassed within the embodiments of the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units, modules, or devices recited in the system, apparatus, or terminal claims may also be implemented by the same unit, module, or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.
[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention and are not intended to limit them. Although the embodiments of the present invention have been described in detail with reference to the above preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions to the technical solutions of the embodiments of the present invention should not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A solution to the problem of mismatch between the frequency of the main controller and the fiber optic gyroscope, characterized in that, include: Step 1: Determine the sampling frequency of the main controller by the frequency at which the FPGA triggers the DSP interrupt; Step 2: Calculate the length of the transmitted data based on the data update frequency of the fiber optic gyroscope as an external sensor and the modulation rate of the data signal to the carrier wave. Step 3: If the length of the transmitted data is greater than the buffer of the main controller, or if the main controller fails to sample and obtain all the data of the fiber optic gyroscope within one cycle, then it is determined that there is a mismatch between the sampling frequency of the main controller and the data update frequency of the fiber optic gyroscope. Step 4: Based on the matching anomaly, determine the cause of the matching anomaly; and based on whether the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope can be changed, determine a solution to the matching anomaly.
2. The solution to the mismatch between the main controller and the fiber optic gyroscope frequency as described in claim 1, characterized in that, In step 3, if the length of the transmitted data is greater than the buffer of the main controller, the cause of the matching anomaly is determined to be that the sampling frequency of the main controller is lower than the frequency of the peripheral device.
3. The solution to the mismatch between the main controller and the fiber optic gyroscope frequency as described in claim 1, characterized in that, In step 3, if the main controller fails to sample all the data of the fiber optic gyroscope within one cycle, the cause of the matching anomaly is determined to be that the clock of the main controller and the clock of the fiber optic gyroscope are not the same reference.
4. The solution to the mismatch between the main controller and the fiber optic gyroscope frequency as described in claim 2 or 3, characterized in that, If the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope can be changed, the matching anomaly can be resolved by reducing the data update rate of the fiber optic gyroscope or increasing the sampling period of the main controller. If the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope cannot be changed, the matching anomaly can be resolved by modifying the modulation rate of the data signal to the carrier.
5. The solution to the mismatch between the main controller and the fiber optic gyroscope frequency as described in claim 4, characterized in that, The process of communication between the main controller and the fiber optic gyroscope via a serial port chip in this method includes: when the main controller samples the data of the fiber optic gyroscope, it configures the same communication mode with the fiber optic gyroscope via the serial port chip, performs fault tolerance processing and angle transformation processing, and then sends the result to the main controller.
6. A device for resolving mismatch between the frequency of a main controller and a fiber optic gyroscope, characterized in that, include: The main controller sampling frequency determination module is used to determine the sampling frequency of the main controller based on the frequency at which the FPGA triggers the DSP interrupt. The data transmission length determination module is used to calculate the length of the transmitted data based on the data update frequency of the fiber optic gyroscope as an external sensor and the modulation rate of the data signal to the carrier wave. The matching anomaly determination module is used to determine that there is a matching anomaly between the sampling frequency of the main controller and the data update frequency of the fiber optic gyroscope if the length of the transmitted data is greater than the buffer of the main controller, or if the main controller fails to sample and obtain all the data of the fiber optic gyroscope within one cycle. The matching anomaly resolution module is used to determine the cause of the matching anomaly based on the matching anomaly, and to determine a solution to the matching anomaly based on whether the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope can be changed.
7. The apparatus for resolving mismatch between the main controller and the fiber optic gyroscope frequency as described in claim 6, characterized in that, In the matching anomaly determination module, if the length of the transmitted data is greater than the buffer of the main controller, the cause of the matching anomaly is determined to be that the sampling frequency of the main controller is lower than the frequency of the peripheral device.
8. The apparatus for resolving mismatch between the main controller and the fiber optic gyroscope frequency as described in claim 6, characterized in that, In the matching anomaly determination module, if the main controller fails to sample and obtain all the data of the fiber optic gyroscope within one cycle, the cause of the matching anomaly is determined to be that the clock of the main controller and the clock of the fiber optic gyroscope are not the same reference.
9. The apparatus for resolving mismatch between the main controller and the fiber optic gyroscope frequency as described in claim 7 or 8, characterized in that, If the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope can be changed, the matching anomaly can be resolved by reducing the data update rate of the fiber optic gyroscope or increasing the sampling period of the main controller. If the sampling frequency of the main controller or the data update frequency of the fiber optic gyroscope cannot be changed, the matching anomaly can be resolved by modifying the modulation rate of the data signal to the carrier.
10. The apparatus for resolving mismatch between the main controller and the fiber optic gyroscope frequency as described in claim 9, characterized in that, The process of communication between the main controller and the fiber optic gyroscope via a serial port chip includes: when the main controller samples the data of the fiber optic gyroscope, it configures the same communication mode with the fiber optic gyroscope via the serial port chip, performs fault tolerance processing and angle transformation processing, and then sends the result to the main controller.