A building energy consumption sensing method and system
By using adaptive clustering algorithm and hidden half Markov model in load monitoring, combined with the operating state and duration characteristics of electrical appliances, the problem of low recognition accuracy in electrical appliances in the existing technology is solved, and more efficient energy consumption is achieved Monitor and use.
Patent Information
- Application Number
- CN202311502855.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2043-11-13
AI Technical Summary
When using the hidden Markov model for load monitoring and modeling, it is difficult to effectively distinguish electrical appliances with similar characteristics, resulting in low recognition accuracy.
After using mean filtering, the operating state of the electrical appliance is determined by using the adaptive clustering algorithm, and a hidden half Markov model is established for each electrical appliance, and a factor hidden half Markov model is constructed, combining the operating state and duration characteristics of the electrical appliance to improve the Model accuracy.
It improves the accuracy of electrical working status identification and the accuracy of energy consumption monitoring, reduces the average absolute error of energy consumption, and improves energy utilization efficiency.
Smart Images

Figure CN117556203B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of load identification and monitoring, and in particular to a building energy consumption sensing method and system. Background Art
[0002] At present, energy is mainly provided to people in the form of electricity, which accounts for a large proportion of our daily life. Therefore, the terminal energy consumption system based on buildings is regarded as an important research object for reducing energy consumption.
[0003] Load monitoring technology belongs to the advanced measurement system of smart grid. It deeply mines and analyzes the power consumption information of power terminals and provides detailed load power consumption information to both end users and power grid companies. For building terminal power consumption systems, load monitoring technology can help power terminals obtain load power consumption information, understand the working status and energy consumption information of loads, facilitate autonomous adjustment of power consumption behavior, and reduce unnecessary power consumption. Relevant data show that office buildings in a certain city are in use for about 200 to 250 days a year, and some office buildings have reached 130-195kWh / m 2 For power companies, load monitoring technology can help them build a more complete power management system at a lower cost.
[0004] As one of the commonly used methods in the field of load monitoring, Hidden Markov Model (HMM) has attracted extensive attention from researchers because it has low computing resource requirements and does not require pre-event detection. However, in existing studies, when using the HMM model for load monitoring modeling, the analysis of the working status of electrical appliances is neglected, and all electrical appliances are simplified as switch-type appliances, which is inconsistent with the operating status of electrical appliances such as air conditioners and office equipment in buildings, resulting in low identification accuracy for such multi-state electrical appliances. In addition, the traditional HMM model only uses a single electrical feature for load monitoring modeling, which makes it difficult to effectively distinguish electrical appliances with similar features, resulting in poor accuracy. Summary of the invention
[0005] The present invention provides a building energy consumption perception method and system, which solves the technical problem that the existing method of load monitoring modeling using a hidden Markov model is difficult to effectively distinguish electrical appliances with similar characteristics, resulting in poor accuracy.
[0006] In order to solve the above technical problems, the present invention provides a building energy consumption perception method, comprising the steps of:
[0007] S1. Collect the operating power sequence of electrical appliances in the building;
[0008] S2, filtering the collected operating power sequence by using a mean filtering method;
[0009] S3, using the filtered operating power sequence to establish a load model of the building; specifically comprising the steps of:
[0010] S31, using an adaptive clustering algorithm to automatically determine the working state of the electrical appliance corresponding to the filtered operating power sequence;
[0011] S32, establish a hidden semi-Markov model for each appliance;
[0012] S33, combining the hidden semi-Markov model of each electrical appliance to construct a factor hidden semi-Markov model to obtain a load model of the building;
[0013] S4. Using the established load model, estimate the electrical appliance working state sequence corresponding to the current building power consumption data.
[0014] Furthermore, the step S31 specifically includes the steps of:
[0015] S311, calculate the density and relative distance of each power point in the filtered operating power sequence, where the power point p at time i i The density ρ i Defined as the power point p i is the center of the circle, d c is the number of all sampling points within the circle with a radius of p. i The relative distance δ i Defined as the power point p i Minimum distance to higher power point;
[0016] S312, setting density threshold ρ TD and the relative distance threshold δ TD ;
[0017] S313, density ρ i and the relative distance δ i are greater than the density threshold ρ TD and the relative distance threshold δ TD The power point p i As a cluster center, the density peak clustering method is used to cluster the filtered operating power sequence to determine the working status of each appliance.
[0018] Further, in step S312, the density threshold ρ TD Set to:
[0019] ρ TD =λ1×(len(P)-max(ρ))
[0020] Wherein, λ1 represents the first proportional coefficient, len(P) represents the data length of the filtered operating power sequence P, and max(ρ) represents the maximum power density value;
[0021] Relative distance threshold δ TD Set to:
[0022] δ TD =λ2×max(P)
[0023] Wherein, λ2 represents the second proportional coefficient, and max(P) represents the maximum power value in the filtered operating power sequence P.
[0024] Furthermore, in step S32, in the hidden semi-Markov model corresponding to an electrical appliance, a hidden working state corresponds to an observation sequence, and the observation value represents the power consumption of the electrical appliance, which is recorded as X=(x1, x2, ..., x T ), the hidden sequence of the appliance is recorded as Z = (z1, z2, ..., z N ), where the i-th hidden working state z i ∈{1,2,...,K}, T is the length of the observation sequence, K is the number of working states of the appliance, N is the length of the hidden sequence, d i corresponds to the working state of the electrical appliance i The duration of is a random integer variable;
[0025] The hidden semi-Markov model corresponding to an appliance is expressed as Φ = (π, A, B, F), the appliance initial state probability vector π represents the probability distribution of the appliance initial working state, the observation probability matrix B ~ N (μ, Σ) represents the probability matrix of the observation value generated by the corresponding appliance working state, where the parameter μ is the mean of the Gaussian distribution N(), Σ represents the power consumption corresponding to different working states of the appliance, and the working state transition probability matrix A = [a ij ] represents the transition probability matrix between the working states of the electrical appliances. represents the transition probability from the working state i of the appliance at time t to the state j at time t+1. The working state duration probability matrix F represents the probability distribution of the working state duration of the appliance. The probability density function of F is represented by Poisson distribution:
[0026]
[0027] Among them, ω is the parameter of Poisson distribution, and D represents the duration of the electrical appliance working state.
[0028] Furthermore, a hidden semi-Markov model corresponding to an appliance calculates its model parameters using a forward-backward algorithm, including the steps of:
[0029] S321. Define auxiliary variable αt (j) β t (i) as follows:
[0030]
[0031]
[0032]
[0033]
[0034] Among them, the forward probability α t (j) represents the power observation sequence x1,x2,...,x1 given the initial model parameter λ0. t and the joint probability that the appliance is in working state j at time t; forward probability It means that the power observation sequence x1,x2,...,x is given the initial parameter λ0 of the model. t and the joint probability that the appliance is in working state j at time t+1; the backward probability β t (i) represents the power observation sequence x when the hidden working state of the appliance is i at time t under the given model initial parameter λ0. t+1 ,x t+2 ,...,x T The conditional probability of It means that under the given model initial parameter λ0, when the hidden working state of the appliance at time t+1 is i, the power observation sequence is x t+1 ,x t+2 ,...,x T The conditional probability of
[0035] S322, according to the forward probability α t (j) is defined as follows, given the initial parameters The following recursive formula is obtained:
[0036]
[0037]
[0038] p j (d j ) indicates that the appliance is in working state j for a duration of d j The probability distribution of Indicates that from td j The hidden state of the time period from +1 to t is j and the observation sequence is x t-dj+1 ,x t-dj+2 ,...,xt probability; Represents td j The forward probability at time About t = td j Substitution The results obtained;
[0039] Similarly, given the initial parameter β T (i) = 1, we get the following recursive formula:
[0040]
[0041]
[0042] p i (d i ) indicates that the appliance is in working state i for a duration of d i The probability distribution of Indicates t+1 to t+d i The hidden state of the time period is i and the observation sequence is x t+1 ,x t+2 ,...,x t+di The probability of represents t+d i The backward probability β at time t (i), that is, t = t + d i Substitution The results obtained;
[0043] S323, forward probability α after recursion t (j) and the backward probability β t (i) Calculate three intermediate variables γ t (i), ξ t (i,j) and η t (i,d),γ t (i) represents the case where the initial model parameters λ0 and the power observation sequence X = (x1, x2, ..., x T ), the conditional probability that the appliance is in working state i at time t is γ t (i) = p(z t =i|X,λ0);ξ t (i, j) represents the probability that the working state of the appliance is transferred from i to j from time t to time t+1 under the given model initial parameters λ0 and power observation sequence X, that is, ξ t (i,j)=p(z t =i,z t+1=j|X,λ0); Given the model initial parameter λ0 and the power observation sequence X, η t (i, d) represents the probability that the appliance is in working state i at time t and the maximum duration is d, that is,
[0044] S324, using γ t (i), ξ t (i,j) and η t (i,d) Solve for the model parameters.
[0045] Furthermore, in step S323, γ t (i), ξ t (i,j) and η t (i,d) is calculated as follows:
[0046]
[0047]
[0048]
[0049] in, Indicates when the working state is i at time t α t (i) represents the α when the working state is i at time t t (j) Indicates the time t+1 when the working state is j Indicates time td i When the working state is i p(x t-d+1:t |i) represents the probability that working state i lasts for a maximum duration of d from time t-d+1 to time t.
[0050] Furthermore, in step S324, the model parameters are solved by iterative calculation using the following formula by giving the initial value of the model:
[0051]
[0052]
[0053]
[0054]
[0055]
[0056] in, are the calculated π, μ, Σ, and a of working state i at time tij .
[0057] Furthermore, the step S4 specifically includes the steps of:
[0058] S41. Define two intermediate variables δ t (j) and δ t (j) represents the most likely sequence of working states of some electrical appliances, which is in working state j at time t, and the power observation sequence is x1, x2, ..., x t , which can be expressed as It means that the appliance is in working state j at time t+1, and the power observation sequence is x1, x2, ..., x t The maximum probability is expressed as:
[0059] S42, given initial parameters According to the following formula recursion:
[0060]
[0061]
[0062]
[0063]
[0064] Represents td j Moment δ t (i) represents the δ in working state i at time t t (j), z t (j) represents the hidden working state of the appliance at time t, Indicates the hidden working state of the appliance at time t+1;
[0065] S43. When the recursion is completed, the estimated working state sequence of the electrical appliance is obtained. Get the total hidden working state S formed by the linear combination of all electrical working states;
[0066] S44, the working state of each electrical appliance is obtained according to the following relationship between the total hidden working state S and the working state of each electrical appliance:
[0067]
[0068] Where, M is the number of electrical appliances in the building, k (m) is the working status index number of the mth appliance, K (i)is the number of working states of the i-th appliance.
[0069] The present invention also provides a building energy consumption perception system, the key of which is that it includes a collection module, a filtering module, a load modeling module, and a load decomposition module respectively used to execute S1, S2, S3, and S4 described in the above method.
[0070] The present invention provides a building energy consumption perception method and system, which first uses an adaptive clustering algorithm to automatically determine the working status of electrical appliances. On this basis, a non-electrical feature, the working status time of electrical appliances, is introduced to train a separate Hidden Semi-Markov Model (HSMM) for each electrical appliance, and then an adaptive Factorial Hidden Semi-Markov Model (FHSMM) is constructed. The traditional HMM model ignores the relationship between the working status of electrical appliances and energy consumption. The present invention adopts an adaptive clustering method to automatically obtain the working status and corresponding power consumption of the electrical appliance according to its own power consumption information, thereby improving the accuracy of the model. In addition, the traditional HMM model only uses a single electrical feature for load modeling, which makes it difficult to effectively identify electrical appliances with similar characteristics. The present invention introduces the duration feature of the electrical appliance operating status, which can enhance the recognition performance of the traditional model for electrical appliances with similar characteristics. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 is a flow chart of a building energy consumption perception method provided by an embodiment of the present invention;
[0072] Figure 2 is a power waveform diagram of a dishwasher for one day provided by an embodiment of the present invention;
[0073] Figure 3 is a schematic diagram of a HSMM model provided by an embodiment of the present invention;
[0074] Figure 4 It is a schematic diagram of the FHSMM model provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0075] The following specifically illustrates the implementation mode of the present invention in conjunction with the accompanying drawings. The embodiments are provided for illustrative purposes only and are not to be construed as limitations of the present invention. The accompanying drawings are provided for reference and illustration only and do not constitute limitations on the scope of patent protection of the present invention, because many changes may be made to the present invention without departing from the spirit and scope of the present invention.
[0076] The embodiment of the present invention provides a building energy consumption sensing method, such as Figure 1 As shown, the steps include:
[0077] S1. Collect the operating power sequence of electrical appliances in the building;
[0078] S2, filtering the collected operating power sequence by using a mean filtering method;
[0079] S3, using the filtered operating power sequence to establish a load model of the building; specifically comprising the steps of:
[0080] S4. Using the established load model, estimate the electrical appliance working state sequence corresponding to the current building power consumption data.
[0081] (1) Regarding step S1
[0082] According to the sampling frequency f, the power data is collected by using a sampling device. The sampling frequency is set to f = 1, that is, one power data is sampled per second.
[0083] (2) Regarding step S2
[0084] The calculation formula of mean filtering used in this step is as follows:
[0085]
[0086] Among them, V mean As the corresponding window The output value at position, x i is the i-th sample value of the input, and L is the filter window size.
[0087] (3) Regarding step S3
[0088] Step S3 specifically includes the following steps:
[0089] S31, using an adaptive clustering algorithm to automatically determine the working state of the electrical appliance corresponding to the filtered operating power sequence;
[0090] S32, establish a hidden semi-Markov model for each appliance;
[0091] S33. Combining the hidden semi-Markov model of each electrical appliance to construct a factor hidden semi-Markov model to obtain the load model of the building.
[0092] Step S31 specifically includes the following steps:
[0093] S311, calculate the filtered operating power sequence P = [p1, p2, ..., p T ](p i represents the power corresponding to time i, T is the length of the sequence), where the power point p at time i is i The density ρ i Defined as the power point p i is the center of the circle, dc is the number of all sampling points within the circle with a radius of p. i The relative distance δ i Defined as the power point p i Minimum distance to a higher power point; power point p i With other power points p j The distance between ij and density ρ i The calculation formulas are as follows:
[0094]
[0095]
[0096] Where I represents the power sampling point set, χ(x) represents a binary function, and:
[0097]
[0098] S312, setting density threshold ρ TD and the relative distance threshold δ TD .
[0099] However, the cluster centers of the traditional density peak clustering method need to be manually selected according to the distance-density decision diagram, which is not easy to promote. Therefore, the present invention proposes to select the cluster centers by setting two thresholds.
[0100] Density threshold ρ TD Set to:
[0101] ρ TD =λ1×(len(P)-max(ρ))
[0102] Wherein, λ1 represents the first proportional coefficient, len(P) represents the data length of the filtered operating power sequence, and max(ρ) represents the maximum power density value.
[0103] Relative distance threshold δ TD Set to:
[0104] δ TD =λ2×max(P)
[0105] Wherein, λ2 represents the second proportional coefficient, and max(P) represents the maximum power value in the filtered operating power sequence.
[0106] Considering that electrical appliances are in the OFF state for a long time and the frequency of using electrical appliances is low, the distribution of the working states of electrical appliances is very skewed. Figure 2As shown in FIG. 1 , it can be seen from the power waveform of the dishwasher in the REDD data set for one day that the dishwasher is in the off state for a long time. Therefore, in order to reduce the impact of the skewed distribution of the working state, this paper sets the threshold λ1 to be 1% of the total data length minus the maximum density value. Considering that the power of the electrical equipment has a normal fluctuation range, this paper sets the threshold λ2 to be 10% of the maximum power value. That is, in this embodiment, the first proportional coefficient λ1 is set to 1% and the second proportional coefficient λ2 is set to 10%.
[0107] S313, density ρ i and the relative distance δ i are greater than the density threshold ρ TD and the relative distance threshold δ TD The power point p i As a cluster center, the density peak clustering method is used to cluster the filtered operating power sequence to determine the working status of each appliance.
[0108] Next, after the working state of each electrical appliance is determined by using the adaptive clustering algorithm, a hidden semi-Markov model (HSMM model) is established for each electrical appliance, namely step S32.
[0109] In step S32, Figure 3 As shown in the hidden semi-Markov model corresponding to an appliance, a hidden working state corresponds to an observation sequence, and the observation value represents the power consumption of the appliance, which is recorded as X = (x1, x2, ..., x T ), the hidden sequence of the appliance is recorded as Z = (z1, z2, ..., z N ), where the i-th hidden working state z i ∈{1,2,...,K}, T is the length of the observation sequence, K is the number of working states of the appliance, N is the length of the hidden sequence, d i corresponds to the working state of the electrical appliance i The duration of is a random integer variable. The working state Z represents the power consumption of the appliance. For example, a hair dryer has three gears: off, low speed, and high speed. Z has three gears: 1, 2, and 3. 1 represents the off gear, and the power at this time is 0. 2 represents the low speed gear, and the power P is 500W. 3 represents the high speed gear, and the power P is 1000W.
[0110] The hidden semi-Markov model corresponding to an appliance is expressed as Φ = (π, A, B, F). The appliance initial state probability vector π represents the probability distribution of the appliance initial working state. The observation probability matrix B represents the probability matrix of the observation value generated by the corresponding appliance working state. Considering that the power signal of the appliance changes over time, the Gaussian distribution is used to represent the power consumption distribution of each appliance. Then the observation probability matrix B satisfies B ~ N (μ, Σ). The parameter μ is the mean of the Gaussian distribution, which represents the power consumption corresponding to different working states of the appliance. The working state transition probability matrix A = [a ij ] represents the transition probability matrix between the working states of the electrical appliances. represents the transition probability from the working state i of the appliance at time t to the state j at time t+1. The working state duration probability matrix F represents the probability distribution of the working state duration of the appliance. The probability density function of F is represented by Poisson distribution:
[0111]
[0112] Among them, ω is the parameter of Poisson distribution, and D represents the duration of the electrical appliance working state.
[0113] The HSMM model can use the forward-backward algorithm to calculate its model parameters. The hidden semi-Markov model corresponding to an appliance uses the forward-backward algorithm to calculate its model parameters, including the steps:
[0114] S321. Define auxiliary variable α t (j) β t (i) as follows:
[0115]
[0116]
[0117]
[0118]
[0119] Among them, the forward probability α t (j) indicates the power observation sequence x1,x2,...,x1 given the initial model parameter λ0. t and the joint probability that the appliance is in working state j at time t; forward probability It means that the power observation sequence x1,x2,...,x is given the initial parameter λ0 of the model. t and the joint probability that the appliance is in working state j at time t+1; the backward probability β t(i) represents the power observation sequence x when the hidden working state of the appliance is i at time t under the given model initial parameter λ0. t+1 ,x t+2 ,...,x T The conditional probability of It means that under the given model initial parameter λ0, when the hidden working state of the appliance at time t+1 is i, the power observation sequence is x t+1 ,x t+2 ,...,x T The conditional probability of
[0120] S322, according to the forward probability α t (j) is defined as follows, given the initial parameters The following recursive formula is obtained:
[0121]
[0122]
[0123] p j (d j ) indicates that the appliance is in working state j for a duration of d j The probability distribution of Indicates that from td j The hidden state of the time period from +1 to t is j and the observation sequence is x t-dj+1 ,x t-dj+2 ,...,x t probability; Represents td j The forward probability at time About t = td j Substitution The results obtained;
[0124] Similarly, given the initial parameter β T (i) = 1, we get the following recursive formula:
[0125]
[0126]
[0127] p i (d i ) indicates that the appliance is in working state i for a duration of d i The probability distribution of Indicates t+1 to t+d i The hidden state of the time period is i and the observation sequence is The probability of represents t+d iThe backward probability β at time t (i), that is, t = t + d i Substitution The results obtained;
[0128] S323, forward probability α after recursion t (j) and the backward probability β t (i) Calculate three intermediate variables γ t (i), ξ t (i,j) and η t (i,d),γ t (i) represents the case where the initial model parameters λ0 and the power observation sequence X = (x1, x2, ..., x T ), the conditional probability that the appliance is in working state i at time t is γ t (i) = p(z t =i|X,λ0);ξ t (i, j) represents the probability that the working state of the appliance is transferred from i to j from time t to time t+1 under the given model initial parameters λ0 and power observation sequence X, that is, ξ t (i,j)=p(z t =i,z t+1 =j|X,λ0); Given the model initial parameter λ0 and the power observation sequence X, η t (i, d) represents the probability that the appliance is in working state i at time t and the maximum duration is d, that is,
[0129] γ t (i), ξ t (i,j) and η t (i,d) is calculated as follows:
[0130]
[0131]
[0132]
[0133] Indicates when the working state is i at time t α t (i) represents the α when the working state is i at time t t (j) Indicates the time t+1 when the working state is j Indicates time td i When the working state is i p(xt-d+1:t |i) represents the probability that working state i lasts for a maximum duration of d from time t-d+1 to time t;
[0134] S324, using γ t (i), ξ t (i,j) and η t (i, d) solves the model parameters, specifically:
[0135] By giving the initial value of the model, the following formula is used to iteratively calculate and solve the model parameters:
[0136]
[0137]
[0138]
[0139]
[0140]
[0141] in, are the calculated model parameters π, μ, Σ, and a of the working state i at time t ij .
[0142] Given the initial value of the HSMM model, the parameters of the HSMM model can be obtained by iterative calculation using the above formula. The structure of the HSMM model is as follows: Figure 3 Assume that the number of working states of the appliance is K, then the initial probability distribution of the appliance is π = [1 / K] K×1 , the electrical appliance state transition probability matrix is A = [1 / K] K×K . The observation probability matrix B satisfies B~N(μ,Σ). Wherein μ is the mean of the Gaussian distribution, which represents the power consumption corresponding to different working states of the electrical appliance, and its initial value is generally obtained by a clustering method. The traditional HSMM method simplifies the number of working states of all electrical appliances to 2 (representing the on and off states of the electrical appliances), and obtains its power consumption through the k-means clustering method. The present invention adaptively determines the working state of each electrical appliance and its corresponding power consumption through an adaptive clustering method, and can obtain more accurate results.
[0143] Finally, considering that the Factorial Hidden Semi-Markov Model (FHSMM) decomposes the high-dimensional matrix in the traditional HSMM model into a combination of multiple low-dimensional matrices, the computational complexity of the traditional HSMM model is effectively reduced. Therefore, the present invention combines the HSMM model of each electrical appliance to construct an FHSMM model (step S33). The model is composed of a combination of multiple HSMM models, in which the power observation value at a certain moment is equal to the sum of the power observation values corresponding to the working states of multiple electrical appliances, that is, the total electrical appliance hidden working state sequence S. The structure of the proposed FHSMM model is as follows Figure 4 shown.
[0144] (4) Regarding step S4
[0145] Step S4 specifically includes the following steps:
[0146] S41. Define two intermediate variables δ t (j) and δ t (j) represents the most likely sequence of working states of some electrical appliances, which is in working state j at time t, and the power observation sequence is x1, x2, ..., x t , which can be expressed as It means that the appliance is in working state j at time t+1, and the power observation sequence is x1, x2, ..., x t The maximum probability is expressed as:
[0147] S42, given initial parameters According to the following formula recursion:
[0148]
[0149]
[0150]
[0151]
[0152] Represents td j Moment δ t (i) represents the δ in working state i at time t t (j), z t (j) represents the hidden working state of the appliance at time t, Indicates the hidden working state of the appliance at time t+1;
[0153] S43. When the recursion is completed, the estimated working state sequence of the electrical appliance is obtained. Get the total hidden working state S formed by the linear combination of all electrical working states;
[0154] S44, the working state of each electrical appliance is obtained according to the following relationship between the total hidden working state S and the working state of each electrical appliance:
[0155]
[0156] Where, M is the number of electrical appliances in the building, k (m) is the working status index number of the mth appliance, K (i) is the number of working states of the i-th appliance.
[0157] An embodiment of the present invention further provides a building energy consumption perception system, which includes a collection module, a filtering module, a load modeling module, and a load decomposition module, which are respectively used to execute S1, S2, S3, and S4 in the above method.
[0158] As an example of specific implementation, the present invention is generally used in energy perception monitoring systems for government and enterprise buildings. In this case, the grid-connected power system uses a material system and a non-invasive load decomposition device to jointly implement the method and system of the present invention to automatically monitor the energy consumption of electrical appliances in government and enterprise buildings, so that the power supply terminals and power grid companies can further adopt power consumption strategies. The present invention uses the public data set REDD to verify the superiority of this method. Considering that electrical appliances with high power consumption in government and enterprise buildings are usually large-scale power-consuming equipment such as lighting and air-conditioning and heating systems, lamps, refrigerators, dishwashers, dryers and microwave ovens in the REDD data set are selected as experimental objects. The electrical appliance power consumption data from 2011-04-19 to 2011-04-25 in House 1 is used as the training set, and the total power consumption data from 2011-04-25 to 2011-05-01 is used as the test set. F1-score, Accuracy and MAE are selected as evaluation indicators. The results are shown in Table 1.
[0159] Table 1
[0160]
[0161] According to the results in Table 1, for the F1-score index, this method is 35% higher than the basic method Mean and 16% higher than the traditional FHMM method. For the MAE index, this method is 51% higher than the basic method Mean and 39% higher than the traditional FHMM method. For the Accuracy index, this method is 77% higher than the basic method Mean and 14% higher than the traditional FHMM method, and the correct recognition rate of electrical working status has reached 93%. In the actual application of energy monitoring in some government and enterprise buildings in a certain city, the correct recognition rate of electrical working status reached 93%, and the average absolute error of energy consumption was reduced by 39%. By real-time sampling and optimizing electricity consumption behavior, electricity consumption is reduced. This technology has played an important role in improving energy utilization efficiency and saving energy.
[0162] In summary, the building energy consumption perception method and system provided by the embodiment of the present invention firstly utilizes an adaptive clustering algorithm to automatically determine the working state of electrical appliances. On this basis, a non-electrical feature, the working state time of electrical appliances, is introduced to train a separate Hidden Semi-Markov Model (HSMM) for each electrical appliance, and then an adaptive Factorial Hidden Semi-Markov Model (FHSMM) is constructed. The traditional HMM model ignores the relationship between the working state of electrical appliances and energy consumption. The present invention adopts an adaptive clustering method to automatically obtain the working state and corresponding power consumption of the electrical appliances according to their own power consumption information, thereby improving the accuracy of the model. In addition, the traditional HMM model only uses a single electrical feature for load modeling, and it is difficult to effectively identify electrical appliances with similar characteristics. The present invention introduces the duration feature of the electrical appliance operating state, which can enhance the recognition performance of the traditional model for electrical appliances with similar characteristics.
[0163] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A building energy consumption sensing method, characterized in that: Includes steps: S1. Collect the operating power sequence of electrical appliances in the building; S2, filtering the collected operating power sequence by using a mean filtering method; S3, using the filtered operating power sequence to establish a load model of the building; specifically comprising the steps of: S31, using an adaptive clustering algorithm to automatically determine the working state of the electrical appliance corresponding to the filtered operating power sequence; the step S31 specifically includes the following steps: S311, calculate the density and relative distance of each power point in the filtered operating power sequence, where the power point p at time i i The density ρ i Defined as the power point p i is the center of the circle, d c is the number of all sampling points within the circle with a radius of p. i The relative distance δ i Defined as the power point p i Minimum distance to higher power points; S312, setting density threshold ρ TD and the relative distance threshold δ TD ; Density threshold ρ TD Set to: r TD =λ1×(len(P)-max(ρ)) Wherein, λ1 represents the first proportional coefficient, len(P) represents the data length of the filtered operating power sequence P, and max(ρ) represents the maximum power density value; Relative distance threshold δ TD Set to: d TD =λ2×max(P) Wherein, λ2 represents the second proportional coefficient, and max(P) represents the maximum power value in the filtered operating power sequence P; S313, density ρ i and the relative distance δ i are greater than the density threshold ρ TD and the relative distance threshold δ TD The power point p i As a cluster center, the density peak clustering method is used to cluster the filtered operating power sequence to determine the working status of each appliance; S32, establish a hidden semi-Markov model for each appliance; S33, combining the hidden semi-Markov model of each electrical appliance to construct a factor hidden semi-Markov model to obtain a load model of the building; S4, using the established load model to estimate the electrical appliance working state sequence corresponding to the current building power consumption data; The step S4 specifically comprises the following steps: S41. Define two intermediate variables δ t (j) and δ t (j) represents the most likely sequence of working states of some electrical appliances, which is in working state j at time t, and the power observation sequence is x1, x2, ..., x t , which can be expressed as It means that the appliance is in working state j at time t+1, and the power observation sequence is x1, x2, ..., x t The maximum probability is expressed as: S42, given initial parameters According to the following formula recursion: Represents td j Moment δ t (i) represents the δ in working state i at time t t (j), z t (j) represents the hidden working state of the appliance at time t, Indicates the hidden working state of the appliance at time t+1; S43. When the recursion is completed, the estimated working state sequence of the electrical appliance is obtained. Get the total hidden working state S formed by the linear combination of all electrical working states; S44, the working state of each electrical appliance is obtained according to the following relationship between the total hidden working state S and the working state of each electrical appliance: Where, M is the number of electrical appliances inside the building, k (m) is the working status index number of the mth appliance, K (i) is the number of working states of the i-th appliance.
2. A building energy consumption sensing method according to claim 1, characterized in that: In step S32, in the hidden semi-Markov model corresponding to an electrical appliance, a hidden working state corresponds to an observation sequence, and the observation value represents the power consumption of the electrical appliance, which is recorded as X = (x1, x2, ..., x T ), the hidden sequence of the appliance is recorded as Z = (z1, z2, ..., z N ), where the i-th hidden working state z i ∈{1,2,...,K}, T is the length of the observation sequence, K is the number of working states of the appliance, N is the length of the hidden sequence, d i corresponds to the working state of the electrical appliance i The duration of is a random integer variable; The hidden semi-Markov model corresponding to an appliance is expressed as Φ = (π, A, B, F), the appliance initial state probability vector π represents the probability distribution of the appliance initial working state, the observation probability matrix B ~ N (μ, Σ) represents the probability matrix of the observation value generated by the corresponding appliance working state, where the parameter μ is the mean of the Gaussian distribution N(), Σ represents the power consumption corresponding to different working states of the appliance, and the working state transition probability matrix A = [a ij ] represents the transition probability matrix between the working states of the electrical appliances. represents the transition probability from the working state i of the appliance at time t to the state j at time t+1. The working state duration probability matrix F represents the probability distribution of the working state duration of the appliance. The probability density function of F is represented by Poisson distribution: Among them, ω is the parameter of Poisson distribution, and D represents the duration of the electrical appliance working state.
3. A building energy consumption sensing method according to claim 2, characterized in that: The hidden semi-Markov model corresponding to an appliance uses a forward-backward algorithm to calculate its model parameters, including the following steps: S321. Define auxiliary variable α t (j) β t (i) as follows: Among them, the forward probability α t (j) indicates the power observation sequence x1,x2,...,x1 given the initial model parameter λ0. t and the joint probability that the appliance is in working state j at time t; forward probability It means that the power observation sequence x1,x2,...,x is given the initial parameter λ0 of the model. t and the joint probability that the appliance is in working state j at time t+1; the backward probability β t (i) represents the power observation sequence x when the hidden working state of the appliance is i at time t under the given model initial parameter λ0. t+1 ,x t+2 ,...,x T The conditional probability of It means that under the given model initial parameter λ0, when the hidden working state of the appliance at time t+1 is i, the power observation sequence is x t+1 ,x t+2 ,...,x T The conditional probability of S322, according to the forward probability α t (j) is defined as follows, given the initial parameters The following recursive formula is obtained: p j (d j ) indicates that the appliance is in working state j for a duration of d j The probability distribution of Indicates that from td j The hidden state of the time period from +1 to t is j and the observation sequence is x t-dj+1 ,x t-dj+2 ,...,x t The probability of Represents td j The forward probability at time About t = td j Substitution The results obtained; Similarly, given the initial parameter β T (i) = 1, we get the following recursive formula: p i (d i ) indicates that the appliance is in working state i for a duration of d i The probability distribution of Indicates t+1 to t+d i The hidden state of the time period is i and the observation sequence is The probability of represents t+d i The backward probability β at time t (i), that is, t = t + d i Substitution The results obtained; S323, forward probability α after recursion t (j) and the backward probability β t (i) Calculate three intermediate variables γ t (i), ξ t (i,j) and η t (i,d),γ t (i) represents the case where the initial model parameters λ0 and the power observation sequence X = (x1, x2, ..., x T ), the conditional probability that the appliance is in working state i at time t is γ t (i) = p(z t =i|X,λ0);ξ t (i, j) represents the probability that the working state of the appliance is transferred from i to j from time t to time t+1 under the given model initial parameters λ0 and power observation sequence X, that is, ξ t (i,j)=p(z t =i,z t+1 =j|X,λ0); Given the model initial parameter λ0 and the power observation sequence X, η t (i, d) represents the probability that the appliance is in working state i at time t and the maximum duration is d, that is, S324, using γ t (i), ξ t (i,j) and η t (i,d) Solve for the model parameters.
4. A building energy consumption sensing method according to claim 3, characterized in that: In step S323, γ t (i), ξ t (i,j) and η t (i,d) is calculated as follows: in, Indicates when the working state is i at time t α t (i) represents the α when the working state is i at time t t (j) Indicates the time t+1 when the working state is j Indicates time td i When the working state is i p(x t-d+1:t |i) represents the probability that working state i lasts for a maximum duration of d from time t-d+1 to time t.
5. A building energy consumption sensing method according to claim 4, characterized in that: In step S324, the model parameters are solved by iterative calculation using the following formula given the initial value of the model: in, are the calculated model parameters π, μ, Σ, and a of the working state i at time t ij .
6. A building energy consumption sensing system, characterized in that: It includes a collection module, a filtering module, a load modeling module, and a load decomposition module, which are respectively used to execute S1, S2, S3, and S4 described in any one of claims 1 to 5.
