A non-intrusive load monitoring method based on an improved factor hidden Markov model

By using an improved factor hidden Markov model, combined with DBSCAN and convex optimization relaxation techniques, the problems of inaccurate determination of electrical state and high computational complexity in traditional methods are solved, and adaptive determination of electrical state and efficient load decomposition are achieved.

CN122241276APending Publication Date: 2026-06-19STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
Filing Date
2026-02-10
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing non-intrusive load monitoring methods, traditional clustering algorithms are difficult to adaptively determine the number of electrical appliance states and have poor noise resistance. Standard factor Hidden Markov Models have exponentially increasing computational complexity in multi-device scenarios, resulting in low accuracy and efficiency of load decomposition.

Method used

The density-based noisy applied spatial clustering algorithm (DBSCAN) is used to adaptively determine the number of electrical appliance operating states and power characteristics. An improved factor hidden Markov model is constructed by combining the additive assumption. The joint state inference problem is decomposed into independent marginal distribution estimation by convex optimization relaxation technique, and the problem is solved iteratively by alternating minimization algorithm.

🎯Benefits of technology

It achieves adaptive determination of the number of electrical operating states and noise filtering, reduces computational complexity from exponential to polynomial level, improves the accuracy and efficiency of load decomposition, and is suitable for real-time monitoring systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122241276A_ABST
    Figure CN122241276A_ABST
Patent Text Reader

Abstract

This invention discloses a non-intrusive load monitoring method based on an improved factor hidden Markov model. The steps are as follows: acquiring the total load power data of the environment to be monitored and the historical power training data of each electrical appliance to be monitored; using a density-based noisy applied spatial clustering algorithm to perform cluster analysis on the historical power training data to determine the number of operating states of each appliance and the corresponding power characteristic parameters; constructing a factor hidden Markov model using the additive assumption; transforming the joint state inference problem of the factor hidden Markov model into a convex optimization problem using convex optimization relaxation techniques to form an improved factor hidden Markov model; and iteratively solving the convex optimization problem using an alternating minimization algorithm to obtain the optimal state sequence of each appliance. This non-intrusive load monitoring method significantly improves the computational efficiency of the algorithm while ensuring the accuracy of load decomposition, making it potentially applicable in real-time monitoring systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system load monitoring and management technology, specifically a non-intrusive load monitoring method based on an improved factor hidden Markov model. Background Technology

[0002] With the global energy crisis and the advancement of the "carbon peaking and carbon neutrality" strategic goals, improving energy efficiency and achieving refined energy management have become key issues in building a sustainable society. Against this backdrop, smart grids and smart home systems have received widespread attention, and the importance of Non-Intrusive Load Monitoring (NILM) technology, as a core supporting technology, is increasingly prominent. NILM technology analyzes total voltage and current signals by installing a single monitoring device at the power inlet, using algorithms to identify the operating status and energy consumption of each electrical appliance within the load. Compared to traditional invasive monitoring (i.e., installing sensors for each appliance), NILM has significant advantages such as low installation and maintenance costs, no disruption to users' lives, and protection of user privacy, making it widely applicable in residential electricity consumption analysis, energy efficiency management, and demand-side response.

[0003] In non-intrusive load monitoring (NILM) research, load disaggregation is a core task. Current NILM algorithms are mainly divided into two categories: event-based and state-based. State-based methods typically treat load disaggregation as a combinatorial optimization problem, using mathematical models to infer the operating state of each appliance at different times. To handle noise interference and uncertainties in equipment operation in real-world environments, probabilistic graphical models are widely used, with Factor Hidden Markov Models (FHMMs) being one of the mainstream methods in this field. FHMMs treat the total load as a superposition of multiple independent appliance HMMs, effectively describing scenarios with multiple devices operating concurrently.

[0004] However, despite its theoretical advantages, FHMM still faces significant challenges in practical applications, primarily in two areas: model parameter acquisition and state inference efficiency.

[0005] First, in the model building phase, accurately obtaining the discrete states of each appliance (such as "cooling," "defrosting," and "off" of a refrigerator) and their power characteristics is fundamental to the algorithm. Existing technologies typically use the K-means clustering algorithm to process historical power data to extract state features. While the K-means algorithm is simple and easy to use, it requires pre-setting the number of clusters (K value) and is sensitive to the initial centroids. In real-world home environments, the number of operating states for different types of appliances (such as simple on / off appliances and complex finite state machine (FSM) appliances) varies greatly and is difficult to predict. Forcing a uniform K value often leads to inaccurate clustering, failing to accurately reflect the appliance's operating mode. Furthermore, the K-means algorithm is poorly robust to noisy data, easily misclassifying abnormal power points as normal states, thus affecting the accuracy of subsequent decomposition.

