Wednesday, 16 November 2011

Design and Development Process of Autonomous Control Laws (Algorithms) for UAV Tamingsari

This writing will discuss the step by step procedure in the design and development of the control laws (Algorithms) of UAV TAMINGSARI starting from determination of aerodynamics, stability/control derivatives, setting up the non-linear flight model/equation of motion, trim determination, flight dynamics analysis, designing the control laws and gain scheduling development, and  the simulation of control laws in form all software simulation,  the hardware in the loop simulation (HILS)  and the Iron-bird simulation before doing the flight testing.


The UAV TAMINGSARI is a low attitude and short range UAV having following the technical  specifications :
  • Cruise Speed : 100 km/h
  • Cruise Altitude: 1000 m
  • Endurance: 2 – 3 Hours
  • Take off weight : 20 kg, payload (camera): 5 kg
  • Stall Speed : 40 km/h.
and its airframe configuration is given by the Figure 1.

 Figure 1:  UAV “TAMINGSARI” in airborne and on the ground

The design and development process of autonomous control laws (control algorithms) for this UAV begins with the definition of mission to be fulfilled by the UAV TAMINGSARI, which imposes requirements upon the shape of the flight path and the velocity along this flight path. 

The mission requirements for the UAV TAMING SARI are formulated as follows:
      UAV TAMING SARI should have autonomous flight capability for aerial surveillance & reconnaissance in civil area  within the defined flight envelope from the altitude 100 m to 1000 m at the speed of 75 km/h to 150 km/h.  UAV TAMING SARI should fly through any flight coordinates/way points precisely with good flight characteristics/ flight handling qualities.  

The consequence of the requirement stated above is UAV TAMING SARI should have following autonomous control laws/ algorithms (autopilot modes):
  • Pitch and Yaw Damper –mode to augment the stability/damping characteristics
  • Attitude hold/select-mode to keep and select the desired attitude and improve the response/dynamics characteristics of UAV
  • Altitude hold/select mode to maintain the desired altitude & to fly through the different altitude level
  • Speed Hold – mode to keep the given speed of UAV
  • Coordinated Turn –mode to perform smoothly turning flight and maintain the altitude during turn flight.
  • Waypoints based Auto Navigation  ( waypoints following & precisely Flight path tracking)
The resulting control problem in producing the autonomous  control laws (algorithms) is therefore to generate appropriate deflections of aerodynamic control surfaces or changes in engine power or thrust, necessary to fulfill the mission of UAV TAMING SARI.

The approach to solve this control problem is summarized in Figure 2.  It illustrates a complete design & development process of autonomous control laws/algorithms for UAV and the division in different design stages starting from stability/control derivative determination, setting up the non-linear equation of motion (simulation flight model), trim determination, flight dynamics analysis, designing the control laws, gain scheduling development, until the simulation of control laws. 

Figure 2: Procedure in design and development  of  control laws (Algorithms) for UAV TAMINGSARI

Design and Development of Control Laws (Algorithms) for UAV  Tamingsari

According to Figure 2,    the process starts with calculating/ estimating data of UAV TAMING needed for non-linear flight model. It consists of the aerodynamic data, the stability and control derivatives, the engine parameter as well as the geometrical data of aircraft, like the moment inertia, the mass, the wingspan, and the wing surface. 

The aerodynamic data from wind-tunnel test are compared with the calculated data. The both data closely match to each others.  Figure 3 shows the final data for UAV that have been estimated using the USAF – Stability and Control DATCOM and the semi empiric formulas from ROSKAM book. The data are expressed in the body fixed coordinate system that normally is used in the flight modeling and simulation.   

Figure 3: Flight Data of UAV TAMINGSARI

The aerodynamic data, the stability and control derivatives as well as the engine derivatives are used as the parameter for the equations of motion describing/ modeling the motion of the UAV TAMINGSARI in the air (UAV flight model) .

The resulting general Earth-flat equations of motion for UAV in the body fixed ­coordinate system are:

These six degree of freedom (6-DOF), non-linear equations of motion describe three translating motion (force equation ) and three rotating motion (moment equation) of the UAV and can cover all flight conditions and flight maneuvers in the complete flight envelope, from the take-off until landing .

To the equations of motion the kinematics equations and navigation equation below should be added.

The following figure shows the graphical non-linear flight model for RPV Tamingsari.

Figure 4: Simulink flight model of UAV TAMINGSARI

Once non-linear UAV flight model has been created, the next step is to determine so called steady-state, trim flight conditions since these conditions are a prerequisite for linearizing the non-linear model as well as for non-linear simulation.

The trim flight condition is a condition in which the sums of forces and moments acting on the aircraft are equal zero. That means that rotational and translation acceleration  in equations of motion must be equal zero. Since the equations of motion are non-linear and the dependence of the aerodynamic data is complex, the calculation of trim flight condition is performed with numerical trim algorithm using optimization method SIMPLEX. This trim algorithm will solve for required flight variables, control surfaces and throttle setting for a desired steady-state flight condition such as a given altitude and airspeed  .

