An AI-based method for recommending distribution network energy storage strategies
By building an energy storage strategy optimization model, combining multiple sub-models and real-time data acquisition, the problem of difficulty in adjusting the energy storage system in extreme weather is solved and the grid stability is improved.
Patent Information
- Application Number
- CN202510223708.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-02-27
AI Technical Summary
Existing energy storage optimization methods are difficult to adjust quickly and accurately under extreme weather conditions, resulting in threats to grid stability.
Using the recommendation method of distribution network energy storage strategy based on artificial intelligence, the energy storage strategy optimization model is constructed, combined with the weather sub-model, the correction sub-model, the scenery and load sub-model and the energy storage sub-model, real-time data acquisition and model training are carried out to generate energy storage strategies for extreme weather.
It improves the dynamic response and strategy optimization capabilities of the energy storage system in extreme weather conditions, and enhances the stability of the power grid.
Smart Images

Figure CN119721401B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of energy storage optimization, and particularly to a method for recommending a distribution network energy storage strategy based on artificial intelligence. Background Art
[0002] In the distribution network, the application of the energy storage system is of great significance. The scenarios that the distribution network energy storage system needs to handle are very complex, including load regulation of battery charging and swapping stations, changes in wind and light resources, errors in load forecasting, etc. Therefore, the optimization of the power grid energy storage under multiple application scenarios is particularly important. However, the existing optimization methods often focus on the optimization of a certain specific scenario and lack comprehensiveness and flexibility.
[0003] The Chinese invention patent with the application publication number CN118281924A provides a method, system and readable storage medium for optimizing multiple application scenarios of a distribution network energy storage system. This patent optimizes the time scale of the battery charging and swapping station based on the multi-scenario composite application management framework of the energy storage system. Specifically, the optimization content includes day-ahead distribution robust optimization, intraday rolling optimization and intraday real-time optimization; uses a joint optimization scheduling model to optimize the output sequence of the battery charging and swapping station, where the joint optimization scheduling model at least includes a day-ahead wind and light output model, an intraday wind and light output model and a real-time wind and light output model; analyzes the optimization results based on the scenario stochastic differential method, and specifically sets three groups of comparison references to analyze and compare the optimization results.
[0004] For the above technical solution, although it involves the multi-scenario composite application of energy storage, it fails to fully consider the impact on the energy storage system under extreme weather conditions. When encountering extreme weather events such as typhoons, blizzards, and strong winds, the output of wind and light resources and the power grid load will fluctuate violently with the extreme weather. Under the multiple fluctuation characteristics of the output of wind and light resources and the power grid load, if the energy storage system cannot make rapid and accurate adjustments, it will pose a threat to the stability of the power grid and affect the power grid stability. Summary of the Invention
[0005] In order to improve the dynamic response ability of the energy storage system under extreme weather events and enhance the power grid stability, this application provides a method for recommending a distribution network energy storage strategy based on artificial intelligence.
[0006] In the first aspect, this application provides a method for recommending a distribution network energy storage strategy based on artificial intelligence, adopting the following technical solution:
[0007] A method for recommending a distribution network energy storage strategy based on artificial intelligence includes the following steps:
[0008] Data collection: Collect real-time weather data, real-time energy storage data and historical data; the historical data includes historical weather data, historical energy storage data and historical energy storage strategies;
[0009] Model construction: Construct an energy storage strategy optimization model, which includes a weather sub-model, a correction sub-model, a wind-solar and load sub-model, and an energy storage sub-model;
[0010] Model training: It includes the first identification, the first processing, the second processing, and the third processing;
[0011] The first identification: Input historical weather data into the weather sub-model to obtain predicted weather data, and determine whether the predicted weather data is extreme weather;
[0012] If so, execute the steps of the first processing;
[0013] If not, record the predicted weather data as the first data and execute the steps of the second processing;
[0014] The first processing: Input the predicted weather data into the correction sub-model to obtain a correction factor, and correct the predicted weather data based on the correction factor to obtain the corrected predicted weather data. Update the corrected predicted weather data as the first data and execute the steps of the second processing;
[0015] The second processing: Input the first data into the wind-solar and load sub-model and output the second data;
[0016] The third processing: Use the first data, the second data, historical energy storage data, and historical energy storage strategies to train the energy storage sub-model to obtain a trained energy storage strategy optimization model;
[0017] Strategy optimization: Use real-time weather data and real-time energy storage data as the input of the trained energy storage strategy optimization model to obtain a real-time energy storage strategy.
[0018] By adopting the above technical solution, based on the constructed energy storage strategy optimization model, weather data is predicted, and extreme weather is identified. For the identified extreme weather, the predicted weather data is corrected through the correction sub-model, improving the accuracy and reliability of the weather prediction results under extreme weather conditions, which helps the energy storage system formulate corresponding energy storage strategies based on the corrected predicted weather data, improving the pertinence and effectiveness of the energy storage system. In addition, based on the corrected predicted weather data, the wind-solar and load data are predicted, and combined with the prediction of wind-solar resources and grid load under extreme weather, the energy storage sub-model is trained, which helps the energy storage strategy optimization model learn the fluctuation laws of wind-solar resources and grid load under extreme conditions, improving the strategy optimization ability of the model under extreme conditions. At the same time, comprehensively considering the fluctuation impact of extreme weather conditions on wind-solar resources and grid load helps the energy storage system adjust the strategy in a timely manner based on the energy storage strategy output by the energy storage strategy optimization model in different extreme weather scenarios, improving the timeliness, accuracy and response ability of the energy storage system to execute the energy storage strategy under extreme weather conditions, and further enhancing the stability of the power grid.
[0019] Optionally, after performing the step of constructing the model and before performing the step of model training, it further includes:
[0020] Setting the window: Defining a preset time window;
[0021] First collection: Collecting meteorological data of each meteorological station within the preset time window;
[0022] First setting: Taking each meteorological station as the i-th layer node of the tree structure, and the node features of the i-th layer node include the meteorological data of each meteorological station;
[0023] Node aggregation: Using a clustering algorithm to preliminarily aggregate the node features of the i-th layer node to obtain a preliminary aggregation result, and determining the (i + 1)-th layer node according to the preliminary aggregation result;
[0024] Node judgment: Judging whether the number of (i + 1)-th layer nodes is 1:
[0025] If so, outputting the tree structure and then performing the first calculation step;
[0026] If not, taking the (i + 1)-th layer node as the new i-th layer node and performing the node aggregation step;
[0027] First calculation: Calculating the similarity of the meteorological data between the i-th layer node and the (i + 1)-th layer node, and taking the calculated similarity as the connection strength between the i-th layer node and the (i + 1)-th layer node;
[0028] First construction: Obtain the neurons corresponding to each layer of nodes in the tree structure in the weather sub-model, update the connection weights between each neuron according to the connection strength between the nodes, and obtain the updated weather sub-model;
[0029] In the first recognition step, input the historical weather data into the updated weather sub-model.
[0030] By adopting the above technical solution, organizing meteorological data in a hierarchical relationship in the form of a tree structure helps to reflect the spatial relationship and regional climate differences between different meteorological stations, enabling meteorological data to be classified and managed according to geographical regions and climate patterns, thereby providing a more efficient data access and processing method for the weather sub-model. At the same time, it also helps the weather sub-model find a balance between local meteorological characteristics and overall climate trends, improving the accuracy of weather prediction, enhancing the adaptability of the weather sub-model to meteorological changes in different regions and different time periods, especially suitable for high-frequency short-term weather prediction, and improving the adaptability of the weather sub-model to complex weather patterns in the face of changing extreme weather. In addition, by calculating the similarity of meteorological data between nodes as the node connection strength, it helps the weather sub-model focus on data with similar meteorological conditions, avoid interference from dissimilar data on prediction, improve the sensitivity and prediction accuracy of the weather sub-model to weather changes, helps the energy storage system adjust the energy storage strategy in a timely manner based on the accurate prediction of extreme weather, and improves the timeliness, accuracy, and response ability of the energy storage system to execute the energy storage strategy under extreme weather conditions, thereby enhancing the stability of the power grid.
[0031] Optionally, after the step of performing node judgment and before the step of performing the first calculation, it further includes:
[0032] First judgment: Calculate the change amount of the average value of the meteorological data of each node in the current preset time window compared with the average value of the meteorological data in the previous preset time window, and judge whether the change amount exceeds the preset change amount threshold:
[0033] If so, perform the second judgment step;
[0034] If not, do nothing;
[0035] Second judgment: Calculate the similarity of the meteorological data between the i-th layer node and the i+1-th layer node within the current preset time window, denoted as the first similarity, and judge whether the first similarity is lower than the preset similarity threshold:
[0036] If so, perform structural splitting on the i-th layer node to obtain a splitting result, update the splitting result as the i-th layer node, and perform the node aggregation step;
[0037] If not, do nothing.
[0038] By adopting the above technical solution, the change in meteorological data of each node in the current time window and the previous time window is calculated, the change is compared with the preset change threshold, and the similarity of meteorological data between nodes is compared with the preset similarity threshold to detect whether the meteorological conditions of the node have changed significantly. Based on the above dynamic detection mechanism, it helps to improve the ability of the weather sub-model to respond to meteorological changes in a timely manner, especially in the case of sudden changes or large fluctuations in weather, which helps the weather sub-model to respond in time when changes occur and adjust the prediction structure, thereby improving the model's resilience and prediction accuracy for sudden weather. In addition, based on the above dynamic detection mechanism, when a significant change in a node is detected, the weather sub-model structure is split and reconstructed in a timely manner, which helps the weather sub-model to flexibly respond to regional or local sudden meteorological changes, especially when the weather pattern in some areas changes drastically. By splitting the node to maintain the representativeness of the node data, it helps to improve the prediction accuracy of the weather sub-model in extreme weather. At the same time, based on the above-mentioned dynamic detection adaptation mechanism and node splitting and aggregation mechanism, it helps to enhance the sensitivity and adaptability of the weather sub-model to weather changes, especially when dealing with extreme weather and sudden meteorological events, it improves the real-time and accuracy of the weather sub-model prediction. Moreover, based on the adaptive adjustment structure, it helps to optimize the prediction accuracy of the weather sub-model and improve the accuracy of local weather predictions. The model not only makes accurate predictions in large-scale weather changes, but also can make timely responses to local meteorological changes, which helps the energy storage system to adjust the energy storage strategy in time based on the accurate prediction of extreme weather, improves the timeliness, accuracy and response capabilities of the energy storage system in executing the energy storage strategy under extreme weather conditions, and thus enhances the stability of the power grid.
[0039] Optionally, after executing the first construction step and before executing the model training step, the method further includes:
[0040] Feature addition: Get all node depths in the tree structure. Node features also include node depths.
[0041] Graph structure construction: The nodes in the tree structure are used as graph nodes, and the connection relationships between each pair of nodes in the tree structure are used as edges between pairs of graph nodes;
[0042] Set weights: Use the connection strength between each node pair as the meteorological feature weight of the edge, calculate the spatial distance between the positions of each node pair, and use the inverse of the spatial distance as the spatial distance weight of the edge;
[0043] Model update: Based on the edges between graph nodes and graph node pairs, a graph structure is constructed. Based on the graph structure, the connection weights between neurons in the weather sub-model are updated to obtain an updated weather sub-model.
[0044] In the first recognition step, the historical weather data is input into the weather sub-model updated again.
[0045] By adopting the above technical solution, taking the depth of each node as an additional feature enhances the model's ability to understand nodes at different levels, helps the model capture more geographical feature information and meteorological feature information in the multi-level tree structure, enabling the model to make weather predictions not only based on information at a single level but also based on the hierarchical relationships and interactions between layers of the tree structure, improving the model's understanding and prediction ability for complex weather patterns. Updating the weather sub-model based on the constructed graph structure helps the model more accurately capture the geographical relationships and meteorological data relationships between different weather stations, improving the accuracy of the model for local and global weather predictions. At the same time, it also improves the model's adaptability to sudden weather and weather prediction accuracy, helps the energy storage system adjust the energy storage strategy in a timely manner based on accurate predictions of extreme weather, and improves the timeliness, accuracy, and response ability of the energy storage system to execute the energy storage strategy under extreme weather conditions, thereby enhancing the stability of the power grid.
[0046] Optionally, after performing the first recognition step and before performing the first processing step, it further includes:
[0047] First extraction: Obtain the time of the predicted weather data, denoted as the first time;
[0048] Second extraction: Obtain the historical weather data at the first time, denoted as the first marked data;
[0049] Calculate the change value: Calculate the difference between the predicted weather data and the first marked data to obtain a deviation data set;
[0050] Construct a matrix: Calculate the correlation degree of each sample pair in the deviation data set, and construct a matrix based on the calculated correlation degree to obtain a shared matrix;
[0051] Feature fusion: Perform a multiplication operation on the shared matrix and the predicted weather data, and denote the operation result as the shared feature;
[0052] Optimize the model: Define a loss function, process the shared feature using a task-specific branch, and iteratively optimize the corrected sub-model by minimizing the loss function. Take the optimized corrected sub-model as the new corrected sub-model.
[0053] By adopting the above technical solution, based on the multi-task learning framework, calculating the correlation of each sample pair in the deviation dataset to construct a shared matrix helps the model learn the error correlation relationship between the features of the predicted data under different weather categories based on the mutual relationship between multiple features in the deviation dataset. In addition, performing a product operation on the correlation between each feature in the deviation dataset and the predicted weather data to construct a shared feature helps the model learn the error pattern in the deviation dataset and the feature pattern in the predicted data, enhancing the relationship pattern between the features in the error data of the predicted data under different weather categories. At the same time, optimizing the model based on the constructed shared feature helps improve the flexibility and adaptability of the model to adjust the predicted weather data based on different weather scenarios, improves the interpretability of the model, and moreover, improves the accuracy of the predicted weather data based on the output correction factor, which helps the energy storage system adjust the energy storage strategy in a timely manner based on the accurate prediction of extreme weather, improving the timeliness, accuracy, and response ability of the energy storage system to execute the energy storage strategy under extreme weather conditions, thereby enhancing the stability of the power grid.
[0054] Optionally, after performing the step of constructing the matrix and before performing the step of feature fusion, it further includes:
[0055] Feature screening: Denote the samples corresponding to the sample pairs with a correlation greater than the preset feature correlation threshold as the first samples;
[0056] Feature mapping: Calculate the kernel value of the first sample pair using a kernel function, and construct a kernel matrix based on the calculation result;
[0057] Feature unification: Taking the dimension of the shared matrix as the standard, adjust the dimension of the kernel matrix, and use the adjusted kernel matrix as the new kernel matrix;
[0058] Matrix update: Perform a product operation on the new kernel matrix and the shared matrix, and use the processing result as the new shared matrix.
[0059] By adopting the above technical solution, samples are screened based on a preset feature correlation threshold, samples with strong correlations are retained, the dimension and complexity of the data are reduced, and the calculation efficiency is improved. In addition, using a kernel function to map the first sample helps the model capture the non-linear relationships between samples with strong correlations in the deviation dataset. At the same time, updating the shared matrix based on the kernel matrix and the shared matrix helps combine the non-linear feature information in the kernel matrix with the linear feature information in the shared matrix, so that the updated shared features effectively integrate the relationships between different features and enhance the expression ability of the shared features. At the same time, optimizing the model based on the fused shared features helps improve the model's learning ability for multi-dimensional data and improves the accuracy of the model in predicting the correction factor. Moreover, based on the output correction factor, the accuracy of predicting weather data is improved, which helps the energy storage system adjust the energy storage strategy in a timely manner based on the accurate prediction of extreme weather, and improves the timeliness, accuracy and response ability of the energy storage system in executing the energy storage strategy under extreme weather conditions, thereby enhancing the stability of the power grid.
[0060] Optionally, after performing the step of constructing the model and before performing the step of training the model, it further includes:
[0061] First definition: Based on historical data, define an optimization objective, where the optimization objective includes minimizing redundancy, minimizing noise, and maximizing information content;
[0062] Function construction: Based on the optimization objective, construct an objective function;
[0063] First setting: Define a particle as a set of data in the historical data, use the particle swarm optimization algorithm to solve the objective function, calculate the velocity of the particle, and update the particle position according to the particle velocity;
[0064] Second setting: Calculate the difference between the fitness of the particle after update and the fitness of the particle before update, denote the calculated difference as the first difference, and based on the first difference, use the probability acceptance mechanism of the simulated annealing algorithm to adjust the particle position again;
[0065] First optimization: Obtain the historical data corresponding to the particle position after the second adjustment, denote it as the first historical data, and update the first historical data as the historical data.
[0066] By adopting the above technical solutions, considering the optimization objectives of minimizing redundancy, minimizing noise, and maximizing information content, based on multi-stage optimization technology, the particle swarm optimization and simulated annealing algorithms are introduced to calculate the fitness difference of particles to adjust the particle positions, thereby achieving the purpose of dynamically adjusting the distribution of historical data and endowing the optimization of historical data with self-adaptive ability. Meanwhile, the optimized data distribution can better reflect the internal structure of historical data, which helps to improve the accuracy of the model. In addition, through the optimization of historical data by methods such as particle swarm and simulated annealing, the diversity and coverage of historical data are improved, which helps the model to adapt to the changes of different data types and enhances the prediction accuracy and generalization ability of the model.
[0067] Optionally, after the step of performing the second setting and before the step of performing the first optimization, it further includes:
[0068] Third setting: Obtain the random number generated when the particle position is updated again, and determine whether the random number is less than the preset probability threshold:
[0069] If so, use the krill herd algorithm to perform the third adjustment on the particle position and execute the particle optimization step:
[0070] If not, execute the first optimization step;
[0071] Particle optimization: Calculate the fitness before and after the particle position adjustment respectively, and determine whether the fitness after the particle position adjustment is greater than the fitness before the particle adjustment:
[0072] If so, take the particle position after the third adjustment as the new particle position and update the particle position after the second adjustment with the new particle position;
[0073] If not, restore the particle position to the particle position after the second adjustment.
[0074] By adopting the above technical solutions, comparing the random number generated during the particle position update with the preset probability threshold to determine whether to use the krill herd algorithm for optimization adjustment helps the optimization algorithm to continue exploring the new solution space under uncertain circumstances, thereby achieving the purpose of breaking the limitation of the local optimal solution and increasing the diversity of global search. In addition, using the krill herd algorithm to adjust the particle position further enhances the exploration ability of the particle swarm and improves the adaptability of the model to different data and optimization objectives. Moreover, by dynamically selecting the optimization strategy, the limitations brought by the fixed optimization path can be reduced, and the overall optimization efficiency of the model is improved.
[0075] Optionally, the energy storage strategy optimization model further includes a charge and discharge load prediction sub-model; the method further includes:
[0076] Second collection: Collect real-time electric vehicle data; the real-time electric vehicle data includes real-time charging pile charging data, real-time electricity price, and real-time holiday data;
[0077] In the step of policy optimization, input the real-time electric vehicle data, real-time weather data, and real-time energy storage data into the trained energy storage policy optimization model.
[0078] By adopting the above technical solution, a charging and discharging load prediction sub-model is constructed, considering the changes in the charging behavior of electric vehicles under extreme weather and the impact of electricity price changes on the grid load, optimizing the grid load, which helps the model to comprehensively consider the impact of the charging load of electric vehicles, energy price fluctuations, and the unique demand fluctuations during holidays on the grid load fluctuations, improving the accuracy and rationality of the energy storage decision output by the model. At the same time, it helps the model to flexibly adjust the energy storage policy in different scenarios, improving the overall operation efficiency of the energy storage system and further enhancing the stability of the power grid.
[0079] Optionally, the method further includes:
[0080] Third collection: Collect input data, the input data includes historical charging pile charging data labeled with holiday labels or non-holiday labels, historical electricity price, and first data;
[0081] Charging and discharging prediction: Input the input data into the charging and discharging load prediction sub-model to obtain third data;
[0082] First splicing: Use the sum of the third data and the second data as the new second data.
[0083] By adopting the above technical solution, combining information such as holiday labels, historical charging pile data, and historical electricity price, accurately capturing the dynamic changes of the charging and discharging load through the charging and discharging load prediction sub-model, further improving the accuracy of the grid load prediction, helping the energy storage system to more accurately estimate the grid load demand under extreme weather, and timely optimizing the energy storage policy based on the prediction results, quickly responding to the grid load fluctuations, enhancing the stability and economy of the energy storage system, and strengthening the power grid stability.
[0084] In summary, the present application includes at least one of the following beneficial technical effects:
[0085] 1. Based on the constructed energy storage strategy optimization model, weather data is predicted and extreme weather is identified. For the identified extreme weather, the predicted weather data is corrected through a correction sub-model, improving the accuracy and reliability of weather prediction results under extreme weather conditions. This helps the energy storage system formulate corresponding energy storage strategies based on the corrected predicted weather data, enhancing the pertinence and effectiveness of the energy storage system. Additionally, based on the corrected predicted weather data, the wind-solar and load data are predicted. Combining the prediction of wind-solar resources and grid load under extreme weather, the energy storage sub-model is trained, which helps the energy storage strategy optimization model learn the fluctuation laws of wind-solar resources and grid load under extreme conditions, improving the strategy optimization ability of the model under extreme conditions. Meanwhile, comprehensively considering the fluctuation impact of extreme weather conditions on wind-solar resources and grid load helps the energy storage system promptly adjust strategies based on the energy storage strategies output by the energy storage strategy optimization model in different extreme weather scenarios, improving the timeliness, accuracy, and response ability of the energy storage system to execute energy storage strategies under extreme weather conditions, and thus enhancing the stability of the power grid.
[0086] 2. Organizing meteorological data into a hierarchical relationship in the form of a tree structure helps reflect the spatial relationship and regional climate differences between different meteorological stations, enabling meteorological data to be classified and managed according to geographical regions and climate patterns, thus providing a more efficient data access and processing method for the weather sub-model. At the same time, it also helps the weather sub-model find a balance between local meteorological characteristics and overall climate trends, improving the accuracy of weather prediction, enhancing the adaptability of the weather sub-model to meteorological changes in different regions and different time periods, especially suitable for high-frequency short-term weather prediction, and improving the adaptability of the weather sub-model to complex weather patterns in the face of variable extreme weather. In addition, by calculating the similarity of meteorological data between nodes as the node connection strength, it helps the weather sub-model focus on data with similar meteorological conditions, avoiding interference with prediction caused by dissimilar data, improving the sensitivity and prediction accuracy of the weather sub-model to weather changes, helping the energy storage system promptly adjust energy storage strategies based on accurate predictions of extreme weather, improving the timeliness, accuracy, and response ability of the energy storage system to execute energy storage strategies under extreme weather conditions, and thus enhancing the stability of the power grid.
[0087] 3. Based on the multi-task learning framework, calculate the correlation of each sample pair in the deviation dataset to construct a shared matrix, which helps the model learn the error correlation relationship between the features of the predicted data under different weather categories based on the mutual relationship between multiple features in the deviation dataset. In addition, perform a multiplication operation on the correlation between the features in the deviation dataset and the predicted weather data to construct shared features, which helps the model learn the error pattern in the deviation dataset and the feature pattern in the predicted data, enhancing the relationship pattern between the features in the error data of the predicted data under different weather categories. At the same time, optimizing the model based on the constructed shared features helps improve the flexibility and adaptability of the model to adjust the predicted weather data under different weather scenarios, improves the interpretability of the model, and moreover, improves the accuracy of the predicted weather data based on the output correction factor, which helps the energy storage system adjust the energy storage strategy in a timely manner based on the accurate prediction of extreme weather, improving the timeliness, accuracy, and response ability of the energy storage system to execute the energy storage strategy under extreme weather conditions, and further enhancing the stability of the power grid.
[0088] 4. Considering the optimization objectives of minimizing redundancy, minimizing noise, and maximizing information, based on the multi-stage optimization technology, introduce the particle swarm optimization and simulated annealing algorithms to calculate the fitness difference of particles to adjust the particle positions, thereby achieving the purpose of dynamically adjusting the distribution of historical data, making the optimization of historical data have self-adaptive ability. At the same time, the optimized data distribution can better reflect the internal structure of historical data, which helps improve the accuracy of the model. In addition, through the optimization of historical data by methods such as particle swarm and simulated annealing, the diversity and coverage of historical data are improved, which helps the model adapt to the changes of different data types, and improves the prediction accuracy and generalization ability of the model. Brief Description of the Drawings
[0089] Figure 1 is the flowchart of Embodiment 1 of the present application;
[0090] Figure 2 is the flowchart of the optimization of the S21 weather sub-model in Embodiment 2 of the present application;
[0091] Figure 3 is the flowchart of the optimization of the S311 correction sub-model in Embodiment 3 of the present application;
[0092] Figure 4 is the flowchart of the optimization of the S22 historical data in Embodiment 4 of the present application. Detailed Description of the Embodiments
[0093] The following combines Figures 1 to 4 to further elaborate on the present application in detail.
[0094] Embodiment 1: This embodiment discloses a method for recommending a distribution network energy storage strategy based on artificial intelligence, such asFigure 1 As shown in Figure 1 , the method includes: collecting real-time weather data, real-time energy storage data, and historical data; the historical data includes historical weather data, historical energy storage data, and historical energy storage strategies, constructing an energy storage strategy optimization model, and the energy storage strategy optimization model includes a weather sub-model, a correction sub-model, a wind-solar and load sub-model, and an energy storage sub-model; inputting the historical weather data into the weather sub-model to obtain predicted weather data, determining whether the predicted weather data is extreme weather, if so, inputting the predicted weather data into the correction sub-model to obtain a correction factor, and correcting the predicted weather data based on the correction factor to obtain corrected predicted weather data, and updating the corrected predicted weather data as the first data; if not, recording the predicted weather data as the first data; inputting the first data into the wind-solar and load sub-model to output the second data, and training the energy storage sub-model using the first data, the second data, the historical energy storage data, and the historical energy storage strategies to obtain a trained energy storage strategy optimization model, and using the real-time weather data and the real-time energy storage data as the input of the trained energy storage strategy optimization model to obtain a real-time energy storage strategy. This embodiment includes the following steps:
[0095] S1 Data collection: Collect real-time weather data, real-time energy storage data, and historical data. The historical data includes historical weather data, historical wind-solar and load data, historical energy storage data, and historical energy storage strategies.
[0096] The weather data includes temperature, humidity, air pressure, precipitation, wind speed, wind direction, light intensity, and cloud cover, where temperature, humidity, air pressure, precipitation, wind speed, wind direction, light intensity, and cloud cover are the weather parameters of the weather data.
[0097] The real-time weather data includes real-time temperature, real-time humidity, real-time air pressure, real-time precipitation, real-time wind speed, real-time wind direction, real-time light intensity, and real-time cloud cover. The real-time weather data can be obtained through official meteorological websites, meteorological stations in the current location, online weather platforms, satellite remote sensing technology, and satellite cloud images, etc. The geographical location where the real-time weather data is obtained is marked with a corresponding geographical location label for the real-time weather data.
[0098] The real-time energy storage data includes the charge and discharge status of the energy storage device, the energy storage capacity data, and the power output data. The real-time energy storage data can be collected in real time through the built-in sensors of the energy storage device in the energy storage system or the monitoring system.
[0099] The historical weather data includes historical temperature, historical humidity, historical air pressure, historical precipitation, historical wind speed, historical wind direction, historical light intensity, and historical cloud cover. The historical weather data can be obtained through official meteorological websites, meteorological stations in the current location, online weather platforms, satellite remote sensing technology, and satellite cloud images, etc. The geographical location where the historical weather data is obtained is marked with a corresponding geographical location label for the historical weather data.
[0100] Historical scenery and load data include historical scenery resource data and historical load data.
[0101] Historical scenery resource data includes the historical power generation of wind turbines and the historical power generation of photovoltaic power generation systems. The historical scenery power generation resource data can be obtained through the monitoring systems of wind turbines and photovoltaic power generation systems.
[0102] Historical load data can be obtained by measuring and collecting through smart meters and calculating the historical power grid load data or through the load side management platform.
[0103] Historical energy storage data includes the historical charge and discharge status of energy storage devices, historical energy storage capacity data, and historical power output data. The historical energy storage data can be obtained through the built-in sensors or monitoring systems of the energy storage devices in the energy storage system.
[0104] Historical energy storage strategy: The historical energy storage strategy executed by the energy storage system based on the historical weather data, historical energy storage data, and historical scenery resource data collected at the same time can be obtained through the local database or cloud platform of the energy storage system.
[0105] In this embodiment, a set of historical data includes historical weather data, historical scenery and load data, historical energy storage data, and historical energy storage strategy at the same time point.
[0106] In this embodiment, it is necessary to preprocess the collected data. The steps of the data preprocessing include data cleaning and data normalization.
[0107] Data cleaning: Operations such as denoising, processing missing values, and removing outliers are performed on the collected data.
[0108] Data normalization: The collected data is normalized.
[0109] S2 Construct a model: Construct an energy storage strategy optimization model, and the energy storage strategy optimization model includes a weather sub-model, a correction sub-model, a scenery and load sub-model, and an energy storage sub-model.
[0110] The weather sub-model can use a convolutional neural network, a recurrent neural network, a long short-term memory network, or a gated recurrent unit as the basic model. In this embodiment, the weather sub-model uses a long short-term memory network model as the basic model.
[0111] The method for constructing the correction sub-model includes: selecting the Transformer model as the base model of the correction sub-model, so a part of the Transformer encoder layers are used as the shared layers of the correction sub-model, and the remaining Transformer encoder layers and the fully connected layers for performing specific tasks in the Transformer model are used as the task-specific layers of the correction sub-model. According to the weather parameters of the weather data, task-specific branches are created, and the task-specific branches include temperature tasks, humidity tasks, air pressure tasks, precipitation tasks, wind speed tasks, wind direction tasks, light intensity tasks, and cloud cover tasks.
[0112] The wind-solar and load sub-model includes two groups of long short-term memory network models. The first group of long short-term memory network models is used to predict the wind-solar power generation data of wind-solar devices based on weather data, and the first group of long short-term memory network models is denoted as the first model. The second group of long short-term memory network models is used to predict the load of the power grid based on weather data, and the second group of long short-term memory network models is denoted as the second model.
[0113] The energy storage sub-model can use a convolutional neural network, a recurrent neural network, or a long short-term memory network as the base model. In this embodiment, the energy storage sub-model can have the function of outputting an energy storage strategy after being trained with historical data.
[0114] S3 Model training: includes S31 First Identification, S32 First Processing, S33 Second Processing, and S34 Third Processing.
[0115] S31 First Identification: Input the historical weather data into the weather sub-model to obtain the predicted weather data, and determine whether the predicted weather data is extreme weather.
[0116] If so, execute S33 First Processing.
[0117] If not, denote the predicted weather data as the first data and execute S33 Second Processing.
[0118] The methods for determining whether the predicted weather data is extreme weather include the numerical threshold determination method and the method of constructing an extreme weather recognition model for determination.
[0119] The numerical threshold determination method includes: determining whether there are weather parameters in the predicted weather data that exceed the corresponding preset weather parameter thresholds. If there are weather parameters that exceed the corresponding preset weather parameter thresholds, then determine whether the number of weather parameters that exceed the corresponding preset weather parameter thresholds exceeds the preset number threshold. If so, determine that the predicted weather data is extreme weather; otherwise, determine that the predicted weather data is not extreme weather.
[0120] In the numerical threshold determination method, the preset weather parameter thresholds and preset number thresholds corresponding to each weather parameter can be set according to actual needs.
[0121] The method for constructing an extreme weather recognition model judgment includes: constructing an extreme weather recognition model by using a VAE-GAN model and a classification model. In the VAE-GAN model, the VAE part selects a conditional variational autoencoder as the VAE part model in the VAE-GAN model, and the conditional variational autoencoder includes an encoder and a decoder. The GAN part in the VAE-GAN model is a generative adversarial network model, and the generative adversarial network model includes a generator and a discriminator. The classification model can adopt a convolutional neural network, a recurrent neural network, a Transformer model, etc. In this embodiment, the Transformer model is selected as the basic model of the classification model.
[0122] The model training process of the extreme weather recognition model is as follows: label the corresponding weather category labels for the historical weather data, denoted as the first recognition data, input the first recognition data into the encoder to obtain the latent variables, use the latent variables as the input of the generator to generate pseudo data; use the pseudo data as the input of the discriminator to obtain the discrimination result of the pseudo data. If the discrimination result is unqualified, optimize the parameters of the generator and loop through the above steps; if the discrimination result is qualified, use the pseudo data and the first recognition data as the input of the classification model for model inference, define the mean square error function as the loss function, calculate the loss value, use the model parameter gradient calculated by the backpropagation algorithm, and use the gradient descent method to update the model parameters until the preset number of iterative training times is completed or the loss value of the calculated classification model no longer decreases, and obtain the trained extreme weather recognition model.
[0123] Input the predicted weather data into the trained extreme weather recognition model, output the weather category label of the predicted weather data, and judge whether the predicted weather data is extreme weather according to the weather category label of the predicted weather data.
[0124] In this embodiment, the method for constructing an extreme weather recognition model judgment is used to judge whether the predicted weather data is extreme weather.
[0125] S32 First processing: Input the predicted weather data into the correction sub-model to obtain the correction factors of each weather parameter in the predicted weather data. Perform an addition operation on the value of each weather parameter in the predicted weather data and the corresponding correction factor of each weather parameter obtained, and use the operation result as the corrected predicted weather data. Then update the corrected predicted weather data as the first data, and then execute S33 Second processing.
[0126] S33 Second processing: Input the first data into the first model to obtain the predicted wind and solar power generation data, input the first data into the second model to obtain the predicted power grid load data, and use the obtained predicted wind and solar power generation data and predicted power grid load data as the second data.
[0127] S34 Third processing: Train the energy storage sub-model with the first data, the second data, the historical energy storage data, and the historical energy storage strategy to obtain the trained energy storage strategy optimization model.
[0128] Input the first data, the second data, and the historical energy storage data into the energy storage sub-model to obtain the predicted energy storage strategy.
[0129] Define the loss function of the energy storage strategy optimization model as:
[0130] ;
[0131] ;
[0132] ;
[0133] ;
[0134] ;
[0135] .
[0136] Among them, represents the loss function of the weather sub-model, represents the loss function of the first model, represents the loss function of the second model, represents the loss function of the correction sub-model, represents the loss function of the energy storage sub-model. is the number of historical weather data in the historical data, is the true label in the th historical weather data in the weather sub-model, is the th predicted weather data in the weather sub-model, is the number of historical wind-solar resource data in the historical data, is the true label in the th historical wind-solar resource data in the first model, is the th predicted wind power generation data in the weather sub-model, is the number of historical load data in the historical data, is the true label in the th historical load data in the first model, is the th predicted grid load data in the weather sub-model, is the number of task-specific branches in the correction sub-model, is the The weight of a task-specific branch, is the loss function of the th task-specific branch, is the number of historical weather data of the input correction sub-model in historical data, is the th task-specific branch of the th input correction sub-model's true label of the error value between the predicted weather data and the corresponding historical weather data, is the th input correction sub-model's correction factor of the predicted weather data of the th task-specific branch, is the number of samples of the input energy storage sub-model in historical data, is the true label of the th input energy storage sub-model's sample in the energy storage sub-model, is the
[0137] th predicted energy storage strategy in the weather sub-model.
[0138] S4 Strategy Optimization: Use the real-time weather data and real-time energy storage data as the input of the trained energy storage strategy optimization model to obtain the real-time energy storage strategy.
[0139] Input the real-time weather data into the weather sub-model to obtain the predicted real-time weather data, and determine whether the predicted real-time weather data is extreme weather. If so, input the predicted real-time weather data into the correction sub-model to obtain the correction factor of each weather parameter in the predicted real-time weather data. Perform an addition operation on the value of each weather parameter in the predicted real-time weather data and the corresponding correction factor of each weather parameter obtained, and use the operation result as the corrected predicted real-time weather data, denoted as the first real-time data. If not, directly use the obtained predicted real-time weather data as the first real-time data. Input the obtained first real-time data into the wind-solar and load sub-model to obtain the second real-time data, and input the obtained first real-time data, second real-time data, and real-time energy storage data into the energy storage sub-model to obtain the real-time energy storage strategy.
[0140] In this embodiment, based on the constructed energy storage strategy optimization model, weather data is predicted and extreme weather is identified. For the identified extreme weather, the predicted weather data is corrected through a correction sub-model, which improves the accuracy and reliability of the weather prediction results under extreme weather conditions, and helps the energy storage system formulate corresponding energy storage strategies based on the corrected predicted weather data, improving the pertinence and effectiveness of the energy storage system. In addition, based on the corrected predicted weather data, the wind-solar and load data are predicted, and combined with the prediction of wind-solar resources and grid load under extreme weather, the energy storage sub-model is trained, which helps the energy storage strategy optimization model learn the fluctuation laws of wind-solar resources and grid load under extreme conditions, and improves the strategy optimization ability of the model under extreme conditions.
[0141] Embodiment 2: The difference from Embodiment 1 is that:
[0142] After performing S2 to construct the model and before performing S3 to train the model, it further includes S21 to optimize the weather sub-model.
[0143] The optimization of the weather sub-model in S21 includes: S211 setting the window, S212 first collection, S213 first setting, S214 node aggregation, S215 node judgment, S216 first judgment, S217 second judgment, S218 first calculation, S219 first construction, and S2110 second construction, as Figure 2 shown.
[0144] S211 setting the window: Define a preset time window.
[0145] Multiple acquisition time periods can be set for the preset time window as needed.
[0146] S212 first collection: Determine the positions of the meteorological stations to be collected, and collect the meteorological data and the position information of the meteorological stations at a certain moment within the preset time window. The position information of the meteorological stations can be obtained through a geographic information system.
[0147] The meteorological data of the meteorological stations includes: temperature, humidity, air pressure, precipitation, wind speed, wind direction, light intensity, and cloud cover.
[0148] S213 first setting: Take each meteorological station as the i-th layer node of the tree structure, then the node features of the i-th layer node include the meteorological data of each meteorological station. When i = 1, it means taking all meteorological stations as the bottom layer nodes of the tree structure.
[0149] S214 Node Aggregation: Using the node features of the nodes in the i-th layer as the node features, a clustering algorithm (such as the K-means clustering algorithm, DBSCAN clustering algorithm, or hierarchical clustering algorithm, etc.) is used to preliminarily aggregate the node features of the nodes in the i-th layer to obtain a preliminary aggregation result, and the nodes in the (i + 1)-th layer are determined according to the preliminary aggregation result. When determining the nodes in the (i + 1)-th layer, based on the position information of the nodes in the i-th layer of each cluster, the geometric center point of the nodes in the i-th layer under the current (i + 1)-th layer node is calculated, and the calculated geometric center point is used as the current (i + 1)-th layer node. After determining the nodes in the (i + 1)-th layer, the Euclidean distance between each node in the i-th layer and the corresponding (i + 1)-th layer node is calculated, and normalization processing is performed based on the calculated Euclidean distance. The processed data is used as the weight of each node in the i-th layer under the current (i + 1)-th layer node. Based on the weight of the nodes in the i-th layer and the corresponding node features, weighted summation is performed, and the data after weighted summation is used as the node features of the current (i + 1)-th layer node, where i ≥ 1.
[0150] In this embodiment, except when i = 1, all the weather stations represented by the nodes in the i-th layer are actual weather stations, and the other nodes in the i-th layer all refer to virtual weather stations.
[0151] For example: Define the preset time window as 1 hour, that is, data is collected every hour. At 14:00, weather stations A, B, C, D, and E record the following meteorological data respectively: A: Temperature = 20°C, Humidity = 70%, Wind speed = 5.2 m / s, Coordinate = (100 o , 30 o ); B: Temperature = 25°C, Humidity = 60%, Wind speed = 4.8 m / s, Coordinate = (101 o , 31 o ); C: Temperature = 30°C, Humidity = 55%, Wind speed = 6.0 m / s, Coordinate = (102 o , 32.5 o ); D: Temperature = 18°C, Humidity = 80%, Wind speed = 4.5 m / s, Coordinate = (99 o , 29.5 o ); E: Temperature = 22°C, Humidity = 65%, Wind speed = 5.5 m / s, Coordinate = (100.5 o , 31.5 o ). Based on the meteorological data of weather stations A, B, C, D, and E, a corresponding tree structure is constructed (for simplicity of description, only part of the collected weather parameters are used as meteorological data for illustration here).
[0152] Regarding these 5 meteorological stations as the first-layer nodes of the tree, the K-means clustering algorithm is used to cluster the meteorological data of these 5 meteorological stations. The clustering result is two classes, indicating that two second-layer nodes are obtained. The first-layer nodes under the second-layer node 1 are node A, node B, and node E, and the first-layer nodes under the second-layer node 2 are node C and node D.
[0153] Based on the clustering result, calculate the geometric center of each second-layer node. Then the coordinates of the second-layer node 1 are (100.5 o , 30.83 o ), and the coordinates of the second-layer node 1 are (100.75 o , 31 o ).
[0154] Calculate the Euclidean distance from each meteorological station to its corresponding second-layer node. The Euclidean distance from meteorological station A to the second-layer node 1 is 0.96, the Euclidean distance from meteorological station B to the second-layer node 1 is 0.52, the Euclidean distance from meteorological station E to the second-layer node 1 is 0.67, the Euclidean distance from meteorological station C to the second-layer node 2 is 2.28, and the Euclidean distance from meteorological station D to the second-layer node 2 is 2.28. Normalize the second-layer node 1 (meteorological stations A, B, E) and the second-layer node 2 (meteorological stations C, D) respectively, and the weights of meteorological station A, meteorological station B, meteorological station E, meteorological station C, and meteorological station D are 0.446, 0.242, 0.312, 0.500, and 0.500 respectively.
[0155] Based on the weights and the meteorological data of each meteorological station, calculate the meteorological data of the second-layer nodes.
[0156] The temperature T1 of the second-layer node 1 = (0.446×20)+(0.242×25)+(0.312×22)=8.92+6.05+6.864=21.834℃;
[0157] The humidity H1 of the second-layer node 1 = (0.446×70)+(0.242×60)+(0.312×65)=31.22+14.52+20.28=66.02%;
[0158] The wind speed F1 of the second-layer node 1 = (0.446×5.2)+(0.242×4.8)+(0.312×5.5)=2.315+1.162+1.716=5.193m / s;
[0159] The temperature T2 of the second-layer node 2 = (0.5×30)+(0.5×18)=15+9=24℃;
[0160] The humidity H2 of the second - layer node 2=(0.5×55)+(0.5×80)=27.5 + 40 = 67.5%;
[0161] The wind speed F2 of the second - layer node 2=(0.5×6.0)+(0.5×4.5)=3 + 2.25 = 5.25m / s.
[0162] Obtain the second - layer node 1: temperature = 22°C, humidity = 66%, wind speed = 5.2m / s, coordinates=(100.5 o , 30.83 o ); The second - layer node 2: temperature = 24°C, humidity = 67.5%, wind speed = 5.3m / s, coordinates=(100.75 o , 31 o ).
[0163] S215 Node judgment: Judge whether the number of nodes in the (i + 1)-th layer is 1.
[0164] If so, it indicates that the construction of the tree structure is completed, output the tree structure, and then execute the first judgment of S216.
[0165] If not, take the nodes in the (i + 1)-th layer as the new i - th layer nodes, and execute S214 node aggregation based on the new i - th layer nodes.
[0166] S216 First judgment: Calculate the average value of the meteorological data of each node in the current preset time window and the average value of the meteorological data of the previous preset time window. Based on the obtained average value of the meteorological data of each node in the current preset time window and the average value of the meteorological data of the previous preset time window, calculate the change amount of the average value of the meteorological data of each node in the current preset time window and the average value of the meteorological data of the previous preset time window, and judge whether the change amount exceeds the preset change amount threshold.
[0167] If so, execute the second judgment of S217.
[0168] If not, do nothing.
[0169] In this embodiment, when making the first judgment of S216, it is possible to start from the bottom - layer nodes (i.e., the first - layer nodes) in the order of the node layer, and judge whether the change amount of the average value of the meteorological data of each node in the current preset time window and the average value of the meteorological data of the previous preset time window exceeds the preset change amount threshold.
[0170] S217 Second judgment: Use a similarity algorithm (such as Euclidean distance, cosine similarity, and Pearson correlation coefficient, etc.) to calculate the similarity of the meteorological data between the i - th layer nodes and the (i + 1)-th layer nodes in the current preset time window, denoted as the first similarity, and judge the situation where the first similarity is lower than the preset similarity threshold.
[0171] If so, perform structural splitting on the nodes in the i-th layer, use the split nodes in the i-th layer as the unaggregated nodes in the i-th layer, update the unaggregated nodes in the i-th layer as the nodes in the i-th layer, and perform node aggregation at S214.
[0172] If not, no processing is performed.
[0173] Among them, the similarity of meteorological data, that is, node features, between the nodes in the i-th layer and the nodes in the i+1-th layer is calculated based on a similarity algorithm. Therefore, the node features include temperature features, humidity features, air pressure features, precipitation features, wind speed features, wind direction features, light intensity features, and cloud cover features. The calculated temperature similarity, humidity similarity, air pressure similarity, precipitation similarity, wind speed similarity, wind direction similarity, light intensity similarity, and cloud cover similarity are weighted and summed, and the weighted sum result is used as the first similarity.
[0174] S218 First calculation: Use a similarity algorithm to calculate the similarity of meteorological data between all nodes in the i-th layer and the nodes in the i+1-th layer, and use the calculated similarity as the connection strength between the nodes in the i-th layer and the nodes in the i+1-th layer. In this embodiment, the Pearson correlation coefficient can be used to calculate the similarity of meteorological data between all nodes in the i-th layer and the nodes in the i+1-th layer.
[0175] S219 First construction: Based on the number of layers of the tree structure and the number of nodes in each layer, map each node of the tree structure to a neuron in the neural network. After mapping, each node in each layer corresponds to a neuron in the neural network. Use the calculated connection strength between each node as the connection weight between each neuron to obtain an updated weather sub-model.
[0176] S2110 Second construction: Includes S21101 Feature addition, S21102 Graph structure construction, S21103 Weight setting, and S21104 Model update.
[0177] S21101 Feature addition: Obtain the node depths of all nodes in the tree structure, and add a node depth feature to the node features of each node in the tree structure. The node depth represents the level of the node in the tree structure.
[0178] S21102 Graph structure construction: Use the nodes in the tree structure as graph nodes, and use the connection relationships between pairs of nodes in the tree structure as the edges between pairs of graph nodes.
[0179] S21103 Set weights: Based on the similarity values calculated in the first calculation of S218, take the connection strength between each pair of nodes as the meteorological feature weight of the edge, calculate the spatial distance between the positions of each pair of nodes (for example, the Euclidean distance of the geographical coordinates between each pair of nodes), and take the reciprocal of the spatial distance as the spatial distance weight of the edge. When the spatial distance between the pair of nodes is closer, the spatial distance weight of the edge is greater, indicating a stronger relationship between the pair of nodes. Perform a weighted sum of the obtained meteorological feature weight of the edge and the spatial distance weight of the edge, and take the weighted sum result as the total weight of the edge.
[0180] S21104 Model update: Based on the graph nodes and the edges between the graph nodes, construct a graph structure. Based on the graph structure, update the connection weights between each neuron in the weather sub-model through graph convolution to obtain the weather sub-model after being updated again.
[0181] In this embodiment, in the first recognition of S31, input the historical weather data into the weather sub-model after being updated again in the model update of S2184.
[0182] In this embodiment, organize the meteorological data into a hierarchical relationship in the form of a tree structure, which helps to reflect the spatial relationship and regional climate differences between different meteorological stations. In addition, setting a dynamic detection adaptation mechanism and a node splitting and aggregation mechanism helps to enhance the sensitivity and adaptability of the weather sub-model to weather changes. Especially when dealing with extreme weather and sudden meteorological events, it improves the real-time performance and accuracy of the weather sub-model prediction. Moreover, based on the adaptive adjustment structure, it helps to optimize the prediction accuracy of the weather sub-model, improve the accuracy of local weather prediction, so that the model can not only make accurate predictions in large-scale weather changes, but also respond in a timely manner to local meteorological changes. At the same time, it helps the model to capture more accurately the geographical relationship and meteorological data relationship between different meteorological stations, improve the accuracy of the model for local weather prediction and global weather prediction, and also improve the adaptability of the model to sudden weather and the accuracy of weather prediction.
[0183] Embodiment 3: The difference from Embodiment 1 is that:
[0184] After performing the first recognition of S31 and before performing the first processing of S32, it further includes S311 correction sub-model optimization.
[0185] S311 correction sub-model optimization includes: S3111 first extraction, S3112 second extraction, S3113 calculation of change value, S3114 construction of matrix, S3115 feature screening, S3116 feature mapping, S3117 feature unification, S3118 matrix update, S3119 feature fusion, and S31110 optimization of the model, as Figure 3 shown.
[0186] S3111 First extraction: Obtain the time of the predicted weather data obtained in the S31 first recognition, denoted as the first time. The first time here is not the time when the weather sub-model outputs the predicted weather data. Historical weather data is a time-axis data. When inputting the historical weather data at a certain moment in the historical weather data into the weather sub-model, the time label of the historical weather data is also input at the same time. Therefore, the first time here actually refers to the time label of the predicted weather data output by the weather sub-model.
[0187] S3112 Second extraction: Based on the first time, obtain the real historical weather data at the first time in the historical weather data, denoted as the first marked data.
[0188] S3113 Calculate the change value: Calculate the difference between the predicted weather data and the first marked data to obtain a deviation data set, and at the same time label the weather category label for the deviation data set. The weather category label is the weather category of each historical weather data.
[0189] For example, the predicted weather data = {predicted temperature, predicted humidity, predicted air pressure, predicted precipitation, predicted wind speed, predicted wind direction, predicted light intensity, predicted cloud cover}, and the first marked data = {first temperature, first humidity, first air pressure, first precipitation, first wind speed, first wind direction, first light intensity, first cloud cover}. Then the deviation data set = {predicted temperature - first temperature, predicted humidity - first humidity, predicted air pressure - first air pressure, predicted precipitation - first precipitation, predicted wind speed - first wind speed, predicted wind direction - first wind direction, predicted light intensity - first light intensity, predicted cloud cover - first cloud cover} = {temperature deviation, humidity deviation, air pressure deviation, precipitation deviation, wind speed deviation, wind direction deviation, light intensity deviation, cloud cover deviation}.
[0190] S3114 Construct a matrix: Calculate the correlation degree of each sample pair in the deviation data set using the Pearson correlation coefficient, and construct a matrix based on the calculated correlation degree to obtain the shared matrix S. In the embodiment, the samples refer to the temperature deviation, humidity deviation, air pressure deviation, precipitation deviation, wind speed deviation, wind direction deviation, light intensity deviation, and cloud cover deviation.
[0191] Construct a shared matrix S. The rows and columns of the shared matrix S correspond to the correlation degrees of each sample pair.
[0192] 。
[0193] S3115 Feature Screening: Set a preset feature correlation threshold, and mark the samples corresponding to the sample pairs with a correlation greater than the preset feature correlation threshold as the first samples. In this embodiment, as long as the correlation of the sample pair is greater than the preset feature correlation threshold, both samples in the current sample pair are retained. For example, if the correlation between the temperature deviation and the humidity deviation is greater than the preset feature correlation threshold, then the temperature deviation and the humidity deviation are retained, and the temperature deviation and the humidity deviation are marked as the first samples.
[0194] S3116 Feature Mapping: Calculate the Euclidean distance of the first sample pairs. Based on the calculated Euclidean distance of the first sample pairs, use the Gaussian kernel function to calculate the kernel values of the first sample pairs. Based on the calculation results, combine all the kernel values to construct the kernel matrix L.
[0195] The formula of the Gaussian kernel function is:
[0196] 。
[0197] Where, represents the j-th first sample, represents the k-th first sample, represents the Euclidean distance between the j-th first sample and the k-th first sample, represents the bandwidth parameter of the Gaussian kernel function.
[0198] The element
[0199] in the kernel matrix L represents the kernel value between the j-th first sample and the k-th first sample.
[0200] S3117 Feature Unification: Based on the dimension of the shared matrix S, adjust the dimension of the kernel matrix L so that the dimension of the adjusted kernel matrix L is consistent with the dimension of the shared matrix S, and use the adjusted kernel matrix L as the new kernel matrix 。
[0201] Judge whether the dimension of the shared matrix S is consistent with the dimension of the kernel matrix L. If the dimension of the shared matrix S is consistent with the dimension of the kernel matrix L, then there is no need to adjust the dimension of the kernel matrix L; if the dimension of the shared matrix S is inconsistent with the dimension of the kernel matrix L, then further judge whether the dimension of the kernel matrix L is greater than the dimension of the shared matrix S. If so, truncate the kernel matrix L to remove the redundant rows and columns so that the dimension of the kernel matrix L is consistent with the dimension of the shared matrix S; if not, adjust the dimension of the kernel matrix L by interpolation so that the dimension of the adjusted kernel matrix L is consistent with the dimension of the shared matrix S.
[0202] S3118 Matrix Update: Perform matrix multiplication operation on the new kernel matrix and the shared matrix S, and use the processing result as the new shared matrix 。
[0203] ;
[0204] 。
[0205] Shared matrix The calculation formula is as follows:
[0206] 。
[0207] S3119 Feature fusion: Multiply the shared matrix with the predicted weather data, and record the operation result as the shared feature Z.
[0208] For example: The obtained predicted weather data is {12.3°C, 78%, 1012.5 Pa, 0 mm, 2.1 m / s, 45 o , 350 lux, 20%}. In this embodiment, the numerical setting for the wind direction is that the north is 0 degrees and increases in the clockwise direction. For the convenience of calculation, the predicted weather data is converted into the form of a matrix, denoted as the predicted weather matrix V.
[0209] 。
[0210] The calculation formula for the shared feature Z is as follows:
[0211] 。
[0212] S31110 Optimize the model: Define the mean square error as the loss function, use the task-specific branch to process the shared feature, and minimize the loss function through the gradient descent method to iteratively optimize the correction sub-model until the loss function reaches the minimum value or the preset number of iterations, complete the model optimization, and use the optimized correction sub-model as the new correction sub-model.
[0213] In this embodiment, in the S32 first process, the predicted weather data is input into the new correction sub-model in the S31110 optimize the model.
[0214] In this embodiment, based on the multi-task learning framework, the correlation between each pair of samples in the deviation dataset is calculated to construct a shared matrix, which helps the model learn the error correlation relationship between the features of the predicted data under different weather categories based on the mutual relationship between multiple features in the deviation dataset. In addition, multiplying the correlation between the features in the deviation dataset by the predicted weather data to construct shared features helps the model learn the error pattern in the deviation dataset and the feature pattern in the predicted data, enhancing the relationship pattern between the features in the error data of the predicted data under different weather categories. At the same time, optimizing the model based on the constructed shared features helps improve the flexibility and adaptability of the model to adjust the predicted weather data under different weather scenarios, improves the interpretability of the model, and moreover, improves the accuracy of the predicted weather data based on the output correction factor.
[0215] Embodiment 4: The difference from Embodiment 1 is that:
[0216] After performing S2 to construct the model and before performing S3 for model training, it further includes S22 historical data optimization.
[0217] S22 historical data optimization includes: S221 first definition, S222 constructing a function, S223 first setting, S224 second setting, S225 third setting, S226 particle optimization, and S227 first optimization, as Figure 4 shown.
[0218] S221 first definition: Based on the historical data, define the optimization objective, and the optimization objective includes minimizing redundancy, minimizing noise, and maximizing information content.
[0219] S222 constructing a function: Based on the optimization objective, construct the objective function.
[0220] The objective function is: .
[0221] Where represents the objective function, represents the historical data, represents the optimization objective of minimizing redundancy, represents the optimization objective of minimizing noise, represents the optimization objective of maximizing information content, , and represent the weights of each optimization objective, .
[0222] S223 First setting: Define a particle as a set of data in historical data. The particle includes historical weather data, historical wind-solar and load data, historical energy storage data, and historical energy storage strategies. Use the particle swarm optimization algorithm to solve the objective function, calculate the velocity of the particle, and update the particle position according to the particle velocity.
[0223] The velocity update formula of the particle is:
[0224] 。
[0225] The particle position update formula is:
[0226] 。
[0227] Among them, represents the velocity of the particle at moment, represents the inertial weight of the particle, represents the personal learning factor, represents the random number generated when the personal optimal position changes, represents the particle personal optimal position, represents the particle at current position at moment, represents the social learning factor, represents the random number generated when the global optimal position changes, represents the global optimal position.
[0228] S224 Second setting: Calculate the difference between the fitness of the particle after update and the fitness of the particle before update, and record the calculated difference as the first difference. If the first difference is greater than 0, it indicates that the particle accepts the updated position. If the first difference is not greater than 0, use the probability acceptance mechanism of the simulated annealing algorithm to calculate the probability that the particle accepts the updated position. If the calculated probability is greater than the random number generated after the particle update, it indicates that the particle accepts the updated position, and adjust the particle position to the updated position. If the calculated probability is not greater than the random number generated after the particle update, adjust the particle position to the position before update.
[0229] The calculation formula of the first difference is:
[0230] 。
[0231] Among them, represents the fitness of the particle at moment, represents the particle at Fitness at a moment.
[0232] The formula for the probability acceptance mechanism to adjust the particle position is:
[0233] .
[0234] Among them, represents the probability of accepting the new particle position, represents the temperature parameter.
[0235] S225 Third setting: Obtain the random number in the interval [0, 1] generated when the particle position is updated again, and determine whether the random number is less than the preset probability threshold.
[0236] If so, perform local search near the current position of the particle using the krill herd algorithm to explore the possible best position of the particle. Then, calculate the relative position relationship of all particles through global search, select the particle with the best fitness. After local search and global search are completed, perform the third adjustment on the current position of the particle and execute S226 particle optimization.
[0237] If not, execute S227 first optimization.
[0238] S226 Particle optimization: Calculate the fitness before and after the particle position adjustment respectively, and determine whether the fitness after the particle position adjustment is greater than the fitness before the particle adjustment.
[0239] If so, take the particle position after the third adjustment as the new particle position, and use the new particle position to update the particle position after the second adjustment.
[0240] If not, restore the position of the particle to the particle position after the second adjustment.
[0241] S227 First optimization: Obtain the historical data corresponding to the particle position after the second adjustment, denoted as the first historical data, and update the first historical data to the historical data.
[0242] In this embodiment, in the S3 model training, the updated historical data is input into the energy storage strategy optimization model.
[0243] Embodiment 5: The difference from Embodiment 1 is that:
[0244] The energy storage strategy optimization model further includes a charge and discharge load prediction sub-model.
[0245] S11 Second collection: Collect real-time electric vehicle data; the real-time electric vehicle data includes real-time charging pile charging data, real-time electricity price, and real-time holiday data.
[0246] The real-time charging data of the charging pile includes the real-time charging pile status, the real-time charging power, and the corresponding real-time charging duration.
[0247] The holiday data includes working days and non-working days. Non-working days include legal holidays (including Spring Festival, Tomb-Sweeping Day, Labor Day, Dragon Boat Festival, Mid-Autumn Festival, National Day), floating holidays (including New Year's Day, Children's Day), Saturdays and Sundays. Working days generally refer to Monday to Friday. In some cases, there are overlaps between holidays, between holidays and Saturdays and Sundays, and between holidays and working days. At this time, the dates that overlap with holidays are all marked as the corresponding holidays. For example, the Dragon Boat Festival includes Friday, Saturday, and Sunday, which are collectively called the Dragon Boat Festival. The real-time holiday data is imported through the electronic calendar system.
[0248] S12 Third collection: Collect input data, where the input data includes historical charging data of the charging pile marked with holiday labels or non-holiday labels, historical electricity prices, and first data.
[0249] The historical charging data of the charging pile includes the historical charging pile status, the historical charging power, and the corresponding historical charging duration.
[0250] S35 Charge and discharge prediction: Input the input data into the charge and discharge load prediction sub-model to obtain the third data.
[0251] S36 First splicing: Take the sum of the third data and the second data as the new second data, and then execute S34 Third processing.
[0252] In S4 strategy optimization, the real-time electric vehicle data, real-time weather data, real-time energy storage data, real-time weather data, and real-time energy storage data are used as the input of the trained energy storage strategy optimization model to obtain the real-time energy storage strategy.
[0253] In this embodiment, a charge and discharge load prediction sub-model is constructed. Considering the changes in the charging behavior of electric vehicles under extreme weather and the impact of electricity price changes on the grid load, the grid load is optimized, which helps the model to comprehensively consider the impact of the charging load of electric vehicles, energy price fluctuations, and the unique demand fluctuations during holidays on the grid load, improving the accuracy and rationality of the energy storage decision output by the model. At the same time, it helps the model to flexibly adjust the energy storage strategy in different scenarios, improving the overall operation efficiency of the energy storage system and further enhancing the stability of the power grid.
[0254] The above are all the preferred embodiments of this application. The protection scope of this application is not limited by this. Therefore, all equivalent changes made according to the structure, shape, and principle of this application should be covered within the protection scope of this application.
Claims
1. A distribution network energy storage strategy recommendation method based on artificial intelligence, characterized in that: include: Data collection: collect real-time weather data, real-time energy storage data and historical data; historical data includes historical weather data, historical energy storage data and historical energy storage strategies; Model building: Building an energy storage strategy optimization model, which includes a weather sub-model, a correction sub-model, a wind and solar power and load sub-model, and an energy storage sub-model; Model training: including first recognition, first processing, second processing and third processing; First identification: input historical weather data into the weather sub-model to obtain predicted weather data, and determine whether the predicted weather data is extreme weather; If yes, then execute the first processing step; If not, the predicted weather data is recorded as the first data, and the second processing step is performed; First processing: inputting the forecast weather data into the correction sub-model to obtain a correction factor, correcting the forecast weather data based on the correction factor to obtain corrected forecast weather data, updating the corrected forecast weather data to the first data, and executing the second processing step; Second processing: inputting the first data into the wind, solar and load sub-model and outputting the second data; The third process: using the first data, the second data, the historical energy storage data and the historical energy storage strategy to train the energy storage sub-model, and obtain a trained energy storage strategy optimization model; Strategy optimization: Real-time weather data and real-time energy storage data are used as inputs to the trained energy storage strategy optimization model to obtain the real-time energy storage strategy.
2. The method for recommending distribution network energy storage strategies based on artificial intelligence according to claim 1, characterized in that: After executing the step of building the model and before executing the step of model training, it also includes: Set Window: Define preset time window; First collection: collect meteorological data from each meteorological station within a preset time window; The first setting is: each weather station is regarded as the i-th level node of the tree structure, and the node characteristics of the i-th level node include the meteorological data of each weather station; Node aggregation: Use the clustering algorithm to perform preliminary aggregation on the node features of the i-th layer nodes to obtain preliminary aggregation results, and determine the i+1-th layer nodes based on the preliminary aggregation results; Node judgment: judge whether the number of nodes in the i+1th layer is 1: If yes, the tree structure is output, and then the first calculation step is performed; If not, the i+1th layer node is used as the new i-th layer node and the node aggregation step is performed; First calculation: calculate the similarity of meteorological data between the nodes in the i-th layer and the nodes in the i+1-th layer, and use the calculated similarity as the connection strength between the nodes in the i-th layer and the nodes in the i+1-th layer; First construction: obtain the neurons corresponding to the nodes at each layer of the tree structure in the weather sub-model, update the connection weights between the neurons according to the connection strength between the nodes, and obtain the updated weather sub-model; In the first identification step, historical weather data is input into the updated weather sub-model.
3. The method for recommending distribution network energy storage strategies based on artificial intelligence according to claim 2, characterized in that: After the step of executing node judgment and before the step of executing the first calculation, the method further includes: First judgment: Calculate the change between the average value of the meteorological data of each node in the current preset time window and the average value of the meteorological data in the previous preset time window, and judge whether the change exceeds the preset change threshold: If yes, then execute the second judgment step; If not, no action will be taken; Second judgment: Calculate the similarity of meteorological data between the i-th layer node and the i+1-th layer node in the current preset time window, record it as the first similarity, and judge whether the first similarity is lower than the preset similarity threshold: If yes, then perform structural splitting on the i-th layer nodes, obtain the splitting results, update the splitting results to the i-th layer nodes, and perform the node aggregation step; If not, no action will be taken.
4. The method for recommending distribution network energy storage strategies based on artificial intelligence according to claim 3 is characterized in that: After executing the first construction step and before executing the model training step, the method further includes: Feature addition: Get all node depths in the tree structure. Node features also include node depths. Graph structure construction: The nodes in the tree structure are used as graph nodes, and the connection relationships between each pair of nodes in the tree structure are used as edges between pairs of graph nodes; Set weights: Use the connection strength between each node pair as the meteorological feature weight of the edge, calculate the spatial distance between the positions of each node pair, and use the inverse of the spatial distance as the spatial distance weight of the edge; Model update: Based on the edges between graph nodes and graph node pairs, a graph structure is constructed. Based on the graph structure, the connection weights between neurons in the weather sub-model are updated to obtain an updated weather sub-model. In the first identification step, historical weather data is input into the updated weather sub-model.
5. The method for recommending distribution network energy storage strategies based on artificial intelligence according to claim 1, characterized in that: After performing the first identification step and before performing the first processing step, the method further includes: First extraction: the time when the forecast weather data is obtained, recorded as the first time; Second extraction: obtaining historical weather data at the first time, recorded as the first labeled data; Calculate the change value: calculate the difference between the predicted weather data and the first labeled data to obtain the deviation data set; Constructing a matrix: Calculate the correlation between each sample pair in the deviation data set, construct a matrix based on the calculated correlation, and obtain a shared matrix; Feature fusion: Multiply the shared matrix with the predicted weather data, and record the result as the shared feature; Optimize the model: define the loss function, use task-specific branches to process the shared features, iteratively optimize the corrected sub-model by minimizing the loss function, and use the optimized corrected sub-model as the new corrected sub-model.
6. The method for recommending distribution network energy storage strategies based on artificial intelligence according to claim 5 is characterized in that: After executing the step of constructing the matrix and before executing the step of feature fusion, it also includes: Feature screening: The sample corresponding to the sample pair whose correlation is greater than the preset feature correlation threshold is recorded as the first sample; Feature mapping: using the kernel function to calculate the kernel value of the first sample pair, and constructing the kernel matrix based on the calculation result; Feature unification: Based on the dimension of the shared matrix, adjust the dimension of the kernel matrix and use the adjusted kernel matrix as the new kernel matrix; Matrix update: Perform product operation on the new kernel matrix and the shared matrix, and use the result as the new shared matrix.
7. The method for recommending distribution network energy storage strategies based on artificial intelligence according to claim 1, characterized in that: After executing the step of building the model and before executing the step of model training, it also includes: First definition: Based on historical data, define optimization objectives, which include minimizing redundancy, minimizing noise, and maximizing information content; Construct function: construct the objective function based on the optimization goal; First setting: define particles as a group of data in historical data, use particle swarm optimization algorithm to solve the objective function, calculate the particle speed, and update the particle position according to the particle speed; The second setting: calculate the difference between the fitness of the particle after the update and the fitness of the particle before the update, record the calculated difference as the first difference, and adjust the particle position again based on the first difference using the probability acceptance mechanism of the simulated annealing algorithm; First optimization: obtaining the historical data corresponding to the particle position after re-adjustment, recording it as the first historical data, and updating the first historical data as the historical data.
8. The method for recommending distribution network energy storage strategies based on artificial intelligence according to claim 7, characterized in that: After performing the second setting step and before performing the first optimization step, the method further includes: The third setting: Get the random number generated when the particle position is updated again, and determine whether the random number is less than the preset probability threshold: If yes, the krill swarm algorithm is used to adjust the particle position for the third time, and the particle optimization steps are performed: If not, then execute the first optimization step; Particle optimization: Calculate the fitness before and after the particle position is adjusted, and determine whether the fitness after the particle position is adjusted is greater than the fitness before the particle is adjusted: If yes, the particle position adjusted for the third time is used as the new particle position, and the new particle position is used to update the particle position adjusted again; If not, the position of the particle is restored to the re-adjusted particle position.
9. The method for recommending distribution network energy storage strategies based on artificial intelligence according to claim 1, characterized in that: The energy storage strategy optimization model also includes a charge and discharge load prediction sub-model; the method also includes: Second collection: collect real-time electric vehicle data; real-time electric vehicle data includes real-time charging pile charging data, real-time electricity prices and real-time holiday data; In the strategy optimization step, real-time electric vehicle data, real-time weather data, and real-time energy storage data are input into the trained energy storage strategy optimization model.
10. The method for recommending distribution network energy storage strategy based on artificial intelligence according to claim 9, characterized in that: The method further comprises: Third collection: collecting input data, the input data includes historical charging pile charging data marked with holiday labels or non-holiday labels, historical electricity prices and the first data; Charge and discharge prediction: Input data into the charge and discharge load prediction sub-model to obtain the third data; First concatenation: taking the sum of the third data and the second data as new second data.
Citation Information
Patent Citations
Distribution network energy storage system multi-application scene optimization method and system and readable storage medium
CN118281924A
Shared energy storage system-oriented five-level coordinated optimization scheduling control method and system
CN113673809A
Centralized control method and system for multi-source energy storage system
CN118572702A