Predicting the Short Term
Electrical Energy Consumption
using
Dynamic Model
and
Genetic Algorithm
Prof. Dr. Ibrahim El-Mohr
Dr. Khaled Eskaf
Arab Academy for Science, Technology and Maritime
Transport
Presentation Outline:
2- Electrical Energy Consumption as a Dynamic System.
3- Database of Electrical Energy consumption for AAST-Syria.
4- Prediction the short term Electrical Energy Consumption using
Genetic Algorithm Technique.
5- Online Learning Procedure.
6- Comparison with other researchers results.
1- Introduction and define the problem.
Introduction
Traditional Way:
1
?
2
[1] M. Chan, D. Estève, C. Escriba, E. Campo, "A review of smart homes present state and
future challenges", Computer Methods and Programs in Biomedicine 9 (1) (2008).
[2] C.D. Nugent, D.D. Finlay, P. Fiorini, Y. Tsumaki, E. Prassler, "Editorial home automation as a
means of independent living", IEEE Transactions on Automation Science and Engineering 5 (1)
(2008).
[3] R. Priyadarsini, W. Xuchao, L. SiewEang, "A study on energy performance of hotel
buildings in Singapore", Energy and Buildings ,41 (12) (2009).
[4] K. Kawamoto, Y. Shimoda, M. Mizuno, "Energy saving potential of office equipment
power management", Energy and Buildings .36 (9) (2004).
[5] M.S. Hatamipour, H. Mahiyar, M. Taheri, "Evaluation of existing cooling systems for
reducing cooling power consumption", Energy and Buildings 39 (1) (2007).
[6] J.A. Clarke, J. Cockroft, S. Conner, J.W. Hand, N.J. Kelly, R. Moore, T. O’Brien, P. Strachan,
"Simulation-assisted control in building energy management systems", Energy and Buildings
, 34 (9) (2002).
[8] A.-P. Wang, P.-L.Hs, "The network-based energy management system for convenience
stores", Energy and Buildings ,40 (8) (2008).
[9] Domínguez, M., Reguera, P., Fuertes, J. J., Díaz, I. and Cuadrado, A. A., “Internet-based
remote monitoring of industrial processes using Self-organizing maps”, Engineering
Applications of Artificial Intelligence, (2007).
[11] Ming Meng ,DongxiaoNiu and Wei Sun, “Forecasting Monthly Electric Energy
Consumption Using Feature Extraction”, Energies journal (2011).
Number of air conditions
Number of heater
Number of working hours
answers
(Input Vector)
Asking some questions
PredictionAlgorithm
Number ……………
Questions
All previous projects involve questioning the users
PredictionAlgorithm
Output
Result
Feature extraction procedures were implemented
(Dynamic Model) on Electrical Energy Consumption time series,
in order to extract a knowledge (how Electrical Energy Consumption will change)
Genetic Algorithm was then used these features in order
to predict the future value of Electrical Energy Consumption
with an accepted accuracy.
So our project is not involved in asking questions
Predicting Future Electrical Energy
Consumption
using
Genetic Algorithm
Objective:
2- Expect the future value of Electrical energy consumption
after 6 months or more from the current value.
1- Try to extract a knowledge from the time series of monthly
electrical energy consumption.
Feature Extraction Procedure
Dynamic Model
for
Electrical Energy Consumption time series
Dynamic System:
Force
Damping factor
With the homogeneous equation :
the traditional approach is to assume a solution of the form :
where s is a constant. Upon substitution into the differential equation, we obtain :
which is satisfied for all values of t when
The previous equation which is known as the characteristic equation, has two roots :
Hence, the general solution is given by the equation:
where A and B are constants to be evaluated from the initial conditions.
Mathematical Model
External
Force
For example
Damping
Factor
K wh
F ( increase Electrical Energy
Consumption )
B ( decrease Electrical
Energy Consumption )
Impulse force (External force)
Electrical Energy
Consumption per-monthNatural frequencyDamping factor
Impulse force takes the form of the dirac delta function.
Mathematical Equation
Solution of the equation:
where
Is the frequency of the system.
From the previous equation (2),
I can evaluate the value of impulse force F(t), if the electric consumption Values
are given.
In other word I can evaluate F(t) without asking any questions
(external force)
I can extract a knowledge from the electrical energy consumption
values time series
Steps of Using Feature Extraction Procedure
Sampling Frequency 1
month
month Kwh per-
month
1
2
3
4
5
We will record the electricity power consumption for 12 months,
(sampling frequency 1 month) .
1
month KWh
1
2
3
4
5
6
7
8
9
11
12
Example of Kwh for a period 12 months.
We will evaluate the Value of F and B for duration
12 months, by substitute in equation 2 and 3.
3
KWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWh
F
Duration=12 months, sampling frequency= 1 month
Twelve samples
B
Electric Power Consumption (Time Series)
SlopeKWhMonth
1
2
3
4
5
6
7
8
9
10
11
12
Where slope=( Y(2)- Y(1) ) / ( X(2)-X(1) ).
Determine the Slope Pattern:4
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
1 2 3 4 5 6 7 8 9 10 11
Slopevalue
interval
Pattern1
Series1
Patterns of Slopes
KWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWh
F
Duration=12 month, sampling frequency= 1 month
KWhe
KWha
After 6 month
Twelve samples
B
We will determine the Fc (the changing factor of KWh),
that affect KWh at the end of period (according to the value of F and B)
  100*
