ANN load forecasting

76
modeling and design of artificial neural network architecture for load forecasting Dr A K TIWARI 1 [email protected]

Transcript of ANN load forecasting

Page 1: ANN load forecasting

modeling and design of artificialneural network architecture for load

forecasting

Dr A K TIWARI

[email protected]

Page 2: ANN load forecasting

objective

• a load-forecasting model is proposed using amultilayer neural network with an appropriatelymodified back propagation learning algorithm.

• Once the neural network model is designed andtrained, it can forecast the load of the powersystem 24 hours ahead on daily basis and canalso forecast the cumulative load on daily basis.

• The real load data that is used for the ArtificialNeural Network training was taken from LDC

[email protected]

Page 3: ANN load forecasting

neuron

• The basic building block of all biological brains is anerve cell, or a neuron.

• Each neuron acts as a simplified numerical processingunit. In essence, the brain is a bundle of many billionsof these biological processing units, all heavilyinterconnected and operating in parallel.

• In the brain, each neuron takes input values from otherneurons, applies a transfer function and sends itsoutput on to the next layer of Neurons.

• These neurons, in turns, send their output to the otherlayers of neurons in a cascading fashion.

[email protected]

Page 5: ANN load forecasting

• A neuron (or cell or a unit) is an autonomousprocessing element. Neuron can be thought of avery simple computer.

• The purpose of each neuron is to receiveinformation from other neurons, performrelatively simple processing of the combinedinformation, and send the results to one or moreother neurons.

• In many of the illustrations shown in variousliteratures, the neurons are generally indicated bycircles or squares.

[email protected]

Page 8: ANN load forecasting

Artificial Neural Networks (ANN)

• Artificial Neural Networks (ANN) are usually formedfrom many hundreds or thousands of simpleprocessing units, connected in parallel and feedingforward in several layers.

• Because of the fast and inexpensive personalcomputers availability, the interest in ANN’s hasblossomed in the current digital world.

• The basic motive of the development of the ANN wasto make the computers to do the things, what a humanbeing cannot do.

• A development of an ANN is an attempt to simulate ahuman brain.

[email protected]

Page 10: ANN load forecasting

ANN

• An Artificial Neural Network (ANN) is aninformation processing paradigm that is inspiredby the way biological nervous systems, such asthe brain, process information.

• The key element of this paradigm is the novelstructure of the information processing system.

• It is composed of a large number of highlyinterconnected processing elements (neurons)working in unison to solve specific problems.

• ANN’s, like people, learn by example.• An ANN is configured for a specific application,

such as pattern recognition or data classification,through a learning process.

• Learning in biological systems involvesadjustments to the synaptic connections that existbetween the neurons.

[email protected]

Page 11: ANN load forecasting

• In a similar manner, ANN’s are usually formed from many hundreds or thousandsof simple processing units, connected in parallel and feeding forward in severallayers.

• In a biological neural network, the memory is believed to be stored in the strengthof interconnections between the layers of neurons.

• Using neural network terminology, the strength or influence of an interconnectionis known as its weight.

• ANN borrows from this theory and utilizes variable interconnections weightsbetween layers of simulated neurons.

• ANN’s were proposed early in 1960’s, but they received little attention until mid80’s.

• Prior to that time, it was not generally possible to train networks having more thantwo layers. These early two layers networks were usually limited to expressinglinear relationships between binary input and output characters.

• Unfortunately, the real world is analog and doesn’t lend itself to a simple binarymodel.

• The real break through in ANN research came with the discovery of the backpropagation method.

[email protected]

Page 12: ANN load forecasting

• Because of fast and inexpensivepersonal computers availability, theinterest in ANN’s has blossomed.

• The basic motive of the development ofthe neural network was to make thecomputers to do the things, which ahuman being cannot do. Therefore,ANN is an attempt to simulate a humanbrain.

• Hence, the ANN architecture can beeasily compared with the human brain.

[email protected]

Page 13: ANN load forecasting

Load or Demand Forecast.• The primary pre-requisite for

system planning is to arrive atrealistic estimates for futuredemand of power, which isknown as Load or DemandForecast.

• Power system planning is doneto ensure adequate and reliablepower supply to meet theestimated load demand bothnearer and in the distant future.

• This must be done at minimumpossible cost, keeping the qualityof supply satisfactory.

• Basically, the load forecasting isnot more than an intelligentprojection of past and presentpatterns to determine future loadwith sufficient reliability.

