A data-driven real-time energy management method for low-carbon ship microgrids

Through long and short-term memory neural networks and random forest algorithms, combined with synchronous back-generation method, a net load scenario set that considers prediction errors is generated, and a random model predictive control energy management model is established, which solves the problem that traditional strategies are difficult to manage photovoltaics and load uncertainty. , real-time energy management and optimization of low-carbon marine microgrids.

CN114498753BActive Publication Date: 2024-12-03WUHAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210160754.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-22
Publication Date
2024-12-03
Estimated Expiration
2042-02-22

AI Technical Summary

Technical Problem

Traditional real-time energy management strategies such as electricity consumption without considering uncertainty factors - electricity maintenance type, equivalent fuel consumption, etc. are difficult to meet the strategic optimization needs of low-carbon marine microgrids, and it is difficult to effectively manage photovoltaic and load uncertainties.

Method used

Long and short-term memory neural network is used to perform multi-step prediction of photovoltaic and load rolling, and the correlation of prediction errors is described through kernel density estimation and multi-dimensional joint normal distribution, and a net load scenario set is generated by combining the synchronous back-generation method, and a random model prediction control is established. The energy management model aims to minimize the sum of the operating cost and the state of charge deviation penalty cost, and uses a random forest algorithm to perform multivariate regression to approximate the solution control action.

Benefits of technology

The generated real-time energy management strategy is more in line with the uncertainty characteristics of photovoltaics and loads, providing lower prediction errors and better optimization performance, taking into account the real-time and optimization of energy management, reducing the calculation amount, and making the strategy in It can be used in real-time in low-level control hardware, achieving optimization of ship energy management and energy conservation and emission reduction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114498753B_ABST
    Figure CN114498753B_ABST
Patent Text Reader

Abstract

The present invention provides a data-driven low-carbon ship microgrid real-time energy management method. First, a ship net load scenario set considering the time series correlation of prediction error is established through prediction error fitting, equal probability inverse transformation scenario set generation, and synchronous back-substitution scenario set reduction; secondly, a random model predictive control energy management model with the minimum expected sum of the control action operation cost and the charge state deviation penalty cost under each scenario is established by combining the scenario set information and rolling optimization and feedback correction mechanism; then, a large number of training data samples are generated based on the random model predictive control, and the random forest algorithm is trained to perform multivariate regression on the data samples; the data-driven random model predictive control real-time energy management strategies under three different power level loads of low, medium and high are obtained respectively. The present invention has important practical significance for exploring practical and feasible ship energy conservation and emission reduction measures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of low-carbon ship microgrid energy management, and in particular to a data-driven low-carbon ship microgrid real-time energy management method. Background Art

[0002] The shipping industry is responsible for 80% of global transportation and 3% of global CO2 and 14-15% of NO x and 4–9% SO x , which has had a serious impact on the global environment. Therefore, the Marine Environment Protection Committee of the International Maritime Organization has begun to use the energy efficiency design index of new ships as a mandatory indicator for ship acceptance since the 62nd environmental protection meeting. This move has prompted ships to gradually replace traditional fossil energy with zero-carbon energy such as solar energy. The application of photovoltaics can obtain zero-carbon solar energy anytime and anywhere, which is one of the most feasible and effective measures to achieve zero carbon emissions for ships.

[0003] However, uncertainties such as photovoltaics and loads will bring great challenges to the real-time operation of ship microgrids. Traditional real-time energy management strategies that do not consider uncertainty factors, such as power consumption-power maintenance type and equivalent fuel consumption minimum, are difficult to meet the needs of strategy optimization. Summary of the invention

[0004] The purpose of the present invention is to comprehensively consider the joint operation of three stages: error scenario set generation, random optimization energy management and data-driven energy management, and provide a real-time energy management strategy that eliminates the influence of uncertain factors, takes into account both strategy optimization and real-time requirements, and realizes energy conservation and emission reduction in low-carbon ship microgrids, thereby solving the technical problem of poor management effect of existing methods.

[0005] In order to solve the above technical problems, the present invention provides a data-driven low-carbon ship microgrid real-time energy management method, comprising:

[0006] S1: Use long short-term memory neural network to carry out rolling multi-step forecasting of photovoltaic and load, make multiple forecasts in the forecast domain, obtain the forecast value vector without considering the forecast error, obtain the statistical sample of the forecast error at each time scale, and perform kernel density estimation on the probability distribution of the forecast error variable at each time scale;

[0007] S2: The random error variables of each time scale in the prediction domain are used to form a random error vector, and the correlation is described by multidimensional joint normal distribution to obtain the correlation between the random error variables of each time scale;

[0008] S3: The random error vector satisfying the multi-dimensional joint normal distribution is mapped into a prediction error vector through an equal probability inverse transformation, and the prediction error vector obtained by mapping is superimposed with the prediction value vector without considering the prediction error to obtain a prediction vector considering the prediction error. The prediction vector considering the prediction error is a scenario, which includes S photovoltaic scenarios and S load scenarios.

[0009] S4: For S photovoltaic scenarios and S load scenarios, we can combine them in pairs to obtain S 2 The net load scenario set of the scenarios is used to reduce similar scenarios to S by synchronous back-substitution method, which is used as the net load scenario set input of the stochastic model predictive control energy management model predictive control;

[0010] S5: Establish a stochastic model predictive control energy management model, in which the model takes the expected minimum sum of the operating cost and the charge state deviation penalty cost as the objective function, and the equality constraint and inequality constraint as the constraint condition;

[0011] S6: The sample generation method is used to generate training data samples, and the random forest algorithm is trained to perform multivariate regression on the training data samples, so as to approximate the control actions of the random model predictive control, solve the random model predictive control energy management model, and obtain the data-driven random model predictive control real-time energy management strategy.

[0012] In one embodiment, in step S1, the rolling multi-step forecast of load includes:

[0013] S1.1: Input the actual historical load values ​​from time t–10 to time t into the long short-term memory neural network, and output the load forecast value at time t+1, where t is the variable at the start time of the forecast domain;

[0014] S1.2: The load forecast value at time t+1 is input into the long short-term memory neural network as the actual load value at time t+1, and the output is the load forecast value at time t+2;

[0015] S1.3: Repeat the prediction process of steps S1.1 to S1.2 until t+N p Moment, N p is the prediction domain length;

[0016] The statistical samples of the prediction errors at each time scale are:

[0017] [E i,1 ,E i,2 ,...,E i,n ]

[0018] In the formula, E i,1 is the first prediction error statistical sample under time scale i; E i,2is the second prediction error statistical sample under time scale i; E i,n is the nth prediction error statistical sample at time scale i;

[0019] The kernel density estimate is:

[0020]

[0021]

[0022] In the formula, is the prediction error variable e i The kernel density estimation probability density function; e i is the prediction error variable under time scale i; n is the total number of prediction error statistical samples; h is the window width; j is the prediction error statistical sample variable; E i,j is the jth prediction error statistical sample under time scale i; h best is the optimal window width; σ is the normal distribution standard deviation of the prediction error statistical sample.

[0023] In one implementation, in step S2, the random error vector is:

[0024]

[0025] Where, e is the random error vector; e1 is the random error variable under time scale 1; e2 is the random error variable under time scale 2; is the time scale N p The random error variable under

[0026] The multidimensional joint normal distribution is:

[0027]

[0028] Where f(e) is the probability density function of the multidimensional joint normal distribution of the random error vector e; e is the random error vector; σ 2 is the covariance matrix;

[0029] The covariance matrix is:

[0030]

[0031] In the formula, σ 2 is the covariance matrix; σ 1,1 is the variance of the random error variable at time scale 1; σ 1,2 is the covariance of the random error variable of time scale 1 and the random error variable of time scale 2; is the random error variable of time scale 1 and time scale N p Covariance of random error variables; σ2,1 is the covariance of the random error variable of time scale 2 and the random error variable of time scale 1; σ 2,2 is the variance of the random error variable at time scale 2; is the random error variable of time scale 2 and time scale N p covariance of random error variables; is the time scale N p covariance of the random error variable and the time scale 1 random error variable; is the time scale N p covariance of the random error variable and the time scale 2 random error variable; is the time scale N p the variance of the random error variable;

[0032] The covariance matrix of the distribution is estimated using the exponential function method, which is:

[0033]

[0034] In the formula, σ m,n is the covariance of the random error variable of time scale m and the random error variable of time scale n; m and n are both time scale variables; ε is the correlation coefficient.

[0035] In one embodiment, in step S3,

[0036] The inverse transform with equal probability is:

[0037]

[0038] Where F(e) is the cumulative probability distribution function of the multidimensional joint normal distribution of the random error vector e; e is the random error vector; is the kernel density estimated cumulative probability distribution function of the prediction error vector ΔP; ΔP is the prediction error vector; It is the inverse function of the kernel density estimation cumulative probability distribution function of the multidimensional joint normal distribution cumulative probability distribution function F(e);

[0039] The prediction error vector is:

[0040]

[0041] Where ΔP is the prediction error vector; ΔP1 is the prediction error variable at time scale 1; ΔP2 is the prediction error variable at time scale 2; is the time scale N p The prediction error variable under ;

[0042] The predicted value vector without considering the prediction error is:

[0043]

[0044] Where P is the predicted value vector without considering the prediction error; P1 is the predicted value variable under time scale 1; ΔP2 is the predicted value variable under time scale 2; is the time scale N p The predictor variables under

[0045] The predicted value vector considering the prediction error is:

[0046] P pre =P+ΔP

[0047] Where P pre is the predicted value vector taking into account the prediction error.

[0048] In one implementation, in step S4, the kth scenario in the net load scenario set satisfies:

[0049] P net,k =P d,i -P pv,j

[0050] Where P net,k is the kth net load scenario; P d,i is the i-th load scenario; P pv,j is the jth photovoltaic scenario;

[0051] The steps of synchronous back-substitution are as follows:

[0052] S4.1: Enter the initial net load scenario set;

[0053] S4.2: Eliminate the scenario with the smallest sum of Kantorovich distances from other scenarios in the initial net load scenario set;

[0054] S4.3: Decrease the total number of scenes by 1;

[0055] S4.4: add the probability of the eliminated scene to the scene with the closest Kantorovich distance;

[0056] S4.5: Determine whether the total number of scenes in the scene set is greater than the required number of scenes S. If it is less than or equal to, output the remaining scenes and their scene probabilities. If it is greater, go to step S4.2 to continue execution.

[0057] In one embodiment, in step S5,

[0058] The running cost is:

[0059]

[0060]

[0061] In the formula, is the operating cost of the ship microgrid at time t+k under the net load scenario s; PF and PE are the fuel cost coefficient and emission cost coefficient of the diesel generator respectively; is the fuel consumption rate of the diesel generator at time t+k under net load scenario s; is the power generation of the diesel generator at time t+k under the net load scenario s; k2, k1, k0 are the fuel consumption fitting coefficients of the diesel generator; Δt is the length of the unit time interval; is the start and stop variable of the diesel generator at time t+k under the net load scenario s; C st The cost of starting a diesel generator once;

[0062] The penalty cost for SOC deviation is:

[0063]

[0064]

[0065] In the formula, is the penalty cost of the battery state of charge deviating from the reference state of charge at time t+k under net load scenario s; α is the penalty coefficient of the battery state of charge deviating from the reference state of charge; For net load scenario s, t+N p The battery's state of charge at the time; =t+N p At time S, the reference value of the battery state of charge; SOC,max is the maximum value of the battery state of charge; S SOC,min is the minimum value of the battery state of charge; N is the total number of optimizations for a single voyage; t is the variable at the start time of the prediction domain; N p is the prediction domain length;

[0066] The objective function is:

[0067]

[0068] In the formula, u t+1 is the control variable at time t+1; J t+1 is the objective function at time t+1; ρ s is the probability of net load scenario s; is the operating cost of the ship microgrid at time t+k under net load scenario s; is the penalty cost of the battery state of charge deviating from the reference state of charge at time t+k under net load scenario s; s is the net load scenario variable; S is the total number of net load scenarios; k is the moving variable at the starting time; N p is the prediction domain length;

[0069] Equality constraints include:

[0070] Power balance constraints:

[0071]

[0072]

[0073]

[0074] Consistency constraints:

[0075]

[0076] In the formula, is the battery charging power at time t under net load scenario s; is the load power of the ship microgrid at time t under the net load scenario s; is the photovoltaic power generation power at time t under net load scenario s; is the power generated by the diesel generator at time t under net load scenario s; is the discharge power of the battery at time t under net load scenario s; is the light intensity at time t under net load scenario s; S pv is the total photovoltaic area; η pv is the photovoltaic efficiency; is the power generated by the diesel generator at time t under the net load scenario s+1; s is the net load scenario variable;

[0077] Inequality constraints include:

[0078] Energy storage capacity constraints:

[0079]

[0080] Power limit constraints:

[0081]

[0082]

[0083]

[0084] Climbing slope constraint:

[0085]

[0086] Boot time constraints:

[0087]

[0088] In the formula, S SOC,min is the minimum value of the battery state of charge; S is the battery state of charge at time t under net load scenario s; SOC,max is the maximum value of the battery state of charge; is the battery charging power at time t under net load scenario s; P b,ch,max The maximum charging power for the battery; is the discharge power of the battery at time t under net load scenario s; P b,dis,max is the maximum value of battery discharge power; is the power generated by the diesel generator at time t under net load scenario s; P g,max The maximum power generated by the diesel generator; is the power generated by the diesel generator at time t–1 under the net load scenario s; Δt is the length of the unit time interval; r g,max is the maximum climbing slope of the diesel generator; is the start and stop variable of the diesel generator at time t under the net load scenario s; is the start and stop variable of the diesel generator at time t–1 under the net load scenario s; is the start-stop variable of the diesel generator at time τ under the net load scenario s; τ is the variable at any time during the diesel generator startup period; t is the variable at the start time of the prediction domain; T g,min,on The minimum time for the diesel generator to remain in the on state.

