FORECASTING ELECTRICAL ENERGY DEMAND OF SRI LANKA: GENETIC ALGORITHMS BASED APPROACH A dissertation submitted to the Department of Electrical Engineering, University of Moratuwa in partial fulfillment of the requirements for the Degree of Master of Engineering by D. Y. T. BAMBARAVANAGE Supervised by: Dr. Lanka Udawatta Department of Electrical Engineering University of Moratuwa, Sri Lanka 2005 85961 Abstract A novel approach for electrical energy demand forecasting (Short term projection) using genetic algorithms is presented. This model is based on genetic algorithms. Possible factors that affect the electrical energy demand of a system have been counted as variables for the model. By subjecting real time past data for 18 years, on each factor, to natural evolution the forecasting model was obtained. Validation of the model has been carried out and results show the effectiveness of the proposed technique. Forecasting is both a science and an art. The need and relevance of forecasting demand for an electric utility has become a much discussed issue in the recent past. This has led to the development of various new tools and methods for forecasting in the last two decades. In the past, straight line extrapolations of historical energy consumption trends served well. However, with the onset of inflation and rapidly rising energy prices, emergence of alternative fuels and technologies (in energy supply and end use), changes in lifestyles, institutional changes etc., it has become very important to use modeling techniques which capture the effect of factors such as price, income, population, technology and other economic, demographic, policy and technological variables. There is an array of methods that are available today for forecasting demand. An appropriate method is chosen based on the nature of the data available and the desired nature and level of detail or forecasting. The proposed methodology is based on Genetic Algorithms, where all possible factors that affect the electrical energy demand of a system are considered. The forecasted electricity demand with this model for the last two years was with more accuracy compared to the Ceylon Electricity Board forecasted demand; i.e. the modal forecasted demand in each year (year 2002 and 2003) was very much closer to the actual data. DECLARATION Ihe \\ ork submitted in this dissertation is the result of my own investigation, cxc.:ept where otherwise stateu. j It ha~ not already been accepted for any degree, and is also not being concurrently submitted for any other degree. 0 0 0 .:P.~J)b_~4. ~-~- 0 0 D. \'. ·1. Ban;b~a·t{age . ~~- !uj "')..,oos Dati·- I endorse the declaration by the candidate. )-s(l' /? ..-s oooooooo ooidooo 0000 ooooo 00 0 I )r. I .anka Udawatta 11 • ':t' :. :..... 'f I . ·'· -- ./.., ACK~O\VLI~DGE:vl ENT First and foremost my sincere thanks go to the Department of Electrical Engineering, l 'nl\erstty of \1orattma for sclectmg me to folio\\ this course of i\lastcr of Enginccnng (in l ~ lectrical Engineering). \~ my supcrYisor and the course coon..linator. thank you vert much Dr. Lanka Udawatta lor the valuable support anJ guidance given me to make this research a sm:ccss. My special thank goes to the former uircctor Dr. T.A. Piyasiri and the deputy registrar \lrs. Vishakha Korale of Institute of l'cchnology. University of \1oratuwa for granting the course fee in doing this postgraduate course. The tn,aluable guidance anJ support I received from Dr. Thilak Siyambalapitiya and Dr RohJn \1unasinghe '' hde writing this thesis IS remembered ''ith thanks. In collecting u:.lta the support I recciH!d from my colleague Mrs. \ldhavi Kudaligama or the Ceylon Electricity Board. officers or the DepartmentA~ Senses and Statistics. and .. \lr. \\ asantha of the Central Bank of Sri L.1nJ...a is highly appreciated with thanks. Thank you very much Mr. A.G. Buddhika Jaya::;ckara, lor the kind co-operatlon'and the help given me throughout the project. ..... ivly special thanks extend to the I lead of the Department of Electrical r,:,nginc,-ering- /., Pro!'. H.Y.R. Perera. all aca<.lemic and notHtc:.~demic staiTmcmbcrs of the departmqnl for the facilities and support rendered 111 nttmcrous ways in doing this research. \' i\1 last but not least, the guidance, encouragement and the support I received from my tkar amma, thalhlha and my husband i\lllil, to make this event a success, arc remembered \\' tth thanks. t'lwrangika Bambara\·anage. l 6~ " VI ..... "" I , ·""'· TABLE OF CONTENT 1-t s·r ()F FIC;UJ{ES .................................................................................... 3 I J IS--1~ O li~ ·1~;\ .Bi . ...#l~S .......... ... ..... ............. ....... ................ ........ ......... ..... ...... .... S ('I l .-\ p·r I~ I{ 1 ............................................................................................... 6 Introduction .................................. .. ................................................................................. (> 1.1 Concept ofGA and e\·olutionary programming .............................................. 6 1.1.1 \Vhat are Genes? ...................................................................................... 8 1.1.2 I. 1.3 1.2 1.3 EYolutionary Computation ...................................................................... <.> Genetic Algorithms ................. ....................... ......... .;. .......................... I 2 Electrical energy demand !orcrJsting .......................................................... 16 Proposed methodology of clectricul energy deman<..l forecasting .................. 18 ('II A P'I' E f{ 2 ................•.............................................•........................... ~ .. 19 Sun ey of Avai lable Electrical Energy Demand rorecasting .:V1etho<..lologics ....... .. ...... 19 2.1 Time Trend Method ............................................................ .. ............. ... ......... I 9 2.2 End-usc method ............................................................................................. 21 2.3 Econometric approach .................................................................................. 22 2..-l Combining econometric and time series modcls ........................................... 23 2.5 Load forecast {or 2001 Generation 1:\pansion planning Studies'' ith Econometric Method . ... . .. . . . . . ....................................................................... 24 2 . .5. I Domestic sector...... . ... . .................................................................... 24 2.5.2 Industrial and Commercial Sector ......................................................... 2.5 2 . .5.3 Other sector ........................................................................................... 25 ( 'l lr\ P'f ER 3 ............................................................................................. 31 ... ~. Proposed Methodology Evolution or Electrical Energy D~1and: Genetic Algorithm b;.~scd ;"\1odel ..................... .............................................................................................. 31 3. I Proposed Methodology ..................................... ... .......................................... 3 I 3.5 Just ification of selecting the considered !~lctors ....... ................................. r .. 35 3.5. I Rainfall data. in catchments arc;.~s ................................................. ~:":':· ..... 36 3.5.2 Domestic consumer account<; .............................................. :.::.: ............ 38 3.5.3 Average US S \'aluc ................... .-:·: ......................................................... 38 ~.5.4 Population, Population growth rate .......................................... : .. ~.~ ... 3<) ..... 3.5.) GOP ....................................................................................................... 40 ~- >" , .. . I . v ~ .. :--..6 [ nee of Elcctnctly ( !)omc::;ttc) ......................................................... ..-:...+I 3.6 Parametric Study .............................................. ...................... : ..................... 42 3.7 Limitations in consiJcring all the possible I"Jciors ..................... : .................. 45 Page I of8 (J·IAP'I' l•: l{ 4 ............................................................................................. 47 Results ........................................................................................................................... 47 4.1 Parameters set in the CiC'nCIJC' J\lgorithm ...................................................... .4 ... 4.2 Results used in the forecasting i\.1odci ....................................................... : .. .4S 4.3 Graphical Representation of C\ olut ion of' the parameters ............................. 50 <~H,\PTER 5 .......................................................................... ... ........ ........ 62 Forecasting \lode! for Electrical E .. ·rc~y Demand of S1 i Lank:.! ................................... 62 5.1 Preparing the forecasting ~lode! ................................................................... 62 "2 . Frror with the forecasted data ....................................................................... ().) S 4 \'alidity of the forecasting \1odcl. ................................................................. 64 5.5 Electricity Demand forecast ................................................... 1 ..................... 65 SJ> Conclusion ........................................ ........... ................. .. ............. .. .... ............ 68 lt~:FEl{ENCES ......................................................................................... 70 ,\I'PENOIX 1 ................................... ... ....................................................... 71 F1tness \<.dues obta ined with Jirtcrent pa rameter scllings .................... .. ....................... 71 ,\J) I)~:NI)IX II ........................................................................................... 85 Data used for the forecast .............................................................................................. 85 --~ " ... .. ,,. I , #,' ~ /~ Page 2 of88 LIST OF FIGURES Frgure 1.1: A Genetic Algorithm cycle 7 rigure 1.2: Frgurc 1.2: Search techniques II Figure I.J. Artificial Intelligence techniques 11 Frgure 1.4: Basic.Evolution Cycle 12 Figure 1.5: Roulette \\'heel selection 15 Figure l.(l: Example of one point crosso,·cr · 15 Figmc I. 7: Process of mutation 16 Frgmc 2. I: l:lcctricity demand forecasted by The CCB in yr. 200 I: ShortAem1 projections 20 Frgurc 2.2: The electrical energy demand of Sri Lanka from year 1985 till year 2002 28 h , nre 2.3: Electrical Energy demand forecasted by The CEB in year 2001: Long term 30 Figure J.l: Representation of genes 32 Frgurc 3.2: Way to obtain the forecasting model 32 Frgmc 3.3: Distribution of fERROR2 \ s. Number of generations 34 hgurc J 4: Factors considered in the forecastrng model 34 Frgurc J.Y Consumption of electrieit} by mam consumer categories of Sri Lanka 35 Frgurc 3.Cl: Consumption of electricity hy main consumer categories of Sri Lanka ,l . as a percentage of the total consumers of that year .!' Figure 3.7: Consumption of electricity by Commcn.:ial, Domestic, lnJustrial and Other consumers in Sri Lanl--a in year 2003. Figure 3.8: Rainfall in catchment areas . ·~ ,. l"rgurc J.lJ: Estim:.~tcd mid year population' s. Year Frgmc 3.10: The variation of Economic Growth and Demand lor Energy in Sri ..... Lanka. .., Frgurc J. 1 1: The ,·ariation of the GDP in L S <) agarnst year Frgurc 4.1: Sample fERROR2 's. 0Jo. or gcncrations-dt::;tnbution with I 000 gcner:nions 35 3(l .., 37 39 40 41 48 Page 3 of SX Figure 4.2: Distribution of best fitness vs. no. of gcncra::ons Figure 4.3: Parameters obtained at the best-lit \'alue F1gmc 4.4: Distribution of Variable I (a I) vs. :\umber of' Generations l·igun.: -L5: Distribution of Variable 2 (pI)' s >-: .nbcr of generations Figure 4.6: Distribution of Variable 3 (a2) \S. >-lumber of generations F1gurc 4.7: Distribution of\':H'iablc 4 (p2) ""·Number of generations Figure 4.8: Distribution of\'ariabk 5 (a3) \'S. I\ umber of generations 49 50 51 51 52 52 53 Figure 4.9: Distribution of Variable 6 (pd 's. ~umber or generations 53 f-igure 4.10 Distribution of Variable 7 (a4) 's. :-:umber of generati.Jns 54 l·igure 4.11 Distribution of Variable 8 (p4) ,·s. Number of generations 54 hgure 4.12: Distribution of Variable l) (aS) vs. Number of generations 55 Figure 4.13: Distribution or Variable 1 () (p5) VS. Number of generations 55 Fi!.!ure-LI·.l: Distributionof'Variable II (a(l) vs. Numbcrofgcncrations 56 ~. Figure 4.15: Distribution of Variable 12 (p(l) \'S. Number of generations 56 I·Jgure 4. 16: Distribution of Variable 13 (a7) 's. Number of generations 57 Fi1:-urc 4.1 7: Distribution of Variable 14 ( p7) vs. >-lumber of generations 57 1--igurc 4.18: Distribution of Variable 15 (aS)' s. Number of generations 58 Figure 4.19: Distribution of Variable 16 (pS) 's. !'\umber of generations .. 58 Figure 4 .20: Distribution of Variable 17 (a9) ,.s. ;"\umber of generations 59 Figure 4.21: Distribution of Variable 18 (p<)) ,.s. Number of generations 59 t Figure 5.1: Details of the factors considered in the modeV (l} Figure 5.2: Energy demand vs. Year (actual data and the model forecasted data) 65 Figure 5.3: Electrical Energy Demand forecast done with the model- Short . Term . , . 66 Figure 5.4: Load curve or Sri Lanka on I st .lun~ 2005 67 -- , ... ..,. .,. / Page 4 or 88 LIST OFT ABLES Table 1.1: Roulclte wheel selection procedure Table 2.1: CTB forecasts in year 2000- ~hort I cm1 Table 2.2: CEB forecasts in year ::'000- Long 'I cm1 f"able J.2: Fitness \'alues obtained with drfkrent parameter scuings 0 0 (based on data ti·01n year I 984 till yc:.~r 2000) f'ttblc 501: Comparison of the GA model lorcc.lsl and the Time trend forecast (done hy the CTB) for these two years. f'able 5.2: The possible Peak l:lcctricity Demand considering a 55% I ,oad Factor --/ " 14 20 27 44 j 64 •(J() _..,..: ..... .., / .. I P:tgc 5 of XS