Energy router non-intrusive load port monitoring method and system
By automatically determining the number of load states on the energy router using the BIC-FHMM model, the modeling accuracy problem caused by artificial specification of the load states in the non-invasive load monitoring of the energy router is solved, and a more efficient load decomposition is achieved.
Patent Information
- Application Number
- CN202510423058.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, the non-invasive load monitoring method of energy routers has the problem of modeling accuracy caused by artificial specification of load states, resulting in unsatisfactory load decomposition results and few researches.
The Bayesian Information Criteria (BIC) method is used to automatically determine the number of load states during the factor hidden Markov model (FHMM) training process, build a BIC-FHMM model, and combine it with the Viterbi algorithm to identify loads to improve the decomposition accuracy.
It realizes that no need to manually define the number of load states, and automatically determines the optimal number of implicit states, improves the accuracy and efficiency of load decomposition, and verifies the effectiveness on energy routers.
Smart Images

Figure CN120446621A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of load intelligent perception of energy routers, and in particular relates to a non-intrusive load port monitoring method and system for energy routers based on BIC-FHMM. Background Art
[0002] In recent years, with the increasing severity of energy crises and environmental pollution, the demand for renewable, clean energy sources, such as solar and wind power, has become increasingly urgent. However, the randomness and volatility faced by renewable energy generation when integrated into traditional power grids have constrained its development. Energy Internet technology has rapidly developed because it effectively addresses the grid integration challenges of renewable energy generation. As the core device of the Energy Internet, energy routers are responsible for the transmission and management of energy and information within the Energy Internet. Controlling the orderly and rational flow of energy within the Energy Internet requires extensive information exchange. The accuracy and timeliness of this information are crucial for the Energy Routers to formulate appropriate energy management and control strategies. Information acquisition relies on perception, and the perception layer is the foundational layer and data source of the Energy Internet. Therefore, for microgrid energy routers, the ability to perceive load information is an essential requirement for their effective operation.
[0003] Load monitoring technology is mainly divided into two types: Intrusive Load Monitoring (ILM) and Non-intrusive Load Monitoring (NILM). Among them, non-intrusive load monitoring only requires the installation of a sensing module at the user's power entrance. Based on the total load information collected, the type of each load within the user and the power consumption information of each load when operating separately can be obtained. Compared with intrusive load monitoring, it has the advantages of low cost and reduced interference with user life, privacy, etc. The typical framework of non-intrusive load monitoring usually includes five major steps: data acquisition, data preprocessing, event detection, feature extraction and load identification. Among them, load identification is the key research step. Load identification refers to the use of an effective load identification algorithm to allow the non-intrusive load monitoring device to automatically identify the type of load to be tested.
[0004] In the prior art, the Hidden Markov Model (HMM) is an effective technical tool for load identification and non-intrusive load monitoring (NILM). HMMs have garnered significant research and attention due to their ability to model time-series data and represent unobservable states. However, the factor hidden Markov model (FHMM) requires manual specification of the number of load devices when modeling loads. Assuming the total load consists of M loads, the number of states for the mth load is K(m). The number of states varies for different load types. Traditionally, K(m) is artificially fixed to a single value without knowing the number of load states. This approach increases or decreases the state values of each device and their corresponding power consumption, inevitably affecting the accuracy of modeling each load and resulting in suboptimal load decomposition results. Therefore, the main problem with using HMMs for load decomposition is that the number of states and computational complexity required by the model increases exponentially with the number of devices and the number of states for each device. HMM uses a single chain to represent the state transition process, while the factor hidden Markov model (FHMM) decomposes a chain into multiple chains based on it, and each chain represents a state transition process. FHMM reduces the number of hidden states, so it reduces the complexity of the operation to a certain extent.
[0005] Currently, research on energy routers focuses primarily on topology and control strategies, while relatively little research has been conducted on non-invasive load monitoring technologies for energy routers. Therefore, further research is needed to identify a mature and applicable non-invasive load monitoring technology for energy routers, drawing on existing non-invasive load monitoring technologies. To address this issue, energy routers lack intelligent port sensing and the ability to determine the number of implicit load states. Therefore, a novel non-invasive load port monitoring device and method for energy routers is urgently needed to improve intelligent load sensing technology for energy routers and implement intelligent load sensing capabilities for energy routers. Summary of the Invention
[0006] The purpose of the present invention is to provide a non-invasive load port monitoring method for an energy router based on BIC-FHMM, and also to provide a non-invasive load monitoring system for an energy router, which adopts the Bayesian Information Criterion (BIC) method and uses BIC to determine the optimal number of implicit states of the model to solve the problem of automatically determining the number of load states during the FHMM model training process, eliminating the need for manual definition of load states, avoiding increasing or decreasing the state value of the device and its corresponding power consumption value, and improving the accuracy of load decomposition.
[0007] The purpose of the present invention is achieved through the following technical solutions:
[0008] A non-intrusive load port monitoring method for an energy router comprises the following steps:
[0009] A. Integrate the BIC method into HMM training and build a BIC-FHMM algorithm model:
[0010] A1. Input the power data of each load, analyze the initial state of the load, and input it as training data;
[0011] A2. Add the BIC algorithm during model training to automatically determine the number of load states;
[0012] A3. Each load corresponds to an HMM model for training, and the optimal HMM model parameters λ = A, B, π and the number of states for each load are obtained through training;
[0013] A4. Sort and merge the HMM models corresponding to each load to obtain an FHMM model;
[0014] A5. Perform a weighted average operation on the parameters λ = A, B, π to obtain the parameters λ = A, B, π of the global FHMM model, and then obtain the trained BIC-FHMM model;
[0015] A6. Input the pre-processed total load power data and use the Viterbi algorithm based on the trained BIC-FHMM model to obtain the optimal state sequence of each load, thereby completing load identification.
[0016] B. Load decomposition based on BIC-FHMM:
[0017] Use the dataset as the input data of the model to perform load decomposition, obtain a comparison chart of load prediction and actual power consumption, and use the evaluation indicator R square to evaluate the performance of the model algorithm;
[0018] C. Build a non-intrusive load monitoring system for energy routers to monitor load power data and transmit it to a PC.
[0019] Furthermore, in step A2, the BIC algorithm is added to the model training process, which specifically includes the following steps:
[0020] The BIC is calculated as:
[0021] BIC=-2*log(L)+k*log(n) (1)
[0022] Among them, BIC is the Bayesian Information Criterion, which is a criterion for model selection; log(L) is the maximum value of the log-likelihood function of the data under the model. In HMM training, this represents the logarithm of the probability that a given observation sequence will appear under the trained model; k is the number of free parameters in the model. In HMM, this includes the state transition probability matrix and the parameters of the observation probability distribution; n is the number of observation data points; in HMM, this is usually the length of the observation sequence.
[0023] In an HMM, the likelihood function L is the probability of an observation sequence occurring given the model parameters and the observation sequence. This probability is typically calculated using a forward-backward algorithm and maximized to train the HMM. In an HMM, k represents the total number of parameters in the model. For a Gaussian HMM with N states, the parameters include: the mean of the N states, the covariance matrix of the N states, and the (N-1) state transition probabilities.
[0024] If the observations are d-dimensional, the total number of parameters k is:
[0025] k = N * (d+ d(d+1) / 2)+ (N-1) = N * (d(d+3) / 2)+ (N-1) (2)
[0026] In HMM, n is the length of the observation sequence, that is, how many time points of observation data there are;
[0027] Concrete the mathematical formula of BIC into the case of HMM:
[0028] BIC= -2 * log(P(O|λ)) + k * log(T) (3)
[0029] Where P(O|λ) is the probability of the observation sequence O under the model parameter λ, that is, the likelihood function; λ is the parameter set of HMM, including the state transition probability matrix A, the observation probability distribution B (for Gaussian distribution, it is the mean μ and covariance matrix Σ); T is the length of the observation sequence;
[0030] Specify the number of parameters k:
[0031] k=N*(d(d+3) / 2)+ (N-1) (4)
[0032] The BIC formula can be written as:
[0033] BIC = -2 * log(P(O|λ))+ [N * (d(d+3) / 2)+ (N-1)]* log(T) (5)
[0034] Furthermore, in step B, the evaluation index R-squared is used to measure the closeness between the load decomposition estimate and the actual data. The higher the coefficient, the higher the percentage of the estimated value that matches the actual data. A coefficient of 1 or 0 indicates that the estimated value represents all or no actual data, respectively. R-squared can capture both when the equipment is turned on and off and the degree to which the estimated value deviates from the baseline. If the coefficient is negative, the observed data and the predicted data do not match or are inconsistent.
[0035]
[0036] Where N represents the number of device states, y i Indicates the actual power consumed by the device in state i. It represents the predicted power value consumed by the device in state i after decomposition. Indicates the actual average power consumed by devices in state i.
[0037] Furthermore, in step C, the non-invasive load monitoring system of the energy router includes a single-phase AC load end of the energy router, a data acquisition unit and a load decomposition unit; wherein the data acquisition unit includes an electric energy acquisition module and a single-chip microcomputer; the energy router connects the AC power grid, photovoltaic equipment, energy storage equipment, DC load and AC load production capacity or energy consumption unit to the DC bus through the DC / DC and DC / AC power electronic converter interfaces; household loads are usually AC loads, and the non-invasive load monitoring device is installed at the DC / AC single-phase inverter port, that is, installed at the single-phase AC load end of the energy router; the single-phase inverter AC output end of the energy router can output 220V AC power to power each load; the electric energy acquisition module is connected to the power supply inlet, collects the voltage, current and power parameters on the inlet bus, communicates with the PC serial port through the single-chip microcomputer, monitors and transmits the power data of each load, and completes the load decomposition task on the PC using the Python language.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] The present invention proposes a Bayesian Information Criterion (BIC) method. Based on the Bayesian criterion, the adaptive load state quantity technology can automatically determine the number of load states during the FHMM model training process, eliminating the need for manual definition of load states, thereby improving the accuracy of load decomposition. The present invention successfully verifies the effectiveness of the algorithm using the UK-DALE dataset. The energy router of the present invention is a non-invasive load monitoring device that can use self-tested load power data to communicate serially with a PC. Finally, NILM is performed using the Python language to verify the feasibility of the scheme and the effectiveness of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 BIC algorithm flow chart;
[0042] Figure 2 Overall algorithm flow chart;
[0043] Figure 3 Comparison chart of refrigerator power consumption prediction data and actual data;
[0044] Figure 4 Comparison chart of washing machine power consumption prediction data and actual data;
[0045] Figure 5 Comparison chart of water heater power consumption prediction data and actual data;
[0046] Figure 6 Comparison chart of dishwasher power consumption prediction data and actual data;
[0047] Figure 7 Energy router non-intrusive load monitoring system model;
[0048] Figure 8 Hardware block diagram of energy router non-intrusive load monitoring. DETAILED DESCRIPTION
[0049] The present invention will be further described below in conjunction with embodiment:
[0050] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0051] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are used only to distinguish the description and should not be understood as indicating or implying relative importance.
[0052] The Bayesian Information Criterion (BIC) is a criterion for model selection, which is based on a balance between the model's ability to fit the data and the complexity of the model. When using FHMM for non-invasive load monitoring, if the load decomposition task is to be successfully completed, the number of load states needs to be determined during the modeling process. During the HMM training process, the present invention proposes to use BIC to determine the optimal number of implicit states of the model. BIC can be calculated under different numbers of implicit states and select the model with the lowest BIC value, so that it strikes a balance between model complexity and fitting quality. After preliminarily training multiple HMM models with different numbers of implicit states, BIC can be used for evaluation to select the optimal number of implicit states. There is no need to manually define the number of load states, which avoids increasing or decreasing the state value of the device and its corresponding power consumption value, thereby resulting in unsatisfactory load decomposition results.
[0053] This paper builds a "BIC-FHMM" algorithm model. This model incorporates the BIC method into the FHMM. Because the FHMM is composed of multiple HMMs, during model training, each load corresponds to one HMM, meaning the number of loads equals the number of HMMs in the FHMM. The hidden Markov model (HMM) is the foundational model of the algorithm.
[0054] This method first performs model training and then completes load decomposition, including the following steps:
[0055] First, a BIC-FHMM model is built. Conventional FHMM-based non-intrusive load monitoring techniques use the Expectation-Maximization (EM) algorithm during the model training phase to determine the optimal model parameters λ = (A, B, π). This invention innovatively incorporates the BIC method into model training. This results in not only optimal parameters but also the number of implicit states for each load at the end of model training.
[0056] Secondly, load decomposition based on BIC-FHMM: first give the data set (UK-DALE) and the evaluation standard R square, and then obtain the experimental simulation results, that is, the comparison chart between the actual power consumption and the predicted power consumption of the load.
[0057] Finally, to verify the feasibility of the solution, we constructed the non-intrusive load monitoring hardware for the energy router in the laboratory, based on the block diagram of the non-intrusive load monitoring system for the energy router. The hardware monitored load power data and transmitted it to a PC. The experiment demonstrated that load decomposition could be completed on the PC using Python.
[0058] Specifically, the non-intrusive load port monitoring method of the energy router of the present invention is implemented based on BIC-FHMM and includes the following steps:
[0059] 1. Build a BIC-FHMM model:
[0060] The calculation formula of BIC can be expressed as:
[0061] BIC=-2*log(L)+k*log(n) (1)
[0062] Among them, BIC is the Bayesian Information Criterion, which is a criterion for model selection; log(L) is the maximum value of the log-likelihood function of the data under the model. In HMM training, this represents the logarithm of the probability that a given observation sequence will appear under the trained model; k is the number of free parameters in the model. In HMM, this includes the state transition probability matrix and the parameters of the observation probability distribution (for Gaussian HMM, the mean and covariance matrix of each state); n is the number of observation data points; in HMM, this is usually the length of the observation sequence.
[0063] Integrate the BIC method into HMM training.
[0064] In an HMM, the likelihood function L is the probability of an observation sequence occurring given the model parameters and the observation sequence; this probability is typically calculated using a forward-backward algorithm and maximized to train the HMM. In an HMM, k represents the total number of parameters in the model. For a Gaussian HMM with N states, the parameters include: the mean of the N states (one for each state), the covariance matrix of the N states (one covariance matrix for each state, and for d-dimensional observations, each covariance matrix has d(d+1) / 2 parameters). (N-1) state transition probabilities (the last state transition probability can be obtained by subtracting the other N-1 probabilities from 1, so it does not need to be a separate parameter).
[0065] Therefore, if the observations are d-dimensional, the total number of parameters k is:
[0066] k=N*(d+d(d+1) / 2)+(N-1)=N*(d(d+3) / 2)+(N-1)(2)
[0067] In HMM, n is the length of the observation sequence, that is, the number of observation data at each time point.
[0068] Combining the above information, the mathematical formula of BIC can be concretely expressed in the case of HMM:
[0069] BIC=-2*log(P(O|λ))+k*log(T)(3)
[0070] Where P(O|λ) is the probability of the observation sequence O under the model parameter λ, that is, the likelihood function; λ is the parameter set of the HMM, including the state transition probability matrix A and the observation probability distribution B (for Gaussian distribution, it is the mean μ and covariance matrix Σ); T is the length of the observation sequence.
[0071] Specify the number of parameters k:
[0072] k=N*(d(d+3) / 2)+ (N-1) (4)
[0073] Finally, the BIC formula can be written as:
[0074] BIC = -2 * log(P(O|λ))+ [N * (d(d+3) / 2)+ (N-1)]* log(T) (5)
[0075] BIC is an effective model selection criterion, especially when dealing with limited data sets and avoiding overfitting. Therefore, the present invention proposes to add the BIC method to the FHMM training process to automatically determine the number of implicit load states, eliminating the need to manually define load states, thereby improving the accuracy of load decomposition. The BIC algorithm flow chart is shown in the figure below. Figure 1 shown.
[0076] like Figure 2 As shown, the detailed steps of the algorithm are as follows:
[0077] Step 1: Input the power data of each load, analyze the initial state of the load, and input it as training data.
[0078] Step 2: Add the BIC algorithm to the model training process to automatically determine the number of load states.
[0079] Step 3: Each load corresponds to an HMM model for training, and the training obtains the optimal HMM model parameters λ = A, B, π and the number of states for each load.
[0080] Step 4: sort and merge the HMM models corresponding to each load to obtain the FHMM model.
[0081] Step 5: Perform weighted average calculation on the parameters λ = A, B, π to obtain the parameters of the global FHMM model Then the trained BIC-FHMM model is obtained.
[0082] In step 6, the pre-processed total power data of the load is input, and the Viterbi algorithm is used according to the trained BIC-FHMM model to obtain the optimal state sequence of each load, thereby completing the load identification.
[0083] 2. Load decomposition based on BIC-FHMM
[0084] To verify the effectiveness of the FHMM-based non-intrusive load decomposition algorithm, and since there is currently no relevant public dataset in China, the present invention uses the UK Home Appliance Level Electricity (UK-DALE) dataset for May 2016, which contains the electricity demand of 5 houses, where each house measures the main power demand of the entire house as well as the appliance-level demand. All 5 houses record the whole-house electricity every 6 seconds, with a device-level data resolution of 6 seconds. Houses 1, 2, and 5 also have the whole-house active power and apparent power with a resolution of 1 second. For 3 of the 6 houses, voltage and current measurements are also proposed, but currently the present invention only focuses on electricity. The meter readings of each device (marked as channels in the dataset) are stored in a separate .dat file and loaded into Python with pandas. After loading the data into pandas, the present invention resamples it to a frequency of 1 minute and uses 2 months of data for training and two sets of 1 month of observations for testing.
[0085] This paper uses R-squared as an accuracy metric to measure the closeness between the estimated value and the actual data. A higher coefficient indicates a higher percentage of agreement between the estimated value and the actual data. A coefficient of 1 or 0 indicates that the estimated value represents all or no actual data, respectively. R-squared captures both when the device is turned on and off and the extent to which the estimated value deviates from the baseline. A negative coefficient indicates a mismatch or inconsistency between the observed and predicted data.
[0086]
[0087] Where N represents the number of device states, y i Indicates the actual power consumed by the device in state i. It represents the predicted power value consumed by the device in state i after decomposition. Indicates the actual average power consumed by devices in state i.
[0088] We calculated a separate R-squared value for each of the four appliances. As the number of appliances increases, using a single metric may be more useful. Since we are dealing with time series data, we cannot simply randomly divide the data into training and test sets. Therefore, we used two months of data for training and two sets of one-month data for observational testing. One test set was used to validate the FHMM, and the other was used to validate the BIC-FHMM. Table 1 below shows a performance comparison of the two models.
[0089] Table 1 R-squared of four electrical appliances under different models
[0090] electrical appliances water heater dishwasher refrigerator washing machine FHMM 0.56 0.85 0.87 0.76 BIC-FHMM 0.84 0.92 0.81 0.91
[0091] The following is a comparison chart of the daily power consumption curves of the four household appliances in house_1, which are decomposed by the BIC-FHMM algorithm. Figure 3-Figure 6 As shown in the figure, the Predicted curve refers to the predicted power consumption curve, and the Actual curve refers to the actual power consumption curve. The figure shows that the power consumption curve of a single device decomposed by the BIC-FHMM load decomposition algorithm is relatively close to the actual power consumption curve.
[0092] In order to verify the feasibility of the scheme, the energy router non-intrusive load monitoring system model is as follows Figure 7 As shown. The present invention models the non-invasive load port monitoring system of the energy router based on BIC-FHMM. The energy router connects the AC power grid, photovoltaic equipment, energy storage equipment, DC load and AC load and other energy-generating or energy-consuming units to the DC bus through various power electronic converter interfaces such as DC / DC and DC / AC. Household loads are usually AC loads, and the research object of the present invention is the AC load side port perception of the energy router. Therefore, the non-invasive load monitoring device is installed at the DC / AC single-phase inverter port, that is, at the single-phase AC load end of the energy router.
[0093] The present invention proposes a hardware block diagram of a non-invasive load monitoring device for an energy router as shown in FIG. Figure 8 As shown. The monitoring system includes a single-phase AC load terminal of an energy router, a data acquisition unit, and a load decomposition unit. The data acquisition unit includes an electric energy acquisition module and a single-chip microcomputer. The single-phase inverter AC output terminal of the energy router of the present invention can output 220V AC power, which is equivalent to the power supply inlet of a home user and supplies power to each load. The electric energy acquisition module is connected to the power supply inlet, collects parameters such as voltage, current, and power on the inlet bus, and communicates with the PC serial port through the single-chip microcomputer. Experiments have shown that the power data of each load can be successfully monitored and transmitted, and finally the load decomposition task can be completed on the PC through the Python language.
[0094] The FHMM method of the present invention is innovatively applied to energy routers, using the FHMM method for non-invasive load monitoring, achieving a novel and robust technology integration. By adopting the Bayesian Information Criterion, the present invention can adaptively determine the optimal number of implicit states of the model without manually pre-setting the number of load states. This improvement effectively avoids the problem of unsatisfactory load decomposition results caused by manual adjustment of device state values and their power consumption values, ensuring the accuracy and efficiency of monitoring. Specifically, BIC calculates and selects the lowest BIC value under different numbers of implicit states from 1 to N. The lowest BIC value corresponds to the optimal number of implicit states determined by the BIC method. That is, N represents the total number of states of the load. For a household load, such as a light bulb, fan, washing machine, etc., the total number of states N of the load is fixed. On, off, shifting, etc. are each a state. BIC is used in the model training phase of the BIC-FHMM modeling process to determine the number of states the load has been operating in based on the input load power data and some parameters in the modeling. For example, an electric fan has three operating states: high, low, and high. That is, N is 3. The BIC method calculates the BIC values for states 1, 2, and 3, and compares them to obtain the lowest BIC value, which is the optimal implicit state number for BIC adaptively determining the load.
[0095] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A non-intrusive load port monitoring method for an energy router, characterized in that: The following steps are involved: A. Build a BIC-FHMM model and integrate the BIC method into HMM training: A1. Input the power data of each load, analyze the initial state of the load, and input it as training data; A2. Add the BIC algorithm during model training to automatically determine the number of load states; A3. Each load corresponds to an HMM model for training, and the optimal HMM model parameters λ = A, B, π and the number of states for each load are obtained through training; A4. Sort and merge the HMM models corresponding to each load to obtain an FHMM model; A5. Perform a weighted average operation on the parameters λ = A, B, π to obtain the parameters λ = A, B, π of the global FHMM model, and then obtain the trained BIC-FHMM model; A6. Input the pre-processed total load power data and use the Viterbi algorithm based on the trained BIC-FHMM model to obtain the optimal state sequence of each load, thereby completing load identification. B. Load decomposition based on BIC-FHMM: Use the dataset as the input data of the model to perform load decomposition, obtain a comparison chart of load prediction and actual power consumption, and use the evaluation indicator R square to evaluate the performance of the model algorithm; C. Feasibility Verification: Build a non-intrusive load monitoring system for energy routers to monitor load power data and transmit it to a PC.
2. The non-intrusive load port monitoring method of an energy router according to claim 1, characterized in that: Step A2: Add the BIC algorithm to the model training process, which specifically includes the following steps: The BIC is calculated as: BIC=-2*log(L)+k*log(n) Among them, BIC is the Bayesian Information Criterion, which is a criterion for model selection; log(L) is the maximum value of the log-likelihood function of the data under the model. In HMM training, this represents the logarithm of the probability that a given observation sequence will appear under the trained model; k is the number of free parameters in the model. In HMM, this includes the state transition probability matrix and the parameters of the observation probability distribution; n is the number of observation data points; in HMM, this is usually the length of the observation sequence; In an HMM, the likelihood function L is the probability of an observation sequence occurring given the model parameters and the observation sequence. This probability is typically calculated using a forward-backward algorithm and maximized to train the HMM. In an HMM, k represents the total number of parameters in the model. For a Gaussian HMM with N states, the parameters include: the mean of the N states, the covariance matrix of the N states, and the (N-1) state transition probabilities. If the observations are d-dimensional, the total number of parameters k is: k = N*(d+d(d+1) / 2)+(N-1)=N*(d(d+3) / 2)+(N-1). In HMM, n is the length of the observation sequence, that is, the number of observation data at each time point. Concrete the mathematical formula of BIC into the case of HMM: BIC=-2*log(P(O|λ))+k*log(T) Where P(O|λ) is the probability of the observation sequence O under the model parameter λ, that is, the likelihood function; λ is the parameter set of HMM, including the state transition probability matrix A, the observation probability distribution B (for Gaussian distribution, it is the mean μ and covariance matrix Σ); T is the length of the observation sequence; Specify the number of parameters k: k = N*(d(d+3) / 2)+(N-1); The BIC formula can be written as: BIC=-2*log(P(O|λ))+[N*(d(d+3) / 2)+(N-1)]*log(T).
3. The non-intrusive load port monitoring method of an energy router according to claim 1, characterized in that: Step B, use the evaluation index R square to measure the closeness between the estimated value of load decomposition and the actual data; The higher the coefficient, the higher the percentage of estimated values that matches the true data; A coefficient of 1 or 0 indicates that the estimate represents all or no real data, respectively. R-squared can capture both when the device is turned on and off and the degree to which the estimate deviates from the baseline. If the coefficient is negative, the observed data and the predicted data do not match or are inconsistent. Where N represents the number of device states, y i Indicates the actual power consumed by the device in state i. It represents the predicted power value consumed by the device in state i after decomposition. Indicates the actual average power consumed by devices in state i.
4. The non-intrusive load port monitoring method of an energy router according to claim 1, characterized in that: Step C, the non-invasive load monitoring system of the energy router includes a single-phase AC load end of the energy router, a data acquisition unit and a load decomposition unit; wherein the data acquisition unit includes an electric energy acquisition module and a single-chip microcomputer; the energy router connects the AC power grid, photovoltaic equipment, energy storage equipment, DC load and AC load production capacity or energy consumption unit to the DC bus through the DC / DC and DC / AC power electronic converter interfaces; household loads are usually AC loads, and the non-invasive load monitoring device is installed at the DC / AC single-phase inverter port, that is, installed at the single-phase AC load end of the energy router; the single-phase inverter AC output end of the energy router can output 220V AC power to power each load; the electric energy acquisition module is connected to the power supply inlet, collects the voltage, current and power parameters on the inlet bus, communicates with the PC serial port through the single-chip microcomputer, monitors and transmits the power data of each load, and completes the load decomposition task on the PC using the Python language.
