Non-intrusive load identification and control method

Through the parallel feature extraction of the VGGNet-ViT network combined with the VGGNet convolution network and the ViT Transformer coding network, the problem of misjudgment of electrical load identification with similar features is solved, and the accuracy of electrical load identification and the robustness of the model are improved.

CN118734201APending Publication Date: 2024-10-01CHINA JILIANG UNIV

Patent Information

Application Number
CN202410780480.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing non-intrusive electrical load identification technology is prone to misjudgment when identifying electrical loads with similar characteristics, and it is difficult to improve the identification accuracy.

Method used

The electrical load identification model based on the VGGNet-ViT network is used to perform feature identification and control through the sampling data of electrical parameters. It combines the VGGNet convolution network and the ViT Transformer coding network for parallel feature extraction, and performs feature fusion, noise reduction and normalization processing. , forming a VI trajectory map to improve recognition accuracy.

Benefits of technology

It effectively reduces misjudgments of electrical loads with similar characteristics, improves the accuracy of electrical load identification, and enhances the model's robustness and identification capabilities by actively controlling electrical load actions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734201A_ABST
    Figure CN118734201A_ABST
Patent Text Reader

Abstract

The invention discloses a non-intrusive load identification and control method, which comprises the following steps of: establishing an electrical load identification model based on a VGGNet-ViT network, acquiring an electrical load action signal, acquiring an electrical parameter sensing signal in a time period after load input, filtering and normalizing to draw a VI trajectory diagram, and calculating a VGGNet-ViT network; the method comprises the following steps: firstly, carrying out continuous and gray feature supplementation to form a load working condition sample, inputting the sample into an identification model, carrying out feature extraction by a VGGNet convolutional network layer and a ViT Transform coding network layer which are parallel to each other, and judging the type by a load identification part after feature fusion; and training the network by using a training set, wherein the trained electrical load identification model is used for identifying the type of the electrical load in real time. According to the method, local and global features of the image are extracted through gray feature supplementation in combination with the VGGNet network and the ViT network, so that the capacity of distinguishing load categories is effectively improved, and misjudgment is reduced; and power supply control is carried out based on the identification result to ensure that the load works according to reserved time or logic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of non-intrusive electrical load monitoring, and in particular relates to a non-intrusive load identification and control method. Background Art

[0002] With the rapid development of society, more and more electrical equipment has entered thousands of households. While making life more convenient, local power shortages have also emerged. Through non-invasive load monitoring technology, collectors are installed at the entrance of the power supply to collect power signal characteristics such as current, voltage, and power, and perform electrical load identification and power measurement to accurately obtain the user's power consumption. Based on the described electrical load categories and events, users can understand their power consumption characteristics; and power supply companies can formulate reasonable power dispatch plans based on these refined power consumption data to achieve peak and valley balance of the power grid and improve the efficiency of power utilization.

[0003] At present, non-intrusive load monitoring technologies mainly include event detection and load identification. In actual use, the research on non-intrusive electrical load identification focuses on the accuracy of electrical load identification results.

[0004] For example, the Chinese patent publication number CN217278616 "A device for collecting electricity consumption characteristics of household appliances" provides a hardware device that can stably collect data in a complex interference environment, reduce the impact of noise on the accuracy of load identification results, and directly monitor the user's total load power information to obtain the category, operating conditions and related parameters of each power load.

[0005] The Chinese patent publication number CN214473641 "A non-invasive load identification method based on trajectory image recognition" provides a load identification device that converts load data into a VI trajectory diagram and then uses a mature image algorithm to improve the identification result; the device includes a current transformer, a voltage transformer, an electric energy metering chip, a main control chip, an AI processor, a wireless communication device, and a cloud server. The established VI trajectory library is simpler than the existing electrical feature library.

[0006] With the rapid development of national economy and science and technology, more and more home appliances are being manufactured, and the types of home appliance loads are also increasing, which brings difficulties to the identification of home appliance loads, especially when identifying home appliance loads with similar characteristics, misjudgment often occurs. Summary of the invention

[0007] The object of the present invention is to provide a non-intrusive load identification method and control method for identifying and controlling load type characteristics based on sampling data of electrical parameters, and capable of reducing misjudgment of electrical loads with similar characteristics.

[0008] In order to solve the above technical problems, the present invention provides a non-intrusive load identification method, comprising the following steps:

[0009] S1. Initialization: setting up an electrical signal sensing unit at the power supply entrance of the electrical load and establishing an electrical load identification model based on the VGGNet-ViT network;

[0010] S2, obtaining an electrical load action signal or an electrical parameter jump signal, determining whether a load input event occurs, if so, starting to collect a new sensor data sample, recording the current workload type, and proceeding to step S3, otherwise proceeding to step S4;

[0011] S3, determine whether the current sensor data sample needs to be supplemented, if so, go to step S4, otherwise go to step S7;

[0012] S4, obtaining and recording electrical parameter sensing data;

[0013] S5, check whether there is an exit instruction, if yes, go to step S14, otherwise go to the next step S6;

[0014] S6, wait for the next cycle, and go to step S2;

[0015] S7, performing noise reduction and normalization processing on the electrical parameter sensing data sequence in the sample, and drawing the normalized data sequence as a VI trajectory diagram;

[0016] S8, performing serial processing on the VI trajectory graph to form a continuous trajectory graph;

[0017] S9, based on the electrical load identification model, extracting features of the formed continuous trajectory graph in parallel through two networks, namely, a VGGNet convolutional network and a ViT Transformer encoding network;

[0018] S10, after the features output by the two networks are fused, the probabilities of belonging to each load type and the final load type are output after being processed by the fully connected layer and the classification layer;

[0019] S11, jump according to the current mode, if it is offline training mode, go to step S12, otherwise go to step S13;

[0020] S12, calculating the prediction error according to the probability output of each sample in the training set in the classification layer, the workload type recorded by the sample, and the cross entropy loss function, training the electrical load identification model based on the VGGNet-ViT network through back propagation based on the calculated prediction error, updating the parameters in the network model, iterating the training until the training is completed, and then going to step S2;

[0021] S13, output the load type as the identification result, and go to step S5;

[0022] S14. End load identification.

[0023] Preferably, the step S2 includes: S21, determining whether a load switching event occurs, if so, proceeding to step S22, otherwise proceeding to step S4;

[0024] S22, determine whether the current event is a cut-out event, if so, go to step S3, otherwise start collecting a new sensor data sample, record the current workload type, assign the current state as the sample collection state, and go to step S3,

[0025] The step S3 includes:

[0026] S31, if the current state is in the sample collection state, determine whether the current data sequence length meets the sample requirements, if so, assign the current state as the initial state and go to step S32, otherwise directly go to step S32;

[0027] S32: Determine whether the sample set is sufficient, if so, go to step S7, otherwise go to step S4.

[0028] Preferably, in step S2, in order to form a training set, for the same electrical load condition, a new sensor data sample is collected in multiple time segments between the electrical load being switched on and off, and each segment corresponds to a training sample.

[0029] Preferably, in step S2, the electrical load is activated by issuing a command to generate a switching-on or switching-off event.

[0030] Preferably, in step S2, when obtaining the electrical load action signal, the collected electrical parameter signal is monitored. If it is found that the voltage sag amplitude exceeds the set voltage drop threshold Du and the duration reaches the set threshold duration, such as 0.5 power frequency cycles, it is determined that an electrical load input event has occurred. The voltage drop threshold Du can be set to 5% to 10% of the rated voltage. Alternatively, the increment of the effective value of the current in each cycle is monitored. When the increment of the effective value of the current in a certain cycle is greater than the preset current effective value increment threshold Di, it is determined that an electrical load input event has occurred.

[0031] Preferably, in step S2, when obtaining the electrical load action signal, the current detection point position or the current moment in the current sequence is taken as the tail end, the current current effective value is counted in the power frequency cycle before the tail end, and the difference between the current effective value and the previous current effective value is calculated, and the difference value is compared with the differential value characteristic of the current effective value when any electrical appliance in the electrical load is put into operation. If the former exceeds the latter by a first preset multiple, it is determined that an electrical load input event has occurred.

[0032] Preferably, the period in step S6 is a sampling period, and the sampling period is a coefficient times the power frequency period, and the coefficient is between 1 / 100 and 1 / 32;

[0033] The sample requirement in step S31 is: the time range of the current data sequence length is taken as an integer multiple of the power frequency cycle, such as the duration of 2 to 5 power frequency cycles;

[0034] In step S4, the difference between the current after the event and the current before the event in the same phase in a steady state is used as the current point value in the current sequence.

[0035] When multiple electrical loads are in working state at the initial monitoring moment, the current value of the electrical parameter sequence is calculated retrospectively; that is, after waiting for a certain electrical load cut-out event to occur, the difference value of the current before the event and the current after the event in the steady state in the same phase is used as the point value of the current sequence required for the working condition sample to prepare the VI trajectory diagram.

