DESIGNING ADAPTIVE PID CONTROLLER NON-SENSITIVE TO CHANGES IN AERODYNAMIC CHARACTERISTICS OF AN UNMANNED AERIAL VEHICLE

Since the flight process of an unmanned aerial vehicle (UAV) has a high nonlinear characteristic and high sensitivity to external disturbances [5], PID control cannot meet technical characteristics of the UAV system as constant gain of the PID controller is necessary. An adaptive controller, such as adaptive control model sample that could learn and adapt to changes in drone dynamics is needed. Each fault, such as wing lock, velocity overload or aileron failure, is a set of aerodynamic parameters and coefficients that represent a new mathematical model of a control object in a spatial state. The aerodynamic model of an object can be affected by the lift coefficient, drag coefficient, torques [4, 6]. The reference model is calculated by computing the coefficients with the ANSYS-CFX software and the calculation is confirmed experimentally. Errors are also modeled by this software, and variation ranges of each coefficient are a set of failures. Using this adaptive control, the maximum operating range of aerodynamic coefficients of the model is determined. Development of an automatic control system adjustable to changes in aerodynamic characteristics of the vehicle based on the synthesized high-order models is relevant, since its implementation will increase the stability of both the system and the aerial vehicle – unmanned aerial vehicle. In addition, the use of this system will ensure maintaining the functional properties of the aerial vehicle when performing a target task, and the introduction of this system does not require significant hardware transformations.


Introduction
Since the flight process of an unmanned aerial vehicle (UAV) has a high nonlinear characteristic and high sensitivity to external disturbances [5], PID control cannot meet technical characteristics of the UAV system as constant gain of the PID controller is necessary.An adaptive controller, such as adaptive control model sample that could learn and adapt to changes in drone dynamics is needed.Each fault, such as wing lock, velocity overload or aileron failure, is a set of aerodynamic parameters and coefficients that represent a new mathematical model of a control object in a spatial state.The aerodynamic model of an object can be affected by the lift coefficient, drag coefficient, torques [4,6].The reference model is calculated by computing the coefficients with the ANSYS-CFX software and the calculation is confirmed experimentally.Errors are also modeled by this software, and variation ranges of each coefficient are a set of failures.Using this adaptive control, the maximum operating range of aerodynamic coefficients of the model is determined.
Development of an automatic control system adjustable to changes in aerodynamic characteristics of the vehicle based on the synthesized high-order models is relevant, since its implementation will increase the stability of both the system and the aerial vehicle -unmanned aerial vehicle.In addition, the use of this system will ensure maintaining the functional properties of the aerial vehicle when performing a target task, and the introduction of this system does not require significant hardware transformations.

Literature review and problem statement
To date, much attention is paid to the implementation of various approaches to the adjustment of aerial vehicle control systems to changes in aerodynamic characteristics [1,2].In [3,4], one of the promising ways to ensure stable operation of automatic control systems of aerial vehiclesintellectualization of onboard equipment is proposed.At the same time, the process of intellectualization consists in enabling the system to self-diagnose, and then, by the results of the diagnosis, adjust to the real working conditions, thereby increasing efficiency.
In [5,6] it is indicated that the development and implementation of intelligent control systems of unmanned aerial vehicles is a relevant area for both modern and advanced unmanned aircraft systems.The achievements are based on the fact that adaptability to changing flight conditions of the vehicle is ensured by using multi-level control algorithms.
The authors of [7,8] identify the following necessary and sufficient conditions of stability of a control system to uncertainties: the presence of robustness properties in the system
In [11,12], systems capable of countering failures in actuators by the implementation of algorithmic adjustments are presented, but these adjustments do not take into account changes in the vehicle motion parameters and changes in environmental characteristics.
Thus, the use of the known approaches and tools when creating aerial vehicles insensitive to changing flight conditions and failures does not allow the aerial vehicle to perform target tasks at the required level.This is confirmed by the results of the literature review and open statistical information on operation duration, as well as laboratory facilities of the Department of Mechatronics and Electrical Engineering of the National Aerospace University "Kharkiv Aviation Institute", Ukraine (Fig. 1).

