Next Article in Journal
Power System Reliability Assessment Considering Coal-Fired Unit Peaking Characteristics
Next Article in Special Issue
Simulating Intraday Electricity Consumption with ForGAN
Previous Article in Journal
The Prediction Performance Analysis of the Lasso Model with Convex Non-Convex Sparse Regularization
Previous Article in Special Issue
Energy Scheduling of Hydrogen Hybrid UAV Based on Model Predictive Control and Deep Deterministic Policy Gradient Algorithm
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Capacity Allocation Method for Long-Endurance Hydrogen-Powered Hybrid UAVs Based on Two-Stage Optimization

1
State Grid Changzhou Power Supply Company, Changzhou 213200, China
2
National Engineering Research Center of Power Generation Control and Safety, Liyang Research Institute, Southeast University, Liyang 213300, China
*
Author to whom correspondence should be addressed.
Algorithms 2025, 18(4), 196; https://doi.org/10.3390/a18040196
Submission received: 22 January 2025 / Revised: 18 March 2025 / Accepted: 20 March 2025 / Published: 1 April 2025

Abstract

:
Due to the challenges associated with the application of existing two-stage optimization methods in energy system capacity configuration, such as uncertainty scenario generation, multi-timescale coupling, and balancing economic and environmental benefits, this paper proposes a two-stage optimization configuration method based on Particle Swarm Optimization (PSO) for the capacity configuration of long-endurance hydrogen-powered hybrid unmanned aerial vehicles (UAVs). By constructing a hydrogen-powered hybrid UAV energy system model, an uncertainty model for the energy system, and multi-timescale comprehensive evaluation indicators and corresponding objective functions, the capacity configuration is determined using a two-stage stochastic programming model solved by CPLEX in MATLAB. The two-stage stochastic programming model consists of the first stage, which involves capacity optimization through PSO, and the second stage, which employs Monte Carlo method for random wind field sampling. The research provides a theoretical foundation for the application of the two-stage optimization capacity configuration method in the field of long-endurance hydrogen-powered hybrid UAVs.

1. Introduction

In the research on configuration optimization, equipment characteristic modeling refers to the establishment of mathematical models that are related to the capacity, performance parameters, and operational output parameters of equipment. It serves as the foundation for integrated configuration models. Based on the level of detail in the equipment model within the configuration optimization model, the models can be classified into two types: steady-state nominal condition models and variable operating condition models. The steady-state nominal condition model [1,2] primarily represents a steady-state mathematical model that characterizes the relationship between energy consumption and output under nominal conditions, which can be used to describe the energy consumption and output relationship in various operating conditions. For example, Cho et al. [1] established a micro-gas turbine model using thermal efficiency, intuitively describing the relationship between fuel consumption and power output. Gu et al. [2] developed a cogeneration unit model, considering multiple factors such as thermal efficiency, electrical efficiency, and heat dissipation coefficient.
Recently, considering the dynamic processes of equipment in the system has become a new research focus. For instance, Li et al. [3] used a simplified first-order dynamic model to replace the steady-state model and simulated the power ramp-up state of a gas turbine, studying its impact on system configuration results. Zhang et al. [4] applied the node method to model the dynamics of the heat network, and, after linear simplification, proposed a day-ahead optimization scheduling method that considered the dynamic characteristics of the heat network, further concluding that the dynamic features of the heat network help improve the flexibility of unit operation. Synchronized optimization of process design and control has become a recent research hotspot in chemical engineering [5,6,7,8,9,10], but the simultaneous optimization problem of control parameters and process design is highly complex, with long solution times, and solving such complex systems exceeds the capabilities of most algorithms and commercial solvers [6]. Therefore, optimization solving methods have not yet been fully solved or overcome.
Moreover, a large number of capacity configuration studies both domestically and internationally still adopt deterministic methods, using sensitivity analysis and other techniques to represent the impact of uncertainty on configuration results. However, uncertainties in the load side often arise due to random fluctuations, which can have a significant impact on the stability and efficiency of system operations. From the perspective of considering uncertainty, stochastic programming and robust optimization are currently the two most common methods in system optimization [11].
Research on the two-stage stochastic programming method for capacity configuration optimization in integrated energy systems has achieved certain results. For example, Yu et al. [12] employed the two-stage stochastic programming method to design and optimize the operation of the energy storage subsystem in a renewable integrated energy system, representing random factors in the form of equivalent scenarios and converting the optimization problem into a Mixed-Integer Linear Programming (MILP) problem for solving. Ioannou et al. [13] proposed a linear multi-stage stochastic programming method for optimizing electricity production planning, combining scenario trees and Monte Carlo sampling methods to represent uncertainties in electricity prices, investment costs, and fuel costs.
Andrew Gong conducted a semi-physical flight test on a fuel cell hybrid power system for UAVs based on the Grob109 model [14]. The experimental results showed that incorporating a supercapacitor into the hybrid system helps improve the durability of the fuel cell. Zhang Xiaohui et al. [15] designed three different fuel cell UAV power system schemes and compared their advantages and disadvantages through experiments. The results indicated that the single-fuel-cell power supply structure is the simplest but is limited by the fuel cell’s output power, making it difficult to meet high-load demands. Compared to the passive control system, the fuel cell/battery active control system increases overall weight and complexity but enhances the UAV’s adaptability to complex flight missions. Zhang Xiaohui et al. [16] aimed to minimize hydrogen consumption by establishing an optimization model with eight design parameters, including the maximum power of the fuel cell and battery capacity, and obtained an optimal configuration through model solving. The results demonstrated that the optimized power system configuration helps reduce the fuel cell’s power level and hydrogen consumption during flight missions. Belmonte, N et al. [17] analyzed the performance of UAVs powered by a fuel cell/battery hybrid system and a battery-only system, comparing them in terms of power system weight composition, cost, and environmental impact. Gong, A et al. [18] studied the performance of fuel cell/battery hybrid UAVs under different mission scenarios, and the results indicated that selecting UAV mission profiles based on fuel cell performance helps reduce hydrogen consumption during flight. Min, ZH et al. [19] proposed an evaluation and optimization method for the power system of a fuel cell distributed electric propulsion aircraft, derived a power flow optimization model for electric propulsion aircraft, and analyzed the optimization of battery life and efficiency for UAV power systems under different flight scenarios.
However, existing two-stage optimization methods face challenges when applied to capacity configuration in energy systems, including uncertainty scenario generation, multi-time scale coupling, and balancing economic and environmental benefits. Therefore, this paper proposes a two-stage optimization configuration method based on the particle swarm algorithm for long-endurance hydrogen-powered hybrid unmanned aerial vehicle (UAV) capacity configuration.
The structure of this paper is as follows: Section 2 describes the modeling of the hydrogen-powered hybrid UAV energy system and the uncertainty model of the energy system; Section 3 constructs a two-stage stochastic optimization problem for long-endurance hydrogen-powered hybrid UAV capacity configuration, considering uncertain factors, and establishes multi-time scale comprehensive evaluation indicators and corresponding objective functions; Section 4 presents parameter settings and configuration results; Section 5 concludes this paper.

