Our previous Fundamentals series covered the broader flight controller architecture and MCU selection pipeline. Moving into our Sensors series, this first installment breaks down the fundamentals of the Inertial Measurement Unit (IMU)—the core sensor of any flight controller. Understanding how MEMS sensors measure angular velocity and acceleration, alongside their inherent error characteristics and limitations, is a strict prerequisite for accurate state and attitude estimation.
What is an IMU?
An IMU (Inertial Measurement Unit) is an electronic module that integrates a 3-axis gyroscope and a 3-axis accelerometer into a single package, outputting a total of 6 degrees of freedom (6DOF) of inertial data. While some high-performance IMUs include an onboard 3-axis magnetometer for a 9DOF configuration, standard industrial FC design separates the magnetic sensor onto its own dedicated chip (the compass) to isolate it from onboard power lines.
The IMU is the single most critical sensor on a UAV. Even in GNSS-denied environments or under heavy radio interference, a vehicle can maintain short-term attitude estimation as long as the IMU functions correctly. Conversely, if the IMU fails or outputs corrupted data, the FC loses its ability to stabilize the aircraft. This is why our hardware design checklists highly recommend implementing redundant IMU arrays.
Working Principle of MEMS Gyroscopes
The gyroscopes used in modern flight controllers are manufactured using MEMS (Micro-Electro-Mechanical Systems) technology. Unlike legacy mechanical gyroscopes that rely on a spinning mass, MEMS gyroscopes detect angular velocity by leveraging the Coriolis effect.
Inside the silicon chip is a micro-machined structure called a proof mass. This mass is driven to oscillate continuously at a known high frequency and amplitude. When the vehicle rotates, a Coriolis force acts on the mass in a direction perpendicular to its axis of oscillation. The resulting microscopic displacement of the proof mass alters the internal capacitance, which the onboard circuitry translates into an angular velocity readout.
The Coriolis force $F$ is defined by the following equation:
$$F = 2m \cdot (\mathbf{v} \times \boldsymbol{\omega})$$
Where $m$ is the mass of the proof mass, $\mathbf{v}$ is its instantaneous velocity vector, and $\boldsymbol{\omega}$ is the input angular velocity vector to be measured. Because $m$ and $\mathbf{v}$ are tightly controlled constants established during the manufacturing process, measuring the resulting physical force $F$ yields a precise measurement of the angular velocity $\boldsymbol{\omega}$.
Because these internal MEMS structures are fabricated at the micrometer scale, the entire silicon footprint occupies only a few square millimeters. This allows modern components like the ICM-42688-P to house a full 3-axis gyroscope and 3-axis accelerometer inside a tiny $3 \times 3 \times 0.9\text{ mm}$ package.
Working Principle of MEMS Accelerometers
MEMS accelerometers measure linear acceleration by tracking the displacement of a proof mass suspended by silicon micro-springs. When an external acceleration is applied to the chip, the proof mass lags behind due to inertia, deflecting the springs. This structural deflection is measured by detecting changes in differential capacitance or through the piezoelectric effect.
When a drone is resting completely stationary, its accelerometer continuously registers the earth's gravitational acceleration ($\approx 9.81\text{ m/s}^2$). Far from being a flaw, this behavior is a vital tool for attitude estimation. If the aircraft is perfectly level, the sensor reads $1\text{ g}$ on its Z-axis and $0\text{ g}$ on its X and Y axes; mapping these relationships yields the exact roll and pitch angles.
However, because an accelerometer cannot distinguish between actual vehicle acceleration and the gravitational vector on its own (due to Einstein's equivalence principle), its outputs must be fused with high-rate gyroscope data.
Understanding IMU Error Characteristics
MEMS sensors are vulnerable to a distinct set of deterministic and stochastic errors. Mastering these characteristics is necessary for tuning Extended Kalman Filters (EKF) and designing robust vehicle frames.
- Sensor Noise: High-frequency variations stemming from internal electronic thermal noise and mechanical micro-fluctuations. A gyroscope's noise density is represented by its ARW (Angle Random Walk) metric, measured in $\text{deg}/\sqrt{\text{hr}}$. A lower ARW means the integrated angular error grows more slowly over time.
- Bias Offset: The static error offset present when the sensor is completely stationary. Gyroscope bias is highly critical; integrating even a tiny non-zero bias value over time causes the calculated orientation to drift indefinitely (known as gyro drift). This is why ArduPilot samples stationary sensor data to calculate and cancel out the baseline bias during its boot sequence.
- Bias Stability (In-Run Bias Instability): Specifies how the baseline bias fluctuates over time, measured in $\text{deg}/\hr$. An IMU's bias will shift between initial power-on and thermal equilibrium, and it changes continuously with ambient temperature shifts. High-grade IMUs offer excellent bias stability, ensuring that orientation calculations remain reliable over long flights.
- Scale Factor Error: The ratio error between the true physical input and the raw sensor output. For example, if the aircraft rotates at exactly $100\text{ deg/s}$ and the sensor registers $101\text{ deg/s}$, it has a scale factor error. This error becomes more pronounced during high-rate, aggressive maneuvers.
- Cross-Axis Sensitivity: Structural crosstalk where an acceleration or rotation along a single axis induces a minor false reading on an orthogonal axis. This is caused by manufacturing tolerances and is typically kept below a few percent in high-quality silicon.
- Temperature Dependency: Thermal gradients alter both the mechanical properties of the silicon springs and the performance of the readout electronics. High-performance IMUs contain embedded temperature sensors and internal factory calibration tables to apply corrections in real time. ArduPilot also includes a built-in automated thermal calibration routine, tracking sensor drift inside an oven or specialized enclosure to generate a custom compensation curve for the flight controller.
Modern IMU Internal Architecture
Taking the industry-standard ICM-42688-P as a reference example highlights the internal processing architecture of a modern IMU:
Onboard ADCs and Digital Filtering
The raw analog micro-signals generated by the MEMS structures are digitized using high-resolution onboard Analog-to-Digital Converters (ADCs). The ICM-42688-P samples the internal MEMS structures at a native rate of up to $32\text{ kHz}$. It passes this high-rate data through a configurable internal Digital Low-Pass Filter (DLPF) to prevent aliasing before outputting data at the user-defined Output Data Rate (ODR).
The ODR must be closely matched to the execution frequency of the flight controller's primary control loops. For an $8\text{ kHz}$ inner attitude loop, an $8\text{ kHz}$ sensor ODR is ideal.
Internal FIFO Buffers
Modern IMUs incorporate built-in First-In, First-Out (FIFO) memory blocks to buffer sensor samples before they are read by the MCU via the SPI bus. This hardware buffer absorbs any minor operating system or SPI communication latency on the MCU, preventing data drops and ensuring an unbroken, evenly spaced data stream.
Data Ready (DRDY) Interrupts
The IMU signals the MCU immediately when a new sample is ready using a physical DRDY pin. ArduPilot routes this line directly to an external hardware interrupt (EXTI) pin on the STM32. Triggering the core attitude loop directly from the IMU's hardware timer minimizes control loop jitter (timing variation), maximizing loop stability.
Head-to-Head Comparison of Key Flight Controller IMUs
Sensor ModelPrimary Target MarketAccel RangeGyro RangeMax ODRNotable Characteristics
ICM-42688-P
(TDK InvenSense)
Industrial / Premium UAV$\pm 16\text{ g}$$\pm 2000\text{ dps}$$32\text{ kHz}$The current standard choice for industrial platforms like the Cube Orange+ and Pixhawk 6C. It offers excellent noise density and mature driver support.
BMI088
(Bosch Sensortec)
High-Vibration Industrial$\pm 24\text{ g}$$\pm 2000\text{ dps}$$2\text{ kHz}$Features a dual-die architecture that physically separates the accelerometer and gyroscope into distinct cavities. Highly resistant to high-frequency mechanical vibration.
ICM-20689
(TDK InvenSense)
Legacy / FPV$\pm 16\text{ g}$$\pm 2000\text{ dps}$$8\text{ kHz}$A previous-generation sensor found on older hardware. While its noise performance is inferior to the 42688-P, its driver implementation is rock-solid.
LSM6DSO32X
(STMicroelectronics)
High-G / Acrobatic$\pm 32\text{ g}$$\pm 2000\text{ dps}$$6.66\text{ kHz}$Offers an extended $\pm 32\text{ g}$ accelerometer scale, preventing sensor saturation during violent, sudden aerodynamic maneuvers.
Critical Hardware Layout Guidelines for the IMU
When designing a custom PCB, the performance of the chosen IMU depends heavily on its physical layout and routing constraints:
- Short, Guarded SPI Traces: Keep high-speed SPI traces as short as possible. To prevent fast clock edges (SPI_CLK) from cross-coupling noise into the master-in-slave-out (MISO) line, route them with ample clearance and insert source-termination resistors ($22\text{ }\Omega$ to $33\text{ }\Omega$) in series near the driving pins to suppress signal reflections.
- Proximal Decoupling Capacitors: Place decoupling capacitors ($0.1\text{ }\mu\text{F}$ and $1\text{ }\mu\text{F}$ ceramic capacitors in parallel) as close to the IMU power pins as possible—ideally within $1\text{ mm}$. This provides a low-impedance current source and filters out high-frequency noise from the power rails.
- Continuous Ground Plane: Maintain an unbroken ground reference plane directly beneath the IMU. Breaking this ground plane forces return currents to take longer paths, creating inductive loops that can pick up electromagnetic interference (EMI) from neighboring switching regulators.
- Thermal Isolation: Keep the IMU away from prominent onboard heat sources like the main MCU, power distribution rails, or high-current DC-DC converters. Placing the IMU near these components exposes it to sharp thermal fluctuations that degrade its bias stability. Position the IMU in a thermally isolated zone on the PCB, or design a dedicated software-controlled heating circuit around it to maintain a stable operational temperature.
Summary
An IMU is a 6DOF sensor that combines a MEMS Coriolis-based gyroscope with a spring-mass accelerometer. Understanding its core error sources—such as noise, bias drift, and thermal sensitivity—is essential for designing reliable hardware and configuring EKF algorithms. For modern industrial projects, the ICM-42688-P represents the standard choice. Achieving optimal performance from this sensor requires utilizing its hardware DRDY line to synchronize your MCU's control loops and following strict low-noise PCB layout principles.
In our next Sensors installment, FC7, we will discuss IMU Vibration Mitigation Strategies, exploring how to combine physical mechanical dampening mounts with digital software filtering to isolate your sensor data from motor noise.