[email protected]

Page 14: ANN load forecasting

• A detailed study of past system performance with regardsto its load pattern, constitution and region wise distributionis necessary to establish a general behavior pattern.

• Future assessment has to be drawn off after carefulscreening of the reference data pattern.

• Unfortunately an accurate forecast depends on thejudgment of the forecaster, and it is impossible to relystrictly on the analytical methods to obtain an accurateload forecast.

[email protected]

Page 15: ANN load forecasting

forecasting software

General forecasting software• Forecastpro• Demandcaster• JustEnough

Power demand forecasting softwareTeslaforecastEnercastEscowareTerratechnologyEtapItronSynergi ForecasterNnergixNeuralpowerAiolosforecaststudioAleaSoftThrivetechEnerdataDEMELEC-PROMatrica

[email protected]

Page 16: ANN load forecasting

ANN based forecasting

• a load-forecasting model is developed using a multilayerneural network with an appropriately modified backpropagation-learning algorithm.

• The model is created to produce a short term loadforecasting of the load in the 24 hours of the forecast dayconcerned or average daily load according to requirement.

• The real load data that used for the ANN training was takenfrom Load Dispatch Centre.

• Data for the month of January for three calendar years(1997, 1998, 1999) was taken for training the proposedANN model and the data for calendar year 2000 was use tocompare the forecasted data.

[email protected]

Page 17: ANN load forecasting

• The training is done in a supervised manner that is forevery input vector, the desired output is given andweights are adapted to minimize an error function thatmeasures the discrepancy between the desired outputand the actual output computed by the network.

• For training the network, the back propagation-training algorithm is used where data of previous twoyears are used as inputs.

• In a series of experiments, the time series of daily loadis presented to the network and the network is thanmade to predict the next value in the time sequence.

[email protected]

Page 19: ANN load forecasting

• The comparison of the predicted value and the actualknown value for the processed time slot resulted in a valueof the calculated mean square error (MSE), which is thenpropagated back through the feed forward links.

• The back-propagation algorithm globally modifies theweights of all internal links to minimize the error. If theerror gradient still exceeded a predefined small value, anew epoch is initiated.

• Finally, after the training phase has processed all epochs, itsperformance could be judge in terms of the globallycalculated MSE.

• After all epochs of the training phase were processed thenetwork was ready for prediction and generalization

[email protected]

Page 20: ANN load forecasting

Perceptron

[email protected]

Page 23: ANN load forecasting

Basic Model of ANN

• Serious efforts to create a model of a neuronhave been underway during the last 100 years,and remarkable progress has been made.

• Neural connections are significantly fewer andsimilar than the connections in the brains.

• The basic model of ANN is as shown in Fig. 3.

• This is the combination of perceptron asiscussed earlier which forms the ArtificialNeural Network which is actually practiced.

[email protected]

Page 25: ANN load forecasting

Layers• A layer is a collection of neurons that can be

thought of as performing some type ofcommon functions.

• These neurons are usually numbered byplacing the numbers or letters by each neuronand are generally assumed that no neuron isconnected to another neuron in the same layer.

• All neurons nets have an input layer and haveoutputs to interface with the externalenvironment.

• Each input layer and each output layer has atleast one neuron.

• Any neuron that is not in an input layer or in anoutput layer is said to be in a hidden layerbecause neither its input nor its output can beobserved from outside.

• Sometimes the neurons in a hidden layer arecalled feature detectors because they respondto particular feature detectors because theyrespond to particular features in the previouslayer.

[email protected]

Page 26: ANN load forecasting

Synapses (arcs / links)

• An arc or a synapse can be a one-way or a two-way communication link between two cells

• A feed-forward network is one in which theinformation flows from the input cells throughhidden layers to the output neurons without anypaths whereby a neuron in a lower numberedlayer receives input from the neurons in a highnumbered layer.

• A recurrent network, by contrast, also permitscommunication in the backward direction

[email protected]

Page 27: ANN load forecasting

Weights

[email protected]

Page 28: ANN load forecasting

Propagation rule

[email protected]

Page 29: ANN load forecasting

activation

[email protected]

Page 31: ANN load forecasting

Threshold function

[email protected]

Page 32: ANN load forecasting

NETWORK STRUCTURES

• Feed-forward and Recurrent Networks• In a feed forward network, links are unidirectional and there are no

cycles. Technically speaking, a feed forward network is a directedcyclic graph.