2. Mathematical Model

The structure of proposed hybrid energy system is shown in Figure 1. The main equipment includes the proton exchange membrane fuel cell (PEMFC, air cooling), lithium-ion battery, high-pressure hydrogen storage tank, direct-current (DC) motor, fuel cell balance of plant system (BOP), communication system, and DC/DC converters.

2.1. Hydrogen-Powered Hybrid UAV System Model

2.1.1. Proton Exchange Membrane Fuel Cell

The hydrogen consumption of the proton exchange membrane fuel cell is calculated using Faraday’s law:
H F C = I F C n F C 2 F
where H F C is the hydrogen consumption rate, I F C is the operating current, and n F C is the number of cells.
The fuel cell reaction rate can be expressed by the current density j:
j = I F C A c e l l
where A c e l l is the reaction area of the fuel cell unit.
The thermal power output of the fuel cell P H FC is expressed as follows:
P H FC = P E FC η T η E
where η T is the thermal efficiency of the fuel cell, and η E is the electrical efficiency of the fuel cell.

2.1.2. Lithium Battery

The lithium battery operates in a battery pack configuration, and its total power output is expressed as follows:
P E B = P E b × n 1 × n 2
where P E B is the total power output of the battery pack, P E b is the power of a single battery cell, n 1 and n 2 represent the number of rows and columns of the battery cells, respectively.
The current of a battery cell is as follows:
I b = V oc V oc 2 4 R b P E b 2 R b
where the open-circuit voltage VOC and the internal resistance Rb of the battery cell can both be considered constant values.
The dynamic characteristic of the battery cell, SOC can be expressed as follows:
SOC t + 1 = SOC t I b , t Q B Δ T
where t (0 ≤ tT) is the scheduling time, T is the scheduling period, QB is the battery cell capacity, and I b , k is the current, with charging being negative and discharging being positive.
The energy currently stored in the lithium battery is related to the energy stored at the previous time step and the energy charging and discharging between the two-time steps. The upper and lower limits of the stored electrical energy are determined by the device’s capacity, and the charging and discharging power also has upper and lower constraints. Due to the continuity of device operation, the initial storage state of the device at each moment is equal to the final storage state after the previous cruise. When typical cruise data are input, it can be assumed that the storage state at the beginning and end of each cruise is continuous. The energy storage device model can be represented by Equation (7).
E B T , t = E B T , t 1 1 σ B T + E B T , t 1 i n η B T i n E B T , t 1 o u t / η B T o u t × Δ t t 1 E B T , N 1 σ B T + E B T , N i n η B T i n E B T , N o u t / η B T o u t × Δ t t = 1 S O C B T min E B T , t S O C B T max 0 E B T , t i n , E B T , t o u t P e B T
where E B T , t is the energy storage state of the lithium battery, in kWh; σ B T is the self-loss coefficient of the lithium battery; E B T , t i n and E B T , t o u t are the charging and discharging power of the lithium battery, in kW, respectively; η B T i n and η B T o u t are the charging and discharging efficiencies of the lithium battery, respectively; S O C B T min and S O C B T max are the lower and upper limits of the battery’s storage state, in kWh, respectively; P e B T is the maximum electrical power of the lithium battery; and Δ t is the time interval.

2.1.3. Hydrogen Storage Tank

The hydrogen storage tank uses a high-pressure hydrogen storage tank model (HST) to provide a source of hydrogen for fuel cell power generation. The pressure inside the hydrogen storage tank changes dynamically as hydrogen is released, represented as follows:
T P t + 1 H = T P t H z t R T H V H H t H S T
where T P t H and H t H S T are the pressure inside the hydrogen storage tank and the hydrogen flow rate at time t, with the flow rate measured in mol/s. V H is the volume of the hydrogen storage tank, T H is the operating temperature, R is the universal gas constant, and zt is the compressibility factor of hydrogen, which can be calculated based on NIST data using the Lemmon equation:
z t ( T P t H ) = 1 + i = 1 9 a i T 0 T H b i ( T P t H ) c i
where ai, bi, and ci are constants, the values of which can be found in Appendix A Table A1. T0 = 100 K, and R = 8.3145 J/mol·K.

2.1.4. Electric Motor

The system uses a brushless direct current (DC) motor as the main power output, which features low electrical loss, long lifespan, and low maintenance. The equivalent voltage and current of the brushless DC motor are as follows:
I m o t o r = M m o t o r K V 0 U m 0 9.55 ( U m 0 I m 0 R m o t o r ) + I m 0
U m o t o r = R m o t o r I m o t o r + U m 0 I m 0 R m o t o r K V 0 U m 0 N m o t o r
where I m o t o r is the equivalent current of the motor, U m 0 is the no-load voltage of the motor, I m 0 is the no-load current of the motor, K V 0 is the no-load speed of the motor, R m o t o r is the internal resistance of the motor, M m o t o r is the load torque of the motor, and N m o t o r is the speed of the motor.
The electrical power of the motor is as follows:
P m o t o r = U m o t o r I m o t o r
where P m o t o r represents the rated power of the motor during operation.

2.2. Construction of Uncertainty Model

