Six-axis gyroscope data correction method and device and related product
By calculating the rotation angle when the vehicle is stationary and driving, and combining self-learning calibration, the six-axis gyroscope data is corrected, the measurement inaccuracy caused by the vehicle assembly restrictions is solved, and data accuracy is improved.
Patent Information
- Application Number
- CN202510726434.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-08-01
AI Technical Summary
The six-axis gyroscope is inconsistent with the vehicle coordinate system in the vehicle due to the inaccurate measurement data in the vehicle, which makes it difficult for the prior art to effectively correct.
By calculating the rotation angle of the entire vehicle controller about its own coordinate system when the vehicle is stationary, and combining the rotation angle of the vehicle is around the earth coordinate system when the vehicle is running, the six-axis gyroscope data is corrected, including static and dynamic self-learning calibration processes.
Improves the accuracy of the six-axis gyroscope data and ensures the accuracy of the measurement data.
Smart Images

Figure CN120403712A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive electronics technology, and in particular, to a six-axis gyroscope data correction method, apparatus, and related products. Background Art
[0002] The application of six-axis gyroscopes in vehicles is becoming increasingly widespread, especially in enhancing vehicle safety, stability, and driving experience. The dynamic control of vehicles and the confirmation of vehicle driving postures are inseparable from this key component, the six-axis gyroscope. The six-axis gyroscope is usually integrated on the controller PCB board and fixed at a suitable position on the vehicle through a rigid connection. At the same time, it is required that the x, y, and z axes of the gyroscope are consistent with the x, y, and z axes of the vehicle coordinate system, with a small installation error. However, due to the limitations of the vehicle assembly, it is impossible to achieve complete consistency between the six-axis gyroscope and the vehicle coordinate system, and even a large deviation may occur; or, during the later maintenance of the vehicle, if the installation position of the vehicle controller changes, the measurement data of the six-axis gyroscope will also become inaccurate. In this case, the established internal software parameters become invalid, and the obtained six-axis gyroscope data is no longer accurate.
[0003] In summary, how to improve the accuracy of six-axis gyroscope data is an urgent problem for those skilled in the art to solve. Summary of the Invention
[0004] In view of this, this application provides a six-axis gyroscope data correction method, apparatus, and related products, aiming to improve the accuracy of six-axis gyroscope data.
[0005] In the first aspect, this application provides a six-axis gyroscope data correction method, including:
[0006] When the vehicle is in a stationary state, calculate the first rotation angle and the second rotation angle; the first rotation angle is the rotation angle of the vehicle control unit (VCU) around the y-axis of its own coordinate system; the second rotation angle is the rotation angle of the VCU around the x-axis of its own coordinate system; the VCU is installed on the vehicle; a six-axis gyroscope sensor is integrated on the PCB board of the VCU;
[0007] Calculate the six-axis gyroscope preliminary correction data according to the first rotation angle and the second rotation angle;
[0008] When the vehicle is in a driving state, calculate the third rotation angle according to the six-axis gyroscope preliminary correction data; the third rotation angle is the rotation angle of the VCU around the z-axis of the earth coordinate system;
[0009] Correct the six-axis gyroscope data according to the first rotation angle, the second rotation angle, and the third rotation angle.
[0010] Optionally, when the vehicle is in a stationary state, calculating the first rotation angle and the second rotation angle includes:
[0011] Calculating the arithmetic mean of the acceleration data of the six-axis gyroscope sensor;
[0012] Calculating the gravitational acceleration at the location of the vehicle based on the arithmetic mean of the acceleration data of the six-axis gyroscope sensor;
[0013] Calculating the first rotation angle based on the arithmetic mean of the acceleration data of the six-axis gyroscope sensor and the gravitational acceleration at the location of the vehicle;
[0014] Calculating the second rotation angle based on the arithmetic mean of the acceleration data of the six-axis gyroscope sensor and the gravitational acceleration at the location of the vehicle.
[0015] Optionally, before calculating the first rotation angle and the second rotation angle when the vehicle is in a stationary state, the method further includes:
[0016] Starting static self-learning calibration when the vehicle is in a stationary state.
[0017] Optionally, after calculating the first rotation angle and the second rotation angle when the vehicle is in a stationary state, the method further includes:
[0018] Ending the static self-learning calibration to obtain a valid flag bit for the static self-learning calibration parameters;
[0019] Storing the first rotation angle, the second rotation angle, and the valid flag bit for the static self-learning calibration parameters into an electrically erasable programmable read-only memory (EEPROM).
[0020] Optionally, before calculating the third rotation angle based on the preliminary calibration data of the six-axis gyroscope when the vehicle is in a driving state, the method further includes:
[0021] Starting dynamic self-learning calibration when the vehicle is in a driving state.
[0022] Optionally, after calculating the third rotation angle based on the preliminary calibration data of the six-axis gyroscope when the vehicle is in a driving state, the method further includes:
[0023] Ending the dynamic self-learning calibration to obtain a valid flag bit for the dynamic self-learning calibration parameters;
[0024] Storing the third rotation angle and the valid flag bit for the dynamic self-learning calibration parameters into the EEPROM.
[0025] Optionally, the correction of the six-axis gyroscope data according to the first rotation angle, the second rotation angle, and the third rotation angle includes:
[0026] Call the first rotation angle, the second rotation angle, the third rotation angle, the static self-learning calibration parameter valid flag bit, and the dynamic self-learning calibration parameter valid flag bit from the EEPROM;
[0027] Correct the six-axis gyroscope data according to the first rotation angle, the second rotation angle, the third rotation angle, the static self-learning calibration parameter valid flag bit, and the dynamic self-learning calibration parameter valid flag bit.
[0028] In a second aspect, the present application provides a six-axis gyroscope data correction device, including:
[0029] A first calculation module, configured to calculate a first rotation angle and a second rotation angle when the vehicle is in a stationary state; the first rotation angle is the rotation angle of the vehicle control unit (VCU) around the y-axis of its own coordinate system; the second rotation angle is the rotation angle of the VCU around the x-axis of its own coordinate system; the VCU is installed on the vehicle; a six-axis gyroscope sensor is integrated on the printed circuit board (PCB) of the VCU;
[0030] A second calculation module, configured to calculate preliminary six-axis gyroscope correction data according to the first rotation angle and the second rotation angle;
[0031] A third calculation module, configured to calculate a third rotation angle according to the preliminary six-axis gyroscope correction data when the vehicle is in a driving state; the third rotation angle is the rotation angle of the VCU around the z-axis of the earth coordinate system;
[0032] A correction module, configured to correct the six-axis gyroscope data according to the first rotation angle, the second rotation angle, and the third rotation angle.
[0033] Optionally, the first calculation module includes:
[0034] A first calculation unit, configured to calculate the arithmetic mean of the acceleration data of the six-axis gyroscope sensor;
[0035] A second calculation unit, configured to calculate the gravitational acceleration at the location of the vehicle according to the arithmetic mean of the acceleration data of the six-axis gyroscope sensor;
[0036] A third calculation unit, configured to calculate the first rotation angle according to the arithmetic mean of the acceleration data of the six-axis gyroscope sensor and the gravitational acceleration at the location of the vehicle.
[0037] A fourth calculation unit, configured to calculate the second rotation angle according to the arithmetic mean of the acceleration data of the six-axis gyroscope sensor and the gravitational acceleration at the location of the vehicle.
[0038] Optionally, the device further includes:
[0039] A static self-learning calibration start module, configured to start static self-learning calibration in a stationary state of the vehicle.
[0040] Optionally, the device further includes:
[0041] A static self-learning calibration end module, configured to end the static self-learning calibration to obtain a valid flag bit of static self-learning calibration parameters;
[0042] A first storage module, configured to store the first rotation angle, the second rotation angle, and the valid flag bit of the static self-learning calibration parameters into an electrically erasable programmable read-only memory (EEPROM).
[0043] Optionally, the device further includes:
[0044] A dynamic self-learning calibration start module, configured to start dynamic self-learning calibration in a driving state of the vehicle.
[0045] Optionally, the device further includes:
[0046] A dynamic self-learning calibration end module, configured to end the dynamic self-learning calibration to obtain a valid flag bit of dynamic self-learning calibration parameters;
[0047] A second storage module, configured to store the third rotation angle and the valid flag bit of the dynamic self-learning calibration parameters into the EEPROM.
[0048] Optionally, the correction module includes:
[0049] A call unit, configured to call the first rotation angle, the second rotation angle, the third rotation angle, the valid flag bit of the static self-learning calibration parameters, and the valid flag bit of the dynamic self-learning calibration parameters from the EEPROM;
[0050] A correction unit, configured to correct the six-axis gyroscope data according to the first rotation angle, the second rotation angle, the third rotation angle, the valid flag bit of the static self-learning calibration parameters, and the valid flag bit of the dynamic self-learning calibration parameters.
[0051] In a third aspect, an embodiment of the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the six-axis gyroscope data correction method described in any one of the implementation manners in the first aspect of the embodiments of the present application.
[0052] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions run on a terminal device, the terminal device is caused to execute the six-axis gyroscope data correction method described in any one of the implementation manners in the first aspect of the embodiments of the present application.
[0053] The present application provides a six-axis gyroscope data correction method. When executing the method, first, in a vehicle stationary state, a first rotation angle and a second rotation angle are calculated. The first rotation angle is the rotation angle of the vehicle control unit (VCU) around the y-axis of its own coordinate system, and the second rotation angle is the rotation angle of the VCU around the x-axis of its own coordinate system. The VCU is installed on the vehicle, and a six-axis gyroscope sensor is integrated on the printed circuit board (PCB) of the VCU. Then, based on the first rotation angle and the second rotation angle, preliminary six-axis gyroscope correction data is calculated. Then, in a vehicle driving state, based on the preliminary six-axis gyroscope correction data, a third rotation angle is calculated. The third rotation angle is the rotation angle of the VCU around the z-axis of the earth coordinate system. Finally, based on the first rotation angle, the second rotation angle, and the third rotation angle, the six-axis gyroscope data is corrected. In this way, by using the rotation angle of the VCU around the y-axis of its own coordinate system, the rotation angle of the VCU around the x-axis of its own coordinate system, and the rotation angle of the VCU around the z-axis of the earth coordinate system, the correction of the six-axis gyroscope data can be achieved, thereby improving the accuracy of the six-axis gyroscope data. Description of the Drawings
[0054] To more clearly illustrate the technical solutions in the embodiments or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0055] Figure 1 It is a flowchart of a six-axis gyroscope data correction method provided by an embodiment of the present application;
[0056] Figure 2 It is a schematic structural diagram of a six-axis gyroscope data correction device provided by an embodiment of the present application;
[0057] Figure 3 A schematic structural diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0058] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. A six-axis gyroscope data correction method, device and related products provided by the present application are used in the field of vehicle electronics technology. The above is only an example and does not limit the application field of the method and device names provided by the present application.
[0059] The application of six-axis gyroscopes in vehicles is becoming more and more extensive, especially in improving vehicle safety, stability and driving experience. The dynamic control of the vehicle, the confirmation of the vehicle driving attitude, etc. are all inseparable from this key component of the six-axis gyroscope. The six-axis gyroscope is usually integrated on the controller PCB board and fixed at a suitable position on the vehicle through a rigid connection. At the same time, it is required that the x, y, and z axes of the gyroscope are consistent with the x, y, and z axes of the vehicle coordinate system, with a small installation error. However, due to the limitations of the vehicle assembly, it is impossible for the six-axis gyroscope and the vehicle coordinate system to be completely consistent, and even a large deviation may occur; or, during the later maintenance of the vehicle, the installation position of the vehicle controller changes, and the measurement data of the six-axis gyroscope will also become inaccurate. In this case, the established internal software parameters fail, and the obtained six-axis gyroscope data is no longer accurate.
[0060] The inventors have proposed the technical solution of the present application through research. First, in the vehicle stationary state, the first rotation angle and the second rotation angle are calculated. Among them, the first rotation angle is the rotation angle of the vehicle controller VCU around the y-axis of its own coordinate system, and the second rotation angle is the rotation angle of the vehicle controller VCU around the x-axis of its own coordinate system. The vehicle controller VCU is installed on the vehicle, and a six-axis gyroscope sensor is integrated on the PCB board of the vehicle controller VCU. Then, according to the first rotation angle and the second rotation angle, the six-axis gyroscope preliminary correction data is calculated. Then, in the vehicle driving state, according to the six-axis gyroscope preliminary correction data, the third rotation angle is calculated. The third rotation angle is the rotation angle of the vehicle controller VCU around the z-axis of the earth coordinate system. Finally, according to the first rotation angle, the second rotation angle and the third rotation angle, the six-axis gyroscope data is corrected. In this way, by using the rotation angle of the vehicle controller VCU around the y-axis of its own coordinate system, the rotation angle of the vehicle controller VCU around the x-axis of its own coordinate system, and the rotation angle of the vehicle controller VCU around the z-axis of the earth coordinate system, the correction of the six-axis gyroscope data can be realized, thereby improving the accuracy of the six-axis gyroscope data.
[0061] To enable those skilled in the art to better understand the solution of this application, the following provides a further detailed description of this application in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts belong to the scope of protection of this application. It should be noted that for the convenience of description, only the parts related to the invention are shown in the drawings. Without conflict, the embodiments in this application and the features in the embodiments can be combined with each other.
[0062] See Figure 1 , Figure 1 which is a flowchart of a six-axis gyroscope data correction method provided by an embodiment of this application, including:
[0063] S101: Calculate the first rotation angle and the second rotation angle when the vehicle is in a stationary state.
[0064] In this embodiment, the six-axis gyroscope sensor is integrated on the PCB board of the vehicle control unit VCU, and the vehicle control unit VCU is installed on the vehicle.
[0065] First, in the stationary state of the vehicle, perform static self-learning calibration to determine the installation attitude of the vehicle control unit VCU and calculate the first rotation angle and the second rotation angle. Among them, the first rotation angle is the rotation angle of the vehicle control unit VCU around the y-axis of its own coordinate system, and the second rotation angle is the rotation angle of the vehicle control unit VCU around the x-axis of its own coordinate system. When the first rotation angle and the second rotation angle calculation converges, end the static self-learning calibration, obtain the static self-learning calibration parameter valid flag bit. Finally, store the static self-learning calibration parameter valid flag bit, the first rotation angle, and the second rotation angle together into the electrically erasable programmable read-only memory EEPROM.
[0066] Specifically, the vehicle can be first placed on a road with a slope of 0, start the vehicle and complete the power-on of the vehicle control unit VCU. Then, through the self-learning service, set the software internal calibration quantity staticCaliFlg to 1 and then to 0. When the software internally detects the rising edge of staticCaliFlg, set the static self-learning calibration parameter valid flag bit staticCaliVldFlg to 0, enable the static self-learning calibration software program, and start timing of the set static self-learning duration parameter staticCaliTime.
[0067] At this time, the static self-learning calibration software operation period and the six-axis gyroscope data acquisition period are 10 ms, and calculate the arithmetic mean of the x-axis, y-axis, and z-axis accelerations collected by the six-axis gyroscope where
[0068]
[0069] Among them, n is the current calculation cycle number, and i represents a certain cycle number. For example, if the data acquisition cycle is 10 ms and the total acquisition duration is 10 s, the value of n is 10 s / 10 ms = 1000; the value range of i is from 1 to n.
[0070] Then, calculate the gravitational acceleration g at the location of the vehicle:
[0071]
[0072] Based on the above values, the angles between the x, y, and z axes of the vehicle control unit (VCU) and the direction of gravity can be calculated. Specifically, in the stationary state, the three-axis accelerations collected by the gyroscope are all provided by the gravitational acceleration g. Therefore, according to this principle, the angles between each axis of the vehicle control unit coordinate system (i.e., the gyroscope coordinate system) and the vertical direction can be calculated.
[0073] When is positive, it indicates that the x-axis of the vehicle control unit (VCU) is below the horizontal plane. Calculate the first rotation angle θ1 according to the right-hand screw rule:
[0074]
[0075] The first rotation matrix R1 is:
[0076]
[0077] Next, calculate the second rotation angle θ2. The second rotation matrix R2 can be expressed as:
[0078]
[0079] The conversion relationship of the gravitational acceleration from the geodetic coordinate system to the vehicle control unit (VCU) coordinate system values can be expressed as:
[0080]
[0081] According to and the positive and negative and relative relationships of, calculate the second rotation angle θ2:
[0082]
[0083] Further, to avoid the impact of inaccurate results caused by too short a learning time, the shortest static self-learning calibration time calibration quantity staticCaliTimeMin is set inside the software. When the static self-learning duration staticCaliTime exceeds staticCaliTimeMin and the calculation results of the first rotation angle and the second rotation angle converge, the static self-learning calibration is completed, the static self-learning calibration software program is disabled, and the static self-learning calibration parameter valid flag bit staticCaliVldFlg is set to 1.
[0084] Finally, the static self-learning calibration parameter valid flag bit, the first rotation angle, and the second rotation angle are stored in the electrically erasable programmable read-only memory EEPROM.
[0085] S102: Calculate the initial calibration data of the six-axis gyroscope according to the first rotation angle and the second rotation angle.
[0086] Read the static self-learning calibration parameter valid flag bit, the first rotation angle, and the second rotation angle stored in the electrically erasable programmable read-only memory EEPROM. When the static self-learning calibration parameter valid flag bit staticCaliVldFlg is 1, calculate the static rotation correction matrix R according to the first rotation angle and the second rotation angle init :
[0087] R init = R1(θ1) × R2(θ2).
[0088] The angular velocity data of the six-axis gyroscope after static calibration can be expressed as:
[0089] [ω x1 ω y1 ω z1 T = R init · [ω x0 ω y0 ω z0 T ;
[0090] where ω x0 , ω y0 , ω z0 are the original data of the six-axis gyroscope.
[0091] S103: Calculate the third rotation angle according to the initial calibration data of the six-axis gyroscope when the vehicle is in motion.
[0092] When the vehicle is in motion, dynamic self - learning calibration is started to determine the relative installation relationship between the vehicle control unit (VCU) and the vehicle and calculate the third rotation angle, where the third rotation angle is the rotation angle of the VCU around the z - axis of the earth coordinate system. When the calculation of the third rotation angle converges, static self - learning calibration is ended to obtain the dynamic self - learning calibration parameter valid flag bit. Finally, the dynamic self - learning calibration parameter valid flag bit and the third rotation angle are stored in the electrically erasable programmable read - only memory (EEPROM).
[0093] Specifically, through the self - learning service, the internal calibration quantity dynamicCaliFlg in the software is set to 1 and then to 0. After the software internally detects the rising edge of dynamicCaliFlg, the dynamic self - learning calibration parameter valid flag bit dynamicCaliVldFlg is set to 0, the dynamic self - learning calibration software program is enabled, and the set dynamic self - learning duration parameter dynamicCaliTime starts timing.
[0094] Drive the vehicle to complete dynamic driving conditions including acceleration, deceleration, steering, uphill and downhill scenarios. During this period, the dynamic self - learning calibration software running cycle and the six - axis gyroscope data acquisition cycle are 10 ms.
[0095] The dynamic calibration solution parameter is the third rotation angle θ3, that is, the rotation angle of the VCU around the z - axis of the earth coordinate system. The corresponding third rotation matrix R3 can be expressed as:
[0096]
[0097] When the unknown parameter is the third rotation angle θ3, the six - axis gyroscope angular velocity data after dynamic correction can be obtained according to the third rotation matrix:
[0098] [ω x2 ω y2 ω z2 T =R3(θ3) T ·[ω x1 ω y1 ω z1 T ;
[0099] where, ω x2 =ω x1 ·cos(θ3)+ω y1 ·sin(θ3).
[0100] According to the vehicle motion characteristics, when the vehicle is going uphill or downhill, the pitch angular velocity changes significantly; when the vehicle is turning, the yaw angular velocity changes significantly. Therefore, under the specified vehicle dynamic driving conditions, the absolute value of the roll angular velocity is the smallest. Based on this vehicle driving characteristic, an equivalent function is constructed to minimize the sum of the absolute values of the roll angular velocity under the entire dynamic correction condition at different third rotation angles:
[0101]
[0102] Next, within the change interval [0, 2π] of θ3, calculate the minimum point of the equivalent function, that is, solve f′(θ3) = 0, f″(θ3) > 0, where:
[0103] f′(θ3) = a·(cos 2 (θ3) - sin 2 (θ3)) - b·sin(θ3)·cos(θ3);
[0104] f″(θ3) = b·(cos 2 (θ3) - sin 2 (θ3)) - 4·a·sin(θ3)·cos(θ3);
[0105] Among them,
[0106] Judge whether f′(θ3) is less than the set threshold when cos(θ3) = 0. If it is less than the set threshold, then consider f′(θ3) = 0, and at this time are the four extreme points. Confirm that the two minimum points are 0 / π or If f′(θ3) is greater than the set threshold when cos(θ3) = 0, calculate the extreme points and confirm that the two minimum points are θ 3,1 and θ 3,2 .
[0107] Calculate the sum of the squares of the differences between the x-axis acceleration of the six-axis gyroscope correction and the vehicle acceleration obtained by differentiating the vehicle speed respectively when the third rotation angle is θ 3,1 and θ 3,2 . The smaller value of the sum of squares corresponds to the obtained third rotation angle. It should be noted that the above steps are run according to the calculation order within the same program, and each parameter can reach convergence simultaneously.
[0108] To avoid the inaccurate results caused by too short learning time, the software internally sets the shortest dynamic self-learning calibration time calibration quantity dynamicCaliTimeMin. When the dynamic self-learning duration dynamicCaliTime exceeds dynamicCaliTimeMin and the calculation result of the third rotation angle converges, the dynamic self-learning calibration is completed, the dynamic self-learning calibration software program is disabled, and the dynamic self-learning calibration parameter valid flag bit dynamicCaliVldFlg is set to 1.
[0109] Finally, the third rotation angle and the dynamic self-learning calibration parameter valid flag bit are stored in the EEPROM.
[0110] S104: Correct the six-axis gyroscope data according to the first rotation angle, the second rotation angle, and the third rotation angle.
[0111] Read the first rotation angle, the second rotation angle, the third rotation angle, the static self-learning calibration parameters, and the dynamic self-learning calibration parameters in the EEPROM. When both the static self-learning calibration parameter valid flag bit staticCaliVldFlg and the dynamic self-learning calibration parameter valid flag bit dynamicCaliVldFlg are 1, calculate the six-axis gyroscope data correction matrix R according to the first rotation angle, the second rotation angle, and the third rotation angle:
[0112] R = R3(θ3) T ·R1(θ1) T ·R2(θ2) T ;
[0113] where T represents the transpose of the matrix.
[0114] Finally, during the vehicle operation, use the correction matrix to calculate the six-axis gyroscope acceleration and angular velocity data in the vehicle coordinate system in real time.
[0115] In the embodiment of the present application, first, in a vehicle stationary state, a first rotation angle and a second rotation angle are calculated. The first rotation angle is the rotation angle of the vehicle control unit (VCU) around the y-axis of its own coordinate system, and the second rotation angle is the rotation angle of the VCU around the x-axis of its own coordinate system. The VCU is installed on the vehicle, and a six-axis gyroscope sensor is integrated on the printed circuit board (PCB) of the VCU. Then, based on the first rotation angle and the second rotation angle, preliminary calibration data for the six-axis gyroscope is calculated. Next, in a vehicle driving state, based on the preliminary calibration data of the six-axis gyroscope, a third rotation angle is calculated. The third rotation angle is the rotation angle of the VCU around the z-axis of the earth coordinate system. Finally, based on the first rotation angle, the second rotation angle, and the third rotation angle, the six-axis gyroscope data is calibrated. In this way, by using the rotation angle of the VCU around the y-axis of its own coordinate system, the rotation angle of the VCU around the x-axis of its own coordinate system, and the rotation angle of the VCU around the z-axis of the earth coordinate system, calibration of the six-axis gyroscope data can be achieved, thereby improving the accuracy of the six-axis gyroscope data.
[0116] The above are some specific implementation manners of the six-axis gyroscope data calibration method provided by the embodiments of the present application. Based on this, the present application also provides a corresponding device. Next, the device provided by the embodiments of the present application will be introduced from the perspective of functional modularization.
[0117] See Figure 2 , Figure 2 which is a schematic structural diagram of a six-axis gyroscope data calibration device provided by an embodiment of the present application. The six-axis gyroscope data calibration device 200 includes:
[0118] A first calculation module 210, configured to calculate a first rotation angle and a second rotation angle in a vehicle stationary state; the first rotation angle is the rotation angle of the vehicle control unit (VCU) around the y-axis of its own coordinate system; the second rotation angle is the rotation angle of the VCU around the x-axis of its own coordinate system; the VCU is installed on the vehicle; a six-axis gyroscope sensor is integrated on the printed circuit board (PCB) of the VCU;
[0119] A second calculation module 220, configured to calculate preliminary calibration data for the six-axis gyroscope according to the first rotation angle and the second rotation angle;
[0120] A third calculation module 230, configured to calculate a third rotation angle according to the preliminary calibration data of the six-axis gyroscope in the vehicle driving state; the third rotation angle is the rotation angle of the VCU around the z-axis of the earth coordinate system;
[0121] A calibration module 240, configured to calibrate the six-axis gyroscope data according to the first rotation angle, the second rotation angle, and the third rotation angle.
[0122] Optionally, the first calculation module 210 includes:
[0123] A first calculation unit, configured to calculate the arithmetic mean of the acceleration data of the six-axis gyroscope sensor;
[0124] A second calculation unit, configured to calculate the gravitational acceleration at the location of the vehicle according to the arithmetic mean of the acceleration data of the six-axis gyroscope sensor;
[0125] A third calculation unit, configured to calculate the first rotation angle according to the arithmetic mean of the acceleration data of the six-axis gyroscope sensor and the gravitational acceleration at the location of the vehicle;
[0126] A fourth calculation unit, configured to calculate the second rotation angle according to the arithmetic mean of the acceleration data of the six-axis gyroscope sensor and the gravitational acceleration at the location of the vehicle.
[0127] Optionally, the device 200 further includes:
[0128] A static self-learning calibration start module, configured to start static self-learning calibration in a stationary state of the vehicle.
[0129] Optionally, the device 200 further includes:
[0130] A static self-learning calibration end module, configured to end the static self-learning calibration to obtain a valid flag bit of the static self-learning calibration parameter;
[0131] A first storage module, configured to store the first rotation angle, the second rotation angle, and the valid flag bit of the static self-learning calibration parameter into an electrically erasable programmable read-only memory (EEPROM).
[0132] Optionally, the device 200 further includes:
[0133] A dynamic self-learning calibration start module, configured to start dynamic self-learning calibration in a driving state of the vehicle.
[0134] Optionally, the device 200 further includes:
[0135] A dynamic self-learning calibration end module, configured to end the dynamic self-learning calibration to obtain a valid flag bit of the dynamic self-learning calibration parameter;
[0136] A second storage module, configured to store the third rotation angle and the valid flag bit of the dynamic self-learning calibration parameter into the EEPROM.
[0137] Optionally, the calibration module 240 includes:
[0138] A calling unit, configured to call the first rotation angle, the second rotation angle, the third rotation angle, the static self-learning calibration parameter valid flag bit, and the dynamic self-learning calibration parameter valid flag bit from the EEPROM;
[0139] A calibration unit, configured to calibrate the six-axis gyroscope data according to the first rotation angle, the second rotation angle, the third rotation angle, the static self-learning calibration parameter valid flag bit, and the dynamic self-learning calibration parameter valid flag bit.
[0140] The embodiment of the present application further provides a corresponding device and a computer storage medium for implementing the solution provided by the embodiment of the present application.
[0141] As Figure 3 shown, the computer device 01 is presented in the form of a general-purpose computing device. The components of the computer device 01 may include, but are not limited to: one or more processors or processing units 03, a system memory 08, and a bus 04 connecting different system components (including the system memory 08 and the processing unit 03).
[0142] The bus 04 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the multiple bus structures. For example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0143] The computer device 01 typically includes a variety of computer system-readable media. These media can be any available media accessible by the computer device 01, including volatile and non-volatile media, removable and non-removable media.
[0144] The system memory 08 may include computer system-readable media in the form of volatile memory, such as random access memory (RAM) 09 and / or cache memory 10. The computer device 01 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 11 may be used to read and write non-removable, non-volatile magnetic media ( Figure 3 not shown, commonly referred to as a "hard disk drive"). Although Figure 3Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical medium) can be provided. In these cases, each drive can be connected to bus 04 through one or more data medium interfaces. Memory 08 may include at least one program product having a set (such as at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0145] A program / utility 12 having a set (at least one) of program modules 13 can be stored, for example, in memory 08. Such program modules 13 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment. Program modules 13 generally perform the functions and / or methods in the embodiments described in the present invention.
[0146] Computer device 01 can communicate with display 07, can also communicate with one or more external devices 02 (such as a keyboard, pointing device, etc.), can also communicate with one or more devices that enable a user to interact with the computer device 01, and / or can communicate with any device that enables the computer device 01 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 06. And, computer device 01 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through network adapter 05. As Figure 3 shown, network adapter 05 communicates with other modules of computer device 01 through bus 04. It should be understood that although Figure 3 not shown in the figure, other hardware and / or software modules can be used in combination with computer device 01, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0147] The processor unit 03 executes various functional applications and data processing by running the programs stored in the system memory 08, such as implementing a baud rate adaptive program flashing method provided by the embodiments of the present application.
[0148] It should be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising said element.
[0149] From the description of the above embodiments, those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of the present application.
[0150] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. The key point of each embodiment is to illustrate the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0151] The above description is only an exemplary embodiment of the present application and is not used to limit the protection scope of the present application.
Claims
1. A method for correcting six-axis gyroscope data, characterized in that, Including: When the vehicle is in a stationary state, calculate a first rotation angle and a second rotation angle; the first rotation angle is the rotation angle of the vehicle control unit (VCU) around the y-axis of its own coordinate system; the second rotation angle is the rotation angle of the VCU around the x-axis of its own coordinate system; the VCU is installed on the vehicle; a six-axis gyroscope sensor is integrated on the printed circuit board (PCB) of the VCU. Calculate preliminary six-axis gyroscope calibration data based on the first rotation angle and the second rotation angle. When the vehicle is in a driving state, calculate a third rotation angle based on the preliminary six-axis gyroscope calibration data; the third rotation angle is the rotation angle of the VCU around the z-axis of the earth coordinate system. Calibrate the six-axis gyroscope data based on the first rotation angle, the second rotation angle, and the third rotation angle.
2. The method according to claim 1, wherein The step of calculating the first rotation angle and the second rotation angle when the vehicle is in a stationary state includes: Calculate the arithmetic mean of the acceleration data of the six-axis gyroscope sensor. Calculate the gravitational acceleration at the location of the vehicle based on the arithmetic mean of the acceleration data of the six-axis gyroscope sensor. Calculate the first rotation angle based on the arithmetic mean of the acceleration data of the six-axis gyroscope sensor and the gravitational acceleration at the location of the vehicle. Calculate the second rotation angle based on the arithmetic mean of the acceleration data of the six-axis gyroscope sensor and the gravitational acceleration at the location of the vehicle.
3. The method according to claim 1, wherein Before calculating the first rotation angle and the second rotation angle when the vehicle is in a stationary state, the method further includes: Start static self-learning calibration when the vehicle is in a stationary state.
4. The method according to claim 3, wherein After calculating the first rotation angle and the second rotation angle when the vehicle is in a stationary state, the method further includes: End the static self-learning calibration to obtain a valid flag bit for the static self-learning calibration parameters. Store the first rotation angle, the second rotation angle, and the valid flag bit for the static self-learning calibration parameters into an electrically erasable programmable read-only memory (EEPROM).
5. The method according to claim 4, wherein Before calculating the third rotation angle based on the preliminary six-axis gyroscope calibration data when the vehicle is in a driving state, the method further includes: Start dynamic self-learning calibration when the vehicle is in a driving state.
6. The method according to claim 5, wherein After calculating the third rotation angle based on the preliminary six-axis gyroscope calibration data when the vehicle is in a driving state, the method further includes: End the dynamic self-learning calibration to obtain a valid flag bit for the dynamic self-learning calibration parameters. Store the third rotation angle and the valid flag bit for the dynamic self-learning calibration parameters into the EEPROM.
7. The method according to claim 6, characterized in that, The step of calibrating the six-axis gyroscope data based on the first rotation angle, the second rotation angle, and the third rotation angle includes: Call the first rotation angle, the second rotation angle, the third rotation angle, the valid flag bit for the static self-learning calibration parameters, and the valid flag bit for the dynamic self-learning calibration parameters from the EEPROM. Correct the six-axis gyroscope data according to the first rotation angle, the second rotation angle, the third rotation angle, the static self-learning calibration parameter valid flag bit, and the dynamic self-learning calibration parameter valid flag bit.
8. A six-axis gyroscope data correction device, characterized in that Comprising: A first calculation module, configured to calculate a first rotation angle and a second rotation angle when the vehicle is in a stationary state; the first rotation angle is the rotation angle of the vehicle control unit (VCU) around the y-axis of its own coordinate system; the second rotation angle is the rotation angle of the VCU around the x-axis of its own coordinate system; the VCU is installed on the vehicle; a six-axis gyroscope sensor is integrated on the printed circuit board (PCB) of the VCU. A second calculation module, configured to calculate the preliminary six-axis gyroscope correction data according to the first rotation angle and the second rotation angle. A third calculation module, configured to calculate a third rotation angle according to the preliminary six-axis gyroscope correction data when the vehicle is in a driving state; the third rotation angle is the rotation angle of the VCU around the z-axis of the earth coordinate system. A correction module, configured to correct the six-axis gyroscope data according to the first rotation angle, the second rotation angle, and the third rotation angle.
9. A computer device, characterized in that, Comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the six-axis gyroscope data correction method according to any one of claims 1-7 is implemented.
10. A computer-readable storage medium, characterized in that, Instructions are stored in the computer-readable storage medium, and when the instructions are run on the terminal device, the terminal device is caused to execute the six-axis gyroscope data correction method according to any one of claims 1-7.
Citation Information
Patent Citations
Calibration method and device of gyroscope and electronic equipment
CN117740033A
Equipment installation error angle correction method and system, terminal and storage medium
CN118004184A
Method and system for determining installation error angle of vehicle-mounted equipment and electronic equipment
CN119642865A
Method for determining a misalignment of an inertial measurement unit of a vehicle, and vehicle comprising an inertial measurement unit
WO2024094409A1