Electrical Charge of Niamey City Modelisation by Neural Network

: In order to forecast consumption, electric power generation, transmission and distribution companies need model to predict short-term demand for electric power load so that they can use their electricity infrastructure efficiently, safely and economically. The short-term forecast of electrical energy demand is the forecast of consumption over time interval ranging from one hour to few days. For optimal use of electricity grid, energy production must keep pace with demand. To this end, prediction errors can lead to risks and shortcomings in the generation and distribution of electrical load to users. This paper is part of electrical charge prediction of Niamey city. Several are being carried out in this field


Introduction
Electricity is fundamental to modern economic activity. The regularity of its offer poses major challenge, particularly the acquisition of reliable prediction tool. An efficient and high-volume energy storage system has not yet been put in place. The production of energy must follow the demand for optimal use of an electricity grid [1]. Electric power companies are interested in prediction to get an idea of the values of the electric charge, in order to properly manage the supply of electric power [2]. These companies need an effective prediction tool to allow all actors to control their load for good balance of the power system [3].
Predicting the value of the electrical charge is an ideal way to reduce load shedding and ensure good supply of electrical energy [4]. As result, the quality of this forecast, which is essential element of preparation and anticipation, helps to ensure that the production-consumption balance is maintained at all times. It therefore has direct impact on the operational safety of electrical system. The prediction is made with knowledge of users' consumption over previous years. Electricity consumption depends on activities of users and therefore on their daily, weekly or annual behavior [5]. Depending on this behavior, the load may increase or decrease from one hour to another, from one day to another or from one season to another [6].
Short-term forecasting of electricity consumption plays essential role in efficient management of resources allocated to electricity production. Forecast errors can lead to significant operational costs. The objective is therefore to provide short-term prediction (time horizon) of demand for electrical power. Short-term prediction helps to minimize errors, sources of risk and inadequacies in correct generation and distribution of electrical energy to users. There is a lot of research in this area [3].
Artificial Neural Networks are function estimators. They are considered as configurable black boxes, in order to find link between inputs and outputs through sample of data during the learning phase. In this paper, Artificial Neural Networks are applied for two modelling approaches [7,8]. For both cases, similar parameters are used. We are talking about the type of network, the activation function and the learning rule.

Prediction with the Multi-Layer Perceptron (MLP)
The first model developed in this project is two-layer Perceptron Multi-Layer (MLP) with hidden layer and output layer [9]. This type of network is reliable tool for problems of approximation of functions. The choice of inputs is made using the correlation between the data. The activation function used to activate the neurons in the hidden layer is sigmoid function. The function provides output values belonging to interval [0.1]. For the neurons in output layer, activation function is of linear type. The procedure used for learning phase is error correction procedure (Backward Error Propagation). The principle is easy, we proceed to propagation of error calculated by network from the output layer to the input layer [10,11]. The algorithm used to update weights is the Levenberg-Marquardt one. Its principle is based on a minimization of function. It calculates cost function, on which it decides whether or not the update will be accepted. It continues the calculation until the network converges. The calculation is done using the Jacobean weights and biases [12][13][14].
The output of our network is given by equation (1): a. y is the value predicted by the neural network; b. n is the number of hidden units in the network; c. β0 the bias; d. βi the weighted coefficients;

Non-linear Autoregressive Network with Exogenous Inputs (NARX)
The recurring network has many applications. It can be used for modeling complex systems. As preacher, he can predict the next value of the output signal. In addition to the same parameters as the first model it has a number of delays [15,16]. y(t)=f(y(t−1),y(t−2),…,y(t−n y ), u(t−1),u(t−2),…,u(t−n u )) (2)

