100%(1)100% fanden dieses Dokument nützlich (1 Abstimmung)

262 Ansichten107 SeitenJun 16, 2011

© Attribution Non-Commercial (BY-NC)

DOCX, PDF, TXT oder online auf Scribd lesen

Attribution Non-Commercial (BY-NC)

Als DOCX, PDF, TXT **herunterladen** oder online auf Scribd lesen

100%(1)100% fanden dieses Dokument nützlich (1 Abstimmung)

262 Ansichten107 SeitenAttribution Non-Commercial (BY-NC)

Als DOCX, PDF, TXT **herunterladen** oder online auf Scribd lesen

Sie sind auf Seite 1von 107

BY

K. Rithvik Prasad 07955A0203

ACKNOWLEDGEMENT

The success accomplished in this project has been possible by the timely help and guidance by many people. We wish to express our sincere and heartfelt gratitude to those who have helped us in one way or other for completion of our project. We wish to express our propound sense of gratitude to Sri.P.Sridhar Reddy for providing valuable guidance in successfully carrying out the project work. We have immense pleasure in expressing our thanks and deep sense of gratitude to our guide Mrs.V.Naga Smitha, Department of Electrical and Electronics engineering, We would like to thank our Head of the Department, Prof. K.Manikyala Rao for granting us permission and providing necessary facilities to work and for his advice through out the course of the project .We would always be grateful to him for his co-operation and kindness. We would like to thank our beloved Principal, Prof. Dr G.POSHAL for his valuable support in every aspect in making this project a success.

Finally we express our sincere gratitude to all the faculty members of EEE dept. our parents and our friends who contributed their valuable advice and helped to complete the project successful

1.1.Back Ground 1.2..Importance of the load forecasting 1.3.The purpose of work 1.4..The structure of the work

2. Load forecasting

2.1.The factors affecting the load 2.2..Properties of load curve 2.3.Types of load forecasting 2.3.1.Long term load forecasting 2.3.2.Medium term load forecasting 2.3.3.Short term load forecasting 2.4.Short term load forecasting techniques 2.4.1.Time series models 2.4.2.Multiple linear regression models 2.4.3.Stochastic models 2.4.4.State space models 2.4.5.ANN based load forecasting

3.Fuzzy logic

3.1.Introduction 3.2.Fuzzy inference system 3.2.1 .Main terms in fuzzy inference system

4.Fuzzy logic module

5.Artificial neural network

6. FL inference module with the base of Ann 7. Data of load and temperature 8. Load forecasting 9. Instructions used in program 10. STLF program 11. Results 12. Conclusion 13.Appendix 14. Reference

ABSTRACT:

This project presents the approach to the short term load forecasting using Artificial Neural Network (ANN) and Fuzzy Logic. Artificial Neural Networks (AAN) have recently been receiving considerable attention and a large number of publications concerning ANN-based short-term load forecasting (STLF) have appeared in the literature. Along with this Fuzzy Logic , also a part of Artificial Intelligence, is known to result in accurate predictions. In this paper, a model using Fuzzy Logic with the help of an ANN system is used to predict the load. There are a number of factors which affect the load, among which, temperature plays a vital role. Here, we have analyzed the forecasting of load with an added parameter of temperature.

Introduction

Load forecasting is the one of the central function in power system operations. The motivation for accurate forecasts lies in the nature of electricity as a commodity and trading article. Electricity cannot be stored, which means that for an electric utility the estimate of the future demand necessary in managing the production and purchasing in an economically reasonable way. Load forecasting methods can be divided into very short term, mid and long term models according to the time span. In very short term load forecasting the prediction time can be as short as a few minutes, while in the long term forecasting it is from a few years up to several decades. This work concentrates on short term load forecasting, where the prediction time varies between a few hours and about one week.

Short term load forecasting (STLF) has been lately a very commonly addressed problem in power system literature. One reason is that recent scientific innovations have brought in new approaches to solve the problem. The development in computer technology has broadened possibilities for these and other methods working and a real time environment. Another reason may be that there is an international movement towards greater competition in electricity markets. Even if many forecasting procedures have been tested and proven successful, none has achieved a strong stature as a generally applied method. A reason is that the circumstances and requirements of a particular situation have a significant influence on choosing the appropriate model. The results presented in the literature are usually not directly comparable to each other.

A majority of the recently reported approaches are based on Artificial Neural Networks and Fuzzy logic (FL) systems have each yielded very encouraging results in solving the problem of Short term load forecasting (STLF). Model combinations such as fuzzy pre-processing of neural network inputs and fuzzy post processing of neural networks outputs have yielded advances in reducing the forecasting error. This project describes the development of a FL based model for STLF. The developed model will provide a daily profile for 24-hour a head load forecast for normal week days and holidays. 1.2. IMPORTANCE OF THE LOAD FORECASTING: Load forecasting has always been important for planning and operational decision conducted by utility companies. However, with the deregulation of the energy industries, load forecasting is even more important. With supply and demand fluctuating and the changes of weather conditions and energy prices increasing by a factor of ten or more during peak situations, load forecasting is vitally important for utilities. Short-term load forecasting can help to estimate load flows and to make decisions that can prevent overloading. Timely implementations of such decisions lead to the improvement of network reliability and to the reduced occurrences of equipment failures and blackouts. Load forecasting is also important for contract evaluations and evaluations of various sophisticated financial products on energy pricing offered by the market. In the deregulated economy, decisions on capital expenditures based on longterm forecasting are also more important than in a non-deregulated economy when rate increases could be justified by capital expenditure projects.

1.3. THE PURPOSE OF WORK: This project studies the applicability of Fuzzy Logic model with a base of Artificial Neural model on Short Term Load Forecasting. This model forecasts the load for one whole day at a time. electric utility. As there is need to forecast the load accurately at all spans, another goal is to study the performance of the models for different lead times. Intuitively, it seems possible that different models should be preferred for different time spans even within the short term forecasting range. The work provides the basis for an automatic forecasting application to be used in a real-time environment. There are some properties, which are considered important: The model should be automatic and able to adapt quickly to changes in the load behavior. The model is intended for use in many different cases. This means that generality is desired. Updating the forecast with new available data should be possible. The hours closest to the forecasting time should always be forecast as accurately as possible. This model should be reliable. Even exceptional circumstances must not give rise to unreasonable forecasts. Outdoor temperature should be taken care of. The model should be easily attachable to an energy management Different weather conditions typical in Delhi, especially, large variation of system. Testing is carried out on the real load data of Delhi

1.4. THE STRUCTURE OF THE WORK: In first chapter a brief survey of previous work done on the STLF is discussed. It

concentrates on the subject of load forecasting in general, and needs and uses of the Short Term Load Forecasting. In the second chapter, first, the properties of the load curve of electric utility and different factors affecting the load are discussed. Then possible approaches to the problem are considered. The most popular conventional methods are briefly introduced.

In third chapter discusses Fuzzy Logic (FL) models and their use in load forecasting. First, a short general introduction to FL is given. Then, the most popular network type, the Multi-Layer Perceptron network (MLP) is described. The basic idea in applying MLP based methods to the problem at hand is given. A literature survey on FL Short Term Load Forecasting models is carried out at the end of the chapter. Finally, a description of the FL based hourly forecasting for one week in different seasons by using different models is given. And it Created by MAHEENis also explained the effect of the temperature on the load forecasting. In fourth chapter, FL based short term load forecasting is discussed, and also discussed about the inputs to be chosen to FL for getting better forecasting results. In sixth chapter, conclusions and suggestions for further research are given.

Load Forecasting

Generally, the load of an electric utility is composed of very different consumption units. A large part of the electricity is consumed by industrial activities. Another part is of course used by private people in forms of heating, lighting, cooking, laundry, etc. Also many services offered by society demand electricity, for example street lighting, railway traffic etc. Factors affecting the load depend on the particular consumption unit. The industrial load is usually mostly determined by the level of the production. The load is often quite steady, and it is possible to estimate its dependency on different production levels. However, from the point of view of the utility selling electricity, the industrial units usually add uncertainty in the forecasts. The problem is the possibility of unexpected events, like machine breakdowns or strikes, which can cause large unpredictable disturbances in the load level. In the case of private people, the factors determining the load are much more difficult to define. Each person behaves in his own individual way, and human psychology is involved in each consumption decision. Many social and behavioral factors can be found. For example, big events, holidays, even TVprograms, affect the load. The weather is the most important individual factor; the reason is largely being the electric heating of houses, which becomes more intensive as the temperature drops. As large part of the consumption is due to private people and other small electricity customers, the usual approach in load forecasting is to concentrate

