Quickly get the product information in one minute
Attitude and Heading Reference System (AHRS) is a key navigation device that uses multi-sensor data fusion to real-time calculate the three-dimensional attitude (pitch angle, roll angle) and heading angle of a carrier. Its core technologies involve fields such as microelectromechanical systems (MEMS), inertial navigation, signal processing, and nonlinear optimization. This article will explore technical aspects from three dimensions: mathematical models, algorithm implementation, and error compensation.
The core principle of AHRS is multi-sensor data fusion, which compensates for the limitations of a single sensor through complementary sensors.
a. Gyroscope: It measures angular velocity using the Coriolis effect and integrates it to obtain attitude changes, but there is zero bias drift (accumulated error over time).
b. Accelerometer: measures specific force (gravitational acceleration+motion acceleration) and can be used for attitude calibration (roll, pitch) at static or constant speed.
c. Magnetometer: measures the direction of the geomagnetic field, provides absolute heading (yaw angle), but is susceptible to hard/soft magnetic interference.
d. Optional GPS: Assist in correcting position and velocity errors.
Differential equation for carrier angular velocity and attitude update:
Among them, represents quaternion multiplication and
is the angular velocity measured by the gyroscope (in rad/s)
The core challenge of AHRS lies in how to integrate data from gyroscopes (with excellent dynamic response but drift), accelerometers (with high static accuracy but subject to motion interference), and magnetometers (providing absolute heading but susceptible to interference). The mainstream algorithms are as follows:
Based on the state space model, the attitude is iteratively estimated through prediction (gyroscope integration) and update (accelerometer/magnetometer observation).
The construction of the state vector is as follows, including attitude error angle and gyroscope bias
.
The residual of gravity vector measured by accelerometer and geomagnetic field measured by magnetometer are used as observation values, and the following observation equation is constructed:
In covariance tuning, the noise covariance of the accelerometer is usually set to
, and the noise covariance
of the magnetometer is set to
.
Weighted fusion of high-frequency gyroscope data and low-frequency accelerometer/magnetometer data. Its advantage is that it has a small computational load and is suitable for embedded systems; The disadvantage is that parameter tuning relies on experience and has limited dynamic performance.
The high-frequency part uses gyroscope integration, and low frequency calibration using accelerometers/magnetometers:
Time constant , usually takes
There are two main gradient descent optimization algorithms. The Mahony algorithm is based on quaternion nonlinear complementary filtering and corrects gyroscope bias through a PI controller; The Madgwick algorithm optimizes quaternions directly by minimizing the error function between sensor measurements and predictions, resulting in high computational efficiency and suitability for low-power scenarios.
Among them, is the convergence rate factor, with typical values ranging from 0.1 ~ 0.5 .
The zero bias of the gyroscope needs to be estimated and compensated online (such as through static state initialization); Motion acceleration can disrupt the measurement of gravity direction, therefore, dynamic interference from accelerometers needs to be detected through high pass filtering or motion state detection;
The influence of temperature changes on gyroscopes and accelerometers needs to be corrected by establishing a temperature compensation model;
The interference of magnetometer requires hard/soft magnetic calibration (ellipse fitting or calibration field based algorithm).
High frequency vibration causes an increase in accelerometer noise, requiring mechanical isolation or digital filtering. When performing rapid maneuvers (such as drone rolling), the accelerometer fails and a pure gyroscope needs to work for a short period of time.
High dynamic scenarios require algorithms to complete iterations in milliseconds (such as drone control cycles <10ms). Embedded platforms such as STM32 require optimization of floating-point operations or adoption of fixed-point number processing.
The collection of sensor data requires strict time synchronization, otherwise the fusion error will increase. The transmission delay of communication interfaces (such as SPI/I2C) needs to be compensated.
The system needs to converge quickly during startup (such as by initializing the accelerometer/magnetometer in a stationary state). The system design requires robust design against outliers (such as instantaneous interference from magnetometers).
a. Deep learning assisted fusion: using neural networks to model complex errors and nonlinear characteristics.
b. Multi source fusion enhancement: Combining vision (VIO), GNSS, or barometer to improve reliability in complex environments.
c. Progress in MEMS technology: Higher precision low-noise gyroscopes (such as MEMS optical gyroscopes) will reduce algorithm burden.
d. Edge computing optimization: algorithm lightweight for embedded AI chips (such as ARM Cortex-M7).
The technological evolution of AHRS is essentially a deep interweaving of mathematics, physics, and engineering practice. From real-time solving of quaternion differential equations to noise suppression of MEMS sensors, every technical detail directly affects the final performance of the system. With the improvement of edge computing capability and the practicality of high-precision sensors, the next generation of AHRS will achieve nanometer level angular vibration perception and fully autonomous anti-interference capability, giving unmanned systems space cognitive accuracy beyond human beings.
Xml سياسة الخصوصية المدونة خريطة الموقع
حقوق النشر
@ شركة مايكرو ماجيك كل الحقوق محفوظة.
دعم الشبكة