A distribution network dispatching method and system integrating source, grid, load and carbon storage
By performing feature engineering and prediction on the historical load demand of the power system, identifying potential risks, and using the firefly algorithm to optimize reserve capacity, the problem of insufficient grid dispatching in the existing technology is solved, and the resilience and reliability of the power system are improved.
Patent Information
- Application Number
- CN202410394144.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-02
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-04-02
AI Technical Summary
Existing technologies cannot perform reasonable dispatch in the existing power grid and cannot effectively respond to grid load changes and potential risks, resulting in insufficient system resilience and reliability.
By obtaining the historical load demand of the power system, we perform feature engineering, build a prediction model, identify potential risks, build a risk matrix, and use the firefly algorithm to optimize reserve capacity to maximize reserve capacity and improve system resilience.
It achieves comprehensive consideration and maximization of the power system's reserve capacity, improves the system's availability and resilience, and ensures stability and reliability in the face of different risks.
Smart Images

Figure CN117977590B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distribution network dispatching, and in particular to a source-grid-load-carbon-storage integrated distribution network dispatching method and system. Background Art
[0002] In the prior art, CN113378100A discloses a distribution network source-grid-load-storage collaborative optimization scheduling model and method considering carbon emissions, which is used for the coordinated scheduling of the load part and the energy storage part of the distribution network. The method comprises the following steps: step S1: selecting the load-storage components of the load-storage collaborative scheduling model based on the optimization of the carbon emission level; step S2: taking the carbon emission level of the distribution network, the scheduling operation cost and the voltage stability as the optimization targets, and taking the active output of the distributed power source, the reactive output of the distributed power source, the investment level of the switchable capacitor, the tap adjustment of the on-load tap-changing transformer, and the distribution network grid as the decision variables, to establish a distribution network source-grid-load-storage collaborative optimization scheduling model considering carbon emissions; step S3: solving the scheduling model established in step S2 using a multi-objective particle swarm algorithm with elite strategy fast non-dominated sorting; and scheduling according to the solution result.
[0003] In summary, although the existing technology can realize distribution network scheduling, it can only schedule the power grid during the power grid construction stage and cannot reasonably schedule the existing power grid. Therefore, a solution is needed to solve the problems existing in the existing technology. Summary of the invention
[0004] The embodiments of the present invention provide a source-grid-load-carbon-storage integrated distribution network scheduling method and system, which can at least solve some of the problems existing in the prior art.
[0005] A first aspect of an embodiment of the present invention provides a source-grid-load-carbon-storage integrated distribution network dispatching method, comprising:
[0006] Obtain historical load demand of the power system, perform feature engineering on time series data corresponding to the historical load demand to obtain time series features, randomly generate training sets and test sets based on the time series features, build an initial prediction model, train the initial prediction model through the training set, verify the performance of the trained initial prediction model through the test set to obtain a demand prediction model, and calculate the predicted power grid load demand through the demand prediction model in combination with the time series features;
[0007] Based on the predicted grid load demand, potential risks of the power system are identified, the potential risks are classified and a risk matrix is constructed based on the classification results, and based on the risk matrix, in combination with existing risk management solutions and control measures, a backup capacity plan is generated, the backup capacity of the power system is determined, and an objective function is constructed with the backup capacity maximization as the goal;
[0008] Based on the objective function and in combination with a preset firefly algorithm, an initial firefly population is randomly generated. For each individual in the initial firefly population, the current position is taken as the best historical position and the fitness and brightness of each individual are calculated. The brightness is adaptively adjusted and the attraction and position between each individual are updated according to the updated brightness. The update is repeated until a preset number of iterations is reached. The individual with the highest brightness after the last iteration is selected as the optimal solution, the objective function is solved, and the spare capacity is obtained.
[0009] In an optional embodiment,
[0010] The method of obtaining the historical load demand of the power system, performing feature engineering on the time series data corresponding to the historical load demand to obtain time series features, randomly generating a training set and a test set based on the time series features, building an initial prediction model, training the initial prediction model through the training set, and verifying the performance of the trained initial prediction model through the test set to obtain a demand prediction model, and calculating the predicted power grid load demand through the demand prediction model in combination with the time series features includes:
[0011] Obtaining historical load demands of the current power grid from a database of the power system, extracting time series features from time series data corresponding to the historical load demands in units of hours based on the historical load demands, and generating hysteresis features at the same time;
[0012] Randomly generate a training set and a test set based on the time series feature and the lag feature, and separate feature values from labels;
[0013] Construct the initial prediction model based on the training set, determine the number of memory network layers of the initial prediction model, initialize the corresponding memory parameters for each memory network layer, add a deactivation layer after the memory network layer, randomly forget the output of the memory network layer through the deactivation layer, and add a fully connected layer and an output layer after the deactivation layer to obtain the initial prediction model;
[0014] Adding the elements of the training set to the initial prediction model, adjusting the parameters of the initial prediction model according to the output results, and repeating the training until every element in the training set is used;
[0015] The test set is added to the trained initial prediction model, and verification is performed according to the true label corresponding to each element in the test set, the mean square error corresponding to the model output result is calculated, and the mean square error is compared with a preset error threshold. If the mean square error is less than the error threshold, it is considered that the verification is passed, and the demand prediction model is obtained;
[0016] The time series characteristics are added to the demand forecasting model to obtain the predicted power grid load demand.
[0017] In an optional embodiment,
[0018] The method of identifying potential risks of the power system based on the predicted grid load demand, classifying the potential risks and constructing a risk matrix based on the classification results, generating a reserve capacity plan based on the risk matrix and combining existing risk management solutions and control measures, and determining the reserve capacity of the power system, and constructing an objective function with the goal of maximizing the reserve capacity includes:
[0019] Based on the predicted grid load demand and combined with the system characteristics of the power system, the system response under different load conditions and equipment states is simulated by power system simulation software, and the aging degree and maintenance records of key equipment are evaluated to comprehensively obtain the potential risks of the power system;
[0020] For the potential risks, determine the impact of each potential risk through qualitative analysis and construct a risk matrix, traverse the existing risk management plans and control measures and evaluate the effectiveness of each risk management plan and control measure respectively, strengthen the existing control measures based on the risk matrix and propose an improved risk management plan, generate a backup capacity plan, and determine the backup capacity under different risk conditions based on the backup capacity plan;
[0021] Taking the maximization of the reserve capacity as the goal, constraint conditions are set according to the state of power system equipment to construct an objective function.
[0022] In an optional embodiment,
[0023] The objective is to maximize the reserve capacity, set constraints according to the power system equipment status, and construct an objective function as shown in the following formula:
[0024] ;
[0025] in, R Indicates the spare capacity, P max,i Indicates i The maximum power generation capacity of each power generation unit, η i Indicates i The efficiency of each power generation unit, D represents the predicted grid load demand, C env,i Represents the costs caused by environmental factors.
[0026] In an optional embodiment,
[0027] Based on the objective function, combined with a preset firefly algorithm, an initial firefly population is randomly generated. For each individual in the initial firefly population, the current position is taken as the best historical position and the fitness and brightness of each individual are calculated. The brightness is adaptively adjusted and the attraction and position between each individual are updated according to the updated brightness. The update is repeated until a preset number of iterations is reached. The individual with the highest brightness after the last iteration is selected as the optimal solution. The objective function is solved to obtain the spare capacity, which includes:
[0028] Based on the objective function, in combination with a preset firefly algorithm, an initial firefly population is randomly generated, wherein each individual in the initial firefly population represents a solution for spare capacity, and the attraction coefficient and maximum number of iterations of the firefly algorithm are initialized;
[0029] For each individual in the initial firefly population, the current position is taken as the individual's best historical position, the fitness and brightness are calculated, based on the fitness and algorithm iteration progress, the brightness corresponding to each individual is adaptively adjusted, for each pair of fireflies, the attraction is calculated based on the brightness of each firefly and the attraction coefficient, based on the attraction and brightness, the firefly with lower brightness moves to the firefly with higher brightness, the position of each firefly is updated, the fitness corresponding to the updated position is calculated, and compared with the fitness corresponding to the best historical position, and the one with the larger fitness value is selected as the best position of the current firefly;
[0030] The iteration is repeated until a preset number of iterations is reached, and for each individual after the last update, the fitness value is calculated respectively, and the individual with the maximum fitness value is selected as the optimal solution, and the objective function is solved to obtain the spare capacity.
[0031] In an optional embodiment,
[0032] Based on the fitness and algorithm iteration progress, the brightness corresponding to each individual is adaptively adjusted as shown in the following formula:
[0033] ;
[0034] in, birghtness i Indicates i The brightness value of a firefly, fitness i represents the fitness value, C it Indicates the current iteration number, max it Indicates the maximum number of iterations.
[0035] In an optional embodiment,
[0036] Based on the attraction and brightness, the fireflies with lower brightness move toward the fireflies with higher brightness, and the position of each firefly is updated as shown in the following formula:
[0037] ;
[0038] in, Indicates i Fireflies in t+1 The position of the time step, Indicates i Fireflies in t The position of the time step, β represents the weight coefficient for moving to the brightness position, x birght Indicates the brighter position currently seen, α represents the random walk weight coefficient, γ Represents the weight coefficient for moving to the historical best position, x best Indicates the best historical position, rand() Represents a random number between 0 and 1.
[0039] A second aspect of an embodiment of the present invention provides a source-grid-load-carbon-storage integrated distribution network dispatching system, comprising:
[0040] The first unit is used to obtain the historical load demand of the power system, perform feature engineering on the time series data corresponding to the historical load demand to obtain time series features, randomly generate a training set and a test set based on the time series features, build an initial prediction model, train the initial prediction model through the training set, verify the performance of the trained initial prediction model through the test set to obtain a demand prediction model, and calculate the predicted power grid load demand through the demand prediction model in combination with the time series features;
[0041] The second unit is used to identify potential risks of the power system based on the predicted power grid load demand, classify the potential risks and construct a risk matrix based on the classification results, generate a backup capacity plan based on the risk matrix and in combination with existing risk management solutions and control measures, determine the backup capacity of the power system, and construct an objective function with the goal of maximizing the backup capacity;
[0042] The third unit is used to randomly generate an initial firefly population based on the objective function and in combination with a preset firefly algorithm. For each individual in the initial firefly population, the current position is taken as the historical best position and the fitness and brightness of each individual are calculated, the brightness is adaptively adjusted and the attraction and position between each individual are updated according to the updated brightness, the update is repeated until a preset number of iterations is reached, the individual with the highest brightness after the last iteration is selected as the optimal solution, the objective function is solved, and the spare capacity is obtained.
[0043] According to a third aspect of the embodiments of the present invention,
[0044] An electronic device is provided, comprising:
[0045] processor;
[0046] a memory for storing processor-executable instructions;
[0047] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0048] A fourth aspect of the embodiments of the present invention is:
[0049] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0050] In the present invention, the accuracy of the demand forecasting model is ensured by performing feature engineering on historical load demands and establishing a forecasting model. The model performance is verified using training sets and test sets, which helps to improve the credibility of the model in practical applications. The potential risks that the power system may face are effectively identified by classifying potential risks and constructing a risk matrix, which helps system managers to consider potential risk factors when formulating backup capacity planning and improve the resilience and response capabilities of the system. By combining the preset firefly algorithm, an objective function is constructed with the goal of maximizing backup capacity, and the optimal solution can be found in the search space to maximize the backup capacity. By using the adaptively adjusted brightness and iterative firefly algorithm, the adaptability of the algorithm to different problems and different stages is ensured, which helps to improve the robustness and stability of the algorithm and avoid premature convergence or falling into a local optimal solution. In summary, the present invention achieves comprehensive consideration and maximization of the backup capacity of the power system by integrating prediction, risk management and optimization algorithms, thereby improving the availability and resilience of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic flow chart of a source-grid-load-carbon-storage integrated distribution network dispatching method according to an embodiment of the present invention;
[0052] Figure 2 This is a structural schematic diagram of a source-grid-load-carbon-storage integrated distribution network dispatching system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0055] Figure 1 FIG. 1 is a flow chart of a method for dispatching a distribution network integrating source, grid, load and carbon storage according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0056] S1. Obtain the historical load demand of the power system, perform feature engineering on the time series data corresponding to the historical load demand to obtain time series features, randomly generate a training set and a test set based on the time series features, build an initial prediction model, train the initial prediction model through the training set, verify the performance of the trained initial prediction model through the test set to obtain a demand prediction model, and calculate the predicted power grid load demand through the demand prediction model in combination with the time series features;
[0057] The historical load demand refers to the actual electricity demand experienced by the power grid in a certain period of time in the past. The time series is a series of data points arranged in chronological order. The time series features are attributes extracted from the time series data that can represent or affect the behavior of the time series. The initial prediction model is the basic model established when the prediction work starts. The predicted power grid load demand refers to the use of historical load data, time series analysis methods and various prediction models (such as statistical models, machine learning models, deep learning models, etc.) to estimate the electricity demand of the power grid in a certain period of time in the future.
[0058] In an optional embodiment,
[0059] The method of obtaining the historical load demand of the power system, performing feature engineering on the time series data corresponding to the historical load demand to obtain time series features, randomly generating a training set and a test set based on the time series features, building an initial prediction model, training the initial prediction model through the training set, and verifying the performance of the trained initial prediction model through the test set to obtain a demand prediction model, and calculating the predicted power grid load demand through the demand prediction model in combination with the time series features includes:
[0060] Obtaining historical load demands of the current power grid from a database of the power system, extracting time series features from time series data corresponding to the historical load demands in units of hours based on the historical load demands, and generating hysteresis features at the same time;
[0061] Randomly generate a training set and a test set based on the time series feature and the lag feature, and separate feature values from labels;
[0062] Construct the initial prediction model based on the training set, determine the number of memory network layers of the initial prediction model, initialize the corresponding memory parameters for each memory network layer, add a deactivation layer after the memory network layer, randomly forget the output of the memory network layer through the deactivation layer, and add a fully connected layer and an output layer after the deactivation layer to obtain the initial prediction model;
[0063] Adding the elements of the training set to the initial prediction model, adjusting the parameters of the initial prediction model according to the output results, and repeating the training until every element in the training set is used;
[0064] The test set is added to the trained initial prediction model, and verification is performed according to the true label corresponding to each element in the test set, the mean square error corresponding to the model output result is calculated, and the mean square error is compared with a preset error threshold. If the mean square error is less than the error threshold, it is considered that the verification is passed, and the demand prediction model is obtained;
[0065] The time series characteristics are added to the demand forecasting model to obtain the predicted power grid load demand.
[0066] The lag feature is a feature engineering technology based on time series data, in which data from previous time points are used as predictive variables for subsequent time points. The feature value refers to a specific numerical value input into the model to represent a variable or observation in the data set. The label is the predicted target variable. The memory network layer is designed to process sequence data and can capture long-term dependencies in time series data. The inactivation layer is a technology used in deep learning models to prevent overfitting. The fully connected layer is a layer in a neural network in which each neuron is connected to all neurons in the previous layer. The mean square error is a commonly used loss function used to evaluate the difference between the model predicted value and the actual value.
[0067] Obtain the historical load demand data of the current power grid from the database of the power system, in hours, extract time series features from the time series data of historical load demand, including but not limited to seasonal factors, trends, cyclic fluctuations, etc., and generate lag features based on the time series, that is, use the past load demand value as an input variable for predicting future demand, for example, use the load demand of the previous 24 hours to predict the demand of the next hour;
[0068] Based on the extracted time series features and lag features, randomly generate training sets and test sets, separate feature values from labels, that is, process input variables (features) and output variables (i.e., future load demand, as a prediction target) separately, build an initial prediction model, determine the number of memory network layers to be used, initialize the memory parameters of each memory network layer, add a deactivation layer after each memory network layer, the deactivation layer randomly "discards" (i.e., temporarily ignores) a part of the network connection during the training process, add a fully connected layer to convert the output of the memory network layer into a final prediction result, finally add an output layer to output the prediction result, and obtain the initial prediction model;
[0069] Add the training set data to the model in batches for training. After each batch of training, adjust the model parameters to optimize performance. Repeat the above training process until all elements in the entire training set are used for training, and use the early stopping strategy to prevent overfitting.
[0070] The test set data is input into the trained model, and the mean square error is calculated using the model's prediction results and the true labels, and the calculated mean square error is compared with the preset error threshold. If the mean square error is less than the error threshold, the prediction performance of the model is considered acceptable, and the demand forecasting model is obtained. The time series feature data to be predicted is input into the verified demand forecasting model to obtain the corresponding predicted power grid load demand.
[0071] In this embodiment, by obtaining historical load demands from the database of the power system and extracting time series characteristics and lag characteristics, historical data is fully utilized to understand and predict future power grid load demands, ensuring that the prediction model can capture the dynamic characteristics of load demand changing over time, thereby improving the accuracy and reliability of the prediction. By randomly generating training sets and test sets and separating feature values from labels, it can be ensured that the model can perform well on unseen data, thereby enhancing the generalization ability of the model. The model is repeatedly trained and parameters are continuously adjusted to minimize the mean square error to ensure that the model can fit the training data as much as possible. At the same time, by comparing with a preset error threshold, the prediction performance of the model can be effectively controlled to ensure that the predetermined prediction accuracy standard is met. In summary, this embodiment not only improves the accuracy, robustness and generalization ability of the prediction model through efficient data processing and intelligent model training process, but also provides an efficient and reliable load demand prediction tool for power grid management, thereby supporting the optimized operation and decision-making of the power grid.
[0072] S2. Based on the predicted grid load demand, identify the potential risks of the power system, classify the potential risks and construct a risk matrix based on the classification results, generate a backup capacity plan based on the risk matrix, combine existing risk management solutions and control measures, determine the backup capacity of the power system, and construct an objective function with the goal of maximizing the backup capacity;
[0073] The potential risk refers to future events or conditions that may have a negative impact on projects, processes, or systems. The risk matrix is a tool for assessing and prioritizing risks, and is usually constructed through two dimensions: the likelihood (or frequency) of risk occurrence and the impact (or severity) when the risk occurs. The risk management program is a set of strategies and plans developed for identified risks, aimed at reducing or eliminating the impact of risks. The control measures refer to those strategies or behaviors implemented to reduce, control or eliminate identified risks. The reserve capacity planning is a key planning activity in the power system, aimed at ensuring that the system has sufficient power generation capacity to meet demand and maintain the reliability and stability of power supply when faced with unexpected situations (such as equipment failure, unexpected high load, etc.).
[0074] In an optional embodiment,
[0075] The method of identifying potential risks of the power system based on the predicted grid load demand, classifying the potential risks and constructing a risk matrix based on the classification results, generating a reserve capacity plan based on the risk matrix and combining existing risk management solutions and control measures, and determining the reserve capacity of the power system, and constructing an objective function with the goal of maximizing the reserve capacity includes:
[0076] Based on the predicted grid load demand and combined with the system characteristics of the power system, the system response under different load conditions and equipment states is simulated by power system simulation software, and the aging degree and maintenance records of key equipment are evaluated to comprehensively obtain the potential risks of the power system;
[0077] For the potential risks, determine the impact of each potential risk through qualitative analysis and construct a risk matrix, traverse the existing risk management plans and control measures and evaluate the effectiveness of each risk management plan and control measure respectively, strengthen the existing control measures based on the risk matrix and propose an improved risk management plan, generate a backup capacity plan, and determine the backup capacity under different risk conditions based on the backup capacity plan;
[0078] Taking the maximization of the reserve capacity as the goal, constraint conditions are set according to the state of power system equipment to construct an objective function.
[0079] The system characteristics refer to some important features and properties of the power system, which directly affect the operation and performance of the system. The key equipment refers to the key equipment or components in the power system that have an important impact on the operation and stability of the system. The aging degree refers to the degree to which the equipment gradually becomes old, worn or its performance degrades over time.
[0080] Using the established demand forecasting model, input the actual time series characteristics, predict the future grid load demand, use the power system simulation software, simulate the system under different load conditions and equipment states, evaluate the aging degree and maintenance records of key equipment, obtain equipment operation status information, combine the predicted grid load demand and system simulation results, identify potential risks, consider factors such as load conditions, equipment status, aging degree, etc., evaluate the impact of each potential risk through qualitative analysis, classify potential risks, use the results of qualitative analysis to build a risk matrix, and classify potential risks according to their impact and likelihood;
[0081] Traverse the current risk management plans and control measures, evaluate each plan and measure to determine its effectiveness in the current situation, strengthen the existing control measures based on the results of the risk matrix to ensure that they are adapted to the different levels of potential risks, propose improved risk management plans, including new monitoring systems, preventive maintenance plans, etc., generate backup capacity planning based on potential risks and demand forecast results to ensure that the system has sufficient backup capacity in the face of potential risks, determine the type and amount of backup capacity, including rotating and non-rotating reserves, and use backup capacity maximization as the objective function to ensure that the system has sufficient backup capacity under different risk situations, set constraints on the status of power system equipment, and ensure that the legality and feasibility of equipment operation are met while maximizing the backup capacity.
[0082] In this embodiment, by predicting the load demand of the power grid and simulating the system, combined with the system characteristics, the stability of the power system under different load conditions and equipment states can be comprehensively evaluated, which helps to discover potential risks that the system may face, including equipment aging, operating problems, etc. By quantitatively analyzing the potential risks of the power system and using the simulation results of the power system simulation software, the accuracy of potential risks can be improved. By generating a backup capacity plan, combined with potential risks, it can ensure that the allocation of backup capacity is more scientific and reasonable. Under different risk situations, the configuration of backup capacity can be flexibly adjusted to ensure the reliability and stability of the power system in the face of various challenges. In summary, this embodiment optimizes the backup capacity planning of the power system by comprehensively considering multiple factors such as load demand, equipment status, and potential risks, so as to improve the reliability and resilience of the system and reduce the impact of potential risks on the power system.
[0083] In an optional embodiment,
[0084] The objective is to maximize the reserve capacity, set constraints according to the power system equipment status, and construct an objective function as shown in the following formula:
[0085] ;
[0086] in, R Indicates the spare capacity, P max,i Indicates i The maximum power generation capacity of each power generation unit, η i Indicates i The efficiency of each power generation unit, D represents the predicted grid load demand, C env,i Represents the costs caused by environmental factors.
[0087] In this function, by maximizing the reserve capacity, the resilience and reliability of the system can be improved, ensuring that the system can still meet the load demand when facing uncertainty. When optimizing the reserve capacity, the system considers the potential power generation capacity and efficiency of each power generation unit, which helps to make full use of system resources. In the reserve capacity planning, the maximum capacity is pursued, and the environmental cost factor is also considered, which helps to ensure the balance of economic and environmental protection in the reserve capacity planning. By deducting the costs caused by environmental factors from the overall power generation cost, the objective function actually pursues the maximum reserve capacity while also, to a certain extent, pursuing the minimization of system operating costs, which helps to keep the system running efficiently while taking into account environmentally friendly operations.
[0088] S3. Based on the objective function and in combination with a preset firefly algorithm, an initial firefly population is randomly generated. For each individual in the initial firefly population, the current position is taken as the best historical position and the fitness and brightness of each individual are calculated. The brightness is adaptively adjusted and the attraction and position between each individual are updated according to the updated brightness. The update is repeated until a preset number of iterations is reached. The individual with the highest brightness after the last iteration is selected as the optimal solution, the objective function is solved, and the spare capacity is obtained.
[0089] The firefly algorithm is an optimization algorithm that simulates the behavior of firefly colonies in nature and is used to solve global optimization problems. The initial firefly population refers to an initial set of fireflies randomly generated when the algorithm starts executing. The historical best position is the best position recorded by each firefly during the search process. The brightness is usually an indicator of the fitness of the firefly in the search space or the value of the objective function.
[0090] In an optional embodiment,
[0091] Based on the objective function, combined with a preset firefly algorithm, an initial firefly population is randomly generated. For each individual in the initial firefly population, the current position is taken as the best historical position and the fitness and brightness of each individual are calculated. The brightness is adaptively adjusted and the attraction and position between each individual are updated according to the updated brightness. The update is repeated until a preset number of iterations is reached. The individual with the highest brightness after the last iteration is selected as the optimal solution. The objective function is solved to obtain the spare capacity, which includes:
[0092] Based on the objective function, in combination with a preset firefly algorithm, an initial firefly population is randomly generated, wherein each individual in the initial firefly population represents a solution for spare capacity, and the attraction coefficient and maximum number of iterations of the firefly algorithm are initialized;
[0093] For each individual in the initial firefly population, the current position is taken as the individual's best historical position, the fitness and brightness are calculated, based on the fitness and algorithm iteration progress, the brightness corresponding to each individual is adaptively adjusted, for each pair of fireflies, the attraction is calculated based on the brightness of each firefly and the attraction coefficient, based on the attraction and brightness, the firefly with lower brightness moves to the firefly with higher brightness, the position of each firefly is updated, the fitness corresponding to the updated position is calculated, and compared with the fitness corresponding to the best historical position, and the one with the larger fitness value is selected as the best position of the current firefly;
[0094] The iteration is repeated until a preset number of iterations is reached, and for each individual after the last update, the fitness value is calculated respectively, and the individual with the maximum fitness value is selected as the optimal solution, and the objective function is solved to obtain the spare capacity.
[0095] Based on the objective function, an initial firefly population is set, each individual represents a solution of spare capacity, and the attraction coefficient and the maximum number of iterations are initialized;
[0096] For each individual in the initial firefly population, the current position is taken as the individual's best historical position, and the fitness value of the individual is calculated, that is, the spare capacity is calculated according to the objective function, the brightness of the individual is calculated, and the brightness of each individual is adaptively adjusted according to the fitness and algorithm iteration progress. For each pair of fireflies, the attraction is calculated, where the calculation of the attraction is usually related to the brightness and the attraction coefficient. Based on the calculated attraction and brightness, the firefly with lower brightness is moved to the firefly with higher brightness, and the position of each firefly is updated. For each firefly, the fitness value corresponding to the updated position is calculated, and compared with the fitness value corresponding to the best historical position, and the position with a larger fitness value is selected as the best position of the current firefly;
[0097] The iterative process is repeated until the preset number of iterations is reached. For each individual after the last iteration, the fitness value is calculated, and the individual with the maximum fitness value is selected as the optimal solution. The optimal solution is substituted into the objective function to calculate the maximum spare capacity.
[0098] In this embodiment, through the attraction mechanism, fireflies with high brightness are more likely to be attracted by other fireflies, thereby prompting the solutions in the search space to converge to the global optimal solution more evenly, which helps to avoid falling into the local optimal solution and improve the global search performance of the algorithm. By adaptively adjusting the brightness, the algorithm takes into account the fitness of each individual and the algorithm iteration progress, making the search process more flexible and adaptable, and helping to adjust the search strategy at different stages, better explore and utilize the search space, and continuously updating the position and brightness of the fireflies. Trying to improve the solution in each iteration helps to gradually optimize the allocation of backup capacity and make it close to the optimal solution. In summary, this embodiment uses the firefly algorithm to perform iterative optimization in the search space. Through the concepts of attraction and brightness, the position of each firefly is continuously adjusted, and finally a solution that maximizes the backup capacity is obtained, which helps to improve the backup capacity of the power system and reduce the impact of potential risks on the system, thereby improving the performance and stability of the system.
[0099] In an optional embodiment,
[0100] Based on the fitness and algorithm iteration progress, the brightness corresponding to each individual is adaptively adjusted as shown in the following formula:
[0101] ;
[0102] in, birghtness i Indicates i The brightness value of a firefly, fitness i represents the fitness value, C it Indicates the current iteration number, max it Indicates the maximum number of iterations.
[0103] In this embodiment, by associating brightness with fitness value, the formula ensures that brightness increases with the improvement of individual fitness, which helps to highlight fireflies with higher fitness and prompts the algorithm to explore high fitness areas more intensively. As iterations proceed, the impact of brightness adjustment gradually decreases, which helps to focus more on global search in the initial stage of the algorithm and more on local search in the later stage. Brightness adjustment is more aggressive in the early stage of the algorithm, which helps to explore the solution space more extensively, and is more conservative in the later stage, which helps to make fine adjustments in local searches. In summary, this embodiment helps to improve the search capability of the algorithm, promote a balance between global search and local search, and avoid premature convergence.
[0104] In an optional embodiment,
[0105] Based on the attraction and brightness, the fireflies with lower brightness move toward the fireflies with higher brightness, and the position of each firefly is updated as shown in the following formula:
[0106]
[0107] in, Indicates i Fireflies in t+1 The position of the time step, Indicates i Fireflies in t The position of the time step, β represents the weight coefficient for moving to the brightness position, x birght Indicates the brighter position currently seen, α represents the random walk weight coefficient, γ Represents the weight coefficient for moving to the historical best position, x best Indicates the best historical position, rand() Represents a random number between 0 and 1.
[0108] In this embodiment, the weight coefficient moving toward the brightness position helps to guide the fireflies to move toward higher brightness in the search space, thereby hoping to find a better solution. The introduction of random perturbations helps to increase the diversity of the algorithm, avoid all fireflies moving in the same direction, and improve the exploratory nature of the algorithm. The weight coefficient moving toward the historical best position helps to remember the historical best solution and guide the fireflies to move in the direction where they have achieved success, which helps to jump out of the local optimal solution in the search space. In summary, this embodiment introduces the mechanisms of attraction, random perturbations, and historical information guidance to make fireflies more directional and flexible in the search space, thereby increasing the probability of the algorithm searching for a better solution in the solution space.
[0109] Figure 2 FIG. 1 is a schematic diagram of a structure of a source-grid-load-carbon-storage integrated distribution network dispatching system according to an embodiment of the present invention. Figure 2 As shown, the system comprises:
[0110] The first unit is used to obtain the historical load demand of the power system, perform feature engineering on the time series data corresponding to the historical load demand to obtain time series features, randomly generate a training set and a test set based on the time series features, build an initial prediction model, train the initial prediction model through the training set, verify the performance of the trained initial prediction model through the test set to obtain a demand prediction model, and calculate the predicted power grid load demand through the demand prediction model in combination with the time series features;
[0111] The second unit is used to identify potential risks of the power system based on the predicted power grid load demand, classify the potential risks and construct a risk matrix based on the classification results, generate a backup capacity plan based on the risk matrix and in combination with existing risk management solutions and control measures, determine the backup capacity of the power system, and construct an objective function with the goal of maximizing the backup capacity;
[0112] The third unit is used to randomly generate an initial firefly population based on the objective function and in combination with a preset firefly algorithm. For each individual in the initial firefly population, the current position is taken as the historical best position and the fitness and brightness of each individual are calculated, the brightness is adaptively adjusted and the attraction and position between each individual are updated according to the updated brightness, the update is repeated until a preset number of iterations is reached, the individual with the highest brightness after the last iteration is selected as the optimal solution, the objective function is solved, and the spare capacity is obtained.
[0113] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for dispatching a distribution network integrating source, grid, load and carbon storage, characterized in that: include: Obtain historical load demand of the power system, perform feature engineering on time series data corresponding to the historical load demand to obtain time series features, randomly generate training sets and test sets based on the time series features, build an initial prediction model, train the initial prediction model through the training set, verify the performance of the trained initial prediction model through the test set to obtain a demand prediction model, and calculate the predicted power grid load demand through the demand prediction model in combination with the time series features; Based on the predicted grid load demand, potential risks of the power system are identified, the potential risks are classified and a risk matrix is constructed based on the classification results, and based on the risk matrix, in combination with existing risk management solutions and control measures, a backup capacity plan is generated, the backup capacity of the power system is determined, and an objective function is constructed with the backup capacity maximization as the goal; Based on the objective function and in combination with a preset firefly algorithm, an initial firefly population is randomly generated. For each individual in the initial firefly population, the current position is taken as the best historical position and the fitness and brightness of each individual are calculated. The brightness is adaptively adjusted and the attraction and position between each individual are updated according to the updated brightness. The update is repeated until a preset number of iterations is reached. The individual with the highest brightness after the last iteration is selected as the optimal solution, the objective function is solved, and the spare capacity is obtained.
2. The method according to claim 1, characterized in that The method of obtaining the historical load demand of the power system, performing feature engineering on the time series data corresponding to the historical load demand to obtain time series features, randomly generating a training set and a test set based on the time series features, building an initial prediction model, training the initial prediction model through the training set, and verifying the performance of the trained initial prediction model through the test set to obtain a demand prediction model, and calculating the predicted power grid load demand through the demand prediction model in combination with the time series features includes: Obtaining historical load demands of the current power grid from a database of the power system, extracting time series features from time series data corresponding to the historical load demands in units of hours based on the historical load demands, and generating hysteresis features at the same time; Randomly generate a training set and a test set based on the time series feature and the lag feature, and separate feature values from labels; Construct the initial prediction model based on the training set, determine the number of memory network layers of the initial prediction model, initialize the corresponding memory parameters for each memory network layer, add a deactivation layer after the memory network layer, randomly forget the output of the memory network layer through the deactivation layer, and add a fully connected layer and an output layer after the deactivation layer to obtain the initial prediction model; Adding the elements of the training set to the initial prediction model, adjusting the parameters of the initial prediction model according to the output results, and repeating the training until every element in the training set is used; The test set is added to the trained initial prediction model, and verification is performed according to the true label corresponding to each element in the test set, the mean square error corresponding to the model output result is calculated, and the mean square error is compared with a preset error threshold. If the mean square error is less than the error threshold, it is considered that the verification is passed, and the demand prediction model is obtained; The time series characteristics are added to the demand forecasting model to obtain the predicted power grid load demand.
3. The method according to claim 1, characterized in that The method of identifying potential risks of the power system based on the predicted grid load demand, classifying the potential risks and constructing a risk matrix based on the classification results, generating a reserve capacity plan based on the risk matrix and combining existing risk management solutions and control measures, and determining the reserve capacity of the power system, and constructing an objective function with the goal of maximizing the reserve capacity includes: Based on the predicted grid load demand and combined with the system characteristics of the power system, the system response under different load conditions and equipment states is simulated by power system simulation software, and the aging degree and maintenance records of key equipment are evaluated to comprehensively obtain the potential risks of the power system; For the potential risks, determine the impact of each potential risk through qualitative analysis and construct a risk matrix, traverse the existing risk management plans and control measures and evaluate the effectiveness of each risk management plan and control measure respectively, strengthen the existing control measures based on the risk matrix and propose an improved risk management plan, generate a backup capacity plan, and determine the backup capacity under different risk conditions based on the backup capacity plan; Taking the maximization of the reserve capacity as the goal, constraint conditions are set according to the state of power system equipment to construct an objective function.
4. The method according to claim 1, characterized in that: The objective is to maximize the reserve capacity, set constraints according to the power system equipment status, and construct an objective function as shown in the following formula: ; in, R Indicates the spare capacity, P max,i Indicates i The maximum power generation capacity of each power generation unit, η i Indicates i The efficiency of each power generation unit, D represents the predicted grid load demand, C env,i Represents the costs caused by environmental factors.
5. The method according to claim 1, characterized in that Based on the objective function, combined with a preset firefly algorithm, an initial firefly population is randomly generated. For each individual in the initial firefly population, the current position is taken as the best historical position and the fitness and brightness of each individual are calculated. The brightness is adaptively adjusted and the attraction and position between each individual are updated according to the updated brightness. The update is repeated until a preset number of iterations is reached. The individual with the highest brightness after the last iteration is selected as the optimal solution. The objective function is solved to obtain the spare capacity, which includes: Based on the objective function, in combination with a preset firefly algorithm, an initial firefly population is randomly generated, wherein each individual in the initial firefly population represents a solution for spare capacity, and the attraction coefficient and maximum number of iterations of the firefly algorithm are initialized; For each individual in the initial firefly population, the current position is taken as the individual's best historical position, the fitness and brightness are calculated, based on the fitness and algorithm iteration progress, the brightness corresponding to each individual is adaptively adjusted, for each pair of fireflies, the attraction is calculated based on the brightness of each firefly and the attraction coefficient, based on the attraction and brightness, the firefly with lower brightness moves to the firefly with higher brightness, the position of each firefly is updated, the fitness corresponding to the updated position is calculated, and compared with the fitness corresponding to the best historical position, and the one with the larger fitness value is selected as the best position of the current firefly; The iteration is repeated until a preset number of iterations is reached, and for each individual after the last update, the fitness value is calculated respectively, and the individual with the maximum fitness value is selected as the optimal solution, and the objective function is solved to obtain the spare capacity.
6. The method according to claim 5, characterized in that Based on the fitness and algorithm iteration progress, the brightness corresponding to each individual is adaptively adjusted as shown in the following formula: ; in, birghtness i Indicates i The brightness value of a firefly, fitness i represents the fitness value, C it Indicates the current iteration number, max it Indicates the maximum number of iterations.
7. The method according to claim 5, characterized in that Based on the attraction and brightness, the fireflies with lower brightness move toward the fireflies with higher brightness, and the position of each firefly is updated as shown in the following formula: ; in, Indicates i Fireflies in t+1 The position of the time step, Indicates i Fireflies in t The position of the time step, β represents the weight coefficient for moving to the brightness position, x birght Indicates the brighter position currently seen, α represents the random walk weight coefficient, γ Represents the weight coefficient for moving to the best historical position, x best Indicates the best historical position, rand() Represents a random number between 0 and 1.
8. A source-grid-load-carbon-storage integrated distribution network dispatching system, used to implement a source-grid-load-carbon-storage integrated distribution network dispatching method as described in any one of claims 1 to 7, characterized in that: include: The first unit is used to obtain the historical load demand of the power system, perform feature engineering on the time series data corresponding to the historical load demand to obtain time series features, randomly generate a training set and a test set based on the time series features, build an initial prediction model, train the initial prediction model through the training set, verify the performance of the trained initial prediction model through the test set to obtain a demand prediction model, and calculate the predicted power grid load demand through the demand prediction model in combination with the time series features; The second unit is used to identify the potential risks of the power system based on the predicted power grid load demand, classify the potential risks and construct a risk matrix based on the classification results, generate a backup capacity plan based on the risk matrix and in combination with existing risk management solutions and control measures, determine the backup capacity of the power system, and construct an objective function with the goal of maximizing the backup capacity; The third unit is used to randomly generate an initial firefly population based on the objective function and in combination with a preset firefly algorithm. For each individual in the initial firefly population, the current position is taken as the historical best position and the fitness and brightness of each individual are calculated, the brightness is adaptively adjusted and the attraction and position between each individual are updated according to the updated brightness, the update is repeated until a preset number of iterations is reached, the individual with the highest brightness after the last iteration is selected as the optimal solution, the objective function is solved, and the spare capacity is obtained.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