on the aggregate load of the whole utility. This reduces the number of factors that can be taken into account, the most important being. In the short run, the meteorological conditions cause large variation in this aggregated load. In addition to the temperature, also wind speed, cloud cover, and humidity have an influence. In the long run, the economic and demographic factors play the most important role in determining the evolution of the electricity demand. From the point of view of forecasting, the time factors are essential. By these, various seasonal effects and cyclical behaviors (daily and weekly rhythms) as well as occurrences of legal and religious holidays are meant. The other factors causing disturbances can be classified as random factors. These are usually small in the case of individual consumers, although large social events and popular TV-programs add uncertainty in the forecasts. Industrial units, on other hand, can cause relatively large disturbances. Only Short Term Forecasting will be dealt in this project, and the time span of the forecasts will not range further than about one week ahead. Therefore, the economic and demographic factors will not be discussed. The decision to combine all consumption units into one aggregate load means that the forecasting rests largely on the past behavior of the load. Time factors play the key role in the analysis of this work.

2.2 PROPERTIES OF LOAD CURVE: In this work, the load curve to be forecasted consists of hourly load values, which are in reality hourly averages. This means that the load curve can be seen as a time series of real numbers, each being the average load of one hour. Although, the number of the observations is restricted to 24 per day, the models studied can be applied with slight modifications to cases where the interval between observations is shorter. The hourly electric load demand of a Delhi electricity utility is used throughout this work as the test case. The hourly temperature data from the influential district is also available. The data of the months Aug 2009 are available, so the length of the data set is about 4 weeks. For a more thorough testing, load data of an even longer time period would be preferred. The load curve for different weeks shown in figure can be easily seen; in the winter, the average load is about twice as high as in the summer. The extent of this property is a special characteristic of Delhi's load conditions, and is due to great differences between the weather conditions of different seasons of the year.

The weekly rhythm originates from the working day weekend rhythm obeyed by most people. On working days social activities are at a higher level than on Saturdays and Sundays, and therefore the load is also higher. The series begins with five quite similar patterns, which are the load curves of

Monday-Friday. Then two different patterns for Saturday and Sunday follow. This same weekly pattern is then repeated.

2.3 TYPES OF LOAD FORECASTING:

Depending upon the period of forecast, the load forecast is of three types: 2.3.1 Long term Load forecast 2.3.2 Medium term Load forecast 2.3.3 Short-term load forecast. The Long-term load forecast takes quite a long time to plan, install and additional generating capacity. In this we are presenting Short term Load forecast, which is important for online control and security evaluation of a large system.

2.3.1 LONG TERM LOAD FORECASTING:

It takes quit a long time to plan, install and commission additional generating capacity. Generally, system expansion planning starts with a forecast of anticipated future load requirements. Proper long term forecasting is necessary for optimal generation capacity expansion. One method, used by many utilities, for long term, load forecasting is extrapolation. This technique involves fitting trend curves to basic historical data, adjusted to reflect the growth trend itself. Once the trend curve is known, the forecast is found by evaluating the trend curve function at the desired future point.

Another technique for long term load forecasting is Correlation. This technique relates system leads to various demographic and economic factors. Typical factors like: population, employment, industrial licenses, appliance saturation, weather data etc. are used in correlation techniques. However, the forecasting the demographic and economic factors is rather difficult.

2.3.2 MEDIUM TERM LOAD FORECAST:

Medium term load forecast is just as important as Long term load forecasting. The only difference is the time range. This type of forecast takes the time period ranging from a couple of months to a year or so.

2.3.3 SHORT TERM LOAD FORECAST:

A precise short term load forecasting is essentially for monitoring and controlling power system operation. The hourly load forecast with a lead-time up to one week in advance is necessarily for online solution of scheduling problem. A 24hour load forecast is needed for successful operation of power plant. One hour forecast is important for online time control and security evaluation of a large power system.

Short-term load forecasting techniques generally involve physical decomposition of load into components. The load is decomposed into a daily pattern reflecting the difference in activity level during the day. A weekly pattern representing the day of the week effect on load is done. A trend component concerning the seasonal growth in load and a weather sensitive component reflecting the deviations in load due to weather fluctuations is also considered. The random errors can be statistically analyzed to obtain a

stochastic model for a error estimation. Thus, the expected hourly load forecast is divided in to 5 components and can be written as: Y (i, j). =ADP (j)+AWP (k, j)+WSC (i, j)+TR (i)+SEC (i, j) Where Y (i, j)=Load forecast for j th hour of i th day. ADP (j)=Average daily load pattern at j th hour. AWP (k, j)=Average weekly load pattern at j th hour and k th day of week. (k=1,27) WSC (i, j)=Weather sensitive component at j th hour of i th day SEC (i, j)=Stochastic error component which is assumed to be normally distributed. TR (i)=Trend component of load on i th day. The average daily pattern represents the hour of the day effect. It is an average of the daily load pattern over an optimal number of past days. The average weekly pattern reflects the day of week effect. It is calculated as the average of the weekly cycles over a certain number of past weeks. The weather sensitive components represent the changes in customer requirements according to variations in weather conditions. Generally temperature is considered as the only weather variable since data banks for other weather variables like wind, humidity etc. are usually not available.

The trend component includes three components: a long-term growth trend, a short-term trend dependent on the economic cycle and a time of the year pattern. The statistical error components represent error in estimate. The standard deviation and variance are usually taken as error parameters.

2.4 SHORT TERM LOAD FORECASTING TECHNIQUES:

Load forecasting has been a central and an integral process in planning and operation of electric utilities. Many techniques and approaches have been investigated to tackle this problem in the last two decades. These are often different in nature and apply different engineering considerations and economic analysis. Some of the short-term loads forecasting techniques have been listed below.

2.4.1 Time series models 2.4.2 Multiple Linear regression models 2.4.3 Stochastic models 2.4.4 State space models 2.4.5 ANN based load forecasting

In the simplest form, a time series model takes the previous week's actual load pattern as a model to predict the present week's load. Alternatively, a set of load patterns is stored for typical weeks with different weather conditions. These are then heuristically combined to create the forecast.

N

z(t)=

i=1

Where the load at time t is expressed as a weighted sum of explicit time functions, usually sinusoids with a period of 24 or 168. The coefficients a(i) are slowly varying constants being usually estimated through a linear regression or exponential smoothing. The modeling error v(t) is assumed to be white noise.

2.4.2 Regression models:

Regression models normally assume that the load can be divided into a standard load component and a component linearly dependent on some explanatory variables. The model can be written:

N

z(t)=b(t)+

a (i ) y (t ) I (t ) 2.2

i i !1

Where b (t) is the standard load, (t)is a white noise component, and yi(t) are the independent explanatory variables. The most typical explanatory variables are weather factors. They model different consumer categories by separate regression models. The load is divided into a rhythm component and a temperature dependent

component. The rhythm component corresponds to the load of a certain hour in the average temperature of the modeling period. More complicated model variations have also been proposed. Some models use earlier load values as explanatory variables in addition to external variables. Regression models are among the oldest methods suggested for load forecasting. They are quite insensitive to occasional disturbances in the measurements. The easy implementation is another of its strengths. The serial correlation, which is typical when regression models are used on time series, can cause problems.

2.4.3 Stochastic models:

The method appears to be popular that has been applied and is still applied to STLF in electric power industry. The load series y(t), is modeled as the output form a linear filter that has a random series input, a(t) usually called white noise as shown in figure.

Depending on the characteristic of the linear filter, different models are classified as Autoregressive (AR) process, Moving average (MA) process, Autoregressive Moving Average (ARMA) process. This is a very popular class of dynamic forecasting models. The basic principle is that the load time series can first be transformed into a stationary time series (i.e. invariant with respect to time) by a suitable differencing. Then the remaining stationary series can be filtered into white noise. The models assume that the properties of the time series remain unchanged for the period used in model estimation, and all disturbances are due to this white noise component contained in the identified process. The stochastic time series models have many attractive features. First, the theory of the models is well known and therefore it is easy to understand how the forecast is composed. The properties of the model are easy to calculate; the estimate for the variance of the white noise component allows the confidence intervals for the forecasts to be created. The model identification is also relatively easy. Established methods for diagnostic checks are available. Moreover, the estimation of the model parameters is quite straightforward, and the implementation is not difficult. The weakness in the stochastic models is in the adaptability. In reality, the load behavior can change quite quickly at certain parts of the year. While in ARIMA models the forecast for a certain hour is in principle a function of all earlier load values, the model cannot adapt to the new conditions very quickly,

even if model parameters are estimated recursively. A forgetting factor can be used to give more weight to the most recent behavior and thereby improve the adaptability. Another problem is the handling of the anomalous load conditions. If the load behavior is abnormal on a certain day, this deviation from the normal conditions will be reflected in the forecasts into the future. A possible solution to the problem is to replace the abnormal load values in the load history by the corresponding forecast values.

2.4.4 State-space models:

In the linear state-space model, the load at time t can be written: Z (t)=CT x (t), Where X (t+1)=Ax (t)+Bu (t)+w (t),

The state vector at time t is x (t), and u (t) is a weather variable based input vector. w(t) is a vector of random white noise inputs. Matrices A, B, and the vector C are assumed constants. There exist a number of variations of the model. Some examples can be found. In fact, the basic state-space model can be converted into an ARIMA model and vice versa, so there is no fundamental difference between the