• In a layered feed forward network, each unit is linked only to unitsin the next layer; there are no links between units in the same layer,no links backward to a previous layer, and no links that skip a layer.

• The significance of the lack of cycles is that computation canproceed uniformly from input units to output units.

• The activation from the previous time step plays no part in thecomputation, because it is not fed back to earlier units.

• Hence, the feed forward network simply computes a function of theinput values that depends on the weight setting-it has no internalstate other than the weight themselves.

[email protected]

Page 34: ANN load forecasting

• The brain cannot be a feed forward network, it have no short-term memory. Brain is recurrent network.

• Because activation is fed back to the units that cause it, recurrent have internal states stores in the activation level of the units.

• This also means that the computation is much less orderly than in feed forward networks. Recurrent can becomes unstable, or oscillate, or exhibit chaotic behavior.

• Given some input value, it can’t take long time to compute a stable output, and learning is made more difficult.

• Recurrent networks can implement more complex agent designs and can model system with state.

• The basic structure of the neural network consisting of the input, hidden and the output layers is shown in the Figs. 4(a) and 4(b) respectively

[email protected]

Page 36: ANN load forecasting

Back propagation

[email protected]

Page 38: ANN load forecasting

Learning in ANN

• Learning is the process by which the neural network adapts itself toa stimulus, and eventually, it produces a desired response.

• Learning is also a continuous classification process of input stimuliwhen a stimulus appears at the network; the network eitherrecognizes it or develops a new classification.

• In actuality, during the process of learning, the network adjusts itsparameters the synaptic weights, in response to an input stimulusso that its actual output response is the same as the desired one,the network has completed the learning phase in other words, ithas ‘acquired knowledge’.

• Mathematical expressions, learning equations describe the learningprocess for the paradigm, which in actuality is the process for selfadjusting its synaptic weights.

[email protected]

Page 39: ANN load forecasting

Supervised Learning

• During the training session of a neural network, an input stimulus isapplied that results in an output response.

• The response is compared with a prior desired output signal, the targetresponse, if the actual response differs from the target response; theneural network generates an error signal, which is then used to calculatethe adjustment that should be made to the network’s synaptic weights sothat the actual output matches the target output. In other words, theerror is minimized, possibly to zero.

• The error minimization process requires a special circuit known assupervisor; hence, the name, ‘supervised learning’.

• With ANN the amount of calculation required to minimize the errordepends on the algorithm used; Some parameters to watch, are the timerequired per iteration, the number of iterations per input pattern for theerror to reach minimum during the training session, whether the neuralnetwork has reached a global minimum or a local one, and, if a local one,whether the network can escape from it or it remains trapped.

[email protected]

Page 40: ANN load forecasting

Unsupervised Learning

• Unsupervised learning does not require a teacher, that is, there is notarget output. During the training session, the neural net receives at itsinput many different excitations, or input patterns and it arbitrarilyorganizes the patterns in categories.

• When a stimulus is later applied, the neural net provides an outputresponse indicating the class to which the stimulus belongs. If a classcannot be found for the input stimulus, a new class is generated.

• Example, show a person a set of different objects. Then ask him/her toseparate object out into groups or classifications such that objects in agroup have one or more common features that distinguishes them formanother group.

• When this is done, show the same person another object and ask him/herto place the object is one of the groups.

• Grouping may be based on shape, color, or material consistency or onsome other property of the object. If no guidelines have been given as towhat type of features should be used for grouping the objects, thegrouping may or may not be successful.

[email protected]

Page 41: ANN load forecasting

Reinforced Learning

• Here, we requires one or more neurons at the output layer and a teacherthat, unlike supervised learning, does not indicate how close the actualoutput is to the desired output but whether the actual output is the samewith the target output response is obtained.

• The teacher does not present the target output to the network, butpresents only a pass/fail indication. Thus, the error signal generatedduring the training session is binary: pass or fail.

• If the teacher’s indication is ‘bad’ the network readjusts its parametersand tries again and again until it get output response right. Process ofcorrecting synaptic weight follows a different strategy than the supervisedlearning process .

• Some parameters to watch are the following: the time per iteration andthe number of iteration per pattern to reach the desired output duringthe training session, whether the neural network reaches a globalminimum or a local minimum.

• Certain boundaries should be established so that the trainee should notkeep trying to get the correct response at infinitum.

[email protected]

Page 42: ANN load forecasting

