# Mid-Term Energy Demand Forecasting by Hybrid Neuro-Fuzzy Models

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Framework of the Forecasting Approach

_{τ}and LLNF

_{c}, respectively. Then, in the next stage, the input selection technique of mutual information is employed to determine appropriate inputs for each of LLNF models. In the third stage, the selected input variables are applied to LLNF models and forecast values are provided. By aggregating the predictions of the two LLNF models, final values of the energy demand forecast are produced.

## 3. Local Linear Neuro-Fuzzy Models

_{ij}are LLM parameters associated with neuron i.

_{ij}) and the parameters associated with validity functions. The former parameters are called rule consequent parameters, while the latter are referred to as rule premise parameters.

#### 3.1. Global Estimation of the Local Linear Models Parameters

#### 3.2. Local Estimation of the Local Linear Models Parameters

#### 3.3. Estimation of the Validity Functions Parameters

_{ij}and σ

_{ij}represent center coordinate and standard deviation of normalized Gaussian validity function associated with ith local linear model. The validity functions in (15) are normalized according to (4).

- Start with the initial model: Set M = 1 and start with a single LLM whose validity function (${\varphi}_{1}\left(\underset{\_}{u}\right)$) covers the whole input space.
- Find the worst LLM: Calculate a loss function, here RMSE, for each of i = 1,2,…,M, LLMs and find the worst LLM.
- Check all divisions: The worst LLM, in all of p-dimensions, must be divided into two equal halves. For each of p divisions, a multidimensional validity function must be constructed for both new hyper-rectangles, then the rule consequent parameters of both new LLMS must be estimated using global/local least squares approach and finally the loss function for the current overall model must be computed.
- Find the best division: The best LLM related to the lowest loss function value, must be determined. The number of LLMS is incremented: M → M + 1. If the termination criterion, e.g., a desired level of validation error or model’s complexity, is met then stop, otherwise go to step 2.

## 4. Data Pre-Processing Using a Hodrick-Prescott Filter

## 5. Mutual Information-Based Input Selection

#### 5.1. Definition of Mutual Information

#### 5.2. Input Selection Algorithm

## 6. Energy Demand Forecasting Results

Case Study | Input Features | |
---|---|---|

Gasoline demand | Auto regression part | Gasoline demand historical |

Cross regression part | Population GDP Gasoline price | |

Crude oil demand | Auto regression part | Crude oil demand historical |

Cross regression part | Population GDP Crude oil import price | |

Natural gas demand | Auto regression part | Natural gas demand historical |

Cross regression part | Population GDP Natural gas price Average heating degree-days |

Case Study Demand | Training Data Period | Length | Validation Data Period | Length | Test Data Period | Length |
---|---|---|---|---|---|---|

Gasoline | Jan 1992–Dec 2008 | 204 | Jan 2009–Dec 2009 | 12 | Jan 2010–Dec 2010 | 12 |

Crude oil | Jan 1992–Dec 2007 | 192 | Jan 2008–Dec 2008 | 12 | Jan 2009–Dec 2009 | 12 |

Natural gas | Jan 1992–Dec 2006 | 180 | Jan 2007–Dec 2007 | 12 | Jan 2008–Dec 2008 | 12 |

- Mean absolute percentage error (MAPE):$$\begin{array}{c}\text{MAPE =}\frac{1}{N}{\displaystyle \sum _{t=1}^{T}\frac{\left|{d}_{t}-{\widehat{d}}_{t}\right|}{\overline{d}}}\times 100\\ \overline{d}=\frac{1}{T}{\displaystyle \sum _{t=1}^{T}{d}_{t}}\end{array}$$
- Absolute percentage error (APE):$$\text{APE =}\frac{\left|{d}_{t}-{\widehat{d}}_{t}\right|}{{d}_{t}}\times 100$$

#### 6.1. Selecting the Number of Input Variables

