CN115310782A - Power consumer demand response potential evaluation method and device based on neural turing machine - Google Patents

Power consumer demand response potential evaluation method and device based on neural turing machine Download PDF

Info

Publication number
CN115310782A
CN115310782A CN202210858922.0A CN202210858922A CN115310782A CN 115310782 A CN115310782 A CN 115310782A CN 202210858922 A CN202210858922 A CN 202210858922A CN 115310782 A CN115310782 A CN 115310782A
Authority
CN
China
Prior art keywords
user
vector
demand response
memory
gru
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210858922.0A
Other languages
Chinese (zh)
Inventor
杨帆
沈煜
孔祥玉
胡伟
卢文祺
杨志淳
胡成奕
宿磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin University
State Grid Corp of China SGCC
Electric Power Research Institute of State Grid Hubei Electric Power Co Ltd
Original Assignee
Tianjin University
State Grid Corp of China SGCC
Electric Power Research Institute of State Grid Hubei Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin University, State Grid Corp of China SGCC, Electric Power Research Institute of State Grid Hubei Electric Power Co Ltd filed Critical Tianjin University
Priority to CN202210858922.0A priority Critical patent/CN115310782A/en
Publication of CN115310782A publication Critical patent/CN115310782A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06315Needs-based resource requirements planning or analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0463Neocognitrons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0206Price or cost determination based on market factors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Data Mining & Analysis (AREA)
  • Game Theory and Decision Science (AREA)
  • Health & Medical Sciences (AREA)
  • Tourism & Hospitality (AREA)
  • Educational Administration (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Software Systems (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Primary Health Care (AREA)
  • Water Supply & Treatment (AREA)
  • Public Health (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a method and a device for evaluating demand response potential of a power consumer based on a Neural Training Machine (NTM), wherein the method comprises the following steps: grouping users by adopting a mean shift method to obtain user group data sets with different response characteristics; based on the user group data set, executing an attention mechanism AM in a gating cycle unit GRU, and extracting the demand response behavior characteristics of the user in different meteorological environments; and evaluating the demand response load adjustment quantity of the user at the given real-time electricity price based on the extracted demand response behavior characteristics through a neural turing machine model. The real-time demand response evaluation of the user side is realized, the meteorological environment influence and the response behavior characteristics of the user are considered, the accuracy and the speed of potential evaluation are improved, a reliable evaluation result is provided for the subsequent electricity price optimization decision, and the real-time accurate demand response management of the user side is facilitated to be realized.

Description

Power consumer demand response potential assessment method and device based on neural turing machine
Technical Field
The invention relates to the field of power consumer real-time demand response potential evaluation, in particular to a method and a device for evaluating power consumer demand response potential based on a neural turing machine.
Background
Accurate potential assessment is the key to the demand response aggregation management of the virtual power plant on the users. At present, the research can be mainly divided into methods such as fuzzy evaluation, scene matching, load modeling, uncertainty analysis, transfer learning, neural algorithm exploration and the like. The flexibility of both fuzzy evaluation and scene matching in practical applications is limited. In the aspect of user load modeling, the early consumer psychological model and the early price elasticity model do not aim at the energy utilization characteristics of different users, and the fuzzy overall modeling influences the accuracy of an evaluation result. Therefore, some scholars study the classification modeling of detailed load devices. And carrying out classification modeling on the resident load equipment to help the new energy to be consumed. There are documents that classify loads in large commercial buildings such as air conditioners, electric vehicles and the like and establish time distribution models, and a bottom-up demand response potential evaluation method is proposed. The model may represent the energy usage characteristics of a particular load over a period of time. However, the demand response characteristics of different types of users are difficult to embody, and the demand response characteristics cannot be directly applied to response evaluation of the virtual power plant.
The neural algorithm can better improve the accuracy of the potential evaluation aiming at the characteristics of the user. However, how to extract and evaluate response features of users of different categories on the premise of ensuring evaluation efficiency is still an important challenge in making power price decisions in an actual virtual power plant. There is literature that models uncertainty in demand response environments with a deep learning model based on Recurrent Neural Networks (RNNs). A Long-Short Term Memory algorithm (LSTM) is helpful for improving the problems of gradient extinction, explosion and the like of the RNN. However, the LSTM algorithm has numerous parameters and complex calculation, and cannot meet the requirement of a virtual power plant for high-efficiency real-time evaluation of a large number of users. Moreover, there is still room for improvement in terms of accuracy. The advent of the neuroleptic machine helped to ameliorate the above problems. On one hand, it selects a gated round robin Unit (GRU) as the core controller. When the actual data with simple input and output dimensions are processed, the calculation amount can be obviously reduced, and the calculation efficiency is improved. On the other hand, the external memory matrix can more comprehensively retain a great deal of information such as the user and the meteorological environment. The Attention Mechanism (AM) can accurately locate effective information from massive information, so that long-distance dependency relationship can be conveniently captured, and accuracy of demand response mining is improved. At present, neural turing machines are mostly applied to the field of language modeling, are excellent in the aspects of solving the problems of voice recognition, handwritten character generation, natural language processing and the like, and have a larger research space in the aspect of evaluating the demand response potential of a virtual power plant.
Disclosure of Invention
In order to solve the existing defects, the invention provides the neural-turing-based power user demand response potential evaluation method and device, which realize the real-time demand response evaluation of the user side, consider the meteorological environment influence and the response behavior characteristics of the user, improve the accuracy and speed of the potential evaluation, provide a reliable evaluation result for the subsequent electricity price optimization decision, and are beneficial to realizing the real-time accurate demand response management of the user side.
A power consumer demand response potential assessment method based on a neural turing machine comprises the following steps:
grouping users by adopting a mean shift method to obtain user group data sets with different response characteristics;
based on the user group data set, executing an attention mechanism AM in a gating cycle unit GRU, and extracting the demand response behavior characteristics of the user in different meteorological environments;
and evaluating the demand response load adjustment quantity of the user at the given real-time electricity price based on the extracted demand response behavior characteristics through a neural turing machine model.
Further, grouping users by using a mean shift method to obtain user group data sets with different response characteristics, specifically comprising the following steps:
step 1.1, expanding and establishing a storage matrix data set required by training by a user historical data set;
step 1.2, in unmarked users, randomly selecting a user C as a central point, wherein the characteristic vector of the user C is omega c,t (ii) a Determining the radius r of a sliding window, wherein the r is used for representing the characteristic vector floating range;
step 1.3, according to the characteristic vector omega of the user i in the area i,t Calculating the drift vector S of the center point C in the region h ,C k Set of user points representing distances from the center C smaller than the radius r:
Figure BDA0003755513440000021
C kc,t )={x:(ω i,tc,t ) Ti,tc,t )<r 2 }
a gaussian kernel function G (ω) is introduced to measure the actual offset contribution of each sample user point:
Figure BDA0003755513440000022
wherein h is the bandwidth of a Gaussian function;
after introducing the Gaussian kernel function, the vector S is drifted hc,t ) Comprises the following steps:
Figure BDA0003755513440000031
wherein NU is the total number of users;
step 1.4, endowing different weight coefficients for each sample user point, and finally writing the drift vector into the following form:
Figure BDA0003755513440000032
wherein, the calculation formula of the weight coefficient is as follows:
Figure BDA0003755513440000033
step 1.5, updating the position of the central point, and drifting:
ω c,t :=ω c,t +S h
step 1.6, repeating the iterative moving process of the step 1.2-1.5 until the offset vector is smaller than a preset value to determine the central point of the current user group, and classifying the users in the current window radius r into a cluster C;
and step 1.7, traversing users which are not grouped, repeating the steps 1.2-1.6 until user points in the area are all marked, completing user grouping, and respectively updating the user group data set and the storage matrix data set of each group.
Further, step 1.1 specifically includes:
historical response count of user i during period tAccording to the inclusion of real-time electricity prices lambda dri,t Environment data C i,t Demand response load d i,t Using historical data set N i Represents:
N i ={(λ dri,1 ,C i,1 ,d i,1 ),(λ dri,2 ,C i,2 ,d i,2 ),…,(λ dri,t-1 ,C i,t-1 ,d i,t-1 ),(λ dri,t ,C i,t ,d i,t )}
the environment data comprises the temperature and the humidity of the user at the current moment;
expansion is carried out on the historical data set to obtain a storage matrix data set R i
R i ={(ω i,1 ,d i,1 ),(ω i,2 ,d i,2 ),…,(ω i,t-1 ,d i,t-1 ),(ω i,t ,d i,t )}
Wherein, in the time period t, the feature vector omega i,t The system consists of real-time price and environmental data of the current time period, and incentive electricity price, demand response and environmental meteorological data of the past L time periods:
ω i,t ={λ dri,t-L ,C i,t-L ,d i,t-L ,…,λ dri,t-2 ,C i,t-2 ,d i,t-2dri,t-1 ,C i,t-1 ,d i,t-1dri,t ,C i,t }。
further, based on the user group data set, an attention mechanism AM is executed in the gated loop unit GRU, and demand response behavior characteristics of the user in different meteorological environments are extracted, which specifically includes the following steps:
step 2.1: for GRU unit at t, input x t For storing the user feature vector omega in the matrix data set i,t Simultaneously reading the memory matrix M t Memory vector m from the last training period i,t-1
Step 2.2: compute update Gate z i,t And a reset gate r i,t Updating the door z i,t Used for determining the storage ratio of the user history information and the current input information, and resettingDoor r i,t History information used to decide to forget:
z i,t =σ(W z x i,t +U z m i,t-1 )
r i,t =σ(W r x i,t +U r m i,t-1 )
Figure BDA0003755513440000041
where σ (·) is the activation function; w is a group of z 、W r And U z 、U r Respectively different weight coefficient matrixes;
step 2.3: combining the actually input x according to the calculation result of the reset gate i,t Generating the latest characteristic content of the user in the current time period
Figure BDA0003755513440000042
Figure BDA0003755513440000043
Wherein, tanh (-) is an activation function, and W and U are weight coefficient matrixes;
step 2.4: calculating to obtain the latest transmission vector h i,t Update the transmission matrix and combine h i,t Attention focusing unit passed to period t:
Figure BDA0003755513440000044
step 2.5: performing content attention gathering, inputting h given by a controller t And the memory matrix M t Performing content-based attention clustering, measuring similarity by cosine distance, calculating cosine distance between input and each memory segment in memory matrix, and normalizing to obtain similarity weight
Figure BDA0003755513440000045
The calculation formula is as follows:
Figure BDA0003755513440000046
Figure BDA0003755513440000047
wherein, beta t Representing parameters generated in the GRU processing process, wherein j is the sequence number of a memory vector except the ith user in the memory matrix;
step 2.6: according to the parameter g output by the controller t Judging the degree of concentration of attention needs based on the content to obtain an interpolation vector
Figure BDA0003755513440000048
g t Between 0 and 1, the closer to 1, the greater the degree of attention clustering based on the content:
Figure BDA0003755513440000051
step 2.7: through weight conversion, different memory segments are focused under different conditions, the purpose of accurately recalling a certain moment is realized, and s output by the GRU is output according to the controller t Performing attention gathering based on positions, considering the influence of meteorological data of the external environment when the user actually responds, performing linear combination on each element of the whole weight vector again, giving higher weight to the memory vector under the similar environment, and obtaining a position vector m through position attention gathering t (i) The calculation formula is as follows:
Figure BDA0003755513440000052
wherein s is (i-j),t For a period t, a weight sequence of each memory vector in the memory matrix and the memory vector of the user i is related;
step 2.8: according to the parameter gamma output by the controller t And performing exponential operation on the feature vectors and then normalizing to increase the discrimination:
Figure BDA0003755513440000053
wherein, γ t To weight the sharpening parameter, m i,t The memory vector of the user i in the t time period finally obtained after updating is the extracted demand response behavior characteristic;
step 2.9: for a given training time period T, the steps 2.1-2.8 are circulated until the extraction of the demand response behavior characteristics in the time period T of the user group is completed, and the memory matrix M is updated t
Furthermore, the method comprises the following steps of evaluating the demand response load adjustment quantity of the user under the given real-time electricity price through a neural turing machine model based on the extracted demand response behavior characteristics:
step 3.1: reading original input data information from a user group data set, and respectively training neural turing models of different groups of users at different time periods based on a user response characteristic extraction process combining GRU and an attention mechanism to obtain the neural turing models of different groups of users at different time periods;
step 3.2: when actual real-time potential evaluation is carried out, selecting the neural turing machine model of the group of users corresponding to the time interval obtained by training in the step 3.1, inputting planned real-time electricity price in the first 15-25 minutes of the arrival of the evaluation time interval, and obtaining the evaluated user response result through the neural turing machine model;
step 3.3: after the user demand response time period is finished, acquiring the actual response result of the user under the condition of stimulating the electricity price in real time, and updating the user group data set and the storage matrix data set;
step 3.4: calculating an evaluation deviation rate according to an actual value and an evaluation value of user demand response, returning the evaluation deviation rate to the GRU unit, performing model feedback correction, and obtaining effect evaluation of the neural turing model on user demand response potential evaluation;
the root mean square error RMSE is used as a loss function of the GRU network, and the calculation formula is as follows:
Figure BDA0003755513440000061
in the formula, d and
Figure BDA0003755513440000062
respectively representing an actual value and a predicted value of user response, wherein n is total training days;
evaluating the evaluation effect of the neural turing machine model by using the average absolute percentage error MAPE, wherein the evaluation effect is better when the error is smaller, and the calculation formula of the average absolute percentage error is as follows:
Figure BDA0003755513440000063
further, step 3.1 specifically includes:
(1) The GRU processes input contents from users in the same group, wherein the input contents comprise two parts, one part is a user characteristic vector containing information such as real-time electricity price and environmental meteorological data, the other part is a memory vector from a storage matrix, and the GRU extracts a transmission characteristic vector of a user for demand response;
(2) The GRU transmits the transmission characteristic vector and the results of the parameters generated in the middle to the reading and writing head, wherein the parameters comprise beta t 、g t 、s t 、γ t For subsequent information attention gathering calculation and the read-write head to update and erase itself;
(3) The write head erases and writes the memory matrix, and updates the latest transmission vector from the GRU unit at the current moment; the write head performs write operation to modify the content of the memory matrix, the write operation mainly comprises two steps of clearing and writing, and based on the output of the controller, the write head generates an elimination vector e t And an additional vector a t Elimination vector e t Each value in the range of 0 to 1, by varying degreesThe scaling of (2) weakens and eliminates different memory contents, and the additional vector performs memory superposition on the original basis to complete the writing of a new memory matrix:
M t (i)=M t-1 (i)[1-m t (i)e t ]
M t (i)=M t (i)+m t (i)a t
(4) The attention mechanism calculates and updates a memory vector and a memory matrix according to the latest transmission vector;
(5) Reading contents from the memory matrix by using a reading head, wherein the read contents are the latest memory characteristic content part in the t time period of the user, and returning information to the GRU unit of the controller;
(6) According to the latest memory vector content, the controller GRU calculates the user load adjustment amount through the full connection layer and outputs the result;
(7) And (5) updating the total memory matrix according to the real-time input, output and memory matrix, and circulating the steps (1) - (6) until the model training in all time periods is completed.
A neural turing machine-based power consumer demand response potential assessment device comprises:
the user group data set acquisition module is used for grouping users by adopting a mean shift method to obtain user group data sets with different response characteristics;
the demand response behavior feature extraction module is used for executing an attention mechanism AM in the gated loop unit GRU based on the user group data set and extracting demand response behavior features of the user in different meteorological environments;
and the demand response potential evaluation module is used for evaluating the demand response load adjustment amount of the user under the given real-time electricity price based on the extracted demand response behavior characteristics through the neural turing model.
Further, the user group data set obtaining module uses a mean shift method to group users to obtain user group data sets with different response characteristics, and the method specifically includes:
step 1.1, expanding and establishing a storage matrix data set required by training by a user historical data set;
step 1.2, in unmarked users, randomly selecting a user C as a central point, wherein the characteristic vector of the user C is omega c,t (ii) a Determining a radius r of a sliding window, wherein the r is used for representing a characteristic vector floating range;
step 1.3, according to the characteristic vector omega of the user i in the area i,t Calculating the drift vector S of the central point C in the area h ,C k Set of user points representing distances from the center C smaller than the radius r:
Figure BDA0003755513440000071
C kc,t )={x:(ω i,tc,t ) Ti,tc,t )<r 2 }
a gaussian kernel function G (ω) is introduced to measure the actual offset contribution of each sample user point:
Figure BDA0003755513440000072
wherein h is the bandwidth of a Gaussian function;
after introducing the Gaussian kernel function, the vector S is drifted hc,t ) Comprises the following steps:
Figure BDA0003755513440000073
wherein NU is the total number of users;
step 1.4, endowing each sample user point with different weight coefficients, and writing the drift vector into the following form:
Figure BDA0003755513440000074
wherein, the calculation formula of the weight coefficient is as follows:
Figure BDA0003755513440000075
step 1.5, updating the position of the central point, and drifting:
ω c,t :=ω c,t +S h
step 1.6, repeating the iterative moving process of the step 1.2-1.5 until the offset vector is smaller than a preset value to determine the central point of the current user group, and classifying the users in the current window radius r into a cluster C;
and step 1.7, traversing users which are not grouped, repeating the steps 1.2-1.6 until user points in the area are all marked, completing user grouping, and respectively updating the user group data set and the storage matrix data set of each group.
Further, step 1.1 specifically includes:
in the period t, the historical response data of the user i contains the real-time electricity price lambda dri,t Environment data C i,t Demand response load d i,t Using historical data set N i Represents:
N i ={(λ dri,1 ,C i,1 ,d i,1 ),(λ dri,2 ,C i,2 ,d i,2 ),…,(λ dri,t-1 ,C i,t-1 ,d i,t-1 ),(λ dri,t ,C i,t ,d i,t )}
the environment data comprises the temperature and the humidity of the user at the current moment;
expansion is carried out on the historical data set to obtain a storage matrix data set R i
R i ={(ω i,1 ,d i,1 ),(ω i,2 ,d i,2 ),…,(ω i,t-1 ,d i,t-1 ),(ω i,t ,d i,t )}
Wherein, in the t period, the characteristic vector omega i,t The system consists of real-time price and environmental data of the current time period, and incentive electricity price, demand response and environmental meteorological data of the past L time periods:
ω i,t ={λ dri,t-L ,C i,t-L ,d i,t-L ,…,λ dri,t-2 ,C i,t-2 ,d i,t-2dri,t-1 ,C i,t-1 ,d i,t-1dri,t ,C i,t }。
further, the demand response behavior feature extraction module executes an attention mechanism AM in the gated loop unit GRU based on the user group data set, and extracts demand response behavior features of the user in different meteorological environments, specifically including:
step 2.1: for GRU unit at t, input x t For storing the user feature vector omega in the matrix data set i,t Simultaneously reading the memory matrix M t The memory vector m from the last training period i,t-1
Step 2.2: compute update gate z i,t And a reset gate r i,t Updating the door z i,t For determining the storage ratio of the user history information and the current input information, resetting the gate r i,t History information used to decide to forget:
z i,t =σ(W z x i,t +U z m i,t-1 )
r i,t =σ(W r x i,t +U r m i,t-1 )
Figure BDA0003755513440000081
where σ (·) is the activation function; w z 、W r And U z 、U r Respectively different weight coefficient matrixes;
step 2.3: combining the actually input x according to the calculation result of the reset gate i,t Generating the latest characteristic content of the user in the current time period
Figure BDA0003755513440000082
Figure BDA0003755513440000083
Where, tanh (-) is the activation function, W and U are the weighting coefficient matrix;
step 2.4: calculating to obtain the latest transmission vector h i,t Update the transmission matrix and sum h i,t Attention focusing unit passed to period t:
Figure BDA0003755513440000091
step 2.5: performing content attention gathering, inputting h given by a controller t And the memory matrix M t Performing content-based attention clustering, measuring similarity by cosine distance, calculating cosine distance between input and each memory segment in memory matrix, and normalizing to obtain similarity weight
Figure BDA0003755513440000092
The calculation formula is as follows:
Figure BDA0003755513440000093
Figure BDA0003755513440000094
wherein, beta t Representing parameters generated in the GRU processing process, wherein j is the sequence number of a memory vector except the ith user in the memory matrix;
step 2.6: interpolation modification
According to the parameter g output by the controller t Judging the degree of concentration needed based on the content attention to obtain an interpolation vector
Figure BDA0003755513440000095
g t Between 0 and 1, the closer to 1, the greater the degree of attention clustering based on the content:
Figure BDA0003755513440000096
step 2.7: performing position attention focusing:
the attention based on the position is gathered into the re-linear combination of the whole weight vector elements, namely, different memory segments are focused under different conditions through weight transformation, the purpose of accurately memorizing a certain moment is realized, and the aim of accurately memorizing the moment is realized according to s output by the GRU of the controller t Performing attention gathering based on position, namely considering the influence of weather data of the external environment when the user actually responds, performing linear combination on each element of the whole weight vector again, giving higher weight to the memory vector under the similar environment, and obtaining a position vector m by position attention gathering t (i) The calculation formula is as follows:
Figure BDA0003755513440000097
wherein s is (i-j),t For a period t, memorizing a weight sequence of each memory vector in the matrix and the memory vector of the user i;
step 2.8: carrying out weight sharpening:
according to the parameter gamma output by the controller t And performing exponential operation on the feature vectors and then normalizing to increase the discrimination:
Figure BDA0003755513440000101
wherein, gamma is t To weight the sharpening parameter, m i,t The memory vector of the user i in the t time period finally obtained after updating is the extracted demand response behavior characteristic;
step 2.9: for a given training time period T, the steps 2.1-2.8 are circulated until the extraction of the demand response behavior characteristics in the time period T of the user group is completed, and the memory matrix M is updated t
Further, the demand response behavior feature extraction module evaluates the demand response load adjustment amount of the user at a given real-time electricity price through the neural turing machine model based on the extracted demand response behavior feature, and specifically includes:
step 3.1: reading original input data information from a user group data set, and respectively carrying out neural turing machine model training of different groups of users at different time periods based on a user response characteristic extraction process combining GRU and an attention mechanism;
step 3.2: when actual real-time potential evaluation is carried out, selecting a neural turing machine model of a time interval corresponding to the group of users, inputting planned real-time electricity prices in the first 15-25 minutes of the arrival of the evaluation time interval, and acquiring an evaluated user response result by the neural turing machine model, =;
step 3.3: after the user demand response time period is finished, acquiring the actual response result of the user under the condition of real-time excitation electricity price, and updating a user group data set and a storage matrix data set;
step 3.4: calculating an evaluation deviation rate according to an actual value and an evaluation value of user demand response, returning the evaluation deviation rate to the GRU unit, performing model feedback correction, and obtaining effect evaluation of the neural turing model on user demand response potential evaluation;
the root mean square error RMSE is used as a loss function of the GRU network, and the calculation formula is as follows:
Figure BDA0003755513440000102
in the formula, d and
Figure BDA0003755513440000103
respectively representing the actual value and the predicted value of the user response, wherein n is the total training days;
evaluating the evaluation effect of the neural turing machine model by using the average absolute percentage error MAPE, wherein the evaluation effect is better when the error is smaller, and the calculation formula of the average absolute percentage error is as follows:
Figure BDA0003755513440000104
further, step 3.1 specifically includes:
(1) The GRU processes input contents from users in the same group, wherein the input contents comprise two parts, one part is a user characteristic vector containing information such as real-time electricity price and environmental meteorological data, and the other part is a memory vector from a storage matrix;
(2) The GRU transmits the transmission characteristic vector and the results of the parameters generated in the middle to the reading and writing head, wherein the parameters comprise beta t 、g t 、s t 、γ t For subsequent information attention gathering calculation and the read-write head to update and erase itself;
(3) The read-write head erases and writes the memory matrix, and updates the latest transmission vector from the GRU unit at the current moment; the write head performs write operation to modify the content of the memory matrix, the write operation mainly comprises two steps of clearing and writing, and based on the output of the controller, the write head generates an elimination vector e t And an additional vector a t Eliminating the vector e t Each value range is 0-1, and different memory contents are weakened and eliminated through scaling in different degrees. Additional vector a t The range is not limited to 0-1, and the memory superposition is carried out on the original basis to complete the writing of a new memory matrix:
M t (i)=M t-1 (i)[1-m t (i)e t ]
M t (i)=M t (i)+m t (i)a t
(4) The attention mechanism calculates and updates a memory vector and a memory matrix according to the latest transmission vector;
(5) Reading contents from the memory matrix by using a reading head, wherein the read contents are the latest memory characteristic content part in the t time period of the user, and returning information to the GRU unit of the controller;
(6) According to the latest memory vector content, the controller GRU calculates the user load adjustment amount through the full connection layer and outputs the result;
(7) And (5) updating the total memory matrix according to the real-time input, output and memory matrix, and circulating the steps (1) - (6) until the model training in all time periods is completed.
The technical scheme provided by the invention has the beneficial effects that:
(1) On the aspect of an energy company, the neural turing machine-based power user demand response potential assessment method can help the energy company to more scientifically formulate a real-time dynamic price and demand response incentive policy based on the obtained high-precision response assessment value, and the conclusion obtained by analyzing and processing the user response detail result can be used for extracting user behavior characteristics, adjusting, perfecting and scientifically assessing the ongoing energy efficiency project of the energy company, and more reasonably designing and implementing future projects and allocating funds;
(2) On the aspect of resident users, the power consumer demand response potential assessment method based on the neural turing machine can be combined with meteorological environment conditions, user own power utilization habits, response capability and preference of dynamic prices, and assesses the load adjustment amount of a user under the real-time power price, so that the subsequent optimization power price formulation is guaranteed, the power utilization energy demand is met, the user energy cost is reduced, the comfort level of the user is guaranteed, and the power consumption economic benefit of residents can be greatly improved. In addition, the method deeply excavates the behavior habit characteristics of the user, and provides possibility for solving the self energy use habit of the user;
(3) On the social level, the neural-turing-based power consumer demand response potential assessment method can provide references of user behavior characteristic rules for policy makers, power grid dispatchers, efficient research teachers and students, salespeople and the like, can effectively promote strategic making meeting future development requirements of the society, can be applied to actual power energy dispatching and power consumer response management, provides references for exploring user behavior characteristics for researchers, prompts energy sales managers to fully excavate user-side response potential, mobilizes user-side response new energy smooth consumption requirements on the whole, ensures the safety and stability of power system operation, and effectively improves the intelligent social energy interaction level and the development of management technology.
Drawings
FIG. 1 is a flowchart illustrating an embodiment of a method for assessing a demand response potential of a power consumer based on a neural turing machine;
FIG. 2 is a schematic illustration of a demand response feature extraction process incorporating GRUs and attention mechanisms in accordance with the present invention;
FIG. 3 is a graph comparing the deviation of the present invention with a recurrent neural network RNN, a long short term memory artificial neural network LSTM, and a simple GRU model.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, the embodiment of the present invention provides a neural turing machine-based power consumer demand response potential evaluation method, which includes mean shift user clustering grouping, power consumer response behavior feature extraction, and neural turing machine potential evaluation. The method specifically comprises the following steps:
step 1: grouping users by adopting a mean shift method to obtain user group data sets with different response characteristics, and specifically comprising the following steps:
and 1.1, expanding and establishing a storage matrix data set required by training by using a user historical data set.
In the period t, the historical response data of the user i contains the real-time electricity price lambda dri,t Environment data C i,t Demand response load d i,t Etc. using historical data set N i Represents:
N i ={(λ dri,1 ,C i,1 ,d i,1 ),(λ dri,2 ,C i,2 ,d i,2 ),…,(λ dri,t-1 ,C i,t-1 ,d i,t-1 ),(λ dri,t ,C i,t, d i,t )}
the environment data includes the temperature and humidity of the user at the current moment.
It is considered that the response of the user in the current period is not only related to the current period, but also influenced by the price, the response amount and the like of the adjacent period. Thus, the memory matrix R is derived from the expansion of the historical data set i
R i ={(ω i,1 ,d i,1 ),(ω i,2 ,d i,2 ),…,(ω i,t-1 ,d i,t-1 ),(ω i,t ,d i,t )}
Wherein, t time period, the feature vector omega i,t The system consists of real-time price and environmental data of the current time period, and incentive electricity price, demand response and environmental meteorological data of the past L time periods:
ω i,t ={λ dri,t-L ,C i,t-L ,d i,t-L ,…,λ dri,t-2 ,C i,t-2 ,d i,t-2dri,t-1 ,C i,t-1 ,d i,t-1dri,t ,C i,t }
step 1.2, in unmarked users, randomly selecting a user C as a central point, wherein the characteristic vector of the user C is omega c,t (ii) a The radius r of the sliding window, i.e. the feature vector floating range, is determined.
Step 1.3, according to the characteristic vector omega of the user i in the area i,t Calculating the drift vector S of the center point C in the region h ,C k Set of user points representing distances from the center C smaller than the radius r:
Figure BDA0003755513440000121
C kc,t )={x:(ω i,tc,t ) Ti,tc,t )<r 2 }
in actual calculations, since the total mean offset contribution of each sample user point to the sample is different, a gaussian kernel function G (ω) is introduced to measure the actual offset contribution of each sample user point.
Figure BDA0003755513440000131
Where h is the bandwidth of the gaussian function.
After introducing the Gaussian kernel function, the vector S is drifted hc,t ) Comprises the following steps:
Figure BDA0003755513440000132
wherein NU is the total number of users.
Step 1.4, considering that the actual demand response capability of each user is different, considering that the importance of different users is different, giving different weight coefficients to each sample user point, and finally writing the drift vector into the following form:
Figure BDA0003755513440000133
wherein, the calculation formula of the weight coefficient is as follows:
Figure BDA0003755513440000134
and step 1.5, updating the position of the central point and carrying out drifting.
ω c,t =ω c,t +S h
And 1.6, repeating the iterative moving process of the steps 1.2-1.5 until the offset vector is smaller than a preset value (namely convergence occurs) and no higher density occurs, determining the central point of the current user group, and classifying the users in the current window radius r into a cluster C.
And step 1.7, traversing users which are not grouped, repeating the steps 1.2-1.6 until user points in the area are all marked, completing user grouping, and respectively updating the user group data set and the storage matrix data set of each group. .
And 2, step: based on the user group data set, an attention mechanism AM is executed in the gated loop unit GRU, and demand response behavior characteristics of the user in different meteorological environments are extracted, as shown in fig. 2, step 2 specifically includes the following steps:
step 2.1: for GRU unit at t, input x t For storing the user feature vector omega in the matrix data set i,t Simultaneously reading the memory matrix M t Memory vector m from the last training period i,t-1
Step 2.2: compute update gate z i,t And a reset gate r i,t The refresh gate determines the storage ratio of the user history information and the current input information, and the reset gate determines the history information to be forgotten.
z i,t =σ(W z x i,t +U z m i,t-1 )
r i,t =σ(W r x i,t +U r m i,t-1 )
Figure BDA0003755513440000141
Wherein, sigma (·) is an activation function, and the sigmoid function is adopted in the invention; w z W r And U z U r Respectively different weight coefficient matrices.
Step 2.3: combining the actually input x according to the calculation result of the reset gate i,t Generating the latest characteristic content of the user in the current time period
Figure BDA0003755513440000142
Figure BDA0003755513440000143
Wherein, tanh (-) is an activation function; w and U are weight coefficient matrices.
Step 2.4: calculating to obtain the latest transmission vector h i,t Update the transmission matrix and combine h i,t To the attention focusing unit for the period t.
Figure BDA0003755513440000144
Step 2.5: content-based addressing is performed. H given by input controller t And the memory matrix M t Content-based attention gathering is performed. The invention adopts cosine distance to measure similarity, and obtains similarity weight by calculating cosine distance between input and each memory segment (characteristic vector) in the memory matrix and then normalizing
Figure BDA0003755513440000145
The calculation formula is as follows:
Figure BDA0003755513440000146
Figure BDA0003755513440000147
wherein, beta t Represents the parameters generated in the GRU processing process, and j is the memory vector sequence number of the memory matrix except the ith user.
Step 2.6: interpolation modification (interpolation)
According to the parameter g output by the controller t Judging the degree of concentration needed based on the content attention to obtain an interpolation vector
Figure BDA0003755513440000148
Figure BDA0003755513440000149
g t Between 0 and 1, the closer to 1, the greater the degree of attention focusing on the content.
Step 2.7: location-based addressing is performed. Base ofThe attention at the position is gathered into the re-linear combination of the whole weight vector elements, namely, different memory segments are focused under different conditions through weight transformation, and the purpose of accurately recalling a certain moment (position) is realized. S according to the output of the controller GRU t And performing attention gathering based on positions, namely considering the influence of weather data of the external environment when the user actually responds, performing linear combination on each element of the whole weight vector again, and giving higher weight to the memory vector in the similar environment. In the present invention, location attention gathering can better utilize weather data of the environment where the user is located. According to different response scenes, different response behavior habits of the user are focused with emphasis, and the accuracy and the efficiency of demand response mining are improved. The position attention is gathered to obtain a position vector m t (i) The calculation formula is as follows:
Figure BDA0003755513440000151
wherein s is (i-j),t For the period t, the weight sequence of each memory vector in the memory matrix and the memory vector of the user i is related.
Step 2.8: and carrying out weight sharpening. In practical applications, the response habits of the same user typically remain stable for a period of time. To prevent the difference between the feature vectors from being insignificant, the parameter γ is output from the controller t And performing exponential operation on the characteristic vectors and then normalizing, so as to increase the discrimination and improve the positioning speed of the characteristic information.
Figure BDA0003755513440000152
Wherein, γ t To weight the sharpening parameter, m i,t And extracting the obtained response behavior characteristic information for the finally obtained memory vector of the user i in the t period after updating.
According to the model disclosed by the invention, an attention mechanism is added into a traditional GRU for improvement, so that the calculation efficiency, the evaluation accuracy and the long-time sequence processing capability of response characteristic extraction are effectively improved. Compared with the common neural algorithms such as LSTM and the like, the algorithm core GRU used by the method can improve the real-time calculation efficiency when processing low-dimensional input and output, and is suitable for quickly evaluating the actual demand of demand response potential of a plurality of users; in addition, the improved GRU utilizes an external memory matrix to simultaneously store meteorological data and user response characteristic information, and then uses an attention mechanism to accurately position information in mass data, so that long-distance dependency can be conveniently captured, and the real-time demand response load prediction accuracy of a user under different electricity prices is improved.
Step 2.9: for a given training time period T, the steps 2.1-2.8 are circulated until the extraction of the demand response behavior characteristics in the time period T of the user group is completed, and the memory matrix M is updated t The overall process is shown in figure 1.
And step 3: through a neural turing machine model, based on the extracted demand response behavior characteristics, evaluating the demand response load adjustment amount of the user at a given real-time electricity price, wherein the step 3 specifically comprises the following steps:
step 3.1: original input data information is read from a user group data set, and training of neural turing machines of different groups of users in different time periods is respectively carried out based on a user response characteristic extraction process combining GRU and an attention mechanism.
(1) The GRU processes input content from the same group of users. The input content comprises two parts, wherein one part is a user characteristic vector containing information such as real-time electricity price and environmental meteorological data, the other part is a memory vector from a storage matrix, and the GRU extracts a transmission characteristic vector of a user for carrying out demand response.
(2) The GRU transmits the transmission characteristic vector and the intermediate generated parameters to the read-write head, wherein the parameters comprise beta t 、g t 、s t 、γ t And the like, which is used for subsequent information attention gathering calculation and the read-write head to carry out self updating and erasing work.
(3) The write head erases and writes the memory matrix. And updating the latest transmission vector from the GRU unit at the current moment.
The write head performs a write operation to modify the memory matrix contents,the write operation mainly comprises two steps of clearing and writing. Based on the output of the controller, the write head generates an erasure vector e t And an additional vector a t . Elimination vector e t Each value range is 0-1, and different memory contents are weakened and eliminated through scaling in different degrees. Additional vector a t The range is not limited to 0-1, and the memory superposition is carried out on the original basis to complete the writing of the new memory matrix.
M t (i)=M t-1 (i)[1-m t (i)e t ]
M t (i)=M t (i)+m t (i)a t
Wherein M is t (i) Intermediate memory matrix for user i during t period, M t (i) The memory matrix for user i is updated for the write head for a period t.
(4) The attention mechanism calculates and updates the memory vector and the memory matrix according to the latest transmission vector.
(5) And reading the content from the memory matrix by using the reading head, wherein the read content is the latest memory characteristic content part in the t time period of the user, and returning information to the controller GRU unit.
(6) And according to the latest memory vector content, the controller GRU calculates the user load adjustment quantity through the full connection layer and outputs the result.
(7) And (5) updating the total memory matrix according to the real-time input, output and memory matrix, and circulating (1) - (6) until model training in all time periods is completed.
Step 3.2: when actual real-time potential evaluation is carried out, selecting the neural turing machine model of the group of users in the corresponding time period, inputting planned real-time electricity prices in the first 15-25 minutes of the arrival of the evaluation time period, and obtaining the evaluated user response result, namely the load adjustment quantity of the user in the time period through the neural turing machine model.
Step 3.3: and after the user demand response time period is finished, acquiring the actual response result of the user, namely the load adjustment amount, and updating the user group data set and the storage matrix data set under the condition of stimulating the electricity price in real time.
Step 3.4: and calculating an evaluation deviation rate according to the actual value and the evaluation value of the user demand response, returning the evaluation deviation rate to the GRU unit, performing model feedback correction, and obtaining the effect evaluation of the neural turing model on the user demand response potential evaluation.
The Root Mean Square Error (RMSE) is used as a loss function of the GRU network, and is calculated as:
Figure BDA0003755513440000161
in the formula, d and
Figure BDA0003755513440000171
respectively representing the actual value and the predicted value of the user response, and n is the total training days.
Evaluating the evaluation effect of the neural turing machine model by using Mean Absolute Percentage Error (MAPE), wherein the evaluation effect is better when the error is smaller, and the calculation formula of the Mean absolute percentage error is as follows:
Figure BDA0003755513440000172
example verification
1. Description of the drawings: all the steps can be written by Python3.7, and in order to realize more convenience and more efficient calculation, the method is suggested to be realized on a TensorFlow2.2 platform, and a Keras version is 2.3.1.
2. Example verification content
In order to compare the response evaluation effect of the NTM provided by the invention, a Recurrent Neural Network (RNN), a Long-Short Term Memory artificial Neural Network (LSTM) and a simple GRU model are further established for comparison. 4 representative sessions were selected for continuous training, and MAPE pairs of the training results of the four algorithms are shown in fig. 3. Generally speaking, the neural turing machine can rapidly achieve good prediction accuracy when the training times are less. The overall estimation deviation of the RNN is large, and the error is obvious in partial time period and is kept at about 15%. The LSTM can achieve MAPE reduction to about 8% in 5000 times of training, the GRU final deviation is close to the LSTM, but the training speed is faster than the LSTM. The accuracy and the training efficiency of the neural turing machine are high, and when the training times exceed 5000 times, the MAPE can be reduced to about 2%. The result shows that the attention mechanism in the neural turing machine can help the GRU to accurately extract the user characteristics, and the algorithm performance is improved from the two aspects of accuracy and efficiency.
The embodiment of the invention also provides a device for evaluating the demand response potential of the power consumer based on the neural turing machine, which comprises:
the user group data set acquisition module is used for grouping users by adopting a mean shift method to obtain user group data sets with different response characteristics;
the demand response behavior feature extraction module is used for executing an attention mechanism AM in a gated cyclic unit GRU based on the user group data set and extracting demand response behavior features of the user in different meteorological environments;
and the demand response potential evaluation module is used for evaluating the demand response load adjustment amount of the user under the given real-time electricity price based on the extracted demand response behavior characteristics through the neural turing model.
The user group data set obtaining module adopts a mean shift method to group users to obtain user group data sets with different response characteristics, and the method specifically comprises the following steps:
step 1.1, expanding and establishing a storage matrix data set required by training by a user historical data set;
step 1.2, in unmarked users, randomly selecting a user C as a central point, wherein the characteristic vector of the user C is omega c,t (ii) a Determining the radius r of a sliding window, wherein the r is used for representing the characteristic vector floating range;
step 1.3, according to the characteristic vector omega of the user i in the area i,t Calculating the drift vector S of the center point C in the region h ,C k Set of user points representing distances from the center C smaller than the radius r:
Figure BDA0003755513440000181
C kc,t )={x:(ω i,tc,t ) Ti,tc,t )<r 2 }
a gaussian kernel function G (ω) is introduced to measure the actual offset contribution of each sample user point:
Figure BDA0003755513440000182
wherein h is the bandwidth of a Gaussian function;
after introducing the Gaussian kernel function, the vector S is drifted hc,t ) Comprises the following steps:
Figure BDA0003755513440000183
wherein NU is the total number of users;
step 1.4, endowing different weight coefficients for each sample user point, and finally writing the drift vector into the following form:
Figure BDA0003755513440000184
wherein, the calculation formula of the weight coefficient is as follows:
Figure BDA0003755513440000185
step 1.5, updating the position of the central point, and drifting:
ω c,t :=ω c,t +S h
step 1.6, repeating the iterative moving process of the step 1.2-1.5 until the offset vector is smaller than a preset value to determine the central point of the current user group, and classifying the users in the current window radius r into a cluster C;
and step 1.7, traversing users which are not grouped, repeating the steps 1.2-1.6 until user points in the area are all marked, completing user grouping, and respectively updating the user group data set and the storage matrix data set of each group.
Wherein, step 1.1 specifically includes:
in the period t, the historical response data of the user i contains the real-time electricity price lambda dri,t Environment data C i,t Demand response load d i,t Using historical data set N i Represents:
N i ={(λ dri,1 ,C i,1 ,d i,1 ),(λ dri,2 ,C i,2 ,d i,2 ),…,(λ dri,t-1 ,C i,t-1 ,d i,t-1 ),(λ dri,t ,C i,t ,d i,t )}
the environment data comprises the temperature and the humidity of the user at the current moment;
expansion is carried out on the historical data set to obtain a storage matrix data set R i
R i ={(ω i,1 ,d i,1 ),(ω i,2 ,d i,2 ),…,(ω i,t-1 ,d i,t-1 ),(ω i,t ,d i,t )}
Wherein, in the time period t, the feature vector omega i,t The system consists of real-time price and environmental data of the current time period, and incentive electricity price, demand response and environmental meteorological data of past L time periods:
ω i,t ={λ dri,t-L ,C i,t-L ,d i,t-L ,…,λ dri,t-2 ,C i,t-2 ,d i,t-2dri,t-1 ,C i,t-1 ,d i,t-1dri,t ,C i,t }。
the demand response behavior feature extraction module executes an attention mechanism AM in a gated loop unit GRU based on the user group data set, and extracts demand response behavior features of the user in different meteorological environments, and specifically includes:
step 2.1: for GRU unit at t, input x t For storing user characteristics in a matrix data setVector omega i,t Simultaneously reading the memory matrix M t Memory vector m from the last training period i,t-1
Step 2.2: compute update gate z i,t And a reset gate r i,t Updating the door z i,t For determining the storage ratio of the user history information and the current input information, resetting the gate r i,t History information used to decide to forget:
z i,t =σ(W z x i,t +U z m i,t-1 )
r i,t =σ(W r x i,t +U r m i,t-1 )
Figure BDA0003755513440000191
where σ (·) is the activation function; w z 、W r And U z 、U r Respectively different weight coefficient matrixes;
step 2.3: combining the actually input x according to the calculation result of the reset gate i,t Generating the latest characteristic content of the user in the current time period
Figure BDA0003755513440000192
Figure BDA0003755513440000193
Where, tanh (-) is the activation function, W and U are the weighting coefficient matrix;
step 2.4: calculating to obtain the latest transmission vector h i,t Update the transmission matrix and combine h i,t Attention focusing unit passed to period t:
Figure BDA0003755513440000194
step 2.5: for concentration of content, given by input controllerh t And the memory matrix M t Performing content-based attention clustering, measuring similarity by cosine distance, calculating cosine distance between input and each memory segment in memory matrix, and normalizing to obtain similarity weight
Figure BDA0003755513440000195
The calculation formula is as follows:
Figure BDA0003755513440000196
Figure BDA0003755513440000201
wherein, beta t Representing parameters generated in the GRU processing process, wherein j is a memory vector sequence number except the ith user in the memory matrix;
step 2.6: according to the parameter g output by the controller t Judging the degree of concentration needed based on the content attention to obtain an interpolation vector
Figure BDA0003755513440000202
g t Between 0 and 1, the closer to 1, the greater the degree of attention clustering based on the content:
Figure BDA0003755513440000203
step 2.7: through weight conversion, different memory segments are focused under different conditions, the purpose of accurately recalling a certain moment is realized, and s output by the GRU is output according to the controller t Performing attention gathering based on positions, considering the influence of meteorological data of the external environment when the user actually responds, performing linear combination on each element of the whole weight vector again, giving higher weight to the memory vector under the similar environment, and obtaining a position vector m through position attention gathering t (i) The calculation formula is as follows:
Figure BDA0003755513440000204
wherein s is (i-j),t For a period t, a weight sequence of each memory vector in the memory matrix and the memory vector of the user i is related;
step 2.8: according to the parameter gamma output by the controller t And carrying out exponential operation on the characteristic vectors and then normalizing to increase the discrimination:
Figure BDA0003755513440000205
wherein, γ t To weight the sharpening parameter, m i,t The memory vector of the user i in the t period finally obtained after updating, namely the extracted demand response behavior characteristic;
step 2.9: for a given training time period T, the steps 2.1-2.8 are circulated until the extraction of the demand response behavior characteristics in the time period T of the user group is completed, and the memory matrix M is updated t
The demand response behavior feature extraction module is used for evaluating the demand response load adjustment quantity of the user under the given real-time electricity price through a neural turing model based on the extracted demand response behavior feature, and specifically comprises the following steps:
step 3.1: reading original input data information from a user group data set, and respectively carrying out neural turing machine model training of different groups of users at different time periods based on a user response characteristic extraction process combining GRU and an attention mechanism;
step 3.2: when actual real-time potential evaluation is carried out, selecting a neural turing machine model of the group of users in a corresponding time period, inputting a planned real-time electricity price in the first 15-25 minutes of the arrival of the evaluation time period, and obtaining an evaluated user response result through the neural turing machine model;
step 3.3: after the user demand response time period is finished, acquiring the actual response result of the user under the condition of stimulating the electricity price in real time, and updating the user group data set and the storage matrix data set;
step 3.4: calculating an evaluation deviation rate according to an actual value and an evaluation value of the user demand response, returning the evaluation deviation rate to the GRU unit, performing model feedback correction, and obtaining effect evaluation of the neural turing model on the user demand response potential evaluation;
the root mean square error RMSE is used as a loss function of the GRU network, and the calculation formula is as follows:
Figure BDA0003755513440000211
in the formula, d and
Figure BDA0003755513440000212
respectively representing an actual value and a predicted value of user response, wherein n is total training days;
the evaluation effect of the neural turing machine model is evaluated by using the average absolute percentage error MAPE, the evaluation effect is better when the error is smaller, and the calculation formula of the average absolute percentage error is as follows:
Figure BDA0003755513440000213
wherein, step 3.1 specifically includes:
(1) The GRU processes input contents from users in the same group, wherein the input contents comprise two parts, one part is a user characteristic vector containing real-time electricity price and environmental meteorological data information, and the other part is a memory vector from a storage matrix;
(2) The GRU transmits the transmission characteristic vector and the parameter generated in the middle to the reading and writing head, wherein the parameter comprises beta t 、g t 、s t 、γ t For subsequent information attention gathering calculation and the read-write head to update and erase itself;
(3) The write head erases and writes the memory matrix, and updates the latest transmission vector from the GRU unit at the current moment; the write head performs write operation to modify the content of the memory matrix, the write operation mainly includes two operations of erasing and writingA step in which the write head generates an erasure vector e based on the output of the controller t And an additional vector a t Eliminating the vector e t Each value range is 0-1, and the vector a is added by weakening and eliminating different memory contents through scaling of different degrees t And (3) performing memory superposition on the original basis to finish the writing of a new memory matrix:
M t (i)=M t-1 (i)[1-m t (i)e t ]
M t (i)=M t (i)+m t (i)a t
(4) The attention mechanism calculates and updates a memory vector and a memory matrix according to the latest transmission vector;
(5) Reading contents from the memory matrix by using a reading head, wherein the read contents are the latest memory characteristic content part of the user t time period, and returning information to a GRU unit of the controller;
(6) According to the latest memory vector content, the controller GRU calculates the user load adjustment amount through the full connection layer and outputs the result;
(7) And (5) updating the total memory matrix according to the real-time input, output and memory matrix, and circulating the steps (1) - (6) until the model training in all time periods is completed.
The embodiment of the invention also provides a new energy station sending-out line differential protection system based on instantaneous value integration, which comprises: a computer-readable storage medium and a processor;
the computer readable storage medium is used for storing executable instructions;
the processor is configured to read executable instructions stored in the computer-readable storage medium, and execute the new energy station outgoing line differential protection method based on instantaneous value integration according to the first aspect.
An embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the new energy station outgoing line differential protection method based on instantaneous value integration according to the first aspect.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Compared with the algorithms such as K-means clustering and the like, the mean shift clustering algorithm does not need to stipulate the number of clusters for the mean shift clustering algorithm in advance, but classifies the mean shift clustering algorithm by means of natural data driving, and is more suitable for the requirement of independently exploring user energy characteristics in the open market; then, the GRU and the attention mechanism are combined to extract the user response behavior characteristics, the GRU can efficiently and quickly process input data, the attention mechanism and the memory module are introduced to quickly position the response behavior in a similar environment based on environmental meteorological data, the capture capability of the GRU algorithm on long-distance dependency is enhanced, and the demand response load adjustment quantity of a user under real-time electricity price is accurately and efficiently mined; and finally, based on the response behavior characteristics, finishing the real-time demand response potential evaluation of the user by using the trained neural turing machine model to obtain the load amount actively adjusted by the user under different real-time electricity prices. The method can effectively improve the accuracy of the user demand response potential evaluation, reduce the calculation burden when a power grid company processes a large number of small users, effectively improve the real-time evaluation efficiency, provide a reliable basis for the later real-time electricity price optimizing decision, facilitate the user real-time demand response management according to the environment condition, and further promote the safe and stable operation of the power system.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered by the claims.

