- Back to Home »
- Fuzzy Logic
Posted by : Unknown
Friday, July 26, 2013
Short Term Load Forecasting with Fuzzy Logic Systems
Introduction:
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 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 components, namely:
Rule
Base containing a selection of fuzzy rules.
Database
defining the membership functions. These are used in the fuzzy rules.
facts and derives a
reasonable output or conclusion.
Sometimes it is necessary 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 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
function 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 namely:
Triangular.
Trapezoidal.
Gaussian.
The MATLAB m-file “disp_mf.m”
displays all these membership functions as in figure 1.
Figure 1. Membership
functions
The triangular function “triangle
(x, a, b, c)” is defined as:
It has three parameters ‘a’
(minimum), ‘b’ (middle) and ‘c’ (maximum) that 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 function trapezoid (x, 10, 20, 60, 95) is shown in figure 3:
Figure 3. Trapezoidal
membership function
Similar
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 four. 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 the 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 (DLmin); y1 = 0 or mA(x1) = 0.
x2
= 60 (DLmid); y2 = 1 or mA(x2) = 1.
The
slope of the membership function between x1 and x2 is then 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 membership functions mA(x) and mB(x)
respectively. These two fuzzy sets can be combined in different ways as below:
Union
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 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 B
The Union
of two fuzzy set points, which lie in A and B, is given by:
Figure 6. Intersection of fuzzy sets A and B
The 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 B
Load Forecasting Using Fuzzy Logic.
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. (Monday, Tuesday etc.,) Lets say we select ‘Tuesday’.
Forecast
maximum and minimum temperature for the 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
|
10200
|
10500
|
10180
|
10700
|
10680
|
10850
|
11100
|
11030
|
11100
|
Temperature
|
31
|
31.57
|
32.4
|
32.6
|
32.67
|
33.1
|
33.6
|
33.81
|
34.23
|
Now 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 data
The data is
fitted by a linear regression curve. The actual data points are spread over the
regression curve. 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 regression analysis
For 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 by 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, DLp is the error co-efficient
Determination of
the error co-efficient is carried out by the fuzzy method. The regression error
co-efficient has three components, namely:
Statistical
model error
Temperature
forecasting error
Statistical
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
different 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 2s. This s is calculated using the formula given
below:
MW
Where,
Lpi is the peak load.
Tpi is the maximum temperature.
n is the
number of points selected for the day.
In our example s is 450 MW and the variables of
the triangular membership function F1(DL1), in this example are:
DL1_min = – 450 MW, DL1_mid = 0 MW.
The
substitution of these values gives us the final membership function:
With s = 450 MW and DL =
-1500MW to 500MW, the membership function is shown in figure 9.
Figure 9. Membership
function of F1(DL1)
The values for
the triangle are DL1_min = – 450 MW, DL1_mid = 0 MW and DL1_max = 450 MW. Thus F1(DL1) describes the statistical error model.
Temperature
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 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 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 lower than the forecasted value (ML)
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 respectively.
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 forecasting is obtained as:
These
membership functions can be represented graphically as in figure 10.
Figure 10.
Membership functions for F2(DL2)
Model Uncertainty:
The model
uncertainty is coupled with the uncertainty in forecast-temperature. This
uncertainty leads to a third term DL3
given by:
DL3 = DL1 +
DL2
The 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 coordinates:
The
substitution of these values in the general equation gives the following
membership function:
Operator’s
Heuristic Rules:
In real-time
operators make adjustments to the forecasting system based on their experience.
These adjustments can be modeled into the fuzzy system by assigning membership
functions to the operator’s intuition and experience. The operator is
questioned on the degree of change he/she would do the forecasted load and his
level of confidence for that change. The operator can be ‘quite confident’,
‘confident’ or ‘not confident’ with the suggested amount of load change. The
operators suggested load change could then be modeled as:
Where,
F4 is the membership function for load change DL4,
x is the operators recommended amount of load change and
y is a constant determined by the operator’s confidence level.
Typically the values for y are ‘250*0.8’, ‘250*1’ and ‘250*1.25’
for ‘quite confident,’ ‘confident’ and ‘not confident’
respectively. The value ‘250’ is chosen based on the observation that a
load forecasting error of 200 MW to 300 MW can be committed by experienced
operators via real-time updating. The membership function for the operator’s
heuristics is shown in figure 12.
Figure 12. Membership functions for operator’s heuristic rule
The ‘red’
triangle (innermost) denotes a ‘quite confident’ change by the operator, the
‘black’ triangle (outer) denotes a ‘not confident’ change and the ‘blue’
triangle (middle) denotes a ‘confident’
change. The equation for the operator’s heuristics is:
Updating
the peak load:
We now have two
separate piece of information
The
load change due to the modeling error and temperature forecasting error, F3(DL3)
Operator’s
heuristic rule F4(DL4).
The prediction
of DLp, the error co-efficient
is determined from the combination of above two membership functions. The
popular algorithms used are the min-max algorithm and the equal area algorithm.
The min-max algorithm is as follows:
Figure 13. Membership functions of F3, F4 and F5.
The error
coefficient as calculated using the min-max algorithm is DLp = –273.25 MW
and the corrected load forecast is:
Conclusion:
The fuzzy logic
system may thus be designed to forecast peak and through load. Specific details
on the fuzzy logic are dealt in Dr. Keith Holbert’s page at:
http://www.ceaspub.eas.asu.edu/powerzone/FuzzyLogic/index.htm
There are
inherent disadvantages to the system because of the degree of freedom in
selecting membership functions, method of fuzzification and de-fuzzification.
Such problems may be overcome by combining neural network and fuzzy logic. The
neural network optimizes the rule base. This involves the training of the
network to the historical data to determine the rules that contribute to a
better decision. The network also modifies the initial choice of the membership
function to fit the system. One another technique is ‘Genetic Algorithm’. These
types of ‘Hybrid’ expert systems are under research.