_{τ}) and cyclic (LLNF

_{c}) models. For each input variable, 48 time lags, corresponding to the past four years are considered. Therefore, the MI-based input ranking, ends with 4 × 48 = 192 inputs for the first two case studies and 5 × 48 = 220 inputs for the third case study. Obviously, this number of inputs is unacceptably large. Hence, selecting the appropriate number of inputs from the MI-ranked lags of input variables is another problem. This is resolved through model validation.

_{τ}) and cyclic (LLNF

_{c}) models. The validation errors for trend and cyclic models of the first case study (gasoline demand forecasting) are shown in Figure 5 and Figure 6, respectively. Obviously, six inputs results in the lowest validation error for LLNF

_{τ}model, while five inputs lead to the best validation error for LLNF

_{c}model. These inputs will be used to construct the structure of the forecast model. For further analysis, the selected inputs for both LLNF

_{τ}and LLNF

_{c}of the first case study are presented in Table 3 and Table 4, respectively. The normalized mutual information between each selected input and the output is also presented in these tables. The normalization was performed with respect the input with maximum MI with the output. It’s worth noting that, in addition to the first three past lags of the gasoline demand, the exogenous variables are also assigned to the trend model, LLNF

_{τ}, while only the past time lags of the gasoline demand historical are selected as the inputs of the cyclic model, LLNF

_{c}. This is due to the fact that the trend component represents long-term changes of the demand and therefore is more correlated to the econometric variable such as population and GDP. In Table 3, $d{t}_{h-1}$, ${p}_{h-1}$, $p{r}_{h-1}$, $GD{P}_{h-1}$ stand for gasoline demand trend component, population, gasoline price and GDP at month $h-1$, used for forecasting the trend of gasoline demand at month h.

Rank | Variable | Normalized MI with the Output |
---|---|---|

1 | ${dt}_{h-1}$ | 1 |

2 | ${dt}_{h-2}$ | 0.86 |

3 | ${p}_{h-1}$ | 0.75 |

4 | ${dt}_{h-3}$ | 0.71 |

5 | ${pr}_{h-1}$ | 0.69 |

6 | ${GDP}_{h-1}$ | 0.65 |

Rank | Variable | Normalized MI with the Output |
---|---|---|

1 | ${dc}_{h-12}$ | 1 |

2 | ${dc}_{h-6}$ | 0.80 |

3 | ${dc}_{h-24}$ | 0.77 |

4 | ${dc}_{h-36}$ | 0.65 |

5 | ${dc}_{h-30}$ | 0.55 |

#### 6.2. Forecasting Gasoline Demand

Actual | Forecast | APE % |
---|---|---|

8.52 | 8.58 | 0.76 |

8.58 | 8.68 | 1.18 |

8.79 | 8.84 | 0.54 |

9.11 | 8.92 | 2.1 |

9.16 | 9.02 | 1.53 |

9.31 | 9.05 | 2.79 |

9.3 | 9.27 | 0.33 |

9.26 | 9.29 | 0.3 |

9.11 | 8.9 | 2.29 |

9.02 | 8.93 | 0.99 |

8.82 | 8.86 | 0.48 |

8.910 | 8.907 | 0.03 |

Training MAPE % | Test MAPE % | |
---|---|---|

HPLLNF (global) + MI | 1.05 | 1.11 |

HPLLNF (local) + MI | 1.08 | 1.16 |

LLNF (global) + MI | 1.23 | 1.54 |

#### 6.3. Forecasting Crude Oil Demand

_{τ}and LLNF

_{c}models are trained and then appropriate number of inputs is determined by applying validation data.

Actual | Forecast | APE % |
---|---|---|

19.04 | 19.44 | 2.1 |

18.82 | 19.21 | 2.08 |

18.72 | 18.79 | 0.37 |

18.67 | 19.05 | 2.02 |

18.21 | 18.73 | 2.87 |

18.83 | 19.06 | 1.21 |

18.63 | 18.97 | 1.85 |

18.95 | 18.96 | 0.06 |

18.59 | 18.16 | 2.3 |

