CN-122015835-A - Angle calculation method and system based on triaxial accelerometer
Abstract
The invention provides an angle calculating method and system based on a triaxial accelerometer, which relates to the technical field of inertial navigation and comprises the steps of obtaining acceleration signals and preprocessing to obtain effective acceleration components, constructing nonlinear error feature vectors, and (3) carrying out real-time parameter identification by using a recursive least square method to establish a nonlinear error compensation model, and carrying out dynamic correction by adopting a self-adaptive sliding time window to finally calculate a pitch angle and a roll angle. The method can effectively inhibit nonlinear errors of the accelerometer, improves the angle calculation precision, and has the characteristics of good instantaneity and strong adaptability.
Inventors
- ZENG LINGLING
- GONG ZHI
- CHEN BANGQI
- LIU XIN
- XU ZHICHENG
Assignees
- 杭州隆硕科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260416
Claims (9)
- 1. The angle calculating method based on the triaxial accelerometer is characterized by comprising the following steps of: The method comprises the steps of acquiring acceleration signals of a triaxial accelerometer, preprocessing the acceleration signals to acquire effective acceleration components of each axis, constructing a nonlinear error feature vector based on the effective acceleration components, carrying out real-time parameter identification on the nonlinear error feature vector through a recursive least square method, and establishing a nonlinear error compensation model; And dynamically correcting the output of the nonlinear error compensation model by adopting a self-adaptive sliding time window, substituting the acceleration signals subjected to nonlinear error compensation and dynamic correction into an angle solution equation, calculating the pitch angle and the roll angle of the triaxial accelerometer, and outputting the pitch angle and the roll angle as final angle solution results.
- 2. The method of claim 1, wherein acquiring acceleration signals of a triaxial accelerometer, preprocessing the acceleration signals, and acquiring effective acceleration components of each axis comprises: Respectively performing wavelet threshold filtering and Kalman filtering on acceleration signals of the triaxial accelerometer, and performing weighted fusion based on covariance matrixes of filtering results; and carrying out coordinate transformation on the fused acceleration signals according to three orthogonal directions of a navigation coordinate system, and extracting effective acceleration components of each axis by adopting a self-adaptive threshold segmentation detection method.
- 3. The method of claim 1, wherein constructing a nonlinear error feature vector based on the effective acceleration component, performing real-time parameter identification on the nonlinear error feature vector by a recursive least squares method, and constructing a nonlinear error compensation model comprises: Acquiring an acceleration measurement value of an inertial navigation system, filtering the acceleration measurement value through digital filtering, and extracting an effective acceleration component in the acceleration measurement value; Based on the effective acceleration component, carrying out Taylor series expansion on the effective acceleration component and a corresponding temperature value thereof, and constructing a nonlinear error feature vector comprising an acceleration nonlinear term, a temperature nonlinear term and a cross term thereof, wherein the nonlinear error feature vector obtains second-order and above nonlinear term coefficients through Taylor series expansion; And carrying out real-time parameter identification on the nonlinear error feature vector by adopting a recursive least square method, carrying out weighting treatment on historical data in the parameter identification process by introducing a time-related forgetting factor, and establishing a nonlinear error compensation model according to an identification result.
- 4. A method according to claim 3, wherein the step of performing real-time parameter identification on the nonlinear error feature vector by using a recursive least square method, and performing weighting processing on historical data in the parameter identification process by introducing a time-dependent forgetting factor, and the step of building a nonlinear error compensation model according to the identification result comprises: And acquiring a feature vector of a system to be identified, carrying out real-time parameter identification on the feature vector by adopting a recursive least square method, and calculating the recursive least square method based on an exponential forgetting factor, wherein the value of the exponential forgetting factor is dynamically adjusted according to a data time interval, differential weighting on historical data is realized, and a nonlinear error compensation model is constructed according to the parameter identification result.
- 5. The method of claim 1, wherein dynamically correcting the output of the nonlinear error compensation model using an adaptive sliding time window, substituting the nonlinear error compensated and dynamically corrected acceleration signal into an angle solution equation, calculating pitch and roll angles of a triaxial accelerometer, and outputting the pitch and roll angles as final angle solution results comprises: Obtaining an output signal of a nonlinear error compensation model, constructing an adaptive sliding time window, and dynamically correcting the output signal, wherein the length of the adaptive sliding time window is determined by calculating the variance change rate of the output signal, shortening the window length when the variance change rate of the signal is larger than a preset variance threshold, and prolonging the window length when the variance change rate of the signal is smaller than the preset variance threshold, so as to realize the adaptive correction of the output signal; Substituting the acceleration signals subjected to nonlinear error compensation and dynamic correction into an angle solving equation, constructing a posture matrix according to the projection values of the acceleration signals on a navigation coordinate system, calculating pitch angles and roll angles of the triaxial accelerometer by iteratively solving the posture matrix, and outputting the pitch angles and the roll angles as final angle solving results.
- 6. The method of claim 5, wherein substituting the acceleration signal after nonlinear error compensation and dynamic correction into an angle solution equation, constructing a pose matrix according to a projection value of the acceleration signal on a navigation coordinate system, and calculating a pitch angle and a roll angle of the triaxial accelerometer by iteratively solving the pose matrix comprises: Projecting the acceleration signals subjected to nonlinear error compensation and dynamic correction on a navigation coordinate system, constructing a posture matrix based on projection values, and calculating pitch angles and roll angles of the triaxial accelerometer according to orthogonal normalization results of the posture matrix.
- 7. A three-axis accelerometer-based angle computing system for implementing the method of any of the preceding claims 1-6, comprising: the device comprises a first unit, a nonlinear error feature vector, a nonlinear error compensation model and a second unit, wherein the first unit is used for acquiring an acceleration signal of a triaxial accelerometer, preprocessing the acceleration signal and acquiring effective acceleration components of each axis; and the second unit is used for dynamically correcting the output of the nonlinear error compensation model by adopting a self-adaptive sliding time window, substituting the acceleration signals subjected to nonlinear error compensation and dynamic correction into an angle solution equation, calculating the pitch angle and the roll angle of the triaxial accelerometer, and outputting the pitch angle and the roll angle as final angle solution results.
- 8. An electronic device, comprising: A processor; A memory for storing processor-executable instructions; Wherein the processor is configured to invoke the instructions stored in the memory to perform the method of any of claims 1 to 6.
- 9. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1 to 6.
Description
Angle calculation method and system based on triaxial accelerometer Technical Field The invention relates to an inertial navigation technology, in particular to an angle calculation method and system based on a triaxial accelerometer. Background In the fields of modern navigation, attitude measurement, motion analysis and the like, the triaxial accelerometer is widely applied to measurement of the attitude angle of an object. The triaxial accelerometer has the advantages of small volume, low price, low power consumption and the like, and the pitch angle and the roll angle of an object can be calculated by measuring the components of the gravitational acceleration on each axis. The angle measurement method has wide application prospects in the fields of intelligent wearable equipment, unmanned aerial vehicles, robot control, man-machine interaction and the like. The acceleration sensor has nonlinear errors including zero offset errors, scale factor errors, cross axis sensitivity errors and the like, and the errors can directly influence the accuracy of angle calculation, and particularly, the errors are more obvious in application scenes with higher accuracy requirements. The acceleration signal is easily interfered by environmental vibration and impact, and in the process of moving an object, other linear accelerations except for gravity acceleration can seriously influence the accuracy of angle measurement, so that the calculation result has larger fluctuation. The traditional angle resolving algorithm generally adopts a fixed parameter model, lacks adaptability to different working environments, gradually reduces the angle resolving precision under the condition of temperature change or long-time working, and cannot meet the stable measurement requirement in the dynamic application environment. Therefore, there is a need for an angle calculation method with environmental adaptation that compensates for nonlinear errors in real time, suppresses dynamic disturbances, and improves the accuracy and reliability of triaxial accelerometer based angle measurements. Disclosure of Invention The embodiment of the invention provides an angle calculating method and system based on a triaxial accelerometer, which can solve the problems in the prior art. In a first aspect of an embodiment of the present invention, there is provided a method for calculating an angle based on a triaxial accelerometer, including: The method comprises the steps of acquiring acceleration signals of a triaxial accelerometer, preprocessing the acceleration signals to acquire effective acceleration components of each axis, constructing a nonlinear error feature vector based on the effective acceleration components, carrying out real-time parameter identification on the nonlinear error feature vector through a recursive least square method, and establishing a nonlinear error compensation model; And dynamically correcting the output of the nonlinear error compensation model by adopting a self-adaptive sliding time window, substituting the acceleration signals subjected to nonlinear error compensation and dynamic correction into an angle solution equation, calculating the pitch angle and the roll angle of the triaxial accelerometer, and outputting the pitch angle and the roll angle as final angle solution results. Acquiring acceleration signals of the triaxial accelerometer, preprocessing the acceleration signals, and acquiring effective acceleration components of each axis comprises: Respectively performing wavelet threshold filtering and Kalman filtering on acceleration signals of the triaxial accelerometer, and performing weighted fusion based on covariance matrixes of filtering results; and carrying out coordinate transformation on the fused acceleration signals according to three orthogonal directions of a navigation coordinate system, and extracting effective acceleration components of each axis by adopting a self-adaptive threshold segmentation detection method. Constructing a nonlinear error feature vector based on the effective acceleration component, performing real-time parameter identification on the nonlinear error feature vector by a recursive least square method, and constructing a nonlinear error compensation model comprises the following steps: Acquiring an acceleration measurement value of an inertial navigation system, filtering the acceleration measurement value through digital filtering, and extracting an effective acceleration component in the acceleration measurement value; Based on the effective acceleration component, carrying out Taylor series expansion on the effective acceleration component and a corresponding temperature value thereof, and constructing a nonlinear error feature vector comprising an acceleration nonlinear term, a temperature nonlinear term and a cross term thereof, wherein the nonlinear error feature vector obtains second-order and above nonlinear term coefficients through Taylor series expansion; And c