Disclosure of Invention
In order to solve the defects of the prior art, the simulation data generation method and system for electricity utilization behavior prediction are provided, on the basis of decomposing the real electricity utilization data load of a resident user by using a non-invasive load decomposition method, the model is corrected by adopting an improved cross entropy algorithm, and load decomposition data are generated in real time; predicting the type of the single user electrical equipment by using the obtained decomposition data; the simulation power data are generated in a large scale according to the power parameters and the use rule of the electric equipment, and the speed and the accuracy of data generation are improved under the condition of ensuring the authenticity of the generated data.
In order to achieve the purpose, the following technical scheme is adopted in the disclosure:
the first aspect of the present disclosure provides a simulation data generation method for power usage behavior prediction.
A simulation data generation method for power utilization behavior prediction comprises the following steps:
acquiring a normal power utilization data sample of a user within a preset time period;
according to active power data in the electricity utilization data samples, carrying out non-invasive load decomposition on the electricity utilization equipment by using an improved cross entropy algorithm;
obtaining the operation rule of each electric device according to the load decomposition result of the electric device;
generating simulation data by using a time sequence method according to the operation data and the operation rule of each piece of electric equipment of a single user;
and synthesizing the simulation data of all the electric equipment of a single user and outputting the simulation data of the user simulation electricity consumption.
A second aspect of the present disclosure provides a simulation data generation system for electricity usage behavior prediction.
A simulation data generation system for electricity usage behavior prediction, comprising:
a data acquisition module configured to: acquiring a normal power utilization data sample of a user within a preset time period;
a load splitting module configured to: according to active power data in the electricity utilization data samples, carrying out non-invasive load decomposition on the electricity utilization equipment by using an improved cross entropy algorithm;
an operation rule acquisition module configured to: obtaining the operation rule of each electric device according to the load decomposition result of the electric device;
each electric equipment simulation data generation module is configured to: generating simulation data by using a time sequence method according to the operation data and the operation rule of each piece of electric equipment of a single user;
a user simulation data generation module configured to: and synthesizing the simulation data of all the electric equipment of a single user and outputting the simulation data of the user simulation electricity consumption.
A third aspect of the present disclosure provides a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements the steps in the simulation data generation method for electricity usage behavior prediction according to the first aspect of the present disclosure.
A fourth aspect of the present disclosure provides an electronic device, including a memory, a processor, and a program stored on the memory and executable on the processor, where the processor executes the program to implement the steps in the simulation data generation method for electricity usage behavior prediction according to the first aspect of the present disclosure.
Compared with the prior art, the beneficial effect of this disclosure is:
1. the method, the system, the medium or the electronic equipment disclosed by the disclosure are based on an improved cross entropy genetic algorithm, the electricity utilization behavior of a resident user is simulated on the basis of non-invasive load decomposition, the cross entropy algorithm is utilized to solve the problem of combination optimization of the load decomposition, the accuracy of the algorithm can be maintained or improved on the basis of not using a training data set, meanwhile, the execution efficiency of the algorithm is improved, and the dependency of the algorithm on the data set is reduced; the real-time performance of the load decomposition process and the data generation process is ensured, and a massive power consumption sample data set is generated through actual data simulation, so that the data generation of a digital electric energy meter in the comprehensive energy simulation system is supported, and a large data base is provided for the operation of a simulation system.
2. According to the method, the system, the medium or the electronic equipment, in a data decomposition stage before generation of simulation data, the smooth parameters in the traditional genetic cross entropy algorithm are improved while multiple operation states of the electric equipment are considered, the power conversion times of the electric equipment in single iteration are added into the algorithm, the accuracy and the operation efficiency of the algorithm are improved, and convenience is provided for subsequent generation of the simulation data.
3. According to the method, the system, the medium or the electronic equipment, in the stage of generating the predicted data of the single electric equipment, the simple autoregressive time series model is used for generating the predicted data, the periodic characteristic of the electric power data of the residential electric equipment is considered, and the influence of a complex algorithm on the model timeliness is avoided.
4. Compared with the traditional data generation method which directly utilizes a genetic algorithm or a time sequence algorithm, the method, the system, the medium or the electronic equipment can improve the data generation efficiency and scale, and can give the number and the types of simulation equipment of simulation data in an explicit mode, so that the energy metering business is better served.
Advantages of additional aspects of the disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the disclosure.
Detailed Description
The present disclosure is further described with reference to the following drawings and examples.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.
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 disclosure. 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.
It should be noted that the following description is only for explaining the present invention, and does not limit the data content thereof; in practical application, a data source needs to directly call sampling data from a real acquisition system, and needs to investigate or estimate the type of the electric equipment of a resident user and give an operating power parameter of the electric equipment.
The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
Example 1:
as shown in fig. 1, an embodiment 1 of the present disclosure provides a simulation data generation method for electricity consumption behavior prediction, including the following steps:
acquiring a normal power utilization data sample of a user within a preset time period;
according to active power data in the electricity utilization data samples, carrying out non-invasive load decomposition on the electricity utilization equipment by using an improved cross entropy algorithm;
obtaining the operation rule of each electric device according to the load decomposition result of the electric device;
generating simulation data by using a time sequence method according to the operation data and the operation rule of each piece of electric equipment of a single user;
and synthesizing the simulation data of all the electric equipment of a single user and outputting the simulation data of the user simulation electricity consumption.
The exemplary system source data of this implementation is taken from the public data sets REDD and amps, covering the active power in the meter data, the type, quantity and operating data of the consumers. The electrical devices in the public data set used in the example of the implementation of the present invention are shown in table 1. To avoid confusion, the powered device names are in english.
Table 1: data of electricity consumption of user
Specifically, the data generation method of the embodiment includes the following steps:
s1: assuming that a residential user has m electric devices, the total power of the electric devices is equal to the power of each electric device, and the following results are obtained:
wherein, P [ n ]]Total active power at the entrance of the residential user, p i,j (i-1, …, m; j-1, …, k) represents the followingPower of i consumers in j-th state, s ij [n]The state of the electric equipment represents the state of the jth power gear of the ith electric equipment when the sample number is n. P base [n]Based power consumption (including unknown and long-term stable power consumption).
Here, to simplify the model, we first assume that the powered device has only two states, on and off. In order to realize the monitoring and decomposition of the user electric equipment under the non-invasive condition, an optimization model can be established as follows:
wherein the content of the first and second substances,
P=[P[1],P[2],…,P[τ]] (4)
wherein tau is the number of iterations,
since the electrical equipment can only be in one operating state at the same time, s must be satisfied simultaneously when the operating state of the equipment is j
i,j [n]=1,s
i,z≠j [n]=0。
The optimization problem can be expressed in vector form as:
s2: the load decomposition is carried out on the given data according to an improved cross entropy algorithm, and the specific steps are as follows:
s2.0, initializing and checking. Presetting an initial threshold, and setting all electric equipment to be in a closed state if the total power value is less than or equal to the initial threshold; if the total power value is greater than the initial threshold, go to step S2.1.
S2.1, taking a random sample X from S. According to probability
Assigning a random value v to a consumer i
i Wherein, in the step (A),
for the l iteration, the powered device i in sample s is designated as v
i The probability of (c). Specifically, when l is equal to 0, the state probability of the electric device is as shown in equation (8):
s2.2, calculating an execution function for each sample x:
and S2.3, arranging the samples S according to the ascending order according to the size of the execution function.
And S2.4, selecting X.epsilon optimal samples to form a group, and marking as an elite group.
S2.5, counting v in the first iteration for each sample in the elite group
i The number of times assigned to the electrical consumer i is recorded
S2.6, updating the state probability of the electric equipment:
wherein, β is a designated smoothing parameter, and the smoothing parameter takes into account the state transition times of the electric equipment in the single iteration process, thereby effectively avoiding statistical errors and improving the model precision and the convergence rate.
And S2.7, increasing the iteration times and returning to S2.1 until a stop condition is met. Here, the stopping condition may be simply specified as the total number of iterations, or may be controlled according to the magnitude of the error, and different control strategies may bring different convergence rates and accuracies.
S3: and respectively storing the power data of each electric device during the sampling period according to the result of the load decomposition, and drawing a corresponding time series curve.
Here, only an example of calculation to which the REDD House 1 data is applied is listed. In each iteration, 100 random samples are taken from S; taking epsilon as 0.12; the switching probabilities of the initial running state of the electric equipment are respectively 0.45 and 0.55; the number of iterations is limited to 25; and taking the smoothing parameter beta as 0.025. Further, a comparison graph of the load decomposition result after the improved cross entropy algorithm is applied and the real data in the public data set is obtained, and is shown in fig. 3; obtaining a comparison graph of the real value and the estimated value of the electric energy consumption of the single electric equipment, as shown in FIG. 4; the average recognition accuracy was 0.956, and the specific values are shown in table 2.
Table 2: rate of accuracy of recognition
S4: and generating simulation data according to the operation data of each electric device of a single user according to the precision requirement of the project by using a time series autoregressive model.
Autoregressive (AR) is a time series model that uses observed values of previous time steps as inputs to a regression equation to predict the value of the next time step. We can use statistical measures to calculate correlations between the output variables and various lag values at previous time steps. The stronger the correlation between an output variable and a particular lag variable, the more weight an auto-regression model can assign to that variable in modeling.
The working or using of the electric equipment of the residential users has strong periodicity. Therefore, for the prediction of the power data of the single electric equipment, the sufficient prediction precision can be achieved by using the autoregressive time series model with a simpler mathematical form, and the precision can be adjusted by the number of the lag periods.
x t =a 1 x t +a 2 x t-2 +a 3 x t-3 +…+a p x t-p +δ t (11)
Wherein p is the order of the AR model, i.e., the number of lag periods; delta t Is a white noise sequence; a is i Are model coefficients.
The present embodiment solves the AR model based on the least square method.
The iteration time t is equal to N, and let:
Y=[x p x p+1 x p+2 … x N ] T (12)
A=[a 1 a 2 a 3 … a p ] T (13)
δ=[δ p δ p+1 δ p+2 … δ N ] T (14)
the above AR model can be expressed in vector form:
Y=XA+δ (16)
calculated by the principle of least squares, the coefficients of the AR model are estimated as
A=(X T X) -1 X T Y (17)
And substituting the estimation of the coefficient A into the original model, and calculating to obtain simulation prediction data.
S5: and verifying the effectiveness and the error precision of the simulation data generation method by using data after the sampling period.
S6: and (4) synthesizing the simulation data of all the electric equipment of a single user to output a simulation data set of the electric power consumption of the digital electric meter.
Example 2:
the embodiment 2 of the present disclosure provides a simulation data generation system for predicting electricity consumption behavior, including:
a data acquisition module configured to: acquiring a normal power utilization data sample of a user within a preset time period;
a load splitting module configured to: according to active power data in the electricity utilization data samples, carrying out non-invasive load decomposition on the electricity utilization equipment by using an improved cross entropy algorithm;
an operation rule acquisition module configured to: obtaining the operation rule of each electric device according to the load decomposition result of the electric device;
each electric equipment simulation data generation module is configured to: generating simulation data by using a time sequence method according to the operation data and the operation rule of each piece of electric equipment of a single user;
a user simulation data generation module configured to: and synthesizing the simulation data of all the electric equipment of a single user and outputting the simulation data of the user simulation electricity consumption.
The working method of the system is the same as the simulation data generation method for power utilization behavior prediction provided in embodiment 1, and details are not repeated here.
Example 3:
the embodiment 3 of the present disclosure provides a computer-readable storage medium, on which a program is stored, where the program, when executed by a processor, implements the steps in the simulation data generation method for electricity usage behavior prediction according to the embodiment 1 of the present disclosure, where the steps are:
acquiring a normal power utilization data sample of a user within a preset time period;
according to active power data in the electricity utilization data samples, carrying out non-invasive load decomposition on the electricity utilization equipment by using an improved cross entropy algorithm;
obtaining the operation rule of each electric device according to the load decomposition result of the electric device;
generating simulation data by using a time sequence method according to the operation data and the operation rule of each piece of electric equipment of a single user;
and synthesizing the simulation data of all the electric equipment of a single user and outputting the simulation data of the user simulation electricity utilization.
The detailed steps are the same as the simulation data generation method for power utilization behavior prediction provided in embodiment 1, and are not described again here.
Example 4:
the embodiment 4 of the present disclosure provides an electronic device, which includes a memory, a processor, and a program stored in the memory and capable of running on the processor, where the processor executes the program to implement the steps in the simulation data generation method for power consumption behavior prediction according to embodiment 1 of the present disclosure, where the steps are:
acquiring a normal power utilization data sample of a user within a preset time period;
according to active power data in the electricity utilization data samples, carrying out non-invasive load decomposition on the electricity utilization equipment by using an improved cross entropy algorithm;
obtaining the operation rule of each electric device according to the load decomposition result of the electric device;
generating simulation data by using a time sequence method according to the operation data and the operation rule of each piece of electric equipment of a single user;
and synthesizing the simulation data of all the electric equipment of a single user and outputting the simulation data of the user simulation electricity consumption.
The detailed steps are the same as the simulation data generation method for power utilization behavior prediction provided in embodiment 1, and are not described again here.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure, and various modifications and changes may be made to the present disclosure by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.