0% found this document useful (0 votes)
17 views

Assignment 01-Fuzzy Logic (2k21ceee30)

LOAD FORECASING IN MATLAB

Uploaded by

Narender Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Assignment 01-Fuzzy Logic (2k21ceee30)

LOAD FORECASING IN MATLAB

Uploaded by

Narender Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

RES

Renewable Energy System

DELHI TECHNOLOGIAL UNIVERSITY

NAME : NARENDER KUMAR

ROLL NO : 2K21/CEEE/30

SUBJECT : RENEWABLE ENERGY SYSTEM

SUBJECT CODE : CEE-302

YEAR/SEM : III/VI

DEPARTMENT : ELECTRICAL ENGINEERING

ASSIGNMENT NO. : 01

NAME OF ASSIGNMENT : LOAD PREDICTION USING FUZZY LOGIC

Presented By : Narender Kumar 2K21/CEEE/30

Dept. of CEEE DTU Page 1


RES

Table of Contents
1. Introduction .............................................................................. 3
2. Architecture ................................................................................ 4
3. Advantages of Fuzzy Logic System .......................................... 5
4. Figure(I)-Actual data of Sub-station .......................................... 6
5. Figure(II)-Actual input and output data after normalization ...... 7
6. Figure(III)-Fuzzy rule base for membership short term load
forecasting ............................................................................................. 8
7. Figure(IV)-Fuzzy rule viewer corresponding to 37th rule ......... 9
8. Fig(V)-Day1 Input................................................................... 10
9. Fig(VI)-Day2 Input .................................................................. 10
10. Fig(VII)-Day3 Input ............................................................... 11
11. Fig(VIII)-Day4 Input.............................................................. 11
12. Fig(IX)-Day5 Output.............................................................. 12
13. Fig(X)-Absolute relative error in forecasted load in comparison with
Actual load ...................................................................................... 13
14. Fig(XI)-Predicted electrical load (Forecasted) in comparison with
Actual load ...................................................................................... 14
15. Conclusion ............................................................................. 14

Dept. of CEEE DTU Page 2


RES

1. Introduction:-
Fuzzy Logic is implemented using Fuzzy Rules, which are
if-then statements that express the relationship between input variables
and output variables in a fuzzy way. The output of a Fuzzy Logic system
is a fuzzy set, which is a set of membership degrees for each possible
output value.
Fuzzy Logic is implemented using Fuzzy Rules, which are if-then
statements that express the relationship between input variables and
output variables in a fuzzy way. The output of a Fuzzy Logic system is a
fuzzy set, which is a set of membership degrees for each possible output
value.
In summary, Fuzzy Logic is a mathematical method for representing
vagueness and uncertainty in decision-making, it allows for partial
truths, and it is used in a wide range of applications. It is based on the
concept of membership function and the implementation is done using
Fuzzy rules.
In the Boolean system truth value, 1.0 represents the absolute truth
value and 0.0 represents the absolute false value. But in the fuzzy
system, there is no logic for the absolute truth and absolute false value.
But in fuzzy logic, there is an intermediate value too present which is
partially true and partially false.

Dept. of CEEE DTU Page 3


RES

2. ARCHITECTURE:-

Its Architecture contains four parts:-


 RULE BASE: It contains the set of rules and the IF-THEN
conditions provided by the experts to govern the decision-
making system, based on linguistic information. Recent
developments in fuzzy theory offer several effective
methods for the design and tuning of fuzzy controllers.
Most of these developments reduce the number of fuzzy
rules.
 FUZZIFICATION: It is used to convert inputs i.e. crisp
numbers into fuzzy sets. Crisp inputs are basically the exact
inputs measured by sensors and passed into the control
system for processing, such as temperature, pressure,
rpm’s etc.
 INFERENCE ENGINE: It determines the matching degree
of the current fuzzy input with respect to each rule and
decides which rules are to be fired according to the input
field. Next, the fired rules are combined to form the control
actions.
 DEFUZZIFICATION: It is used to convert the fuzzy sets
obtained by the inference engine into a crisp value. There
are several defuzzification methods available and the best-
suited one is used with a specific expert system to reduce
the error.

Dept. of CEEE DTU Page 4


RES

3. Advantages of Fuzzy Logic System:-


 This system can work with any type of inputs whether it is
