MODELLING OF THE UNMANNED AERIAL VEHICLES FLIGHT CONTROL SYSTEM

. The article is an independent work containing the author’s ingenious research methodology and the model of the control system of Unmanned Aerial Vehicles. Furthermore a unique and world first mathematical model of an Unmanned Aerial Vehicle was developed, as well as a simulation program which enabled to investigate the control system of any Unmanned Aerial Vehicles in the tilt duct pitch (altitude), bank (direction), deviation and velocity, depending upon the variable values of the steering coefficient, reinforcement coefficient and the derivative constant. The research program was writ-ten in the language of the C++ as the MFC class, on the MS Visual Studio 2010 platform. The main issue resolved in the article is the pioneering research of the process of control during manual and semi-automatic guidance of the Unmanned Aerial Vehicle, with a jet propulsion system to the coordinates of preset points of the flight route. Modelling of the flight control system takes into account: the logical network of operations of the simulation program, the pilot-operator model, the set motion and control deviations as well as the flight control laws. In addition, modeling of the control system takes into account the drive model, engine dynamics, engine thrust, the model of steering actuators and the model of external loads. In contrast, the external load model takes into account the external forces acting on the unmanned aircraft, including gravitational forces and moments, aerodynamic forces and moments, aerodynamic drag, aerodynamic lateral forces, aerodynamic lift forces, aerodynamic heeling moment, mechanism of local angle of attack from damping torque and forces and moments from the engine.


