Simulation of UAV Systems

m Airplane mass V Velocity a Time derivation of a Angle of attack Angle of drift , , Euler angles (roll, pitch, yaw) u, v, w Components of velocity of the airplane mass centre relative to atmosphere p, q, r Components of the angular velocity of the airplane CD Drag coefficient CL Lift coefficient CLF Lift coefficient of the vertical tail surface cl Rolling moment coefficient cn Yawing moment coefficient cm Pitching moment coefficient Air density Ix, Iy, Iz Moments of inertia about (x, y, z) axes c Length of mean aerodynamic chord S Wing area b Wing span g Standard gravitational acceleration T Engine thrust


Introduction
Civil and military usage of low cost UAVs is becoming more needed.Possibly the most expensive design items are the control and navigation systems.Therefore, one of main questions that each system designer has to face is the selection of appropriate sensors for a specific autopilot system.Such sensors should satisfy the main requirements without contravening their boundaries.Higher sensor quality can lead to a significant rise in costs.
In aircraft design this kind of consideration is especially important due to the safety requirements expressed in airworthiness standards.Therefore question is how to determine the optimal solution.This problem is mostly solved by the designer's experience and by thorough testing.However, this can be very expensive, and involves with many risks in relation to flight safety.The problem can be resolved by using a suitable simulation method, for example in the Matlab ® Simulink ® program environment.This program can be considered as a facility fully competent for this task.
An important factor is what is done to manipulate the functions of the program to achieve the autopilot design.A computer only solves logical problems.It cannot implement practical real world entities, and a computer simulation only simulates what in a sense the designer already knows.
For the precise design solution it is necessary to have a mathematical model of the aircraft or at least the basic con-

P. Kaňovský, L. Smrcek, C. Goodchild
The study described in this paper deals with the issue of a design tool for the autopilot of an Unmanned Aerial Vehicle (UAV) and the selection of the airdata and inertial system sensors.This project was processed in cooperation with VTUL a PVO o.z.[1].The feature that distinguishes the autopilot requirements of a UAV (Figs. 1,7,8) from the flight systems of conventional manned aircraft is the paradox of controlling a high bandwidth dynamical system using sensors that are in harmony with the low cost low weight objectives that UAV designs are often expected to achieve.The principal function of the autopilot is flight stability, which establishes the UAV as a stable airborne platform that can operate at a precisely defined height.The main sensor for providing this height information is a barometric altimeter.The solution to the UAV autopilot design was realised with simulations using the facilities of Matlab® and in particular Simulink® [2].straints in its movement.By using suitable simulations it is possible not only to evaluate the sensors, but also to optimise their filters and control algorithms.

Experiment
First phase of the project was to verify the sensor parameters declared by the manufacturer.In order to measure the sensor parameters (sensitivity, accuracy, stability, temperature dependence and hysteresis), it was necessary to adapt an existing automatic system by recording data into a file (see Fig. 2).
The second phase in this project was to make a statistical evaluation of data obtained by the automatic measurement system.The validity of the measurements themselves was verified by an accuracy analysis of the measurement system and processing the statistical data.The most important quantity in the set of measured data was the pressure variation between two different altitudes, which could be measured very precisely.The entire evaluation of the measured data then helped to find sensor parameters and, consequently, to design a sensor model for the Matlab Simulink® program.The designed model was a simplified version, because it reflected only parameters relevant for the specified UAV autopilot design.The sensor delay in this case could be ignored, because its value was negligible in comparison with the previously mentioned sensor parameters.
The basic requirement for this project was to obtain data concerning the UAV design system.In this case, the UAV system was described in the following referential axes (Fig. 3) and by a set of differential equations (Equations 1, 2) [3,4]: (2) All variables were calculated in a frame of differential equations.All aerodynamic parameters needed for these equations were obtained from wind tunnel experiments [4].
The airplane model in Simulink consists of partial blocks.These blocks represent basic mathematical operations or functions and tools that are necessary for modelling.For example, these could be memory, delay, signal sinks and sources (for an illustration, see Fig. 4).
The mathematical model of the airplane was compiled as a continuous system, i.e., all calculations were not performed as a time defined sequence but the time interval changed due to the magnitude of the outcomes of the calculations.This solution guaranteed that all relevant quantities would be obtained.This was because the time between two calculations was in the order of milliseconds, which means more than two orders higher frequency than the highest own frequency of airplane movement.The model in Simulink ® was divided into subblocks representing the individual equations.
The main initial conditions were defined in an external .mfile, which had to be run before starting the main simulation in Simulink ® .The rest of the initial conditions and quantities could be set up directly in the Simulink ® scheme.These conditions were, for example, initial velocity, altitude and flight path.The input quantities to be modelled were: -elevator deflection  All the calculated quantities for visualisation could be shown in a graphical interface or saved.These quantities could be, for example, Euler angles and their derivations, translational and angular movements, speed, altitude, etc.
Assuming that we had all necessary aerodynamic parameters, the design of a non-linear aircraft model was worked out.The model describes the aircraft behaviour in almost all standard phases of flight.Algorithms representing the autopilot control were also simulated.In order to make the simulation comprehensive, the model was extended by submodels of the wind and the actuators.A simplified diagram of the design simulation is shown in Fig. 5.

Results
The processed data from the automatic measurement system was used for designing a model corresponding to the basic parameters of the sensor.The results showed the significant temperature dependence.This dependence was easy to correct.However, taking into account the desired function of the sensor, this dependence could be ignored.A decision on the suitability of using the as an altimeter could have made on the basis of the stated manufacturer's data, from the supplied datasheets.Unfortunately this method was inapplicable in the case of using the pressure sensor as a vertical speedometer.The definition for calculating vertical speed is obvious from Fig. 6. and Eq. 3. Vertical speed is defined as change of altitude in time.nated by implementing a filter, but this would unacceptable time delays.Surprisingly, to the robustness of the system, the system itself was resistant to sharp and large steps of indicated vertical speed.
Graph 2 shows the resultant change of altitude.The control mechanism is made by keeping the vertical speed value (in this case 0) and keeping the set altitude value.

Conclusion
Simulated flight quantities were evaluated with comparing with real flight records and submitted by real Sojka operators.This correspondence certifies the correctness of the Simulink ® airplane model.
The model of the UAV design system helps to create a powerful tool for a suitability testing of the autopilot and its sensors.This procedure can speed up the choice of sensors which makes a price reduction of their implementation into the UAV autopilot.
Particular result from this study is a decision to use a low-cost altimeter for vertical speed measurements.
This design method is also suitable for further utilisation in UAV design system simulation.Another possible utilisation of the method is in evaluating of sensor quality in ageing, for the purposes of flight safety.
Time derivation of a a Angle of attack b Angle of drift F, Q, Y Euler angles (roll, pitch, yaw) u, v, w Components of velocity of the airplane mass centre relative to atmosphere p, q, r Components of the angular velocity of the airplane Air density I x , I y , I z Moments of inertia about (x, y, z) axes c Length of mean aerodynamic chord S Wing area b Wing span g Standard gravitational acceleration T Engine thrust

Fig. 4 :Fig. 5 :
Fig. 4: Simulink ® scheme representing the calculation of the first equation from Equation 1 Fig. 6: Calculating the vertical speed