Claims (12)

1. A power consumer demand response potential assessment method based on a neural turing machine is characterized by comprising the following steps:
grouping users by adopting a mean shift method to obtain user group data sets with different response characteristics;
based on the user group data set, executing an attention mechanism AM in a gating cycle unit GRU, and extracting the demand response behavior characteristics of the user in different meteorological environments;
and evaluating the demand response load adjustment quantity of the user at the given real-time electricity price based on the extracted demand response behavior characteristics through a neural turing machine model.
2. The neural turing machine-based power consumer demand response potential assessment method according to claim 1, characterized in that users are grouped by a mean shift method to obtain a user group data set with different response characteristics, specifically comprising the steps of:
step 1.1, expanding and establishing a storage matrix data set required by training by a user historical data set;
step 1.2, in unmarked users, randomly selecting a user C as a central point, wherein the characteristic vector of the user C is omega c,t (ii) a Determining the radius r of a sliding window, wherein the r is used for representing the characteristic vector floating range;
step 1.3, according to the characteristic vector omega of the user i in the area i,t Calculating the drift vector S of the center point C in the region h ,C k Set of user points representing distances from the center C smaller than the radius r:
Figure FDA0003755513430000011
C kc,t )={x:(ω i,tc,t ) Ti,tc,t )<r 2 }
a gaussian kernel function G (ω) is introduced to measure the actual offset contribution of each sample user point:
Figure FDA0003755513430000012
wherein h is the bandwidth of a Gaussian function;
after the introduction of the gaussian kernel function,drift vector S hc,t ) Comprises the following steps:
Figure FDA0003755513430000013
wherein NU is the total number of users;
step 1.4, endowing each sample user point with different weight coefficients, and writing the drift vector into the following form:
Figure FDA0003755513430000021
wherein, the calculation formula of the weight coefficient is as follows:
Figure FDA0003755513430000022
step 1.5, updating the position of the central point, and drifting:
ω c,t :=ω c,t +S h
step 1.6, repeating the iterative moving process of the step 1.2-1.5 until the offset vector is smaller than a preset value to determine the central point of the current user group, and classifying the users in the current window radius r into a cluster C;
and step 1.7, traversing users which are not grouped, repeating the steps 1.2-1.6 until user points in the area are marked, completing user grouping, and respectively updating the user group data set and the storage matrix data set of each group.
3. The neural turing machine-based power consumer demand response potential assessment method of claim 2, wherein: step 1.1 specifically comprises:
in the period t, the historical response data of the user i contains the real-time electricity price lambda dri,t Environment data C i,t Demand response load d i,t Using historical data set N i Represents:
N i ={(λ dri,1 ,C i,1 ,d i,1 ),(λ dri,2 ,C i,2 ,d i,2 ),…,(λ dri,t-1 ,C i,t-1 ,d i,t-1 ),(λ dri,t ,C i,t ,d i,t )}
the environment data comprises the temperature and the humidity of the user at the current moment;
expansion is carried out on the historical data set to obtain a storage matrix data set R i
R i ={(ω i,1 ,d i,1 ),(ω i,2 ,d i,2 ),…,(ω i,t-1 ,d i,t-1 ),(ω i,t ,d i,t )}
Wherein, in the time period t, the feature vector omega i,t The system consists of real-time price and environmental data of the current time period, and incentive electricity price, demand response and environmental meteorological data of the past L time periods:
ω i,t ={λ dri,t-L ,C i,t-L ,d i,t-L ,…,λ dri,t-2 ,C i,t-2 ,d i,t-2dri,t-1 ,C i,t-1 ,d i,t-1dri,t ,C i,t }。
4. the method for assessing the demand response potential of the electric power user based on the Neuropter's machine as claimed in claim 2, wherein based on the user group data set, an attention mechanism AM is executed in the gated loop unit GRU to extract the demand response behavior characteristics of the user in different meteorological environments, and the method specifically comprises the following steps:
step 2.1: for GRU unit at t, input x t For storing the user feature vector omega in the matrix data set i,t Simultaneously reading the memory matrix M t Memory vector m from the last training period i,t-1
Step 2.2: compute update Gate z i,t And a reset gate r i,t Updating the door z i,t For determining the storage ratio of the user history information and the current input information, resetting the gate r i,t History information used to decide to forget:
z i,t =σ(W z x i,t +U z m i,t-1 )
r i,t =σ(W r x i,t +U r m i,t-1 )
Figure FDA0003755513430000031
where σ (·) is the activation function; w z 、W r And U z 、U r Respectively different weight coefficient matrixes;
step 2.3: combining the actually input x according to the calculation result of the reset gate i,t Generating the latest characteristic content of the user in the current time period
Figure FDA0003755513430000032
Figure FDA0003755513430000033
Where, tanh (-) is the activation function, W and U are the weighting coefficient matrix;
step 2.4: calculating to obtain the latest transmission vector h i,t Update the transmission matrix and combine h i,t Attention focusing unit passed to period t:
Figure FDA0003755513430000034
step 2.5: performing content attention gathering, inputting h given by the controller t And the memory matrix M t Performing content-based attention clustering, measuring similarity by cosine distance, calculating cosine distance between input and each memory segment in memory matrix, and normalizing to obtain similarity weight
Figure FDA0003755513430000035
The calculation formula is as follows:
Figure FDA0003755513430000036
Figure FDA0003755513430000037
wherein, beta t Representing parameters generated in the GRU processing process, wherein j is the sequence number of a memory vector except the ith user in the memory matrix;
step 2.6: according to the parameter g output by the controller t Judging the degree of concentration needed based on the content attention to obtain an interpolation vector
Figure FDA0003755513430000038
g t Between 0 and 1, the closer to 1, the greater the degree of attention clustering based on the content:
Figure FDA0003755513430000039
step 2.7: through weight conversion, different memory segments are focused under different conditions, the purpose of accurately recalling a certain moment is realized, and s output by the GRU is output according to the controller t Performing attention gathering based on positions, considering the influence of meteorological data of the external environment when the user actually responds, performing linear combination on each element of the whole weight vector again, giving higher weight to the memory vector under the similar environment, and obtaining a position vector m through position attention gathering t (i) The calculation formula is as follows:
Figure FDA0003755513430000041
wherein s is (i-j),t For a period of t, memorize each in the matrixA weight sequence of the memory vector and the memory vector of the user i;
step 2.8:
according to the parameter gamma output by the controller t And performing exponential operation on the feature vectors and then normalizing to increase the discrimination:
Figure FDA0003755513430000042
wherein, γ t To weight the sharpening parameter, m i,t The memory vector of the user i in the t period finally obtained after updating, namely the extracted demand response behavior characteristic;
step 2.9: for a given training time period T, the steps 2.1-2.8 are circulated until the extraction of the demand response behavior characteristics in the time period T of the user group is completed, and the memory matrix M is updated t
5. The neural turing machine-based power consumer demand response potential assessment method of claim 4, wherein the method comprises the following steps: through a neural turing machine model, based on the extracted demand response behavior characteristics, evaluating the demand response load adjustment amount of a user under a given real-time electricity price, and specifically comprising the following steps:
step 3.1: reading original input data information from user group data in a centralized manner, and respectively training neural turing machines of different groups of users in different time periods based on a user response characteristic extraction process combining GRU and an attention mechanism to obtain neural turing machines of different groups of users in different time periods;
step 3.2: when actual real-time potential evaluation is carried out, selecting the neural turing machine model of the group of users corresponding to the time interval obtained by training in the step 3.1, inputting planned real-time electricity price in the first 15-25 minutes of the arrival of the evaluation time interval, and obtaining the evaluated user response result, namely the load adjustment quantity of the user in the time interval through the neural turing machine model;
step 3.3: after the user demand response time period is finished, acquiring the actual response result of the user, namely the load adjustment amount, and updating the user group data set and the storage matrix data set under the condition of stimulating the electricity price in real time;
step 3.4: calculating an evaluation deviation rate according to an actual value and an evaluation value of user demand response, returning the evaluation deviation rate to the GRU unit, performing model feedback correction, and obtaining effect evaluation of the neural turing model on user demand response potential evaluation;
the root mean square error RMSE is used as a loss function of the GRU network, and the calculation formula is as follows:
Figure FDA0003755513430000051
in the formula, d and
Figure FDA0003755513430000052
respectively representing an actual value and a predicted value of user response, wherein n is total training days;
evaluating the evaluation effect of the neural turing machine model by using the average absolute percentage error MAPE, wherein the evaluation effect is better when the error is smaller, and the calculation formula of the average absolute percentage error is as follows:
Figure FDA0003755513430000053
6. the neural turing machine-based power consumer demand response potential assessment method according to claim 5, wherein the step 3.1 specifically comprises:
(1) The GRU processes input contents from users in the same group, wherein the input contents comprise two parts, one part is a user characteristic vector containing information such as real-time electricity price and environmental meteorological data, the other part is a memory vector from a storage matrix, and the GRU extracts a transmission characteristic vector of a user for demand response;
(2) The GRU transmits the transmission characteristic vector and the results of the parameters generated in the middle to the reading and writing head, wherein the parameters comprise beta t 、g t 、s t 、γ t For after useContinuing information attention gathering calculation and the read-write head to carry out self updating and erasing work;
(3) The write head erases and writes the memory matrix, and updates the latest transmission vector from the GRU unit at the current moment; the write head performs write operation to modify the content of the memory matrix, the write operation mainly comprises two steps of clearing and writing, and based on the output of the controller, the write head generates an elimination vector e t And an additional vector a t Elimination vector e t Each value range is 0-1, and different memory contents are weakened and eliminated through scaling of different degrees. Additional vector a t The range is not limited to 0-1, and the memory superposition is carried out on the original basis to complete the writing of a new memory matrix:
M t (i)=M t-1 (i)[1-m t (i)e t ]
M t (i)=M t (i)+m t (i)a t
(4) The attention mechanism calculates and updates a memory vector and a memory matrix according to the latest transmission vector;
(5) Reading contents from the memory matrix by using a reading head, wherein the read contents are the latest memory characteristic content part in the t time period of the user, and returning information to the GRU unit of the controller;
(6) According to the latest memory vector content, the controller GRU calculates the user load adjustment amount through a full connection layer and outputs a result;
(7) And (5) updating the total memory matrix according to the real-time input, output and memory matrix, and circulating the steps (1) - (6) until the model training in all time periods is completed.
7. A device for assessing demand response potential of a power consumer based on a neural turing machine is characterized by comprising:
the user group data set acquisition module is used for grouping users by adopting a mean shift method to obtain user group data sets with different response characteristics;
the demand response behavior feature extraction module is used for executing an attention mechanism AM in the gated loop unit GRU based on the user group data set and extracting demand response behavior features of the user in different meteorological environments;
and the demand response potential evaluation module is used for evaluating the demand response load adjustment quantity of the user under the given real-time electricity price based on the extracted demand response behavior characteristics through a neural Turing machine model.
8. The device for evaluating the demand response potential of the power consumer based on the neural turing machine, according to claim 7, wherein the consumer group data set obtaining module uses a mean shift method to group the consumers to obtain consumer group data sets with different response characteristics, and specifically comprises:
step 1.1, a storage matrix data set required by training is established by expanding a user historical data set;
step 1.2, in unmarked users, randomly selecting a user C as a central point, wherein the characteristic vector of the user C is omega c,t (ii) a Determining the radius r of a sliding window, wherein the r is used for representing the characteristic vector floating range;
step 1.3, according to the characteristic vector omega of the user i in the area i,t Calculating the drift vector S of the center point C in the region h ,C k Set of user points representing distances from the center C smaller than the radius r:
Figure FDA0003755513430000061
C kc,t )={x:(ω i,tc,t ) Ti,tc,t )<r 2 }
a gaussian kernel function G (ω) is introduced to measure the actual offset contribution of each sample user point:
Figure FDA0003755513430000062
wherein h is the bandwidth of a Gaussian function;
introducing GaussAfter kernel function, drift vector S hc,t ) Comprises the following steps:
Figure FDA0003755513430000063
wherein NU is the total number of users;
step 1.4, endowing different weight coefficients for each sample user point, and finally writing the drift vector into the following form:
Figure FDA0003755513430000064
wherein, the calculation formula of the weight coefficient is as follows:
Figure FDA0003755513430000071
step 1.5, updating the position of the central point, and drifting:
ω c,t :=ω c,t +S h
step 1.6, repeating the iterative moving process of the step 1.2-1.5 until the offset vector is smaller than a preset value to determine the central point of the current user group, and classifying the users in the current window radius r into a cluster C;
and step 1.7, traversing users which are not grouped, repeating the steps 1.2-1.6 until user points in the area are all marked, completing user grouping, and respectively updating the user group data set and the storage matrix data set of each group.
9. The device for assessing the demand response potential of the electric power user based on the neural turing machine, according to claim 8, wherein the step 1.1 specifically comprises:
in the period t, the historical response data of the user i contains the real-time electricity price lambda dri,t Environment data C i,t Demand response load d i,t Using historical data set N i Represents:
N i ={(λ dri,1 ,C i,1 ,d i,1 ),(λ dri,2 ,C i,2 ,d i,2 ),…,(λ dri,t-1 ,C i,t-1 ,d i,t-1 ),(λ dri,t ,C i,t ,d i,t )}
the environment data comprises the temperature and the humidity of the user at the current moment;
expansion is carried out on the historical data set to obtain a storage matrix data set R i
R i ={(ω i,1 ,d i,1 ),(ω i,2 ,d i,2 ),…,(ω i,t-1 ,d i,t-1 ),(ω i,t ,d i,t )}
Wherein, in the time period t, the feature vector omega i,t The system consists of real-time price and environmental data of the current time period, and incentive electricity price, demand response and environmental meteorological data of the past L time periods:
ω i,t ={λ dri,t-L ,C i,t-L ,d i,t-L ,…,λ dri,t-2 ,C i,t-2 ,d i,t-2dri,t-1 ,C i,t-1 ,d i,t-1dri,t ,C i,t }。
10. the device for assessing the demand response potential of the electric power user based on a neuroturing machine as claimed in claim 9, wherein the demand response behavior feature extraction module executes an attention mechanism AM in the gated loop unit GRU based on the user group data set to extract the demand response behavior feature of the user in different meteorological environments, and specifically comprises:
step 2.1: for GRU unit at t, input x t For storing the user feature vector omega in the matrix data set i,t Simultaneously reading the memory matrix M t Memory vector m from the last training period i,t-1
Step 2.2: compute update Gate z i,t And a reset gate r i,t Updating the door z i,t For determining the storage ratio of the user history information and the current input information, resetting the gate r i,t History information used to decide to forget:
z i,t =σ(W z x i,t +U z m i,t-1 )
r i,t =σ(W r x i,t +U r m i,t-1 )
Figure FDA0003755513430000072
where σ (·) is the activation function; w is a group of z 、W r And U z 、U r Respectively different weight coefficient matrixes;
step 2.3: combining the actually input x according to the calculation result of the reset gate i,t Generating the latest characteristic content of the user in the current time period
Figure FDA0003755513430000081
Figure FDA0003755513430000082
Where, tanh (-) is the activation function, W and U are the weighting coefficient matrix;
step 2.4: calculating to obtain the latest transmission vector h i,t Update the transmission matrix and combine h i,t Attention focusing unit passed to period t:
Figure FDA0003755513430000083
step 2.5: performing content attention gathering, inputting h given by the controller t And the memory matrix M t Performing content-based attention clustering, measuring similarity by cosine distance, calculating cosine distance between input and each memory segment in memory matrix, and normalizing to obtain similarity weight
Figure FDA0003755513430000084
The calculation formula is as follows:
Figure FDA0003755513430000085
Figure FDA0003755513430000086
wherein, beta t Representing parameters generated in the GRU processing process, wherein j is a memory vector sequence number except the ith user in the memory matrix;
step 2.6: according to the parameter g output by the controller t Judging the degree of concentration needed based on the content attention to obtain an interpolation vector
Figure FDA0003755513430000087
g t Between 0 and 1, the closer to 1, the greater the degree of attention clustering based on the content:
Figure FDA0003755513430000088
step 2.7: through weight conversion, different memory segments are focused under different conditions, the purpose of accurately recalling a certain moment is realized, and s output by the GRU is output according to the controller t Performing attention gathering based on positions, considering the influence of meteorological data of the external environment when the user actually responds, performing linear combination on each element of the whole weight vector again, giving higher weight to the memory vector under the similar environment, and obtaining a position vector m through position attention gathering t (i) The calculation formula is as follows:
Figure FDA0003755513430000089
wherein s is (i-j),t For a period t, a weight sequence of each memory vector in the memory matrix and the memory vector of the user i is related;
step 2.8: according to the parameter gamma output by the controller t And performing exponential operation on the feature vectors and then normalizing to increase the discrimination:
Figure FDA0003755513430000091
wherein, gamma is t To weight the sharpening parameter, m i,t The memory vector of the user i in the t period finally obtained after updating, namely the extracted demand response behavior characteristic;
step 2.9: for a given training time period T, the steps 2.1-2.8 are circulated until the extraction of the demand response behavior characteristics in the time period T of the user group is completed, and the memory matrix M is updated t
11. The device for evaluating the demand response potential of the power consumer based on the neural turing machine, according to claim 10, wherein the demand response behavior feature extraction module evaluates the demand response load adjustment amount of the power consumer at a given real-time electricity price based on the extracted demand response behavior feature through the neural turing machine model, and specifically comprises:
step 3.1: reading original input data information from a user group data set, and respectively training neural turing machines of different groups of users at different time periods based on a user response characteristic extraction process combining GRU and an attention mechanism;
step 3.2: when actual real-time potential evaluation is carried out, selecting a neural turing machine model of the group of users in a corresponding time period, inputting a planned real-time electricity price in the first 15-25 minutes of the arrival of the evaluation time period, and obtaining an evaluated user response result through the neural turing machine model;
step 3.3: after the user demand response time period is finished, acquiring the actual response result of the user under the condition of real-time excitation electricity price, and updating a user group data set and a storage matrix data set;
step 3.4: calculating an evaluation deviation rate according to an actual value and an evaluation value of user demand response, returning the evaluation deviation rate to the GRU unit, performing model feedback correction, and obtaining effect evaluation of the neural turing model on user demand response potential evaluation;
the root mean square error RMSE is used as a loss function of the GRU network, and the calculation formula is as follows:
Figure FDA0003755513430000092
in the formula, d and
Figure FDA0003755513430000093
respectively representing the actual value and the predicted value of the user response, wherein n is the total training days;
evaluating the evaluation effect of the neural turing machine model by using the average absolute percentage error MAPE, wherein the evaluation effect is better when the error is smaller, and the calculation formula of the average absolute percentage error is as follows:
Figure FDA0003755513430000094
12. the device for assessing the demand response potential of the electric power user based on the neural turing machine, according to claim 11, wherein the step 3.1 specifically comprises:
(1) The GRU processes input contents from users in the same group, wherein the input contents comprise two parts, one part is a user characteristic vector containing real-time electricity price and environmental meteorological data information, and the other part is a memory vector from a storage matrix;
(2) The GRU transmits the transmission characteristic vector and the parameter generated in the middle to the reading and writing head, wherein the parameter comprises beta t 、g t 、s t 、γ t For subsequent information attention gathering calculation and the read-write head to update and erase itself;
(3) The write head erases, writes, and updates the memory matrixThe latest transmission vector from the GRU unit at the previous moment; the write head performs write operation to modify the content of the memory matrix, the write operation mainly comprises two steps of clearing and writing, and based on the output of the controller, the write head generates an elimination vector e t And an additional vector a t Elimination vector e t Each value range is 0-1, and the vector a is added by weakening and eliminating different memory contents through scaling of different degrees t And (3) performing memory superposition on the original basis to finish the writing of a new memory matrix:
M t (i)=M t-1 (i)[1-m t (i)e t ]
M t (i)=M t (i)+m t (i)a t
(4) The attention mechanism calculates and updates a memory vector and a memory matrix according to the latest transmission vector;
(5) Reading contents from the memory matrix by using a reading head, wherein the read contents are the latest memory characteristic content part in the t time period of the user, and returning information to the GRU unit of the controller;
(6) According to the latest memory vector content, the controller GRU calculates the user load adjustment amount through the full connection layer and outputs the result;
(7) And (5) updating the total memory matrix according to the real-time input, output and memory matrix, and circulating the steps (1) - (6) until the model training in all time periods is completed.
CN202210858922.0A 2022-07-20 2022-07-20 Power consumer demand response potential evaluation method and device based on neural turing machine Pending CN115310782A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210858922.0A CN115310782A (en) 2022-07-20 2022-07-20 Power consumer demand response potential evaluation method and device based on neural turing machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210858922.0A CN115310782A (en) 2022-07-20 2022-07-20 Power consumer demand response potential evaluation method and device based on neural turing machine

