Control
Inertial Measurement Unit (IMU)
An IMU (Inertial Measurement Unit) is a measurement unit consisting of multiple inertial sensors, usually accelerometers, gyroscopes, and magnetometers. Since we live in a 3D space, there are three degrees of freedom (DOF) per dimension. A typical IMU provides 9 DOF: 3 axes of acceleration, 3 axes of gyroscopic rotation, and 3 axes of magnetic field measurement.
It is used to determine the position of an object (e.g., an airplane) in space relative to a reference system. Modern IMUs often rely on MEMS (Micro-electromechanical systems) technology, utilizing mechanisms like vibrating structures and capacitive sensing to detect motion.
Coordinate Systems
To successfully navigate, it is crucial to distinguish between two reference frames:
- Inertial Frame: A fixed reference frame (e.g., the Earth or "Global" frame). [cite_start]We need to know our position and velocity relative to this frame[cite: 470, 516].
- Body Frame: The reference frame attached to the satellite itself. [cite_start]The sensors (IMU) are fixed to this frame and rotate with the satellite[cite: 471, 518].
The Challenge: Sensors measure acceleration in the Body Frame. If the satellite rotates (e.g., spins while falling), the direction of "down" or "forward" changes relative to the sensors. [cite_start]To perform Dead-Reckoning, we must transform these measurements into the Inertial Frame using a rotation matrix derived from the Attitude Estimation[cite: 526, 551].
Attitude algorithm
Describe Orientations
To estimate displacement accurately in a 3D space, it is necessary to track the rotation of the object. This allows for the transformation of acceleration from the body frame (attached to the rotating object) to the inertial frame (fixed reference).
Euler Angles
Euler angles describe the orientation of a rotating object in 3D space using three angles: roll (
- Yaw (
): Rotation about the z-axis (vertical). - Pitch (
): Rotation about the y-axis (lateral). - Roll (
): Rotation about the x-axis (longitudinal).
However, Euler angles suffer from Gimbal Lock, a loss of one degree of rotational freedom that occurs when two rotation axes become aligned. In this state, the system can no longer distinguish rotation about one axis from the other, leading to unpredictable behavior.
Quaternions
Quaternions are an extension of complex numbers to 3D space, used to handle 3D rotations. A quaternion
where
Advantages over Euler Angles:
- Avoid Gimbal Lock: Unlike Euler angles, quaternions do not suffer from axis alignment issues.
- Smooth Rotations: They provide smooth, continuous rotations.
- Efficiency: They are more computationally efficient for combining rotations than rotation matrices.
Madgwick
The Madgwick filter is a computationally efficient sensor fusion algorithm designed for IMUs and MARG (Magnetic, Angular Rate, and Gravity) sensor arrays. It fuses data from the gyroscope, accelerometer, and magnetometer to compute an absolute orientation quaternion.
- Mechanism: It uses a gradient descent algorithm to compute the direction of the gyroscope error as a quaternion derivative. This optimization minimizes the error between the measured field vectors (gravity and magnetic field) and the reference field vectors.
- Key Feature: It requires a single adjustable parameter,
, which represents the magnitude of the gyroscope measurement error. This makes it easy to tune. - Application: Due to its low computational load, it is highly suitable for embedded systems like the one described in the slides (e.g., Teensy or Arduino-based CanSats).
Mahony
The Mahony filter is a complementary filter implemented on the Special Orthogonal group SO(3). It focuses on correcting the gyroscope bias to prevent drift.
- Mechanism: It estimates the error by calculating the cross-product between the estimated reference vectors (gravity/North) and the measured vectors from the accelerometer and magnetometer.
- Controller: This error is fed into a Proportional-Integral (PI) controller.
- The Proportional (P) term corrects the orientation immediately based on the error.
- The Integral (I) term estimates and compensates for the gyroscope bias over time.
- Comparison: While similar to Madgwick in performance for many applications, Mahony explicitly estimates the gyro bias, which can be advantageous in situations with significant temperature variations or sensor drift.
Positioning algorithm
Dead-Reckoning
Dead-reckoning is the technique of estimating velocity, direction, and distance traveled from a last known position without external aiding (like GNSS).
Process:
- Acceleration Measurement: Measure acceleration in all three spatial dimensions (
) in the body frame. - Coordinate Transformation: Convert acceleration from the body frame to the inertial frame using a rotation matrix
derived from the attitude estimation. - Double Integration:
- Integrate the transformed acceleration once to obtain velocity:
. - Integrate the resulting velocity to calculate displacement:
.
- Integrate the transformed acceleration once to obtain velocity:
Challenges:
- Drift: Sensor limitations and noise lead to errors that accumulate over time, causing the estimated trajectory to diverge from the actual path.
- Noise: Small errors in acceleration result in quadratically growing errors in position due to double integration.
Kalman filter
The Kalman filter is an optimal estimation algorithm used to fuse noisy sensor data and estimate the state of a system (such as position and velocity). It is particularly useful for correcting the drift inherent in dead-reckoning.
Concept:
It operates in a two-step cycle:
- Predict: Estimates the current state variables (e.g., position, velocity) and their uncertainties based on the physical laws of motion (system dynamic model).
- Update: Corrects the predicted state using new noisy measurements (e.g., from GPS, Barometer, or Accelerometer).
In the context of the slides, a Kalman filter is shown to estimate vertical velocity and position by fusing IMU data with barometer data, providing a trajectory solution that is more stable than raw sensor integration.