[0006] Secondly, in the state inference phase, the standard FHMM algorithm faces an "exponential explosion" problem in computational complexity. Since FHMM needs to find the optimal state sequence in the joint state space, the dimension of the joint state space grows exponentially (KN, where K is the number of states and N is the number of devices) as the number of connected devices increases. This leads to a sharp increase in computational cost when using traditional exact inference algorithms (such as the Viterbi algorithm), making it difficult to apply in embedded devices with limited computing resources or in scenarios with high real-time requirements. Although some studies have attempted to reduce complexity by decreasing the number of devices or simplifying the model, this often comes at the cost of sacrificing recognition accuracy.

[0007] Therefore, how to design a non-intrusive load monitoring method that can adaptively determine the state characteristics of electrical appliances, resist noise interference, and effectively reduce computational complexity to adapt to multi-electrical appliance scenarios has become a technical challenge that urgently needs to be solved in this field. Summary of the Invention

[0008] The purpose of this invention is to address the problems in existing non-intrusive load monitoring methods, such as the difficulty of traditional clustering algorithms in adaptively determining the number of electrical states and poor noise resistance, and the exponential increase in computational complexity of standard factor Hidden Markov Models when dealing with multiple devices. This invention provides a non-intrusive load monitoring method based on an improved factor Hidden Markov Model.

[0009] The objective of this invention is achieved through the following technical solution:

[0010] A non-intrusive load monitoring method based on an improved factor hidden Markov model is proposed, and the steps of the load monitoring method are as follows:

[0011] S1. Obtain the total load power data of the environment to be monitored and the historical power training data of each electrical appliance to be monitored;

[0012] S2. A density-based spatial clustering algorithm with noise is used to perform cluster analysis on the historical power training data, adaptively determining the number of operating states of each electrical appliance and the corresponding power characteristic parameters, and filtering out noise data.

[0013] S3. Based on the number of operating states of each electrical appliance and the corresponding power characteristic parameters, a factor hidden Markov model is constructed using the additive assumption, in which the observed value of the total load is modeled as the sum of the observed values ​​of each electrical appliance at the same time.

[0014] S4. Using convex optimization relaxation techniques, the joint state inference problem of the factor hidden Markov model is transformed into a convex optimization problem, and the joint state inference is decomposed into independent marginal distribution estimates to form an improved factor hidden Markov model.

[0015] S5. The alternating minimization algorithm is used to iteratively solve the convex optimization problem presented by the improved factor hidden Markov model to obtain the optimal state sequence of each electrical appliance, and the power consumption curve of each electrical appliance is decomposed accordingly.

[0016] Step S1 specifically includes:

[0017] S11. Collect time series data of total active power at the power inlet of the environment to be monitored using non-intrusive monitoring equipment;

[0018] S12. Obtain the independent active power data of each monitored electrical appliance under different working modes as historical power training data, wherein the historical power training data covers the complete operating cycle of each monitored electrical appliance.

[0019] Step S2 specifically includes:

[0020] S21. Map the historical power training data to the data space;

[0021] S22, Set neighborhood radius and the minimum number of points in the neighborhood threshold ;

[0022] S23. Traverse the data points in the data space provided in step S21, based on the neighborhood radius provided in step S22. and the minimum number of points in the neighborhood threshold Identify core points, boundary points, and noise points;

[0023] S24. The density-connected core points and boundary points are divided into the same cluster. Each cluster corresponds to an operating state of the electrical appliance. The final number of clusters is the number of operating states of each electrical appliance. The center value of the cluster is used as the power characteristic parameter of the operating state. The identified noise points are removed and do not participate in the subsequent model construction.

[0024] In step S24, the cluster center value refers to the power mean of all data points within the cluster, and the power standard deviation of all data points within the cluster is calculated as the fluctuation characteristic of this operating state.

[0025] The factorial hidden Markov model constructed using the additive assumption in step S3 must satisfy the following conditions:

[0026] (1) State independence: It is assumed that the state transition process of each electrical appliance is independent of each other, and the joint state transition probability of the system is the product of the independent state transition probabilities of each electrical appliance;

[0027] (2) Observation superposition: The observed emission probability of the total load follows a Gaussian distribution, with its mean being the sum of the power mean of each electrical appliance in its current operating state and its variance being the sum of the power variance of each electrical appliance in its current operating state.

[0028] The specific method for constructing the factor hidden Markov model using the additive assumption in step S3 is as follows:

[0029] S31. Constructing independent Markov chains for single electrical appliances: For the first... An electrical appliance, its implicit state sequence It is modeled as an Independent Hidden Markov Model (HMM), which contains three core elements: the state transition probability matrix. Observation of launch probability and initial state distribution They are respectively:

[0030] The state transition probability matrix describes the evolution of the internal physical states of an electrical appliance. Defined as:

[0031]

[0032] In the formula: , Index representing the discrete operating states of electrical appliances;

[0033] Observational launch probability Describes the probability of an electrical appliance producing a power observation value under a specific operating state; the probability of observed emission. Defined as:

[0034]

[0035] In the formula: and These are respectively related to the running status The associated power mean and variance;