Introduction
The importance of unmanned aerial vehicles has clearly increased in the last decade. They are irreplaceable during long-term, dangerous tasks and conducted in an adverse environment without endangering human life. Extensive research into improving the control and navigation systems used, equipment and the use of new technologies show the growing need for this type of aircraft (Hansen, 2009;United States Air Force, 2012. Thanks to technological progress, the possibilities of using UAV to perform both military and civilian tasks are constantly expanding, which creates the need to solve many new problems not only of a structural but operational nature. The specificity of UAV usage is expressed, among others, in lack of "feeling" by the operator of the piloted aircraft or helicopter of various types of interactions, including external (weather, communication) and internal (control system, power train) interference during the flight (Adamski & Rajchel, 2013;Departament of Defence, 2010;Warwick & Dickerson, 2012. Unmanned aerial vehicles, although they do not have on board equipment necessary to secure and support the life of a human pilot, from the point of view of control, navigation, communication, visualization, control, diagnosis of the current technical condition, situational awareness and own safety during the mission, there are much more complicated than manned aviation. The UAV control method, which is a multidimensional dynamic object, depends on the scope and accuracy of information about the current navigation situation and the control method adopted. UAV can be controlled remotely (by the operator), automatically (including autonomously) and semi-automatically (mixed system) (Adamski, 2015;Biass & Braybrook, 2012Kanat et al., 2019).
An aircraft treated as a system is a whole covering all those elements that are necessary to perform its tasks. The user is most interested in these overall properties. Thus, the engineer's primary goal is to shape them properly in the design and manufacturing process, and to use them properly during operation. Flight stabilization systems, traction autopilots, flight management systems and modern, integrated on-board measurement systems support the pilot, and even in certain phases of the flight they are able to completely replace it in pilot-navigation functions (Adamski et al., 2014;Fresconi, 2012).
The scientific and utilitarian aim of the above-mentioned work was a systemic approach to the problem of modelling and testing the control process of Unmanned Aerial Vehicles in the manual control mode and the semiautomatic mode. Another goal was to develop a research methodology, a model of flight control system, modeling of unmanned aircraft as a control object and the results of simulation tests of unmanned aircraft. The article also contains the original results of simulation tests of the unmanned aerial vehicle control process, taking into account control quality indicators, including, among others, research on the impact of gain factor and differentiation constant as well as the impact of gain factor and integration constant.
After the analysis of the tasks and design solutions of Unmanned Aerial Vehicles it appeared that the most versatile UAV is the tactical, jet-powered, MALE class (Medium Altitude Long Endurance) one. The primary characteristics describing the flight of any aircraft (including UAV) are: the pitch (altitude), bank (direction) and velocity. The basis for the control laws in the ducts is the PID control (proportional-integral-derivative controller), working in the loop of feedback, calculating the error values as the difference between the desired set value and the measured value of the control process (Bossert, 2002;Skinder, 2015). It acts so as to reduce the error by a proper adjustment of the signal sent to the input of the adjustable parameter of the UAV. The PID controller consists of three elements: -the proportional P, which compensates the current error; -integration I, which compensates the accumulation of the past deviations; -differentiating D, which compensates the expected future deviations. The selection of the structure and parameters of the PID controller is of fundamental importance in the design of control systems. The system is particularly sensitive to the assumed proportional and integrating element parameters that determine the ship's steerability and stability.

Research assumptions
The basis of piloting are the control rights used both by the operator during "manual" control and automatic -by the autopilot. Control rights are the basis of algorithms that convert error signals into control signals transmitted to on-board UAV apparatus in individual control channels. There are serious differences in the nature of pilot transformations of control signals into appropriate control forces (rudder deflections, thrust) in aerodynamic and propulsion actuators. These differences, as well as their unequal operation on the UAV as a control object, mean that the structure and parameters of control rights that ensure the optimal course of the ship's flight control process vary in individual control channels Oktay & Çoban, 2017). The most information is obtained from transient processes after their abrupt disturbance. The research on the influence of control rights parameters in the channels: inclination, deviation and speed, was conducted by simulating flights for a selected range of values of the parameters of appropriate control rights at a step disruption of a given controlled variable, e.g. flight altitude. Thus, the basis for research and evaluation was the course of the respective transition transient processes. At the same time, the control laws retained the other control parameters, initial conditions, and UAV design parameters.
In order to test the model, the following hypothesis of the preset variables of the UAV flight have been adopted: for the altitude: (1) for the direction: for the velocity: Control errors: where: w k , w R -co-efficient of reinforcement and time constant in the pitch duct. Flight control law in the pitch duct , where we denoted: L k , L R -co-efficient of reinforcement and time constant in the pitch duct; φ gr -permissible pitch angle; LO K -recurring signal, reducing an increase in the pitch angle.
Flight control law in the velocity duct where: k v -the gain factor in the laws of speed control; T v -time constant of deflection of the thrust lever at a given moment; R v -differentiation time constant in the speed channel. The mathematical model of the UAV has got four variants: PSI version -control of the direction which involves presetting the angle ψ z ; Y version -control of the direction which involves presetting the Y z coordinate; XYH version -control of the direction and altitude means that the object should reach the set a point of coordinates (x, y, h). At each step of integrating, ψ z (t), θ z (t) angles are calculated of the vector whose starting point is in the point (X (t) , Y (t) , H (t) ), where there is the object, and ending in a given point (x, y, h).
Version XY differs from version XYH in that the θz(t) angle is not calculated, and steering the altitude is performed similarly to version PSI.
In the last two versions it is possible to give more than one point. We may demand the achievement of all the sequence of the points (x i , y i , h i ) (i = 1,2, ..., nl). Then after achieving point i (or when the object is in the proximity of this point), the control occurs for point i + 1.

Modelling and testing UAV in manual control mode
For the sake of the research the model of the Unmanned Aerial Vehicle in the classic aircraft design was adopted, with a jet propulsion system. In order to illustrate the investigation in the ducts of altitude, direction, speed and semi-automatic guidance of an Unmanned Aerial Vehicle, only the extreme and optimum findings of my research will be presented.

Examining the law of control in the duct of pitch (flight altitude)
The process characterized by poor stability (Figure 1). Highly oscillatory nature of motion (flight angle θ -does not stabilize over time, altitude H -after reaching the set 400 m in about 11.4 s, due to instability of the tilt angle after a time of about 4.3 s, there is a loss of height). Extended regulation time of T r = 67 s.
High maneuverability (Figure 3). T r = 6.8 s, with ΔH = ±5 m. Over-manoeuvrability process with large amplitudes of the steering signals kw and clear, dynamic oscil- lations of the flight angle θ, as a result, there are cyclical, small changes in the set altitude H, so-called "mousing". Unstable process (Figure 4). The set height is reached after approx. 6.2 s. Amplitude of over-regulations of flight altitude rises in time. As a result of the dynamic change of the tilt angle in 9 s, after about 18.2 s the UAV would break down.
Asymptotic stable process -without over-regulations ( Figure 5). The characteristics ensure optimal compromise between maneuverability and stability in the cruise phase of flight. Regulation time T r = 11 s (with ΔH = ±5 m). Reaching the set flight altitude and its stabilization occurs after approx. 13 s.

Examining and optimalization of the law of control in the duct of pitch (flight direction)
Poor steering qualities -regulation time T L = 33 s with ΔY =± 20 m ( Figure 6). The flight direction control time constant is unstable (after approx. 29 s, the rudder takes the value -2°), hence the so-called "mousing" around a given direction of flight.
Parameters K L and R L ensure an optimal compromise between maneuverability and stability (Figure 7). Regula  High stability at the expense of control (Figure 9). The values of the co-efficient of reinforcement K L and R L parameters beneficial in the cruise phase. Very long time to reach the set direction of flight, which is about 38 s Max. rudder deflection in 5 s to +3,5°, and then after approx. 33 s to neutral value 0°.

Examining and optimalization of the law of controlling flight speed
Reduced stability with over-regulations as a result of too high coefficient of reinforcement ( Figure 10). Regulation time of T r = 50 s. Engine speed very unstable, with an initial 6000 rpm. up to 11000 rpm in 11 s, followed by 0 rpm. in 18 s, 8000 rpm in 24 s, 4000 rpm in 43 s, 6300 rpm in 52 s. Stabilization of turnover after more than 54 s. High stability, optimal compromise between stability and maneuverability ( Figure 11). Regulation time of T r = 18 s.
A rapid change in engine speed to 12000 rpm in 4 s, their decrease to approx. 5100 rpm in 16 s, complete stabilization of turnover occurs in 30 s and is maintained.

Investigating semi-automatic UAV guidance to the preset coordinates in 3D space
The research is preliminary in its nature and it is aimed testing the possibilities of semi-automatic flight control of a UAV. The principle of the system operation is as follows.
The operator sets in 3D space the preset coordinates (XYZ) of the flight route points. Controlling the flight through preset points is automatically ensured by the UAV onboard instruments along with the proper use of satellite navigation. In the investigation we checked the adopted guidance algorithms and the preset optimal characteristics (k w , k L , k v , R w , R L , I 0 ) of the applied laws of control. The simulation findings confirm the feasibility of performing semi-automatic flight control, using relatively simple solutions.

Investigating UAV guidance to the preset coordinates of the flight route points
Not very sensitive, stable ( Figure 12). The designated points are located at a distance of 1000 m, 1500 m and 1400 m from the starting point. The flight and altitude gain from 100 m to the 1st point takes place with a stable change in altitude over 80 s, the flight and the decrease in altitude to the 2nd point also takes place stable and takes 40 s, while the flight and stable height gain to the 3rd point takes another 70 s.
Very sensitive, dynamic ( Figure 13). The coordinates of the given points are the same as in the previous chart. The flight and the intake of altitude from 100 m to the 1st point takes place with a very dynamic change in height, the prescribed height is reached after a time of about 12 s, the achievement of the set height of the 2nd point also takes place dynamically and takes 10 s, while the acquisition of the set height of the 3rd point takes only 25 s. Studies have shown that the choice of structures and parameters of the laws of control, relevant to the UAV tasks and external independent conditions, require different actions on the part of the pilot-operator. These activities are aimed at the optimal use of the potential flight capabilities of an Unmanned Aerial Vehicle and take into account diverse conditions. Therefore, in my opinion they should be divided into three control modes, which differ substantially in the nature of the activities of the pilotoperator or the autopilot. These modes might be called as follows: 1. Cruising, of balanced stability and maneuverability. 2. Active, with higher control at the expense of stability appropriate to the occurring situation. 3. Extreme with absolute priority to maneuverability in situations endangered by destruction. The mode of cruise control should be used in all conditions referred to as normal, i.e. those which do not require performing unpredictable maneuvers of heightened maneuverability. Flight control is carried out with optimal settings of the parameters of control in each ducts, that is: pitch (altitude), bank (direction) and velocity.

Discussion and conclusions
On the basis of the conducted study, it was determined, for each duct, the ranges of parameter values of the law of control in the cruise mode. The parameters ensure, under normal conditions, an optimal compromise between maneuverability and stability. In case of this compromise, the course of the transitional control process, is characterized by a relatively short regulation interval T r and high stability, close to the asymptotic one.
The conditions of the cruise mode of flight control, in the tested case, meet the following ranges of parameter values of the laws of control: A. Duct of controlling flight altitude: 1. Coefficient of reinforcement w k = 0.0025 to 0.05 (Figure 1-3). The research and its findings enabled among others: 1. Examination and indicating the fundamental problems associated with UAV steering in various flight conditions and different modes of operation of their control systems. 2. Development of a unique principle of the operation of the semi-automatic steering system. 3. Indicating the necessity to distinguish steering modes, appropriate to the situation, i.e. cruising, active and extreme. Due to the significant differences in the required control parameters, it is necessary to take this problem into account during the training of operators or designing autopilots. 4. Developing a simulation method which could enable to examine, after appropriate modifications, all classes of UAVs, which differ in construction design solutions, performance and the intended application. The most commonly used type of manual control of the UAV is the optoelectronic one. The scope of the tasks performed by the UAV operator during manual control, reaches the borders of Man's capabilities of perception. In addition, the growing training requirements, an appropriate selection of candidates for operators and stress which increases the committed errors, lead to a situation that further development of this guidance system becomes limited.
The effective development of flight control systems with the participation of Man-operator is possible with appropriate automating of the process by allowing the pilot-operator to concentrate on performing the task in UAV at the preset altitude reaches the particular points after approximately 80, 120, 190 [s], respectively a given mission. The most efficient method, from the technical and tactical point of view, as proved in the second part of the study, is the proposed concept of semiautomatic flight control of the UAV. The automation of the control process, by assisting the pilot-operator, will use and combine the potential capabilities of technology with human intelligence.
The developed models and the adopted concept of their construction and development meet the requirements set at work: 1. The modular structure enables adaptation of the model to system tests of the entire UAV class and solving research tasks requiring different simulation accuracy. 2. A direct physical interpretation of the numerical quantities used to communicate with the computer, such as: construction and logical parameters, simulation parameters, initial conditions and simulation results, allows at the stage of the digital experiment to focus solely on research purposes. As a result, the planning of the experiment, interpretation and analysis of test results give results similar to the results of real objects on the fly. 3. Research on complex UAV maneuvers in the vertical (height) and horizontal (direction) planes with variable flight speeds confirmed the wide range of research capabilities of the developed models and their practical usefulness for solving research tasks for training and tactical improvement. 4. Modifications of the mathematical elements of the pilot control system allow adaptation of the model version to the requirements arising from research tasks and the identification capabilities of the test object. The simulation method developed, especially modeling, enabled the implementation of research tasks. The stated research objectives fall within the scope of broadly understood operation of unmanned aerial vehicles. In particular, they include research tasks related to the training and use of UAV on the battlefield. The proposed value should also be considered original how to adapt gain factors in UAV control processes.
These investigations would help not only to improve the training process of pilot -operators, the aerodynamic properties on the design stage, but also of the control and navigation systems as well as the safety of executed missions by Unmanned Aerial Vehicles.