Competitive Learning• Competitive learning is another form of supervised learning that is

distinctive because of its characteristic operation and architectureand several neurons are at the output layer.

• When an input stimulus is applied, each output neuron competeswith the others to produce the closest output signal to the target.

• This output then becomes the dominant one, and the other outputscease producing an output signal for that stimulus. For anotherstimulus, another output neuron becomes the dominant one, andso on.

• When an ANN with competitive learning is part of greater ANNsystem then, because of connectivity issues, these randomspecializations may not always be desirable.

• Competitive learning is frequently encountered in groups of peoplewhere each member of the group was selected and trained toperform specific tasks based on the principle of the right person atthe right time at the right place.

[email protected]

Page 43: ANN load forecasting

BACK-PROPAGATION LEARNING ALGORITHM

• LEARNING RATE :

• The learning rate governs the rate at which theweights are allowed to change at any givenpresentation.

• Higher learning rates speed the convergenceprocess, but can result in overshooting or non-convergence.

• Slower learning rates produce more reliableresults at the expense of increased training time.

[email protected]

Page 44: ANN load forecasting

MOMENTUM FACTOR

• During the learning process of neural network, thespeed of convergence can be increased by modifyingthe weight modification steps by including themomentum term, ‘a’.

• The momentum term technique can be recommendedfor a problem with convergence that occurs too slowlyor for cases when learning is difficult to achieve.

• By varying ‘a’, it is possible to shape the error surface.Values of ‘a’ that are close to unity ensuring circularerror contours in contrast to small values, whichproduce a narrow valley

[email protected]

Page 45: ANN load forecasting

LOCAL MINIMA:

• This can be well understood from Fig. 5 shown. Assume that the stable state for a given neural network is “B” but due to certain reasons; may be higher learning rate or higher momentum factor or due to insufficient available historical data, the network will settle itself ultimately into one of the nearest stable state; which is labeled as “A” here instead of setting in “B”.

• This stable state “A” in this case is termed as “local minima”.

[email protected]

Page 47: ANN load forecasting

GENERALIZATION AND MEMORIZATION

• If all possible inputs and outputs are shown to a backpropagation network, the network will probably find a setof weights that maps the inputs onto the outputs.

• For many Al problems, however it is impossible to give allpossible inputs. e.g., Face recognition problem.

• ANN should promise a generalization mechanism.• If it works in a domain where similar inputs get mapped

onto similar outputs, network will interpolate when giveninputs it has never seen before that means that network’sinput-output pattern is no more generalized, but it hasmemorized it.

• Memorization can adversely affect the testing of the ANN.

[email protected]

Page 49: ANN load forecasting

• The Fig. 6 shows the common generalization effect during along training period. During the first part of the training,performance on the training set improves as the networkadjusts its weights through the back propagation.

• Performance on the test set also improves, although it isnever quite as good as the training set. After a while,network performance reaches a plateau as the weightsshift around, looking for a path to further improvement.Ultimately, it is found and the performance on the trainingset improves again. But the performance on the test setgets worse.

• Because the network has begun to memorize the individualinput-output pairs rather than setting for weights thatgenerally describe the mapping for all cases

[email protected]

Page 50: ANN load forecasting

To avoid the memorization following steps can be taken

[email protected]

Page 53: ANN load forecasting

TRAINING OF ANN

[email protected]

Page 56: ANN load forecasting

LOAD FORECASTING using ANN

• A load-forecasting model is developed using amultilayer neural network with an appropriatelymodified back propagation learning algorithm. Themodel can be created to produce a short term forecastof the load in the 24 hours of the forecast dayconcerned or average daily load, i.e. according to therequirement. However, for some poor initial startingpoints, because the problem is very complex, it takes amuch longer time to obtain a much comparablesolution.

• The points in the direction of evolutionary computingbeing integrated with parallel processing techniques tosolve practical problems.

[email protected]

Page 58: ANN load forecasting

INPUTS : 54

[email protected]

Page 59: ANN load forecasting

OUTPUTS

[email protected]

Page 62: ANN load forecasting

LOADS

[email protected]

Page 63: ANN load forecasting

HIDDEN LAYER AND ITS NEURONS.

• The number of hidden layer neurons depends on thenonlinearity of the problem. A single hidden layer of 10Neurons was found to be sufficient for the presentproblem. This figure was arrived at by enough trialsand errors. Initially, a hidden layer consisting of 19neurons was selected for the design.