imprecise, distorted or noisy input information.
 The construction of Fuzzy Logic Systems is easy and
understandable.
 Fuzzy logic comes with mathematical concepts of set theory
and the reasoning of that is quite simple.
 It provides a very efficient solution to complex problems in
all fields of life as it resembles human reasoning and
decision-making.
 The algorithms can be described with little data, so little
memory is required.

Dept. of CEEE DTU Page 5


4. Figure(I)-Actual data of Sub-station:- RES

Day 1 Day 2 Day 3 Day 4 Day 5


04.04.12 18.04.12 30.05.12 06.06.12 13.06.12
Time
Input1 Input2 Input3 Input4 Output
(MW) (MW) (MW) (MW) (MW)
00:30:00 23.68 25.4 31.1 30.51 35.5
01:00:00 22.95 23.3 29.94 27.2 30.6
01:30:00 22.59 23.3 29 27.2 30.6
02:00:00 22.88 23.3 29.1 27.2 30.6
02:30:00 22.52 23.3 29.1 27.2 30.6
03:00:00 22.79 23.3 29.1 27.2 30.44
03:30:00 22.56 21.65 29.1 27.2 28.1
04:00:00 22.9 23.1 26.7 27.2 28.1
04:30:00 22.47 21.64 26.7 25.1 28.1
05:00:00 22.22 22.33 26.7 25.78 28.1
05:30:00 23.23 23.4 26.7 25.6 29.74
06:00:00 23.26 23.4 26.7 25.6 28.1
06:30:00 22.27 23.4 27.35 25.6 26.2
07:00:00 22.68 28.53 26.8 26.89 31.6
07:30:00 23.23 27.8 27.14 29.33 32.38
08:00:00 22.81 28.2 31.9 29.7 35.46
08:30:00 24.15 27.36 33.9 31.9 38.08
09:00:00 25.01 25.8 38.59 35.43 40.52
09:30:00 28.15 24.42 43.28 32.37 34.96
10:00:00 30.69 33.74 51.7 45.53 52.9
10:30:00 32.52 33.74 51.7 48.99 55.2
11:00:00 33.04 26.89 53.9 52.6 57.16
11:30:00 33.1 30.71 53.9 53.21 57.54
12:00:00 33.53 28.7 54.67 50.6 57.78
12:30:00 32.3 28.84 53.58 49.52 57.3
13:00:00 32.3 29.23 52.6 52.77 57.3
13:30:00 30.71 28 51.51 43.8 46.11
14:00:00 29.85 28.76 52.17 41.66 52.8
14:30:00 29.7 28.23 51 41.83 52.8
15:00:00 29.7 34.19 46.78 49.21 50
15:30:00 29.66 30.47 35.04 50.5 48.99
16:00:00 26.45 29.46 33 45.23 42.71
16:30:00 25.52 13.71 33 34.76 38.7
17:00:00 28.84 23.07 32.29 32.31 40.36
17:30:00 28.5 23.21 28.84 29.88 31.61
18:00:00 28.5 21.81 29.1 28.46 29.96
18:30:00 22.8 23.56 28.95 26.4 27.1
19:00:00 24.93 22.9 35.5 26.39 27.1
19:30:00 25.5 22.73 35.5 26.61 27.77
20:00:00 23.48 28.28 35.92 32.34 29.3
20:30:00 23.9 29.4 37.43 32.5 29.3
21:00:00 24.8 28.48 35.6 33.29 29.43
21:30:00 24.71 28.2 36.76 34.6 31.4
22:00:00 25.1 24.67 37.7 34.6 31.4
22:30:00 25.1 25.49 36.86 34.6 31.4
23:00:00 25.1 29.4 35.7 34.32 31.4
23:30:00 25.1 29.4 31 33.2 38.5
00:00:00 23.3 29.4 31 30.51 35.5
Dept. of CEEE DTU Page 6
5. Figure(II)-Actual input and output data after normalization:- RES

Day 1 Day 2 Day 3 Day 4 Day 5


