Micro-grid reactive power optimization method and system based on deep learning
By adopting a deep learning-based method in microgrid reactive power optimization, using a comparative learning mechanism of active and negative reactive power configuration supervision data, optimizing model parameters, the problem of complex calculations and difficult to adapt to dynamic changes in the existing technology is solved, and a more efficient reactive power optimization effect is achieved.
Patent Information
- Application Number
- CN202510266962.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-03-07
AI Technical Summary
The prior art has complex calculations in microgrid reactive optimization, sensitive to initial parameters and difficult to adapt to dynamic changes, resulting in unsatisfactory optimization results.
Using a deep learning-based method, the model parameters are optimized to improve the reactive power optimization performance by obtaining the candidate microgrid reactive power optimization model and the training data sequence containing multiple sample learning data.
It significantly improves the performance of the microgrid reactive optimization model, avoids model overfitting, enhances generalization ability, and improves the accuracy and efficiency of reactive optimization.
Smart Images

Figure CN119787386A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and in particular to a microgrid reactive power optimization method and system based on deep learning. Background Art
[0002] With the transformation of energy structure and the rapid development of distributed energy technology, microgrids, as small power systems integrating renewable energy, energy storage systems and loads, have shown great potential in improving energy efficiency, enhancing grid flexibility and reliability. However, the reactive power optimization problem of microgrids has always been one of the key factors restricting their efficient operation. Traditional reactive power optimization methods mostly rely on mathematical optimization algorithms, such as particle swarm optimization and genetic algorithms. Although these methods can achieve the optimal configuration of reactive power compensation equipment to a certain extent, they often have limitations such as high computational complexity, sensitivity to initial parameters, and difficulty in adapting to dynamic changes in microgrids. Summary of the invention
[0003] In view of the above-mentioned problems, in combination with the first aspect of the present invention, an embodiment of the present invention provides a microgrid reactive power optimization method based on deep learning, the method comprising: Acquire a candidate microgrid reactive power optimization model and a training data sequence comprising a plurality of sample learning data; the sample learning data comprises sample microgrid operation data, passive reactive power configuration supervision data of the sample microgrid operation data, and active reactive power configuration supervision data of the sample microgrid operation data; For each sample learning data in the training data sequence, when model parameter learning is performed according to the sample learning data in a target training phase, determining a target training reinforcement benefit of the positive reactive configuration supervision data in the sample learning data compared to the negative reactive configuration supervision data; Determine the first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate active reactive configuration supervision data, and the second cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate passive reactive configuration supervision data; the updated microgrid reactive optimization model corresponding to the sample learning data is generated by model parameter learning based on the previous sample training group of the sample training group corresponding to the sample learning data; in the process of the first model parameter learning, the deep learning target of the first sample training group is the candidate microgrid reactive optimization model; The first cycle fit goodness of fit value and the second cycle fit goodness of fit value are fused and calculated to determine the cycle training reinforcement benefit of the sample learning data, and when it is determined that the training error of the target training stage no longer continues to decrease based on the cycle training reinforcement benefit and the target training reinforcement benefit corresponding to each of the sample learning data, the model parameter learning is terminated to generate the target microgrid reactive optimization model corresponding to the candidate microgrid reactive optimization model; the fusion coefficient of the first cycle fit goodness of fit value is less than the fusion coefficient of the second cycle fit goodness of fit value; The target microgrid operation data to be analyzed is obtained, the target microgrid operation data is loaded into the target microgrid reactive power optimization model, and reactive power optimization configuration decision data of the target microgrid operation data is generated.
[0004] In a possible implementation of the first aspect, determining a first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate active reactive configuration supervision data includes: Acquire multiple candidate active reactive configuration supervision data of the sample learning data; For each of the candidate active reactive configuration supervision data, determining a first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate the candidate active reactive configuration supervision data; The first cycle goodness of fit values corresponding to each of the candidate active reactive configuration supervision data are averaged to generate the first cycle goodness of fit value of the active reactive configuration supervision data generated by the updated microgrid reactive optimization model corresponding to the sample learning data.
[0005] In a possible implementation of the first aspect, the method further includes: Determine the positive supervision training reinforcement benefit of the updated microgrid reactive optimization model corresponding to the sample learning data compared to the candidate microgrid reactive optimization model, and the negative supervision training reinforcement benefit of the updated microgrid reactive optimization model corresponding to the sample learning data compared to the candidate microgrid reactive optimization model; Determining the model training comparison loss corresponding to the sample learning data according to the positive supervision training reinforcement benefit and the negative supervision training reinforcement benefit; When it is determined that the training error of the target training stage no longer continues to decrease according to the cyclic training reinforcement benefit and the target training reinforcement benefit respectively corresponding to each of the sample learning data, the model parameter learning is terminated, and the target microgrid reactive power optimization model corresponding to the candidate microgrid reactive power optimization model is generated, including: When it is determined that the training error of the target training stage no longer continues to decrease based on the cyclic training enhancement benefit, the target training enhancement benefit and the model training comparison loss corresponding to each of the sample learning data, the model parameter learning is terminated and the target microgrid reactive optimization model corresponding to the candidate microgrid reactive optimization model is generated.
[0006] In a possible implementation of the first aspect, determining a negative supervision training reinforcement benefit of the updated microgrid reactive power optimization model corresponding to the sample learning data compared to the candidate microgrid reactive power optimization model includes: Determine the training enhancement benefits of the passive reactive configuration supervision data corresponding to each of the candidate microgrid reactive optimization models in the sample training group corresponding to the sample learning data and under each of the sample learning data; The mean value of each of the passive reactive configuration supervision data training enhancement benefits is calculated to determine the passive supervision training enhancement benefit of the updated microgrid reactive optimization model corresponding to the sample learning data compared with the candidate microgrid reactive optimization model.
[0007] In a possible implementation of the first aspect, the method further includes: For each of the sample learning data, determining a reference training error corresponding to the sample learning data according to the cyclic training reinforcement benefit and the target training reinforcement benefit of the sample learning data; Determine a first fusion coefficient of a reference training error under the sample learning data and a second fusion coefficient of a model training comparison loss under the sample learning data; According to the first fusion coefficient and the second fusion coefficient, a reference training error of the sample learning data and a model training comparison loss are fused and calculated to determine a training error corresponding to the sample learning data; When the calculation results of the training errors corresponding to the sample learning data no longer continue to decrease, it is determined that the training error of the target training stage no longer continues to decrease.
[0008] In a possible implementation manner of the first aspect, determining a first fusion coefficient of a reference training error under the sample learning data includes: Determine the update training reinforcement benefit of the active reactive configuration supervision data under the sample learning data compared with the passive reactive configuration supervision data after completing the model parameter learning; Determining a first fusion coefficient of the reference training error under the sample learning data according to a first difference between the updated training reinforcement benefit and the target training reinforcement benefit; the first fusion coefficient and the first difference are in a negative correlation relationship; The step of determining a first fusion coefficient of a reference training error under the sample learning data according to a first difference between the updated training enhancement benefit and the target training enhancement benefit includes: Determine first differences corresponding to each sample learning data according to the updated training reinforcement benefits and the target training reinforcement benefits corresponding to each sample learning data in the sample training group corresponding to the sample learning data; Calculate the mean of the first difference values respectively corresponding to the sample learning data to determine a first threshold value matching the sample learning data; When the first difference corresponding to the sample learning data is not greater than the first threshold value, a first fusion coefficient of the reference training error under the sample learning data is determined according to the negative correlation relationship.
[0009] In a possible implementation of the first aspect, determining a second fusion coefficient of the model training comparison loss under the sample learning data includes: Determine the training enhancement benefit of the passive reactive configuration supervision data of the updated microgrid reactive optimization model corresponding to the sample learning data compared to the candidate microgrid reactive optimization model; Determine a second fusion coefficient of the model training comparison loss under the sample learning data according to a second difference between the active supervision training enhancement benefit and the passive reactive configuration supervision data training enhancement benefit; the second fusion coefficient and the second difference are negatively correlated; Wherein, determining the second fusion coefficient of the model training comparison loss under the sample learning data according to the second difference between the active supervision training enhancement benefit and the passive reactive configuration supervision data training enhancement benefit includes: Determine the second difference value corresponding to each sample learning data according to the positive supervision training reinforcement benefit and the negative reactive configuration supervision data training reinforcement benefit corresponding to each sample learning data in the sample training group corresponding to the sample learning data; Calculating the mean of the second difference values respectively corresponding to the sample learning data to determine a second threshold value matching the sample learning data; When the second difference corresponding to the sample learning data is not greater than the second threshold value, a second fusion coefficient of the model training comparison loss under the sample learning data is determined according to the negative correlation relationship.
[0010] In a possible implementation of the first aspect, a process of obtaining a training data sequence including a plurality of sample learning data includes: Obtain microgrid reactive power optimization requirements and multiple sample microgrid operation data; For each of the sample microgrid operation data, determining demand index data associated with the microgrid reactive power optimization demand; the demand index data includes the sample microgrid operation data; Loading the demand index data into a pre-trained deep learning network, and using the generation of the deep learning network as passive reactive configuration supervision data of the sample microgrid operation data; Generate active reactive configuration supervision data for the sample microgrid operation data according to the expert optimization instruction generated for the passive reactive configuration supervision data for the sample microgrid operation data; The sample learning data including the sample microgrid operation data, the active reactive configuration supervision data of the sample microgrid operation data and the passive reactive configuration supervision data of the sample microgrid operation data are configured to generate a training data sequence including a plurality of sample learning data.
[0011] In a possible implementation manner of the first aspect, the process of obtaining a candidate microgrid reactive power optimization model includes: Get the initialized neural network model; According to the training data sequence, a basic training data sequence including a plurality of basic sample learning data is configured; each of the basic sample learning data includes sample microgrid operation data, and active reactive configuration supervision data of the sample microgrid operation data or passive reactive configuration supervision data of the sample microgrid operation data; The neural network model is iteratively updated according to the basic training data sequence to generate a candidate microgrid reactive power optimization model.
[0012] On the other hand, an embodiment of the present invention also provides a microgrid reactive power optimization system based on deep learning, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium is connected to the processor, the machine-readable storage medium is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the machine-readable storage medium to implement the above method.
[0013] Based on the above aspects, the embodiment of the present application significantly improves the performance of the model in the microgrid reactive optimization task by introducing a comparative learning mechanism of active reactive configuration supervision data and passive reactive configuration supervision data. During the training process, the method not only considers the direct training benefit of each sample learning data, but also introduces the evaluation of the cyclic training reinforcement benefit. By comparing the prediction ability of the model between different training groups, the overfitting of the model is effectively avoided, and the enhancement of the generalization ability of the model is promoted. In particular, by setting different fusion coefficients of the first cycle fit goodness of fit value and the second cycle fit goodness of fit value, the present invention further optimizes the learning weights of the model for active and passive reactive configurations, so that the generated target microgrid reactive optimization model can more accurately reflect the actual needs of microgrid operation, and improve the accuracy and efficiency of reactive optimization. Finally, the method can quickly generate efficient reactive optimization configuration decisions for any given target microgrid operation data, thereby contributing to the stable operation and energy efficiency improvement of the microgrid. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a schematic diagram of the execution flow of the microgrid reactive power optimization method based on deep learning provided in an embodiment of the present invention.
[0015] Figure 2 It is a schematic diagram of the hardware architecture of a microgrid reactive power optimization system based on deep learning provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0016] The present invention will be described in detail below with reference to the accompanying drawings. Figure 1 This is a flow chart of a microgrid reactive power optimization method based on deep learning provided by an embodiment of the present invention. The microgrid reactive power optimization method based on deep learning is introduced in detail below.
[0017] Step S110, obtaining a candidate microgrid reactive power optimization model and a training data sequence including a plurality of sample learning data. The sample learning data includes sample microgrid operation data, passive reactive power configuration supervision data of the sample microgrid operation data, and active reactive power configuration supervision data of the sample microgrid operation data.
[0018] In this embodiment, in a microgrid system, it is assumed that there is a large industrial park microgrid. This microgrid contains multiple distributed power sources (such as solar photovoltaic panels, small wind turbines), different types of loads (industrial power equipment, office area power equipment, etc.) and related power transmission and conversion equipment (transformers, switch cabinets, etc.).
[0019] For obtaining a candidate microgrid reactive power optimization model, an initialized neural network model is selected from an existing neural network model library. This neural network model may be a multi-layer perceptron (MLP) structure, which has an input layer, several hidden layers and an output layer. The number of nodes in the input layer may be determined according to the number of features of the microgrid operation data. For example, the voltage, current, power factor, active power and reactive power demand of the load of the microgrid are all used as inputs of the input layer.
[0020] Next, we obtain the training data sequence. We collected sample microgrid operation data for multiple different time periods. For example, from 9 to 10 a.m. on a certain day, when the solar photovoltaic panels are generating electricity under medium light intensity, industrial power equipment is in normal production, and some power equipment in the office area is turned on, the corresponding microgrid operation data includes the real-time voltage of the entire microgrid, which is 380V, the current is 50A, the power factor is 0.85, the output power of each distributed power source, and the power demand of the load.
[0021] For the determination of passive reactive configuration supervision data, these sample microgrid operation data are loaded into the pre-trained deep learning network as demand indicator data. This deep learning network may have been obtained through preliminary training for the microgrid reactive configuration problem. Taking this sample from 9 to 10 a.m. as an example, the deep learning network outputs a reactive configuration plan based on the input microgrid operation data and the pre-learned rules and algorithms. For example, the reactive compensation amount set for a reactive compensation device is Q1. This reactive configuration plan is used as passive reactive configuration supervision data.
[0022] Then generate active reactive configuration supervision data. According to the expert optimization instructions generated for the above passive reactive configuration supervision data. Based on their own experience and a deeper understanding of the microgrid system, experts optimize the passive reactive configuration supervision data taking into account the goals of reducing grid losses and improving power quality. For example, experts believe that under the current operating state, the reactive compensation amount can be adjusted to Q2 (Q2 is different from Q1 and is more in line with the optimization goal) by adjusting the parameters of a reactive compensation device. The reactive configuration scheme corresponding to Q2 is used as active reactive configuration supervision data.
[0023] In this way, for each sample microgrid operation data, corresponding passive reactive configuration supervision data and active reactive configuration supervision data are generated, thereby configuring sample learning data. Multiple such sample learning data constitute a training data sequence.
[0024] Step S120, for each sample learning data in the training data sequence, when model parameter learning is performed based on the sample learning data in the target training phase, determine the target training enhancement benefit of the positive reactive configuration supervision data in the sample learning data compared with the negative reactive configuration supervision data.
[0025] Let's continue to use the industrial park microgrid as an example. In the target training phase, each sample learning data in the training data sequence is used for model parameter learning. For a certain sample learning data, for example, the sample from 9 to 10 am mentioned earlier.
[0026] First, the sample microgrid operation data is input into the model currently being trained (in the early stage of training, it may be a candidate microgrid reactive optimization model or an updated model after a certain number of iterations). The model predicts the results of active reactive configuration and passive reactive configuration respectively based on the input operation data. Assume that the reactive compensation amount predicted by the model based on the input features corresponding to the passive reactive configuration supervision data is Q1', and the reactive compensation amount predicted by the input features corresponding to the active reactive configuration supervision data is Q2'.
[0027] The determination of the target training reinforcement benefit can be considered from multiple aspects. For example, it can be measured from the accuracy of reactive compensation and the contribution to the overall performance improvement of the microgrid. If we look at it from the perspective of reactive compensation accuracy, we can define a measurement indicator, such as the error rate. Assume that the error rate of the passive reactive configuration supervision data is E1 = |Q1 - Q1'| / Q1, and the error rate of the active reactive configuration supervision data is E2 = |Q2 - Q2'| / Q2. Then the target training reinforcement benefit of the active reactive configuration supervision data in terms of reactive compensation accuracy compared to the passive reactive configuration supervision data can be expressed as ΔE = E1 - E2. If ΔE is greater than 0, it means that the active reactive configuration supervision data has a better effect on reactive compensation accuracy than the passive reactive configuration supervision data under this sample learning data. This ΔE is a manifestation of the target training reinforcement benefit.
[0028] From the perspective of improving the overall performance of the microgrid, the impact of reactive power compensation on voltage stability, grid loss, etc. can be considered. Assume that under the passive reactive power configuration, the voltage fluctuation range of the microgrid is ΔV1, and under the active reactive power configuration, the voltage fluctuation range is ΔV2. If ΔV1 is greater than ΔV2, it means that the active reactive power configuration has a better improvement effect on voltage stability. The benefits of reactive power compensation accuracy and the improvement of the overall performance of the microgrid can be combined according to certain weights to obtain the target training reinforcement benefit of the active reactive power configuration supervision data compared to the passive reactive power configuration supervision data under this sample learning data.
[0029] Step S130, determining the first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate active reactive configuration supervision data, and the second cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate passive reactive configuration supervision data. The updated microgrid reactive optimization model corresponding to the sample learning data is generated by model parameter learning based on the previous sample training group of the sample training group corresponding to the sample learning data. In the process of the first model parameter learning, the deep learning target of the first sample training group is the candidate microgrid reactive optimization model.
[0030] Still taking the industrial park microgrid as an example, suppose the training data sequence is divided into multiple sample training groups. For a sample training group where a certain sample learning data is located, for example, the nth sample training group.
[0031] First, determine the goodness of fit value of the first cycle. Obtain multiple candidate active reactive configuration supervision data for this sample learning data. These candidate active reactive configuration supervision data may be generated by making some minor perturbations to the active reactive configuration supervision data or based on different algorithms. For example, for the active reactive configuration supervision data Q2 in the sample from 9 to 10 a.m. mentioned earlier, the parameters of the reactive compensation device can be fine-tuned to obtain candidate active reactive configuration supervision data such as Q21, Q22, and Q23.
[0032] For each candidate active reactive configuration supervision data, the sample microgrid operation data is input into the updated microgrid reactive optimization model generated by model parameter learning based on the n-1th sample training group (in the first sample training group, the deep learning target is the candidate microgrid reactive optimization model). Assuming that for the candidate active reactive configuration supervision data Q21, the predicted reactive compensation amount output by the model is Q21', then the first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to this sample learning data to generate Q21 can be calculated based on the difference between the predicted value and the actual value. For example, the mean square error (MSE) formula can be used, MSE = (Q21 - Q21')². Similarly, for candidate active reactive configuration supervision data such as Q22 and Q23, the corresponding first cycle goodness of fit values are also calculated. Finally, the mean of these first cycle goodness of fit values is calculated to obtain the first cycle goodness of fit value of the updated microgrid reactive optimization model to generate active reactive configuration supervision data corresponding to this sample learning data.
[0033] The process is similar for determining the goodness of fit value of the second cycle. Similar operations are performed on the passive reactive configuration supervision data. Assuming that the passive reactive configuration supervision data is Q1, multiple candidate passive reactive configuration supervision data Q11, Q12, Q13, etc. (generated by similar perturbations or different algorithms) can be obtained. The sample microgrid operation data is input into the updated microgrid reactive optimization model, and the goodness of fit value corresponding to each candidate passive reactive configuration supervision data is calculated (also using MSE and other methods), and finally the mean is calculated to obtain the second cycle goodness of fit value of the passive reactive configuration supervision data generated by the updated microgrid reactive optimization model corresponding to this sample learning data.
[0034] Step S140, performing a fusion calculation on the first cycle fit goodness of fit value and the second cycle fit goodness of fit value, determining the cycle training enhancement benefit of the sample learning data, and when it is determined that the training error of the target training stage no longer continues to decrease based on the cycle training enhancement benefit and the target training enhancement benefit corresponding to each of the sample learning data, terminating the model parameter learning, and generating a target microgrid reactive optimization model corresponding to the candidate microgrid reactive optimization model. The fusion coefficient of the first cycle fit goodness of fit value is less than the fusion coefficient of the second cycle fit goodness of fit value.
[0035] In the scenario of industrial park microgrid, continue with the previous example. Assume that for a certain sample learning data, the first cycle goodness of fit value F1 and the second cycle goodness of fit value F2 have been calculated. Since the fusion coefficient of the first cycle goodness of fit value is smaller than the fusion coefficient of the second cycle goodness of fit value, assume that the fusion coefficient of the first cycle goodness of fit value is α and the fusion coefficient of the second cycle goodness of fit value is β (α<β and α + β = 1).
[0036] Then the loop training reinforcement benefit of this sample learning data can be calculated by the formula: loop training reinforcement benefit = α * F1 + β * F2.
[0037] During the entire training process, such calculations are performed for each sample learning data in the training data sequence. Then, the training error is determined based on the cyclic training reinforcement benefit and the target training reinforcement benefit corresponding to each sample learning data.
[0038] For example, for each sample learning data, the calculation method of the training error can be defined as: training error = |cyclic training reinforcement benefit - target training reinforcement benefit|. As the model parameter learning proceeds, the training error corresponding to each sample learning data is continuously calculated. When it is found that the calculation results of the training errors corresponding to all sample learning data no longer continue to decrease, it means that the model has converged to a better state, and the model parameter learning is terminated at this time. Finally, the model at this time is used as the target microgrid reactive optimization model corresponding to the candidate microgrid reactive optimization model. This target microgrid reactive optimization model has high accuracy and reliability in making decisions on the reactive optimization configuration of the microgrid.
[0039] Step S150, obtaining the target microgrid operating data to be analyzed, loading the target microgrid operating data into the target microgrid reactive power optimization model, and generating reactive power optimization configuration decision data of the target microgrid operating data.
[0040] Assume that in the industrial park microgrid, the target microgrid operation data to be analyzed is obtained from 3:00 to 4:00 p.m. on a new day. At this time, the solar photovoltaic panels may have changed in light intensity due to cloud cover, and the load of industrial electrical equipment may also change. For example, the voltage becomes 375V, the current is 45A, and the power factor is 0.83. The output power of each distributed power source and the power demand of the load also change accordingly.
[0041] Load the target microgrid operation data into the previously obtained target microgrid reactive optimization model. The target microgrid reactive optimization model analyzes and processes the input target microgrid operation data based on the parameters and algorithms that have been learned internally. The model will output reactive optimization configuration decision data for the target microgrid operation data based on the current operating status of the microgrid, taking into account multiple factors such as voltage stability, grid loss, and characteristics of reactive compensation devices. For example, the model may output that the reactive compensation amount for a reactive compensation device should be adjusted to Q3, and the control parameters of other related equipment are also set accordingly, so as to achieve reactive optimization configuration of the microgrid during this time period and improve the operating efficiency and power quality of the microgrid.
[0042] Based on the above steps, the embodiment of the present application significantly improves the performance of the model in the microgrid reactive optimization task by introducing a comparative learning mechanism of active reactive configuration supervision data and passive reactive configuration supervision data. During the training process, the method not only considers the direct training benefit of each sample learning data, but also introduces the evaluation of the cyclic training reinforcement benefit. By comparing the prediction ability of the model between different training groups, the overfitting of the model is effectively avoided, and the enhancement of the generalization ability of the model is promoted. In particular, by setting different fusion coefficients of the first cycle fit goodness of fit value and the second cycle fit goodness of fit value, the present invention further optimizes the learning weights of the model for active and passive reactive configurations, so that the generated target microgrid reactive optimization model can more accurately reflect the actual needs of microgrid operation, and improve the accuracy and efficiency of reactive optimization. Finally, the method can quickly generate efficient reactive optimization configuration decisions for any given target microgrid operation data, thereby contributing to the stable operation and energy efficiency improvement of the microgrid.
[0043] In a possible implementation, step S130 includes: Step S131, obtaining multiple candidate active reactive configuration supervision data of the sample learning data.
[0044] Step S132: for each candidate active reactive configuration supervision data, determine the first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate the candidate active reactive configuration supervision data.
[0045] Step S133, calculating the mean of the first cycle goodness of fit values corresponding to each of the candidate active reactive configuration supervision data, and generating the first cycle goodness of fit value of the active reactive configuration supervision data generated by the updated microgrid reactive optimization model corresponding to the sample learning data.
[0046] In this embodiment, in the industrial park microgrid scenario, consider the situation from 9 am to 10 am in the sample learning data. In order to determine the first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate active reactive configuration supervision data, the first operation is to obtain multiple candidate active reactive configuration supervision data of the sample learning data. In this specific microgrid operation period, the original active reactive configuration supervision data is the optimized configuration data for the reactive compensation device generated based on the expert optimization instruction. In order to obtain multiple candidate active reactive configuration supervision data, a variety of methods can be used. For example, according to different reactive compensation strategy adjustment algorithms, the original active reactive configuration supervision data is adjusted. Assume that the compensation amount of the reactive compensation device in the original active reactive configuration supervision data is set to Q2, and it is adjusted to Q21 through an adjustment algorithm, and then adjusted to Q22 through another algorithm, and so on to obtain multiple different candidate active reactive configuration supervision data.
[0047] For each candidate active reactive configuration supervision data, determine the first cycle goodness of fit value of the candidate active reactive configuration supervision data generated by the updated microgrid reactive optimization model corresponding to the sample learning data. Input the sample microgrid operation data (including voltage, current, power factor, distributed power output power and load power demand data) from 9 am to 10 am into the updated microgrid reactive optimization model generated by model parameter learning based on the previous sample training group corresponding to the sample learning data. Taking the candidate active reactive configuration supervision data Q21 as an example, when the sample microgrid operation data is input into the updated microgrid reactive optimization model, the model will output a predicted reactive compensation amount Q21' according to its internal parameters and algorithm structure. At this time, the first cycle goodness of fit value can be determined based on the difference between the predicted value Q21' and the actual candidate active reactive configuration supervision data Q21. A common determination method is to use the mean square error (MSE) calculation method, that is, to calculate the value of (Q21 - Q21')² as the first cycle goodness of fit value corresponding to Q21. In the same way, for the candidate active reactive configuration supervision data Q22, etc., the sample microgrid operation data is also input into the updated microgrid reactive optimization model to obtain the corresponding prediction value, and then the mean square error is calculated with the actual candidate active reactive configuration supervision data to determine the corresponding first cycle goodness of fit value.
[0048] Finally, the first cycle goodness of fit values corresponding to each candidate active reactive configuration supervision data are averaged to generate the first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate active reactive configuration supervision data. Assume that the first cycle goodness of fit value calculated for Q21 is F21, the first cycle goodness of fit value calculated for Q22 is F22, and so on. All these first cycle goodness of fit values F21, F22, etc. are summed up and then divided by the number of candidate active reactive configuration supervision data. The result is the first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate active reactive configuration supervision data. This first cycle goodness of fit value can reflect the fitting effect of the updated microgrid reactive optimization model on the active reactive configuration supervision data, which is of great significance in the subsequent model evaluation and optimization process, and helps to accurately measure the performance of the model under different reactive configuration conditions, thereby providing a more reliable decision-making basis for microgrid reactive optimization.
[0049] In a possible implementation, the method further includes: Step A110, determining the positive supervision training reinforcement benefit of the updated microgrid reactive optimization model corresponding to the sample learning data compared to the candidate microgrid reactive optimization model, and the negative supervision training reinforcement benefit of the updated microgrid reactive optimization model corresponding to the sample learning data compared to the candidate microgrid reactive optimization model.
[0050] Step A120, determining the model training comparison loss corresponding to the sample learning data based on the positive supervision training reinforcement benefit and the negative supervision training reinforcement benefit.
[0051] Step S140 includes: when it is determined that the training error of the target training stage no longer continues to decrease based on the cyclic training enhancement benefit, the target training enhancement benefit and the model training comparison loss corresponding to each of the sample learning data, the model parameter learning is terminated, and the target microgrid reactive optimization model corresponding to the candidate microgrid reactive optimization model is generated.
[0052] In a possible implementation, step A110 includes: Step A111, determining the training enhancement benefits of the passive reactive configuration supervision data corresponding to the candidate microgrid reactive optimization model in the sample training group corresponding to the sample learning data and under each sample learning data.
[0053] Step A112, calculating the mean of the training enhancement benefits of each of the passive reactive configuration supervision data, and determining the passive supervision training enhancement benefit of the updated microgrid reactive optimization model corresponding to the sample learning data compared with the candidate microgrid reactive optimization model.
[0054] In this embodiment, first, the active supervision training reinforcement benefit is considered. For the situation from 9 to 10 am in the sample learning data, in the operation of the microgrid during this period, the sample learning data includes the sample microgrid operation data, the passive reactive configuration supervision data of the sample microgrid operation data, and the active reactive configuration supervision data. When it comes to the active supervision training reinforcement benefit of updating the microgrid reactive optimization model compared to the candidate microgrid reactive optimization model, it is necessary to measure it from multiple technical indicators. For example, consider the improvement of reactive compensation accuracy, the degree of improvement in voltage stability, and the effect of reducing grid losses.
[0055] In terms of reactive power compensation accuracy, the sample microgrid operation data from 9 am to 10 am are input into the updated microgrid reactive power optimization model and the candidate microgrid reactive power optimization model respectively. Assume that under the active reactive power configuration supervision data, the reactive power compensation prediction value output by the candidate microgrid reactive power optimization model is Q2', while the reactive power compensation prediction value output by the updated microgrid reactive power optimization model is Q2''. The active supervision training reinforcement benefit is measured by calculating the error difference between the two and the reactive power compensation amount Q2 in the actual active reactive power configuration supervision data. For example, the formula can be used: Active Supervision Training Reinforcement Benefit (Reactive Power Compensation Accuracy) = |Q2 - Q2'| - |Q2 - Q2''|. If this value is greater than 0, it means that the updated microgrid reactive power optimization model has a reinforcement benefit in terms of reactive power compensation accuracy compared with the candidate microgrid reactive power optimization model.
[0056] For the improvement of voltage stability, the change of voltage fluctuation range of microgrid under the two models is calculated according to the reactive configuration results output by the model. Assuming that the voltage fluctuation range under the candidate microgrid reactive optimization model is ΔV1, and the voltage fluctuation range under the updated microgrid reactive optimization model is ΔV2, the active supervision training reinforcement benefit (voltage stability) = ΔV1 -ΔV2. If the value is greater than 0, it means that the updated microgrid reactive optimization model has better performance in voltage stability.
[0057] As for the effect of reducing grid loss, the grid loss values under the two models are calculated based on the relationship model between reactive power configuration and grid loss. Assume that the grid loss under the candidate microgrid reactive optimization model is L1, and the grid loss under the updated microgrid reactive optimization model is L2. The active supervision training reinforcement benefit (grid loss) = L1 - L2. If it is greater than 0, it indicates that the updated microgrid reactive optimization model has a positive reinforcement benefit in reducing grid loss. Combining these benefits, through a certain weight allocation (such as determining the weight according to the actual needs of microgrid operation), the active supervision training reinforcement benefit of the updated microgrid reactive optimization model corresponding to the sample learning data compared with the candidate microgrid reactive optimization model is obtained.
[0058] Similarly, for the negative supervision training reinforcement benefit, the negative reactive configuration supervision data training reinforcement benefit corresponding to the updated microgrid reactive optimization model compared with the candidate microgrid reactive optimization model in the sample training group corresponding to the sample learning data and each sample learning data is determined. Taking multiple sample learning data in the sample training group as an example, for each sample learning data, such as the sample from 9 am to 10 am, the sample microgrid operation data is input into the updated microgrid reactive optimization model and the candidate microgrid reactive optimization model. Assume that under the negative reactive configuration supervision data, the reactive compensation prediction value output by the candidate microgrid reactive optimization model is Q1', and the reactive compensation prediction value output by the updated microgrid reactive optimization model is Q1''. Calculate the negative reactive configuration supervision data training reinforcement benefit, for example, in terms of reactive compensation accuracy, the negative reactive configuration supervision data training reinforcement benefit (reactive compensation accuracy) = |Q1 - Q1'| - |Q1 -Q1''|.
[0059] For voltage stability and grid loss, the calculation is also similar. For example, in terms of voltage stability, let the voltage fluctuation range under the candidate microgrid reactive optimization model be ΔV3, and the voltage fluctuation range under the updated microgrid reactive optimization model be ΔV4, and the negative reactive configuration supervision data training reinforcement benefit (voltage stability) = ΔV3 - ΔV4. In terms of grid loss, let the grid loss under the candidate microgrid reactive optimization model be L3, and the grid loss under the updated microgrid reactive optimization model be L4, and the negative reactive configuration supervision data training reinforcement benefit (grid loss) = L3 - L4. Then, the mean of these negative reactive configuration supervision data training reinforcement benefits under each sample learning data in the sample training group is calculated. Assuming that there are n sample learning data in total, the negative reactive configuration supervision data training reinforcement benefits under each sample learning data are calculated to be B1, B2, ..., Bn, respectively. Then the negative supervision training reinforcement benefit of the updated microgrid reactive optimization model corresponding to the sample learning data compared with the candidate microgrid reactive optimization model is = (B1 + B2 +... + Bn) / n.
[0060] According to the positive supervision training reinforcement benefit and negative supervision training reinforcement benefit obtained above, the model training comparison loss corresponding to the sample learning data is determined. For example, the model training comparison loss can be defined in the form of a difference, that is, the model training comparison loss = positive supervision training reinforcement benefit - negative supervision training reinforcement benefit. This model training comparison loss reflects the difference in the benefits of updating the microgrid reactive power optimization model in positive and negative supervision training, which helps to more comprehensively evaluate the training effect of the model.
[0061] When the training error in the target training stage is determined to no longer decrease according to the cyclic training reinforcement benefit, target training reinforcement benefit and model training comparison loss corresponding to each sample learning data, the model parameter learning is terminated to generate the target microgrid reactive optimization model corresponding to the candidate microgrid reactive optimization model. For each sample learning data, the cyclic training reinforcement benefit is obtained by specific calculations before, and the target training reinforcement benefit is also determined based on the comparison of positive and negative reactive configuration supervision data, plus the model training comparison loss. Taking a certain sample learning data as an example, assuming that the cyclic training reinforcement benefit is C, the target training reinforcement benefit is T, and the model training comparison loss is L, a way to determine the training error can be: training error = |C - T| + |L|. During the entire training process, this training error corresponding to each sample learning data is continuously calculated. As the model parameter learning progresses, when the training errors corresponding to all sample learning data no longer continue to decrease, it means that the model has reached a relatively stable state, and the model parameter learning is terminated at this time. The final model is the target microgrid reactive optimization model corresponding to the candidate microgrid reactive optimization model. This target model will have higher accuracy and reliability in the reactive optimization configuration decision of the industrial park microgrid, and can better adapt to the operation needs of the microgrid and improve the operation efficiency and stability of the microgrid.
[0062] In a possible implementation, the method further includes: Step B110, for each of the sample learning data, determine the reference training error corresponding to the sample learning data according to the cyclic training reinforcement benefit and the target training reinforcement benefit of the sample learning data.
[0063] Step B120, determining a first fusion coefficient of a reference training error under the sample learning data, and a second fusion coefficient of a model training comparison loss under the sample learning data.
[0064] Step B130, based on the first fusion coefficient and the second fusion coefficient, a fusion calculation is performed on the reference training error of the sample learning data and the model training comparison loss to determine the training error corresponding to the sample learning data.
[0065] Step B140, when the calculation results of the training errors corresponding to the sample learning data no longer continue to decrease, it is determined that the training error of the target training stage no longer continues to decrease.
[0066] In a possible implementation, step B120 includes: Step B121, determining the update training reinforcement benefit of the active reactive configuration supervision data under the sample learning data compared with the passive reactive configuration supervision data after completing the model parameter learning.
[0067] Step B122, determining a first fusion coefficient of the reference training error under the sample learning data according to a first difference between the updated training enhancement benefit and the target training enhancement benefit. The first fusion coefficient and the first difference are negatively correlated.
[0068] Wherein, step B122 includes: Step B1221, determining first differences corresponding to each sample learning data according to the updated training reinforcement benefits and target training reinforcement benefits corresponding to each sample learning data in the sample training group corresponding to the sample learning data.
[0069] Step B122, calculating the mean of the first difference values corresponding to each of the sample learning data, and determining a first threshold value matching the sample learning data.
[0070] Step B1223, when the first difference corresponding to the sample learning data is not greater than the first threshold value, determine the first fusion coefficient of the reference training error under the sample learning data based on the negative correlation relationship.
[0071] In this embodiment, the operation of the microgrid from 9 am to 10 am in the sample learning data is taken as an example. The cyclic training reinforcement benefit is obtained through a series of previous calculations, which reflects the performance of the model in the cyclic training process, and the target training reinforcement benefit is determined according to the performance of the active reactive configuration supervision data compared to the passive reactive configuration supervision data in the target training stage. The reference training error can be determined based on the difference between the two. Assuming that the cyclic training reinforcement benefit is CT and the target training reinforcement benefit is TT, the reference training error can be calculated by the formula: reference training error = |CT - TT|. This reference training error can reflect the degree of deviation of the sample learning data in the training process from one perspective, and is an important basis for subsequent calculations.
[0072] Next, determine the first fusion coefficient of the reference training error under the sample learning data and the second fusion coefficient of the model training comparison loss under the sample learning data. First, determine the update training reinforcement benefit of the active reactive configuration supervision data under the sample learning data compared with the passive reactive configuration supervision data after completing the model parameter learning. For the sample learning data from 9 to 10 a.m., after completing the model parameter learning, the sample microgrid operation data is input into the updated model respectively, and the corresponding output results are obtained for the active reactive configuration supervision data and the passive reactive configuration supervision data. Assume that the output result under the active reactive configuration supervision data is Q2', and the output result under the passive reactive configuration supervision data is Q1', while the actual active reactive configuration supervision data is Q2, and the passive reactive configuration supervision data is Q1. The update training reinforcement benefit can be calculated by comprehensively considering the accuracy of reactive compensation, the impact on voltage stability, and grid losses. For example, in terms of reactive power compensation accuracy, the updated training enhancement benefit (reactive power compensation accuracy) = |Q1 - Q1'| - |Q2 -Q2'|; in terms of voltage stability, the corresponding benefit difference is calculated based on the impact of the reactive power configuration output by the model on the voltage fluctuation range; in terms of power grid loss, the benefit difference is calculated based on the relationship between reactive power configuration and power grid loss, and then these aspects are combined (through certain weight allocation, and the weight is determined according to the microgrid operation requirements) to obtain the total updated training enhancement benefit.
[0073] According to the first difference between the updated training reinforcement benefit and the target training reinforcement benefit, the first fusion coefficient of the reference training error under the sample learning data is determined. Assuming that the updated training reinforcement benefit is UT, the target training reinforcement benefit is TT, and the first difference is D1 = UT - TT. The first fusion coefficient is negatively correlated with the first difference, which means that when the first difference increases, the first fusion coefficient decreases. In order to determine this first fusion coefficient, according to the updated training reinforcement benefit and the target training reinforcement benefit corresponding to each sample learning data in the sample training group corresponding to the sample learning data, the first difference corresponding to each sample learning data is determined. For example, there are n sample learning data in the sample training group, and the first difference D11, D12, ..., D1n is calculated for each sample learning data in the above manner. The first difference corresponding to each sample learning data is averaged to determine the first threshold value matching the sample learning data. That is, the first threshold value = (D11 + D12 +... + D1n) / n. When the first difference corresponding to the sample learning data is not greater than the first threshold value, the first fusion coefficient of the reference training error under the sample learning data is determined according to the negative correlation relationship. For example, a negatively correlated functional relationship can be set, such as the first fusion coefficient = - k * D1 (k is a constant determined based on experience or experiments). When D1 is not greater than the first threshold value, the first fusion coefficient is determined according to this formula.
[0074] Determine the second fusion coefficient of the model training comparison loss under the sample learning data. The model training comparison loss is calculated based on the positive supervision training reinforcement benefit and the negative supervision training reinforcement benefit. For the sample learning data from 9 am to 10 am, the positive supervision training reinforcement benefit and the negative supervision training reinforcement benefit are obtained by inputting the sample microgrid operation data into the updated microgrid reactive optimization model and the candidate microgrid reactive optimization model, and comprehensively calculating from the aspects of reactive compensation accuracy, voltage stability and grid loss. Assuming that the positive supervision training reinforcement benefit is PT and the negative supervision training reinforcement benefit is NT, the model training comparison loss = PT - NT. According to the second difference between the positive supervision training reinforcement benefit and the negative reactive configuration supervision data training reinforcement benefit, determine the second fusion coefficient of the model training comparison loss under the sample learning data. Assuming that the positive supervision training reinforcement benefit is PT and the negative reactive configuration supervision data training reinforcement benefit is NT', the second difference is D2 = PT - NT'. The second fusion coefficient is negatively correlated with the second difference. Similarly, in a manner similar to determining the first fusion coefficient, the second differences D21, D22, ..., D2n corresponding to each sample learning data are determined based on the positive supervision training reinforcement benefits and the negative reactive configuration supervision data training reinforcement benefits corresponding to each sample learning data in the sample training group corresponding to the sample learning data. The second differences are averaged to obtain a second threshold value matching the sample learning data. When the second difference corresponding to the sample learning data is not greater than the second threshold value, the second fusion coefficient is determined based on the negative correlation. For example, it can be set to the second fusion coefficient = - m * D2 (m is a constant determined based on experience or experiments).
[0075] According to the first fusion coefficient and the second fusion coefficient, the reference training error of the sample learning data and the model training comparison loss are fused and calculated to determine the training error corresponding to the sample learning data. Assuming that the reference training error is RE, the model training comparison loss is ML, the first fusion coefficient is α, and the second fusion coefficient is β, then the training error corresponding to the sample learning data = α * RE + β * ML. This training error comprehensively considers the reference training error and the model training comparison loss as well as their respective fusion coefficients, and can more comprehensively reflect the state of the sample learning data during the training process.
[0076] When the calculation results of the training errors corresponding to each sample learning data no longer continue to decrease, it is determined that the training error of the target training stage will no longer continue to decrease. During the entire training process, the training error of each sample learning data is continuously calculated. For example, there are multiple sample learning data in the sample training group. As the model parameter learning continues, the training error of each sample learning data will change. When the training errors of all sample learning data no longer continue to decrease, it means that the entire model has reached a relatively stable state in the target training stage, that is, the training error of the target training stage no longer continues to decrease. This judgment basis can effectively determine the termination time of model training and ensure that the obtained model has good performance in reactive power optimization of industrial park microgrids.
[0077] In a possible implementation, step B122 further includes: Step B1224, determining the training enhancement benefit of the passive reactive configuration supervision data of the updated microgrid reactive optimization model corresponding to the sample learning data compared to the candidate microgrid reactive optimization model.
[0078] Step B1225, determining a second fusion coefficient of the model training comparison loss under the sample learning data according to the second difference between the positive supervision training enhancement benefit and the negative reactive configuration supervision data training enhancement benefit. The second fusion coefficient and the second difference are negatively correlated.
[0079] Wherein, step B1225 includes: Step B1225-1, determines the second difference corresponding to each sample learning data according to the positive supervision training reinforcement benefit and the negative reactive configuration supervision data training reinforcement benefit corresponding to each sample learning data in the sample training group corresponding to the sample learning data.
[0080] Step B1225-2, calculating the mean of the second difference values corresponding to each of the sample learning data, and determining a second threshold value matching the sample learning data.
[0081] Step B1225-3, when the second difference corresponding to the sample learning data is not greater than the second threshold value, determine the second fusion coefficient of the model training comparison loss under the sample learning data based on the negative correlation relationship.
[0082] In this embodiment, the microgrid operation period from 9:00 to 10:00 a.m. in the sample learning data is taken as an example. During this period, the sample microgrid operation data includes multiple parameters such as voltage, current, power factor, output power of distributed power sources, and power demand of loads. The sample microgrid operation data is input into the updated microgrid reactive optimization model and the candidate microgrid reactive optimization model respectively.
[0083] For the passive reactive configuration supervision data, the corresponding output results are obtained after inputting the two models. Assume that the reactive compensation prediction value output by the candidate microgrid reactive optimization model for the passive reactive configuration supervision data is Q1', and the reactive compensation prediction value output by the updated microgrid reactive optimization model is Q1''. Considering the accuracy of reactive compensation, the training enhancement benefit of the passive reactive configuration supervision data (reactive compensation accuracy) can be obtained by calculating |Q1 - Q1'| - |Q1 - Q1''|, where Q1 is the actual reactive compensation in the passive reactive configuration supervision data. At the same time, the training enhancement benefit of the passive reactive configuration supervision data is determined from the two aspects of voltage stability and grid loss that are crucial to the operation of the microgrid. For voltage stability, the corresponding benefit difference is calculated based on the impact of the reactive configuration output by the two models on the voltage fluctuation range of the microgrid. For example, the voltage fluctuation range of the microgrid under the candidate microgrid reactive optimization model is ΔV3, and that under the updated microgrid reactive optimization model is ΔV4, then the training enhancement benefit of the passive reactive configuration supervision data in terms of voltage stability (voltage stability) is ΔV3 - ΔV4. For grid loss, according to the relationship model between reactive power configuration and grid loss, the grid loss under the candidate microgrid reactive optimization model is set to L3, the grid loss under the updated microgrid reactive optimization model is set to L4, and the training enhancement benefit (grid loss) of passive reactive power configuration supervision data is L3 - L4. Combining these aspects (weighted summation according to pre-determined weights, weights are set according to the operating characteristics and optimization goals of the microgrid), the training enhancement benefit of passive reactive power configuration supervision data of the updated microgrid reactive optimization model corresponding to the sample learning data is obtained compared with the candidate microgrid reactive optimization model.
[0084] Next, according to the second difference between the positive supervision training reinforcement benefit and the negative reactive configuration supervision data training reinforcement benefit, the second fusion coefficient of the model training comparison loss under the sample learning data is determined. The positive supervision training reinforcement benefit is also calculated from the aspects of reactive compensation accuracy, voltage stability and grid loss by inputting the sample microgrid operation data into the updated microgrid reactive optimization model and the candidate microgrid reactive optimization model, and comparing the output results under the positive reactive configuration supervision data. Assuming that the positive supervision training reinforcement benefit is PT, the negative reactive configuration supervision data training reinforcement benefit is NT, and the second difference is D2 = PT - NT. The second fusion coefficient here is negatively correlated with the second difference, which means that the larger the second difference, the smaller the second fusion coefficient.
[0085] In order to determine the second fusion coefficient, the second difference corresponding to each sample learning data is determined according to the positive supervision training reinforcement benefit and the negative reactive configuration supervision data training reinforcement benefit corresponding to each sample learning data in the sample training group corresponding to the sample learning data. For example, there are n sample learning data in the sample training group, and for each sample learning data, the positive supervision training reinforcement benefit and the negative reactive configuration supervision data training reinforcement benefit are calculated in the above manner, and the corresponding second difference D21, D22, ..., D2n are obtained.
[0086] Then, the second difference values corresponding to each sample learning data are averaged to determine the second threshold value matching the sample learning data. That is, the second threshold value = (D21 + D22 + … + D2n) / n is calculated. When the second difference value corresponding to the sample learning data is not greater than the second threshold value, the second fusion coefficient of the model training loss under the sample learning data is determined based on the negative correlation relationship. For example, a functional relationship can be set to reflect this negative correlation relationship. Assuming that the second fusion coefficient is β, β = - m * D2 (m is a constant determined based on experience or experiment), when the second difference value D2 corresponding to the sample learning data is not greater than the second threshold value, the second fusion coefficient of the model training loss under the sample learning data is determined according to this formula. This method of determining the second fusion coefficient comprehensively considers the situation of each sample learning data in the sample training group, making the determination of the second fusion coefficient more reasonable and accurate, and then in the subsequent calculation of the training error corresponding to the sample learning data, it can more comprehensively reflect the training state of the model, which helps to improve the accuracy and reliability of the microgrid reactive optimization model to better meet the operation requirements of the industrial park microgrid.
[0087] In a possible implementation, step S110 includes: Step S111, obtaining microgrid reactive power optimization requirements and a plurality of sample microgrid operation data.
[0088] Step S112: for each of the sample microgrid operation data, determine demand index data associated with the microgrid reactive power optimization demand. The demand index data includes the sample microgrid operation data.
[0089] Step S113, loading the demand index data into a pre-trained deep learning network, and using the generation of the deep learning network as passive reactive configuration supervision data of the sample microgrid operation data.
[0090] Step S114, generating active reactive configuration supervision data for the sample microgrid operation data according to the expert optimization instruction generated for the passive reactive configuration supervision data for the sample microgrid operation data.
[0091] Step S115, configuring sample learning data including the sample microgrid operation data, the active reactive configuration supervision data of the sample microgrid operation data, and the passive reactive configuration supervision data of the sample microgrid operation data, to generate a training data sequence including a plurality of sample learning data.
[0092] In this embodiment, the reactive power optimization demand of the microgrid is determined based on the overall operation goals of the industrial park microgrid, which include but are not limited to maintaining voltage stability, reducing grid losses, and improving power quality. For example, in order to meet the power quality requirements of various industrial equipment in the industrial park, it is necessary to control the voltage fluctuation range within a certain value, which is a specific reactive power optimization demand. At the same time, multiple sample microgrid operation data are collected, which reflect the actual operation status of the microgrid in different time periods. Taking different time periods in a day as an example, such as 9 am to 10 am, when industrial production is in normal production, most equipment is running at full load, and the illumination conditions of photovoltaic panels are medium intensity, the corresponding sample microgrid operation data include the voltage value of the microgrid is 380V, the current is 50A, the power factor is 0.85, the output power of each distributed power source (such as solar photovoltaic panels, small wind turbines, etc.) and the power requirements of different types of loads (industrial power equipment, office area power equipment, etc.).
[0093] For each sample microgrid operation data, determine the demand index data associated with the reactive power optimization demand of the microgrid. The demand index data includes the sample microgrid operation data itself and other derivative data related to the reactive power optimization demand. For example, in addition to the direct operation data such as voltage, current, power factor, etc. mentioned above, it may also include data such as apparent power and reactive power calculated based on voltage and current. These demand index data can more comprehensively reflect the relationship between the operating status of the microgrid and the reactive power optimization demand. Taking the sample microgrid operation data from 9 to 10 am as an example, the calculated apparent power and reactive power data are closely related to the pre-set reactive power optimization demands such as voltage stability and grid loss, and together constitute the demand index data.
[0094] The demand index data is loaded into the pre-trained deep learning network, and the generation of the deep learning network is used as the passive reactive configuration supervision data of the sample microgrid operation data. This pre-trained deep learning network is trained based on a large amount of microgrid operation data and related reactive configuration cases. When the demand index data corresponding to the sample microgrid operation data from 9 am to 10 am is loaded into the deep learning network, the network outputs a reactive configuration scheme as the passive reactive configuration supervision data according to its internal algorithm and model structure. For example, based on the input data, the deep learning network may determine that the reactive compensation amount to be set on a certain reactive compensation device is Q1, and the reactive configuration scheme corresponding to this Q1 is the passive reactive configuration supervision data for the sample microgrid operation data. This passive reactive configuration supervision data is a preliminary reactive configuration suggestion based on the deep learning network's learning of existing data and rules.
[0095] Based on the expert optimization instructions generated for the passive reactive configuration supervision data of the sample microgrid operation data, the active reactive configuration supervision data of the sample microgrid operation data is generated. Experts optimize the passive reactive configuration supervision data based on their rich experience and deeper understanding of the industrial park microgrid system. Experts will take into account more complex factors in actual operation, such as the sensitivity of specific industrial equipment to reactive power, the output characteristics of distributed power sources under different seasons and weather conditions, etc. Taking the reactive compensation amount Q1 in the passive reactive configuration supervision data as an example, the expert may think that under the current operating state, considering the upcoming peak power consumption period and the special requirements of a key industrial equipment for voltage stability, it is more appropriate to adjust the reactive compensation amount to Q2. The reactive configuration scheme corresponding to this Q2 is used as the active reactive configuration supervision data. The expert optimization instructions are adjustments that are more conducive to meeting the reactive optimization needs of the microgrid after comprehensively considering various actual factors on the basis of the passive reactive configuration supervision data.
[0096] Finally, configure the sample learning data including the sample microgrid operation data, the active reactive configuration supervision data of the sample microgrid operation data, and the passive reactive configuration supervision data of the sample microgrid operation data to generate a training data sequence containing multiple sample learning data. For the sample from 9 to 10 a.m., the sample microgrid operation data, the corresponding active reactive configuration supervision data Q2, and the passive reactive configuration supervision data Q1 of this period are combined together to form a sample learning data. In the same way, the sample microgrid operation data of other different time periods are processed to obtain multiple sample learning data. These sample learning data together constitute a training data sequence, which will be used for the subsequent training of the microgrid reactive optimization model, providing the model with rich learning samples, so that it can better adapt to various operating conditions of the industrial park microgrid, thereby improving the accuracy and effectiveness of reactive optimization.
[0097] In a possible implementation, the process of obtaining a candidate microgrid reactive power optimization model includes: Get the initialized neural network model.
[0098] According to the training data sequence, a basic training data sequence including a plurality of basic sample learning data is configured. Each of the basic sample learning data includes sample microgrid operation data, and active reactive configuration supervision data of the sample microgrid operation data or passive reactive configuration supervision data of the sample microgrid operation data.
[0099] The neural network model is iteratively updated according to the basic training data sequence to generate a candidate microgrid reactive power optimization model.
[0100] In this embodiment, the initialized neural network model is the basis for constructing a microgrid reactive power optimization model. For example, a neural network model with a multi-layer perceptron (MLP) structure is selected, which has an input layer, several hidden layers and an output layer. The number of nodes in the input layer is determined according to the characteristics of the sample microgrid operation data. Characteristics such as voltage, current, power factor, distributed power output power, and load power demand in the industrial park microgrid can be used as inputs to the input layer. The number of neurons and the number of layers in the hidden layer are set according to the complexity requirements of the model. For example, three hidden layers can be set, each with a different number of neurons to achieve complex nonlinear mapping of the input data. The output of the output layer corresponds to the relevant results of the reactive configuration, such as reactive compensation. The initial weights and bias parameters of this initialized neural network model may be randomly set. It is just a model with a basic structure but has not been trained for microgrid reactive power optimization.
[0101] According to the training data sequence, a basic training data sequence containing multiple basic sample learning data is configured. Each basic sample learning data includes sample microgrid operation data, and active reactive configuration supervision data of the sample microgrid operation data or passive reactive configuration supervision data of the sample microgrid operation data. Extract and organize from the previously acquired training data sequence. Taking the sample of the industrial park microgrid from 9 am to 10 am as an example, its sample microgrid operation data includes information such as voltage of 380V, current of 50A, and power factor of 0.85. The basic sample learning data may only include the sample microgrid operation data and the corresponding passive reactive configuration supervision data, such as the reactive compensation amount of the reactive compensation device in the passive reactive configuration supervision data is Q1. Or it may also be the sample microgrid operation data and active reactive configuration supervision data, such as the reactive compensation amount in the active reactive configuration supervision data is Q2. In this way, multiple samples in the training data sequence are processed to form multiple basic sample learning data, and these basic sample learning data together constitute the basic training data sequence.
[0102] The neural network model is iteratively updated according to the basic training data sequence to generate a candidate microgrid reactive optimization model. The basic sample learning data in the basic training data sequence are input into the initialized neural network model one by one. For each basic sample learning data, the neural network model performs forward propagation calculation according to the input sample microgrid operation data to obtain a preliminary reactive configuration output result. Then, the loss function is calculated based on the difference between the output result and the corresponding positive reactive configuration supervision data or negative reactive configuration supervision data. For example, using the mean square error (MSE) as the loss function, if the input is the sample microgrid operation data and the negative reactive configuration supervision data, and the reactive compensation amount in the negative reactive configuration supervision data is Q1, the reactive compensation amount prediction value output by the model is Q1', then the value of the loss function is (Q1 - Q1')². Then, through the back propagation algorithm, the weights and bias parameters of the neural network model are adjusted according to the loss function to reduce the value of the loss function. This process is repeated continuously. As more basic sample learning data is input into the model and iteratively updated, the neural network model gradually learns the relationship pattern between the sample microgrid operation data and the reactive power configuration. After multiple rounds of iterations, when the value of the loss function reaches a stable and acceptable range, the neural network model at this time becomes a candidate microgrid reactive power optimization model. This candidate microgrid reactive power optimization model has a certain ability to make preliminary optimization decisions on the reactive power configuration of the microgrid, laying the foundation for further training and optimization.
[0103] Figure 2The hardware structure of the microgrid reactive power optimization system 100 based on deep learning for implementing the above-mentioned microgrid reactive power optimization method based on deep learning provided by an embodiment of the present invention is shown, as Figure 2 As shown, the deep learning-based microgrid reactive power optimization system 100 may include a processor 110 , a machine-readable storage medium 120 , a bus 130 , and a communication unit 140 .
[0104] The machine-readable storage medium 120 may store data and / or instructions. In some embodiments, the machine-readable storage medium 120 may store data acquired from an external terminal. In some embodiments, the machine-readable storage medium 120 may store data and / or instructions that the deep learning-based microgrid reactive power optimization system 100 uses to execute or use to complete the exemplary method described in the present invention.
[0105] During the specific implementation process, one or more processors 110 execute computer executable instructions stored in the machine-readable storage medium 120, so that the processor 110 can execute the microgrid reactive power optimization method based on deep learning in the above method embodiment. The processor 110, the machine-readable storage medium 120 and the communication unit 140 are connected through the bus 130, and the processor 110 can be used to control the sending and receiving actions of the communication unit 140.
[0106] The specific implementation process of the processor 110 can refer to the various method embodiments executed by the above-mentioned deep learning-based microgrid reactive power optimization system 100. The implementation principles and technical effects are similar, and this embodiment will not be repeated here.
[0107] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer executable instructions are preset. When a processor executes the computer executable instructions, the above-mentioned microgrid reactive power optimization method based on deep learning is implemented.
[0108] It should be noted that in order to simplify the description of the present invention and thus help understand one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, various features are sometimes combined into one embodiment, drawing or description thereof.
Claims
1. A microgrid reactive power optimization method based on deep learning, characterized in that: The method comprises: Acquire a candidate microgrid reactive power optimization model and a training data sequence comprising a plurality of sample learning data; the sample learning data comprises sample microgrid operation data, passive reactive power configuration supervision data of the sample microgrid operation data, and active reactive power configuration supervision data of the sample microgrid operation data; For each sample learning data in the training data sequence, when model parameter learning is performed according to the sample learning data in a target training phase, determining a target training reinforcement benefit of the positive reactive configuration supervision data in the sample learning data compared to the negative reactive configuration supervision data; Determine the first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate active reactive configuration supervision data, and the second cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate passive reactive configuration supervision data; the updated microgrid reactive optimization model corresponding to the sample learning data is generated by model parameter learning based on the previous sample training group of the sample training group corresponding to the sample learning data; in the process of the first model parameter learning, the deep learning target of the first sample training group is the candidate microgrid reactive optimization model; The first cycle fit goodness of fit value and the second cycle fit goodness of fit value are fused and calculated to determine the cycle training reinforcement benefit of the sample learning data, and when it is determined that the training error of the target training stage no longer continues to decrease based on the cycle training reinforcement benefit and the target training reinforcement benefit corresponding to each of the sample learning data, the model parameter learning is terminated to generate the target microgrid reactive optimization model corresponding to the candidate microgrid reactive optimization model; the fusion coefficient of the first cycle fit goodness of fit value is less than the fusion coefficient of the second cycle fit goodness of fit value; The target microgrid operation data to be analyzed is obtained, the target microgrid operation data is loaded into the target microgrid reactive power optimization model, and reactive power optimization configuration decision data of the target microgrid operation data is generated.
2. The microgrid reactive power optimization method based on deep learning according to claim 1, characterized in that: The determining of the first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate active reactive configuration supervision data includes: Acquire multiple candidate active reactive configuration supervision data of the sample learning data; For each of the candidate active reactive configuration supervision data, determining a first cycle goodness of fit value of the updated microgrid reactive optimization model corresponding to the sample learning data to generate the candidate active reactive configuration supervision data; The first cycle goodness of fit values corresponding to each of the candidate active reactive configuration supervision data are averaged to generate the first cycle goodness of fit value of the active reactive configuration supervision data generated by the updated microgrid reactive optimization model corresponding to the sample learning data.
3. The microgrid reactive power optimization method based on deep learning according to claim 1, characterized in that: The method further comprises: Determine the positive supervision training reinforcement benefit of the updated microgrid reactive optimization model corresponding to the sample learning data compared to the candidate microgrid reactive optimization model, and the negative supervision training reinforcement benefit of the updated microgrid reactive optimization model corresponding to the sample learning data compared to the candidate microgrid reactive optimization model; Determining the model training comparison loss corresponding to the sample learning data according to the positive supervision training reinforcement benefit and the negative supervision training reinforcement benefit; When it is determined that the training error of the target training stage no longer continues to decrease according to the cyclic training reinforcement benefit and the target training reinforcement benefit respectively corresponding to each of the sample learning data, the model parameter learning is terminated, and the target microgrid reactive power optimization model corresponding to the candidate microgrid reactive power optimization model is generated, including: When it is determined that the training error of the target training stage no longer continues to decrease based on the cyclic training enhancement benefit, the target training enhancement benefit and the model training comparison loss corresponding to each of the sample learning data, the model parameter learning is terminated and the target microgrid reactive optimization model corresponding to the candidate microgrid reactive optimization model is generated.
4. The microgrid reactive power optimization method based on deep learning according to claim 3 is characterized in that: Determining the negative supervision training reinforcement benefit of the updated microgrid reactive power optimization model corresponding to the sample learning data compared with the candidate microgrid reactive power optimization model, including: Determine the training enhancement benefits of the passive reactive configuration supervision data corresponding to each of the candidate microgrid reactive optimization models in the sample training group corresponding to the sample learning data and under each of the sample learning data; The mean value of each of the passive reactive configuration supervision data training enhancement benefits is calculated to determine the passive supervision training enhancement benefit of the updated microgrid reactive optimization model corresponding to the sample learning data compared with the candidate microgrid reactive optimization model.
5. The microgrid reactive power optimization method based on deep learning according to claim 3 is characterized in that: The method further comprises: For each of the sample learning data, determining a reference training error corresponding to the sample learning data according to the cyclic training reinforcement benefit and the target training reinforcement benefit of the sample learning data; Determine a first fusion coefficient of a reference training error under the sample learning data and a second fusion coefficient of a model training comparison loss under the sample learning data; According to the first fusion coefficient and the second fusion coefficient, a reference training error of the sample learning data and a model training comparison loss are fused and calculated to determine a training error corresponding to the sample learning data; When the calculation results of the training errors corresponding to the sample learning data no longer continue to decrease, it is determined that the training error of the target training stage no longer continues to decrease.
6. The microgrid reactive power optimization method based on deep learning according to claim 5, characterized in that: The determining of a first fusion coefficient of a reference training error under the sample learning data includes: Determine the update training reinforcement benefit of the active reactive configuration supervision data under the sample learning data compared with the passive reactive configuration supervision data after completing the model parameter learning; Determining a first fusion coefficient of the reference training error under the sample learning data according to a first difference between the updated training reinforcement benefit and the target training reinforcement benefit; the first fusion coefficient and the first difference are in a negative correlation relationship; The step of determining a first fusion coefficient of a reference training error under the sample learning data according to a first difference between the updated training enhancement benefit and the target training enhancement benefit includes: Determine first differences corresponding to each sample learning data according to the updated training reinforcement benefits and the target training reinforcement benefits corresponding to each sample learning data in the sample training group corresponding to the sample learning data; Calculate the mean of the first difference values respectively corresponding to the sample learning data to determine a first threshold value matching the sample learning data; When the first difference corresponding to the sample learning data is not greater than the first threshold value, a first fusion coefficient of the reference training error under the sample learning data is determined according to the negative correlation relationship.
7. The microgrid reactive power optimization method based on deep learning according to claim 5, characterized in that: Determining a second fusion coefficient of the model training comparison loss under the sample learning data includes: Determine the training enhancement benefit of the passive reactive configuration supervision data of the updated microgrid reactive optimization model corresponding to the sample learning data compared to the candidate microgrid reactive optimization model; Determine a second fusion coefficient of the model training comparison loss under the sample learning data according to a second difference between the active supervision training enhancement benefit and the passive reactive configuration supervision data training enhancement benefit; the second fusion coefficient and the second difference are negatively correlated; Wherein, determining the second fusion coefficient of the model training comparison loss under the sample learning data according to the second difference between the active supervision training enhancement benefit and the passive reactive configuration supervision data training enhancement benefit includes: Determine the second difference value corresponding to each sample learning data according to the positive supervision training reinforcement benefit and the negative reactive configuration supervision data training reinforcement benefit corresponding to each sample learning data in the sample training group corresponding to the sample learning data; Calculating the mean of the second difference values respectively corresponding to the sample learning data to determine a second threshold value matching the sample learning data; When the second difference corresponding to the sample learning data is not greater than the second threshold value, a second fusion coefficient of the model training comparison loss under the sample learning data is determined according to the negative correlation relationship.
8. The microgrid reactive power optimization method based on deep learning according to any one of claims 1 to 7, characterized in that: The process of obtaining a training data sequence containing multiple sample learning data includes: Obtain microgrid reactive power optimization requirements and multiple sample microgrid operation data; For each of the sample microgrid operation data, determining demand index data associated with the microgrid reactive power optimization demand; the demand index data includes the sample microgrid operation data; Loading the demand index data into a pre-trained deep learning network, and using the generation of the deep learning network as passive reactive configuration supervision data of the sample microgrid operation data; Generate active reactive configuration supervision data for the sample microgrid operation data according to the expert optimization instruction generated for the passive reactive configuration supervision data for the sample microgrid operation data; The sample learning data including the sample microgrid operation data, the active reactive configuration supervision data of the sample microgrid operation data and the passive reactive configuration supervision data of the sample microgrid operation data are configured to generate a training data sequence including a plurality of sample learning data.
9. The microgrid reactive power optimization method based on deep learning according to any one of claims 1 to 7, characterized in that: The process of obtaining a candidate microgrid reactive power optimization model includes: Get the initialized neural network model; According to the training data sequence, a basic training data sequence including a plurality of basic sample learning data is configured; each of the basic sample learning data includes sample microgrid operation data, and active reactive configuration supervision data of the sample microgrid operation data or passive reactive configuration supervision data of the sample microgrid operation data; The neural network model is iteratively updated according to the basic training data sequence to generate a candidate microgrid reactive power optimization model.
10. A microgrid reactive power optimization system based on deep learning, characterized in that: The deep learning-based microgrid reactive power optimization system includes a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the deep learning-based microgrid reactive power optimization method described in any one of claims 1 to 9.
Citation Information
Patent Citations
Reactive voltage control method based on multi-time-scale multi-agent deep reinforcement learning
CN113363997A
Power grid reactive active prediction and control technology based on situation awareness
CN113964885A
Reactive voltage optimization method and device based on reinforcement learning, equipment and medium
CN115833147A
Direct current power transmission system reactive power control method based on time sequence convolution residual network
CN117791631A
Source network load storage collaborative optimization method based on model reinforcement learning and related device thereof
CN117811098A