Light storage and charging cooperative control method, electronic equipment and medium

Through the photovoltaic power and charging pile load prediction model and multi-objective optimization control strategy, the energy storage system and the power grid interaction are adjusted in real time, and the intermittentity of the photovoltaic power generation system and the randomness of the charging demand for electric vehicles are solved, improving energy utilization efficiency and system stability.

CN119623977APending Publication Date: 2025-03-14CRRC ZHUZHOU ELECTRIC LOCOMOTIVE RESEARCH INSTITUTE CO LTD

Patent Information

Application Number
CN202411695027.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

There is intermittent and uncertainty in the power generation power of photovoltaic power generation systems, the randomness of electric vehicle charging demand and limited capacity of energy storage systems make it difficult to effectively manage and optimize the energy flow between photovoltaic power generation, energy storage and electric vehicle charging.

Method used

The photovoltaic power and charging pile load prediction model is adopted, combined with multi-objective optimization control strategy, the charge and discharge state of the energy storage system and the power grid interaction are adjusted in real time, and energy distribution and utilization efficiency are optimized.

Benefits of technology

It improves the power generation efficiency and energy storage utilization rate of photovoltaic systems, ensures the continuity of electric vehicle charging and the economic operation of the system, reduces the impact of energy fluctuations, and improves the stability and reliability of the entire system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623977A_ABST
    Figure CN119623977A_ABST
Patent Text Reader

Abstract

The invention relates to a light storage and charging cooperative control method, electronic equipment and a medium. The method comprises the following steps: collecting related meteorological data influencing photovoltaic power generation, calculating a Spearman correlation coefficient, determining key meteorological characteristics, and constructing a data set; and predicting the photovoltaic generation power based on the data set by using a feature attention mechanism and a GRU model. Meanwhile, historical data of the charging piles at different geographic positions are collected and processed, space and time characteristics are extracted by using a K-Means clustering algorithm, and a charging pile load short-term prediction model is constructed. And according to the prediction results of the photovoltaic power generation and the charging pile load, a multi-target optimization model is established by using an MOPSO algorithm, and energy collaboration and optimization control among photovoltaic power generation, energy storage and electric vehicle charging are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of energy management technology, and in particular to a photovoltaic storage and charging coordinated control method, electronic equipment and medium. Background Art

[0002] As the global demand for renewable energy continues to increase, photovoltaic power generation has been widely promoted as a clean energy technology. However, the intermittent and uncertain power generation of photovoltaic power generation systems limits their application in power grids. In addition, the rapid popularization of electric vehicles has put higher demands on charging infrastructure, especially when charging facilities are used in combination with photovoltaic power generation systems. How to effectively manage and optimize the energy flow between photovoltaic power generation and electric vehicle charging has become a technical problem that needs to be solved urgently.

[0003] At present, the instability of photovoltaic power generation is mainly directly affected by weather changes and sunshine conditions, resulting in large fluctuations in power generation and difficulty in meeting the demand for stable power supply. The uncertainty and randomness of electric vehicle charging demand increase the complexity of grid load management. Under the combined effect of these factors, how to ensure the efficient use of electricity and the stable operation of the power grid has become a key issue in the research of photovoltaic power generation and electric vehicle charging technology.

[0004] Existing solutions include independent photovoltaic power generation prediction, electric vehicle charging management, and the use of energy storage systems, but these solutions usually lack an integrated control strategy to coordinate the interaction between photovoltaic power generation, electric vehicle charging, and energy storage. For example, CN202311463206.3 proposes an energy collaborative optimization control method for a photovoltaic storage and charging microgrid integrated station, which optimizes energy flow by establishing a load and power generation model based on historical data, but this method fails to fully consider the impact of changes in real-time data on system performance. Similarly, CN202310599261.9 discloses a grid collaborative control method for a wind, solar, storage and charging grid-connected system. Although it takes into account line cost and network loss optimization, it does not provide specific optimization control strategies for photovoltaic power generation fluctuations and electric vehicle charging randomness.

[0005] Therefore, it is necessary to develop a new photovoltaic storage and charging coordinated control method to solve the above problems. Summary of the invention

[0006] The present invention provides a photovoltaic-storage-charging coordinated control method, electronic device and medium, the purpose of which is to solve the problems of intermittent and uncertainty of photovoltaic power generation, randomness of electric vehicle charging demand and limited capacity of energy storage system, and to achieve efficient energy coordination and optimized control among photovoltaic power generation, energy storage and electric vehicle charging.

[0007] To achieve the above object, the first aspect of the present invention provides a photovoltaic storage and charging coordinated control method, comprising the following steps:

[0008] Collect relevant meteorological data required for photovoltaic power generation;

[0009] Calculate the Spearman correlation coefficient between the collected relevant meteorological data;

[0010] Based on the calculated Spearman correlation coefficient, the key meteorological characteristics that affect photovoltaic power generation are determined, and a data set containing key meteorological characteristics is constructed;