Experimental Approach to Modelling
The neural network models we have built are two-layer feedforward models for MLP ( Figure 1) and NARX for recurrent network ( Figure 2). The neurons of the hidden layer have a sigmoid activation function and those of the output layer a linear function in both cases. This architecture is proposed in the Matlab "ntstool" library that we used.  To obtain the different models, the choice and methodical analysis of the explanatory variables is essential. These variables are used to assess the influence of each input parameter on the output of forecast model. Indeed, it is very important, for accuracy of the model, to choose appropriate input parameters. This step is very useful because it eliminates some variables that provide very little or no information to describe the output, or eliminates redundant variables [1,4].
The variables that were chosen to model the electrical load of Niamey city are listed in Table 3.
It is therefore necessary to predict the electrical charge with various combinations of these explanatory variables in order to determine the most efficient configuration case on the basis of well-defined criterion.
We tested different configuration cases that are summarized in Table 4, for total of 7 configuration cases.

Results and Interpretations
In this section, the main task is to present the results of research and then to choose the most appropriate model for predicting electrical load based on the MAPE, which is the main indicator chosen to evaluate the performance of these models.
To obtain the different results, programs are designed for each configuration case and for each learning.
For given configuration case and neurons number in the hidden layer, each model was run 10 times for the learning and simulation phases.
Indeed, the synaptic weights change values with each execution, giving slightly different results from previous executions.
Neurons number is varied as follows: 10, 20, 30, 40 and 50. Two models, MLP and NARX, are studied. For each model there are seven (7) configuration cases. For each configuration case neurons number is varied in five steps (10, 20, 30, 40, and 50) and for each neurons number considered, ten (10) learning are performed.
In total there are 2x7x5x10 = 700 learnings, so 700 programs on MATLAB.
The learning time is 12 to 15 minutes for MLP and 3 to 6 minutes for NARX.
For each learning experience it is ensured that the results are automatically recorded by our program. In addition to the end that each learning of the curves is automatically traced also to graphically observe the results.
Finally, for each model and for each number of neurons given, the results of the best performance on the 10 learning outcomes are classified in tables 5 to 14.

Performances of Perceptron Multilayer Models (MLP)
We have reported the minimum and maximum of considered performance criteria of different cases in tables.

Performance of Non-linear Autoregressive Network Models with Exogenous Inputs (NARX)
The results of different configurations of this model are also presented in tables.

Interpretations of Model Performance
The interpretation of the performances of different configurations of priori models has allowed us to identify for each case the neurons number in the hidden layer that gives better results as shown in Table 19 (* indicates the best performances). The final choice of best performance for each model is made using the MAPE indicator and the correlation coefficient R 2 . The results are shown in Table 20 (* refers to best performance of all models and configurations). In addition, the MAPE, RMSE and R 2 values (tables 21, 22, 23) obtained yield the curves in Figure 3, Figure 4 and Figure 5 as function of neurons number under the hidden layer.      It has been shown that layer networks offer poor results for neurons number in the hidden layer that are insufficient or too large. Thus, figures 3, 4 and 5 analysis shows that neurons number in hidden layer of each model influences results. Indeed, for each case, the best results are obtained for models with 30, 40 or 50 neurons. Beyond 50 neurons, MAPE errors increase and the simulation time is very long, which forces us to limit the number of neurons for our tests.

Conclusion
Objective of this work is to develop a model for predicting electrical charge of Niamey city using artificial neural networks. To achieve this goal, two prediction models were tested: MLP and NARX. Several configurations of the two major models mentioned above have been developed and tested by varying the different explanatory variables. All configurations have been implemented on MATLAB. The statistical indicators MAPE (Absolute mean error in percent), R 2 (correlation coefficient) and RMSE (square root of mean square error) were used to evaluate performance of models. Thus with MAPE of 5.1765%, R 2 of 95.3013% and RMSE of 5.6014%, the [ABCD] configuration of the NARX model is chosen ahead of MLP with MAPE of 7.1874%, R 2 of 92.0622% and RMSE of 7.2199%. So the NARX model is the most efficient and can be used for future predictions on the Niamey city network.