The non-linear state flight model of UAV about a determined trim flight condition is linearised  by computing partial derivatives of dx/ dt = f(x,u) to generate the A and B matrices of linear state mode of the aircraft:

                             dx/ dt = Ax + Bu                  (2)

where x and u now represent small deviations of state variable and control input from the trimmed steady-state values.

The partial derivatives of the output vector y = g(x,u) is taken to build the C and D matrices:   
                               y = Cx + Du                       (3)

where y, x and u are small deviations from the trim. The output variable y is critical variable such as accelerations and very important for controlling the aircraft motion. The JACOBY method is employed for calculating all derivatives of input, output and state vectors .

Finally, the linear state model matrices A, B,C, D are stored in a format suitable for the analysis software like MATLAB

Based on the linear UAV model, the dynamic characteristics of UAV is analyzed, such as the trim, stability and control characteristics of the aircraft, the dynamic response of the aircraft to control input and external disturbance, the effect on the flight condition changes of the aircraft dynamics.

The Analysis will be performed based on the linear UAV model as well as non-linear ones using flight simulation on the computer. After understanding the dynamic behaviors of the aircraft, the flight control laws for UAV are designed using the root locus technique regarding the good flying handling qualities given by Military flying quality requirements like MIL - STD ­1797, MIL-F-8785 B .

The UAV TAMINGSARI is designed to fly within the flight envelope from the altitude 100 m to 1000 m at the speed of 75 km/h to 150 km/h, whose boundaries are determined by angle of attack -limit, service ceiling, engine limit and airspeed limit. When the UAV TAMINGSARI is flying from one flight condition to others flight conditions within this flight envelope, the UAV dynamic changes. This can cause that a dynamic mode being stable and adequately damped in one flight condition becomes  inadequately damped in other flight condition. This lightly damped oscillatory mode causes the difficulties to control UAV TAMINGSARI precisely.

This problem has been overcome by using feedback control to modify the UAV dynamics. The gain of this feedback must be adjusted according to the flight condition. The adjustment process is called gain scheduling technique. Here, the gains are designed for a large set of trim flight conditions and then are scheduled by interpolating them with respect to flight conditions: the gains are programmed as functions of dynamic pressure, see Figure 5, 6 and Figure 7.

Figure 5: Flight control law (algorithms) of armed navigation for waypoints following/ flight path tracking

Figure 6: Flight control law of coupled navigation for waypoints following & Flight path tracking

Figure 7: Modes of flight control law ( Algorithms) for the unsymmetrical flight of UAV

The detailed non-linear simulation of flight control laws for UAV TAMINGSARI is made in order to validate and enhance the results of the linear control analysis, design and development. This will ensure that the flight control laws of UAV TAMINGSARI works well over the complete range of flight-envelope for which it is designed, taking into account a suitable safety margin. This analysis covers a wide range of velocities and altitudes and all possible UAV configurations. The Figure 8 & 9 show the nonlinear, non real time simulation of the autopilot modes for UAV TAMINGSARI.

Figure 8: Nonlinear , non real time simulation of waypoints following & precisely flight path tracking for UAV TAMINGSARI

Figure 9: Nonlinear , non real time simulation of heading hold/select  for UAV TAMINGSARI

The internal structure of this non-linear autonomous UAV's flight simulation is shown in figure 10. This simulation is known as all software simulation of UAV TAMINGSARI and is used for

         Engineering design and development of control laws
         Pilot Training
         Flight Test planning     .
Figure 10: Internal structure of all software simulation of UAV TAMINGSARI using Simulink.

The second last step is so called hardware in-the-loop simulation or HILS. The Hardware-in-loop simulation (HILS) is  a cornerstone of unmanned aircraft/UAV development. In this phase, the control laws  for UAV TAMINGSARI will be evaluated in a real-time environment on the ground. Well designed simulators allow the control laws and mission functionality of UAV to be tested without risking hardware in flight test. Although HILS can not replace flight testing, it measurably reduces the likelihood of failure by detecting bugs and deficiencies in the laboratory. .

To facilitate this vital (and typically difficult) function, an integrated autonomous onboard computer system (real embedded controller) that has been developed is connected to the real-time flight simulator computer to receive the measured flight variables from flight control simulator as well as to send the autonomous control surfaces signal to the flight control simulator via the external RS 232 serial interface. At the same time, the integrated avionics system will receive send data from the ground control station, as showed in Figure 11. 

Figure 11 :  Structure of HILS used in developing the UAV TAMINGSARI