[0036] Preferably, step S2 includes: calculating the similarity between the electrical parameter jump variable characteristics at the current detection position in the data sequence of voltage, current and corresponding power and the electrical parameter jump variable characteristics when any electrical appliance in the prior electrical load is turned on or off; if the obtained similarity value is higher than a preset similarity threshold, it is determined that there is a load event of the electrical appliance being turned on or off at the current detection position.

[0037] Preferably, the electrical parameter jump variable is a vector composed of effective current values, power, etc., which are statistically calculated within a unit time, and the similarity calculation adopts cosine similarity.

[0038] Preferably, step S2 includes: when obtaining the electrical load action signal, monitoring the electrical parameter signal collected by the electrical signal sensing unit at the electrical load power supply entrance; if it is found that the voltage sag amplitude exceeds the set voltage drop threshold Du and the duration reaches 0.5 power frequency cycle, it is determined that an electrical load input event has occurred.

[0039] Preferably, in step S7, the data normalization process adopts the formula: Where x is the voltage value or current value, and a is a base greater than 1 to avoid saturation of the upper and lower limit bilateral regions; the discrete data stream obtained after normalization is constructed into a voltage data sequence and a current data sequence with equal length and aligned along the time phase,

[0040] In the step S12, when iteratively training the electrical load identification model, the connection weights of the network are adjusted according to the actual values ​​of the electrical load operating conditions of the samples and the output values ​​of the model.

[0041] Preferably, the step S7 comprises: when drawing the VI trajectory diagram, firstly creating an M×M all-zero grid background diagram, then mapping the normalized voltage and current data sequences into pairs according to the alignment positions, proportionally mapping them to the corresponding grids in the background diagram and performing 1 on the corresponding grids, and forming an initial binary VI trajectory diagram after all data points in the data sequence are mapped;

[0042] The step S8 comprises: in the continuous processing, traversing the binary VI trajectory diagram with a structure element, gradually moving the center point of the structure element along each non-zero grid in the binary VI trajectory diagram, and constructing the union of the structure element and the non-zero grid of the binary VI trajectory diagram during the movement into a continuous trajectory diagram; starting from the center of the continuous trajectory diagram, taking the effective value of the current corresponding to the current data sequence as a coefficient, setting a straight line segment with a height equal to the product of the coefficient and the half-height of the trajectory diagram and a gray value equal to the product of the coefficient and 255, to form a continuous trajectory diagram based on grayscale;

[0043] In the step S9, the grayscale-based continuous trajectory diagram is used as a sample to input the electrical load identification model.

[0044] Preferably, the electrical load identification model based on the VGGNet-ViT network in step S1 includes: an image input layer, a deep learning model feature extraction unit, a feature fusion unit and a load identification unit;

[0045] Among them, the deep learning model feature extraction unit includes two parallel branches: a first deep network feature extraction unit and a second deep network feature value extraction unit. The first deep network feature extraction unit adopts a VGGNet convolutional network, and the second deep network feature value extraction unit adopts a ViT Transformer encoding network.

[0046] The load identification unit includes a fully connected layer and a classification layer; the feature fusion unit fuses the feature vectors of two different dimensions into one feature vector, and inputs the fused feature vector into the fully connected layer.

[0047] Preferably, the structure of the VGGNet convolutional network is composed of a convolutional layer, a pooling layer, a convolutional layer, a pooling layer, a convolutional layer, a pooling layer, a convolutional layer, a pooling layer, a convolutional layer, a convolutional layer, a pooling layer, a convolutional layer, and a pooling layer connected in sequence, wherein the pooling layer selects the maximum value from a local area of ​​the image,

[0048] The ViT Transformer encoding network includes a graphic segmentation layer, a linear mapping layer, a position encoding layer, and a Transformer encoder layer; wherein the graphic segmentation layer divides the input image into several image blocks of equal size and outputs them to the linear mapping layer; the linear mapping layer converts a single two-dimensional image block into a one-dimensional vector, and constructs a word vector with the one-dimensional vectors generated by all image blocks; the position encoding layer adds the position information to the word vector, and adds a special character representing the head to the word vector; the Transformer encoder contains 13 Transformer layers, wherein each Transformer layer consists of a normalization layer, a multi-head attention mechanism module, and a multi-layer perception module.

[0049] Preferably, the fully connected layer projects the feature information obtained by the feature fusion unit into the sample label space, and then converts it into classification probability by the Soffmax layer, and outputs the load type with the largest probability as the recognition result.

[0050] Preferably, step S13 includes: after identifying the electrical load type, converting the occurrence time of the load event into absolute time and storing it, and outputting the absolute time and the electrical load type; or, dynamically displaying the discrete data stream obtained after filtering the collected electrical parameter signal in the form of a curve on the display screen, and marking the identified load type on the curve.

[0051] Preferably, in step S1, the topic of obtaining information of the handheld terminal is also subscribed; the step S13 includes: in response to the topic message, the detected load type and the corresponding input time are transmitted to the handheld terminal through the server; or after the load input event is detected, the identified load type and the corresponding time are transmitted to the server in the form of an event topic message.

[0052] In another embodiment of the present invention, a non-intrusive load control method is provided, comprising the following steps:

[0053] T1, initialization, set up an electrical signal sensing unit at the power supply entrance of the electrical load, establish an electrical load identification model based on the VGGNet-ViT network, arbitrarily arrange each typical working condition of each electrical load and form a corresponding operation instruction set;

[0054] T2, issue a command to make the electrical load act, so as to generate an input or output event; after each load input event occurs, start collecting a new sensor data sample, record the current workload type, and go to step T3, otherwise go to step T4;

[0055] T3, determine whether the sensor data samples under the current working condition need to be supplemented, if so, go to step T4, otherwise go to step T5;

[0056] T4, obtaining and recording the electrical parameter sensing data, and detecting whether there is an exit instruction, if there is, go to step T14, otherwise go to the next step T6;

[0057] T5, judging whether the sample set for network model training is sufficient, if so, go to step T7, otherwise, extract one instruction from the operation instruction set in turn, and go to step T2;

[0058] T6, wait for the next cycle and go to step T2;

[0059] T7, performing noise reduction and normalization processing on the electrical parameter sensing data sequence in each sample in the sample set, and drawing the normalized data sequence as a VI trajectory diagram;

[0060] T8, performing serial processing on the VI trajectory graph to form a continuous trajectory graph;

[0061] T9. Based on the electrical load identification model, the formed continuous trajectory graph is subjected to feature extraction in parallel by two networks, namely, a VGGNet convolutional network and a ViT Transformer encoding network;

[0062] T10, after the features output by the two networks are fused, the probabilities of belonging to each load type and the final load type are output after being processed by the fully connected layer and the classification layer;

[0063] T11, jump according to the current mode, if it is offline training mode, go to step T12, otherwise go to step T13;

[0064] T12, calculating the prediction error according to the probability output of each sample in the training set in the classification layer, the workload type recorded by the sample, and the cross entropy loss function, training the electrical load identification model based on the VGGNet-ViT network through back propagation based on the calculated prediction error, updating the parameters in the network model, iterating the training until the training is completed, and then going to step T2;

[0065] T13, output the load type as the identification result, and perform abnormal load state detection,

[0066] If the working time period of the identified load type does not include the current time, an abnormal warning will be issued, and the power supply to the load of this type may be disconnected with or without confirmation.

[0067] If an electrical load has a working period that includes the current time, but is not included in the currently identified load type, an abnormal warning will be issued, and the power supply to this type of load will be automatically closed with or without confirmation.

[0068] If the difference between the current effective value and the previous effective value exceeds a preset multiple, it is determined that an abnormal electrical load event has occurred, and the switch at the power supply entrance of the electrical load is controlled to cut off the power input.

[0069] Go to step T5;

[0070] T14. End load identification and control.

[0071] Compared with the prior art, the scheme of the present invention has the following advantages: the present invention constructs an electrical load identification model based on the VGGNet-ViT network, generates training samples with multiple time segments between the input and output of electrical loads, and after training the model with the training sample set, the trained model is used to identify the type of electrical load online, and output the identified load type and the switching event, thereby providing a basis for users to analyze the characteristics of electrical working hours, energy consumption distribution, etc. The present invention uses a unified mapping formula to normalize the electrical parameter values ​​of electrical loads in application scenarios, so that the data stream can be processed in real time to generate the input of the identification model, thereby improving the real-time performance of identification; the binary VI trajectory graph continuous operation based on the expansion operation can avoid the linearization of nonlinear features in the trajectory graph, thereby improving the reliability of identification; the grayscale line segments reflecting the effective value of the current are integrated into the binary image, thereby making up for the deficiency of normalization processing without increasing the channels of the image itself, reducing the amount of calculation, and improving the resolution of input features. Combining the extraction of local features of images by the VGGNet network and the global feature extraction by the ViT network, the two feature maps of different dimensions are effectively fused, so that the established VGGNet-ViT network recognition model can simultaneously possess the feature information extraction capabilities of the two network models, thereby effectively reducing the misjudgment of the classification of electrical loads with similar features and improving the accuracy of electrical load identification. The present invention also generates input events by actively controlling the action of electrical loads, so as to arbitrarily arrange each typical working condition of the load and form corresponding training samples, thereby increasing the working condition coverage space of the samples and improving the robustness and recognition ability of the model; at the same time, it also ensures that the load works according to the scheduled time period or logic by identifying and controlling the abnormal working conditions of different types of loads.