Fig. 1. Statistics of pilot and laboratory studies [1]
Consequently, the relevance of the implementation of automatic control systems with the properties of adjusting to actual flight conditions is growing.This should be taken into account when designing the automatic control system of an unmanned aerial vehicle, in particular, in the absence of accurate aerodynamic data.Thus, the extension of the approach [13,14] to designing automatic control systems, adjustable to changes in aerodynamic parameters is promising.In this case, the implementation of adaptive PID controller on board the aerial vehicle with high-order models and changing coefficients previously obtained in the ANSYS-CFX simulation package can be considered reasonable.

The aim and objectives of the study
The aim of the study is a synthesis of an adjustable PID controller on high-order models of the UAV automatic control system, which will provide the required quality indicators of vehicle motion in changing environmental conditions and object parameters.
To achieve the aim, the following objectives are set: -to determine UAV mass-inertia characteristics in the SolidWorks environment; -to determine UAV aerodynamic characteristics in the ANSYS CFX environment; -to investigate the influence of deflection of the control surfaces on UAV aerodynamic parameters; -to perform a simulation of the synthesized adaptive PID controller in the Matlab environment and conduct its experimental testing on the operating UAV model.

1. Determination of UAV mass-inertia characteristics in the SolidWorks environment
In order to obtain the parameters of the inertia tensor of UAV of the presented dimensions necessary for determining the parameters of longitudinal and lateral motion models, we use the SolidWorks automated design system.
The process of building a model is based on creating elementary geometric primitives and performing various operations between them.The model is built of standard elements and can be modified by either adding/removing these elements or changing the characteristic parameters of the elements.In the process of modeling, it is not the part that is developed, but the algorithm (sequence of operations) of its creation.Thus, the dimensions and geometric relationships between the elements that determine the shape of a particular product are set [3].
The modeling process begins with a sketch or cross section.Then the sketch with the help of a specific structural element acquires a three-dimensional form (Fig. 2).

Fig. 2. Modeling of the control object in SolidWorks
Using the generated 3D model, the inertia tensor parameters were determined in SolidWorks: In order to obtain the parameters of the models of lateral and longitudinal motion of SAV, it is necessary to conduct studies of its aerodynamic characteristics.

2. Determination of UAV aerodynamic characteristics in the ANSYS CFX environment
The aerodynamic characteristics of the studied UAV are obtained using the ANSYS CFX software package based on solving Reynolds-averaged Navier-Stokes equations in a wide range of flight parameters.Further, the results of modeling will be estimated by comparison with experimental data.
The layout of the studied UAV is presented in Fig. 3. UAV geometric dimensions are assumed to be equal to those of the physical model used in wind-tunnel tests.The program module that performs calculations is based on the finite volume method.With this approach, to achieve the required accuracy and convergence of the solution, it is important to build a rational computational grid.
Fig. 4 shows the dependences of lift (Cy), drag (Cx) coefficients of the UAV on the angle of attack α for a number at a velocity of 10 m/s compared to the experiment and modeling [9][10][11][12][13][14].On the basis of the obtained UAV characteristics, UAV reference linear models were formed, which became the basis for the subsequent synthesis of the adjustable PID controller of the UAV automatic control system with the fourth-order model.
The resulting reference model with unchanged characteristics was implemented in Matlab and brought to the level of 10 % coincidence with real flights.Further, research will be focused on the synthesis of one loop of the adjustable PID controller.
Based on the synthesized reference model, it is necessary to synthesize the model of a parametrically perturbed UAV motion -with varying coefficients [8,11].
The simplified reference model of UAV motion has a number of input and output parameters.Input parameters are propeller velocity, deflection angles of UAV aerodynamic surfaces, for example, v-tail.Output parameters are velocity, pitch rate, pitch angle, flight altitude (Fig. 5).
The model, perturbed by parametric changes, as well as the reference model, has the same structure and the same order, with the additions related to the modeling of an abnormal situation.Further, we consider the effect of aerodynamic angles, as well as the tail (v-tail) and aileron deflections of the studied UAV on the UAV longitudinal velocity (Fig. 6).Fig. 6.Object of the study

