An Optimal Fuzzy Logic-Based Energy Management Strategy for a Fuel Cell/Battery Hybrid Power Unmanned Aerial Vehicle

: With the development of high-altitude and long-endurance unmanned aerial vehicles (UAVs), optimization of the coordinated energy dispatch of UAVs’ energy management systems has become a key target in the research of electric UAVs. Several different energy management strategies are proposed herein for improving the overall efﬁciency and fuel economy of fuel cell/battery hybrid electric power systems (HEPS) of UAVs. A rule-based (RB) energy management strategy is designed as a baseline for comparison with other strategies. An energy management strategy (EMS) based on fuzzy logic (FL) for HEPS is presented. Compared with classical rule-based strategies, the fuzzy logic control has better robustness to power ﬂuctuations in the UAV. However, the proposed FL strategy has an inherent defect: the optimization performances will be determined by the heuristic method and the past experiences of designers to a great extent rather than a speciﬁc cost function of the algorithm itself. Thus, the paper puts forward an improved fuzzy logic-based strategy that uses particle swarm optimization (PSO) to track the optimal thresholds of membership functions, and the equivalent hydrogen consumption minimization is considered as the objective function. Using a typical 30 min UAV mission proﬁle, all the proposed EMS were veriﬁed by simulations and rapid controller prototype (RCP) experiments. Comprehensive comparisons and analysis are presented by evaluating hydrogen consumption, system efﬁciency and voltage bus stability. The results show that the PSO-FL algorithm can further improve fuel economy and achieve superior overall dynamic performance when controlling a UAV’s fuel-cell powertrain.