[0036] Initial state distribution The probabilities of the system being in each possible operating state at the initial moment are given;

[0037] Then the first Each electrical appliance is modeled as an independent set of parameters. ;

[0038] S32, will Independent Hidden Markov Models (HMMs) of individual electrical appliances are combined in parallel to construct Factor Hidden Markov Models (FHMMs). The core of the Factor Hidden Markov Model lies in expanding the system's state space into a Cartesian product of the operating states of all electrical appliances. The joint operating state vector of the system at time t is Based on the assumption of independence of operating state transitions, that is, the switching operations of each electrical appliance do not affect each other, the operating state transition probability of the system during joint operation is the product of the operating state transition probabilities of each independent electrical appliance:

[0039]

[0040] In order to establish a joint operational status Compared with total load observations The relationship between them is assumed to be additive, and the total load observations are used. The observed emission probability is modeled as a joint Gaussian distribution, with mean and variance being the sum of the parameters of each component:

[0041] .

[0042] Step S4 specifically includes:

[0043] S41. By introducing slack variables, the original maximum a posteriori probability estimation problem in discrete state space is relaxed into a semidefinite programming or second-order cone programming problem in continuous space.

[0044] S42. Define decision variables, which include at least the operating state transition matrix variable and the operating state probability vector variable for each electrical appliance;

[0045] S43. Construct the objective function and constraints, and minimize the error between the predicted total power and the actual observed total power under the constraints.

[0046] S44. By introducing slack variables, the discrete integer state constraints in the original problem are relaxed into continuous probabilistic simplex constraints, thereby transforming the non-convex combinatorial optimization problem into a semidefinite programming (SDP) or second-order cone programming (SOCP) problem, forming an improved factor hidden Markov model.

[0047] This transformation reduces the computational complexity of joint operating status inference from an exponential growth rate with the number of electrical appliances to a polynomial growth rate.

[0048] Step S5 specifically includes:

[0049] S51. Initialize the parameters of the improved factor hidden Markov model;

[0050] S52. Under the premise of fixing the noise variance parameter, use a convex optimization solver to solve the operating state probability vector of each electrical appliance and update the operating state transition matrix variable of each electrical appliance.

[0051] S53. Under the premise of fixing the operating state probability vector, update the noise variance parameter using the least squares method;

[0052] S54. Alternately execute steps S52 and S53 until the parameters of the improved factor hidden Markov model converge or the preset number of iterations is reached, and output the final optimal state sequence of the electrical appliance.

[0053] The present invention has the following advantages over the prior art:

[0054] This invention proposes a non-intrusive load monitoring method based on an improved factor hidden Markov model. First, it processes historical power data of electrical appliances using a density-based noisy applied spatial clustering algorithm (DBSCAN), achieving adaptive determination of the number of operating states of electrical appliances and noise filtering, overcoming the shortcomings of the traditional K-means algorithm, which requires a preset K value and has poor noise resistance. Second, addressing the problem of exponential growth (i.e., state explosion) of the joint state space in the standard FHMM model under multi-electrical appliance scenarios, it utilizes convex optimization relaxation techniques to decompose the complex joint state inference problem into independent marginal distribution estimation problems, successfully reducing the computational complexity from exponential to polynomial. Finally, it iteratively solving the relaxed convex optimization problem using an alternating minimization algorithm significantly improves the computational efficiency of the algorithm while maintaining the accuracy of load decomposition, making it potential for application in real-time monitoring systems. Attached Figure Description

[0055] Appendix Figure 1 A flowchart of a non-intrusive load monitoring method based on an improved factor hidden Markov model provided by the present invention;

[0056] Appendix Figure 2 A flowchart of density-based spatial clustering for noisy applications;

[0057] Appendix Figure 3 The original power waveform representing the clustering effect;

[0058] Appendix Figure 4 A scatter plot showing the power distribution of the clustering results;

[0059] Appendix Figure 5This demonstrates the clustering results of the traditional K-means algorithm;

[0060] Appendix Figure 6 To demonstrate the clustering results of the DBSCAN algorithm used in this invention;

[0061] Appendix Figure 7 This is a schematic diagram of the independent Markov chain used in this invention;

[0062] Appendix Figure 8 This is a schematic diagram of the factor hidden Markov model used in this invention. Detailed Implementation

[0063] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that the invention will be thorough and complete, and the concept of the exemplary embodiments will be fully conveyed to those skilled in the art. The same reference numerals in the drawings denote the same or similar structures, and therefore their detailed description will be omitted.

[0064] The terms “a,” “one,” “the,” and “the” are used to indicate the existence of one or more elements / components / etc.; the terms “including” and “having” are used to indicate an open-ended meaning of inclusion and that other elements / components / etc. may exist in addition to the listed elements / components / etc.

[0065] This invention provides a non-invasive load monitoring method based on an improved factor hidden Markov model. For an overview of the overall process, please refer to [link / reference needed]. Figure 1 The steps of this load monitoring method are as follows:

[0066] S1. Obtain the total load power data of the environment to be monitored and the historical power training data of each electrical appliance to be monitored;

[0067] S11. Collect time series data of total active power at the power inlet of the environment to be monitored using non-intrusive monitoring equipment;

[0068] S12. Obtain the independent active power data of each electrical appliance under different working modes as historical power training data, wherein the historical power training data covers the complete operating cycle of each electrical appliance under monitoring.

[0069] S2. A density-based spatial clustering algorithm with noise is used to perform cluster analysis on the historical power training data, adaptively determining the number of operating states of each electrical appliance and the corresponding power characteristic parameters, and filtering out noise data.

[0070] S21. Map the historical power training data to the data space;

[0071] S22, Set neighborhood radius and the minimum number of points in the neighborhood threshold ;

[0072] S23. Traverse the data points in the data space provided in step S21, based on the neighborhood radius provided in step S22. and the minimum number of points in the neighborhood threshold Identify core points, boundary points, and noise points;

[0073] S24. The density-connected core points and boundary points are divided into the same cluster. Each cluster corresponds to an operating state of the electrical appliance. The number of clusters generated is the number of operating states of each electrical appliance. The center value of the cluster is used as the power characteristic parameter of the operating state (the center value of the cluster refers to the power mean of all data points in the cluster, and the power standard deviation of all data points in the cluster is calculated as the fluctuation characteristic of the operating state). The identified noise points are removed and do not participate in the subsequent model construction.

[0074] S3. Based on the number of operating states of each electrical appliance and the corresponding power characteristic parameters, a factor hidden Markov model is constructed using the additive assumption, in which the observed value of the total load is modeled as the sum of the observed values ​​of each electrical appliance at the same time.

[0075] To construct a factorial Hidden Markov Model using the additive assumption, the following conditions must be met:

[0076] (1) State independence: It is assumed that the state transition process of each electrical appliance is independent of each other, and the joint state transition probability of the system is the product of the independent state transition probabilities of each electrical appliance;

[0077] (2) Observation superposition: The observed emission probability of the total load follows a Gaussian distribution, with its mean being the sum of the power mean of each electrical appliance in its current operating state and its variance being the sum of the power variance of each electrical appliance in its current operating state.

[0078] S4. Using convex optimization relaxation techniques, the joint state inference problem of the factor hidden Markov model is transformed into a convex optimization problem, and the joint state inference is decomposed into independent marginal distribution estimates.

[0079] S41. By introducing slack variables, the original maximum a posteriori probability estimation problem in discrete state space is relaxed into a semidefinite programming or second-order cone programming problem in continuous space.

[0080] S42. Define decision variables, which include at least the operating state transition matrix variable and the operating state probability vector variable for each electrical appliance;

[0081] S43. Construct the objective function and constraints, and minimize the error between the predicted total power and the actual observed total power under the constraints.

[0082] S44. By introducing slack variables, the discrete integer state constraints in the original problem are relaxed into continuous probabilistic simplex constraints, thereby transforming the non-convex combinatorial optimization problem into a semidefinite programming (SDP) or second-order cone programming (SOCP) problem. This transformation reduces the computational complexity of joint operating state inference from an exponential growth with the number of electrical appliances to a polynomial growth, forming an improved factor hidden Markov model.

[0083] S5. The alternating minimization algorithm is used to iteratively solve the convex optimization problem to obtain the optimal state sequence of each electrical appliance, and the power consumption curve of each electrical appliance is decomposed accordingly.

[0084] S51. Initialize the parameters of the improved factor hidden Markov model;

[0085] S52. Under the premise of fixing the noise variance parameter, use a convex optimization solver to solve the operating state probability vector of each electrical appliance and update the operating state transition matrix variable of each electrical appliance.

[0086] S53. Under the premise of fixing the operating state probability vector, update the noise variance parameter using the least squares method;

[0087] S54. Alternately execute steps S52 and S53 until the parameters of the improved factor hidden Markov model converge or the preset number of iterations is reached, and output the final optimal state sequence of the electrical appliance.

[0088] Example

[0089] A non-intrusive load monitoring method based on an improved factor hidden Markov model is proposed, and the steps of the load monitoring method are as follows:

[0090] S1. Obtain the total load power data of the environment to be monitored and the historical power training data of each electrical appliance to be monitored;

[0091] S11. Total Load Data Acquisition: Total active power time series data is acquired through non-intrusive monitoring equipment (such as smart meters or high-frequency acquisition cards) installed at the user's power inlet. The total active power time series data is denoted as... ,in Indicates the first Power readings at each time step The total length of the total active power time series; in this embodiment, a subset of the IAWE dataset is selected as the test object, and its sampling frequency is sufficient to capture the changes in the operating status of home appliances;