[0072] It should be understood that all combinations of the aforementioned concepts and the additional concepts discussed in more detail below (provided that such concepts are not mutually inconsistent) can be considered as part of the inventive subject matter disclosed herein. In particular, all combinations of the claimed subject matter appearing in the disclosed solution can be considered as part of the inventive subject matter disclosed herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1 A flowchart of a non-intrusive load identification method of the present invention;

[0074] Figure 2 It is a structural schematic diagram of a non-intrusive load identification system;

[0075] Figure 3 This is a structural diagram of the host unit / controller;

[0076] Figure 4 It is a structural diagram of the electrical signal sensing unit;

[0077] Figure 5A , Figure 5B This is a partial module structure diagram of the non-intrusive load identification controller / host unit. Figure 5C It is a structural diagram of the type identification module;

[0078] Fig. 6A , Figure 6B They are local schematic diagrams of the VI trajectory binarization image before and after continuous processing; Figure 6C It is the grayscale image of the VI trajectory of the incandescent lamp and the air conditioner;

[0079] Figure 7 It is a schematic diagram of type recognition module processing;

[0080] Fig. 8A This is a schematic diagram of the VGGNet convolutional network module structure. Figure 8B This is a schematic diagram of the ViT encoding network module structure;

[0081] Fig. 9 Schematic diagram of the Transformer layer structure of ViT;

[0082] Fig.10 Schematic diagram of the fully connected and output layer structure;

[0083] Fig.11 It is a structural diagram of the feature fusion unit;

[0084] Fig. 12A , Fig. 12B and Fig. 12C It is a schematic diagram of current changes during the switching process of two electrical loads;

[0085] Fig.13It is a schematic diagram of non-intrusive load monitoring; Fig.14 This is a comparison chart of the load recognition effects of the VGGNet model and the VGGNet-ViT model.

[0086] Among them: 1000 non-intrusive load identification systems, 700 non-intrusive load identification devices, 100 host units / controllers, 200 user interface units, 300 electrical loads, 400 handheld terminals, 500 servers, 600 electrical signal sensing units, 800 external control devices,

[0087] 110 processor, 120 storage module, 130 input and output module,

[0088] 111 general processing module, 112 data acquisition module, 113 data preprocessing module, 114 iterative learning module, 115 type recognition module,

[0089] 1141 first connection array, 1142 second connection array,

[0090] 1150 VGGNet-ViT electrical load identification model / deep network, 1151 VI trajectory drawing unit, 1152 continuous processing unit, 1153 first deep network feature extraction unit, 1154 second deep network feature value extraction unit, 1155 feature fusion unit, 1156 load identification unit,

[0091] 11541Graphics segmentation layer, 11542Linear mapping layer, 11543Position encoding layer, 11544ViT encoder,

[0092] 121 model framework / deep network structure, 122 parameter memory, 123 (general) memory,

[0093] 131 input part, 132 output part, 1311 load type input block, 1312 electrical parameter input block,

[0094] 210 display screen, 220 operation panel,

[0095] 310 electrical drive control module, 320 electrical main body,

[0096] 610 current sensing module, 620 voltage sensing module, 630 jump detection module. DETAILED DESCRIPTION

[0097] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, but the present invention is not limited to these embodiments. The present invention covers any substitution, modification, equivalent method and scheme made within the spirit and scope of the present invention.

[0098] In order to make the public have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, but users skilled in the art can fully understand the present invention without these detailed descriptions.

[0099] The present invention is described in more detail in the following paragraphs by way of example with reference to the accompanying drawings. It should be noted that the accompanying drawings are all simplified and not in exact proportion, and are only used for the purpose of conveniently and clearly assisting in explaining the embodiments of the present invention.

[0100] Embodiment 1:

[0101] In order to improve the utilization rate of electric energy, it is necessary to understand the operating status and time distribution of electric equipment. By monitoring electric equipment, users can understand the electric energy usage of electric equipment, which helps users to formulate energy-saving measures scientifically. There are two main types of electric equipment operating status monitoring technologies: intrusive load monitoring and non-intrusive load monitoring. Taking residential electricity as an example, in the intrusive load monitoring system, each electrical load is installed with a monitoring device to complete the collection of electrical load current and voltage data. However, due to the large number of monitoring devices used in the system, the cost of use is too high and it is difficult to be accepted by users.

[0102] To this end, new non-intrusive load monitoring systems have emerged, such as Fig.13 As shown, the data acquisition device is only installed at the residential user's electricity meter to collect the total current and voltage at the meter entrance. Since the electrical signal is not collected from the entrance of each electrical load, an algorithm is needed to identify the category of the electrical equipment.

[0103] like Figure 1 As shown, the present invention provides a non-intrusive load identification method, comprising the following steps:

[0104] S1. Initialization: setting up an electrical signal sensing unit at the power supply entrance of the electrical load and establishing an electrical load identification model based on the VGGNet-ViT network;

[0105] S2, obtaining an electrical load action signal or an electrical parameter jump signal, determining whether a load input event occurs, if so, starting to collect a new sensor data sample, recording the current workload type, and proceeding to step S3, otherwise proceeding to step S4;

[0106] S3, determine whether the current sensor data sample needs to be supplemented, if so, go to step S4, otherwise go to step S7;

[0107] S4, obtaining and recording electrical parameter sensing data;

[0108] S5, check whether there is an exit instruction, if yes, go to step S14, otherwise go to the next step S6;

[0109] S6, wait for the next cycle, and go to step S2;

[0110] S7, performing noise reduction and normalization processing on the electrical parameter sensing data sequence in the sample, and drawing the normalized data sequence as a VI trajectory diagram;

[0111] S8, performing serial processing on the VI trajectory graph to form a continuous trajectory graph;

[0112] S9, based on the electrical load identification model, extracting features of the formed continuous trajectory graph in parallel through two networks, namely, a VGGNet convolutional network and a ViT Transformer encoding network;

[0113] S10, after the features output by the two networks are fused, the probabilities of belonging to each load type and the final load type are output after being processed by the fully connected layer and the classification layer;

[0114] S11, jump according to the current mode, if it is offline training mode, go to step S12, otherwise go to step S13;

[0115] S12, calculating the prediction error according to the probability output of each sample in the training set in the classification layer, the workload type recorded by the sample, and the cross entropy loss function, training the electrical load identification model based on the VGGNet-ViT network through back propagation based on the calculated prediction error, updating the parameters in the network model, iterating the training until the training is completed, and then going to step S2;

[0116] S13, output the load type as the identification result, and go to step S5;

[0117] S14. End load identification.

[0118] like Figure 2As shown, a non-intrusive load identification device 700 using the method of the present invention includes a host unit 100 and a user interface unit 200; wherein the host unit 100 includes a processor 110, a storage module 120 and an input / output module 130, and the user interface unit 200 is provided with an operation panel 220. The host unit 110 is configured to: obtain an electrical load action signal, and based on the action signal, receive an electrical parameter signal collected by an electrical signal sensing unit at the power supply entrance of the electrical load in the time period between the input and output of each electrical load; after denoising and normalizing the electrical parameter signal, draw it into a VI trajectory diagram, after continuous processing of the VI trajectory diagram, form a continuous trajectory diagram, and save the continuous trajectory diagram as a sample marked as a corresponding electrical load operating type; repeatedly obtain the operating condition samples under different operating conditions of different electrical loads and form a training set; construct an electrical load identification model based on the VGGNet-ViT network in the type identification module, and the identification model is based on the operating condition samples, and The corresponding electrical load condition types are used as input and output respectively; the iterative learning module uses the training set to perform offline training on the identification model, adjusts the connection weights of the network in the identification model, and forms a trained VGGNet-ViT network model; in the field environment, in response to the event signal of the electrical load being put into operation, the data acquisition module obtains the incremental information fragments of the electrical parameter signals collected before and after the electrical load is put into operation, and after the data preprocessing module performs noise reduction filtering and normalization processing on the incremental information fragments, the corresponding VI continuous trajectory diagram is extracted and input into the trained VGGNet-ViT network model, and the load type identified by the trained VGGNet-ViT network model is output.

[0119] The electrical signal sensing unit 600 is a high-frequency electrical data acquisition device, which is installed at the entrance of the residential power supply and collects the current and voltage signals in the circuit at a certain sampling frequency. The collected original signals such as the current value i(t) and the voltage value u(t) can be received by the host unit 100 and used for load event detection and load identification. The collected instantaneous value data can also be uploaded to the cloud server 500 for storage to form a data set.

[0120] The electrical parameter signal collected by the sensor unit contains a lot of noise. In order to reduce the impact of noise on identification, the data needs to be denoised before constructing the data sequence and performing load identification. To this end, multiple functional modules are set in the processor 110 unit in the host unit 100. Figure 3As shown, the processor 110 includes a general processing module 111, a data acquisition module 112, a data preprocessing module 113, an iterative learning module 114 and a type identification module 115. The data acquisition module 112 periodically receives the collected electrical parameter signal from the electrical signal sensing unit 600 via the input and output module 130; the data preprocessing module 113 filters and de-noises the collected electrical parameter signal to form a discrete data stream, and performs normalization processing to construct an electrical parameter data sequence.