Publications (1)

Publication Number Publication Date
CN115310782A true CN115310782A (en) 2022-11-08

Family

ID=83855922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210858922.0A Pending CN115310782A (en) 2022-07-20 2022-07-20 Power consumer demand response potential evaluation method and device based on neural turing machine

Country Status (1)

Country Link
CN (1) CN115310782A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115566740A (en) * 2022-12-05 2023-01-03 广东电网有限责任公司江门供电局 Distributed renewable energy cluster aggregation regulation and control potential evaluation method and device
CN116579590A (en) * 2023-07-13 2023-08-11 北京圆声能源科技有限公司 Demand response evaluation method and system in virtual power plant
CN116957306A (en) * 2023-09-20 2023-10-27 国网山西省电力公司营销服务中心 User side response potential evaluation method and system based on resource collaborative interaction

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115566740A (en) * 2022-12-05 2023-01-03 广东电网有限责任公司江门供电局 Distributed renewable energy cluster aggregation regulation and control potential evaluation method and device
CN116579590A (en) * 2023-07-13 2023-08-11 北京圆声能源科技有限公司 Demand response evaluation method and system in virtual power plant
CN116579590B (en) * 2023-07-13 2023-11-10 北京圆声能源科技有限公司 Demand response evaluation method and system in virtual power plant
CN116957306A (en) * 2023-09-20 2023-10-27 国网山西省电力公司营销服务中心 User side response potential evaluation method and system based on resource collaborative interaction
CN116957306B (en) * 2023-09-20 2024-01-12 国网山西省电力公司营销服务中心 User side response potential evaluation method and system based on resource collaborative interaction