[0092] S12. Acquisition of Historical Power Training Data for Electrical Appliances: In order to build an independent model for each electrical appliance, it is necessary to acquire the historical active power data of each appliance under independent operating conditions. In this embodiment, five typical high-energy-consuming appliances in the home are selected as monitoring targets: refrigerator, air conditioner, washing machine, computer and television. Data spanning from July 1 to July 15, 2025 is selected as the training set, and data from July 16, 2025 to July 30, 2023 is selected as the test set.

[0093] S2. A density-based spatial clustering algorithm with noise is used to perform cluster analysis on the historical power training data, adaptively determining the number of operating states of each electrical appliance and the corresponding power characteristic parameters, and filtering out noise data.

[0094] The density-based spatial clustering of applications with noise (DBSCAN) algorithm is used to process the historical power training data of each appliance obtained in step S1, such as... Figure 2 As shown, there are three sub-steps:

[0095] (1) Data mapping and parameter setting: The first The power data of each appliance is mapped to a one-dimensional feature space, and two key parameters are set: neighborhood radius. and the minimum number of points in the neighborhood threshold In this embodiment, parameters are optimized using a grid search; for air conditioning equipment with large power fluctuations and complex states, the following settings are configured: ,set up This setting can effectively distinguish the power difference of the air conditioner compressor under different cooling intensities, while ignoring instantaneous voltage fluctuations.

[0096] (2) Identification of core points and boundary points: Traversing any data point in the data space Calculate its in The neighborhood density within the radius is used to classify data points into three categories based on their density attributes:

[0097] Core Point: If a point In its Within the neighborhood, possessing no less than If there are 1 point, then As a core point;

[0098] Border Point: If a point It's not the core point, but it falls on a certain core point. of Within the neighborhood, it is called Let it be a boundary point;

[0099] Noise Point: A point that is neither a core point nor a boundary point is called a noise point.

[0100] Cluster formation and state parameter extraction: The algorithm forms clusters by connecting density-connected core points and their boundary points. The number of clusters generated is the number of clusters for the electrical appliance. The number of adaptively determined running states is denoted as For the first Clusters The power mean of all data points within the cluster is calculated as the power characteristic parameter for that state. The standard deviation is calculated as the fluctuation characteristic of this state. .

[0101] like Figures 3-6 As shown in the DBSCAN clustering result, this embodiment successfully clustered the power data of the air conditioner into 5 discrete operating states (corresponding to different power levels) and automatically identified and removed noise points that did not meet the density requirements. In contrast, the traditional K=2 setting cannot cover these intermediate states, proving the adaptability of this method.

[0102] S3. Based on the number of operating states of each electrical appliance and the corresponding power characteristic parameters, a factor hidden Markov model is constructed using the additive assumption. The observed total load is modeled as the sum of the observed values ​​of each electrical appliance at the same time, specifically:

[0103] S31, such as Figure 7 As shown, firstly, an independent Markov chain is constructed for each individual electrical appliance. For the th... An electrical appliance, its implicit state sequence It is modeled as an Independent Hidden Markov Model (HMM), which contains three core elements: the state transition probability matrix. Observation of launch probability and initial state distribution They are respectively:

[0104] The state transition probability matrix describes the evolution of the internal physical states of an electrical appliance. Defined as:

[0105]

[0106] In the formula: , Index representing the discrete operating states of electrical appliances;

[0107] Observational launch probability Describes the probability of an electrical appliance producing a power observation value under a specific operating state; the probability of observed emission. Defined as:

[0108]

[0109] In the formula: and These are respectively related to the running status The associated power mean and variance;

[0110] Initial state distribution The probabilities of the system being in each possible operating state at the initial moment are given;

[0111] Then the first Each electrical appliance is modeled as an independent set of parameters. ;

[0112] S32, Secondly, such as Figure 8 As shown, a factor hidden Markov model is constructed for multiple electrical appliances:

[0113] In real-world scenarios, multiple electrical appliances operate simultaneously, Independent Hidden Markov Models (HMMs) of individual electrical appliances are combined in parallel to construct Factor Hidden Markov Models (FHMMs). The core of the Factor Hidden Markov Model lies in expanding the system's state space into a Cartesian product of the operating states of all electrical appliances. The joint operating state vector of the system at time t is Based on the assumption of independence of operating state transitions, that is, the switching operations of each electrical appliance do not affect each other, the operating state transition probability of the system during joint operation is the product of the operating state transition probabilities of each independent electrical appliance:

[0114]

[0115] In order to establish a joint operational status Compared with total load observations The relationship between them is assumed to be additive, meaning that the total load power is approximately equal to the sum of the power of each individual appliance at any given time. Based on this assumption, the total load observation value... The observed emission probability is modeled as a joint Gaussian distribution, with mean and variance being the sum of the parameters of each component:

[0116] .

[0117] Let the length of the training sequence be... The number of EM iterations is The joint operating state space size is .

