Power distribution network power control method and device based on model predictive control
Through the model prediction control method, the voltage control is used to control the distribution network neural network model, and the accuracy and efficiency of the distribution network power control are solved, and efficient distribution network power regulation and grid stability are achieved.
Patent Information
- Application Number
- CN202410933899.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-29
AI Technical Summary
The existing distribution network power control technology has problems such as insufficient accuracy, low computing efficiency and difficulty in obtaining dynamic models.
Using a model prediction control method, by obtaining the current system timing measurement data, using the pre-trained distribution network neural network model, the voltage control action sequence is calculated according to the target constraints and cost function, and the dynamics of distribution network power are realized. adjust.
It improves the accuracy and decision-making efficiency of power control in the distribution network, and can achieve efficient power control without relying on complex equipment types and parameter information, supporting energy conservation and power grid peak shaving of the distribution network.
Smart Images

Figure CN119050984A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power distribution network control, and in particular to a power distribution network control method and device based on model predictive control. Background Art
[0002] With the continuous development of science and technology, the complexity of distribution networks continues to increase. Coupled with the widespread popularization of renewable energy generation, the safe operation of the power system and the stable supply of electric energy are facing huge challenges. As a network that receives electric energy from the transmission network and distributes it to various users, the distribution network can reasonably control the loads in it, adjust the power consumed by the distribution network, improve energy utilization efficiency, achieve a balance between power supply and demand, and ensure the safe and stable operation of the power grid. For example, by adjusting the input voltage of the distribution network, the power consumed by it can be regulated to ensure a balance between power supply and demand.
[0003] Conservation Voltage Reduction (CVR) is a method to achieve energy saving by reducing the bus voltage of the substation. Most of the existing distribution network energy-saving and voltage reduction control technologies use static models to describe the relationship between bus voltage and load power, evaluate the energy-saving and voltage reduction effect, and select a reasonable voltage drop. Since the static model cannot accurately describe the dynamic characteristics of the distribution network load, voltage or power out-of-bounds situations are prone to occur during the voltage reduction process. On the other hand, a very small number of distribution network energy-saving and voltage reduction control technologies use distribution network dynamic models to improve control accuracy. However, this type of method requires accurate distribution network dynamic models and simulations based on physical mechanisms, which is not only very time-consuming, but also in the actual distribution network, user equipment is diverse and the operation scenarios are complex, making it extremely difficult to obtain a dynamic model with sufficient accuracy. Summary of the invention
[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0005] In view of the above problems or problems existing in the prior art, the present invention is proposed.
[0006] Therefore, the technical problem solved by the present invention is that the prior art has the problems of insufficient power control accuracy of the distribution network, low calculation efficiency and difficulty in obtaining a dynamic model.
[0007] To solve the above technical problems, the present invention provides the following technical solutions: a distribution network power control method based on model predictive control, which comprises obtaining a current system timing measurement of a distribution network system to be controlled at a current moment, wherein the current system timing measurement comprises at least system voltage, active power and reactive power;
[0008] Based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set active power output expected value, control interval, and prediction interval, and using the target constraint condition, the voltage control action sequence is obtained by minimizing the target cost function;
[0009] Wherein, the target constraint condition includes at least a target cost function and a safe operation condition, the prediction interval includes the number of time steps to be considered for solving the control action, the control interval includes the length of the time step, and the distribution network neural network model is obtained by training based on a deep neural network using simulation data of the distribution network system;
[0010] Execute the first control action in the voltage control action sequence.
[0011] As a preferred solution of the distribution network power control method based on model predictive control of the present invention, wherein: the training based on the deep neural network using the simulation data of the distribution network system includes:
[0012] Build a distribution network simulation model based on the distribution network system to be controlled;
[0013] Acquire training data based on the distribution network simulation model to obtain a training data set, wherein the training data at least includes an effective value of an input voltage, a phase angle, active power, and reactive power;
[0014] According to the training data set, the parameters of the pre-constructed distribution network neural ordinary differential equation are updated using the gradient descent method to obtain a distribution network neural network model;
[0015] The input of the distribution network neural ordinary differential equation is the effective value and phase angle of the input voltage, and the output is active power and reactive power. The pre-constructed distribution network neural ordinary differential equation includes an input layer, an output layer and three hidden layers.
[0016] As a preferred solution of the distribution network power control method based on model predictive control of the present invention, the target cost function includes:
[0017]
[0018] The safe operating conditions include:
[0019] 0.9 <V(p.u.) i<1.1,
[0020] in, is the predicted value of active power, obtained by neural network operation; i represents the i-th time step; k represents the time step at which model predictive control starts; N is the number of future time steps included in the prediction interval; P ref is the expected value of active power; V(pu) is the voltage per unit value; α is the first weight; β is the second weight; V(pu) i is the voltage per unit value.
[0021] As a preferred solution of the distribution network power control method based on model predictive control described in the present invention, wherein: the distribution network neural network model based on pre-training, according to the current system timing measurement and the pre-set active power output expected value, control interval, prediction interval, using the target constraint conditions, by minimizing the target cost function to obtain the voltage control action sequence, specifically including:
[0022] Constructing a control voltage vector and an active power prediction value vector; wherein the control voltage vector includes the value of the control voltage at each time step in the prediction interval, and the active power prediction value vector includes the prediction value of the active power at each time step in the prediction interval;
[0023] Using the current system timing measurement, the distribution network neural network model is expressed as a function between the control voltage vector and the active power prediction value vector to obtain a model function;
[0024] Based on the model function, using the expected value of active power output, the target cost function is expressed as a function of a control voltage vector to obtain a target function;
[0025] The objective function is minimized to obtain a voltage control action sequence.
[0026] As a preferred solution of the distribution network power control method based on model predictive control described in the present invention, wherein: based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set active power output expected value, control interval, and prediction interval, using the target constraint conditions, the voltage control action sequence is obtained by minimizing the target cost function, specifically including:
[0027] Constructing a control voltage vector and an active power prediction value vector; wherein the control voltage vector includes the value of the control voltage at each time step in the prediction interval, and the active power prediction value vector includes the prediction value of the active power at each time step in the prediction interval;
[0028] Using the control interval and the current system timing measurement, the distribution network neural network model is locally linearized to obtain the relationship between the control voltage vector and the active power prediction value vector;
[0029] Based on the relationship between the control voltage vector and the active power prediction value vector, converting the target constraint condition into a quadratic programming problem of the control voltage vector to obtain a coefficient matrix;
[0030] The coefficient matrix is calculated using a preset algorithm to obtain a voltage control action sequence.
[0031] As a preferred solution of the distribution network power control method based on model predictive control of the present invention, wherein: the execution of the first control action in the voltage control action sequence also includes:
[0032] Obtain the system parameters of the distribution network system at the next moment, and calculate the voltage control action sequence at the next moment using the target constraint conditions according to the preset active power output expected value, control interval, prediction interval and system parameters at the next moment;
[0033] Execute the first control action in the voltage control action sequence at the next moment.
[0034] The present invention also provides a distribution network power control device based on model predictive control, comprising: an acquisition unit, used to acquire a current system timing measurement of a distribution network system to be controlled at a current moment, wherein the current system timing measurement at least includes system voltage, active power and reactive power;
[0035] A calculation unit, for obtaining a voltage control action sequence by minimizing a target cost function based on a pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set expected value of active power output, the control interval, and the prediction interval, using target constraints; wherein the target constraints include at least a target cost function and a safe operation condition, the prediction interval includes the number of time steps required to solve the control action, the control interval includes the length of the time step, and the distribution network neural network model is obtained by training based on a deep neural network using simulation data of the distribution network system;
[0036] The execution unit is used to execute the first control action in the voltage control action sequence.
[0037] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a distribution network power control method based on model predictive control as described in any one of the above is implemented.
[0038] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for controlling power of a distribution network based on model predictive control as described in any one of the above is implemented.
[0039] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for controlling power of a distribution network based on model predictive control.
[0040] Beneficial effects of the invention: The invention proposes a distribution network power control technology based on model predictive control, which adopts a deep learning method. It does not need to obtain the complex equipment types and parameter information inside the distribution network. It can establish a distribution network dynamic model that describes the relationship between the active power of the distribution network and the bus voltage by relying only on the distribution network port measurement data, and construct a model predictive control framework based on a deep learning dynamic model. While maintaining the accuracy of the energy-saving and voltage-reducing control strategy, it significantly improves the decision-making efficiency, realizes accurate and efficient distribution network power control, supports energy-saving operation of the distribution network, and participates in the peak load regulation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0042] Figure 1 The flowchart of the power control method of distribution network based on model predictive control is shown in FIG.
[0043] Figure 2 Schematic diagram of the distribution network neural ordinary differential equation structure of the distribution network power control system based on model predictive control.
[0044] Figure 3 It is the voltage simulation curve of the distribution network simulation model of the distribution network power control system based on model predictive control.
[0045] Figure 4 Schematic diagram of the change of the training loss function of the distribution network neural network model of the distribution network power control system based on model predictive control.
[0046] Figure 5 It is the voltage simulation curve of the distribution network simulation model of the distribution network power control system based on model predictive control.
[0047] Figure 6 Schematic diagram of the change of the training loss function of the distribution network neural network model of the distribution network power control system based on model predictive control.
[0048] Figure 7 A schematic diagram of the process of using simulation model testing for distribution network power control system based on model predictive control.
[0049] Figure 8 It is a structural schematic diagram of the power control device of the distribution network based on model predictive control.
[0050] Fig. 9 A schematic diagram of the structure of an electronic device.
[0051] Reference numerals:
[0052] 210: acquisition unit; 220: calculation unit; 230: execution unit;
[0053] 310: processor; 320: communication interface; 330: memory; 340: communication bus DETAILED DESCRIPTION
[0054] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0055] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0056] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0057] Example 1
[0058] Reference Figures 1 to 7 , as an embodiment of the present invention, provides a distribution network power control method based on model predictive control, comprising:
[0059] Figure 1 is a flow chart of a distribution network power control method based on model predictive control provided by the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0060] Step 110: Obtain current system timing measurements of the distribution network system to be controlled at the current moment, wherein the current system timing measurements at least include system voltage, active power, and reactive power.
[0061] Assume that the current time of the system is 0, and obtain the current system timing measurement of the distribution network system to be controlled according to the measurement. The current system timing measurement at least includes: current voltage V0, current active power P0, and current reactive power Q0.
[0062] Step 120: Based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set expected value of active power output, control interval, and prediction interval, using the target constraint conditions, the voltage control action sequence is obtained by minimizing the target cost function; wherein the target constraint conditions at least include the target cost function and the safe operation condition, the prediction interval includes the number of time steps to be considered for solving the control action, the control interval includes the length of the time step, and the distribution network neural network model is obtained by training based on a deep neural network using simulation data of the distribution network system.
[0063] Specifically, the premise of reasonable control of the distribution network is to establish an accurate and reliable mathematical model of the distribution network. As the distribution network becomes increasingly complex, traditional distribution network modeling methods (such as the ZIP+IM method) can no longer meet the current demand for accurate control of the distribution network, and it is urgent to find a new load modeling method to accurately model the distribution network.
[0064] At present, load modeling methods include modeling methods based on electrical components and modeling methods based on measurement data. Modeling based on electrical components is to model each component and then combine them. This method is also called a white box model. This modeling method is extremely cumbersome. If it is used to model a large distribution network, it will bring a huge workload and require high computing power when running the model. In addition, in practical applications, staff generally cannot fully understand all the power sources and loads in the entire distribution network, let alone model them one by one. Therefore, this method is completely impractical in application. At present, the modeling method based on measurement data is widely used in distribution network modeling. According to the need for prior knowledge of the system and the amount of physical meaning of the model, it can be divided into two categories: gray box model and black box model. Compared with gray box models, black box models usually have higher accuracy, but lack transparency and interpretability, and have no physical meaning.
[0065] Based on this, the present invention provides a new distribution network neural network model based on deep learning, and uses a model predictive control method based on the model to perform power control on the distribution network.
[0066] The distribution network neural network model provided by the present invention is constructed and trained based on the Neural Ordinary Differential Equation. Specifically, considering the load characteristics of the distribution network, that is, the relationship between the consumed power and the port voltage, the mathematical model corresponding to the distribution network neural network model can be expressed as:
[0067]
[0068] Among them, the state variable x is the output of the neural network model, which includes the active power P and reactive power Q consumed by the distribution network, that is, x = [P, Q], z is the input of the model, including the effective value Vrms and phase angle δ of the line voltage at the input end of the distribution network, that is, z = [Vrms, δ], and θ is the model parameter. The parameter θ of the neural network model can be trained using a data set consisting of a large number of sampled data of x and z.
[0069] Furthermore, the simulation data of the distribution network system is used to train the parameters θ of the neural network model. It should be noted that the training goal is to minimize the error between the predicted value and the measured value of x. In the specific operation process, the back propagation and gradient descent methods are used to optimize the neural network parameters θ to obtain the distribution network neural network model. The purpose of establishing the model is to better optimize the control of the distribution network.
[0070] After obtaining the distribution network neural network model, the model predictive control (MPC) method is used to control the power of the distribution network. The MPC method can better adapt to the changes and uncertainties of the system while ensuring the stability of the system. Specifically, MPC is a control method based on a dynamic model. In each control interval, the model is used to predict the future behavior of the controlled variable, and the optimal control action is selected and executed based on the minimization of a predefined cost function.
[0071] Based on the model predictive control method, the port voltage of the distribution network is taken as the controlled variable, the total active power consumed by the distribution network is taken as the controlled variable, the expected value of active power output, the control interval and the prediction interval are set in advance, and the input voltage that can make the power consumption of the distribution network close to the expectation and minimize the target cost function is calculated to obtain the voltage control action sequence.
[0072] The target cost function consists of power error cost and voltage fluctuation cost. The former is used to measure the error between the active power prediction value and the expected value of active power output, and the latter is used to measure the cost required to achieve the expected power value, that is, the voltage fluctuation relative to the steady state. When using, the two parts can be weighed by adjusting the weight values α and β of the two parts. It should be noted that the active power prediction value is obtained by the distribution network neural network model.
[0073] Since the computational efficiency of the simplex-based search algorithm is too low to meet the needs of rolling optimization, the present invention locally linearizes the distribution network neural network model when calculating the voltage control action sequence, and converts the problem of minimizing the calculation target cost function into a standard quadratic programming form, which greatly improves the solution speed of the control voltage.
[0074] Step 130: Execute the first control action in the voltage control action sequence.
[0075] After obtaining the voltage control action sequence, the first control action in the voltage control action sequence is executed, and the power changes accordingly, and the power control result is obtained. In the specific implementation process, the distribution network system is adjusted so that the bus port voltage is the first voltage value in the voltage control action sequence. This control is completed.
[0076] Based on the above embodiment, in the method, a distribution network neural network model is obtained by training the simulation data of the distribution network system based on a deep neural network, which specifically includes:
[0077] Build a distribution network simulation model based on the distribution network system to be controlled;
[0078] Acquire training data based on the distribution network simulation model to obtain a training data set, wherein the training data at least includes an effective value of an input voltage, a phase angle, active power, and reactive power;
[0079] According to the training data set, the parameters of the pre-constructed distribution network neural ordinary differential equation are updated using the gradient descent method to obtain a distribution network neural network model;
[0080] The input of the distribution network neural ordinary differential equation is the effective value and phase angle of the input voltage, and the output is active power and reactive power. The pre-constructed distribution network neural ordinary differential equation includes an input layer, an output layer and three hidden layers.
[0081] Specifically, first, a distribution network simulation model is built based on the distribution network system. Training data is obtained due to the need for training the model. The present invention uses a simulation model to provide data for the training of the neural network. Specifically, certain improvements are made on the basis of the IEEE-33 node distribution network, and photovoltaic microgrids and constant impedance loads are added to the corresponding nodes according to the distribution network system to be controlled to build a distribution network simulation model. In some embodiments, the CloudPSS platform is selected to build a distribution network simulation model.
[0082] Based on the established distribution network simulation model, training data is obtained to obtain a training data set. There are two main methods for obtaining training data: (1) performing multiple short-term simulations and capturing a section in each simulation to form a training data set; (2) performing fewer long-term simulations, capturing a longer simulation curve in each simulation, and constructing a training data set after cutting it according to a certain length. Furthermore, for the distribution network system with a single disturbance scenario, method (1) is used to obtain training data; for the distribution network system with a continuous disturbance scenario, that is, the distribution network system close to the actual scenario, method (2) is used to obtain training data. Furthermore, after using the CloudPSS platform to build a distribution network simulation model, since the platform provides a model encapsulated based on the CloudPSS-API and a software development kit CloudPSSSDK, a large amount of simulation data can be automatically obtained by writing a python script to call the platform for simulation.
[0083] After obtaining the training data set, the pre-constructed distribution network neural ordinary differential equation is trained. It should be noted that the distribution network neural ordinary differential equation is constructed based on the system characteristics of the distribution network system to be controlled, such as Figure 2 shown.
[0084] Due to the excellent characteristics of Neural Ordinary Differential Equations in describing continuous-time systems, the present invention uses Neural Ordinary Differential Equations to model the distribution network system. The distribution network model mainly needs to consider the load characteristics of the distribution network, that is, the relationship between the consumed power and the port voltage. Therefore, all the data required in the model establishment process are taken from the input end of the distribution network, including the effective value and phase angle of the input voltage, active power and reactive power. The distribution network is mainly composed of two types of loads, constant power and constant impedance, and photovoltaic power sources. During the modeling process, various parameters inside the distribution network remain unchanged.
[0085] In this case, the mathematical model corresponding to the distribution network ordinary differential equation can be expressed as:
[0086]
[0087] Among them, the state variable x is the output of the neural network model, which includes the active power P and reactive power Q consumed by the distribution network, that is, x = [P, Q], z is the input of the model, including the effective value Vrms and phase angle δ of the line voltage at the input end of the distribution network, that is, z = [Vrms, δ], and θ is the model parameter.
[0088] Given the initial value of the state variable x and the integration step Δt, the value of x at each moment can be easily solved by numerical integration method. Taking the simplest Euler method as an example, the mathematical model corresponding to the distribution network ordinary differential equation can be gradually integrated to obtain the sequence of x:
[0089] x(t+Δt)=x(t)+Δt·f(x(t),z(t))
[0090] The parameters θ of the neural network model can be trained using a data set consisting of a large number of sampled data of x and z. The training goal is to minimize the error between the predicted value and the measured value of x. The optimization function of the model parameters is as follows:
[0091]
[0092] Where N represents the total number of samples, x i represents the measured value of the output quantity x, Represents the predicted value of the output quantity x.
[0093] In actual operation, the distribution network neural ordinary differential equation receives the values of x and z at the current moment, calculates to obtain the derivative of x at the current moment, and then obtains the value of x at the next moment x(t+Δt) through numerical integration method, and returns to the input end of the distribution network neural ordinary differential equation as the input of the next calculation, and participates in a new round of calculation with the value of z at the next moment, and repeats this cycle to obtain the predicted value of the state variable x at each moment. It should be noted that the distribution network neural ordinary differential equation uses a five-layer deep neural network, including an input layer, an output layer and three hidden layers. The input layer receives x and z at the current moment, and the output layer is responsible for outputting the derivative of the state variable x. In some embodiments, the number of neurons in the hidden layer is 512.
[0094] Based on this, according to the training data set, the gradient descent method is used to update the parameters of the distribution network neural ordinary differential equation to obtain the distribution network neural network model.
[0095] Furthermore, the mini-batch gradient descent method in the gradient descent method is used to train the distribution network neural ordinary differential equation, that is, a small batch of training samples is randomly selected in each iteration to calculate the gradient. This method combines the advantages of batch gradient descent and stochastic gradient descent, and can balance computational efficiency and convergence stability, but it requires manual adjustment of the batch size.
[0096] In some embodiments, the pytorch adam optimizer is used to train the distribution network neural ordinary differential equation. The specific training process is as follows:
[0097] First, import the training data set into the model training program and give parameters such as the total number of samples N, the number of training rounds E, the evaluation interval, the learning rate, the learning rate reduction rate, and the batch size = n. The training will be carried out for a total of E rounds, and each round of training will be carried out in N / n steps.
[0098] In each training step, firstly, n samples are extracted from the data set, and these samples are input into the neural network model after the previous training for forward propagation and numerical integration to obtain the predicted value of the output x, and then the value of the loss function can be obtained. Then, back propagation is performed, and the partial derivative of the loss function with respect to each layer parameter, i.e., the gradient, is calculated using the derivative chain rule. Then, each parameter in the neural network is subtracted from its gradient and multiplied by the learning rate. As the number of training rounds increases, the model parameters will gradually approach the optimal solution, and then the distribution network neural network model is obtained.
[0099] In addition, in order to prevent the obtained result from oscillating around the optimal solution or jumping over the optimal value and falling into a local minimum, the present invention also includes: setting a learning rate decay during training, and reducing the learning rate at a fixed ratio after each certain number of training rounds.
[0100] In some embodiments, after obtaining the distribution network neural network model, the method further includes: testing the obtained distribution network neural network model.
[0101] Furthermore, the present invention provides two embodiments of training and testing a distribution network neural network model in a single disturbance scenario and a continuous disturbance scenario.
[0102] In one embodiment, a fault voltage source is used to cause a fault at a set time, so that its output voltage jumps to simulate a single disturbance scenario. At this time, the voltage and power simulation curves obtained by the distribution network simulation model are as follows: Figure 3 As shown. Multiple simulations are required to obtain the data required for training. In each simulation, the initial value of the effective value of the voltage source output line voltage is randomly selected between 12.661.20.95kV and 12.661.21.05kV. When the simulation is carried out to 1s, the output voltage of the voltage source jumps and becomes 90%-110% (random within the interval) of the initial value of the current simulation voltage. Since each simulation requires a startup time of about 0.2s, the data from the simulation run to 0.5s-1.5s is intercepted for model training. In actual application scenarios, node voltage, power and other data within the distribution network are not easy to obtain. Therefore, all training data are taken from the input end of the distribution network. The input end line voltage effective value, line voltage phase angle, active power and reactive power are used for model training.
[0103] A total of 1000 simulations were performed. When checking the data set, 5 bad samples were found. Therefore, a total of 995 sets of usable data were obtained. The training set and the test set were divided according to a ratio of 4:1. The training set contained 796 samples and the test set contained 199 samples. The total number of training rounds was set to 600 rounds, batch size = 32, the initial learning rate was 0.007, and the learning rate decay was set to 0.7 times the original learning rate every 60 rounds. The loss function selected the mean square error MSE, and the training program was run to obtain the distribution network neural network model.
[0104] The distribution network neural network model trained by this method can accurately characterize the load characteristics of the distribution network under a single disturbance scenario. The relative error between the model prediction result and the simulation = (simulation value - model prediction value) / simulation value. Through the above simulation, it can be concluded that the maximum relative error of active power does not exceed 0.5%, and the maximum relative error of reactive power does not exceed 1%, and the error has reached a relatively low level. In addition, the change of the loss function also proves this point. The loss function curve during the training process is shown in Figure 4 As shown, at the end of training, loss = 8.98039876 × 10 -5 , has reached an extremely low level.
[0105] In another embodiment, a controlled voltage source element in CloudPSS is used to introduce a continuously fluctuating voltage at the distribution network port to simulate a continuous disturbance scenario, which is a simulation of an actual scenario. The controlled voltage source element includes two input terminals, input terminal 1 controls the phase voltage amplitude of the output voltage of the controlled voltage source, and input terminal 2 controls the phase angle of the output voltage. In this modeling, the change of the output voltage phase angle is not involved, so input terminal 2 is grounded. The signal at input terminal 1 comes from the sum of the signals generated by two random number generators and a step signal generator. The step signal generator stably outputs a signal with a default value of 12.404214 from time 0. One of the random number generators generates a random number between -0.08 and 0.08 at a frequency of 10Hz, and a relatively smooth high-frequency continuous disturbance is obtained after a second-order filtering process. The other generates a random number between -1.2 and 1.2 at a frequency of 0.1Hz to add a low-frequency larger disturbance to the input voltage of the distribution network. Add the three sets of signals and connect them to the input terminal 1 of the controlled voltage source to obtain a more ideal continuously fluctuating voltage waveform. It should be noted that the input of the input terminal 1 of the controlled voltage source is equal to the phase voltage amplitude output by the voltage source. When the phase voltage amplitude is 12.404214, the effective value of the primary line voltage of the transformer is approximately 15.192 kV, and the effective value of the secondary line voltage is approximately 12.66 kV.
[0106] At this time, the simulated voltage curve is as follows Figure 5As shown in the figure, the voltage is always in a small fluctuation, and a large voltage fluctuation will occur every 10s. The distribution network simulation model can also give an accurate power response as the voltage fluctuates.
[0107] When obtaining the training data set, multiple simulations are required. Unlike the single disturbance scenario, in order to be as close to the actual distribution network as possible, a small number of long-term simulations are performed, and then the simulation data is divided for training. In the process of obtaining data, a total of 50 simulations with a length of 53 seconds were performed. The voltage base value of the simulation (the output of the step signal generator mentioned above) was between 0.95-1.05 times the default value. 2s-52s of each simulation were taken, and the data was divided into 2.5s width. In each simulation, 20 segments of 2.5s data can be obtained, which are divided into training sets and test sets according to the ratio of 4:1, that is, 16 segments are taken as training sets and 4 segments are taken as test sets. A total of 2500s of data are obtained from 50 simulations, with a total of 1000 segments, of which 800 segments are training sets and 200 segments are test sets. Since the large disturbance was set at a frequency of 0.1Hz before, the ratio of data segments containing large disturbances to data segments without large disturbances in the obtained data is 1:3. The total number of training rounds is set to 600, batch size = 32, the initial learning rate is 0.007, the learning rate decay is set to 0.7 times the original learning rate every 60 rounds, the mean square error MSE is selected as the loss function, and the training program is run to obtain the distribution network neural network model. Comparing the model prediction results with the simulation, it can be seen that the obtained distribution network neural network model can accurately characterize the load characteristics of the distribution network under continuous disturbance scenarios, and even perform better than simple single disturbance scenarios. By calculating the relative error between the model prediction results and the simulation, it can be obtained that the maximum relative error of active power does not exceed 0.35%, and the maximum relative error of reactive power does not exceed 0.3%. The error is smaller than that in the single disturbance scenario. It is judged that in the continuous disturbance scenario, the continuous fluctuation of voltage masks the abnormal fluctuation caused by the internal control logic of the constant power device, so the trained model has a smaller error. The change of the loss function during the training process is as follows Figure 6 As shown in the figure, at the end of the training, the loss function loss = 0.00130803. Considering that the data segment used in this training is relatively long, this error is already at a relatively small level.
[0108] It can be seen that the distribution network neural network model trained by the method provided by the present invention has a high accuracy rate.
[0109] It should be noted that the training process in the above text is based on the pre-built distribution network neural ordinary differential equations, that is, the internal structure of the distribution network has not changed. If the internal structure of the distribution network has changed to a certain extent, the model needs to be updated. When updating the model, there is no need to start model training from scratch. You only need to collect data from the current distribution network and train on the basis of the original model, which can save training time to the greatest extent. After testing, when updating the model based on the original model and the internal structure of the distribution network does not change much, an accurate model can be obtained after 50 rounds of training. The training time on the GTX1650 graphics card is about 1 hour, which can meet the needs of rolling training.
[0110] Based on the Neural Ordinary Differential Equation, the present invention proposes a new distribution network neural network model, which can accurately express the relationship between the power consumption of the distribution network and the port voltage. In the process of building the distribution network simulation model, the present invention improves the IEEE-33 node distribution network model, uses simulation data to model the distribution network in two scenarios, and proves the accuracy of the neural network model by comparing with the simulation results.
[0111] Based on the above embodiment, in this method, the target cost function includes:
[0112]
[0113] The safe operating conditions include:
[0114] 0.9 <V(p.u.) i <1.1
[0115] in, is the predicted value of active power, obtained by neural network operation; i represents the i-th time step; k represents the time step at which model predictive control starts; N is the number of future time steps included in the prediction interval; P ref is the expected value of active power; V(pu) is the voltage per unit value; α is the first weight; β is the second weight; V(pu) i is the voltage per unit value.
[0116] Specifically, after obtaining the distribution network neural network model, the port voltage of the distribution network is taken as the control quantity, the total active power consumed by the distribution network is taken as the controlled quantity, and the expected output of the controlled quantity is set as Pref. By adjusting the input voltage, the power consumption of the distribution network is close to the expectation and the cost function is minimized. The predicted value of the power consumption of the distribution network is obtained by the distribution network neural network model. In this way, the target constraint conditions can be defined. The target constraint conditions include at least the target cost function and the safe operation conditions. The target cost function includes:
[0117]
[0118] in, is the predicted value of active power, obtained by neural network operation; represents the i-th time step; k represents the time step at which model predictive control is started; N is the number of future time steps included in the prediction interval; P ref is the expected value of active power, V(pu) is the per unit voltage.
[0119] Safe operating conditions include:
[0120] 0.9 <V(p.u.) i <1.1
[0121] Among them, V(pu) i is the voltage per unit value.
[0122] It can be seen that the cost function is clearly divided into two parts. The first part is used to measure the error between the power prediction value and the expected value, and the second part is used to measure the price to be paid to achieve the expected power value, that is, the voltage fluctuation relative to the steady state. When using, the two parts can be weighed by adjusting the weight values α and β of the two parts. In order to ensure the safe and stable operation of each device in the distribution network, the voltage standard value must be between 0.9 and 1.1.
[0123] Based on the above embodiment, in this method, based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set active power output expected value, control interval, and prediction interval, the target constraint condition is used to obtain the voltage control action sequence by minimizing the target cost function, which specifically includes:
[0124] Constructing a control voltage vector and an active power prediction value vector; wherein the control voltage vector includes the value of the control voltage at each time step in the prediction interval, and the active power prediction value vector includes the prediction value of the active power at each time step in the prediction interval;
[0125] Using the current system timing measurement, the distribution network neural network model is expressed as a function between the control voltage vector and the active power prediction value vector to obtain a model function;
[0126] Based on the model function, using the expected value of active power output, the target cost function is expressed as a function of a control voltage vector to obtain a target function;
[0127] The objective function is minimized to obtain a voltage control action sequence.
[0128] Specifically, based on the obtained distribution network neural network model, the model predictive control method is used for control. Compared with the traditional PID control method, the model predictive control method has the following advantages:
[0129] 1) Model predictive control can handle processes with multiple inputs and multiple outputs, while traditional PID control is usually only applicable to processes with single input and single output;
[0130] 2) Model predictive control can explicitly handle input and output constraints, while PID may require additional logic or adjustments to avoid violating constraints;
[0131] 3) Model predictive control can use future information of reference and disturbance signals, while PID can only respond to current errors;
[0132] 4) Model predictive control can compensate for time delays and disturbances in the process, while PID may have difficulty coping with rapid changes;
[0133] 5) Model predictive control can ensure the stability and robustness of the system under certain conditions, while PID may experience overshoot and oscillation.
[0134] The present invention uses a model predictive control method to adjust the power consumed by the distribution network by adjusting the voltage at the distribution network port. The model predictive control controller can be used to control the voltage reduction process and avoid overshoot and oscillation. Specifically, the steps of implementing the model predictive control include:
[0135] S1: First, we need to obtain a model based on the system characteristics. This model can be a traditional model built by components or a neural network model.
[0136] S2: Specify the input and output of the model predictive control controller, define the cost function and constraints of the control, and adjust the controller parameters that affect the performance and stability of the controller;
[0137] S3: Set the expected output of the system, select the control interval and prediction interval of the system, and the control interval is the length of a time step t c , the prediction interval is the number of time steps that need to be considered when solving the control action;
[0138] S4: Get the current state of the system, and according to the previously obtained system model and the expected output, find a series of control actions that can minimize the cost function, and apply the first control action to the system. The solution of the control action only considers the minimization of the cost function in a finite number of future time steps (i.e., the prediction interval);
[0139] S5: Repeat step S4 at the next moment, use the state of the system at the next moment to predict and solve the control action, and only execute the first control action obtained by the solution;
[0140] S6: Using the rolling optimization method, the solution and execution of the control action are repeatedly performed online as the sampling time progresses.
[0141] Based on this, according to the obtained distribution network neural network model and target constraints, the port voltage of the distribution network is taken as the control quantity, the total active power consumed by the distribution network is taken as the controlled quantity, the expected value of active power output, the control interval and the prediction interval are set in advance, and a series of control actions that can minimize the target cost function are solved to obtain the voltage control action sequence.
[0142] In some embodiments, the control interval t is selected c =0.1s, the prediction interval is 9 time steps. For the convenience of explanation, this embodiment is used as an example for illustration, but it does not represent a limitation of the present invention. The main difficulty in implementing model predictive control lies in solving the control action. The goal of the work is to find the voltage value when the target cost function is the smallest, but the predicted value of the active power requires the voltage to be iteratively calculated by the neural ordinary differential equation. Most of the commonly used solution tools currently have difficulty integrating the neural network model. In order to facilitate the solution, since the voltage phase angle changes slightly and has little effect on the active power, and the phase angle change cannot be well simulated during offline testing, it can be set to a constant value δ during control. It is generally believed that the voltage is also constant within a single control interval. Assume that the current time of the system is 0, the current voltage is V0, the current active power is P0, and the current reactive power is Q0. The above quantities are all time series measurements of the current system and can be obtained by measurement; the voltage reference value of the distribution network system is V rated =12.66kV, power reference value P rated =6.34MW, assuming that the actual values of the control voltage in the next 9 time steps are V c =[V 01 ,V 12 ……V 89 ](V ij represents the voltage value from time i to time j), and the control voltage vector V c , the predicted active power values for the next 9 moments are Get the active power prediction value vector Then the neural network can be encapsulated as a function VPcal between active power and voltage to obtain the model function:
[0143]
[0144] Among them, V0, P0, and Q0 are the current system timing measurements, which can be used as function parameters. Then, the target cost function can be expressed as a function of the control voltage to obtain the target function:
[0145]
[0146] After the target cost function is processed as above, it is possible to consider selecting a suitable algorithm to solve it. This is a nonlinear optimization problem. In some embodiments, the scipy.optimize.minimize() function provided in the python scipy toolkit is first considered for solution. It can be understood that the scipy.optimize.minimize() function can solve the unconstrained and constrained minimization problems of multivariable scalar functions, and provides a variety of solution algorithms to choose from. Since this function is not differentiable, the Nelder-Mead algorithm and the COBYLA algorithm can successfully find the control voltage value that minimizes the target function. Both algorithms are search-based solution algorithms. They are based on the simplex method. When calculating, first select n+1 points to form an initial simplex. n is the dimension of the variable to be solved. During the iteration process, the simplex generated will gradually approach the minimum point of the function until convergence. No derivative information of any function is required, only the function value is required. After testing, both algorithms can find reasonable voltage control actions according to the expected power output. It should be noted that when β in the cost function is equal to zero, the active power of the system can quickly approach the desired value.
[0147] Based on the above embodiment, in this method, based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set active power output expected value, control interval, and prediction interval, the target constraint condition is used to obtain the voltage control action sequence by minimizing the target cost function, which specifically includes:
[0148] Constructing a control voltage vector and an active power prediction value vector; wherein the control voltage vector includes the value of the control voltage at each time step in the prediction interval, and the active power prediction value vector includes the prediction value of the active power at each time step in the prediction interval;
[0149] Using the control interval and the current system timing measurement, the distribution network neural network model is locally linearized to obtain the relationship between the control voltage vector and the active power prediction value vector;
[0150] Based on the relationship between the control voltage vector and the active power prediction value vector, converting the target constraint condition into a quadratic programming problem of the control voltage vector to obtain a coefficient matrix;
[0151] The coefficient matrix is calculated using a preset algorithm to obtain a voltage control action sequence.
[0152] Specifically, since the operation speed is slow in the process of implementing rolling optimization using a search-based solution algorithm, it has been tested that the shortest time for a single solution using the above method is more than 20 seconds, and such a calculation speed obviously cannot meet the needs of rolling control. Therefore, the present invention locally linearizes the neural network in each small interval, and then converts the optimization target into a simple quadratic programming problem for solution.
[0153] For the obtained distribution network neural network model, its expression can be expressed as:
[0154]
[0155] in, is the derivative of active power with respect to time, is the derivative of reactive power with respect to time; V is the voltage amplitude, δ is the voltage phase angle, P is the active power, and Q is the reactive power.
[0156] Since the voltage phase angle and reactive power of the distribution network system change little, the phase angle and reactive power can be regarded as constant within the small range of voltage and active power changes, so the above formula can be further simplified to Then fix the active power P, apply a small disturbance to the input voltage V, and observe The change of can be obtained The partial derivative with respect to V is The same method can also be used to find The partial derivative with respect to P is Then the distribution network neural network model can be locally linearized as:
[0157]
[0158] After a and b are calculated according to the above method, the constant term c can be obtained by substituting various quantities in the current state into the above formula.
[0159] In addition, the active power P and its derivative There is a numerical integral relationship between them:
[0160]
[0161] In some embodiments, the control interval tc=0.1s is selected, and the prediction interval is 9 time steps. Assume that the current time of the system is 0, the current voltage is V0, the current active power is P0, and the current reactive power is Q0. The above quantities are all current system timing measurements and can be obtained by measurement; Assume that the actual values of the control voltages in the next 9 time steps are Vc=[V01, V12…V89] (Vij represents the voltage value from time i to time j), and the control voltage vector V is constructed. c, the predicted active power values for the next 9 moments are Get the active power prediction value vector
[0162] Therefore, the active power prediction value vector With the control voltage vector V c The relationship between can be expressed as:
[0163]
[0164] Where A is a 9×9 lower triangular matrix and B is a 9-dimensional vector. The elements in A and B can be solved in the following way:
[0165] A i,i;j =a×t c ×(1+b×t c ) j ,i=1,2…9,j=0,1…8,i>j#
[0166] B1=t c ×(b×P0+c)+P0
[0167] B i =t c ×(b×B i;1 +c)+B i;1 ,i=2,3…9
[0168] The target cost function can then be simplified to the following quadratic programming problem:
[0169]
[0170] This transforms the optimization goal into a typical quadratic programming problem, and obtains coefficient matrices M and N. Among them, M is a 9×9 matrix, N is a 9-dimensional vector, and the coefficient matrices M and N can be calculated from matrices A and B and the weights α and β of the power expected value Pref and the cost function:
[0171]
[0172] It should be noted that s is a constant and does not affect the solution of the quadratic programming, so there is no need to calculate it.
[0173] Safe operating conditions can also be expressed as follows:
[0174] GV c ≤H
[0175] The coefficient matrices G and H are obtained, where:
[0176]
[0177] At this point, the original optimization problem to be solved has been completely transformed into the standard form of quadratic programming, and the coefficient matrices M, N, G, and H are obtained. The coefficient matrix is calculated using the preset algorithm to obtain the voltage control action sequence.
[0178] In some embodiments, the coefficient matrix is calculated using the cvxopt.solvers.qp() function in the python cvxopt convex optimization toolkit. Specifically, the four matrices M, N, G, and H are input to automatically solve the control voltage vector V c , as a voltage control action sequence, this method has a fast solution speed and can generally be completed within 0.1s, which is sufficient to support the implementation of model predictive control rolling optimization.
[0179] Based on the above embodiment, in the method, the first control action in the voltage control action sequence is executed, and then the method further includes:
[0180] Obtain the system parameters of the distribution network system at the next moment, and calculate the voltage control action sequence at the next moment using the target constraint conditions according to the preset active power output expected value, control interval, prediction interval and system parameters at the next moment;
[0181] Execute the first control action in the voltage control action sequence at the next moment.
[0182] Specifically, after performing power control once, the method further includes: repeating the acquisition of system state and the solution of voltage control action sequence at the next moment, and executing the first control action in the obtained voltage control action sequence. In other words, the rolling optimization method is adopted to allow the solution and execution of voltage control actions to be repeated as the sampling moment advances.
[0183] Furthermore, the control method of the present invention can be embodied as a model predictive control controller, and the overall process of power control of the distribution network is as follows:
[0184] S101: adjusting the weights α and β of the two parts in the cost function, and setting the control range and the expected power output;
[0185] S102: Get the current state of the system, construct the control voltage vector and the active power prediction value vector, locally linearize the distribution network neural network model, transform the target constraint condition into a quadratic programming problem to obtain the coefficient matrices M, N, G, and H, input the four matrices M, N, G, and H into the cvxopt.solvers.qp() function to obtain the control voltage sequence, and execute the first control action at the current moment;
[0186] S103: Repeat step S102 at the next moment, using a rolling optimization method to allow the solution and execution of the voltage control action to be repeated as the sampling moment progresses.
[0187] In some embodiments, the present invention further includes using a distribution network neural network model and a simulation model to test the distribution network power control method based on model predictive control provided by the present invention. c =0.1s, weights α=1, β=0, that is, the power consumed by the distribution network is controlled to be as close to the expected value as possible. ref , P ref Relative to rated voltage P rated The fluctuation is small (the voltage boundary will not be touched during the control process), and the simulation time is 30s.
[0188] In addition, when using the simulation model for testing, the distribution network simulation model can be basically used. Specifically, the model predictive control controller is connected to the CloudPSS simulation model through the Redis remote dictionary. On the basis of the distribution network simulation model, one Sync element, five PubToRedis elements and one SubFromRedis element are added to obtain the system state and change the input voltage of the distribution network during the control process. The simulation model test process diagram is shown in the figure. Figure 7 shown.
[0189] Since there may be errors between the distribution network neural network model and the simulation model, in some embodiments, during the test process, a trade-off can be made between the control effect and the cost by adjusting parameters, for example, adding 0.09MW to the original set power expectation value to calculate the control voltage.
[0190] According to the test results, the distribution network power control method based on model predictive control provided by the present invention can demonstrate good control effects in various scenarios. In the simulation, the total active power consumed by the distribution network changes along the expected value under voltage control, and the error between the simulation curve and the expected value has also been at a small level.
[0191] The distribution network power control method based on model predictive control provided by the present invention proposes a distribution network neural network model based on the Neural Ordinary Differential Equation, builds a simulation model based on the IEEE-33 node distribution network system, and models the distribution network in two scenarios. After testing, the distribution network neural network model can accurately characterize the load characteristics of the distribution network. Based on the obtained distribution network neural network model, the present invention uses a model predictive control method to control the power of the distribution network, solves the problem of slow calculation speed through local linearization of the neural network, performs offline tests in multiple scenarios, and obtains ideal control results.
[0192] The distribution network power control method based on model predictive control provided by the present invention obtains the current system timing measurement of the distribution network system to be controlled at the current moment, wherein the current system timing measurement at least includes system voltage, active power and reactive power; based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set expected value of active power output, control interval, and prediction interval, the target constraint condition is used to obtain the voltage control action sequence by minimizing the target cost function; wherein the target constraint condition at least includes the target cost function and the safe operation condition, the prediction interval includes the number of time steps to be considered for solving the control action, the control interval includes the length of the time step, and the distribution network neural network model is obtained by training based on the simulation data of the distribution network system using a deep neural network; and the first control action in the voltage control action sequence is executed. The present invention proposes a new distribution network model based on deep learning, and uses a model predictive control method based on the model to perform power control on the distribution network, so that it can save energy, participate in the peak load regulation of the power grid, and realize the distribution network control with high accuracy and high efficiency.
[0193] Example 2
[0194] Reference Figure 8 and Fig. 9 , which is a second embodiment of the present invention, provides a power control device for a distribution network based on model predictive control, comprising:
[0195] The distribution network power control device based on model predictive control provided by the present invention is described below. The distribution network power control device based on model predictive control described below and the distribution network power control method based on model predictive control described above can refer to each other. Figure 8 is a schematic diagram of the structure of a power control device for a distribution network based on model predictive control provided by the present invention, such as Figure 8 As shown, it includes an acquisition unit 210, a calculation unit 220 and an execution unit 230, wherein:
[0196] An acquisition unit 210 is used to acquire a current system timing measurement of the distribution network system to be controlled at a current moment, wherein the current system timing measurement at least includes system voltage, active power and reactive power;
[0197] The calculation unit 220 is used to calculate the voltage control action sequence by minimizing the target cost function based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set active power output expected value, control interval, and prediction interval, using the target constraint condition; wherein the target constraint condition at least includes the target cost function and the safe operation condition, the prediction interval includes the number of time steps required to consider for solving the control action, the control interval includes the length of the time step, and the distribution network neural network model is obtained by training based on a deep neural network using simulation data of the distribution network system;
[0198] The execution unit 230 is used to execute the first control action in the voltage control action sequence.
[0199] Based on the above embodiment, in the device, a distribution network neural network model is obtained by training the simulation data of the distribution network system based on the deep neural network, which specifically includes:
[0200] Build a distribution network simulation model based on the distribution network system to be controlled;
[0201] Acquire training data based on the distribution network simulation model to obtain a training data set, wherein the training data at least includes an effective value of an input voltage, a phase angle, active power, and reactive power;
[0202] According to the training data set, the parameters of the pre-constructed distribution network neural ordinary differential equation are updated using the gradient descent method to obtain a distribution network neural network model;
[0203] The input of the distribution network neural ordinary differential equation is the effective value and phase angle of the input voltage, and the output is active power and reactive power. The pre-constructed distribution network neural ordinary differential equation includes an input layer, an output layer and three hidden layers.
[0204] Based on the above embodiment, in the device, the target cost function includes:
[0205]
[0206] The safe operating conditions include:
[0207] 0.9 <V(p.u.) i <1.1,
[0208] in, is the predicted value of active power, obtained by neural network operation; i represents the i-th time step; k represents the time step at which model predictive control starts; N is the number of future time steps included in the prediction interval; P refis the expected value of active power; V(pu) is the voltage per unit value; α is the first weight; β is the second weight; V(pu) i is the voltage per unit value.
[0209] Based on the above embodiment, in the device, based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set active power output expected value, control interval, and prediction interval, the target constraint condition is used to obtain the voltage control action sequence by minimizing the target cost function, which specifically includes:
[0210] Constructing a control voltage vector and an active power prediction value vector; wherein the control voltage vector includes the value of the control voltage at each time step in the prediction interval, and the active power prediction value vector includes the prediction value of the active power at each time step in the prediction interval;
[0211] Using the current system timing measurement, the distribution network neural network model is expressed as a function between the control voltage vector and the active power prediction value vector to obtain a model function;
[0212] Based on the model function, using the expected value of active power output, the target cost function is expressed as a function of a control voltage vector to obtain a target function;
[0213] The objective function is minimized to obtain a voltage control action sequence.
[0214] Based on the above embodiment, in the device, based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set active power output expected value, control interval, and prediction interval, the target constraint condition is used to obtain the voltage control action sequence by minimizing the target cost function, which specifically includes:
[0215] Constructing a control voltage vector and an active power prediction value vector; wherein the control voltage vector includes the value of the control voltage at each time step in the prediction interval, and the active power prediction value vector includes the prediction value of the active power at each time step in the prediction interval;
[0216] Using the control interval and the current system timing measurement, the distribution network neural network model is locally linearized to obtain the relationship between the control voltage vector and the active power prediction value vector;
[0217] Based on the relationship between the control voltage vector and the active power prediction value vector, converting the target constraint condition into a quadratic programming problem of the control voltage vector to obtain a coefficient matrix;
[0218] The coefficient matrix is calculated using a preset algorithm to obtain a voltage control action sequence.
[0219] Based on the above embodiment, in the device, the first control action in the voltage control action sequence is executed, and then the following steps are further included:
[0220] Obtain the system parameters of the distribution network system at the next moment, and calculate the voltage control action sequence at the next moment using the target constraint conditions according to the preset active power output expected value, control interval, prediction interval and system parameters at the next moment;
[0221] Execute the first control action in the voltage control action sequence at the next moment.
[0222] The distribution network power control device based on model predictive control provided by the present invention obtains the current system timing measurement of the distribution network system to be controlled at the current moment, wherein the current system timing measurement at least includes system voltage, active power and reactive power; based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set expected value of active power output, control interval, prediction interval, and target constraint conditions, the voltage control action sequence is obtained by minimizing the target cost function; wherein the target constraint conditions at least include the target cost function and the safe operation condition, the prediction interval includes the number of time steps to be considered for solving the control action, the control interval includes the length of the time step, and the distribution network neural network model is obtained by training based on the simulation data of the distribution network system using a deep neural network; and the first control action in the voltage control action sequence is executed. The present invention proposes a new distribution network model based on deep learning, and uses a model predictive control method based on the model to control the power of the distribution network, so that it can save energy, participate in the peak load regulation of the power grid, and realize the distribution network control with high accuracy and high efficiency.
[0223] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9As shown, the electronic device may include: a processor (processor) 310, a communication interface (Communications Interface) 320, a memory (memory) 330 and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 can call the logic instructions in the memory 330 to execute the distribution network power control method based on model predictive control, which includes: obtaining the current system timing measurement of the distribution network system to be controlled at the current moment, and the current system timing measurement includes at least system voltage, active power and reactive power; based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set active power output expected value, control interval, and prediction interval, using the target constraint condition, the voltage control action sequence is obtained by minimizing the target cost function; wherein the target constraint condition includes at least the target cost function and the safe operation condition, the prediction interval includes the number of time steps to be considered for solving the control action, the control interval includes the length of the time step, and the distribution network neural network model is obtained by training based on a deep neural network using simulation data of the distribution network system; and executing the first control action in the voltage control action sequence.
[0224] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0225] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the distribution network power control method based on model predictive control provided by the above methods, the method including: obtaining the current system timing measurement of the distribution network system to be controlled at the current moment, the current system timing measurement at least including system voltage, active power and reactive power; based on a pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set active power output expected value, control interval, prediction interval, using target constraints, by minimizing the target cost function to obtain a voltage control action sequence; wherein the target constraints include at least the target cost function and the safe operation condition, the prediction interval includes the number of time steps to be considered for solving the control action, the control interval includes the length of the time step, and the distribution network neural network model is obtained by training based on a deep neural network using simulation data of the distribution network system; executing the first control action in the voltage control action sequence.
[0226] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the processor executes the distribution network power control method based on model predictive control provided by the above methods, the method comprising: obtaining the current system timing measurement of the distribution network system to be controlled at the current moment, the current system timing measurement at least including system voltage, active power and reactive power; based on a pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set expected value of active power output, control interval, prediction interval, and using target constraints, a voltage control action sequence is obtained by minimizing the target cost function; wherein the target constraints at least include the target cost function and safe operation conditions, the prediction interval includes the number of time steps to be considered for solving the control action, the control interval includes the length of the time step, and the distribution network neural network model is obtained by training based on a deep neural network using simulation data of the distribution network system; and executing the first control action in the voltage control action sequence.
[0227] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0228] 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 make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A power control method for a distribution network based on model predictive control, characterized in that: include, Obtaining a current system timing measurement of the distribution network system to be controlled at a current moment, wherein the current system timing measurement at least includes system voltage, active power and reactive power; Based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set active power output expected value, control interval, and prediction interval, and using the target constraint condition, the voltage control action sequence is obtained by minimizing the target cost function; Wherein, the target constraint condition includes at least a target cost function and a safe operation condition, the prediction interval includes the number of time steps to be considered for solving the control action, the control interval includes the length of the time step, and the distribution network neural network model is obtained by training based on a deep neural network using simulation data of the distribution network system; Execute the first control action in the voltage control action sequence.
2. The power control method for distribution network based on model predictive control according to claim 1, characterized in that: The training based on the deep neural network using the simulation data of the distribution network system includes: Build a distribution network simulation model based on the distribution network system to be controlled; Acquire training data based on the distribution network simulation model to obtain a training data set, wherein the training data at least includes an effective value of an input voltage, a phase angle, active power, and reactive power; According to the training data set, the parameters of the pre-constructed distribution network neural ordinary differential equation are updated using the gradient descent method to obtain a distribution network neural network model; The input of the distribution network neural ordinary differential equation is the effective value and phase angle of the input voltage, and the output is the active power and reactive power. The pre-constructed distribution network neural ordinary differential equation includes an input layer, an output layer and three hidden layers.
3. The power control method for distribution network based on model predictive control according to claim 2, characterized in that: The target cost function includes: The safe operating conditions include: 0.9<V(p.u.) i <1.1, in, is the predicted value of active power, obtained by neural network operation; i represents the i-th time step; k represents the time step at which model predictive control starts; N is the number of future time steps included in the prediction interval; P ref is the expected value of active power; V(pu) is the voltage per unit value; α is the first weight; β is the second weight; V(pu) i is the voltage per unit value.
4. The power control method for distribution network based on model predictive control according to claim 3, characterized in that: The distribution network neural network model based on pre-training obtains the voltage control action sequence by minimizing the target cost function according to the current system timing measurement and the pre-set active power output expected value, control interval, and prediction interval, using the target constraint conditions, and specifically includes: Constructing a control voltage vector and an active power prediction value vector; wherein the control voltage vector includes the value of the control voltage at each time step in the prediction interval, and the active power prediction value vector includes the prediction value of the active power at each time step in the prediction interval; Using the current system timing measurement, the distribution network neural network model is expressed as a function between the control voltage vector and the active power prediction value vector to obtain a model function; Based on the model function, using the expected value of active power output, the target cost function is expressed as a function of a control voltage vector to obtain a target function; The objective function is minimized to obtain a voltage control action sequence.
5. The power control method for distribution network based on model predictive control according to claim 4, characterized in that: Based on the pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set active power output expected value, control interval, and prediction interval, and using the target constraint conditions, the voltage control action sequence is obtained by minimizing the target cost function, specifically including: Constructing a control voltage vector and an active power prediction value vector; wherein the control voltage vector includes the value of the control voltage at each time step in the prediction interval, and the active power prediction value vector includes the prediction value of the active power at each time step in the prediction interval; Using the control interval and the current system timing measurement, the distribution network neural network model is locally linearized to obtain the relationship between the control voltage vector and the active power prediction value vector; Based on the relationship between the control voltage vector and the active power prediction value vector, converting the target constraint condition into a quadratic programming problem of the control voltage vector to obtain a coefficient matrix; The coefficient matrix is calculated using a preset algorithm to obtain a voltage control action sequence.
6. The power control method for distribution network based on model predictive control according to claim 5, characterized in that: The performing of the first control action in the voltage control action sequence also includes: Obtain the system parameters of the distribution network system at the next moment, and calculate the voltage control action sequence at the next moment using the target constraint conditions according to the preset active power output expected value, control interval, prediction interval and system parameters at the next moment; Execute the first control action in the voltage control action sequence at the next moment.
7. A power control device for a distribution network based on model predictive control, characterized in that: include, An acquisition unit, used for acquiring a current system timing measurement of the distribution network system to be controlled at a current moment, wherein the current system timing measurement at least includes system voltage, active power and reactive power; A calculation unit, for obtaining a voltage control action sequence by minimizing a target cost function based on a pre-trained distribution network neural network model, according to the current system timing measurement and the pre-set expected value of active power output, the control interval, and the prediction interval, using target constraints; wherein the target constraints include at least a target cost function and a safe operation condition, the prediction interval includes the number of time steps required to solve the control action, the control interval includes the length of the time step, and the distribution network neural network model is obtained by training based on a deep neural network using simulation data of the distribution network system; The execution unit is used to execute the first control action in the voltage control action sequence.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the distribution network power control method based on model predictive control as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the power control method for a distribution network based on model predictive control as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the power control method for a distribution network based on model predictive control as claimed in any one of claims 1 to 6 is implemented.