18.8 | 18.85 | 0.26 |

18.75 | 18.69 | 0.33 |

19.24 | 18.78 | 2.39 |

Training MAPE % | Test MAPE % | |
---|---|---|

HPLLNF (global) + MI | 1.3 | 1.48 |

HPLLNF (local) + MI | 1.38 | 1.64 |

LLNF (global) + MI | 1.55 | 1.80 |

#### 6.4. Forecasting Natural Gas Demand

**Figure 9.**Original and trend component of the natural gas demand from January 1992 to December 2007.

Actual | Forecast | APE % |
---|---|---|

88.17 | 81.48 | 7.58 |

86.3 | 82.37 | 4.55 |

73.46 | 69.99 | 4.73 |

60.77 | 58.79 | 3.25 |

50.83 | 50.48 | 0.69 |

53.45 | 54.02 | 1.07 |

55.1 | 53.91 | 2.16 |

54.27 | 56.88 | 4.81 |

48.67 | 49.94 | 2.6 |

52.75 | 51.87 | 1.66 |

62.27 | 60.97 | 2.08 |

77.38 | 75.23 | 2.77 |

Training MAPE % | Test MAPE % | |
---|---|---|

HPLLNF (global) + MI | 2.95 | 3.16 |

HPLLNF (local) + MI | 3.24 | 3.37 |

LLNF (global) + MI | 3.66 | 4.1 |

## 7. Conclusions

## References