Input1 Input2 Input3 Input4 Output
Time
(MW) (MW) (MW) (MW) (MW)
04.04.12 18.04.12 30.05.12 06.06.12 13.06.12
00:30:00 0.203 0.556 0.25 0.288 0.33
01:00:00 0.152 0.474 0.218 0.199 0.209
01:30:00 0.126 0.474 0.193 0.199 0.209
02:00:00 0.147 0.474 0.196 0.199 0.209
02:30:00 0.121 0.474 0.196 0.199 0.209
03:00:00 0.14 0.474 0.196 0.199 0.205
03:30:00 0.124 0.41 0.196 0.199 0.147
04:00:00 0.148 0.467 0.13 0.199 0.147
04:30:00 0.118 0.41 0.13 0.143 0.147
05:00:00 0.1 0.437 0.13 0.161 0.147
05:30:00 0.171 0.478 0.13 0.156 0.188
06:00:00 0.174 0.478 0.13 0.156 0.147
06:30:00 0.104 0.478 0.148 0.156 0.1
07:00:00 0.133 0.679 0.133 0.191 0.234
07:30:00 0.171 0.65 0.142 0.257 0.253
08:00:00 0.142 0.666 0.272 0.267 0.329
08:30:00 0.237 0.633 0.327 0.326 0.394
09:00:00 0.297 0.572 0.455 0.421 0.454
09:30:00 0.519 0.518 0.583 0.338 0.317
10:00:00 0.699 0.882 0.813 0.692 0.761
10:30:00 0.829 0.882 0.813 0.785 0.818
11:00:00 0.865 0.615 0.873 0.883 0.866
11:30:00 0.87 0.764 0.873 0.899 0.876
12:00:00 0.9 0.685 0.894 0.829 0.882
12:30:00 0.813 0.691 0.864 0.8 0.87
13:00:00 0.813 0.706 0.837 0.887 0.87
13:30:00 0.701 0.658 0.807 0.646 0.593
14:00:00 0.64 0.688 0.825 0.588 0.758
14:30:00 0.629 0.667 0.794 0.593 0.758
15:00:00 0.629 0.9 0.678 0.791 0.689
15:30:00 0.626 0.754 0.358 0.826 0.664
16:00:00 0.399 0.715 0.302 0.684 0.509
16:30:00 0.333 0.1 0.302 0.403 0.409
17:00:00 0.568 0.465 0.283 0.337 0.45
17:30:00 0.544 0.471 0.188 0.271 0.234
18:00:00 0.544 0.416 0.196 0.233 0.193
18:30:00 0.141 0.485 0.191 0.178 0.122
19:00:00 0.292 0.459 0.37 0.177 0.122
19:30:00 0.332 0.452 0.37 0.183 0.139
20:00:00 0.189 0.669 0.382 0.338 0.177
20:30:00 0.219 0.713 0.423 0.342 0.177
21:00:00 0.282 0.677 0.373 0.363 0.18
21:30:00 0.276 0.666 0.405 0.398 0.229
22:00:00 0.304 0.528 0.43 0.398 0.229
22:30:00 0.304 0.56 0.407 0.398 0.229
23:00:00 0.304 0.713 0.376 0.391 0.229
23:30:00 0.304 0.713 0.247 0.361 0.404
00:00:00 0.176 0.713 0.247 0.288 0.33

Dept. of CEEE DTU Page 7


6. Figure(III)-Fuzzy rule base for membership short term load RES