Similar Documents

Publication Publication Date Title
CN113962364B (en) Multi-factor power load prediction method based on deep learning
Xiao et al. A hybrid model based on selective ensemble for energy consumption forecasting in China
CN115310782A (en) Power consumer demand response potential evaluation method and device based on neural turing machine
CN110751318B (en) Ultra-short-term power load prediction method based on IPSO-LSTM
CN108985515B (en) New energy output prediction method and system based on independent cyclic neural network
Heidarpanah et al. Daily electricity price forecasting using artificial intelligence models in the Iranian electricity market
CN109978253B (en) Electric power system short-term load prediction method based on incremental learning
CN114811713B (en) Two-level network inter-user balanced heat supply regulation and control method based on mixed deep learning
CN105786711A (en) Data analysis method and device
CN113449919B (en) Power consumption prediction method and system based on feature and trend perception
CN112270349B (en) Individual position prediction method based on GCN-LSTM
CN106991507A (en) A kind of SCR inlet NOx concentration on-line prediction method and device
Zhang et al. A novel sequence to sequence data modelling based CNN-LSTM algorithm for three years ahead monthly peak load forecasting
Al Mamun et al. A hybrid deep learning model with evolutionary algorithm for short-term load forecasting
CN116187835A (en) Data-driven-based method and system for estimating theoretical line loss interval of transformer area
CN115907122A (en) Regional electric vehicle charging load prediction method
CN111008790A (en) Hydropower station group power generation electric scheduling rule extraction method
CN115759415A (en) Power consumption demand prediction method based on LSTM-SVR
CN116542701A (en) Carbon price prediction method and system based on CNN-LSTM combination model
CN113762591B (en) Short-term electric quantity prediction method and system based on GRU and multi-core SVM countermeasure learning
Abdelaziz et al. Convolutional neural network with genetic algorithm for predicting energy consumption in public buildings
CN117313795A (en) Intelligent building energy consumption prediction method based on improved DBO-LSTM
Zhang et al. A data transfer method based on one dimensional convolutional neural network for cross-building load prediction
CN115759343A (en) E-LSTM-based user electric quantity prediction method and device
CN114759579A (en) Power grid active power optimization control system, method and medium based on data driving

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination