Disclosure of Invention
The invention aims to provide a fault monitoring method of an MEMS inertial instrument for a micro-electromechanical inertial measurement device, which ensures that a superior system can timely monitor the working state of the inertial instrument and rapidly respond to an abnormal state in real time and can ensure that the acquisition period of inertial data is not influenced.
In order to achieve the purpose of the invention, the MEMS inertial instrument fault monitoring method for the micro-electromechanical inertial measurement device provided by the invention adopts the following technical scheme:
The MEMS inertial instrument adopts SPI interface and has complete communication protocol of physical layer and application layer, the method comprises physical layer communication, application layer communication, inertial instrument self-checking, inertial instrument data validity monitoring,
The physical layer communication monitoring refers to judging a ready state word to be sent and received when data is sent and received, setting timeout time, and setting the monitoring state word if timeout happens;
The application layer communication monitoring refers to judging data ready state marks, inertia instrument IDs, temperatures and output pulse data contained in an application layer communication protocol, and setting a monitoring state word if the data are not ready or the data are incorrect;
the self-checking and monitoring of the inertial instrument is to judge the starting time and the data range of the inertial instrument, and set a monitoring state word if the starting time and the data range are overtime or out of range;
The data validity monitoring of the inertia instrument is to judge the validity of the output data of the inertia instrument, set a monitoring state word if the data is invalid, and ensure that the output of the inertia information is normal when a single instrument fails.
Furthermore, the physical layer communication monitoring sets the overtime time according to the SPI interface bus frequency of the processor and the acquisition period of the data, and the setting principle is that the time which is far smaller than the acquisition period is taken as the upper limit, and the time which is longer than the time for transmitting one byte is taken as the lower limit according to the SPI interface communication frequency.
Further, the application layer communication monitoring method comprises the following steps:
After receiving a frame of data from the bottom interface, firstly analyzing the status bit ready bit of the inertial instrument, if the status bit is not ready, setting an abnormal status word of the instrument data, and entering the next acquisition period, if the status bit is ready, analyzing the ID, the output pulse and the temperature data of the inertial instrument, firstly judging the ID, if the ID is wrong, setting the abnormal status word of the instrument ID, discarding the current packet data, replacing the current packet data by the data of the previous period, judging the range of the temperature, namely respectively judging the value range of each path of temperature signal, and if the value range requirement is not met by a certain path of temperature signal, reporting the path of temperature as a fault word.
Further, the method for monitoring the data validity of the inertial instrument comprises the following steps:
recording the data of the previous period, comparing the data with the previous beat of data after the current beat of data is acquired, replacing the data of the inertial instrument by the data of the previous period if the continuous 3 beats of data values are consistent, and setting the status word.
The method can be applied to a micro-electromechanical inertial measurement device or an inertial navigation system, and the method ensures that the upper system can timely monitor the working state of an inertial instrument and rapidly respond to the abnormal state in real time, and can ensure that the acquisition period of inertial data is not influenced, thereby ensuring the real-time effectiveness of inertial measurement information such as the position, the speed and the like of a carrier and ensuring the data acquisition and navigation precision of the inertial system.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the application, its application, or uses. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The MEMS inertial instrument adopts an SPI interface, has complete communication protocols of a physical layer and an application layer, obtains real-time effective data information of the inertial instrument through omnibearing state monitoring such as physical layer communication, application layer communication, inertial instrument self-checking, validity judgment of output data of the inertial instrument and the like, and obtains motion information such as acceleration, angular velocity, gesture, position, speed and the like of a measured carrier through error compensation and integration.
The invention provides a MEMS inertial instrument fault monitoring method for a micro-electromechanical inertial measurement device, which comprises the steps of physical layer communication, application layer communication, inertial instrument self-checking and inertial instrument data validity monitoring, as shown in figure 1.
The physical layer communication monitoring refers to judging a ready state word to be sent and received when data is sent and received, setting timeout time, and setting the monitoring state word if timeout happens;
The application layer communication monitoring refers to judging data ready state marks, inertia instrument IDs, temperatures and output pulse data contained in an application layer communication protocol, ensuring that the data of each acquisition period are received normally, and setting a monitoring state word if the data are not ready or the data are incorrect;
the self-checking monitoring of the inertial instrument is to judge the starting time and the data range of the inertial instrument, ensure the requirement of the carrier on the starting time, and set a monitoring state word if the starting time is overtime or exceeds the range;
the data validity monitoring of the inertia instrument is to judge the validity of output data of the inertia instrument, set a monitoring state word if the data is invalid, and give a solving strategy when a single instrument fails to ensure that the output of the inertia information is normal in a short time.
In an embodiment of the present invention, the physical layer communication monitoring method includes:
The inertial instrument adopts SPI interface communication, the data transmission adopts byte transmission, the idle state of the SPI interface is judged before the instruction is transmitted, the transmitting register is empty to transmit the data, otherwise, the overtime judgment waiting time is set, the state judgment is timely exited after overtime, the monitoring state word is set, when the SPI interface data is received, the received data mark of the SPI interface is judged, the data is read after the data ready mark is read, otherwise, the overtime judgment waiting time is set, the state judgment is timely exited after overtime, and the monitoring state word is set. The overtime time is set according to the SPI interface bus frequency of the processor and the data acquisition period, and the setting principle is that the time which is far smaller than the acquisition period is taken as an upper limit, and the time which is longer than the time for transmitting one byte is taken as a lower limit according to the SPI interface communication frequency.
In an example, in the physical layer SPI interface data transmission and reception flow chart shown in fig. 2, when data is transmitted and received, a ready status word for transmission and reception needs to be determined, and a timeout period is set, and here, an example is a singlechip STM32F767 of an artificial semiconductor, the main frequency of the processor 216mhz is adopted, the transmission and reception timeout period of the SPI interface is set to 200 times, the timeout period after test is 3us, the number of bytes of each MEMS inertial device per period is 14, and the total timeout period is 126us. The data acquisition period is 1ms, the SPI interface communication frequency is 6.75MHz, the normal sending time of each byte is 1.18us, the overtime time is adjusted according to the data acquisition period and the SPI interface communication frequency, the time which is far smaller than the acquisition period is the upper limit, and the time which is longer than the sending time of one byte is the lower limit according to the SPI interface communication frequency.
In an embodiment of the present invention, the application layer communication monitoring method includes:
In the inertial meter application layer data flow diagram shown in fig. 3, the data frame protocol is shown in tables 1 and 2. After receiving a frame of data from the bottom layer interface, firstly analyzing, judging the ready bit of the status bit of the inertial instrument, if the status bit is not ready, setting an abnormal status word of the instrument data, and entering the next acquisition period. If the status bit is ready, analyzing the ID, output pulse and temperature data of the inertial instrument, and judging the data because the SPI interface application layer data is not verified, firstly judging the ID, if the ID is wrong, setting an instrument ID abnormal status word, discarding the current packet data, replacing the current packet data by the last period data, and judging the range of the temperature, wherein the judging method comprises the steps of respectively judging the value range of each path of temperature signal, and reporting the path of temperature as a fault word if the value range requirement is not met by a certain path of temperature signal, wherein the value range judging condition is as follows:
-65°≤tij≤125°i=1,2,...,6;j=1,2,...,n (1)
In the formula, t ij is the j temperature signal recorded in the self-checking stage of the i-th temperature sensor;
n is the number of temperature signals recorded by one path of temperature sensor in the self-checking stage.
Table 1 inertial instrument data frame protocol (gyro)
| Name of the name |
Content |
| ID |
CHIP_ID1 |
| ID |
CHIP_ID2 |
| Status ready bit |
(bit5)data_ready |
| Temperature data |
TEMP_OUT[7:0] |
| Temperature data |
TEMP_OUT[15:8] |
| Outputting pulse data |
GYRO_OUT[7:0] |
| Outputting pulse data |
GYRO_OUT[15:8] |
| Outputting pulse data |
GYRO_OUT[23:16] |
Table 2 inertial Meter data frame protocol (accelerometer)
| Name of the name |
Content |
| ID |
CHIP_ID1 |
| ID |
CHIP_ID2 |
| Status ready bit |
data_ready |
| Temperature data |
TEMP_OUT[7:0] |
| Temperature data |
TEMP_OUT[15:8] |
| Outputting pulse data |
ACC_OUT[7:0] |
| Outputting pulse data |
ACC_OUT[15:8] |
| Outputting pulse data |
ACC_OUT[23:16] |
In an embodiment of the present invention, the self-checking and monitoring method for an inertial meter includes:
In the inertial instrument self-checking flow chart shown in fig. 4, after the system is electrified and standby for 2s, the output self-checking of the gyroscope and the accelerometer is started, and the detection time is T self_check =1.5 s. Gyro and accelerometer detection includes timeout self-detection and range detection, if gyro output continues to be 0 within 1.5s (time can be adjusted according to user needs), gyro output timeout is set. The range detection method and the criteria are shown in formulas (2) and (3).
Wherein Ax, ay, az, gx, gy, gz is the acceleration and angular velocity of the average value of the pulse number output by the accelerometer and the gyroscope in N continuous data acquisition periods after calibration error compensation, g is the gravity acceleration. If the detection is abnormal, reporting that the gyro is abnormal or the angle disturbance is large, reporting that the accelerometer is abnormal or the line disturbance is excessive, and setting the self-checking state word abnormal. Taking a self-checking period of 2s as an example, when the data acquisition period is 1ms, N can be 500-2000.
In an embodiment of the present invention, the method for monitoring the data validity of the inertial meter includes:
In the data validity flow chart of the inertial meter shown in fig. 5, the data of the previous period is recorded (num=0), after the data of the previous period is collected, the data of the inertial meter is compared with the data of the previous period, if the data values of the continuous 3 beats (num=3) are consistent, the data of the inertial meter is replaced by the data of num=0, and the status word is set. When abnormal faults occur to the carrier in a short time, normal attitude data output can be ensured.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention, and not for limiting the same, and although the present invention has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of the embodiments of the present invention.