3. Study of the effect of deflection of control surfaces on changes in UAV aerodynamic parameters
It is known that by changing the angle of attack and velocity, the lift coefficient changes.On the basis of the conducted research [10], the table of influence of these parameters was formed (Table 1).
The obtained results reflect statistical correlation close to unity 0.99888, 0.99925 (Table 1).These values are used to adjust the UAV velocity depending on the angle of attack in order to maintain a certain value of lift coefficient or desired altitude by changing thrust or stabilizing the UAV velocity by correcting the angle of attack.This cross-impact allows countering a number of failures associated, for example, with the locking of aerodynamic surfaces.The results of influence of some parameters on others at an SAV velocity of 10 m/s are shown in Fig. 7, 8.The values of lift and drag coefficients depend not only on the aerodynamic angles, but also on the area of deflecting aerodynamic surfaces: where F x and F z are the forces of influence on the UAV, С z and C x are the lift force variation coefficients, V is velocity, S is area, ρ is air density.
In order to study the influence of deflection angles of aerodynamic surfaces on the values of forces, we expand (1), (2) into a Taylor series to obtain linearized analytical dependences for the aerodynamic coefficients: where e δ is deflection; q is the effect of variation of the object deflection angle on the lifting force and drag; C L (α), C D (α) are the values of drag and lift coefficients in the minimum angle of attack of the object.
Fig. 9 shows the range of aerodynamic coefficients depending on deflection of one or another aerodynamic surface [7,8].
Based on the variation of aerodynamic coefficients, the mathematical model of the control object in the spatial state with varying coefficients in the obtained intervals was synthesized: where V is the velocity in the X axis, v is the pitch rate, v a is the pitch angle, y is height, δ tail is the tail effect on the UAV, δ e is the engine effect.  .

Synthesis of the adjustable PID controller of the UAV automatic control system with the fourth-order model
The structure of the synthesized adaptive automatic control system with the fourth-order reference mathematical model [11,12] is shown in Fig. 11.In longitudinal motion, velocity, pitch rate and pitch angle control can be performed using three types of feedback.In the first form, the PID controller manages the axial velocity (thrust control by changing the engine velocity).In the second form, the PID controller in the internal feedback stabilizes the pitch rate, while the external feedback loop controls the desired pitch angle [15] (Fig. 12).
By simple transformations, for the subsequent synthesis, on the basis of the reference model, the transfer function ( 9) was synthesized: Similarly, the transfer functions of the PID controller and the adjustment loop were obtained: ; bs c plant s a s a s a ; ; On the basis of the obtained analytical dependences, the block diagram of the reference model of the adaptive control system in the velocity channel is shown in Fig. 13.Using the second Lyapunov law or the MIT rule, it is possible to synthesize the control law that ensures the asymptotic stability of the system.For the synthesis, we use the MIT rule: The difference between the Lyapunov method and the MIT rule is the way the error is determined.In the Lyapunov method, the input signal is compared with the output signal of the object, while in the MIT rule the output signal of the model is compared with the output signal of the object [11,12].
Using the MIT gradient rule: ; we determine the parameter values of the PID controller: Thus, analytical dependencies of the adjustable coefficients of the adaptive PID controller, which minimize the effect of changes in UAV aerodynamic characteristics and increase the stability of the control system of the unmanned aerial vehicle are synthesized [11,13].

Modeling of the adaptive PID controller in Matlab and experimental testing on the operating UAV model
The block diagram of modeling in the Matlab program is shown in Fig. 16, and the coefficient regulation of adaptive control GAMMA=0.001.
Each block presented in Fig. 14 was synthesized and implemented as follows:  The results of modeling of adaptive PID control of the UAV in the velocity channel are shown in Fig. 15.
Analysis of the results of modeling the adaptive PID controller showed that the output signal of the object almost coincides with the reference model, if there are two disturbances at 10 s and 10.1 s.These disturbances were associated with tail deflection, and it affected the velocity of the object (Fig. 15).Fig. 16 shows velocity control of the UAV.The velocity value was compared with the control results of the standard PID controller and the adaptive PID controller.The value of the reference model is displayed in green, control using the adaptive PID controller is displayed in blue, control using the standard PID controller is displayed in red.The values of the adaptive PID controller are closest to the reference value, and control through it is optimal.Disturbance is present at 10 s and is associated with tail deflection.Variation of aerodynamic coefficients of the nonstationary model in the specified range of values that were calculated in ANSYS and results of the adaptive system is shown in Fig. 17.These changes in aerodynamic coefficients are failures.Thus, the studies allowed synthesizing the adaptive PID controller of the automatic control system of the unmanned aerial vehicle, providing the required flight parameters under changing aerodynamic characteristics and flight conditions.