forecasting:-
Day 1 Day 2 Day 3 Day 4 Day 5
04.04.12 18.04.12 30.05.12 06.06.12 13.06.12
Time
Input1 Input2 Input3 Input4 Output
(MW) (MW) (MW) (MW) (MW)
00:30:00 HL1 HM1 HL1 HL1 LM1
01:00:00 ML1 MM1 HL1 ML1 HL1
01:30:00 ML1 MM1 ML1 ML1 HL1
02:00:00 ML1 MM1 ML1 ML1 HL1
02:30:00 ML1 MM1 ML1 ML1 HL1
03:00:00 ML1 MM1 ML1 ML1 HL1
03:30:00 ML1 MM1 ML1 ML1 ML1
04:00:00 ML1 MM1 ML1 ML1 ML1
04:30:00 ML1 MM1 ML1 ML1 ML1
05:00:00 LL1 MM1 ML1 ML1 ML1
05:30:00 ML1 MM1 ML1 ML1 ML1
06:00:00 ML1 MM1 ML1 ML1 ML1
06:30:00 ML1 MM1 ML1 ML1 LL1
07:00:00 ML1 LH1 ML1 ML1 HL1
07:30:00 ML1 LH1 ML1 HL1 HL1
08:00:00 ML1 LH1 HL1 HL1 LM1
08:30:00 HL1 LH1 LM1 LM1 LM1
09:00:00 HL1 HM1 MM1 MM1 MM1
09:30:00 HM1 HM1 HM1 LM1 LM1
10:00:00 LH1 HH1 HH1 LH1 MH1
10:30:00 HH1 HH1 HH1 MH1 HH1
11:00:00 HH1 LH1 HH1 HH1 HH1
11:30:00 HH1 MH1 HH1 HH1 HH1
12:00:00 HH1 LH1 HH1 HH1 HH1
12:30:00 HH1 LH1 HH1 MH1 HH1
13:00:00 HH1 MH1 HH1 HH1 HH1
13:30:00 LH1 LH1 HH1 LH1 HM1
14:00:00 LH1 LH1 HH1 HM1 MH1
14:30:00 LH1 LH1 MH1 HM1 MH1
15:00:00 LH1 HH1 LH1 MH1 LH1
15:30:00 LH1 MH1 LM1 HH1 LH1
16:00:00 LM1 MH1 LM1 LH1 HM1
16:30:00 LM1 LL1 LM1 MM1 MM1
17:00:00 HM1 MM1 HM1 LM1 MM1
17:30:00 HM1 MM1 ML1 HL1 HL1
18:00:00 HM1 MM1 ML1 HL1 ML1
18:30:00 ML1 MM1 ML1 ML1 ML1
19:00:00 HL1 MM1 LM1 ML1 ML1
19:30:00 LM1 MM1 LM1 ML1 ML1
20:00:00 ML1 LH1 LM1 LM1 ML1
20:30:00 HL1 MH1 MM1 LM1 ML1
21:00:00 HL1 LH1 LM1 LM1 ML1
21:30:00 HL1 LH1 MM1 LM1 HL1
22:00:00 LM1 HM1 MM1 LM1 HL1
22:30:00 LM1 HM1 MM1 LM1 HL1
23:00:00 LM1 MH1 LM1 LM1 HL1
23:30:00 LM1 MH1 HL1 LM1 MM1
00:00:00 ML1 MH1 HL1 HL1 LM1

Dept. of CEEE DTU Page 8


RES

7. Figure(IV)-Fuzzy rule viewer corresponding to 37th rule:-

Dept. of CEEE DTU Page 9


RES
The half hourly electrical loads of TPPDL, Delhi on 04.04.2012,
18.04.2012, 30.5.2012, 06.06.2012 and 13.06.2012 are also presented
graphically in Fig5, Fig6, Fig7, Fig8 and Fig9.

8. Fig(V)-Day1 Input:-

Day 1 Input1 (MW) 04.04.12


1
0.9
0.8
0.7
0.6
0.5
0.4 Day 1 Input1 (MW) 04.04.12
0.3
0.2
0.1
0
00:30:00
01:30:00
02:30:00
03:30:00
04:30:00
05:30:00
06:30:00
07:30:00
08:30:00
09:30:00
10:30:00
11:30:00
12:30:00
13:30:00
14:30:00
15:30:00
16:30:00
17:30:00
18:30:00
19:30:00
20:30:00
21:30:00
22:30:00
23:30:00

9. Fig(VI)-Day2 Input:-

Day 2 Input2 (MW) 18.04.12


1
0.9
0.8
0.7
0.6
0.5
0.4 Day 2 Input2 (MW) 18.04.12
0.3
0.2
0.1
0

Dept. of CEEE DTU Page 10


0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1

Dept. of CEEE
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
00:30:00 00:30:00
02:00:00 02:00:00
03:30:00 03:30:00
05:00:00 05:00:00
06:30:00 06:30:00
08:00:00 08:00:00
09:30:00 09:30:00
11:00:00 11:00:00
12:30:00 12:30:00
10. Fig(VII)-Day3 Input:-

14:00:00 14:00:00

11. Fig(VIII)-Day4 Input:-


15:30:00 15:30:00
17:00:00 17:00:00

