5.1. Flight Controller Design
The original flight controller (FC) of the X-Vert acted not only as the FC itself with a dedicated board of sensors but also as a receiver for the transmitter and as a pair of Electronic Speed Controllers (ESCs) for the BLDC motors. Since this board was not re-programmable, these different functions had to be covered in a different way. Starting with a dedicated FC, the following components were used, many of which are native to the Nano 33 IOT board [
45]:
Microcontroller unit (MCU): Cortex M0+ (native to Arduino board);
Inertial Measurement Unit (IMU): LSM6DS3 accelerometer and gyroscope (native to Arduino board);
Sonar: HC-SR04 ultrasonic sensor;
Communications: UDP/Wi-Fi via NINA W102 module (native to Arduino board).
For the experimental scenario, the UDP communications were reformulated to work via Wi-Fi instead of Ethernet, which required minimal adjustment. A dedicated case was designed and 3D-printed to accommodate the Arduino board, the HC-SR04 ultrasonic sensor and a support PCB for the servo and ESC connectors, which can be seen in
Figure 11.
The integration of the aforementioned FC into the frame of the X-Vert required additional steps as well, namely, providing power to the required components. A power distribution board (PDB) was included to regulate the voltage provided by the battery powering the ESCs, servos and flight controller to their adequate levels. The electronic components used in the experimental assembly were the following:
Servos: Spektrum A220 4g servos [
48];
ESC: SkyRC 20A Nano ESC with BLHeli firmware [
49];
BLDC motors: E-Flite BL280 2600 Kv Brushless Outrunner Motor [
50];
PDB: Matek Mini Power Hub [
51];
Battery: Gens Ace 450 mAh 7.4 V battery [
52].
Figure 12 presents a diagram of the connections of the different electronic components, which were assembled in the frame of the X-Vert, as shown previously in
Figure 2.
The management of the simulation was once again performed in Simulink, which was responsible for providing the references to the flight controller and for registering the control action and the estimated attitude computed by it.
In order to verify the effectiveness of this communication strategy while also taking the opportunity to partially validate the different control strategies, a test assembly was designed and 3D-printed, comprising the electronics (with the exception of the servos) and propellers, as shown in
Figure 13. Since the beam-like frame with the two motors and propellers is able to pivot around its center by means of a bearing, mounting the FC on it allows the testing of the stabilization algorithms on the
z-axis of the UAV and also ensures that any errors and problems in the implementation are detected. This proved to be of vital importance since the X-Vert is a fragile aircraft, and initial crashes were demonstrated to significantly hinder development.
5.3. Benchmark Maneuver for Experimental Vertical Flight
The benchmark maneuver described in
Section 4 had to be adapted to the context of the experimental tests, where the available flight area is limited to the arena previously described. A decision was made to focus on the pitch control of the aircraft, as it was considered the most necessary to stabilize when in vertical flight and will present significant challenges for the transition to aerodynamic flight in future work. Therefore, the solution found for performing the experimental trials was to order the X-Vert to perform a take-off and hold its altitude at 0.5 m, manually guide it to the center of the arena if a substantial deviation happened during the initial maneuvers, and only then provide a set of references for
. This set consisted of rotating
degrees around the
y-axis of the aircraft when it was fully vertical, holding this attitude for 2 s, returning to vertical orientation for 2 s, and then performing a symmetric rotation for another 2 s. This was carried out to ensure that the same reference would be provided during the tests for different controllers, allowing suitable conclusions to be drawn. Nonetheless, depending on the actual performance of the controller, additional lateral corrections were sometimes provided in order to prevent collisions, but this was avoided as much as possible.
An example of references of an experimental test, specifically the one performed for the BNC, is shown in
Figure 15, which shows some small corrections during the process of guiding the UAV to the center of the arena, together with the aforementioned references of 2 s for
and the constant reference altitude of 0.5 m.
5.5. Vertical Flight Results
Using the described setup, multiple trials were run for each of the controllers, and the data from each were registered using the following process: the references
, generated by MATLAB, were saved in a file generated at the end of each flight trial; in the same file, the quaternion
estimated by the FC and the control action
computed by it and sent to MATLAB via Wi-Fi/UDP were also saved; and the orientation and position provided by the MCS,
and
, were exported from the QTM software at the end of the trials to a separate file. Matching the timestamps of the two files, it was possible to overlap them, effectively allowing for the comparison of the reference quaternion, the respective estimation by the onboard FC and the quaternion provided by the MCS. Using the same experimental trial for the BNC, as shown in
Figure 15, the curves for
,
and
—from take-off to landing—are shown in
Figure 16, which also shows the comparison between the reference altitude
[m] and its value provided by the MCS, assumed as the ground truth. It should be noted that the estimated altitude was considered to be of less relevance for the purpose of comparing attitude controllers and, thus, was omitted in order to reduce the amount of data being transmitted.
For the purposes of computing the evaluation metrics
and
, a 10 s window was considered for each trial, corresponding to an interval of 2 s before and 2 s after the references were sent. This ensured that the comparison was fair, regardless of the length of the trials for each controller.
Figure 17 presents the tracking results for each controller according this 10 s window of each flight trial.
Analyzing
Figure 17, it is clear that all the controllers are capable of tracking the references in
while also stabilizing the remaining degrees of freedom of the attitude. The BNC enables the accurate tracking of
, but its performance worsens for
and
. On the other hand, the NDI controller manages to keep these closer to null values but has some some spikes when tracking
, although still managing to track it with precision. In the trial for the INDI controller strategy, additional lateral references were provided in order to avoid collisions, but the controller still managed to track the references. Nonetheless, since these lateral references were provided simultaneously to the
references, some performance loss may have happened.
Table 3 provides the evaluation metrics that summarize the tracking results for the experimental trials, where it can be seen that NDI has the best overall performance, while INDI has the worst, possibly evidencing the aforementioned loss of performance for this controller, and the BNC provides the middle ground among the three controllers. Lastly, regarding altitude tracking, it is clear that there was a sudden drop in altitude in the trial for the NDI controller, which was duly analyzed, and the explanation is provided after the analysis regarding actuator oscillation.
Moving on to the analysis of actuator oscillation,
Figure 18 provides the plots of
registered for the trial of each controller.
Focusing the analysis on the inputs used for attitude stabilization—
,
and
—the first obvious conclusion that can be drawn is that there is far less noise in the respective plots when compared to the simulation and HITL results. This may be explained by the reduction in the values of the gains but could also evidence excessive noise when modeling the sensors. Analyzing the smoothness of the curves in
Figure 18, it can be stated that NDI and the BNC appear to be similar, with the BNC being more noisy for
and NDI for
, and that there is virtually no oscillation for
for all three controllers. For the elevator input, the INDI controller has a far smoother actuation when compared to the remaining two control strategies, not showing any of the sudden spikes that appear in the
curves of the trials for NDI and the BNC. Nonetheless, the curve for
has an almost constant oscillation, which could have been caused by the previously mentioned simultaneous lateral references during the maneuvers. Summarizing these results,
Table 4 provides the values for
,
and
, as well as their average values.
Lastly, some considerations about the altitude control should be provided, namely, the sudden loss of altitude shown in
Figure 17 for the experimental trial of the NDI controller. As
Figure 18 also demonstrates for the same trial, the curve of
has abrupt decreases, which cannot be explained by excessive altitude. A similar event also happened during the experimental flight with the INDI controller, although to a smaller degree. After thorough analysis, it was found that this was caused by the partial obstruction of the sonar by the tail of the X-Vert when its pitch went beyond 90 degrees. Since this obstruction caused the sonar not to receive a response signal (activating a timeout), it assumed a far greater altitude than the real one, and the controller responded accordingly, decreasing the throttle input. This issue was acknowledged, and in general, the controllers demonstrated robustness to its influence, but it should be addressed in future work.
In summary, the general conclusions for the experimental flight tests largely agree with those drawn for the simulation and HITL scenarios when comparing the values of and for each. Some discrepancies are found when comparing the performance of each controller among the three scenarios, which can happen due to possible mismatches between the X-Vert simulation model and the real aircraft, the robustness of each control method to such discrepancies, and the tuning parameters of each controller, such as the gains, among others. These discrepancies are therefore expected to arise, but the conclusions drawn are qualitatively the same, as they confirm that all the control solutions are capable of tracking the references, with the INDI controller standing out by providing a smoother control action with less actuator oscillation.