Non-invasive load decomposition method based on improved genetic algorithm
Technical Field
The invention relates to the technical field of non-invasive load decomposition, in particular to a non-invasive load decomposition method based on an improved genetic algorithm.
Background
With the advent of the big data era, how to effectively analyze information by using load historical data becomes a current hotspot problem. The intelligent power utilization is used as a key part of a strong intelligent power grid, flexible two-way interaction between the power grid and a user can be realized, load monitoring is an important link of the intelligent power utilization, on one hand, the user can be guided to improve power utilization habits, the power utilization cost is saved, on the other hand, the power grid can be helped to deeply analyze power utilization behaviors of the user, and the intelligent power utilization has important practical significance for load peak regulation, energy conservation and emission reduction.
Compared with the traditional intrusive load decomposition, the non-intrusive load decomposition has the characteristics of strong operability, low cost, simplicity in popularization and the like. The non-invasive load decomposition technology can utilize total load data recorded in the intelligent electric meter to analyze the working state and the energy consumption level of various electrical appliances through a load analysis module. The current non-invasive load decomposition technology mostly uses transient characteristics to complete load identification, the transient characteristics can be obtained under the condition of high-frequency sampling, and the state identification precision of various electrical appliances under the condition of low frequency is not high.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a non-invasive load decomposition method based on an improved genetic algorithm, and a new penalty item is fused into a target function of the genetic algorithm, so that the probability of working state combination is as large as possible, and the accuracy of load identification can be effectively improved.
In order to solve the problems, the technical scheme adopted by the invention is as follows:
a non-invasive load decomposition method based on an improved genetic algorithm comprises the following steps:
step S1, inputting load history data;
step S2, extracting power characteristics of each state of the load, and marking a load state label on the load historical data in the step S1;
step S3, counting the probability of each load state combination appearing in the load history data;
step S4, inputting total load power data to be decomposed, and completing optimization iteration according to an improved genetic algorithm;
in step S5, the load split result is output.
As a further improvement of the present invention,
in step S1, the input load history data is the power value of each sampling point of each load electrical appliance in the history period;
the historical period is 1 minute or more.
As a further improvement of the present invention,
in step S2, the historical data power points of the load electrical appliance are clustered and analyzed by a clustering algorithm, each data point is classified, i.e., a load state label is marked, and a representative power value of each class center point is output as a load power template as follows:
P=[p1p2… pm](1);
where m is the total number of states of the load appliance, pmThe power characteristic value of the mth state of the load electric appliance. AsIn a further development of the invention,
in step S3, the method for counting the probability of occurrence of each load state combination in the history data includes the steps of:
step S31, after the load state data is labeled in step S2, the state combination vector L of the load electric appliance at each historical moment is output;
step S32, counting the occurrence frequency of each different load state combination vector, counting the time point when the state combination vector is a certain load state combination in each sampling point of the historical data, wherein the number is the occurrence frequency of the load state combination;
in step S33, the total number of sampling points of the history data is set as W, and the number of occurrences of the load state combination vector L is set as C
LThen the probability of occurrence in the history data of the load status combination vector L is
As a further improvement of the present invention,
in step S32, the number of electric appliances is one or more, and the electric appliance states are classified into 1 state and 2 state.
As a further improvement of the present invention,
when the number of the electrical appliances is 3, assuming that the states of the 3 electrical appliances are respectively a 1 state, a 2 state and a 1 state, the load state combination vector is [1,2,1 ]; and counting the time points of the state combination vector [1,2,1] in each sampling point of the historical data, wherein the number of the time points is the occurrence frequency.
As a further improvement of the present invention,
introducing a penalty function term of occurrence probability, and in step S4, setting an objective function of the genetic algorithm as follows:
where i is the appliance number, C is the total number of appliances, P is the total load power, L is the load status combination, Li is the status number of the ith load, HLIs the probability of occurrence of the combination of load states.
As a further improvement of the present invention,
in the chromosome coding scheme in the genetic algorithm, the length of a chromosome is the number of load appliances, and each position point represents the state number of different loads.
As a further improvement of the present invention,
chromosome mutation, i.e., the state number of a point load at a certain position, changes within the state range of the load, and chromosome crossing, i.e., the state numbers of point loads at the same position of two chromosomes are exchanged.
As a further improvement of the present invention,
and carrying out mutation, intersection and selection operations by improving a genetic algorithm, calculating a function value according to the objective function, outputting the optimal offspring and finishing load decomposition.
Adopt the produced beneficial effect of above-mentioned technical scheme to lie in:
the invention relates to the technical field of non-invasive load decomposition, in particular to a non-invasive load decomposition method based on an improved genetic algorithm. Designing a new penalty function to make the result of the non-invasive load decomposition closer to the actual situation. Aiming at the problem of low load state identification degree in the traditional non-invasive load decomposition method, the power characteristics of the load are selected as basic characteristics, the load decomposition problem is converted into a combined optimization problem according to a linear superposition principle, namely the total load power is approximately equal to the sum of the power of each decomposed load device, a new penalty item is fused into a target function of a genetic algorithm, the probability of working state combination is made to be as large as possible, and the accuracy of load identification can be effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow chart of the steps of the present invention;
FIG. 2 is a schematic illustration of a chromosome coding scheme according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a chromosome coding scheme in example two of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the application, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
The relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise. Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description. Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate. In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting.
Thus, other examples of the exemplary embodiments may have different values. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
In the description of the present application, it is to be understood that the orientation or positional relationship indicated by the directional terms such as "front, rear, upper, lower, left, right", "lateral, vertical, horizontal" and "top, bottom", etc., are generally based on the orientation or positional relationship shown in the drawings, and are used for convenience of description and simplicity of description only, and in the case of not making a reverse description, these directional terms do not indicate and imply that the device or element being referred to must have a particular orientation or be constructed and operated in a particular orientation, and therefore, should not be considered as limiting the scope of the present application; the terms "inner and outer" refer to the inner and outer relative to the profile of the respective component itself.
Example one
As shown in figures 1 and 2 of the drawings,
a non-invasive load decomposition method based on an improved genetic algorithm comprises the following steps:
step S1, inputting load history data;
step S2, extracting power characteristics of each state of the load, and marking a load state label on the load historical data in the step S1;
step S3, counting the probability of each load state combination appearing in the load history data;
step S4, inputting total load power data to be decomposed, and completing optimization iteration according to an improved genetic algorithm;
in step S5, the load split result is output.
As a further improvement of the present invention,
in step S1, the input load history data is the power value of each sampling point of each load electrical appliance in the history period;
the historical period is 1 minute or more.
As a further improvement of the present invention,
in step S2, the historical data power points of the load electrical appliance are clustered and analyzed by a clustering algorithm, each data point is classified, i.e., a load state label is marked, and a representative power value of each class center point is output as a load power template as follows:
P=[p1p2… pm](1);
where m is the total number of states of the load appliance, pmThe power characteristic value of the mth state of the load electric appliance.
As a further improvement of the present invention,
in step S3, the method for counting the probability of occurrence of each load state combination in the history data includes the steps of:
step S31, after the load state data is labeled in step S2, the state combination vector L of the load electric appliance at each historical moment is output;
step S32, counting the occurrence frequency of each different load state combination vector, counting the time point when the state combination vector is a certain load state combination in each sampling point of the historical data, wherein the number is the occurrence frequency of the load state combination;
in step S33, the total number of sampling points of the history data is set as W, and the number of occurrences of the load state combination vector L is set as C
LThen the probability of occurrence in the history data of the load status combination vector L is
As a further improvement of the present invention,
in step S32, the number of electric appliances is one or more, and the electric appliance states are classified into 1 state and 2 state.
As a further improvement of the present invention,
introducing a penalty function term of occurrence probability, and in step S4, setting an objective function of the genetic algorithm as follows:
where i is the appliance number, C is the total number of appliances, P is the total load power, L is the load status combination, Li is the status number of the ith load, HLIs the probability of occurrence of the combination of load states.
As a further improvement of the present invention,
in the chromosome coding scheme in the genetic algorithm, the length of a chromosome is the number of load appliances, and each position point represents the state number of different loads.
As a further improvement of the present invention,
chromosome mutation, i.e., the state number of a point load at a certain position, changes within the state range of the load, and chromosome crossing, i.e., the state numbers of point loads at the same position of two chromosomes are exchanged.
As a further improvement of the present invention,
and carrying out mutation, intersection and selection operations by improving a genetic algorithm, calculating a function value according to the objective function, outputting the optimal offspring and finishing load decomposition.
Example two
As shown in figures 1 and 3 of the drawings,
a non-invasive load decomposition method based on an improved genetic algorithm comprises the following steps:
step S1, inputting load history data;
step S2, extracting power characteristics of each state of the load, and marking a load state label on the load historical data in the step S1;
step S3, counting the probability of each load state combination appearing in the load history data;
step S4, inputting total load power data to be decomposed, and completing optimization iteration according to an improved genetic algorithm;
in step S5, the load split result is output.
As a further improvement of the present invention,
in step S1, the input load history data is the power value of each sampling point of each load electrical appliance in the history period;
the historical period is 1 minute or more.
As a further improvement of the present invention,
in step S2, the historical data power points of the load electrical appliance are clustered and analyzed by a clustering algorithm, each data point is classified, i.e., a load state label is marked, and a representative power value of each class center point is output as a load power template as follows:
P=[p1p2… pm](1);
where m is the total number of states of the load appliance, pmThe power characteristic value of the mth state of the load electric appliance. As a further improvement of the present invention,
in step S3, the method for counting the probability of occurrence of each load state combination in the history data includes the steps of:
step S31, after the load state data is labeled in step S2, the state combination vector L of the load electric appliance at each historical moment is output;
step S32, counting the occurrence frequency of each different load state combination vector, counting the time point when the state combination vector is a certain load state combination in each sampling point of the historical data, wherein the number is the occurrence frequency of the load state combination;
in step S33, the total number of sampling points of the history data is set as W, and the number of occurrences of the load state combination vector L is set as C
LThen the probability of occurrence in the history data of the load status combination vector L is
As a further improvement of the present invention,
in step S32, the number of electric appliances is one or more, and the electric appliance states are classified into 1 state and 2 state.
As a further improvement of the present invention, as shown in figure 3,
when the number of the electrical appliances is 3, assuming that the states of the 3 electrical appliances are respectively a 1 state, a 2 state and a 1 state, the load state combination vector is [1,2,1 ]; and counting the time points of the state combination vector [1,2,1] in each sampling point of the historical data, wherein the number of the time points is the occurrence frequency.
As a further improvement of the present invention,
introducing a penalty function term of occurrence probability, and in step S4, setting an objective function of the genetic algorithm as follows:
where i is the appliance number, C is the total number of appliances, P is the total load power, L is the load status combination, Li is the status number of the ith load, HLIs the probability of occurrence of the combination of load states.
As a further improvement of the present invention,
in the chromosome coding scheme in the genetic algorithm, the length of a chromosome is the number of load appliances, and each position point represents the state number of different loads.
As a further improvement of the present invention,
chromosome mutation, i.e., the state number of a point load at a certain position, changes within the state range of the load, and chromosome crossing, i.e., the state numbers of point loads at the same position of two chromosomes are exchanged.
As a further improvement of the present invention,
and carrying out mutation, intersection and selection operations by improving a genetic algorithm, calculating a function value according to the objective function, outputting the optimal offspring and finishing load decomposition.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; it is obvious as a person skilled in the art to combine several aspects of the invention. And such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.