[0089] In one embodiment, the operation steps of the stochastic model predictive control energy management model in step S5 are as follows:

[0090] S5.1: Divide the prediction domain into N p The length of the unit time interval is Δt, k is the moving variable at the starting time, t is the variable at the starting time of the prediction domain, and the initial value of k is 0;

[0091] S5.2: The starting time of the prediction domain is t+kΔt. The data predicted by PV and load in the prediction domain are used, the net load scenario and its probability are comprehensively considered, and the objective function is minimized while satisfying the constraints. The dynamic programming algorithm is used to solve the control variables at time t+k+1, the control variables at time t+k+1 are executed, and the state variables at time t+k+1 are updated according to the state transfer equation;

[0092] S5.3: k value increases by 1;

[0093] S5.4: Determine whether t+kΔt is greater than the total number of optimization times N for a single voyage. If so, terminate the operation; if not, proceed to step S5.2 to continue.

[0094] In one embodiment, in step S5.2, the state transfer equation is:

[0095]

[0096] In the formula, x s,t+1 is the state variable at time t+1 under net load scenario s; u s,t+1 is the control variable at time t+1 under net load scenario s; f(x s,t ,u s,t+1 ) is the state variable x s,t+1 , control variable u s,t+1 The state transfer equation under SOC is the state of charge of the battery; u is the control variable; P b is the charging and discharging power of the battery.

[0097] In one implementation, in step S6, the training data sample generation step is:

[0098] S6.1: Battery state of charge at time t under net load scenario s Perform random uniform sampling within the minimum and maximum range of the battery state of charge;

[0099] S6.2: Perform Latin hypercube sampling according to a certain distribution and get t+N p At time, the reference value of battery charge state Will Considered together as the state vector x;

[0100] S6.3: Rolling selection and prediction domain length N every unit time interval Δt p Cluster the photovoltaic and load data sequences of equal length, and calculate the mean vector and covariance matrix of different categories of data based on the clustering results;

[0101] S6.4: Based on the statistical results of the mean vector and the covariance matrix, a multivariate joint normal distribution is used to randomly generate a photovoltaic and load data sequence in the prediction domain as a scenario vector s, and the scenario vector s and the state vector x are input into the random model predictive control together, and the control variable u is obtained by running;

[0102] S6.5: After multiple runs, we get m sets of training data samples [(s (1) ,x (1) ,u (1) ),(s (2) ,x (2) ,u (2) ),...,(s (m) ,x (m) ,u(m) )], where s∈R 20 , x∈R 2 , u∈R 1 ,(s (1) ,x (1) ,u (1) ) is the first set of training data samples, (s (m) ,x (m) ,u (m) ) is the mth group of training data samples, R 20 , R 2 and R 1 They are respectively the 20-dimensional real number field, the 2-dimensional real number field and the 1-dimensional real number field.

[0103] In one embodiment, in step S6, the data driven stochastic model predictive control strategy is:

[0104]

[0105] Where ζ is the random forest algorithm parameter, which is determined by data sample training; j is the training data sample variable; m is the total number of training data samples; f ζ (s j ,x j ) is the scene variable s j and the state variable x j Data-driven stochastic model predictive control strategy under j is the scene variable in the jth training data sample; x j is the state variable in the jth training data sample; u j is the control variable in the jth training data sample.

[0106] The above one or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:

[0107] The present invention provides a data-driven low-carbon ship microgrid real-time energy management method. Based on the steps of probability prediction, equal probability inverse transformation scenario set generation, synchronous back substitution scenario set reduction, etc., a net load scenario set considering the time series correlation of prediction error is generated, which is more in line with the actual photovoltaic, load uncertainty and volatility characteristics; based on the generated net load scenario set, a random model predictive control energy management strategy is established based on a rolling optimization mechanism to provide a real-time energy management strategy with lower prediction error and better optimization performance; combined with the limited computing power of the actual software and hardware environment of the ship microgrid and the requirements of real-time energy management, the balance between energy management optimization and real-time performance is comprehensively considered, and the optimization solution process of the random model predictive control is replaced by a machine learning algorithm. While retaining most of the optimization performance of the random model predictive control, its calculation amount is effectively reduced, and the energy management strategy is realized. Real-time application in low-level ship control hardware such as programmable logic controllers and low-level programming languages ​​is achieved, and a balance between ship energy management optimization and real-time applicability is achieved, providing users with practical ship microgrid real-time energy management strategies and energy-saving and emission reduction measures. Since the real-time and optimization of the strategy are taken into account at the same time, the management effect is improved, which has important practical significance for exploring practical measures for ship energy conservation and emission reduction. BRIEF DESCRIPTION OF THE DRAWINGS

[0108] 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, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0109] Figure 1 This is a structural diagram of a low-carbon ship microgrid according to the present invention;

[0110] Figure 2 This is a load rolling multi-step prediction operation block diagram of the present invention;

[0111] Figure 3 This is a block diagram of the random model predictive control operation of the present invention;

[0112] Figure 4 It is a power curve diagram of photovoltaic and loads of different power levels in an embodiment of the present invention;

[0113] Figure 5 A curve diagram showing changes in the open circuit voltage and internal resistance of a battery as a function of the state of charge in an embodiment of the present invention;

[0114] Figure 6 A battery state of charge curve diagram for different power level loads in an embodiment of the present invention;

[0115] Figure 7It is a power curve diagram of a diesel generator at different power level loads in an embodiment of the present invention;

[0116] Figure 8 It is an overall framework diagram of the data-driven low-carbon ship microgrid real-time energy management strategy in an embodiment of the present invention. DETAILED DESCRIPTION

[0117] The inventors of this application have discovered through extensive research and practice that, at present, traditional real-time energy management strategies such as power consumption that does not take uncertainty factors into consideration, such as power maintenance type and equivalent fuel consumption minimum type, are already difficult to meet the needs of strategy optimization. Therefore, how to eliminate the impact of uncertainty factors through energy management and take into account both the real-time and optimization of the strategy has become a key issue that needs to be solved urgently.

[0118] The main inventive concepts of the present invention are as follows:

[0119] Firstly, a ship net load scenario set considering the time series correlation of prediction error is established through prediction error fitting, equal probability inverse transformation scenario set generation, and synchronous back-substitution scenario set reduction; secondly, a random model predictive control energy management model with the minimum expected sum of control action operation cost and charge state deviation penalty cost in each scenario is established by combining scenario set information and rolling optimization and feedback correction mechanism; then, a large number of training data samples are generated based on random model predictive control, and the random forest algorithm is trained to perform multivariate regression on the data samples; the data-driven random model predictive control real-time energy management strategies under three different power level loads of low, medium and high are obtained respectively. The real-time energy management strategy of the present invention has important practical significance for exploring practical and feasible ship energy conservation and emission reduction measures.

[0120] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 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 are within the scope of protection of the present invention.

[0121] The embodiment of the present invention provides a data-driven low-carbon ship microgrid real-time energy management method, comprising:

[0122] S1: Use long short-term memory neural network to carry out rolling multi-step forecasting of photovoltaic and load, make multiple forecasts in the forecast domain, obtain the forecast value vector without considering the forecast error, obtain the statistical sample of the forecast error at each time scale, and perform kernel density estimation on the probability distribution of the forecast error variable at each time scale;

[0123] S2: The random error variables of each time scale in the prediction domain are used to form a random error vector, and the correlation is described by multidimensional joint normal distribution to obtain the correlation between the random error variables of each time scale;

[0124] S3: The random error vector satisfying the multi-dimensional joint normal distribution is mapped into a prediction error vector through an equal probability inverse transformation, and the prediction error vector obtained by mapping is superimposed with the prediction value vector without considering the prediction error to obtain a prediction vector considering the prediction error. The prediction vector considering the prediction error is a scenario, which includes S photovoltaic scenarios and S load scenarios.

[0125] S4: For S photovoltaic scenarios and S load scenarios, we can combine them in pairs to obtain S 2 The net load scenario set of the scenarios is used to reduce similar scenarios to S by synchronous back-substitution method, which is used as the net load scenario set input of the stochastic model predictive control energy management model predictive control;

[0126] S5: Establish a stochastic model predictive control energy management model, in which the model takes the expected minimum sum of the operating cost and the charge state deviation penalty cost as the objective function, and the equality constraint and inequality constraint as the constraint condition;

[0127] S6: The sample generation method is used to generate training data samples, and the random forest algorithm is trained to perform multivariate regression on the training data samples, so as to approximate the control actions of the random model predictive control, solve the random model predictive control energy management model, and obtain the data-driven random model predictive control real-time energy management strategy.

[0128] In general, step S1 is to fit the probability distribution of prediction errors at various time scales in the prediction domain to obtain more PV and load uncertainty information.

[0129] Step S2 is to consider the temporal correlation of the prediction errors at each time scale through multi-dimensional joint normal distribution to obtain a scenario set that is more consistent with the actual uncertainty of photovoltaic and load.

[0130] Step S3 maps the multi-dimensional joint normal distribution in step S2 into the probability distribution of prediction errors at each time scale in the prediction domain in step S1 to obtain a prediction error vector and a prediction vector taking into account the prediction error.

[0131] Step S4 is to reduce similar scenes in the scene set by synchronous back-substitution method, and use fewer and more typical scenes to describe the photovoltaic and load uncertainty scene information, thereby reducing the amount of calculation.

[0132] In step S5, a random model prediction is constructed with the expected minimum sum of the operating cost and the state of charge deviation penalty cost as the objective function, and the constraint conditions of the model are constructed.

[0133] Step S6 is to train the random forest algorithm to perform multivariate regression on the data samples generated by the random model predictive control to approximate the control actions of the random model predictive control and accelerate the solution of the optimization problem.

[0134] Specifically, step S1 defines the prediction error variable, and step S2 defines the random error variable. The two are in a parallel relationship. Step S3 is to associate step S1 with step S2. The specific internal association is as follows: step S1 is mainly to obtain the probability distribution of the prediction error variables of each time scale, for example, the probability distribution of the prediction error variable at the next 1 minute, the probability distribution of the prediction error variable at the next 2 minutes, and the probability distribution of the prediction error variable at the next Np (prediction domain length) minutes. Step S2 is mainly to obtain the correlation between the prediction error variables of each time scale. The present invention defines a random error variable to represent the prediction error. The random error variables of each time scale constitute a random error vector, and the correlation is described by a multi-dimensional joint normal distribution. Step S3 is mainly to map the correlation in step S2 to the prediction error vector in step S1, so that the prediction error vector can also have correlation.

[0135] The predicted value vector is obtained by performing a rolling multi-step prediction of photovoltaic and load through the long-term and short-term neural network in step S1 to obtain the photovoltaic and load prediction value vector P in the prediction domain. pre The random error vector is the vector of random error variables defined to obtain the correlation description.

[0136] The scenario refers to the photovoltaic and load scenarios, that is, the photovoltaic in the next 1 minute, 2 minutes, 3 minutes... p The forecast value of the minute, the load in the next 1 minute, 2 minutes, 3 minutes...N p For a prediction domain, first use the long-term and short-term neural network of step S1 to make a prediction once to obtain a prediction value vector (without considering the prediction error), then perform the mapping of step S3 S times to obtain S prediction error vectors, and superimpose S prediction error vectors on one prediction value vector (without considering the prediction error) to obtain S prediction value vectors (considering the prediction error), that is, S scenarios.

[0137] See also Figure 1 This is a structural diagram of the low-carbon ship microgrid of the present invention. Figure 2 This is a block diagram of the load rolling multi-step prediction operation of the present invention. Figure 3 This is the operating block diagram of the stochastic model predictive control of the present invention. Figure 8 This is an overall framework diagram of the data-driven low-carbon ship microgrid real-time energy management strategy according to an embodiment of the present invention.

[0138] In one embodiment, in step S1, the rolling multi-step forecast of load includes:

[0139] S1.1: Input the actual historical load values ​​from time t–10 to time t into the long short-term memory neural network, and output the load forecast value at time t+1, where t is the variable at the start time of the forecast domain;

[0140] S1.2: The load forecast value at time t+1 is input into the long short-term memory neural network as the actual load value at time t+1, and the output is the load forecast value at time t+2;

[0141] S1.3: Repeat the prediction process of steps S1.1 to S1.2 until t+N p Moment, N p is the prediction domain length;

[0142] The statistical samples of the prediction errors at each time scale are:

[0143] [E i,1 ,E i,2 ,...,E i,n ]

[0144] In the formula, E i,1 is the first prediction error statistical sample under time scale i; E i,2 is the second prediction error statistical sample under time scale i; E i,n is the nth prediction error statistical sample at time scale i;

[0145] The kernel density estimate is:

[0146]

[0147]

[0148] In the formula, is the prediction error variable e i The kernel density estimation probability density function; e i is the prediction error variable under time scale i; n is the total number of prediction error statistical samples; h is the window width; j is the prediction error statistical sample variable; E i,j is the jth prediction error statistical sample under time scale i; h best is the optimal window width; σ is the normal distribution standard deviation of the prediction error statistical sample.

[0149] In the specific example, N p =20 is the prediction domain length.

[0150] In one implementation, in step S2, the random error vector is:

[0151]

[0152] Where, e is the random error vector; e1 is the random error variable under time scale 1; e2 is the random error variable under time scale 2; is the time scale N p The random error variable under

[0153] The multidimensional joint normal distribution is:

[0154]

[0155] Where f(e) is the probability density function of the multidimensional joint normal distribution of the random error vector e; e is the random error vector; σ 2 is the covariance matrix;

[0156] The covariance matrix is:

[0157]

[0158] In the formula, σ 2 is the covariance matrix; σ 1,1 is the variance of the random error variable at time scale 1; σ 1,2 is the covariance of the random error variable of time scale 1 and the random error variable of time scale 2; is the random error variable of time scale 1 and time scale N p Covariance of random error variables; σ 2,1 is the covariance of the random error variable of time scale 2 and the random error variable of time scale 1; σ 2,2 is the variance of the random error variable at time scale 2; is the random error variable of time scale 2 and time scale N p covariance of random error variables; is the time scale N p covariance of the random error variable and the time scale 1 random error variable; is the time scale N p covariance of the random error variable and the time scale 2 random error variable; is the time scale N p the variance of the random error variable;