[0118] During the training phase, FHMM first performs DBSCAN clustering for each appliance to automatically determine the number of operating states. Applied to a subset of power sequences, with a complexity of O(n log n). , extended to After each appliance Subsequently, these clusters were used as initial means to train independent Gaussian HMM models, and the parameters were estimated using the Expectation-Maximization (EM) algorithm. A single iteration of EM consists of an E-step and an M-step: the E-step uses a forward-backward algorithm to calculate the posterior probability, with a complexity of O(n log n). The parameters are updated in M ​​steps, with a complexity of O(m). . The total complexity of the model is:

[0119]

[0120] During the joint model construction phase, the initial probabilities of the individual models are combined using the Kronecker product. With transition matrix This generates a collection A joint state space of several large states. This operation ultimately generates... The joint transition matrix dimension has the following complexity:

[0121]

[0122] Meanwhile, the model mean is combined using a Cartesian product, with a complexity of:

[0123]

[0124] Therefore, the overall training complexity, including DBSCAN clustering, EM training, and joint construction, is:

[0125]

[0126] In the power decomposition phase, FHMM uses the Viterbi algorithm for maximum a posteriori path estimation. The algorithm's dynamic programming initialization is as follows: and at each subsequent time step traverse the current The state and the previous moment Given a state, calculate the aforementioned transition probability. and launch probability The complexity of each step is . The total complexity is:

[0127]

[0128] In summary, the complexity bottleneck of the FHMM algorithm lies in its exponentially large state space. While DBSCAN avoids manually specifying the number of states and improves adaptability, it introduces additional complexity. Clustering overhead. The above problem will be addressed in step S4.

[0129] S4. Regarding the size of the joint state space in the FHMM model in step S3. Depending on the number of electrical appliances The exponential growth (i.e., the state explosion problem) leads to a computational complexity of up to 1000 times higher than that of the traditional Viterbi algorithm. To address the technical challenge of accurate inference in multi-electrical appliance scenarios, this step utilizes convex optimization relaxation techniques to transform the joint state inference problem of the factor hidden Markov model into a convex optimization problem and decompose the joint state inference into independent marginal distribution estimates. This improves the FHMM in step S3, forming an improved factor hidden Markov model.

[0130] Specifically, this step relaxes the original discrete integer programming problem into a continuous variable optimization problem. The decision variables involved in this convex programming model are no longer a single joint state sequence, but are decomposed into the following two sets of continuous variables:

[0131] (1) Runtime state transition matrix variables: Definition Group dimension is The variables are used to describe the state transition probability characteristics of each electrical appliance between adjacent time points;

[0132] (2) Running state probability vector variable: definition Group The variable is used to describe the marginal probability of each electrical appliance being in a specific state at each time.

[0133] By defining the decision variables mentioned above, the originally complex combinatorial optimization problem is transformed into a solvable convex optimization problem, laying the foundation for efficient solution in the future.

[0134] The specific steps of step S4 are as follows:

[0135] S41. By introducing slack variables, the original maximum a posteriori probability estimation problem in discrete state space is relaxed into a semidefinite programming or second-order cone programming problem in continuous space.

[0136] S42. Define decision variables, which include at least the operating state transition matrix variable and the operating state probability vector variable for each electrical appliance;

[0137] S43. Construct the objective function and constraints, and minimize the error between the predicted total power and the actual observed total power under the constraints.

[0138] S44. By introducing slack variables, the discrete integer state constraints in the original problem are relaxed into continuous probabilistic simplex constraints, thereby transforming the non-convex combinatorial optimization problem into a semidefinite programming (SDP) or second-order cone programming (SOCP) problem. This transformation reduces the computational complexity of joint operating state inference from an exponential growth with the number of electrical appliances to a polynomial growth; thus obtaining an improved factor hidden Markov model.

[0139] S5. The alternating minimization algorithm is used to iteratively solve the convex optimization problem to obtain the optimal state sequence of each appliance, and the power consumption curve of each appliance is decomposed accordingly, specifically:

[0140] S51. Initialize the parameters of the factorial hidden Markov model;

[0141] S52. Under the premise of fixing the noise variance parameter, use a convex optimization solver to solve the operating state probability vector of each electrical appliance and update the operating state transition matrix variable of each electrical appliance.

[0142] S53. Under the premise of fixing the operating state probability vector, update the noise variance parameter using the least squares method;

[0143] S54. Alternately execute steps S52 and S53 until the parameters of the factor hidden Markov model converge or the preset number of iterations is reached, and output the final optimal state sequence of the electrical appliance.

[0144] In the solution process of step S5, Gaussian HMM is also used for modeling during the training phase, and the expectation-maximization (EM) algorithm is used to estimate the parameters, so the complexity remains unchanged.

[0145] In the power decomposition phase, the number of iterations is first set. The process involves alternating minimization, with each iteration consisting of two steps:

[0146] One method is to alternately update the noise variance using the least squares method. The complexity is:

[0147]

[0148] Second, the state variables are updated. Under the premise of fixed noise parameters, the convex optimization problem defined in step S4 is solved using SCS (Splitting Conic Solver), thereby updating the state transition matrix variables and the state probability vector variables. This convex programming involves... Given a set of decision variables and constraints, ignoring lower-order variables... It can be represented as:

[0149]

[0150] Under a typical semidefinite programming (SDP) relaxation framework, the solution complexity of a single convex optimization is O(n log n). Combining After several alternating iterations, the overall computational complexity of the inference phase is:

[0151]

[0152] This formula shows that the present invention successfully reduces the exponential complexity of the standard FHMM to polynomial complexity through convex relaxation techniques, significantly improving the computational efficiency of the algorithm.

[0153] Experiments were conducted on a subset of the IAWE dataset for validation. Five typical appliances—refrigerator, air conditioner, washing machine, computer, and television—were selected for training and testing. The training set period was from July 1st to July 15th, 2025, and the testing set period was from July 16th to July 30th, 2025. The experimental environment was Python 3.8. The DBSCAN parameter was set to... , .

[0154] Table 1. F1 Score Comparison Table

[0155]

[0156] Table 1 compares the F1 performance of different algorithms on various electrical appliances. The results show that the FHMM improved by step S2 is improved on all 5 types of devices, especially on loads with clear state boundaries such as air conditioners. The improved FHMM is better than FHMM overall, but slightly lower than DBSCAN-FHMM. However, it has a huge improvement in computational efficiency, which is reflected in Table 2.

[0157] Table 2 Algorithm Performance Comparison Table

[0158]

[0159] Table 2 shows the algorithm performance comparison. The DBSCAN-FHMM algorithm improved by step S2 provided in this invention has the highest average F1 score, indicating that it has the highest decomposition accuracy, but the training and inference time is also significantly increased. The improved FHMM algorithm of this invention maintains high accuracy while reducing the training and decomposition time by 28.3% compared with the FHMM algorithm and the DBSCAN-FHMM algorithm.

[0160] In summary, based on the accompanying drawings and the table above, the algorithm proposed in this embodiment significantly improves decomposition efficiency while enhancing the accuracy of load decomposition.

[0161] This invention proposes a non-intrusive load monitoring method based on an improved factor hidden Markov model. First, it processes historical power data of electrical appliances using a density-based noisy applied spatial clustering algorithm (DBSCAN), achieving adaptive determination of the number of operating states of electrical appliances and noise filtering, overcoming the shortcomings of the traditional K-means algorithm, which requires a preset K value and has poor noise resistance. Second, addressing the problem of exponential growth (i.e., state explosion) of the joint state space in the standard FHMM model under multi-electrical appliance scenarios, it utilizes convex optimization relaxation techniques to decompose the complex joint state inference problem into independent marginal distribution estimation problems, successfully reducing the computational complexity from exponential to polynomial. Finally, it iteratively solving the relaxed convex optimization problem using an alternating minimization algorithm significantly improves the computational efficiency of the algorithm while maintaining the accuracy of load decomposition, making it potential for application in real-time monitoring systems.

[0162] In this embodiment of the invention, the term "multiple" refers to two or more, unless otherwise explicitly defined. The terms "install," "connect," and "fix" should be interpreted broadly. For example, "connect" can mean a fixed connection, a detachable connection, or an integral connection. Those skilled in the art can understand the specific meaning of the above terms in this embodiment of the invention based on the specific circumstances.

[0163] In the description of the embodiments of the present invention, it should be understood that the terms "upper" and "lower" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or unit referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of the present invention.

[0164] In the description of this specification, the terms "an embodiment," "a preferred embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0165] The above embodiments are merely illustrative of the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solutions based on the technical concept proposed in this invention shall fall within the scope of protection of this invention. Technologies not covered in this invention can be implemented using existing technologies.

Claims

1. A non-invasive load monitoring method based on an improved factor hidden Markov model, characterized in that: The steps of this load monitoring method are as follows: S1. Obtain the total load power data of the environment to be monitored and the historical power training data of each electrical appliance to be monitored; S2. A density-based spatial clustering algorithm with noise is used to perform cluster analysis on the historical power training data, adaptively determining the number of operating states of each electrical appliance and the corresponding power characteristic parameters, and filtering out noise data. S3. Based on the number of operating states of each electrical appliance and the corresponding power characteristic parameters, a factor hidden Markov model is constructed using the additive assumption, in which the observed value of the total load is modeled as the sum of the observed values ​​of each electrical appliance at the same time. S4. Using convex optimization relaxation techniques, the joint state inference problem of the factor hidden Markov model is transformed into a convex optimization problem, and the joint state inference is decomposed into independent marginal distribution estimates to form an improved factor hidden Markov model. S5. The convex optimization problem presented by the improved factor hidden Markov model is solved iteratively using the alternating minimization algorithm to obtain the optimal state sequence of each electrical appliance.

