The present invention relates to the cross field of smart grid and artificial intelligence, in particular to a non-intrusive load monitoring method and device based on physics-informed neural network.
Accurate load identification is a prerequisite for achieving demand side management of smart grid, which can support the adjustment of balancing supply and demand of power grid, and the formulation of differentiated power sales strategy, etc., so as to promote the realization of the goal of “carbon peaking and carbon neutralization”. Different from the intrusive load monitoring technology with additional monitoring equipment, the non-intrusive load monitoring method can identify each independent power load and its working conditions in the total load data. In view of the limitations of the traditional non-intrusive load monitoring method based on feature construction and recognition in feature selection, the non-intrusive load monitoring method based on deep learning technology has been widely used. However, the existing deep learning methods ignore the importance of domain knowledge, which limits the accuracy of load monitoring. How to realize the load monitoring driven by knowledge-data collaboration is an important problem for the further development of demand side management and response work.
The present invention aims to solve the above technical problems in demand side management of smart grid, and proposes a non-intrusive load monitoring method based on physics-informed neural network.
The technical scheme of the present invention is as follows:
A non-intrusive load monitoring method based on physics-informed neural network, comprising the following steps:
Further, step 1 is as follows:
M
train
={[P
t
:t
,Q
t
:t
]|j=0, . . . ,n−w}
L
train
i
={[P
t
:t
i
,Q
t
:t
i
]|j=0, . . . ,n−w}.
Further, step 2 is as follows:
h
0
=U
i
h
m=Φ(Wm·hm-1+bm)
F
i=Ψ(WM·hM+bM)
Further, the number of hidden layers of the neural network is 5, and the activation function is ReLU.
Further, the activation function adopts the Linear function.
Further, step 3 is as follows:
lossfi=E(Fi,Ltraini)
losstotali=lossfi+ωp·losspi
Further, step 4 is as follows:
Giving any time of the building as a starting point, an active power Pt
A non-intrusive load monitoring device based on physics-informed neural network, comprising one or more processors for realizing the non-intrusive load monitoring method based on physics-informed neural network.
A computer readable storage medium on which a program is stored, when the program is executed by a processor, the non-intrusive load monitoring method based on physics-informed neural network is realized.
Comparing with the prior art, the present invention has the following advantages:
The present invention is described in detail below in combination with the drawings and embodiments. It should be understood that the described embodiments only belong to a part of the present invention, not all embodiments, so the implementation of the invention should not be limited by the described embodiments, but should further understand the essence of the invention with the help of these embodiments, which can better serve those skilled in the art.
As shown in
In this embodiment, a total of 78 days of load data of a building are collected, comprising independent equipment loads, the sampling frequency is 5 seconds. In this embodiment, the start time of 78 days is set as time 1, and the end time is set as time 1347840, that is, t0=1, tn=1347840, the load data obtained can be expressed as: the active power P1:1347840 and the reactive power Q1:1347840 of the total load, the active power P1:1347840i and the reactive power Q1:1347840i of each independent equipment load, where the equipment number i∈{1, . . . , 10}. Then, the total load sample M=[P1:1347840,Q1:1347840] and each independent load sample Li=[P1:1347840i,Q1:1347840i] can be obtained. In order to eliminate the influence of acquisition error on model training, in this embodiment, the value of samples with the active power less than zero in the total load and each independent load sample is set to zero.
M
train
={[P
t
:t
,Q
t
:t
]|j=0, . . . ,n−w}
L
train
i
={[P
t
:t
i
,Q
t
:t
i
]|j=0, . . . ,n−w}.
In this embodiment, using the sliding window with width 599 and step size 1 to cut M and Li, then the constructed training data can be further expressed as:
M
train
={[P
t
:t
,Q
t
:t
]|j=0, . . . ,1347241}
L
train
i
={[P
t
:t
i
,Q
t
:t
i
]|j=0, . . . ,1347241}
h
0
=U
i
h
m=Φ(Wm·hm-1+bm)
where, h0 is the original input of the input layer of the constructed deep learning neural network, hm, Wm and bm are respectively the output, weight and bias of the m th hidden layer of the neural network model, and Φ(⋅) is the activation function.
In this embodiment, the number of hidden layers of the neural network is 5, and the activation function Φ(⋅) is ReLU, then the deep learning neural network used can be expressed as:
h
0
=U
i
h
m=ReLU(Wm·hm-1+bm)
F
i=Ψ(WM·hm+bM)
In this embodiment, the activation function Ψ(⋅) is Linear, the network output layer can be expressed as:
F
i=Linear(WM·hM+bM)
Firstly, according to the physical relationship between powers, calculating a physical constraints violation loss losspi of the deep learning neural network model corresponding to the equipment i, that is
In this embodiment, the physical constraints violation loss lossp can be expressed as:
Then, calculating a prediction deviation loss lossfi of the deep learning neural network model corresponding to the equipment i, that is
lossfi=E(Fi,Ltraini)
In this embodiment, the mean square error (MSE) is adopted as the difference measurement function E, the prediction deviation loss function can be further expressed as:
Finally, calculating the training loss of the constrained physics-informed neural network model by weighted summation:
losstotali=lossfi+ωp·losspi
In this embodiment, the weight coefficient of the physical constraints violation loss ωp=0.1, the training loss of the model can be expressed as:
Giving any time of the building as a starting point, an active power Pt
In this embodiment, Giving the time tk=1347841 of the building as the starting point, the active power P1347841:1348440 and the reactive power Q1347841:1348440 with width 599 of the total load, constructing the total load sample V=[P1347841:1348440,Q1347841:1348440]. Inputting V to the trained physics-informed neural network model, and the output result is the power consumption of each equipment load in the building, comprising the active power {circumflex over (P)}1347841:1348440i and the reactive power {circumflex over (Q)}1347841:1348440.
As shown in
The embodiment of the non-intrusive load monitoring device based on the physics-informed neural network of the present invention can be applied to any device with data processing capability, which can be a device or equipment such as a computer. The device embodiments can be realized by software, hardware or combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the nonvolatile memory into the memory through the processor of any device with data processing capability. On the hardware level, as shown in
The realization process of the function and effect of each unit in the above device is detailed in the realization process of the corresponding steps in the above method, and will not be repeated here.
For the device embodiment, since it basically corresponds to the method embodiment, please refer to the partial description of the method embodiment for relevant points. The device embodiments described above are only schematic, in which the units described as separate units can be or can not be physically separated, and the units displayed as units can be or cannot be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the modules can be selected according to the actual needs to realize the purpose of the scheme of the invention. Ordinary technicians in the art can understand and implement without paying creative labor.
This embodiment of the present invention also provides a computer readable storage medium on which a program is stored, when the program is executed by a processor, the non-intrusive load monitoring method based on physics-informed neural network of this embodiment is realized.
The computer readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer readable storage medium may be an external storage device, for example, a plug-in hard disk, a smart media card (SMC), a SD card, a flash card, etc. equipped on the device. Furthermore, the computer readable storage medium can also include both an internal storage unit of any device with data processing capability and an external storage device. The computer readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and can also be used to temporarily store the data that has been output or will be output.
The above description is only a preferred implementation case of the invention and does not limit the invention in any form. Although the implementation process of the invention has been described in detail above, for those who are familiar with the art, they can still modify the technical solutions recorded in the above examples, or replace some of the technical features equally. Any modification and equivalent replacement made within the spirit and principle of the invention shall be included in the protection scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
202211118553.8 | Sep 2022 | CN | national |