*5.2. Hardware–in–the–Loop Validation*

The simulation setup described above is deployed to a HIL laboratory facility according to the scheme outlined in Figure 9. System components are set up as follows:

• The software developed in Matlab/Simulink for the mathematical modeling of helicopter dynamics and AHRS devices is automatically coded and deployed to a highperformance Real-Time Target Machine (RTTM) by Simulink Real-TimeTM tools. Solver

frequency is set at 20 kHz, while AHRS model data are generated at 100 Hz. Software coding and deployment are performed through a host desktop PC, where the FlightGear open-source application is used to represent simulation data through a 3D graphical interface.

• The output of RTTM is provided via a dedicated standard industrial bus I/O module with two isolated ports. The first port is used to output the emulated AHRS data. The second port is used to generate repeatable control commands for HIL validation only, as if they were provided by the pilot on the ground.

**Figure 9.** Sketch of HIL simulation setup.


Different maneuvers are performed during HIL simulations to validate the control strategy in Section 5.1 and the hardware implementation. A sample case is reported in what follows. Starting from a hovering condition, a step input *δ* (*pilot*) *<sup>a</sup>* <sup>=</sup> 0.08 is generated via the RTTM in order to reach a desired roll angle of 2 deg while keeping the other inputs unaltered. In Figures 10 and 11, the results of the maneuver are reported in terms of variation with respect to the hover trim variables.

**Figure 10.** Roll angle stabilization maneuver: comparison between MIL and HIL simulations (roll angle, variation with respect to the hover condition).

**Figure 11.** Roll angle stabilization maneuver: comparison between MIL and HIL simulations (roll rate).

It can be noted that, for the same maneuver, the error between HIL and MIL simulations always remains bounded and smaller than 0.001 deg (roll angle) and 0.005 deg/s (roll rate). Furthermore, discretization and quantization effects of signals are investigated, which, however, do not affect controller efficacy. This and many other simulation tests validate the quality of the simulation software and the correct implementation of acquisition, actuation, and control system protocols in the presence of real flight hardware in a controlled environment prior to flight.

#### **6. Flight Tests with the Unmanned Helicopter**

After an extensive campaign of HIL simulations aiming at the fine-tuning of controller gains and the correct setup of hardware implementation, the helicopter is finally configured for unmanned flight tests and equipped with the ballistic parachute canopy. In order to simulate the presence of on board passengers, sandbags are put on the two seats, thus replicating the inertial configuration analyzed in Section 4, with the exception of the canopy. The campaign, performed in June 2018 at the airport of Oristano–Fenosu (Sardinia, Italy) in 4 days, is organized according to the following steps:


$$
\delta\_a = \delta\_a^{(pilot)} + k\_d^{(\phi)} \,\, ^\circ \text{p} \tag{30}
$$

$$
\delta\_{\varepsilon} = \delta\_{\varepsilon}^{(pilot)} + k\_{d}^{(\theta)} q \tag{31}
$$

At the end of Step 3, control gains are fine-tuned such that *k* (*φ*) *<sup>d</sup>* and *k* (*θ*) *d* are respectively increased by about 2% and 13% with respect to the first-guess values.

4. Step 4. The attitude controllers in Equations (28) and (29) are investigated, leaving the pilot with direct control of MR collective pitch only. Control gains are corrected such that *k* (*θ*) *<sup>p</sup>* and *k* (*θ*) *<sup>i</sup>* are respectively increased by 25% and 60% with respect to the precautionary small values proposed in Section 5.1. Finally, *k* (*φ*) *<sup>p</sup>* and *k* (*φ*) *<sup>i</sup>* are left unaltered.

Some flight data is reported, which describes the tests performed after Step 4 with the unmanned system in its definitive mission configuration.

In Figure 12, the commanded value of yaw rate, calculated as *ξr δ* (*pilot*) *p* (black line), is compared with the corresponding value measured by the AHRS (gray line). The data are expressed in deg/s and show the correlation between the desired and achieved attitude motion while the pilot performs oscillatory yawing maneuvers.

In Figure 13a,b the stabilization of roll and pitch angles is also analyzed over the same time period (80 s). In particular, roll angle oscillates with a standard deviation of 0.78 deg about the mean value of −1.91 deg. Similar considerations hold for the pitch angle, characterized by a standard deviation of 0.74 deg and a mean value of 0.35 deg. If, on the one hand, the roll angle is consistent with the simulation results obtained in Table 3, the pitch angle shows major difference. This is caused by the presence of light tail wind and the fact that the inertial and aerodynamic configuration of the unmanned helicopter differs because of the presence of the parachute canopy over MRH. Collective command, characterized by a standard deviation of 0.01, remains almost constant and equal to 0.66 (corresponding to 13.67 deg pitch angle).

