Summary of the invention
In view of this, can be improved instruction it is an object of the invention to propose the prediction technique and device of a kind of electric load
Practice efficiency, and improves precision of prediction.
Prediction technique based on above-mentioned purpose electric load provided by the invention includes:
It obtains electric power and increases data and power test data newly;It is the power test data place that the electric power, which increases data newly,
The electric power data in preset time period before period;
Data are increased newly using the electric power to be trained BP neural network trained in advance, obtain what network structure updated
Increment BP neural network;
The power test data are input to the increment BP neural network, to predict electric load.
Further, it is trained to BP neural network trained in advance using the newly-increased data of the electric power described
Before, further includes:
Obtain electric power initial data;Electricity before period where the electric power initial data increases data newly for the electric power
Force data;
The BP neural network of foundation is trained using the electric power initial data, is obtained in the BP neural network
The weight and weight valid interval of each hidden node.
Further, the electric power data includes load data and meteorological data;
The method also includes:
After obtaining electric power data, pretreatment and normalized are carried out to the electric power data.
Further, described that BP neural network trained in advance is trained using the newly-increased data of the electric power, it obtains
The increment BP neural network that network structure updates, specifically includes:
When the precision of prediction for detecting the BP neural network is lower than preset threshold, added in the BP neural network
Hidden node;
Data are increased newly using the electric power to be trained the BP neural network after addition hidden node, obtain the increment BP
Neural network.
Further, described to add hidden node in the BP neural network, it specifically includes:
The number range of hidden node is calculated according to the input layer number in the BP neural network;
At least one hidden node is added in the BP neural network, so that the sum of the hidden node after addition is positioned at described
Within the scope of number;
The initial weight of each hidden node of addition is arranged in the weight valid interval.
Further, the calculation formula of the number range of the hidden node are as follows:
H=2I+1;
H=log2I;
Wherein, H is the number threshold value of hidden node, and I is input layer number.
It is further, described that the BP neural network after addition hidden node is trained using the electric power newly-increased data,
The increment BP neural network is obtained, is specifically included:
Data are increased newly using the electric power to be trained the BP neural network after addition hidden node;
Every time when training, the weight of each hidden node in the BP neural network is updated;
Hidden node by updated weight lower than the weight valid interval is deleted, and the increment BP nerve is obtained
Network.
Further, when described each trained, the weight of each hidden node in the BP neural network is updated,
It specifically includes:
Every time when training, the weight of each hidden node in the BP neural network is assessed, and is tied according to assessment
The hidden node is divided into new node, stable node and inhibits node by fruit;
The new node, the stable node and the learning rate for inhibiting node is respectively set;
Formula is modified according to the learning rate and time-concerning impact factor, and based on weight, respectively to the new node, institute
It states stable node and the weight of node is inhibited to be updated.
Further, the weight modifies formula are as follows:
Δωij(k)=α η δj(k)·Oi(k);
Wherein, Δ ωijIt (k) is the increment of weight, α is time-concerning impact factor, and η is learning rate, δjIt (k) is instruction letter
Number, OiIt (k) is output layer output data.
Correspondingly, the present invention also provides a kind of prediction meanss of electric load, can be realized the prediction of above-mentioned electric load
Method, described device include:
Data acquisition module increases data and power test data newly for obtaining electric power;It is institute that the electric power, which increases data newly,
The electric power data in preset time period before period where stating power test data;
Training module is trained BP neural network trained in advance for increasing data newly using the electric power, obtains
The increment BP neural network that network structure updates;
Prediction module, for the power test data to be input to the increment BP neural network, to predict power load
Lotus.
From the above it can be seen that the prediction technique and device of electric load provided by the invention, can pass through electric power
Newly-increased data are trained BP neural network trained in advance, update the network structure of BP neural network, obtain increment BP mind
It is input to increment BP neural network through network, and then by power test data, to predict electric load, improves BP neural network instruction
Experienced efficiency and precision, and then improve the precision of prediction of electric load.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with specific embodiment, and reference
Attached drawing, the present invention is described in more detail.
It is the flow diagram of the prediction technique of electric load provided in an embodiment of the present invention referring to Fig. 1.The power load
The prediction technique of lotus may comprise steps of:
101, it obtains electric power and increases data and power test data newly;It is the power test data that the electric power, which increases data newly,
The electric power data in preset time period before the period of place.
In the present embodiment, it is training sample that electric power, which increases data newly, and power test data are test sample, the newly-increased number of electric power
According to the training sample referred to close to the last fortnight of period where power test data.
102, data are increased newly using the electric power to be trained BP neural network trained in advance, obtains network structure more
New increment BP neural network.
In the present embodiment, BP neural network includes input layer, hidden layer and output layer, and hidden layer has multiple nodes,
That is hidden node.According to the input value and output valve of electric power initial data, batch training BP neural network.Complete BP neural network
Training after, obtain BP neural network in each hidden node weight and weight valid interval.Wherein, electric power initial data is institute
State the electric power data before the period where electric power increases data newly.
Increase data newly according to electric power and incremental learning carried out to the network structure of BP neural network trained in advance, i.e., by pair
The update of hidden node increased or decreased to realize network structure.
Specifically, step S2 includes:
When the precision of prediction for detecting the BP neural network is lower than preset threshold, added in the BP neural network
Hidden node;
Data are increased newly using the electric power to be trained the BP neural network after addition hidden node, obtain the increment BP
Neural network.
It should be noted that the precision of prediction of BP neural network is BP neural network training as a result, i.e. trained is accurate
Rate.When the precision of prediction of BP neural network is lower than preset threshold, dynamic adds hidden node, and increases data training newly using electric power
BP neural network, to obtain increment BP neural network.
Specifically, described to add hidden node in the BP neural network, it specifically includes:
The number range of hidden node is calculated according to the input layer number in the BP neural network;
At least one hidden node is added in the BP neural network, so that the sum of the hidden node after addition is positioned at described
Within the scope of number;
The initial weight of each hidden node of addition is arranged in the weight valid interval.
It should be noted that the learning ability of neural network is determined by network structure, by increasing, deleting or increase
The update combined to realize network structure for adding and deleting.In order to avoid the ability of networks forfeit study and information processing, nerve
Hidden node in network structure cannot be very little, but if hidden node excessively also will increase network training amount, even results in and occurred
The state of fitting, therefore also need to limit the number range of hidden node.
Specifically, the number range of hidden node is determined by following two calculation formula:
H=2I+1;
H=log2I;
Wherein, H is the number threshold value of hidden node, and I is input layer number.
According to the hidden node number range of calculating, increases at least one hidden node in BP neural network, that is, increase hidden section
Hidden node total number after point need to be within the scope of number.When increasing hidden node, the initial weight of newly-increased hidden node is set,
The initial weight should be located in weight valid interval.
Specifically, described that the BP neural network after addition hidden node is trained using the electric power newly-increased data, it obtains
The increment BP neural network is obtained, is specifically included:
Data are increased newly using the electric power to be trained the BP neural network after addition hidden node;
Every time when training, the weight of each hidden node in the BP neural network is updated;
Hidden node by updated weight lower than the weight valid interval is deleted, and the increment BP nerve is obtained
Network.
It should be noted that detected by the state to hidden node to judge whether to delete the hidden node, detection
There are three directions: first is that the weight of hidden node, second is that the output size of hidden node, third is that the error rate of descent of hidden node output.
Furthermore time series data is considered, the section influence closer to current time is bigger, more reflects newest time serial message
Its value is also bigger, can add time-concerning impact factor thus for the update of weight.
Specifically, when described each trained, the weight of each hidden node in the BP neural network is updated, is had
Body includes:
Every time when training, the weight of each hidden node in the BP neural network is assessed, and is tied according to assessment
The hidden node is divided into new node, stable node and inhibits node by fruit;
The new node, the stable node and the learning rate for inhibiting node is respectively set;
Formula is modified according to the learning rate and time-concerning impact factor, and based on weight, respectively to the new node, institute
It states stable node and the weight of node is inhibited to be updated.
It should be noted that being first the classification of each hidden node according to indexs such as the weights of hidden node, i.e., to training every time
Hidden node weight is assessed: acting on size according to the weight of hidden node, hidden node is divided into new node, stable node and inhibition
Node.Wherein, the node that new node newly adds, stable node have larger contribution to network and show stable hidden node, press down
Node processed is the point contributed less and BP network is caused to fall into local minimum.
In turn, new node is needed to accelerate weight variation speed for the weight variation addition time-concerning impact factor of hidden node
Degree;For inhibiting node, need to accelerate to decay its weight, to accelerate to inhibit eliminating for node;For stable node, without variation
Its weight.
Specifically, the weight modification formula for adding time-concerning impact factor is as follows:
Δωij(k)=α η δj(k)·Oi(k);
Wherein, Δ ωijIt (k) is the increment of weight, α is time-concerning impact factor, and η is learning rate, δjIt (k) is instruction letter
Number, OiIt (k) is output layer output data.
In order to avoid the distance of system performance vibrates, again to the inhibition Node evaluation of weight decaying, when it is to entire net
When network influences smaller, i.e. when the weight of inhibition node is lower than weight valid interval, the node is deleted, as shown in Fig. 2, black in figure
Partial node indicates the hidden node to be deleted.
103, the power test data are input to the increment BP neural network, to predict electric load.
In the present embodiment, power test data are input in trained increment BP neural network, obtain power load
The prediction result of lotus, and by the prediction result and true load comparisons, to carry out error analysis.
The prediction technique of electric load provided by the invention can increase data newly to BP nerve trained in advance by electric power
Network is trained, and updates the network structure of BP neural network, obtains increment BP neural network, and then power test data are defeated
Enter to increment BP neural network, to predict electric load, improves the efficiency and precision of BP neural network training, and then improve electric power
The precision of prediction of load.
It is another flow diagram of the prediction technique of electric load provided in an embodiment of the present invention referring to Fig. 3.The electricity
The prediction technique of power load may comprise steps of:
201, data prediction.
Specifically, electric power data is first obtained, the electric power data includes load data and meteorological data.In turn, by load
Data and meteorological data are merged according to unified format, and null value therein, zero and categorical data are deleted.
202, data normalization.
Specifically, electric power data is normalized using normalization calculation formula, makes mind to avoid numerical problem
Through network fast convergence.Wherein, calculation formula is normalized are as follows:
Wherein, x 'iIt is the numerical value after normalization, xiIt is initial data numerical value, xminAnd xmaxIt is x respectivelyiIt is middle minimum and most
Big numerical value.
203, the data after normalization are divided into training sample and test sample, and training sample is divided into original number
According to newly-increased data.
Specifically, newly-increased data refer in training sample close to the last fortnight training data of period where test sample,
Remainder data in training sample is initial data.
204, according to the input value of initial data and output valve, batch training BP neural network.
Specifically, after training BP neural network, it is effective that the weight of each hidden node and weight in BP neural network are obtained
Section.
205, newly-increased data are inputted, increment is realized to the network structure of BP neural network using the method for hidden node additions and deletions
It practises, obtains increment BP neural network.
206, test sample is input to trained increment BP neural network, exports simultaneously evaluation and foreca result.
Specifically, after obtaining prediction result, by prediction result and true load comparisons, to carry out error analysis.
By taking the power load in a certain resident house as an example, the prediction of electric load is carried out using three groups of study tests.Three
Group study test includes batch study test one, batch study test two and incremental learning experiment three, and wherein incremental learning is tested
Third is that the prediction technique of electric load based on the embodiment of the present invention is realized.
The prediction result of three tests is as shown in Figure 4.It can see according to the empirical curve in Fig. 4, in actual use,
Resident's 7-13 period, the result predicted using the method for batch study it was simultaneously bad for load using lower, it is clear that other
There is large effect in period to this period.But method provided by the present invention realizes the prediction to newest moment sequence, effect
Fruit succeeds in school a lot than batch.It follows that deleting hidden layer section using dynamic of the invention by the comparison of actual test
The precision of the prediction technique of point, the batch study prediction technique that compares is high, and effect is good.
Correspondingly, the present invention also provides a kind of prediction meanss of electric load, can be realized the prediction of above-mentioned electric load
Method.
It is the structural schematic diagram of the prediction meanss of electric load provided in an embodiment of the present invention referring to Fig. 5.Described device packet
It includes:
Data acquisition module 1 increases data and power test data newly for obtaining electric power;It is institute that the electric power, which increases data newly,
The electric power data in preset time period before period where stating power test data;
Training module 2 is trained BP neural network trained in advance for increasing data newly using the electric power, obtains
The increment BP neural network that network structure updates;
Prediction module 3, for the power test data to be input to the increment BP neural network, to predict power load
Lotus.
The prediction meanss of electric load provided by the invention can increase data newly to BP nerve trained in advance by electric power
Network is trained, and updates the network structure of BP neural network, obtains increment BP neural network, and then power test data are defeated
Enter to increment BP neural network, to predict electric load, improves the efficiency and precision of BP neural network training, and then improve electric power
The precision of prediction of load.
It should be understood by those ordinary skilled in the art that: the discussion of any of the above embodiment is exemplary only, not
It is intended to imply that the scope of the present disclosure (including claim) is limited to these examples;Under thinking of the invention, above embodiments
Or can also be combined between the technical characteristic in different embodiments, step can be realized with random order, and be existed such as
Many other variations of the upper different aspect of the invention, for simplicity, they are not provided in details.
In addition, to simplify explanation and discussing, and in order not to obscure the invention, it can in provided attached drawing
It is connect with showing or can not show with the well known power ground of integrated circuit (IC) chip and other components.Furthermore, it is possible to
Device is shown in block diagram form, to avoid obscuring the invention, and this has also contemplated following facts, i.e., about this
The details of the embodiment of a little block diagram arrangements be height depend on will implementing platform of the invention (that is, these details should
It is completely within the scope of the understanding of those skilled in the art).Elaborating that detail (for example, circuit) is of the invention to describe
In the case where exemplary embodiment, it will be apparent to those skilled in the art that can be in these no details
In the case where or implement the present invention in the case that these details change.Therefore, these descriptions should be considered as explanation
Property rather than it is restrictive.
Although having been incorporated with specific embodiments of the present invention, invention has been described, according to retouching for front
It states, many replacements of these embodiments, modifications and variations will be apparent for those of ordinary skills.Example
Such as, discussed embodiment can be used in other memory architectures (for example, dynamic ram (DRAM)).
The embodiment of the present invention be intended to cover fall into all such replacements within the broad range of appended claims,
Modifications and variations.Therefore, all within the spirits and principles of the present invention, any omission, modification, equivalent replacement, the improvement made
Deng should all be included in the protection scope of the present invention.