1、Fuzzy logic in Load forecastingShort Term Load Forecasting with Fuzzy Logic SystemsIntroduction:Several papers have proposed the use of Fuzzy Logic for short term load forecasting. At present application of fuzzy method for load forecasting is in the experimental stage. For the demonstration of the
2、method a fuzzy expert systems that forecasts the daily peak load, is selected. Fuzzy Expert Systems:The fuzzy system is a popular computing framework based on the concepts of fuzzy set theory, fuzzy if then rules and fuzzy reasoning. The structure of fuzzy inference consists of three conceptual comp
3、onents, namely: Rule Base containing a selection of fuzzy rules. Database defining the membership functions. These are used in the fuzzy rules. Reasoning mechanism that performs the inference procedure upon the rules and given facts and derives a reasonable output or conclusion.Sometimes it is neces
4、sary to have crisp output. This requires a method called De-fuzzification, to extract a crisp value that best represents the fuzzy output. With such crisp inputs and outputs, a fuzzy expert system implements a non-linear mapping from the input space to the output space. This mapping is accomplished
5、by a number of if-then rules, each of which describes a local behavior of the mapping. To illustrate this let us consider:X: a set of data or objects. (Example. Forecast temperature values).A: another set containing data (or objects) x: an individual value of the data set X.is the membership functio
6、n that connects the set X and A. The membership function, Determines the degree that x belongs to A. Its value varies between 0 and 1. The high value of means that it is very likely that x is in A.The membership function is selected by trial and error. There are four basic membership functions namel
7、y: Triangular. Trapezoidal. Gaussian. Generalized bell.The MATLAB m-file “disp_mf.m” displays all these membership functions as in figure 1. Figure 1. Membership functionsThe triangular function “triangle (x, a, b, c)” is defined as: It has three parameters a (minimum), b (middle) and c (maximum) th
8、at determine the shape of the triangle. Figure 2 shows the triangular function of triangle (x, 20,60,80):Figure 2. Triangular membership function A trapezoidal membership function is specified by four parameters given by:A = trapezoid (x, a, b, c, d)The function is described as:The plot of the funct
9、ion trapezoid (x, 10, 20, 60, 95) is shown in figure 3:Figure 3. Trapezoidal membership functionSimilar definitions for gaussian and generalized bell can be given. However triangular and trapezoidal functions are simple and most frequently used. The membership functions are not restricted to these f
10、our. One can have their own tailor- made functions. The functions above were mere one dimensional in nature. In principle one can even have multi- dimensional membership functions. Coming back to our sets A and X, we can define the fuzzy set A in X as a set of ordered pairs given by:For example in t
11、he triangular membership function shown on the left hand side, we see that for x = 40 (x-axis) belongs to A = 0.5 (y-axis). The co-ordinates for this triangle are: x1 = 20 (Lmin); y1 = 0 or A(x1) = 0. x2 = 60 (Lmid); y2 = 1 or A(x2) = 1.The slope of the membership function between x1 and x2 is then
12、defined as:Thus the equation of the raising edge of the triangle is:The outside region is described by:The combination of the above equations would result in the triangular membership function equation:Fuzzy Sets and Fuzzy Operations:Consider two fuzzy sets A and B, as shown in figure 4, with member
13、ship functions A(x) and B(x) respectively. These two fuzzy sets can be combined in different ways as below: Union C = A B. Intersection C = A B. Sum C = A B.The difference between the sum and the union operation may be well understood from figures 6 and 7. The aim is to determine the right combined
14、function of two sets such that the desired output is obtained. The union and intersection of two membership functions is illustrated in the figures 5 and 6 respectively:Figure 4. Membership function of fuzzy sets A and B Figure 5. Union of fuzzy sets A and BThe Union of two fuzzy set points, which l
15、ie in A and B, is given by:Figure 6. Intersection of fuzzy sets A and BThe Intersection operation is defined by the equation:Similarly the sum of the two fuzzy sets can be given in the form of the equation given below:Figure 7. Sum of fuzzy sets A and BLoad Forecasting Using Fuzzy Logic.The Fuzzy In
16、ference 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. (Monday, Tuesday etc.,) Lets say we select Tuesday. Forecast maximum and minimum temperature for t
17、he upcoming Tuesday Listing the maximum temperature and peak load for the last 10-12 Tuesdays. For the selected historical data we fit a polynomial.Let us consider a numerical example. We have the load and temperature data as in the table below :Load 102001050010180107001068010850111001103011100Temp
18、erature3131.5732.432.632.6733.133.633.8134.23Now we fit a straight line for this data. The result of this curve fitting is shown in figure8.Figure 8. Polynomial curve fitting on historical dataThe data is fitted by a linear regression curve. The actual data points are spread over the regression curv
19、e. This regression curve is calculated using the simulation tools such as MATLAB or MathCAD. The result of this regression analysis results in the equation of a straight line:Where, Lp: Peak load.Tp: Forecast maximum daily temperature.gp and hp: Constants derived from the least square based regressi
20、on analysisFor the data presented above the gp and hp were calculated as 300.006 and 871.587 respectively. As an example if the forecast temperature Tp = 35, then the expected or forecast peak load is calculated to be:This regression method has certain amount of statistical error, which is evident b
21、y the spread of the data points about the curve. This can be improved by adding a regression term to the equation. This modified equation is shown below:Where, Lp is the error co-efficient Determination of the error co-efficient is carried out by the fuzzy method. The regression error co-efficient h
22、as three components, namely: Statistical model error Temperature forecasting error Operators Heuristic ruleStatistical Model Error:The statistical model error is defined as the difference between each sample point and the regression line. In describing this error as a fuzzy model, we assign differen
23、t membership functions for each day of the week. An expert, using trial and error method, determines these functions. A triangular membership function is then assigned. The function has a membership value of 1 when the load is 0 and decreases to 0 at a load value of 2. This is calculated using the f
24、ormula given below:MWWhere,Lpi is the peak load.Tpi is the maximum temperature.n is the number of points selected for the day.In our example is 450 MW and the variables of the triangular membership function F1(L1), in this example are:L1_min = 450 MW, L1_mid = 0 MW.The substitution of these values g
25、ives us the final membership function:With = 450 MW and L = -1500MW to 500MW, the membership function is shown in figure 9.Figure 9. Membership function of F1(L1)The values for the triangle are L1_min = 450 MW, L1_mid = 0 MW and L1_max = 450 MW. Thus F1(L1) describes the statistical error model.Temp
26、erature forecasting error:The forecast temperature is compared with the actual temperature using statistical data available for the previous years. The average error and the standard deviation are calculated from this data. In our example the error is less than 4 degrees. The temperature forecasting
27、 error produces error in the peak load forecast. The error for the peak load is calculated by the derivation of the load-temperature equation. Since the error in peak load is proportional to the error in temperature, it can be modeled using a triangular membership function.A fuzzy expert system can
28、be developed using the method applied for the statistical model. 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 lo
29、wer than the forecasted value (ML) Temperatures lower than the forecasted value (L) Temperatures closer to the forecasted value (C) Temperatures higher than the forecasted value (H) Temperatures much higher than the forecasted value (MH) The values for d are 4, 2, 0, 1and 2 for ML, L, C, H and MH re
30、spectively.The membership functions are determined using trial and error technique. A triangular membership function with the following co-ordinates is selected: These values are then substituted in the general equation and the membership function for the peak load due to error in temperature foreca
31、sting is obtained as:These membership functions can be represented graphically as in figure 10.Figure 10. Membership functions for F2(L2)Model Uncertainty:The model uncertainty is coupled with the uncertainty in forecast-temperature. This uncertainty leads to a third term L3 given by:L3 = L1 + L2The membership function for this new term is given by:The new membership function is shown in the figure 11 below:Figure 11. Membership functions with modeling uncertainty included The combined membership functions will be a triangle with the following