[0121] After experimental testing, it is found that compared with median filtering and mean filtering, Wiener filtering has better denoising effect, and can obtain higher signal-to-noise ratio and better smoothness. On the basis of data denoising, the effective value of the current corresponding to the current point is calculated based on the instantaneous value of the current to detect load switching events. That is, the root mean square of the mains power within one cycle with the current point as the midpoint is calculated by the following formula:

[0122] in, is a power frequency cycle T g The corresponding sampling period T s The number of .

[0123] The discrete data streams formed after filtering are respectively constructed into voltage and current initial data sequences. Preferably, the data sequence can also be constructed using electric power data.

[0124] In order to draw VI trajectory samples in the same scale range later, the initial data sequence needs to be normalized. Taking the current value as an example, the normalization process is often mapped using the following formula: Among them, i t is the element value in the current effective value sequence. This normalization process needs to wait until the entire data sequence is initially constructed before the corresponding current and voltage maximum values ​​can be searched and normalized according to their maximum values.

[0125] To this end, according to the prior power information of the equipment in the application environment, the present invention adopts the following formula to adopt a unified transformation formula for the same type of electrical parameters:

[0126] Among them, x is the voltage value or current value, and a is the base that avoids the saturation of the upper and lower limits of the mapping output and is greater than 1. A priori, the current value is converted according to the maximum power consumption of the electrical load in the application site of the device, and the base interval corresponding to the current value is searched when the current curve after normalization mapping does not appear flat-top saturation, and the minimum base in this interval is used as the a priori base a for normalizing all current values.

[0127] After the discrete data stream is normalized, a voltage data sequence and a current data sequence of equal length and aligned along the time phase are constructed, such as using the voltage positive zero crossing point as the reference zero point of each phase. The present invention normalizes the electrical parameter value based on a unified mapping formula, and can process the collected data points in real time during the process of forming the data sequence to generate the input of the recognition model, thereby improving the real-time performance of the recognition.

[0128] In daily use, household appliance loads have two major characteristics at the moment of turning on. The first is that the internal capacitors and inductors are equivalent to short circuits in the circuit; the second is that the internal resistors have not yet heated up, and their equivalent resistance is small; therefore, after the household appliance is turned on, a large impact current will be generated in the circuit. Due to the existence of resistance, capacitance and inductance, the impact current in the circuit gradually decays until the appliance enters a stable operation state. This impact current attenuation process when the household appliance load is turned on is a transient process, and practice has shown that some household appliance loads, such as electric kettles, do not have a transient process after being turned on. Therefore, in the non-invasive load identification system of the present invention, the electrical parameters of the steady-state process, namely the steady-state characteristics, are used for analysis.

[0129] Commonly used steady-state features include conventional features such as current waveform, peak-to-peak value, active power P, reactive power Q, apparent power S, current harmonic components, and voltage-current trajectory, i.e., VI trajectory diagram. Conventional features can be calculated using the collected voltage and current data, while VI trajectory features are a type of graphic feature. Although the drawing process is cumbersome, the VI trajectory diagram contains rich waveform information compared to other conventional features, which is conducive to obtaining high-accuracy recognition results through mining. Drawing on existing image recognition technology, the present invention performs load identification based on VI trajectory features.

[0130] The VI trajectory diagram drawing includes three steps: grid creation, grid unit value interval calculation and data mapping. First, create an M×M all-zero grid background map A, where the horizontal represents the normalized voltage and the vertical represents the normalized current; after the grid is created, the horizontal value interval ΔU and the vertical value interval ΔI of the grid unit are calculated, and the calculation formula is:

[0131]

[0132] Where K u , K i They are the normalized maximum voltage and current values, respectively. In the data mapping step, the normalized voltage and current data are mapped to the grid, that is, the horizontal position x of the normalized voltage data in the grid is determined, and the vertical position y of the normalized current data at the corresponding point in the data sequence is determined. The calculation formula is:

[0133]

[0134] Where x and y represent the horizontal and vertical coordinates of the grid respectively; f(U) and f(I) represent the normalized voltage and current respectively, and are placed at 1 at the corresponding grid (x, y) of the background image A.

[0135] When actually drawing the VI trajectory, the pixels in the drawn VI trajectory diagram are discontinuous due to the large span of adjacent values ​​of the current and voltage sequences in the steady-state process of the electrical load. Fig. 6A The local enlarged image of a compact fluorescent lamp and an electric kettle is shown in the figure. For easy observation, the binary image is inverted, that is, black and white represent 1 and 0 pixels respectively. To solve this discontinuous problem, the VI trajectory is continuous.

[0136] The commonly used continuous processing is linear interpolation, that is, the grids with a value of 1 are supplemented by straight line segment fitting between discontinuous grids to make the graph continuous. After a large number of sample tests, it was found that this linear fitting processing brought noise to the samples, resulting in more misjudgments in the load identification results. For this reason, the present invention uses an expansion operation to perform continuous processing of the binary trajectory graph A.

[0137] The specific execution order of the continuous processing is: set an N×N structure element matrix B to generate an all-zero matrix C of the same size as image A; use the structure element B to traverse the image A to be processed, that is, gradually move the center point of the structure element B along each non-zero grid in image A, and extract the intersection of the non-zero elements of the structure element B and image A. If the intersection is not empty, then set all the non-zero elements of the structure element B in the grid in A, and set the elements in matrix C, that is, pixels, to 1 at the same position; update matrix C during the traversal process, and output matrix C after the traversal is completed. In the continuous processing, as a preference, a right-angle L-shaped, T-shaped or cross-shaped structure element can be used. Figure 6B As shown, a continuous trajectory graph is formed with the output matrix C.

[0138] After taking the continuous trajectory map as input and training the borrowed image recognition deep network with samples, it is found that the ability to distinguish resistive electrical appliances with different powers is insufficient, and it is easy to cause confusion and misjudgment. For this reason, the amplitude characteristics of the current effective value are introduced in the VI trajectory map. At the center position (M / 2, M / 2) of the output matrix C, a grayscale bar is drawn upward. The current effective value is calculated based on the current data sequence of the sample; the current effective value of the sample is divided by the a priori maximum current effective value to obtain a current proportional coefficient; all 1 elements in the matrix C are replaced with a grayscale value of 255, and a bar with a height of the current proportional coefficient multiplied by M / 2 and a grayscale value of the current proportional coefficient multiplied by 255 is drawn upward with the (M / 2, M / 2) grid as the lower end; after the output matrix C supplemented with the current effective value amplitude characteristics forms a continuous trajectory map based on grayscale, a sample of the electrical load condition type is established. Among them, the width of the bar is 1 to 3 pixels. Figure 6C The grayscale continuous trajectory diagrams of incandescent lamps and air conditioners are given respectively.

[0139] Comparative experiments show that after the grayscale bar is integrated into the original binary image, the deficiency of normalization processing is compensated, the resolution of input features is improved, and the ability to distinguish the trajectory shape close to the electrical load is improved. At the same time, since the image does not increase the channel, the calculation amount is small compared with the multi-channel processing method.

[0140] Drawing on image recognition technology, reference Fig. 8A As shown in the figure, an attempt is made to construct an electrical load identification model based on the VGGNet network in the type recognition module. The VGGNe network consists of an input layer, a hidden layer, and a Softmax output layer, wherein the hidden layer is composed of a convolutional layer, a pooling layer, and a fully connected layer. The VGGNe network is trained with the collected working condition samples and their corresponding electrical load working condition types as input and output, respectively. The trained VGGNet network model is tested on the test set. The overall recognition effect of several types of loads in the data set, such as air conditioners, compact fluorescent lamps, electric fans, refrigerators, incandescent lamps, and electric kettles, is shown in Table 1 below:

[0141] Table 1 VGGNe network recognition test

[0142]

[0143] The overall recognition accuracy of the network model is 96.12%, and the average F1 score is 95.85%. Among them, 8.2% of the air conditioner samples are identified as incandescent lamps, and 3.6% of incandescent lamps are identified as air conditioners. Therefore, the model's recognition effect on electrical appliances with similar characteristics such as incandescent lamps and air conditioners is not ideal.

[0144] After further analysis, it was found that the VGGNet network uses convolution kernels, which can better extract local features of images, but has weaker ability to extract global features of images. In addition, due to the increase in the number of convolution operations and downsampling operations, the resolution of the extracted features decreases, affecting load classification.

[0145] In order to solve the problem that the VGGNet model has low accuracy in classifying household appliance load categories with similar features, the present invention proposes to combine the VGGNet network with the ViT network to form a VGGNet-ViT network. The model fuses the feature graphs of two different dimensions through corresponding rules, so that it has the feature information of two network model styles at the same time, thereby compensating the global recognition ability of the network to improve the accuracy of electrical load recognition.