properties of the two model types. According to Gross and Galiana (1987), a potential advantage over ARIMA models is the possibility to use prior information in parameter estimation via Bayesian techniques. Yet, they point out that the advantages are not very clear and more experimental comparisons are needed.

2.4.5: EXPERT SYSTEMS MODELS:

Expert systems are heuristic models, which are usually able to take both quantitative and qualitative factors into account. Many models of this type have been proposed since the mid 1980's. A typical approach is to try to imitate the reasoning of a human operator. The idea is then to reduce the analogical thinking behind the intuitive forecasting to formal steps of logic. A possible method for a human expert to create the forecast is to search in history database for a day that corresponds to the target day with regard to the day type, social factors and weather factors. Then the load values of this similar day are taken as the basis for the forecast. An expert system can thereby be an automated version of this kind of a search process .On the other hand, the expert system can consist of a rule base defining relationships between external factors and daily load shapes as in Fuzzy Logic models. The heuristic approach in arriving at solutions makes the expert systems attractive for system operators; the system can provide the user with the line of reasoning followed by the model.

Some of the expert system models include Artificial Neural Network (ANN) model, Fuzzy Logic (FL) model and the combination of both ANN-FL models.

Fuzzy Logic

3.1 INTRODUCTION:

Fuzzy logic is a form of evalued logic derived from fuzzy set theory to deal with reasoning that is approximate rather than precise. In contrast with "crisp logic", where binary sets have binary logic, the fuzzy logic variables may have a membership value of not only 0 or 1 that is, the degree of truth of a statement can range between 0 and 1 and is not constrained to the two truth values of classic propositional logic. Furthermore, when linguistic variables are used, these degrees may be managed by specific functions. Fuzzy logic emerged as a consequence of the 1965 proposal of fuzzy set theory by Lotfi Zadeh. Though fuzzy logic has been applied to many fields, from control theory to artificial intelligence, it still remains controversial among most statisticians, who prefer Bayesian logic, and some control engineers, who prefer traditional two-valued logic

3.2 FUZZY INFERENCE SYSTEM:

Fuzzy inference is the process of formulating the mapping from a given input to an output using fuzzy logic. The mapping then provides a basis from which decisions can be made, or patterns discerned. The process of fuzzy inference involves all of the pieces that are described in the previous sections: Membership, Logical Operations, and If-Then Rules. You can implement two types of fuzzy inference systems in the toolbox: Mamdanitype and Sugeno-type. These two types of inference systems vary somewhat in the way outputs are determined.

3.2.1 MAIN TERMS IN FUZZY INFERENCE SYSTEM: Fuzzification Membership function Rule base Inferencing Defuzzification

a) FUZZIFICATION:

The fuzzification comprises the process of transforming crisp values into grades of membership for linguistic terms of fuzzy sets. The membership function is used to associate a grade to each linguistic term.

b) MEMBERSHIP FUNCTIONS:

The membership function is a graphical representation of the magnitude of participation of each input. It associates a weighting with each of the inputs that are processed, define functional overlap between inputs, and ultimately determines an output response. The rules use the input membership values as weighting factors to determine their influence on the fuzzy output sets of the final output conclusion. Once the functions are inferred, scaled, and combined, they are defuzzified into a crisp output which drives the system. There are different membership functions associated with each input and output response. Some features to note are:

exponential have been used. More complex functions are possible but require greater computing overhead to implement.

y y y HEIGHT or magnitude (usually normalized to 1) WIDTH (of the base of function) SHOULDERING (locks height at maximum if an outer function.

y CENTER points (center of the member function shape)

OVERLAP (N&Z, Z&P, typically about 50% of width but can be less).

Figure above, illustrates the features of the triangular membership function which is used in this example because of its mathematical simplicity. Other shapes can be used but the triangular shape lends itself to this illustration. The degree of membership (DOM) is determined by plugging the selected input parameter (error or error-dot) into the horizontal axis and projecting vertically to the upper boundary of the membership function(s).

c) RULE BASE:

Fuzzy set theory defines fuzzy operators on fuzzy sets. The problem in applying this is that the appropriate fuzzy operator may not be known. For this reason, fuzzy logic usually uses IF-THEN rules, or constructs that are equivalent, such as fuzzy associative matrices.

Rules

are

usually

expressed

in

the

form:

d) INFERENCING:

The last step completed in the example in the last article was to determine the firing strength of each rule. It turned out that rules 4, 5, 7, and 8 each fired at 50% or 0.5 while rules 1, 2, 3, 6, and 9 did not fire at all (0% or 0.0). The logical products for each rule must be combined or inferred (maxmin'd, max-dot'd, averaged, root-sum-squared, etc.) before being passed on to the defuzzification process for crisp output generation. Several inference methods exist.

The MAX-MIN method tests the magnitudes of each rule and selects the highest one. The horizontal coordinate of the "fuzzy centroid" of the area under that function is taken as the output. This method does not combine the effects of all applicable rules but does produce a continuous output function and is easy to implement.

The MAX-DOT or MAX-PRODUCT method scales each member function to fit under its respective peak value and takes the horizontal coordinate of the "fuzzy" centroid of the composite area under the function(s) as the output.

e) DEFUZZICATION:

The defuzzification of the data into a crisp output is accomplished by combining the results of the inference process and then computing the "fuzzy centroid" of the area. The weighted strengths of each output member function are multiplied by their respective output membership function center points and summed. Finally, this area

is divided by the sum of the weighted member function strengths and the result is taken as the crisp output. One feature to note is that since the zero center is at zero, any zero strength will automatically compute to zero. If the center of the zero function happened to be offset from zero (which is likely in a real system where heating and cooling effects are not perfectly equal), then this factor would have an influence. ADVANTAGES OF FUZZY LOGIC:

FL offers several unique features that make it a particularly good choice for many control problems.

and can be programmed to fail safely if a feedback sensor quits or is destroyed. The output control is a smooth control function despite a wide range of input variations.

control system, it can be modified and tweaked easily to improve or drastically alter system performance. New sensors can easily be incorporated into the system simply by generating appropriate governing rules.

FL is not limited to a few feedback inputs and one or two control outputs,

nor is it necessary to measure or compute rate-of-change parameters in order for it to be implemented. Any sensor data that provides some indication of a system's actions and reactions is sufficient. This allows

the sensors to be inexpensive and imprecise thus keeping the overall system cost and complexity low.

Because of the rule-based operation, any reasonable number of inputs

can be processed (1-8 or more) and numerous outputs (1-4 or more) generated, although defining the rule base quickly becomes complex if too many inputs and outputs are chosen for a single implementation since rules defining their interrelations must also be defined. It would be better to break the control system into smaller chunks and use several smaller FL controllers distributed on the system, each with more limited responsibilities.

FL can control nonlinear systems that would be difficult or impossible to

model mathematically. This opens doors for control systems that would normally be deemed unfeasible for automation.

4.1. DESIGNING:

The Fuzzy Inference systems, unlike neural networks, are applied to peak load and through load forecasting only. The proposed technique for implementing fuzzy logic based forecasting is:

Identification of the day of a certain week. Forecast maximum and minimum temperature for that particular week Listing the maximum temperature and peak load. For the selected data, the relationship between the load and the temperature is sent to the ANN model. The following is the Fuzzy Logic module design consisting of two input variables, a rule base, where the processing of the membership functions are done; and the output variable.

FIGURE 4.1: FUZZY LOGIC MODULE 4.1.1 INPUT VARIABLES: There are two input variables used in terms of temperature, namely Temperature 1 and Temperature 2. A more accurate fuzzy expert system can be obtained by dividing the region into intervals. Each interval has its own membership function. The intervals for the temperature forecasting errors are defined as follows.

Temperatures much lower than the forecasted value (VC) Temperatures lower than the forecasted value (C) Temperatures closer to the forecasted value (CMF) Temperatures higher than the forecasted value (H)

In this project the inputs to the Fuzzy logic Model are the following two sets of temperature data.

CMF Comfortable H VH And, NB NS ZE Negative Big Negative Small Zero Hot Very Hot, for the membership functions

PS PB

4.1.2: RULE BASE Here the rules are created according to the tables above which concern the input variables. The rules are formed as, IF condition AND condition THEN result. So as a result of 5 membership functions for each input variable, there are on a total, 25 rules. According to the variation in the temperature, the relationship is formed between the temperature and the load. This, results in the formation of load pattern, which is later utilized by an ANN model forecast the load. 4.1.3: INFERENCE AND DEFUZZIFICATION: The rules are processed according to the ranges of the membership functions and the output result is obtained. The result is the liaison between the temperature and the load which is required for optimum load forecast. The method used to convert fuzzy sets to crisp output set is the Centroid method of Defuzzification.

5.1 INTRODUCTION:

A neural network is an interconnected assembly of simple processing elements known as neurons. The processing ability of the network is stored in inter - unit connection strengths called weights obtained by a process of learning from a set of training patterns. It is a massively parallel distributed processor made up of neurons which has a natural propensity for storing experiential knowledge and making it available for use. It resembles the brain in two respects,