During the cruise phase of a hydrogen hybrid UAV, suitable wind uncertainty can reflect the basic statistical characteristics of the wind field and meet the requirements for trajectory integration applications, which is crucial for the capacity configuration of long-endurance hydrogen hybrid UAVs. In the local analysis of UAV trajectories that need to maintain intervals, capturing the spatial and temporal correlations of the wind field is key. Typically, in this scenario, assuming that the wind field is steady, homogeneous, and isotropic is reasonable. However, for mid- to long-range trajectory prediction that supports Air Traffic Control (ATC) and Decision Support Tools (DSTs), the model needs to reflect the non-stationarity, non-homogeneity, weather-dependency, and potential non-Gaussian characteristics of the wind field. This model satisfies the requirements for long-endurance hydrogen hybrid UAV capacity configuration.
A convenient method for modeling wind uncertainty is to effectively utilize a large amount of historical RUC (Rapid Update Cycle) data, which are provided by the National Weather Service’s numerical weather prediction system [20]. However, since RUC data are only valid at discrete network points and specific time points, appropriate interpolation schemes are required to obtain wind uncertainty samples for general locations and times while preserving the spatial and temporal correlations of wind error fields.
Wind uncertainty samples for a general location and forecast time period are obtained by weighted summation of historical RUC wind errors from nearby locations. These neighboring points are selected within the spatial range of the current location. For each location, historical RUC wind error data are derived from delayed RUC forecasts during the same time period in the same season under similar conditions. The forecast time interval is within the temporal correlation time range of the specified prediction time. The weight selection in the model is inversely proportional to the square of the relative distance and the absolute value of the forecast time interval difference. Additionally, the model includes two purely random correction terms to account for other sources of uncertainty.
Δ W G , j ( r , τ ) = k L k ( τ ) i C i ( r i ) [ Δ W G , j R U C ( r i , τ k ) + ε G , j m ( r i , τ k ) ] + ε G , j r
where j = 1, …, Ns represents the sample number of wind uncertainty, Δ W G , j ( r , τ ) represents the position vector denoted as r, and the predicted wind uncertainty at the forecast lead time τ is represented. Δ W G , j R U C represents the wind components provided by RUC. ε G , j m ( r , τ k ) represents the pure random variable where the position vector is r, the sample index of wind uncertainty is j, and the forecast lead time is τk. ε G , j r represents the pure random variable where the position vector is r and the sample index of wind uncertainty is j. r and ri represent the position vector and the position vector at grid point index i. τ and τk represent the forecast lead time, where τk = 0, 1, …, 9. m represents the mass of the aircraft. And Ci(r) and Lk(τ) are as follows:
C i ( r ) = r r i p k = 1 N R r r k p , L k ( τ ) = k j N t τ τ k τ j τ k
In the equation, Ci(r) and Lk(τ) both represent weights, where Ci(r) is related to position, and Lk(τ) is related to the forecast lead time.
Due to the variations in different geographical regions and between different predictions in each RUC forecast, the resulting model is naturally non-stationary, non-homogeneous, non-Gaussian, and weather-dependent. Additionally, uncertainties arising from initial measurements and the determination of the nominal wind field can also be appropriately incorporated into the model.
Δ W G ( r , t + τ | t ) = Δ W G R U C ( r , t + τ | t ) + e G m ( r , t + τ ) + e G n ( r , t + τ | t )
In the equation, Δ W G ( r , t + τ | t ) represents the wind uncertainty prediction at the position vector r and forecast lead time t + τ, based on the value at time t; Δ W G R U C ( r , t + τ | t ) represents the time-lagged RUC data error at position vector r and forecast lead time τ, based on the value at time t; e G m ( r , t + τ ) and e G n ( r , t + τ | t ) represent the initial measurement error and nominal wind error, respectively.
Equation (15) shows how the initial measurement inputs of the RUC model introduce uncertainty. The basis for the measurements is the relationship between certain physical properties of the wind field and the wind speed and direction. Thus, the measurement errors can be divided into calibration errors of the equipment and errors caused by uncertainties in the underlying physical processes. While further research is needed, it can be assumed that the latter follows a pattern similar to wind errors. Therefore, a pure random term is added to the model to account for the correlated part of the measurement error, while another pure random term is added outside the weighted summation to represent the measurement calibration error.
In contrast, the uncertainty introduced during the nominal wind field determination depends on the specific interpolation or approximation method used. When interpolation is performed, the error is zero at the RUC network points, which are spaced 20 km apart in the horizontal direction and 25 hPa apart in the vertical direction. Thus, the horizontal spatial scale of the error is approximately 40 km. This is significantly smaller than the spatial correlation of wind errors and is therefore considered a pure random term. Additionally, the residuals of the weighted summation model are random, as the summation already accounts for the spatial and temporal correlations. Therefore, in Equation (13), ε G m represents the pure random corrections for measurement calibration errors, nominal wind field determination errors, and model residuals.
When constructing the above wind uncertainty model, it is assumed that the measurement errors, nominal wind field determination errors, and RUC system prediction errors are independent of each other. The following additional assumptions are also made:
The wind uncertainty components along the three vertical directions are uncorrelated. Therefore, the corresponding 3 × 3 correlation matrix is a diagonal matrix, and the components along the three directions can be analyzed separately. It should be noted that the correlation of different wind quantities is influenced by the choice of coordinate system. This patent adopts the wind directions along the three vertical axes.
Compared to the horizontal components, the vertical wind component Wh is relatively small and is often neglected. However, the actual vertical wind may not be zero, and its presence could affect the accuracy of the predicted trajectory.
In meteorological models, commonly used interpolation methods include linear interpolation, bilinear interpolation, spline interpolation, and inverse distance weighting (IDW), among others. For wind fields involving wind speed and direction, IDW is relatively common, but it is not well suited for capturing complex nonlinear variations. Therefore, a combination of spline interpolation and IDW is adopted.
Inverse Distance Weighting (IDW) is an interpolation method based on Tobler’s First Law of Geography. It uses the distance between the point to be estimated and the measured values as a weighting factor, and infers the attributes of the unknown point based on the known values. The expression is as follows:
Z ( x ) = i = 1 n W i Z ( x i )
where Z(x) represents the estimated value at the point to be interpolated, Z(xi) represents the value at the i-th interpolation point, n is the number of interpolation points involved, and Wi represents the weight of the i-th interpolation point. The calculation of the weight Wi is as follows:
W i = d ( x , x i ) a i = 1 n d ( x , x i ) a
where a is the distance exponent, d ( x , x i ) is the distance from the i-th interpolation point xi to the point to be estimated x, and the weight Wi decreases as the distance increases. Additionally, the larger the distance exponent a, the greater the weight assigned to interpolation points closer to the target point, making the interpolated value closer to the value of the nearest interpolation point. Conversely, a smaller a result in the interpolated value is closer to the average of the surrounding interpolation points.
Spline interpolation simulates the shape of a given curve by inserting spline curves between known points, resulting in a smoother and more accurate outcome.
Let the interpolation be performed on the interval [a, b], where a = x1 < x2 < ⋯ < xn = b, and each interpolation point have a corresponding function value, denoted as F(xi) = yi (i = 1, 2, …, n). If the function F(x) is a polynomial of degree at most 3 on the interval [a, b], and F(x) has a second derivative on the interval [a, b], then F(x) is called a cubic spline interpolation function.
Specifically, F(x) exists as a cubic polynomial on each subinterval [xi, xi + 1], which can be expressed as Fi(x) = aix3 + bix2 + cix + di, where F(xi) = yi, F(xi − 0) = F(xi + 0), F′(xi − 0) = F′(xi + 0), F″(xi − 0) = F″(xi + 0), (i = 1, 2, …, n−1).
By combining the two methods, a multi-scale interpolation approach is adopted. Since the data scale range provided by the RUC model is too large, with the minimum spatial resolution being 13 km, it is not suitable for long-endurance hydrogen hybrid UAVs. First, IDW is used to reduce the data to a 1 km scale, and then cubic spline interpolation is applied to further reduce the IDW-processed data to a 5 m horizontal resolution, ensuring the capture of small variations in airflow.

