The content of the invention
The defects of it is an object of the invention to for the prior art, there is provided a kind of solar energy unmanned plane cell plate voltage it is pre-
Survey method, by adaptive differential evolution algorithm (referred to as:SADE) Optimized BP Neural Network algorithm, so as to substantially improve BP god
Performance through network, improves the precision of predicted value.
Technical scheme is as follows:A kind of Forecasting Methodology of solar energy unmanned plane cell plate voltage includes following step
Suddenly:First, the operating parameter of solar panel is obtained, training set and forecast set are obtained according to the operating parameter, and to fine day
When solar panel operational parameter data be normalized;2nd, BP nerves are built with reference to the training set after normalization
Network;3rd, the initial weight and initial threshold of the BP neural network are obtained according to adaptive differential algorithm optimization;4th, will be excellent
Change the initial weight and initial threshold of obtained weights and threshold value as the BP neural network, and using the training set to institute
BP neural network is stated to be trained;5th, the data to be predicted in the forecast set are inputted in the BP neural network, according to institute
The predicted value for stating BP neural network output is contrasted with actual value, and the accuracy of assessment prediction result.
Preferably, in step 1, the operating parameter of solar panel is measured using solar energy light intensity meter and multimeter,
The operating parameter includes intensity of illumination, ambient temperature and voltage etc.;Moreover, intensity of illumination and ambient temperature are become as input
Amount, voltage is as output variable, operational parameter data when thus obtaining training set and forecast set and choosing fine day, and is returned
One change is handled.
Preferably, in step 2, according to the dimension of input data and output data, the hidden layer of BP neural network is determined
Neuron number and output layer neuron number, its calculation formula is as follows:L1=2m+1;L2=log2n;Wherein, L1 is implicit
Node layer number, L2 are output layer number of nodes, and m is input layer number, and n is output layer number of nodes.
Preferably, in step 3, specifically comprise the following steps:
Set the initial population of adaptive differential evolution algorithm:Based on above-mentioned training set and forecast set, using entity coding
Method, setting initial population size Np, gene dimension D, mutagenic factor F, the excursion for intersecting factor CR and each gene,
And using the error of BP neural network as ideal adaptation angle value in population, in solution space random initializtion population:
And generate at random:
Wherein, xi(0) i-th article of chromosome in the 0th generation in population, x are representedj,i(0) i-th article of chromosome in the 0th generation is represented
The gene of jth, rand (0,1) are represented in the equally distributed random number in (0,1) section;
Mutation operation:Individual difference is realized using difference strategy, randomly selects two different individuals in population, by its to
With treating that variation individual is synthesized into row vector after amount difference scaling, intermediate is produced:
υi(g+1)=xr1(g)+F·(xr2(g)-xr3(g))i≠r1≠r2≠r3
Wherein, F is mutagenic factor, xi(g) represent g for i-th of individual in population;
Crossover operation:To g for population xi(g) and its variation intermediate υi(g+1) crossover operation between individual is carried out:
Wherein, CR is to intersect the factor, jrandFor the random integers of [1,2 ... D];
Selection operation:The individual for entering population of future generation is selected using greedy algorithm, i.e. optimum results are better than previous generation
The individual of chromosome enters population of future generation:
Judge whether the precision of optimum results meets the requirements or whether number of iterations reaches maximum, become if it is not, then returning
ETTHER-OR operation step;If it is, output optimization obtains the initial weight and initial threshold of the BP neural network.
Preferably, set the TSP question factor as:
Wherein, FmaxIt is expressed as mutagenic factor maximum, FminMutagenic factor minimum value is expressed as, Gm represents maximum iteration
Number, G is current iteration number.
Preferably, set it is adaptive intersect the factor as:
Wherein, CRmaxRepresent maximum and intersect the factor, CRminRepresent minimum and intersect the factor.
Preferably, in step 5, training time, iterative steps evaluation index are assessed using root-mean-square error,
Its formula is as follows:
Wherein, PiFor solar array voltage real output value;PfOutput valve is predicted for solar array voltage;N is data
Sum.
Technical solution provided by the invention has the advantages that:
The Forecasting Methodology of the solar energy unmanned plane cell plate voltage is by adaptive differential evolution algorithm to BP nerve nets
The initial value and threshold value of network optimize, and choose the inverse of mean square error of training data as each population and the score of individual
Function, by continuous convergent, alienation, iteration, exports optimum individual, and BP nerve nets are obtained after being decoded it according to coding rule
The initial weight and initial threshold of network, so that the defects of effectively overcoming its convergence rate slowly and being easily trapped into local optimum, is improved
The precision of prediction, realizes global optimization, can significantly increase prediction effect.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
The description of specific distinct unless the context otherwise, the present invention in element and component, the shape that quantity both can be single
Formula exists, and form that can also be multiple exists, and the present invention is defined not to this.Although step in the present invention with label into
Arrangement is gone, but is not used to limit the precedence of step, unless expressly stated the order of step or holding for certain step
Based on row needs other steps, otherwise the relative rank of step is adjustable.It is it is appreciated that used herein
Term "and/or" is related to and covers one of associated Listed Items or one or more of any and all possible group
Close.
As depicted in figs. 1 and 2, the Forecasting Methodology of solar energy unmanned plane cell plate voltage provided in an embodiment of the present invention includes
Following steps:
First, the operating parameter of solar panel is obtained, training set and forecast set are obtained according to the operating parameter, and it is right
The operational parameter data of solar panel is normalized during fine day.
Specifically, in step 1, using the operating parameter of light intensity meter and multimeter measurement solar panel, the fortune
Row parameter includes intensity of illumination, ambient temperature and voltage;Moreover, using intensity of illumination and ambient temperature as input variable, voltage
As output variable, operational parameter data when thus obtaining training set and forecast set and choosing fine day, and place is normalized
Reason.
For example, data include am6:00-pm6:The test parameter of 00 solar cell, Intensity of the sunlight and corresponding
Weather temperature.
2nd, BP neural network is built with reference to the training set after normalization.
As shown in figure 3, BP neural network is a kind of multilayer feedforward neural network of error back propagation, and include three-layer network
Network:Data input layer, hidden layer and output layer, wherein hidden layer can be made of one or more layers.Input signal is through input layer
Hidden layer is successively transferred to, finally reaches output layer.Hidden layer and output layer are completed according to the weights and threshold value of corresponding neuron
Data evaluation work.If output result and expected result be when having deviation, error signal is reversely successively transmitted to hidden layer and defeated
Enter layer, using gradient steepest descent method, adjust the weights and threshold value between each neuron.
Specifically, in step 2, according to the dimension of input data and output data, the hidden layer of BP neural network is determined
Neuron number and output layer neuron number, its calculation formula is as follows:
L1=2m+1;L2=log2n;
Wherein, L1 is node in hidden layer, and L2 is output layer number of nodes, and m is input layer number, and n is output node layer
Number.
For example, using environment temperature and intensity of illumination as input layer, voltage, therefore can be true as output layer, i.e. L=5
The structure for determining BP neural network is:Two input layers, five hidden layers and an output layer.
3rd, the initial weight and initial threshold of the BP neural network are obtained according to adaptive differential algorithm optimization.
Specifically, step 3 includes the following steps:
Set the initial population of adaptive differential evolution algorithm:Based on above-mentioned training set and forecast set, using entity coding
Method, setting initial population size Np, gene dimension D, mutagenic factor F, the excursion for intersecting factor CR and each gene,
And using the error of BP neural network as ideal adaptation angle value in population, in solution space random initializtion population:
And generate at random:
Wherein, xi(0) i-th article of chromosome in the 0th generation in population, x are representedj,i(0) i-th article of chromosome in the 0th generation is represented
The gene of jth, rand (0,1) are represented in the equally distributed random number in (0,1) section;
Mutation operation:Individual difference is realized using difference strategy, randomly selects two different individuals in population, by its to
With treating that variation individual is synthesized into row vector after amount difference scaling, intermediate is produced:
υi(g+1)=xr1(g)+F·(xr2(g)-xr3(g))i≠r1≠r2≠r3
Wherein, F is mutagenic factor, xi(g) represent g for i-th of individual in population;
Crossover operation:To g for population xi(g) and its variation intermediate υi(g+1) crossover operation between individual is carried out:
Wherein, CR is to intersect the factor, jrandFor the random integers of [1,2 ... D];
Selection operation:The individual for entering population of future generation is selected using greedy algorithm, i.e. optimum results are better than previous generation
The individual of chromosome enters population of future generation:
Judge whether the precision of optimum results meets the requirements or whether number of iterations reaches maximum, become if it is not, then returning
ETTHER-OR operation step;If it is, output optimization obtains the initial weight and initial threshold of the BP neural network.
It should be noted that in the evolutionary process of adaptive differential algorithm, in order to ensure the validity of solution, it is necessary to judge
Whether each gene meets boundary condition in chromosome, and if any the condition that is unsatisfactory for, then gene is regenerated with random device.
Moreover, in the evolutionary process of adaptive differential algorithm, since mutagenic factor determines the amplification ratio of bias vector
Example, if mutagenic factor is too big, algorithm search efficiency can be lower, precision is not high;If mutagenic factor is too small, it is impossible to meets population
Diversity, it is easy to occur precocity phenomenon, therefore, in the present embodiment, set the TSP question factor as:
Wherein, FmaxIt is expressed as mutagenic factor maximum, FminMutagenic factor minimum value is expressed as, Gm represents maximum iteration
Number, G is current iteration number.
In addition, in the evolutionary process of adaptive differential algorithm, due to intersecting the factor with the increase of iterations, intersect
Rate also dynamic change, initial stage, the larger intersection factor ensured the variation situation of global scope, and the later stage, less crossing-over rate was more paid close attention to
Local convergent, therefore, in the present embodiment, set the adaptive intersection factor as:
Wherein, CRmaxRepresent maximum and intersect the factor, CRminRepresent minimum and intersect the factor.
4th, obtained weights and threshold value initial weight and initial threshold as the BP neural network, and profit will be optimized
The BP neural network is trained with the training set.
Specifically, in step 4, obtained weights and threshold value initial value and threshold value as BP neural network will be optimized,
And BP neural network is trained using training set sample, is learnt.
For example, the learning rate of BP neural network is arranged to 0.1, the biography of iterations 800, hidden layer and output layer is trained
Defeated function selected as S types tangent function ' tansig ', network training function are ' trainlm '.
5th, the data to be predicted in the forecast set are inputted in the BP neural network, according to the BP neural network
The predicted value of output is contrasted with actual value, and the accuracy of assessment prediction result.
Specifically, in step 5, import data in Matlab, carry out simulation and prediction, will predict obtained result with
Actual comparison, assesses training time, iterative steps evaluation index using root-mean-square error, its formula is as follows:
Wherein, PiFor solar array voltage real output value;PfOutput valve is predicted for solar array voltage;N is data
Sum.
By BP neural network algorithm, differential evolution algorithm Optimized BP Neural Network (referred to as:DE Optimized BP Neural Networks) and
The adaptive differential evolution algorithm Optimized BP Neural Network that the embodiment of the present invention proposes is (referred to as:SADE Optimized BP Neural Networks),
Comparative result is predicted, it is as shown in the table:
| Algorithm title |
Root-mean-square error |
Iterative steps |
Training time (S) |
| BP neural network |
0.0103 |
49 |
10.213 |
| DE Optimized BP Neural Networks |
0.00784 |
37 |
9.541 |
| SADE Optimized BP Neural Networks |
0.00368 |
19 |
10.427 |
As shown in figs. 4-7, according to comparative test result, adaptive differential evolution algorithm proposed by the invention optimization
BP neural network optimizing ability is stronger, better for prediction solar cell panel voltages.
It is obvious to a person skilled in the art that the invention is not restricted to the details of above-mentioned one exemplary embodiment, Er Qie
In the case of without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter
From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power
Profit requires rather than described above limits, it is intended that all in the implication and scope of the equivalency of claim by falling
Change is included in the present invention.Any reference numeral in claim should not be considered as to the involved claim of limitation.
Moreover, it will be appreciated that although the present specification is described in terms of embodiments, not each embodiment is only wrapped
Containing an independent technical solution, this narrating mode of specification is only that those skilled in the art should for clarity
Using specification as an entirety, the technical solutions in the various embodiments may also be suitably combined, forms those skilled in the art
It is appreciated that other embodiment.