Knowledge is acquired by the network from its environment

Interneuron connection strengths known as synaptic weights

are used to store the acquired knowledge. The Artificial Neural Networks are inspired from the human brain which consists of structural constituents called neurons (nodes, units, processing elements etc). The human brain consists of 1010 to 1011 neurons, each of which is connected to 104 neurons. These neurons communicate with each other by means of electric impulses.

FIGURE 5.1: ARTIFICIAL NEURAL NETWORKS Neural networks can be classified as, single layered and multi layered models.

y

Single layered models: These networks contain only one layer of neurons, to which the input is given and an output is obtained.

Multi layered models: These networks have three or more layers. For models as these, there are basically three layers namely, input layer, hidden layer and the output layer.

All neural network models after modeling must undergo training, and there are three distinct classifications through which networks may be trained.

Supervised training method: In this method, the network is made to

learn by providing an external teacher. Here a set of example pairs are given (x,y), x X and y Y, and the aim is to find a function f : X Y in the allowed class of functions that matches the examples. Tasks that fall within the paradigm of supervised learning are pattern recognition (also

Unsupervised training method: In this method we are given some data

x, and the cost function to be minimized can be any function of the data x and the network's output, f. Here an external teacher is not used. Tasks that fall within the paradigm of unsupervised learning are in general estimation problems.

Reinforcement learning: It projects the learning aspects based on the

networks actions and are represented either as good action or bad action. Tasks that fall within the paradigm of reinforcement learning are control problems, games and other sequential decision making tasks.

5.3 FEED FORWARD PERCEPTRON MODEL: The original perceptron model was developed by Frank Rosenblatt in 1958. This model consisted of three layers, (1) a retina that distributed the inputs to the second layer, (2) association units that combine the inputs with weights and trigger a threshold activation function which feeds to the output layer, (3) the output layer which combines the values. Multi-Layer Perceptron network is the most popular neural network type and most of the reported neural network short-term load forecasting models are based on it. The basic unit (neuron) of the network is a perceptron. This is a computation unit, which produces its output by taking a linear combination of the input signals and by transforming this by a function called activity function. The output of the perceptron as a function of the input signals can thus be written:

where y is the output xi are the input signals wi are the neuron weights q is the bias term (another neuron weight) s is the activity function Activation function: A function used to transform the activation level of a unit (neuron) into an output signal. Typically, activation functions have a "squashing" effect. There are a wide range of activation functions. Some of the most important and widely used functions are threshold function, sigmoid function, piecewise linear function and hard limiter function. Possible forms of the activity function are linear function, step function, logistic function and hyperbolic tangent function.

The MLP network consists of several layers of neurons. Each neuron in a certain layer is connected to each neuron of the next layer. There are no feedback connections. A three-layer MLP network is illustrated in figure 4.6 The most often used MLP-network consists of three layers: an input layer, one hidden layer, and an output layer. The activation function used in the hidden layer is usually nonlinear (sigmoid or hyperbolic tangent) and the activation function in the output layer can be either nonlinear (a nonlinear-nonlinear network) or linear (a nonlinear network). Input Layer: A vector of predictor variable values (x1...xp) is presented to the input layer. The input layer (or processing before the input layer) standardizes these values so that the range of each variable is -1 to 1. The input layer distributes the values to each of the neurons in the hidden layer. In addition to the predictor variables, there is

a constant input of 1.0, called the bias that is fed to each of the hidden layers; the bias is multiplied by a weight and added to the sum going into the neuron. Hidden Layer: Arriving at a neuron in the hidden layer, the value from each input neuron is multiplied by a weight (wji), and the resulting weighted values are added together producing a combined value uj. The weighted sum (uj) is fed into a transfer function, , which outputs a value hj. The outputs from the hidden layer are

distributed to the output layer. Output Layer: Arriving at a neuron in the output layer, the value from each hidden layer neuron is multiplied by a weight (wkj), and the resulting weighted values are added together producing a combined value vj. The weighted sum (vj) is fed into a transfer function, network. , which outputs a value yk. The y values are the outputs of the

DATA PROCESSING UNIT: Here the entire raw data is continuously uploaded into a storage unit. This data is the load with all the different variations and factors that affect the load.This is then sent to the next block, which is the Preprocessing unit.

PREPROCESSING DATA: Here, the raw data sent from the processing unit, is preprocessed, or, made ready with appropriate conditions and requirements, that are needed by the Fuzzy Logic Module to work. In this paper, the data is processed in terms of patterns of weeks. The entire load which is sent, is divided into weeks and the load patterns are created. Also, the temperature as an added parameter is segregated. FUZZY LOGIC MODULE: This is the heart of the entire process. Here, the FLM shows the relationship between the load and the temperature as a parameter. It shows how the temperature affects the variations in the load. Without this, the ANN model will be unable to give accurate results. The rest of the process heavily depends on the values given by the FLM. The following is the internal process of the FLM.

FUZZIFICATION:

The fuzzification comprises the process of transforming crisp values into grades of membership for linguistic terms of fuzzy sets. The membership function is used to associate a grade to each linguistic term.

INPUT VARIABLES: Both the variables are in terms of temperature and they are divided into 5 membership functions. MEMBERSHIP FUNCTIONS: The membership function is a graphical representation of the magnitude of participation of each input. It associates a weighting with each of the inputs that are processed, define functional overlap between inputs, and ultimately determines an output response. The input variables 5 membership functions are divided as very cold(VC), cold(C), comfortable(COM), hot (H), very Hot (VH). RULES: Fuzzy set theory defines fuzzy operators on fuzzy sets. The problem in applying this is that the appropriate fuzzy operator may not be known. For this reason, fuzzy logic usually uses IF-THEN rules, or constructs that are equivalent, such as fuzzy associative matrices.

Rules are usually expressed in the form: IF variable IS property THEN action

DEFUZZIFICATION: The defuzzification of the data into a crisp output is accomplished by combining the results of the inference process and then computing the "fuzzy centroid" of the area. The weighted strengths of each output member function are multiplied by their respective output membership function center points and summed. Finally, this area is divided by the sum of the weighted member function strengths and the result is taken as the crisp output. This crisp output is in the form of a relationship between load and temperature. Finally the output of the FLM is given to the ANN model

%august 2008(1 is Thursday) aug=[2152 2021 1982 1995 1882 1968 2026 2032 2090 2287 2403 2403 2433 2513 2574 2466 2464 2512 2486 2555 2630 2712 2644 2587; 2554 2538 2434 2380 2325 2321 2266 2254 2184 2208 2251 2237 2229 2279 2405 2458 2457 2237 2268 2308 2430 2557 2532 2498; 2554 2538 2434 2380 2325 2321 2266 2254 2184 2208 2251 2237 2229 2279 2405 2458 2457 2237 2268 2308 2430 2557 2532 2498; 2417 2354 2336 2222 2225 2207 2133 2103 2206 2222 2542 2485 2115 1967 2040 2019 2088 2051 2186 2403 2276 2401 2332 2262; 2134 2029 1907 1719 1638 1569 1653 1711 1771 2016 1802 1863 1983 2032 2078 2109 2186 2197 2245 2332 2385 2346 2245 2230; 2148 2071 2068 2040 2008 1957 2029 2106 2130 2381 2382 2426 2299 2392 2451 2471 2499 2308 2151 2468 2509 2451 2447 2387; 2255 2199 2197 2085 2071 2108 2037 1874 1909 2077 2082 2100 2155 2236 1756 2164 2168 2199 2215 2250 2354 2430 2413 2292; 2116 2066 1978 1942 1847 1856 1941 2067 2150 2311 2446 2506 2449 2374 2433 2443 2489 2411 2411 2479 2518 2259 2453 2394; 2322 2225 2168 2272 2088 2253 2085 2092 2154 2262 2347 2309 2219 2198 2169 2213 2220 2180 2202 2426 2451 2495 2428 2351;

2303 2223 2179 2105 2086 2095 2100 2177 2129 2151 2141 2164 2177 2197 2245 2335 2338 2324 2177 2197 2245 2335 2338 2324; 2340 2310 2270 2243 2213 2192 2133 2193 2228 2468 2458 2465 2506 2553 2590 2545 2498 2553 2561 2698 2700 2692 2709 2641; 2502 2468 2442 2424 2379 2293 2252 2295 2436 2587 2644 2515 2518 2587 2647 2595 2527 2539 2622 2608 2616 2690 2714 2615; 2560 2502 2457 2419 2442 2458 2388 2403 2431 2556 2597 2563 2571 2622 2680 2662 2640 2614 2607 2693 2524 2617 2700 2590; 2521 2513 2501 2415 2410 2430 2379 2383 2466 2605 2634 2450 2353 2298 2218 2351 2405 2305 2308 2449 2468 2574 2544 2461; 2301 2242 2242 2208 2118 2064 2459 2180 2309 2533 2535 2409 2518 2513 2626 2679 2707 2534 2571 2608 2592 2704 2711 2627; 2541 2510 2440 2389 2321 2304 2207 2158 2227 2391 2304 2212 2149 2051 2055 2116 2194 2146 2253 2379 2429 2469 2444 2340; 2227 2148 2117 2016 2010 2032 2004 2033 2070 2061 2148 2123 2116 2078 2123 2138 2200 2225 2244 2402 2476 2563 2498 2428; 2289 2204 2179 1958 2041 1885 2065 2105 2215 2415 2412 2325 2422 2447 2500 2597 2565 2478 2463 2519 2387 2393 2382 2412; 2335 2277 2209 2184 2138 2114 2134 2226 2288 2452 2 2579 2497 2554 2505 2481 2530 2644 2732 2695 2562;

2452 2437 2357 2319 2280 2256 2222 2295 2229 2443 2544 2408 2441 2464 2471 2471 2547 2450 2499 2534 2524 2632 2657 2663; 2532 2443 2402 2337 2367 2327 2314 2269 2281 2503 2568 2534 2541 2511 2624 2747 2601 2384 2634 2640 2613 2665 2677 2677; 2618 2539 2474 2505 2373 2344 2289 2379 2418 2650 2710 2685 2676 2779 2773 2691 2640 2465 2421 2599 2584 2676 2490 2628; 2529 2513 2498 2390 2405 2279 2275 2317 2347 2620 2550 2515 2408 2478 2510 2576 2546 2453 2397 2414 2427 2479 2443 2389; 2304 2189 2186 2173 2115 2138 1963 2097 2124 2193 2191 2201 2120 2122 2052 2055 2099 2106 2094 2033 2324 2409 2400 2300; 2206 2187 2143 2109 2021 1984 1918 2062 1908 2244 2363 2311 2370 2314 2391 2228 2311 2292 2306 2439 2349 2414 2371 2266; 2140 2085 2046 1970 1988 1972 1944 2084 2156 2276 2425 2421 2221 2294 2209 2361 2407 2384 2400 2430 2432 2551 2533 2387; 2238 2216 2139 2058 2055 2039 2183 2116 2107 2406 2409 2403 2386 2408 2393 2506 2473 2381 2390 2466 2391 2428 2472 2322; 2257 2215 2205 2127 2070 2090 2130 2146 2343 2517 2559 2521 2263 2590 2575 2552 2529 2488 2263 2590 2575 2552 2529 2488; 2491 2408 2434 2371 2333 2311 2327 2300 2397 2509 2523 2515 2547 2543 2562 2627 2621 2628 2600 2737 2591 2745 2642 2545;

2500 2487 2422 2376 2348 2326 2326 2191 2244 2475 2512 2578 2470 2486 2555 2569 2523 2517 2592 2570 2590 2563 2410 2416]; 7.2 TEMPERATURE DATA: T2=[58 60 64 61 61 69 68 72 69 61 68 69 69 69 61 69 69 68 69 65 59 59 63 65 70 62 58 63 62 62 69 69 69 65 66 64 72 77 85 75 70 72 75 74 71 79 75 72 76 75 74 79 80 74 75 80 78 81 83 84; 58 59 61 60 60 67 68 73 66 59 67 69 67 68 60 68 68 66 68 65 58 58 63 65 69 62 57 62 60 64 68 67 67 63 66 63 70 75 82 74 69 71 75 73 70 78 75 71 75 75 71 78 78 73 74 79 76 78 79 82; 57 58 60 59 59 65 67 73 64 59 64 68 66 66 60 67 70 63 64 65 57 57 62 63 68 62 57 60 59 63 68 66 66 61 64 62 70 74 83 72 68 71 74 71 68 78 74 69 72 76 70 74 76 70 74 78 74 76 78 80; 56 57 58 58 57 64 66 72 64 58 63 67 66 64 58 67 70 62 63 64 56 56 62 61 67 61 56 59 58 59 67 65 64 60 62 61 68 74 83 71 67 70 72 70 66 77 73 67 70 74 69 74 76 69 73 78 72 74 77 79; 55 57 57 57 57 63 64 71 64 58 62 64 66 63 56 64 69 61 62 64 55 55 60 60 66 60 55 56 57 58 66 64 64 60 61 60 66 74 80 70 65 68 71 70 66 76 70 66 68 72 68 74 74 68 72 76 71 73 75 77; 54 56 57 56 56 63 62 70 62 57 61 63 64 61 54 63 67 60 61 63 55 55 58 60 65 59 54 55 58 58 64 63 63 59 59 59 65 74 78 69 65 67 70 68 66 75 68 65 72 72 66 72 72 67 72 74 70 71 74 76;

75 77 77 76 79 79 82 83 75 70 76 77 74 70 66 85 79 78 79 73 70 70 69 74 69 72 72 75 78 76 81 80 80 78 79 89 86 95 90 90 82 82 83 81 78 79 77 78 88 88 88 92 87 86 86 91 94 96 101 101; 78 78 80 79 81 82 84 83 76 70 79 80 78 71 67 85 80 79 80 76 72 72 71 78 71 72 74 78 79 78 82 82 80 80 82 91 90 98 92 94 86 85 85 84 83 83 82 85 90 90 88 96 88 87 86 92 95 98 103 102; 78 78 78 78 82 81 83 82 76 68 80 83 81 72 68 83 80 80 80 77 74 74 74 80 73 72 74 79 80 80 82 82 81 80 80 92 93 99 94 94 88 88 86 86 88 86 84 86 91 91 90 95 90 88 87 94 96 98 104 103; 78 77 77 77 81 80 82 80 76 68 80 83 82 73 70 80 80 79 80 79 76 76 73 82 74 72 76 79 80 78 81 82 80 81 80 91 94 99 94 94 87 88 87 88 90 87 83 88 92 92 90 94 90 88 87 96 94 98 104 104; 75 75 74 76 79 79 78 76 74 66 79 82 79 73 70 78 79 78 78 80 75 75 74 82 74 70 75 78 80 78 78 80 77 80 78 90 94 98 94 94 87 88 87 88 90 87 85 89 91 92 90 92 90 87 87 94 88 98 102 104; 71 72 70 70 73 76 76 75 72 64 78 80 76 73 69 75 75 76 76 79 74 74 73 81 74 67 74 76 78 78 75 78 74 77 75 86 93 96 93 92 86 86 86 85 90 87 85 90 90 91 89 90 88 86 86 93 89 97 101 101; 69 69 68 69 71 72 74 74 70 61 74 76 74 72 68 75 73 72 72 78 72 72 72 78 72 65 71 72 75 74 73 75 72 74 71 80 90 95 90 90 85 82 83 84 90 86 85 88 88 89 85 88 87 83 85 88 86 90 95 99;

8.1 DESIGNING OF THE PROGRAM: The short term load forecasting program can be designed by using these following steps:

y y y y y y

Selecting input variables Creating Fuzzy logic module Scaling the input variables Creating a new neural network Selecting the training data Evaluating the prediction performance

Probably one of the most difficult tasks in the design of the network structure is the selection of appropriate network inputs. Because the dynamic behavior or the network is highly dependent on the chosen inputs, the load has to exhibit a strong degree of statistical correlation with these variables. It is also very important that the set of network inputs adequately represents all the external factors influencing the system load. Thus, the process of selecting the relevant network inputs has to be guided by an intuitive knowledge of the various influencing factors, together with a careful numerical validation of these assumptions. Preventing weather patterns have a significant impact on the nature of the load profile. Thus, the inclusion if weather variables in the

network inputs can significantly improve the prediction performance. Typical weather variables include temperature information (hourly, minimum,

maximum, average, etc.), humidity, rainfall, wind velocity, sky condition indicators, and many more. The most important of these are the temperature variables, representing the strongest correlation with weather-related load variations. Temperature can, in general, also be measured to a higher degree of accuracy relative to any of the other weather variables. Many of the forecasted models proposed in the literature employ hourly-varying temperature variables (27. S.T. Chen , D.C. Yu, and A.R.Moghaddamjo,Weather sensitive short term load forecasting using nonfully connected artificial neural network, IEEE Trans. On Power Systems, vol.7,pp.1098-1104, August 1992. 28. C.N.Lu, H.T.Wu, and S.VemuriNeural network based short term load forecasting, IEEE Trans. On Power Systems, vol.8,pp.336-342, Feb1993.). This holds practical limitations in the sense that any increase in performance gained by using an hourly varying temperature variable, is offset by the lack of accuracy in forecasting these values. A much more realistic model is one that relies on temperature variables that are updated at a frequency of, at most, once a day. There is also very strong dependence of the load on time. The daily load profile for a specific day retains essentially the same shape, having more or less the same value for a given hour. These fluctuations are mostly contributed to by localized (in time) weather effects. The properties of these profiles also exhibit variations as a result of seasonal changes in the weather

patterns. Thus, it is evident that the inclusion of time variables is essential if the prediction accuracy is to be maximized. These include hour of the day, day of the week, season of the year, etc. The load shape is also influenced by a vast number of other external influences. The magnitude of the induced load variation is dependent on the system impact of the specific influence. For example, the brown-out of a single 11 kVA domestic transformer may have a negligible effect on the nationwide load, where as the influence of a national holiday will be clearly visible. Sometimes these effects can be quantified and presented to the network as an additional input. In these cases the network forms an adequate internal representation, linking the forecasted load to the specific external influence. More often than not, such a simple technique does not suffice, due to the lack of sufficient data pertaining to a specific external influence, and calls for alternative modeling techniques for these situations (29.K.H.Kim, J.K.Park, K.J.Hwang,and S.H.Kim, Implementation of hybrid short term load forecasting systems using artificial neural networks and fuzzy expert systems, IEEE Trans. On Power Systems, vol.10,pp.1534-1539, August 1995.).

Due to the nature of the sigmoidal transfer function, the outputs of the neurons in the hidden layer , are limited to values between zero and one. Thus, allowing large values for the neuron input variables will cause the threshold function to be driven into saturation frequently, resulting in an inability to train. In practice implementations this problem is solved by scaling the network inputs and outputs to an appropriate range (usually between zero and one). Care has to be taken not to destroy vital relationships between different network variables by the scaling techniques has employed. Thus, as a

rule of thumb, if two network variables represent the same physical parameter (e.g. temperature), albeit for different time instances or geographical locations, they should be scaled according to the same strategy, using the same scaling parameter.

D. CREATING A NEW NEURAL NETWORK:

Because

the

recurrent

neural

network

forms

its

internal

representation relative to the training data, it is important that the selected data closely match the circumstances of the time period to be predicted. From a theoretical point of view, the best network generalization can be obtained by using all of the training samples pertaining to a certain set of conditions. These large data sets, however, often lead to practical difficulties during training. One strategy to work around this problem is to be divide the forecasting in to a number of sub problems, each to be solved by a different networks( e.g. one for each day type). Each of the resulting networks is trained with as large a data set as is practically possible. This allows the network to capture information about the system states and important load trends that is simply not possible with smaller training sets (due to under-representation) and each of the individual networks can be optimized for the specific sub problem. The moving window data selection strategy was proposed to reduce the size of the training sets is required. In this approach the most recent data (e.g. that for previous two weeks) is used to train the network for the required lead-time prediction (mostly 24 hours to one week ahead). For each new forecast the training data is different, and the network is subsequently retrained. This method rests, of course, on the assumptions that the load is relatively stationary within the selected time frame, and weather patterns (or other external influences) are adequately represented by the training data. This is not always the case, and one can intuitively conclude that the prediction

performance will deteriorate as the lead time increase and rapidly changing weather patterns (e.g. cold or warm fronts, seasonal transition effects, etc.) are encountered.

F. EVALUATING THE PREDICTION PERFORMANCE:

The final step in the design procedure is the assessment of the forecasting performance of the trained networks. This evaluation is typically done by quantifying the prediction error obtained on an independent data set. if training was successful, the networks will be able to generalize, resulting in a high accuracy in the forecasting of unknown patterns(provided the training data is sufficiently representative of the forecasting situation). Various error metrics (distance measures) between the actual and forecasted load are defined, but the one most commonly adopted by load forecasters, is the absolute percentage error (APE), defined by

k I APE =

1. In order to create a Perceptron model newff is used. Newff: Create feed-forward back-propagation network Syntax: net = newff(PR,[S1 S2...SNl],{TF1 TF2...TFNl},BTF,BLF,PF) Description: arguments PR - R x 2 matrix of min and max values for R input elements Si - Size of ith layer, for Nl layers Tfi - Transfer function of ith layer (default = 'tansig') BTF - Backpropagation network training function (default = 'traingdx') BLF - Backpropagation weight/bias learning The transfer functions TFi can be any differentiable transfer function such as tansig, logsig, or purelin. The training function BTF can be any of the backpropagation training functions such as trainlm, trainbfg, trainrp, traingd, etc newff(PR,[S1 S2...SNl],{TF1 TF2...TFNl},BTF,BLF,PF) takes several

2. The Transfer Function used as biasing for the hidden layer is sigmoid function Tansig: Hyperbolic tangent sigmoid transfer function

Description: tansig is a neural transfer function. Transfer functions calculate a layer's output from its net input. tansig(N,FP) takes N and optional function parameters, N - S x Q matrix of net input (column) vectors FP - Struct of function parameters (ignored) And returns A, the S x Q matrix of N's elements squashed into [-1 1]. Graph and Symbol:

3. The Transfer Function used as biasing for the output layer is linear transfer funtion Purelin: Linear transfer function Graph and Symbol:

Figure 6.2 Syntax: A = purelin(N,FP) Description: purelin is a neural transfer function. Transfer functions calculate a layer's output from its net input. purelin(N,FP) takes N and optional function parameters, N - S x Q matrix of net input (column) vectors FP - Struct of function parameters (ignored) And returns A, an S x Q matrix equal to N.

4. To train the ANN model train is used. Train: Train neural network Syntax: [net,tr,Y,E,Pf,Af] = train(net,P,T,Pi,Ai,VV,TV) Description: net.trainParam. train(net,P,T,Pi,Ai,VV,TV) takes train trains a network net according to net.trainFcn and

net Network P - Network inputs T - Network targets (default = zeros) Pi - Initial input delay conditions (default = zeros) Ai - Initial layer delay conditions (default = zeros) VV - Structure of validation vectors (default = []) TV - Structure of test vectors (default = []) and returns net - New network tr - Training record (epoch and perf) Y - Network outputs E - Network errors Pf - Final input delay conditions Af - Final layer delay conditions Algorithm: train calls the function indicated by net.trainFcn, using the training parameter values indicated by net.trainParam. Typically one epoch of training is defined as a single presentation of all input vectors to the network. The network is then updated according to the results of all

those presentations. Where, epoch is the complete exposition of total data to the neural network, all at the same time (at once). Training occurs until a maximum number of epochs occur, the performance goal is met, or any other stopping condition of the function net.trainFcn occurs.

5. In order to evaluate the percentage error, the mean error is found by using mean Mean: Average or mean value of array Syntax: M = mean(A) M = mean(A,dim) Description: M = mean(A) returns the mean values of the elements along different dimensions of an array. If A is a vector, mean(A) returns the mean value of A. If A is a matrix, mean(A) treats the columns of A as vectors, returning a row vector of mean values. If A is a multidimensional array, mean(A) treats the values along the first nonsingleton dimension as vectors, returning an array of mean values. M = mean(A,dim) returns the mean values for elements along the dimension of A specified by scalar dim. For matrices, mean(A,2) is a column vector containing the mean value of each row.

6. Grid on: Grid lines for 2-D and 3-D plots Syntax: grid on Description: The grid function turns the current axes' grid lines on and off. grid on adds major grid lines to the current axes.

STLF Program

clc clear all close all Tempdata; august; Load=aug'; Temp=febtemp; %Temp=aug' d=3;%corresponding to WEDNESDAY which was the day on 1st august 2001 for i=1:30 D(i)=d; if(d~=7) d=d+1; else d=1; end end Tmax=max(Temp);

Tmin=min(Temp); for i=1:30 if(i==1) fuzzinp(i,:)=[Tmax(i) Tmax(i)]; else fuzzinp(i,:)=[Tmax(i) Tmax(i-1)]; end end

sys=newfis('sysc'); sys=setfis(sys,'aggmethod','sum');

sys=addvar(sys,'input','temp1',[0 120]); sys=addmf(sys,'input',1,'VC','trapmf',[0 0 20 40]); sys=addmf(sys,'input',1,'CO','trimf',[20 40 60]); sys=addmf(sys,'input',1,'CF','trimf',[40 60 80]); sys=addmf(sys,'input',1,'HO','trimf',[60 80 100]); sys=addmf(sys,'input',1,'VH','trapmf',[80 100 120 120]);

sys=addvar(sys,'input','temp2',[0 120]); sys=addmf(sys,'input',2,'VC','trapmf',[0 0 20 40]); sys=addmf(sys,'input',2,'CO','trimf',[20 40 60]); sys=addmf(sys,'input',2,'CF','trimf',[40 60 80]); sys=addmf(sys,'input',2,'HO','trimf',[60 80 100]); sys=addmf(sys,'input',2,'VH','trapmf',[80 100 120 120]);

sys=addvar(sys,'output','PLANT-OUT',[-1 1]); sys=addmf(sys,'output',1,'NB','trapmf',[-1 -1 -.6 -.3]); sys=addmf(sys,'output',1,'NS','trimf',[-.6 -.3 0]); sys=addmf(sys,'output',1,'ZE','trimf',[-.3 0 .3]); sys=addmf(sys,'output',1,'PS','trimf',[0 .3 .6]); sys=addmf(sys,'output',1,'PB','trapmf',[.3 .6 1 1]);

rulelist=[1 1 3 1 1;1 2 4 1 1;1 3 5 1 1;1 4 3 1 1;1 5 1 1 1;2 1 2 1 1;2 2 3 1 1;2 3 4 1 1;2 4 2 1 1;2 5 1 1 1;3 1 1 1 1;3 2 2 1 1;3 3 3 1 1; 3 4 2 1 1; 3 5 1 1 1;4 1 3 1 1;4 2 4 1 1;4 3 4 1 1;4 4 3 1 1; 4 5 1 1 1;5 1 5 1 1;5 2 5 1 1;5 3 5 1 1; 5 4 5 1 1;5 5 3 1 1]; sys=addrule(sys,rulelist);

Fuzz=evalfis(fuzzinp,sys); FD=4; FH=4; for i=1:645 j=1; inp(j,i)=D(FD); j=j+1; inp(j,i)=FH; j=j+1; inp(j,i)=Fuzz(FD); j=j+1; for k=1:3 for l=1:3 m=FH-l+1; n=FD-k; if(m<=0) m=m+24; n=n-1;

end inp(j,i)=Load(m,n); j=j+1; end end for k=1:3 for l=1:3 m=FH-l+1; n=FD-k; if(m<=0) m=m+24; n=n-1; end inp(j,i)=Temp(m,n); j=j+1; end end inp(j,i)=Tmax(FD-1);

j=j+1; inp(j,i)=Tmin(FD-1); out(i)=Load(FH,FD); if(FH~=24) FH=FH+1; else FH=1; FD=FD+1; end end %***************************************************************************% inp((4:12),:)=inp((4:12),:)/2800; inp((13:23),:)=inp((13:23),:)/100; out=out/2800; %net=newff(minmax(inp),[30 1],{'tansig' 'purelin'}); %net.trainParam.epochs =1000; %net.trainParam.goal = 0; %[net,tr]=train(net,inp,out);

%save('augneurofuzzy1','net') load('augneurofuzzy1') testinp=inp(:,478:645); yyauganntfl=sim(net,testinp)*2800; figure(1) k=1:168; subplot(2,1,1) plot(k,yyauganntfl,'r.',k,out(478:645)*2800,'b'); title('Actual Load Vs Forecasted Load in Mw for one week') xlabel('Hours') ylabel('Actual Load(-)-Forecasted Load (.) ') grid on errorwfl=out(478:645)*2800-yyauganntfl; for i=1:168 percenterrorwfl(i)=errorwfl(i)/(out(i+477)*2800)*100; end; subplot(2,1,2) plot(percenterrorwfl,'-')

title('Percent Error Vs Hour of the Day for one week') xlabel('Hours') ylabel('Percent Error') grid on k=1:168; disp('HOURS || ACTUAL LOAD || FORECASTED LOAD || ERROR || PERCENT ERROR') dataMfl=[k;out(478:645)*2800;yyauganntfl;errorwfl;percenterrorwfl]' disp('Mean Error for one week=') mean(percenterrorwfl) figure(2) k=1:24; subplot(2,1,1) plot(k,yyauganntfl(145:168),'r.',k,out(622:645)*2800,'b'); title('Actual Load Vs Forecasted Load in Mw for one day') xlabel('Hours') ylabel('Actual Load(-)-Forecasted Load (.) ') grid on errorDfl=out(622:645)*2800-yyauganntfl(145:168);

for i=1:24 percenterrorDfl(i)=errorDfl(i)/(out(i+621)*2800)*100; end; subplot(2,1,2) plot(percenterrorDfl,'k') title('Percent Error Vs Hour of the Day for one day') xlabel('Hours') ylabel('Percent Error') grid on k=1:24; disp('HOURS || ACTUAL LOAD || FORECASTED LOAD ONE DAY AHEAD || ERROR || PERCENT ERROR') dataDfl=[k;out(49:72)*2800;yyauganntfl(49:72);errorDfl;percenterrorDfl]' disp('Mean Error for one day ahead using fuzzy neural networks=') mean(percenterrorDfl)

Results

RESULT TABLE: HOURS || ACTUAL LOAD || FORECASTED LOAD || ERROR || PERCENT ERROR

dataMfl =1.0e+003 * 0.0010 0.0020 0.0030 0.0040 0.0050 0.0060 0.0070 0.0080 0.0090 0.0100 0.0110 0.0120 0.0130 0.0140 2.3040 2.1890 2.1860 2.1730 2.1150 2.1380 1.9630 2.0970 2.1240 2.1930 2.1910 2.2010 2.1200 2.1220 2.3040 0.0000 0.0000

2.1150 -0.0000 -0.0000 2.1380 -0.0000 -0.0000 1.9630 -0.0000 -0.0000 2.0970 -0.0000 -0.0000 2.1240 0.0000 0.0000

2.1930 -0.0000 -0.0000 2.1910 -0.0000 -0.0000 2.2010 -0.0000 -0.0000 2.1200 0.0000 0.0000

0.0150 0.0160 0.0170 0.0180 0.0190 0.0200 0.0210 0.0220 0.0230 0.0240 0.0250 0.0260 0.0270 0.0280 0.0290 0.0300 0.0310 0.0320

2.0520 2.0550 2.0990 2.1060 2.0940 2.0330 2.3240 2.4090 2.4000 2.3000 2.2060 2.1870 2.1430 2.1090 2.0210 1.9840 1.9180 2.0620

2.0990 -0.0000 -0.0000 2.1060 -0.0000 -0.0000 2.0940 -0.0000 -0.0000 2.0330 -0.0000 -0.0000 2.3240 -0.0000 -0.0000 2.4090 -0.0000 -0.0000 2.4000 -0.0000 -0.0000 2.3000 -0.0000 -0.0000 2.2060 -0.0000 -0.0000 2.1870 0.0000 0.0000

2.1430 -0.0000 -0.0000 2.1090 -0.0000 -0.0000 2.0210 -0.0000 -0.0000 1.9840 -0.0000 -0.0000 1.9180 -0.0000 -0.0000 2.0620 -0.0000 -0.0000

0.0330 0.0340 0.0350 0.0360 0.0370 0.0380 0.0390 0.0400 0.0410 0.0420 0.0430 0.0440 0.0450 0.0460 0.0470 0.0480 0.0490 0.0500

1.9080 2.2440 2.3630 2.3110 2.3700 2.3140 2.3910 2.2280 2.3110 2.2920 2.3060 2.4390 2.3490 2.4140 2.3710 2.2660 2.1400 2.0850

2.4140 -0.0000 -0.0000 2.3710 -0.0000 -0.0000 2.2660 -0.0000 -0.0000 2.1400 -0.0000 -0.0000 2.0850 -0.0000 -0.0000

0.0510 0.0520 0.0530 0.0540 0.0550 0.0560 0.0570 0.0580 0.0590 0.0600 0.0610 0.0620 0.0630 0.0640 0.0650 0.0660 0.0670 0.0680

2.0460 1.9700 1.9880 1.9720 1.9440 2.0840 2.1560 2.2760 2.4250 2.4210 2.2210 2.2940 2.2090 2.3610 2.4070 2.3840 2.4000 2.4300

2.0460 -0.0000 -0.0000 1.9700 -0.0000 -0.0000 1.9880 1.9720 1.9440 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000

2.2210 -0.0000 -0.0000 2.2940 -0.0000 -0.0000 2.2090 2.3610 0 0.0000 0 0.0000

2.4070 -0.0000 -0.0000 2.3840 -0.0000 -0.0000 2.4000 -0.0000 -0.0000 2.4300 0.0000 0.0000

0.0690 0.0700 0.0710 0.0720 0.0730 0.0740 0.0750 0.0760 0.0770 0.0780 0.0790 0.0800 0.0810 0.0820 0.0830 0.0840 0.0850 0.0860

2.4320 2.5510 2.5330 2.3870 2.2380 2.2160 2.1390 2.0580 2.0550 2.0390 2.1830 2.1160 2.1070 2.4060 2.4090 2.4030 2.3860 2.4080

2.4320

0.0000

0.0000

2.5510 -0.0000 -0.0000 2.5330 -0.0000 -0.0000 2.3870 -0.0000 -0.0000 2.2380 0.0000 0.0000

2.2160 -0.0000 -0.0000 2.1390 -0.0000 -0.0000 2.0580 -0.0000 -0.0000 2.0550 2.0390 2.1830 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000

2.1160 -0.0000 -0.0000 2.1070 -0.0000 -0.0000 2.4060 -0.0000 -0.0000 2.4090 -0.0000 -0.0000 2.4030 0.0000 0.0000

0.0870 0.0880 0.0890 0.0900 0.0910 0.0920 0.0930 0.0940 0.0950 0.0960 0.0970 0.0980 0.0990 0.1000 0.1010 0.1020 0.1030 0.1040

2.3930 2.5060 2.4730 2.3810 2.3900 2.4660 2.3910 2.4280 2.4720 2.3220 2.2570 2.2150 2.2050 2.1270 2.0700 2.0900 2.1300 2.1460

2.3930 -0.0000 -0.0000 2.5060 -0.0000 -0.0000 2.4730 -0.0000 -0.0000 2.3810 -0.0000 -0.0000 2.3900 -0.0000 -0.0000 2.4660 -0.0000 -0.0000 2.3910 0.0000 0.0000

2.4280 -0.0000 -0.0000 2.4720 -0.0000 -0.0000 2.3220 -0.0000 -0.0000 2.2570 -0.0000 -0.0000 2.2150 -0.0000 -0.0000 2.2050 -0.0000 -0.0000 2.1270 -0.0000 -0.0000 2.0700 0.0000 0.0000

0.1050 0.1060 0.1070 0.1080 0.1090 0.1100 0.1110 0.1120 0.1130 0.1140 0.1150 0.1160 0.1170 0.1180 0.1190 0.1200 0.1210 0.1220

2.3430 2.5170 2.5590 2.5210 2.2630 2.5900 2.5750 2.5520 2.5290 2.4880 2.2630 2.5900 2.5750 2.5520 2.5290 2.4880 2.4910 2.4080

2.5590 -0.0000 -0.0000 2.5210 -0.0000 -0.0000 2.2630 -0.0000 -0.0000 2.5900 -0.0000 -0.0000 2.5750 -0.0000 -0.0000 2.5520 -0.0000 -0.0000 2.5290 -0.0000 -0.0000 2.4880 -0.0000 -0.0000 2.2630 -0.0000 -0.0000 2.5900 -0.0000 -0.0000 2.5750 -0.0000 -0.0000 2.5520 -0.0000 -0.0000 2.5290 -0.0000 -0.0000 2.4880 -0.0000 -0.0000 2.4910 0.0000 0.0000

0.1230 0.1240 0.1250 0.1260 0.1270 0.1280 0.1290 0.1300 0.1310 0.1320 0.1330 0.1340 0.1350 0.1360 0.1370 0.1380 0.1390 0.1400

2.4340 2.3710 2.3330 2.3110 2.3270 2.3000 2.3970 2.5090 2.5230 2.5150 2.5470 2.5430 2.5620 2.6270 2.6210 2.6280 2.6000 2.7370

2.4340 -0.0000 -0.0000 2.3710 -0.0000 -0.0000 2.3330 -0.0000 -0.0000 2.3110 -0.0000 -0.0000 2.3270 -0.0000 -0.0000 2.3000 -0.0000 -0.0000 2.3970 -0.0000 -0.0000 2.5090 2.5230 0.0000 0.0000 0.0000 0.0000

2.5430 -0.0000 -0.0000 2.5620 -0.0000 -0.0000 2.6270 -0.0000 -0.0000 2.6210 -0.0000 -0.0000 2.6280 -0.0000 -0.0000 2.6000 -0.0000 -0.0000 2.7370 -0.0000 -0.0000

0.1410 0.1420 0.1430 0.1440 0.1450 0.1460 0.1470 0.1480 0.1490 0.1500 0.1510 0.1520 0.1530 0.1540 0.1550 0.1560 0.1570 0.1580

2.5910 2.7450 2.6420 2.5450 2.5000 2.4870 2.4220 2.3760 2.3480 2.3260 2.3260 2.1910 2.2440 2.4750 2.5120 2.5780 2.4700 2.4860

2.5910 -0.0000 -0.0000 2.7450 -0.0000 -0.0000 2.6420 -0.0000 -0.0000 2.5450 -0.0000 -0.0000 2.5000 -0.0000 -0.0000 2.4870 -0.0000 -0.0000 2.4220 -0.0000 -0.0000 2.3760 -0.0000 -0.0000 2.3480 -0.0000 -0.0000 2.3260 -0.0000 -0.0000 2.3260 -0.0000 -0.0000 2.1910 -0.0000 -0.0000 2.2440 -0.0000 -0.0000 2.4750 -0.0000 -0.0000 2.5120 2.5780 0.0000 0.0000 0.0000 0.0000

0.1590 0.1600 0.1610 0.1620 0.1630 0.1640 0.1650 0.1660 0.1670 0.1680

2.5550 2.5690 2.5230 2.5170 2.5920 2.5700 2.5900 2.5630 2.4100 2.4160

2.5550

0.0000

0.0000

2.5920 -0.0000 -0.0000 2.5700 -0.0000 -0.0000 2.5900 -0.0000 -0.0000 2.5630 0.0000 0.0000

Mean Error for one week = -2.1753e-013 HOURS || ACTUAL LOAD || FORECASTED LOAD ONE DAY AHEAD || ERROR || PERCENT ERROR dataDfl = 1.0e+003 * 0.0010 0.0020 0.0030 0.0040 0.0050 2.0400 2.0080 1.9570 2.0290 2.1060 2.1400 -0.0000 -0.0000 2.0850 -0.0000 -0.0000 2.0460 -0.0000 -0.0000 1.9700 -0.0000 -0.0000 1.9880 -0.0000 -0.0000

0.0060 0.0070 0.0080 0.0090 0.0100 0.0110 0.0120 0.0130 0.0140 0.0150 0.0160 0.0170 0.0180 0.0190 0.0200 0.0210 0.0220 0.0230

2.1300 2.3810 2.3820 2.4260 2.2990 2.3920 2.4510 2.4710 2.4990 2.3080 2.1510 2.4680 2.5090 2.4510 2.4470 2.3870 2.2550 2.1990

1.9720 -0.0000 -0.0000 1.9440 -0.0000 -0.0000 2.0840 -0.0000 -0.0000 2.1560 -0.0000 -0.0000 2.2760 -0.0000 -0.0000 2.4250 2.4210 0.0000 0.0000 0.0000 0.0000

2.4000 -0.0000 -0.0000 2.4300 -0.0000 -0.0000 2.4320 -0.0000 -0.0000 2.5510 0.0000 0.0000

0.0240

2.1970

Mean Error for one day ahead using fuzzy neural networks= -1.5467e-013

Error values: Mean error for a day = -1.5467e-013 Mean error for a week = -2.1753e-013

Conclusion

The necessity of operating power systems closer to their limits requires the accurate knowledge of the current and future states of a power system. Load information is an integral part of this knowledge. Short term Electric load forecasting using fuzzy neural networks has been implemented in this project work.

The results show that the FL is suitable to interpolate among the load and temperature pattern data of training sets to provide the future load pattern. In order to forecast the future load, we need to use the recent load and temperature data in addition to the predicted future temperature. Since the ANN simply interpolates among the training data, it will give high error with the test data that is not close enough to any one of the training data.

In general, the networks require training data well spread in the future space in order to provide highly accurate results. The networks typically shows higher error in the days when people have specific start-up activities such as Monday, variant activities such as during holiday seasons. More accurate results, could be obtained by using more sophisticated topology for the networks, which can discriminate start-up days from other days. In this approach only temperature information among the weather variables has been utilized, as this was the only information available. Use of additional weather variables such as cloud coverage and wind speed could yield even better results.

FUTURE SCOPE: Our program can be extended using other whether parameters like humidity, pressure, snow, etc., It can also be done in technology of genetic algorithms. In terms of time span, medium, long term load forecastings can be done.

Reference

[1] G. Gross and F. D. Galiana, Short-Term Load Forecasting, Proceedings of IEEE, vol. 75, no. 12, pp. 1558 1573, Dec. 1987. [2] Derek W. Bunn, Short-term forecasting: A review of procedures in the electricity supply industry, J. Oper. Res. Soc., vol. 33, pp. 533545, 1982. [3] A. D. Papalexopoulos and T. C. Hesterberg, A regression-based approach to shortterm load forecasting, IEEE Trans. Power Syst., vol. 5, no. 4, pp. 15351550, 1990. [4] T. Haida and S. Muto, Regression based peak load forecasting using a transformation technique, IEEE Trans. Power Syst., vol. 9, no. 4, pp. 17881794, 1994. [5] Moghram, Ibrahim; Rahman, Saifur, "Analysis and Evaluation of Five Short-Term Load Forecasting Techniques," Power Engineering Review, IEEE , vol.9, no.11, pp.4243, Nov. 1989 [6] S. Rahman and R. Bhatnagar, An expert system based algorithm for short term load forecast, IEEE Trans. Power Syst., vol. 3, no. 2, pp. 392399, 1988. [7] S. Rahman and O. Hazim, A generalized knowledge-based short term loadforecasting technique, IEEE Trans. Power Syst., vol. 8, no. 2, pp. 508514, 1993. [8] S. J. Huang and K. R. Shih, Short-term load forecasting via ARMA model identification including nongaussian process considerations, IEEE Trans. Power Syst., vol. 18, no. 2, pp. 673679, 2003. [9] H.Wu and C. Lu, A data mining approach for spatial modeling in small area load forecast, IEEE Trans. Power Syst., vol. 17, no. 2, pp. 516521, 2003.

## Viel mehr als nur Dokumente.

Entdecken, was Scribd alles zu bieten hat, inklusive Bücher und Hörbücher von großen Verlagen.

Jederzeit kündbar.