Fuel cell unmanned aerial vehicle hydrogen supply system based on feedforward and PSO fuzzy PID
By introducing feedforward and PSO fuzzy PID control methods, combined with an improved particle swarm optimization algorithm and a dual feedforward compensation mechanism, the pressure fluctuation problem of the hydrogen supply system of fuel cell UAV under complex flight conditions was solved, achieving efficient hydrogen pressure control and stable operation of the fuel cell, thereby improving the flight performance and endurance of the UAV.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHUZHOU NAT INNOVATION RAILWAY TECH CO LTD
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-21
AI Technical Summary
Existing fuel cell drone hydrogen supply systems suffer from uneven pressure fluctuations at the anode and cathode under complex flight conditions, leading to unstable output voltage, which affects the drone's flight performance and endurance. Furthermore, traditional control strategies lack adaptive capabilities.
A control method based on feedforward and PSO fuzzy PID is adopted, and the parameters of the fuzzy PID controller are optimized by combining an improved particle swarm optimization algorithm. A dual feedforward compensation mechanism is introduced to achieve precise control of hydrogen pressure.
It significantly improves the dynamic response speed and control accuracy of the hydrogen supply system, stabilizes the pressure balance of the anode and cathode, improves the operating efficiency of the fuel cell and the endurance of the drone, and reduces the risk of system oscillation.
Smart Images

Figure CN121905904A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fuel cell drone technology, and more specifically, relates to a hydrogen supply system for fuel cell drones based on feedforward and PSO fuzzy PID. Background Technology
[0002] Fuel cells are a new type of power generation device that converts chemical energy into electrical energy through a chemical reaction. Currently, several types of fuel cells are being researched, including solid oxide fuel cells and proton exchange membrane fuel cells (PEMFCs). Among them, PEMFCs are widely considered one of the most promising power sources for unmanned aerial vehicles (UAVs) due to their high efficiency and pollution-free emissions. However, UAVs often fly at varying altitudes during missions. Drastic changes in atmospheric pressure and oxygen partial pressure can cause fluctuations in the PEMFC cathode inlet pressure, disrupting the dynamic balance of anode and cathode pressures within the stack, leading to unstable output voltage, and ultimately affecting the UAV's flight performance and endurance. Therefore, ensuring the stable operation of proton exchange membrane fuel cells, especially their hydrogen supply system, under complex operating conditions is one of the key technological challenges driving the practical application of fuel cell UAVs, and is of great significance for ensuring the high efficiency and reliable operation of the fuel cell system.
[0003] The PEMFC system consists of several systems, including a hydrogen supply system and an air supply system. The hydrogen supply system is directly responsible for providing hydrogen at the appropriate pressure and flow rate to the stack anodes, and its dynamic response characteristics are crucial to the stack's performance, efficiency, and lifespan. This system typically includes key components such as pressure reducing valves, proportional valves, ejectors, and water separators. The pressure reducing valves reduce the high-pressure hydrogen in the storage tank to the pressure required by the stack; the proportional valves regulate the flow rate of hydrogen entering the stack; the ejectors enable hydrogen circulation and pressurization; and the water separator separates the water carried by the hydrogen at the anode outlet and discharges the separated water from the system using a drain valve.
[0004] Extensive research has been conducted by scholars both domestically and internationally on modeling fuel cell systems, primarily employing mechanistic models, empirical models, and semi-empirical models. In hydrogen system modeling, mechanistic modeling methods have been used to study the characteristics of systems using ejectors for hydrogen circulation. Existing technologies include lumped-parameter mechanistic models for hydrogen systems, providing a theoretical basis for system selection. Other technologies have proposed semi-empirical voltage models that can effectively simulate stack polarization characteristics, but they have limitations in describing fluid dynamics. Current research, especially on modeling key components such as ejectors, is largely based on ideal assumptions. Ejectors mostly employ Sokolov's mechanistic model, leading to discrepancies between simulation results and CFD numerical simulations or experimental data. This indicates that semi-empirical methods are still needed to simplify and correct the models to improve their accuracy and practicality.
[0005] Regarding control strategies, to achieve precise control of hydrogen pressure, most mainstream solutions currently revolve around Model Predictive Control (MPC) and various PID control structures, with the latter exhibiting diverse approaches in practical applications. Existing technologies have proposed a feedforward combined with PI feedback control strategy for hydrogen rail pressure tracking. Furthermore, fuzzy logic has been introduced into this strategy to improve the system's dynamic response characteristics, and a dynamic matrix control strategy can also be used to achieve anode pressure control. However, MPC typically requires linearization of the model when dealing with system nonlinearity, making it difficult to accurately describe the highly nonlinear fluid dynamics exhibited by components such as pressure regulating valves and ejectors. While traditional PID and its combination with fuzzy logic improve adaptability to some extent, their control performance largely depends on expert experience for parameter tuning, and the quantization and proportional factors are usually fixed. Therefore, their adaptive capability and robustness remain insufficient when facing time-varying and nonlinear flight conditions.
[0006] To address the aforementioned issues, this paper aims to establish a more accurate hydrogen supply system model for PEMFC drones and focuses on its pressure stability control under varying high-altitude operating conditions. The innovation of this invention lies in proposing a hydrogen supply system and control method for fuel cell drones based on feedforward and PSO fuzzy PID. This method enhances the system's adaptive adjustment capability against nonlinear dynamics through fuzzy PID; it employs an improved PSO algorithm to globally optimize parameters such as the quantization factor and proportional factor of the fuzzy controller, reducing reliance on expert prior knowledge; and it designs a dual feedforward compensation mechanism to compensate for load current mutations and periodic hydrogen emission disturbances, respectively, to effectively suppress multi-source disturbances and significantly improve the dynamic response speed, control accuracy, and overall robustness of the hydrogen supply system, providing technical support for the reliable application of PEMFC drones in complex environments. Summary of the Invention
[0007] To address the aforementioned technical problems, this invention provides a fuel cell drone hydrogen supply system based on feedforward and PSO fuzzy PID, which solves the problems of large fluctuations in controller output amplitude in the prior art, making it difficult to meet the requirements for safe and efficient operation of the hydrogen supply system, as well as the imbalance of anode and cathode pressure difference fluctuations.
[0008] A fuel cell drone hydrogen supply system based on feedforward and PSO fuzzy PID includes: An improved particle swarm optimization algorithm is used to optimize the parameters of the fuzzy PID controller, and a dual feedforward compensation mechanism is combined to achieve precise control of hydrogen pressure.
[0009] It includes the following three key technical features: The control architecture adopts a composite control architecture of fuzzy PID; this has the advantages of fuzzy control in handling nonlinear and uncertain problems, while retaining the advantages of PID control in terms of simple structure and high reliability.
[0010] The optimization method employs an improved PSO algorithm to globally optimize the key parameters of the fuzzy PID controller, namely the quantization factor, proportional factor, and membership function parameters. This method solves the problems of traditional fuzzy controllers relying on expert experience and having difficulty in parameter tuning, and realizes automated and intelligent parameter optimization.
[0011] The compensation mechanism innovatively introduces a dual feedforward compensation mechanism; the control system not only performs feedback adjustment based on pressure error, but also anticipates factors that may cause disturbances and actively issues control commands, thereby greatly improving the system's response speed and anti-interference capability.
[0012] The improved particle swarm optimization algorithm employs a nonlinear dynamic inertia weight adjustment strategy and an adaptive learning factor adjustment strategy.
[0013] Compared to the linearly decreasing inertia weight used in traditional PSO, the nonlinear dynamic inertia weight adjustment strategy weakens the global search capability in the later stages of iteration and is prone to getting trapped in local optima. The present invention adopts a nonlinear change strategy as shown in equation (1), which enables the algorithm to maintain a strong global exploration capability in the early stage and to carry out fine local development in the later stage, thus balancing the convergence speed and accuracy.
[0014] (1) The and These are the initial and final values of the inertia weight, respectively. To maximize the number of iterations; the adaptive learning factor adjustment strategy assigns "individual experience" (…) to the initial iteration stage through formulas (2) and (3). Greater weight is given to increase population diversity; in the later stages of iteration, "social experience" is enhanced. The weights of the population are used to drive the population toward the optimal solution.
[0015] (2) (3) The , These are the upper and lower limits of the individual learning factor; , These are the upper and lower limits of the group learning factor; the dual feedforward compensation includes load current feedforward compensation and periodic hydrogen emission disturbance feedforward compensation.
[0016] The load current feedforward compensation is directly reflected in the change of load current through the UAV's flight status, such as climb and cruise, and the change of current directly determines the hydrogen reaction consumption rate; this compensation mechanism can adjust the opening of the proportional valve in advance according to the change of current command to compensate for the impending hydrogen consumption, thereby suppressing pressure fluctuations.
[0017] To remove accumulated moisture and impurities from the anode, the system periodically opens the hydrogen venting valve, which causes a momentary drop in anode pressure. The periodic hydrogen venting disturbance feedforward compensation mechanism is linked to the action signal of the hydrogen venting valve. At the same time as the hydrogen venting valve is opened, the proportional valve opening is increased in advance to inject more hydrogen to offset the pressure drop.
[0018] The fuzzy PID controller uses an irregular triangular membership function and contains 49 fuzzy rules.
[0019] The irregular triangle membership function differs from the standard symmetrical triangle membership function. Based on control requirements, this invention uses a wide triangle with a lower slope in the region of large error to smooth control and suppress overshoot; and a narrow triangle with a higher slope in the region of small error to improve control accuracy and sensitivity. This design is specifically optimized for the pressure control process.
[0020] The 49 fuzzy rules are based on the errors (E) and error change rates (EC) of seven fuzzy subsets NB, NM, NS, ZO, PS, PM, and PB, forming a complete rule base of 7x7=49 rules.
[0021] When the error is large, i.e., |E|=PBorPM: when the pressure is much lower or much higher than the target value, the primary goal of control is to eliminate the error as quickly as possible and make the system response quickly approach the set value.
[0022] If the error is positive (PB) and the rate of change of the error is negative (NB), it means that the pressure is far below the target value (E=PB) and the pressure is still decreasing rapidly; EC=NB, the error is increasing in the negative direction, and a very strong control action is needed to "brake" and adjust in the opposite direction.
[0023] THENΔKp=PB: Significantly increases the proportional effect, generating a powerful control force to suppress the pressure drop and cause it to rise again; THENΔKi=NB: Cancel or reduce the integral action to prevent huge integral saturation in the early stage, which would lead to serious overshoot in the later stage of the system; THENΔKd=PS: Add appropriate differential action to suppress oscillations that may be caused by excessive proportional action.
[0024] If the error is positive (PB) and the rate of change of the error is positive (PB), it means that the pressure is far below the target value (E=PB), but the pressure is rising rapidly; EC=PB, the error is decreasing, and a "boost" is needed while preventing overshoot.
[0025] THENΔKp=PS: Simply apply a small scaling gain and go with the flow; THENΔKi=ZO / NS: Maintain or slightly reduce the integral to avoid over-integration; THENΔKd=NB: Reduce the differential action, because the system is developing in a positive direction, and an excessively strong differential will inhibit this positive upward trend.
[0026] When the error is moderate, i.e., |E|=NMorNSorPS: when the pressure is close to the target value, the focus is on a smooth transition, significantly suppressing overshoot, and preparing for entering a steady state.
[0027] If the error is positive (PM) and the rate of change of error is negative (NS): the pressure is still higher than the target value, but the overshoot is slowly decreasing. At this time, careful control is required.
[0028] THENΔKp=NS: Appropriately reduce the proportional effect to make the control action smoother and avoid excessive "braking"; THENΔKi=NM: Apply a negative integral action to actively help eliminate the accumulation of integrals in the positive direction and effectively suppress overshoot; THENΔKd=PM: Increase the differential action because it can anticipate the tendency of overshoot and suppress it in advance.
[0029] When the error is small, i.e., |E|=ZO: when the pressure is very close to the target value, the goal is to finely adjust, eliminate steady-state error, and prevent system oscillation.
[0030] If the error is zero (ZO) and the rate of change of the error is negative (NS): the pressure is almost equal to the target value, but is deviating from it at a slow rate.
[0031] THENΔKp=PS: Apply a small positive proportional force, gently "push" it, and correct a tiny deviation; THENΔKi=PB: This significantly enhances the integral action, which is key to eliminating steady-state error. The integral action accumulates this small error and eventually eliminates it completely. THENΔKd=PM: Maintain a strong differential action to suppress any possible minor oscillations and keep the system stable at the set value.
[0032] The rule base encapsulates expert control experience and is the core of fuzzy reasoning.
[0033] The control system includes a pressure sensor, a current sensor, a microprocessor, and a proportional valve actuator.
[0034] The pressure sensor is used to detect the actual pressure values of the anode and cathode of the fuel cell in real time. Its function is to convert the physical pressure signal into an electrical signal, providing the most critical feedback input for the control system; this is the direct basis for achieving pressure balance control between the anode and cathode.
[0035] The current sensor is used to monitor the load current of the fuel cell stack in real time. Its function is to provide the core input signal for the feedforward compensation mechanism; changes in the load current directly determine the chemical reaction consumption rate of hydrogen and are one of the main sources of pressure fluctuations.
[0036] The microprocessor is the core of the entire control system; its function is to receive signals from pressure and current sensors, embed or run the control algorithm, execute the improved PSO algorithm to tune parameters, run the fuzzy inference engine to calculate according to 49 rules, and integrate feedforward and feedback signals to finally generate the opening command for controlling the proportional valve.
[0037] The function of the proportional valve actuator is to receive control commands from the microprocessor and precisely adjust the opening of the proportional valve, thereby controlling the mass flow rate of hydrogen entering the anode and ultimately achieving precise pressure regulation.
[0038] The following workflow enables the system functionality: First, pressure and current sensors continuously collect the system's pressure and current signals. The microprocessor reads these signals, calculates the current pressure error (E) and error change rate (EC), and calls the optimized fuzzy PID algorithm and feedforward compensation algorithm to calculate the required proportional valve opening control quantity. Then, the microprocessor sends the calculated control quantity to the proportional valve actuator. The proportional valve actuator drives the valve to change the hydrogen supply flow rate, thereby affecting the anode pressure and making it track the target value. Finally, the pressure sensor detects the changed pressure again and sends the new signal back to the microprocessor to start the next control cycle. This cycle repeats to form a closed-loop control.
[0039] To verify the established system model and the proposed control strategy for the hydrogen supply system of a fuel cell UAV based on improved PSO fuzzy PID control, this invention constructs a simulation model of the UAV flight mission and conducts simulation analysis on the dynamic response characteristics of the hydrogen supply system based on this model.
[0040] Meanwhile, a comparison was made between traditional PID and traditional fuzzy PID control; under dynamic load current conditions, the tracking performance of the fuel cell system for the target value was compared when different control strategies were adopted. The load current of the UAV often undergoes a step change under different flight states; at the same time, a certain amount of liquid water is generated during the electrochemical reaction of the fuel cell, which needs to be discharged in a timely manner through a periodic venting process to maintain the stable operation of the system; in the modeling of the control system, load current changes and hydrogen venting operations are jointly regarded as key external disturbances affecting the dynamics of hydrogen pressure.
[0041] The simulation results show that a fuel cell UAV hydrogen supply system and control method based on feedforward and PSO fuzzy PID can effectively suppress the coupling effect of hydrogen emission disturbance and current disturbance on system pressure, and significantly improve the dynamic response performance and overall robustness of the system. Compared with the prior art, the present invention has the following beneficial effects: An improved PSO algorithm is used to globally optimize the quantization factor, proportional factor, and membership function parameters of the fuzzy PID controller, solving the problems of traditional fuzzy PID relying on expert experience and difficult parameter tuning. Combined with an irregular triangular membership function optimized for pressure control (wide triangle for smooth control in large error regions and narrow triangle for improved accuracy in small error regions) and 49 refined fuzzy rules, the hydrogen pressure control accuracy is significantly better than that of traditional PID and ordinary fuzzy PID schemes. It can stably maintain the pressure balance between the anode and cathode and avoid fuel cell reaction efficiency loss due to pressure fluctuations.
[0042] Enhanced dynamic response and anti-interference capabilities are achieved through a dual feedforward compensation mechanism that specifically addresses core disturbance issues in UAVs: Load current feedforward adjusts hydrogen supply in advance based on current changes during flight states such as climb and cruise, offsetting pressure fluctuations caused by reaction consumption; periodic hydrogen venting disturbance feedforward is linked to the hydrogen venting valve to replenish hydrogen in advance, suppressing pressure drops caused by hydrogen venting. Combined with the nonlinear processing advantages of fuzzy PID, the system responds faster and exhibits significantly improved anti-interference capabilities against sudden changes in flight conditions and periodic disturbances, effectively preventing pressure overshoot or drops.
[0043] The improved PSO algorithm, which optimizes operational stability and robustness, ensures optimality and stability of controller parameter tuning through nonlinear dynamic inertial weights (balancing global exploration and local development) and adaptive learning factors (preserving diversity in the early stage of iteration and promoting convergence in the later stage). The 49 rules of fuzzy PID enable fine control under all operating conditions, quickly eliminating errors when they are large, suppressing overshoot when they are moderate, and eliminating steady-state errors when they are small, which greatly reduces the risk of system oscillation and ensures the continuous and stable operation of fuel cells under complex flight conditions.
[0044] The improved system, adapted to the complex operating conditions of drones, eliminates the need for repeated manual parameter adjustments. The improved PSO algorithm enables automated and intelligent parameter optimization, adapting to the flight requirements of different fuel cell models and drones. The dual feedforward mechanism is deeply integrated with the drone's flight status (load current) and system operation and maintenance requirements (periodic hydrogen venting), dynamically matching the hydrogen supply requirements under various operating conditions such as climb and cruise, thus solving the pain point of poor adaptability of traditional systems to the dynamic operating conditions of drones.
[0045] Fuel cell efficiency and drone range improvement: Precise pressure control enables precise matching of hydrogen supply to the fuel cell anode with the stack reaction demand, reducing the problem of incomplete reaction caused by excessive hydrogen waste or insufficient supply, and improving the energy conversion efficiency of the fuel cell; stable operation reduces the loss of the stack caused by pressure fluctuations, extends the stack life, and indirectly increases the single-charge range of the drone.
[0046] The optimized closed-loop control process, combined with multi-sensor collaborative monitoring (real-time feedback of pressure and current signals), enables timely response to anomalies and dynamic adjustments, reducing the risk of failures such as hydrogen leakage and pressure imbalance. The automation of parameter optimization and the refinement of control logic reduce the need for manual intervention, lower system debugging and maintenance costs, and improve the reliability and economy of UAV operations. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating the steps of a hydrogen supply system and control method for a fuel cell drone based on feedforward and PSO fuzzy PID control, according to the present invention.
[0048] Figure 2 This is a structural diagram of the fuel cell system of the present invention.
[0049] Figure 3 This is a system control block diagram of a fuel cell UAV hydrogen supply system and control method based on feedforward and PSO fuzzy PID according to the present invention.
[0050] Figure 4 This is a membership function diagram for the fuzzy PID control of this invention.
[0051] Figure 5 This is a flowchart of the particle swarm optimization algorithm in the hydrogen supply system and control method for fuel cell UAVs based on feedforward and PSO fuzzy PID of the present invention.
[0052] Figure 6 This is a flowchart illustrating the hydrogen supply system for a fuel cell drone based on feedforward and PSO fuzzy PID control, as described in this invention. Figure 7 This is a simulation diagram comparing the output voltage under varying load current in a fuel cell drone hydrogen supply system and control method based on feedforward and PSO fuzzy PID according to the present invention.
[0053] Figure 8 This is a simulation comparison of the hydrogen pressure control effect in a fuel cell UAV hydrogen supply system and control method based on feedforward and PSO fuzzy PID according to the present invention.
[0054] Figure 9 This is a simulation comparison of the anti-disturbance effect of the hydrogen supply system in the fuel cell UAV hydrogen supply system and control method based on feedforward and PSO fuzzy PID of the present invention.
[0055] Figure 10 This is a simulation diagram of the current and hydrogen emission disturbance in a fuel cell UAV hydrogen supply system and control method based on feedforward and PSO fuzzy PID according to the present invention. Detailed Implementation
[0056] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and should not be construed as limiting the scope of the invention.
[0057] like Figure 1 This is a flowchart illustrating the steps of a hydrogen supply system and control method for a fuel cell drone based on feedforward and PSO fuzzy PID control, according to the present invention.
[0058] S1: Construct a model of a proton exchange membrane fuel cell drone hydrogen supply system; S2: Design a fuzzy PID controller based on improved PSO optimization, which automatically tunes the controller parameters through optimization algorithms to avoid relying on expert experience; S3: Introduce a feedforward compensation mechanism to compensate for measurable disturbances such as load current changes and hydrogen discharge valve operation, thereby enhancing the system's anti-disturbance capability; S4: A simulation model of the UAV flight mission was constructed, and the dynamic response characteristics of the hydrogen supply system were simulated and analyzed based on this model.
[0059] Step S1 includes: like Figure 2 This is a structural diagram of the fuel cell system of the present invention.
[0060] A fuel cell system is constructed, comprising a hydrogen supply system and a fuel cell stack, among other main modules. The hydrogen supply system consists of a pressure circulation control module and a hydrogen source module. The pressure circulation control module further comprises key components such as a pressure regulating proportional valve, an ejector, and a water separator. The pressure reducing valve lowers the high-pressure hydrogen in the storage tank to the pressure required by the fuel cell stack. The proportional valve regulates the flow rate of hydrogen entering the stack. The ejector enables hydrogen circulation and pressurization. The water separator separates the water carried by the hydrogen at the anode outlet and discharges the separated water from the system using a drain valve.
[0061] First, the pressure regulating proportional valve is modeled. In the hydrogen supply subsystem, high-pressure hydrogen is stored in cylinders, and its pressure is much higher than the working pressure at the anode inlet of the fuel cell, requiring pressure reduction before use. This pressure reduction process is achieved through a pressure reducing valve, which further processes and controls the reduced-pressure hydrogen according to the stack's requirements. The valve body model can be expressed as the nozzle flow equation: (1) In the above formula (1): and These are the flow coefficient and valve opening of the proportional valve, respectively, with the valve opening ranging from (0,1). The unit of mass flow rate is ; , The input and output pressures of the proportional valve are respectively measured in units of... ; The pressure difference between the inlet and outlet of the proportional valve is in units of ; The standard density of the gas flowing through the valve body is expressed in units of... .
[0062] Ejectors typically use anode-circulating hydrogen as the working fluid to achieve hydrogen recirculation, thereby improving fuel utilization efficiency. Their structural design and internal flow field characteristics directly determine their performance, which aligns with the structural optimization goals of other components in a fuel cell system. The structure mainly consists of an intake chamber, a mixing chamber, a diffuser section, and a drive nozzle. In fuel cell applications, ejectors typically use anode-circulating hydrogen as the working fluid to achieve hydrogen recirculation, thereby improving fuel utilization efficiency. In fuel cell systems, ejectors typically use anode-circulating hydrogen as the drive fluid to achieve hydrogen recirculation and enhance fuel efficiency. Based on computational fluid dynamics simulation data, a mathematical model is constructed, and the ejector nozzle flow equation is: (2) In the above formula (2): The flow coefficient at the ejector drive end; The mass flow rate at the ejector drive end is in units of ; The cross-sectional area of the ejector nozzle is in units of ; pressure ratio The piecewise function, when the pressure ratio When the signal is active, it is in a non-blocking state; otherwise, it is in a blocking state. The expression for this state is as follows: (3) In the above formula (3): The adiabatic coefficient; The molar mass unit for hydrogen is . .
[0063] The mass flow rate of the ejector gas is: (4) set up And a Taylor second-order expansion is used: (5) In equations (4) and (5): The ejection ratio; The total pressure of the gas at the compression end is expressed in Pa. All are fitting coefficients.
[0064] A water separator is modeled to separate large droplets from the outlet gas, preventing droplets from accumulating in the flow channel and causing blockage. It is connected to the outlet of the anode, which in turn connects to a hydrogen discharge valve. This valve discharges liquid water and unreacted gas from the system. The mathematical model integrates multiple equations, including flow balance, mass conservation, energy conservation, and saturated vapor pressure fitting. Based on Bernoulli's equation, its flow equation can be established as follows: (6) In the above formula (6): , The units are the gas pressure inside the water separator and the anode of the fuel cell stack, respectively. ; The unit for the inlet mass flow rate of the water separator is... .
[0065] The mass conservation equation for the water separator is: (7) In the above formula (7): The unit for gas pressure in a water separator is... ; , The units are the mass flow rates of the gas flowing into the water separator and the gas flowing towards the ejector end, respectively. .
[0066] The fuel cell anode is modeled, with the anode flow field responsible for transporting hydrogen and removing byproducts. After the incoming hydrogen reacts with oxygen, excess hydrogen remains unconsumed and mixes with water produced in the reaction, forming a gas-liquid two-phase flow, which then flows out from the anode outlet. Considering that the hydrogen flowing into the anode flow field is pure hydrogen and that the concentrations of water vapor and nitrogen remaining after the reaction are very low, the hydrogen pressure is used to represent the anode gas pressure, specifically as follows: (8) In the above formula (8): The unit for anolyte gas pressure is... ; molar mass of anode gas ; The unit for the flow rate loss in the anodic hydrogen reaction is... ; The temperature of the anode gas is single. ; The unit for anode volume is .
[0067] (9) In the above formula (9): This refers to the number of individual battery cells; This is the load current.
[0068] Modeling fuel cell stacks The voltage loss inside a fuel cell mainly originates from activation polarization, ohmic polarization, and concentration polarization. Its output voltage can be expressed as the thermodynamic electromotive force minus the voltage drop caused by these three types of polarization. That is: (10) Thermodynamic electromotive force is generally expressed by the Nernst equation. The expressions for the Nernst electromotive force and the three types of losses are as follows: (11) (12) (13) (14) In equations (10) to (14): For reference temperature; This is the universal gas constant; , These are the pressures of hydrogen and oxygen, respectively. , These are the cathode gas pressure and the saturated water vapor pressure, respectively. The pressure when the current density is zero It is related to temperature and oxygen partial pressure; This represents the internal resistance of a single cell in a fuel cell stack. The limiting current density; represents the fitting coefficient.
[0069] Step S2 includes: like Figure 3This is a system control block diagram of a fuel cell UAV hydrogen supply system and control method based on feedforward and PSO fuzzy PID.
[0070] This invention proposes an active anode pressure control scheme to address the problem of fuel cell gas pressure fluctuations under dynamic flight conditions. The method is based on an improved particle swarm optimization fuzzy PID feedback and feedforward compensator. Through this series of designs, the anode hydrogen pressure is accurately and adaptively tracked by adjusting the opening of the hydrogen proportional valve, thereby maintaining anode and cathode pressure balance, reducing energy loss, ensuring flight stability, and extending the fuel cell's range.
[0071] The core initial step in fuzzy controller design is fuzzification. This is defined as: transforming the sharp quantities located within the fundamental universe of discourse, i.e., the actual error of the system, into fuzzy components. With error change rate Multiply by the quantization factor respectively , This transforms its scale to the standard fuzzy domain, thus forming the corresponding fuzzy quantity. and This involves mapping actual numerical values to fuzzy subsets and their membership functions. Then, the input fuzzy variables are... and They are divided into 7 fuzzy sets, namely { (Negative) (Negative) (Negative) (zero), (Small size), (middle), (Zhengda)}, and the output fuzzy variables are also divided into 7 fuzzy subsets. Subsequently, based on the system's mathematical model and integrating expert experience, a fuzzy inference system consisting of a rule base of 49 rules is established to accurately describe the input variables. , Same output fuzzy variable , , The mapping relationship between them. Finally, the centroid method is used to defuzzify the fuzzy output to obtain the proportion. ,integral ,differential Correction value , , This allows for the adjustment of PID controller parameters.
[0072] like Figure 4 This is a membership function diagram for the fuzzy PID control of this invention.
[0073] In fuzzy control, common membership function types include normal, Gaussian, and triangular membership functions. Among these, the triangular membership function is used in this invention due to its ease of calculation and high sensitivity. The fuzzy subsets and membership function types used for the input and output are consistent. The design of the membership function must meet the following principles: when the input error is large, a membership function with a lower slope should be selected to improve the system response speed; conversely, when the input error is small, a membership function with a higher slope should be used to suppress overshoot and reduce steady-state error. To balance these requirements, this invention uses an irregular triangular membership function.
[0074] For different control requirements and The dynamic response characteristics must adhere to the following principles: (1) When input error When the value is too large, in order to suppress the system overshoot and ensure system stability, it is necessary to... The value is set too low. At the same time, to effectively speed up the system's response, a larger value can be selected. With appropriate values ; (2) When input When the value is moderate, to avoid large system overshoot, a smaller value of ΔKp should be selected. At the same time, to meet a certain response speed, a moderate value should be selected. and .
[0075] (3) When input When the value is too small, you need to select... and The value of should be relatively large in order to increase the stability of the system while reducing the static error. The fuzzy rules are shown in Table 1.
[0076] Table 1:
[0077] Improved particle swarm optimization algorithm design; although fuzzy PID control can be dynamically adjusted through fuzzy rules. , , While traditional PID controllers can overcome the inability to adaptively tune online, their rules and membership functions rely on expert experience, and the proportion and quantization factor are usually fixed, resulting in insufficient adaptive capability. Therefore, this invention employs a particle swarm optimization (PSO) algorithm to optimize the fuzzy PID system.
[0078] like Figure 7 This is a flowchart of the particle swarm optimization algorithm in the hydrogen supply system and control method for fuel cell UAVs based on feedforward and PSO fuzzy PID of the present invention.
[0079] In traditional particle swarm optimization algorithms, each particle possesses two fundamental attributes: velocity and position. Velocity represents the particle's movement speed in the search space, while position indicates its current coordinates in the solution space. Let the particle swarm size be... The search space dimension is The velocity and position of each particle can then be formally defined as follows: No. The position of each particle: .
[0080] No. The velocity of each particle: .
[0081] In each iteration, each particle records the optimal solution it finds as its individual extreme value. The optimal solution in the entire population is denoted as the global extremum. The subsequent particle velocity and position updates will be based on these two reference values.
[0082] Individual extreme values:
[0083] Global Extrema: .
[0084] The formulas for particle velocity and position are as follows: (15) (16) In equations (15) and (16): Inertial weight; , The learning factor for particles; , Let them be two random variables between 0 and 1.
[0085] Inertia weight This has a significant impact on algorithm optimization. In optimization algorithms, traditional inertia weights are usually adjusted using a linear decreasing strategy, but this method easily leads to insufficient global exploration ability in the later stages of the algorithm, making it difficult to escape local optima. Therefore, this invention designs a nonlinear dynamic inertia weight adjustment strategy to improve the convergence performance and optimization accuracy of the algorithm. The specific formula is as follows: (17) In equation (17): and These are the initial and final values of the inertia weight, respectively. This represents the maximum number of iterations.
[0086] Learning factor and This reflects the particles' self-awareness and social awareness during the search process. In the early stages of algorithm iteration, to enhance population diversity and avoid premature convergence, more emphasis should be placed on the particles' self-awareness experience; therefore, a higher value is assigned to the individual learning factor, while a lower value is assigned to the social learning factor. In the later stages of iteration, to promote convergence towards the global optimum and avoid getting trapped in local optima, it is necessary to strengthen social awareness, thereby increasing the social learning factor and weakening the influence of the individual learning factor, thus reducing its value. This achieves an effective balance between global exploration and local development capabilities. The selected learning factor optimization formula is: (18) (19) In equations (18) and (19): , These are the upper and lower limits of the individual learning factor; , These represent the upper and lower limits of the group learning factor. Step S3 includes: The current feedforward compensator is designed to compensate for changes in hydrogen consumption based on the principle that changes in load current lead to changes in hydrogen consumption. Assuming the load current changes from I1 to I2, the corresponding change in hydrogen consumption is... Therefore, the change in hydrogen consumption caused by the change in load current is: (20) To compensate for this change, the pressure regulating proportional valve needs to be modified. The flow rate of the pressure regulating proportional valve is proportional to its opening degree, and the adjustment is necessary to compensate for this change. It can be represented as: (twenty one) in This is the compensation coefficient.
[0087] The hydrogen discharge feedforward compensator compensates for sudden changes in hydrogen flow caused by the opening and closing of the hydrogen discharge and drain valves, adjusting the proportional valve opening accordingly. When the hydrogen discharge and drain valves are open, the flow rate needs to be increased via the pressure-regulating proportional valve to compensate for this change. (Compensation opening...) It can be represented as: (twenty two) in This is the hydrogen emission compensation coefficient.
[0088] Taking into account the effects of load current changes and the opening and closing of the hydrogen discharge and drainage valves, the total compensation opening of the pressure regulating proportional valve can be expressed as: (twenty three) like Figure 6 This is a flowchart of a hydrogen supply system for a fuel cell drone based on feedforward and PSO fuzzy PID, according to the present invention. The following workflow implements the system functions: First, pressure and current sensors continuously collect the system's pressure and current signals. The microprocessor reads these signals, calculates the current pressure error (E) and error change rate (EC), and calls the optimized fuzzy PID algorithm and feedforward compensation algorithm to calculate the required proportional valve opening control quantity. Then, the microprocessor sends the calculated control quantity to the proportional valve actuator. The proportional valve actuator drives the valve to change the hydrogen supply flow rate, thereby affecting the anode pressure and making it track the target value. Finally, the pressure sensor detects the changed pressure again and sends the new signal back to the microprocessor to start the next control cycle. This cycle repeats to form a closed-loop control.
[0089] Step S4 includes: To verify a fuel cell UAV hydrogen supply system and control method based on feedforward and PSO fuzzy PID, this invention constructs a simulation model of the UAV flight mission and performs simulation analysis on the dynamic response characteristics of the hydrogen supply system based on this model. Simultaneously, it compares traditional PID and traditional fuzzy PID control. Under dynamic load current variation conditions, the paper compares the tracking performance of the fuel cell system for the target value using different control strategies, and the output effects are compared, for example... Figure 5 As shown.
[0090] Simulation results show the output voltage response waveforms of the fuel cell under three different control strategies during load current changes. Traditional PID control exhibits the most significant waveform fluctuations, with the largest voltage drop across the entire current range, demonstrating poor robustness and stability, especially with slow recovery under large load disturbances. Fuzzy PID control outperforms traditional PID, significantly reducing output voltage fluctuations and enhancing stability, indicating that its fuzzy inference rules can more effectively adapt to nonlinear changes in the system, thus providing better control. PSO-fuzzyPID+feedforward control performs best, with the smoothest and most stable output voltage curve, minimal voltage drop under load changes, and rapid recovery to a high and stable level. This demonstrates that the Particle Swarm Optimization (PSO) algorithm successfully searches for the optimal parameter combination of the fuzzy logic controller, achieving optimal dynamic performance and control accuracy, and significantly improving the output quality of the fuel cell system.
[0091] As shown in Figure 7, the response curve of the anode pressure was simulated and the effect of hydrogen pressure tracking control was compared. The tracking effect of the anode pressure under the three control methods is shown in the figure. Initially, the cathode and anode pressures are slightly out of sync, but they quickly maintain a balance. All three control methods can control the anode pressure near the reference value with negligible steady-state error. At t=300s, there is a step change in the load current. The rise time of PSO-fuzzyPID+feedforward control is reduced by 3.7s compared to fuzzyPID control and by 4.7s compared to traditional PID control. The maximum deviation is also much smaller than that of fuzzyPID and traditional PID control, while strictly constraining the maximum deviation to <1%. In the magnified view, it can be seen that the anode pressure follows the change in cathode pressure very well.
[0092] Under the same order of conditions, the anode-cathode pressure difference response curves under different control strategies exhibit significant differences. When using PSO-FuzzyPID + feedforward control, the maximum system pressure difference is approximately 5 kPa; while with FuzzyPID and conventional PID control, the maximum pressure difference reaches 7 kPa and 8 kPa, respectively. The results indicate that the PSO-FuzzyPID plus feedforward control strategy can significantly suppress pressure difference fluctuations, reduce the additional mechanical stress on the proton exchange membrane, and enhance system stability, thereby contributing to extending its service life.
[0093] Figure 8 The results show a comparison of the pressure control effects of various control strategies on the hydrogen supply system under different disturbance conditions. It can be seen that the maximum deviation between PSO-FuzzyPID combined with feedforward control and traditional FuzzyPID is 0.15 × 10⁻⁶. 5 The pressure rise time is significantly lower than that of traditional PID control. In terms of dynamic response, the pressure rise time of PSO-FuzzyPID+feedforward control is 15.9 s, 1.8 s shorter than FuzzyPID, far superior to traditional PID. Furthermore, PSO-FuzzyPID+feedforward control also exhibits better performance in terms of settling time. After the stack stabilizes at t=150 s, applying periodic hydrogen purging disturbances, PSO-FuzzyPID+feedforward control suppresses the pressure fluctuation amplitude to within 0.04 × 10⁻⁴ Pa. 5 Within Pa, it outperforms traditional FuzzyPID and traditional PID control by 0.06×10 5 Pa.
[0094] Figure 9In the current load increase and decrease disturbance experiments shown, the specific operating conditions are: at t=200 s, the current jumps from 30 A to 22 A, and at t=400 s, it jumps from 22 A to 28 A. Simulation results of PSO-FuzzyPID+feedforward control show that the maximum pressure deviation of this method is significantly lower than that of the two traditional control strategies, and the fluctuation amplitude is suppressed to approximately 0.01 × 10⁻⁶. 5 Within Pa, traditional FuzzyPID and traditional PID achieve 0.05 × 10⁻⁶ respectively. 5 Pa and 0.07×10 5 Pa. The control strategy of this invention also has a significant advantage in terms of adjustment time.
[0095] To comprehensively evaluate the anti-interference performance, Figure 10 This further demonstrates the control effect under combined disturbance conditions.
[0096] Simultaneously applying current load increase / decrease disturbances and hydrogen emission disturbances, and applying a combined disturbance at t=20s: the pressure fluctuation amplitude and settling time under PSO-fuzzyPID+feedforward control are significantly smaller than those under traditional FuzzyPID control and traditional PID control. The pressure fluctuation amplitudes of the latter two are as high as approximately 0.13×10⁻⁶. 5 Pa and 0.15×10 5 Pa.
[0097] Applying a composite disturbance at t=400 s: both conventional FuzzyPID control and conventional PID control exhibit significant downward fluctuations in their stress responses, with fluctuation amplitudes and settling times much greater than those of the control strategy of this invention. Simulation results show that the control strategy of this invention effectively suppresses the maximum deviation and shortens the rise time.
[0098] The embodiments of the present invention are given for illustrative and descriptive purposes only, and are not intended to be exhaustive or to limit the invention to the forms disclosed. Many modifications and variations will be apparent to those skilled in the art. The embodiments were chosen and described in order to better illustrate the principles and practical application of the invention, and to enable those skilled in the art to understand the invention and to design various embodiments with various modifications suitable for a particular purpose.
Claims
1. A fuel cell UAV hydrogen supply system based on feedforward and PSO fuzzy PID, characterized in that, include: Pressure sensors are used to detect the actual pressure values of the anode and cathode of the fuel cell in real time; Current sensor, used to monitor the load current of fuel cell stack in real time; The microprocessor, which is equipped with a control algorithm, is used to receive signals from the pressure sensor and the current sensor and generate control commands. The control algorithm is a composite control algorithm that uses an improved particle swarm optimization (PSO) algorithm to globally optimize the parameters of the fuzzy PID controller, and combines load current feedforward compensation with periodic hydrogen emission disturbance feedforward compensation. A proportional valve actuator is used to receive control commands from the microprocessor and adjust the opening of the proportional valve to control the mass flow rate of hydrogen entering the anode.
2. The fuel cell drone hydrogen supply system according to claim 1, characterized in that, The improved PSO algorithm employs a nonlinear dynamic inertia weight adjustment strategy, with the inertia weight adjusted nonlinearly according to the following formula: ; in, and Here, represents the initial and final values of the inertia weights, respectively, and i represents the current iteration number. This represents the maximum number of iterations.
3. The hydrogen supply system for a fuel cell drone according to claim 1, characterized in that, The improved PSO algorithm employs an adaptive learning factor adjustment strategy, with individual learning factors... and group learning factor Adjust according to the following formula: ; ; in, , These are the upper and lower limits of the individual learning factor. , Let T be the upper and lower bounds of the group learning factor, and t be the current iteration number. max This represents the maximum number of iterations.
4. The hydrogen supply system for a fuel cell drone according to claim 1, characterized in that, The load current feedforward compensation calculates the compensation opening of the proportional valve based on the load current change using a compensation coefficient. The calculation formula is: ; in, H2 represents the change in hydrogen consumption flow rate caused by changes in load current. This is the compensation coefficient.
5. The hydrogen supply system for a fuel cell drone according to claim 1, characterized in that, The periodic hydrogen discharge disturbance feedforward compensation calculates the compensation opening degree of the proportional valve using the hydrogen discharge compensation coefficient when the hydrogen discharge valve is open. The calculation formula is: ; in, This is the hydrogen emission compensation coefficient. hpv This is a function related to the hydrogen discharge valve's actuation signal.
6. The hydrogen supply system for a fuel cell drone according to claim 1, characterized in that, The fuzzy PID controller employs an irregular triangular membership function, wherein: in regions with large absolute values of pressure error, a wide triangular membership function with a lower slope is used; and in regions with small absolute values of pressure error, a narrow triangular membership function with a higher slope is used.
7. The hydrogen supply system for a fuel cell drone according to claim 1 or 6, characterized in that, The fuzzy rule base of the fuzzy PID controller is constructed based on the pressure error (E) and the error change rate (EC). The fuzzy subsets of E and EC are both {NB, NM, NS, ZO, PS, PM, PB}, and the total number of rules is 49.
8. The hydrogen supply system for a fuel cell drone according to claim 1, characterized in that, Its control method includes the following steps: S1: Construct a model of a proton exchange membrane fuel cell drone hydrogen supply system; S2: Design a fuzzy PID controller based on improved PSO optimization, which automatically tunes the controller parameters through optimization algorithms to avoid relying on expert experience; S3: Introduce a feedforward compensation mechanism to compensate for measurable disturbances such as load current changes and hydrogen discharge valve operation, thereby enhancing the system's anti-disturbance capability; S4: A simulation model of the UAV flight mission was constructed, and the dynamic response characteristics of the hydrogen supply system were simulated and analyzed based on this model.
9. The hydrogen supply system for a fuel cell drone according to claim 8, characterized in that, The system's verification methods include: Construct a drone flight mission simulation model that includes the fuel cell hydrogen supply system model; In the simulation model, the dynamic changes in load current and the periodic hydrogen discharge disturbance are set as external stimuli. The simulation results of hydrogen pressure tracking performance, dynamic response speed, disturbance rejection capability, and anode-cathode pressure difference stability of the system were compared and analyzed when using traditional PID control, traditional fuzzy PID control, and the control method described above.