3. Two-Stage Stochastic Optimization Problem

In actual flight scenarios, wind speed and wind direction are characterized by randomness, volatility, and intermittency. Deterministic models for optimizing the system’s total cost fail to account for these uncertainties, leading to a significant deviation between the optimization results and the actual situation. Therefore, a two-stage stochastic programming model is developed to optimize the capacity configuration of hydrogen hybrid UAVs considering uncertainty.
This study proposes a two-stage stochastic programming model that uses the particle swarm optimization (PSO) algorithm to optimize the first-stage device capacity. The second stage uses random wind speed and wind direction scenarios generated by the Monte Carlo method, combining the optimal device capacity from the first stage to obtain the expected optimal cost of the system under different scenarios. This expected cost serves as the fitness function for the PSO algorithm, continuously evolving the first-stage optimization process. It can be understood as taking the UAV’s flight power demand as input, and after considering the uncertainty of the wind field, along with balance constraints, capacity constraints, and energy storage constraints, deriving the expected optimal cost of the system under different scenarios. Then, the particle swarm optimization algorithm is used to optimize the system, ultimately determining the optimal equipment capacity to meet various flight scenarios. CPLEX typically uses branch-and-bound and cutting-plane methods to solve MILP models, incorporating preprocessing and heuristic methods. Therefore, the CPLEX solver can be used to solve the second-stage MILP problem. The specific process is shown in Figure 2.
The process is based on solving the MILP problem and the PSO algorithm, using Monte Carlo simulation to generate random scenarios for the system, and accounting for uncertainty in the system. The main steps include particle swarm generation, fitness calculation, particle position update, particle velocity update, boundary check, and termination condition check. The specific computational steps are as follows:
  • Step 1: Initial Particle Swarm Generation:
Define the space range within which the particles can move. Within this range, randomly generate the position vector and velocity vector for each particle.
  • Step 2: Fitness Calculation:
For each individual in the particle swarm, substitute it into each scenario generated by Monte Carlo simulation to obtain the expected value for each scenario, i.e., the fitness of the individual. In cases of no solution or failed solution, a large value can be added to the fitness function to lower the fitness of that individual, further screening the particles.
  • Step 3: Update Global Best Particle and Individual Best Particle:
Based on the fitness function values, select the particle with the best fitness among the current individuals, as well as the global best particle.
  • Step 4: Boundary Check:
Verify the updated particle positions and velocities, and if any particle exceeds the boundary, regenerate its position and velocity randomly.
  • Step 5: Repeat Steps 2–4 until the iteration conditions are met, exit the loop, and obtain the optimal solution.
In addition, PSO includes the number of particles, N, maximum number of iterations, Max_iteration, dimensionality, dim, lower boundary of the search space, Ib, and upper boundary of the search space, ub. The core of the PSO algorithm is to simulate the movement of multiple particles within the search space, where each particle represents a potential solution. The selection of the number of particles needs to balance performance and computation time. The maximum number of iterations refers to the maximum number of updates for the particles’ velocity and position. The lower and upper boundaries of the search space define the lower and upper limits of the decision variables.
Considering that the hydrogen hybrid UAV is greatly affected by wind speed and wind direction, and that fluctuations in climate conditions are often random and difficult to predict, the capacity configuration results obtained through deterministic models for optimizing the system’s total cost may be inaccurate. This paper proposes a two-stage stochastic programming method to study the optimization problem of capacity configuration for hydrogen hybrid UAVs.
First, system constraints are established, primarily including energy balance constraints, capacity constraints, and energy storage constraints.

3.1. Energy Balance Constraint

In the hydrogen hybrid UAV energy system, the primary focus is on the electrical load demand. During system operation, the electrical energy obtained by the system should be greater than or equal to the energy consumption. The devices that generate electrical energy in the system include hydrogen fuel cells and lithium batteries. The devices that consume electrical energy include DC motors, fans, communication equipment, and lithium batteries. The energy balance is represented by the following equation:
E F C + E B T o u t E M + E F + E C D + E B T i n
where EFC represents the electrical energy provided by the hydrogen fuel cell, E B T o u t represents the electrical energy output by the lithium battery, EM represents the electrical energy consumed by the DC motor, EF represents the electrical energy consumed by the fan, ECD represents the electrical energy consumed by the communication equipment, and E B T i n represents the electrical energy input to the lithium battery.
Capacity constraint: For the hydrogen hybrid UAV system, the output power of each device should not exceed its designed capacity. Furthermore, for the hydrogen fuel cell, its minimum operating power should not be lower than 30% of its capacity to avoid operating under excessively low load. Therefore, the capacity constraints for the hydrogen fuel cell and fan are as follows:
Y F C , t × 0.3 C a p F C E F C Y F C , t × C a p F C
0 E F Y F , t × C a p F
In the equation, Y F C , t represents the Boolean variable used to determine whether the hydrogen fuel cell is operating, with a value of 0 or 1; C a p F C represents the maximum output power of the hydrogen fuel cell; Y F , t represents the Boolean variable used to determine whether the fan is operating, with a value of 0 or 1; C a p F represents the maximum output power of the fan.

3.2. Energy Storage Constraint

For the lithium battery, which serves as the energy storage device, the following assumptions and constraints apply: (1) Before the hydrogen hybrid UAV takes off, the lithium battery has already stored a certain amount of electrical energy. (2) Due to the continuity of multiple flight missions by the hydrogen hybrid UAV, when the hydrogen fuel supply is sufficient, no recharging of the lithium battery is considered. Therefore, the lithium battery’s energy level at the end of the previous flight is assumed to be the same as the starting energy level for the next flight. (3) The storage and withdrawal of energy from the lithium battery do not occur simultaneously and should not exceed the maximum storage and withdrawal power of the battery. (4) The stored energy in the lithium battery should remain within 20% to 80% of its designed capacity.
Therefore, for the lithium battery, the following constraints apply:
S O C 0 = S O C 360
0 S O C i n Y S O C , t × P i n , max
0 S O C o u t ( 1 Y S O C , t ) × P o u t , max
0.2 C a p s o c S O C t 0.8 C a p s o c
In the equation, Y S O C , t represents the Boolean variable used to determine whether the lithium battery is charging or discharging, with a value of 0 or 1; P i n , max represents the maximum charging power of the lithium battery; P o u t , max represents the maximum discharging power of the lithium battery; C a p s o c represents the capacity of the lithium battery.
For the hydrogen storage tank, which serves as the hydrogen energy storage device, the following assumptions and constraints apply:
(1)
Before the hydrogen hybrid UAV takes off, the hydrogen storage tank has already stored a certain amount of hydrogen energy.
(2)
Due to the continuity of multiple flight missions by the hydrogen hybrid UAV, when the hydrogen fuel is at no less than 20% of its maximum capacity, refueling is not required. Therefore, the amount of hydrogen in the storage tank at the end of the previous flight is assumed to be the same as the starting amount for the next flight.
(3)
The storage and withdrawal of hydrogen from the tank do not occur simultaneously. Since the refueling process does not affect the capacity configuration of the hydrogen hybrid UAV, the focus is more on the withdrawal rate, which should not exceed the maximum withdrawal power of the hydrogen storage tank.
Therefore, for the hydrogen storage tank, the following constraints apply:
T P 0 = T P max , i f   T P 360 < 0.2 T P max T P 360 , e l s e
0 T P o u t ( 1 Y T P , t ) × H o u t , max
In the equation, Y T P , t represents the Boolean variable used to determine whether the hydrogen storage tank is releasing hydrogen, with a value of 0 or 1; H o u t , max represents the maximum hydrogen release power of the hydrogen storage tank.
A stochastic programming model is constructed for the capacity configuration of the hydrogen hybrid UAV.
The variables in the stochastic model for the capacity configuration of the hydrogen hybrid UAV include design variables, which refer to the capacity of the equipment, and operational variables, which refer to the variables during the operation of the hydrogen hybrid UAV. Based on these variables, an MILP problem is constructed:
min d , x t , y t f ( d , x t , y t ) s . t . ψ d c ( d ) 0 φ o c ( d , x t , y t ) = 0 ψ o c ( d , x t , y t ) 0 d 1 , x t n , y t 0 , 1 n
where d represents the continuous decision variables determined during the design process; xt and yt represent the continuous variables and 0-1 binary variables involved in the operation process, respectively, existing within each time interval during the project lifecycle; f is the objective function, i.e., the total cost of the system over its entire lifecycle; ψ d c represents inequality constraints in the design process, which are related only to the design variables d; φ o c and ψ o c represent equality and inequality constraints during the operational process, which are related to the operational variables xt, yt, and d. 1 and n represent the feasible regions of the respective continuous variables determined, and the feasible region of the continuous variables involved in the operation process; n represents the dimensionality, i.e., the number of 0-1-type variables. When considering the impact of uncertain parameters on the optimization problem, the problem above becomes a typical two-stage resource problem. For a deterministic MILP problem, the design variables and operational variables can be determined simultaneously and optimally. However, for a stochastic optimization problem, the design variables, which are independent of uncertain parameters, can be determined first (here-and-now), while the operational variables must wait until all random parameters have been realized in order to determine the optimal solution (wait-and-see). In other words, the two types of variables need to be determined at different stages of the optimization process.
Therefore, when both the design variables and operational variables need to be optimized simultaneously to minimize the total lifecycle cost of the system, this study adopts a two-stage stochastic programming approach. All design variables, i.e., the capacities of all devices, are classified as first-stage variables; all operational variables are classified as second-stage variables. Combining the MILP problem above, this two-stage stochastic programming problem can be expressed in the following form:
( First-stage ) : min ( ω 1 C short + ω 2 C long ) = min [ ω 1 ( k 1 C f + k 2 C m ) + ω 2 ( k 3 C e + k 4 C l ) ] = min [ ω 1 k 1 C f + ( ω 1 k 2 C m + ω 2 k 3 C e + ω 2 k 4 C l ) ] = min d E [ f s ( d , ξ ) ] + f d ( d ) s.t. ψ d c ( d ) 0 d { 0 , 1 } ( Second-stage ) : f s ( d , ξ ) = min x t , y t f s ( d , x t , y t , ξ )   s.t. φ o c ( d , x t , y t , ξ ) = 0 ψ o c ( d , x t , y t , ξ ) 0 x t R n , y t { 0 , 1 } n
The objective function is represented by two parts: f d is the deterministic part of the objective function, which corresponds to the investment cost C i n v of the selected equipment capacity. The stochastic part is represented by the expectation of f s , which represents the cost related to the uncertain parameters, including the operation and maintenance costs C O M and the cost of purchasing resources C t a r i . ξ represents the uncertain parameters, including wind speed, wind direction, and load size.
The comprehensive evaluation metric with multiple time scales primarily refers to the coupling between short-term decisions and long-term planning, where short-term decisions focus on immediate costs, and long-term planning focuses on long-term costs.
Short-term decisions emphasize immediate benefits. In the case of the hydrogen hybrid UAV, short-term costs include hydrogen fuel consumption costs and regular maintenance costs.
Long-term planning focuses on the sustainability of the system. For the hydrogen hybrid UAV, long-term costs include the initial investment in equipment and the service life of the equipment.
The corresponding objective function is constructed using a weighted sum:
min J = ω 1 C short + ω 2 C l o n g
where J is the objective value of the comprehensive optimization; Cshort is the short-term cost, including fuel consumption and maintenance costs; Clong is the long-term cost, including equipment investment and the amortized service life; ω1 and ω2 are the weight coefficients that balance the relative importance of short-term and long-term objectives.
Short-term cost:
C s h o r t = k 1 C f + k 2 C m
where Cf represents the hydrogen fuel consumption cost, Cm represents the regular maintenance cost, and k1, k2 are the weight coefficients.
C f = P f Q f
where Pf represents the unit price of hydrogen fuel, in ¥/L, Qf represents the hydrogen consumption of the fuel cell for a single flight, in liters L, Q f = f ( I F C , t ) , IFC represents the fuel cell operating current, and t represents the duration of a single flight.
C m = 1 N m n = 1 N m n ( K n C n )
where Nm represents the number of flights within the regular maintenance cycle, Nmn represents the number of devices on the hydrogen hybrid UAV that require regular maintenance, Kn is the equipment maintenance cost coefficient, and Cn represents the equipment parameters. Taking the lithium battery as an example, Kn represents the unit price during the maintenance or inspection process, in CNY/kWh, and Cn represents the capacity of the lithium battery, in kWh.
Long-term cost:
C l o n g = k 3 C e + k 4 C l
where Ce represents the one-time investment cost of the equipment, Cl represents the amortized cost of the service life, and k3, k4 are the weight coefficients.
C e = n = 1 N e P n
where Ne represents the number of devices that require a one-time investment, and Pn represents the cost of the equipment.
C l = n = 1 N l P n P n , e v N u
where Nl represents the number of devices that require amortization of their service life, Pn represents the cost of the equipment, Pn,ev represents the residual value, i.e., the remaining value of the equipment at the end of its service life, and Nu represents the service life (here measured in terms of usage cycles).

4. Results

Based on the proposed wind uncertainty model and RUC data, a set of possible wind speed and wind direction datasets is calculated, as shown in Appendix A Table A2.
Based on the proportion of each device in Figure 3, Figure 4 and Figure 5, the parameter settings for the objective function are shown in Table 1.
First, Monte Carlo sampling is used to sample the wind uncertainty model, obtaining deterministic models and corresponding optimal device capacities for multiple scenarios, as well as the expected optimal cost under different scenarios. The expected optimal cost is used as the fitness function for the particle swarm optimization algorithm, which continuously optimizes the first-stage optimization process. The MILP problem in the second stage is solved using the CPLEX solver in MATLAB 2024a. The particle swarm parameters are listed in Table 2. The convergence results of the particle swarm optimization are shown in Figure 6.
Additionally, a sensitivity analysis on the number of particles NNN was conducted by testing with values of 30, 50, and 100, and the results are shown in Figure 7. As can be seen from the figure, the convergence result is better when the number of particles is set to 50.
The capacity configuration results for the hydrogen-powered hybrid UAV, derived from the objective function parameter settings shown in Table 2, are presented in Table 3.
From Table 4, particle swarm optimization (PSO) outperforms the genetic algorithm (GA) in terms of optimization speed, computation time, and solution quality. Although the GA has advantages in global search capability, PSO is better suited for scenarios requiring efficient optimization, particularly in capacity configuration problems, due to its lower computational complexity and faster convergence rate. PSO demonstrates better performance, especially in real-time capacity configuration and lifecycle cost minimization for unmanned aerial vehicles.

5. Conclusions

This research proposes a capacity configuration optimization model for hydrogen UAVs based on two-stage stochastic optimization, aiming to account for the impact of uncertain factors such as wind speed and wind direction. The model integrates both short-term and long-term costs of the UAV, providing an optimal capacity configuration for hydrogen hybrid UAVs. By introducing a combination of PSO algorithm and Monte Carlo simulation, the model overcomes the limitations of existing deterministic models that cannot effectively address uncertainty. The model incorporates multiple key factors, including energy balance constraints, equipment capacity constraints, and energy storage constraints, ensuring the feasibility and efficiency of the optimization results in actual flight scenarios. The main contributions and conclusions are as follows:
(1)
The two-stage stochastic optimization method proposed in this paper effectively addresses the impact of uncertain factors such as wind speed and wind direction. In the first stage, PSO is used to optimize the capacity configuration of the equipment, while the second stage evaluates the expected optimal cost under different scenarios by solving the MILP problem, ultimately achieving the system’s full lifecycle optimization.
(2)
This paper constructs a comprehensive evaluation metric that includes both short-term and long-term costs. The short-term costs focus on hydrogen consumption and regular maintenance expenses, while the long-term costs consider equipment investment and amortization of service life. By using a weighted sum, the short-term and long-term objectives are balanced, ensuring that the system meets the immediate operational needs while maintaining long-term sustainability.
(3)
To address the uncertainty of wind speed and wind direction, the Monte Carlo method is used to generate random scenarios for these variables. By combining this with the PSO algorithm, the system configuration is continuously optimized. Through iterative optimization, the PSO algorithm effectively finds the optimal solution, thereby improving the overall system performance.
(4)
A sensitivity analysis of the number of particles in the PSO algorithm was conducted, and the results showed that the optimization effect was best when the number of particles was set to 50. This provides valuable guidance for future optimization algorithm configurations, ensuring both computational efficiency and convergence.
Although the optimization method proposed in this paper has shown good results under various uncertain scenarios, there is still room for further improvement. First, the current model primarily considers the uncertainties of wind speed and wind direction. Future research could introduce additional environmental factors, such as temperature changes, weather fluctuations, and power demand, to further enhance the model’s applicability and accuracy. Moreover, with the continuous advancement of technology, the application scenarios of hydrogen hybrid UAVs will become more complex. Future studies could explore dynamic optimization methods based on real-time data, which involve monitoring various flight parameters in real time and adjusting flight strategies accordingly to improve operational efficiency.
Additionally, the optimization goal in this paper focuses on cost minimization. However, in practical applications, multiple objectives may need to be balanced, such as environmental impact, operational safety, and others. Future research could consider incorporating these factors into the optimization framework and conduct multi-objective optimization to achieve more comprehensive performance improvements. Furthermore, with the rapid development of artificial intelligence and machine learning technologies, future research could attempt to combine these advanced technologies with traditional optimization algorithms. Methods like deep learning could be used to enhance the accuracy and intelligence of the optimization process.
Regarding the optimization algorithm, although the PSO algorithm has shown good performance, it also has certain limitations. Future studies could attempt to combine PSO with other optimization methods, such as genetic algorithms or ant colony optimization, or even develop new hybrid optimization algorithms to improve solution efficiency and algorithm robustness. Additionally, with the advancement of computational power, the scale of the problem can be expanded, allowing for the resolution of more complex optimization problems.

Author Contributions

Conceptualization, H.L. and L.S.; methodology, C.W. and L.S.; software, C.W. and S.Y.; validation, H.L., C.W., S.Y. and L.S.; formal analysis, S.Y.; investigation, H.L. and C.W.; resources, H.Z.; data curation, S.Y.; writing—original draft preparation, C.W. and S.Y.; writing—review and editing, C.W. and S.Y.; visualization, C.W.; supervision, H.L. and L.S.; funding acquisition, H.L. and L.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the key technology research project on long-endurance hydrogen-powered hybrid UAVs for air–ground–space collaborative power inspection, grant number J2024028.

Data Availability Statement

Data will be made available on request.

Acknowledgments

Sincere thanks to State Grid Jiangsu Electric Power Company for their financial support of the scientific research project, project number J2024028.

Conflicts of Interest

Authors Haitao Li and Hui Zhu were employed by the company “State Grid Changzhou Power Supply Company”. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Appendix A

Table A1. Values of ai, bi, and ci.
Table A1. Values of ai, bi, and ci.
i a i b i c i
10.05884601.3251.0
2−0.061361111.871.0
3−0.0026504732.52.0
40.0027311252.82.0
50.0018023742.9382.42
6−0.00121507073.142.63
70.958842 × 10−43.373.0
8−0.1109040 × 10−63.754.0
90.1264403 × 10−94.05.0
Table A2. The dataset of wind speed and wind direction obtained from the wind uncertainty model.
Table A2. The dataset of wind speed and wind direction obtained from the wind uncertainty model.
Time (min)Wind Speed (m/s)Wind Speed Uncertainty (±m/s)Wind Direction (°)
03.5±0.345
103.2±0.342
203.8±0.447
303.6±0.450
404±0.348
503.9±0.553
604.3±0.557
704.5±0.455
804.1±0.559
904.6±0.563
1004.8±0.560
1104.5±0.565
1205±0.468
1304.7±0.666
1405.2±0.670
1505.4±0.672
1605.1±0.675
1705.3±0.773
1805.6±0.777
1905.8±0.675
2005.4±0.778
2105.9±0.782
2206.1±0.780
2306±0.885
2406.2±0.883
2506.3±0.887
2606.5±0.589
2706.6±0.886
2806.4±0.991
2906.8±0.388
3006.9±0.892
3106.7±0.490
3207±0.995
3306.8±1.293
3407.2±1.098
3507.1±1.0100
3607.3±0.397

References

  1. Cho, H.; Mago, P.J.; Luck, R.; Chamra, L.M. Evaluation of CCHP systems performance based on operational cost, primary energy consumption, and carbon dioxide emission by utilizing an optimal operation scheme. Appl. Energy 2009, 86, 2540–2549. [Google Scholar] [CrossRef]
  2. Gu, W.; Wu, Z.; Yuan, X. Microgrid economic optimal operation of the combined heat and power system with renewable energy. In Proceedings of the IEEE PES General Meeting, Minneapolis, MN, USA, 25–29 July 2010; pp. 1–6. [Google Scholar]
  3. Liu, C.; Wang, C.; Yin, Y.; Yang, P.; Jiang, H. Bi-level dispatch and control strategy based on model predictive control for community integrated energy system considering dynamic response performance. Appl. Energy 2022, 310, 118641. [Google Scholar] [CrossRef]
  4. Zhang, Z.; Wang, C.; Lv, H.; Liu, F.; Sheng, H.; Yang, M. Day-ahead optimal dispatch for integrated energy system considering power-to-gas and dynamic pipeline networks. IEEE Trans. Ind. Appl. 2021, 57, 3317–3328. [Google Scholar]
  5. Li, Y.; Zhang, J.; Wu, X.; Shen, J.; Lee, K.Y. Optimal design of combined cooling, heating and power multi-energy system based on load tracking performance evaluation of adjustable equipment. Appl. Therm. Eng. 2022, 211, 118423. [Google Scholar]
  6. Rafiei, M.; Ricardez-Sandoval, L.A. New frontiers, challenges, and opportunities in integration of design and control for enterprise-wide sustainability. Comput. Chem. Eng. 2020, 132, 106610. [Google Scholar]
  7. Lenhoff, A.M.; Morari, M. Design of resilient processing plants—I Process design under consideration of dynamic aspects. Chem. Eng. Sci. 1982, 37, 245–258. [Google Scholar]
  8. Seferlis, P.; Grievink, J. Process design and control structure screening based on economic and static controllability criteria. Comput. Chem. Eng. 2001, 25, 177–188. [Google Scholar]
  9. Papadopoulos, A.I.; Seferlis, P.; Linke, P. A framework for the integration of solvent and process design with controllability assessment. Chem. Eng. Sci. 2017, 159, 154–176. [Google Scholar]
  10. Yu, W.; Li, K.; Li, S.; Ma, X.; Zhang, C. A bi-level scheduling strategy for integrated energy systems considering integrated demand response and energy storage co-optimization. J. Energy Storage 2023, 66, 107508. [Google Scholar]
  11. Shen, F.; Zhao, L.; Wang, M.; Du, W.; Qian, F. Data-driven adaptive robust optimization for energy systems in ethylene plant under demand uncertainty. Appl. Energy 2022, 307, 118148. [Google Scholar] [CrossRef]
  12. Yu, J.; Ryu, J.H.; Lee, I.B. A stochastic optimization approach to the design and operation planning of a hybrid renewable energy system. Appl. Energy 2019, 247, 212–220. [Google Scholar] [CrossRef]
  13. Ioannou, A.; Fuzuli, G.; Brennan, F.; Yudha, S.W.; Angus, A. Multi-stage stochastic optimization framework for power generation system planning integrating hybrid uncertainty modelling. Energy Econ. 2019, 80, 760–776. [Google Scholar] [CrossRef]
  14. Gong, A.; MacNeill, R.; Verstraete, D.; Palmer, J.L. Analysis of a Fuel-Cell/Battery/Supercapacitor Hybrid Propulsion System for a UAV using a Hardware-in-the-Loop Flight Simulator. In Proceedings of the 2018 AIAA/IEEE Electric Aircraft Technologies Symposium. Cincinnati, Ohio: American Institute of Aeronautics and Astronautics, Cincinnati, OH, USA, 12–14 July 2018. [Google Scholar]
  15. Zhang, X.; Liu, L.; Dai, Y.; Shen, H. Design and Experiment of Fuel Cell UAV Power System. J. Aeronaut. 2018, 39, 162–171. [Google Scholar]
  16. Zhang, X.; Liu, L.; Dai, Y. Energy Management and Flight State Coupling of Fuel Cell UAVs. J. Aeronaut. 2019, 40, 92–108. [Google Scholar]
  17. Fang, M.; Sun, X.; Huang, R.; Qian, G.; Geng, H.; Wen, G.; Xu, C.; Xu, C.; Liu, L. Automatic Detection of Power Pole Towers for High-Resolution Satellite Remote Sensing. Aerosp. Return Remote Sens. 2021, 42, 118–126. [Google Scholar]
  18. Gong, A.; Palmer, J.L.; Brian, G.; Harvey, J.R.; Verstraete, D. Performance of a hybrid, fuel-cell-based power system during simulated small unmanned aircraft missions. Int. J. Hydrogen Energy 2016, 41, 11418–11426. [Google Scholar] [CrossRef]
  19. Min, Z.; Lei, T.; Wang, Y.; Zhang, X.; Zhang, X. The Evaluation and Optimization of Power Architecture of Distributed Electrical Propulsion Fuel-cell UAV. In Proceedings of the IECON 2020 The 46th Annual Conference of the IEEE Industrial Electronics Society, Singapore, 18–21 October 2020; pp. 2376–2381. [Google Scholar]
  20. Zheng, Q.; Zhao, Y. Modeling wind uncertainties for stochastic trajectory synthesis. In Proceedings of the 11th AIAA Aviation Technology, Integration, and Operations (ATIO) Conference, including the AIAA Balloon Systems Conference and 19th AIAA Lighter-Than, Virginia Beach, VA, USA, 20–22 September 2011; p. 6858. [Google Scholar]
Figure 1. Hydrogen hybrid UAV energy system structure diagram.
Figure 1. Hydrogen hybrid UAV energy system structure diagram.
Algorithms 18 00196 g001
Figure 2. Two-stage stochastic optimization process.
Figure 2. Two-stage stochastic optimization process.
Algorithms 18 00196 g002
Figure 3. Percentage of equipment maintenance costs.
Figure 3. Percentage of equipment maintenance costs.
Algorithms 18 00196 g003
Figure 4. Proportion of unit price per capacity.
Figure 4. Proportion of unit price per capacity.
Algorithms 18 00196 g004
Figure 5. Salvage value of the equipment at the end of its useful life.
Figure 5. Salvage value of the equipment at the end of its useful life.
Algorithms 18 00196 g005
Figure 6. Convergence result graph.
Figure 6. Convergence result graph.
Algorithms 18 00196 g006
Figure 7. Sensitivity analysis of the number of particles.
Figure 7. Sensitivity analysis of the number of particles.
Algorithms 18 00196 g007
Table 1. Objective function parameter settings.
Table 1. Objective function parameter settings.
ParameterValueParameterValueParameterValue
ω10.4K10.2P1500
ω20.6K20.4P22000
k10.1K30.1P3300
k20.9K40.2P4100
k30.5C1500P1,ev50
k40.5C2800P2,ev250
Pf0.0025C320P3,ev50
Nm50C4400P4,ev20
Nmn4Ne4Nu2000
Table 2. Parameter settings of PSO algorithm.
Table 2. Parameter settings of PSO algorithm.
ParameterValue
N50
Max_iteration1000
dim4
lb[0, 0, 0, 0]
ub[5, 10, 100, 12]
Table 3. Capacity configuration results.
Table 3. Capacity configuration results.
DeviceParameter
Fuel cell (Kw)Pmax = 3.367, Pr = 2.525
Lithium battery (kWh)Battery Capacity 7.694
Cooling system (W)Thermal Power 53.128
Hydrogen storage tank (L)V = 9.328
Table 4. Comparison table of PSO and GA algorithms.
Table 4. Comparison table of PSO and GA algorithms.
IndicatorsPSOGA
The optimal lifecycle cost (CNY ten thousand)30.1531.20
Number of iterations143256
Computation time (s)63102
Post-iteration error (%)0.51.2
Number of feasible solutions (%)9892
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.

Share and Cite

MDPI and ACS Style

Li, H.; Wang, C.; Yuan, S.; Zhu, H.; Sun, L. A Capacity Allocation Method for Long-Endurance Hydrogen-Powered Hybrid UAVs Based on Two-Stage Optimization. Algorithms 2025, 18, 196. https://doi.org/10.3390/a18040196

AMA Style

Li H, Wang C, Yuan S, Zhu H, Sun L. A Capacity Allocation Method for Long-Endurance Hydrogen-Powered Hybrid UAVs Based on Two-Stage Optimization. Algorithms. 2025; 18(4):196. https://doi.org/10.3390/a18040196

Chicago/Turabian Style

Li, Haitao, Chenyu Wang, Shufu Yuan, Hui Zhu, and Li Sun. 2025. "A Capacity Allocation Method for Long-Endurance Hydrogen-Powered Hybrid UAVs Based on Two-Stage Optimization" Algorithms 18, no. 4: 196. https://doi.org/10.3390/a18040196

APA Style

Li, H., Wang, C., Yuan, S., Zhu, H., & Sun, L. (2025). A Capacity Allocation Method for Long-Endurance Hydrogen-Powered Hybrid UAVs Based on Two-Stage Optimization. Algorithms, 18(4), 196. https://doi.org/10.3390/a18040196

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop