Citation: Salwa, M.; Krzysztofik, I.
Application of Filters to Improve
Flight Stability of Rotary Unmanned
Aerial Objects. Sensors 2022, 22, 1677.
https://doi.org/10.3390/s22041677
Academic Editors:
Andrzej Łukaszewicz,
Wojciech Giernacki,
Zbigniew Kulesza, Jaroslaw Pytka
and Andriy Holovatyy
Received: 12 January 2022
Accepted: 18 February 2022
Published: 21 February 2022
Publisher’s Note: MDPI stays neutral
with regard to jurisdictional claims in
published maps and institutional affil-
iations.
Copyright: © 2022 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).
Article
Application of Filters to Improve Flight Stability of Rotary
Unmanned Aerial Objects
Maciej Salwa and Izabela Krzysztofik *
Faculty of Mechatronics and Mechanical Engineering, Kielce University of Technology, Aleja Tysi ˛aclecia Pa ´nstwa
Polskiego 7, 25-314 Kielce, Poland; maciejsalwa@tu.kielce.pl
* Correspondence: pssik@tu.kielce.pl
Abstract:
The most common filters used to determine the angular position of quadrotors are the
Kalman filter and the complementary filter. The problem of angular position estimation consist is
a result of the absence of direct data. The most common sensors on board UAVs are micro electro
mechanical system (MEMS) type sensors. The data acquired from the sensors are processed using
digital filters. In the literature, the results of research conducted on the effectiveness of Kalman and
complementary filters are known. A significant problem in evaluating the performance of the studied
filters was the lack of an arbitrarily determined UAV position. The authors of this paper undertook the
task of determining the best filter for a real object. The main objective of this research was to improve
the stability of the physical quadrotor. For this purpose, we developed a research method using a
laboratory station for testing quadrotor drones. Moreover, using the MATLAB environment, they
determined the optimal parameters for the real filter applied using the PX4 software, which is new
and has not been considered before in the available scientific literature. It should be mentioned that
the authors of this work focused on the analysis of filters most commonly used for flight stabilization,
without modifying the structure of these filters. By not modifying the filter structure, it is possible to
optimize the existing flight controllers. The main contribution of this study lies in finding the most
optimal filter, among those available in flight controllers, for angular position estimation. The special
emphasis of our work was to develop a procedure for selecting the filter coefficients for a real object.
The algorithm was designed so that other researchers could use it, provided they collected arbitrary
data for their objects. Selected results of the research are presented in graphical form. The proposed
procedure for improving the embedded filter can be used by other researchers on their subjects.
Keywords: extended Kalman filter; complementary filter; quadrotor; PX4; MATLAB; ROS
1. Introduction
The Kalman filter and the complementary filter are the most popular filters for deter-
mining the angular position of unmanned aerial vehicles (UAVs). The problem of angle
estimation is the absence of direct data. The most common sensors on board UAVs are micro
electro mechanical system (MEMS) sensors. Basic sensors are used, such as accelerometer,
gyroscope, magnetometer sensors. The data acquired from the sensors are processed by
using digital filters. The Kalman filter has been studied in [
1
–
7
]. Publications are available
in which the authors have undertaken modifications to the structure of the Kalman filter.
In 2015, Xiong, J.J., and Zheng, E.H. [
8
] developed an optimal Kalman filter (OKF) for
quadrotor position estimation. In 2019, Alawsi, A.A.A., Jasim, B.H., and Raafat, S.M. [
9
]
developed the unscented Kalman filter (UKF). In both these papers, the authors worked
exclusively on simulation objects. Information about the complementary filter and its use
in UAV navigation can be found in references [
10
–
13
]. The problem so far in evaluating
the filter’s performance has been the lack of an arbitrary UAV position. One of the first
attempts to compare the two filters was made by Walter Higgins [
14
]. In his 1975 paper, he
compared only the theoretical operation of the filters. The authors of reference [
15
] used a
Sensors 2022, 22, 1677. https://doi.org/10.3390/s22041677 https://www.mdpi.com/journal/sensors