Discussion of the results of adaptive control study
The advantage of this study is the synthesized adaptive PID controller of the automatic control system of an unmanned aerial vehicle, which ensures non-sensitivity of the system to changing aerodynamic characteristics and flight parameters, and, consequently, functional stability.The basis of the synthesis is the synthesized models with a sufficient degree of accuracy obtained using both numerical methods and real experimental testing.Such a result is explained by the fact during the controller synthesis that real ranges of aerodynamic parameters were considered and implemented.The advantage of the proposed implementation of the adaptive PID controller is that it uses the fourth-order model, which ensures astatism of a higher-order system.The impact on the quality of controlled motion of the UAV with higher-order models requires additional research.
The use of the synthesized PID controller on board the UAV provides controlled motion with the required quality indicators under changing parameters of both the environment and the object.In case of locking of a certain aerodynamic surface, by redistributing the control between the remaining ones and adjusting the PID controller, the UAV controlled motion with the required quality is achieved.
Restrictions on the use of the proposed PID controller are the aerodynamic configuration of the vehicle and the energy of the controlled surfaces, as well as their sectional distribution.If the criterion of spatial formation of the control action at a given frequency of an emergency situation in the executive subsystem is not provided on the UAV, then the synthesized PID controller will provide controlled UAV motion with the required quality only when changing the environmental parameters.It should also be noted that for the operation of the synthesized PID controller, it is necessary to obtain reliable information about flight parameters, which determines the need to fulfill the criteria of functional stability for the measuring subsystem.
However, in the absence of all specified restrictions and possible flaws, as evidenced by the results of modeling and experimental testing, the synthesized PID controller ensures the UAV motion with the required quality indicators.
Further, extension of adaptation loops with preservation of the order of the reference model, and also order increase is planned.

Conclusions
1. Using SolidWorks and ANSYS CFX tools, mass-inertia and aerodynamic characteristics of the UAV are determined, the adequacy of which is confirmed by real pilot studies on the operating UAV model.
2. The influence of deflection of control surfaces on UAV aerodynamic parameters was investigated, which made it possible to reasonably form ranges of their variation when changes occur both in environmental and UAV parameters.
3. UAV models adequate to real processes were developed, allowing to determine parameters affecting the controllability and stability of the UAV control system.Their adequacy in a wide range of input and output motion parameters is proved.The mathematical models of the UAV, describing both nominal and parametrically perturbed motion were obtained.These models were used to solve the problem of synthesizing a standard and adjustable adaptive PID controller.The form of the models is convenient for obtaining various representations of dynamic properties of objects.
4. The results of modeling are confirmed by the results of real flights, which showed that the proposed adaptive control method is effective for motion control of an unmanned aerial vehicle under changing aerodynamic characteristics and flight parameters.This provides functionally stable control.

Fig. 3 .
Fig. 3. Modeling of the control object in ANSYS-CFX

Fig. 4 .
Fig. 4. Comparison of lift (Cx) and drag (Cz) coefficients with the NASA model

Fig. 5 .
Fig. 5. Reference model of an unmanned aerial vehicle

Fig. 9 .
Fig. 9. Variation of the range of aerodynamic coefficients (failures) relative to the weather balloon (Aerosonde)

Fig. 13 .
Fig. 13.Structure of the reference model of adaptive control, velocity control system

Fig. 12 .
Fig. 12. Structure of the PID loop system and comparison with the reference model

Fig. 14 .
Fig. 14.Structure of the reference model system of adaptive control of the PID controller

Fig. 15 .
Fig. 15.Adaptive PID control and PID control for velocity

Fig. 17 .
Fig. 17.Control of the unmanned aerial vehicle under changing aerodynamic characteristics and flight parameters Fig.18shows control of the UAV pitch angle.The angle value was compared with the control of the standard PID controller and the adaptive PID controller.The value of the reference model is displayed in green, control using the adaptive PID controller is displayed in blue, control using the standard PID controller is displayed in red.The values of the adaptive PID controller are closest to the reference value and control through it is acceptable in terms of minimizing the mismatch error.Fig.19showscontrol of the pitch angle of the unmanned aerial vehicle under changing aerodynamic characteristics and flight parameters.Angle control was performed using adaptive PID control.

Fig. 19 .
Fig. 19.Pitch angle control of the unmanned aerial vehicle under changing aerodynamic characteristics and flight parameters

Fig. 16 .
Fig. 16.Adaptive control system of the unmanned aerial vehicle at a velocity of 10 m/s

Table 1
Variation of the lift coefficient depending on flight velocity and angle of attack