“Energy Trilemma” has recently received an increasing concern among policy makers. The trilemma conceptual framework is based on three main dimensions: environmental sustainability, energy equity, and energy security. Energy security reflects a nation’s capability to meet current and future energy demand. Rational energy planning is thus a fundamental aspect to articulate energy policies. The energy system is huge and complex, accordingly in order to guarantee the availability of energy supply, it is necessary to implement strategies on the consumption side. Energy modeling is a tool that helps policy makers and researchers understand the fluctuations in the energy system. Over the years, there have been many attempts to develop energy system models, which have varying degrees of success. Artificial Neural Networks (ANN) is one of the modeling techniques that shows great performance in modeling the energy consumption side, which has the time-series characteristics of complexity and nonlinearity. Static feedforward neural networks are extensively used in literature due to their simplicity. In this thesis, we propose two artificial neural network topologies: feedforward and Nonlinear Autoregressive with Exogenous Inputs (NARX) neural networks, where four separate ANN models, are formulated to study and forecast the annual final energy consumption for four different sectors in the United Kingdom till 2035: transport, domestic, services, industrial. The outputs of all models are finally summed up to yield UK’s total final energy consumption. Furthermore, in this thesis, we use the Bayesian optimization algorithm to search for the optimal network hyperparameters. Moreover, instead of arbitrarily selecting input parameters in a qualitative manner, a sequential backward selection technique is used to exclude any uninformative input variables that have no predictive power, and eventually select the optimal set of input parameters. The network performance is measured with regards to various accuracy metrics such as Root Mean Square Error (RMSE), and Mean Average Percentage Error (MAPE). The resulting forecasts are eventually compared to the final energy consumption outlook from UK’s governmental Department for Business, Energy & Industrial Strategy (BEIS). The comparisons show that the NARX model offers superior results compared to the feedforward model in terms of the accuracy metrics as well as the long-term forecasts. Moreover, the developed NARX model succeeded in having a better performance than other models developed in the literature.


School of Sciences and Engineering


Mechanical Engineering Department

Degree Name

MS in Mechanical Engineering

Graduation Date

Fall 12-31-2021

Submission Date


First Advisor

Ashraf Nassef

Second Advisor

Lotfi Gaafar

Committee Member 1

M. Hamdy Elwany

Committee Member 2

Sherif Fahmy


73 p.

Document Type

Master's Thesis

Institutional Review Board (IRB) Approval

Not necessary for this item