- U.S. Energy Information Administration (EIA). Available online: http://www.eia.gov (accessed on 25 June 2011).
- Harris, J.L.; Liu, L.M. Dynamic structural analysis and forecasting of residential electricity consumption. Int. J. Forecast.
**2007**, 9, 437–455. [Google Scholar] [CrossRef] - Edigera, V.; Akarb, S. ARIMA forecasting of primary energy demand by fuel in Turkey. Energy Policy
**2007**, 35, 1701–1708. [Google Scholar] [CrossRef] - Biancoa, V.; Manca, O.; Nardinia, S. Electricity consumption forecasting in Italy using linear regression models. Energy
**2009**, 34, 1413–1421. [Google Scholar] [CrossRef] - Azadeh, A.; Khakestani, M.; Saberi, K. A flexible fuzzy regression algorithm for forecasting oil consumption estimation. Energy Policy
**2009**, 37, 5567–5579. [Google Scholar] [CrossRef] - Shakouri, H.; Nadimia, G.; Ghaderia, F. A hybrid TSK-FR model to study short-term variations of the electricity demand versus the temperature changes. Expert Syst. Appl.
**2008**, 36, 1765–1772. [Google Scholar] [CrossRef] - Padmakumari, K.; Mohandas, K.P.; Thiruvengadam, S. Long term distribution demand forecasting using neuro fuzzy computations. Int. J. Electr. Power Energy Syst.
**1999**, 21, 315–322. [Google Scholar] [CrossRef] - Azadeh, A.; Arab, R.; Behfard, S. An adaptive intelligent algorithm for forecastinglongtermgasoline demand estimation: The cases of USA, Canada, Japan, Kuwait and Iran. Expert Syst. Appl.
**2010**, 37, 7427–7437. [Google Scholar] [CrossRef] - Yokoyama, R.; Wakui, T.; Satake, R. Prediction of energy demands using neural network with model identification by global optimization. Energy Convers. Manag. Vol.
**2009**, 50, 319–327. [Google Scholar] [CrossRef] - Bansal, R.C.; Pandey, J.C. Load forecasting using artificial intelligence techniques: A literature survey. Int. J. Comput. Appl. Technol.
**2005**, 22, 109–119. [Google Scholar] [CrossRef] - Hahn, H.; Meyer-Nieberg, S.; Pickl, S. Electric load forecasting methods: Tools for decision making. Eur. J. Oper. Res.
**2009**, 199, 902–907. [Google Scholar] [CrossRef] - Suganthi, L.; Samuel, A. Energy models for demand forecasting: A review. Renew. Sustain. Energy Rev.
**2011**, 10, 281–311. [Google Scholar] - Chen, T. A collaborative fuzzy-neural approach for long-term load forecasting in Taiwan. Comput. Ind. Eng.
**2011**. [Google Scholar] [CrossRef] - Azadeh, A.; Asadzadeh, S.M.; Ghanbari, A. An adaptive network-based fuzzy inference system for short-term natural gas demand estimation: Uncertain and complex environments. Energy Policy
**2010**, 38, 1529–1536. [Google Scholar] [CrossRef] - Nosrati Maralloo, M.; Koushki, A.R.; Lucas, C.; Kalhor, A. Long Term Electrical Load Forecasting via a Neurofuzzy Model. In Proceedings of the 14th International CSI Computer Conference (CSICC), Tehran, Iran, 1–2 July 2009; pp. 35–40.
- Nells, O. Nonlinear System Identification; Springer: Berlin, Germany, 2001. [Google Scholar]
- Abdollahzade, M.; Mahjoob, M.; Zaringhalam, R.; Miranian, A. Locally linear neuro-fuzzy (LLNF) electricity price forecasting in deregulated power markets. Int. J. Innov. Comput. Inf. Control
**2010**, 6, 4203–4218. [Google Scholar] - Hodrick, R.J.; Prescott, E.C. Postwar U.S. business cycles: An empirical investigation. J. Money Credit Bank.
**1997**, 29, 1–16. [Google Scholar] [CrossRef] - Ravn, M.; Uhlig, H. On adjusting the Hodrick–Prescott filter for the frequency of observations. Rev. Econ. Stat.
**2002**, 84, 371–375. [Google Scholar] [CrossRef] - Mise, E.; Kim, T.H.; Newbold, P. On suboptimality of the Hodrick–Prescott filter at time series endpoints. J. Macroecon.
**2005**, 27, 53–67. [Google Scholar] [CrossRef] - Li, W.; Huicheng, Z. Urban water demand forecasting based on HP filter and fuzzy neural network. J. Hydroinform.
**2010**, 12, 172–184. [Google Scholar] [CrossRef] - Guyon, I.; Elisseeff, A. An introduction to variable and feature selection. J. Mach. Learn. Res.
**2003**, 3, 1157–1182. [Google Scholar] - Yoon, H.; Yang, K.; Shahabi, C. Feature subset selection and feature ranking for multivariate time series. IEEE Trans. Knowl. Data Eng.
**2005**, 17, 1186–1198. [Google Scholar] [CrossRef] - Peng, H.; Long, F.; Ding, C. Feature selection based on mutual information: Criteria of max-dependency, max-relevance, and min-redundancy. IEEE Trans. Pat. Anal. Mach. Intell.
**2005**, 27, 1226–1238. [Google Scholar] [CrossRef] - Scott, D.W. Multivariable Density Estimation: Theory, Practice, and Visualization; John Wiley: New York, NY, USA, 1992. [Google Scholar]

© 2012 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).

## Share and Cite

**MDPI and ACS Style**

Iranmanesh, H.; Abdollahzade, M.; Miranian, A.
Mid-Term Energy Demand Forecasting by Hybrid Neuro-Fuzzy Models. *Energies* **2012**, *5*, 1-21.
https://doi.org/10.3390/en5010001

**AMA Style**

Iranmanesh H, Abdollahzade M, Miranian A.
Mid-Term Energy Demand Forecasting by Hybrid Neuro-Fuzzy Models. *Energies*. 2012; 5(1):1-21.
https://doi.org/10.3390/en5010001

**Chicago/Turabian Style**

Iranmanesh, Hossein, Majid Abdollahzade, and Arash Miranian.
2012. "Mid-Term Energy Demand Forecasting by Hybrid Neuro-Fuzzy Models" *Energies* 5, no. 1: 1-21.
https://doi.org/10.3390/en5010001