[0159] The covariance matrix of the distribution is estimated using the exponential function method, which is:

[0160]

[0161] In the formula, σ m,n is the covariance of the random error variable of time scale m and the random error variable of time scale n; m and n are both time scale variables; ε is the correlation coefficient.

[0162] In one embodiment, in step S3,

[0163] The inverse transform with equal probability is:

[0164]

[0165] Where F(e) is the cumulative probability distribution function of the multidimensional joint normal distribution of the random error vector e; e is the random error vector; is the kernel density estimated cumulative probability distribution function of the prediction error vector ΔP; ΔP is the prediction error vector; It is the inverse function of the kernel density estimation cumulative probability distribution function of the multidimensional joint normal distribution cumulative probability distribution function F(e);

[0166] The prediction error vector is:

[0167]

[0168] Where ΔP is the prediction error vector; ΔP1 is the prediction error variable at time scale 1; ΔP2 is the prediction error variable at time scale 2; is the time scale N p The prediction error variable under ;

[0169] The predicted value vector without considering the prediction error is:

[0170]

[0171] Where P is the predicted value vector without considering the prediction error; P1 is the predicted value variable under time scale 1; ΔP2 is the predicted value variable under time scale 2; is the time scale N p The predictor variables under

[0172] The predicted value vector considering the prediction error is:

[0173] P pre =P+ΔP

[0174] Where P pre is the predicted value vector taking into account the prediction error.

[0175] In one implementation, in step S4, the kth scenario in the net load scenario set satisfies:

[0176] P net,k =P d,i -P pv ,j

[0177] Where P net,k is the kth net load scenario; P d,i is the i-th load scenario; P pv,jis the jth photovoltaic scenario;

[0178] The steps of synchronous back-substitution are as follows:

[0179] S4.1: Enter the initial net load scenario set;

[0180] S4.2: Eliminate the scenario with the smallest sum of Kantorovich distances from other scenarios in the initial net load scenario set;

[0181] S4.3: Decrease the total number of scenes by 1;

[0182] S4.4: add the probability of the eliminated scene to the scene with the closest Kantorovich distance;

[0183] S4.5: Determine whether the total number of scenes in the scene set is greater than the required number of scenes S. If it is less than or equal to, output the remaining scenes and their scene probabilities. If it is greater, go to step S4.2 to continue execution.

[0184] In the specific example, S=20 is the required number of scenes.

[0185] For example, the initial net load scenario set includes scenario 1, scenario 2, and scenario 3. Relative to scenario 1, the other scenarios are scenario 2 and scenario 3. Then, there is the sum of the probabilistic Kantorovich distances between scenario 1 and scenario 2 and scenario 3. The same is true for scenario 2 and scenario 3. The sum of all probabilistic Kantorovich distances is obtained, and the scenario with the smallest sum of distances is eliminated.

[0186] If scene 1 is eliminated, its probability is 0.16, and the probability of the nearest scene 2 is 0.11, then the probability of scene 1 is added to scene 2, so the probability of scene 2 is the original 0.11 plus the 0.16 of scene 1 = 0.27, which means that scene 2 inherits the probability of scene 1, thereby ensuring that the sum of the probabilities of each scene in the scene set is still 1.

[0187] In one embodiment, in step S4.2, the probabilistic Kantorovich distance is:

[0188] ρ i ρ j d(ω i ,ω j )

[0189] In the formula, ρ i is the probability of the i-th scenario; ρ j is the probability of the jth scenario; d(ω i ,ω j ) is the i-th scenario ω i and the jth scenario ω jKantorovich distance; ω i is the i-th scenario; ω j This is the jth scenario.

[0190] In one embodiment, in step S4.4, the Kantorovich distance is:

[0191]

[0192] In the formula, d(ω i ,ω j ) is the i-th scenario ω i and the jth scenario ω j Kantorovich distance; ω i is the i-th scenario; ω j is the jth scenario; t is the time variable in the scenario; N p is the prediction domain length; i,t is the scene value of the i-th scene at time t; The scene value of the j-th scene at time t.

[0193] In the specific example, N p =20 is the prediction domain length.

[0194] In one embodiment, in step S5,

[0195] The running cost is:

[0196]

[0197]

[0198] In the formula, is the operating cost of the ship microgrid at time t+k under the net load scenario s; PF and PE are the fuel cost coefficient and emission cost coefficient of the diesel generator respectively; is the fuel consumption rate of the diesel generator at time t+k under net load scenario s; is the power generation of the diesel generator at time t+k under the net load scenario s; k2, k1, k0 are the fuel consumption fitting coefficients of the diesel generator; Δt is the length of the unit time interval; is the start and stop variable of the diesel generator at time t+k under the net load scenario s; C st The cost of starting a diesel generator once;

[0199] The penalty cost for SOC deviation is:

[0200]

[0201]

[0202] In the formula, is the penalty cost of the battery state of charge deviating from the reference state of charge at time t+k under net load scenario s; α is the penalty coefficient of the battery state of charge deviating from the reference state of charge; For net load scenario s, t+N p The battery's state of charge at the time; =t+N p At time S, the reference value of the battery state of charge; SOC,max is the maximum value of the battery state of charge; S SOC,min is the minimum value of the battery state of charge; N is the total number of optimizations for a single voyage; t is the variable at the start time of the prediction domain; N p is the prediction domain length;

[0203] The objective function is:

[0204]

[0205] In the formula, u t+1 is the control variable at time t+1; J t+1 is the objective function at time t+1; ρ s is the probability of net load scenario s; is the operating cost of the ship microgrid at time t+k under net load scenario s; is the penalty cost of the battery state of charge deviating from the reference state of charge at time t+k under net load scenario s; s is the net load scenario variable; S is the total number of net load scenarios; k is the moving variable at the starting time; N p is the prediction domain length;

[0206] Equality constraints include:

[0207] Power balance constraints:

[0208]

[0209]

[0210]

[0211] Consistency constraints:

[0212]

[0213] In the formula, is the battery charging power at time t under net load scenario s; is the load power of the ship microgrid at time t under the net load scenario s; is the photovoltaic power generation power at time t under net load scenario s; is the power generated by the diesel generator at time t under net load scenario s; is the discharge power of the battery at time t under net load scenario s; is the light intensity at time t under net load scenario s; S pv is the total photovoltaic area; η pv is the photovoltaic efficiency; is the power generated by the diesel generator at time t under the net load scenario s+1; s is the net load scenario variable;

[0214] Inequality constraints include:

[0215] Energy storage capacity constraints:

[0216]

[0217] Power limit constraints:

[0218]

[0219]

[0220]

[0221] Climbing slope constraint:

[0222]

[0223] Boot time constraints:

[0224]