The integrated avionics system (autopilot system) for UAV Tamingsari consists of autopilot (embedded computer ), an air data, IMU, on-board data link/telemetry, on-board GPS, ground gontrol station  as well as the  payload system, see Figure 12.

Figure 12: System architecture of integrated avionics system for UAV Tamingsari.

Since the design and development of  control laws for UAV TAMINGSARI have used the software MATLAB and Simulink augmented with the autocode autocode tools Real-Time-Workshop (RTW) and Stateflow,  so the graphically flight model of UAV TAMINGSARI and its flight control laws can then be automatically coded in C using RTW, compiled using the software environment, and then downloaded to the UAV integrated onboard computer system (real embedded controller) . This embedded controller has more than enough CPU muscle to run complicated autocoded algorithms. 

The final step before the flight testing is what so called the IRONBIRD simulation. The IRONBIRD simulation is as final check for system configuration  and  used for measuring the closed-loop response of control laws, to verify actuator models. The Figure 13 shows the configuration of IRONBIRD simulation for UAV TAMINGSARI.

Figure 13: Ironbird simulation of UAV TAMINGSARI.

In this simulation, the autonomous onboard computer in which the flight control laws reside will be put into the UAV airframe and connected with the real servo actuators  of UAV to replace the mathematical model of actuator of UAV.   


The design and development of the control laws/algorithms for UAV TAMINGSARI is not  only just designing and simulating the linear control laws, but there are some issues such as getting the UAV data (aerodynamics, stability & control, engine), generating the nonlinear & linear model, trim determination, the gain scheduling, non-linear simulation of  control laws as well as the real time simulation of  the control laws on the hardware environment (hardware in the loop and ironbird simulation).

These issues have to be done and solved in order to convert the remotely piloted vehicle into fully autonomous UAV before the flight test of UAV TAMINGSARI is done. Actually these procedures/steps are common ones in designing and developing the automatic flight control system for the aircraft in the aircraft industries, like BAE System, Airbus, Boeing, etc.   


Rachman, E, “ Documen of  Technical Functional Requirement on Integrated UAV Avionics System”, Globalindo Technology Service Indonesia, Bandung-Indonesia, August,2007.

Rachman, E., Radzuan Razali, “ Design, Manufacturing and Flight test of UAV TAMINGSARI”, Report Journal, School of Aerospace Engineering, Universiti Sains Malaysia, Penang-Malaysia, 2004.

Rachman, E., Razali, R., “ Preliminary Design of Control Law for Longitudinal Control and Stability augmentation System of F-16”, Regional Conference on Aeronautical Science , Technology and Industry, ITB, Indonesia, May 2004.
Rachman, E., Muhammad, J., “ Non-linear Simulation of Controller For Longitudinal Control Augmentation System (CAS) of F-16 Using Numerical Approach”, International Journal of Information Science, December 2003.
Rachman, E., Azlin, Md., “ Computer Simulation of The Relaxed Static Stable         Aircraft of  F-16 Using numerical Algorithms”, International Journal of APPLIED SCIENCE &  COMPUTATIONS, Vol. 10  No. 13, December 2003.

Brian L. Stevens and Franks L. Lewis, “ Aircraft Control and Simulation”, John Wiley & Sons, Inc., New Jersey, 2003.
Rachman,E.,Fragaria, A., Zulkifli, Md., “ Application of Numerical Method for Simulating  Steady-State, Trimmed Flight Conditions of RPV TAMINGSARI “, Proceedings of  the Second World Engineering Congress, page 419-424, Kuching – Serawak, Malaysia,  July 2002.

Blight, J.D, Dailey, R.L, “ Practical control law design for aircraft using multivariable technique”, Taylor & Francis -Publisher, Philadelphia, 1996.

H. Almeida, V. de Broaderade, and J.R Macelino, “ Aerodynamic Design, Analysis and Test of the ARMOR X7 UAV, 11th International Conference on temeotely Piloted Vehicles, Bristol, UK, 1994.

Pahle, Joseph W., Bruce Powers, “ Research Flight Control System Development for F-18 High Alpha Research Vehicle, NASA TM-104232, 1991.

Swift, G., Sebak, K., and Shepard , C., “Subsonic Unmanned Air Reconnaissance System Design,” Procedings of the AIAA/AHS/ASEE Aircraft Design, Systems and Operation Conference, AIAA paper 90-3281, AIAA, Reston, VA, Sept. 1990.

Baarsul, M., “Lecture Notes on Flight Simulation Techniques”, Delft University of Technology, Netherland, August, 1989.

…………., “ Embedded Target for PC 104/++ for Use with Real Time Workshop”, MATLAB User’s Guide version 1, The Mathworks Inc., Hill Drive-Natick-MA, USA, 2002 


  1. Wow. A very nice dan completed articles. Thanks for sharing :). I hope can learn more from this blog.



  2. Very Nice job ,hope to be like experiences .