DTU
18:30:00 18:30:00
20:00:00 20:00:00
21:30:00 21:30:00
23:00:00 23:00:00

Day 4 Input4 (MW) 06.06.12


Day 3 Input3 (MW) 30.05.12

Day 3 Input3 (MW) 30.05.12

Day 4 Input4 (MW) 06.06.12

Page 11
RES
RES

12. Fig(IX)-Day5 Output:-

Day 5 Output (MW) 13.06.12


1
0.9
0.8
0.7
0.6
0.5
0.4 Day 5 Output (MW) 13.06.12

0.3
0.2
0.1
0

Dept. of CEEE DTU Page 12


13. Fig(X)-Absolute relative error in forecasted load in RES

comparison with Actual load:-


ACTUAL FORECASTED
OUTPUT OUTPUT Absolute
Time relative
13.06.12 13.06.12
Error
Output
Output (MW)
(MW)
00:30:00 35.50 37.29 -1.79
01:00:00 30.60 34.17 -3.57
01:30:00 30.60 31.02 -0.42
02:00:00 30.60 31.02 -0.42
02:30:00 30.60 31.02 -0.42
03:00:00 30.44 31.02 -0.58
03:30:00 28.10 31.02 -2.92
04:00:00 28.10 31.02 -2.92
04:30:00 28.10 30.94 -2.84
05:00:00 28.10 31.09 -2.99
05:30:00 29.74 30.98 -1.24
06:00:00 28.10 30.98 -2.88
06:30:00 26.20 30.98 -4.78
07:00:00 31.60 34.10 -2.50
07:30:00 32.38 34.10 -1.72
08:00:00 35.46 37.25 -1.79
08:30:00 38.08 34.10 3.99
09:00:00 40.52 40.45 0.07
09:30:00 34.96 37.25 -2.29
10:00:00 52.90 49.96 2.94
10:30:00 55.20 53.04 2.16
11:00:00 57.16 53.04 4.12
11:30:00 57.54 53.04 4.50
12:00:00 57.78 41.99 15.79
12:30:00 57.30 53.04 4.26
13:00:00 57.30 53.04 4.26
13:30:00 46.11 41.99 4.12
14:00:00 52.80 49.92 2.88
14:30:00 52.80 49.92 2.88
15:00:00 50.00 41.99 8.01
15:30:00 48.99 46.73 2.26
16:00:00 42.71 43.65 -0.94
16:30:00 38.70 40.57 -1.87
17:00:00 40.36 41.99 -1.63
17:30:00 31.61 32.56 -0.95
18:00:00 29.96 32.56 -2.60
18:30:00 27.10 30.94 -3.84
19:00:00 27.10 30.94 -3.84
19:30:00 27.77 30.94 -3.17
20:00:00 29.30 30.98 -1.68
20:30:00 29.30 30.98 -1.68
21:00:00 29.43 34.10 -4.67
21:30:00 31.40 34.13 -2.73
22:00:00 31.40 34.13 -2.73
22:30:00 31.40 34.13 -2.73
23:00:00 31.40 34.13 -2.73
23:30:00 38.50 40.45 -1.95
00:00:00 35.50 37.29 -1.79
Dept. of CEEE DTU Page 13
RES

14. Fig(XI)-Predicted electrical load (Forecasted) in


comparison with Actual load:-

70.00

60.00

50.00

40.00 ACTUAL OUTPUT 13.06.12


Output (MW)
30.00
FORECASTED
20.00 OUTPUT 13.06.12 Output
(MW)

10.00

0.00
00:30:00
02:00:00
03:30:00
05:00:00
06:30:00
08:00:00
09:30:00
11:00:00
12:30:00
14:00:00
15:30:00
17:00:00
18:30:00
20:00:00
21:30:00
23:00:00

15. CONCLUSION:-

The short-term electrical load forecasting is an essential component of any


power system planner. Therefore, an attempt has been made for STLF by using
fuzzy logic. The performance of the model is evaluated based on statistical
indicator i.e. absolute relative error. The average error in the forecasted load in
comparison with the desired load is very close to the desired load. Hence, it is
concluded that the developed model is accurate and effective for short term load
forecasting.

Dept. of CEEE DTU Page 14

You might also like