[0146] Specifically, see Figures 7 to 10 As shown, the established electrical load identification model VGGNet-ViT network includes: an image input layer, a deep learning model feature extraction unit, a feature fusion unit and a load identification unit. Among them, the image input layer reads the above-mentioned grayscale-based continuous trajectory map and outputs it to the deep learning model feature extraction unit; the deep learning model feature extraction unit includes two parallel branches, namely the first deep network feature extraction unit and the second deep network feature value extraction unit. The first deep network feature extraction unit 1153 adopts the VGGNet convolutional network, and the second deep network feature value extraction unit 1154 adopts the ViTTransformer encoding network. The load identification unit includes a fully connected layer and a Softmax classification layer. The feature fusion unit 1155 fuses the feature vectors of two different dimensions into one feature vector, and inputs the fused feature vector into the fully connected layer.

[0147] See also Fig. 8A As shown in the figure, the structure of the VGGNet convolutional network is composed of a convolutional layer, a pooling layer, a convolutional layer, a pooling layer, a convolutional layer, a convolutional layer, a pooling layer, a convolutional layer, a convolutional layer, a pooling layer, a convolutional layer, and a pooling layer, which are connected in sequence. The pooling layer selects the maximum value from the local area of ​​the image, and the size of the local area is determined by the pooling kernel such as a 3×3 grid.

[0148] See also Figure 8BAs shown, the ViT Transformer encoding network includes a graphic segmentation layer 11541, a linear mapping layer 11542, a position encoding layer 11543, and a Transformer encoder layer 11544. The graphic segmentation layer divides the input image into several image blocks of equal size and outputs them to the linear mapping layer; the linear mapping layer converts a single two-dimensional image block into a one-dimensional vector, and constructs the one-dimensional vectors generated by all image blocks as word vectors; the position encoding layer adds the position information to the word vector, and adds a special character representing the head to the word vector; the Transformer encoder contains 13 Transformer layers. Combined with Fig. 9 As shown in the figure, each Transformer layer consists of a normalization layer, a multi-head attention mechanism module, and a multi-layer perception module. In the ViT Transformer encoding network, the ViT encoder consists of Q, or 13 Transformer layers. The input and output relationships of the multi-head attention mechanism module and the multi-layer perception module in the qth layer can be expressed as:

[0149] Z′ q =MSA[LN(Z q-1 )]+Z q-1 ,q∈1,2,...,Q,

[0150] Z q =MLP[LN(Z′ q )]+Z′ q ,q∈1,2,...,Q,

[0151] Where LN(·) is the normalization layer in the Transformer layer structure; MSA(·) is the multi-head attention mechanism module in the Transformer layer structure; MLP(·) is the multi-layer perception module in the Transformer layer structure; Z′ q is the output result of the multi-head attention mechanism module in the qth Transformer layer; Z q is the output result of the multi-layer perception module in the qth Transformer layer. When the subscript q = 1, Z 0 Represents the output of the position encoding layer, which is the word vector generated by the image block.

[0152] In the VGGNet-ViT network, two parallel branches of the backbone network layer will extract features from the same image. Among them, there are 5 downsampling layers in the convolution layer of the VGGNet network, and each downsampling layer will reduce the dimension of the input feature map by half. Therefore, when the input image size is (1, 300, 300), that is, the number of input channels is 1, and the height and width of the image are 300; the dimension of the feature vector output by the final convolution layer is (512, 9, 9), that is, the number of output channels is 512, and the height and width of the vector are 9. When the input image size is (1, 300, 300), after segmentation, linear mapping and other processing, the final output feature vector dimension of the Transformer encoding layer of the Transformer encoding network is (1, 17, 5625), that is, the number of output channels is 1, and the height and width of the vector are 17 and 512 respectively.

[0153] After analyzing the two parallel branches of the VGGNet-ViT network, it can be seen that the feature dimensions output by the two parallel branches are different during feature extraction. Fig.11 As shown in the figure, a feature fusion layer is added to the VGGNet-ViT network. In the feature fusion layer, the feature vectors of two different dimensions are fused into one feature vector, and the fused feature vector is input into the fully connected layer. The feature fusion layer uses the feature pyramid method for feature fusion. The main steps are as follows: First, channel dimension alignment; the number of output channels of the VGGNet network is 512, and the number of output channels of the ViT network is 1; in order to unify the number of channels of the two feature maps, a convolution kernel with a width and height of 1×1 is used to convolve the feature map output by the ViT network, and its output channel number is set to 512. Second, linear transformation: after unifying the channel dimensions, the dimensions of the feature vectors output by the VGGNet convolutional layer and the Transformer encoding layer branch are (512, 9, 9) and (512, 17, 5625) respectively; to address the problem of unequal width and height of the feature vector output by the Transformer encoding layer, the linear transformation method is used to convert the feature vector with dimensions (512, 17, 5625) into a feature vector with dimensions (512, 17, 17). Third, upsampling: to address the problem of different sizes of the feature vectors output by the two parallel branches, the neighboring interpolation method is used to convert the feature vector with dimensions (512, 9, 9) into a feature vector with dimensions (512, 17, 17). Fourth, vector fusion: after upsampling, the feature vector output by the convolutional layer of the VGGNet network and the feature vector output by the Transformer encoding layer have dimensions (512, 17, 17); through the dot product operation, the above two feature vectors are fused and input to the fully connected layer.

[0154] See also Fig.10As shown in Figure 1, the fully connected layer projects the feature information obtained by the feature fusion layer into the sample label space, which is then converted into classification probability by the Softmax layer, and the load type with the largest probability is output as the recognition result.

[0155] The features extracted by the VGGNet-ViT network are the product of the fusion of the VGGNet network features and the Transformer network features. Therefore, the features of the VGGNet-ViT network contain richer global feature information and local feature information. The established VGGNet-ViT network is trained with the collected working condition samples and their corresponding electrical load working condition types as input and output respectively. The trained VGGNet-ViT network model is tested with the test set, and its overall recognition effect is shown in Table 2 below.

[0156] Table 2 VGGNet-ViT network recognition test

[0157]

[0158] Compare the recognition effects of the VGGNet model and the VGGNet-ViT model on various household appliance loads, and plot the average F1 score (mF1), average precision (mPrecision), average recall (mRecall) and accuracy (Accuracy) of the two models into bar graphs. Fig.14 shown.

[0161] right Fig.14 The analysis shows that the overall recognition effect of the VGGNet-ViT model is better than that of the VGGNet model. Compared with the VGGNet model, the overall recognition accuracy of the VGGNet-ViT model increased by 2.03%, the average precision increased by 0.19%, the average recall increased by 2.65%, and the average F1 score increased by 2.42%.

[0162] In online applications, the device of the present invention processes data and generates trajectory diagrams for real-time collected electrical parameter signals, and the trained VGGNet-ViT network model identifies the type of electrical load, and outputs the identified load type and the time when the switching event occurs. Preferably, the sampling period of the acquisition is a coefficient times the power frequency period, and the coefficient is between 1 / 100 and 1 / 32; and the width of the voltage and current data sequence in the real-time sample corresponds to 2 to 5 power frequency periods.

[0163] Preferably, after identifying the electrical load type, the time of occurrence of the load event is converted into absolute time and stored in the storage module, and the absolute time and electrical load type are output, thereby providing a basis for users or power supply units to analyze the working hours, energy consumption distribution and other characteristics of various electrical appliances.

[0164] Example 2

[0165] Based on the previous embodiment, Figure 2 As shown, this embodiment provides a non-intrusive load identification system 1000 using the method of the present invention, which includes: an electrical signal sensing unit 600 for collecting electrical parameter signals at the power supply entrance of the electrical load 300, a user interface unit 200 for parameter input and operation and display of the working status of the electrical load, a server 500 for data management and information transmission, a handheld terminal 400 for remote operation and electrical load information interaction, and a host unit 100 connected to the user interface unit 200, the server 500, and the electrical signal sensing unit 600; the host unit 100 includes a processor 110, a storage module 120, and an input and output module 130. Among them, the host unit 110 is configured as follows:

[0166] The electrical load action signal is obtained, and based on the action signal, an electrical parameter signal collected by an electrical signal sensing unit at the power supply entrance of the electrical load is received; the data preprocessing module performs noise reduction and normalization processing on the electrical parameter signal, and then draws it into a VI trajectory diagram, and forms a continuous trajectory diagram after continuous processing on the VI trajectory diagram, and saves the continuous trajectory diagram as a sample marked as a corresponding electrical load working condition type; the working condition samples under different working conditions of different electrical loads are repeatedly obtained to form a training set; an electrical load identification model based on the VGGNet-ViT network is constructed in the type recognition module, and the identification model is based on the working condition samples and their corresponding electrical loads. The gas load condition type is used as input and output respectively; the iterative learning module uses the training set to perform offline training on the identification model, adjusts the connection weights of the network in the identification model, and forms a trained VGGNet-ViT network model; in the field environment, in response to the event signal of the electrical load being put into operation, the data acquisition module obtains the incremental information fragments of the electrical parameter signals collected before and after the electrical load is put into operation, and the data preprocessing module performs noise reduction filtering and normalization processing on the incremental information fragments, and extracts the corresponding VI continuous trajectory diagram, inputs the VI trajectory diagram into the trained VGGNet-ViT network model, and outputs the load type identified by the trained VGGNet-ViT network model.

