A calibration method, apparatus, equipment, and medium for a device.
By collecting inertial sensor data and calculating calibration parameters on a simple platform, the problems of high cost and long time consumption in inertial sensor calibration are solved, realizing an efficient calibration method and improving the calibration accuracy and efficiency of the equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2022-02-08
- Publication Date
- 2026-05-26
AI Technical Summary
Existing inertial sensor calibration methods are costly and time-consuming, requiring high-precision turntables and strict tooling requirements, making it difficult to efficiently calibrate accelerometers and gyroscopes.
By collecting inertial sensor data, calculating based on accelerometer and gyroscope data, calibration parameters are obtained respectively, and the current inertial sensor data is calibrated using a simple platform.
It reduces calibration time and costs while ensuring calibration accuracy and data processing efficiency, thus improving the calibration efficiency of the equipment.
Smart Images

Figure CN116608881B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a calibration method, apparatus, device, and medium for a device. Background Technology
[0002] As the performance and reliability of inertial sensors continue to improve, they are being used in drones, mobile robots, and virtual reality devices. Typically, inertial sensors need to be calibrated before they can be used.
[0003] In related technologies, the six-sided method of calibrating inertial sensors using a turntable is employed. This method requires high precision of the turntable and is costly. It also requires placing the inertial sensor on six orthogonal planes, which places strict requirements on the tooling. Furthermore, calibrating the accelerometer and gyroscope separately takes a relatively long time. Summary of the Invention
[0004] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides a calibration method, apparatus, equipment and medium for a device.
[0005] This disclosure provides a device calibration method, the method comprising:
[0006] Collect inertial sensor data from the equipment;
[0007] Accelerometer calibration parameters are obtained by calculating based on the accelerometer data in the inertial sensor data;
[0008] The gyroscope calibration parameters are obtained by calculating based on the gyroscope data in the inertial sensor data.
[0009] The current inertial sensor data collected by the device is calibrated based on the accelerometer calibration parameters and the gyroscope calibration parameters.
[0010] This disclosure also provides a device calibration apparatus, the apparatus comprising:
[0011] The data acquisition module is used to acquire data from the device's inertial sensors.
[0012] The first calibration parameter calculation module is used to calculate the accelerometer calibration parameters based on the accelerometer data in the inertial sensor data.
[0013] The second calibration parameter calculation module is used to calculate the gyroscope calibration parameters based on the gyroscope data in the inertial sensor data.
[0014] The calibration module is used to calibrate the current inertial sensor data collected by the device based on the accelerometer calibration parameters and the gyroscope calibration parameters, respectively.
[0015] This disclosure also provides an electronic device, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the device calibration method provided in this disclosure.
[0016] This disclosure also provides a computer-readable storage medium storing a computer program for performing a calibration method for a device as provided in this disclosure.
[0017] Compared with the prior art, the technical solution provided in this disclosure has the following advantages: The calibration scheme of the device in this disclosure collects inertial sensor data of the device, calculates accelerometer calibration parameters based on accelerometer data in the inertial sensor data, calculates gyroscope calibration parameters based on gyroscope data in the inertial sensor data, and calibrates the current inertial sensor data collected by the device based on the accelerometer calibration parameters and gyroscope calibration parameters respectively. Therefore, by combining accelerometer and gyroscope calibration, calibration time is reduced and device calibration efficiency is improved. Furthermore, the inertial sensor data used to calculate calibration parameters can be obtained based on a simple platform design, reducing costs while ensuring calibration accuracy and improving data processing efficiency. Attached Figure Description
[0018] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0019] Figure 1 A schematic flowchart illustrating a device calibration method provided in an embodiment of this disclosure;
[0020] Figure 2 A schematic flowchart illustrating another device calibration method provided in this embodiment of the disclosure;
[0021] Figure 3 A schematic diagram of the structure of a platform provided in an embodiment of this disclosure;
[0022] Figure 4 This is a schematic diagram of the structure of a calibration device for an equipment provided in an embodiment of this disclosure;
[0023] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0024] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0025] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0026] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0027] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0028] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0029] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0030] Figure 1 This is a flowchart illustrating a device calibration method provided in an embodiment of the present disclosure. The method can be executed by a device calibration apparatus, which can be implemented using software and / or hardware, and is generally integrated into an electronic device. Figure 1 As shown, the method includes:
[0031] Step 101: Collect inertial sensor data from the device.
[0032] The device can be any calibration platform or calibration device including inertial sensors. This disclosure does not specifically limit the device; for example, it can be a virtual reality device or a drone. The initial calibration state refers to the state when the device is on a horizontal plane.
[0033] The inertial sensors include accelerometers and gyroscopes, and the inertial sensor data includes accelerometer data and gyroscope data.
[0034] In this disclosure, there are many ways to collect inertial sensor data of the device. In some implementations, the inertial sensor data of the device is collected within a preset time period during the initial calibration state. The preset time period can be selected and set according to the actual application needs, such as 1 second, 2 seconds, etc.
[0035] In other embodiments, the distance between the outer sliding track of the platform and the device remains constant. The inner sliding track of the platform controls the device to rotate from the initial calibration state around the central axis and return to the initial calibration state. First static inertial sensor data of the duration of the device being stationary at each position point and first motion inertial sensor data between adjacent position points are collected. The distance between the inner sliding track of the platform and the device remains constant. The outer sliding track of the platform controls the device to rotate from the initial calibration state around the central axis and return to the initial calibration state. Second static inertial sensor data of the duration of the device being stationary at each position point and second motion inertial sensor data between adjacent position points are collected. The first static inertial sensor data, the first motion inertial sensor data, the second static inertial sensor data, and the second motion inertial sensor data constitute the inertial sensor data of the device.
[0036] The platform can be any pre-built fixture capable of fixing the equipment as a calibration platform. In this embodiment, it refers to a tooling structure consisting of an inner sliding rail, an outer sliding rail, a device clamp, an inner connecting rod, and an outer connecting rod. The number of inner and outer connecting rods is set according to the actual application scenario, such as 8 inner connecting rods and 2 outer connecting rods. The device clamp is used to hold the equipment. The platform's power drive can be one of pneumatic control, motor control, or robotic arm control, requiring only free rotation around the central axis of the inner and outer sliding rails. Power drive enables the movement of the equipment, allowing it to assume various postures.
[0037] Step 102: Calculate the accelerometer calibration parameters based on the accelerometer data from the inertial sensor data.
[0038] In this embodiment of the disclosure, accelerometer data is extracted from inertial sensor data. Accelerometer data refers to acceleration values along three directional axes, including timestamps.
[0039] Among them, the accelerometer calibration parameters refer to the parameters that can calibrate the original accelerometer data. That is, the accelerometer data obtained by calculating with the original accelerometer data using the calibration parameters will be more accurate when used in subsequent processing scenarios instead of the original accelerometer data.
[0040] In one specific implementation, the acceleration value at each position point is determined based on accelerometer data. The preset acceleration matrix and the first zero-bias matrix are solved based on the acceleration value at each position point to obtain the target acceleration matrix and the target first zero-bias matrix. The rotation matrix is obtained. The rotation matrix and the target acceleration matrix are calculated to obtain the calibration acceleration matrix. The target first zero-bias matrix and the calibration acceleration matrix are used as accelerometer calibration parameters.
[0041] Step 103: Calculate the gyroscope calibration parameters based on the gyroscope data in the inertial sensor data.
[0042] In this embodiment of the disclosure, gyroscope data is extracted from inertial sensor data. Here, gyroscope data refers to angular velocity values including timestamps.
[0043] Among them, the gyroscope calibration parameter refers to the parameter that can calibrate the original gyroscope data. That is, the gyroscope data obtained by calculating with the gyroscope calibration parameter and the original gyroscope data will be more accurate when used in subsequent processing scenarios instead of the original gyroscope data.
[0044] In one specific implementation, an initial angular velocity value is determined based on gyroscope data; gyroscope data corresponding to any two position points is extracted from the gyroscope data and calculated to obtain the angle difference between the two position points; a preset angular velocity matrix is solved based on the angle difference between the two position points to obtain the target angular velocity matrix; a rotation matrix is obtained; the rotation matrix and the target angular velocity matrix are calculated to obtain the calibration angular velocity matrix; and the second zero-bias matrix constructed from the initial angular velocity value and the calibration angular velocity matrix are used as gyroscope calibration parameters.
[0045] Step 104: Calibrate the current inertial sensor data collected by the device based on the accelerometer calibration parameters and the gyroscope calibration parameters.
[0046] The inertial sensors include accelerometers and gyroscopes, and the current inertial sensor data includes the current accelerometer data and the current gyroscope data.
[0047] In one specific embodiment, the current accelerometer data and current gyroscope data from the current inertial sensor data are obtained. The current accelerometer data is subtracted from the zero-bias parameter of the zero-bias matrix in the accelerometer calibration parameters to obtain the acceleration difference value. The acceleration difference value is multiplied with the calibration acceleration matrix in the accelerometer calibration parameters to obtain the calibrated accelerometer data. The current gyroscope data is subtracted from the zero-bias parameter of the zero-bias matrix in the gyroscope calibration parameters to obtain the angular velocity difference value. The angular velocity difference value is multiplied with the calibration angular velocity matrix in the gyroscope calibration parameters to obtain the calibrated gyroscope data.
[0048] In summary, the device calibration scheme of this disclosure, by controlling the device in the initial calibration state based on a pre-built platform, collects inertial sensor data, calculates accelerometer calibration parameters based on accelerometer data from the inertial sensor data, calculates gyroscope calibration parameters based on gyroscope data from the inertial sensor data, and calibrates the currently collected inertial sensor data based on the accelerometer and gyroscope calibration parameters respectively. Therefore, by combining accelerometer and gyroscope calibration, calibration time is reduced and device calibration efficiency is improved. Furthermore, the inertial sensor data used to calculate calibration parameters can be obtained based on a simple platform design, reducing costs while ensuring calibration accuracy and improving data processing efficiency.
[0049] In some embodiments, the device acquires accelerometer data at each location point in a stationary state based on inertial sensor data, determines the target acceleration value at each location point based on the accelerometer data at each location point, calibrates the target acceleration value based on accelerometer calibration parameters to obtain the calibration acceleration at each location point, and verifies the calibration acceleration based on the magnitude of the calibration acceleration and a preset gravity value to generate a first verification result.
[0050] The static state refers to the device being stationary, i.e., not moving. The target duration can be set according to the application scenario, such as 1 second, 2 seconds, etc.
[0051] The accelerometer data for each location point can be one or more. When there are multiple accelerometer data points, an average calculation is required to obtain the average acceleration value for each location point in order to further improve the accuracy of subsequent calculations.
[0052] Specifically, the number of location points can be selected and set according to the application scenario. For example, all n accelerometer data points within 1 second at location point i, and the j-th accelerometer data point j... The average target acceleration at each location point is calculated as shown in formula (1):
[0053]
[0054] Where i, j, and n are positive integers.
[0055] Specifically, the average target acceleration at each location point The calibrated modulus should all be equal to the preset gravity value (the gravity under Earth's gravity is 9.8), as shown in formula (2):
[0056]
[0057] in, B represents the calibrated accelerometer reading at position i. acc R represents a zero-partial matrix. acc This represents the calibration acceleration matrix. It is the L2 norm of the vector, also known as its modulus.
[0058] Specifically, a verification is performed based on the magnitude of the calibrated acceleration and a preset gravity value to generate a first verification result. That is, if the difference between the magnitude of the calibrated acceleration and the preset gravity value is less than or equal to a preset difference threshold, the first verification result is considered successful. If the difference between the magnitude of the calibrated acceleration and the preset gravity value is greater than the preset difference threshold, the first verification result is considered unsuccessful, and the collected accelerometer data and accelerometer calibration parameters need to be recalculated and confirmed to improve the accuracy of subsequent calibrations. The difference threshold can be selected and set according to the application scenario.
[0059] In some embodiments, multiple verification location points are determined from all location points, and the acceleration value and calibration acceleration of each verification location point are obtained. An error is calculated based on the acceleration value and gravity value of each verification location point to obtain a first acceleration error value. An error is calculated based on the calibration acceleration and gravity value of each verification location point to obtain a second acceleration error value. The product of the first acceleration error value and a preset first value is compared with the second acceleration error value to generate a second verification result.
[0060] In some embodiments, a horizontal position point is determined from all position points, and the calibration acceleration of the horizontal position point is obtained. An error is calculated based on the calibration acceleration and gravity value of the horizontal position point to obtain a third acceleration error value. The third acceleration error value is compared with a preset second value to generate a third verification result.
[0061] The accelerometer data corresponding to the verification position point and the horizontal position point can be one or more. When there are multiple data points, an average calculation is required to obtain the average acceleration value corresponding to the verification position point and the horizontal position point in order to further improve the accuracy of subsequent calculations.
[0062] Specifically, the magnitude of the calibrated acceleration in each direction should be equal to the value of gravity, and the acceleration value at the horizontal position should be equal to (9.8, 0, 0). To this end, the first and second acceleration error values are further calculated to verify the magnitude, and the third and fourth acceleration error values are used to verify the horizontality.
[0063] Specifically, and These are the corrected acceleration value and the original value, respectively, and i represents the i-th position point.
[0064] Specifically, multiple calibration points can be selected according to application needs. For example, all the calibration points are A1-A10 and B1-8, with A1 and B1 coinciding and A5 and B5 coinciding. Four points not on the gravity axis are selected from the 16 points as A4, A9, B3 and B7 as calibration points to verify the performance of the calibration accuracy in the modulus.
[0065] Specifically, the calculation method for the first acceleration error value is shown in formula (3):
[0066]
[0067] in, This represents the first acceleration error value.
[0068] Specifically, the calculation method for the second acceleration error value is shown in formula (4):
[0069]
[0070] Specifically, a second verification result is generated by comparing the first acceleration error value multiplied by a preset first value with a second acceleration error value. In other words, if the result of multiplying the first acceleration error value by the preset first value is greater than the second acceleration error value (i.e., the ratio of the second acceleration error value to the first acceleration error value is less than the first value), the verification passes. If the result of multiplying the first acceleration error value by the preset first value is less than or equal to the second acceleration error value, the verification fails, and the collected accelerometer data and calibration parameters need to be recalculated and confirmed to improve the accuracy of subsequent calibrations. The first value is between 0 and 1 and can be selected according to the application scenario; for example, the first value could be 0.8.
[0071] Furthermore, it is necessary to verify the horizontality. Continuing with the example above, we select horizontal position points A1 and A6 for calculation and verification. The calculation method for the third acceleration error value is shown in formula (5):
[0072]
[0073] in, This represents the third acceleration error value.
[0074] Specifically, a third verification result is generated by comparing the third acceleration error value with a preset second value. That is, if the third acceleration error value is less than the second value, the verification passes; if the third acceleration error value is greater than or equal to the second value, the verification fails, and the collected accelerometer data and calibration parameters need to be recalculated and confirmed to improve the accuracy of subsequent calibrations. The second value is between 0 and 1 and can be selected according to the application scenario; for example, the first value could be 0.2.
[0075] The above solution can verify the calibrated accelerometer data by combining the original accelerometer data in multiple ways, ensuring calibration accuracy, further guaranteeing the accuracy of the calibration, improving the reliability of the equipment, and enhancing the user experience.
[0076] In some embodiments, based on inertial sensor data, all gyroscope data between any two positions of the device in motion is acquired. The target angle difference between any two positions is calculated based on all gyroscope data. Based on gyroscope calibration parameters, all gyroscope data between any two positions is calibrated to obtain calibrated gyroscope data between any two positions. The calibrated angle difference between any two positions is calculated based on the calibrated gyroscope data. An error calculation is performed based on all target angle differences between any two positions to obtain a first angle error value. An error calculation is performed based on all calibrated angle differences between any two positions to obtain a second angle error value. The first angle error value is multiplied by a preset third value and compared with the second angular velocity error value to generate a fourth verification result.
[0077] Specifically, the number of position points can be selected and set according to the application scenario. When calculating the gyroscope calibration data, the difference between adjacent points is used. During verification, a check can be performed with an interval of one position point. Taking all position points as A1-A10 and B1-8, with A1 and B1 coinciding and A5 and B5 coinciding, as an example, from the 16 position points, determine a total of 7 segments: A1-A3=A6-A8, A2-A4=A7-A9, A3-A5=A8-A10, A4-A6=A9-A1, B1-B3=B5-B7, B2-B4=B6-B8, and B3-B5=B7-B1. Accumulate the total error and determine whether the error has decreased.
[0078] Specifically, taking position point A1-A3=A6-A8 as an example, the calculation method of the first angular velocity error value is as shown in formula (6):
[0079]
[0080] in, GYRO represents the first angular velocity error value. i This represents the data from the i-th gyroscope. This represents the gyroscope integral of A1-A3. This indicates that the integral calculation is performed on all gyroscope data at positions A1-A3.
[0081] Specifically, taking position point A1-A3=A6-A8 as an example, the calculation method for the second angular velocity error value is shown in formula (7):
[0082]
[0083] Among them, R′ gryo B represents the calibration angular velocity matrix. gryo GYRO represents a zero-biased matrix. i This represents the data from the i-th gyroscope. This indicates that the integral calculation is performed on all calibrated gyroscope data at position points A1-A3.
[0084] It should be noted that any two location points can be selected and set according to application needs. Usually, the two location points selected for calibration and verification are different to further improve the accuracy of verification, and when performing error calculation, two pairs of location points are selected as symmetrical location points.
[0085] Specifically, the fourth verification result is generated by comparing the first angular velocity multiplied by a preset third value with the second angular velocity error value. In other words, if the result of multiplying the first angular velocity error value by the preset third value is greater than the second angular velocity error value (i.e., the ratio of the second angular velocity error value to the first angular velocity error value is less than the third value), the verification passes. If the result of multiplying the first angular velocity error value by the preset third value is less than or equal to the second angular velocity error value, the verification fails, and the collected gyroscope data and gyroscope calibration parameters need to be recalculated and confirmed to improve the accuracy of subsequent calibrations. The third value is between 0 and 1 and can be selected according to the application scenario; for example, the first value could be 0.3.
[0086] In some embodiments, the device acquires all gyroscope data at each position point in a stationary state based on inertial sensor data, calibrates all gyroscope data at each position point based on gyroscope calibration parameters to obtain calibrated gyroscope data at each position point, calculates errors based on the calibrated gyroscope data to obtain a third angle error value, and compares the third angle error value with a preset fourth value to generate a fifth verification result.
[0087] Specifically, the static state refers to the device being stationary, that is, not moving. The target duration can be set according to the application scenario, such as 1 second, 2 seconds, etc.
[0088] Specifically, the system can also verify gyroscope data at various points in a stationary state by comparing the third angle error value with a preset fourth value to generate a fifth verification result. In other words, if the difference between the third angle error value and the fourth value is less than or equal to a preset difference threshold, the verification passes; if the difference is greater than the preset difference threshold, the verification fails, requiring recalculation and confirmation of the collected gyroscope data and calibration parameters to improve the accuracy of subsequent calibrations. The fourth value can be set according to the application scenario, for example, to 0, and the difference threshold can also be set according to the application scenario.
[0089] The above solution can verify the calibrated gyroscope data by combining the original gyroscope data, ensuring calibration accuracy, further guaranteeing the accuracy of the calibration, improving the reliability of the equipment, and enhancing the user experience.
[0090] Figure 2 This is a flowchart illustrating another device calibration method provided in this embodiment of the present disclosure. This embodiment further optimizes the above-described device calibration method based on the previous embodiment. Figure 2 As shown, the method includes:
[0091] Step 201: The distance between the outer sliding track of the platform and the device remains unchanged. The inner sliding track of the platform controls the device to rotate around the central axis from the initial calibration state and return to the initial calibration state. The first static inertial sensor data of the duration of the device being stationary at each position point and the first motion inertial sensor data between adjacent position points are collected.
[0092] Step 202: Based on the platform's inner sliding track and the device's position distance remaining unchanged, the platform's outer sliding track controls the device to rotate around the central axis from the initial calibration state and return to the initial calibration state. The second stationary inertial sensor data of the duration of the device's stationary target at each position point and the second motion inertial sensor data between adjacent position points are collected.
[0093] Step 203: The data from the first stationary inertial sensor, the data from the first moving inertial sensor, the data from the second stationary inertial sensor, and the data from the second moving inertial sensor constitute the inertial sensor data of the device.
[0094] For example, Figure 3This is a schematic diagram of a platform structure provided in an embodiment of the present disclosure. The diagram shows a platform structure consisting of an inner sliding rail A, an outer sliding rail B, a device clamp, eight inner connecting rods, and two outer connecting rods. The moving position of the inner sliding rail A is shown below. Figure 3 As shown in the square, the moving position of the outer sliding track B is as follows: Figure 3 As shown by the central circle, all points should be symmetrically distributed around the center of the circle; there are no special angle requirements.
[0095] The power drive can utilize pneumatic control, electric motor control, or robotic arm control, requiring only two degrees of freedom: rotation around the central axes of the inner sliding track A and the outer sliding track B. The power drive enables the mobile device to be positioned in 16 different postures, with A1 = B1 and A6 = B5 from the initial calibration posture. The initial calibration states A1 and B1 have levelness requirements to calibrate the device to align with the direction of gravity in the real world.
[0096] Specifically, in the initial calibration state (the inner sliding track A is in state A1, and the outer sliding track B is in state B1), all inertial sensor data are collected (for example, for a duration of 1 second).
[0097] Specifically, the outer sliding track B is fixed, and the inner sliding track A, carrying the equipment, rotates 360 degrees around the central axis of the ring and finally returns to state A1. At each position point, it pauses for 1 second, collecting inertial sensor data for all segmented motion and static processes. The inner sliding track A is kept in state A1, so that the relative positional relationship between the inner sliding track A and the equipment remains unchanged. The outer sliding track B starts from state B1, rotates the rigid body composed of the inner sliding track A and the equipment, rotates 360 degrees around the central axis of the outer sliding track B, and finally returns to state B1. At each position point, it pauses for 1 second, collecting inertial sensor data for all segmented motion and static processes.
[0098] Step 204: Calculate the acceleration value at each position point based on the inertial sensor data, and solve the preset acceleration matrix and the first zero-bias matrix based on the acceleration value at each position point to obtain the target acceleration matrix and the target first zero-bias matrix.
[0099] Step 205: Obtain the rotation matrix, calculate the rotation matrix and the target acceleration matrix to obtain the calibration acceleration matrix, and use the target first zero bias matrix and the calibration acceleration matrix as accelerometer calibration parameters.
[0100] The accelerometer data for each location point can be one or more. When there are multiple accelerometer data points, an average calculation is required to obtain the average acceleration value for each location point in order to further improve the accuracy of subsequent calculations.
[0101] Specifically, in the initial calibration state, record the accelerometer data within a static period of t seconds (t can be set as needed, for example, t=3), and calculate the average value ACC. A1 ACC A1 This refers to the average acceleration of the accelerometer at position point A1 in the three directions of the X-axis, Y-axis, and Z-axis.
[0102] Specifically, from all inertial sensor data, accelerometer data stationary in A2–A10 and B2–B8 are extracted, and their average values are calculated. Combined with the average data from A1, a total of 16 acceleration average values are obtained, denoted as ACC1–ACC2. 16 .
[0103] It should be noted that the calculation example disclosed herein is described using a fixed Z-axis, but the X-axis or Y-axis can also be fixed depending on the application scenario.
[0104] The preset acceleration matrix and the first zero-bias matrix can be selected and set according to the application scenario. This disclosure uses a fixed Z-axis as an example. The preset acceleration matrix and the first zero-bias matrix are as follows:
[0105]
[0106] Among them, the accelerometer's sensitivity (scale or sensitivity S) a1 S a2 S a3 ), axis offset (β) yz β xy β xz ) and zero bias (b accx b accy b accz ). Among them, S a1 S a2 and S a3 β represents the sensitivity / scale in the X, Y, and Z axes. xy β yz and β xz Indicates the axial offset between two axes, b accx b accy and b accz It indicates the zero bias in the three directions of X-axis, Y-axis and Z-axis.
[0107] It is understandable that the accelerometer reading is equal to gravity in any stationary posture, so the calibrated accelerometer data magnitude should be equal to the local gravity, assuming G = 9.8, as shown in formula (8):
[0108]
[0109] in, Let be the average acceleration at position i.
[0110] Specifically, the parameter S is solved based on a preset solution algorithm. a1 S a2 S a3 β xy β yz β xz b accx b accy and b accz For example, the residual is Solve this optimization problem using Gauss-Newton's method, using R′ acc_init =I 3×3 and As the initial value, the optimal solution is obtained; where R′ acc_init R′ acc The initial value of I 3×3 It is a 3×3 identity matrix. Repeated iterative optimization is performed until the residual is minimized, at which point the values of each parameter are determined, resulting in the target acceleration matrix and the target first zero-bias matrix.
[0111] Specifically, based on the accelerometer data at position point A1 The global coordinate system of the inertial sensor is calibrated to obtain the rotation matrix R for level correction. tilt .
[0112] Specifically, let the direction of gravity be... Will Normalization yields the unit direction vector Rotation matrix R tilt The calculations are shown in formulas (9)-(12):
[0113]
[0114]
[0115]
[0116]
[0117] in, Given a unit vector with a magnitude of 1, the accelerometer calibration parameter R is obtained. acc and B acc R acc =R tilt *R′ acc .
[0118] Step 206: Extract the corresponding gyroscope data between any two position points based on the gyroscope data and calculate the angle difference between the two position points. Solve the preset angular velocity matrix based on the angle difference between the two position points to obtain the target angular velocity matrix.
[0119] Step 207: Obtain the rotation matrix, calculate the rotation matrix and the target angular velocity matrix to obtain the calibration angular velocity matrix, and use the second zero-bias matrix constructed from the initial angular velocity values and the calibration angular velocity matrix as gyroscope calibration parameters.
[0120] The gyroscope data for each position point can be one or more. When there are multiple data points, an average calculation is required to obtain the average angular velocity of each position point in order to further improve the accuracy of subsequent calculations.
[0121] Specifically, for example, recording gyroscope data during a static period of t seconds in the initial calibration state, and calculating the average value GYRO init This refers to obtaining the zero bias B of the gyroscope by averaging the angular velocity over these t seconds. gyro =GYRO init .
[0122] The preset angular velocity matrix and the second zero-bias matrix can be selected and set according to the application scenario. This disclosure uses a fixed Z-axis as an example. The preset angular velocity matrix and the second zero-bias matrix are as follows:
[0123]
[0124] Among them, the gyroscope's sensitivity (scale or sensitivity S) g1 S g2 S g3 ), axis deviation (α) yz α yz α xz ) and zero bias (b gyrox b gryoy b gryoz ).
[0125] Specifically, by using gyroscope integration, the characteristics of the rotation angle can be calculated. When designing the tooling, the points are symmetrical about the center, that is, the interval angles are also symmetrical about the center. Therefore, the angular changes between the position points are: A1-A2=A6-A7, A2-A3=A7-A8, A3-A4=A8-A9, A4-A5=A9-A10, A5-A6=A10-A1, B1-B2=B5-B6, B2-B3=B6-B7, B3-B4=B7-B8, B4-B5=B8-B1, a total of 9 segments.
[0126] Specifically, for example, This represents the gyroscope integral of A1 to A2. The integrals of the gyroscopes A6 to A7 can be obtained by the following formula (13) based on the equal angle difference:
[0127]
[0128] Therefore, the residual is calculated as shown in formula (14):
[0129]
[0130] Furthermore, based on the preset solution calculation parameters S... g1 S g2 S g3 α yz α yz α xz For example, the residual of adding nine equations together is:
[0131] Make R′ gyro =R′ acc As initial values, the residual value is iterated multiple times until it reaches its minimum. Then, the values of each parameter are determined, and the target angular velocity matrix and the target second zero-bias matrix are obtained.
[0132] Specifically, the rotation matrix is obtained. For details on how to obtain the rotation matrix, please refer to the previous description, which will not be elaborated here.
[0133] Thus, the gyroscope calibration parameter R is obtained. gyro and B gyro R gyro =R tilt *R′ gryo .
[0134] Step 208: Obtain accelerometer data for each position point in a stationary state from the inertial sensor data, calculate the acceleration value for each position point, and calibrate the acceleration value for each position point based on the accelerometer calibration parameters to obtain the calibrated acceleration for each position point.
[0135] Step 209: Verify the calibrated acceleration modulus and preset gravity value at each location point. Based on the condition that the calibrated acceleration modulus and preset gravity value are equal, obtain the acceleration values and calibrated acceleration values at multiple verification location points for verification, and obtain the calibrated acceleration values at horizontal location points for horizontal verification, and generate verification results.
[0136] Step 210: Obtain gyroscope data at each position point of the device in a stationary state and gyroscope data between any two position points of the device in a moving state from the inertial sensor data, and perform calibration to obtain calibrated gyroscope data at each position point and calibrated gyroscope data between any two position points.
[0137] Step 211: Calculate the calibration angle of each position point based on the calibration gyroscope data of each position point, and calculate the calibration angle difference between any two position points based on the calibration gyroscope data between any two position points. Then, verify the calibration angle of each position point and the calibration angle difference between any two position points respectively to generate a verification result.
[0138] For the specific verification process of steps 208-211, please refer to the detailed description of the foregoing embodiments, which will not be elaborated here.
[0139] In summary, the calibration scheme of the device in this embodiment utilizes the characteristic that the measured value of the accelerometer is equal to the gravity in any stationary posture. Accelerometer acceleration data at multiple stationary positions is extracted, and accelerometer calibration parameters are calculated. This ensures that the magnitude of the accelerometer readings in all stationary states is equal to the local gravity value under the accelerometer calibration parameters. Furthermore, the rotation angle can be calculated using gyroscope integration. Gyroscope data moving between multiple stationary positions is collected, and gyroscope calibration parameters are calculated to minimize the deviation between the rotation angle and the set angle under the gyroscope calibration parameters. Additionally, all gyroscope data across two or more stationary positions and accelerometer readings at two stationary positions are used for verification. This new calibration principle reduces the requirements for motor rotational stability and accuracy, combines accelerometer and gyroscope calibration, reduces calibration time, increases equipment output per unit time, and provides a reliable basis for determining the qualification of calibration results by adding post-calibration data verification. Finally, the platform structure design is simple, further improving the diversity of calibration scenarios.
[0140] Figure 4 This is a schematic diagram of a calibration device for an embodiment of the present disclosure. The device can be implemented by software and / or hardware and is generally integrated into an electronic device. Figure 4 As shown, the device includes:
[0141] Acquisition module 301 is used to acquire data from the inertial sensors of the device;
[0142] The first calibration parameter calculation module 302 is used to calculate the accelerometer calibration parameters based on the accelerometer data in the inertial sensor data.
[0143] The second calibration parameter calculation module 303 is used to calculate the gyroscope calibration parameters based on the gyroscope data in the inertial sensor data.
[0144] The first calibration module 304 is used to calibrate the current inertial sensor data collected by the device based on the accelerometer calibration parameters and the gyroscope calibration parameters, respectively.
[0145] Optional, the acquisition module 301 is specifically used for:
[0146] The distance between the outer sliding track of the platform and the device remains constant. The inner sliding track of the platform controls the device to rotate around the central axis from the initial calibration state and return to the initial calibration state. The first static inertial sensor data of the duration of the device stationary at each position point and the first motion inertial sensor data between adjacent position points are collected.
[0147] The distance between the inner sliding track of the platform and the device remains constant. The outer sliding track of the platform controls the device to rotate around the central axis from the initial calibration state and return to the initial calibration state. The second static inertial sensor data of the duration of the device stationary at each position point and the second motion inertial sensor data between adjacent position points are collected.
[0148] The first stationary inertial sensor data, the first moving inertial sensor data, the second stationary inertial sensor data, and the second moving inertial sensor data constitute the inertial sensor data of the device.
[0149] Optionally, the device further includes:
[0150] The first acquisition module is used to acquire accelerometer data at each position point of the device in a stationary state based on the inertial sensor data;
[0151] The calculation module is used to determine the target acceleration value for each location point based on the accelerometer data at each location point;
[0152] The second calibration module is used to calibrate the target acceleration value based on the accelerometer calibration parameters to obtain the calibration acceleration at each position point;
[0153] The first verification module is used to perform verification based on the magnitude of the calibrated acceleration and the preset gravity value, and generate a first verification result.
[0154] Optionally, the device further includes:
[0155] The second acquisition module is used to determine multiple verification location points from all location points, and to acquire the acceleration value and calibration acceleration of each verification location point;
[0156] The first error calculation module is used to perform error calculation based on the acceleration value and the gravity value of each of the verification positions to obtain a first acceleration error value.
[0157] The second error calculation module is used to perform error calculation based on the calibration acceleration and the gravity value at each of the verification locations to obtain a second acceleration error value.
[0158] The second verification module is used to compare the first acceleration error value multiplied by a preset first value with the second acceleration error value to generate a second verification result.
[0159] Optionally, the device further includes:
[0160] The third acquisition module is used to determine the horizontal position point from all position points and acquire the calibration acceleration of the horizontal position point;
[0161] The third error calculation module is used to perform error calculation based on the calibration acceleration of the horizontal position point and the gravity value to obtain the third acceleration error value.
[0162] The third verification module is used to compare the third acceleration error value with a preset second value to generate a third verification result.
[0163] Optionally, the device further includes:
[0164] The fourth acquisition module is used to acquire gyroscope data between any two positions of the device in motion based on the inertial sensor data;
[0165] The integral calculation module is used to calculate the target angle difference between any two position points based on the gyroscope data between them.
[0166] The third calibration module is used to calibrate the gyroscope data between any two position points based on the gyroscope calibration parameters, obtain the calibrated gyroscope data between any two position points, and calculate the calibrated angle difference between any two position points based on the calibrated gyroscope data.
[0167] The fourth error calculation module is used to calculate the error based on the target angle difference between any two positions to obtain the first angle error value.
[0168] The fifth error calculation module is used to calculate the error based on the calibration angle difference between any two positions to obtain the second angle error value.
[0169] The fourth verification module is used to compare the first angle error value multiplied by a preset third value with the second angular velocity error value to generate a fourth verification result.
[0170] Optionally, the device further includes:
[0171] The fifth acquisition module is used to acquire gyroscope data at each position point of the device in a stationary state based on the inertial sensor data;
[0172] The fourth calibration module is used to calibrate the gyroscope data at each position point based on the gyroscope calibration parameters, so as to obtain the calibrated gyroscope data at each position point;
[0173] The sixth error calculation module is used to calculate the error based on the calibrated gyroscope data and obtain the third angle error value;
[0174] The fifth verification module is used to compare the third angle error value with the preset fourth value and generate a fifth verification result.
[0175] Optionally, the first calibration parameter calculation module 302 is specifically used for:
[0176] Determine the acceleration value at each location point based on accelerometer data;
[0177] Based on the acceleration value at each location point, the preset acceleration matrix and the first zero-bias matrix are solved to obtain the target acceleration matrix and the target first zero-bias matrix;
[0178] Obtain the rotation matrix, and calculate the calibration acceleration matrix by combining the rotation matrix and the target acceleration matrix.
[0179] The target first zero-bias matrix and the calibration acceleration matrix are used as the accelerometer calibration parameters.
[0180] Optionally, the second calibration parameter calculation module 303 is specifically used for:
[0181] Determine the initial angular velocity value based on the initial gyroscope data;
[0182] The angle difference between any two position points is obtained by extracting the gyroscope data corresponding to any two position points from the gyroscope data and performing calculations.
[0183] The target angular velocity matrix is obtained by solving the preset angular velocity matrix based on the angle difference between any two position points.
[0184] Obtain the rotation matrix, and calculate the calibration angular velocity matrix by combining the rotation matrix and the target angular velocity matrix.
[0185] The second zero-bias matrix constructed from the initial angular velocity value and the calibration angular velocity matrix are used as the calibration parameters of the gyroscope.
[0186] Optionally, the first calibration module 304 is specifically used for:
[0187] Obtain the current accelerometer data and current gyroscope data from the current inertial sensor data;
[0188] The difference between the current accelerometer data and the zero-bias parameter of the zero-bias matrix in the accelerometer calibration parameters is obtained by subtracting the current accelerometer data from the zero-bias parameter of the zero-bias matrix.
[0189] The acceleration difference is multiplied by the calibration acceleration matrix in the accelerometer calibration parameters to obtain the calibrated accelerometer data;
[0190] The difference between the current gyroscope data and the zero-bias parameter of the zero-bias matrix in the gyroscope calibration parameters is calculated to obtain the angular velocity difference value.
[0191] The angular velocity difference is multiplied by the calibration gyroscope matrix in the gyroscope calibration parameters to obtain the calibrated gyroscope data.
[0192] The calibration device provided in this disclosure can execute the calibration method of the device provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.
[0193] This disclosure also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the device calibration method provided in any embodiment of this disclosure.
[0194] Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of the present disclosure. See below for details. Figure 5 The diagram illustrates a structural schematic suitable for implementing the electronic device 400 in the embodiments of this disclosure. The electronic device 400 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0195] like Figure 5As shown, electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. RAM 403 also stores various programs and data required for the operation of electronic device 400. Processing device 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0196] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0197] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined in the device calibration method of embodiments of this disclosure.
[0198] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0199] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0200] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0201] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receive a user's information display trigger operation during video playback; acquire at least two target information items associated with the video; display a first target information item among the at least two target information items in an information display area on the video playback page, wherein the size of the information display area is smaller than the size of the playback page; and receive a user's first switching trigger operation to switch the first target information item displayed in the information display area to a second target information item among the at least two target information items.
[0202] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0203] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0204] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0205] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0206] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0207] According to one or more embodiments of this disclosure, this disclosure provides a device calibration method, including:
[0208] Collect inertial sensor data from the equipment;
[0209] Accelerometer calibration parameters are obtained by calculating based on the accelerometer data in the inertial sensor data;
[0210] The gyroscope calibration parameters are obtained by calculating based on the gyroscope data in the inertial sensor data.
[0211] The current inertial sensor data collected by the device is calibrated based on the accelerometer calibration parameters and the gyroscope calibration parameters.
[0212] According to one or more embodiments of this disclosure, in the device calibration method provided by this disclosure, the acquisition of inertial sensor data of the device includes:
[0213] The distance between the outer sliding track of the platform and the device remains constant. The inner sliding track of the platform controls the device to rotate around the central axis from the initial calibration state and return to the initial calibration state. The first static inertial sensor data of the duration of the device stationary at each position point and the first motion inertial sensor data between adjacent position points are collected.
[0214] The distance between the inner sliding track of the platform and the device remains constant. The outer sliding track of the platform controls the device to rotate around the central axis from the initial calibration state and return to the initial calibration state. The second static inertial sensor data of the duration of the device stationary at each position point and the second motion inertial sensor data between adjacent position points are collected.
[0215] The first stationary inertial sensor data, the first moving inertial sensor data, the second stationary inertial sensor data, and the second moving inertial sensor data constitute the inertial sensor data of the device.
[0216] According to one or more embodiments of this disclosure, the device calibration method provided in this disclosure further includes:
[0217] Based on the inertial sensor data, acquire the accelerometer data at each position point of the device in a stationary state;
[0218] The target acceleration value for each location point is determined based on the accelerometer data at each location point;
[0219] The target acceleration value is calibrated based on the accelerometer calibration parameters to obtain the calibrated acceleration at each position point;
[0220] The calibration acceleration modulus and the preset gravity value are used for verification to generate a first verification result.
[0221] According to one or more embodiments of this disclosure, the device calibration method provided in this disclosure further includes:
[0222] Multiple verification location points are determined from all location points, and the acceleration value and calibration acceleration of each verification location point are obtained;
[0223] Based on the acceleration value and gravity value at each of the verification locations, an error calculation is performed to obtain a first acceleration error value;
[0224] Based on the calibration acceleration and gravity value at each of the verification locations, an error calculation is performed to obtain a second acceleration error value;
[0225] The second verification result is generated by multiplying the first acceleration error value by a preset first value and comparing it with the second acceleration error value.
[0226] According to one or more embodiments of this disclosure, the device calibration method provided in this disclosure further includes:
[0227] Determine the horizontal position point from all position points and obtain the calibration acceleration of the horizontal position point;
[0228] Based on the calibrated acceleration at the horizontal position point and the gravity value, an error calculation is performed to obtain a third acceleration error value;
[0229] A third verification result is generated by comparing the third acceleration error value with a preset second value.
[0230] According to one or more embodiments of this disclosure, the device calibration method provided in this disclosure further includes:
[0231] Based on the inertial sensor data, acquire gyroscope data between any two positions of the device in motion;
[0232] The target angle difference between any two position points is calculated based on the gyroscope data between those two position points.
[0233] Based on the gyroscope calibration parameters, the gyroscope data between any two position points is calibrated to obtain calibrated gyroscope data between any two position points. Based on the calibrated gyroscope data, the calibrated angle difference between any two position points is calculated.
[0234] The first angle error value is obtained by calculating the target angle difference between any two locations.
[0235] The second angle error value is obtained by calculating the error based on the calibration angle difference between any two positions.
[0236] The fourth verification result is generated by multiplying the first angle error value by a preset third value and comparing it with the second angular velocity error value.
[0237] According to one or more embodiments of this disclosure, the device calibration method provided in this disclosure further includes:
[0238] Based on the inertial sensor data, acquire the gyroscope data at each position point of the device in a stationary state;
[0239] Based on the gyroscope calibration parameters, the gyroscope data at each position point is calibrated to obtain the calibrated gyroscope data at each position point;
[0240] The error value of the third angle is obtained by calculating the error based on the calibrated gyroscope data.
[0241] A fifth verification result is generated by comparing the third angle error value with a preset fourth value.
[0242] According to one or more embodiments of this disclosure, in the device calibration method provided by this disclosure, the step of calculating accelerometer calibration parameters based on accelerometer data in the inertial sensor data includes:
[0243] The acceleration value at each location point is determined based on the accelerometer data;
[0244] Based on the acceleration value at each location point, the preset acceleration matrix and the first zero-bias matrix are solved to obtain the target acceleration matrix and the target first zero-bias matrix;
[0245] Obtain the rotation matrix, and calculate the calibration acceleration matrix by combining the rotation matrix and the target acceleration matrix.
[0246] The target first zero-bias matrix and the calibration acceleration matrix are used as the accelerometer calibration parameters.
[0247] According to one or more embodiments of this disclosure, in the device calibration method provided by this disclosure, the step of calculating gyroscope calibration parameters based on target gyroscope data in the inertial sensor data includes:
[0248] The initial angular velocity value is determined based on the gyroscope data;
[0249] The angle difference between any two position points is obtained by extracting the gyroscope data corresponding to any two position points from the gyroscope data and performing calculations.
[0250] The target angular velocity matrix is obtained by solving the preset angular velocity matrix based on the angle difference between any two position points.
[0251] Obtain the rotation matrix, and calculate the calibration angular velocity matrix by combining the rotation matrix and the target angular velocity matrix.
[0252] The second zero-bias matrix constructed from the initial angular velocity value and the calibration angular velocity matrix are used as the calibration parameters of the gyroscope.
[0253] According to one or more embodiments of this disclosure, in the device calibration method provided by this disclosure, the step of calibrating the current inertial sensor data collected by the device based on the accelerometer calibration parameters and the gyroscope calibration parameters respectively includes:
[0254] Obtain the current accelerometer data and current gyroscope data from the current inertial sensor data;
[0255] The difference between the current accelerometer data and the zero-bias parameter of the zero-bias matrix in the accelerometer calibration parameters is obtained by subtracting the current accelerometer data from the zero-bias parameter of the zero-bias matrix.
[0256] The acceleration difference is multiplied by the calibration acceleration matrix in the accelerometer calibration parameters to obtain the calibrated accelerometer data;
[0257] The difference between the current gyroscope data and the zero-bias parameter of the zero-bias matrix in the gyroscope calibration parameters is calculated to obtain the angular velocity difference value.
[0258] The angular velocity difference is multiplied by the calibration gyroscope matrix in the gyroscope calibration parameters to obtain the calibrated gyroscope data.
[0259] According to one or more embodiments of this disclosure, this disclosure provides a device calibration apparatus, comprising:
[0260] The data acquisition module is used to acquire data from the device's inertial sensors.
[0261] The first calibration parameter calculation module is used to calculate the accelerometer calibration parameters based on the accelerometer data in the inertial sensor data.
[0262] The second calibration parameter calculation module is used to calculate the gyroscope calibration parameters based on the gyroscope data in the inertial sensor data.
[0263] The first calibration module is used to calibrate the current inertial sensor data collected by the device based on the accelerometer calibration parameters and the gyroscope calibration parameters, respectively.
[0264] According to one or more embodiments of this disclosure, in the calibration device of the device provided in this disclosure, the acquisition module is specifically used for:
[0265] The distance between the outer sliding track of the platform and the device remains constant. The inner sliding track of the platform controls the device to rotate around the central axis from the initial calibration state and return to the initial calibration state. The first static inertial sensor data of the duration of the device stationary at each position point and the first motion inertial sensor data between adjacent position points are collected.
[0266] The distance between the inner sliding track of the platform and the device remains constant. The outer sliding track of the platform controls the device to rotate around the central axis from the initial calibration state and return to the initial calibration state. The second static inertial sensor data of the duration of the device stationary at each position point and the second motion inertial sensor data between adjacent position points are collected.
[0267] The first stationary inertial sensor data, the first moving inertial sensor data, the second stationary inertial sensor data, and the second moving inertial sensor data constitute the inertial sensor data of the device.
[0268] According to one or more embodiments of this disclosure, the calibration apparatus for the device provided in this disclosure further includes:
[0269] The first acquisition module is used to acquire accelerometer data at each position point of the device in a stationary state based on inertial sensor data;
[0270] The calculation module is used to determine the target acceleration value for each location point based on the accelerometer data at each location point;
[0271] The second calibration module is used to calibrate the target acceleration value based on the accelerometer calibration parameters to obtain the calibration acceleration at each position point;
[0272] The first verification module is used to perform verification based on the magnitude of the calibrated acceleration and the preset gravity value, and generate a first verification result.
[0273] According to one or more embodiments of this disclosure, the calibration apparatus for the device provided in this disclosure further includes:
[0274] The second acquisition module is used to determine multiple verification location points from all location points, and to acquire the acceleration value and calibration acceleration of each verification location point;
[0275] The first error calculation module is used to perform error calculation based on the acceleration value and the gravity value of each of the verification positions to obtain a first acceleration error value.
[0276] The second error calculation module is used to perform error calculation based on the calibration acceleration and the gravity value at each of the verification locations to obtain a second acceleration error value.
[0277] The second verification module is used to compare the first acceleration error value multiplied by a preset first value with the second acceleration error value to generate a second verification result.
[0278] According to one or more embodiments of this disclosure, the calibration apparatus for the device provided in this disclosure further includes:
[0279] The third acquisition module is used to determine the horizontal position point from all position points and acquire the calibration acceleration of the horizontal position point;
[0280] The third error calculation module is used to perform error calculation based on the calibration acceleration of the horizontal position point and the gravity value to obtain the third acceleration error value.
[0281] The third verification module is used to compare the third acceleration error value with a preset second value to generate a third verification result.
[0282] According to one or more embodiments of this disclosure, the calibration apparatus for the device provided in this disclosure further includes:
[0283] The fourth acquisition module is used to acquire gyroscope data between any two positions of the device in motion based on the inertial sensor data;
[0284] The integral calculation module is used to calculate the target angle difference between any two position points based on the gyroscope data between them.
[0285] The third calibration module is used to calibrate the gyroscope data between any two position points based on the gyroscope calibration parameters, obtain the calibrated gyroscope data between any two position points, and calculate the calibrated angle difference between any two position points based on the calibrated gyroscope data.
[0286] The fourth error calculation module is used to calculate the error based on the target angle difference between any two positions to obtain the first angle error value.
[0287] The fifth error calculation module is used to calculate the error based on the calibration angle difference between any two positions to obtain the second angle error value.
[0288] The fourth verification module is used to compare the first angle error value multiplied by a preset third value with the second angular velocity error value to generate a fourth verification result.
[0289] According to one or more embodiments of this disclosure, the calibration apparatus for the device provided in this disclosure further includes:
[0290] The fifth acquisition module is used to acquire gyroscope data at each position point of the device in a stationary state based on the inertial sensor data;
[0291] The fourth calibration module is used to calibrate the gyroscope data at each position point based on the gyroscope calibration parameters, so as to obtain the calibrated gyroscope data at each position point;
[0292] The sixth error calculation module is used to calculate the error based on the calibrated gyroscope data and obtain the third angle error value;
[0293] The fifth verification module is used to compare the third angle error value with the preset fourth value and generate a fifth verification result.
[0294] According to one or more embodiments of this disclosure, in the calibration apparatus of the device provided by this disclosure, the first calibration parameter calculation module is specifically used for:
[0295] Determine the acceleration value at each location point based on accelerometer data;
[0296] Based on the acceleration value at each location point, the preset acceleration matrix and the first zero-bias matrix are solved to obtain the target acceleration matrix and the target first zero-bias matrix;
[0297] Obtain the rotation matrix, and calculate the calibration acceleration matrix by combining the rotation matrix and the target acceleration matrix.
[0298] The target first zero-bias matrix and the calibration acceleration matrix are used as the accelerometer calibration parameters.
[0299] According to one or more embodiments of this disclosure, in the calibration apparatus of the device provided by this disclosure, the second calibration parameter calculation module is specifically used for:
[0300] Determine the initial angular velocity value based on the initial gyroscope data;
[0301] Extract the gyroscope data corresponding to each position point from the gyroscope data, and calculate the angle difference between any two position points based on the gyroscope data corresponding to any two position points.
[0302] The target angular velocity matrix is obtained by solving the preset angular velocity matrix based on the angle difference between any two position points.
[0303] Obtain the rotation matrix, and calculate the calibration angular velocity matrix by combining the rotation matrix and the target angular velocity matrix.
[0304] The second zero-bias matrix constructed from the average initial angular velocity and the calibration angular velocity matrix are used as the calibration parameters of the gyroscope.
[0305] According to one or more embodiments of this disclosure, in the calibration apparatus for the device provided in this disclosure, the first calibration module is specifically used for:
[0306] Obtain the current accelerometer data and current gyroscope data from the current inertial sensor data;
[0307] The difference between the current accelerometer data and the zero-bias parameter of the zero-bias matrix in the accelerometer calibration parameters is obtained by subtracting the current accelerometer data from the zero-bias parameter of the zero-bias matrix.
[0308] The acceleration difference is multiplied by the calibration acceleration matrix in the accelerometer calibration parameters to obtain the calibrated accelerometer data;
[0309] The difference between the current gyroscope data and the zero-bias parameter of the zero-bias matrix in the gyroscope calibration parameters is calculated to obtain the angular velocity difference value.
[0310] The angular velocity difference is multiplied by the calibration gyroscope matrix in the gyroscope calibration parameters to obtain the calibrated gyroscope data.
[0311] According to one or more embodiments of this disclosure, this disclosure provides an electronic device, including:
[0312] processor;
[0313] Memory used to store the processor's executable instructions;
[0314] The processor is configured to read the executable instructions from the memory and execute the instructions to implement a device calibration method as provided in any of the present disclosure.
[0315] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium storing a computer program for performing a calibration method for any of the devices provided in the present disclosure.
[0316] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0317] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0318] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A calibration method for a device, characterized in that, include: Collect inertial sensor data from the equipment; Accelerometer calibration parameters are obtained by calculating based on the accelerometer data in the inertial sensor data; The gyroscope calibration parameters are calculated based on the gyroscope data in the inertial sensor data. This calculation includes: determining an initial angular velocity value based on the gyroscope data; extracting gyroscope data corresponding to any two position points from the gyroscope data and calculating the angle difference between these two position points; solving a preset angular velocity matrix based on the angle difference between the two position points to obtain a target angular velocity matrix; obtaining a rotation matrix; calculating a calibration angular velocity matrix using the rotation matrix and the target angular velocity matrix; and using a second zero-bias matrix constructed from the initial angular velocity value and the calibration angular velocity matrix as the gyroscope calibration parameters. The rotation matrix is obtained by calibrating the overall coordinate system of the inertial sensor based on the corrected angular velocity value corresponding to the gyroscope's position point in the initial calibration state. The current inertial sensor data collected by the device is calibrated based on the accelerometer calibration parameters and the gyroscope calibration parameters.
2. The calibration method for the device according to claim 1, characterized in that, The inertial sensor data of the acquisition device includes: The distance between the outer sliding track of the platform and the device remains constant. The inner sliding track of the platform controls the device to rotate around the central axis from the initial calibration state and return to the initial calibration state. The first static inertial sensor data of the duration of the device stationary at each position point and the first motion inertial sensor data between adjacent position points are collected. The distance between the inner sliding track of the platform and the device remains constant. The outer sliding track of the platform controls the device to rotate around the central axis from the initial calibration state and return to the initial calibration state. The second static inertial sensor data of the duration of the device stationary at each position point and the second motion inertial sensor data between adjacent position points are collected. The first stationary inertial sensor data, the first moving inertial sensor data, the second stationary inertial sensor data, and the second moving inertial sensor data constitute the inertial sensor data of the device.
3. The calibration method for the device according to claim 1, characterized in that, Also includes: Based on the inertial sensor data, acquire the accelerometer data at each position point of the device in a stationary state; The target acceleration value for each location point is determined based on the accelerometer data at each location point; The target acceleration value is calibrated based on the accelerometer calibration parameters to obtain the calibrated acceleration at each position point; The calibration acceleration modulus and the preset gravity value are used for verification to generate the first verification result.
4. The calibration method for the device according to claim 3, characterized in that, Also includes: Multiple verification location points are determined from all location points, and the acceleration value and calibration acceleration of each verification location point are obtained; Based on the acceleration value and gravity value at each of the verification locations, an error calculation is performed to obtain a first acceleration error value; Based on the calibration acceleration and gravity value at each of the verification locations, an error calculation is performed to obtain a second acceleration error value; The second verification result is generated by multiplying the first acceleration error value by a preset first value and comparing it with the second acceleration error value.
5. The calibration method for the device according to claim 3, characterized in that, Also includes: Determine the horizontal position point from all position points and obtain the calibration acceleration of the horizontal position point; Based on the calibrated acceleration at the horizontal position point and the gravity value, an error calculation is performed to obtain a third acceleration error value; A third verification result is generated by comparing the third acceleration error value with a preset second value.
6. The calibration method for the device according to claim 1, characterized in that, Also includes: Based on the inertial sensor data, acquire gyroscope data between any two positions of the device in motion; The target angle difference between any two position points is calculated based on the gyroscope data between those two position points. Based on the gyroscope calibration parameters, the gyroscope data between any two position points is calibrated to obtain calibrated gyroscope data between any two position points. Based on the calibrated gyroscope data, the calibrated angle difference between any two position points is calculated. The first angle error value is obtained by calculating the target angle difference between any two locations. The second angle error value is obtained by calculating the error based on the calibration angle difference between any two positions. The fourth verification result is generated by multiplying the first angle error value by a preset third value and comparing it with the second angular velocity error value.
7. The calibration method for the device according to claim 1, characterized in that, Also includes: Based on the inertial sensor data, acquire the gyroscope data at each position point of the device in a stationary state; Based on the gyroscope calibration parameters, the gyroscope data at each position point is calibrated to obtain the calibrated gyroscope data at each position point; The error value of the third angle is obtained by calculating the error based on the calibrated gyroscope data. A fifth verification result is generated by comparing the third angle error value with a preset fourth value.
8. The calibration method for the device according to claim 1, characterized in that, The calculation based on the accelerometer data in the inertial sensor data to obtain the accelerometer calibration parameters includes: The acceleration value at each location point is determined based on the accelerometer data; Based on the acceleration value at each location point, the preset acceleration matrix and the first zero-bias matrix are solved to obtain the target acceleration matrix and the target first zero-bias matrix; Obtain the rotation matrix, and calculate the calibration acceleration matrix by combining the rotation matrix and the target acceleration matrix; wherein, the global coordinate system of the inertial sensor is calibrated according to the corrected acceleration value corresponding to the initial calibration state position point of the accelerometer, and the rotation matrix is obtained. The target first zero-bias matrix and the calibration acceleration matrix are used as the accelerometer calibration parameters.
9. The calibration method for the device according to claim 1, characterized in that, The calibration of the current inertial sensor data collected by the device based on the accelerometer calibration parameters and the gyroscope calibration parameters includes: Obtain the current accelerometer data and current gyroscope data from the current inertial sensor data; The difference between the current accelerometer data and the zero-bias parameter of the zero-bias matrix in the accelerometer calibration parameters is obtained by subtracting the current accelerometer data from the zero-bias parameter of the zero-bias matrix. The acceleration difference is multiplied by the calibration acceleration matrix in the accelerometer calibration parameters to obtain the calibrated accelerometer data; The difference between the current gyroscope data and the zero-bias parameter of the zero-bias matrix in the gyroscope calibration parameters is calculated to obtain the angular velocity difference value. The angular velocity difference is multiplied by the calibration angular velocity matrix in the gyroscope calibration parameters to obtain the calibrated gyroscope data.
10. A calibration device for equipment, characterized in that, include: The data acquisition module is used to collect data from the device's inertial sensors. The first calibration parameter calculation module is used to calculate the accelerometer calibration parameters based on the accelerometer data in the inertial sensor data. The second calibration parameter calculation module is used to calculate gyroscope calibration parameters based on gyroscope data in the inertial sensor data. Specifically, the second calibration parameter calculation module is used to: determine an initial angular velocity value based on the gyroscope data; extract gyroscope data corresponding to any two position points from the gyroscope data and calculate the angle difference between the two position points; solve a preset angular velocity matrix based on the angle difference between the two position points to obtain a target angular velocity matrix; obtain a rotation matrix; calculate a calibration angular velocity matrix using the rotation matrix and the target angular velocity matrix; and use a second zero-bias matrix constructed from the initial angular velocity value and the calibration angular velocity matrix as the gyroscope calibration parameters. The rotation matrix is obtained by calibrating the overall coordinate system of the inertial sensor based on the corrected angular velocity value corresponding to the gyroscope's position point in the initial calibration state. The first calibration module is used to calibrate the current inertial sensor data collected by the device based on the accelerometer calibration parameters and the gyroscope calibration parameters, respectively.
11. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the calibration method of the device according to any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the calibration method of the device according to any one of claims 1-9.