• The results obtained with such a network configurationwas having a larger deviation from the actual loadcurve, hence, the hidden layer neurons was reduced toten neurons to create a bottle-neck. This was found toreduce the error in the forecasted load.

[email protected]

Page 66: ANN load forecasting

OVERALL ARCHITECTURE

• The sum of the total number of inputs to represent daytype, month type, date, relevant load comes to 19.

• Neurons in the hidden layer were chosen by a trial anderror method. Too many numbers of neurons increase theerror and too less make the network inefficient to trainitself to the given variable inputs. The optimum number ofneurons in the hidden layer was found to be 10.

• Finally, the architecture of 19-10-1 feedforward three-layered network was found suitable, i.e., 19 neurons in theinput layer; 10 neurons in the hidden layer; 1 neurons inthe output layer. Algorithm for network training is as shownin Fig. 9.

[email protected]

Page 68: ANN load forecasting

NETOWRK TRAINING

• The training was done in a supervised manner that is forevery input vector, the desired output is given and weightsare adapted to minimize an error function that measuresthe discrepancy between the desired output and theoutput computed by the network.

• The mean squared error (MSE) is employed as the errorfunction. Input of previous two years was used for trainingthe network.

• The back propagation training algorithm using momentumfactor = 0.1 and learning rate = 0.1 was used.

• In a series of experiments, the time series of daily load waspresented to the network and the network was than madeto “predict” the next value in the time sequence

[email protected]

Page 69: ANN load forecasting

• The comparison of the just “predicted” value and the known value for theprocessed time-slot resulted in a value of the calculated mean square error (MSE)which was than propagated back through the feed forward links.

• The back propagation algorithm globally modified the weights of all internal linksto minimize the error. If the error gradient still exceeded a pre-defined-small value,a new epoch was started.

• Finally, after the training phase has processed all epochs, its performance could bejudge in terms of the globally calculated MSE. After all epochs of the trainingphase were processed the network was ready for prediction and generalization.

• The back-propagation learning algorithm is characterized by two parameters, thelearning rate and the momentum factor. These were used by the process ofprogressive refining weights based on the RMS error minimization. One of theobjectives was to find the optimal number of the training cycles performing on thetraining data. To do this, a network was subjected to a number of training sessionswith varying number of training cycles.

• After each experiment the network was tested for its ability to correctly classifythe test data. The experiments included training sessions of 1000 to 5000 trainingcycles

[email protected]

Page 70: ANN load forecasting

• With the increased number of the applied cycles,the results gradually showed improvement in thenetwork ability to “predict” the input parameterused in training.

• However, such better performance also indicatedthe network’s symptoms of over-fitting cycles andhas been elected as not to compromise thenetwork ability and to correctly generalize on thenew (previously unseen) input parameters.

[email protected]

Page 71: ANN load forecasting

• The neural network was trained in the neural networktoolbox available in MatlabR12. The function “trainlm”was used with learning rate η = 0.1 and momentumfactor α = 0.1 is implemented. Initially the synapticweights were randomly allotted to train the network.

• The network was trained first for 5000 iterations. Once,trained the network returned the synaptic weights,which were then fed to the network.

• Therefore, instead of random weights, now predefinedvalues of synaptic weights were allotted Also, themomentum factor and learning rate were too highinitially, which led the network to the condition ofLOCAL MINIMA and erroneous results were obtained.Later on, the learning rate and momentum factor werereduced to a value of 0.1.

[email protected]

Page 73: ANN load forecasting

SIMULATION RESULTS

• The input data of January for calendar year 2000 was provided on daily basis andforecasted value is compared with that of the actual load. As can be seen, the ANNmodel’s forecasts followed the actual load pattern more accurately and, on theaverage throughout the forecasted period (only 2 times it exceeds 5000 MWHr).This high level of performance is mainly due to the more accurate weathermodeling, and the ability of the ANN model to respond rapidly to sudden changes.

• Rapid model response was one of the main objectives of this development from itsconception and it is certainly one of the main contributions of this work Theresults are presented in this section to demonstrate the performance of thedeveloped neural network.

• The average error is taken as the performance measure. The forecast was based assaid earlier from the historical data collected from LDC. The errors at certain pointsare more due to abnormal load behavior during those particular days.

• This means that the network was not trained for such a situation and the resultsare unexpected.

• It is also observed that the error is generally more on those hours of steep fall orrise in the load compared to smooth transition in load from one day to another.

[email protected]