[0011] Using feature attention mechanism and gated recurrent unit, a photovoltaic power prediction model is built based on the dataset to obtain the prediction results of photovoltaic power.

[0012] Collect historical data of charging stations in different geographical locations;

[0013] Handle missing values ​​and outliers in the collected historical data;

[0014] Use K-Means clustering algorithm to extract spatial and temporal features from the processed historical data;

[0015] Based on the extraction results, a short-term prediction model of charging pile load is constructed using a gated recurrent unit to obtain the short-term prediction results of charging pile load;

[0016] According to the prediction results of photovoltaic power generation and the short-term prediction results of charging pile load, a multi-objective optimization model is constructed, and the optimal control strategy is solved based on the MOPSO algorithm.

[0017] Further, the method of calculating the Spearman correlation coefficient between the collected relevant meteorological data includes:

[0018] Identify potential factors that affect photovoltaic power generation;

[0019] The Spearman correlation coefficient between each potential factor and PV power generation was calculated according to the following formula:

[0020]

[0021] Among them, ρ i is the Spearman correlation coefficient, n is the total number of data samples, i represents the i-th influencing factor, d i is the rank difference between the influencing factors and the photovoltaic power generation power.

[0022] Furthermore, the method of selecting key meteorological features and constructing a data set containing key meteorological features includes:

[0023] Set a weight threshold;

[0024] Compare the absolute value of the Spearman correlation coefficient with the weight threshold;

[0025] When the absolute value of the Spearman correlation coefficient is greater than the weight threshold, the meteorological factor is retained as a key meteorological feature;

[0026] A data set is constructed, which includes all retained key meteorological features and photovoltaic power generation data.

[0027] Furthermore, the construction of the photovoltaic power generation prediction model includes the following steps:

[0028] The data set of key meteorological characteristics is normalized and the data values ​​are mapped to the interval [0,1] using the Min-Max algorithm;

[0029] Design and implement a feature attention mechanism module, which generates an attention weight vector using the ReLU activation function based on the weight matrix and bias vector obtained from neural network training, and assigns weights to each normalized input feature by normalizing the attention weight vector;

[0030] Based on the gated recurrent unit network, the reset gate, update gate, candidate hidden state and hidden state are updated in sequence to complete the time series prediction modeling of photovoltaic power generation;

[0031] The attention weight vector normalization process includes: calculating the exponential weight of each feature and the sum of the exponential weights to obtain a normalized attention weight coefficient for each feature, so that the sum of the attention weight coefficients of all features is one.

[0032] Furthermore, methods for processing missing values ​​and outliers in the collected historical data include:

[0033] Identify the continuous missing values ​​in the collected historical data. If the number of continuous missing values ​​exceeds the preset threshold, delete the samples containing a large number of continuous missing values.

[0034] The linear interpolation method is used to fill in the non-continuous small number of missing values ​​in the historical data, and the interpolation is calculated based on the previous and next values ​​of the known points;

[0035] Use the interquartile range method to identify and process outliers in historical data, including calculating the first and third quartiles of historical data, determining the upper and lower limits of outliers, and eliminating outliers;

[0036] The processed historical data is standardized using the Z-score method to convert the historical data into a form with a mean of 0 and a standard deviation of 1.

[0037] Furthermore, the method for extracting spatial features and temporal features includes:

[0038] The spatial feature extraction process includes:

[0039] Calculate the descriptive characteristics of each charging pile's historical load data;

[0040] The calculated descriptive features are subjected to spatial cluster analysis using the K-Means clustering algorithm. The spatial cluster analysis includes: initializing a number of cluster centers; calculating the distance between each charging pile data point and each cluster center, and assigning it to the nearest cluster; recalculating the center of each cluster; and repeating the above steps until the cluster center is stable or the preset number of iterations is reached.

[0041] Assign a unique label to each cluster, representing different categories of spatial load patterns in numerical form;

[0042] The temporal feature extraction process includes:

[0043] Divide the time of a day into 24 time periods, and assign a number from 1 to 24 to each time period;

[0044] For datasets spanning multiple days, extract additional temporal features;

[0045] The results of extracting additional time features are combined with the number of each time period, and the historical data of each charging pile are integrated in chronological order to form a time series data set.

[0046] Furthermore, the method of constructing a short-term prediction model of charging pile load using a gated cyclic unit includes:

[0047] Configure an input layer to receive the extracted and encoded spatial feature labels and temporal feature data;

[0048] Build a gated recurrent unit network based on the input features, set the time step, number of hidden layer nodes, batch size, and apply L2 regularization technology;

[0049] Connect multiple fully connected layers after the output layer of the GRU network:

[0050] Perform model training, including dividing the data into training, validation, and test sets, using mean square error as the loss function, training through multiple iterations, updating parameters using the Adam optimizer in each iteration, and monitoring performance on the validation set to optimize model hyperparameters;

[0051] After training, the model is evaluated on the test set.

[0052] Furthermore, a multi-objective optimization model is constructed based on the photovoltaic power generation prediction and charging pile load prediction results, and the optimal control strategy is solved based on the MOPSO algorithm, including the following steps:

[0053] Multi-objective optimization model construction: Define a multi-objective function to achieve smoothing of photovoltaic power generation fluctuations, minimization of periodic changes in the energy storage system SOC, and maximization of comprehensive economic efficiency. The multi-objective function is:

[0054]

[0055] In the formula, J 1 represents the objective function for smoothing PV fluctuations; J 2 represents the objective function of minimizing the periodic change of energy storage SOC; J 3 represents the objective function with the highest comprehensive economic efficiency; P Pv (t) represents the photovoltaic power generation at time t, P ref (t) represents the reference power at time t; SOC(t) represents the energy storage charge state at time t; SOC avg Indicates the average value of the energy storage charge state; C pv (t) represents the photovoltaic power generation cost at time t; C bat (t) represents the operating cost of the energy storage system at time t; R ev (t) represents the revenue of the charging pile at time t; T is the total duration or cycle;

[0056] Constraint setting: The following formula is used to make the multi-objective optimization model meet the power balance constraint, energy storage system charging and discharging power limit, and SOC upper and lower limit constraints:

[0057]

[0058] Where P grid (t) is the power purchased from the power grid at time t; P load (t) is the load power of the charging pile at time t; P bat (t) is the charging and discharging power of the energy storage system at time t;

[0059] The MOPSO algorithm solution process includes:

[0060] A set of initial particle positions and velocities are randomly generated, each particle position represents a control strategy, including the charging and discharging power plan of the energy storage system and the interactive power plan with the power grid;

[0061] The fitness value of each particle is calculated according to the defined multi-objective function, and the fitness value is the comprehensive evaluation index of the multi-objective function;

[0062] Update the speed and position of the particle based on the individual optimal position and global optimal position of the particle, where the individual optimal position is the optimal position experienced by each particle, and the global optimal position is the optimal position experienced by the entire particle group;

[0063] Perform non-dominated sorting on the updated particles, screen out non-dominated solutions, and use the elite retention strategy to directly retain the excellent particles to the next generation;

[0064] Determine whether the maximum number of iterations has been reached or the objective function has converged. If so, output the optimal control strategy solution set; otherwise, return to the above steps to continue iterating.

[0065] To achieve the above objective, a second aspect of the present invention provides an electronic device, comprising a processor and a memory, wherein the processor is configured to implement the steps of the method when executing a computer program stored in the memory.

[0066] To achieve the above-mentioned object, the third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method when the program is executed by a processor.

[0067] Beneficial effects of the present invention:

[0068] Compared with the prior art, the present invention provides a photovoltaic storage and charging coordinated control method, electronic device and medium, which effectively responds to the challenges of intermittency and uncertainty of photovoltaic power generation, randomness of electric vehicle charging demand and limited capacity of energy storage system by introducing an innovative photovoltaic storage and charging coordinated control method. Specifically, the present invention adopts photovoltaic power and charging pile load prediction model, combined with multi-objective optimization control strategy, to adjust the charging and discharging state of energy storage system and grid interaction in real time, and optimize energy distribution and utilization efficiency. Through this method, not only the power generation efficiency and energy storage utilization rate of photovoltaic system are improved, but also the continuity of electric vehicle charging and economic operation of the system are ensured, the impact of energy fluctuations is effectively reduced, and the stability and reliability of the whole system are improved. Compared with the prior art, the implementation of this coordinated control strategy significantly improves the comprehensive performance and economic benefits of the energy system. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments.

[0070] Figure 1 It is a flow chart of a photovoltaic storage and charging coordinated control method disclosed in an embodiment of the present invention.

[0071] Figure 2 It is a structural diagram of a feature attention mechanism disclosed in an embodiment of the present invention.

[0072] Figure 3 It is a structural diagram of a photovoltaic power generation prediction model disclosed in an embodiment of the present invention.

[0073] Figure 4 It is a structural diagram of a short-term prediction model for charging pile load disclosed in an embodiment of the present invention.

[0074] Figure 5 It is a flow chart of a multi-objective particle swarm optimization algorithm disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0075] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0076] According to an embodiment of the present invention, it should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the following production method, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0077] like Figure 1 As shown, the present invention provides a photovoltaic storage and charging coordinated control method, comprising the following steps:

[0078] Step S100, collecting relevant meteorological data required for photovoltaic power generation;

[0079] Step S200, calculating the Spearman correlation coefficient between the collected relevant meteorological data;

[0080] Step S300, determining key meteorological features that affect photovoltaic power generation according to the calculated Spearman correlation coefficient, and constructing a data set containing the key meteorological features;

[0081] Step S400: using a feature attention mechanism and a gated recurrent unit, constructing a photovoltaic power prediction model based on the data set to obtain a photovoltaic power prediction result;

[0082] Step S500, collecting historical data of charging piles in different geographical locations;

[0083] Step S600, processing missing values ​​and abnormal values ​​in the collected historical data;