2. The non-invasive load monitoring method based on an improved factor hidden Markov model according to claim 1, characterized in that: Step S1 specifically includes: S11. Collect time series data of total active power at the power inlet of the environment to be monitored using non-intrusive monitoring equipment; S12. Obtain the independent active power data of each monitored electrical appliance under different working modes as historical power training data, wherein the historical power training data covers the complete operating cycle of each monitored electrical appliance.

3. The non-invasive load monitoring method based on an improved factor hidden Markov model according to claim 1, characterized in that: Step S2 specifically includes: S21. Map the historical power training data to the data space; S22, Set neighborhood radius and the minimum number of points in the neighborhood threshold ; S23. Traverse the data points in the data space provided in step S21, based on the neighborhood radius provided in step S22. and the minimum number of points in the neighborhood threshold Identify core points, boundary points, and noise points; S24. The density-connected core points and boundary points are divided into the same cluster. Each cluster corresponds to an operating state of the electrical appliance. The final number of clusters is the number of operating states of each electrical appliance. The center value of the cluster is used as the power characteristic parameter of the operating state. The identified noise points are removed and do not participate in the subsequent model construction.

4. The non-invasive load monitoring method based on an improved factor hidden Markov model according to claim 3, characterized in that: In step S24, the cluster center value refers to the power mean of all data points within the cluster, and the power standard deviation of all data points within the cluster is calculated as the fluctuation characteristic of this operating state.

5. The non-invasive load monitoring method based on an improved factor hidden Markov model according to claim 1, characterized in that: The factorial hidden Markov model constructed using the additive assumption in step S3 must satisfy the following conditions: (1) State independence: It is assumed that the state transition process of each electrical appliance is independent of each other, and the joint state transition probability of the system is the product of the independent state transition probabilities of each electrical appliance; (2) Observation superposition: The observed emission probability of the total load follows a Gaussian distribution, with its mean being the sum of the power mean of each electrical appliance in its current operating state and its variance being the sum of the power variance of each electrical appliance in its current operating state.

6. The non-invasive load monitoring method based on an improved factor hidden Markov model according to claim 1 or 5, characterized in that: The specific method for constructing the factor hidden Markov model using the additive assumption in step S3 is as follows: S31. Constructing independent Markov chains for single electrical appliances: For the first... An electrical appliance, its implicit state sequence It is modeled as an independent Hidden Markov Model, which contains three core elements: the state transition probability matrix. Observation of launch probability and initial state distribution They are respectively: The state transition probability matrix describes the evolution of the internal physical states of an electrical appliance. Defined as: In the formula: , Index representing the discrete operating state of an electrical appliance; Observational launch probability Describes the probability of an appliance producing a power observation value under a specific operating state, and the probability of observed emission. Defined as: In the formula: and These are respectively related to the running status The associated power mean and variance; Initial state distribution The probabilities of the system being in each possible operating state at the initial moment are given; Then the first Each electrical appliance is modeled as an independent set of parameters. ; S32, will Independent Hidden Markov Models (HMMs) of individual electrical appliances are combined in parallel to construct a factor HMM. The core of the factor HMM lies in expanding the system's state space into a Cartesian product of the operating states of all electrical appliances. The joint operating state vector of the system at time t is Based on the assumption of independence of operating state transitions, that is, the switching operations of each electrical appliance do not affect each other, the operating state transition probability of the system during joint operation is the product of the operating state transition probabilities of each independent electrical appliance: In order to establish a joint operational status Compared with total load observations The relationship between them is assumed to be additive, and the total load observations are used as a basis for further analysis. The observed emission probability is modeled as a joint Gaussian distribution, with mean and variance being the sum of the parameters of each component: 。 7. The non-invasive load monitoring method based on an improved factor hidden Markov model according to claim 1, characterized in that: Step S4 specifically includes: S41. By introducing slack variables, the original maximum a posteriori probability estimation problem in discrete state space is relaxed into a semidefinite programming or second-order cone programming problem in continuous space. S42. Define decision variables, which include at least the operating state transition matrix variable and the operating state probability vector variable for each electrical appliance; S43. Construct the objective function and constraints, and minimize the error between the predicted total power and the actual observed total power under the constraints. S44. By introducing slack variables, the discrete integer state constraints in the original problem are relaxed into continuous probabilistic simplex constraints, thereby transforming the non-convex combinatorial optimization problem into a semidefinite programming or second-order cone programming problem, forming an improved factor hidden Markov model.

8. The non-intrusive load monitoring method based on an improved factor hidden Markov model according to claim 1, characterized in that: Step S5 specifically includes: S51. Initialize the parameters of the improved factor hidden Markov model; S52. Under the premise of fixing the noise variance parameter, use a convex optimization solver to solve the operating state probability vector of each electrical appliance and update the operating state transition matrix variable of each electrical appliance. S53. Under the premise of fixing the operating state probability vector, update the noise variance parameter using the least squares method; S54. Alternately execute steps S52 and S53 until the parameters of the improved factor hidden Markov model converge or the preset number of iterations is reached, and output the final optimal state sequence of the electrical appliance.