Reactive power demand prediction method and system based on combined neural network
By using a reactive demand prediction model combined with a convolutional neural network and a gated cyclic unit in the distribution network, the problem of insufficient accuracy of reactive demand prediction in the existing technology is solved, and more accurate reactive demand prediction and grid operation optimization are achieved.
Patent Information
- Application Number
- CN202510080292.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art lacks accuracy in the prediction of reactive demand for distribution networks, which is difficult to meet the new requirements of distribution network planning and design, and deviations are easily introduced in the process of reverse normalization.
Using a combined neural network-based method, a reactive demand prediction model is constructed by combining the convolutional neural network and the gated recurrent unit, and the loss function is set as an error-variance-covariance decomposition expression, and training and testing are performed. At the same time, in the anti-normalization process, the differential errors of each learner are comprehensively considered to maintain the distribution characteristics of the data.
It improves the accuracy of reactive power demand prediction, can more accurately predict the reactive power demand for cables to be connected to the distribution network, helps grid operators optimize reactive power compensation strategies, improve grid operation efficiency and stability, and provide better support for the integration of distributed energy.
Smart Images

Figure CN119514811A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of reactive power prediction of distribution network, and in particular relates to a reactive power demand prediction method and system based on combined neural network. Background Art
[0002] In modern distribution networks, with the rapid development of urbanization and industrialization, the access of a large number of uncertain loads has led to a significant increase in reactive power consumption, which has a significant impact on the voltage stability and power transmission efficiency of the power grid. The large reactive power generated during the transmission process not only increases the burden on the power grid, but may also lead to increased power loss and voltage fluctuations, affecting the power supply quality. In addition, the access of distributed energy such as solar photovoltaic and wind power, as well as the emergence of new loads such as electric vehicles, have made the reactive power demand of the distribution network more dynamic and uncertain, which has put forward higher requirements on the accuracy of reactive power demand prediction.
[0003] Existing technologies often use neural networks to predict reactive power demand in distribution networks. However, the construction and training schemes of prediction models have problems such as insufficient accuracy in reactive power demand prediction and difficulty in meeting new requirements for distribution network planning and design. In addition, deviations are usually introduced when denormalizing the reactive power demand prediction values, further reducing the accuracy of reactive power demand prediction. Summary of the invention
[0004] In order to solve the deficiencies in the prior art, the present invention provides a reactive power demand forecasting method and system based on a combined neural network, which effectively improves the reactive power demand forecasting accuracy and meets the new requirements for distribution network planning and design.
[0005] The present invention adopts the following technical solution.
[0006] The first aspect of the present invention provides a reactive power demand forecasting method based on a combined neural network, comprising: Obtain reactive load characteristic historical data and preprocess them, and divide the preprocessed data into a training set and a test set; The reactive power demand prediction model is constructed by combining convolutional neural network and gated recurrent unit, and the loss function is set; Based on the loss function, the reactive power demand forecasting model is trained and tested using a training set and a test set to obtain a trained reactive power demand forecasting model; Obtain the real-time data of reactive load characteristics and preprocess it, and input it into the trained reactive demand forecasting model to obtain the reactive demand forecast value; The reactive power demand forecast value is denormalized to obtain the final reactive power demand forecast value, and the effect of the reactive power demand forecast model is evaluated.
[0007] Preferably, the reactive load characteristic historical data includes active load historical data, reactive load historical data, historical power consumption and temperature; The preprocessing includes screening and normalization processing.
[0008] Preferably, a reactive power demand prediction model is constructed by combining a convolutional neural network and a gated recurrent unit, including a convolutional neural network and a gated recurrent unit, wherein the output of the convolutional neural network is connected to its corresponding gated recurrent unit; each gated recurrent unit is connected to each other; each gated recurrent unit is connected to a connection layer; and each connection layer is connected to the output layer of the model.
[0009] Preferably, the convolutional neural network includes an input layer, a convolution layer, a pooling layer, a fully connected layer and an output layer; wherein the input layer inputs the preprocessed data matrix; after the pooling layer and the convolution layer are alternately operated, the data matrix obtains the probability distribution of the data features through multiple layers of changes; the fully connected layer uses a logistic regression function to classify the probability distribution of the data features to obtain the reactive power demand prediction value; and the output layer outputs.
[0010] Preferably, the loss function is set to: (2) (3) (4) (5) In the formula, is the loss function, is the learner output, The preprocessed data matrix input to the input layer; is the average error; is the mean variance; is the covariance of each learner; is the error between single point output and expected value, is the single-point output of learner i, is the expected output; is the number of learners in the convolutional network; , is the output value of learner i and j; , is the error between the output of learner i, j and the corresponding expected output; is the single point output and expected error after iteration of learner i; is the single point output and expected error after learner j iteration.
[0011] Preferably, during the training process of the reactive power demand prediction model, the neural network training parameters are updated at each level by back propagating the residual via gradient descent.
[0012] Preferably, the denormalization formula is as follows: (6) In the formula, is the final reactive power demand forecast value; is the reactive power demand forecast value obtained by the reactive power demand forecast model; is the number of learners in the convolutional network; , They are respectively the minimum and maximum values of the predicted data obtained by the reactive power demand prediction model.
[0013] Preferably, the mean absolute error and root mean square error are used to evaluate the effect of the reactive power demand prediction model.
[0014] The second aspect of the present invention provides a reactive power demand forecasting system based on a combined neural network, comprising: A data acquisition module is used to acquire reactive load characteristic historical data and preprocess it, and divide the preprocessed data into a training set and a test set; A model building module is used to build a reactive power demand prediction model by combining a convolutional neural network with a gated recurrent unit and set a loss function; A model training module is used to train and test the reactive power demand prediction model using a training set and a test set based on the loss function to obtain a trained reactive power demand prediction model; Iterative prediction module, used to obtain real-time data of reactive load characteristics and preprocess it, and input it into the trained reactive demand prediction model to obtain reactive demand prediction value; The denormalization module is used to denormalize the reactive power demand forecast value to obtain the final reactive power demand forecast value and evaluate the effect of the reactive power demand forecast model.
[0015] A third aspect of the present invention provides a terminal, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method.
[0016] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method when executed by a processor.
[0017] Compared with the prior art, the beneficial effects of the present invention include at least: The present invention proposes a reactive power demand forecasting method based on a combined neural network, which can help power grid operators to more accurately predict and balance reactive power, optimize reactive compensation strategies, and thus improve the operating efficiency and stability of the power grid; it can more effectively manage reactive power changes caused by cable access, reduce power grid losses, and improve power transmission efficiency. At the same time, it also provides better support for the integration of distributed energy and promotes the development of smart grids.
[0018] The present invention adopts a combination of convolutional neural network and gated recurrent unit to construct a reactive demand forecasting model, and sets a loss function expressed by the proposed error-variance-covariance decomposition, so that the result is closer to the true value, and can accurately predict the reactive power demand of cable access distribution network, help power grid operators to better plan reactive power compensation resources, realize dynamic reactive power optimization, and achieve coordination between power supply reliability and economy in the investment planning of new distribution network.
[0019] When the reactive demand prediction value is denormalized, the differential errors of each learner are comprehensively considered, the distribution characteristics of the data can be maintained, the deviation introduced by denormalization can be avoided, and the correlation between the predicted value and the actual value can be intuitively displayed. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is the principle diagram of the prediction method of the present invention; Figure 2 It is the overall flow chart of reactive power demand prediction of the present invention; Figure 3 It is a flow chart of the convolutional neural network of the present invention; Figure 4 It is a convolutional neural network-gate recurrent network structure diagram of the present invention; Figure 5 It is a reactive load curve and a reactive prediction curve diagram in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0022] Embodiment 1 of the present invention provides a reactive power demand prediction method based on a combined neural network, such as Figure 1 As shown, the following steps are included: S1: Obtain reactive load characteristic historical data and preprocess it, and divide the preprocessed data into a training set and a test set; Further preferably, reactive load data is acquired, screened and eliminated, and normalization is performed to ensure model convergence; The accuracy of reactive power prediction is closely related to the selection of input parameters, and it is necessary to ensure the integrity, applicability, timeliness and consistency of the selected input data. It is necessary to check the value and unit of reactive power data, ensure the data is complete and analyze the errors in the process; check whether the data is reasonable and effective, and determine the degree of conformity with demand forecast; ensure that the input historical data is within a reasonable time range.
[0023] The collected data include historical data of active load, historical data of reactive load, historical power consumption, temperature and other characteristic indicators, with different dimensions.
[0024] The variation ranges of various characteristic indicators are also quite different, so the data needs to be normalized to ensure model convergence. The normalization formula is as follows: (1) In the formula, , These are the data before and after normalization, respectively; is the minimum value of the data before normalization; is the maximum value of the data before normalization.
[0025] S2: A reactive power demand prediction model is constructed by combining a convolutional neural network with a gated recurrent unit, and a loss function is set; Further preferably, a convolutional neural network and a gated recurrent unit are combined to construct an iterative model, i.e., a reactive power demand prediction model, for iteratively predicting the reactive load to obtain a reactive power demand prediction value; The reactive power demand prediction model includes a convolutional neural network and a gated recurrent unit; Convolutional neural network consists of convolutional layer and pooling layer to extract data features, eliminate noise and uncertainty factors, and input the processed data into the gated recurrent unit for prediction. The process is as follows: Figure 2 The gated cyclic unit consists of an update gate and a reset gate, which can effectively process data, improve network stability, and improve the accuracy of reactive power demand prediction.
[0026] like Figure 4 As shown in the figure, the output values of the convolutional neural network are connected to their corresponding gated recurrent units to improve the model's ability to process complex data and make the training and prediction processes more efficient and accurate.
[0027] The gated recurrent units are interconnected to build a deep recurrent neural network structure, thereby enhancing the model's ability to understand and model complex time series data.
[0028] Each gated recurrent unit is connected to a connection layer to further enhance the expressiveness and flexibility of the model, making it easier to adjust the output to suit different task requirements.
[0029] Each connection layer is connected to the output layer to realize the generation and output of model prediction results. Through continuous iterative training, the model can gradually learn more accurate and reliable prediction methods.
[0030] like Figure 3 As shown, the convolutional neural network includes an input layer, a convolutional layer, a pooling layer, a fully connected layer, and an output layer; (1.1) The input layer inputs the preprocessed data matrix; (1.2) After alternating the pooling layer and the convolution layer, the data matrix obtains the probability distribution of the data features through multiple layers of changes; (1.3) The fully connected layer uses the logistic regression function Softmax to classify the probability distribution of the data features in (1.2) to obtain the reactive power demand forecast value ; (1.4) Output layer, used to output reactive power demand forecast value .
[0031] It can be understood that the neural network of the present invention has multiple data source inputs, corresponding to multiple output values, represented as convolutional networks 1, 2, 3, etc., and each output corresponds to a gated recurrent unit.
[0032] In order to make the results closer to the true value, the loss function is expressed by using the deviation-variance-covariance decomposition: (2) (3) (4) (5) In the formula, is the loss function; is the error between the single point output and the expected value in the average error; , Output value for the learner; , is the error between the output and the expected value in the mean variance; is the output of the learner; The preprocessed data matrix input to the input layer; is the single-point output of learner i; is the expected output; is the number of learners in the convolutional network; is the average variance, which indicates the deviation between the average output and the learner output; is the average error, which represents the error between the learner output and the expected output; is the covariance of each learner; is the single point output and expected error after iteration of learner i; is the single point output and expected error after learner j iteration.
[0033] During the training process of the reactive power demand forecasting model, the neural network training parameters are updated at each level through the residual back propagation via gradient descent.
[0034] S3: Based on the loss function, the reactive power demand prediction model of S2 is trained and tested using the training set and test set of S1 to obtain a trained reactive power demand prediction model; S4: Obtain the real-time data of reactive load characteristics and preprocess it, and input it into the reactive demand prediction model trained in S3 to obtain the reactive demand prediction value; S5: Denormalize the reactive power demand forecast value obtained in S4 to obtain the final reactive power demand forecast value, and evaluate the effect of the reactive power demand forecast model.
[0035] Further preferably, after the prediction is completed, the output data needs to be denormalized to obtain the final prediction value, and the formula is as follows: (6) In the formula, is the final reactive power demand forecast value; is the reactive power demand forecast value obtained by the reactive power demand forecast model; is the number of learners in the convolutional network; , They are respectively the minimum and maximum values of the predicted data obtained by the reactive power demand prediction model.
[0036] Furthermore, the present invention adopts mean absolute error and root mean square error to evaluate the effect of reactive load prediction model, and the average error formula is as follows: (7) The root mean square error is as follows: (8) In the formula, is the true value; is the predicted value, i.e. the final reactive power demand predicted value ; is the number of samples. .
[0037] The following will take a certain area as the experimental object to verify the above scheme.
[0038] The present invention uses reactive load in a certain area as the original data set. The data range is from 0:00 on January 1 to 24:00 on March 31, a total of 90 days. The sampling frequency is 1h / time. Therefore, the total amount of data samples is 2160 data points, including all influencing factors.
[0039] Reactive load curve and reactive prediction curve are as follows: Figure 3 As shown, the MSE value is 75.71Mvar, and the prediction deviation value is 3%; the RMSE value is 89.20Mvar, and the prediction deviation value is 4%. It proves that the method proposed in the present invention can effectively predict the regional reactive power demand, and has the characteristics of accuracy and authenticity.
[0040] Embodiment 2 of the present invention provides a reactive power demand prediction system based on a combined neural network, comprising: A data acquisition module is used to acquire reactive load characteristic historical data and preprocess it, and divide the preprocessed data into a training set and a test set; A model building module is used to build a reactive power demand prediction model by combining a convolutional neural network with a gated recurrent unit and set a loss function; A model training module is used to train and test the reactive power demand prediction model using a training set and a test set based on the loss function to obtain a trained reactive power demand prediction model; Iterative prediction module, used to obtain real-time data of reactive load characteristics and preprocess it, and input it into the trained reactive demand prediction model to obtain reactive demand prediction value; The denormalization module is used to denormalize the reactive power demand forecast value to obtain the final reactive power demand forecast value and evaluate the effect of the reactive power demand forecast model.
[0041] Embodiment 3 of the present invention provides a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method.
[0042] Embodiment 4 of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method when executed by a processor.
[0043] Compared with the prior art, the beneficial effects of the present invention include at least: The present invention proposes a reactive power demand forecasting method based on a combined neural network, which can help power grid operators to more accurately predict and balance reactive power, optimize reactive compensation strategies, and thus improve the operating efficiency and stability of the power grid; it can more effectively manage reactive power changes caused by cable access, reduce power grid losses, and improve power transmission efficiency. At the same time, it also provides better support for the integration of distributed energy and promotes the development of smart grids.
[0044] The present invention adopts a combination of convolutional neural network and gated recurrent unit to construct a reactive demand forecasting model, and sets a loss function expressed by the proposed error-variance-covariance decomposition, so that the result is closer to the true value, and can accurately predict the reactive power demand of cable access distribution network, help power grid operators to better plan reactive power compensation resources, realize dynamic reactive power optimization, and achieve coordination between power supply reliability and economy in the investment planning of new distribution network.
[0045] When the reactive demand prediction value is denormalized, the differential errors of each learner are comprehensively considered, the distribution characteristics of the data can be maintained, the deviation introduced by denormalization can be avoided, and the correlation between the predicted value and the actual value can be intuitively displayed.
[0046] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0047] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the above. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0048] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0049] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of the computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.
[0050] 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 above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A reactive power demand forecasting method based on combined neural network, characterized in that: include: Obtain reactive load characteristic historical data and preprocess them, and divide the preprocessed data into a training set and a test set; The reactive power demand prediction model is constructed by combining convolutional neural network and gated recurrent unit, and the loss function is set; Based on the loss function, the reactive power demand forecasting model is trained and tested using the training set and the test set to obtain a trained reactive power demand forecasting model; the loss function is set to: (2) (3) (4) (5) In the formula, is the loss function, is the learner output, The preprocessed data matrix input to the input layer; is the average error; is the mean variance; is the covariance of each learner; is the error between single point output and expected value, is the single-point output of learner i, is the expected output; is the number of learners in the convolutional network; , is the output value of learner i and j; , is the error between the output of learner i, j and the corresponding expected output; is the single point output and expected error after iteration of learner i; is the single point output and expected error after the learner j iteration; Obtain the real-time data of reactive load characteristics and preprocess it, and input it into the trained reactive demand forecasting model to obtain the reactive demand forecast value; The reactive power demand forecast value is denormalized to obtain the final reactive power demand forecast value, and the effect of the reactive power demand forecast model is evaluated.
2. The reactive power demand forecasting method based on combined neural network according to claim 1 is characterized in that: The reactive load characteristic historical data includes active load historical data, reactive load historical data, historical power consumption and temperature; The preprocessing includes screening and normalization processing.
3. The reactive power demand forecasting method based on combined neural network according to claim 1 is characterized in that: The outputs of the convolutional neural network are all connected to their corresponding gated recurrent units; the gated recurrent units are connected to each other; each gated recurrent unit is connected to a connection layer; and each connection layer is connected to the output layer of the model.
4. The reactive power demand forecasting method based on combined neural network according to claim 3 is characterized in that: The convolutional neural network includes an input layer, a convolution layer, a pooling layer, a fully connected layer and an output layer; wherein the input layer inputs a preprocessed data matrix; after the pooling layer and the convolution layer are alternately operated, the data matrix obtains the probability distribution of data features through multiple layers of changes; the fully connected layer uses a logistic regression function to classify the probability distribution of data features to obtain a reactive power demand prediction value; and the output layer outputs.
5. The reactive power demand forecasting method based on combined neural network according to claim 1 is characterized in that: During the training process of the reactive power demand prediction model, the neural network training parameters are updated at each level by back propagating the residual through gradient descent.
6. The reactive power demand forecasting method based on combined neural network according to claim 1 is characterized in that: The formula for the denormalization is as follows: (6) In the formula, is the final reactive power demand forecast value; is the reactive power demand forecast value obtained by the reactive power demand forecast model; , They are respectively the minimum and maximum values of the predicted data obtained by the reactive power demand prediction model.
7. The reactive power demand forecasting method based on combined neural network according to claim 1 is characterized in that: The mean absolute error and root mean square error are used to evaluate the effect of reactive power demand forecasting model.
8. A reactive power demand forecasting system based on a combined neural network, using the method according to any one of claims 1 to 7, characterized in that: The system comprises: A data acquisition module is used to acquire reactive load characteristic historical data and preprocess it, and divide the preprocessed data into a training set and a test set; A model building module is used to build a reactive power demand prediction model by combining a convolutional neural network with a gated recurrent unit and set a loss function; A model training module is used to train and test the reactive power demand prediction model using a training set and a test set based on the loss function to obtain a trained reactive power demand prediction model; Iterative prediction module, used to obtain real-time data of reactive load characteristics and preprocess it, and input it into the trained reactive demand prediction model to obtain reactive demand prediction value; The denormalization module is used to denormalize the reactive power demand forecast value to obtain the final reactive power demand forecast value and evaluate the effect of the reactive power demand forecast model.
9. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Multi-index sewage quality prediction method based on parallel CNN-GRU network
CN117252285A