[0167] Preferably, the non-intrusive load identification system 1000 may not include the server 500 and the handheld terminal 400, but the load identification system is connected to the server 500, the handheld terminal 400 and the electrical load 300 via a network during application.

[0168] Through the server, the host unit can send electrical load messages to remote clients deployed in handheld terminals, etc. Preferably, an MQTT server can be deployed, and the server pushes messages to clients that subscribe to the topic. Multiple devices can subscribe to multiple topics at the same time, and when publishing messages, subscribing to the same topic can receive the same message. The publish-subscribe mode is a messaging mode that decouples the client that sends the message, i.e., the publisher, from the client that receives the message, i.e., the subscriber, so that the two do not need to establish a direct connection or know each other's existence.

[0169] Based on the deployment of the MQTT client, the host unit can be configured to: subscribe to the information acquisition topic of the handheld terminal, and in response to the topic message, transmit the detected load type and the corresponding switching time to the handheld terminal through the server; or when a new load type is detected, transmit the load type and the corresponding time to the server in the form of a load topic message, and the server pushes the load message to different subscribers.

[0170] See also Figure 2 As shown, in addition to the operation panel 220 for parameter input, the user interface unit 200 is also provided with a display screen 210 for assisting parameter input and displaying the load type identification result in the form of a list. The host unit 100 also dynamically displays the discrete data streams such as current, voltage and power obtained after filtering and processing the collected electrical parameter signals on the display screen in the form of curves, and marks the identified load type at the corresponding position on the curve.

[0171] Example 3

[0172] Based on the above embodiments, this embodiment provides a non-intrusive load control method, including the following steps:

[0173] T1, initialization, set up an electrical signal sensing unit at the power supply entrance of the electrical load, establish an electrical load identification model based on the VGGNet-ViT network, arbitrarily arrange each typical working condition of each electrical load and form a corresponding operation instruction set;

[0174] T2, issue a command to make the electrical load act, so as to generate an input or output event; after each load input event occurs, start collecting a new sensor data sample, record the current workload type, and go to step T3, otherwise go to step T4;

[0175] T3, determine whether the sensor data samples under the current working condition need to be supplemented, if so, go to step T4, otherwise go to step T5;

[0176] T4, obtaining and recording the electrical parameter sensing data, and detecting whether there is an exit instruction, if there is, go to step T14, otherwise go to the next step T6;

[0177] T5, judging whether the sample set for network model training is sufficient, if so, go to step T7, otherwise, extract one instruction from the operation instruction set in turn, and go to step T2;

[0178] T6, wait for the next cycle and go to step T2;

[0179] T7, performing noise reduction and normalization processing on the electrical parameter sensing data sequence in each sample in the sample set, and drawing the normalized data sequence as a VI trajectory diagram;

[0180] T8, performing serial processing on the VI trajectory graph to form a continuous trajectory graph;

[0181] T9. Based on the electrical load identification model, the formed continuous trajectory graph is subjected to feature extraction in parallel by two networks, namely, a VGGNet convolutional network and a ViT Transformer encoding network;

[0182] T10, after the features output by the two networks are fused, the probabilities of belonging to each load type and the final load type are output after being processed by the fully connected layer and the classification layer;

[0183] T11, jump according to the current mode, if it is offline training mode, go to step T12, otherwise go to step T13;

[0184] T12, calculating the prediction error according to the probability output of each sample in the training set in the classification layer, the workload type recorded by the sample, and the cross entropy loss function, training the electrical load identification model based on the VGGNet-ViT network through back propagation based on the calculated prediction error, updating the parameters in the network model, iterating the training until the training is completed, and then going to step T2;

[0185] T13, output the load type as the identification result, and perform abnormal load state detection,

[0186] If the working time period of the identified load type does not include the current time, an abnormal warning will be issued, and the power supply to the load of this type may be disconnected with or without confirmation.

[0187] If an electrical load has a working period that includes the current time, but is not included in the currently identified load type, an abnormal warning will be issued, and the power supply to this type of load will be automatically closed with or without confirmation.

[0188] If the difference between the current effective value and the previous effective value exceeds a preset multiple, it is determined that an abnormal electrical load event has occurred, and the switch at the power supply entrance of the electrical load is controlled to cut off the power input.

[0189] Go to step T5;

[0190] T14. End load identification and control.

[0191] Among them, the above steps are processed similarly to the load identification method in similar processing steps.

[0192] See also Figure 4 As shown, the electrical signal sensing unit 600 may include a current sensing module 610 and a voltage sensing module 620 to achieve sampling and detection of electrical parameters. At present, high-frequency sampling is mostly used in non-invasive load monitoring. Low-frequency sampling can reduce the processing workload of data streams. In order to restore the power frequency signal, each power frequency cycle requires a minimum of 5 to 10 sampling points, but a frequency that is too low is not conducive to the implication and extraction of VI trajectory features. To this end, the test obtained an effective sampling frequency, and the spacing or sampling period of the numerical points in the data sequence is preferably a coefficient times the power frequency cycle, and the coefficient is between 1 / 100 and 1 / 32. When the sampling frequency of the initial data stream is very high, it is converted into a data sequence with a period of the multiple of the power frequency cycle by downsampling. Thereby, low-frequency sampling can be achieved to reduce the computational complexity of the detection process.

[0193] On the one hand, in order to obtain the electrical load action signal, in one case, the host unit monitors the electrical parameter signal collected by the electrical signal sensor unit at the electrical load power supply entrance, and if it is found that the voltage sag amplitude exceeds the set voltage drop threshold Du and the duration reaches the set threshold time length, such as 0.5 power frequency cycle, it is determined that the electrical load input event occurs. The voltage drop threshold Du can be set to 5% to 10% of the rated voltage.

[0194] In another case, the host unit can also monitor the increment of the effective value of the current per cycle. When the increment of the effective value of the current in a certain cycle is greater than the preset current effective value increment threshold Di, it is determined that there is an electrical load input event. Specifically, when a load input event occurs, the system enters a transient process at the beginning of the cycle; thereafter, the effective value of the current in each cycle is calculated by sliding. When the effective value of the current for t consecutive cycles starting from the kth cycle is less than the increment of the previous power frequency cycle by less than the preset threshold Di, it is considered that the transition process of the input event is over, and the system enters a steady state at the end of the kth cycle, where k and t are preset cycle number thresholds. Preferably, the current effective value increment threshold Di is set to 0.5 times the current effective value mutation amount corresponding to the minimum power electrical appliance being put into operation.

[0195] Specifically, the host unit is also configured to: take the current detection point position or the current moment in the current sequence as the tail end, use the previous power frequency cycle to count the current current effective value, calculate the difference between the current current effective value and the previous current effective value, and compare the difference with the differential value characteristics of the current effective value when any electrical appliance in the prior electrical load is put into operation; if the former exceeds the latter set threshold Di or the first preset multiple, it is determined that an electrical load input event has occurred.

[0196] In order to realize automatic detection and control of the system, as a preferred method, if the difference between the current effective value of the current and the previous effective value of the current exceeds the second preset multiple, it is determined that an abnormal electrical load event has occurred, and the switch action at the power supply entrance of the electrical load is controlled by the input-output module to cut off the power input. Alternatively, the derivative characteristics of the electrical parameters at the current detection position in the data sequence with respect to time are compared with the derivative characteristics of the electrical parameters with respect to time when any electrical appliance in the prior electrical load is put into operation. If the former exceeds the third preset multiple of the latter, it is determined that an abnormal electrical load event has occurred, and the switch action at the power supply entrance of the electrical load is controlled by the input-output module to cut off the power input.

[0197] Furthermore, the host unit can be configured to detect load switching events based on the collected discrete data stream. The similarity calculation is performed based on the characteristics of the jump variables of the electrical parameters at the current detection position in the data sequence of voltage, current and corresponding power, and the characteristics of the jump variables of the electrical parameters when any electrical appliance in the prior electrical load is switched on or off. If the obtained similarity value is higher than the preset similarity threshold, it is determined that there is a load switching event of the electrical appliance at the current detection position. Preferably, the electrical parameter jump variable is a vector composed of the effective value of the current, power, etc., which are statistically calculated within a unit time, and the similarity calculation adopts cosine similarity.

[0198] In the second aspect, an active control module can be set in the electrical load of the system, and a jump detection module can be set in the sensor unit. Figure 4As shown, the electrical signal sensing unit 600 may also include a transition detection module 630. The transition detection module 630 detects the transition edge of the electrical parameter signal through a comparator circuit, and sends a trigger signal to the host unit 100 after detecting the transition edge, thereby providing a circuit-level reference signal for the host unit 100. The host unit 100 can perform auxiliary judgment of events based on the trigger signal, and correspondingly collect electrical parameter signals for sample collection and load type identification. Preferably, one host unit 100 can correspond to multiple electrical signal sensing units 600.

[0199] refer to Figure 2 As shown, each electrical appliance in the electrical load may be provided with an electrical drive control module 310 in the power module before its electrical body or main body 320. The electrical drive control module for different electrical appliances corresponds to a controller such as a relay contact pair, or a driver such as an LED lamp drive power supply.

[0200] Preferably, the input / output module 130 of the host unit 100 also controls the electrical appliance drive control module 310 through an interface circuit. When it is determined that a certain electrical appliance has been put into operation, if an abnormal event is recognized again, the electrical appliance drive control module of the electrical appliance can be activated to only cut off the power supply of the electrical appliance, thereby not hindering the operation of other electrical appliances in the electrical load, thereby improving the user experience.

[0201] Thirdly, see Figure 2 As shown, the non-intrusive load identification system further includes an external control device, which, in response to the user's operation on the operation panel or the instruction of the host unit, turns on or off the power supply of the electrical load, so that a certain electrical appliance is put into or cut out of the power system at a preset time. Preferably, the external control device is connected between the power supply and the electrical appliance signal sensing unit.

[0202] Preferably, an electrical appliance drive control module is provided between the main body of the electrical appliance and the power supply, and the host unit also controls the operation of the electrical appliance drive control module through an interface circuit to cut off or connect the power supply of the electrical appliance, thereby orderly controlling the occurrence of switching events when generating samples.

[0203] Preferably, in the training set, for the same electrical load condition, multiple time segments between the input and output of the electrical load can be taken, and each segment can be used as a training sample, thereby increasing the coverage of the samples and improving the recognition robustness.

[0204] Preferably, the host unit also issues instructions to cause the electrical load to operate, so as to generate the switching-in or switching-out event; wherein, each typical working condition of the load can be arbitrarily arranged and corresponding instructions can be formed to form sufficient training samples and improve the load identification segmentation capability. For example, for fans, different load category labels such as fan first gear and fan second gear can be established.

[0205] Based on the identified electrical load switching events, when collecting samples, it can be assumed that when the operating state of each electrical load changes, only one electrical load condition switches, that is, there is no overlap in the transient processes of two or more electrical loads. For example, generally, multiple load switching events will not occur within a few milliseconds, which is determined by the physical characteristics of the electrical load and the user's electricity usage habits. Correspondingly, the time range of the electrical parameter signal corresponding to the electrical load condition sample and the incremental information segment can be taken as the duration of 2 to 5 power frequency cycles.

[0206] See also Fig. 12A , Fig. 12B and Fig. 12C As shown, after the electrical load input event is detected, the difference between the current after the event and the current before the event in the same phase in the steady state is used as the current value in the electrical parameter signal used to produce the VI trajectory diagram for the operating condition sample and incremental information fragment.

[0207] Fig. 12A In the example, the first load is switched on at time tln, the second load is switched on at time t2n, the first load is switched off at time tlf, and the second load is switched off at time t2f. Fig. 12B It is shown that, based on the determination of the first load input event, the sequence of the difference values ​​△i1+ in the same phase between the current after the event and the current before the event is used as the current sequence in the first load condition sample; similarly, the sequence of the difference values ​​△i2+ in the same phase between the current after time t2n and before time t2n is used as the current sequence in the second load condition sample. The same phase is achieved by aligning the phases of the voltage sequence waveforms, such as using the positive zero crossing point of the voltage as the reference zero point of each phase, and then performing differential calculations on the current values ​​in the same phase.

[0208] At the same time, at time t1f, the current changes negatively, and the time upper limit of the possible value interval of the first load condition sample is identified according to the detected load cut-out event. Fig. 12C As shown, the time period from tln to tlf is the sampling time period of the first load condition sample time segment; similarly, the time period from t2n to t2f is the sampling time period of the second load condition sample time segment.

[0209] Furthermore, when the initial monitoring moment corresponds to a plurality of electrical loads being in working state, a backtracking method is used to calculate the current value of the electrical parameter sequence; that is, after waiting for a certain electrical load cut-out event to occur, the difference value of the current before the event and the current after the event in the steady state in the same phase is used as the point value of the current sequence required for the working condition sample to produce the VI trajectory diagram.

[0210] This embodiment acquires samples by controlling the power supply to the electrical load, and identifies abnormal operating conditions of different types of loads and controls the power supply.

[0211] For example, in one case, when the electric kettle is identified to be automatically reheated, its power supply can be disconnected to prevent repeated boiling. Or, when the weather is fine, it is preset that the water heater does not need to be heated, and when the water heater is identified to be automatically heated in fine weather, its power supply can be automatically disconnected to save energy. In another case, under normal circumstances, the air conditioner needs to be turned on or the water heater needs to be heated by appointment, but the appliance cannot be automatically started due to a power outage. When the control method recognizes that the target appliance does not work at the scheduled time, it will automatically close its power supply circuit.

[0212] Example 4

[0213] This embodiment provides a non-intrusive load identification controller using the method of the present invention, combined with Figure 2 , Figure 3 , Figure 5A , Figure 5BAs shown, the non-intrusive load identification controller 100 includes a processor 110, a storage module 120 and an input-output module 130. The processor 110 includes a general processing module 111, a data acquisition module 112, a data preprocessing module 113, an iterative learning module 114 and a type identification module 115. Among them, the data acquisition module 112 periodically receives the collected electrical parameter signal from the electrical signal sensing unit 600 via the input-output module 130; the data preprocessing module 113 filters and de-noises the collected electrical parameter signal to form a discrete data stream, and normalizes it to construct an electrical parameter data sequence, constructs a VI trajectory diagram based on the normalized data sequence, and performs continuous processing and grayscale bar columns, i.e., histograms, supplement. In the type recognition module 115, an electrical load identification model based on the VGGNet-ViT network is constructed. The identification model uses the VI grayscale trajectory diagram formed by the operating condition type as a training sample set; the iterative learning module 114 uses the training sample set to perform offline training on the identification model, adjust the connection weights of the network in the identification model, and form a trained VGGNet-ViT network model. The general processing module 111 responds to the operation of the message and user interface unit, detects and responds to the load switching event, controls the identification processing flow, forms a VI grayscale trajectory diagram of the real-time collected electrical signal sequence, and inputs it into the trained VGGNet-ViT network model in the type recognition module 115, and outputs the identified electrical load type.

[0214] Figure 5A and Figure 5B The controller part structure diagram is given, combined with Figure 2 , Figure 5A and Figure 5B As shown, an electrical load identification model 1150 is constructed in the type identification module 115, whose input layer receives the trajectory diagram from the general processing module 111, and the output layer is transmitted to the iterative learning module 114 and the general processing module 111 through the first connection matrix 1141 and the second connection matrix 1142 respectively. When the electrical load identification model 1150 is trained offline, the iterative learning module 114 adjusts the connection weight of the network according to the actual value of the electrical load condition type input by the general processing module 111 and the electrical load identification model 1150 through the first connection matrix 1141 and the output value of the VGGNet-ViT network in the model. In the field environment, the first connection 1141 matrix is ​​disconnected, and the VGGNet-ViT network identifies the electrical load condition type and outputs it to the general processing module 111 through the second connection matrix 1142, and the general processing module 111 processes and analyzes it and outputs it through the output unit 132 in the input and output module 130.

[0215] like Figure 5BAs shown, under the scheduling of the general processing module, the load type identification module 115 maps the deep network and weight parameters of the established electrical load identification model to the deep network structure 121 and the parameter memory 122 in the storage module respectively; during offline training, the external control device 800 initiates the switching action of the electrical load. In response to the load switching operation, the input unit 131 in the input-output module inputs the electrical parameter data sequence and the current load type from the electrical parameter input block 1312 and the load type input block 1311 to the deep network structure 121 and the iterative learning module 114 respectively, wherein the electrical parameter data sequence is input as the formed VI grayscale trajectory diagram after processing, and the iterative learning module adjusts the connection weights of the network stored in the parameter memory 122 according to the actual value of the electrical load condition type input by the load type input block 1311 and the output value of the deep network structure 121; in online applications, after the real-time input electrical parameter sequence is converted into a VI grayscale trajectory diagram, the trained load type identification module 115 identifies the current load category and outputs it from the output unit 132.

[0216] further, Figure 5C The decomposition structure diagram of the type identification module 115 is illustrated. The load type identification module 115 includes a VI trajectory diagram drawing unit 1151, a continuous processing unit 1152, a first deep network feature extraction unit 1153, a second deep network feature value extraction unit 1154, a feature fusion unit 1155 and a load identification unit 1156. Among them, the VI trajectory diagram drawing unit 1151 draws the VI trajectory diagram according to the normalized electrical parameter sequence, and the continuous processing unit 1152 performs continuous and grayscale processing to form a VI grayscale trajectory diagram, which is synchronously input into the first deep network feature extraction unit 1153 using the VGGNet convolutional network and the second deep network feature value extraction unit 1154 using the ViT Transformer encoding network for feature extraction. After the feature fusion unit 1155 fuses the feature vectors of two different dimensions into one feature vector, and the fused feature vector is input into the fully connected layer in the load identification unit 1156, and the load type is optimally output by its Softmax classification layer.

