AP05_4.vp Symbols 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 1 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 contra- vening 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 airwor- thiness standards. Therefore question is how to determine the optimal solution. This problem is mostly solved by the de- signer’s experience and by thorough testing. However, this can be very expensive, and involves with many risks in rela- tion 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 con- sidered 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- © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ 109 Czech Technical University in Prague Acta Polytechnica Vol. 45 No. 4/2005 Simulation of UAV Systems 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 selec- tion of the airdata and inertial system sensors. This project was processed in cooperation with VTUL a PVO o.z. [1]. The feature that distin- guishes 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 plat- form that can operate at a precisely defined height. The main sensor for providing this height information is a barometric altimeter. The so- lution to the UAV autopilot design was realised with simulations using the facilities of Matlab® and in particular Simulink®[2]. Keywords: autopilot, modelling, Sojka, tools, UAV Fig. 1: UAV Sojka III Wing span 4.5 m Overall length 3.78 m MTOW 145 kg Max. speed 210 km/hr Payload 20 kg Endurance >4 hr Engine 28.4 kW 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. 2 Experiment First phase of the project was to verify the sensor parame- ters declared by the manufacturer. In order to measure the sensor parameters (sensitivity, accuracy, stability, temperature dependence and hysteresis), it was necessary to adapt an exist- ing 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 ver- ified 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 be- tween 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 de- sign 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 de- sign. 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 sys- tem was described in the following referential axes (Fig. 3) and by a set of differential equations (Equations 1, 2) [3, 4]: Force equations � sin � u qw rv C V S m T m g v ru pw C V S m � � � � � � � � � � � D LF 1 2 1 2 2 2 � � �� T m g w qu pv C V S m T m g � � � � � � cos sin � cos cos . � �� � �L 1 2 2 � (1) Moment equations � , � p I I I qr c V Sb I q I I I rp c V Sc I y z x l x x z y m � � � � � � � � 1 2 1 2 2 2 � � y z x z n z r I I I pq c V Sb I , � .� � � � 1 2 2 � (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 ob- tained. 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 .m file, 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 con- ditions were, for example, initial velocity, altitude and flight path. The input quantities to be modelled were: � elevator deflection � aileron deflection 110 © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ Acta Polytechnica Vol. 45 No. 4/2005 Czech Technical University in Prague Pressure regulator Druck DPI 530 Barometer Druck DPI 145PC Power Temperature sensor (Pt100) Measured pressure sensor Thermostatic box Labio LS80 RS 232 RS 232 RS 232 Pressure Data Acquisition Control Unit Agilent 34970A HPIB Fig. 2: Automatic measurement system Fig. 3: Main axes � thrust � wind – as defined in MIL-F-8785C [6] All the calculated output 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 parame- ters, 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 sub- models of the wind and the actuators. A simplified diagram of the design simulation is shown in Fig. 5. 3 Results The processed data from the automatic measurement sys- tem was used for designing a model corresponding to the basic parameters of the sensor. The results showed the signifi- cant temperature dependence. This dependence was easy to correct. However, taking into account the desired function of the sensor, this dependence could be ignored. Standard deviation was 0.031 By processing the 152 measured data items, the following re- sults can be obtained: � 80 % of the results were within the interval �0.5m � 60 % of the results were within the interval �0.3m � 20 % of the results were within the interval �0.1m © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ 111 Czech Technical University in Prague Acta Polytechnica Vol. 45 No. 4/2005 Fig. 4: Simulink® scheme representing the calculation of the first equation from Equation 1 Airplane Mathe- matical model Sensor models + algorithm of filtration Actuators Pitch autopilot Roll autopilot Data visualisation Fig. 5: Simulink® block scheme A decision on the suitability of using the sensor as an altimeter could have been made on the basis of the stated manufacturer’s data, from the supplied datasheets. Unfortu- nately 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. Vertical speed � h t (3) It is evident from Graph 1. that the steps of discrete time derivation of altitude can cause undesirable step changing in measurement of vertical speed. These steps could be elimi- 112 © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ Acta Polytechnica Vol. 45 No. 4/2005 Czech Technical University in Prague Time Altitude � h � t Fig. 6: Calculating the vertical speed Graph 1 Graph 2 nated by implementing a filter, but this would involve unac- ceptable time delays. Surprisingly, thanks 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 con- trol mechanism is made by keeping the vertical speed value (in this case 0) and keeping the set altitude value. 4 Conclusion Simulated flight quantities were evaluated with com- paring 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. 5 Acknowledgment The author thanks Mr. Z. Cech, from Delong Instruments Ltd. Brno, Czech Republic, who described the mathematical model of UAV Sojka, and Mr. V. Dvorak from CTU Prague, who designed the basic version of the automatic measure- ment system for pressure measurement. References [1] VTUL a PVO o. z. (Air Force Research Institute), Czech Republic, http://www.vtul.cz/. [2] http://www.mathworks.com/. [3] Etkin, B., Reid, L. D.: Dynamics of Flight – Stability and Control, John Wiley & Sons, Inc. 1996, 3rd ed. [4] Cech, Z.: Využití magnetického pole Země ke stabilizaci bezpilotních prostředků (Usage of the Earth’s Magnetic Field for Stabilising UAV Flight)(in Czech), dissertation work, Military Academy Antonina Zapotockeho, Brno, CZ, 1989. [5] Proks, M.: “Měření modelu letounu Sojka-M4 v aerody- namickém tunelu.” Technical report Z-3763/02, Aero- nautical Research and Test Institute in Prague 2002. [6] http://www.pdiaero.com/downloads/download_files/MIL -F-8785C. pdf, section 3.7 Ing. Petr Kaňovský e-mail: kanovsp@fel.cvut.cz Department of Measurements Czech Technical University in Prague Faculty of Electrical Engineering Technická 2 166 27 Prague 6, Czech Republic Dr. Ladislav Smrcek Dr. Colin Goodchild Aerospace Engineering Department James Watt Building University of Glasgow Glasgow, G12 8QQ Scotland, U.K. © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ 113 Czech Technical University in Prague Acta Polytechnica Vol. 45 No. 4/2005 Fig. 7 Fig. 8 Table of Contents Section 1Electrical Engineering Model Based Control of Moisture Sorption in a Historical Interior 5 P. Zítek, T. Vyhlídal Properties and Performance of a New Compact HF Aerial Design for Multi-Band Operation 11 D. Telfer, J. Spencer Implementation of Sliding Mode Observer Based Reconfiguration in an Autonomous Underwater Vehicle 18 A. J. Mitchell, E. W. McGookin, D. J. Murray-Smith Simulation and Analysis of Magnetisation Characteristics of Interior Permanent Magnet Motors 25 J. A. Walker, C. Cossar, T. J. E. Miller Ontologies and Formation Spaces for Conceptual ReDesign of Systems 33 J. Bíla, M. Tlapák Intelligent Data Storage and Retrieval for Design Optimisation – an Overview 39 C. Peebles, C. Bil, L. Drack High-Speed Real-Time Simulators for Engineering Design 55 R. E. Crosbie, N. G. Hingorani Physics Based Design, the Future of Modeling and Simulation 59 T. S. Ericsen Feedback Control in an Atomic Force Microscope Used as a Nano-Manipulator 65 M. Hrouzek Section 2Aerospace Engineering Design of a Low-Cost Easy-to-Fly STOL Ultralight Aircraft in Composite Material 73 D. P. Coiro, A. de Marco, F. Nicolosi,. N. Genito, S. Figliolia Design and Development of the Engine Unit for a Twin-Rotor Unmanned Aerial Vehicle 81 G. Avanzini, S. D’Angelo, G. de Matteis Sliding Mode Implementation of an Attitude Command Flight Control System for a Helicopter in Hover 88 D. J. McGeoch, E. W. McGookin, S. S. Houston Primary Response Assessment Method for Concept Design of Monotonous Thin-Walled Structures 96 V. Zanic, P. Prebeg Composite Axial Flow Propulsor for Small Aircraft 104 R. Poul, D. Hanus Simulation of UAV Systems 109 P. Kaòovský, L. Smrcek, C. Goodchild