KWhe
KWheKWha
Fc


5
Determine Changing Factor (Fc)
Examples of Features from Electric Energy Consumption Series
External Force
Internal Force
Evaluate Fc
Genetic Algorithm Procedure
Structure of Genetic Algorithm:
Population Representations:
Chromosomes are represented as follows:
F, B and Slopes of KWh Values. As shown in the following Figure.
Slope11Slope10Slope9Slope8Slope7Slope6Slope5Slope4Slope3Slope2Slope1BF
1.61.41.41.20.80.60.40.20-0.4-1.20.003260.85999
Population Size remains constant from generation to generation
(but it will increase as a result of new cases will appear).
Reproduction (survival of the fittest):
Parents are SELECTED for REPRODUCTION biased on the fitness function.
Consider the fitness function:
X=Xs – Xd .
X-ERROR < X<X+ERROR.
Where:
Xs= selected vector of Feature (F, B and Slopes of KWh).
Xd= desired vector of Feature (F, B and Slopes of KWh).
ERROR =Accepted error of values.
Crossover:
Using a heuristic crossover: Heuristic creates
children that lie on the line containing the two
parents, a small distance away from the parent with
the better fitness value in the direction away from
the parent with the worse fitness value.
Mutation:
Using a Gaussian function: Gaussian adds a
random number to each vector entry of an
individual. This random number is taken from a
Gaussian distribution centered on zero. The
variance of this distribution can be controlled
with two parameters.
Features Extraction Procedure
KWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWh
F,B and Slopes of BG Values
Duration=12 months, sampling frequency= 1 month
KWhe
After 6 months
We will have the following values:
F, B , Slopes of KWh.
?
Slope11Slope10Slope9Slope8Slope7Slope6Slope5Slope4Slope3Slope2Slope1B(1hour)F(1hour)
1.41.41.20.80.60.40.20-0.4-1.2-1.40.00360.883
Desired Value
Feature Vector (during 12 months)
Output Search
Fc
0.015
10 20 30 40 50 60 70 80 90 100
0
10
20
30
Generation
Fitnessvalue
Best: 0.001 Mean: 0.12917
10 20 30 40 50 60 70 80 90 100
0
50
100
150
Generation
Average Distance Between Individuals
Determine the Estimated Value
Furthermore in the training phase the system is capable to learn any new cases,
which that mean, the system will keep learning any new features (new F ,B, ,slopes and Fc).
On Line Learning Procedure
Comparing performance
The Root-Mean-Square-Error (RMSE) is given by
Where Xp(t+6) is the output of the Genetic Algorithm,
X(t+6) the target output (the measured value) and
N the number of samples.
The leave-one-out cross-validation technique was used.
The range of root-mean-square error from 5X10-5 to 1X10-4 Kilowatt hour (kWh).
In short if compare our solution with others:
Khaled eskaf  presentation predicting power consumption using genetic algorithm

Khaled eskaf presentation predicting power consumption using genetic algorithm

  • 1.
    Predicting the ShortTerm Electrical Energy Consumption using Dynamic Model and Genetic Algorithm Prof. Dr. Ibrahim El-Mohr Dr. Khaled Eskaf Arab Academy for Science, Technology and Maritime Transport
  • 2.
    Presentation Outline: 2- ElectricalEnergy Consumption as a Dynamic System. 3- Database of Electrical Energy consumption for AAST-Syria. 4- Prediction the short term Electrical Energy Consumption using Genetic Algorithm Technique. 5- Online Learning Procedure. 6- Comparison with other researchers results. 1- Introduction and define the problem.
  • 3.
  • 8.
  • 9.
    2 [1] M. Chan,D. Estève, C. Escriba, E. Campo, "A review of smart homes present state and future challenges", Computer Methods and Programs in Biomedicine 9 (1) (2008). [2] C.D. Nugent, D.D. Finlay, P. Fiorini, Y. Tsumaki, E. Prassler, "Editorial home automation as a means of independent living", IEEE Transactions on Automation Science and Engineering 5 (1) (2008). [3] R. Priyadarsini, W. Xuchao, L. SiewEang, "A study on energy performance of hotel buildings in Singapore", Energy and Buildings ,41 (12) (2009). [4] K. Kawamoto, Y. Shimoda, M. Mizuno, "Energy saving potential of office equipment power management", Energy and Buildings .36 (9) (2004). [5] M.S. Hatamipour, H. Mahiyar, M. Taheri, "Evaluation of existing cooling systems for reducing cooling power consumption", Energy and Buildings 39 (1) (2007). [6] J.A. Clarke, J. Cockroft, S. Conner, J.W. Hand, N.J. Kelly, R. Moore, T. O’Brien, P. Strachan, "Simulation-assisted control in building energy management systems", Energy and Buildings , 34 (9) (2002).
  • 10.
    [8] A.-P. Wang,P.-L.Hs, "The network-based energy management system for convenience stores", Energy and Buildings ,40 (8) (2008). [9] Domínguez, M., Reguera, P., Fuertes, J. J., Díaz, I. and Cuadrado, A. A., “Internet-based remote monitoring of industrial processes using Self-organizing maps”, Engineering Applications of Artificial Intelligence, (2007). [11] Ming Meng ,DongxiaoNiu and Wei Sun, “Forecasting Monthly Electric Energy Consumption Using Feature Extraction”, Energies journal (2011).
  • 11.
    Number of airconditions Number of heater Number of working hours answers (Input Vector) Asking some questions PredictionAlgorithm Number ……………
  • 12.
    Questions All previous projectsinvolve questioning the users PredictionAlgorithm Output Result
  • 13.
    Feature extraction procedureswere implemented (Dynamic Model) on Electrical Energy Consumption time series, in order to extract a knowledge (how Electrical Energy Consumption will change) Genetic Algorithm was then used these features in order to predict the future value of Electrical Energy Consumption with an accepted accuracy. So our project is not involved in asking questions
  • 14.
    Predicting Future ElectricalEnergy Consumption using Genetic Algorithm
  • 15.
    Objective: 2- Expect thefuture value of Electrical energy consumption after 6 months or more from the current value. 1- Try to extract a knowledge from the time series of monthly electrical energy consumption.
  • 16.
  • 17.
    Dynamic Model for Electrical EnergyConsumption time series
  • 18.
  • 19.
    With the homogeneousequation : the traditional approach is to assume a solution of the form : where s is a constant. Upon substitution into the differential equation, we obtain : which is satisfied for all values of t when The previous equation which is known as the characteristic equation, has two roots : Hence, the general solution is given by the equation: where A and B are constants to be evaluated from the initial conditions. Mathematical Model
  • 20.
  • 21.
    F ( increaseElectrical Energy Consumption ) B ( decrease Electrical Energy Consumption )
  • 22.
    Impulse force (Externalforce) Electrical Energy Consumption per-monthNatural frequencyDamping factor Impulse force takes the form of the dirac delta function. Mathematical Equation
  • 23.
    Solution of theequation: where Is the frequency of the system.
  • 24.
    From the previousequation (2), I can evaluate the value of impulse force F(t), if the electric consumption Values are given. In other word I can evaluate F(t) without asking any questions (external force) I can extract a knowledge from the electrical energy consumption values time series
  • 25.
    Steps of UsingFeature Extraction Procedure
  • 26.
    Sampling Frequency 1 month monthKwh per- month 1 2 3 4 5 We will record the electricity power consumption for 12 months, (sampling frequency 1 month) . 1
  • 27.
  • 28.
    We will evaluatethe Value of F and B for duration 12 months, by substitute in equation 2 and 3. 3
  • 29.
    KWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWh F Duration=12 months, samplingfrequency= 1 month Twelve samples B Electric Power Consumption (Time Series)
  • 30.
    SlopeKWhMonth 1 2 3 4 5 6 7 8 9 10 11 12 Where slope=( Y(2)-Y(1) ) / ( X(2)-X(1) ). Determine the Slope Pattern:4
  • 31.
    -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 1 2 34 5 6 7 8 9 10 11 Slopevalue interval Pattern1 Series1 Patterns of Slopes
  • 32.
    KWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWh F Duration=12 month, samplingfrequency= 1 month KWhe KWha After 6 month Twelve samples B We will determine the Fc (the changing factor of KWh), that affect KWh at the end of period (according to the value of F and B)   100* KWhe KWheKWha Fc   5 Determine Changing Factor (Fc)
  • 33.
    Examples of Featuresfrom Electric Energy Consumption Series
  • 34.
  • 35.
  • 36.
    Structure of GeneticAlgorithm: Population Representations: Chromosomes are represented as follows: F, B and Slopes of KWh Values. As shown in the following Figure. Slope11Slope10Slope9Slope8Slope7Slope6Slope5Slope4Slope3Slope2Slope1BF 1.61.41.41.20.80.60.40.20-0.4-1.20.003260.85999 Population Size remains constant from generation to generation (but it will increase as a result of new cases will appear).
  • 37.
    Reproduction (survival ofthe fittest): Parents are SELECTED for REPRODUCTION biased on the fitness function. Consider the fitness function: X=Xs – Xd . X-ERROR < X<X+ERROR. Where: Xs= selected vector of Feature (F, B and Slopes of KWh). Xd= desired vector of Feature (F, B and Slopes of KWh). ERROR =Accepted error of values.
  • 38.
    Crossover: Using a heuristiccrossover: Heuristic creates children that lie on the line containing the two parents, a small distance away from the parent with the better fitness value in the direction away from the parent with the worse fitness value. Mutation: Using a Gaussian function: Gaussian adds a random number to each vector entry of an individual. This random number is taken from a Gaussian distribution centered on zero. The variance of this distribution can be controlled with two parameters.
  • 39.
    Features Extraction Procedure KWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWhKWh F,Band Slopes of BG Values Duration=12 months, sampling frequency= 1 month KWhe After 6 months We will have the following values: F, B , Slopes of KWh. ?
  • 40.
    Slope11Slope10Slope9Slope8Slope7Slope6Slope5Slope4Slope3Slope2Slope1B(1hour)F(1hour) 1.41.41.20.80.60.40.20-0.4-1.2-1.40.00360.883 Desired Value Feature Vector(during 12 months) Output Search Fc 0.015 10 20 30 40 50 60 70 80 90 100 0 10 20 30 Generation Fitnessvalue Best: 0.001 Mean: 0.12917 10 20 30 40 50 60 70 80 90 100 0 50 100 150 Generation Average Distance Between Individuals
  • 41.
  • 42.
    Furthermore in thetraining phase the system is capable to learn any new cases, which that mean, the system will keep learning any new features (new F ,B, ,slopes and Fc). On Line Learning Procedure
  • 43.
    Comparing performance The Root-Mean-Square-Error(RMSE) is given by Where Xp(t+6) is the output of the Genetic Algorithm, X(t+6) the target output (the measured value) and N the number of samples. The leave-one-out cross-validation technique was used. The range of root-mean-square error from 5X10-5 to 1X10-4 Kilowatt hour (kWh).
  • 44.
    In short ifcompare our solution with others: