A method, device, and storage medium for energy management of a hydrogen fuel cell bus
By improving the sparrow search algorithm and support vector machine model, the equivalent factor of hydrogen fuel cell buses is dynamically adjusted, and the poor control effect caused by changes in driving conditions is solved, the economy and power maintenance capabilities of the whole vehicle are improved, and more efficient energy management is achieved.
Patent Information
- Application Number
- CN202411071807.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-08-06
AI Technical Summary
In the prior art, when the driving conditions of hydrogen fuel cell buses change, the equivalent consumption strategy fails to adjust the equivalent factor in time, affecting the control effect and the economy of the whole vehicle.
By improving the sparrow search algorithm and support vector machine model, the optimal equivalent factors of various driving conditions types are obtained, parameter updates are updated in combination with the current working conditions data, and energy management strategies are optimized, including population initialization, location updates of discoverers and eaters and position disturbances, improving identification accuracy and control performance.
It realizes dynamic adjustment of equivalent factors according to driving conditions, improves the vehicle economy and power maintenance capabilities of hydrogen fuel cell buses, avoids dependence on developer experience, and improves control reliability and identification accuracy.
Smart Images

Figure CN119116786B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hydrogen fuel cell bus applications, and more particularly to an energy management method, device, and storage medium for a hydrogen fuel cell bus. Background Art
[0002] The energy management strategy plays a key role in improving the overall vehicle performance and economy of hydrogen fuel cell buses and extending the life of fuel cells. Developing an effective energy management strategy can reasonably coordinate the power distribution among various energy sources in a hydrogen fuel cell bus, ensuring a stable power output from the hybrid power system of the hydrogen fuel cell bus under load conditions.
[0003] Currently, the most mainstream instantaneous optimization strategy is the Equivalent Consumption Minimization Strategy (ECMS), which can achieve approximately global-optimal power distribution in real-time applications. The equivalent factor, as the core parameter of the equivalent consumption minimization strategy, can be understood as the conversion factor between the electric energy of the power battery and the hydrogen consumption of the fuel cell, and its value is closely related to the final performance achieved by the equivalent consumption minimization strategy during application. In the actual driving process of a hydrogen fuel cell bus, the type of driving conditions changes, but the value of the equivalent factor fails to be adjusted accordingly with the change in the type of driving conditions, which will affect the control effect of the equivalent consumption minimization strategy on the hydrogen fuel cell bus, and further affect the power maintenance state and overall vehicle economy of the hydrogen fuel cell bus. Summary of the Invention
[0004] The present invention provides an energy management method, device, and storage medium for a hydrogen fuel cell bus to solve one or more technical problems existing in the prior art, and at least provide a beneficial choice or create conditions.
[0005] In a first aspect, an energy management method for a hydrogen fuel cell bus is provided, the method comprising:
[0006] Obtaining a plurality of optimal equivalent factors corresponding to a plurality of different driving condition types, the plurality of optimal equivalent factors being obtained by using an improved sparrow search algorithm to optimize the equivalent factor included in the equivalent consumption minimization strategy according to a pre-constructed hybrid power system model of a hydrogen fuel cell bus and a plurality of typical condition databases corresponding to the hydrogen fuel cell bus under the plurality of different driving condition types;
[0007] Obtaining the current condition data of the hydrogen fuel cell bus, and performing dimensionality reduction on the current condition data to obtain key condition data;
[0008] Input the key data of the working conditions into the trained working condition recognition model to obtain the current driving working condition type of the hydrogen fuel cell bus;
[0009] Obtain the optimal equivalent factor matching the current driving working condition type from the multiple optimal equivalent factors to update the parameters of the equivalent consumption minimum strategy;
[0010] According to the hybrid power system model and the current working condition data, use the equivalent consumption minimum strategy with updated parameters to perform energy management on the hydrogen fuel cell bus.
[0011] Furthermore, in the improved sparrow search algorithm, it is set to initialize the position of the sparrow population using Tent chaotic mapping and Sobol sequence, and in each iterative update process of the sparrow population, a non-linear inertia weight is introduced to update the position of the sparrow individuals acting as discoverers, and the Lévy flight strategy is used to update the position of the sparrow individuals acting as freeloaders. And after updating the position of each sparrow, a dynamic probability factor is generated according to the current iteration number and the final iteration number. When the dynamic probability factor is less than a random number, an adaptive t-distribution mutation operator is used to perturb the position of each sparrow.
[0012] Furthermore, each typical working condition database contains multiple groups of numerical values, and each group of numerical values contains historical numerical values of several driving characteristic parameters; the current working condition data contains the current numerical values of the several driving characteristic parameters.
[0013] Furthermore, the multiple optimal equivalent factors corresponding to the multiple different driving working condition types are obtained through the following method:
[0014] Take the equivalent hydrogen consumption of the hybrid power system of the hydrogen fuel cell bus as the first fitness function, take the equivalent factor included in the equivalent consumption minimum strategy as the first target variable, and the first fitness function includes the first target variable;
[0015] For any driving working condition type, input the multiple groups of numerical values included in the typical working condition database corresponding to the driving working condition type into the hybrid power system model for simulation operation to obtain corresponding multiple groups of system parameter values, and each group of system parameter values includes the relevant parameter values involved in the first fitness function;
[0016] Combined with the multiple groups of system parameter values and the first fitness function, use the improved sparrow search algorithm to optimize the first target variable to obtain the optimal equivalent factor corresponding to the driving working condition type.
[0017] Furthermore, the working condition recognition model is constructed based on the support vector machine model, and it is trained through the following method:
[0018] Take the recognition accuracy of the support vector machine model for driving condition types as the second fitness function, and take the penalty factor and kernel function density included in the support vector machine model as the second objective variables;
[0019] Reduce the dimension of the multiple typical condition databases to obtain corresponding multiple key condition databases;
[0020] Use the multiple key condition databases to train the support vector machine model, and use the improved sparrow search algorithm to optimize the second objective variables to obtain a trained condition recognition model.
[0021] Further, the reducing the dimension of the multiple typical condition databases to obtain corresponding multiple key condition databases includes:
[0022] Use the correlation coefficient method and the principal component analysis method to analyze the multiple typical condition databases to extract multiple key driving characteristic parameters from the several driving characteristic parameters;
[0023] For any one of the typical condition databases, perform parameter screening on the typical condition database, and only retain the historical values of the multiple driving characteristic parameters to obtain a key condition database.
[0024] Further, the reducing the dimension of the current condition data to obtain key condition data includes:
[0025] Perform parameter screening on the current condition data, and only retain the current values of the multiple driving characteristic parameters to obtain key condition data.
[0026] Further, the hybrid power system of the hydrogen fuel cell bus includes a fuel cell and a power battery; the performing energy management on the hydrogen fuel cell bus according to the hybrid power system model and the current condition data by using the equivalent consumption minimum strategy with updated parameters includes:
[0027] Input the current condition data into the hybrid power system model for simulation operation to obtain the current system demand power and the current state of charge (SOC) value of the power battery;
[0028] Use the equivalent consumption minimum strategy with updated parameters to analyze the current system demand power and the current SOC value of the power battery to obtain the first optimal output power of the fuel cell and the second optimal output power of the power battery;
[0029] Control the fuel cell to operate at the first optimal output power, and control the power battery to operate at the second optimal output power.
[0030] In a second aspect, a computer device is provided, including a memory and a processor. A computer program is stored on the memory, and the processor executes the computer program to implement the energy management method for a hydrogen fuel cell bus as described in the first aspect.
[0031] In a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the energy management method for a hydrogen fuel cell bus as described in the first aspect is implemented.
[0032] The present invention has at least the following beneficial effects: By setting more matching optimal equivalent factors in advance for each type of driving condition, a more targeted equivalent consumption minimum strategy can be quickly formulated when determining the type of driving condition in which the hydrogen fuel cell bus is currently located, so as to more efficiently and reliably implement the energy management of the hydrogen fuel cell bus, improve the overall vehicle economy of the hydrogen fuel cell bus, and enable the hydrogen fuel cell bus to maintain the power maintenance mode as much as possible. By proposing improvements to the population initialization strategy, discoverer position update strategy, and follower position update strategy on the basis of the original sparrow search algorithm, and introducing a position perturbation strategy in the population iterative update process, the improved sparrow search algorithm can have a more reliable parameter optimization ability. When the improved sparrow search algorithm is applied to solve the optimization problem of the equivalent factor included in the equivalent consumption minimum strategy, the selection of the equivalent factor can be avoided from completely depending on the experience of developers. When the improved sparrow search algorithm is applied to solve the optimization problem of the kernel function density and penalty factor included in the support vector machine model, the recognition accuracy of the driving condition recognition model can be improved. Description of the Drawings
[0033] The drawings are used to provide a further understanding of the technical solutions of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation to the technical solutions of the present invention.
[0034] Figure 1 It is a structural composition diagram of the hybrid power system of the hydrogen fuel cell bus in the embodiment of the present invention;
[0035] Figure 2 It is a schematic diagram of the vehicle speed following effect achieved when the hydrogen fuel cell bus in the embodiment of the present invention is controlled by the equivalent consumption minimum strategy constrained by the same equivalent factor under different driving condition types;
[0036] Figure 3 It is a schematic diagram of the relevant effects achieved when the hydrogen fuel cell bus in the embodiment of the present invention is controlled by the equivalent consumption minimum strategy under low-speed conditions;
[0037] Figure 4It is a schematic diagram of relevant effects achieved when the hydrogen fuel cell bus in the embodiment of the present invention is controlled by the equivalent consumption minimization strategy under medium-speed working conditions;
[0038] Figure 5 It is a schematic diagram of relevant effects achieved when the hydrogen fuel cell bus in the embodiment of the present invention is controlled by the equivalent consumption minimization strategy under high-speed working conditions;
[0039] Figure 6 It is a schematic flowchart of an energy management method for a hydrogen fuel cell bus in the embodiment of the present invention;
[0040] Figure 7 It is a schematic diagram of the hardware structure of the computer device in the embodiment of the present invention. Specific embodiments
[0041] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0042] It should be noted that although functional module division is performed in the system schematic diagram and the logical sequence is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order from the module division in the system or the sequence in the flowchart. The terms "first", "second", "third", "fourth", etc. in the specification of the present application and the above-mentioned accompanying drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily need to be limited to those clearly listed steps or units, but may include other steps or units inherent to these processes, methods, products or devices that are not clearly listed.
[0043] First, the equivalent consumption minimization strategy applied in the present invention is described as follows:
[0044] The equivalent consumption minimization strategy is an energy management control strategy for real-time application proposed based on the Pontryagin minimum principle, which can solve the instantaneous optimal power distribution problem of the hybrid power system of a hydrogen fuel cell bus under constrained conditions.
[0045] Among them, the hybrid power system of a hydrogen fuel cell bus at least includes a fuel cell module, a power battery module and a motor module. See Figure 1As shown, the fuel cell module includes a fuel cell and a Boost-type DC-DC converter, the power battery module includes a power battery and a Buck-Boost-type DC-DC converter, the motor module includes a motor controller and a drive motor. The fuel cell is connected to the motor controller through the Boost-type DC-DC converter, the power battery is connected to the motor controller through the Buck-Boost-type DC-DC converter, the motor controller is connected to the drive motor, and the power battery preferably uses a lithium-ion battery.
[0046] Apply the equivalent consumption minimum strategy to the hybrid power system of a hydrogen fuel cell bus. Taking the system equivalent hydrogen consumption (i.e., the sum of the hydrogen consumption of the fuel cell and the equivalent hydrogen consumption of the power battery) as the performance index, the implementation goal is to minimize the instantaneous equivalent hydrogen consumption of the system.
[0047] When using the equivalent consumption minimum strategy to solve the instantaneous optimal power distribution problem of the hybrid power system of a hydrogen fuel cell bus, clarify the balance relationship among the system required power, the output power of the fuel cell, and the output power of the power battery as follows:
[0048] P fc (t)η DC1 +P bat (t)η DC2 =P req (t) (1)
[0049] In the formula, P fc (t) is the output power of the fuel cell, Pbat(t) is the output power of the power battery, P req (t) is the system required power, η DC1 is the efficiency of the Boost-type DC-DC converter, η DC2 is the efficiency of the Buck-Boost-type DC-DC converter;
[0050] Taking the output power P fc (t) of the fuel cell as the control variable and the equivalent hydrogen consumption of the hybrid power system of the hydrogen fuel cell bus as the performance index, establish the following relevant expressions for characterizing the instantaneous power distribution problem of the hybrid power system of the hydrogen fuel cell bus:
[0051]
[0052] In the formula, J is the performance index, t0 is the starting time of the operation of the hydrogen fuel cell bus, t f is the ending time of the operation of the hydrogen fuel cell bus, is the equivalent hydrogen consumption of the hybrid power system of the hydrogen fuel cell bus at the current moment, which can also be understood as the instantaneous equivalent hydrogen consumption;
[0053] By introducing the equivalent factor and the Hamilton function, the following related expressions for characterizing the instantaneous equivalent hydrogen consumption of the hybrid power system of a hydrogen fuel cell bus are established:
[0054]
[0055] In the formula, H represents the Hamilton function, is the instantaneous state of charge (SOC) value of the power battery, t is time, is the instantaneous hydrogen consumption of the fuel cell, is the instantaneous equivalent hydrogen consumption of the power battery, η fc is the efficiency of the fuel cell, Q LHV is the lower heating value of hydrogen, preferably set to 120 MJ / kg, and s(t) is the equivalent factor;
[0056] In the present invention, the hydrogen fuel cell bus is set to the charge-sustaining mode. Without considering mid-course charging of the power battery, for the problem of the change in the SOC value of the power battery, the above formula (3) is corrected by using a penalty function to obtain:
[0057]
[0058] In the formula, ω(SOC) is the penalty function, SOC target is the target SOC value of the power battery that can enable the hydrogen fuel cell bus to maintain the charge-sustaining mode, SOC min is the lower limit value of the SOC value of the power battery, SOC max is the upper limit value of the SOC value of the power battery, and α is the exponential coefficient;
[0059] By solving the above formula (4), when the minimum instantaneous equivalent hydrogen consumption of the hybrid power system of the hydrogen fuel cell bus is solved, the output power P fc (t) of the fuel cell and the optimal allocation result of the output power P bat (t) of the power battery can be obtained.
[0060] Regarding the case where the hydrogen fuel cell bus is in different driving condition types, the control effect analysis and comparison when using the same equivalent factor for energy management of the hydrogen fuel cell bus for the minimum equivalent consumption control strategy are described as follows:
[0061] The simulation test was conducted using the non-city bus operating conditions (i.e., CHTC-C) included in the CHTC (China Heavy-duty Commercial Vehicle Test Cycle). CHTC-C includes low-speed operating conditions, medium-speed operating conditions, and high-speed operating conditions. When the initial power battery SOC value was 0.4, the simulation cycle time was set to 3000 seconds after combining various operating conditions according to multiple cycles.
[0062] The equivalent factor used in various working conditions is set to 1.52, and then the equivalent consumption minimum strategy with the set equivalent factor is used to simulate the control of the hydrogen fuel cell bus. The relevant simulation results are explained:
[0063] See also Figure 2 As shown, it can be seen that the hydrogen fuel cell bus has good speed following performance under different driving conditions.
[0064] See also Figure 3 As shown, it can be seen that the system power demand of hydrogen fuel cell buses under low-speed conditions is not high, and the equivalent consumption minimum strategy tends to allow the power battery and fuel cell to be turned on together to meet the system power demand, and the power battery SOC value is maintained at around 0.4, that is, the equivalent consumption minimum strategy allows the hydrogen fuel cell bus to maintain the power maintenance mode under low-speed conditions, avoiding the power battery SOC value from falling into an unsuitable working range after further decline;
[0065] See also Figure 4 As shown in the figure, the system power demand of hydrogen fuel cell buses under medium speed conditions increases, and the equivalent consumption minimum strategy tends to only turn on the fuel cell in the early stage to meet the system power demand, until the power battery SOC value drops to about 0.32 and then the power position mode is turned on. That is, the equivalent consumption minimum strategy fails to keep the hydrogen fuel cell bus in the power maintenance mode and the power battery SOC value decreases.
[0066] See also Figure 5 As shown in the figure, when the power demand of the power battery is large, the equivalent consumption minimum strategy should control the power battery and the fuel cell to be turned on together to meet the power demand of the system, so that the output power of the fuel cell is slightly increased compared with that under low-speed and medium-speed conditions. However, at this time, the equivalent consumption minimum strategy is still more inclined to only turn on the power battery to meet the power demand of the system, so that the power battery SOC value is reduced from 0.4 to the range of [0.296, 0.34]. That is, the equivalent consumption minimum strategy cannot keep the hydrogen fuel cell bus in the power maintenance mode.
[0067] It can be seen that the equivalent consumption minimum strategy with the same equivalent factor cannot achieve the same good control effect on hydrogen fuel cell buses under different driving conditions, and cannot keep the hydrogen fuel cell bus in the power maintenance mode all the time. Therefore, considering the situation that the driving condition type of the hydrogen fuel cell bus will change during actual driving, the present invention proposes to adaptively adjust the equivalent factor required in the equivalent consumption minimum strategy according to the current driving condition of the hydrogen fuel cell bus, so as to improve the control performance of the equivalent consumption minimum strategy for the hydrogen fuel cell bus.
[0068] Please refer to Figure 6 , Figure 6 is a schematic flow chart of an energy management method for a hydrogen fuel cell bus provided by an embodiment of the present invention. The method includes the following:
[0069] Step S110: Obtain multiple optimal equivalent factors corresponding to multiple different driving condition types;
[0070] Among them, the multiple optimal equivalent factors are obtained by using an improved sparrow search algorithm to optimize the equivalent factors included in the equivalent consumption minimum strategy according to a pre-constructed hybrid power system model of the hydrogen fuel cell bus and multiple typical working condition databases corresponding to the hydrogen fuel cell bus under multiple different driving condition types;
[0071] Step S120: Obtain the current working condition data of the hydrogen fuel cell bus, and reduce the dimension of the current working condition data to obtain key working condition data;
[0072] Step S130: Input the key working condition data into the trained working condition recognition model to obtain the current driving condition type of the hydrogen fuel cell bus;
[0073] Step S140: Obtain the optimal equivalent factor matching the current driving condition type from the multiple optimal equivalent factors to update the parameters of the equivalent consumption minimum strategy;
[0074] Step S150: According to the hybrid power system model and the current working condition data, use the equivalent consumption minimum strategy with updated parameters to manage the energy of the hydrogen fuel cell bus.
[0075] In some embodiments, the improved sparrow search algorithm mentioned in the above step S110 is obtained by improving the original sparrow search algorithm (SSA, Sparrow Search Algorithm). It draws on the foraging behavior law of sparrows in nature to solve optimization problems, and mainly proposes the following three improvements:
[0076] First, the original sparrow search algorithm uses a random method to generate the initial positions of the sparrow population, resulting in an uneven distribution of the sparrow population in the entire solution space, which may greatly limit the global optimization ability of the algorithm. To enhance the search ability of the algorithm in the early iteration stage and the probability of finally finding a higher-quality solution, the present invention chooses to use the Sobol sequence and Tent chaotic mapping to initialize the positions of the sparrow population. The corresponding mathematical expressions are as follows:
[0077]
[0078] In the formula, w i is the chaotic sequence related to the initialization of the position of the i-th sparrow, w n is the chaotic domain and satisfies w n ∈(0,1), α0 is the Tent parameter and is preferably set to 0.5, x i is the initial position of the i-th sparrow, x lb is the upper bound of the search space where the sparrow population is located, x ub is the lower bound of the search space where the sparrow population is located.
[0079] Tent chaotic mapping is often used as a randomization tool under the optimization algorithm framework to generate the initial population to overcome the possible limitations of the conventional random method. The initial solution distribution generated by using Tent chaotic mapping has stronger global coverage characteristics, enabling the population to explore the solution space more comprehensively. If Tent chaotic mapping is used alone to initialize the sparrow population, it can improve the problem that the algorithm is prone to falling into local optimum to a certain extent, but there are still problems in terms of randomness and correlation of adjacent points. Therefore, the Sobol sequence is used to reasonably select the sampling direction, so that the sampling points can fill the search space more evenly and efficiently. Here, Tent chaotic mapping is applied to the search space to replace the random numbers generated in the Sobol sequence.
[0080] Second, the individuals in the sparrow population are usually divided into three roles: discoverers, freeloaders, and guardians. Here, the position update strategies of the discoverers and freeloaders are mainly improved, and the position update strategy of the guardians remains unchanged. The specific description is as follows:
[0081] (1) The discoverer is mainly responsible for leading other sparrows in the population to actively explore new areas and obtaining more food by guiding the population to move in a suitable direction. In the proposed position update strategy for the discoverer in the improved sparrow search algorithm, considering that the choice of the search step size has a great impact on the performance of the algorithm. If the step size is too large, the algorithm may jump too much in the solution space and miss high-quality solutions. If the step size is too small, the algorithm may fall into a local optimal solution. The present invention proposes that in each iterative update process of the sparrow population, a non-linear inertia weight is used to control the search range when updating the position of the discoverer. The following mathematical expression is used to update the position of the sparrow individual acting as the discoverer:
[0082]
[0083] In the formula, is the position of the i-th sparrow after the (k + 1)-th iterative update, is the position of the i-th sparrow after the k-th iterative update, φ is the non-linear inertia weight, Q is a random number under the normal distribution, L is a matrix with all elements being 1, R2 is a preset safety warning value and its value range is preferably set as [0, 1], ST is the search step size (i.e., the amplitude of the discoverer moving in the search space) and its value range is preferably set as [0.5, 1]. When R2 < ST, it indicates that no danger is found around the sparrow population, and the discoverer can expand the range of searching for food. When R2 ≥ ST, it indicates that the guardians in the sparrow population issue a warning, and all sparrow individuals need to immediately move closer to the safe area. k max is the maximum number of iterations set by the algorithm, and k is the current number of iterations.
[0084] (2) The freeloader is mainly responsible for observing and following the sparrow individuals that find food sources among the discoverers to the same location to forage, and improving its own optimal solution by performing local search near the known high-quality solutions. In the proposed position update strategy for the freeloader in the improved sparrow search algorithm, considering that the Lévy flight strategy, as a commonly used random walk strategy in search algorithms, has the characteristics of a step size distribution with a large number of small step sizes and a small number of large step sizes as well as the long-distance search characteristics. The present invention proposes that in each iterative update process of the sparrow population, the position of the sparrow individual acting as the freeloader is updated through the Lévy flight strategy, and the corresponding mathematical expression is as follows:
[0085]
[0086] Where: σ v = 1,
[0087] In the formula, It is the position of the sparrow individual with the worst fitness value in the sparrow population after the k-th iteration update. It is the position of the sparrow individual with the best fitness value among all sparrow individuals acting as discoverers after the (k + 1)-th iteration update. Levy(d) is the path obeying the Levy distribution, n is the number of individuals in the sparrow population. When i > n / 2, it means that the freeloaders have not found food and need to fly elsewhere to look for food. When i ≤ n / 2, it means that the freeloaders can randomly select a place around the current best position to forage. It is the dot product operator, γ is the shape parameter of the jump probability distribution, and θ is a random number conforming to the normal distribution within σ u range, ω is a random number conforming to the normal distribution within σ v range, and Γ is the Gamma function.
[0088] By introducing the Levy flight strategy into the position update strategy of the freeloaders, it can better enable most freeloaders to continuously search around the discoverers while a small number of freeloaders search in a relatively far search space, effectively preventing the algorithm from falling into local optimum and helping to improve the running efficiency of the algorithm and accelerate the convergence speed of the algorithm.
[0089] (3) Guardians are mainly responsible for monitoring the foraging environment. Once they detect danger, they will emit a chirping sound to achieve the early warning function, and immediately guide the population to other safe positions to look for food again when the chirping sound is greater than the safety threshold. The present invention proposes to update the positions of the sparrow individuals acting as guardians through the following mathematical expression during each iteration update of the sparrow population:
[0090]
[0091] In the formula, x' best is the global optimal position in the sparrow population after the k-th iteration update, x' worst is the global worst position in the sparrow population after the k-th iteration update, β is the control step size and it obeys the normal distribution, K is a random number generated within the interval [0, 1], f i is the fitness value calculated after the i-th sparrow completes the k-th iteration update, f w is the optimal fitness value calculated after the sparrow population completes the k-th iteration update, f g is the worst fitness value calculated after the sparrow population completes the k-th iteration update, and ε is a parameter used to control that the denominator is not zero and its value is relatively small.
[0092] Thirdly, in each iteration update process of the sparrow population of the present invention, when the position update of each sparrow is completed, in order to reduce the computational amount to improve the algorithm operation speed, a dynamic probability factor is introduced to judge whether it is necessary to use the adaptive t-distribution mutation operator to uniformly perturb the position of each sparrow to achieve a dynamic balance between global search and local search. The dynamic probability factor is generated according to the current iteration number and the maximum iteration number set by the algorithm. The mathematical expression adopted in this implementation process is as follows:
[0093]
[0094] In the formula, represents the position of the i-th sparrow after perturbation after the (k + 1)-th iteration update, t(M) is the t-distribution with the current iteration number as the degree-of-freedom parameter, p is the dynamic probability factor, rand is a random number generated in the interval [0, 1], w1 is the upper limit value of the dynamic probability factor p and is preferably set to 0.6, and w2 is the change amplitude of the dynamic probability factor p and is preferably set to 0.1.
[0095] In some embodiments, the various different driving condition types mentioned in the above step S110 include congested conditions, unobstructed conditions, and highway conditions, which are specifically described as follows:
[0096] (1) The congested condition refers to the situation where the hydrogen fuel cell bus encounters heavy traffic and many pedestrians when driving on urban roads. At this time, the hydrogen fuel cell bus frequently starts, stops, drives slowly, or accelerates over short distances, and the average vehicle speed is relatively low, generally less than 45 km / h;
[0097] (2) The unobstructed condition refers to the situation where the hydrogen fuel cell bus encounters light traffic and few pedestrians when driving on urban roads. At this time, the hydrogen fuel cell bus can drive relatively continuously, smoothly, and at a relatively high speed, and the number of starts, stops, accelerations, and decelerations is significantly less, and the average vehicle speed is relatively high, generally greater than 45 km / h but less than 70 km / h;
[0098] (3) The highway condition refers to the situation where the hydrogen fuel cell bus continuously drives on the highway. At this time, the hydrogen fuel cell bus keeps driving continuously at a speed close to or reaching the maximum speed limit, and the number of starts, stops, accelerations, and decelerations is minimized, and the average vehicle speed is the highest, generally greater than 70 km / h.
[0099] In some embodiments, the typical working condition database corresponding to each driving condition type of the hydrogen fuel cell bus contains multiple sets of numerical values, and each set of numerical values contains historical numerical values of several driving characteristic parameters. Similarly, the current working condition data of the hydrogen fuel cell bus contains current numerical values of several driving characteristic parameters. Among them, the several driving characteristic parameters include average vehicle speed, maximum vehicle speed, speed standard deviation, maximum positive acceleration, average positive acceleration, positive acceleration standard deviation, the proportion of driving time corresponding to the positive acceleration in the interval [0, 1] to the total driving time, the proportion of driving time corresponding to the positive acceleration in the interval (1, 3] to the total driving time, the proportion of driving time corresponding to the positive acceleration in the interval (3, +∞) to the total driving time, maximum negative acceleration, average negative acceleration, negative acceleration standard deviation, the proportion of driving time corresponding to the negative acceleration in the interval (-1, 0] to the total driving time, the proportion of driving time corresponding to the negative acceleration in the interval (-1.5, -1] to the total driving time, the proportion of driving time corresponding to the negative acceleration in the interval (-∞, -1.5] to the total driving time, driving distance, total number of stops, average number of stops per kilometer, and idle time ratio.
[0100] In some embodiments, the process of obtaining multiple optimal equivalent factors corresponding to the multiple different driving condition types mentioned in the above step S110 is specifically as follows:
[0101] Step S111: Take the equivalent hydrogen consumption of the hybrid power system of the hydrogen fuel cell bus as the first fitness function to be applied in the improved sparrow search algorithm, that is, the above formula (4), and take the equivalent factor involved in the equivalent consumption minimum strategy as the first objective variable to be optimized by the improved sparrow search algorithm;
[0102] Step S112: For any one driving condition type, take the multiple sets of numerical values included in the typical working condition database corresponding to the hydrogen fuel cell bus under this driving condition type as input parameters, and control the hybrid power system model of the hydrogen fuel cell bus built in the Matlab / Simulink environment to perform simulation operations to output corresponding multiple sets of system parameter values, where each set of system parameter values includes relevant parameter values such as the output power of the fuel cell, the output power of the power battery, and the SOC value of the power battery involved in the first fitness function;
[0103] Step S113: Combine the first fitness function and the multiple sets of system parameter values corresponding to this driving condition type, and perform iterative optimization on the first objective variable through the improved sparrow search algorithm to obtain the optimal equivalent factor corresponding to this driving condition type.
[0104] More specifically, the implementation process of the above step S113 includes but is not limited to the following:
[0105] Step S113.1: Set the basic parameters required for the improved sparrow search algorithm, including the maximum number of iterations, the sparrow population size, the proportion of discoverers, the proportion of freeloaders, and the proportion of guardians.
[0106] Step S113.2: Initialize the sparrow population, that is, initialize the position of each sparrow through the above formula (5) and the above formula (6).
[0107] Step S113.3: Combine the first fitness function and multiple groups of system parameter values corresponding to this driving condition type, calculate the initial fitness value corresponding to each sparrow in the sparrow population and sort them, obtain the initial optimal sparrow individual and record it as the population optimal individual, and obtain the initial fitness value corresponding to this initial optimal sparrow individual and record it as the population optimal fitness value.
[0108] Step S113.4: Start the k-th iteration update. First, divide the sparrow population into a discoverer group, a freeloader group, and a guardian group according to the current fitness value corresponding to each sparrow in the sparrow population determined after the (k - 1)-th iteration update. Then, update the positions of the discoverer group through the above formula (7) and the above formula (8), update the positions of the freeloader group through the above formula (9) and the above formula (10), and update the positions of the guardian group through the above formula (11). And after completing the position update of the sparrow population, perform position perturbation on the sparrow population through the above formula (12) and the above formula (13).
[0109] Step S113.5: Combine the first fitness function and multiple groups of system parameter values corresponding to this driving condition type, calculate the current fitness value corresponding to each sparrow in the sparrow population and sort them, obtain the current optimal sparrow individual and record it as the first optimal sparrow individual, and obtain the current fitness value corresponding to this current optimal sparrow individual and record it as the first current fitness value.
[0110] Step S113.6: Obtain the population optimal fitness value determined after the (k - 1)-th iteration update and compare it with this first current fitness value: when the population optimal fitness value is less than or equal to this first current fitness value, use the population optimal individual determined after the (k - 1)-th iteration update as the population optimal individual determined after the k-th iteration update; when the population optimal fitness value is greater than this first current fitness value, use this first optimal sparrow individual as the population optimal individual determined after the k-th iteration update.
[0111] Step S113.7: Determine whether the current iteration number k reaches the maximum iteration number. If so, output the position of the population-optimal individual determined after the k-th iteration update as the optimal solution of the first objective variable. If not, assign k + 1 to k, and then return to execute the above Step S113.4;
[0112] It should be noted that the above Step S113.4 starts from k = 1.
[0113] In some embodiments, the working condition recognition model mentioned in the above Step S130 is constructed based on the existing support vector machine model (SVM, Support Vector Machines). The support vector machine model solves the classification problem of non-linear feature data based on statistical theory. Whether it can achieve a good classification effect is mainly affected by two key parameters, namely, the kernel function density and the penalty factor. When the kernel function density is smaller, the number of support vectors is more and the problem of model overfitting is likely to occur. When the kernel function density is larger, it is difficult to distinguish different types of non-linear feature data. And when the penalty factor is too large or too small, the generalization ability of the model is likely to become poor. Therefore, considering the need to optimize the kernel function density and the penalty factor, the working condition recognition model is trained, and the corresponding implementation process is as follows:
[0114] Step A1: Take the recognition accuracy of the support vector machine model for the driving condition type as the second fitness function required for the improved sparrow search algorithm, and take the kernel function density and the penalty factor involved in the support vector machine model as the second objective variables to be optimized by the improved sparrow search algorithm;
[0115] Step A2: Reduce the dimension of the multiple typical working condition databases corresponding to the hydrogen fuel cell bus under multiple different driving condition types to obtain the corresponding multiple key working condition databases;
[0116] Step A3: Train the support vector machine model through multiple key working condition databases, and iteratively optimize the second objective variables through the improved sparrow search algorithm to obtain the trained working condition recognition model.
[0117] More specifically, each typical working condition database corresponding to the hydrogen fuel cell bus under each driving condition type contains multiple groups of numerical values, and each group of numerical values contains historical numerical values of several driving feature parameters. The implementation process of the above Step A2 includes but is not limited to the following:
[0118] Step A2.1: Analyze multiple typical working condition databases by combining the principal component analysis method and the correlation coefficient method to screen out more critical multiple driving feature parameters from several driving feature parameters;
[0119] Further, the existing correlation coefficient method is used to preliminarily analyze multiple typical working condition databases to screen out M driving characteristic parameters with stronger correlation from several driving characteristic parameters; the multiple typical working condition databases are preliminarily screened so that each typical working condition database only contains the historical values of M driving characteristic parameters; the existing principal component analysis method is used to analyze the preliminarily screened multiple typical working condition databases again to screen out K more critical driving characteristic parameters from the M driving characteristic parameters; where K < M < N, K, M, and N are all positive integers, N is the number of several driving characteristic parameters, and M is preferably set to 7, and K is preferably set to 5.
[0120] Step A2.2: For any typical working condition database, with the constraint of only retaining the historical values of more critical multiple driving characteristic parameters, the parameters of the typical working condition database are screened to obtain the corresponding key working condition database.
[0121] Similarly, the current working condition data of the hydrogen fuel cell bus contains the current values of several driving characteristic parameters. The dimensionality reduction method for the current working condition data mentioned in the above step S120 is: with the constraint of only retaining the current values of more critical multiple driving characteristic parameters, the parameters of the current working condition data are screened to obtain the corresponding key working condition data.
[0122] It should be noted that in the above step A3, it is emphasized to use multiple key working condition databases to train the support vector machine model. It can be understood that when the trained working condition recognition model is officially put into use, it must use the specific values of more critical multiple driving characteristic parameters as the input parameter values, that is, it can be understood that the current working condition data of the hydrogen fuel cell bus is dimensionally reduced according to all parameter types allowed to be input by the trained working condition recognition model, so that the trained working condition recognition model can correctly identify the driving working condition type of the hydrogen fuel cell bus at present.
[0123] More specifically, the key working condition database corresponding to each driving working condition type of the hydrogen fuel cell bus contains multiple groups of dimensionally reduced values. Each group of dimensionally reduced values contains the historical values of more critical multiple driving characteristic parameters. The implementation process of the above step A3 includes but is not limited to the following:
[0124] Step A3.1: Assign corresponding classification labels to each group of dimensionally reduced values contained in the key working condition database corresponding to each driving working condition type of the hydrogen fuel cell bus, and then merge all the key working condition databases with classification labels assigned to obtain a data set for training the support vector machine model;
[0125] Step A3.2: Divide the data set into a training data set and a test data set according to a preset ratio. The preset ratio is preferably set to 7:3;
[0126] Step A3.3: Set the basic parameters required for the improved sparrow search algorithm, including the maximum number of iterations, the number of sparrow populations, the proportion of discoverers, the proportion of freeloaders, and the proportion of guardians;
[0127] Step A3.4: Initialize the sparrow population, that is, initialize the position of each sparrow through the above formula (5) and the above formula (6);
[0128] Step A3.5: Combine the training data set, the support vector machine model, and the second fitness function to calculate the initial fitness value corresponding to each sparrow in the sparrow population, sort them, obtain the initial optimal sparrow individual and record it as the population optimal individual, and obtain the initial fitness value corresponding to the initial optimal sparrow individual and record it as the population optimal fitness value;
[0129] Step A3.6: Start the k-th iteration update. First, divide the sparrow population into a discoverer group, a freeloader group, and a guardian group according to the current fitness value corresponding to each sparrow in the sparrow population determined after the (k - 1)-th iteration update. Then, update the positions of the discoverer group through the above formula (7) and the above formula (8), update the positions of the freeloader group through the above formula (9) and the above formula (10), and update the positions of the guardian group through the above formula (11). And after completing the position update of the sparrow population, perform position perturbation on the sparrow population through the above formula (12) and the above formula (13);
[0130] Step A3.7: Combine the training data set, the support vector machine model, and the second fitness function to calculate the current fitness value corresponding to each sparrow in the sparrow population, sort them, obtain the current optimal sparrow individual and record it as the second optimal sparrow individual, and obtain the current fitness value corresponding to the current optimal sparrow individual and record it as the second current fitness value;
[0131] Step A3.8: Obtain the population optimal fitness value determined after the (k - 1)-th iteration update and compare it with the second current fitness value: when the population optimal fitness value is less than or equal to the second current fitness value, use the population optimal individual determined after the (k - 1)-th iteration update as the population optimal individual determined after the k-th iteration update; when the population optimal fitness value is greater than the second current fitness value, use the second optimal sparrow individual as the population optimal individual determined after the k-th iteration update;
[0132] Step A3.9: Determine whether the current iteration number k reaches the maximum iteration number. If so, output the position of the population-optimal individual determined after the k-th iteration update as the optimal solution of the second objective variable. If not, assign k + 1 to k, and then return to execute the above Step A3.6.
[0133] Step A3.10: Input the optimal solution of the second objective variable into the support vector machine model to form a trained working condition recognition model, and then use the test data set to perform performance testing on the trained working condition recognition model.
[0134] It should be noted that the above Step A3.6 starts from k = 1.
[0135] In some embodiments, the implementation process of the above Step S150 includes but is not limited to the following:
[0136] Step S151: Input the current working condition data of the hydrogen fuel cell bus into the hybrid power system model of the hydrogen fuel cell bus built in the Matlab / Simulink environment for simulation operation to output the current power battery SOC value and the current system demand power.
[0137] Step S152: Analyze the current power battery SOC value and the current system demand power through the equivalent consumption minimum strategy after parameter update to further allocate the current system demand power to obtain the first optimal output power of the fuel cell and the second optimal output power of the power battery.
[0138] Step S153: Control the fuel cell to operate according to the first optimal output power, and at the same time control the power battery to operate according to the second optimal output power to achieve the energy management of the hydrogen fuel cell bus.
[0139] In the embodiments of the present invention, by setting more matching optimal equivalent factors in advance for each type of driving condition, a more targeted equivalent consumption minimization strategy can be quickly formulated when determining the type of driving condition in which the hydrogen fuel cell bus is currently located, so as to more efficiently and reliably achieve the energy management of the hydrogen fuel cell bus, improve the overall vehicle economy of the hydrogen fuel cell bus, and enable the hydrogen fuel cell bus to maintain the power maintenance mode as much as possible. By improving the population initialization strategy, the discoverer position update strategy, and the forager position update strategy on the basis of the original sparrow search algorithm, and introducing a position perturbation strategy in the process of population iterative update, the improved sparrow search algorithm can have a more reliable parameter optimization ability. When the improved sparrow search algorithm is applied to solve the optimization problem of the equivalent factor included in the equivalent consumption minimization strategy, the selection of the equivalent factor can be avoided from completely depending on the experience of developers. When the improved sparrow search algorithm is applied to solve the optimization problem of the kernel function density and penalty factor included in the support vector machine model, the recognition accuracy of the driving condition recognition model can be improved.
[0140] In addition, the embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements a hydrogen fuel cell bus energy management method in the above embodiments. Among them, the computer-readable storage medium includes, but is not limited to, any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card, or optical card. That is to say, the storage device includes any medium that stores or transmits information in a readable form by a device (such as a computer, mobile phone, etc.), and can be a read-only memory, a disk, or an optical disk, etc.
[0141] In addition, Figure 7 is a schematic hardware structure diagram of a computer device provided by the embodiments of the present invention. The computer device includes devices such as a processor 220, a memory 230, an input unit 240, and a display unit 250. Those skilled in the art can understand, Figure 7The device structures shown do not constitute a limitation on all devices, and may include more or fewer components than shown, or combine certain components. The memory 230 can be used to store the computer program 210 and each functional module. The processor 220 runs the computer program 210 stored in the memory 230, thereby performing various functional applications and data processing of the device. The memory can be an internal memory or an external memory, or include both an internal memory and an external memory. The internal memory can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, or a random access memory. The external memory can include a hard disk, a floppy disk, a USB flash drive, a magnetic tape, etc. The memory 230 disclosed in the embodiments of the present invention includes, but is not limited to, these types of memories. The memory 230 disclosed in the embodiments of the present invention is only an example and not a limitation.
[0142] The input unit 240 is used to receive the input of signals and receive the keywords input by the user. The input unit 240 can include a touch panel and other input devices. The touch panel can collect the touch operations of the user on or near it (such as the operations of the user using any suitable object or accessory such as a finger, a stylus, etc. on or near the touch panel), and drive the corresponding connection device according to a pre-set program; the other input devices can include, but are not limited to, one or more of a physical keyboard, function keys (such as play control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc. The display unit 250 can be used to display the information input by the user or the information provided to the user and various menus of the terminal device. The display unit 250 can be in the form of a liquid crystal display, an organic light-emitting diode, etc. The processor 220 is the control center of the terminal device, connecting various parts of the entire device through various interfaces and lines, and performing various functions and processing data by running or executing the software programs and / or modules stored in the memory 230, and calling the data stored in the memory 230.
[0143] As an embodiment, the computer device includes a processor 220, a memory 230, and a computer program 210, wherein the computer program 210 is stored in the memory 230 and configured to be executed by the processor 220, and the computer program 210 is configured to execute a hydrogen fuel cell bus energy management method in the above embodiments.
[0144] Although this application has been described in considerable detail and particularly with reference to several of the above embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but rather should be regarded as effectively covering the intended scope of this application by interpreting the appended claims broadly in view of the prior art. Further, the application has been described above in terms of embodiments that the inventors could foresee, for the purpose of providing a useful description, and those insubstantial changes to the application that are not presently foreseen may still represent equivalent changes to the application.
Claims
1. An energy management method for a hydrogen fuel cell bus, characterized in that, The method includes: Obtaining a plurality of optimal equivalent factors corresponding to multiple different driving condition types, where the plurality of optimal equivalent factors are obtained by using an improved sparrow search algorithm to optimize the equivalent factors included in the equivalent consumption minimum strategy based on a pre-constructed hybrid power system model of a hydrogen fuel cell bus and a plurality of typical condition databases corresponding to the hydrogen fuel cell bus under the multiple different driving condition types; Obtaining the current condition data of the hydrogen fuel cell bus, and performing dimensionality reduction on the current condition data to obtain key condition data; Inputting the key condition data into a trained condition recognition model to obtain the current driving condition type of the hydrogen fuel cell bus; Obtaining the optimal equivalent factor matching the current driving condition type from the plurality of optimal equivalent factors to update the parameters of the equivalent consumption minimum strategy; According to the hybrid power system model and the current condition data, using the equivalent consumption minimum strategy with updated parameters to perform energy management on the hydrogen fuel cell bus; Among them, the condition recognition model is constructed based on a support vector machine model, and it is trained in the following manner: Taking the recognition accuracy of the support vector machine model for the driving condition type as the second fitness function, and taking the penalty factor and kernel function density included in the support vector machine model as the second target variables; Performing dimensionality reduction on the plurality of typical condition databases to obtain corresponding plurality of key condition databases; Using the plurality of key condition databases to train the support vector machine model, and using an improved sparrow search algorithm to optimize the second target variables to obtain a trained condition recognition model.
2. The energy management method of the hydrogen fuel cell bus according to claim 1, wherein In the improved sparrow search algorithm, it is set to initialize the position of the sparrow population by using Tent chaotic mapping and Sobol sequence, and in each iterative update process of the sparrow population, a non-linear inertia weight is introduced to update the position of the sparrow individuals acting as discoverers, and the Lévy flight strategy is used to update the position of the sparrow individuals acting as freeloaders. And after updating the position of each sparrow, a dynamic probability factor is generated according to the current iteration number and the final iteration number. When the dynamic probability factor is less than a random number, an adaptive t-distribution mutation operator is used to perturb the position of each sparrow.
3. The energy management method of the hydrogen fuel cell bus according to claim 1, wherein, Each typical condition database contains multiple groups of numerical values, and each group of numerical values contains historical numerical values of several driving characteristic parameters; the current condition data contains the current numerical values of the several driving characteristic parameters.
4. The energy management method of the hydrogen fuel cell bus according to claim 3, characterized in that, The plurality of optimal equivalent factors corresponding to the multiple different driving condition types are obtained in the following manner: Taking the equivalent hydrogen consumption of the hybrid power system of the hydrogen fuel cell bus as the first fitness function, taking the equivalent factors included in the equivalent consumption minimum strategy as the first target variables, and the first fitness function includes the first target variables; For any type of driving condition, a set of numerical values included in the typical driving condition database corresponding to the driving condition type are input into the hybrid power system model for simulation operation to obtain a corresponding set of system parameter values, and each set of system parameter values includes the relevant parameter values involved in the first fitness function; Combined with the set of system parameter values and the first fitness function, an improved sparrow search algorithm is used to optimize the first target variable to obtain the optimal equivalent factor corresponding to the driving condition type.
5. The energy management method of the hydrogen fuel cell bus according to claim 3, characterized in that The dimensionality reduction of the multiple typical driving condition databases to obtain the corresponding multiple key driving condition databases includes: Using the correlation coefficient method and the principal component analysis method to analyze the multiple typical driving condition databases to extract multiple key driving characteristic parameters from the several driving characteristic parameters; For any typical driving condition database, parameter screening is performed on the typical driving condition database, and only the historical numerical values of the multiple driving characteristic parameters are retained to obtain the key driving condition database.
6. The energy management method for a hydrogen fuel cell bus according to claim 5, characterized in that, The dimensionality reduction of the current driving condition data to obtain the key driving condition data includes: Parameter screening is performed on the current driving condition data, and only the current numerical values of the multiple driving characteristic parameters are retained to obtain the key driving condition data.
7. The energy management method of the hydrogen fuel cell bus according to claim 1, characterized in that The hybrid power system of the hydrogen fuel cell bus includes a fuel cell and a power battery; according to the hybrid power system model and the current driving condition data, the energy management of the hydrogen fuel cell bus using the equivalent consumption minimum strategy with updated parameters includes: Inputting the current driving condition data into the hybrid power system model for simulation operation to obtain the current system demand power and the current state of charge (SOC) value of the power battery; Using the equivalent consumption minimum strategy with updated parameters to analyze the current system demand power and the current SOC value of the power battery to obtain the first optimal output power of the fuel cell and the second optimal output power of the power battery; Controlling the fuel cell to operate at the first optimal output power and controlling the power battery to operate at the second optimal output power.
8. A computer device, comprising a memory and a processor, wherein a computer program is stored on the memory, characterized in that, The processor executes the computer program to implement the energy management method of the hydrogen fuel cell bus according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the energy management method of the hydrogen fuel cell bus according to any one of claims 1 to 7.
Citation Information
Patent Citations
Variable equivalent factor hybrid electric vehicle energy management method based on working condition identification
CN114179777A
Energy management method for hydrogen-electricity hybrid excavator with minimum equivalent hydrogen consumption
CN118365048A