**5.1 Experiment results**

140 Frontiers of Model Predictive Control

MPC Reference

0 5 10 15 20 25 30 35 40

MPC Refrence

0 5 10 15 20 25 30 35 40

Time (sec)

Time (sec)

Fig. 4. Square wave roll angle tracking with the MPC controller.





0

Pitch Ang (Deg)

5

10

15




0

Roll Ang (Deg)

2

4

6

8

Fig. 5. Square wave pitch angle tracking with the MPC controller

This section presents the implementation of developed hardware in the loop system. Two experiments were conducted in this work. The first is conducted where the flight test data were used as reference model and disabling the role of the IMU. Figures 4, 5 and 6 present the generated inputs by the real time MPC to the system to follow the reference model compared with the given inputs system during the flight test. From Fig 1, the collected PWM signals are collected as duty cycle; therefore it has to be transferred to the corresponding angles for each actuator. Instead of activating the IMU software, the feedback to the MPC is the reference model itself. It is noticeable that the generated inputs by the MPC do not follow closely the actual inputs used for modelling task. This is because the MPC is designed based on linearized model of the platform.

As preliminary step to investigate a real autonomous flight, a second experiment is carried out where the IMU software is enabled (fig1) to test its functioning and also to assess how the MPC is sensitive with disturbances. To achieve these criterions, the reference model is settled to zero and the nose of the helicopter is shaken slightly with small variation, the position of actuators change in order to bring back the system into the still condition i.e. the MPC gives the action to the system.

Development of Real-Time Hardware in the Loop Based MPC for Small-Scale Helicopter 143

MPC Actual

In this paper, a MIMO model predictive control (MPC) system is implemented into hardware in the loop based xpc-target rapid-prototype system to guarantee the equilibrium of the helicopter platform. The MIMO MPC design was carried out using an experimentally estimated model of the Helicopter. The performance of the controller is tested in simulation and hardware in the loop using different set-point scenarios. Simulation results showed that the controller can efficiently stabilize the system under all the introduced disturbances. A real time controller based on xpc-target rapid prototype is developed to implement the proposed controller. The ground results proved that the proposed real time MPC can

Time (s)

5 10 15 20 25 30 35 40

The authors gratefully acknowledge the support from MOSTI (Malaysia) Sciencefund: Hardware-in-the-Loop Simulation for Control System of Mini Scale Rotorcraft project No. 13-01-03-SF0024. The previous team researchers Mr Terran and KC Yap are gratefully

Abdelhakim Deboucha, Zahari Taha, 2010. Identification and control of small-scale

helicopter. *Journal of Zhejiang University Science A* (Applied Physics & Engineering).

Fig. 9. generated pedal input by MPC vs pedal command.

sufficiently stabilize the system in hovering conditions.

**6. Conclusion** 





Amp (Deg)

0.2

0.4

0.6

0

**7. Acknowledgment** 

acknowledged for their help.

Vol. 11 (12), pp. 978-985

**8. References** 

Fig. 7. generated lateral input (MPC) vs lateral command

Fig. 8. generated longitudinal input (MPC) vs longitudinal command.

Fig. 9. generated pedal input by MPC vs pedal command.
