FS2004 aircraft‐simulated characteristics PREADAR MQ‐1.
In order to develop and implement the laws piloting for an aircraft, flights validation will be necessary. This could in fact be done, in a first step, by using flight simulators. In this work, we choose the predator virtual model flying in MicrosoftTM flight simulator (MSFS) and we propose the procedure of controlling its attitude. We send the adaptive integral high‐order sliding mode (AIHOSM) inputs piloting control. This work is a real‐time virtual simulation. For the AIHOSM controller, we propose the gain adaptation for reduction of chattering phenomena and possibility to control the aircraft presented by the uncertain nonlinear systems in which the uncertainties have unknown bounds. This technique is more robust and simpler to implement than the quaternion one and only needs the information about the sliding mode surface.
- adaptive integral high-order sliding mode controller
- Microsoft flight simulatorr
- UAV predator
- real-time virtual simulation
In reality, all physical systems are affected by uncertainties due to modeling errors, parametric variation, and external disturbances. Controlling of dynamical systems in the presence of uncertainties is extremely difficult as the controller's performances degrade and the system may even be led to instability. As such, active researches are continuing to develop controllers that can work successfully in spite of uncertainties. Robust control techniques such as nonlinear adaptive control, model predictive control, backstepping and sliding mode control [1, 2, 3, 4, 5, 11, 19, 20, 32, 34] have been evolved to deal with uncertainties.
The classical Sliding Mode Control (SMC) leads, generally, to the appearing of an undesirable chattering phenomenon [2, 3, 9, 10, 13, 14, 15] to solve this problem we propose an approach using the Adaptive Integral High Order Sliding Mode Controller (AIHOSMC). This technique ensures a good tradeoff between error and robustness against noise and especially a good accuracy for a certain frequency range, regardless of the gain setting of the algorithm. This technique is based on estimating the successive derivatives of the sliding mode surface and transmitting them to the control block, all by using an aircraft in virtual simulated environments [24, 25]. It is real‐time virtual simulation, which is close to the real‐world situation.
The piloting technique proposed in this work is more robust and simpler to implement than the quaternion one. It only requires information about the sliding mode surface.
2. Problem statement
Through a methodology based on the confrontation of the real and the simulated worlds, the main objective of this chapter is to develop an autopilot based on a robust controller to maintain the desired trajectory (Figure 1).
To achieve this objective, we use the flight simulator FS2004 as a simulated world environment coupled to a hardware and a software development platform. This simulator is developed by Microsoft, with several simulated aircraft included in its airplane library. We choose the Predator MQ‐1 (Figure 2). It is considered as a reconnaissance and an intelligent system.
In this work, the main goal is to maintain the desired aircraft's trajectory; and to do so, we propose the following approach:
description and analysis of the aircraft system model;
implementation of a real‐time interface between the flight simulator FS2004 and the module real‐time Windows target of Simulink/Matlab;
development and implementation of the piloting law based on adaptive integral sliding mode for the design of the autopilot controller;
3. Characteristics of the predator
The MQ‐1 predator is an American unmanned aerial vehicle (UAV) that can serve in the reconnaissance or attack role. Predator has been in the United States Air Force (USAF) service since 1995 and has seen combat in numerous theatres.
Airwrench tool gives access to flight dynamic characteristics (
|Dimensions||Moments of inertia|
|Length: 11.88 m||Pitch: 1800.0|
|Wingspan: 14.84 m||Roll: 3700.00|
|Wing surface area: 11.43 m2||Yaw: 1800.00|
|Wing root chord: 1.55 m||Cross: 0.00|
|Aspect ratio: 19.28|
|Taper ratio: 0.10|
4. Implementation of a real‐time interface between Microsoft flight simulator and the module “real‐time windows target” of Simulink/Matlab
We communicate with FS2004 by using a dynamic link library called FSUIPC.dll (Flight Simulator Universal Inter‐Process Communication). This library created by Peter Dowson and is downloadable from his website  (www.schiratti.com/dowson.html). It allows external applications to read and write in and from Microsoft flight simulator (MSFS) by the means of an IPC (interprocess communication) using a buffer of 64 Ko. The documentation given with FSUIPC explains the organization of this buffer [8, 17, 18].
To read or write a variable using the FSUIPC, we need to know its offset address, its format, and the necessary conversions. For example, the bank angle (φ) is read as a signed long S32 at the offset 0x057C. Table 2 shows the parameters used in our simulation.
|Offset||Name||Var. type||Size (octet)||Usage|
|057C||Bank angle (φ)||S32||4||Degree|
|578||Elevation angle (θ)||S32||4||Degree|
|580||Head angle (ψ)||U32||4||Degree|
|02BC||Speed IAS (V)||S32||4||Knot*128|
|0BB2||Elevator deflection (δe)||S16||2||-16383 to +16383|
|0BB6||Aileron deflection (δa)||S16||2||-16383 to +16383|
|0BBA||Rudder deflection (δr)||S16||2||-16383 to +16383|
|088C||Thrust control (δx)||S16||2||-16383 to +16383|
To deal with the design of an autopilot controller, we propose an environment framework based on a software in the loop (SIL) methodology (see Figure 3) and we use Microsoft flight simulator (MSFS‐2004) as a plane simulation environment [24, 25].
This work is a real‐time virtual simulation, we read or/and write the desired parameters from and to MSFS‐2004 through the computer memory by using the FSUIPC library.
5. System modeling
with is the aircraft state vector in the body frame:
is the control vector and , , and denoting thrust control, elevator deflection, aileron deflection, and rudder deflection, respectively.
We propose the following output vector:
where ,,,, .
6. Integral sliding mode controller problem formulation
Consider the following nonlinear uncertain system 
is a sliding variable. and are uncertain smooth vector fields and are differentiable.
The uncertainties in and are caused by the parameter variations, the nonmodeled dynamics, or the external disturbances.
Assumption 1 : The relative degree r of system (6) is constant and known, and the associated zero dynamics are stable.
The rth‐order sliding mode is defined through the following definition.
is called “rth‐order sliding mode set,” which is nonempty and is locally an integral set in the Fillipov sens . The motion on is called “rth‐order sliding mode” with respect to the sliding variable S.
With (), is named “real rth‐order sliding mode set,” which is nonempty and is locally an integral set in the Fillipov sens . The motion on is called “real rth‐order sliding mode” with respect to the sliding variable S. Given the form of system (6), the rth‐order sliding mode control (SMC) approach allows the finite time stabilization to zero of the sliding variable S and its (r‐1) first time derivatives by defining a suitable discontinuous control function. The rth time derivative of S satisfies the equation [6–8]:
Assumption 3 [31, 32]: Functions and are smooth and uncertain but bounded functions; furthermore, they can be partitioned into a well‐known nominal part (respectively, and is an uncertain bounded one, respectively, and .
Functions and are such that and there is an upper bound constant and a priori known constant such that the uncertain functions satisfy the following inequalities :
The rth‐order sliding mode controller (SMC) of Eq. (6) with respect to the sliding variable S is equivalent to the finite time stabilization of
Consider the following state feedback control
with σ the auxiliary control input. Note that this state feedback control linearizes (by an input‐output point of view) the nominal system, i.e., system (12) with no uncertainties.
Applying Eq. (13) to system (10), one gets
The control objective is now the following: how to define a discontinuous control law ensuring the stabilization of the previous system, in a finite time and in spite of the uncertainties?
6.1. Control design
We proposed two high‐order sliding mode controllers based on integral sliding mode concept : the first requires knowledge of the uncertainties bounds, whereas, for the second one, no knowledge of the bounds is required. This latter feature is due to an adaptation law for the control gain.
6.1.1. Finite time stabilization of an integrators’ chain system
The following theorem proposes a continuous finite time stabilizing feedback controller for a chain of integrators, by giving an explicit construction involving a small parameter. One gets an asymptotically stable closed‐loop system; the system is homogeneous of negative degree with respect to a suitable dilation, which implies the finite time stability. Consider the system (12) with no uncertainty (and ).
Theorem 1 
Let be such that the polynomial is Hurwitz. There exists such that, for every , the origin is a globally finite time stable equilibrium point for system (15) under the feedback
For with and .
Consider the following function, named “integral sliding variable,” defined as (being the initial time)
with the term defined by Eq. (16) in Theorem 1. Note that, : then the system is evolving on the sliding manifold early from the initial time.
This latter feature is a key point of the integral sliding mode controller; in fact, the definition of the integral sliding variable allows to ensure that a sliding mode has been established early from the initial time, thanks to the finite time convergence property of . Then, it is necessary to force the system to evolve on the integral sliding surface in spite of the uncertainties and perturbations: it will be the role of the discontinuous part of the controller. In fact, the term appearing in can be viewed as a desired trajectory generator. By supposing that, , one has
From the previous inequality, it is clear that, if the control guarantees that and given the features of , system (15) is stabilized at the origin in a finite time.
Then, in order to stabilize system (15), the following control law is defined
This controller has two parts:
The first one , called “ideal control”, is continuous and stabilizes the system (15) at the origin in absence of uncertainties. This controller is also used in order to generate the system's ideal trajectories;
The second one provides the complete compensation of uncertainties and perturbations and ensures that control objectives are reached, where the gain is satisfying
K fulfills the condition (20), the control law
ensures the establishment of a rth‐order sliding mode versus the sliding variable S, i.e., the trajectories of system (6) converge to zero in finite time.
7. Application of the adaptive integral‐ high‐order‐sliding ‐mode controller for piloting
The relative degrees are .
The input control is defined by .
We propose the integral sliding variable as follows:
where is the desired vector and is the output vector of integrators’ chain.
In Theorem 1, we choose , so we can take .
The integrators’ chain is defined by
The control input can be chosen as
The reduction of the noise is assumed by the presence of the linear term (, where ) in the equation of each output i in the algorithm. This linear term can be expressed as the law of the control, which allows the reduction of the chattering effect. The addition of this continuous term smoothes the output noise due to a low gain values. If the chosen values of these gains become very low, the convergence of the algorithm becomes slow. Therefore, the choice of the convergence gains remains difficult and is based on a compromise between reducing the noise and having a short algorithm's convergence time. It should also be noted that in the presence of noise, it is necessary to impose small initial values for the dynamic gains in order to reduce the effect of the discontinuous control. Moreover, the presence of integral term () in the expressions of the dynamic gains provides the smoothing of the estimated derivatives.
The dynamic adaptation of the gains is given by
The application of this piloting technique in FS2004 is shown in Figure 2. and are latitude, longitude and altitude of aircraft, respectively.
The input signals at the upper and lower saturation values of the control laws are used to respect the actuators bounds. Scaled functions are added to take into account the actuators resolutions.
The adaptive integral high‐order sliding mode technique is used to recover the desired signal. Several flight tests were realized to demonstrate the effectiveness of the combined controller/integrators’ chain.
7.1. Simulation results
We run the flight simulator FS2004 and the interface with the module real‐time windows target of Simulink/Matlab.
In a first step, we used aircraft predator, the aircraft taking off was done using the keyboard. Then, we run our software to transmit the control inputs based on the adaptive integral higher‐order sliding mode to the autopilot controller in order to maintain the desired trajectory.
The desired signal injected and the output integrators’ chain are shown in Figure 4. We notice the outputs of the integrators’ chain where follows the references , and perfectly. The surface sliding mode is small (see Figure 5).
Figure 6 shows the error between the output integrators’ chain and . The signal follows .
The input signals at the upper and the lower saturation values of the aileron, rudder, and elevator deflections are used to respect the virtual Joystick (PPjoy) bounds. Upper limit: 62767, lower limit: 1.
Airwrench gives the following data:
Aileron parameters: Aileron area 1.70 m2, aileron up angle limit 20.0°, aileron down angle limit 15.0°.
Elevator parameters: Elevator area 1.54 m2, elevator up angle limit 25.00°, elevator down angle limit 20.00°.
Rudder parameters: Rudder area 0.62 m2, Rudder angle limit 24.00°.
The evolution parameters , , and are shown in Figure 10.
The flight tests demonstrate the robustness of the adaptive integral high‐order sliding mode. It makes it possible to ensure a better derivation of the desired input signal in real time, and this is to ensure a good accuracy of tracking the desired trajectory.
In this chapter, a procedure of the communication with an aircraft model in a simulated environment and the implementation of the real‐time interface between the Microsoft flight simulator and the module “real‐time windows target” of Simulink/Matlab has been presented. After that, an adaptive integral sliding mode for an aircraft autopilot has been presented. Our approach uses the environment simulator (FS2004) to reduce the design process complexity.
For the piloting part, we have interested the gain adaptation for the reduction of chattering phenomena and possibility to control the aircraft presented by the uncertain nonlinear systems in which the uncertainties have unknown bounds. This technique is more robust and simpler to implement than the quaternion one and only needs the information about the sliding mode surface.
The flight tests demonstrate the robustness of an adaptive integral sliding mode. The former ensures a better derivation of the desired input signal in real time, and this ensures a good accuracy in terms of tracking for a desired reference.