## Sensors

To collect flight information the system had to be fitted with numerous sensors. The most relevant parameters for basic in flight stabilization are altitude and attitude, which describes the aircraft's rotation angles. As space and payload capacity on the proposed model are limited only MEMS-sensors where chosen. To provide the necessary data the system was equipped with the following sensors:

### Magnetometer

Tracks magnetic north for navigation reference

### Barometer

Measures air pressure for altitude estimation

### Accelerometer

Measures linear acceleration of the aircraft and the gravity vector

### Gyroscope

Tracks angular velocity to estimate flight attitude

## System State Estimation

Many MEMS-devices offer a high update rate in a physically small package, posing non-optimal conditions to perform the actual measurement. This introduces unwanted sensor noise into the system. The simplest way to deal with this noise is the implementation of an LPF (Low Pass Filter). These filters have a given cutoff frequency and suppress any parts of a signal that exceed said threshold. This however comes at a tradeoff for latency as stronger smoothing introduces a larger signal delay. This meant that LP-Filters could only be used to some extent.

A more advanced approach on signal processing is the implementation of a linear quadratic sate estimator, also known as Kalman Filter. These filters start with a known system state h(k) at discrete timestep k. Given the dynamics of the observed system it is possible to make an estimate of the following system state ĥ(k + 1). This estimate is then combined with the actual measurement z(k + 1).

The estimate ĥ(k + 1) and the measurement z(k + 1) are both associated with an uncertainty. The first represents the filter's prediction error, caused by the utilization of the idealized system dynamics, while the other is a result of the before mentioned measurement error. The two states can then be merged, causing the uncertainty of the fused state to decrease.

## Filter Equations

Following are the equations of the classic Kalman Filter. Here x is a vector of the same dimension as the system's DOF and represents the state of the plant. P is the uncertainty associated with x in form of a covariance matrix. In the prediction step of the filter x and P are transformed using matrix A, which holds the linearized plant dynamics. Here the addition of Q represents the increased inaccuracy of the predicted result (i.e. the prediction error). The formed estimate x̄, P̄ is then fused with the measurement vector z. Here K' is the inverse of the Kalman gain, which performs the corrective step. It is computed from the covariance P and the measurement matrix H that maps a system state vector to the appropriate measurement vector z. The uncertainty introduced through measurement errors is incorporated by adding the measurement noise matrix R.

Predition Step

Predition Step

## Results

Below are results of the aircraft's altitude estimator. The measured variables where vertical acceleration from the accelerometer and the approximate height derived from the barometer using the international altitude formula. The grey markings show the actual measurements, red shows the ground truth reference and orange is the filter's output. The diagram shows that the system achieves a substantial noise reduction after the first initiation period.