Non-intrusive load detection method based on self-supervised condition auto-encoder

By learning load features through a self-supervised conditional autoencoder and optimizing training by combining reconstruction loss and classification loss, the problem of insufficient generalization ability of the NILM method across users and scenarios is solved, and high-precision and highly adaptable load detection is achieved.

CN120974246AActive Publication Date: 2025-11-18INNER MONGOLIA ELECTRIC POWER (GRP) CO LTD ORDOS POWER SUPPLY BRANCH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511510827.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2025-11-18
Estimated Expiration
2045-10-22

AI Technical Summary

Technical Problem

Existing NILM methods lack generalization ability across users and scenarios, rely on manually designed features and are sensitive to changes in data distribution, making it difficult to adapt to dynamically changing electrical equipment. Furthermore, they struggle to identify newly emerging load types when training categories are incomplete.

Method used

A non-intrusive load detection method based on a self-supervised conditional autoencoder is adopted. The method learns transformation-invariant and discriminative load features through self-supervised pre-training, and optimizes the training by combining reconstruction loss function and classification loss function to construct clear feature boundaries. Anomaly thresholds are set using feature distance for detection.

Benefits of technology

It improves the accuracy and generalization ability of load identification, effectively identifies abnormal energy loads in complex power consumption scenarios, adapts to dynamically changing power equipment, and reduces the sensitivity to data distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120974246A_ABST
    Figure CN120974246A_ABST
Patent Text Reader

Abstract

The invention provides a non-intrusive load detection method based on a self-supervised conditional auto-encoder, which comprises the following steps of: firstly, extracting a track feature and a track image of a load sample, training a classifier according to the track feature and carrying out load identification; based on the load sample set, performing self-supervised training on the pre-training model according to the trajectory image and the reconstruction loss function to obtain a reconstruction image set, performing optimization training on the pre-training model according to the reconstruction image set and the overall loss function to obtain a detection model, and performing non-intrusive detection on the abnormal energy consumption load based on the abnormal score; the overall loss function is constructed based on a classification loss function and a learning loss function, the classification loss function is constructed by adopting cross entropy loss, and the learning loss function is constructed by adopting correction linear operation. The method improves the load characterization and subsequent detection capability, is practical and efficient, is high in generalization and applicability, can guarantee the known load recognition precision, can construct a clear feature boundary, and meets the load recognition requirements in a complex power utilization scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power load monitoring technology, and specifically to a non-intrusive load detection method based on a self-supervised conditional autoencoder. Background Technology

[0002] Under the "dual-carbon" strategy, the energy structure is undergoing accelerated transformation, and the power system faces a higher proportion of renewable energy integration and a diversified electricity load structure. Achieving carbon peaking and carbon neutrality requires not only green development on the power supply side but also efficient regulation and intelligent sensing on the load side. NILM (Non-Intrusive Load Monitoring) technology collects total electricity signals from the user side, identifies and reconstructs the electricity consumption behavior of various loads, and provides basic data support for user energy-saving management, grid-side load forecasting, and electricity demand response strategy formulation. Compared with traditional socket-type or smart plug monitoring methods, NILM has advantages such as low deployment cost, high user acceptance, and low communication cost, and has become one of the key technologies in smart grids and energy efficiency management. At the same time, NILM also shows broad application prospects in equipment condition monitoring, electricity safety early warning, and power quality analysis. Therefore, in-depth research on high-precision, high-generalization NILM methods has significant theoretical and practical value.

[0003] However, current technologies mainly face the following technical challenges: (1) The classifier relies on manual design, is sensitive to changes in data distribution, and its generalization ability across users and scenarios needs to be improved. The traditional NILM method, which combines feature engineering and classifiers, relies on manually designed features and is sensitive to changes in data distribution.

[0004] (2) Many research methods are based on the "closed set assumption," which can easily lead to insufficient labels for some loads. Most existing methods are based on an idealized assumption that the set of load categories remains consistent during training and testing, i.e., the "closed set assumption." This can result in the training process failing to cover the highly dynamic and diverse user loads in real-world scenarios. This leads to a decrease in recognition accuracy and may even interfere with the entire load recognition process, thus hindering the large-scale deployment of NILM systems.

