Studies of 4-rotor unmanned aerial vehicle UAV in the field of control system

The key goal of this work was to develop a functional mathematical model of a 4-rotor UAV, including regulatory apparatus and identification of its parameters. The functionality of a quadrocopter traffic control has been reduced to solving differential equations that define the motion and dynamics of an unmanned aerial vehicle. It should be noted that the synthesis of the quadrocopter control system is not an easy task, due to the non-linear nature of the dynamics of this object and its structural instability. Therefore, in this article the tested object UAV was accepted as a physical model, which may cause potential material damage resulting from damage to the device as well as other elements that are located in its immediate surroundings. In addition, the article discusses the problem of improving the quality of the estimation rate of climb of unmanned aircraft of vertical takeoff and landing UAV, this problem was considered for the object in the low-ceiling range, i.e. in the range of 0-6 m, so the issue concerns autonomous take-off and landing. For the presentation of the results, the 4-rotor UAV was used, with the use of a proportional-integralderivative PID controller in the context of the control system. The obtained results were supported by research and analysis of real results the discussed algorithm was implemented in the 4-rotor UAV driver.


Introduction
When reviewing and making a preliminary analysis of the literature in the scope of the subject of the research it should be noted that currently there are many developed methods of controlling Unmanned Aerial Vehicles (UAVs).Such methods include: classic control, linearquadratic regulator, backstepping method, sliding mode control, non-linear control and reinforcement learning.
Classic control -the controller consists of three parts: proportional, integral and differential.The proportional member is responsible for the basic feedback, integral removes the determined states, and differential adds damping to the controller.Research has shown that this type of control makes it possible to perform hovering, but it does not work in terms of four-rotor UAV control during severe air disturbances.In addition, when flying at low speeds with small aerodynamic disturbances, classic control is sufficient to maintain full control of the UAV.When flying at higher speeds, the multi-rotor UAV becomes very sensitive to external factors, so other control methods must be used [1], [2], [3].
Linear-quadratic regulator -this type of control is characterized by the independent use of the Riccati equation.During the tests, it was noticed that the tilting and inclination of the multi-rotor UAV significantly oscillates, making the aircraft not able to make a hover.Despite many attempts, it was not possible to achieve a satisfactory result.Continuous work (activity) -as the results of research on the control method using a linearquadratic controller proved to be insufficient, the focus was on a different type of control.This technique can rapidly stabilize the chain of integrators with the limit entry.Preliminary experiments have shown that such cheap systems are classified at a satisfactory level.
Backstepping method -this type of control principle is designed based on the Lyapunov stability criterion.The main idea of this project is to step back through the system to provide control.It is particularly useful when certain states are controlled by other states, as is the case with the dynamics of the four-rotor UAV.
Sliding Mode Control -this is a type of control using non-linear systems, in which the dynamics of a nonlinear system is modified by using a discontinuous control signal.The variables of the feedback loop state in this case are not a function of time.
Non-linear control -control is carried out by converting a known non-linear system to the corresponding linear one, by changing the components and the corresponding control input.A specific nonlinear control type is dynamic non-linear inversion.The non-linear model is presented as linear and inverted.The linear system created in this way is placed in the inner loop, and the outer loop is added to the inner loop control.
Reinforcement learning -in this case, the non-linear and non-parametric control model is initially constructed based on flight data, approximating the random Markov processes.Then, the appropriate algorithm searches for the appropriate control method that can be implemented on embedded microprocessors.
This type of control is sensitive to interferences that have not been previously stored in the system.In addition, special changes in the battery charge level and damage to the rotor blades can reduce the stability or steady state of the delay.After analyzing the key fourmotor control strategies of the UAV, it can be concluded that not all of them lead to similar results.
Comparing the advantages and disadvantages of the presented solutions, the classic control method proved to be the best choice.Despite the simplest design, it works well enough in application in a four-rotor UAV, used in a confined space, and therefore further considerations will be made on this basis [4], [5].

Mathematical model of 4-rotor UAV in the field of control
When approaching the mathematical description (model) of a multi-rotor UAV in terms of control, it should be noted that the development of a dynamic UAV model, including its simulation, is necessary first of all in the aspect of testing in the field of navigation and control in a closed room.The model of dynamic equations, describing the character and position of the 4-rotor UAV, is a fundamentally immovable construction with six degrees of freedom and four entrances.The dynamic model of the 4-rotor UAV system has already been thoroughly examined, tested and compared to the actual flight test results, therefore, it is sufficiently reliable to be used as a basis for simulating the model, without taking into account the additional effects that have been investigated in other publications [6], [7], [8].
The modeling process was started from defining the reference system, with two systems being distinguished in this respect.One of them is the gravitational system (associated with the Earth), described with axes 0        , allowing to determine the motion of the aircraft (not taking into account the rotation of the Earth).In turn, the second system is the structural system (associated with aircraft), described in the axes 0        , allowing to determine (in connection with the gravitational system) the spatial position of the aircraft [9], [10], [11].The above systems are presented in the figure below (Fig. 1).

Fig. 1. Gravitational and structural reference system
The current position of the 4-rotor UAV is described by three axes (x, y, z) with the center of gravity, taking into account the gravitational system.In turn, the current height is shown in the form of three Euler angles (, , ).These three angles are respectively defined by a deviation (- ), inclination (− In the next stage of the modeling process was the presentation of kinematic links (relationships) relating to motion and rotation in the inertial reference system, connected with the Earth to the structural system.
Derivatives with respect to time for angles (, , ) can be expressed in the following form [12]: in which  = [, , ]  are angular velocities with reference to the reference construction system, and (, , ) is a matrix that can be represented in the following form: It should be noted that the matrix (2) depends only on (, , ) and is reversible in case if its limits on (, , ) are maintained.Analogously, a derivative with respect to the position time (x, y, z) can be represented as: where:  0 = [ 0 ,  0 ,  0 ]  -is the current speed of the 4rotor UAV in relation to the reference system associated with the Earth.Determining by  = [, , ]  -the current UAV speed, expressed in the reference system associated with the aircraft, then  and  0 are bound by: where: (, , )describe the UAV rotation matrix: For the purpose of creating a UAV model, fully compatible with reality, later in the article some simplifications have been made, among others: the UAV structure is rigid and symmetrical, the rotors are rigid, and the product of the inertia matrix and the Earth effect can be omitted [13], [14].

Aerodynamic forces and moments acting on the rotor
Using the theory of the blade element, it is possible to calculate the forces acting in parallel and perpendicular to the rotor shaft and the moments acting on the shaft and the rotor hub.Assuming that the rotors are rigid, forces acting parallel to the rotor shaft are defined as a rotor series , while forces acting perpendicular to the rotor shaft act on the rotor hub .

Fig. 2. Forces and moments affecting the equator
In addition, there are two moments acting on the rotor: moment of resistance   and torque   .It can be assumed that the lifting force acting on the rotor blade is an order of magnitude higher than the resistance.Correspondingly, forces and moments will be defined for each rotor.In the figure above (Fig. 2), forces and moments are illustrated.
Thrust results from the forces acting on all components of the blade perpendicular to the rotor shaft, which can be written [15], [16]: In turn, the centrifugal force results from the forces acting on all blade elements in the horizontal plane, whereas the force being zero when the velocity is zero.
The moment of resistance results from all the forces acting on the center of the rotor in the horizontal plane, it determines the forces needed to maintain the rotation of the rotor: When considering the tilting moment, it should be noted that due to the fact that the blades are moving in the horizontal plane in the air, the leading blade will produce more lift than returning, which affects the total torque generated by the rotor, which can be written as:

Dynamic equations
Consider dynamical equations in the 4-rotor UAV range, initially it was assumed that the vector product of tensor of the moment of inertia  can be omitted in relation to its structure [17], [18].
Using the general equations of motion (9), written in the following form: where:   ,   ,   -are external forces acting on the frame and   ,   ,   -are external moments acting on the frame of the 4-rotor UAV.
In the further part of the paper, external forces and moments acting on the 4-rotor UAV arm were determined.

External forces acting on the arm of 4-rotor UAV
Forces acting along the axis  Centrifugal force -∑

𝑖𝑖=1
Friction - The forces acting on the hub in the forward flight during leading out of balance (  2 −   4 ) The forces acting on the hub in the traverse flight during leading out of balance (  1 −   3 )

Full dynamic equations of 4-rotor UAV
Combining the above equations we get: The above dynamic equations ( 13) constitute a complete model of the 4-rotor UAV with the previously given assumptions.However, it should be noted that despite the negligible impact of several factors (e.g. the occurrence of the earth effect), after performing appropriate tests, they may be considered when designing the next models.

Simplified model of the control system and filter design
For the design of the control system and the filter, the use of a simplified model is sufficient, because it allows easier estimation of filter operation and control principles.The simplified model is as follows [19], [20]: ̇= (  −   ) +  4 (14) where:  1 ,  2 ,  3 ,  4 -are the entries described in subsequent equations.During hover, the thrust   for each rotor is estimated as: (15) where: is the thrust ratio in hover.There is a similar relationship for torque    : where: is the coefficient of resistance.Therefore, in this case the entries can be described as [21], [22]:

Dynamic equations of the engine
Modeling of engine operation can be based on the following equations [23], [24]: where: is the drag coefficient during hovering, is the engine time constant,   -the torque constant,  the internal resistance of the engine, the engine efficiency and is the voltage at the engine input.
Assuming the linearity of the rotor speed around the point Ω 0 , the engine rotational speed in hover can be represented as: The relationship between the required angular velocity and the engine voltage is described mathematically in the form: Then, using the previous equations, you can introduce simplifications: In addition, the experiments carried out can be used to determine the relationship to calculate the voltage required by the torque and the thrust.By combining the previously given formulas, you can obtain a formula that allows you to calculate the output voltage of the engines: The above equation ( 22) is implemented to the block responsible for the operation of the engines during the simulation process in the Matlab/Simulink programming environment.

Structure of 4-rotor UAV control
As previously mentioned, the control mode chosen is a classic control, with the block reversing the engine operation added to the proposed control system.

Deviation control
Deviation is the least important channel that takes control into account, because it has no direct effect on the motion of the 4-rotor UAV.It can be independently tuned and tested, maintaining manual control in the other channels.Particular attention should be paid to the fact that different types of disturbances have a relatively small effect on the deviation, so no additional amplifiers are required to control the deviation direction.
All you need is a controller (driver) with low bandwidth connectors.The deviation control is described by the following formula [25], [26], [27]: The control process can also be represented by the following diagram (Fig. 3):

Tilting and inclination control
Because the 4-rotor UAV system is symmetrical, it can be assumed that the control of tilt and inclination at small angles is independent for each direction.In comparison to the deviation control, in this case a controller with a higher connection capacity is required, because the control in these directions is additionally directly related to the lateral acceleration in the x and y directions.
The tilt control is described in the following formula and diagram (Fig. 4):

Controller disposed in a vertical position z
When maneuvering above the influence of the earth effect, the output power of control U1 is approximately proportional to the vertical acceleration relative to the structural reference system.However, to maintain a constant height, a large U1 value is necessary to counteract the force of gravity [28], [29], [30].
In addition, in the case of classical control, an additional controller is added, which is responsible for stabilizing traffic in the z direction.The principle of operation can be described by the equation: The diagram describing the operation of the vertical position controller z is described in Figure 6:

Tracking the points
The diagram describing the operation of the vertical co-ordination points determine the point in the space where the 4-rotor UAV should fly (i.e.xd, yd, zd).In the case of hovering, only one point is needed, when a flight is made on a specific route, points and a time marker td must be created.There are two ways to do this: using discrete coordinate points or generating points via interpolation.
The second option is preferred, because in the case of entering incorrect information into the controller, its response is characterized by a smoother response than in the case of the first solution.In addition, the use of discrete points can cause system instability.

Research results of 4-rotor UAV in the field of control
Using the model described in the previous chapter, the discussed controller was tested in simulation in the Matlab/Simulink program.Using the parameters given in Table 1, the 4-rotor UAV is characterized by a stable hover.The results of the simulation are depicted in Figure 7.
The next figures (Figs. [8][9] show the results of the flight using the generation of coordination points by interpolation.

Conclusions
The selected type of control, i.e. classic control for each axis with an additional built-in controller responsible for maintaining the position, is able to ensure the stability of the 4-rotor UAV and enables flight on predetermined points in space.
Simulation of the use of control theory by means of the extended Kalman filter using infrared sensors shows that such a filter is able to correctly estimate the position of the object, hence it further improves the estimation of tilt angles, inclination and deviation of the 4-rotor UAV.
Additionally, when the polarization values of the accelerometers and gyroscopes decrease, the filter is still able to track the position of the device.In addition, this filter retains its observability even if there are not 6 infrared sensors in use, but five or four.Using three sensors, the filter loses observability, which results in the fact that estimation of the 4-rotor UAV position becomes impossible.

2
Moments acting on the arm of 4-rotor UAVMoments of tiltingGyroscope effect of the propeller   Ω  The tilt angle of the servomechanism (− 2 +  4 ) The power of inertia caused by traversing flight -ℎ ∑    4 =1 MATEC Web of Conferences 210, 05009 (2018) https://doi.org/10.1051/matecconf/201821005009CSCC 2018 The torque caused by the forward flight (-1)  ∑     4 =1Inclining momentsGyroscope effect of the propeller -  Ω  The tilt angle of the servomechanism ( 1 −  3 ) The power of inertia caused by traversing flight ℎThe forces acting on the hub in the forward flight during leading out of balance (  2 −   4 ) The forces acting on the hub in the traverse flight during leading out of balance (  1 −   3 ) initially it was assumed that the vector product of tensorMoments of tiltingGyroscope effect of the propeller   Ω  The tilt angle of the servomechanism (− 2 +  4 )The power of inertia caused by traversing flight Gyroscope effect of the propeller -  Ω  The tilt angle of the servomechanism ( 1 −  3 ) The power of inertia caused by traversing

Fig. 3 .
Fig. 3.The control loop of the deviation angle ψ

Fig. 5 .
Fig. 5. Horizontal position y calculated by the controller, for simplicity it is assumed that ψ≈0

Table 1 .Fig. 7 .
Fig. 7. Stability of the system in the hover.Initial parameters: 10° for deviation, tilt and inclination, and 0.5 m for position x, y, z.

Fig. 8 .Fig. 9 .
Fig. 8. Flight simulation by points created by interpolation Equations corrected for the deviation angle for the