[0225] In the formula, S SOC,min is the minimum value of the battery state of charge; S is the battery state of charge at time t under net load scenario s; SOC,max is the maximum value of the battery state of charge; is the battery charging power at time t under net load scenario s; P b,ch,max The maximum charging power for the battery; is the discharge power of the battery at time t under net load scenario s; P b,dis,max is the maximum value of battery discharge power; is the power generated by the diesel generator at time t under net load scenario s; P g,max The maximum power generated by the diesel generator; is the power generated by the diesel generator at time t–1 under the net load scenario s; Δt is the length of the unit time interval; r g,max is the maximum climbing slope of the diesel generator; is the start and stop variable of the diesel generator at time t under the net load scenario s; is the start and stop variable of the diesel generator at time t–1 under the net load scenario s; is the start-stop variable of the diesel generator at time τ under the net load scenario s; τ is the variable at any time during the diesel generator startup period; t is the variable at the start time of the prediction domain; T g,min,on The minimum time for the diesel generator to remain in the on state.

[0226] In one embodiment, the operation steps of the stochastic model predictive control energy management model in step S5 are as follows:

[0227] S5.1: Divide the prediction domain into N p The length of the unit time interval is Δt, k is the moving variable at the starting time, t is the variable at the starting time of the prediction domain, and the initial value of k is 0;

[0228] S5.2: The starting time of the prediction domain is t+kΔt. The data predicted by PV and load in the prediction domain are used, the net load scenario and its probability are comprehensively considered, and the objective function is minimized while satisfying the constraints. The dynamic programming algorithm is used to solve the control variables at time t+k+1, the control variables at time t+k+1 are executed, and the state variables at time t+k+1 are updated according to the state transfer equation;

[0229] S5.3: k value increases by 1;

[0230] S5.4: Determine whether t+kΔt is greater than the total number of optimization times N for a single voyage. If so, terminate the operation; if not, proceed to step S5.2 to continue.

[0231] In the specific example, PF = 8.33 ¥ / kg, PE = 0.11 ¥ / kg are the fuel cost coefficient and emission cost coefficient of the diesel generator respectively; k2 = 0.202 g / kWh / kW, k1 = 115.65 g / kWh, k0 = 8488.1 g / h are the fuel consumption fitting coefficients of the diesel generator; Δt = 1 min is the unit time interval length; C st =10¥ / time is the single start-up cost of the diesel generator; α=150000 is the penalty coefficient for the battery state of charge deviating from the reference state of charge; S SOC,max =90% is the maximum value of battery SOC; S SOC,min =20% is the minimum value of the battery charge state; N = 480 is the total number of optimizations for a single voyage; N p =20 is the prediction domain length; S = 20 is the total number of net load scenarios; S pv =200m 2 is the total photovoltaic area; η pv=17.1% is the photovoltaic efficiency; P b,ch,max =25kW is the maximum value of battery charging power; P b,dis,max =60kW is the maximum value of battery discharge power; P g,max =300kW is the maximum power of the diesel generator; r g,max =50kW / min is the maximum climbing slope of the diesel generator; T g,min,on =5min is the minimum time for the diesel generator to maintain the start-up state.

[0232] In one embodiment, in step S5.2, the state transfer equation is:

[0233]

[0234] In the formula, x s,t+1 is the state variable at time t+1 under net load scenario s; u s,t+1 is the control variable at time t+1 under net load scenario s; f(x s,t ,u s,t+1 ) is the state variable x s,t+1 , control variable u s,t+1 The state transfer equation under SOC is the state of charge of the battery; u is the control variable; P b is the charging and discharging power of the battery.

[0235] In the specific implementation process, the discrete form of the state transfer equation is:

[0236]

[0237] Under the net load scenario s, at time t, the generalized efficiency of the battery is Specifically expanded as follows:

[0238]

[0239] In the formula, is the battery state of charge at time t+1 under net load scenario s; is the battery state of charge at time t under net load scenario s; U OC , R eq are the battery open circuit voltage and battery internal resistance, respectively, obtained by interpolating the battery state of charge curve; Q max is the maximum capacity of the battery; is the charging and discharging power of the battery at time t+1 under the net load scenario s; Δt is the length of the unit time interval.

[0240] In the specific example, Q max=200Ah is the maximum capacity of the battery; Δt=1min is the unit time interval length.

[0241] In one implementation, in step S6, the training data sample generation step is:

[0242] S6.1: Battery state of charge at time t under net load scenario s Perform random uniform sampling within the minimum and maximum range of the battery state of charge;

[0243] S6.2: Perform Latin hypercube sampling according to a certain distribution and get t+N p At time, the reference value of battery charge state Will Considered together as the state vector x;

[0244] S6.3: Rolling selection and prediction domain length N every unit time interval Δt p Cluster the photovoltaic and load data sequences of equal length, and calculate the mean vector and covariance matrix of different categories of data based on the clustering results;

[0245] S6.4: Based on the statistical results of the mean vector and the covariance matrix, a multivariate joint normal distribution is used to randomly generate a photovoltaic and load data sequence in the prediction domain as a scenario vector s, and the scenario vector s and the state vector x are input into the random model predictive control together, and the control variable u is obtained by running;

[0246] S6.5: After multiple runs, we get m sets of training data samples [(s (1) ,x (1) ,u (1) ),(s (2) ,x (2) ,u (2) ),...,(s (m) ,x (m) ,u (m) )], where s∈R 20 , x∈R 2 , u∈R 1 ,(s (1) ,x (1) ,u (1) ) is the first set of training data samples, (s (m) ,x (m) ,u (m) ) is the mth group of training data samples, R 20 , R 2 and R 1 They are respectively the 20-dimensional real number field, the 2-dimensional real number field and the 1-dimensional real number field.

[0247] In the specific example, Δt=1min is the unit time interval length; the prediction domain length N p =20; get m=16000 sets of training data samples.

[0248] In one embodiment, in step S6.2, the distribution is:

[0249]

[0250] Where f(x) is the probability density function sampled by Latin hypercube; x is a distributed random variable; a is the minimum difference in battery state of charge; b is the difference in state of charge achieved by discharging the battery at the maximum discharge power within the prediction domain; c is the difference in state of charge achieved by charging the battery at the maximum charge power within the prediction domain; d is the maximum difference in battery state of charge.

[0251] In the specific example, a=–70% is the minimum difference in battery state of charge; b=–19% is the difference in battery state of charge achieved when the battery is discharged at the maximum discharge power within the prediction domain; c=7% is the difference in battery state of charge achieved when the battery is charged at the maximum charging power within the prediction domain; and d=70% is the maximum difference in battery state of charge.

[0252] In one embodiment, in step S6, the data driven stochastic model predictive control strategy is:

[0253]

[0254] Where ζ is the random forest algorithm parameter, which is determined by data sample training; j is the training data sample variable; m is the total number of training data samples; f ζ (s j ,x j ) is the scene variable s j and the state variable x j Data-driven stochastic model predictive control strategy under j is the scene variable in the jth training data sample; x j is the state variable in the jth training data sample; u j is the control variable in the jth training data sample.

[0255] In the specific example, m=16000 is the total number of training data samples.

[0256] See also Figure 4 It is a power curve diagram of photovoltaic and loads of different power levels according to an embodiment of the present invention. Figure 5 The graph is a graph showing the change of the open circuit voltage and internal resistance of the battery with the state of charge according to an embodiment of the present invention. Figure 6 The battery state of charge curve diagram of the embodiment of the present invention is at different power level loads. Figure 7This is a power curve diagram of a diesel generator at different power levels of load according to an embodiment of the present invention.

[0257] Compared with the prior art, the beneficial effects of the present invention are:

[0258] 1) Compared with the scenario set generated without considering the temporal correlation of the prediction error, the scenario set generated by considering the temporal correlation of the prediction error is more in line with the actual uncertainty and volatility characteristics of photovoltaic and load, which can further improve the optimization effect of the energy management strategy;

[0259] 2) The energy of low-carbon ship microgrid is managed by jointly operating three stages: error scenario set generation, random optimization energy management and data-driven energy management. Data-driven approximation is used instead of optimization solution. This strategy can effectively reduce the amount of calculation while retaining most of the optimization performance of random model predictive control, thereby meeting the real-time and optimization requirements of the strategy and providing practical measures for ship energy conservation and emission reduction.

[0260] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data-driven low-carbon ship microgrid real-time energy management method, characterized in that: include: S1: Use long short-term memory neural network to carry out rolling multi-step forecasting of photovoltaic and load, make multiple forecasts in the forecast domain, obtain the forecast value vector without considering the forecast error, obtain the statistical sample of the forecast error at each time scale, and perform kernel density estimation on the probability distribution of the forecast error variable at each time scale; S2: The random error variables of each time scale in the prediction domain are used to form a random error vector, and the correlation is described by multidimensional joint normal distribution to obtain the correlation between the random error variables of each time scale; S3: The random error vector satisfying the multi-dimensional joint normal distribution is mapped into a prediction error vector through an equal probability inverse transformation, and the prediction error vector obtained by mapping is superimposed with the prediction value vector without considering the prediction error to obtain a prediction vector considering the prediction error. The prediction vector considering the prediction error is a scenario, which includes S photovoltaic scenarios and S load scenarios. S4: For S photovoltaic scenarios and S load scenarios, we can combine them in pairs to obtain S 2 The net load scenario set of the scenarios is used to reduce similar scenarios to S by synchronous back-substitution method, which is used as the net load scenario set input of the stochastic model predictive control energy management model predictive control; S5: Establish a stochastic model predictive control energy management model, in which the model takes the expected minimum sum of the operating cost and the charge state deviation penalty cost as the objective function, and the equality constraint and inequality constraint as the constraint condition; S6: The sample generation method is used to generate training data samples, and the random forest algorithm is trained to perform multivariate regression on the training data samples, so as to approximate the control actions of the random model predictive control, solve the random model predictive control energy management model, and obtain the data-driven random model predictive control real-time energy management strategy.

2. The low-carbon ship microgrid real-time energy management method according to claim 1, characterized in that: In step S1, the rolling multi-step load forecast includes: S1.1: Input the actual historical load values ​​from time t–10 to time t into the long short-term memory neural network, and output the load forecast value at time t+1, where t is the variable at the start time of the forecast domain; S1.2: The load forecast value at time t+1 is input into the long short-term memory neural network as the actual load value at time t+1, and the output is the load forecast value at time t+2; S1.3: Repeat the prediction process of steps S1.1 to S1.2 until t+N p Moment, N p is the prediction domain length; The statistical samples of the prediction errors at each time scale are: [AND i,1 ,AND i,2 ,…,AND i,n ] In the formula, E i,1 is the first prediction error statistical sample under time scale i; E i,2 is the second prediction error statistical sample under time scale i; E i,n is the nth prediction error statistical sample at time scale i; The kernel density estimate is: In the formula, is the prediction error variable e i The kernel density estimation probability density function; e i is the prediction error variable under time scale i; n is the total number of prediction error statistical samples; h is the window width; j is the prediction error statistical sample variable; E i,j is the jth prediction error statistical sample under time scale i; h best is the optimal window width; σ is the normal distribution standard deviation of the prediction error statistical sample.

3. The low-carbon ship microgrid real-time energy management method according to claim 1, characterized in that: In step S2, the random error vector is: Where, e is the random error vector; e1 is the random error variable under time scale 1; e2 is the random error variable under time scale 2; is the time scale N p The random error variable under The multidimensional joint normal distribution is: Where f(e) is the probability density function of the multidimensional joint normal distribution of the random error vector e; e is the random error vector; σ 2 is the covariance matrix; The covariance matrix is: In the formula, σ 2 is the covariance matrix; σ 1,1 is the variance of the random error variable at time scale 1; σ 1,2 is the covariance of the random error variable of time scale 1 and the random error variable of time scale 2; is the random error variable of time scale 1 and time scale N p Covariance of random error variables; σ 2,1 is the covariance of the random error variable of time scale 2 and the random error variable of time scale 1; σ 2,2 is the variance of the random error variable at time scale 2; is the random error variable of time scale 2 and time scale N p covariance of random error variables; is the time scale N p covariance of the random error variable and the time scale 1 random error variable; is the time scale N p covariance of the random error variable and the time scale 2 random error variable; is the time scale N p the variance of the random error variable; The covariance matrix of the distribution is estimated using the exponential function method, which is: In the formula, σ m,n is the covariance of the random error variable of time scale m and the random error variable of time scale n; m and n are both time scale variables; ε is the correlation coefficient.

4. The low-carbon ship microgrid real-time energy management method according to claim 1, characterized in that: In step S3, The inverse transform with equal probability is: Where F(e) is the cumulative probability distribution function of the multidimensional joint normal distribution of the random error vector e; e is the random error vector; is the kernel density estimated cumulative probability distribution function of the prediction error vector ΔP; ΔP is the prediction error vector; It is the inverse function of the kernel density estimation cumulative probability distribution function of the multidimensional joint normal distribution cumulative probability distribution function F(e); The prediction error vector is: Where ΔP is the prediction error vector; ΔP1 is the prediction error variable at time scale 1; ΔP2 is the prediction error variable at time scale 2; is the time scale N p The prediction error variable under ; The predicted value vector without considering the prediction error is: Where P is the predicted value vector without considering the prediction error; P1 is the predicted value variable under time scale 1; ΔP2 is the predicted value variable under time scale 2; is the time scale N p The predictor variables under The predicted value vector considering the prediction error is: P pre =P+ΔP Where P pre is the predicted value vector taking into account the prediction error.

5. The low-carbon ship microgrid real-time energy management method according to claim 1, characterized in that: In step S4, the kth scenario in the net load scenario set satisfies: P net,k =P d,i -P pv,j Where P net,k is the kth net load scenario; P d,i is the i-th load scenario; P pv,j is the jth photovoltaic scenario; The steps of synchronous back-substitution are as follows: S4.1: Enter the initial net load scenario set; S4.2: Eliminate the scenario with the smallest sum of Kantorovich distances from other scenarios in the initial net load scenario set; S4.3: Decrease the total number of scenes by 1; S4.4: add the probability of the eliminated scene to the scene with the closest Kantorovich distance; S4.5: Determine whether the total number of scenes in the scene set is greater than the required number of scenes S. If it is less than or equal to, output the remaining scenes and their scene probabilities. If it is greater, go to step S4.2 to continue execution.

6. The low-carbon ship microgrid real-time energy management method according to claim 1, characterized in that: In step S5, The running cost is: In the formula, is the operating cost of the ship microgrid at time t+k under the net load scenario s; PF and PE are the fuel cost coefficient and emission cost coefficient of the diesel generator respectively; is the fuel consumption rate of the diesel generator at time t+k under net load scenario s; is the power generation of the diesel generator at time t+k under the net load scenario s; k2, k1, k0 are the fuel consumption fitting coefficients of the diesel generator; Δt is the length of the unit time interval; is the start and stop variable of the diesel generator at time t+k under the net load scenario s; C st The cost of starting a diesel generator once; The penalty cost for SOC deviation is: In the formula, is the penalty cost of the battery state of charge deviating from the reference state of charge at time t+k under net load scenario s; α is the penalty coefficient of the battery state of charge deviating from the reference state of charge; For net load scenario s, t+N p The battery's state of charge at the time; =t+N p At time S, the reference value of the battery state of charge; SOC,max is the maximum value of the battery state of charge; S SOC,min is the minimum value of the battery state of charge; N is the total number of optimizations for a single voyage; t is the variable at the start time of the prediction domain; N p is the prediction domain length; The objective function is: In the formula, u t+1 is the control variable at time t+1; J t+1 is the objective function at time t+1; ρ s is the probability of net load scenario s; is the operating cost of the ship microgrid at time t+k under net load scenario s; is the penalty cost of the battery state of charge deviating from the reference state of charge at time t+k under net load scenario s; s is the net load scenario variable; S is the total number of net load scenarios; k is the moving variable at the starting time; N p is the prediction domain length; Equality constraints include: Power balance constraints: Consistency constraints: In the formula, is the battery charging power at time t under net load scenario s; is the load power of the ship microgrid at time t under the net load scenario s; is the photovoltaic power generation power at time t under net load scenario s; is the power generated by the diesel generator at time t under net load scenario s; is the discharge power of the battery at time t under net load scenario s; is the light intensity at time t under net load scenario s; S pv is the total photovoltaic area; η pv is the photovoltaic efficiency; is the power generated by the diesel generator at time t under the net load scenario s+1; s is the net load scenario variable; Inequality constraints include: Energy storage capacity constraints: Power limit constraints: Climbing slope constraint: Boot time constraints: In the formula, S SOC,min is the minimum value of the battery state of charge; S is the battery state of charge at time t under net load scenario s; SOC,max is the maximum value of the battery state of charge; is the battery charging power at time t under net load scenario s; P b,ch,max The maximum charging power for the battery; is the discharge power of the battery at time t under net load scenario s; P b,dis,max is the maximum value of battery discharge power; is the power generated by the diesel generator at time t under net load scenario s; P g,max The maximum power generated by the diesel generator; is the power generated by the diesel generator at time t–1 under the net load scenario s; Δt is the length of the unit time interval; r g,max is the maximum climbing slope of the diesel generator; is the start and stop variable of the diesel generator at time t under the net load scenario s; is the start and stop variable of the diesel generator at time t–1 under the net load scenario s; is the start-stop variable of the diesel generator at time τ under the net load scenario s; τ is the variable at any time during the diesel generator startup period; t is the variable at the start time of the prediction domain; T g,min,on The minimum time for the diesel generator to remain in the on state.

7. The low-carbon ship microgrid real-time energy management method according to claim 1, characterized in that: The operation steps of the stochastic model predictive control energy management model in step S5 are as follows: S5.1: Divide the prediction domain into N p The length of the unit time interval is Δt, k is the moving variable at the starting time, t is the variable at the starting time of the prediction domain, and the initial value of k is 0; S5.2: The starting time of the prediction domain is t+kΔt. The data predicted by PV and load in the prediction domain are used, the net load scenario and its probability are comprehensively considered, and the objective function is minimized while satisfying the constraints. The dynamic programming algorithm is used to solve the control variables at time t+k+1, the control variables at time t+k+1 are executed, and the state variables at time t+k+1 are updated according to the state transfer equation; S5.3: k value increases by 1; S5.4: Determine whether t+kΔt is greater than the total number of optimization times N for a single voyage. If so, terminate the operation; if not, proceed to step S5.2 to continue.

8. The low-carbon ship microgrid real-time energy management method according to claim 7, characterized in that: In step S5.2, the state transfer equation is: In the formula, x s,t+1 is the state variable at time t+1 under net load scenario s; u s,t+1 is the control variable at time t+1 under net load scenario s; f(x s,t ,u s,t+1 ) is the state variable x s,t+1 , control variable u s,t+1 The state transfer equation under SOC is the state of charge of the battery; u is the control variable; P b is the charging and discharging power of the battery.

9. The low-carbon ship microgrid real-time energy management method according to claim 1, characterized in that: In step S6, the training data sample generation step is: S6.1: Battery state of charge at time t under net load scenario s Perform random uniform sampling within the minimum and maximum range of the battery state of charge; S6.2: Perform Latin hypercube sampling according to a certain distribution and get t+N p At time, the reference value of battery charge state Will Consider them together as the state vector x; S6.3: Rolling selection and prediction domain length N every unit time interval Δt p Cluster the photovoltaic and load data sequences of equal length, and calculate the mean vector and covariance matrix of different categories of data based on the clustering results; S6.4: Based on the statistical results of the mean vector and the covariance matrix, a multivariate joint normal distribution is used to randomly generate a photovoltaic and load data sequence in the prediction domain as a scenario vector s, and the scenario vector s and the state vector x are input into the random model predictive control together, and the control variable u is obtained by running; S6.5: After multiple runs, we get m sets of training data samples [(s (1) ,x (1) ,u (1) ),(s (2) ,x (2) ,u (2) ),...,(s (m) ,x (m) ,u (m) )], where s∈R 20 , x∈R 2 , u∈R 1 ,(s (1) ,x (1) ,u (1) ) is the first set of training data samples, (s (m) ,x (m) ,u (m) ) is the mth group of training data samples, R 20 , R 2 and R 1 They are respectively the 20-dimensional real number field, the 2-dimensional real number field and the 1-dimensional real number field.

10. The data-driven low-carbon ship microgrid real-time energy management method according to claim 1, characterized in that: In step S6, the data-driven stochastic model predictive control strategy is: Where ζ is the random forest algorithm parameter, which is determined by data sample training; j is the training data sample variable; m is the total number of training data samples; f ζ (s j ,x j ) is the scene variable s j and the state variable x j Data-driven stochastic model predictive control strategy under j is the scene variable in the jth training data sample; x j is the state variable in the jth training data sample; u j is the control variable in the jth training data sample.

Citation Information

Patent Citations

  • Systems for machine learning, optimising and managing local multi-asset flexibility of distributed energy storage resources

    GB202114974D0

  • Method and system for selecting augmentation strategy for image data

    WO2021164228A1