[0005] (3) Some methods have difficulty identifying newly emerging load types when the training categories are incomplete. In actual NILM tasks, user electrical equipment will change dynamically, and loads not covered in the training stage often appear during the testing phase. Some traditional methods only model known load categories, making it difficult to adapt to the diversity of loads in actual scenarios.

[0006] To address the aforementioned issues, researchers have proposed methods combining deep learning with NILM (Non-Independent Learning Model). Structures such as Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), sequence-to-point models, attention mechanisms, and autoencoders are widely used in load identification tasks, enabling end-to-end feature learning and classification decisions. Some researchers have introduced semi-supervised or transfer learning techniques to address the problems of insufficient labels and cross-scenario generalization. However, these methods generally suffer from difficulties in building effective models under conditions of scarce labels, potential inability to cover the highly dynamic and diverse user loads in real-world scenarios during training, and difficulty in adapting to the diversity of loads in actual scenarios when training categories are incomplete. Summary of the Invention

[0007] This invention addresses the problems existing in the prior art by providing a non-intrusive load detection method based on a self-supervised conditional autoencoder, which improves the characterization and subsequent detection capabilities of loads, is practical, efficient, and has strong generalization and applicability. It can not only ensure the accuracy of known load identification, but also construct clear feature boundaries to help distinguish loads and adapt to the load identification needs in complex power consumption scenarios.

[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows: a non-intrusive load detection method based on a self-supervised conditional autoencoder, comprising: A non-intrusive load sample set for obtaining abnormal energy consumption loads based on the power system, wherein the load sample set includes at least one load sample; and a load category set for the load sample set is preset, wherein the load category set includes at least one load category. Based on the load sample set, the trajectory features and trajectory images of each load sample are extracted respectively; Based on the load sample set, a classifier is trained according to the trajectory features and load identification is performed. Based on the load sample set, the pre-trained model is self-supervised to obtain a reconstructed image set according to the trajectory image and the reconstruction loss function; the reconstruction loss function enables the pre-trained model to learn potential representations that can restore the original structure from different perspectives, so that the final features are invariant to input transformation and contain discriminative semantic information. The pre-trained model is optimized and trained based on the load category set, the reconstructed image set, and the overall loss function to obtain the detection model. Based on the anomaly score, the aforementioned detection model is used to perform non-invasive detection of the abnormal energy load; The overall loss function is constructed based on the classification loss function and the learning loss function. The overall loss function combines the classification loss function and the learning loss function. This joint optimization strategy not only ensures a high recognition rate for known loads, but also constructs clear inter-class boundaries in the feature space, providing a separable geometric basis for subsequent load detection. The classification loss function is constructed using cross-entropy loss based on the load category set and the reconstructed image set. The classification loss function explicitly drives the encoder to learn feature representations with good class discriminative power, and uses cross-entropy to optimize the classification of the latent representation feature vectors output by the encoder. The learning loss function is constructed using a modified linear operation based on the load category set and the reconstructed image set. Introducing the learning loss function can further improve the feature discrimination between different categories and enhance the robustness of the model to unseen loads.

[0009] In some embodiments, the reconstructed image set is obtained by performing self-supervised training on a pre-trained model based on the load sample set, the trajectory image, and the reconstruction loss function: Preset image transformation categories; In the pre-trained model, an initial transformation function, an initial extraction function, and an initial reconstruction function are constructed respectively. The initial transformation function is constructed based on the trajectory image, the initial extraction function is constructed based on the initial transformation function, and the initial reconstruction function is constructed based on the initial extraction function. The reconstruction loss function is constructed based on the image transformation category, the trajectory image, and the reconstruction function. Based on the load sample set, the pre-trained model is self-supervised to obtain the optimized transformation function, optimized extraction function and optimized reconstruction function according to the reconstruction loss function; Based on the load sample set, at least one image transformation operation is performed on each trajectory image according to the optimized transformation function to obtain an intermediate image set, the intermediate image set including at least one intermediate image, the trajectory image is obtained by performing the image transformation operation according to the optimized transformation function to obtain the intermediate image; The feature vector of each intermediate image is extracted according to the optimized extraction function; The reconstructed image is obtained by performing a reconstruction operation on the feature vector according to the optimized reconstruction function; The reconstructed image set is obtained based on the reconstructed image.

[0010] This stage is the supervised pre-training stage, in which the discriminative and generalizable representations of the payload are learned through image transformation and reconstruction operations, thereby enhancing the detection capability of the pre-trained model or the final detection model for unseen payloads.

[0011] In some embodiments, the pre-trained model includes an input transformation module, an encoder module, and a decoder module; The input transformation module is used to construct the initial transformation function and to perform at least one image transformation operation on each trajectory image based on the load sample set and the optimized transformation function to obtain an intermediate image set. The function of the input transformation module is to perform various image transformation operations such as rotation on the VI trajectory images of the load samples to generate transformed images, i.e., intermediate images, providing diverse inputs for self-supervised pre-training and helping the pre-trained model learn transformation-invariant load features. The encoder module is used to construct the initial extraction function and to extract the feature vector of each intermediate image according to the optimized extraction function. The function of the encoder module is to extract the feature vector of the transformed image during the pre-training stage and to retain the pre-training parameters during the fine-tuning stage and continue to output the load feature representation, providing key feature support for the decoder module to reconstruct the image, the classifier module to classify, and the non-invasive detection of abnormal energy loads. The decoder module is used to construct the initial reconstruction function and to perform reconstruction operations on the feature vectors according to the optimized reconstruction function to obtain a reconstructed image. The function of the decoder module is to receive the feature vectors output by the encoder module during the pre-training phase, reconstruct the feature vectors into the original, untransformed VI trajectory image, and by minimizing the reconstruction error, assist the encoder module in learning more robust and discriminative load-related features.

[0012] In some embodiments, the image transformation operation includes at least a rotation operation, which can enhance the adaptability of the pre-trained model to changes in the orientation of the load sample and prevent the pre-trained model from overfitting to a specific orientation.

[0013] In some embodiments, the step of obtaining the anomaly score is as follows: Calculate the cluster center of the load category corresponding to the abnormal energy load in the feature space; The Euclidean distance from the abnormal energy load to each cluster center is calculated based on the cluster centers and the feature vectors. The Euclidean distance conforms to spatial distance perception, facilitates visualization analysis, and is computationally efficient and highly applicable. The abnormal score of the abnormal energy load is obtained by taking the minimum value of the Euclidean distance.

[0014] In some embodiments, non-invasive detection of the abnormal energy load based on the anomaly score and using the detection model includes: Set an abnormal threshold; When the anomaly score is not greater than the anomaly threshold, the load category of the abnormal energy load is obtained according to the cluster center corresponding to the minimum value of the Euclidean distance; When the anomaly score is greater than the anomaly threshold, the abnormal energy load is considered to originate from an unknown load category and is rejected.

[0015] In some embodiments, setting the anomaly threshold includes: Obtain the anomaly score for each load sample in the load sample set; An abnormal score set is obtained based on the abnormal scores; Select the first one based on the abnormal score set. q The percentile is used to obtain the abnormal threshold. q The percentile threshold is a hyperparameter used to control rejection sensitivity. It depends only on the order of the data distribution and is not affected by extreme values, thus accurately reflecting the detection results.

[0016] In some embodiments, the pre-trained model further includes a classifier module for non-invasive detection of abnormal energy loads based on anomaly scores. The classifier module operates only during the fine-tuning phase, utilizing the load category labels of known load samples and optimizing the cross-entropy loss using a classification loss function based on the feature vector output by the encoder module. This achieves accurate classification of known loads and improves the detection model's category discrimination capability.

[0017] In some embodiments, the trajectory feature is a VI trajectory feature and the trajectory image is a VI trajectory image. The VI trajectory feature and VI trajectory image have the characteristics of rich information, strong dynamic representation ability, strong anti-interference and strong applicability. They can comprehensively reflect the circuit state, adapt to time-varying systems, and are easy to classify through machine learning or threshold comparison.

[0018] In some embodiments, extracting trajectory features for each load sample based on the load sample set includes: Based on a non-intrusive load monitoring framework, the voltage and current waveforms of the load samples are extracted using load switching events; The VI trajectory features are extracted based on the voltage and current waveforms. Feature extraction is simple and achieves a balance between cost and efficiency.

[0019] Compared with the prior art, the present invention has the following beneficial effects: (1) The non-intrusive load detection method based on self-supervised conditional autoencoder provided by the present invention has the robustness of self-supervised pre-training enhanced features: through image transformation and reconstruction operations, the load general features are learned without labels, so that the features are invariant to the input transformation, thereby improving the characterization and subsequent detection capabilities of abnormal energy loads.

[0020] (2) The non-intrusive load detection method based on self-supervised conditional autoencoder provided by the present invention has two-stage training to meet dual task requirements: the pre-training stage learns generalization features, and the fine-tuning stage combines classification loss and learning loss. This can not only ensure the accuracy of identifying known abnormal energy loads, but also build clear feature boundaries to help distinguish abnormal energy loads.

[0021] (3) The non-intrusive load detection method based on self-supervised conditional autoencoder provided by the present invention is an innovative detection mechanism that is practical and efficient: it sets an abnormal threshold based on feature distance, without the need for additional sample modeling, and judges abnormal energy load by calculating the distance from the sample to the known class center, which has strong generalization and applicability.

[0022] (4) The feature extraction of the non-intrusive load detection method based on self-supervised conditional autoencoder provided by the present invention is adapted to the characteristics of abnormal energy load: taking the VI trajectory image before and after load switching as input, the load electrical behavior pattern is captured, the differentiation of different abnormal energy loads is enhanced, and the abnormal energy load identification needs in complex power consumption scenarios are adapted to the needs of abnormal energy load identification. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating the non-intrusive load detection method based on a self-supervised conditional autoencoder according to the present invention. Figure 2 This is a schematic diagram of a two-stage training non-intrusive load detection method based on a self-supervised conditional autoencoder in an embodiment of the present invention. Detailed Implementation

[0024] This invention aims to solve three major challenges faced by non-intrusive load monitoring: First, classifiers rely on manual design, are sensitive to changes in data distribution, and have limited generalization capabilities across users and scenarios; second, many research methods are based on the "closed set hypothesis," which can lead to insufficient labels for some loads; and third, some methods struggle to identify newly emerging load types when training categories are incomplete.

[0025] To address this, this invention proposes a non-intrusive load detection method based on a self-supervised conditional autoencoder (CAE). This method introduces a self-supervised pre-training strategy to learn general load features with transformation invariance and discriminative properties under label-less conditions. Furthermore, it enhances load detection capabilities through a dual mechanism of reconstruction error and feature space similarity. To clearly illustrate the technical features of this solution, the implementation methods of this application will be described in detail below with reference to the accompanying drawings and embodiments. This will allow for a full understanding and implementation of how this application uses technical means to solve technical problems and achieve corresponding technical effects. The embodiments of this application and the various features within them can be combined with each other without conflict, and the resulting technical solutions are all within the protection scope of this application.

[0026] See Figure 1 This invention proposes a non-intrusive load detection method based on a self-supervised conditional autoencoder, comprising: A non-intrusive load sample set for obtaining abnormal energy consumption loads based on the power system, the load sample set including at least one load sample; and a load category set for the preset load sample set, the load category set including at least one load category; Trajectory features and trajectory images are extracted for each load sample based on the load sample set; Based on the load sample set, a classifier is trained according to trajectory features and load identification is performed; the trajectory features can be regarded as load features in the form of delta, which utilizes the difference between two consecutive snapshots and satisfies the feature additive criterion; Based on the load sample set, the pre-trained model is self-supervised to obtain the reconstructed image set according to the trajectory image and the reconstruction loss function. The reconstruction loss function enables the pre-trained model to learn the potential representation that can restore the original structure from different perspectives, so that the final features are invariant to the input transformation and contain discriminative semantic information. The detection model is obtained by optimizing the pre-trained model based on the load category set, the reconstructed image set, and the overall loss function. The overall loss function is constructed based on the classification loss function and the learning loss function; the overall loss function is: ; In the formula, For the overall loss function, For classification loss function, To adjust the weighting coefficients between classification loss and learning loss, To learn the loss function; The classification loss function is constructed using cross-entropy loss based on the payload class set and the reconstructed image set. This function explicitly drives the encoder to learn feature representations with good class discriminative power, and uses cross-entropy to optimize the classification of the latent representation feature vector output by the encoder. The classification loss function is: ; In the formula, The total number of load samples, This is the load sample number. For the first Classifier weights for each load category, For load category number, This represents the number of load categories, which is the total number of load categories in the load category set. For the first The feature vector of the trajectory image corresponding to each load sample For the first Load category of each load sample For the first The classifier weights for each load sample corresponding to its load category, indicated by the superscript. T Indicates transpose; The learning loss function is constructed using a modified linear operation based on the load category set and the reconstructed image set. Introducing the learning loss function can further improve the feature discrimination between different categories and enhance the robustness of the model to unseen loads. ; In the formula, This represents the ReLU (Rectified Linear Unit) operation. For the first Each load sample corresponds to a feature center of the load category. For the first Characteristic centers of each load category For load category number, The preset interval threshold hyperparameter is used to control the lower bound of class separation; the learning loss function encourages samples of the same load class to cluster near the corresponding center, while moving away from the center of other load classes, thereby constructing clear feature boundaries, which is beneficial for the subsequent identification of unknown load classes.

[0027] The overall loss function combines the classification loss function and the learning loss function. This joint optimization strategy not only ensures a high recognition rate for known loads, but also constructs clear inter-class boundaries in the feature space, providing a separable geometric basis for subsequent load detection.

[0028] The detection model obtained after optimization and fine-tuning retains the transformation invariance features learned by CAE in the pre-training stage, i.e., self-supervised training, and has strong discriminative ability and load exclusion ability. Based on anomaly scores, a detection model is used to perform non-invasive detection of abnormal energy loads; no additional load samples are required to complete the modeling of categories, which has good generalization and practical applicability.

[0029] In some embodiments, a reconstructed image set is obtained by self-supervised training of a pre-trained model based on a load sample set, trajectory images, and a reconstruction loss function. The image transformation category is preset, including one or more combinations of rotation, flip, and scaling operations. Preferably, in this embodiment, the image transformation is selected as rotation, and different preset rotation angles are set. M Image transformation categories, M The total number of image transformation categories, such as rotation. , , and wait; In the pre-trained model, an initial transformation function, an initial extraction function, and an initial reconstruction function are constructed respectively. The initial transformation function is constructed based on the trajectory image, the initial extraction function is constructed based on the initial transformation function, and the initial reconstruction function is constructed based on the initial extraction function. A reconstruction loss function is constructed based on image transformation category, trajectory image, and reconstruction function; Based on the load sample set, the pre-trained model is self-supervised to obtain the optimized transformation function, optimized extraction function and optimized reconstruction function according to the reconstruction loss function; Based on the load sample set, at least one image transformation operation is performed on each trajectory image according to the optimized transformation function to obtain an intermediate image set. The intermediate image set includes at least one intermediate image. The trajectory image is obtained by performing an image transformation operation according to the optimized transformation function to obtain the intermediate image. Extract the feature vector of each intermediate image according to the optimized extraction function; The reconstructed image is obtained by reconstructing the feature vectors using an optimized reconstruction function. Obtain a set of reconstructed images based on the reconstructed images.

[0030] This stage is the supervised pre-training stage, which learns the discriminative and generalizable representation of the payload through image transformation and reconstruction operations, thereby enhancing the detection capability of the pre-trained model or the final detection model for unseen payloads. Taking the trajectory feature as VI trajectory feature and the trajectory image as VI trajectory image as an example: In a CAE structure, the input is a VI trajectory image. , ,in, For the set of real numbers, C This indicates the number of channels in the VI trajectory image, corresponding to the number of load categories. W Indicates the width of the VI trajectory image. H Indicates the height of the VI trajectory image; First, the VI trajectory image A set of intermediate images is obtained by performing at least one image transformation operation. , among which, VI trajectory image via the first Intermediate image obtained by a certain image transformation operation. t Indicates the sequence number of the image transformation operation. Indicates the first Image transformation operations; Secondly, feature vectors for each intermediate image are extracted using the optimized extraction function. , ,in, The VI trajectory image represents the path taken by the first... Feature vectors after image transformation operations This indicates an optimized extraction function; Then, the feature vectors are reconstructed using the optimized reconstruction function to obtain the reconstructed image. ,in, The VI trajectory image represents the path taken by the first... The reconstructed image after a certain image transformation operation This indicates an optimized refactoring function. To enable the pre-trained model to learn load-related features that strongly generalize to image transformation operations, this embodiment designs an inverse transformation reconstruction loss, that is, using the original untransformed VI trajectory image as the reconstruction target, and constructs a reconstruction loss function: ; In the formula, To reconstruct the loss function, M This represents the total number of image transformation categories.

[0031] In some embodiments, the pre-trained model includes an input transformation module, an encoder module, and a decoder module; The input transformation module is used to construct the initial transformation function, and to obtain an intermediate image set by performing at least one image transformation operation on each trajectory image based on the load sample set and the optimized transformation function. The function of the input transformation module is to perform various image transformation operations such as rotation on the VI trajectory image of the load sample to generate the transformed image, i.e., the intermediate image, which provides diverse inputs for self-supervised pre-training and helps the pre-trained model learn the transformation-invariant load features. The encoder module is used to construct the initial extraction function and to extract the feature vector of each intermediate image according to the optimized extraction function. The function of the encoder module is to extract the feature vector of the transformed image in the pre-training stage and retain the pre-training parameters in the fine-tuning stage to continue to output the load feature representation, providing key feature support for the decoder module to reconstruct the image, the classifier module to classify, and the non-invasive detection of abnormal energy load. The decoder module is used to construct the initial reconstruction function and to reconstruct the feature vectors based on the optimized reconstruction function to obtain the reconstructed image. The decoder module receives the feature vectors output by the encoder module during the pre-training phase, reconstructs them into the original, untransformed VI trajectory image, and assists the encoder module in learning more robust and discriminative load-related features by minimizing the reconstruction error.

[0032] In some embodiments, the steps for obtaining anomaly scores are as follows: Calculate the cluster centers of load categories corresponding to abnormal energy consumption loads in the feature space; Calculate the Euclidean distance from the abnormal energy load to each cluster center based on the cluster centers and eigenvectors; The anomaly score for abnormal energy load is obtained by taking the minimum value of the Euclidean distance. The anomaly score is: ; In the formula, for Abnormal scores, To minimize the function, For feature vectors, For the first Characteristic centers of each load category For load category number, For load category set; In some embodiments, non-invasive detection of abnormal energy loads based on anomaly scores and employing a detection model includes: Set an abnormal threshold; When the anomaly score is not greater than the anomaly threshold, the load category of the abnormal energy load is obtained based on the cluster center corresponding to the minimum Euclidean distance: ; In the formula, For load category, This is the abnormal threshold. min represents the load category that minimizes the anomaly score.

[0033] In some embodiments, setting an anomaly threshold includes: Obtain the anomaly score for each load sample in the load sample set; Obtain the abnormal score set based on the abnormal scores; Select the first one based on the anomaly score set. q Percentiles are used to obtain the abnormal threshold. q The hyperparameters for controlling the rejection sensitivity are: ; In the formula, Indicates the first q Percentile, usually q Set to 95. For the first One load sample.

[0034] In some embodiments, the pre-trained model further includes a classifier module for non-invasive detection of abnormal energy loads based on anomaly scores. The classifier module operates only during the fine-tuning phase, utilizing the load category labels of known load samples and optimizing the cross-entropy loss using a classification loss function based on the feature vector output by the encoder module. This achieves accurate classification of known loads and improves the detection model's category discrimination capability.

[0035] In some embodiments, extracting trajectory features for each load sample based on the load sample set includes: Based on a non-intrusive load monitoring framework, the voltage and current waveforms of load samples are extracted using load switching events; VI trajectory features are extracted based on voltage and current waveforms.

[0036] In the NILM framework, the voltage and current waveforms of a load can be extracted by utilizing the changes in voltage and total current before and after a load switching event, thereby extracting its load characteristics. In this embodiment, the load characteristics are VI trajectory features, and a classifier is trained to identify the load. The extraction process for the voltage and current of the event load is as follows: ; ; In the formula, The voltage waveform of the event load. The voltage waveform at the back end is a change in load condition. The voltage waveform at the front end of the load condition change. The current waveform of the event load. This is the total current waveform after the load condition changes. The waveform of the total current before the load condition changes; The VI trajectory characteristics of the load sample can be extracted from the voltage and current waveforms of the event load. The VI trajectory characteristics of the load sample can be regarded as a delta-form load characteristic, which utilizes the difference between two consecutive snapshots and satisfies the feature additive criterion.

[0037] To address the heterogeneity of label spaces in training and testing data for the NILM task, this invention proposes a non-intrusive load detection method based on a self-supervised conditional autoencoder. This method employs a two-stage training process to effectively distinguish different categories within the load feature space. The training process includes two core steps: (1) In the pre-training stage, the conditional autoencoder is used to perform self-supervised modeling of the VI trajectory images of all load samples to learn a general load representation with transformation invariance.

[0038] (2) In the fine-tuning stage, classification loss function and learning loss function are introduced to perform supervised optimization of the detection model, further enhancing the ability to distinguish known loads and constructing feature boundaries that help distinguish loads.

[0039] A two-stage training method for non-invasive load detection based on self-supervised conditional autoencoders, such as... Figure 2 As shown: Figure 2 In the middle, decoder represents the decoder module, encoder represents the encoder module, and classifier represents the classifier module; To comprehensively evaluate the performance of the detection model proposed in this invention in known load identification and load detection tasks, the F1 score is used as one of the main evaluation metrics in this embodiment. The F1 score is the harmonic mean of precision and recall, which can comprehensively reflect the accuracy and coverage of the detection model in positive class identification, and is especially suitable for scenarios with imbalanced sample distribution or containing classes.

[0040] In the experiment, F1 scores were calculated for both known categories and rejected workloads, and the average score was used as a measure of overall performance. The calculation formula is as follows: ; ; ; In the formula, for This represents the number of samples that were correctly classified or correctly rejected. for This represents the number of samples that were misclassified or falsely rejected. for , representing the number of positive samples that were missed; This indicates how many of the predicted positive classes are actually positive. This indicates how many of the actual positive classes were correctly identified; To evaluate the effectiveness of this invention in non-invasive monitoring of abnormal energy loads, two public high-frequency sub-meter current and voltage signal datasets were used to test the proposed model: the PLAID dataset released in 2017. The PLAID dataset contains short-circuit current and voltage measurements of different household loads in Pittsburgh, Pennsylvania, USA. The 2017 dataset contains measurement data for over 82 different load instances, representing 11 load categories across 9 households, and 1793 records acquired at a 30 kHz sampling rate.

[0041] On the PLAID dataset, air conditioners, heaters, microwave ovens, vacuum cleaners, and washing machines were selected as loads. Under the experimental setting of using five loads (air conditioners, heaters, microwave ovens, vacuum cleaners, and washing machines) as load categories in sequence, this invention achieved high recognition performance for known loads in various test scenarios. The experimental results are shown in Table 1.

[0042] Table 1 shows the F1 scores of the proposed method for unknown device detection on the PLAID dataset. The experimental results on multiple public datasets show that the proposed method outperforms existing mainstream methods in terms of classification accuracy and load detection performance, and has good generalization ability and practical application potential.

[0043] Finally, it should be noted that the above content is only used to illustrate the technical solution of the present invention, and is not intended to limit the scope of protection of the present invention. Simple modifications or equivalent substitutions made by those skilled in the art to the technical solution of the present invention do not depart from the essence and scope of the technical solution of the present invention.

Claims

1. A method for non-intrusive load detection based on self-supervised conditional autoencoder, characterized in that, The method comprises the following steps: acquiring an abnormal energy consumption load based on a power system to obtain a non-intrusive load sample set, the load sample set comprising at least one load sample; presetting a load category set of the load sample set, the load category set comprising at least one load category; extracting a trajectory feature and a trajectory image of each load sample based on the load sample set; training a classifier based on the load sample set according to the trajectory feature and performing load identification; performing self-supervised training on a pre-trained model based on the load sample set according to the trajectory image and a reconstruction loss function to obtain a reconstructed image set; performing optimization training on the pre-trained model based on the load category set, the reconstructed image set and an overall loss function to obtain a detection model; performing non-intrusive detection on the abnormal energy consumption load based on an abnormal score and the detection model; the overall loss function is constructed based on a classification loss function and a learning loss function; the classification loss function is constructed based on the load category set and the reconstructed image set by using a cross-entropy loss; the learning loss function is constructed based on the load category set and the reconstructed image set by using a modified linear operation.

2. The self-supervised condition autoencoder based non-intrusive load detection method according to claim 1, characterized in that, performing self-supervised training on a pre-trained model based on the load sample set according to the trajectory image and a reconstruction loss function to obtain the reconstructed image set: presetting an image transformation category; constructing an initial transformation function, an initial extraction function and an initial reconstruction function in the pre-trained model, constructing the initial transformation function based on the trajectory image, constructing the initial extraction function based on the initial transformation function, and constructing the initial reconstruction function based on the initial extraction function; constructing the reconstruction loss function based on the image transformation category, the trajectory image and the reconstruction function; performing self-supervised training on the pre-trained model based on the load sample set according to the reconstruction loss function to obtain an optimized transformation function, an optimized extraction function and an optimized reconstruction function; performing at least one image transformation operation on each trajectory image based on the load sample set according to the optimized transformation function to obtain an intermediate image set, the intermediate image set comprising at least one intermediate image, and the trajectory image being transformed according to the optimized transformation function to obtain the intermediate image; extracting a feature vector of each intermediate image according to the optimized extraction function; performing a reconstruction operation on the feature vector to obtain a reconstructed image according to the optimized reconstruction function; obtaining the reconstructed image set according to the reconstructed image.

3. The self-supervised condition autoencoder-based non-intrusive load detection method of claim 2, wherein, The pre-trained model comprises an input conversion module, an encoder module and a decoder module; the input conversion module is used to construct the initial transformation function and perform at least one image transformation operation on each trajectory image based on the load sample set according to the optimized transformation function to obtain an intermediate image set; the encoder module is used to construct the initial extraction function and extract a feature vector of each intermediate image according to the optimized extraction function; the decoder module is used to construct the initial reconstruction function and perform a reconstruction operation on the feature vector to obtain a reconstructed image according to the optimized reconstruction function.

4. The self-supervised condition autoencoder based non-intrusive load detection method of claim 2, wherein, The image transformation operation at least comprises a rotation operation.

5. The self-supervised condition autoencoder based non-intrusive load detection method of claim 3, wherein, The steps to obtain the anomaly score are as follows: Calculate the cluster center of the load category corresponding to the abnormal energy load in the feature space; Calculate the Euclidean distance from the abnormal energy load to each cluster center based on the cluster centers and the feature vectors; The abnormal score of the abnormal energy load is obtained by taking the minimum value of the Euclidean distance.

6. The self-supervised condition autoencoder based non-intrusive load detection method of claim 5, wherein, The non-invasive detection of abnormal energy loads based on anomaly scores and using the aforementioned detection model includes: Set an abnormal threshold; When the anomaly score is not greater than the anomaly threshold, the load category of the abnormal energy load is obtained according to the cluster center corresponding to the minimum value of the Euclidean distance.

7. The self-supervised condition autoencoder-based non-intrusive load detection method of claim 6, wherein, Setting the abnormal threshold includes: Obtain the anomaly score for each load sample in the load sample set; An abnormal score set is obtained based on the abnormal scores; selecting a first threshold from the set of anomaly scores q obtaining the anomaly threshold from the percentile, q is a hyperparameter to control the false rejection sensitivity.

8. The self-supervised condition autoencoder based non-intrusive load detection method of claim 6, wherein, The pre-trained model also includes a classifier module, which is used to perform non-invasive detection of the abnormal energy load based on the anomaly score.

9. The self-supervised condition autoencoder-based non-intrusive load detection method according to any of claims 1-8, characterized in that, The trajectory feature is a VI trajectory feature, and the trajectory image is a VI trajectory image.

10. The self-supervised condition autoencoder based non-intrusive load detection method of claim 9, wherein, The trajectory features extracted for each load sample based on the load sample set include: Based on a non-intrusive load monitoring framework, the voltage and current waveforms of the load samples are extracted using load switching events; The VI trajectory features are extracted based on the voltage and current waveforms.

Citation Information

Patent Citations

  • Non-intrusive abnormal load behavior monitoring method, electronic equipment and storage medium

    CN115423128A

  • Few-label NILM method based on time sequence power data enhancement and comparative learning

    CN118798266A

  • Non-intrusive load identification method and system based on hybrid supervised learning

    CN119006955A

  • Non-intrusive load monitoring method and device, terminal and storage medium

    CN119516333A

  • Extraction of instantaneous renewable generation from net load measurements of power distribution systems

    US20230307908A1