[0217] The non-intrusive load identification controller of the present invention can work in two modes, offline or online, to identify and measure the load type. In the offline mode, based on the historical electrical parameter data sequence that has been sampled and recorded, the controller is configured to: repeat the load event detection, and for each working time segment after the load is put into operation, the data sequence is processed to obtain a VI grayscale trajectory diagram, and the load type identified by the load type identification module is synchronously marked in the corresponding time period. Therefore, the historical electrical parameter data sequence can be output on the human-machine interface in the form of an electrical parameter curve, load switching events, and load types.

[0218] The application of the present invention to electrical load identification can provide a basis for further processing for power users or power supply companies, thereby distinguishing the number and type of loads in different time periods based on event detection, and providing a basis for power consumption behavior analysis and power supply strategy adjustment.

[0219] Several embodiments of the present invention are described above, but these embodiments are presented as examples and do not limit the scope of the invention. These embodiments can be implemented in various other ways, and various omissions, substitutions, and changes can be made without departing from the scope of the main purpose of the invention. These embodiments or their modifications are included in the scope or main purpose of the invention, and are also included in the invention described in the claims and their equivalents.

Claims

1. A non-intrusive load identification method, The following steps are involved: S1. Initialization: setting up an electrical signal sensing unit at the power supply entrance of the electrical load and establishing an electrical load identification model based on the VGGNet-ViT network; S2, obtaining an electrical load action signal or an electrical parameter jump signal, determining whether a load input event occurs, if so, starting to collect a new sensor data sample, recording the current workload type, and proceeding to step S3, otherwise proceeding to step S4; S3, determine whether the current sensor data sample needs to be supplemented, if so, go to step S4, otherwise go to step S7; S4, obtaining and recording electrical parameter sensing data; S5, check whether there is an exit instruction, if yes, go to step S14, otherwise go to the next step S6; S6, wait for the next cycle, and go to step S2; S7, performing noise reduction and normalization processing on the electrical parameter sensing data sequence in the sample, and drawing the normalized data sequence as a VI trajectory diagram; S8, performing serial processing on the VI trajectory graph to form a continuous trajectory graph; S9, based on the electrical load identification model, extracting features of the formed continuous trajectory graph in parallel through two networks, namely, a VGGNet convolutional network and a ViT Transformer encoding network; S10, after the features output by the two networks are fused, the probabilities of belonging to each load type and the final load type are output after being processed by the fully connected layer and the classification layer; S11, jump according to the current mode, if it is offline training mode, go to step S12, otherwise go to step S13; S12, calculating the prediction error according to the probability output of each sample in the training set in the classification layer, the workload type recorded by the sample, and the cross entropy loss function, training the electrical load identification model based on the VGGNet-ViT network through back propagation based on the calculated prediction error, updating the parameters in the network model, iterating the training until the training is completed, and then going to step S2; S13, output the load type as the identification result, and go to step S5; S14. End load identification.

2. A non-intrusive load identification method according to claim 1, It is characterized in that The step S2 includes: S21, determining whether a load switching event occurs, if so, proceeding to step S22, otherwise proceeding to step S4; S22, determine whether the current event is a cut-out event, if so, go to step S3, otherwise start collecting a new sensor data sample, record the current workload type, assign the current state as the sample collection state, and go to step S3, The step S3 includes: S31, if the current state is in the sample collection state, determine whether the current data sequence length meets the sample requirements, if so, assign the current state as the initial state and go to step S32, otherwise directly go to step S32; S32: Determine whether the sample set is sufficient, if so, go to step S7, otherwise go to step S4.

3. A non-intrusive load identification method according to claim 2, It is characterized in that The period in step S6 is a sampling period, and the sampling period is a coefficient times the power frequency period, and the coefficient is between 1 / 100 and 1 / 32; The sample requirement in step S31 is: the time range of the current data sequence length is taken as an integer multiple of the power frequency cycle, such as the duration of 2 to 5 power frequency cycles; In step S4, the difference between the current after the event and the current before the event in the same phase in a steady state is used as the current point value in the current sequence.

4. A non-intrusive load identification method according to claim 1, It is characterized in that The step S2 includes: calculating the similarity between the electrical parameter jump variable characteristics at the current detection position in the data sequence of voltage, current and corresponding power and the electrical parameter jump variable characteristics when any electrical appliance in the prior electrical load is turned on or off; if the obtained similarity value is higher than the preset similarity threshold, it is determined that there is a load event of the electrical appliance being turned on or off at the current detection position.

5. A non-intrusive load identification method according to claim 1, It is characterized in that In step S7, the data normalization process adopts the formula: Where x is the voltage value or current value, and a is a base greater than 1 to avoid saturation of the upper and lower limit bilateral regions; the discrete data stream obtained after normalization is constructed into a voltage data sequence and a current data sequence with equal length and aligned along the time phase, In the step S12, when iteratively training the electrical load identification model, the connection weights of the network are adjusted according to the actual values ​​of the electrical load operating conditions of the samples and the output values ​​of the model.

6. A non-intrusive load identification method according to claim 1, It is characterized in that The step S7 comprises: when drawing the VI trajectory diagram, firstly creating an M×M all-zero grid background diagram, then mapping the normalized voltage and current data sequences into pairs according to the alignment positions, proportionally mapping them to the corresponding grids in the background diagram and processing 1 at the corresponding grids, and forming an initial binary VI trajectory diagram after all data points in the data sequence are mapped; The step S8 comprises: in the continuous processing, traversing the binary VI trajectory diagram with a structure element, gradually moving the center point of the structure element along each non-zero grid in the binary VI trajectory diagram, and constructing the union of the structure element and the non-zero grid of the binary VI trajectory diagram during the movement into a continuous trajectory diagram; starting from the center of the continuous trajectory diagram, taking the effective value of the current corresponding to the current data sequence as a coefficient, setting a straight line segment with a height equal to the product of the coefficient and the half-height of the trajectory diagram and a gray value equal to the product of the coefficient and 255, to form a continuous trajectory diagram based on grayscale; In the step S9, the grayscale-based continuous trajectory diagram is used as a sample to input the electrical load identification model.

7. A non-intrusive load identification method according to claim 1, It is characterized in that The electrical load identification model based on the VGGNet-ViT network in step S1 includes: an image input layer, a deep learning model feature extraction unit, a feature fusion unit and a load identification unit; Among them, the deep learning model feature extraction unit includes two parallel branches: a first deep network feature extraction unit and a second deep network feature value extraction unit. The first deep network feature extraction unit adopts a VGGNet convolutional network, and the second deep network feature value extraction unit adopts a ViT Transformer encoding network. The load identification unit includes a fully connected layer and a classification layer; the feature fusion unit fuses the feature vectors of two different dimensions into one feature vector, and inputs the fused feature vector into the fully connected layer.

8. A non-intrusive load identification method according to claim 7, It is characterized in that The structure of the VGGNet convolutional network is composed of a convolutional layer, a pooling layer, a convolutional layer, a pooling layer, a convolutional layer, a pooling layer, a convolutional layer, a pooling layer, a convolutional layer, a convolutional layer, a pooling layer, a convolutional layer, and a pooling layer connected in sequence. The pooling layer selects the maximum value from the local area of ​​the image. The ViT Transformer encoding network includes a graphic segmentation layer, a linear mapping layer, a position encoding layer, and a Transformer encoder layer; wherein the graphic segmentation layer divides the input image into several image blocks of equal size and outputs them to the linear mapping layer; the linear mapping layer converts a single two-dimensional image block into a one-dimensional vector, and constructs a word vector with the one-dimensional vectors generated by all image blocks; the position encoding layer adds the position information to the word vector, and adds a special character representing the head to the word vector; the Transformer encoder contains 13 Transformer layers, wherein each Transformer layer consists of a normalization layer, a multi-head attention mechanism module, and a multi-layer perception module.

9. A non-intrusive load identification method according to claim 7, It is characterized in that The fully connected layer projects the feature information obtained by the feature fusion unit into the sample label space, and then converts it into classification probability by the Softmax layer, and outputs the load type with the highest probability as the recognition result.

10. A non-intrusive load identification method according to claim 1, It is characterized in that The step S13 includes: dynamically displaying the discrete data stream obtained by filtering the collected electrical parameter signal on the display screen in the form of a curve, and marking the identified load type on the curve.

Citation Information

Patent Citations

  • Non-intrusive power load feature extraction and identification method and system based on image processing and medium

    CN110188771A

  • Non-intrusive load identification method based on metric learning

    CN114359674A

  • Load identification method and system based on deep learning theory

    CN116486232A

  • Power equipment anomaly type self-detection method based on fused ViT convolutional neural network

    CN117011265A

Cited By

  • Non-intrusive load identification method based on comparative learning

    CN119538089A

  • Data acquisition and analysis control method of intelligent electric energy meter

    CN122814991A

  • A data acquisition, analysis and control method for smart energy meters

    CN122814991B