Port microgrid energy storage and transfer vehicle capacity configuration method and system
By constructing a port microgrid capacity configuration model for energy storage and transfer vehicles, the problem of poor port microgrid capacity configuration in the existing technology is solved, and the effects of cost reduction, environmental protection and efficiency improvement are achieved.
Patent Information
- Application Number
- CN202411734202.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art is difficult to effectively configure energy storage capacity and transfer vehicle capacity in port microgrids, resulting in high operating costs and uneco-friendly.
By obtaining historical port load data, extracting data characteristics, building a collection of typical scenarios, and based on these scenarios and the working model of V2G participating in grid scheduling of transshipped vehicles, a port microgrid energy storage and transshipped vehicles capacity configuration model is constructed to solve the configuration results.
It has achieved multi-target optimization of the port microgrid, reduced operating costs, improved new energy utilization, and has advantages such as good optimization effect, environmental protection, high efficiency and reliability.
Smart Images

Figure CN119602345A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of port microgrids, and in particular relates to a method and system for configuring the capacity of a port microgrid energy storage and a transfer vehicle. Background Art
[0002] With the rapid development of inland electrified ships and green ports, ports, as the gathering point and hub of shipping and land transportation, play a key role in the development of the national economy. The use of port transfer vehicles is also gradually being promoted. The participation of transfer vehicles in grid dispatching through V2G technology has also become a way for port microgrids to make profits. How to configure the energy storage capacity and transfer vehicle capacity in port microgrids has attracted the attention of scholars at home and abroad. Configuring energy storage and transfer vehicles with appropriate capacity can effectively reduce the operating cost of port microgrids and improve the utilization rate of new energy in ports.
[0003] However, the load uncertainty of the port will have a huge impact on the dust generation of capacity configuration optimization. At the same time, the operation scheduling of port transfer vehicles also requires the optimization model to impose more constraints on the transfer vehicles.
[0004] CN117726111A discloses an emergency control method for port energy and transportation network facing source network uncertainty, including: through the step-by-step coordination optimization and interconnection hierarchical relationship description of the port energy-transportation complex network, considering multiple types of energy fluctuations, constructing a multi-time scale rolling control model for the "day-ahead-intraday-real-time" scheduling of the port energy-transportation complex network; decoupling the multi-time scale rolling control model and iteratively optimizing the master-slave problem through the Benders decomposition algorithm and the ADMM algorithm, and obtaining the decoupling and iterative optimization method of the multi-time scale rolling control model; solving the decoupled master-slave problem in the multi-time scale rolling control model through the network flow optimization algorithm and the deep reinforcement learning algorithm, and obtaining the dual-engine dynamic scheduling decision. This patent is dedicated to solving the operating results of each part in the microgrid, but does not consider the number of energy storage configured in the port and the number of transfer vehicles. Therefore, the optimization effect of this patent is not good and it is not environmentally friendly. Summary of the invention
[0005] In order to solve the shortcomings of poor optimization effect and environmental pollution in the prior art, the present invention provides a port microgrid energy storage and transfer vehicle capacity configuration method and system.
[0006] The present invention adopts the following technical solution.
[0007] On one hand, the present invention discloses a method for configuring the capacity of a port microgrid energy storage and a transshipment vehicle;
[0008] Step 1: Obtain historical port load data and preprocess it, extract data features from the preprocessed historical port load data, and obtain a standardized feature matrix;
[0009] Step 2: Based on the standardized feature matrix, a typical scene set containing scene probabilities is constructed;
[0010] Step 3: Construct a working model for V2G transfer vehicles to participate in power grid dispatching;
[0011] Step 4: Based on the typical scenario set and working model, construct a port microgrid energy storage and transfer vehicle capacity configuration model; solve the configuration model to obtain the configuration result.
[0012] More preferably,
[0013] In step 1, the historical port load data includes shore power load and transshipment vehicle load.
[0014] More preferably,
[0015] In step 1, the data features are extracted from the pre-processed historical port load data to obtain a standardized feature matrix, including:
[0016] The preprocessed data is decomposed into a temporal pattern matrix, a spatial pattern matrix, and a core tensor based on Frobenius norm regularization;
[0017] Construct a temporal feature matrix based on the temporal pattern matrix; construct a spatial feature matrix based on the spatial pattern matrix;
[0018] The temporal feature matrix and the spatial feature matrix are fused into a comprehensive feature matrix based on pre-configured adaptive weights; wherein the adaptive weights are dynamically adjusted based on the importance of the features;
[0019] Based on the improved random projection method, the dimension of the comprehensive feature matrix is reduced to obtain a reduced dimension feature matrix; the reduced dimension feature matrix is standardized to obtain a standardized feature matrix.
[0020] More preferably,
[0021] The method of constructing the time feature matrix based on the time pattern matrix is:
[0022] The kernel principal component analysis method is used to extract nonlinear temporal features from the temporal pattern matrix to obtain the temporal feature matrix.
[0023] More preferably,
[0024] In step 2, the following steps are included:
[0025] 2.1 Clustering is performed based on the standardized feature matrix to obtain clustering results;
[0026] 2.2 Extract the main feature vectors of each cluster, generate typical scenarios, calculate the probability of each scenario, and construct a typical scenario set containing scenario probabilities.
[0027] More preferably,
[0028] In step 2.1, the clustering method based on the standardized feature matrix is:
[0029] Apply singular value decomposition method to reduce the dimension of the standardized feature matrix and obtain the reduced dimension matrix;
[0030] Calculate the KL divergence between each pair of time series based on the dimension reduction matrix and construct the KL divergence matrix;
[0031] The initial cluster center is selected based on the KL divergence matrix, and K-means clustering is performed to obtain the clustering results.
[0032] More preferably,
[0033] Construct the KL divergence matrix according to the following formula:
[0034]
[0035] Where i and j are both integers; D KL (i, j) represents the value of row i and column j in the KL divergence matrix; D KL (i||j) represents the KL divergence from the i-th time series to the j-th time series; D KL (j||i) represents the KL divergence from the jth time series to the i-th time series.
[0036] More preferably,
[0037] In step 2.2, the main eigenvectors of each cluster are extracted to generate typical scenarios, which is to calculate the centroid and covariance matrix of each cluster, and extract the main eigenvectors of each cluster based on the improved principal component analysis method, and generate typical scenarios based on the main eigenvectors, that is, to obtain a set of typical scenarios.
[0038] More preferably,
[0039] In step 2.2, the probability of each scenario is calculated, and a typical scenario set containing scenario probabilities is constructed by reading the clustering results and the typical scenario set, calling the probability calculation formula, collecting and distributing the probability of each typical scenario, and forming a typical scenario set with probability parameters;
[0040] The probability calculation formula is:
[0041]
[0042] Among them, S k is the probability calculation result of the kth cluster; N k is the number of samples in the kth cluster, N totalis the total number of samples, ρ k is the average density of the kth cluster; j is an integer, representing the jth cluster; ρ j is the average density of the jth cluster.
[0043] More preferably,
[0044] In step 3, the working model of the transfer vehicle V2G participating in the grid dispatch includes a multi-objective optimization model of the V2G participation strategy, a battery life model and a total available V2G capacity.
[0045] More preferably,
[0046] Total available V2G capacity C V2G The calculation formula of (t) is as follows:
[0047] C V2G (t) = N V2G (t)×C single ×η V2G ;
[0048] Among them C single is the available capacity of a single vehicle; V2G is the V2G efficiency coefficient; output time series V2G available capacity C V2G (t); N V2G (t) is the number of transfer vehicles participating in V2G.
[0049] More preferably,
[0050] In step 4, the port microgrid energy storage and transfer vehicle capacity configuration model includes an upper objective function, a lower objective function and a total constraint condition;
[0051] The overall constraints include power balance constraints, energy storage constraints, V2G constraints and grid transaction constraints.
[0052] More preferably,
[0053] The lower objective function F lower for:
[0054]
[0055] Where E renewable_used is the amount of renewable energy actually used, E renewable_total is the total renewable energy power generation, P curtailment is the power abandonment rate, and λ is the penalty factor.
[0056] More preferably,
[0057] The power balance constraint is:
[0058] Pload (t) = P grid (t)+P renewable (t)+P storage (t)+P V2G (t);
[0059] Where P load (t) is the port load at time t, P grid (t) is the power traded between the port and the power grid at time t, P renewable (t) is the renewable energy power generation at time t, P storage (t) is the energy storage power supply at time t, P V2G (t) is the amount of electricity generated by the transport vehicle through V2G at time t.
[0060] The present application also requests protection for a port microgrid energy storage and transfer vehicle capacity configuration system utilizing the aforementioned port microgrid energy storage and transfer vehicle capacity configuration method, including a data feature extraction module, a typical scenario set construction module, a power grid dispatching work model construction module, and a transfer vehicle capacity configuration model construction and solution module.
[0061] The data feature extraction module obtains and preprocesses the historical port load data, extracts data features from the preprocessed historical port load data, and obtains a standardized feature matrix;
[0062] The typical scene set construction module constructs a typical scene set including scene probabilities based on a standardized feature matrix;
[0063] The power grid dispatching work model building module is used to build a work model for the transfer vehicle V2G to participate in power grid dispatching;
[0064] The transfer vehicle capacity configuration model construction and solution module constructs a port microgrid energy storage and transfer vehicle capacity configuration model based on a typical scenario set and a working model; solves the configuration model to obtain a configuration result.
[0065] On the other hand, the present application discloses an electronic device, including a processor and a storage medium; the characteristics are:
[0066] The storage medium is used to store instructions;
[0067] The processor is used to operate according to the instructions to execute the aforementioned port microgrid energy storage and transfer vehicle capacity configuration method.
[0068] The present application also discloses a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the port microgrid energy storage and transfer vehicle capacity configuration method.
[0069] The beneficial effect of the present invention is that, compared with the prior art,
[0070] The present invention establishes a port microgrid energy storage and transfer vehicle capacity configuration model that meets multiple objectives such as economy, environmental protection, energy efficiency, and reliability;
[0071] The present invention has many outstanding advantages such as good optimization effect, environmental protection, high efficiency and high reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 This is a schematic diagram of the port microgrid power supply architecture;
[0073] Figure 2 This is the K-means clustering algorithm process;
[0074] Figure 3 It is a schematic diagram of the double-layer optimization model for port microgrid transfer vehicles and energy storage capacity configuration. DETAILED DESCRIPTION
[0075] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0076] The present application discloses a method for configuring the capacity of a port microgrid energy storage and a transfer vehicle, comprising:
[0077] Step 1: Obtain historical port load data and preprocess it, extract data features from the preprocessed historical port load data, and obtain a standardized feature matrix;
[0078] Historical port load data includes shore power load and transshipment vehicle load.
[0079] The method of extracting data features from the preprocessed historical port load data to obtain a standardized feature matrix includes:
[0080] The preprocessed data is decomposed into a temporal pattern matrix, a spatial pattern matrix, and a core tensor based on Frobenius norm regularization;
[0081] Construct a temporal feature matrix based on the temporal pattern matrix; construct a spatial feature matrix based on the spatial pattern matrix;
[0082] The method of constructing the time feature matrix based on the time pattern matrix is:
[0083] The kernel principal component analysis method is used to extract nonlinear temporal features from the temporal pattern matrix to obtain the temporal feature matrix.
[0084] The temporal feature matrix and the spatial feature matrix are fused into a comprehensive feature matrix based on pre-configured adaptive weights; wherein the adaptive weights are dynamically adjusted based on the importance of the features;
[0085] Based on the improved random projection method, the dimension of the comprehensive feature matrix is reduced to obtain a reduced dimension feature matrix; the reduced dimension feature matrix is standardized to obtain a standardized feature matrix.
[0086] Step 2: Based on the standardized feature matrix, a typical scene set containing scene probabilities is constructed;
[0087] 2.1 Clustering is performed based on the standardized feature matrix to obtain clustering results;
[0088] The clustering method based on the standardized feature matrix is:
[0089] Apply singular value decomposition method to reduce the dimension of the standardized feature matrix and obtain the reduced dimension matrix;
[0090] Calculate the KL divergence between each pair of time series based on the dimension reduction matrix and construct the KL divergence matrix;
[0091] Construct the KL divergence matrix according to the following formula:
[0092]
[0093] Where i and j are both integers; D KL (i, j) represents the value of row i and column j in the KL divergence matrix; D KL (i||j) represents the KL divergence from the i-th time series to the j-th time series; D KL (j||i) represents the KL divergence from the jth time series to the i-th time series.
[0094] The initial cluster center is selected based on the KL divergence matrix, and K-means clustering is performed to obtain the clustering results.
[0095] 2.2 Extract the main feature vectors of each cluster, generate typical scenarios, calculate the probability of each scenario, and construct a typical scenario set containing scenario probabilities.
[0096] The main eigenvectors of each cluster are extracted to generate typical scenarios, and the centroid and covariance matrix of each cluster are calculated. Based on the improved principal component analysis method, the main eigenvectors of each cluster are extracted, and the typical scenarios are generated based on the main eigenvectors, that is, a set of typical scenarios is obtained.
[0097] Calculating the probability of each scenario and building a typical scenario set containing scenario probabilities is to read the clustering results and the typical scenario set, call the probability calculation formula, collect and distribute the probability of each typical scenario, and form a typical scenario set with probability parameters;
[0098] The probability calculation formula is:
[0099]
[0100] Among them, S k is the probability calculation result of the kth cluster; N k is the number of samples in the kth cluster, N total is the total number of samples, ρ k is the average density of the kth cluster; j is an integer, representing the jth cluster; ρ j is the average density of the jth cluster.
[0101] Step 3: Construct a working model for V2G transfer vehicles to participate in power grid dispatching;
[0102] The working model of the transfer vehicle V2G participating in the grid dispatching includes a multi-objective optimization model of the V2G participation strategy, a battery life model and a total available V2G capacity.
[0103] Total available V2G capacity C V2G The calculation formula of (t) is as follows:
[0104] C V2G (t) = N V2G (t)×C single ×η V2G ;
[0105] Among them C single is the available capacity of a single vehicle; V2G is the V2G efficiency coefficient; output time series V2G available capacity C V2G (t); N V2G (t) is the number of transfer vehicles participating in V2G.
[0106] Step 4: Based on the typical scenario set and working model, construct a port microgrid energy storage and transfer vehicle capacity configuration model; solve the configuration model to obtain the configuration result.
[0107] The port microgrid energy storage and transfer vehicle capacity configuration model includes an upper objective function, a lower objective function and a total constraint condition;
[0108] The lower objective function F lower for:
[0109]
[0110] Where E renewable_used is the amount of renewable energy actually used, E renewable_total is the total renewable energy power generation, P curtailment is the power abandonment rate, and λ is the penalty factor.
[0111] The overall constraints include power balance constraints, energy storage constraints, V2G constraints and grid transaction constraints.
[0112] The power balance constraint is:
[0113] P load (t) = P grid (t)+P renewable (t)+P storage (t)+P V2G (t);
[0114] Where P load (t) is the port load at time t, P grid (t) is the power traded between the port and the power grid at time t, P renewable (t) is the renewable energy power generation at time t, P storage (t) is the energy storage power supply at time t, P V2G (t) is the amount of electricity generated by the transport vehicle through V2G at time t.
[0115] The present invention also discloses a port microgrid energy storage and transfer vehicle capacity configuration system using the aforementioned port microgrid energy storage and transfer vehicle capacity configuration method, including a data feature extraction module, a typical scenario set construction module, a power grid dispatching work model construction module, and a transfer vehicle capacity configuration model construction and solution module.
[0116] The data feature extraction module obtains and preprocesses the historical port load data, extracts data features from the preprocessed historical port load data, and obtains a standardized feature matrix;
[0117] The typical scene set construction module constructs a typical scene set including scene probabilities based on a standardized feature matrix;
[0118] The power grid dispatching work model building module is used to build a work model for the transfer vehicle V2G to participate in power grid dispatching;
[0119] The transfer vehicle capacity configuration model construction and solution module constructs a port microgrid energy storage and transfer vehicle capacity configuration model based on a typical scenario set and a working model; solves the configuration model to obtain a configuration result.
[0120] Example 1
[0121] A method for configuring the capacity of port microgrid energy storage and transfer vehicles.
[0122] In this embodiment, high-precision prediction of complex port loads and generation of typical scenarios are achieved. Specifically, the improved local anomaly factor LOF algorithm in step S1 introduces time continuity constraints, effectively distinguishing normal load fluctuations such as temporary docking of large ships and abnormal data such as equipment failures. The improved tensor decomposition algorithm enhances the ability to capture the spatiotemporal characteristics of loads through Frobenius norm regularization. In step S2, the improved density peak clustering DPC combined with the entropy weight method solves the "uneven density" problem in port load data, and the newly designed evaluation index J(K) realizes the automatic optimization of the number of clusters. These innovations enable the system to accurately identify various load patterns, including daily patterns and extreme scenarios such as large cruise ships docking or centralized cargo loading and unloading, providing a reliable data basis for subsequent optimization. The load prediction accuracy is improved by 15-20%, and the typical scenario coverage rate reaches more than 95%, which greatly reduces the improper capacity configuration caused by load prediction deviation and improves the reliability and economy of the system.
[0123] The innovation in step S3 realizes the accurate modeling and dynamic optimization of V2G participation of transfer vehicles. The improved hidden Markov model HMM introduces multi-state space and accurately captures the complex behavior patterns of transfer vehicles. The state evaluation function E(s) and the multi-objective optimization model realize the optimal V2G participation decision in a real-time dynamic environment. The dynamic response function R(t) combined with the fuzzy logic controller can dynamically adjust the V2G response intensity according to the grid demand and vehicle availability. The V2G participation efficiency is improved by 30-40%, the system response time is shortened by 50%, and the normal operation needs of transfer vehicles are guaranteed. This not only improves the flexibility of the port microgrid, but also provides reliable auxiliary services for the grid, adding additional economic benefits.
[0124] The two-layer optimization model of step S4 realizes the global optimal configuration of energy storage system and transfer vehicle capacity. The upper objective function comprehensively considers the operating cost, investment cost and environmental cost, and the lower objective function innovatively designs the new energy utilization function. The introduction of multi-scenario robust optimization model ensures the applicability of optimization results in various possible situations. The improved two-layer iterative solution algorithm significantly improves the solution efficiency through adaptive step size and dynamic relaxation factor. Compared with the traditional method, the utilization rate of energy storage capacity is increased by 25-30%, the number of transfer vehicles is optimized to be reduced by 10-15%, and the utilization rate of new energy is increased by more than 20%. This not only greatly reduces the overall cost of the system, but also improves the renewable energy absorption capacity of the port microgrid.
[0125] The entire scheme significantly improves the flexibility and robustness of the system by considering multiple uncertain factors such as load changes, fluctuations in renewable energy output, and availability of transfer vehicles. The scenario generation in step S2, the dynamic V2G strategy in step S3, and the multi-scenario robust optimization in step S4 jointly construct an optimization framework that can adapt to various complex situations. The system's adaptability to load fluctuations is improved by 40%, and its tolerance to fluctuations in renewable energy output is improved by 35%, greatly enhancing the stability and reliability of the port microgrid. Even in extreme weather or emergencies such as the sudden docking of large ships, the system can still maintain more than 90% of its performance.
[0126] This scheme adopts a number of innovations to improve computational efficiency in each step. The improved random projection RP method in step 1, the adaptive K value determination mechanism in step 2, the migratory bird optimization algorithm in step 3, and the improved double-layer iterative solution algorithm in S4 all greatly improve computational efficiency.
[0127] Compared with traditional methods, the optimization solution time is shortened by 60-70%, allowing the system to respond to changes in the port environment in near real time. At the same time, the scalability of the model is significantly improved, and it can easily cope with the increase in complexity caused by the expansion of port scale or the addition of new equipment.
[0128] Through the battery life model in S3 and the objective function design that comprehensively considers long-term costs in S4, the solution optimizes the long-term cost-effectiveness of the system. It is expected that within a 10-year operating cycle, the total system cost will be reduced by 20-25%, while the service life of the energy storage system and the transfer vehicle battery will be extended by 15-20%. This improves the long-term economic benefits of the port microgrid.
[0129] See attached Figure 1 , is a schematic diagram of the port microgrid power supply architecture of the present invention, the power supply section transmits electric energy to the load through the total medium voltage bus; in the present invention, the power supply section includes photovoltaic power generation and large power grid power supply; photovoltaic power generation transmits electric energy to the total medium voltage bus through direct current to alternating current; the large power grid transmits electric energy to the total medium voltage bus through adjacent medium voltage bus and transformer. The load includes port building electricity, quay crane facility electricity, shore power, electric vehicle charging pile and energy storage; port building electricity belongs to stability load; quay crane facility electricity belongs to impact load; shore power belongs to random load; electric vehicle charging pile belongs to V2G.
[0130] The present invention specifically comprises the following steps:
[0131] Step S1: Acquire port load data and preprocess it, call the feature extraction module to extract data features from the preprocessed port load data, and obtain a standardized feature matrix;
[0132] According to one aspect of the present application, step S1 specifically comprises:
[0133] S11, acquiring historical port load data, wherein the historical port load data includes shore power load, transfer vehicle load and other fixed loads, to form an original data matrix; performing outlier detection and processing on the original data matrix through an improved local outlier factor algorithm, and outputting a cleaned data matrix;
[0134] In this embodiment, specifically: enable the algorithm to simultaneously consider the time patterns of the load, such as intra-day, intra-week, and seasonal changes, the spatial patterns of the distribution of different types of loads, and the intra-day patterns such as the impact of tides on shore power loads: obtain historical data of various types of port loads, including shore power load P_s(t), transshipment vehicle load P_v(t) and other fixed loads P_f(t), to form an original data matrix X(t,n), where t is a time series, t is an integer, and t∈[1,T], T is the operating time, defined as 24h, 365 days according to different time patterns, and n is the load type, where n=1, 2, 3, corresponding to three types of loads respectively.
[0135] The method of applying the improved local outlier factor LOF algorithm to X(t,n) for outlier detection and processing is as follows: for each data point p, its k-neighbor distance d is calculated. k (p), k is the preset parameter for solving the k-neighbor distance. The k-neighbor distance of data point p is the distance between the kth nearest point and point P among the points closest to data point P.
[0136] Define the k-distance neighborhood N of p k (p) is no more than d away from p k The set of all points of (p).
[0137] Calculate the reach-dist of p k (p,o), the formula is as follows:
[0138] reach-dist k (p,o)=max{d k (o),d(p,o)};
[0139] Where o is N k The data points in (p), d k (o) is the k-neighbor distance of data point o, d(p,o) represents the distance between data point p and data point o, and max{x,y} means taking the larger value of x and y.
[0140] Calculate the local reachability density lrd of p k (p), the formula is as follows:
[0141]
[0142] Calculate the local outlier factor LOF of p k (p):
[0143]
[0144] where lrd k (o) is the local reachable density of o. Introduce the time continuity constraint:
[0145] If |LOF is satisfied k (p t )-LOF k (p t-1 )>θ, then further check p t m time points before and after ; where θ is the time continuity constraint threshold;
[0146] If LOF_k(p)>λ and the time continuity constraint is satisfied, p is marked as an outlier.
[0147] Where λ is the preset abnormal marking threshold.
[0148] The outlier is replaced by the median of the set time points before and after. In a preferred embodiment of the present invention, the outlier is replaced by the median of the two time points, one day before and one day after the outlier.
[0149] Through the above processing, the cleaned data matrix X'(t,n) is obtained.
[0150] S12: Input the cleaned data matrix X'(t,n) into the improved tensor decomposition algorithm:
[0151] a) Construct the cleaned data matrix X'(t,n) into a third-order tensor That is, the elements of the third-order tensor χ are all real numbers, and the shape of the tensor is T×N×D, where T is the time dimension, N is the number of load types, and D is the number of daily time periods, such as D=24 represents 24 hours in a day.
[0152] b) Define the tensor decomposition objective function:
[0153]
[0154] where ||·|| F It means to find the Frobenius norm of the matrix between “||||”, that is, the sum of the squares of all elements in the matrix between “||||”; G is the core tensor, T, S, D are the time, space, and intraday pattern matrices respectively, λ T , S , D is the regularization parameter.
[0155] c) Use the alternating least squares method ALS to solve the above optimization problem:
[0156] Fix S and D and update T using the least squares method using the following formula:
[0157]
[0158] in is to multiply each element of D by the complete S matrix.
[0159] Fix T and D and update S using the least squares method using the following formula:
[0160]
[0161] Fix T and S, and update D using the least squares method using the following formula:
[0162]
[0163] The formula for updating G is as follows:
[0164] χ×T T ×2S T ×3D T ;
[0165] d) Repeat step c until convergence or the maximum number of iterations is reached.
[0166] Through this algorithm, we can obtain the temporal pattern matrix T(t,r), the spatial pattern matrix S(n,r), and the core tensor G(r,r,r), where r is the rank, t is the time, and n is the matrix order.
[0167] S13: Design a new feature fusion algorithm, combining T(t,r) and S(n,r) obtained in S12:
[0168] a) Calculate the temporal pattern importance:
[0169] b) Calculate spatial pattern importance:
[0170] c) Adaptive weight w′ T (i) Update according to the following formula:
[0171]
[0172] Where e is the base of the natural logarithm function; ΔE T (i) is the contribution change of time mode i to system performance, and η is the learning rate.
[0173] Adaptive weight w′S (i) is updated according to the following formula:
[0174]
[0175] where ΔE S (i) is the change in the contribution of spatial pattern i to the system performance.
[0176] d) Perform weight normalization
[0177] The normalized weight w″ T (i) is calculated according to the following formula:
[0178]
[0179] The normalized weight w″ S (i) is calculated according to the following formula:
[0180]
[0181] e) Perform feature fusion to generate a comprehensive feature matrix
[0182] F(t,k+m): F(t,k+m) = [T(t,:) × diag(w′ T ), S(t,:) × diag(w′ S )];
[0183] Through this algorithm, a comprehensive feature matrix F(t,k+m) is generated.
[0184] S15: Input the comprehensive feature matrix F(t,k+m) obtained in S14 into the improved random projection RP method for dimensionality reduction. Hereinafter, F(t,k+m) will be abbreviated as F:
[0185] a) Generate a random projection matrix where d < k+m, and each element of R is independently sampled from ; where d is the target dimension and k+m is the dimension of the original data.
[0186] b) Calculate the preliminary projection: F init = F × R;
[0187] c) Construct the adjacency graph W:
[0188]
[0189] where σ is the Gaussian kernel parameter.
[0190] d) Calculate the graph Laplacian matrix L = D - W;
[0191] where D is a diagonal matrix, and its calculation formula is: D ii=Σ_jw ij ;
[0192] e) Solve the generalized eigenvalue problem: F init T LF init v=λF init T DF init v;
[0193] f) Select the eigenvectors corresponding to the smallest d eigenvalues among the generalized eigenvalues obtained to form the projection matrix P.
[0194] g) Perform the final dimensionality reduction according to the following formula to obtain the reduced dimensionality feature matrix F r (t,d):F r (t,d)=F init ×P;
[0195] Through this method, we get the reduced dimension feature matrix F r (t,d).
[0196] S16: Reduced dimension feature matrix F obtained in S15 r (t, d) Apply the improved Z-score method for standardization:
[0197] a) There are n feature dimensions in the reduced feature matrix. Calculate the mean, standard deviation, skewness and kurtosis of each feature dimension, and record the mean of the i-th feature dimension as μ i , the standard deviation of the i-th feature dimension is denoted as σ i , the skewness of the i-th feature dimension is denoted as S i , the kurtosis of the i-th feature dimension is denoted as K i .
[0198] b) If S i |>θ S or |K i -3>θ K , then apply Box-Cox transformation to transform the non-normal distribution data into an approximate normal distribution; otherwise, execute step e; where θ S is the preset skewness threshold; θ K is the preset kurtosis threshold; the calculation formula of Box-Cox transformation is as follows:
[0199]
[0200] where x i is the original data of the i-th feature dimension, y i is the data of the ith feature dimension after Box-Cox transformation; λ is the parameter of Box-Cox transformation, which is determined by maximum likelihood estimation.
[0201] d) Apply the traditional Z-score to standardize the transformed data, and the formula is as follows:
[0202]
[0203] e) If no transformation is applied in step c, normalization is performed directly using the following formula:
[0204]
[0205] Through this process, the final standardized feature matrix F is obtained s (t,d).
[0206] In this embodiment, the improved local anomaly factor LOF algorithm introduces a time continuity constraint, so that the algorithm can identify short-term fluctuations and long-term anomalies in the port load, and effectively distinguish normal load fluctuations such as temporary large ships docking and abnormal data such as equipment failure. This distinction is crucial for accurately evaluating the load characteristics of the port microgrid, because it avoids misjudging normal load peaks as abnormalities, while not ignoring real data anomalies. The improved tensor decomposition algorithm enhances the model's ability to capture the spatiotemporal characteristics of the port load by introducing the Frobenius norm regularization term. The algorithm is able to simultaneously consider the temporal pattern, spatial pattern, and intraday pattern of the load; the temporal pattern includes intraday, intraweek, and seasonal changes; the spatial pattern includes the distribution of different types of loads; the intraday pattern includes the impact of tides on shore power loads, thereby obtaining a more comprehensive and accurate representation of load characteristics. In addition, the newly designed feature fusion algorithm adopts an adaptive weight method, which can dynamically adjust the weights according to the contribution of different features to system performance. The model is able to adapt to the dynamic changes of port loads, such as changes in seasonal ship arrival patterns or the impact of new transshipment vehicles, so as to always maintain the accuracy and relevance of feature extraction. The improved random projection RP method introduces the idea of local preserving projection LPP, which maintains the local structure of the data during the dimensionality reduction process. It is crucial to preserve the key patterns in the port load data because it ensures that important load features are not lost while reducing the data dimension; the key patterns include the shore power demand patterns of specific types of ships.
[0207] In short, it is possible to extract high-quality, low-dimensional feature representations from the original port load data, providing a reliable data basis for subsequent clustering analysis and optimization models. This not only improves the accuracy of subsequent analysis, but also reduces computational complexity, allowing the entire system to respond more quickly to changes in port loads, and providing the possibility for real-time optimization of energy storage systems and transshipment vehicles.
[0208] Step S2: Based on the standardized feature matrix, cluster analysis and scene generation are performed to obtain a set of typical scenes and the probability corresponding to each typical scene;
[0209] According to one aspect of the present application, step S2 is specifically:
[0210] Step S21, read the standardized feature matrix, call the pre-configured clustering module for processing, and obtain the clustering result;
[0211] According to one aspect of the present application, step S21 is implemented by the first clustering module or the second clustering module. When the first clustering module is used, step S21 is further:
[0212] Step S211, read the standardized feature matrix, read each row in the matrix as sample point data, calculate the local density and the distance to the high-density point of each sample point, use the entropy weight method to calculate the weight coefficients of the local density and the distance to the high-density point respectively, calculate the comprehensive score of each sample based on the local density and the distance to the high-density point and their weights, and select the K points with the highest scores as the initial clustering centers; K is a natural number greater than 1; the comprehensive score is obtained by weighted averaging different indicators.
[0213] Step S212: construct an evaluation index for the initial cluster center; the evaluation index J(K) is:
[0214]
[0215] Where α is the balance factor; Silhouette (K) is the silhouette coefficient and DBI (K) is the Davies-Bouldin index; based on the evaluation index, the golden section search method is used to find the optimal K value within the preset range to maximize the evaluation index J (K) and obtain the optimal clustering number K;
[0216] Step S213, read the optimal number of clusters and the initial cluster center, and call the hybrid kernel function; the hybrid kernel function is:
[0217] K i ,y i =β×KRBF x i ,y i +1-β×Kpoly(x i ,y i );
[0218] Among them, β is the adaptive parameter, KRBF(x i ,y i ) represents the calculation of x i ,y j The radial basis function kernel between two points, Kpoly(x i ,yi ) represents the calculation of x i ,y j The polynomial kernel between two points; K-means algorithm is executed in the kernel space to minimize the following formula to obtain the objective function:
[0219]
[0220] Where φ() is the kernel mapping function for the points in the brackets, μ j is the cluster center of the jth class, w ij For sample x i The membership degree of the jth class is updated using the alternating optimization strategy. ij and cluster center μ j , and obtain the preliminary clustering results; the membership degree is obtained by the fuzzy C-means clustering algorithm FCM.
[0221] The RBF kernel is able to effectively capture the nonlinear characteristics of load data. For example, it can well describe the nonlinear variation of shore power load with ship size and type. It is particularly effective in identifying local patterns of load, such as identifying load characteristics during specific time periods; specific time periods include morning peaks, evening peaks, etc. The smoothing properties of the RBF kernel make it perform well when dealing with noisy load data, which is common in actual port environments. The polynomial kernel is able to capture the interaction between variables. For example, it can describe the complex relationship between transshipment vehicle load and cargo throughput. It is suitable for describing periodic changes in load over time, such as daily load curves or weekly load curves. By adjusting the polynomial degree d, the complexity of the model can be controlled to adapt to load patterns of different complexities.
[0222] In this step, the ability of the RBF kernel to capture local features and nonlinear relationships is combined with the advantages of the polynomial kernel in describing variable interactions and periodic patterns. By adjusting the β parameter, the contribution of the two kernel functions can be flexibly balanced, allowing the model to adapt to different types of port load characteristics. For example, for highly nonlinear shore power loads, the weight of the RBF kernel may be increased; while for fixed facility loads with obvious periodicity, the weight of the polynomial kernel may be increased. This hybrid kernel function enables the model to simultaneously capture local features such as sudden high loads and global features such as seasonal changes in port load data, thereby providing a more comprehensive and accurate description of load patterns. Using this hybrid kernel function in K-means clustering, more complex and diverse load patterns can be identified, including those that are difficult to distinguish under the traditional Euclidean distance metric.
[0223] Step S214: accept the suboptimal solution with a predetermined probability after each iteration, apply the density-based split-merge strategy, and dynamically adjust the clustering structure; if the intra-class variance exceeds the preset split threshold, split the class; if the center distance between the two classes is less than the preset merge threshold, merge the two classes, and obtain the optimized clustering result by optimizing and refining the preliminary clustering result.
[0224] According to one aspect of the present application, step S21 is implemented by the first clustering module or the second clustering module. When the second clustering module is used, step S21 is further:
[0225] Step S211, standardize the feature matrix, apply the singular value decomposition method to perform preliminary dimensionality reduction, decompose the standardized feature matrix into a left singular vector matrix, a right singular vector matrix and a singular value diagonal matrix, and solve the maximum singular value; the maximum singular value is the largest element on the diagonal of the singular value diagonal matrix; select the singular vectors corresponding to the first k largest singular values to obtain a reduced dimension matrix; k is a natural number greater than 1;
[0226] Step S212, see attached Figure 2 , for the dimension reduction matrix, calculate the KL divergence between each pair of time series and output the KL divergence matrix; including: for any two time series i and j, calculate the KL divergence D from i to j KL (i||j) and the KL divergence D from j to i KL (j||i), construct a symmetric KL divergence matrix D KL , where the element D in the i-th row and j-th column of the KL divergence matrix is KL (i, j) is calculated as follows:
[0227]
[0228] Thus we get the KL divergence matrix D KL ;
[0229] Step S213: Based on the KL divergence matrix D KL , use the interval sampling method to select the initial cluster center, make the initial center distribution uniform, perform K-means clustering, use KL divergence as the distance metric in each iteration; build an adaptive K value selection mechanism, and automatically select the optimal number of clusters K by analyzing the silhouette coefficient and Davies-Bouldin index under different K values. Output the preliminary clustering results;
[0230] Step S214: Optimize the temporal and spatial consistency of the preliminary clustering results by the following formula, and output the optimized clustering results S(c); wherein the optimized clustering results S(c) are obtained by the following formula:
[0231] S(c)=w t ×T(c)+w s ×A(c);
[0232] Where T(c) represents the temporal consistency of category c, A(c) represents the spatial consistency, and w t and w s is the weight coefficient; in the iterative optimization process, samples are allowed to switch categories while ensuring that the spatiotemporal consistency score is improved; through the density-based anomaly detection mechanism, possible anomalies are identified and processed; the optimized clustering result is obtained, which is the optimized clustering result.
[0233] Step S22: Based on the clustering results, an improved principal component analysis method is used to extract the main feature vectors of each cluster, generate typical scenes, calculate the probability of each scene, and construct a typical scene set containing scene probabilities.
[0234] According to one aspect of the present application, step S22 is specifically:
[0235] Step S221: based on the optimized clustering result, the centroid and covariance matrix of each cluster are calculated, and the main eigenvector of each cluster is extracted using the improved principal component analysis method. Based on the main eigenvector, a typical scene is generated, that is, a typical scene set is obtained;
[0236] Step S222: read the optimized clustering results and the typical scene set, call the probability calculation formula, and calculate the probability S of each typical scene. k , forming a typical scene set with probability parameters; the probability calculation formula is
[0237]
[0238] Where N k is the number of samples in the kth cluster, N total is the total number of samples, ρ k is the average density of the kth cluster.
[0239] In this embodiment, the improved density peak clustering DPC idea combined with the entropy weight method solves the problem of "uneven density" in port load data. In the port environment, different types of loads such as shore power, transshipment vehicles, and fixed facilities may present completely different density distributions. Traditional clustering methods often find it difficult to simultaneously handle these huge density distributions, while the improved DPC successfully identifies various load patterns by adaptively adjusting the density definitions of different areas, including high-frequency daily load patterns and low-frequency but high-importance extreme load scenarios; among which extreme load scenarios include large cruise ships docking, centralized cargo loading and unloading, etc. The newly designed evaluation index J(K) cleverly balances the compactness and separation of clusters by combining the silhouette coefficient and the Davies-Bouldin index. The model can automatically determine the optimal number of clusters to adapt to the complexity and diversity of port load patterns. For example, it can accurately distinguish between weekday and weekend load patterns, and even identify unique load patterns caused by special holidays or seasonal changes. The improved kernel K-means clustering algorithm introduces a hybrid kernel function, which greatly improves the algorithm's ability to handle nonlinear load patterns. In the port environment, the load pattern often presents highly nonlinear characteristics, such as the periodic impact of tides on shore power load, or the complex relationship between the load of transshipment vehicles and the amount of cargo arriving at the port. The hybrid kernel function can capture these linear and nonlinear relationships at the same time, thereby obtaining more accurate clustering results. The simulated annealing SA idea and the density-based split-merge strategy introduced in the clustering optimization process effectively solve the local optimal problem in port load clustering. It enables the model to jump out of the local optimum and find a more globally optimal clustering structure, thereby better reflecting the true pattern of port load. In the process of generating typical scenarios, the improved principal component analysis PCA method is used to not only extract the main eigenvectors of each cluster, but also consider the relative importance of the eigenvectors. This makes the generated typical scenarios closer to the actual situation and can accurately reflect the relative proportions and changing trends of different load components such as shore power, transshipment vehicles, and fixed facilities in different scenarios.
[0240] In summary, a series of representative typical load scenarios can be identified from the complex and changeable port load data, each of which is accompanied by an accurate probability estimate. These typical scenarios provide a reliable basis for the subsequent optimization of energy storage and transshipment vehicle capacity, allowing the optimization process to cover a variety of possible load conditions, thereby ensuring the robustness and practicality of the optimization results. In addition, by identifying and quantifying the probabilities of different load scenarios, this step also provides valuable decision support information for port operators, helping them to better plan resource allocation and formulate operational strategies.
[0241] Step S3: constructing a working model for the transfer vehicle V2G to participate in the grid dispatching;
[0242] According to one aspect of the present application, step S3 is specifically:
[0243] The working model of the transfer vehicle V2G participating in the grid dispatching includes a multi-objective optimization model of the V2G participation strategy, a battery life model and a total available V2G capacity.
[0244] Step S31, obtaining historical operation data of the transfer vehicle, including working time, charging time and standby time, inputting these data into the improved hidden Markov model HMM, obtaining the state transition probability matrix output by the improved hidden Markov model, recorded as the vehicle state transition probability matrix P, and evaluating it through the state evaluation function, outputting the vehicle behavior pattern characteristics and the state transition probability matrix;
[0245] The state space is defined as S = {working, charging, standby, V2G participation}, and the state evaluation function E(s) = f(SOC, T remain , P grid );
[0246] Where SOC is the remaining battery capacity, T remain is the remaining time, P grid is the grid load status;
[0247] Step S32: construct a multi-objective optimization model of the V2G participation strategy based on the behavior pattern characteristics and the state transition probability matrix;
[0248] Those skilled in the art should know that a multi-objective optimization model is a mathematical model that optimizes two or more conflicting objective functions at the same time; the technical solution of the present invention can be implemented by using a multi-objective optimization model in the prior art. In a preferred embodiment of the present invention, the multi-objective optimization model includes an objective function and constraints;
[0249] The objective function is max{f1(x), f2(x), f3(x)};
[0250] Where f1(x) is economic benefit, f2(x) is grid support, and f3(x) is battery life impact; constraints include grid balance constraints, energy storage charging and discharging constraints, battery life constraints, and vehicle operation constraints; the pre-configured improved migratory bird optimization algorithm is called to solve and obtain a set of Pareto optimal solutions, representing different V2G participation strategies;
[0251] According to one aspect of the present application, the improved migratory bird optimization algorithm used in step S32 is specifically:
[0252] Step S321, initializing parameters, generating an initial bird group of population size, and dividing the group into leading bird groups and following bird groups;
[0253] Step S322: The leader bird evolves, generates N_size neighborhood solutions, selects the best solution to replace the leader bird, and selects S_size suboptimal solutions as the shared solutions of the first left and right follower birds;
[0254] Step S323, perform evolution operations on each follower bird in the left follower bird group in sequence to generate N_size neighborhood solutions, select the optimal solution from the neighborhood solutions and the shared solutions to replace the follower bird, and select S_size suboptimal solutions as the shared solutions for the next follower bird in the left queue;
[0255] Step S324, perform the same operation as step S3 on the right group of flying birds;
[0256] Step S325, randomly select G1 of the left and right following bird groups to perform a crossover operation on the birds, add the generated 2×G1 offspring to the bird group, re-screen sizepop birds as the new bird group for the next patrol, and divide the new leading birds and bird groups;
[0257] Step S326: if the patrol number G is not reached, return to step s2; if the patrol number G is reached, record the current leading bird and proceed to the next step;
[0258] Step S327: If the maximum number of iterations Maxgen is not reached, return to step s2; if the maximum number of iterations Maxgen is reached, end the algorithm and output the current leading bird as the optimal solution.
[0259] Step S33: construct a battery life model using a Pareto optimal solution set representing different V2G participation strategies;
[0260] Those skilled in the art should know that the multi-battery life model is a mathematical model for predicting the remaining life; the battery life model in the prior art can be used to implement the technical solution of the present invention. In a preferred embodiment of the present invention, the battery life model is as follows:
[0261]
[0262] Where L0 is the initial life, k is the attenuation coefficient, F i is the impact factor, w i is the weight; the Monte Carlo simulation method is used to evaluate the impact of different V2G strategies on battery life; the expected battery life corresponding to each V2G strategy is output;
[0263] Step S34: Based on the characteristics of vehicle behavior patterns and the Pareto optimal solution set representing different V2G participation strategies, estimate the number of vehicles that can participate in V2G in each time period and calculate the total available V2G capacity C V2G (t);
[0264] CV2G (t) = N V2G (t)×C single ×η V2G ;
[0265] Among them C single is the available capacity of a single vehicle, η V2G is the V2G efficiency coefficient, and its preferred value range is 0.2 to 0.6; the V2G available capacity C of the output time series V2G (t); N V2G (t) is the number of transport vehicles participating in V2G. The capacities are all electric energy capacities.
[0266] Step S35: V2G available capacity C V2G (t), construct the dynamic response function R(t);
[0267] R(t)=f(Preq(t),C V2G (t), SOC avg (t));
[0268] Where P req (t) is the power requested by the grid, SOC avg (t) is the average SOC of the participating vehicles, that is, the average state of charge value of the batteries of the participating vehicles; the response intensity is adjusted using a fuzzy logic controller to take into account the urgency of grid demand and vehicle availability; and the V2G response model R(t) is output.
[0269] In this embodiment, the improved hidden Markov model HMM introduces a multi-state space, including four states: working, charging, standby and V2G participation. This enables the model to accurately capture the complex behavior patterns of port transshipment vehicles, such as the working intensity, charging requirements and V2G participation possibilities of vehicles in different time periods. In particular, by analyzing the state transition probability matrix P, the model can predict the number of vehicles that may participate in V2G in a given time period, which provides a reliable basis for subsequent V2G capacity estimation. Secondly, the newly designed state evaluation function E(s) comprehensively considers the remaining battery power SOC, remaining time and grid load status, so that the model can make the optimal V2G participation decision in a real-time dynamic environment. For example, when the grid load is high and the vehicle battery is sufficient, the system will give priority to allowing the vehicle to participate in V2G; conversely, when the vehicle is about to be put into work or the battery is low, the system will give priority to ensuring the normal operation needs of the vehicle.
[0270] The multi-objective optimization model of V2G participation strategy takes into account the three objectives of economic benefits, grid support and battery life. This enables the model to find the best balance between multiple key factors, maximizing the economic benefits of V2G participation, providing effective support for the grid, and minimizing the negative impact on battery life. By using the improved migratory bird optimization algorithm, the model has strong convergence performance, simple structure, few parameters to adjust, easy to implement, and adaptively adjustable convergence factors and information feedback mechanisms. It can achieve a balance between local optimization and global search, and has good performance in problem solving accuracy and convergence speed. It can efficiently find a set of Pareto optimal solutions and provide decision makers with a variety of optional strategies.
[0271] The newly designed battery life model L(t) introduces multiple influencing factors, such as charge and discharge depth and temperature, and uses Monte Carlo simulation to evaluate the long-term impact of different V2G strategies on battery life. This enables the model to more accurately predict the impact of V2G participation on the battery of the transport vehicle, so that the long-term cost-effectiveness can be fully considered when formulating V2G strategies.
[0272] The design of the dynamic response function R(t) is combined with a fuzzy logic controller, which can dynamically adjust the V2G response intensity according to the urgency of grid demand and vehicle availability. This enables the V2G system to respond more flexibly to changes in grid demand and maximize the benefits of V2G participation while ensuring port operation needs.
[0273] In summary, a comprehensive, accurate and dynamic V2G participation model for transfer vehicles was constructed. This model can not only accurately predict the available V2G capacity, but also make the optimal V2G participation decision based on real-time conditions. For the port microgrid, this means that the mobile energy storage resource of transfer vehicles can be used more efficiently, significantly improving the flexibility and economy of the system. At the same time, by accurately controlling the degree of V2G participation, the model can also effectively balance grid support, economic benefits and vehicle operation needs, providing strong support for the overall optimization of the port microgrid.
[0274] Step S4: Combine the typical scenario set and the working model to build a port microgrid energy storage and transfer vehicle capacity configuration model, call the improved migratory bird optimization algorithm to solve, obtain the most effective solution set and output it.
[0275] According to one aspect of the present application, step S4 is specifically:
[0276] The port microgrid energy storage and transfer vehicle capacity configuration model includes an upper objective function, a lower objective function and a total constraint condition;
[0277] See attached Figure 3, the upper objective function discounts the cost and investment cost to the lower objective function, and the lower objective function transmits the power purchase cost to the upper objective function; the difference between the power purchase and sales cost of the microgrid and the sum of the operation and maintenance cost calculated by the upper and lower models is compared to obtain the optimal capacity configuration plan that takes into account both economy and environmental protection. The upper objective function and the lower objective function are both constructed based on the load demand curve, photovoltaic output curve, grid time-of-use electricity price, energy storage charging and discharging, and electric vehicle V2G;
[0278] Step S41: construct an upper layer objective function based on a typical scenario set, a V2G participation model, and pre-stored system parameters;
[0279] Those skilled in the art should know that the upper objective function in the port microgrid energy storage and transfer vehicle capacity configuration model is a function with the lowest power generation cost of the port microgrid as the optimization target. The upper objective function in the port microgrid energy storage and transfer vehicle capacity configuration model in the prior art can realize the technical solution of the present invention. In a preferred embodiment of the present invention, the upper objective function is a comprehensive cost function:
[0280] F upper =w1×C operation +w2×C investment +w3×C environmental ;
[0281] Among them C operation is the operating cost, C investment is the investment cost, C environmental is the environmental cost. Use the analytic hierarchy process to determine the operating cost weight w1, investment cost weight w2, and environmental cost weight w3; output the upper objective function Fupper.
[0282] Step S42: Based on the typical scenario set SP and the V2G response model R(t), a lower-level objective function is constructed. The lower-level objective function is a new energy utilization rate function:
[0283]
[0284] Where E renewable_used is the amount of renewable energy actually used, E renewable_total is the total renewable energy power generation, P curtailment is the power abandonment rate, λ is the penalty factor; output the lower layer objective function Flower.
[0285] Step S43: construct a total constraint condition based on the constructed upper-level objective function and lower-level objective function, as well as system operation requirements; the total constraint condition includes power balance constraint, energy storage constraint, V2G constraint and grid transaction constraint.
[0286] The power balance constraint is:
[0287] P load (t) = P grid (t)+P renewable (t)+P storage (t)+P V2G (t);
[0288] Where P load (t) is the port load at time t, P grid (t) is the power traded between the port and the power grid at time t, P renewable (t) is the renewable energy power generation at time t, P storage (t) is the energy storage power supply at time t, P V2G The electricity generated by the transport vehicle through V2G.
[0289] The energy storage constraint is:
[0290] SOC min ≤SOC(t)≤SOC max ,|P charge / discharge (t)|≤P rated ;
[0291] Among them, SOCmin and SOCmax are the minimum and maximum values of the energy storage charge state, P charge / discharge Refers to the power of a single charge and discharge of energy storage, P rated The upper limit of a single charge and discharge of energy storage.
[0292] The V2G constraints are:
[0293] NV2G(t)≤Navailable(t), SOCV2G(t)≥SOCthreshold;
[0294] Among them, NV2G(t) is the number of vehicles allowed to transfer via V2G, Navailable(t) is the maximum value allowed by the former, SOCV2G(t) is the state of charge value of the battery of the transfer vehicle during V2G, and SOCthreshold is the minimum value required by the former.
[0295] The grid transaction constraints are:
[0296] P grid min≤P grid (t)≤P grid max;
[0297] Where P grid (t) is the power exchanged between the port microgrid and the grid per unit time, P grid min and P grid max is the minimum and maximum value of the power exchanged between the port microgrid and the grid per unit time.
[0298] Output the complete set of constraints C.
[0299] Step S44: read multiple scene sets, each scene contains load and new energy output, combined with the upper objective function F uppe r and the lower objective function F lower , construct the robust optimization model minimizeFupper, with the following constraints:
[0300] P(F lower ≥F target )≥1-ε–;
[0301] Where ε is the risk tolerance; F target , is the constraint target, which means that the optimization model converges stably; P(·) represents the probability of achieving the inequality in the brackets.
[0302] Then output the robust optimization model;
[0303] Step S45: Applying an improved two-layer iterative solution algorithm to the constructed robust optimization model, the steps are as follows:
[0304] Initialize the upper decision variable x0;
[0305] Solving the lower level problem, we get:
[0306] y k = argmin F lower (x k , y);
[0307] where y k is the optimization result of the lower layer, argminX is the minimum value of X, F lower (x k , y) is the lower layer objective function, x k , y refers to the variable in the lower objective function, that is, x k , y are the actual renewable energy electricity used and the total renewable energy power generation respectively.
[0308] The formula for updating the upper-level variables is:
[0309]
[0310] in It is the influence coefficient of the lower-level optimization results on the upper-level variables.
[0311] If ||x k+1 -x k ||<ε then output the optimal solution x opt and opt ;
[0312] Here, ||·|| means to find the sum of the squares of all elements in the middle matrix of “||||”.
[0313] In the calculation process, the adaptive step size α is introduced k and the dynamic relaxation factor β k , in order to improve the convergence speed and stability.
[0314] Step S46: Analyze and verify the results using the optimal solutions xopt and yopt, including:
[0315] Use the cross-validation method to evaluate the generalization ability of the model and obtain the validation index V;
[0316] Conduct sensitivity analysis to evaluate the impact of key parameters on the results and obtain the sensitivity matrix S;
[0317] The Monte Carlo simulation method is used to generate random scenarios for model robustness testing and obtain the robustness index R;
[0318] Output the final optimization result report, including the optimal configuration solutions xopt, yopt, as well as the verification index V, sensitivity matrix S and robustness index R.
[0319] In this embodiment, the design of the upper objective function innovatively introduces a comprehensive cost function, taking into account operating costs, investment costs and environmental costs. This enables the model to comprehensively evaluate the long-term benefits of different configuration options, taking into account not only direct economic benefits but also environmental impacts. By using the analytic hierarchy process (AHP) to determine weights, the model can flexibly adjust the relative importance of various costs according to the specific conditions and policy requirements of the port. For example, for ports that pay more attention to environmental protection, a higher weight can be given to environmental costs.
[0320] The lower objective function innovatively designs a new energy utilization function, which not only considers the actual proportion of new energy electricity used, but also introduces a penalty factor for power abandonment rate. This effectively solves the common new energy consumption problem in port microgrids, and encourages the system to maximize the utilization of new energy while also considering load balance and system stability.
[0321] The definition of constraints comprehensively considers various operating constraints of the port microgrid, including power balance, energy storage system limitations, V2G participation constraints, and grid transaction limitations. These constraints ensure the feasibility and practicality of the optimization results and can adapt to the complex and changing operating environment of the port. In particular, the introduction of V2G constraints enables the model to accurately reflect the potential and limitations of transshipment vehicles participating in grid regulation, thereby achieving more accurate capacity configuration.
[0322] The multi-scenario robust optimization model generates multiple scenarios with uncertain parameters such as load and renewable energy output, and introduces risk tolerance ε. The model can ensure the robustness of the optimization results while considering various possible situations. The final capacity configuration plan can adapt to changes in port load and renewable energy output, improving the reliability and flexibility of the system.
[0323] The improved two-layer iterative solution algorithm introduces an adaptive step size α k and the dynamic relaxation factor β k , significantly improving the speed and stability of the solution process. This enables the model to find the global optimal solution within a reasonable time, and maintain high efficiency even in the face of large-scale, highly complex port microgrid systems. In the result analysis and verification phase, the application of cross-validation methods ensures the generalization ability of the model, sensitivity analysis helps identify key parameters, and Monte Carlo simulation further verifies the robustness of the model. The innovative combination of these verification steps provides a strong reliability guarantee for the final optimization results.
[0324] In short, this model can optimize the capacity of the energy storage system and the number of transfer vehicles at the same time, maximizing economic benefits and the utilization of new energy while meeting the port's operational needs. For the port microgrid, this means that it can achieve the optimal allocation of resources and significantly improve the economy, reliability and environmental friendliness of the system. At the same time, by considering a variety of uncertain factors and long-term benefits, the model can also provide scientific decision-making support for the port's long-term development planning.
[0325] Example 2
[0326] The method for configuring the capacity of port microgrid energy storage and transfer vehicles includes the following steps:
[0327] The K-means clustering analysis method based on SVD and KL divergence considering the spatiotemporal characteristics is used to extract the features of port power load data and obtain typical shore power load scenario data.
[0328] According to the operating characteristics of port transfer vehicles, a working model for transfer vehicles to participate in power grid dispatching through V2G is established;
[0329] A two-layer optimization model for energy storage and transfer vehicle capacity configuration is established with the minimization of port microgrid operating cost as the upper optimization target and the maximum utilization of port new energy as the lower target.
[0330] In this application, the K-means clustering analysis method based on SVD and KL divergence considering the spatiotemporal characteristics is adopted, which can quickly and accurately divide the massive port microgrid load data into several typical scenarios, each of which has similar load requirements. Through clustering simplification, the typical scenarios obtained are more representative and can cover most of the actual operating conditions. The subsequent two-layer optimization model uses typical scenarios as input, which can reduce the computational complexity while increasing the scope of application of the results, and has strong engineering practical value. Improve the accuracy and efficiency of microgrid operation scenario analysis.
[0331] Port transfer vehicles have completely different operation plans and load data from electric vehicles in normal areas. In ports, the number of transfer vehicles in working state is defined according to different working conditions, and transfer vehicles in charging state are used to participate in grid transactions with V2G technology, and arbitrage through time-of-use electricity prices, reduce grid operation costs, and improve the utilization rate of grid new energy. In the dispatch of port microgrids, transfer vehicles will use the same dispatch and constraint methods as grid energy storage in some states, but more detailed constraints need to be placed on the transfer vehicle batteries.
[0332] After obtaining the load characteristics of the port microgrid and clarifying the working models of photovoltaic power generation, energy storage and transfer vehicles in the power grid, the plan clearly establishes a two-layer optimization model, with the upper optimization goal of minimizing the operating cost of the port microgrid and the lower goal of maximizing the utilization rate of new energy in the port. The model constraints include power balance constraints, photovoltaic power generation output constraints, energy storage constraints, transfer vehicle constraints and power grid transaction constraints.
[0333] According to one aspect of the present application, the K-means clustering analysis method based on SVD and KL divergence considering the spatiotemporal characteristics is used to cluster the different load scenarios in the port microgrid, obtain typical load scenario data, and provide a basis for the subsequent establishment of an optimization model, specifically:
[0334] After the original load matrix X is reduced to matrix S by SVD technology and represented by a column matrix, the KL divergence of each random distribution sequence is calculated with load power as the index;
[0335] Calculate the average distance from each object to other objects row by row;
[0336] Take half of the average distance as the threshold, remove objects larger than the threshold, recalculate the new average distance value, and calculate the number of objects away from this value;
[0337] Traverse all density values, if it is the maximum value, then the first initial center point can be found;
[0338] Repeat the above steps to determine the initial center points of the remaining objects in turn;
[0339] Draw a curve relationship between the number of clusters and the average distance of data points in the same cluster. Generally, the average distance will gradually decrease as the number of clusters increases. By finding the point with the largest rate of change, the optimal number of clusters can be determined.
[0340] According to one aspect of the present application, the K-means clustering analysis method based on SVD and KL divergence considering spatiotemporal characteristics is used to cluster different load scenarios in the port microgrid to obtain typical load scenario data, and subsequently establish an optimization model to provide a basis, and also includes:
[0341] As the data scale increases, the computational complexity of cluster analysis will increase significantly, making it difficult to select the initial cluster center. At the same time, the increase in user types will lead to a decrease in clustering effect, so the general K-means is not suitable for clustering port load data. In order to speed up the clustering operation, the current mainstream method is to use the idea of data dimensionality reduction, among which the singular value decomposition method has shown certain excellence. The following is a dimensionality reduction method for matrix X using singular value decomposition SVD.
[0342] X is a matrix with m rows and n columns, which can be expressed as a column vector:
[0343] X={x1,x2,…,x n};
[0344] There exists an orthogonal matrix U m×n and V m×n ,satisfy:
[0345]
[0346] Where Λ is a diagonal matrix with rank satisfying k=rank(X)=rank(Λ); the eigenvalues of the original matrix satisfy σ1≥σ2≥...≥σ k .
[0347] X T X is a real symmetric matrix, ∑ is T The diagonal matrix corresponding to X is
[0348]
[0349] The calculation can be simplified to obtain the characteristic value σ i .
[0350] In order to ensure the key feature information of the original matrix, the contribution rate l is generally used to represent the amount of information, that is, the proportion of the sum of squares of the original singular values, which is:
[0351]
[0352] For a specific l, after determining the k value, the dimensionality reduction of the original matrix is achieved.
[0353] After dimensionality reduction, K-Means clustering analysis based on KL divergence is as follows:
[0354] After reducing the dimension of the original matrix X, we get the compressed matrix S, which can be expressed as a column vector:
[0355] S={s1,s2,…,s k};
[0356] KL divergence is applicable to the distance measurement of randomly distributed sequences. The column vector KL divergence corresponding to the i and j sequences is:
[0357]
[0358] All d ij The elements form a new KL divergence matrix. For ease of analysis, the row elements are arranged from small to large values.
[0359] Compute the average distance from each object to every other object row by row.
[0360]
[0361] Take half of the average distance as the threshold, remove objects larger than the threshold, and recalculate the new average distance value At the same time, the calculated distance is less than The number of i .
[0362]
[0363] where dens i is the density value of the i-th row.
[0364] Traverse all density values, and if it is the maximum value, the first initial center point can be found.
[0365] Repeat the above steps to calculate the dens of different objects i The initial center points of the remaining objects are determined in turn. A curve relationship between the number of clusters and the average distance d of the data points in the same cluster is drawn. Generally, d will gradually decrease as the number of clusters increases. The point with the largest change rate can be found to determine the optimal number of clusters.
[0366] In this embodiment, cluster analysis considering spatiotemporal characteristics has the following technical effects:
[0367] Traditional scenario analysis often only considers the load of a single time section, ignoring the continuity and correlation of the scenario in time and space. However, by introducing time and space characteristics, this clustering algorithm can capture the evolution of port load in time and space, thereby obtaining more accurate and comprehensive typical scenario division results. This improves the accuracy of microgrid operation scenario analysis.
[0368] The uncertainty load of shore power and the load of large-scale port devices in the port microgrid, including the load of transfer vehicles related to the port cargo volume, make the load calculation of the port microgrid very complicated, and direct calculation will lead to non-convergence of the calculation results. The clustering algorithm can automatically classify the massive scenes into a few typical modes. The characteristics of the scenes within each mode are similar, while the characteristics between the modes are significantly different. The subsequent optimization capacity configuration calculation only needs to be performed for these typical scenes, reducing the calculation complexity and time cost.
[0369] In traditional K-means clustering, the number of clusters K needs to be set manually and remains unchanged during the iteration process, which largely depends on experience and prior knowledge. This clustering algorithm uses K-means clustering analysis involving divergence KL to automatically calculate the optimal number of clusters K, and adaptively adjusts the cluster size during the iteration process, overcoming the blindness of manual settings.
[0370] Example 3
[0371] A method for configuring the capacity of port microgrid energy storage and transfer vehicles.
[0372] According to one aspect of the present application, a working model for a transfer vehicle to participate in power grid dispatching through V2G is established based on the operating characteristics of the port transfer vehicle, specifically:
[0373] The operation plan of port transfer vehicles needs to be determined according to the port cargo volume. The daily port cargo volume determines the number of transfer vehicles in working state required at each time of the day. The total number of transfer vehicles is set to N, and the number of transfer vehicles required at the current time is a. The number of cars in charging state that can participate in grid dispatching using V2G is Na. The upper limit of the unit battery capacity of the transfer vehicle is set to X, and the upper limit of the battery energy storage state of charge SOC is SOCmax, and the lower limit of the state of charge required for the transfer vehicle to start working is SOC work .
[0374] The total capacity of transfer vehicles participating in grid dispatching:
[0375] P kmax =(Na)×SOCmax×X;
[0376] The transfer vehicle needs to leave the charging state to constrain the state of charge: SOC ≥ SOC work .
[0377] Among them, SOC work It is the charge state of the vehicle battery when the transfer vehicle enters the working state.
[0378] According to one aspect of the present application, a two-layer optimization model for energy storage and transfer vehicle capacity configuration is established with minimizing the port microgrid operating cost as the upper optimization target and maximizing the port's new energy utilization as the lower target.
[0379] The model constraints include power balance constraints, photovoltaic power generation output constraints, energy storage constraints, transfer vehicle constraints and grid transaction constraints.
[0380] According to one aspect of the present application,
[0381] See attached Figure 3 ,The upper optimization objective of the model is to minimize the total cost of microgrid operation;
[0382] Optimization variables: energy storage capacity eebatint, number of transfer vehicles X.
[0383] Objective function:
[0384]
[0385] Among them, energy storage charging pch, energy storage discharging pdis, charging and discharging mark, purchased electricity quantity pbuy, sold electricity quantity psell, purchased and sold electricity mark, transfer vehicle charging pevch, transfer vehicle discharging pevdis, transfer vehicle charging and discharging mark, photovoltaic power generation output ppv, load pload. price is the daily electricity price; cpvom, cevom and cbatom are the operation and maintenance cost coefficients of photovoltaic power generation facilities, transfer vehicle facilities and energy storage facilities, respectively, and reflect the costs of the three facilities through electricity.
[0386] The constraints include power balance constraints, photovoltaic power generation output constraints, transfer vehicle constraints and grid transaction constraints:
[0387] The power balance constraint is:
[0388] P B -P S =P L -P PV +P ch -P dis +P evch -P evdis ;
[0389] Where: P B The power purchased from the power grid, P S P is the power sold to the grid, L is the port load, PPV is the photovoltaic power generation power of the port, P ch is the energy storage charging power, P dis is the energy storage discharge power, P evch The charging power of the transport vehicle, P evdis Discharge power for transport vehicles.
[0390] The photovoltaic power generation output constraint is:
[0391] 0 P pv P pv-max ;
[0392] Where P pv Provide power for photovoltaic power generation; pv-max The maximum photovoltaic power output.
[0393] The energy storage constraint is:
[0394]
[0395] Where: SOC is the state of charge of the energy storage, SOC min It is the minimum value of the state of charge of the energy storage battery; SOC t+Δt is the state of charge value of the energy storage at the next moment; S d With S c It is the energy storage charging and discharging mark. is the energy storage charging efficiency, ηR bat is the energy storage discharge efficiency,
[0396] The transfer vehicle constraints are:
[0397]
[0398] Where: SOC ev is the state of charge of the transport vehicle battery, S ev_d With S ev_c It is the battery charging and discharging mark of the transport vehicle. is the charging efficiency of the transport vehicle battery, η ev R ev_bat For transport vehicle battery discharge efficiency, SOC ev_work The state of charge value necessary for the transport vehicle battery to start working; It is the charge state of the battery when the transfer vehicle enters the working state.
[0399] The grid transaction constraints are:
[0400]
[0401] Where: P BMAX , P SMAX It is the maximum amount of electricity purchased and sold in transactions with the power grid.
[0402] According to one aspect of the present application,
[0403] See attached Figure 3 ,The lower optimization objective of the model is the maximum utilization of new energy in the port, which is calculated by converting it into the minimum electricity purchase cost of the microgrid;
[0404] Optimization variables: energy storage capacity eebatint, number of transfer vehicles X.
[0405] Objective function: minF = sum(price × (pbuy - psel))
[0406] Among them, price is the daily electricity price, pbuy is the amount of electricity purchased, and psell is the amount of electricity sold.
[0407] Constraints:
[0408] Power balance constraint: P B -P S =P L -P PV +P ch -P dis +P evch -P evdis
[0409] Photovoltaic power generation output constraint: 0 P pv P pv-max
[0410] Energy storage constraints:
[0411] Transport vehicle constraints:
[0412] Grid trading constraints:
[0413] Example 4
[0414] A method for configuring the capacity of port microgrid energy storage and transfer vehicles.
[0415] The upper and lower layers of the two-layer model are solved by mixed integer linear programming algorithms. This application applies the Revised simplex method to solve linear programming problems and the Branch and bound method to solve mixed integer problems.
[0416] According to one aspect of the present application,
[0417] See attached Figure 3The process of solving the two-layer model is as follows: first, the initial data is calculated by the upper model and the lower model. The upper model calculates the initial result and passes the discounted cost and investment cost data to the lower layer. The lower model accepts the calculation result of the upper model and feeds back the electricity purchase cost in the calculation result to the upper model. After the initial calculation, it enters the loop. The absolute value of the difference between the electricity purchase and sales cost and the sum of the operation and maintenance cost calculated by the upper model and the lower model is used as the criterion. When the absolute value of the difference meets the convergence condition, the loop calculation is jumped out, and the calculated optimal energy storage capacity and transfer vehicle capacity are output.
[0418] In summary, in this embodiment, a method for configuring the capacity of port microgrid energy storage and transfer vehicles taking into account the uncertainty of shore power load and the participation of port transfer vehicles V2G in grid transactions is provided, including the following steps: using a K-means clustering analysis method based on SVD and KL divergence taking into account spatiotemporal characteristics to extract features of port power load data and obtain typical shore power load scenario data; according to the operating characteristics of port transfer vehicles, a working model for transfer vehicles to participate in grid dispatching through V2G is established; and a two-layer optimization model for energy storage and transfer vehicle capacity configuration is established with the minimum operating cost of the port microgrid as the upper optimization target and the maximum utilization rate of port new energy as the lower target.
[0419] Example 5
[0420] A method for configuring the capacity of port microgrid energy storage and transfer vehicles.
[0421] The K-means clustering analysis method based on SVD and KL divergence that considers the spatiotemporal characteristics can realize the feature extraction of port electricity load data, integrate the port electricity load data under different spatiotemporal characteristics, and cluster them into typical scenarios; the working model of the transfer vehicle participating in the power grid dispatch through V2G will establish the operating characteristics of the relevant port internal transfer vehicles according to the port cargo capacity. The model considers how to use the V2G technology of the transfer vehicle battery to profit from the power grid transaction at the time-of-use electricity price and reduce the port operation cost; the two-layer optimization model of energy storage and transfer vehicle capacity configuration takes the minimum port microgrid operation cost as the upper optimization goal and the maximum utilization rate of the port new energy as the lower optimization goal, and finally obtains the port energy storage capacity and transfer vehicle capacity configuration results.
[0422] According to one aspect of the present application, it is divided into two parts, scenario clustering and configuration optimization.
[0423] See attached Figure 2 ,Scene clustering includes the following steps:
[0424] Step 1: Taking port load as an indicator, randomly select k samples as the initial cluster centers; that is, randomly select k samples from the port load data set as the initial cluster centers.
[0425] Step 2: For each sample in the data set, calculate its distance to the k cluster centers and assign it to the class corresponding to the cluster center with the smallest distance.
[0426] Step 3: For each cluster, recalculate its cluster center position.
[0427] Step 4: Repeat steps 2 and 3 until the number of iterations is reached, and the obtained k types of data are used as k types of scenes.
[0428] Optimizing cluster analysis involves the following steps:
[0429] Step 1: Taking port load as an indicator, obtain load-related matrix data, and reduce the dimension of the matrix through the singular value extraction method.
[0430] Step 2: For the reduced-dimensional matrix, calculate the average distance from each object to other objects using KL divergence.
[0431] Step 3: Use half of the average distance as the threshold, remove objects whose distance is greater than this value, calculate the average distance of the remaining objects, obtain the density value, traverse the density values, and the maximum value is the first initial center point.
[0432] Step 4: Repeat steps 2 and 3 to remove the initial center points of the remaining objects.
[0433] Step 5, draw a curve relationship graph between the number of clusters and the average distance of data points in the same cluster, find the point with the largest change rate, and then determine the optimal number of clusters.
[0434] Configuration optimization is to determine the configuration of the energy storage capacity and transfer vehicle capacity of the port microgrid through double-layer optimization, including the following steps:
[0435] Step 1: First, calculate the initial data through the upper model and the lower model.
[0436] Step 2: The upper layer receives the initial calculation result feedback from the lower layer, calculates the discounted cost and investment cost data and passes them to the lower layer.
[0437] Step 3: The lower model receives the calculation result of the upper model and calculates the result, and feeds back the photovoltaic output in the calculation result to the upper model.
[0438] Step 4: The absolute value of the difference between the sum of the electricity purchase and sales cost and the operation and maintenance cost calculated by the upper model and the lower model is used as a criterion. If the condition is not met, repeat steps 2 and 3.
[0439] Step 5: After the conditions are met to exit the cycle, the energy storage and transport vehicle configuration results are output.
[0440] The present invention formulates a two-layer optimization problem, with the minimum operation cost of the port microgrid as the upper optimization goal and the maximum utilization rate of the port's new energy as the lower optimization goal, and finally obtains the configuration results of the port's energy storage capacity and transshipment vehicle capacity.
[0441] The upper optimization objective of the model is to minimize the total cost of microgrid power generation;
[0442] Optimization decision variables: energy storage charging pch, energy storage discharging pdis, charging and discharging identification, purchased electricity quantity pbuy, sold electricity quantity psell, purchased and sold electricity identification, transfer vehicle charging pevch, transfer vehicle discharging electricity pevdis, transfer vehicle charging and discharging identification, photovoltaic power generation output ppv, and load pload.
[0443] Optimization variables: energy storage capacity eebatint, number of transfer vehicles X.
[0444] Objective function:
[0445]
[0446] Among them, price is the daily electricity price, cpvom, cevom and cbatom are the operation and maintenance cost coefficients of photovoltaic power generation facilities, transfer vehicle facilities and energy storage facilities, respectively, and the costs of the three facilities are reflected through electricity consumption.
[0447] Constraints:
[0448] Power balance constraint: P B -P S =P L -P PV +P ch -P dis +P evch -P evdis ;
[0449] Where: P B The power purchased from the power grid, P S P is the power sold to the grid, L is the port load, P PV is the photovoltaic power generation power of the port, P ch is the energy storage charging power, P dis is the energy storage discharge power, P evch The charging power of the transport vehicle, P evdis Discharge power for transport vehicles.
[0450] Photovoltaic power generation output constraint: 0 P pv P pv-max ;
[0451] Energy storage constraints:
[0452] Where: SOC is the state of charge of the energy storage, SOC min It is the minimum value of the state of charge of the energy storage battery; SOC t+Δt is the state of charge value of the energy storage at the next moment; S d With S c It is the energy storage charging and discharging mark. is the energy storage charging efficiency, ηR bat is the energy storage discharge efficiency,
[0453] Transport vehicle constraints:
[0454] Where: SOC ev is the state of charge of the transport vehicle battery, S ev_d With S ev_c It is the battery charging and discharging mark of the transport vehicle. is the charging efficiency of the transport vehicle battery, η ev R ev_bat For transport vehicle battery discharge efficiency, SOC ev_work The state of charge value necessary for the transport vehicle battery to start working; It is the charge state of the battery when the transfer vehicle enters the working state.
[0455] Grid trading constraints:
[0456] Where: P BMAX , P SMAX It is the maximum amount of electricity purchased and sold in transactions with the power grid.
[0457] According to one aspect of the present application,
[0458] The lower optimization objective of the model is to maximize the utilization of new energy sources in the port, which is calculated by converting it into the minimum power purchase cost of the microgrid;
[0459] Optimization variables: energy storage capacity eebatint, number of transfer vehicles X.
[0460] Objective function: minF = sum(price*(P B -P S ));
[0461] Where: P B The power purchased from the power grid, P S is the power sold by the grid, and price is the daily electricity price
[0462] Photovoltaic power generation output constraint: 0P pv P pv-max
[0463] Energy storage constraints:
[0464] Where: SOC is the state of charge of the energy storage, S d With S c It is the energy storage charging and discharging mark. is the energy storage charging efficiency, ηR bat is the energy storage discharge efficiency,
[0465] Transport vehicle constraints:
[0466] Where: SOC ev is the state of charge of the transport vehicle battery, S ev_d With S ev_c It is the battery charging and discharging mark of the transport vehicle. is the charging efficiency of the transport vehicle battery, η ev R ev_bat For transport vehicle battery discharge efficiency, SOC ev_work The amount of charge necessary for the transport vehicle battery to start working.
[0467] Grid trading constraints:
[0468] Where: P BMAX , P SMAX It is the maximum amount of electricity purchased and sold in transactions with the power grid.
[0469] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0470] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0471] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0472] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0473] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for configuring the capacity of a port microgrid energy storage and transshipment vehicle, characterized in that: include: Step 1: Obtain historical port load data and preprocess it, extract data features from the preprocessed historical port load data, and obtain a standardized feature matrix; Step 2: Based on the standardized feature matrix, a typical scene set containing scene probabilities is constructed; Step 3: Construct a working model for V2G transfer vehicles to participate in power grid dispatching; Step 4: Based on the typical scenario set and working model, construct a port microgrid energy storage and transfer vehicle capacity configuration model; solve the configuration model to obtain the configuration result.
2. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 1, characterized in that: In step 1, the historical port load data includes shore power load and transshipment vehicle load.
3. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 1, characterized in that: In step 1, the data features are extracted from the pre-processed historical port load data to obtain a standardized feature matrix, including: The preprocessed data is decomposed into a temporal pattern matrix, a spatial pattern matrix, and a core tensor based on Frobenius norm regularization; Construct a temporal feature matrix based on the temporal pattern matrix; construct a spatial feature matrix based on the spatial pattern matrix; The temporal feature matrix and the spatial feature matrix are fused into a comprehensive feature matrix based on pre-configured adaptive weights; wherein the adaptive weights are dynamically adjusted based on the importance of the features; Based on the improved random projection method, the dimension of the comprehensive feature matrix is reduced to obtain a reduced dimension feature matrix; the reduced dimension feature matrix is standardized to obtain a standardized feature matrix.
4. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 3 is characterized in that: The method of constructing the time feature matrix based on the time pattern matrix is: The kernel principal component analysis method is used to extract nonlinear temporal features from the temporal pattern matrix to obtain the temporal feature matrix.
5. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 1, characterized in that: In step 2, the following steps are included: 2.1 Clustering is performed based on the standardized feature matrix to obtain clustering results; 2.2 Extract the main feature vectors of each cluster, generate typical scenarios, calculate the probability of each scenario, and construct a typical scenario set containing scenario probabilities.
6. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 1, characterized in that: In step 2.1, the clustering method based on the standardized feature matrix is: Apply singular value decomposition method to reduce the dimension of the standardized feature matrix and obtain the reduced dimension matrix; Calculate the KL divergence between each pair of time series based on the dimension reduction matrix and construct the KL divergence matrix; The initial cluster center is selected based on the KL divergence matrix, and K-means clustering is performed to obtain the clustering results.
7. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 6, characterized in that: Construct the KL divergence matrix according to the following formula: Where i and j are both integers; D KL (i, j) represents the value of row i and column j in the KL divergence matrix; D KL (i||j) represents the KL divergence from the i-th time series to the j-th time series; D KL (j||i) represents the KL divergence from the jth time series to the i-th time series.
8. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 5, characterized in that: In step 2.2, the main eigenvectors of each cluster are extracted to generate typical scenarios, which is to calculate the centroid and covariance matrix of each cluster, and extract the main eigenvectors of each cluster based on the improved principal component analysis method, and generate typical scenarios based on the main eigenvectors, that is, to obtain a set of typical scenarios.
9. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 5 or 8, characterized in that: In step 2.2, the probability of each scenario is calculated, and a typical scenario set containing scenario probabilities is constructed by reading the clustering results and the typical scenario set, calling the probability calculation formula, collecting and distributing the probability of each typical scenario, and forming a typical scenario set with probability parameters; The probability calculation formula is: Among them, S k is the probability calculation result of the kth cluster; N k is the number of samples in the kth cluster, N total is the total number of samples, ρ k is the average density of the kth cluster; j is an integer, representing the jth cluster; ρ j is the average density of the jth cluster.
10. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 1, characterized in that: In step 3, the working model of the transfer vehicle V2G participating in the grid dispatch includes a multi-objective optimization model of the V2G participation strategy, a battery life model and a total available V2G capacity.
11. The method for configuring the capacity of port microgrid energy storage and transshipment vehicles according to claim 10, characterized in that: Total available V2G capacity C V2G The calculation formula of (t) is as follows: C V2G (t)=N V2G (t)×C single ×η V2G ; Among them C single Available capacity for a single vehicle; η V2G is the V2G efficiency coefficient; output time series V2G available capacity C V2G (t); N V2G (t) is the number of transfer vehicles participating in V2G.
12. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 1, characterized in that: In step 4, the port microgrid energy storage and transfer vehicle capacity configuration model includes an upper objective function, a lower objective function and a total constraint condition; The overall constraints include power balance constraints, energy storage constraints, V2G constraints and grid transaction constraints.
13. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 12, characterized in that: The lower objective function F lower for: Where E renewable_used is the amount of renewable energy actually used, E renewable_total is the total renewable energy power generation, P curtailment is the power abandonment rate, and λ is the penalty factor.
14. The method for configuring the capacity of port microgrid energy storage and transfer vehicles according to claim 12, characterized in that: The power balance constraint is: P load (t)=P grid (t)+P renewable (t)+P storage (t)+P V2G (t); Where P load (t) is the port load at time t, P grid (t) is the power traded between the port and the power grid at time t, P renewable (t) is the renewable energy power generation at time t, P storage (t) is the energy storage power supply at time t, P V2G (t) is the amount of electricity generated by the transport vehicle through V2G at time t.
15. A port microgrid energy storage and transfer vehicle capacity configuration system using the port microgrid energy storage and transfer vehicle capacity configuration method according to any one of claims 1 to 14, characterized in that: It includes data feature extraction module, typical scenario set construction module, power grid dispatching work model construction module, and transfer vehicle capacity configuration model construction and solution module: The data feature extraction module obtains and preprocesses the historical port load data, extracts data features from the preprocessed historical port load data, and obtains a standardized feature matrix; The typical scene set construction module constructs a typical scene set including scene probabilities based on a standardized feature matrix; The power grid dispatching work model building module is used to build a work model for the transfer vehicle V2G to participate in power grid dispatching; The transfer vehicle capacity configuration model construction and solution module constructs a port microgrid energy storage and transfer vehicle capacity configuration model based on a typical scenario set and a working model; solves the configuration model to obtain a configuration result.
16. An electronic device, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the port microgrid energy storage and transfer vehicle capacity configuration method according to claims 1-14.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the port microgrid energy storage and transfer vehicle capacity configuration method described in claims 1-14 is implemented.
Citation Information
Patent Citations
Port energy traffic network emergency regulation and control method oriented to source network uncertainty
CN117726111A
An electric vehicle regional microgrid group double-layer distributed optimization scheduling method based on fuzzy PID real-time electricity price
CN109816171A
Photovoltaic energy storage capacity optimal configuration method considering V2G mode of electric vehicle
CN113013906A
Low-carbon port micro-grid with self energy and distributed energy management method thereof
CN115441499A
Electricity-gas virtual power plant double-layer optimization scheduling method considering energy storage and demand response
CN115483718A
Cited By
Port power distribution network power supply capability assessment method fusing source load characteristics and potential energy feedback
CN121282957A