## 2 Materials and Methods  
Before presenting the architecture of the designed prototype, it is necessary to point out that our aim is for the device to be universally used as the replacement for the set of batteries for any UAS, in the same way as other generators. Its differences lie in its higher power, at twice the maximum of the largest hybrid generator, and in the number of additional functions its novel electronic design provides. However, although an FPGA with numerous control loops manages the whole system, it must also be analysed as a power source that replaces the battery, as graphically shown in Figure 5. Flight control algorithms have not been programmed in the FPGA. Although its implementation would allow the use of advanced control strategies regarding system uncertainty [27; 28], thus reaching an optimal result, the great complexity of integrating flight control algorithms with the management of energy, as well as the electronic speed controllers (ESCs) and propulsion motors, would give rise to an entire H-UAS instead of a universal hybrid power source. Figure 6 shows a diagram of the system's simplified architecture. The three-phase voltage generated by the BLDC generator is actively rectified and filtered. The obtained output DC variable voltage (the engine works at a variable RPM) is the input for a synchronous boost converter that is controlled by the FPGA. Thus, a stable DC voltage is used to power the UAS' flight controller, the propulsion motors' ESCs and any other on-board electronic device. In the DC bus, an SC array and two-way converter are also connected. A second control loop of the FPGA manages the charging and discharging of the stored energy. When a sudden demand for power because of any external action or perturbation is detected, the SCs provide enough energy to keep the DC bus stable during the time of acceleration of the ICU. Once the power demand is reduced, the aforementioned control loop re-initiates the charging of the SCs. The throttle and the cooling system control, also managed by the FPGA, are not included in the figure. Figure 5: Prototype used as battery replacement in any UAS. Figure 6: Simplified architecture of the hybrid generator. A more detailed graph with the FPGA, as the core of the hybrid generator, is shown in Figure 7. Although at first glance Figure 7 might seem complex, a colour code has been used to facilitate the reader's analysis of the system. The ICU, BLDC generator and SC array are presented in orange, a black-grey gradient and green, respectively. AC/DC and DC/DC converters for the output DC bus are shown in blue. Control, monitoring and data transmission are managed by the FPGA, which is represented within a red rectangle in the centre. Algorithms and their connections with the different pieces of hardware are shown in yellow. Actions are described inside white boxes. Air-forced ventilation for the ICU is shown in grey, and data sent to a land On-Screen-Display (OSD) system by an XBEE(tm) SX868 long-range 433 MHz module are shown in purple. The intricate paths of red lines show that the overall system is fully controlled by the FPGA, which receives sensors' inputs and establishes the converters' points of operation that give rise to a combination of throttle level and duty cycles suitable for the flight envelope. The flight envelope can be selected by the pilot by defining the maximum level of throttle variation, when required by flight conditions, or automatically adapted by reducing the engine's RPM to produce only the instantaneous energy needed. The variable regimen of the ICU, on a wide range, reduces heating and fuel consumption. The task of the SC array, as explained below, is to provide the necessary energy to allow the engine to accelerate instantaneously. The slow response of the ICU, in combination with the inertia momentum, does not allow the generation of maximum power if a sharp action of the pilot is performed or the aircraft needs additional power to compensate for gusts of wind. Table 3 shows the main specifications of the prototype.