**Figure 12.** Yaw rate stabilization in a near–hover condition (flight tests, 10 Hz sampling).

**Figure 13.** (**a**,**b**) Attitude stabilization and (**c**) collective pitch command in a near–hover condition (flight tests, 10 Hz sampling).

The final experiment, performed on 22 June, is described in Figure 14, where helicopter trajectory is plotted in a 3*D* environment. Position data are obtained from GPS measurements provided by the AHRS and recorded by the RTC2. After the initial phase required for pre–flight checks and turbine engine warm up, the take–off occurs at time *t*0. The climb phase to the height *<sup>h</sup>*<sup>1</sup> <sup>=</sup> 330 m is performed in *<sup>t</sup>*<sup>1</sup> <sup>−</sup> *<sup>t</sup>*<sup>0</sup> <sup>=</sup> 97 s in the presence of South–West (SW) wind, with an average climb rate of about 3.4 m/s. In particular, during the first 40 s the climb rate is stabilized at 2 m/s by pilot's action, and then pushed to 4.5 m/s until reaching the maximum height. At time *t*1, the prescribed flight termination procedure is activated by switching-off the engine and commanding parachute ejection

at time *t*<sup>2</sup> = *t*<sup>1</sup> + 4 s. Complete parachute deployment is performed in about 5 s, at time *t*<sup>3</sup> = *t*<sup>2</sup> + 5 s (see Figure 15). During the helicopter accelerated free fall the total height loss is *<sup>h</sup>*<sup>3</sup> <sup>−</sup> *<sup>h</sup>*<sup>2</sup> <sup>=</sup> <sup>−</sup>146 m, with an average vertical speed of <sup>−</sup>16.2 m/s. After *<sup>t</sup>* <sup>=</sup> *<sup>t</sup>*<sup>3</sup> the rate of descent stabilizes to a practically constant value of 7.5 m/s until the helicopter safely lands at *t*<sup>4</sup> = *t*<sup>3</sup> + 27 s. The effect of wind is visible in Figure 14, where helicopter trajectory deviates in the North–East direction and stops near the runway at about 285 m from the take–off point. Upon impact with the ground, acceleration peaks are recorded that fall within the parameters of crash tests in both the aeronautical and automotive sectors. Test data show that the system is likely to achieve its goal of saving lives, even at a lower altitude of just 150 m.

**Figure 14.** Trajectory followed during the final mission with parachute ejection (Maps Data: Google Earth © 2020 TerraMetrics).

**Figure 15.** Parachute ejection phases (courtesy of Curti Aerospace Division).

#### **7. Conclusions**

In the present paper, the complete procedure adopted to transform a light helicopter into an unmanned rotorcraft is described. By adopting the MBD approach, mission requirements were first outlined, and the design of the control system was addressed in terms of system architecture definition. Particular attention was devoted to the mathematical model of the helicopter and its subsystems, made on the basis of geometric, inertial, and aerodynamic data provided by the manufacturer and refined by identification techniques.

With the purpose of validating an innovative ballistic parachute rescue system, a closed-loop controller was developed to allow stable maneuvering in the field of view of a remote pilot. To this end, attitude stabilization algorithms were first tested in a Model-Inthe-Loop environment. Furthermore, laboratory experiments allowed for (1) Hardware-In-the-Loop validation of involved equipment and (2) control software deployment on real-time target machines. Dedicated flight tests were performed to prove the effectiveness of the approach and the achievement of the desired closed–loop flying qualities. The final mission successfully showed the feasibility of the proposed termination procedure by securing a safe helicopter landing in the event of engine failure. The experiment allowed researchers to focus on the design and experimental validation of technologies at the core of future UAM, envisaging a more efficient, safe, and possibly sustainable exploitation of the vertical dimension.

**Author Contributions:** Conceptualization, E.L.d.A.; methodology, E.L.d.A., F.G., M.T., G.R. and C.A.; software, E.L.d.A. and M.T.; validation, E.L.d.A., F.G., M.T., G.R. and C.A.; formal analysis, E.L.d.A., F.G. and C.A.; investigation, E.L.d.A., F.G., M.T. and C.A.; resources, E.L.d.A., F.G., M.T. and C.A.; data curation, E.L.d.A. and C.A.; writing—original draft preparation, E.L.d.A. and F.G.; writing—review and editing, E.L.d.A., F.G. and C.A.; visualization, E.L.d.A. and F.G.; supervision, F.G. and C.A.; project administration, F.G. and C.A.; funding acquisition, F.G. and C.A. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by European Commission in the framework of H2020–EU.2 and H2020–EU.3 DISRUPT project (ID: 691436).

**Data Availability Statement:** Not applicable.

**Acknowledgments:** The authors wish to express their sincerest gratitude to Hypertech Solution S.r.l., for the effective cooperation that allowed the successful achievement of the goal.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
