Intelligent planning and optimizing method for power system
Through the combination of LSTM neural network and deep Q network, the load prediction and scheduling optimization of power system are achieved, the efficiency and stability problems of traditional methods under complex constraints are solved, and the operation efficiency of the power grid and the service life of energy storage equipment are improved.
Patent Information
- Application Number
- CN202510361394.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-07-29
AI Technical Summary
Traditional power system scheduling methods are difficult to achieve efficient and stable resource allocation when facing complex constraints.
The LSTM neural network is used to predict load demand and a power scheduling model is constructed in combination with the deep Q network to generate the optimal planning strategy for generator sets, energy storage systems and load adjustment.
It realizes accurate prediction and optimized scheduling of power system loads, improves grid operation efficiency and stability, extends the life of energy storage equipment, reduces operation and maintenance costs, and ensures safe and stable operation of the system.
Smart Images

Figure CN120387535A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to an intelligent planning and optimization method for power systems. Background Art
[0002] The core task of power system scheduling is to rationally allocate power generation resources to ensure the reliability and economy of power supply. Traditional power scheduling methods mostly rely on optimization algorithms such as linear programming and dynamic programming. However, in the face of complex power systems and various constraints, traditional methods may not be able to fully cope. Therefore, more and more intelligent scheduling methods have been gradually proposed to improve the scheduling efficiency and stability of power systems. Summary of the Invention
[0003] In view of the deficiencies of the prior art, the present invention provides an intelligent planning and optimization method for power systems.
[0004] The intelligent planning and optimization method for power systems provided by the present invention is characterized by comprising the following steps:
[0005] S1: Collect operation status data in the power system, including electrical parameters, power generation data, load data, and charge and discharge states of energy storage devices;
[0006] S2: According to the load data and historical load data collected in step S1, use an LSTM neural network to predict the load demand of the power system within a preset time range;
[0007] S3: According to the predicted load demand, the operation status data, preset optimization objectives, and preset constraint conditions, use a deep Q network to construct a power scheduling model to obtain an optimal planning strategy, where the optimal planning strategy includes the output strategy of the generator set, the charge and discharge strategy of the energy storage system, and the load adjustment strategy;
[0008] S4: Send the optimal planning strategy to the dispatching center, and the dispatching center executes the optimal planning strategy.
[0009] Preferably, step S2 is specifically
[0010] Preprocess the load data and historical load data collected in step S1, including data cleaning, normalization processing, and feature extraction, and construct a training data set and a test data set according to the preprocessed historical load data;
[0011] Construct an LSTM neural network model, which includes an input layer, an LSTM layer, a fully connected layer, and an output layer. Among them, the input layer is used to receive the preprocessed load data, the LSTM layer is used to capture the correlation between the change of load data and time, the fully connected layer is used to map the output of the LSTM layer to the load demand within a preset time range, and the output layer is used to output the prediction result;
[0012] Use the training data set to train the LSTM neural network model, and optimize the parameters of the LSTM neural network model through the backpropagation algorithm until the prediction error of the LSTM neural network model on the training set is less than or equal to the first preset threshold;
[0013] Use the test data set to verify the trained LSTM neural network model. If the verification passes, input the real-time collected load data into the trained LSTM neural network model to predict the load demand of the power system within a preset time range.
[0014] Preferably, use the training data set to train the LSTM neural network model, and optimize the parameters of the LSTM neural network model through the backpropagation algorithm until the prediction error of the LSTM neural network model on the training set is less than or equal to the first preset threshold. Specifically,
[0015] Input the training data set into the LSTM neural network model;
[0016] Calculate the output of the LSTM neural network model through forward propagation to obtain the predicted load demand;
[0017] Calculate the error between the predicted load demand and the actual load demand, and quantify the error using a loss function. The loss function includes the mean square error;
[0018] Calculate the gradient of the loss function with respect to the parameters of the LSTM neural network model through the backpropagation algorithm. The parameters include the weight matrix and the bias vector;
[0019] Use an optimization algorithm to update the parameters of the LSTM neural network model to minimize the loss function;
[0020] If the prediction error of the LSTM neural network model on the training set is less than or equal to the first preset threshold, then proceed to step S3; if the prediction error is greater than the first preset threshold, then continue to optimize using the backpropagation algorithm.
[0021] Preferably, use the test data set to verify the trained LSTM neural network model. Specifically,
[0022] Input the test data set into the trained LSTM neural network model to obtain the prediction result of the load demand within a preset time range by the LSTM neural network model;
[0023] Calculate the error metrics between the prediction result and the actual load data in the test data set, including mean squared error, mean absolute error, and mean absolute percentage error;
[0024] Compare the error metrics with a second preset threshold; if all the error metrics are lower than the second preset threshold, it is determined that the LSTM neural network model passes the verification; otherwise, it is determined that the LSTM neural network model fails the verification;
[0025] If the LSTM neural network model passes the verification, it is used for real-time load demand prediction; if the LSTM neural network model fails the verification, adjust the structure of the LSTM neural network model or retrain the LSTM neural network model until the verification passes.
[0026] Preferably, step S3 specifically includes the following sub-steps:
[0027] S31: Use a deep Q-network to construct a power dispatching model. The power dispatching model includes an input layer, a hidden layer, and an output layer. The input layer is used to receive the predicted load demand, operation status data, preset optimization objectives, and preset constraint conditions. The hidden layer is used to process the input data, and the output layer is used to output the output strategy of the generating units, the charge and discharge strategy of the energy storage system, and the load adjustment strategy;
[0028] S32: Initialize the parameters of the deep Q-network, including the weight matrix and the bias vector, and set the learning rate, discount factor, and exploration rate;
[0029] S33: Through interaction with the environment, obtain the current state and the corresponding reward value. The current state includes the operation status data of the current power system, and the reward value is calculated according to the preset objectives and preset constraint conditions;
[0030] S34: Calculate the Q-value of each possible action according to the current state, and select the action with the maximum Q-value as the current optimal planning strategy;
[0031] S35: Execute the dispatching strategy according to the selected action, observe the new state and reward value, and update the parameters of the deep Q-network to make the Q-value gradually approach the optimal value;
[0032] S36: Repeat sub-step S33 to sub-step S35 until the power dispatching model converges to obtain the optimal planning strategy.
[0033] Preferably, updating the parameters of the deep Q-network is specifically:
[0034] Calculate the target Q value, where the target Q value is the sum of the current reward value and the product of the discount factor and the maximum Q value of the next state;
[0035] Calculate the error between the current Q value and the target Q value, and use the gradient descent method to update the parameters of the deep Q network to minimize the error.
[0036] Preferably, step S4 is specifically
[0037] Encode the optimal planning strategy into a scheduling instruction, where the scheduling instruction includes the output instruction of the generator set, the charge and discharge instruction of the energy storage system, and the load adjustment instruction;
[0038] Transmit the scheduling instruction to the scheduling center through the communication network;
[0039] After the scheduling center receives the scheduling instruction, parse and verify the scheduling instruction;
[0040] If the verification passes, send the parsed instruction to each execution unit, including the generator control unit, the energy storage control unit, and the load management unit;
[0041] Each execution unit performs corresponding operations according to the received instruction, including adjusting the output of the generator set, controlling the charge and discharge state of the energy storage system, and implementing load adjustment.
[0042] Preferably, verifying the scheduling instruction specifically includes checking whether the output of the generator set is within the allowable range, whether the charge and discharge power of the energy storage system exceeds the limit, and whether the load adjustment meets the user's requirements.
[0043] The present invention discloses an intelligent planning and optimization method for a power system, and its beneficial effects are as follows:
[0044] The intelligent planning and optimization method for a power system provided by the present invention can predict the load demand of the power system, which helps to more accurately plan power production and distribution; uses a deep Q network to construct a power dispatch model, comprehensively considers load demand, operating status, optimization objectives, and constraint conditions, generates an optimal planning strategy, realizes the coordinated optimization of power generation, energy storage, and load, improves the operation efficiency and stability of the power grid; optimizes the charge and discharge strategy of energy storage devices, avoids overcharging and over-discharging, extends the service life of energy storage devices, reduces the system operation and maintenance cost, sets optimization objectives and constraint conditions, ensures that the dispatch strategy meets the safety and stable operation constraints of the power system, and avoids system failures caused by improper dispatch. Efficiently convert the optimal planning strategy into a scheduling instruction and transmit it to the scheduling center through the communication network for execution, improving the transmission efficiency and execution accuracy of the scheduling instruction. Description of the Drawings
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0046] Figure 1 It is a method flow chart of the intelligent planning and optimization method for the power system provided by the present invention;
[0047] Figure 2 It is a sub-step flow chart of step S3 of the intelligent planning and optimization method for the power system provided by the present invention. Detailed implementation manners
[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0049] To better understand the above technical solutions, the following will describe the above technical solutions in detail in combination with the drawings in the specification and specific implementation manners.
[0050] Referring to Figure 1 , the intelligent planning and optimization method for the power system provided by the present invention includes the following steps:
[0051] S1: Collect the operation status data in the power system, including electrical parameters, generation data, load data, and the charge and discharge status of energy storage devices;
[0052] Among them, the electrical parameters of the power system are collected in real time through sensors and monitoring devices, including voltage, current, frequency, power factor, etc.; among them, the sensors and monitoring devices include voltage transformers, current transformers, power measurement devices, and frequency measurement devices, which are deployed at key nodes and lines of the power system. The generation data includes the output, fuel consumption, and efficiency of the generator sets; the charge and discharge status includes the remaining power, charge and discharge power, charge and discharge efficiency, and health status; the collected electrical parameters, generation data, load data, and the charge and discharge status of energy storage devices are preprocessed, including data cleaning, format conversion, and time synchronization; the preprocessed operation status data is stored in a database for use in subsequent steps S2 and S3.
[0053] S2: Based on the load data and historical load data collected in step S1, use an LSTM neural network to predict the load demand of the power system within a preset time range;
[0054] S3: According to the predicted load demand, operating state data, preset optimization objectives, and preset constraint conditions, use a deep Q-network to construct a power dispatch model to obtain an optimal planning strategy. The optimal planning strategy includes the output strategy of the generating units, the charge and discharge strategy of the energy storage system, and the load adjustment strategy. Among them, the preset optimization objectives include maximizing the grid stability and optimizing the use of energy storage devices, and the preset constraint conditions include the output limit of the generating units, the charge and discharge power limit of the energy storage system, the limit of load adjustment, and the safety and stable operation constraints of the power system;
[0055] S4: Send the optimal planning strategy to the dispatch center, and the dispatch center executes the optimal planning strategy.
[0056] The intelligent planning and optimization method for the power system provided by the present invention can predict the load demand of the power system, which helps to more accurately plan power production and distribution; use a deep Q-network to construct a power dispatch model, comprehensively consider the load demand, operating state, optimization objectives, and constraint conditions, generate an optimal planning strategy, realize the coordinated optimization of power generation, energy storage, and load, improve the operation efficiency and stability of the power grid; optimize the charge and discharge strategy of the energy storage device, avoid overcharging and over-discharging, extend the service life of the energy storage device, reduce the system operation and maintenance cost, set optimization objectives and constraint conditions, ensure that the dispatch strategy meets the safety and stable operation constraints of the power system, and avoid system failures caused by improper dispatch. Efficiently convert the optimal planning strategy into dispatch instructions and transmit them to the dispatch center for execution through a communication network, improving the transmission efficiency and execution accuracy of the dispatch instructions.
[0057] In a preferred embodiment, step S2 is specifically
[0058] Preprocess the load data and historical load data collected in step S1, including data cleaning, normalization processing, and feature extraction, and construct a training data set and a test data set according to the preprocessed historical load data;
[0059] Construct an LSTM neural network model. The model includes an input layer, an LSTM layer, a fully connected layer, and an output layer. Among them, the input layer is used to receive the preprocessed load data, the LSTM layer is used to capture the correlation between the change of load data and time, the fully connected layer is used to map the output of the LSTM layer to the load demand within a preset time range, and the output layer is used to output the prediction result;
[0060] Train the LSTM neural network model using the training dataset, and optimize the parameters of the LSTM neural network model through the backpropagation algorithm until the prediction error of the LSTM neural network model on the training set is less than or equal to the first preset threshold;
[0061] Validate the trained LSTM neural network model using the test dataset. If the validation passes, input the real-time collected load data into the trained LSTM neural network model to predict the load demand of the power system within the preset time range.
[0062] In the preferred embodiment, training the LSTM neural network model using the training dataset and optimizing the parameters of the LSTM neural network model through the backpropagation algorithm until the prediction error of the LSTM neural network model on the training set is less than or equal to the first preset threshold, specifically,
[0063] Input the training dataset into the LSTM neural network model;
[0064] Calculate the output of the LSTM neural network model through forward propagation to obtain the predicted load demand;
[0065] Calculate the error between the predicted load demand and the actual load demand, and quantify the error using a loss function. The loss function includes the mean square error;
[0066] Calculate the gradient of the loss function with respect to the parameters of the LSTM neural network model through the backpropagation algorithm. The parameters include the weight matrix and the bias vector;
[0067] Use an optimization algorithm such as Stochastic Gradient Descent (SGD) or Adam optimizer to update the parameters of the LSTM neural network model to minimize the loss function;
[0068] If the prediction error of the LSTM neural network model on the training set is less than or equal to the first preset threshold, proceed to step S3; if the prediction error is greater than the first preset threshold, continue to optimize using the backpropagation algorithm. The first preset threshold is set according to the actual application requirements.
[0069] In the preferred embodiment, validating the trained LSTM neural network model using the test dataset, specifically,
[0070] Input the test dataset into the trained LSTM neural network model to obtain the prediction results of the LSTM neural network model for the load demand within the preset time range;
[0071] Calculate the error metrics between the prediction results and the actual load data in the test dataset, including the mean square error, mean absolute error, and mean absolute percentage error;
[0072] Compare the error index with a second preset threshold; if all error indices are lower than the second preset threshold, it is determined that the LSTM neural network model passes the verification; otherwise, it is determined that the LSTM neural network model fails the verification;
[0073] If the LSTM neural network model passes the verification, it is used for real-time load demand prediction; if the LSTM neural network model fails the verification, the structure of the LSTM neural network model is adjusted or the LSTM neural network model is retrained until the verification passes.
[0074] Reference Figure 2 , in a preferred embodiment, step S3 specifically includes the following sub-steps,
[0075] S31: Use a deep Q-network to construct a power dispatching model. The power dispatching model includes an input layer, a hidden layer, and an output layer. The input layer is used to receive the predicted load demand, operating state data, preset optimization objectives, and preset constraint conditions. The hidden layer is used to process the input data, and the output layer is used to output the output strategy of the generator set, the charge and discharge strategy of the energy storage system, and the load adjustment strategy; among them, the output strategy of the generator set specifically includes that the thermal power unit increases output during peak load periods and decreases output during off-peak load periods, and the wind power unit and photovoltaic unit give priority to output when the power generation capacity is high; the charge and discharge strategy of the energy storage system specifically includes charging during off-peak load periods and discharging during peak load periods; the load adjustment strategy specifically includes enabling interruptible loads or demand response when the power supply is tight.
[0076] S32: Initialize the parameters of the deep Q-network, including the weight matrix and bias vector, and set the learning rate, discount factor, and exploration rate;
[0077] S33: By interacting with the environment, obtain the current state and the corresponding reward value. The current state includes the operating state data of the current power system, and the reward value is calculated according to the preset objectives and preset constraint conditions; by interacting with the environment and dynamically updating the model parameters, it can quickly adapt to the changes in the operating state of the power system, flexibly adjust the dispatching strategy, and ensure that the system can operate efficiently under different working conditions
[0078] S34: Calculate the Q value of each possible action according to the current state, and select the action with the maximum Q value as the current optimal planning strategy;
[0079] S35: Execute the dispatching strategy according to the selected action, observe the new state and reward value, and update the parameters of the deep Q-network to make the Q value gradually approach the optimal value;
[0080] S36: Repeat sub-step S33 to sub-step S35 until the power dispatching model converges to obtain the optimal planning strategy.
[0081] In a preferred embodiment, the parameters of the deep Q-network are updated. Specifically,
[0082] The target Q-value is calculated. The target Q-value is the sum of the current reward value and the product of the discount factor and the maximum Q-value of the next state.
[0083] The error between the current Q-value and the target Q-value is calculated, and the parameters of the deep Q-network are updated using the gradient descent method to minimize the error.
[0084] In a preferred embodiment, step S4 is specifically as follows.
[0085] The optimal planning strategy is encoded into a scheduling instruction. The scheduling instruction includes the output instruction of the generator set, the charge and discharge instruction of the energy storage system, and the load adjustment instruction.
[0086] The scheduling instruction is transmitted to the scheduling center through the communication network.
[0087] After receiving the scheduling instruction, the scheduling center parses and validates the scheduling instruction. A validation step is performed before sending the scheduling instruction to ensure that all operations are carried out within the safe range, avoiding potential safety hazards caused by misoperations.
[0088] If the verification passes, the parsed instruction is sent to each execution unit, including the generator control unit, the energy storage control unit, and the load management unit.
[0089] Each execution unit performs corresponding operations according to the received instruction, including adjusting the output of the generator set, controlling the charge and discharge state of the energy storage system, and implementing load adjustment.
[0090] In a preferred embodiment, the verification of the scheduling instruction specifically includes checking whether the output of the generator set is within the allowable range, whether the charge and discharge power of the energy storage system exceeds the limit, and whether the load adjustment meets the user's requirements.
Claims
1. An intelligent planning and optimization method for a power system, characterized in that, It includes the following steps: S1: Collect the operation status data in the power system, including electrical parameters, generation data, load data, and the charge and discharge status of energy storage devices; S2: According to the load data and historical load data collected in step S1, use the LSTM neural network to predict the load demand of the power system within a preset time range; S3: According to the predicted load demand, the operation status data, preset optimization objectives, and preset constraint conditions, use the deep Q network to construct a power dispatch model to obtain an optimal planning strategy, and the optimal planning strategy includes the output strategy of the generator set, the charge and discharge strategy of the energy storage system, and the load adjustment strategy; S4: Send the optimal planning strategy to the dispatch center, and the dispatch center executes the optimal planning strategy.
2. The intelligent planning and optimization method for a power system according to claim 1, characterized in that, Step S2 is specifically: Preprocess the load data and historical load data collected in step S1, including data cleaning, normalization processing, and feature extraction, and construct a training data set and a test data set according to the preprocessed historical load data; Construct an LSTM neural network model, and the model includes an input layer, an LSTM layer, a fully connected layer, and an output layer. Among them, the input layer is used to receive the preprocessed load data, the LSTM layer is used to capture the correlation between the change of load data and time, the fully connected layer is used to map the output of the LSTM layer to the load demand within a preset time range, and the output layer is used to output the prediction result; Use the training data set to train the LSTM neural network model, and optimize the parameters of the LSTM neural network model through the backpropagation algorithm until the prediction error of the LSTM neural network model on the training set is less than or equal to the first preset threshold; Use the test data set to verify the trained LSTM neural network model. If the verification is passed, input the real-time collected load data into the trained LSTM neural network model to predict the load demand of the power system within a preset time range.
3. The intelligent planning and optimization method for power systems according to claim 2, characterized in that Using the training data set to train the LSTM neural network model and optimizing the parameters of the LSTM neural network model through the backpropagation algorithm until the prediction error of the LSTM neural network model on the training set is less than or equal to the first preset threshold is specifically: Input the training data set into the LSTM neural network model; Calculate the output of the LSTM neural network model through forward propagation to obtain the predicted load demand; Calculate the error between the predicted load demand and the actual load demand, and use the loss function to quantify the error. The loss function includes the mean square error; Calculate the gradient of the loss function with respect to the parameters of the LSTM neural network model through the backpropagation algorithm, and the parameters include the weight matrix and the bias vector; Use the optimization algorithm to update the parameters of the LSTM neural network model to minimize the loss function; If the prediction error of the LSTM neural network model on the training set is less than or equal to the first preset threshold, go to step S3; if the prediction error is greater than the first preset threshold, continue to use the backpropagation algorithm for optimization.
4. The intelligent planning and optimization method for a power system according to claim 2, wherein Validate the trained LSTM neural network model using the test data set. Specifically, Input the test data set into the trained LSTM neural network model to obtain the prediction results of the load demand within a preset time range by the LSTM neural network model; Calculate the error metrics between the prediction results and the actual load data in the test data set, including mean square error, mean absolute error, and mean absolute percentage error; Compare the error metrics with a second preset threshold; if all the error metrics are lower than the second preset threshold, it is determined that the LSTM neural network model passes the validation; otherwise, it is determined that the LSTM neural network model fails the validation; If the LSTM neural network model passes the validation, it is used for real-time load demand prediction; if the LSTM neural network model fails the validation, adjust the structure of the LSTM neural network model or retrain the LSTM neural network model until the validation passes.
5. The intelligent planning and optimization method for a power system according to claim 1, characterized in that, The specific steps of step S3 are as follows: S31: Use a deep Q-network to construct a power dispatch model. The power dispatch model includes an input layer, a hidden layer, and an output layer. The input layer is used to receive the predicted load demand, operating state data, preset optimization objectives, and preset constraint conditions. The hidden layer is used to process the input data. The output layer is used to output the output strategies of the generator sets, the charge and discharge strategies of the energy storage system, and the load adjustment strategies; S32: Initialize the parameters of the deep Q-network, including the weight matrix and bias vector, and set the learning rate, discount factor, and exploration rate; S33: Obtain the current state and the corresponding reward value by interacting with the environment. The current state includes the operating state data of the current power system. The reward value is calculated according to the preset objectives and preset constraint conditions; S34: Calculate the Q-value of each possible action based on the current state and select the action with the maximum Q-value as the current optimal planning strategy; S35: Execute the dispatch strategy according to the selected action, observe the new state and reward value, and update the parameters of the deep Q-network to gradually approximate the Q-value to the optimal value; S36: Repeat sub-steps S33 to S35 until the power dispatch model converges to obtain the optimal planning strategy.
6. The intelligent planning and optimization method for a power system according to claim 5, characterized in that Update the parameters of the deep Q-network, specifically: Calculate the target Q-value, which is the sum of the current reward value and the product of the discount factor and the maximum Q-value of the next state; Calculate the error between the current Q-value and the target Q-value, and use the gradient descent method to update the parameters of the deep Q-network to minimize the error.
7. The intelligent planning and optimization method for a power system according to claim 1, characterized in that, The specific steps of step S4 are as follows: Encode the optimal planning strategy into dispatch instructions, which include the output instructions of the generator sets, the charge and discharge instructions of the energy storage system, and the load adjustment instructions; Transmit the dispatch instructions to the dispatch center through a communication network; After receiving the dispatch instructions, the dispatch center parses and validates the dispatch instructions; If the validation passes, the parsed instructions are sent to each execution unit, including the generator control unit, the energy storage control unit, and the load management unit; Each execution unit performs corresponding operations according to the received instructions, including adjusting the output of the generator set, controlling the charge and discharge state of the energy storage system, and implementing load adjustment.
8. The intelligent planning and optimization method of the power system according to claim 7, characterized in that Verify the scheduling instruction, specifically including checking whether the output of the generator set is within the allowable range, whether the charge and discharge power of the energy storage system exceeds the limit, and whether the load adjustment meets the user requirements.
Citation Information
Cited By
Electric power planning optimization method based on artificial intelligence
CN121073156A
An artificial intelligence-based power planning optimization method
CN121073156B