Introduction
Fuel cells are suitable for the power demands of long-endurance UAVs due to their high conversion efficiency and high energy density. Meanwhile, fuel cells can generate electrical energy with near-zero pollution, less noise and less heat compared with conventional combustion engine driven generators. Therefore, the developments in fuel-cell technology align with tendencies toward green aviation and electrically propelled aircraft [1][2][3]. Furthermore, a fuel-cell-powered system hybridized with batteries and ultra-capacitors (UC), which have high power densities, could compensate for the deficient transient performance of fuel cells themselves, and this system could improve the holistic mobility and reliability of UAVs. There has been a multitude of studies on fuel-cell UAVs in universities and polytechnics in the last few decades. For example, the 500 W fuel-cell-powered UAV from There is no doubt that a well-designed EMS is indispensable for HEPS based on fuel cells, as an EMS can guarantee each power source operates with efficiency while meeting the load power requirements [7]. Nowadays, a host of EMSs for fuel-cell HEPS can be seen in the literature, especially in the fields of micro-grids (MG) [8,9], hybrid electrical vehicles (HEV) [10][11][12][13][14][15][16], electric ships [17,18], more electric aircraft (MEA) [19][20][21][22] and electrical propulsion aircraft and UAVs [23][24][25][26][27][28][29]. EMSs are represented by popular online control methods, such as rule-based control [19,[28][29][30], fuzzy-based control [9,23,[31][32][33][34], model predictive control [12,15,17,[35][36][37] and fuzzy logic model predictive control [13]; and other optimization-based methods, such as convex optimization [14], dynamic programming (DP) [24] and neural network (NN) methods [10]. Deep reinforcement learning (DRL) [18] algorithms are known as offline algorithms with great optimization performance.
The driving modes of the vehicle and the UAV can be divided into two modes: manual operation and automatic operation. Pay attention to the difference in the propulsion power demand characteristics of the two. The vehicle's power demand changes frequently and the change range is large, and the peak power demand of the UAV is relatively smooth in different mission stages. The power requirement of the UAV during the climbing phase is much greater than the power requirement during the cruising phase. Nonetheless, the current research on UAV hybrid power systems' EMSs focuses more on software simulations and ground demonstrations than actual flight. Due to the complexity of UAV systems, their aerodynamics and their flight control laws being strictly limited [4,6], only a few simple energy management strategies have been successfully implemented. To design an effective energy management system for a fuel-cell drone, there are two main challenges for the control system: (i) How can the operating efficiency of the fuel-cell system be improved in various flight scenarios to keep the battery power within the allowable range and reduce the pressure of the fuel-cell system? (ii) Under the constraints of the CPU and memory configuration of the onboard controller, how can the computational burden of the nonlinear energy management optimization problem be reduced so that the controller can respond in real-time to the power demand of the UAV?
A comparative study of EMS for a hybrid emergency power system of MEA was performed by Motapon S N et al., who also proposed five kinds of EMS, which were compared by evaluating hydrogen consumption economy, overall efficiency, and fuelcell lifecycle [19,20]. At present, RB-based control has become a widely-applied strategy for UAVs in virtue of its safety and reliability. A Savvaris et al. [27] achieved a hard-inthe-loop experiment for a fuel-cell-battery-powered UAV with a four-state RB strategy. B Lee et al. [28] proposed an active power management algorithm with six control sectors, and then demonstrated its utility in 3.8 h of mission profiling. A UAV with hybrid solar and hydrogen energy was designed by Liu et al. [29]. It can fly for more than 20 h based on RB control.
Unfortunately, many studies concentrated more on the verification of a certain EMS for a fixed flight profile, while other evaluation criteria were left out of consideration. Some global optimization methods need a complex optimization model and solver, which can increase the computational burden of the EMS in question, and divergence of such algorithms is also a problem [13,14]. Although DRL and NNs can perform very well [10,18], real flight data sets are still needed. Acquiring these data sets can be costly and risky, but the lack of such data sets also makes EMSs relying on deep learning perform poorly in real-time. Thus, the EMSs for electric propulsion UAVs must have the trade-off of optimal energy distribution and real-time computation efficiency.
Fuzzy logic control is another classical real-time EMS, and its calculation process is independent of an accurate system energy optimization model. This characteristic makes FL control very suitable for a nonlinear power system, such as that of an HEV or UAV [23,31,32,34]. Zhang X et al. put forward an online fuzzy logic strategy for a fuel-cell/battery UAV and then demonstrated its effectiveness on a ground test-bench [23]. The experimental results show that the hydrogen consumption under FL control is lower than typical RB control. It is worthwhile mentioning that the thresholds designed in RB control and FL control all depend on the designer's own knowledge for system operation, and the optimization results of which can be approximately optimal in theory based on rule and experience. In order to make up for this drawback, other advanced meta-heuristic algorithms have been proposed in fuel-cell HEPS, such as Artificial Bee Colony (ABC), the Grey Wolf Optimization (GWO), the cuckoo search, Salp swarm optimization, and the mine blast algorithm [22,38], to find the optimal energy distribution or split for load demand. Furthermore, wavelet transform [39] and genetic algorithms [40] can optimize inputs of energy management controller with frequency decoupling and adjust the thresholds of membership functions combined with fuzzy logic control, respectively. However, these studies are focused on the MEA's APU or emergency power system, where the power load profile is only 30 min and the pulse load or slow variation load was considered, and the effects of flight dynamic load's variation on EMS of aircraft or UAV are not analyzed in detail.
This research paper aims to design a high-performance online EMS for a fuel-cell/battery hybrid power system of the UAV. A ground test bench of HEPS for UAV based on RCP is built firstly, followed by presenting a five-state RB strategy and a fuzzy logic strategy. Then a global-based PSO algorithm is designed to track the optimal thresholds of original membership functions of fuzzy logic control, which regards minimization of hydrogen consumption and less dynamic burden of power sources as the optimization objective and redefines a kind of equivalent hydrogen consumption with a penalty function. Finally, a thirty-minute dynamic mission profile of UAV has been tested on the real-time RCP platform to demonstrate the feasibility and effectiveness of the proposed energy management strategies for UAV.
Within this article, the main contributions to the research field can be shown as follows.
(i) According to the power demand of fuel-cell powered UAV during different flight phases in which the propulsion load power of UAV was analyzed with the flight dynamics, the EMS based on the PSO-based optimal fuzzy logic methods is presented in this paper. The simulation model of the hybrid power system was built with the EMS system. The comprehensive model that allows the fuel-cell hybrid power system to use different energy management strategies is developed in this paper. (ii) The integrating testing bench for the EMS in the fuel cell UAV is built with the rapid controller prototype simulation platform, which can be used to design different EMS strategies. Several different EMS strategies such as the rule-based, fuzzy logic, and PSO-fuzzy logic control are compared based on simulation and experimental results for the UAV power system, and some conclusions were obtained to verify the theoretical analysis. (iii) A comprehensive computational and experimental analysis highlights the scalability of the proposed algorithm to UAV hybrid power systems. The results of our analysis illustrate the performance of the algorithm of PSO-fuzzy logic, the benefits of the energy management strategy, and the advantages of flexible demands to extend the flight range of UAVs.
This paper is organized as follows. The modeling and description of the HEPS of UAV are shown in Section 2. Section 3 presents three implemented EMS in detail, including illustrations of the design flow and principles. A comprehensive analysis and comparison from simulation and experiment results is shown in Section 4. Finally, Section 5 provides the conclusions, and the future scope and potentials of the current research are elaborated in this section.

Problem Formulation of Energy Management for HEPS of UAV
The paper conducts EMS research on a certain type of single-propeller and fixedwing fuel cell/battery UAV. The effect drawing of the UAV is shown in Figure 1a, with a wingspan design of 8.5 m, wing area of 3.54 m 2 , and a power level of 700-1000 W. The maximum flight altitude is up to 1000 m Mean Sea Level (MSL). It is worthwhile mentioning that aviation fuel cells and batteries could operate with a relatively stable performance at this height, which will provide simplification for modeling of power sources. The basic flight profile of the UAV is shown in Figure 1b, and the power demand for the UAV can be changed according to the altitude and velocity of the UAV.

Problem Formulation of Energy Management for HEPS of UAV
The paper conducts EMS research on a certain type of single-propeller and fixedwing fuel cell/battery UAV. The effect drawing of the UAV is shown in Figure 1a, with a wingspan design of 8.5 m, wing area of 3.54 2 m , and a power level of 700-1000 W .
The maximum flight altitude is up to 1000 m Mean Sea Level (MSL). It is worthwhile mentioning that aviation fuel cells and batteries could operate with a relatively stable performance at this height, which will provide simplification for modeling of power sources. The basic flight profile of the UAV is shown in Figure 1b, and the power demand for the UAV can be changed according to the altitude and velocity of the UAV. The considered architecture of the HEPS of the UAV is shown in Figure 2. The electric motor is used as the propulsion system of the UAV, which is powered by hybrid electric power sources, including a Proton-Exchange-Membrane Fuel Cell System (PEMFCS) and a lithium-ion battery pack system. The parallel HEPS layout with two distributed DC/DC converters is able to control the DC bus voltage and the output power simultaneously [23,24]. In general, in the hybrid power system battery capacity is relatively small, which is mainly responsible for peak shaving and valley filling of energy during variation of load power. This architecture allows three operation modes: (i) both the fuel cell and lithium battery support the load power together; (ii) the fuel cell provides power to the load and surplus energy will be charged by battery; (iii) only the fuel cell is at the working state and the battery is disconnected. How to distribute the energy between the fuel cell and battery optimally is the main problem of EMS. The considered architecture of the HEPS of the UAV is shown in Figure 2. The electric motor is used as the propulsion system of the UAV, which is powered by hybrid electric power sources, including a Proton-Exchange-Membrane Fuel Cell System (PEMFCS) and a lithium-ion battery pack system.

Problem Formulation of Energy Management for HEPS of UAV
The paper conducts EMS research on a certain type of single-propeller and fixedwing fuel cell/battery UAV. The effect drawing of the UAV is shown in Figure 1a, with a wingspan design of 8.5 m, wing area of 3.54 2 m , and a power level of 700-1000 W .
The maximum flight altitude is up to 1000 m Mean Sea Level (MSL). It is worthwhile mentioning that aviation fuel cells and batteries could operate with a relatively stable performance at this height, which will provide simplification for modeling of power sources. The basic flight profile of the UAV is shown in Figure 1b, and the power demand for the UAV can be changed according to the altitude and velocity of the UAV. The considered architecture of the HEPS of the UAV is shown in Figure 2. The electric motor is used as the propulsion system of the UAV, which is powered by hybrid electric power sources, including a Proton-Exchange-Membrane Fuel Cell System (PEMFCS) and a lithium-ion battery pack system. The parallel HEPS layout with two distributed DC/DC converters is able to control the DC bus voltage and the output power simultaneously [23,24]. In general, in the hybrid power system battery capacity is relatively small, which is mainly responsible for peak shaving and valley filling of energy during variation of load power. This architecture allows three operation modes: (i) both the fuel cell and lithium battery support the load power together; (ii) the fuel cell provides power to the load and surplus energy will be charged by battery; (iii) only the fuel cell is at the working state and the battery is disconnected. How to distribute the energy between the fuel cell and battery optimally is the main problem of EMS. The parallel HEPS layout with two distributed DC/DC converters is able to control the DC bus voltage and the output power simultaneously [23,24]. In general, in the hybrid power system battery capacity is relatively small, which is mainly responsible for peak shaving and valley filling of energy during variation of load power. This architecture allows three operation modes: (i) both the fuel cell and lithium battery support the load power together; (ii) the fuel cell provides power to the load and surplus energy will be charged by battery; (iii) only the fuel cell is at the working state and the battery is disconnected. How to distribute the energy between the fuel cell and battery optimally is the main problem of EMS.

Modeling the Flight Dynamics of UAV
Take centralized electric propulsion UAV as research object, the UAV is regarded as a mass plane. The aerodynamic analysis of the UAV during climbing flight is shown in Figure 3, where L represents the lift force generated by the different components of the aircraft in a wind axis reference frame, D represents the drag force received by the aircraft, T represents the thrust provided by the propeller to the aircraft, α is the angle of attack, γ represents the track angle. Take centralized electric propulsion UAV as research object, the UAV is regarded as a mass plane. The aerodynamic analysis of the UAV during climbing flight is shown in Figure 3, where L represents the lift force generated by the different components of the aircraft in a wind axis reference frame, D represents the drag force received by the aircraft, T represents the thrust provided by the propeller to the aircraft,  is the angle of attack,  represents the track angle. According to the testing results of wind tunnels and other methods from CFD calculation tools, the amount of lift and drag can be expressed by the Formulas (1) and (2).
where the  is air density at the current flight altitude, V is the relative velocity (flight velocity), W S is the wing planform area, L C and D C represent the lift coefficient and drag coefficient, respectively. During the flight of the aircraft, the following equation can be obtained by analyzing the force in the horizontal and vertical directions of the aircraft's speed.
Based on the above analysis, the propulsion load power of the UAV at the climb stage can be expressed as follows: Generally speaking, the complete flight process of an aircraft includes the following six typical stages: ground taxing-take off-climb-cruise-descend-landing. The power variation of the UAV has been obtained from the flight dynamic force analysis results of the aircraft shown in Figure 3. It is shown that the thrust generated by the propeller is closely related to the aircraft's track angle and angle of attack, and the aircraft has different track angles and angles of attack in different flight attitudes, so by defining the aircraft's track angle and angle of attack in each flight phase, the specific thrust requirements can be determined, as well as data such as the aircraft's flight speed and power. Using Equations (3) and (4), the thrust of the propeller and the acceleration of the aircraft can be calculated, According to the testing results of wind tunnels and other methods from CFD calculation tools, the amount of lift and drag can be expressed by the Formulas (1) and (2).
where the ρ is air density at the current flight altitude, V is the relative velocity (flight velocity), S W is the wing planform area, C L and C D represent the lift coefficient and drag coefficient, respectively. During the flight of the aircraft, the following equation can be obtained by analyzing the force in the horizontal and vertical directions of the aircraft's speed.
Based on the above analysis, the propulsion load power of the UAV at the climb stage can be expressed as follows: Generally speaking, the complete flight process of an aircraft includes the following six typical stages: ground taxing-take off-climb-cruise-descend-landing. The power variation of the UAV has been obtained from the flight dynamic force analysis results of the aircraft shown in Figure 3. It is shown that the thrust generated by the propeller is closely related to the aircraft's track angle and angle of attack, and the aircraft has different track angles and angles of attack in different flight attitudes, so by defining the aircraft's track angle and angle of attack in each flight phase, the specific thrust requirements can be determined, as well as data such as the aircraft's flight speed and power. Using Equations (3) and (4), the thrust of the propeller and the acceleration of the aircraft can be calculated, and then the propulsion power and the flight speed of the aircraft can be calculated with Equation (5). In the case in which a mission profile is given, the propulsion power obtained in the research can be shown in Figure 4. The computation process and designing tools are presented in this part to obtain the real-time variation of flight power of UAVs. From Figure 4, the computation process is the concurrent iterative process, and the air speed of UAV and propulsion power demand can be fetched. and then the propulsion power and the flight speed of the aircraft can be calculated with Equation (5). In the case in which a mission profile is given, the propulsion power obtained in the research can be shown in Figure 4. The computation process and designing tools are presented in this part to obtain the real-time variation of flight power of UAVs. From Figure 4, the computation process is the concurrent iterative process, and the air speed of UAV and propulsion power demand can be fetched.

The Fuel-Cell Model
The characteristics of the Proton Exchange Membrane Fuel Cell (PEMFC) can be seen in Section 2.3. Figure 5 shows the model structure of PEMFC. The specific parameter calculations are as follows: where FCS V is the output voltage of PEMFC, n is the number of cells, Nernst E is the reversible cell potential ( V ), act V is the activation loss ( V ), con V is the concentration where FC T is the fuel cell temperature ( K ),

The Fuel-Cell Model
The characteristics of the Proton Exchange Membrane Fuel Cell (PEMFC) can be seen in Section 2.3. Figure 5 shows the model structure of PEMFC. The specific parameter calculations are as follows: where V FCS is the output voltage of PEMFC, n is the number of cells, E Nernst is the reversible cell potential (V), V act is the activation loss (V), V con is the concentration loss (V), V ohmic is the ohmic loss (V). The E Nernst is defined as follows: where T FC is the fuel cell temperature (K), P H 2 is the hydrogen supply pressure (N/m 2 ), P O 2 is the oxygen supply pressure (N/m 2 ). and then the propulsion power and the flight speed of the aircraft can be calculated with Equation (5). In the case in which a mission profile is given, the propulsion power obtained in the research can be shown in Figure 4. The computation process and designing tools are presented in this part to obtain the real-time variation of flight power of UAVs. From Figure 4, the computation process is the concurrent iterative process, and the air speed of UAV and propulsion power demand can be fetched.

The Fuel-Cell Model
The characteristics of the Proton Exchange Membrane Fuel Cell (PEMFC) can be seen in Section 2.3. Figure 5 shows the model structure of PEMFC. The specific parameter calculations are as follows: where FCS V is the output voltage of PEMFC, n is the number of cells, Nernst E is the reversible cell potential ( V ), act V is the activation loss ( V ), con V is the concentration  The activation loss is caused by the slowness of the reactions happening on the electrode's surface. It can be defined as the following formula: The ξ n (n = 1, 2, 3, 4) are the empirical parameters under actual working conditions, C O 2 is the oxygen concentration (mol/cm 3 ), i FCS is the fuel cell current. The ohmic loss can be regarded as the internal resistance loss of the battery, which can be defined by: where R in is the internal resistor (Ω), ς n (n = 1, 2, 3) are empirical parameters.
where B is an empirical coefficient, J is the current density during fuel cell operation (A/cm 2 ), J max is the maximum current density of fuel cell (A/cm 2 ).

The Battery Model
The battery model is based on the simplified first-order RC model in Figure 6.
trode's surface. It can be defined as the following formula:  is the fuel cell current. The ohmic loss can be regarded as the internal resistance loss of the battery, which can be defined by: where B is an empirical coefficient, J is the current density during fuel cell operation

The Battery Model
The battery model is based on the simplified first-order RC model in Figure 6. The State of Charge (SOC) and output voltage are calculated as: where C V is the voltage across capacitors, in V is the voltage drop across the internal resistor in R inside the battery. The discharge curve of battery pack is shown in Figure   7b. The State of Charge (SOC) and output voltage are calculated as: where V C is the voltage across capacitors, V in is the voltage drop across the internal resistor R in inside the battery. The discharge curve of battery pack is shown in Figure 7b.

The Power Flow in the Power-Train of UAV
As shown in Figure 2, in order to meet the power balance requirements, the output electric power of HEPS must be equal to the load power required by the UAV if the power loss can be negligible. The relationship of the power balance in UAV is shown as follows: where the P is the total output power in the UAV, which includes the fuel-cell out-

The Power Flow in the Power-Train of UAV
As shown in Figure 2, in order to meet the power balance requirements, the output electric power of HEPS must be equal to the load power required by the UAV if the power loss can be negligible. The relationship of the power balance in UAV is shown as follows: (13) where the P source is the total output power in the UAV, which includes the fuel-cell output power P f c and battery power P bat . The P equ is the power of electronic equipment onboard UAV, and P ele is electricity propulsion power. After three stage transformations, real propulsion power demand P prop of UAV is energy from the HEPS through the speed controller (inverter or DC/AC converter), electric motor and mechanical propeller. The η ctrl , η motor , η prop are motor drivers, motor and propeller power flow conversion efficiency.

Energy Management Strategies for Hybrid Power System of UAV
The problem for the energy optimization is the minimization of hydrogen gas consumption during the flight stage of UAV under different operational modes and power load demands. The energy management controller is used to regulate the power flow between the fuel cells and energy storage system in real-time during the flight time of the UAV. The efficient implementation of the energy management controller is to (i) track the DC bus voltage reference trajectory, (ii) reduce power stress on the fuel cell due to changes in the electric propulsion load, and (iii) keep the battery SOC within allowable limits. The controller in HEPS can be divided into two levels: secondary level and primary level. The decision stage on the secondary level is realized based on the energy management strategy to calculate the output power distribution ratio of the hybrid power supply. The controller on the primary level can use a PID control loop to adjust the output power of the fuel cell and battery according to the reference power from the secondary level. According to the overall block diagram of energy management and power controller for the power system shown in Figure 8, several energy management strategies are proposed in this section. It is important to emphasize that the DC bus voltage should be kept at a constant value or in a range with transient voltage dynamics for UAVs. Further explanation of EMS is presented as follows: Rule-based control (also known as state-machine control) is a classical online strategy for HEPS of UAV, which is described as a number of operation states based on deterministic thresholds. The proposed RB control can regulate the power split between fuel cells and batteries according to the real-time load power and SOC of batteries with lower computational burden. The ampere-hour integration and open circuit method are adopted for estimating SOC in this paper, the corresponding formula and the discrete formula can be expressed as [26]: where SOC(t 0 ) is the initial SOC, which is available from the measured open voltage-SOC curve, i(t) is the battery current, the value will be positive when discharging and be negative when charging, C bat is the rated capacity of the battery pack, ∆t is the solver time step. The logic scheme of the proposed RB strategy with five states is shown in Figure 9. P load is the total power demand of UAV, P f c is power supplied by the fuel cell, P bat is the power supplied by the battery, i bat_charge is the charging current of the battery. Rule-based control (also known as state-machine control) is a classical online strategy for HEPS of UAV, which is described as a number of operation states based on deterministic thresholds. The proposed RB control can regulate the power split between fuel cells and batteries according to the real-time load power and SOC of batteries with lower computational burden. The ampere-hour integration and open circuit method are adopted for estimating SOC in this paper, the corresponding formula and the discrete formula can be expressed as [26]: where   0 SOC t is the initial SOC, which is available from the measured open voltage-SOC curve, i(t) is the battery current, the value will be positive when discharging and be  Based on the proposed EMS, batteries could share enough power with different ratios when the demand is at a high level and absorb excess energy during lower load power. As an emergency power source of UAV, sufficient stored energy is also maintained in batteries for some fault scenarios. Notably, an over-complicated division for operation states is hardly inevitable and it will only cause needless computational burden and even destabilization of the controller. In addition, the power limitation for PEMFC and batteries Based on the proposed EMS, batteries could share enough power with different ratios when the demand is at a high level and absorb excess energy during lower load power.
As an emergency power source of UAV, sufficient stored energy is also maintained in batteries for some fault scenarios. Notably, an over-complicated division for operation states is hardly inevitable and it will only cause needless computational burden and even destabilization of the controller. In addition, the power limitation for PEMFC and batteries is requisite for safe operation, and it will ensure both power sources operate in a relatively stable working state. Referring to the parameters in the UAV design requirements, all constraints for HEPS of UAV can be summarized as:

Fuzzy Logic-Based EMS
Essentially, fuzzy logic control can be interpreted as a kind of RB control but in which the thresholds are fuzzed by a series of "IF-THEN" rules [28]. It is generally recognized that the robustness and optimization performance of FL control is greater than RB control. Unlike the classical rule-based control, the Fuzzy Logic Control (FLC) deals with reasoning using an approximate way rather than the precise way. As a result, the FLC is tolerant to imprecise measurements and variations of input variables, thereby being robust against system uncertainties.

Fuzzification Module
The typical Mamdani-type reasoning method is selected, and the membership function is designed with triangle and trapezoidal functions. The fuzzy subset of load power of UAV is divided into four blocks, namely, zero (ZE), small (PS), median (PM) and large (PB); the fuzzy subset of SOC is divided into three blocks, namely, low (L), medium (M) and high (H), the fuzzy subset of fuel cell reference power is divided into off (OFF), off-average hold (HOA), average (AVE), average-medium hold (HAM), medium (MED), medium-maximum hold (HMM), maximum (MAX). The designed membership functions are depicted in Section 3.2.4.

Inference Module
As far as the choice of inference mechanism is concerned, one of the following three methods is usually chosen, such as MAX-MIN, MAX-PROD, and SUM-PROD. This article used MAX-MIN. The corresponding fuzzy rules are listed in Table 1. According to Table 1, when the power demand of the UAV is in zero blocks and the power is very small, the SOC of the battery is low, and then the output power from the fuel-cell is from the off to average level hold section to prevent the battery from over-discharge. When the power demand of the UAV is in zero blocks and power is very small, the SOC of the battery is medium, and the output power from the fuel-cell is in the off section, which can reduce the hydrogen consumption greatly. When the power demand of the UAV is in the PB blocks and the power demand is very large, according to the SOC level of the battery, the output power from the fuel-cell can be adjustable to reduce the hydrogen consumption and maintain some level of SOC for the battery.

Defuzzification Module
A lot of defuzzification methods are used in the case of fuzzy controllers. Two most often used defuzzification methods for those fuzzy controllers are the mean of maxima method and the center of gravity (CoG) method. In this study, the center of gravity method is used for defuzzification for the FL. The CoG method determines the crisp value of output, taking into consideration, in a weighted manner, all influences obtained from the rules fired by the particular state of the inputs at a certain moment. In the discrete case, the abscissa of CoG can be calculated by the following formula: In this equation, m is the number of the active rules, µ u is the weighting factor from the i-th rule, u i is the crisp value defined in the output universe and corresponds to the center of the core set of the output fuzzy set. The operating principle of the CoG method is exemplified in Figure 10.

Fuzzy Controller
In Section 3.2.4, '0-1' represents the ratio of the HEPS system output power to the maximum output power (700 W), the ratio of battery SOC, and the ratio of fuel cell output power to the maximum output power (700 W). Section 3.2.4 draws the output surface diagram of fuel cells under the area center method for defuzzification.

Fuzzy Logic-Based EMS Optimized by PSO
As mentioned in the previous section, the formulation of deterministic or fuzzy rules are invariably restricted by cognition, experience and acknowledge of designers, and it becomes an inevitable constrain for the further improved optimization effect [40]. The particle swarm optimization algorithm is a kind of population-based parallel random searching algorithm with fast speed and a wide hunting range. The optimal solution will be tracked through collaboration and information sharing among individuals in the population such as flocks of birds or schools of fish. These features provide the possibility to adjust the thresholds of membership functions in fuzzy logic control in optimization form [41].

Build Optimization Goals
An optimal objective function must be set at the beginning, which is the precondition and target for tracking the particle swarm algorithm. Taking the overall hydrogen consumption economy of HEPS for the UAV into account, the equivalent hydrogen consumption with a penalty function has been proposed, and the instantaneous expression representation is as follows:  In Section 3.2.4, '0-1' represents the ratio of the HEPS system output power to the maximum output power (700 W), the ratio of battery SOC, and the ratio of fuel cell output power to the maximum output power (700 W). Section 3.2.4 draws the output surface diagram of fuel cells under the area center method for defuzzification.

Fuzzy Logic-Based EMS Optimized by PSO
As mentioned in the previous section, the formulation of deterministic or fuzzy rules are invariably restricted by cognition, experience and acknowledge of designers, and it becomes an inevitable constrain for the further improved optimization effect [40]. The particle swarm optimization algorithm is a kind of population-based parallel random searching algorithm with fast speed and a wide hunting range. The optimal solution will be tracked through collaboration and information sharing among individuals in the population such as flocks of birds or schools of fish. These features provide the possibility to adjust the thresholds of membership functions in fuzzy logic control in optimization form [41].

Build Optimization Goals
An optimal objective function must be set at the beginning, which is the precondition and target for tracking the particle swarm algorithm. Taking the overall hydrogen consumption economy of HEPS for the UAV into account, the equivalent hydrogen consumption with a penalty function has been proposed, and the instantaneous expression representation is as follows: where m H 2 (t), m equ (t) are the hydrogen consumption of fuel cells and equivalent consumption of batteries, M H 2 (t) is the total hydrogen consumption on the hybrid power system, respectively, n is the number of the cells inside the stack, F is the Faraday constant, m h is the molar mass of hydrogen, ∆t is the sampling time, r is the adjusting coefficient. EVA(soc) is the penalty function based on the fuzzy logic membership function, which can further adjust the weighting of equivalent consumption and maintain the SOC in a rational range. ZMF and SMF are the Z type membership function and sigmoid membership function. As shown in Figure 11, the penalty function is added to keep the battery SOC within the range of 30-70% as much as possible. ( ) EVA soc is the penalty function based on the fuzzy logic membership function, which can further adjust the weighting of equivalent consumption and maintain the SOC in a rational range. ZMF and SMF are the Z type membership function and sigmoid membership function. As shown in Figure 11, the penalty function is added to keep the battery SOC within the range of 30-70% as much as possible.
It is noteworthy that the equivalent consumption of batteries here is not a precise quantification but a weighing concept, and the power distribution between fuel cells and batteries can be managed by regulating the adjusting coefficient.

Particle Swarm Algorithm
A swarm particle algorithm can be represented by the two q-dimensional vectors standing for the particle position and the particle velocity. The optimal location for the particle itself is and the entire swarm optimal location is The particle position and velocity update equations that govern the PSO algorithm can be expressed as follows: where k is the number of iterations, c is the weighting factors of the stochastic acceleration terms that pull each particle toward their position. Low values allow particles to roam far from the target regions before being tugged back. On the other hand, if a high value of c is used, particles may pass the target regions.
represents a random function that can generate a random value between 0 and 1, w is the inertial coefficient, which shows the effect of the previous velocity on the current velocity. It is noteworthy that the equivalent consumption of batteries here is not a precise quantification but a weighing concept, and the power distribution between fuel cells and batteries can be managed by regulating the adjusting coefficient.

Particle Swarm Algorithm
A swarm particle algorithm can be represented by the two q-dimensional vectors X i = x i1 x i2 · · · x iq T ∈ R q and V i = v i1 v i2 · · · v iq T s standing for the particle position and the particle velocity. The optimal location for the particle itself is P i_d = P i1 P i2 · · · P iq T , and the entire swarm optimal location is P g_d = P g1 P g2 · · · P gq T . The particle position and velocity update equations that govern the PSO algorithm can be expressed as follows: where k is the number of iterations, c is the weighting factors of the stochastic acceleration terms that pull each particle toward their position. Low values allow particles to roam far from the target regions before being tugged back. On the other hand, if a high value of c is used, particles may pass the target regions. rand i (i = 1, 2) represents a random function that can generate a random value between 0 and 1, w is the inertial coefficient, which shows the effect of the previous velocity on the current velocity.

Particle Swarm Optimization Settings and Process
This paper uses the weighted global particle swarm optimization algorithm to optimize the fuzzy logic membership function designed in the previous section. The detailed flow chart of PSO is shown in Figure 12. The main parameters are set as follows: (1) Objective function: equivalent hydrogen consumption, see Equation (17) Figure 13, finally c 1 = c 2 = 2; (5) Maximum number of iterations and convergence limitation: In this paper, the maximum number of iterations k = 30, and if the algorithm results can converge early, the iteration will be terminated early. Determine whether the convergence condition is satisfied by setting the incremental value threshold of the optimal fitness, the incremental value threshold e = 1e − 3; (6) Speed limit: A flight speed that is too fast will cause the result to oscillate near the optimal solution, which will affect the accuracy of the algorithm; a flight speed that is too slow will affect the convergence speed. There is a trade-off between the two when setting the flight speed. (7) Position restriction: In order to ensure the correctness and validity of the membership function, it is necessary to limit the tracing range of each boundary threshold.  k  , and if the algorithm results can converge early, the iteration will be terminated early. Determine whether the convergence condition is satisfied by setting the incremental value threshold of the optimal fitness, the incremental value threshold 1 3 e e   ; (6) Speed limit: A flight speed that is too fast will cause the result to oscillate near the optimal solution, which will affect the accuracy of the algorithm; a flight speed that is too slow will affect the convergence speed. There is a trade-off between the two when setting the flight speed. (7) Position restriction: In order to ensure the correctness and validity of the membership function, it is necessary to limit the tracing range of each boundary threshold.
The algorithm will be circulatory until maximum iterative times are achieved or the result converges to an approximately constant value.  The convergence curve of the PSO algorithm under different weighting factors is shown in Figure 13, and it is shown that the convergence of the algorithm can be achieved after 12 steps by choosing proper weighting factors. From Figure 13, the convergence curve with red color is the most quickly descending rate compared to other factors. Therefore, the weighting factor was chosen as 2.0 to accelerate the computation speed.

Particle Swarm Optimization Results Analysis
The improved membership functions of the PSO-FL controller and corresponding output surface diagram can be seen in Figure 14c,d. According to the PSO algorithm to optimize the boundary thresholds of (17) membership functions, it can be seen that the threshold of membership function of Figure 14c was chosen more uniform than that shown in Figure 14a, and the output surface of fuel cells in Figure 14d under PSO is smoother than that shown in Figure 14b, and it means that the operating characteristics of fuel cells would be more stable over the full power range of HEPS for UAV. The controller structure of HEPS is shown in Figure 8. The PSO algorithm is accomplished offline by using the predictable mission profile of UAV to obtain the optimal threshold value for the fuzzy logic controller. The fuzzy logic controller can be used to complete the supervisor controller function online. This method can greatly reduce the computation burdens for EMS of UAVs. Although the prior information of the future power demand of UAV may vary due to some disturbance factors such as wind shear, attitude control and payload changes, the average power profile is smoother than that of EV or HEV. The fuzzy logic EMS is more suitable for UAV. The algorithm will be circulatory until maximum iterative times are achieved or the result converges to an approximately constant value.
The convergence curve of the PSO algorithm under different weighting factors is shown in Figure 13, and it is shown that the convergence of the algorithm can be achieved after 12 steps by choosing proper weighting factors. From Figure 13, the convergence curve with red color is the most quickly descending rate compared to other factors. Therefore, the weighting factor was chosen as 2.0 to accelerate the computation speed.

Particle Swarm Optimization Results Analysis
The improved membership functions of the PSO-FL controller and corresponding output surface diagram can be seen in Figure 14c,d. According to the PSO algorithm to optimize the boundary thresholds of (17) membership functions, it can be seen that the threshold of membership function of Figure 14c was chosen more uniform than that shown in Figure 14a, and the output surface of fuel cells in Figure 14d under PSO is smoother than that shown in Figure 14b, and it means that the operating characteristics of fuel cells would be more stable over the full power range of HEPS for UAV. The controller structure of HEPS is shown in Figure 8. The PSO algorithm is accomplished offline by using the predictable mission profile of UAV to obtain the optimal threshold value for the fuzzy logic controller. The fuzzy logic controller can be used to complete the supervisor controller function online. This method can greatly reduce the computation burdens for EMS of UAVs. Although the prior information of the future power demand of UAV may vary due to some disturbance factors such as wind shear, attitude control and payload changes, the average power profile is smoother than that of EV or HEV. The fuzzy logic EMS is more suitable for UAV.

Rapid Controller Prototype Experimental Testing Bench
The focus of this research primarily concentrates on verifying the performance of the energy management strategy presented in this paper rather than the architecture and load characteristics of HEPS for UAV. Use a UAV flight simulation model in the MATLAB/Simulink environment with a Powertrain Block set. For the sake of convenience, all-electric loads, including the AC and DC load in the HEPS, are uniformly replaced by an equivalent DC load emulator. Based on the above contents, the schematic diagram of the ground experimental testing platform based on RCP is shown in Figure 15. The main system experimental parameters are summarized in Table 2. The PEMFC system is the 1.2 kW Horizon fuel-cell stack with a controller. The lithium-ion battery is based on 18,650 battery cells (single capacity 2.5 Ah, rated voltage 3.7 V), using 10 4 × series-parallel, output voltage 42 V, rated energy 10 Ah. The RCP system is the Speed-goat HIL platform, in which the EMS and power converter's controller are integrated. In the energy management context, the speed-goat test-bench is implemented to offer a rapid controller prototype (RCP) simulation by interfacing the PSO-FL algorithm section into the hybrid power system with signal conditional circuits. The UAV's flight power variation is emulated by DC electronic load emulator, which can be programmed in the upper computer. Although the simulation environment cannot entirely reflect the situation of a UAV in real-world experiments, the unmanned air vehicle flight simulator in the upper computer provides a realistic flight environment for verifying the proposed energy management system design.

Rapid Controller Prototype Experimental Testing Bench
The focus of this research primarily concentrates on verifying the performance of the energy management strategy presented in this paper rather than the architecture and load characteristics of HEPS for UAV. Use a UAV flight simulation model in the MATLAB/Simulink environment with a Powertrain Block set. For the sake of convenience, all-electric loads, including the AC and DC load in the HEPS, are uniformly replaced by an equivalent DC load emulator. Based on the above contents, the schematic diagram of the ground experimental testing platform based on RCP is shown in Figure 15. The main system experimental parameters are summarized in Table 2. The PEMFC system is the 1.2 kW Horizon fuel-cell stack with a controller. The lithium-ion battery is based on 18,650 battery cells (single capacity 2.5 Ah, rated voltage 3.7 V), using 10 × 4 series-parallel, output voltage 42 V, rated energy 10 Ah. The RCP system is the Speed-goat HIL platform, in which the EMS and power converter's controller are integrated. In the energy management context, the speed-goat test-bench is implemented to offer a rapid controller prototype (RCP) simulation by interfacing the PSO-FL algorithm section into the hybrid power system with signal conditional circuits. The UAV's flight power variation is emulated by DC electronic load emulator, which can be programmed in the upper computer. Although the simulation environment cannot entirely reflect the situation of a UAV in real-world experiments, the unmanned air vehicle flight simulator in the upper computer provides a realistic flight environment for verifying the proposed energy management system design.

The Analysis of Simulation and Experimental Results
The performance comparison of three EMS strategies mentioned in Section 3 has been validated by the Simulink models and ground RCP testing platform (shown in Figure 16). The EMS controller, including sampling and driving control circuits, will be implemented online on the RCP platform. For comparison purposes, the initial SOC of the lithium-ion battery is set to 60% for each test scenario. All the experimental waveforms will be recorded and stored by the data recorder GENESIS 7T for monitoring and further analysis. The power profile applied here is designed with reference to the practical flight profile of the UAV. Table 3 gives the specific power of every flight stage, and the given power profile under simulation and constant power mode of the DC electronic load are shown in Figure 17. The continuous high-power variation is needed as a thrust force while taking off and climbing for UAV. The segment of cruising has the longest duration and the overall power demand is relatively stable and smooth. Significant power fluctuation occurs in descending and landing for maintaining flight attitude. Considering the safety and reliability of flight for UAV, the power volume of the power source, including the fuel-cell and battery, is larger than the peak power demand of electric propulsion and onboard equipment. If there is any fault in fuel-cell power system, the battery can supply electric power energy for the emergency flight.

The Analysis of Simulation and Experimental Results
The performance comparison of three EMS strategies mentioned in Section 3 has been validated by the Simulink models and ground RCP testing platform (shown in Figure 16). The EMS controller, including sampling and driving control circuits, will be implemented online on the RCP platform. For comparison purposes, the initial SOC of the lithium-ion battery is set to 60% for each test scenario. All the experimental waveforms will be recorded and stored by the data recorder GENESIS 7T for monitoring and further analysis. The power profile applied here is designed with reference to the practical flight profile of the UAV. Table 3 gives the specific power of every flight stage, and the given power profile under simulation and constant power mode of the DC electronic load are shown in Figure 17. The continuous high-power variation is needed as a thrust force while taking off and climbing for UAV. The segment of cruising has the longest duration and the overall power demand is relatively stable and smooth. Significant power fluctuation occurs in descending and landing for maintaining flight attitude. Considering the safety and reliability of flight for UAV, the power volume of the power source, including the fuel-cell and battery, is larger than the peak power demand of electric propulsion and onboard equipment. If there is any fault in fuel-cell power system, the battery can supply electric power energy for the emergency flight.

The Power Distribution, SOC and DC Bus Voltage
The power split response curves between fuel cells and batteries based on RB, FL and PSO-FL are shown in Figure 18, and the SOC and DC bus voltage waveforms are also recorded. fc P is the power provided by the fuel cell, and bat P is the battery unit power.
It is concluded that the experimental results are compatible with the digital simulation results from Figure 18. A great response to the power profile has been achieved in the HEPS on the premise of keeping the voltage of the DC bus at 50 V, and the feasibility of designed strategies could be proved. Under the RB control, the PEMFC is charged to the battery pack many times during lower power requirements, which means the energy stored in the battery pack is not utilized adequately. Moreover, each change of load power almost always results in a corresponding change of power split. Meanwhile, the power response under the two other fuzzy logic controls is significantly smoother, and the battery energy has been efficiently used. A comprehensive summary of the experimental data can be found in Table 4.   Figure 16. The hardware-in-loop testing platform based on the RCP platform for the UAV hybrid power system.

The Power Distribution, SOC and DC Bus Voltage
The power split response curves between fuel cells and batteries based on RB, FL and PSO-FL are shown in Figure 18, and the SOC and DC bus voltage waveforms are also recorded. fc P is the power provided by the fuel cell, and bat P is the battery unit power.
It is concluded that the experimental results are compatible with the digital simulation results from Figure 18. A great response to the power profile has been achieved in the HEPS on the premise of keeping the voltage of the DC bus at 50 V, and the feasibility of designed strategies could be proved. Under the RB control, the PEMFC is charged to the battery pack many times during lower power requirements, which means the energy stored in the battery pack is not utilized adequately. Moreover, each change of load power almost always results in a corresponding change of power split. Meanwhile, the power response under the two other fuzzy logic controls is significantly smoother, and the battery energy has been efficiently used. A comprehensive summary of the experimental data can be found in Table 4.

The Power Distribution, SOC and DC Bus Voltage
The power split response curves between fuel cells and batteries based on RB, FL and PSO-FL are shown in Figure 18, and the SOC and DC bus voltage waveforms are also recorded. P f c is the power provided by the fuel cell, and P bat is the battery unit power. It is concluded that the experimental results are compatible with the digital simulation results from Figure 18. A great response to the power profile has been achieved in the HEPS on the premise of keeping the voltage of the DC bus at 50 V, and the feasibility of designed strategies could be proved. Under the RB control, the PEMFC is charged to the battery pack many times during lower power requirements, which means the energy stored in the battery pack is not utilized adequately. Moreover, each change of load power almost always results in a corresponding change of power split. Meanwhile, the power response under the two other fuzzy logic controls is significantly smoother, and the battery energy has been efficiently used. A comprehensive summary of the experimental data can be found in Table 4.  For fuel cells, the two main aging factors or high stress are the frequency of output power changes or rapid output power changes of the FC and operation at high output power conditions. For the battery, as the number of charging and discharging cycles of the batteries increases, the aging rate of the electric storage system (ESS) increases.  For fuel cells, the two main aging factors or high stress are the frequency of output power changes or rapid output power changes of the FC and operation at high output power conditions. For the battery, as the number of charging and discharging cycles of the batteries increases, the aging rate of the electric storage system (ESS) increases.
From Figure 18a, the rule-based EMS is simple to implement and consumes the minimum memory of the EMS's control unit, but it depends heavily on the intuition and experience. The output power from the fuel cell and battery fluctuates frequently during the flight stage of the UAV, such as takeoff and cruising stage. According to Figure 18a based on RB, the fuel-cell power fluctuation is not smooth in the initial takeoff stage (0-300 s); meanwhile, the variation of the fuel-cell output power is very large in the cruising stage. At the end of the operation (in UAV descending stage, 1500-1800 s), the final SOC of the battery is above 50% because the battery is more involved in fuel-cell charging, which can cause large stress for the fuel cell. The DC bus voltage can be maintained at the 50 V level. The experimental DC-bus voltage's ripple in Figure 18b is larger than the digital simulation result because of the disturbance from the switching noise from the DC-DC converter. The average number of charges and discharges for the battery is around eight from Figure 18a.
For nonlinear systems with multi-objective optimization, fuzzy logic EMS is easy to implement, but it is very difficult to tune the parameters of the membership function for optimal global control. In Figure 18c,d, the performance of FL regarding the distribution of power and battery SOC is demonstrated. From this figure, it is seen that in the very beginning (0-300 s), the output power of the fuel-cell is smoother than that of RB, and the SOC of the battery decreases more quickly. At the end of the operation (in the UAV descending stage), the final SOC of the battery is above 40%. During the cruising stage (300-1500 s), the battery is rarely charged by the fuel-cell until the descending stage. The average number of charges and discharges for the battery is approximately five or six according to Figure 18c, which can improve the lifetime of the battery compared with RB control methods. There are some minor differences between the simulation result in Figure 18c and the experimental result in Figure 18d. It can be observed that there are some atypical measurements in the experimental data caused by sensor measurement errors and slow dynamic response of the real stack.
The PSO-fuzzy logic EMS requires tuning fewer parameters of FL and is robust to the initial population size. It is based on the meta-heuristic optimization algorithm, which searches the near global optimal solution for the minimum value of fuel-cell hydrogen consumption. During the takeoff and cruising stage for UAV (0-1500 s), the power fluctuation is relatively smooth with PSO fuzzy logic EMS, which can improve the lifetime of the fuel-cell shown in Figure 18e,f. The declining rate of SOC based on PSO fuzzy logic is slower than the other two EMS strategies. The amount of charges and discharges for the battery is also less than that of RB and FL from Figure 18e,f. For the UAV application, the charge-sustainable and charge-depletion (CS-CD) of the battery must be traded off with the optimal operation region of the fuel-cell system. In this paper, the charge-sustainable of the battery is preferred compared with the charge-depletion mode for UAV application because the remaining energy from the battery can be used for the emergency situation of UAV and can extend the flight range of the UAV, and the battery cannot be over-discharged, which can degrade the life time and reliability of the battery. Therefore, the final SOC of the battery during the descending time must be maintained above 30%. However, the final SOC of the battery is not very high, but more than 50%, which can increase the penalty of the weight constraints of the UAV and is not economical for electrical propulsion aircraft. From the simulation and experimental result, the final SOC of the battery was above nearly 40%. It can be seen that the fuel cell and battery always work in the high-efficiency region, and the working points of the voltage bus for the driving motor are strictly distributed to satisfy the power demand of the UAV. It indicates that the PSO fuzzy logic-based energy management strategy learns to improve the HEPS working efficiency as much as possible.

Hydrogen Consumption and Overall Efficiency
The hydrogen consumption can be estimated by measuring the output current of the fuel cell in the project, as shown in the following Equation (20); Similar to Equation (14), n is the number of the cells, F is the Faraday constant, m h is the molar mass of hydrogen. In addition, more attention was focused on the overall system efficiency rather than the efficiency of a single power converter or fuel cell battery, and the total efficiency could be defined as: Notably, P f c and P bat are the output power of FC and battery (the input terminals for converters), respectively. P load is the load power of the UAV.
The real-time hydrogen consumption, overall real-time efficiency from experimental results and a more intuitive histogram for consumption and efficiency can be seen in Figure 19, respectively. In Figure 19a, the curve of real-time hydrogen gas consumption under RB control was presented, the final H 2 gas consumption is above 15 g at the end flight time of UAV, and the real-time efficiency curve changed greatly from the average efficiency of 90%. At the initial takeoff stage of the UAV, the efficiency of HEPS is nearly 93%, but during the cruising stage, the system efficiency changed greatly and then dropped quickly below 60%. In Figure 19b, the real-time consumption of hydrogen is less than the 15 g for UAV flight with the FL control, the efficiency curve of HEPS is nearly around 95%, and just at the descending stage, the total system efficiency drops greatly to 65% for a short time interval. In Figure 19c, the HEPS can always operate at an average efficiency of more than 95% with the PSO-FL control methods, and the real-time consumption of hydrogen at the final time is less than 15 g. At the stage of taking off, the instantaneous hydrogen consumption is the highest (the scope is the steepest), which coincides with the actual condition of flight for UAV. It is noted that the total system real-time efficiency during the descending time changed greatly from the reference efficiency of 95% with the PSO-FL algorithm, which is possibly caused by the improper random initial value of the PSO algorithm. For a whole flight profile, the minimum consumption can be achieved under the PSO-based FL algorithm, and this verifies the effectiveness of the improved EMS. In Figure 19d,e, the hydrogen consumption of the total flight time of the UAV and overall system average efficiency of HEPS are also presented. It is concluded that PSO-based FL control shows very superior performance compared with the other two EMS.
Normally, the UAV will carry a high-pressure gas cylinder, of which the hydrogen density is 3~4%. Taking a cylinder with the specifications of 9 L/35 MPa as an example, the actual mass of the carried hydrogen m H 2 is about 280 g (standard conditions), which is calculated by the following formula: where P bat is the pressure of the gas cylinder, P atm is the normal atmosphere, V H 2 is the volume of hydrogen under standard operating conditions, and m and V m are the hydrogen molar mass and gas molar volume, respectively. Scaling up the mission profile designed in the time domain under the ideal conditions with normal wind speed and climate, the UAV could fly for a duration time of 8.87, 9.6, 9.85 h under RB control, FL control, PSO-FL control, respectively; the compared results are shown in Figure 20. PSO-FL can achieve a longer flight range than that of RB and FL As the power train of a fuel-cell UAV is studied in this case study, the proposed energy management strategy learns to take full advantage of the benefits of the hybrid power-split structure by effectively releasing the fuel-cell from working in the low-efficiency region under the restrictions of flight conditions. Thus, the energy-saving rate of the UAV effectively increases with the higher hydrogen efficiency of the major energy consumption from the fuel-cell. As shown in Figure 21, the fuel cell efficiency curve under the three energy management strategies with an initial setting of 40% SOC for the lithium battery. Within the high-efficiency range of the fuel cell, PSO-FL is compared with the other two energy management strategies RB and FL. There are more points concentrated in the interval. This also verifies that fuel cells mostly work in the high-efficiency area under PSO-FL, and the efficiency of the entire hybrid power system is also higher. As the power train of a fuel-cell UAV is studied in this case study, the proposed energy management strategy learns to take full advantage of the benefits of the hybrid powersplit structure by effectively releasing the fuel-cell from working in the low-efficiency region under the restrictions of flight conditions. Thus, the energy-saving rate of the UAV effectively increases with the higher hydrogen efficiency of the major energy consumption from the fuel-cell. As shown in Figure 21, the fuel cell efficiency curve under the three energy management strategies with an initial setting of 40% SOC for the lithium battery. Within the high-efficiency range of the fuel cell, PSO-FL is compared with the other two energy management strategies RB and FL. There are more points concentrated in the interval. This also verifies that fuel cells mostly work in the high-efficiency area under PSO-FL, and the efficiency of the entire hybrid power system is also higher.
the UAV effectively increases with the higher hydrogen efficiency of the major energy consumption from the fuel-cell. As shown in Figure 21, the fuel cell efficiency curve under the three energy management strategies with an initial setting of 40% SOC for the lithium battery. Within the high-efficiency range of the fuel cell, PSO-FL is compared with the other two energy management strategies RB and FL. There are more points concentrated in the interval. This also verifies that fuel cells mostly work in the high-efficiency area under PSO-FL, and the efficiency of the entire hybrid power system is also higher.

Analysis on Stress and DC Bus Voltage Stability
In order to further investigate the performance of different EMSs of UAV, the stress for each energy source and the stability of the DC bus voltage should be considered. It is believed that the power response with high frequency and fluctuations will increase the chemical stress inside the stack and aggravate the performance degradation of the fuelcell of the UAV. The internal stress of energy sources can be evaluated by an approach based on the Haar wavelet transform and a fascinating feature of which the mean value of the decoupled high-frequency component is zero [32]. Thus, the standard deviations of this component can be used to estimate how often the energy sources are solicited for the UAV. This approach is also suitable for estimating the stability of the DC bus voltage of HEPS for a long time.
The detailed results of the decoupling analysis are shown in Figure 22, and the standard deviation can be seen in Table 4. In Figure 22a,d, the output power curve of the fuelcell, output power of the battery and the DC bus voltage waveform can be transformed

Analysis on Stress and DC Bus Voltage Stability
In order to further investigate the performance of different EMSs of UAV, the stress for each energy source and the stability of the DC bus voltage should be considered. It is believed that the power response with high frequency and fluctuations will increase the chemical stress inside the stack and aggravate the performance degradation of the fuel-cell of the UAV. The internal stress of energy sources can be evaluated by an approach based on the Haar wavelet transform and a fascinating feature of which the mean value of the decoupled high-frequency component is zero [32]. Thus, the standard deviations of this component can be used to estimate how often the energy sources are solicited for the UAV. This approach is also suitable for estimating the stability of the DC bus voltage of HEPS for a long time.
The detailed results of the decoupling analysis are shown in Figure 22, and the standard deviation can be seen in Table 4. In Figure 22a,d, the output power curve of the fuel-cell, output power of the battery and the DC bus voltage waveform can be transformed into one array of the time sequences data set by using the wavelet to decouple the highfrequency components of power from this data set. Probabilistic and statistical methods can be used to obtain stress distribution for different components such as fuel-cell, battery and DC bus. In Figure 22b,e,c,f, the same method is applied for the output power and voltage data set under the FL and PSO-FL methods.
As expected, the standard deviation of the high-frequency components of the power and DC bus voltage under two kinds of fuzzy logic strategies is less than rule-based control, which means the slower degradation of energy sources and more stable DC bus voltage. Another noticeable essential is that less hydrogen consumption in PSO-FL is based on the sacrifice of a part of stress characteristic since the stress performance is unconsidered in the objective function of the PSO algorithm. According to the above analysis, it is concluded that the PSO-FL EMS is fit for the fuel-cell UAV, whose mission profile and path are more predictable than that of EV or HEV. In addition, PSO-fuzzy logic EMS can reduce the computation burden and resource overhead greatly compared with complex EMS based on optimization such as con-vex-optimization, PMP and meta-heuristic optimization, as the PSO-optimization can be realized offline for the parameters of the membership for fuzzy logic. The real-time complementation is followed by the "if -then-else" logic process. It is very valuable to apply the PSO-fuzzy logic EMS in the UAV for a limited embedded controller platform.
into one array of the time sequences data set by using the wavelet to decouple the highfrequency components of power from this data set. Probabilistic and statistical methods can be used to obtain stress distribution for different components such as fuel-cell, battery and DC bus. In Figure 22b,e,c,f, the same method is applied for the output power and voltage data set under the FL and PSO-FL methods. As expected, the standard deviation of the high-frequency components of the power and DC bus voltage under two kinds of fuzzy logic strategies is less than rule-based control, which means the slower degradation of energy sources and more stable DC bus voltage. Another noticeable essential is that less hydrogen consumption in PSO-FL is based on the sacrifice of a part of stress characteristic since the stress performance is unconsidered in the objective function of the PSO algorithm. According to the above analysis, it is concluded that the PSO-FL EMS is fit for the fuel-cell UAV, whose mission profile and path are more predictable than that of EV or HEV. In addition, PSO-fuzzy logic EMS can reduce the computation burden and resource overhead greatly compared with complex

Conclusions
This paper has presented a PSO-fuzzy logic-based EMS for a fuel-cell/battery hybrid power system of a UAV. The proposed strategy is more robust to load power changes compared with the well-known rule-based and fuzzy-logic strategy. In order to improve the hydrogen fuel economy, a particle swarm optimization algorithm has been applied to adjust the threshold parameters of membership functions of the FL controller. The optimization objective function performance will be evaluated in terms of hydrogen consumption, overall efficiency and stress analysis. On the basis of these results, the superiority of FL control and PSO has been proved and the near-optimized criterion is satisfactory. It is common that the PSO meta-heuristic and other intelligent algorithms such as deep learning neural network (NN) need to regulate the membership functions offline for the fuzzy-logic controller. When the load power profile is changed in real-time, the effect of EMS must be degraded because the overall flight profile can be unpredictable. In this paper, the dynamic flight model of UAV was developed to estimate the main load power demand accurately to overcome this shortcoming, which can be integrated with the EMS strategy. The simulation and HIL experimental results verify the proposed EMS strategies.
Some online EMS algorithms, such as MPC [35][36][37] and equivalent-consumptionminimum (ECM) [41,42], have been used to manage the HEPS, but these methods are only based on the limited time horizon length, and the solutions give the sub-optimal result for EMS. Since the myopic optimal strategy such as MPC only involves the information on the current or limited time step state for UAV, it cannot provide a global optimal policy for EMS of UAVs. In this paper, it is recommended that the real-time flight power demand should be calculated or predicted from the dynamic flight model of the UAV and it should be integrated with the EMS. This will be a development trend of UAV EMSs in the future.
The EMS of HEPS for UAV must consider the effect of temperature, humidity, altitude (air pressure) on the characteristics of output power for the fuel cell [43,44]. The energy regenerated problem from the propulsion motor in braked or decelerate state in UAV is a concern for electric propulsion systems. Furthermore, a new coordinating energy and flight trajectory optimization scheduling method for a fuel-cell UAV toward the minimization of hydrogen consumption must be considered for the electric distributed propulsion UAV. The propulsion electric fan can be "distributed" along the leading edge of the fixed wing to significantly increase the lift force and thus improve some aircraft performances. These technologies can cause complexity in the energy optimization split and power quality problems of UAVs. Thus, the corresponding solution methods of adaptive EMS need to be developed to tackle these problems. All of these concerns will be systematically investigated in our future work.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.