[0084] Step S700: Use K-Means clustering algorithm to extract spatial features and temporal features of the processed historical data;

[0085] Step S800: Based on the extraction result, a short-term prediction model of the charging pile load is constructed using a gated cycle unit to obtain a short-term prediction result of the charging pile load;

[0086] Step S900: construct a multi-objective optimization model based on the prediction results of photovoltaic power generation and the short-term prediction results of charging pile load, and solve the optimal control strategy based on the MOPSO algorithm.

[0087] In this embodiment, as described in the above steps S100 and S200, potential factors affecting photovoltaic power generation include but are not limited to meteorological factors such as light radiation intensity, temperature, relative humidity, PM2.5, wind speed, wind direction, air pressure, precipitation, and season, time, and various weather types including sunny, rainy, cloudy, and overcast days. Assuming that the photovoltaic power generation is P Pv , the set of potential influencing factors is {x 1 ,x 2 ,.....,x n}, according to the Spearman correlation coefficient method, the correlation degree between each influencing factor and photovoltaic power generation can be obtained, and the correlation coefficient ρ i The calculation formula is as follows:

[0088]

[0089] Among them, ρ i is the Spearman correlation coefficient, n is the total number of data samples, i represents the i-th influencing factor, d i is the rank difference between the influencing factors and the photovoltaic power generation. Correlation coefficient ρ i The larger the absolute value of i The stronger the correlation with photovoltaic power generation, the higher the weight of the impact on photovoltaic power generation.

[0090] In this embodiment, as described in step S300 above, after obtaining the correlation coefficient between each potential influencing factor and the photovoltaic power generation power, a weight threshold T is set. w , when |ρ i |>T w When , the variable is retained, otherwise the variable is removed. The factors with higher weights are retained as key meteorological features, and finally the key meteorological feature data set is constructed together with the corresponding photovoltaic power generation data as follows:

[0091] D = {x Tem ,x Rh ,x Wv ,…,xpv}

[0092] Among them, x Tem represents temperature, x Rh Relative humidity, x Wv represents wind speed, x Pv Indicates light intensity.

[0093] In this embodiment, as described in step S400 above, the construction process of the photovoltaic power prediction model is mainly divided into two stages: first, using the attention mechanism to fuse the original input data, i.e., key meteorological features, and perform weighted processing; second, using the gated recurrent unit (GRU) network modeling to achieve photovoltaic power prediction. Figure 2 and Figure 3 As shown in the figure, the specific implementation steps of the model mainly include:

[0094] Step S401, data normalization. After completing the construction of the key meteorological feature data set, in order to reduce the impact of the scale of different features on the photovoltaic power prediction model, the Min-Max algorithm is used to normalize the original data set and map the original data values ​​to the interval [0,1]. The specific formula is as follows:

[0095]

[0096] In the formula, x represents the original input feature value; x min and x max Respectively represent the minimum and maximum values ​​of the original input features; x norm represents the normalized eigenvalue.

[0097] Step S402, feature attention mechanism module design. Considering that different input features have different weights on photovoltaic power generation, this embodiment introduces a feature attention mechanism module, so that the model can dynamically assign a certain weight to each input feature, fully integrate key meteorological features in the process of predicting photovoltaic power generation, and update the normalized input data set as follows:

[0098]

[0099] In the formula, α t Represents the attention weight coefficient of each corresponding input feature at time t, for example represents the attention weight coefficient of the temperature input feature at time t, represents the attention weight coefficient of the relative humidity input feature at time t, represents the attention weight coefficient of the wind speed input feature at time t; similarly, Respectively represent the normalized temperature data, relative humidity data and wind speed data.

[0100] In this embodiment, the acquisition of the attention weight coefficient first requires the calculation of the attention weight vector, which is obtained by training with a neural network. The specific design is as follows:

[0101] e t =ReLU(W e x t +b e )

[0102] In the formula, e t represents the attention weight vector, W e represents the weight matrix obtained by neural network training; b e is the bias vector; ReLU(·) represents the activation function; x t Represents the input of the current time step. Finally, the attention weight coefficient is obtained by normalizing the attention weight vector. The specific calculation process of the attention weight coefficient of the kth feature is as follows:

[0103]

[0104] In the formula, represents the attention weight of the k-th feature in time step t, represents the weighted score obtained by the attention mechanism for the kth feature in time step t, k represents the total number of features evaluated by the attention mechanism, Indicates all The sum of the results of the exponential function is used to normalize the attention weights of all features to ensure that they sum to 1, so that Relative importance can be correctly expressed; is a normalization condition that ensures that the sum of the attention weights at all time steps t is 1, indicating that all weights constitute a valid probability distribution.

[0105] Step S403, forward propagation calculation of the GRU network. As a variant of the recurrent neural network, GRU can dynamically control the flow of information by introducing a gating mechanism, alleviating the long-term temporal dependency problem of traditional recurrent neural networks. In terms of structural composition, the calculation process of the GRU network mainly consists of four parts: reset gate, update gate, candidate hidden state, and hidden state update. The specific definition and calculation formula are as follows:

[0106] Step S403-1, reset gate: determines the influence of the previous hidden state in generating the current candidate hidden state. The specific calculation formula is:

[0107] r t =σ(W r x t +U rh t-1 +b r )

[0108] In the formula, r t represents the output of the reset gate, σ represents the sigmoid activation function; W r represents the weight matrix input to the reset gate, U r represents the weight matrix for the hidden state, used to reset the gate; b r represents the bias vector of the reset gate; h t-1 represents the hidden state of the previous time step; x t Represents the input at the current time step.

[0109] Step S403-2, update gate: determines how much of the current hidden state needs to be retained or updated. The specific calculation formula is:

[0110] z t =σ(W z x t +U z h t-1 +b z )

[0111] In the formula, z t represents the output of the update gate, σ represents the sigmoid activation function; W z represents the weight matrix input to the update gate, U z represents the weight matrix for the hidden state, used to update the gate; b z represents the update gate bias vector; h t-1 represents the hidden state of the previous time step; x t Represents the input at the current time step.

[0112] Step S403-3, candidate hidden state: a potential new hidden state generated by combining the function of the reset gate, the specific calculation formula is:

[0113]

[0114] In the formula, represents the candidate hidden state at time step t, tanh represents the hyperbolic tangent activation function; W h represents the weight matrix input to the candidate hidden state, U h represents the weight matrix for the hidden state, used for the candidate hidden state; b h The bias vector representing the candidate hidden state; h t-1 represents the hidden state of the previous time step, which is element-wise multiplied with the output of the reset gate; x t Represents the input at the current time step.

[0115] Step S403-4, updating the hidden state: The final hidden state output can be obtained by weighted summation calculation of the update gate and the candidate hidden state. The specific calculation formula is:

[0116]

[0117] In the formula, h t represents the final hidden state at time step t, z t represents the output of the update gate; where the symbols ⊙ and Represents element-by-element multiplication of matrices or vectors.

[0118] In this process, the gate z is updated using element-wise multiplication. t The contribution ratio of the previous hidden state ht-1 and the candidate hidden state to the current hidden state can be controlled.

[0119] Step S404, model training process. After completing the forward propagation calculation process of the GRU network, the model training process mainly includes loss calculation and back propagation process. According to the output prediction value and true value of the model on all samples, the mean square error (MSE) is used as the loss function of the model. The specific calculation formula is:

[0120]

[0121] In the formula, L represents the mean square error, N represents the number of samples, and y i represents the actual value of the ith observation, represents the predicted value of the ith observation.

[0122] During the back propagation process, the gradient of each parameter is calculated according to the loss function, and the weights and biases are updated. The parameter update process will be repeated in each training iteration until the loss function of the model converges to a smaller value.

[0123] Step S405, model evaluation and adjustment. By comparing the deviation between the model's predicted value and the true value, the root mean square error (RMSE), mean absolute error (MAE) and model determination coefficient (R2) are selected as performance evaluation indicators of the photovoltaic power generation prediction model. The specific calculation formula is as follows:

[0124]

[0125] Where y is the average of all actual values.

[0126] Finally, by continuously adjusting the model hyperparameters and calculating the model performance evaluation indicators, the model with good performance in both the training set and the test set is selected as the prediction model.

[0127] In this embodiment, as described in step S500 above, the historical data collection of charging piles in different geographical locations includes but is not limited to historical load data, environmental information such as temperature and humidity at the location of the charging piles, date factors (including working days / non-working days, holidays), and accurate time records. At the same time, ensure that the time span of the data is long enough to cover various different situations and seasonal changes.

[0128] In this embodiment, as described in step S600 above, for a large number of consecutive missing values ​​in the data, the corresponding samples are deleted; for a small number of missing values ​​in the data, a linear interpolation method is used to interpolate the previous and next values ​​of the missing values, such as Figure 4 The specific strategies are as follows:

[0129]

[0130] In the formula, y 1 and 2 represents the y value of a known point; x 1 and x 2 represents the x value of the known point; x represents the position to be interpolated; y represents the predicted value of linear interpolation.

[0131] Based on the interquartile range (IQR) method, outliers in the data are identified and removed. First, the data is sorted in ascending order from small to large, and the first quartile position value Q1 and the third quartile position value Q3 of the data set are calculated respectively. The corresponding position calculation formula is as follows:

[0132]

[0133] Where n is the total number of data points. In addition, if the pos value is not an integer, the weighted average of two adjacent positions is taken. The IQR value is calculated based on Q1 and Q3 as follows:

[0134] IQR=Q3-Q1

[0135] Finally, determine the upper and lower limits of the outliers, following the following strategy:

[0136]

[0137] When the value of a data point is lower than the lower limit or higher than the upper limit, it is considered an outlier.

[0138] The Z-score standardization formula is used to standardize the collected data of different dimensions, and the data is converted into a standard normal distribution with a mean of 0 and a standard deviation of 1, so that they are comparable in value. The specific formula is as follows:

[0139]

[0140] In the formula, x represents the original data point; μ represents the mean of the data; σ represents the standard deviation of the data.

[0141] In this embodiment, as described in step S700 above, the data spatial feature extraction process is mainly based on the historical load data of charging piles in different geographical locations, calculates some descriptive features, such as average load, standard deviation of load, peak load, etc., and then uses the K-Means clustering algorithm to implement it. The specific implementation process includes: (1) initializing K cluster centers; (2) for each data point of the charging pile, calculate its distance from each cluster center and assign it to the cluster with the closest distance; (3) recalculate the center of each cluster; (4) repeat the above steps until the cluster center no longer changes significantly or reaches the preset number of iterations; (5) spatial feature label assignment: assign a unique label to each cluster cluster, and use different values ​​to represent different spatial load pattern categories.

[0142] The implementation process of extracting the temporal features of data mainly includes: (1) Time quantification: Divide a day into 24 time periods, and each time period is represented by an integer from 1 to 24. (2) For data spanning multiple days, extract features such as day of the week (1 to 7), whether it is a weekend (0 or 1), and whether it is a holiday (0 or 1). (3) For each charging pile, arrange its historical load data in chronological order to form time series data.

[0143] In this embodiment, as described in step S800 above, the process of building a short-term prediction model for charging pile load mainly includes the following steps:

[0144] (1) Model input layer design. The input layer receives processed and encoded spatial feature labels, time period of the day, day of the week, whether it is a weekend, whether it is a holiday, and other time features, as well as standardized temperature and humidity data and other related factors.

[0145] (2) GRU network configuration. Ensure that the number of input nodes is equal to the total number of data input features; the time step is preferably set to timesteps = 24; the hidden layer nodes are preferably hiddensize = 64; the batch size is preferably batchsize = 32; and L2 regularization technology is used to prevent model overfitting.

[0146] (3) Fully connected layer design. Multiple fully connected layers are connected after the GRU network layer. The number of nodes in the fully connected layer is halved layer by layer. The number of final output nodes is set to outsize = 1. The ReLU activation function is used in the fully connected layer to map the output of the GRU layer to the final load forecast value.

[0147] (4) Model training process. The preprocessed data is divided into training set, validation set and test set. The mean square error (MSE) is used as the loss function. The Adam optimizer is used to update the model parameters. Multiple iterations of training are performed on the training set. The model is updated each iteration. The performance of the model is monitored on the validation set, and the model hyperparameters are adjusted according to the performance.

[0148] (5) Model evaluation and adjustment. The root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R 2 ) as the performance evaluation index of the model, evaluate the trained model on the test set, and calculate the above evaluation index. Finally, continuously adjust the hyperparameters of the model until satisfactory model performance is obtained.

[0149] In this embodiment, as described in step S900 above, the control indicators of the multi-objective optimization control method mainly include: smoothing photovoltaic fluctuations, minimizing the periodic change of energy storage SOC, and maximizing the comprehensive economy. The multi-objective function is as follows:

[0150]

[0151] In the formula, J 1 represents the objective function for smoothing PV fluctuations; J 2 represents the objective function of minimizing the periodic change of energy storage SOC; J 3 represents the objective function with the highest comprehensive economic efficiency; P Pv (t) represents the photovoltaic power generation at time t, P ref (t) represents the reference power at time t; SOC(t) represents the energy storage charge state at time t; SOC avg Indicates the average value of the energy storage charge state; C pv (t) represents the photovoltaic power generation cost at time t; C bat (t) represents the operating cost of the energy storage system at time t; R ev (t) represents the revenue of the charging pile at time t; T is the total duration or cycle of time.

[0152] The constraints mainly include power balance constraints, charging and discharging power limits of the energy storage system, and SOC upper and lower limit constraints, as shown below:

[0153]

[0154] Where P grid (t) is the power purchased from the power grid at time t; P load (t) is the load power of the charging pile at time t; P bat (t) is the charging and discharging power of the energy storage system at time t.

[0155] like Figure 5As shown in the figure, the multi-objective particle swarm optimization algorithm (MOPSO) is used to solve the above optimization problem. In the MOPSO algorithm, each particle represents a set of control strategies, and the optimal control strategy solution set is searched by continuously updating the speed and position of the particles. The specific process is as follows:

[0156] Step S901, initializing a particle swarm. Randomly generate a set of initial particle positions and velocities, where the position of each particle represents a possible control strategy, including a charging and discharging power plan of the energy storage system, an interactive power plan with the power grid, and the like.

[0157] Step S902: Fitness evaluation: According to the defined objective function, the fitness value of each particle is calculated, that is, the comprehensive evaluation index of multiple objective functions.

[0158] Step S903, particle update. Update the speed and position of the particle according to the individual optimal position and the global optimal position of the particle. The individual optimal position is the optimal position experienced by each particle, and the global optimal position is the optimal position experienced by the entire particle group.

[0159] Step S904: non-dominated sorting and elite retention. Perform non-dominated sorting on the updated particles to screen out non-dominated solutions. At the same time, an elite retention strategy is adopted to directly retain excellent particles to the next generation.

[0160] Step S905, termination condition judgment. Judge whether the termination condition is met, such as reaching the maximum number of iterations or the objective function converges. If so, output the optimal control strategy solution set; otherwise, return to step S902 to continue iteration.

[0161] The present invention proposes a method for coordinated control of a photovoltaic storage and charging system based on a photovoltaic power generation prediction model and a charging pile load short-term prediction model. Through sensors and monitoring equipment, photovoltaic power generation power, charging pile load power, energy storage system state parameters (such as voltage, current, SOC, etc.) and power grid operation data are collected in real time. The real-time collected data is compared with the model prediction value and the optimization control strategy. When the photovoltaic power generation power is higher than the prediction value, the charging power of the energy storage system is increased or the power purchased from the power grid is reduced; when the charging pile load is higher than the prediction value, the discharge power of the energy storage system is appropriately increased or the power purchased from the power grid is increased. Based on the real-time monitoring and adjustment data, the prediction model and the optimization control model are dynamically optimized and learned to continuously improve the adaptability and control accuracy of the system. Through the above photovoltaic storage and charging coordinated control method, it is possible to achieve precise control and optimization of the photovoltaic storage and charging integrated system, improve energy utilization efficiency, reduce operating costs, and provide strong support for the widespread application of new energy and the popularization of electric vehicles.

[0162] Any modification, equivalent substitution or improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0163] According to another aspect of an embodiment of the present application, a device is further provided, including a processor and a memory, wherein the processor is configured to implement the steps of the method when executing a computer program stored in the memory.

[0164] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0165] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0166] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0167] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0168] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A photovoltaic storage and charging coordinated control method, characterized in that: The steps include: Collect relevant meteorological data required for photovoltaic power generation; Calculate the Spearman correlation coefficient between the collected relevant meteorological data; Based on the calculated Spearman correlation coefficient, the key meteorological characteristics that affect photovoltaic power generation are determined, and a data set containing key meteorological characteristics is constructed; Using feature attention mechanism and gated recurrent unit, a photovoltaic power prediction model is built based on the dataset to obtain the prediction results of photovoltaic power. Collect historical data of charging stations in different geographical locations; Handle missing values ​​and outliers in the collected historical data; Use K-Means clustering algorithm to extract spatial and temporal features from the processed historical data; Based on the extraction results, a short-term prediction model of charging pile load is constructed using a gated recurrent unit to obtain the short-term prediction results of charging pile load; According to the prediction results of photovoltaic power generation and the short-term prediction results of charging pile load, a multi-objective optimization model is constructed, and the optimal control strategy is solved based on the MOPSO algorithm.

2. The photovoltaic storage and charging coordinated control method according to claim 1, characterized in that: The method for calculating the Spearman correlation coefficient between the collected related meteorological data includes: Identify potential factors that affect photovoltaic power generation; The Spearman correlation coefficient between each potential factor and PV power generation was calculated according to the following formula: Among them, ρ i is the Spearman correlation coefficient, n is the total number of data samples, i represents the i-th influencing factor, d i is the rank difference between the influencing factors and the photovoltaic power generation power.

3. The photovoltaic storage and charging coordinated control method according to claim 1, characterized in that: The method of selecting key meteorological features and constructing a data set containing key meteorological features includes: Set a weight threshold; Compare the absolute value of the Spearman correlation coefficient with the weight threshold; When the absolute value of the Spearman correlation coefficient is greater than the weight threshold, the meteorological factor is retained as a key meteorological feature; A data set is constructed, which includes all retained key meteorological features and photovoltaic power generation data.

4. The photovoltaic storage and charging coordinated control method according to claim 1, characterized in that: The construction of the photovoltaic power generation prediction model includes the following steps: The data set of key meteorological characteristics is normalized and the data values ​​are mapped to the interval [0,1] using the Min-Max algorithm; Design and implement a feature attention mechanism module, which generates an attention weight vector based on the weight matrix and bias vector obtained by neural network training using the ReLU activation function, and assigns weights to each normalized input feature by normalizing the attention weight vector; Based on the gated recurrent unit network, the reset gate, update gate, candidate hidden state and hidden state are updated in sequence to complete the time series prediction modeling of photovoltaic power generation; Among them, the attention weight vector normalization processing includes: calculating the exponential weight of each feature and the sum of the exponential weights to obtain the normalized attention weight coefficient of each feature, so that the sum of the attention weight coefficients of all features is one.

5. The photovoltaic storage and charging coordinated control method according to claim 1, characterized in that: Methods for handling missing values ​​and outliers in collected historical data include: Identify the continuous missing values ​​in the collected historical data. If the number of continuous missing values ​​exceeds the preset threshold, delete the samples containing a large number of continuous missing values. The linear interpolation method is used to fill in the non-continuous small number of missing values ​​in the historical data, and the interpolation is calculated based on the previous and next values ​​of the known points; Use the interquartile range method to identify and process outliers in historical data, including calculating the first and third quartiles of historical data, determining the upper and lower limits of outliers, and eliminating outliers; The processed historical data is standardized using the Z-score method to convert the historical data into a form with a mean of 0 and a standard deviation of 1.

6. The photovoltaic storage and charging coordinated control method according to claim 1, characterized in that: Methods for extracting spatial and temporal features include: The spatial feature extraction process includes: Calculate the descriptive characteristics of each charging pile's historical load data; The calculated descriptive features are subjected to spatial cluster analysis using the K-Means clustering algorithm. The spatial cluster analysis includes: initializing a number of cluster centers; calculating the distance between each charging pile data point and each cluster center, and assigning it to the nearest cluster; recalculating the center of each cluster; and repeating the above steps until the cluster center is stable or the preset number of iterations is reached. Assign a unique label to each cluster, representing different categories of spatial load patterns in numerical form; The temporal feature extraction process includes: Divide the time of a day into 24 time periods, and assign a number from 1 to 24 to each time period; For datasets spanning multiple days, extract additional temporal features; The results of extracting additional time features are combined with the number of each time period, and the historical data of each charging pile are integrated in chronological order to form a time series data set.

7. The photovoltaic storage and charging coordinated control method according to claim 1, characterized in that: The method of using gated cyclic units to construct a short-term prediction model for charging pile load includes: Configure an input layer to receive the extracted and encoded spatial feature labels and temporal feature data; Build a gated recurrent unit network based on the input features, set the time step, number of hidden layer nodes, batch size, and apply L2 regularization technology; Connect multiple fully connected layers after the output layer of the GRU network: Perform model training, including dividing the data into training, validation, and test sets, using mean square error as the loss function, training through multiple iterations, updating parameters using the Adam optimizer in each iteration, and monitoring performance on the validation set to optimize model hyperparameters; After training, the model is evaluated on the test set.

8. The photovoltaic storage and charging coordinated control method according to claim 1, characterized in that: A multi-objective optimization model is constructed based on the photovoltaic power generation prediction and charging pile load prediction results, and the optimal control strategy is solved based on the MOPSO algorithm, including the following steps: Multi-objective optimization model construction: Define a multi-objective function to achieve smoothing of photovoltaic power generation fluctuations, minimization of periodic changes in the energy storage system SOC, and maximization of comprehensive economic efficiency. The multi-objective function is: Where, J1 represents the objective function of smoothing photovoltaic fluctuations; J2 represents the objective function of minimizing the periodic change of energy storage SOC; J3 represents the objective function of achieving the highest comprehensive economic efficiency; P Pv (t) represents the photovoltaic power generation at time t, P ref (t) represents the reference power at time t; SOC(t) represents the energy storage charge state at time t; SOC avg Indicates the average value of the energy storage charge state; C pv (t) represents the photovoltaic power generation cost at time t; C bat (t) represents the operating cost of the energy storage system at time t; R ev (t) represents the revenue of the charging pile at time t; T is the total duration or cycle; Constraint setting: The following formula is used to make the multi-objective optimization model meet the power balance constraint, energy storage system charging and discharging power limit, and SOC upper and lower limit constraints: Where P grid (t) is the power purchased from the power grid at time t; P load (t) is the load power of the charging pile at time t; P bat (t) is the charging and discharging power of the energy storage system at time t; The MOPSO algorithm solution process includes: A set of initial particle positions and velocities are randomly generated, each particle position represents a control strategy, including the charging and discharging power plan of the energy storage system and the interactive power plan with the power grid; The fitness value of each particle is calculated according to the defined multi-objective function, and the fitness value is the comprehensive evaluation index of the multi-objective function; Update the speed and position of the particle based on the individual optimal position and global optimal position of the particle, where the individual optimal position is the optimal position experienced by each particle, and the global optimal position is the optimal position experienced by the entire particle group; Perform non-dominated sorting on the updated particles, screen out non-dominated solutions, and use the elite retention strategy to directly retain the excellent particles to the next generation; Determine whether the maximum number of iterations has been reached or the objective function has converged. If so, output the optimal control strategy solution set; otherwise, return to the above steps to continue iterating.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor is configured to implement the steps of the method according to any one of claims 1 to 8 when executing a computer program stored in the memory.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Wind and light storage and charging grid-connected power grid cooperative control method and system

    CN116632940A

  • A method for energy collaborative optimization control of a photovoltaic, storage, charging and inspection microgrid integrated station

    CN117254526B

Cited By

  • Intelligent light storage charging detection energy collaborative optimization control method and system

    CN120127800A

  • Energy scheduling method, device and equipment for distributed photovoltaic power generation system

    CN120389427A

  • A method, apparatus and equipment for energy dispatching of a distributed photovoltaic power generation system

    CN120389427B

  • Control method, program product, medium and equipment for light storage and charging energy unit

    CN120896210A

  • Multi-objective optimization method and system for regional integrated energy system

    CN121212490A