A wearable MEMS inertial sensor calibration method and device
By obtaining the measured values of the MEMS inertial sensor in a stationary state, establishing a local search space, dynamically determining the target calibration value set, and performing real-time calibration before the next motion state, the calibration value drift of the wearable MEMS inertial sensor during motion is solved. Problem, improving output accuracy.
Patent Information
- Application Number
- CN202311861523.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2043-12-29
AI Technical Summary
During the movement of the wearable MEMS inertial sensor, due to temperature changes and strain of the flexible material, the calibration values such as zero deviation and scale factor drift, thereby reducing the output accuracy.
By obtaining the measured values of the gyroscope and accelerometer in the rest state before and after the motion state, a local search space is established, and based on the heading angle difference of the magnetometer heading angle and the different calibration value sets, the target calibration value set is dynamically determined, and Real-time calibration is performed before the next motion state.
It effectively solves the problem of calibration value drift during movement of MEMS inertial sensor, improves output accuracy, and adapts to different motion states through dynamic calibration, continuously improving the overall accuracy of the sensor.
Smart Images

Figure CN117848324B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of MEMS sensors, and in particular to a wearable MEMS inertial sensor calibration method and device. Background Art
[0002] Micro-Electro-Mechanical System (MEMS) has the advantages of small size, high performance and low power consumption. With the continuous development of technology, MEMS inertial sensors are gradually widely used in daily life. For example, wearable MEMS inertial sensors are used to measure the user's posture, movement speed and distance, and further realize inertial navigation. MEMS inertial sensors include gyroscopes, accelerometers and magnetometers, which can measure the angular velocity and linear acceleration of an object in real time. By analyzing the angular velocity and linear acceleration, the motion state information of the object can be further obtained.
[0003] In the prior art, a set of calibration values, such as zero bias and scale factor, can be measured before the MEMS inertial sensor leaves the factory, so that the measured value can be corrected based on the calibration value during subsequent use. However, in wearable application scenarios, due to temperature changes or strain of flexible materials, calibration values such as zero bias and scale factor continue to drift, resulting in low output accuracy of MEMS inertial sensors. Summary of the invention
[0004] The present invention provides a wearable MEMS inertial sensor calibration method and device to solve the problem of calibration value drift of the wearable MEMS inertial sensor during movement, resulting in low output accuracy.
[0005] In a first aspect, the present invention provides a wearable MEMS inertial sensor calibration method, wherein the inertial sensor includes a gyroscope, an accelerometer and a magnetometer. The method includes: in a static state before a motion state, obtaining an initial calibration value set of the gyroscope and the accelerometer. In the motion state, obtaining the measurement values of the gyroscope and the accelerometer at each moment, and in a static state after the motion state, obtaining a first heading angle measured by the magnetometer in the static state. A local search space is established based on the initial calibration value and its adjacent values. The local search space includes a plurality of calibration value sets. For each of the calibration value sets, the measurement value is compensated and resolved to obtain a second heading angle in the static state after the motion state. According to each of the second heading angles and the first heading angle measured by the magnetometer in the static state, a target calibration value set is determined, and the target calibration value set is used as the initial calibration value set of the gyroscope and the accelerometer in the static state before the next motion state, and in the next motion state, the step of obtaining the measurement values of the gyroscope and the accelerometer at each moment is re-executed.
[0006] In a possible implementation, determining the target calibration value set according to each of the second heading angles and the first heading angle measured by the magnetometer in a stationary state includes: comparing each of the second heading angles with the first heading angle measured by the magnetometer in a stationary state, and determining, from each of the second heading angles, the second heading angle with the smallest difference from the first heading angle. The calibration value set corresponding to the second heading angle with the smallest difference is used as the target calibration value set.
[0007] In a possible implementation, after determining the second heading angle with the smallest difference from the first heading angle, it also includes: judging whether the difference between the first heading angle and the second heading angle with the smallest difference is greater than a preset threshold. When the difference between the first heading angle and the second heading angle with the smallest difference is greater than the preset threshold, based on a genetic algorithm, the adjacent values of the initial calibration value are adjusted to obtain an updated local search space. For each set of calibration values in the updated local search space, the steps of compensating and resolving the measured values to obtain the second heading angle in the static state after the moving state are re-executed until the difference between the first heading angle and the second heading angle with the smallest difference is not greater than the preset threshold.
[0008] In a possible implementation, after obtaining the measurement values of the gyroscope and the accelerometer at each moment in the motion state, the method further includes: in the motion state, compensating the measurement values of the gyroscope and the accelerometer at each moment based on the initial calibration value set to obtain the compensated output values of the gyroscope and the accelerometer at each moment. Calculating based on the compensated output values of the gyroscope and the accelerometer at each moment to obtain real-time attitude angle, distance and speed information.
[0009] In a possible implementation, after determining the second heading angle with the smallest difference from the first heading angle, the method further includes: based on the calibration value set corresponding to the second heading angle with the smallest difference, compensating the measured values of the gyroscope and the accelerometer at each moment in the previous motion state to obtain the compensated output values of the gyroscope and the accelerometer at each moment. Calculating based on the compensated output values of the gyroscope and the accelerometer at each moment to obtain the attitude angle and position of the current static state.
[0010] In a possible implementation, the initial calibration value set includes zero bias and scaling factors of each axis of the gyroscope and accelerometer.
[0011] In a second aspect, the present invention provides a wearable MEMS inertial sensor calibration device, wherein the inertial sensor includes a gyroscope, an accelerometer and a magnetometer. The device includes:
[0012] The first acquisition module is used to acquire an initial calibration value set of the gyroscope and the accelerometer in a static state before a moving state.
[0013] The second acquisition module is used to acquire the measurement values of the gyroscope and the accelerometer at each moment in the motion state, and to acquire the first heading angle measured by the magnetometer in the static state in the static state after the motion state.
[0014] The establishing module is used to establish a local search space based on the initial calibration value and its adjacent values. The local search space includes a plurality of calibration value sets.
[0015] The compensation and resolution module is used to compensate and resolve the measurement value for each calibration value set to obtain a second heading angle in a static state after the motion state.
[0016] A determination module is used to determine a target calibration value set based on each of the second heading angles and the first heading angle measured by the magnetometer in a stationary state, and use the target calibration value set as an initial calibration value set of the gyroscope and accelerometer in a stationary state before the next motion state. In the next motion state, the module returns to the second acquisition module to re-execute the step of acquiring the measurement values of the gyroscope and accelerometer at each moment.
[0017] In a possible implementation, the determination module is specifically configured to compare each of the second heading angles with a first heading angle measured by a magnetometer in a stationary state, and determine, from among the second heading angles, a second heading angle having the smallest difference from the first heading angle, and use a calibration value set corresponding to the second heading angle having the smallest difference as the target calibration value set.
[0018] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements the steps of the method described in the first aspect or any possible implementation manner of the first aspect.
[0019] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect or any possible implementation of the first aspect are implemented.
[0020] The present invention provides a wearable MEMS inertial sensor calibration method and device. The present invention establishes a local search space containing different calibration value sets, and can determine the calibration value set with the highest accuracy in the previous motion state based on the difference between the heading angle of the magnetometer and the heading angle corresponding to different calibration value sets in a stationary state, and calibrate the next motion state with this calibration value with the highest accuracy. The present invention dynamically determines the calibration values of the gyroscope and the accelerometer during the motion process, and performs real-time calibration before each motion state, thereby improving the output accuracy of the wearable MEMS inertial sensor during the motion process. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 is an application scenario diagram of a wearable MEMS inertial sensor calibration method provided by an embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of the structure of a wearable MEMS inertial sensor provided by an embodiment of the present invention;
[0024] Figure 3 is a flow chart of an implementation method of a wearable MEMS inertial sensor calibration method provided by an embodiment of the present invention;
[0025] Figure 4 is a structural schematic diagram of a wearable MEMS inertial sensor calibration device provided by an embodiment of the present invention;
[0026] Figure 5 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0028] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0029] Figure 1This is an application scenario diagram of the wearable MEMS inertial sensor calibration method provided by an embodiment of the present invention. Figure 1 As shown, users can use the above wearable MEMS inertial sensors in daily life to record motion status. Users can also use wearable MEMS inertial sensors for inertial navigation in special scenarios. The specific wearable application scenarios are not limited.
[0030] Here we need to explain the characteristics of user movement. During the movement, people will repeatedly remain still and move, and the duration of the still or moving state is uncertain. For example, they walk forward a few steps and stop, then turn left and walk forward a few steps, and then return the same way.
[0031] Figure 2 : is a flow chart of the implementation of the wearable MEMS inertial sensor calibration method provided by an embodiment of the present invention. Figure 2 , wearable MEMS inertial sensors may include gyroscopes, accelerometers, and magnetometers.
[0032] Exemplarily, the gyroscope, accelerometer and magnetometer are three-axis gyroscope, three-axis accelerometer and three-axis magnetometer respectively, that is, the wearable MEMS inertial sensor has nine axes in total.
[0033] Exemplarily, the gyroscope, accelerometer and magnetometer are fabricated on the same silicon wafer.
[0034] Wearable MEMS inertial sensors are usually made of flexible materials. The use of flexible materials here causes the external motion to produce greater deformation on the flexible material, thereby producing greater stress on the sensitive structure, that is, the inertial sensor itself is susceptible to deformation during use. At the same time, it is not easy to dissipate heat during wearing and is easily affected by the user's temperature. For example, different postures, accelerations, and positions correspond to different motion states, and the stress magnitude and direction of the inertial sensor are also different, resulting in drift of zero bias and scale factor.
[0035] After the inertial sensor is calibrated in the prior art, a set of standard compensation parameters, namely calibration values, are obtained for testing. In the wearable application scenario of this solution, the flexible materials used cause the drift of zero bias and scale factor to be more obvious, which in turn leads to low output accuracy of MEMS inertial sensors.
[0036] The present invention provides a wearable MEMS inertial sensor calibration method, which dynamically determines the calibration values of a gyroscope and an accelerometer during motion and performs real-time calibration before each motion state, so as to solve the problem of calibration value drift of the wearable MEMS inertial sensor during motion, resulting in low output accuracy.
[0037] Figure 3is a flow chart of the implementation of the wearable MEMS inertial sensor calibration method provided by an embodiment of the present invention, referring to Figure 3 , the inertial sensor includes a gyroscope, an accelerometer and a magnetometer. The above method includes:
[0038] In step 201, in a static state before a moving state, an initial calibration value set of a gyroscope and an accelerometer is obtained.
[0039] For example, when a user uses a wearable MEMS inertial sensor, the inertial sensor moves with the user. The motion state of the inertial sensor can reflect the motion state of the user. For ease of description, the following motion state is the motion state of the inertial sensor.
[0040] Exemplarily, before the motion state, the inertial sensor is in a stationary state, which may be the stationary state after the inertial sensor is powered on. Further exemplary, the obtained initial calibration value may be a calibration value determined by the inertial sensor before leaving the factory, such as an initial zero bias and an initial scale factor.
[0041] Exemplarily, the static state before the motion state may also be a static state in the static-motion cycle. Further exemplarily, the obtained initial calibration value may be a calibration value determined based on the data of the previous motion state, for example, the target calibration value set obtained in the subsequent steps may be used as the initial calibration value set of the next motion state.
[0042] Exemplarily, the initial calibration value set includes multiple calibration values.
[0043] In a possible implementation, the initial calibration value set includes zero bias and scale factors of each axis of the gyroscope and the accelerometer.
[0044] For example, the initial calibration value set may include the X-axis bias, Y-axis bias, and Z-axis bias of the gyroscope, and the X-axis bias, Y-axis bias, and Z-axis bias of the accelerometer.
[0045] For another example, the initial calibration value set may further include an X-axis scale factor, a Y-axis scale factor, and a Z-axis scale factor of the gyroscope, and an X-axis scale factor, a Y-axis scale factor, and a Z-axis scale factor of the accelerometer.
[0046] Exemplarily, the initial position, initial orientation and initial velocity may also be acquired before the motion state, so as to obtain real-time motion state information based on the measured values at each moment in the motion state.
[0047] In step 202, in the moving state, the measurement values of the gyroscope and the accelerometer at each moment are obtained, and in the static state after the moving state, the first heading angle measured by the magnetometer in the static state is obtained.
[0048] It should be noted that, no matter in a stationary state or in a moving state, the gyroscope and accelerometer can perform real-time measurement at every moment and continuously output measurement signals.
[0049] In some embodiments, the measurement values of the gyroscope and the accelerometer at each moment in the motion state can be obtained during the motion state. Further, the real-time motion state can be obtained by performing a calculation based on the real-time measurement values.
[0050] Furthermore, in some embodiments, whether the inertial sensor is in a stationary state may be monitored based on the measurement values of the gyroscope and the accelerometer at each moment in the motion state.
[0051] In another embodiment, the measurement values of the gyroscope and the accelerometer at each moment in the moving state can be obtained in the static state after the moving state. Further, the subsequent steps are performed in the static state based on the measurement values of the moving state.
[0052] In some embodiments, a first heading angle measured by a magnetometer in a stationary state is acquired.
[0053] When in a stationary state, the magnetometer can obtain the current heading angle of the inertial sensor based on the three-axis magnetic components.
[0054] In step 203, a local search space is established based on the initial calibration value and its neighboring values. The local search space includes multiple calibration value sets.
[0055] The initial calibration value set includes multiple initial calibration values. Accordingly, in some embodiments, a local search space is established based on each initial calibration value and its adjacent values.
[0056] Local search is to search in the neighborhood of the current point to determine the optimal solution. In genetic algorithms, the local search space can be a population composed of individuals. For example, for each initial calibration value, a value is determined in the initial calibration value or one of its adjacent values to form an individual, that is, a calibration value set. Multiple individuals form a population, which is the local search space. Therefore, a local search space can include multiple calibration value sets.
[0057] In some embodiments, for each initial calibration value in the initial calibration value set, a value is randomly selected from the initial calibration value and a plurality of adjacent values thereof to form a calibration value set.
[0058] Exemplarily, the adjacent values of the initial calibration value can be determined based on a preset rule. For example, a portion of the initial calibration value can be increased as the upper limit of the value, and a portion of the initial calibration value can be reduced as the lower limit of the value, that is, the search range can be between the upper limit and the lower limit and the search optimization can be performed.
[0059] For another example, the adjacent values may be 98%, 99%, 101%, and 102% of the initial calibration value.
[0060] In step 204, for each calibration value set, the measured value is compensated and resolved to obtain a second heading angle in a static state after a moving state.
[0061] The measurement value is the measurement value of the gyroscope and accelerometer at each moment in the motion state. One of the calibration value sets is used to compensate the measurement value at each moment to obtain the compensated measurement value. Then, based on the compensated measurement value at each moment, the second heading angle in the static state at the end of the motion moment is calculated. By selecting the calibration value sets in sequence, multiple second heading angles can be obtained, and each calibration value set corresponds to a second heading angle.
[0062] In step 205, a target calibration value set is determined based on each second heading angle and the first heading angle measured by the magnetometer in a stationary state, and the target calibration value set is used as an initial calibration value set of the gyroscope and accelerometer in a stationary state before the next motion state. In the next motion state, the step of obtaining the measurement values of the gyroscope and accelerometer at each moment is re-executed.
[0063] In a possible implementation, determining the target calibration value set according to each second heading angle and the first heading angle measured by the magnetometer in a stationary state includes: obtaining the difference between each second heading angle and the first heading angle according to each second heading angle and the first heading angle measured by the magnetometer in a stationary state. Determine the calibration value set corresponding to the second heading angle whose difference is less than a threshold as the target calibration value set.
[0064] Exemplarily, if there are multiple second heading angles whose differences are smaller than a threshold, a calibration value set corresponding to any one of the second heading angles may be determined as a target calibration value set.
[0065] In a possible implementation, a target calibration value set is determined according to each second heading angle and a first heading angle measured by a magnetometer in a stationary state, including: comparing each second heading angle with the first heading angle measured by the magnetometer in a stationary state, and determining, from each second heading angle, a second heading angle having the smallest difference from the first heading angle. The calibration value set corresponding to the second heading angle having the smallest difference is used as the target calibration value set.
[0066] In some embodiments, after determining the target calibration value set, the target calibration value set is used as the initial calibration value set to perform steps 201 to 205. That is, the target calibration value set is used as the initial calibration value set of the gyroscope and the accelerometer in the static state before the next motion state, and in the next motion state, the step of obtaining the measurement values of the gyroscope and the accelerometer at each moment is re-performed.
[0067] The embodiment of the present invention establishes a local search space containing different calibration value sets, and can determine the calibration value set with the highest accuracy in the previous motion state based on the difference between the magnetometer heading angle and the heading angle corresponding to different calibration value sets in a stationary state, and calibrate the next motion state with this calibration value with the highest accuracy. The present invention dynamically determines the calibration values of the gyroscope and accelerometer during motion, and performs real-time calibration before each motion state, thereby improving the output accuracy of the wearable MEMS inertial sensor during motion.
[0068] In the embodiment of the present invention, a screening calibration operation is performed through a magnetometer in a static state between different actions to obtain an optimal zero bias and a scale factor suitable for the previous action, thereby continuously improving the overall accuracy of the sensor.
[0069] In a possible implementation, after step 205, the method further includes: obtaining an average ambient temperature in the motion state. Based on the average ambient temperature and the target calibration value set, a corresponding relationship between the ambient temperature and the target calibration value set is determined.
[0070] Correspondingly, after step 203, based on the correspondence between the ambient temperature and the target calibration value set, the target calibration value set corresponding to the current ambient temperature is determined, and the target calibration value set is incorporated into the local search space.
[0071] The embodiment of the present invention takes the calibration value set with greater temperature correlation in the historical records as one of the calibration value sets in the local search space, takes the temperature influence factor into consideration, and gives priority to the calibration value set with the best historical matching degree, thereby reducing the local search time and improving the efficiency of dynamically determining the target calibration value set in step 205.
[0072] In a possible implementation manner, after determining the second heading angle having the smallest difference from the first heading angle, the method further includes:
[0073] In step 301, it is determined whether the difference between the first heading angle and the second heading angle with the smallest difference is greater than a preset threshold.
[0074] In step 302, when the difference between the first heading angle and the second heading angle with the smallest difference is greater than a preset threshold, each adjacent value of the initial calibration value is adjusted based on a genetic algorithm to obtain an updated local search space.
[0075] Exemplarily, based on a genetic algorithm, adjacent values of the initial calibration value are reselected, crossed over, and mutated to obtain an updated local search space.
[0076] In step 303, for each calibration value set in the updated local search space, the steps of compensating and resolving the measured values to obtain the second heading angle in the static state after the moving state are re-executed, until the difference between the first heading angle and the second heading angle with the smallest difference is no greater than a preset threshold.
[0077] Exemplarily, the objective function of the genetic algorithm is the error between the second heading angle calculated by the gyroscope and accelerometer and the first heading angle calculated by the magnetometer:
[0078] f(ψ)=min(ψ ga -ψ m )
[0079] Where: ga ——The angular value calculated by the gyroscope and accelerometer. m ——The heading angle value calculated by the magnetometer.
[0080] In the solution process, the smaller the value of f(ψ), the better the solution effect and the higher the accuracy. Therefore, when screening, the smaller the value of f(ψ), the higher the probability of being retained and used as the parent. The fitness function can be defined as follows:
[0081]
[0082] In some embodiments, the wearable MEMS inertial sensor further includes a Bluetooth unit. The Bluetooth unit is used to communicate with the receiver. Before step 301, the method further includes: obtaining the relative position between the Bluetooth unit and the receiver. The positioning accuracy is determined based on the relative position. Accordingly, in step 301, it can also be determined whether the current positioning accuracy meets the preset requirements.
[0083] In a possible implementation, in the motion state, after obtaining the measurement values of the gyroscope and the accelerometer at each moment, the method further includes:
[0084] In step 401, in the motion state, the measured values of the gyroscope and the accelerometer at each moment are compensated based on the initial calibration value set to obtain the compensated output values of the gyroscope and the accelerometer at each moment.
[0085] In step 402, calculations are performed based on the compensated output values of the gyroscope and accelerometer at each moment to obtain real-time attitude angle, distance and speed information.
[0086] It should be noted that, in the motion state, real-time motion state information can be obtained at each moment based on the measurement values before the current moment.
[0087] In a possible implementation manner, after determining the second heading angle having the smallest difference from the first heading angle, the method further includes:
[0088] In step 501, based on the calibration value set corresponding to the second heading angle with the smallest difference, the measurement values of the gyroscope and the accelerometer at each moment in the previous motion state are compensated to obtain the compensated output values of the gyroscope and the accelerometer at each moment.
[0089] In step 502, the attitude angle and position of the current static state are obtained by performing calculations based on the compensated output values of the gyroscope and accelerometer at each moment.
[0090] The embodiment of the present invention improves the accuracy of the determined motion state information by recalculating the posture angle and position of the previous motion state based on a dynamically determined calibration value set.
[0091] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0092] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.
[0093] Figure 4 : is a schematic diagram of the structure of a wearable MEMS inertial sensor calibration device provided by an embodiment of the present invention. For the sake of convenience, only the parts related to the embodiment of the present invention are shown, which are described in detail as follows:
[0094] Reference Figure 4 The inertial sensor includes a gyroscope, an accelerometer and a magnetometer. The wearable MEMS inertial sensor calibration device 4 includes:
[0095] The first acquisition module 41 is used to acquire an initial calibration value set of the gyroscope and the accelerometer in a static state before a moving state.
[0096] The second acquisition module 42 is used to acquire the measurement values of the gyroscope and the accelerometer at each moment in the moving state, and to acquire the first heading angle measured by the magnetometer in the static state in the static state after the moving state.
[0097] The establishing module 43 is used to establish a local search space based on the initial calibration value and its adjacent values. The local search space includes multiple calibration value sets.
[0098] The compensation and solving module 44 is used to compensate and solve the measured values for each calibration value set to obtain a second heading angle in a static state after a moving state.
[0099] The determination module 45 is used to determine a target calibration value set based on each second heading angle and the first heading angle measured by the magnetometer in a stationary state, and use the target calibration value set as the initial calibration value set of the gyroscope and accelerometer in a stationary state before the next motion state. In the next motion state, the module returns to the second acquisition module 42 to re-execute the step of acquiring the measurement values of the gyroscope and accelerometer at each moment.
[0100] The embodiment of the present invention dynamically determines the calibration values of the gyroscope and the accelerometer during the motion process and performs real-time calibration before each motion state, thereby improving the output accuracy of the wearable MEMS inertial sensor during the motion process.
[0101] In a possible implementation, the determination module is specifically configured to compare each second heading angle with the first heading angle measured by the magnetometer in a stationary state, and determine, from among the second heading angles, a second heading angle having the smallest difference from the first heading angle, and use a calibration value set corresponding to the second heading angle having the smallest difference as a target calibration value set.
[0102] In a possible implementation, after the determination module, an adjustment module is also included: the adjustment module is used to determine whether the difference between the first heading angle and the second heading angle with the smallest difference is greater than a preset threshold. When the difference between the first heading angle and the second heading angle with the smallest difference is greater than the preset threshold, based on the genetic algorithm, each adjacent value of the initial calibration value is adjusted to obtain an updated local search space. For each calibration value set in the updated local search space, the steps of compensating and resolving the measured value to obtain the second heading angle in the static state after the moving state are re-executed until the difference between the first heading angle and the second heading angle with the smallest difference is not greater than the preset threshold.
[0103] In a possible implementation, after the second acquisition module, it further includes: a real-time solution module, which is used to compensate the measured values of the gyroscope and accelerometer at each moment based on the initial calibration value set in the motion state to obtain the compensated output values of the gyroscope and accelerometer at each moment. The solution is performed based on the compensated output values of the gyroscope and accelerometer at each moment to obtain real-time attitude angle, distance and speed information.
[0104] In a possible implementation, after determining the second heading angle with the smallest difference from the first heading angle, the method further includes: based on the calibration value set corresponding to the second heading angle with the smallest difference, compensating the measured values of the gyroscope and the accelerometer at each moment in the previous motion state to obtain the compensated output values of the gyroscope and the accelerometer at each moment. Calculating based on the compensated output values of the gyroscope and the accelerometer at each moment to obtain the attitude angle and position of the current static state.
[0105] In a possible implementation, the initial calibration value set includes zero bias and scale factors of each axis of the gyroscope and the accelerometer.
[0106] Figure 5 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50. When the processor 50 executes the computer program 52, the steps in the above-mentioned wearable MEMS inertial sensor calibration method embodiments are implemented, for example Figure 3 Alternatively, when the processor 50 executes the computer program 52, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 4 The functions of the modules 41 to 45 are shown.
[0107] Exemplarily, the computer program 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 52 in the electronic device 5. For example, the computer program 52 may be divided into Figure 4 Modules 41 to 45 are shown.
[0108] The electronic device 5 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of the electronic device 5 and does not constitute a limitation of the electronic device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0109] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0110] The memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. The memory 51 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. Further, the memory 51 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the electronic device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
[0111] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0112] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0113] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0114] In the embodiments provided by the present invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0115] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0117] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned wearable MEMS inertial sensor calibration method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium.
[0118] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A wearable MEMS inertial sensor calibration method, characterized in that: The inertial sensor includes a gyroscope, an accelerometer and a magnetometer; the method includes: In a static state before a moving state, obtaining an initial calibration value set of a gyroscope and an accelerometer, wherein the initial calibration value set includes a plurality of initial calibration values; In the motion state, obtaining measurement values of the gyroscope and the accelerometer at each moment, and in a static state after the motion state, obtaining a first heading angle measured by the magnetometer in the static state; Based on the initial calibration value and its adjacent values, a local search space is established; the local search space includes a plurality of calibration value sets; wherein, for each initial calibration value in the initial calibration value set, a value is randomly selected from the initial calibration value and its plurality of adjacent values to form a calibration value set; For each of the calibration value sets, the measurement value is compensated and resolved to obtain a second heading angle in a static state after the motion state; Compare each of the second heading angles with the first heading angle measured by the magnetometer in a static state, and determine the second heading angle with the smallest difference from the first heading angle from each of the second heading angles; use the calibration value set corresponding to the second heading angle with the smallest difference as the target calibration value set, and use the target calibration value set as the initial calibration value set of the gyroscope and accelerometer in a static state before the next motion state; in the next motion state, re-execute the step of obtaining the measurement values of the gyroscope and accelerometer at each moment.
2. The wearable MEMS inertial sensor calibration method according to claim 1, characterized in that: After determining the second heading angle with the smallest difference from the first heading angle, the method further includes: Determine whether a difference between the first heading angle and a second heading angle with the smallest difference is greater than a preset threshold; When the difference between the first heading angle and the second heading angle with the smallest difference is greater than the preset threshold, adjusting each adjacent value of the initial calibration value based on a genetic algorithm to obtain an updated local search space; For each calibration value set in the updated local search space, the steps of compensating and resolving the measured values to obtain the second heading angle in the static state after the motion state are re-executed until the difference between the first heading angle and the second heading angle with the smallest difference is no greater than the preset threshold.
3. The wearable MEMS inertial sensor calibration method according to any one of claims 1 to 2, characterized in that: In the motion state, after obtaining the measurement values of the gyroscope and the accelerometer at each moment, the method further includes: In the motion state, the measured values of the gyroscope and the accelerometer at each moment are compensated based on the initial calibration value set to obtain the compensated output values of the gyroscope and the accelerometer at each moment; The real-time attitude angle, distance and speed information are obtained based on the compensated output values of the gyroscope and accelerometer at each moment.
4. The wearable MEMS inertial sensor calibration method according to claim 1 or 2, characterized in that: After determining the second heading angle with the smallest difference from the first heading angle, the method further includes: Based on the calibration value set corresponding to the second heading angle with the smallest difference, the measurement values of the gyroscope and the accelerometer at each moment in the previous motion state are compensated to obtain the compensated output values of the gyroscope and the accelerometer at each moment; The compensated output values of the gyroscope and accelerometer at each moment are calculated to obtain the attitude angle and position of the current static state.
5. The wearable MEMS inertial sensor calibration method according to claim 1, characterized in that: The initial calibration value set includes zero bias and scale factor of each axis of the gyroscope and accelerometer.
6. A wearable MEMS inertial sensor calibration device, characterized in that: The inertial sensor includes a gyroscope, an accelerometer and a magnetometer; the device includes: A first acquisition module is used to acquire an initial calibration value set of the gyroscope and the accelerometer in a static state before a motion state, wherein the initial calibration value set includes a plurality of initial calibration values; A second acquisition module is used to acquire the measurement values of the gyroscope and the accelerometer at each moment in the motion state, and to acquire the first heading angle measured by the magnetometer in the static state in the static state after the motion state; An establishing module is used to establish a local search space based on the initial calibration value and its adjacent values; the local search space includes a plurality of calibration value sets; wherein, for each initial calibration value in the initial calibration value set, a value is randomly selected from the initial calibration value and its plurality of adjacent values to form a calibration value set; A compensation and solving module, used for compensating and solving the measurement value for each calibration value set, to obtain a second heading angle in a static state after the motion state; A determination module is used to compare each of the second heading angles with the first heading angle measured by the magnetometer in a static state, and determine, from each of the second heading angles, the second heading angle with the smallest difference from the first heading angle; use the calibration value set corresponding to the second heading angle with the smallest difference as a target calibration value set, and use the target calibration value set as an initial calibration value set of the gyroscope and accelerometer in a static state before the next motion state; in the next motion state, return to the second acquisition module to re-execute the step of acquiring the measurement values of the gyroscope and accelerometer at each moment.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the wearable MEMS inertial sensor calibration method as described in any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the wearable MEMS inertial sensor calibration method as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
MEMS pedestrian navigation method based on ZIHR heading angle correction algorithm
CN108426574A
Navigation information processing method, computer storage medium and terminal
CN116625404A