Energy scheduling method and device of hybrid power system
By adopting low-pass filters, variational modal decompositioners and adaptive weight lightweight gradient hoists in hybrid systems, as well as a two-layer real-time scheduling model with two-layer model prediction control strategy, the problem of energy scheduling methods in the prior art relying on load prediction accuracy and failing to fully consider all energy supply equipment, achieving more efficient energy scheduling and equipment performance optimization.
Patent Information
- Application Number
- CN202510252837.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The energy scheduling methods of existing hybrid systems rely on the accuracy of load prediction and fail to fully consider all energy supply equipment, resulting in the inability to comprehensively optimize the economy and durability of operation.
Using an energy scheduling method of a hybrid power system, by obtaining detection data, inputting a load prediction model to obtain a load sequence, and inputting it into a double-layer real-time scheduling model to generate an energy scheduling strategy. The method includes a low-pass filter, a variational modal decomposition and an adaptive weighted lightweight gradient hoist as a load prediction model, and a two-layer model prediction control strategy as a two-layer real-time scheduling model.
Through the improved load prediction model and the double-layer real-time scheduling model, it can better adapt to the frequent and irregular changes in load, improve load prediction accuracy, and reduce the performance degradation of energy supply equipment while operating economically.
Smart Images

Figure CN119760551A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of machine learning, and in particular relates to an energy scheduling method and device for a hybrid power system. Background Art
[0002] Proton exchange membrane fuel cells (PEMFC) are considered one of the ideal technologies for green shipping due to their stable performance and zero carbon emissions. In order to make up for the shortcomings of PEMFC's weak dynamic response capability, hydrogen fuel cell ships use PEMFC as the main energy supply equipment and are equipped with energy storage devices such as lithium batteries (LB) as auxiliary energy supply equipment to form a hybrid power system (HPS) to meet the dynamic needs of loads.
[0003] An efficient and reliable energy scheduling strategy (ESS) is the key to fully exploit the advantages of hybrid power systems. At present, ship ESS can be mainly divided into two categories: rule-based and optimization-based. Rule-based ESS is simple to control, but has poor flexibility and relies on the experience of engineers. It is only suitable for traditional and simple shipping scheduling. Optimization-based ESS can better cope with the complex operating environment and working conditions of ships because of its high degree of automation and strong adaptability.
[0004] In the optimization-based model, model predictive control (MPC) can predict the future state of the device, focus on long-term optimization benefits, and respond quickly to meet the real-time needs of scheduling. However, the scheduling strategy formulated by model predictive control depends on the accuracy of the predicted load, and fails to fully consider all energy supply equipment, and cannot achieve comprehensive optimization of the economy and durability of operation. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides an energy scheduling method and device for a hybrid power system to solve the above-mentioned technical problems.
[0006] In a first aspect, the present invention provides an energy scheduling method for a hybrid power system, comprising: Obtaining test data within a first time limit; Inputting the detection data into a load forecasting model to obtain a load sequence within a second time limit output by the load forecasting model; Inputting the load sequence into a pre-built two-layer real-time scheduling model to obtain an energy scheduling strategy; The load forecasting model includes a low-pass filter, a variational mode decomposer, and an adaptive weighted lightweight gradient boosting machine; The two-layer real-time scheduling model includes two-layer model predictive control strategies; The first time limit is before the current time node, and the second time limit is after the current time node.
[0007] In an optional implementation, acquiring the detection data within the first time limit includes: A plurality of correlation factors associated with the load are mined in advance from the ship operation information and the hydrological and meteorological information using the Pearson correlation analysis method, wherein the plurality of correlation factors include the ship load, the propulsion motor speed, the total power of the proton exchange membrane fuel cell, the draft, the speed, the water flow velocity, and the wind speed; Periodically collecting detection values of a plurality of the associated elements to obtain data sequences of the plurality of the associated elements; The detection data within a first time period is extracted from the data sequence using a time window.
[0008] In an optional implementation, the load forecasting model includes: The low-pass filter decomposes the detection value of each correlation element into a low-frequency part and a high-frequency interference part reflecting the respective change trends. The low-pass filter includes a transfer function. H(jω) for:
[0009] ω is the frequency of the original signal, ω c is the cutoff frequency of the original signal; n is the order of the filter; The variational modal decomposer performs a stabilization process on the high-frequency interference part of the detection value, and the stabilization process includes constructing a variation and solving a variation, and the constructing a variation includes a process of solving m modal components by Hilbert transform:
[0010] in, u is the original signal; Q is the number of modes after decomposition; z q and ω q They are q modes and corresponding center frequencies; It is the partial derivative operation with respect to time; δ t is the unit impulse function; The variation is solved using an augmented Lagrangian function, wherein the augmented Lagrangian function includes:
[0011] Among them, γ and α are the Lagrange multiplier and penalty coefficient respectively.
[0012] In an optional embodiment, the adaptive weighted lightweight gradient boosting machine includes: Substitute the original input factors and ship loads into the lightweight gradient boosting machine for initial training; Calculate the importance of each input feature β k :
[0013] in, a k is the number of times the kth input element is used; K is the number of input elements; Calculates the weight matrix for the input features w k ;
[0014] in, softmax is the normalization function; The original input features are weighted and then substituted into the lightweight gradient boosting machine for retraining to obtain an adaptive weight lightweight gradient boosting machine.
[0015] In an optional embodiment, the method further comprises: The performance of the load forecasting model is evaluated using evaluation indicators, and the evaluation indicators include: Mean absolute error: ; Mean absolute percentage error: ; in, Z is the number of samples; and Respectively k The actual and predicted values of the ship load.
[0016] In an optional implementation, the method for constructing the two-layer real-time scheduling model includes: Pre-constructing the fuel cost function and performance degradation cost function of the proton exchange membrane fuel cell, as well as the fuel cost function and performance degradation cost function of the lithium battery; Based on the fuel cost function and performance degradation cost function of proton exchange membrane fuel cells, as well as the fuel cost function and performance degradation cost function of lithium batteries, the cost function and constraints of the double-layer real-time scheduling model are constructed.
[0017] In an optional embodiment, the fuel cost function and performance degradation cost function of the proton exchange membrane fuel cell, as well as the fuel cost function and performance degradation cost function of the lithium battery are pre-constructed, including: Hydrogen consumption rate of proton exchange membrane fuel cells The calculation methods include:
[0018] in, P PEMFC is the output power of the proton exchange membrane fuel cell, η PEMFC is the efficiency of the proton exchange membrane fuel cell, κ H is the calorific value of hydrogen; Fuel cost of proton exchange membrane fuel cells Q PEMFC.H The calculation methods include:
[0019] in, W H is the selling price of hydrogen; m H is the mass of hydrogen; m H = ×t; Defining the performance degradation cost due to power fluctuation based on the performance degradation causes of proton exchange membrane fuel cells Q PEMFC.c , Performance degradation costs due to power exceeding the maximum limit Q PEMFC.h , performance degradation costs due to power below the minimum limit Q PEMFC.l , Performance degradation costs due to start-stop Q PEMFC.s , the calculation methods include:
[0020] in, W PEMFC is the selling price of proton exchange membrane fuel cells, μ c For calculation Q PEMFC.c The degradation coefficient of μ h For calculation Q PEMFC.h The degradation coefficient of μ l For calculation Q PEMFC.l The degradation coefficient of μ s For calculation Q PEMFC.s The degradation coefficient of P PEMFC.eis the rated power of the proton exchange membrane fuel cell, P PEMFC.max is the maximum power of the proton exchange membrane fuel cell, P PEMFC.A is the instantaneous power variation amplitude of the proton exchange membrane fuel cell; U limit is the voltage drop limit of the proton exchange membrane fuel cell; Δ t is the running time; δ ( t ) is the state of the proton exchange membrane fuel cell, which is 0 when it is turned off and 1 when it is running; Performance degradation costs of proton exchange membrane fuel cells Q PEMFC.DE It is expressed as: ; The calculation method of the output power of lithium batteries includes:
[0021] in, U oc is the open circuit voltage of the lithium battery, I LB is the output current of the lithium battery, R in is the internal resistance of the lithium battery; The calculation method of the state of charge SOC of the lithium battery includes:
[0022] in, SOC 0 is the initial SOC of the lithium battery, C LB is the capacity of the lithium battery; The equivalent hydrogen consumption theory is used to convert the energy output by the lithium battery into the corresponding hydrogen mass. The equivalent hydrogen consumption mass of the lithium battery per second is Approximately equivalent to:
[0023]
[0024]
[0025] in, U LB is the output voltage of the lithium battery, η ch is the charging efficiency of the lithium battery, η dis is the discharge efficiency of the lithium battery, P LB is the output power of the lithium battery, ηLB is the efficiency of lithium batteries; Equivalent fuel cost of lithium batteries Q LB.H It is expressed as: ; Performance degradation costs of lithium batteries Q LB.DE It is expressed as:
[0026]
[0027] in, μ LB is the balance coefficient of the lithium battery; W LB is the selling price of lithium batteries, SOH The health status of the lithium battery. M The maximum number of cycles for a lithium battery.
[0028] In an optional embodiment, the cost function and constraint conditions of the double-layer real-time scheduling model are constructed based on the fuel cost function and performance degradation cost function of the proton exchange membrane fuel cell, and the fuel cost function and performance degradation cost function of the lithium battery, including: The expression of the model predictive control strategy based on the discrete state space model is:
[0029] in, A , B , C is the coefficient matrix; x ( k ), u ( k ), y ( k ) are the state variable, control variable and output variable matrices respectively; x ( k )for[ ; ; SOC ], u ( k )and y ( k )for[ ; ; ];in, is the hydrogen consumption rate of the first group of proton exchange membrane fuel cells, is the hydrogen consumption rate of the second group of proton exchange membrane fuel cells, SOC is the state of charge of the lithium battery, is the output power of the first group of proton exchange membrane fuel cells, is the output power of the second group of proton exchange membrane fuel cells, is the output power of the lithium battery; The upper model predictive control strategy uses the load sequence as the constraint value of the power balance within the prediction step, and the output size is 3× N p The reference power matrix [ ; ; ] is given to the lower-level MPC as a soft constraint of the lower-level MPC. The cost function of the upper-level model predictive control strategy is:
[0030] in, η PEMFC1 (h) is the hourly efficiency of the first set of proton exchange membrane fuel cells; η PEMFC2 (h) is the hourly efficiency of the first set of proton exchange membrane fuel cells; P PEMFC2 (h) is the hourly power output of the first set of proton exchange membrane fuel cells; P PEMFC2 (h) is the hourly output power of the second set of proton exchange membrane fuel cells; The constraints of the upper model predictive control strategy are:
[0031] in, P PEMFC.min is the minimum power of a proton exchange membrane fuel cell; P LB.min and P LB.max are the minimum power and maximum power of lithium battery respectively; SOC min and SOC max are the minimum and maximum constraints of the state of charge respectively; Δ P max is the maximum allowable amplitude of instantaneous power variation of the proton exchange membrane fuel cell; The lower-level model predictive control strategy is based on the load sequence and the reference power matrix output by the upper-level model predictive control strategy [ ; ; ] to perform real-time energy scheduling, and the first set of control variables after each optimization[ ; ; ] as a control signal, acting on the first group of proton exchange membrane fuel cells, the second group of proton exchange membrane fuel cells and the lithium battery; The cost function of the lower-level model predictive control strategy includes:
[0032] in, Q otal is the total operating cost; F PENFC It is a penalty term set to make the two groups of proton exchange membrane fuel cells work efficiently; The constraints of the lower-level model predictive control strategy include:
[0033]
[0034]
[0035]
[0036] in, ε is the penalty coefficient; a 1 is the first weight coefficient, a 2 is the second weight coefficient.
[0037] In an optional embodiment, the method further comprises: Define the current moment as k, the time limit for detecting data as d moments, and the length of the load sequence as N P , when k The time is over, enter k+1 After time, the load forecasting model is based on k-d+2 arrive k+1 The relevant information of the moment is output, and the corresponding load sequence is output. The two-layer real-time scheduling model generates the energy scheduling matrix of the next moment based on the load sequence.
[0038] In a second aspect, the present invention provides an energy scheduling device for a hybrid power system, comprising: A data acquisition module, used to acquire detection data within a first time limit; A load forecasting module, used for inputting the detection data into a load forecasting model to obtain a load sequence within a second time limit output by the load forecasting model; A strategy optimization module, used for inputting the load sequence into a pre-built two-layer real-time scheduling model to obtain an energy scheduling strategy; The load forecasting model includes a low-pass filter, a variational mode decomposer, and an adaptive weighted lightweight gradient boosting machine; The two-layer real-time scheduling model includes two-layer model predictive control strategies; The first time limit is before the current time node, and the second time limit is after the current time node.
[0039] In a third aspect, a device is provided, including: A memory for storing an energy scheduling program of the hybrid power system; The processor is used to implement the steps of the energy scheduling method for the hybrid power system provided in the first aspect when executing the energy scheduling program of the hybrid power system.
[0040] In a fourth aspect, a computer-readable storage medium is provided, on which an energy scheduling program for a hybrid power system is stored. When the energy scheduling program for the hybrid power system is executed by a processor, the steps of the energy scheduling method for the hybrid power system provided in the first aspect are implemented.
[0041] The beneficial effects of the present invention are that the energy scheduling method and device for the hybrid power system provided by the present invention, by constructing a new load prediction model, can adapt well to the frequent and irregular changes in load and improve the load prediction accuracy; and the double-layer real-time scheduling model, the upper layer enables the PEMFC device to have a higher working efficiency, and the lower layer uses the working point of the PEMFC given by the upper layer as a reference, ensuring that the hydrogen fuel cell ship can reduce the performance degradation of the two types of energy supply equipment while operating economically; the method provided by the present invention can take into account the changing state of the ship load at future moments, and it combines the multi-step prediction of the ship load with the double-layer MPC, giving full play to the advantages of the model, so that the ESS has better performance.
[0042] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0044] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0045] Figure 2 It is a schematic architecture diagram of the topology and energy scheduling strategy of a hybrid power system of a hydrogen fuel cell ship according to an embodiment of the present invention.
[0046] Figure 3 1 is a schematic diagram of efficiency fitting of two groups of proton exchange membrane fuel cells according to an embodiment of the present invention, wherein (a) is a schematic diagram of efficiency fitting of the first group of proton exchange membrane fuel cells; and (b) is a schematic diagram of efficiency fitting of the second group of proton exchange membrane fuel cells.
[0047] Figure 4 It is a schematic diagram of the training process of the load forecasting model according to an embodiment of the present invention.
[0048] Figure 5 It is a schematic diagram of the signal transmission process of a method according to an embodiment of the present invention.
[0049] Figure 6 It is a schematic diagram of correlation factor analysis of a method according to an embodiment of the present invention.
[0050] Figure 7 It is a schematic diagram of the process of determining the final input elements of the method according to an embodiment of the present invention.
[0051] Figure 8 The present invention is a comparison diagram of the predicted value and the error value of the load prediction model of an embodiment of the present invention: (a1) is a comparison diagram of the predicted value and the actual value of the cruising state, and (a2) is a schematic diagram of the error value of the cruising state; (b1) is a comparison diagram of the predicted value and the actual value of the transition state, and (b2) is a schematic diagram of the error value of the transition state; (c1) is a comparison diagram of the predicted value and the actual value of the operating state, and (c2) is a schematic diagram of the error value of the operating state.
[0052] Fig. 9 1 is an energy distribution curve and a DC bus voltage change curve corresponding to different energy scheduling strategies of an embodiment of the present invention; wherein, (a1) is an energy distribution curve adopting the Proposrd scheduling strategy, and (b1) is a DC bus voltage change curve adopting the Proposrd scheduling strategy; (a2) is an energy distribution curve adopting the Proposrd-NoSLF scheduling strategy, and (b2) is a DC bus voltage change curve adopting the Proposrd-NoSLF scheduling strategy; (a3) is an energy distribution curve adopting the ECMS scheduling strategy, and (b3) is a DC bus voltage change curve adopting the ECMS scheduling strategy.
[0053] Fig.10 This is an overall efficiency comparison diagram corresponding to different energy scheduling strategies according to an embodiment of the present invention.
[0054] Fig.111 is an efficiency comparison diagram of each group of proton exchange membrane fuel cells corresponding to different energy scheduling strategies of an embodiment of the present invention, wherein (a1) is the efficiency diagram of the first group of proton exchange membrane fuel cells adopting the Proposrd scheduling strategy, and (a2) is the efficiency diagram of the second group of proton exchange membrane fuel cells adopting the Proposrd scheduling strategy; (b1) is the efficiency diagram of the first group of proton exchange membrane fuel cells adopting the Proposrd-NoSLF scheduling strategy, and (b2) is the efficiency diagram of the second group of proton exchange membrane fuel cells adopting the Proposrd-NoSLF scheduling strategy; (c1) is the efficiency diagram of the first group of proton exchange membrane fuel cells adopting the ECMS scheduling strategy, and (c2) is the efficiency diagram of the second group of proton exchange membrane fuel cells adopting the ECMS scheduling strategy.
[0055] Fig.12 1 is a comparison chart of operating costs and charge states corresponding to different energy scheduling strategies according to an embodiment of the present invention, wherein (a) is a comparison chart of operating costs corresponding to different energy scheduling strategies in the first time period of the voyage; (b) is a comparison chart of operating costs corresponding to different energy scheduling strategies in the second time period of the voyage; (c) is a comparison chart of operating costs corresponding to different energy scheduling strategies in the second time period of the voyage; and (d) is a comparison chart of charge states corresponding to different energy scheduling strategies during the voyage.
[0056] Fig.13 It is a schematic diagram of degradation cost of a proton exchange membrane fuel cell according to an embodiment of the present invention.
[0057] Fig.14 It is the operating cost corresponding to different energy scheduling strategies of an embodiment of the present invention, wherein (a) is the total operating cost corresponding to different energy scheduling strategies; (b) is the performance degradation cost of the proton exchange membrane fuel cell; and (c) is the performance degradation cost of the lithium battery.
[0058] Fig.15 is a schematic block diagram of an apparatus according to an embodiment of the present invention.
[0059] Fig.16 A schematic diagram of the structure of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0061] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention in this application are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0062] The key terms appearing in the present invention are explained below.
[0063] Model Predictive Control (MPC) is an advanced control strategy that is widely used in many fields such as industrial process control, robotic control, and autonomous driving.
[0064] The low-pass filter uses a Butterworth filter, which is also called a Butterworth filter and is a type of filter widely used in the field of signal processing.
[0065] Variational mode decomposition (VMD) is a signal decomposition method based on the variational principle. It decomposes complex signals into multiple intrinsic mode function (IMF) components with different center frequencies. The core idea is to define each mode function as an amplitude-frequency modulated signal with different center frequencies, and determine these mode functions and their center frequencies by solving the variational problem, so that the sum of the bandwidths of each mode function is minimized, while ensuring that the sum of all mode functions is equal to the original signal.
[0066] Light Gradient Boosting Machine (LightGBM) is a fast and efficient gradient boosting framework developed by Microsoft. LightGBM is based on the framework of Gradient Boosted Decision Tree (GBDT). GBDT is an iterative decision tree algorithm that gradually improves the prediction ability of the model by continuously adding new decision trees to fit the residuals of the previous model. In each round of iteration, the new decision tree is trained according to the gradient information of the previous model, so that the model can fit the data more accurately. When generating decision trees, the traditional GBDT algorithm usually adopts the level-wise growth method, that is, each split traverses all leaf nodes to find the best split point. This method will cause a lot of calculation and memory consumption. LightGBM adopts the leaf-wise growth strategy, and selects the leaf node with the largest gain for splitting each time, which can reduce the error faster and reduce the depth of the decision tree, thereby improving the training speed and generalization ability of the model. LightGBM uses the histogram algorithm to accelerate the splitting of features. Before training, it discretizes the continuous feature values into a finite number of intervals to form a histogram. When searching for the best split point, we only need to traverse the intervals in the histogram instead of all sample points, which greatly reduces the amount of calculation and improves training efficiency.
[0067] The energy scheduling method of the hybrid power system provided by the embodiment of the present invention is executed by a computer device, and accordingly, the energy scheduling device of the hybrid power system runs in the computer device.
[0068] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be an energy dispatching device of a hybrid power system. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.
[0069] like Figure 1 As shown, the method includes: S1, obtaining detection data within a first time limit; S2, inputting the detection data into a load forecasting model to obtain a load sequence within a second time limit output by the load forecasting model; S3, inputting the load sequence into a pre-built two-layer real-time scheduling model to obtain an energy scheduling strategy; The load forecasting model includes a low-pass filter, a variational mode decomposer, and an adaptive weighted lightweight gradient boosting machine; The two-layer real-time scheduling model includes two-layer model predictive control strategies; The first time limit is before the current time node, and the second time limit is after the current time node.
[0070] Please refer to Figure 2 The topology of the hybrid power system (HPS) of the hydrogen fuel cell ship is shown in part A. To ensure the reliability of the device, the HPS is a ring structure. Two groups of proton exchange membrane fuel cells (PEMFC) are the main energy supply equipment, and lithium batteries (LB) are auxiliary energy supply equipment. The two are connected to the DC bus through unidirectional and bidirectional DC / DC converters respectively. The energy scheduling strategy (ESS) performs real-time energy scheduling according to the operating status of the ship.
[0071] PEMFC is the main energy supply equipment for hydrogen fuel cell ships. Its core principle is to directly convert hydrogen and oxygen into electrical energy through electrochemical reactions without greenhouse gas emissions. The calculation methods include:
[0072] in, P PEMFC is the output power of the proton exchange membrane fuel cell, η PEMFC is the efficiency of the proton exchange membrane fuel cell, κ H is the calorific value of hydrogen.
[0073] like Figure 3 As shown, through Figure 3 (a) and Figure 3 (b) The efficiency curves of the two sets of laboratory data are plotted and averaged to obtain η PEMFC The value of .
[0074] Fuel cost of proton exchange membrane fuel cells Q PEMFC.H The calculation methods include:
[0075] in, W H is the selling price of hydrogen; m H is the mass of hydrogen; m H = ×t; t can be taken as unit time.
[0076] Defining the performance degradation cost due to power fluctuation based on the performance degradation causes of proton exchange membrane fuel cells Q PEMFC.c, Performance degradation costs due to power exceeding the maximum limit Q PEMFC.h , performance degradation costs due to power below the minimum limit Q PEMFC.l , Performance degradation costs due to start-stop Q PEMFC.s , the calculation methods include:
[0077] in, W PEMFC is the selling price of proton exchange membrane fuel cells, μ c For calculation Q PEMFC.c The degradation coefficient of μ h For calculation Q PEMFC.h The degradation coefficient of μ l For calculation Q PEMFC.l The degradation coefficient of μ s For calculation Q PEMFC.s The degradation coefficient of P PEMFC.e is the rated power of the proton exchange membrane fuel cell, P PEMFC.max is the maximum power of the proton exchange membrane fuel cell, P PEMFC.A is the instantaneous power variation amplitude of the proton exchange membrane fuel cell; U limit is the voltage drop limit of the proton exchange membrane fuel cell; Δ t is the running time; δ ( t ) is the state of the proton exchange membrane fuel cell, which is 0 when it is turned off and 1 when it is running; Performance degradation costs of proton exchange membrane fuel cells Q PEMFC.DE It is expressed as: ; The calculation method of the output power of lithium batteries includes:
[0078] in, U oc is the open circuit voltage of the lithium battery, I LB is the output current of the lithium battery, R inis the internal resistance of the lithium battery; The calculation method of the state of charge SOC of the lithium battery includes:
[0079] in, SOC 0 is the initial SOC of the lithium battery, C LB is the capacity of the lithium battery; The equivalent hydrogen consumption theory is used to convert the energy output by the lithium battery into the corresponding hydrogen mass. The equivalent hydrogen consumption mass of the lithium battery per second is Approximately equivalent to:
[0080]
[0081]
[0082] in, U LB is the output voltage of the lithium battery, η ch is the charging efficiency of the lithium battery, η dis is the discharge efficiency of the lithium battery, P LB is the output power of the lithium battery, η LB is the efficiency of lithium batteries; Equivalent fuel cost of lithium batteries Q LB.H It is expressed as: .
[0083] Performance degradation costs of lithium batteries Q LB.DE It is expressed as:
[0084]
[0085] in, μ LB is the balance coefficient of the lithium battery; W LB is the selling price of lithium batteries, SOH The health status of the lithium battery. M The maximum number of cycles for a lithium battery.
[0086] In an embodiment of the present invention, based on step S1, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0087] S101. Pearson correlation analysis logical steps 1. Data reading: Read data from the file storing ship operation information and hydrological and meteorological information (assuming the file name is ship_data.csv) into a data structure (such as Python's DataFrame). This step provides the data basis for subsequent analysis.
[0088] 2. Define analysis variables: clearly define the list of variables to be analyzed for correlation, including ship load, propulsion motor speed, total power of proton exchange membrane fuel cells, draft, speed, water flow rate, and wind speed.
[0089] 3. Calculate the correlation matrix: Initialize an empty correlation matrix list correlation_matrix.
[0090] For each variable var1 in the variable list, initialize an empty row list row.
[0091] For each variable var2 in the variable list, use the pearsonr function to calculate the Pearson correlation coefficient corr and significance level between variables var1 and var2.
[0092] Add the calculated correlation coefficient corr to the current row list row.
[0093] Add the current row list row to the correlation matrix list correlation_matrix.
[0094] 4. Generate and display the correlation matrix: Use the calculated correlation matrix list correlation_matrix to create a DataFrame object, and set the column name and index to be variable lists.
[0095] Print out the correlation matrix DataFrame so that you can see the correlation between the variables.
[0096] S102. Logical steps for periodically collecting data sequences 1. Data collection loop: Enter an infinite loop to simulate a continuous data collection process.
[0097] 2. Generate simulation data: In each loop, get the current timestamp and format it in the form of 'YYYY - MM -DD HH:MM:SS'. Use the random number generation function to simulate the measured values of various related elements, including ship load, propulsion motor speed, total power of proton exchange membrane fuel cell, draft, speed, water flow rate, and wind speed. The range of these random numbers is set according to the actual situation.
[0098] 3. Print out the generated timestamp and the simulated data of each associated element in dictionary form to facilitate viewing the data content of each collection.
[0099] 4. Open a file (assuming the file name is collected_data.csv) and write data in append mode. Concatenate the timestamp and the simulated data of each associated element into a string separated by commas and add a newline character at the end. Write the concatenated string into the file.
[0100] 5. Use the time.sleep function and set the sleep time to 3600 seconds (i.e. 1 hour) to collect data every hour.
[0101] 6. The loop returns to step 2 and continues to generate the next data collection results until the program is manually terminated.
[0102] In an embodiment of the present invention, based on step S2, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0103] Construct a load forecasting model, which consists of low-pass filtering (LPF), variational mode decomposition (VMD), and adaptive weighted lightweight gradient boosting machine (AW-LightGBM), namely LPF-VMD-AW-LightGBM model. This model can well adapt to the frequent and irregular changes of load and improve the accuracy of real-time multi-step forecasting. The specific methods are as follows: (1) Constructing a low-pass filter The low-pass filter decomposes the detection value of each correlation element into a low-frequency part and a high-frequency interference part reflecting the respective change trends. The low-pass filter includes a transfer function. H(jω) for:
[0104] ω is the frequency of the original signal, ω c is the cutoff frequency of the original signal; n is the order of the filter.
[0105] Taking wind speed as an example, the decomposition process includes: 1) Use np.arange to generate a time series, simulating data collection once an hour, for a total of 100 data points.
[0106] 2) Generate simulated wind speed data using trigonometric functions and noise, including signals of different frequencies and random noise.
[0107] 3) Apply Butterworth low-pass filter to get the low-frequency part of wind speed wind_speed_low_freq. Subtract the low-frequency part from the original wind speed data to get the high-frequency interference part wind_speed_high_freq.
[0108] (2) Constructing a variational mode decomposer The variational modal decomposer performs a stabilization process on the high-frequency interference part of the detection value. The stabilization process includes constructing a variation and solving a variation. The constructing a variation includes solving the m modal components by Hilbert transform:
[0109] in, u is the original signal; Q is the number of modes after decomposition; z q and ω q They are q modes and corresponding center frequencies; It is the partial derivative operation with respect to time; δ t is the unit impulse function; The variation is solved using an augmented Lagrangian function, wherein the augmented Lagrangian function includes:
[0110] Among them, γ and α are the Lagrange multiplier and penalty coefficient respectively.
[0111] (3) Constructing an adaptive weighted lightweight gradient boosting machine Lightweight Gradient Boosting Machine (LightGBM) is a distributed gradient boosting algorithm proposed by Microsoft, which can be trained efficiently in a short time and with low memory. Compared with the traditional gradient boosting algorithm, LightGBM has made four improvements: the Histogram algorithm is used to discretize continuous feature values into histograms, which speeds up the training process and reduces memory consumption; the unilateral gradient sampling technology is used to select only samples with larger gradient values for update, which reduces the sample size while retaining important information; the mutually exclusive feature bundling technology is used to merge mutually exclusive features, reducing the feature dimension, making model training faster and more efficient; the leaf growth strategy with depth restriction is used to give priority to the leaf nodes with the maximum gain for expansion, which can better handle complex feature distributions and help prevent overfitting.
[0112] The potential correlation between the final input factors of the prediction model and the ship load is different, and LightGBM can automatically save the number of times each input factor sequence is used during the training process. The different number of times used reflects the different importance of each input factor to the training and prediction results. Based on this feature, this application improves LightGBM and establishes an adaptive weight LightGBM (AW-LightGBM), which can effectively utilize the different correlations between input factors and ship loads to improve prediction accuracy.
[0113] Specific improvement methods include Figure 4 As shown, including: Substitute the original input factors and ship loads into the lightweight gradient boosting machine for initial training; Calculate the importance of each input feature β k :
[0114] in, a k is the number of times the kth input element is used; K is the number of input elements; Calculates the weight matrix for the input features w k ;
[0115] in, softmax is the normalization function; The original input features are weighted and then substituted into the lightweight gradient boosting machine for retraining to obtain the adaptive weight lightweight gradient boosting machine (AW-LightGBM).
[0116] In order to ensure the prediction accuracy of the load forecasting model, the performance of the load forecasting model is evaluated using evaluation indicators, which include: Mean absolute error: ; Mean absolute percentage error: ; in, Z is the number of samples; and Respectively k The actual and predicted values of the ship load.
[0117] The load forecasting process includes: real-time collection of ship operation information (load, speed, motor speed, etc.) and hydrological and meteorological information (wind speed, wind direction, ambient temperature, etc.). Then, the related elements are screened out through correlation analysis, and the low-frequency part that can reflect the change trend of each related element is obtained through LPF screening. Subsequently, VMD is used to further decompose the high-frequency part of the historical ship load that can reflect the characteristics of future load changes to obtain a set of relatively stable modal components. Finally, the low-frequency parts of all input elements and the stable modal components of the historical ship load are used as the final input of the AW-LightGBM model, and the forward rolling forecast is performed to obtain the load sequence (FSLS), whose length is the same as the prediction step length of MPC. N p same.
[0118] In an embodiment of the present invention, based on step S3, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0119] The two-layer real-time scheduling model includes two layers of model predictive control (MPC) strategies.
[0120] The expression of the model predictive control strategy based on the discrete state space model is:
[0121] in, A , B , C is the coefficient matrix; x ( k ), u ( k ), y ( k ) are the state variable, control variable and output variable matrices respectively; x ( k )for[ ; ; SOC ], u ( k )and y ( k )for[ ; ; ];in, is the hydrogen consumption rate of the first group of proton exchange membrane fuel cells, is the hydrogen consumption rate of the second group of proton exchange membrane fuel cells, SOC is the state of charge of the lithium battery, is the output power of the first group of proton exchange membrane fuel cells, is the output power of the second group of proton exchange membrane fuel cells, is the output power of the lithium battery.
[0122] The upper model predictive control strategy uses the load sequence as the constraint value of the power balance within the prediction step, and the output size is 3× N p The reference power matrix [ ; ; ] is given to the lower-level MPC as a soft constraint of the lower-level MPC. The cost function of the upper-level model predictive control strategy is:
[0123] in, η PEMFC1 (h) is the hourly efficiency of the first set of proton exchange membrane fuel cells; η PEMFC2 (h) is the hourly efficiency of the first set of proton exchange membrane fuel cells; P PEMFC2 (h) is the hourly power output of the first set of proton exchange membrane fuel cells; P PEMFC2 (h) is the hourly output power of the second set of proton exchange membrane fuel cells; The constraints of the upper model predictive control strategy are:
[0124] in, P PEMFC.min is the minimum power of a proton exchange membrane fuel cell; P LB.min and P LB.max are the minimum power and maximum power of lithium battery respectively; SOC min and SOC max are the minimum and maximum constraints of the state of charge respectively; Δ P max is the maximum allowable amplitude of instantaneous power variation of the proton exchange membrane fuel cell; The lower-level model predictive control strategy is based on the load sequence and the reference power matrix output by the upper-level model predictive control strategy [ ; ; ] to perform real-time energy scheduling, and the first set of control variables after each optimization[ ; ; ] as a control signal, acting on the first group of proton exchange membrane fuel cells, the second group of proton exchange membrane fuel cells and the lithium battery; The cost function of the lower-level model predictive control strategy includes:
[0125] in, Q otal is the total operating cost; F PENFC It is a penalty term set to make the two groups of proton exchange membrane fuel cells work efficiently; The constraints of the lower-level model predictive control strategy include:
[0126]
[0127]
[0128]
[0129] in, ε is the penalty coefficient; a 1 is the first weight coefficient, a 2 is the second weight coefficient.
[0130] Please refer to Figure 5 , the signal transmission process of the energy scheduling strategy includes: k At this time, SLF is based on history d Ship operation information and hydrological and meteorological information at each moment, output N P The upper layer MPC will optimize the 3× N p Dimensional ; ; ] is sent to the lower-level MPC, and the lower-level MPC gives a control signal based on the result. ; ; ], and complete the final energy scheduling. k The time is over, enter k+1After a period of time, SLF k-d+2 arrive k+1 The relevant information at the moment outputs the corresponding FSLS, and TRS makes the energy scheduling for the next moment, and so on.
[0131] In order to test the performance of the energy scheduling strategy provided in this application, relevant data are collected and simulation tests are carried out during the actual operation of the hybrid power system. First, the relevant data and parameters are introduced, and then the test results and analysis of 5 ship load prediction models and 3 ESS are provided.
[0132] The relevant parameters of the test object are shown in Table 1. The relevant data include the measured operation data of the hydrogen fuel cell ship during navigation and the synchronously monitored hydrological and meteorological data, with a time resolution of 1s.
[0133] Table 1 Basic parameters
[0134] The main parameters of the energy scheduling strategy ESS are shown in Table 2.
[0135] Table 2 ESS parameters
[0136] 1. Related elements screening The dimension of input data is an important factor affecting the performance of the ship load prediction model. Too high a dimension will increase the complexity of the model, and weakly correlated factors will affect the prediction effect. Therefore, the associated factors should be screened before establishing a ship load prediction model. This application uses the Pearson correlation analysis method to explore the potential correlation between ship operation information and hydrological and meteorological information and ship load to determine the associated factors used. The calculated correlation between each factor and the ship load is shown in the figure below. Figure 6 As shown, after removing the weakly correlated factors, this application uses ship load, propulsion motor speed, PEMFC total power, draft, speed, water flow velocity, and wind speed as related factors, a total of 7 types of factors.
[0137] 2. Multi-step prediction of ship load The change of ship load is closely related to the operating conditions, which can be mainly divided into three categories: cruising, transition (acceleration / deceleration), and operation. This section conducts simulation experiments on ship load prediction for these three conditions and a complete voyage.
[0138] Considering the real-time and accuracy requirements of the forecast, the length of the historical input element d is 30, and the rolling forecast N p step length, N in this application p is set to 5. When performing low-pass filtering, the cutoff frequency ωc The sampling frequency is 0.2 times, and the filter order n is 3. When VMD is used to decompose the high-frequency part of the ship load, q is 5 and α ranges from 1500 to 2500. The num_leaves range in LightGBM is 10-30, and the learning_rate range is 0.1-0.5. The specific values of α, num_leaves, and learning_rate are 100, 10, and 0.1 respectively, and are determined by grid search and prediction results.
[0139] Figure 7 The process of preprocessing historical correlation elements in a prediction to form the final input of the prediction model is given. First, the 7 types of correlation elements are filtered using LPF to obtain the low-frequency parts (L1, L2, …, L7) where the elements change slowly and the high-frequency parts (H1) where the ship load changes drastically. Subsequently, H1 is decomposed using VMD to obtain the corresponding stationary modes (H11, H12, …, H15). Finally, the low-frequency part is combined with the stationary mode to obtain the final input element sequence of the prediction model with a dimension of 12×30.
[0140] In order to evaluate the effectiveness of the proposed multi-step ship load prediction model in seconds, a comparative analysis was conducted with the four models of ARIMA, LightGBM, AW-LightGBM, and LPF-AW-LightGBM used in Ref.
[17] . Table 3 shows the average prediction indexes of the five ship load prediction models in multiple scenarios. ARIMA is a statistical method that only predicts based on the changing characteristics of the ship load itself. Therefore, the prediction performance in all scenarios is not as good as other models, especially in operating conditions with frequent load changes. LightGBM is a machine learning method that can take advantage of its own model advantages and fully consider the correlation between various factors and loads. Therefore, the prediction effect is worse than ARIMA. AW-LightGBM considers the importance of each input factor, and the prediction effect is improved. On this basis, LPF-AW-LightGBM further filters out the influence of high-frequency interference, and the prediction performance is further improved. The proposed LPF-VMD-AW-LightGBM model can not only explore the correlation between input factors and balance the importance of input factors, but also filter out the influence of irrelevant interference, so that the high-frequency part that can reflect the characteristics of ship load changes can participate in the prediction process in the form of a stationary mode. Therefore, the proposed model can adapt well to the uncertainty and high volatility of ship loads and has the best prediction performance compared with the other four prediction models. Compared with ARIMA, the proposed model reduces MAE by 42.3% and MAPE by 40.0% under the full voyage.
[0141] Table 3 Prediction of different modelsN p The average value of the prediction indicator at the step size
[0142] By observation Figure 8 , compared with the cruise state Figure 8 (a1) and Figure 8 The error value of (a2) in the working state Figure 8 (b1) and Figure 8 The error value shown in (b2) and the error value shown in the working state Figure 8 (c1) and Figure 8 The error value shown in (c2) in the figure. The LPF-VMD-AW-LightGBM load forecasting model has the best performance under the cruising condition where the ship load fluctuates smoothly. However, as the intensity of instantaneous load fluctuations increases, the uncertainty increases, the prediction error begins to increase, the distribution of the error diverges and the span becomes larger, and the prediction performance decreases accordingly.
[0143] 3. Two-layer real-time scheduling In order to verify the effectiveness of the proposed ESS, HIL tests were conducted based on the measured data set. RT-LAB and OP5700 are real-time software and real-time hardware simulation platforms provided by OPAL-RT, respectively. The combination of the two can realize HIL simulation. Optical fiber transmission is used for data communication between RT-LAB and OP5700. RT-LAB can compile the ESS and HPS models built in Matlab / Simulink into corresponding codes and transmit them to OP5700 for simulation tests. The simulation results can be monitored in real time by the host.
[0144] The equivalent consumption minimum strategy (ECMS), which has received widespread attention, is used as the benchmark strategy for the HIL test. The cost function of this strategy is to minimize the fuel consumption cost of the two types of energy supply equipment. At the same time, the scheduling results when SLF is not combined and only TRS is used for scheduling are given (called proposed-NoSLF). The constraints and parameter settings of all methods are the same. At present, there are a large number of optimization solution algorithms for MPC, which will not be discussed in depth here. This application uses the fmincon function in Matlab for optimization and solution, and the solver selects sequential quadratic programming.
[0145] Fig. 9 The energy distribution curve and DC bus voltage change curve of a complete flight are shown. Fig. 9 (a1) Fig. 9 (a2) and Fig. 9 The energy distribution curve of (a3) in Fig. 9 (b1) Fig. 9(b2) and Fig. 9 The changes in the DC bus voltage corresponding to the three models in (b3). It can be observed that PEMFC provides most of the energy required for the ship load. LB is an auxiliary energy supply device, which can not only assist PEMFC in providing energy for the hydrogen fuel cell ship when the ship load fluctuates, but also absorb the energy output by PEMFC from the DC bus, maintaining energy balance while ensuring the health of SOC. After calculation, under the proposed strategy, proposed-NoSLF strategy, and ECMS strategy, the fluctuation range of the DC bus voltage is 636.32V-650.49V, 636.30V-650.49V, and 635.79V-650.49V, respectively. The average difference from the rated voltage is 5.22V, 5.23V, and 5.25V, respectively. Under the proposed ESS, the fluctuation of the DC bus voltage is the smallest and the most stable.
[0146] Fig.10 and Fig.11 The efficiency curves of the entire PEMFC device and a single PEMFC group under different strategies are shown. Fig.11 (a1), Fig.11 (b1) and Fig.11 (c1) in , and Fig.11 (a2) Fig.11 (b2) and Fig.11 From (c2) in the figure, we can get the efficiency performance of the two groups of proton exchange membrane fuel cells under different scheduling strategies. Fig. 9 (a1) in Fig. 9 (a2) and Fig. 9 In (a3), compared with the other two strategies, in the ECMS strategy, the two groups of PEMFCs work more in a state of lower efficiency, and the average efficiency of the entire PEMFC device is the lowest, which is 49.83%. Because the proposed-NoSLF strategy optimizes the efficiency of PEMFC with the upper-level MPC, the average efficiency of the PEMFC device is improved compared with ECMS, which is 50.63%. The proposed strategy is based on TRS and combined with SLF, taking into account the fluctuation of ship load in the future, and the scheduling plan is more efficient. Therefore, in the proposed strategy, the average efficiency of the PEMFC device is the highest, which is 51.07%.
[0147] Fig.12 Middle (a), Fig.12 (b) and Fig.12 (c) in Figure 1 shows the cumulative change curves of various operating costs of different strategies in a complete voyage. Q LB.DEIn the first 3 hours, the three strategies Q PEMFC.DE Basically the same, but in the subsequent voyage, the ECMS strategy Q PEMFC.DE At the same time, after 5 hours, ECMS Q total It is also obviously the highest value. Fig.13 Shown Q PEMFC.c , Q PEMFC.h , Q PEMFC.l The consumption of performance degradation costs of the three types of PEMFCs is as follows: Under the three strategies, the number of start and stop times of PEMFC is 1. Q PEMFC.s The same, so no comparison is made here. It can be seen that when the proposed ESS is used, the three types of performance degradation costs are the lowest. And, no matter which strategy is used, Q PEMFC.h The largest share of performance degradation costs, Q PEMFC.h The proportion is the smallest.
[0148] Tables 4 and 5 show the operating costs of different strategies in multiple scenarios, as well as the savings compared with the ECMS strategy. Q total In a complete voyage, the proposed ESS has the lowest fuel cost and performance degradation cost, followed by the proposed-NoSLF strategy, and the highest is the ECMS strategy. As it can comprehensively consider the fuel cost, performance degradation cost, and fluctuation of ship load, the proposed ESS makes it more efficient compared with the ECMS strategy. Q total It decreased by about 1.6%. Q PEMFC.DE It decreased by about 25.2%. Q LB.DE The proposed ESS also performs well under the three typical operating conditions, especially under the operating condition where the ship load fluctuates violently. Q total It has been reduced by about 12.8%, saving the total operating cost to a great extent.
[0149] Table 4 Operation cost of each strategy under the complete voyage
[0150] Table 5 Operating costs of various strategies under different working conditions
[0151] In summary, the proposed TRS can effectively reduce the fuel cost and performance degradation cost of hydrogen fuel cell ships. On this basis, combined with SLF, the two operating costs can be further reduced. This is because the FSLS provided by SLF enables TRS to fully consider the fluctuation of ship load at future times when performing energy scheduling, making the final energy scheduling more practical and efficient.
[0152] Fig.12 (d) in Figure 2 shows the SOC variation curves of different strategies in a complete voyage. The final SOCs of ECMS, proposed-NoSLF, and the proposed ESS are 53.97%, 54.20%, and 54.26%, respectively. The final SOC of the proposed ESS is relatively high. At the same time, in the ECMS strategy, the SOC decrease rate is the fastest, which is not conducive to the health of the LB and accelerates the performance degradation of the LB, making Q LB.DE is the maximum value among the three strategies. The proposed-NoSLF strategy takes into account the performance degradation of LB, so its SOC change curve is smoother. Q LB.DE Compared with the ECMS strategy, the SOC fluctuation of the proposed ESS is the most stable because it can accurately predict the ship load at the future moment on the basis of the proposed-NoSLF, which helps to improve the performance and life of the LB. Q LB.DE is the minimum value among the three.
[0153] SLF is an important component of the proposed ESS, and the accuracy of the FSLS it provides will directly affect the performance of the proposed ESS. Therefore, by combining TRS with prediction models of different accuracies, the influence of the multi-step prediction accuracy of ship load on the energy scheduling results is explored.
[0154] The operating costs of the six combinations are as follows: Fig.14 (a) Fig.14 (b) and Fig.14 As shown in (c) in the figure. When the proposed ship load forecasting model is used, both the total cost and the performance degradation cost are the minimum among the six combinations. As the accuracy of the forecasting model decreases, all kinds of operating costs increase. It is worth noting that compared with the proposed-NoSLF strategy without SLF, the ARIMA model with poor forecasting accuracy is Q total , Q PEMFC.DE , Q LB.DETherefore, the performance of the ship load prediction model is crucial to improving the economy and durability of hydrogen fuel cell ships.
[0155] This application proposes a double-layer real-time energy scheduling strategy for hydrogen fuel cell ships combined with multi-step prediction of ship load. After HIL simulation, this strategy can effectively improve the economy and durability of hydrogen fuel cell ship operation by combining multi-step prediction of ship load with double-layer MPC. The specific conclusions are as follows: The proposed multi-step ship load prediction model takes into account the accuracy and real-time performance of the prediction, as well as the high volatility and uncertainty of the ship load. The high-frequency interference of the associated factors is filtered out by LPF, and the high-frequency ship load is decomposed by VMD to retain the load variation characteristics, which enables the prediction model to significantly improve the prediction performance while meeting the real-time scheduling. Compared with ARIMA, the proposed model can reduce MAE and MAPE by more than 40% in multiple scenarios.
[0156] The proposed double-layer MPC energy scheduling model for hydrogen fuel cell ships can improve the efficiency of PEMFC devices while improving the economy and durability to a certain extent. On this basis, the performance of ESS can be further improved by combining it with the proposed ship load prediction model. Compared with ECMS, the proposed ESS can reduce fuel costs and performance degradation costs in multiple scenarios. At the highest, it can achieve Q total , Q PEMFC.DE , Q LB.DE Reduced by 12.8%, 25.2% and 17.8%.
[0157] In some embodiments, the energy dispatching device of the hybrid power system may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the energy dispatching device of the hybrid power system may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) The function of energy scheduling of hybrid power system.
[0158] In this embodiment, the energy dispatching device of the hybrid power system can be divided into multiple functional modules according to the functions it performs, such as Fig.15 As shown. The functional modules of the device may include: a data acquisition module, a load forecasting module and a strategy optimization module. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0159] A data acquisition module, used to acquire detection data within a first time limit; A load forecasting module, used for inputting the detection data into a load forecasting model to obtain a load sequence within a second time limit output by the load forecasting model; A strategy optimization module, used for inputting the load sequence into a pre-built two-layer real-time scheduling model to obtain an energy scheduling strategy; The load forecasting model includes a low-pass filter, a variational mode decomposer, and an adaptive weighted lightweight gradient boosting machine; The two-layer real-time scheduling model includes two-layer model predictive control strategies; The first time limit is before the current time node, and the second time limit is after the current time node.
[0160] Fig.16 The energy scheduling method of the hybrid power system provided for the embodiment of the present application can be applied to the device. It can be understood by those skilled in the art that the device structure involved in the embodiment of the present invention does not constitute a limitation on the device, and the device may include more or less components than shown, or combine certain components, or arrange different components. In an embodiment of the present invention, the device includes but is not limited to a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown in this application, their connections and relationships, and their functions are only examples, and are not intended to limit the implementation of the embodiments of the present application described and / or required in this application.
[0161] The device may include: a processor, a memory and a communication unit. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention. It may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0162] The memory can be used to store the execution instructions of the processor, and the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory are executed by the processor, the device is enabled to perform some or all of the steps in the following method embodiments.
[0163] The processor is the control center of the storage device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and / or processes data by running or executing software programs and / or modules stored in the memory, and calling data stored in the memory. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor can only include a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0164] The communication unit is used to establish a communication channel so that the storage device can communicate with other devices, receive user data sent by other devices or send user data to other devices.
[0165] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0166] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer device (which can be a personal computer, a server, or a second device, a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0167] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0168] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0169] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0170] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0171] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.
Claims
1. A method for energy scheduling of a hybrid power system, characterized in that: include: Obtaining test data within a first time limit; Inputting the detection data into a load forecasting model to obtain a load sequence within a second time limit output by the load forecasting model; Inputting the load sequence into a pre-built two-layer real-time scheduling model to obtain an energy scheduling strategy; The load forecasting model includes a low-pass filter, a variational mode decomposer, and an adaptive weighted lightweight gradient boosting machine; The two-layer real-time scheduling model includes two-layer model predictive control strategies; The first time limit is before the current time node, and the second time limit is after the current time node.
2. The method according to claim 1, characterized in that Obtain test data within the first time limit, including: A plurality of correlation factors associated with the load are mined in advance from the ship operation information and the hydrological and meteorological information using the Pearson correlation analysis method, wherein the plurality of correlation factors include the ship load, the propulsion motor speed, the total power of the proton exchange membrane fuel cell, the draft, the speed, the water flow velocity, and the wind speed; Periodically collecting detection values of a plurality of the associated elements to obtain data sequences of the plurality of the associated elements; The detection data within a first time period is extracted from the data sequence using a time window.
3. The method according to claim 1, characterized in that The load forecasting model includes: The low-pass filter decomposes the detection value of each correlation element into a low-frequency part and a high-frequency interference part reflecting the respective change trends. The low-pass filter includes a transfer function. H(jω) for: ω is the frequency of the original signal, ω c is the cutoff frequency of the original signal; n is the order of the filter; The variational modal decomposer performs a stabilization process on the high-frequency interference part of the detection value, and the stabilization process includes constructing a variation and solving a variation, and the constructing a variation includes a process of solving m modal components by Hilbert transform: in, u is the original signal; Q is the number of modes after decomposition; z q and ω q They are q modes and corresponding center frequencies; It is the partial derivative operation with respect to time; δ t is the unit impulse function; The variation is solved using an augmented Lagrangian function, wherein the augmented Lagrangian function includes: Among them, γ and α are the Lagrange multiplier and penalty coefficient respectively.
4. The method according to claim 3, characterized in that The adaptive weight lightweight gradient boosting machine includes: Substitute the original input factors and ship loads into the lightweight gradient boosting machine for initial training; Calculate the importance of each input feature β k : in, a k is the number of times the kth input element is used; K is the number of input elements; Calculates the weight matrix for the input features w k ; in, softmax is the normalization function; The original input features are weighted and then substituted into the lightweight gradient boosting machine for retraining to obtain an adaptive weight lightweight gradient boosting machine.
5. The method according to claim 4, characterized in that The method further comprises: The performance of the load forecasting model is evaluated using evaluation indicators, and the evaluation indicators include: Mean absolute error: ; Mean absolute percentage error: ; in, Z is the number of samples; and Respectively k The actual and predicted values of the ship load.
6. The method according to claim 1, characterized in that The method for constructing the two-layer real-time scheduling model includes: Pre-constructing the fuel cost function and performance degradation cost function of the proton exchange membrane fuel cell, and the fuel cost function and performance degradation cost function of the lithium battery; Based on the fuel cost function and performance degradation cost function of proton exchange membrane fuel cells, as well as the fuel cost function and performance degradation cost function of lithium batteries, the cost function and constraints of the double-layer real-time scheduling model are constructed.
7. The method according to claim 6, characterized in that Pre-built fuel cost functions and performance degradation cost functions for proton exchange membrane fuel cells, as well as fuel cost functions and performance degradation cost functions for lithium batteries, including: Hydrogen consumption rate of proton exchange membrane fuel cells The calculation methods include: in, P PEMFC is the output power of the proton exchange membrane fuel cell, η PEMFC is the efficiency of the proton exchange membrane fuel cell, κ H is the calorific value of hydrogen; Fuel cost of proton exchange membrane fuel cells Q PEMFC.H The calculation methods include: in, W H is the selling price of hydrogen; m H is the mass of hydrogen; m H = ×t; Defining the performance degradation cost due to power fluctuation based on the performance degradation causes of proton exchange membrane fuel cells Q PEMFC.c , Performance degradation costs due to power exceeding the maximum limit Q PEMFC.h , performance degradation costs due to power below the minimum limit Q PEMFC.l , Performance degradation costs due to start-stop Q PEMFC.s , the calculation methods include: in, W PEMFC is the selling price of proton exchange membrane fuel cells, μ c For calculation Q PEMFC.c The degradation coefficient of μ h For calculation Q PEMFC.h The degradation coefficient of μ l For calculation Q PEMFC.l The degradation coefficient of μ s For calculation Q PEMFC.s The degradation coefficient of P PEMFC.e is the rated power of the proton exchange membrane fuel cell, P PEMFC.max is the maximum power of the proton exchange membrane fuel cell, P PEMFC.A is the instantaneous power variation amplitude of the proton exchange membrane fuel cell; U limit is the voltage drop limit of the proton exchange membrane fuel cell; Δ t is the running time; δ ( t ) is the state of the proton exchange membrane fuel cell, which is 0 when it is turned off and 1 when it is running; Performance degradation costs of proton exchange membrane fuel cells Q PEMFC.DE It is expressed as: ; The calculation method of the output power of lithium batteries includes: in, U oc is the open circuit voltage of the lithium battery, I LB is the output current of the lithium battery, R in is the internal resistance of the lithium battery; The calculation method of the state of charge SOC of the lithium battery includes: in, SOC 0 is the initial SOC of the lithium battery, C LB is the capacity of the lithium battery; The equivalent hydrogen consumption theory is used to convert the energy output by the lithium battery into the corresponding hydrogen mass. The equivalent hydrogen consumption mass of the lithium battery per second is Approximately equivalent to: in, U LB is the output voltage of the lithium battery, η ch is the charging efficiency of the lithium battery, η dis is the discharge efficiency of the lithium battery, P LB is the output power of the lithium battery, η LB is the efficiency of lithium batteries; Equivalent fuel cost of lithium batteries Q LB.H It is expressed as: ; Performance degradation costs of lithium batteries Q LB.DE It is expressed as: in, μ LB is the balance coefficient of the lithium battery; W LB is the selling price of lithium batteries, SOH The health status of the lithium battery. M The maximum number of cycles for a lithium battery.
8. The method according to claim 7, characterized in that Based on the fuel cost function and performance degradation cost function of proton exchange membrane fuel cells, as well as the fuel cost function and performance degradation cost function of lithium batteries, the cost function and constraints of the double-layer real-time scheduling model are constructed, including: The expression of the model predictive control strategy based on the discrete state space model is: in, A , B , C is the coefficient matrix; x ( k ), u ( k ), y ( k ) are the state variable, control variable and output variable matrices respectively; x ( k )for[ ; ; SOC ], u ( k )and y ( k )for[ ; ; ], the values of the control variables and the output variables are the same, which are the three output powers in the matrix; among them, is the hydrogen consumption rate of the first group of proton exchange membrane fuel cells, is the hydrogen consumption rate of the second group of proton exchange membrane fuel cells, SOC is the state of charge of the lithium battery, is the output power of the first group of proton exchange membrane fuel cells, is the output power of the second group of proton exchange membrane fuel cells, is the output power of the lithium battery; The upper model predictive control strategy uses the load sequence as the constraint value of the power balance within the prediction step, and the output size is 3× N p The reference power matrix [ ; ; ] is given to the lower-level MPC as a soft constraint of the lower-level MPC. The cost function of the upper-level model predictive control strategy is: in, η PEMFC1 (h) is the hourly efficiency of the first set of proton exchange membrane fuel cells; η PEMFC2 (h) is the hourly efficiency of the first set of proton exchange membrane fuel cells; P PEMFC2 (h) is the hourly power output of the first set of proton exchange membrane fuel cells; P PEMFC2 (h) is the output power per hour of the second group of proton exchange membrane fuel cells; h represents the index of the time, h=k represents the time k, and h=k+1 represents the time k+1; The constraints of the upper model predictive control strategy are: in, P PEMFC.min is the minimum power of a proton exchange membrane fuel cell; P LB.min and P LB.max are the minimum power and maximum power of lithium battery respectively; SOC min and SOC max are the minimum and maximum constraints of the state of charge respectively; Δ P max is the maximum allowable amplitude of instantaneous power variation of the proton exchange membrane fuel cell; The lower-level model predictive control strategy is based on the load sequence and the reference power matrix output by the upper-level model predictive control strategy [ ; ; ] to perform real-time energy scheduling, and the first set of control variables after each optimization[ ; ; ] as a control signal, acting on the first group of proton exchange membrane fuel cells, the second group of proton exchange membrane fuel cells and the lithium battery; The cost function of the lower-level model predictive control strategy includes: in, Q otal is the total operating cost; F PENFC It is a penalty term set to make the two groups of proton exchange membrane fuel cells work efficiently; The constraints of the lower-level model predictive control strategy include: in, ε is the penalty coefficient; a 1 is the first weight coefficient, a 2 is the second weight coefficient.
9. The method according to claim 8, characterized in that The method further comprises: Define the current moment as k, the time limit for detecting data as d moments, and the length of the load sequence as N P , when k The time is over, enter k+1 After that, the load forecasting model is based on k-d+2 arrive k+1 The relevant information of the moment is output, and the corresponding load sequence is output. The two-layer real-time scheduling model generates the energy scheduling matrix of the next moment based on the load sequence.
10. An energy dispatching device for a hybrid power system, characterized in that: include: A data acquisition module, used to acquire detection data within a first time limit; A load forecasting module, used for inputting the detection data into a load forecasting model to obtain a load sequence within a second time limit output by the load forecasting model; A strategy optimization module, used for inputting the load sequence into a pre-built two-layer real-time scheduling model to obtain an energy scheduling strategy; The load forecasting model includes a low-pass filter, a variational mode decomposer, and an adaptive weighted lightweight gradient boosting machine; The two-layer real-time scheduling model includes two-layer model predictive control strategies; The first time limit is before the current time node, and the second time limit is after the current time node.
Citation Information
Patent Citations
Multi-energy park scheduling method and system based on double-layer reinforcement learning
CN111181201A
Energy Dispatch Method for Wind-Solar-Storage-Off-Grid Hydrogen Production Systems Based on Adaptive MPC
CN116805803A
Virtual power plant optimization scheduling method based on parameter optimization variational mode decomposition
CN117150701A
Energy management model predictive control method of integrated energy system
CN117674113A
Hydrogen energy ship energy management method and system combined with instantaneous load prediction
CN119106872A