Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

The rapid depletion of conventional energy sources and the ever-increasing demand for more energy coupled with the focus on environmental issues has encouraged intensive research into new sources of energy and clean fuel technologies that utilize the latest technology. Most renewable sources use wind, micro-hydro, tidal, geothermal, biomass and solar energy. This energy is then converted into electrical energy to be delivered either to the utility grid directly or to isolated loads. From ancient times, the human race has harnessed solar energy, radiant light and heat from the sun using a range of different technologies. Some modern solar energy technologies include solar heating, solar photovoltaic, solar thermal and solar architecture. These methods can have the potential to make a significant contribution to resolving the pressing energy problems that the world faces.

Photovoltaic (PV) systems and some other renewable energy systems (such as wind, tidal, waves, geothermal) are excellent choices in remote areas for low to medium power levels due to the easy scaling of the input power source (e.g. the use of solar inverters). The main attraction of the PV systems is that they produce electric power without harming the environment by directly transforming the free inexhaustible solar energy into electricity. Distributed grid-connected photovoltaics (PV) is playing an increasingly significant role as an electric supply resource and as an integral part of the electrical grid, due to the continual decrease in costs and the increase in their efficiency. Although inferior to other technologies in terms of installed capacity, PV is currently the most important Distributed Generation (DG) technology all over the world, due to financial support from the government (Timilsina et al. 2012; Yang 2010).

As is well known, electricity systems can benefit from the integration of small-scale PV-DG. For instance, since distributed generation produces electricity where needed, it helps reducing the electric load on transmission lines and the need for costly new lines associated with new power plants far from towns and cities. However, PV poses notable challenges to grid engineers, planners and operators.

Sometimes and especially when having high penetration of PV in parts of the distribution system dominated by residential end-users, the amount of power generated by the PV may exceed the total demand being served by a given part of the distribution system. In those circumstances, “excess” power can have a dramatic effect on the electric service voltage.

Another effect is known as “back-flow”. This entails the current flow from the “low voltage side” of electrical transformers (also known as the transformers’ secondary side) to the higher voltage side (also known as the transformers’ primary side). This challenge tends to be more common in parts of the distribution system that serve primarily residential end-users, because demand in those parts of the grid tend to be relatively low during the day (residents may be at work or school).

In this scenario the modeling of residential energy use and the planning of energy management actions can play a crucial role (Ciabattoni et al. 2013b). The pattern of electricity use for any individual domestic dwelling is highly dependent upon the activities of the occupants and their associated use of electrical appliances. In this chapter we present a high-resolution model of domestic electricity use, based upon a combination of patterns of active occupancy and daily activity profiles (typical appliances usage frequency and starting time). The model is built using a “bottom-up” approach, according to Richardson et al. (2010). The basic building block is the appliance, i.e. any individual domestic electric load. The model, managing the start of each appliance in the household through a fuzzy logic inference system, gives as output the 1 min resolution electricity usage pattern. All data necessary to build the fuzzy inference system are obtained from 2 weeks of measures through wireless smart plugs installed in the households appliances with an automatic procedure. Fuzzy sets and rules are determined with an automatic procedure analyzing sensors measures. In order to validate the model, electricity demand was recorded over the period of a year within 12 dwellings in the central east coast of Italy. A through quantitative comparison is made between the synthetic and measured data sets, showing them to have similar statistical characteristics.

The problem of household energy management has been discussed and a possible solution presented through neural network based forecasts of consumption and PV production used to inform and influence prosumers on the way they use electricity to increase the amount of self consumed energy.

The fuzzy model has been used for a case study on the proper sizing of a PV plant (Benghanem and Mellit 2010; Jakhrani et al. 2012; Jallouli and Krichen 2012; Kaabeche et al. 2011) in the central east region of Italy and the evaluation of Energy Management potential benefits based on a costs benefits analysis (CBA). The installation in a dwelling of all the devices necessary to actuate proper EM policies has a relatively high cost compared to that of a PV system (Di Giorgio et al. 2012; Sawyer et al. 2009). The focus of this analysis is to set an upper limit for the equipment cost in order to obtain real savings for a specific household through the CBA.

The chapter is organized as follows. An overview of the related works appears in the second section. A brief introduction on the fuzzy inference system modeling is reported in the third section. The structure of the model, a human interaction based classification of the appliances into different categories, a sample of the rule set, the National Instruments Labview software implementation details are reported in the fourth one. Model validation results are given in Section five, where the simulator output is compared with one year data sets recorded from 12 dwellings in the central east coast of Italy. In the sixth section energy management problem and neural network based forecasting algorithms for both photovoltaic production and home consumptions are described. In Section seven is presented the application of the FIS consumption simulator for the PV optimal sizing and energy management benefits evaluation in a case study.

2 Related Work

The analysis and identification of energy consumption pattern nowadays is receiving strong interest together with fault diagnosis of appliances components and there have been a large number of researches in this area (Ferracuti et al. 2013a, b; Ihbal et al. 2011; Zaidi et al. 2010; Zia et al. 2011).

Another related research field regards the forecast and simulation of households’ electricity consumption patterns, see, e.g., Azadeh et al. (2008), Barbato et al. (2011), Ciabattoni et al. (2013c), Gruber and Prodanovic (2012), Murata and Onoda (2002), Osman et al. (2009), Subbiah et al. (2013). Most of the existing models and analysis focus on data from specific geographic regions and try to explain the results in a local perspective (Guo et al. 2011; Suh et al. 2012).

Photovoltaic sizing is an important research field in this area but most of the works concern with the optimization of stand alone systems without an analysis of the demand response scenario for grid connected users, see e.g. Benghanem and Mellit (2010), Ciabattoni et al. (2013a), Jakhrani et al. (2012), Jallouli and Krichen (2012), Kaabeche et al. (2011). In this scenario only the knowledge of the typical demand pattern for each household will make possible the proper sizing of a photovoltaic plant, the design of demand response techniques and energy management actions. The pattern of electricity use for any individual domestic dwelling is highly dependent upon the activities of the occupants and their associated use of electrical appliances.

Energy usage models developed in literature e.g. in Bernard et al. (2011), Richardson et al. (2010) are configured using statistics describing mean total annual energy demand and associated power use characteristics of household appliances. Furthermore these modeling approaches (Bernard et al. 2011; Richardson et al. 2010; Widen et al. 2009) concern specific household energetic behavior without an easy customization capability. It is often impossible to add every appliance and predispose a “seasonal behavior” (Bernard et al. 2011), (Richardson et al. 2010) without using the flexibility of a fuzzy inference systems, as proposed in this work.

It is well known that overall cost-saving by distributed generation would only have a marginal impact if the demand pattern does not match with the production one and no actions of energy management are performed. In this scenario only the knowledge of the typical demand pattern and the forecast of the generation pattern for each household will make possible the design of proper demand response techniques and the planning of energy management actions. In this context energy management for residential consumers has become a significant research and development field for both electrical (Ciabattoni et al. 2013d) and thermal side (Giantomassi et al. 2014a, b), as a result of the advances in the electrical power grid technologies and the high penetration of solar, wind and other forms of Distributed Generation (DG) (Ciabattoni et al. 2012, 2013e; Cimini et al. 2013; Kanchev et al. 2011). Less attractive feed-in-tariffs for new installations of renewable energy DGs (solar, wind and geothermal plants) and incentives to promote self-consumption suggest that new operation modes should be explored in order to reach grid parity, which has been predicted to become a reality in the next years in the European Union (Fazeli et al. 2011; Kanchev et al. 2011; Palensky and Dietrich 2011; Zong et al. 2012). By increasing the self consumed local generated energy, the grid parity could be achieved earlier and DG of renewable energies will finally make economic sense becoming cheaper (over the lifetime of the system) than to buy it from utility (Aghaei and Alizadeh 2013; Lewis 2009; Lopez-Polo et al. 2012).

There are increasing numbers of studies on smart homes and the benefits of demand-side management (Di Giorgio et al. 2011; Shahgoshtasbi and Jamshidi 2011; Zeilinger 2011) and control and monitoring techniques to reduce overall energy usage Meyers et al. (2010).

3 Fuzzy Inference System

Fuzzy rule-based systems (FRBS) have been successfully employed for system modeling in many areas Azar (2010b). Existing fuzzy systems in the literature Azar (2010a, 2012) can be classified into three main categories: Mamdani, Takagi-Sugeno (T-S) and Tsukamoto systems based on their implemented fuzzy rule structures. Furthermore, depending on the intended application, the fuzzy modeling research field can be divided into two main approaches.

The first is the linguistic fuzzy modeling (LFM) where good human interpretability of the underlying fuzzy model is paramount for tasks such as knowledge mining and data analysis. This is usually achieved by adopting the Mamdani rule structure for knowledge representation.

The other is the precise fuzzy modeling (PFM) where T-S and Tsukamoto fuzzy rule structures are generally used in the learned fuzzy model to achieve high output accuracies for function approximation and regression-centric applications. Having good fuzzy rule-base interpretability and high modeling accuracy are contradictory requirements and one usually prevails over the other based on the modeling objective and fuzzy rule structure employed.

Generally, Mamdani fuzzy models are more interpretative than T-S fuzzy models from a human perspective and thus can better explain and describe a modeled system’s behaviors.

3.1 Fuzzy Modeling

The modeling of the appliance’s usage has been performed with a LFM approach to determine if wether or not it is going to be started. Since the aim of this work is to represent the household energetic behavior we choose Mamdani model, in order to give the best interpretability to the rules.

The usage pattern, depending on the appliance’s category, can be related to many variables, such as the number of active people in the house, the typical frequency of the appliance, the time of the day, the temperature. For example, when people are not at home, most appliances will not be used (only the so called continuous use appliances).

In daily appliance electricity profile, the occupants use virtually little power (stand by and fridge-freezer) during the night, may wake up and have breakfast, vacate the house during the morning and then return around mid-day for lunch, e.g. starting the microwave. In the evening, the meal is cooked, television is watched, lights are on, showers are taken, etc.

This typical pattern can drastically change during the weekend and holidays (when people can be in the house mostly during daytime) and, moreover, it can change from dwelling to dwelling due to different life styles. The main factors influencing occupancy pattern and appliances usage are: the number of occupants, the time the first person gets up in the morning and last person goes to sleep, the periods house is unoccupied during work days, holidays and weekends. When analyzing the households load profile we need information on the active occupants of the dwelling. To compute the overall occupancy pattern a specified model can be used, for instance that one developed by Richardson et al. (2008).

Starting from basic information in this chapter we build a 1 minute resolution daily active occupants pattern for each day of the week. To compute the number of the busy occupants a counter is used; this counter is increased every time an appliance that requires interaction with a person is switched on, and decreased every time it is switched off. The number of unoccupied people in the dwelling can be computed from the active occupants pattern and the current value of the busy occupants counter. Knowing this value for each time of the day, we can enable or interdict the switching on of the appliance.

A further important feature is to identify the typical frequency of each appliance’s starting for each household. This parameter is rarely a crisp value, e.g. “the washing machine starts usually from 2 to 3 times a week”, and often related to the time of the day, e.g. “the television starts some hours a day usually at night”. In this work all information regarding occupancy, appliances frequency and typical start time are taken with a brief interview. The former are used to build the active occupancy pattern and the latter to build fuzzy rules.

4 Appliances Fuzzy Inference System

The electricity consumption pattern model for any individual domestic dwelling is developed using a “bottom-up” approach, according to those proposed by Richardson et al. (2010). The basic block is the appliance, i.e. any individual domestic electric load. As it is well known, home appliances differ one from each other by size, functions, human interaction level, automation level.

4.1 Appliances Classification

In particular to build the fuzzy rules a load classification based on the human interaction has been used and four different groups found:

  • Continuous use appliances, characterized by a 24/7 use, not depending on factors like the time of the day and the number of active occupants of the dwelling (e.g. refrigerator).

  • Periodical use appliances without human interaction during the operation (e.g. washing machine, dishwasher, oven).

  • Periodical use appliances with human interaction during the operation (e.g. vacuum cleaner, iron).

  • Multimedia appliances and lighting, with a strongly intermittent use, directly related to the number of active occupants of the dwelling.

These 5 different categories of appliances have different fuzzy input-output variables. Input variables for the FIS inference are the time h(t) of the day, the percentage p(t) of unoccupied people in the dwelling and DT/T(t) that is the time elapsed since the last appliance start normalized on his period. The outputs of the FIS engine are the probability P(t) to start a certain appliance and the total time D(t) the appliance will be on. In particular Table 1 contains inputs and outputs for each category.

Table 1 Fuzzy input output variables for the different appliance’s categories

Another classification method considered is based on the automation level, in particular we can find:

  • Smart Appliances: loads for which consumption profile is available and it is possible to choose the start time (remotely or locally).

  • Controllable Loads: loads which are connected to smart plugs and can be remotely switched on/off without damage and degradation of consumer quality of experience.

  • Monitorable Loads: connected to smart plugs to monitor their consumptions; they can not be switched on/off.

  • Detectable Loads: the consumption of which can be estimated by performing the difference among the power measures provided by the smart meter and all the smart plugs and appliances, being them not smart appliances and not connected to smart plugs.

Due to the lack of smart appliances on the market it has been necessary to configure standard appliances into monitorable loads to extract their consumption profiles. On the same time if a user plans to use energy management actions controllable loads are necessaries. In particular the appliance remote start can be performed only for some of the so called “periodical use without human interaction”, due to their features.

4.2 Appliances Fuzzy Rules

The membership functions of the input variables (samples shown in Figs. 13) consist of triangular asymmetric and trapezoidal functions. The trapezoidal function is totally represented with four points, known also as fuzzy set: A = (a 1a 2a 3a 4). This representation is interpreted as membership functions:

$$\mu _{A} (x) = \left\{ {\begin{array}{*{20}l} {0,} & {x < a_{1} } \\ {\frac{{x - a_{1} }}{{a_{2} - a_{1} }},} & {a_{1} < x < a_{2} } \\ {1,} & {a_{2} < x < a_{3} } \\ {\frac{{a_{4} - x}}{{a_{4} - a_{3} }},} & {a_{3} < x < a_{4} } \\ {0,} & {x > a_{4} } \\ \end{array} } \right.$$
(1)

when a 2 = a 3, the triangular function can be considered as a particular case of the trapezoidal one. Table 2 shows the fuzzy sets for the input variables.

Table 2 Considered fuzzy sets for input variables

A sample of the fuzzy control rule base for a “Periodical use appliance without human interaction” (e.g. the dishwasher) is shown in Table 3; the Max-Min fuzzy inference algorithm is considered, (Bose 2011). The outputs of the FIS engine are the probability P(t) to start a certain appliance: (N) None, (VL) Very Low, (L) Low, (M) Medium, (H) High, (VH) Very High and the total time D(t) the appliance will be on: (VL) Very Low, (L) Low, (M) Medium, (H) High, (VH) Very High. Output membership functions, shown as example in Fig. 4, consist of sigmoid functions with different values for each appliance category.

Table 3 Dishwasher FIS sample

Concerning the defuzzyfication we use the modified Center of Area defuzzyfication method since the centroid method evaluates the area under the scaled membership functions only within the range of the output linguistic variable and the resulting crisp output values could not span the full range. The fuzzy logic controller uses the following equation to calculate the geometric center of the full area under the scaled membership functions:

$${\text{mCoA = }}\frac{{\int {\text{f(x)}} \cdot {\text{xdx}}}}{{\int {\text{f(x)dx}}}}$$
(2)

where mCoA is the modified center of area. The interval of integration is between the minimum membership function value and the maximum membership function value. Note that this interval might extend beyond the range of the output variable.

Fig. 1
figure 1

Membership function of the input variable h(t). The x-axis is the time of the day in minutes

Fig. 2
figure 2

Membership function of the input variable p(t). The x-axis is the percentage of occupancy of the dwelling

Fig. 3
figure 3

Membership function of the input variable DT/T(t). The x-axis is the ratio between the time elapsed since the last start and the average starting period

Fig. 4
figure 4

Membership function of the output variable P(t). The x-axis is the probability to start an appliance

4.3 Model Implementation

The aim of the simulation tests is to evaluate the potentialities of an energy management technique applied for different households, in order to evaluate the economic benefits users can obtain.

The model has been realized using LabVIEW, the graphical programming environment of National Instruments. In particular the FIS has been realized using the LabVIEW fuzzy toolkit while the input-output membership functions and the rule set with the fuzzy system designer. As the simulator is not time driven when a simulation runs one-min resolution electricity demand data can be generated for a specified time period using two nested FOR loops (the outer for the days of the year and the inner for the minutes of each day) as shown in Fig. 5.

Fig. 5
figure 5

Structure of the LabVIEW simulator

Each single appliance block, implemented as a functional global variable, is in the inner loop and runs in two phases. During the first iteration of the simulation all the configuration parameters are loaded, e.g. the fuzzy rule set of the appliance, the consumption profile, the maximum power, the typical starting frequency, number of people typically interacting with the appliance (all the mentioned parameters are fully editable in text files and fuzzy rules through LabVIEW graphical interface).

After the first iteration the likelihood an appliance will start within the next minute is evaluated with a time resolution of one-minute (except for the so called “Continuous use appliances”). In particular, since the FIS output is a probability value, to manage the start of an appliance this value is multiplied by a calibration factor (equal to the difference in hours between the average period of use of the appliance and the time elapsed since the last start), as stated in Richardson et al. (2010). The result is then compared with a random number (within the real interval 0–1). The appliance will start if:

  • this number is less than the scaled probability

  • there is at least one person in the house

  • there are sufficient active people in the house (only for some appliance’s categories)

  • the sum between the current electrical consumption and the max power of the appliance is less than the power the customer can absorb from the grid.

Table 1 shows the need of taking into account also the number of active people in the dwelling for “Periodical use appliances with human interaction” and “Multimedia Appliances”. Starting from the typical pattern of people in the household we decrement this number when an appliance of one of these categories starts and increment this number when the appliance is turned off.

To simulate EM actions, fuzzy rules have been modified to approximate a different user behavior regarding the starting time of the two main shiftable appliances (dishwasher and washing machine). As an example, without any action, fuzzy input sets for “periodical use appliances without human interaction” are:

  • the time of the day h(t)

  • the time elapsed since the last appliance start multiplied his typical start frequency DT/T(t)

and a typical rule formulation is:

if h(t) is afternoon and DT/T(t) is late, then the probability to start the appliance is low.

In the following section we will describe tests performed to validate the model.

5 Model Validation

We validated the model collecting a set of consumption data from 12 volunteer dwellings in and around the town of Ripatransone in the province of Ascoli Piceno, Italy. All people in these households have been briefly interviewed to build occupancy patterns and fuzzy rule sets starting from their typical energy habits. A set of data loggers were installed in the dwellings and configured to record demand at 1 min intervals. An example 24 h demand profile for a single dwelling taken from the measured data set is shown in Fig. 6. In order to create a consumption database we installed in four of these dwellings individual appliance monitors (IAMs from Current Cost company) to extract 6 s resolution consumption data of every household monitorable load (e.g. washing machine, dishwasher, multimedia appliances, iron, oven, microwave). For the remaining 8 dwellings, appliances were not directly monitored, but the profiles were used choosing for each appliance the most similar profile in the database (e.g. same brand for the dishwasher, same size for the TV or the laptop battery charger).

Fig. 6
figure 6

min Resolution consumption for one of the considered households in Ripatransone (AP), Italy on a spring day (March 12 2012). One the x-axis are represented the minutes in a day

It is important to emphasize that the differences between single appliance blocks for the different dwellings are taken into account changing the fuzzy rules, the occupancy profile and using different consumption patterns from the database (according to the different appliances).

The final aim of this simulation tool is the prediction of the human behavior (e.g. the starting of an appliance within 1 h of its real start) especially during daylight periods, in order to give a good method to correctly design a PV plant and evaluate Energy Management actions benefits.

Consequently the purpose of the following validation is to show that the measured and simulated data have similar statistics and differ only for limited quantities. To this end, the model was used to create synthetic data for 12 dwellings covering a full year at 1 min resolution.

Table 4 reports the RMS error, the standard deviation and the RMS% error of measured and simulated values for all 12 dwellings. These values are computed for different time scales, showing a good modeling performance in particular for what regards the daytime period, our main focus to compute the self consumption percentage. Indeed the RMSE% calculated from 9 a.m. to 5 p.m. in the whole year for the 12 dwellings is 8.02 %, showing a good capability of the simulator to model the human behavior during the day.

Table 4 Model validation results. percentage mean error, RMSE, SD and RMSE% between the simulated and measured values

Figure 7 shows a 1 min data comparison between the simulator output and the measured values for one day and one dwelling.

Fig. 7
figure 7

March 23 2012. 1 min resolution data for one of the considered households in Ripatransone (AP), Italy. The dotted blue line is the simulation load profile, the red continuous line is the measured one

Figure 8 shows a comparison between the daily energy simulated and measured during an entire month.

Fig. 8
figure 8

March 2012. Daily data for one of the considered households in Ripatransone (AP), Italy. Blue bars are the simulated values, red bars are the measured ones

In the following section a description of the energy management problem and a set of solution will be presented.

6 Energy Management Techniques

The installation of a PV plant can have a great impact on the energy behavior of users. They can use an energy manager, forecasting tools or simply plan to start appliances according to weather forecast. The energy management problem can be expressed as the minimization of a cost function X, given a certain number of electrical tasks N TASKS (e.g. the appliance starts) to arrange in N TIME time samples:

$$\hbox{min} \,x = \sum\limits_{k = 1}^{{N_{TASKS} }} \sum\limits_{i = 0}^{{N_{TIME} }} \omega_{k} (i) \cdot L_{k} (i) \cdot C_{k} (i)$$
(3)

where ω k (i) express if wether or not a task is running at time i, C k (i) is the energy cost at time i, as computed in 6, L k (i) is the energy consumed by the task in the time interval i. In particular this minimization problem is subject to the following constrains considering the total power absorbed at each time and the absence of interruptions for each task:

$$\forall \,\overline{i} \; \to \;\sum\limits_{k} \omega_{k} (\overline{i} ) \cdot L_{k} (\overline{i} ) \le P_{\hbox{max} }$$
(4)
$$\forall \,\overline{k} \; \to \;\omega_{{\overline{k} }} (i) = 1\;,\;\quad\forall\, i:T^{start} < i < T^{end}$$
(5)
$$C_{{\bar{k}}} (\bar{i}) = \left\{ {\begin{array}{*{20}l} {R(\bar{i})} & {if\;\sum\nolimits_{{k \ne \bar{k}}} {\omega_{k} } (\bar{i})\cdot L_{k} (\bar{i}) > P_{PV} } \\ 0 & {if\;\sum\nolimits_{{k \ne \bar{k}}} {\omega_{k} } (\bar{i})\cdot L_{k} (\bar{i}) \le P_{PV} } \\ \end{array} } \right.$$
(6)

In the energy management problem considered in this work we use only two shiftable tasks: the dishwasher and the washing machine. For these tasks ω k (i) can be set to 1 according to a forecasting policy.

In particular since in this model we represent the typical user behavior, for what regards the starting of one of these two tasks we need to consider the best time to start the appliance according to user needs (the maximum end cycle time of the appliance has to be fixed by the user) and the optimization of the cost function.

To model the user behavior a new input DX(t) is added in the model, representing the time distance from the best time to start an appliance.

According to this new input, the same rule discussed above will change:

if h(t) is afternoon and DT/T(t) is late and DX(t) is very low, then the probability to start the appliance is very high.

6.1 Prediction Algorithms

Valid and reliable forecast information on the expected PV power production and home consumptions play a primary role for the design of an energy management system and to find the best time to start an appliance.

The following approach to implement a Minimal Resource Allocating Network (MRAN) is based on a sequential learning algorithm and an Extended Kalman Filter (EKF) Kadirkamanathan and Niranjan (1993), Platt (1991), Sundararajan et al. (2002). In particular the sequential learning algorithm adds and removes neurons on-line to the network according to a given criterion (Platt 1991), (Sundararajan et al. 2002; Yingwei et al. 1998), and an EKF is used to update the net parameters (Kadirkamanathan and Niranjan 1993).

6.1.1 Radial Basis Function Neural Network

A RBFN with input pattern \({\varvec{x}} \in {\mathbb{R}}^{m}\) and a scalar output \(\hat{y} \in {\mathbb{R}}\) implements a mapping \(f:{\mathbb{R}}^{m} \to {\mathbb{R}}\) according to

$$\hat{y} = f({\varvec{x}}) = \lambda_{0} + \sum\limits_{i = 1}^{K} \lambda_{i} \phi \left( {\left\| {{\varvec{x}} - {\varvec{c}}_{i} } \right\|} \right)$$
(7)

where ϕ( · ) is a given function from \({\mathbb{R}}^{ + }\) to \({\mathbb{R}}\), \({\parallel } \cdot {\parallel }\) denotes the Euclidean norm, λ i , i = 0, 1,…, K are the weight parameters, \({\varvec{c}}_{i} \in {\mathbb{R}}^{m}\), i = 1, 2, …, K, are the radial basis function centers (called also units or neurons) and K is the number of centers Chen et al. (1991). The terms:

$$o_{i} = \lambda_{i} \phi \left( {\left\| {{\varvec{x}} - {\varvec{c}}_{i} } \right\|} \right),\quad{\kern 1pt} i = 1, \ldots ,K$$
(8)

are called the hidden unit outputs.

In this work the RBFN is used for the prediction of the output of a dynamical system and the system dynamics can be taken into account through the network input pattern x, that must be composed of a proper set of system input and output samples acquired in a finite set of past time instants Hunt et al. (1992), i.e. \({\varvec{x}} \in {\mathbb{R}}^{{n_{y} + n_{u} }}\) and it is defined as:

$${\varvec{x}}(n) = [y(n - 1), \ldots ,y(n - n_{y} ),u(n - 1), \ldots ,u(n - n_{u} )]^{T}$$
(9)

where n = 1,2,… are the time instants, y(·) and u(·) are the system output and inputs (for a detailed description see Sect. 6.2), respectively; n y , n u are the lags of the output and input, respectively.

Theoretical investigation and practical results show that the choice of the non-linearity ϕ(·), a function of the distance d i between the current input x and the centre \({\varvec{c}}_{i}\), does not significantly influence the performance of the RBFN Chen et al. (1991). Therefore, the following gaussian function is considered:

$$\phi (d_{i} ) = \exp \left( { - d_{i}^{2} /\beta_{i}^{2} } \right), \quad i = 1,2, \ldots ,K$$
(10)

where \(d_{i} = \left\| {{\varvec{x}} - {\varvec{c}}_{i} } \right\|\) and the real constant β i is a scaling or “width” parameter (Chen et al. 1991).

6.1.1.1 Minimal Resource Allocating Network Algorithm

The learning process of MRAN involves allocation of new hidden units and a pruning strategy as well as adaptation of network parameters (Kadirkamanathan and Niranjan 1993; Platt 1991; Sundararajan et al. 2002). The network starts with no hidden units and as input-output data \(({\varvec{x}}( \cdot ),y( \cdot ))\) are received, some of them are used to generate new hidden units based on a suitably defined growth criteria. In particular at each time instant n the following three conditions are evaluated to decide if the input \(\varvec{x}(n)\) should give rise to a new hidden unit:

$$\left\| {e(n)} \right\| = \left\| {y(n) - f({\varvec{x}}(n))} \right\| > E_{1}$$
(11)
$$e_{rms} (n) = \sqrt {\sum\limits_{j = n - (M - 1)}^{n} \frac{{e(j)^{2} }}{M}} > E_{2}$$
(12)
$$d(n) = \left\| {{\varvec{x}}(n) - {\varvec{c}}_{r} (n)} \right\| > E_{3}$$
(13)

where \({\varvec{c}}_{r} (n)\) is the centre of the hidden unit that is nearest to \(\varvec{x}(n)\) and M represents the number of past network outputs for calculating the output error e rms (n). The terms E 1, E 2 and E 3 are thresholds to be suitably selected. As stated in Sundararajan et al. (2002), Yingwei et al. (1998) these three conditions evaluate the novelty in the data. If all the criteria of relations (11)–(13) are satisfied, a new hidden unit is added and the following parameters are associated with it:

$$\lambda_{K + 1} = e(n)$$
(14)
$${\mathbf{c}}_{K + 1} = \varvec{x}(n)$$
(15)
$$\beta_{K + 1} = \alpha \left\| {\varvec{x}(n) - {\mathbf{c}}_{r} (n)} \right\|$$
(16)

where α determines the overlap of the response of a hidden unit in the input space as specified in Kadirkamanathan and Niranjan (1993), Sundararajan et al. (2002). If the observation \((\varvec{x}(n),y(n))\) does not satisfy the criteria of relations (11)–(13), an EKF is used to update the following parameters of the network:

$$\varvec{w} = \left[ {\lambda_{0} ,\lambda_{1} ,\varvec{c}_{1}^{T} ,\beta_{1} , \ldots ,\lambda_{N} ,\varvec{c}_{N}^{T} ,\beta_{N} } \right]^{T} .$$
(17)

The update equation is given by:

$$\varvec{w}(n) = \varvec{w}(n - 1) + \varvec{k}(n)e(n)$$
(18)

where the gain vector \(\varvec{k}(n)\) is expressed by:

$$\varvec{k}(n) = \varvec{P}(n - 1){\mathbf{a}}(n)\left[ {r(n) + {\mathbf{a}}^{T} (n)\varvec{P}(n - 1){\mathbf{a}}(n)} \right]^{ - 1}$$
(19)

with \({\mathbf{a}}(n)\) the gradient vector of the function \(f(\varvec{x}(n))\) with respect to the parameter vector \(\varvec{w}(n - 1)\) Kadirkamanathan and Niranjan (1993), Sundararajan et al. (2002), r(n) is the variance of the measurement noise and \(\varvec{P}(n - 1)\) is the error covariance matrix which is updated by:

$$\varvec{P}(n) = \left[ {I - \varvec{k}(n){\mathbf{a}}^{T} (n)} \right]\varvec{P}(n - 1) + \varvec{Q}(n - 1)$$
(20)

where \(\varvec{Q}(n - 1)\) is introduced to avoid that the rapid convergence of the EKF algorithm prevents the model from adapting to future data Kadirkamanathan and Niranjan (1993), Sundararajan et al. (2002). The z × z matrix \(\varvec{P}(n)\) is positive definite symmetric and z is the number of parameters to be adjusted. When a new hidden neuron is allocated, the dimension of \(\varvec{P}(n)\) increases to:

$$\varvec{P}(n) = \left( {\begin{array}{*{20}c} {\varvec{P}(n - 1)} & 0 \\ 0 & {p_{0} I_{{z_{1} \times z_{1} }} } \\ \end{array} } \right)$$
(21)

where p 0 is an estimate of the uncertainty in the initial values assigned to the parameters and z 1 is the number of new parameters introduced by adding the new hidden neuron. As stated in Sundararajan et al. (2002), Yingwei et al. (1998) to keep the RBF network in a minimal size a pruning strategy removes those hidden units that contribute little to the overall network output over a number of consecutive observations. To carry out this pruning strategy, for every observation \((\varvec{x}(n),y(n))\) the hidden unit outputs are computed:

$$o_{i} (n) = \lambda_{i} \phi \left( {\left\| {\varvec{x}(n) - \varvec{c}_{i} } \right\|} \right),\quad{\kern 1pt} i = 1, \ldots ,K$$
(22)

and normalized with respect to the highest output:

$$\overline{o}_{i} (n) = \frac{{o_{i} (n)}}{{\hbox{max} \{ o_{i} (n)\} }},\quad{\kern 1pt} i = 1, \ldots ,K$$
(23)

The hidden units for which the normalized output (23) is less than a threshold δ for ξ consecutive observations are removed and the dimensionality of all the related matrices are adjusted to suit the reduced network (Sundararajan et al. 2002; Yingwei et al. (1998).

The EKF has been implemented with the assumption that \(\varvec{Q}(n) = I_{n,n} \sigma_{\eta }^{2}\) and r(n) = σ 2 v .

The MRAN prediction algorithm Sundararajan et al. (2002), Yingwei et al. (1998), with the EKF, here called MRANEKF algorithm, is shown in Fig. 9 and it is summarized as follow:

Fig. 9
figure 9

Flow chart of the MRANEKF algorithm

Fig. 10
figure 10

Input Output structure of the PV production forecast neural network

  1. 1.

    For each observation \((\varvec{x}(n),y(n))\) do: compute the overall network output: \(\hat{y}(n) = f(\varvec{x}(n)) = \lambda_{0} + \sum\nolimits_{i = 1}^{K} \lambda_{i} \phi \left( {\left\| {\varvec{x}(n) - \varvec{c}_{i} } \right\|} \right)\) where K is the number of hidden units;

  2. 2.

    Calculate the parameters required by the growth criterion:

    • \(\left\| {e(n)} \right\| = \left\| {y(n) - f(\varvec{x}(n))} \right\|\)

    • \(e_{rms} (n) = \sqrt {\sum\limits_{j = n - (M - 1)}^{n} \frac{{e(j)^{2} }}{M}}\)

    • \(d(n) = \left\| {\varvec{x}(n) - \varvec{c}_{r} (n)} \right\|\)

  3. 3.

    Apply the criterion for adding a new hidden unit:

    if

    e(n)‖ > E 1 and e rms (n) > E 2 and d(n) > E 3 allocate a new hidden unit K + 1 with:

    • λ K+1 = e(n)

    • \(\varvec{c}_{K + 1} = \varvec{x}(n)\)

    • \(\beta_{K + 1} = \alpha \left\| {\varvec{x}(n) - \varvec{c}_{r} (n)} \right\|\)

    else

    • tune the network parameters:

      $$\varvec{w}(n) = \varvec{w}(n - 1) + \varvec{k}(n)e(n)$$
    • update the error covariance matrix:

      $$\varvec{P}(n) = \left[ {I - \varvec{k}(n){\mathbf{a}}^{T} (n)} \right]\varvec{P}(n - 1) + \varvec{Q}(n - 1)$$

    end

  4. 4.

    Check the criterion to prune hidden units:

    • compute the hidden unit outputs:

      $$o_{i} (n) = \lambda_{i} \phi \left( {\left\| {\varvec{x}(n) - \varvec{c}_{i} } \right\|} \right),{\kern 1pt} i = 1, \ldots ,K$$
    • compute the normalized outputs:

      $$\overline{o}_{i} (n) = \frac{{o_{i} (n)}}{{\hbox{max} \{ o_{i} (n)\} }},{\kern 1pt} i = 1, \ldots ,K$$
    • if \(\overline{o}_{i} ( \cdot ) < \delta\) for ξ consecutive observations than prune the ith hidden unit and reduce the dimensionality of the related matrices

    end

  5. 5.

    n = n + 1 and go to step 1.

6.2 Prediction Algorithm Results

Forecast algorithms performance have been evaluated through real experimental tests based on data acquired from March 2012 to August 2012. In particular the 3 houses with 3.3 KWp PV plant considered, are located in Ripatransone (AP), Italy. The MRANEKF learning algorithm starts with a pre-trained net based only on few information found on the web, such as power production profile of clear sky days and cloudy days for the specified location Pvg (2011), panel orientation and tilting and typical electrical load profile of a house. This is a common operating condition, when no sensors and measures are available before the forecast begins.

The inputs of the production forecasting network, as shown in Fig. 10, are:

  • the day of the year (from 1 to 365)

  • the hour of the day (considered from 0 to 24)

  • the ambient temperature (in Kelvin)

  • the sky clearness index (a coefficient ranging from 0 to 10 mapping the website forecast, e.g. “clear and sunny” is 10 while “clouds and heavy rain” is 0)

  • the wind speed (in m/s)

Fig. 11
figure 11

Input-output structure of the load forecast network

The input pattern of the consumption forecasting net, as shown in Fig. 11, consists of:

  • the day of the week (e.g. Monday is day 1, Tuesday is day 2)

  • the hour of the day (considered from 0 to 24)

  • the consumptions measured the day before and the week before at the same time (in Watt, excluding the consumption profile of the shiftable loads)

  • the consumptions measured the hour before (excluding the consumption profile of the shiftable loads). Notice that if the prediction horizon is greater than 2 h, there are no available measures and this input will be the forecasted consumption.

  • the consumption measured the day before one hour before the considered time (excluding the consumption profile of the shiftable loads)

To measure the performance of the proposed algorithm, the normalized Root Mean Square of the Error e(·) (RMSE), its Standard Deviation (SD) and the percentage RMSE have been calculated and summarized in Table 5. The set of experimental data is composed of 4,000 pairs of input and output samples. Data have been also normalized, between 0 and 1, in order to have the same range. Figures 12 and 13 show a sample of electrical consumptions and PV production forecasts respectively, considering different time horizons.

The whiteness test on the prediction errors e(·) (residuals) has been also used for network validation Ljung (1999). The whiteness of residuals is usually evaluated by computing the sample covariances

$$\hat{R}_{e}^{N} (\tau ) = \frac{1}{N}\sum\limits_{n = 1}^{N} e(n)e(n + \tau )$$
(24)

with τ = 1,…,P.

If e( · ) is a white-noise sequence, then the quantity

$$\zeta_{N,P} = \frac{N}{{(\hat{R}_{e}^{N} (0))^{2} }}\sum\limits_{\tau = 1}^{P} (\hat{R}_{e}^{N} (\tau ))^{2}$$
(25)

will have, asymptotically, a chi-square distribution χ 2(P) (Ljung 1999). The independence between residuals can be verified by testing whether ζ N,P  < χ 2 α (P), the α level of the χ 2(P)-distribution, for a significant choice of α.

6.3 Load Manager Algorithm

The core of the proposed energy management solution is the load manager that analyzes the information of the predictor, the decision of the user and monitor periodically consumption and production to make the intelligent scheduling of the appliances and to give correct information to the users.

In the scheduling of the loads, two aspects should be considered: the first is to reduce the energy payment of the users; the other is to let the user choose the end time of some critical appliance’s cycle. It is clear that these two objectives may be conflicting in some scenarios. In the proposed approach, we consider both question.

Fig. 12
figure 12

The continuous red line is the measured consumption, the dashed blue line is the 3 h ahead forecast, the dotted purple line and green line are respectively the 8 and 18 h ahead forecast

Table 5 RMSE and percentage error between electrical consumption and PV production predicted and measured for the 3 considered houses

In the Italian scenario to minimize energy payment it’s necessary to maximize PV production self-consumption, often shifting the start time of some appliances. Users should be informed about instantaneous and forecasted energy consumption and production to make the right decisions. Due to the occupancy profile of the dwellings during working hours, this policy can’t easily be adopted and it is necessary the remote start of some appliances, under user defined parameters (type of appliance to start, maximum end time, cycle time).

The algorithm used to plan the better time to start an appliance is based on: price of energy P(k), production and consumption forecasted each 30 min P PV (k) and C 0(k), feed-in tariffs δ (for PV plants installed before July 2013), appliance energy consumption each 30 min C 1(k), end time of the cycle H and cycle time J. Electricity prices are assumed to take two levels, corresponding to peak and off-peak hours (the typical Italian scenario). During the peak period, from 8:00 a.m. to 7:00 p.m., from Monday to Friday (for the typical domestic contract) electricity costs 0.23 eur/kWh, and at all other times it costs 0.21 eur/kWh (these are actual rates from Enel time-of-use pricing model in Italy). In absence of a PV plant and without a specified end time, customers will reach the major economical benefits starting appliances when P(k) has the minimum value P min in peak off periods, paying

$$X^{*} = C_{1} (k + i - 1)*P_{\min} ,i = 1, \ldots ,J$$
(26)
Fig. 13
figure 13

The continuous red line is the measured PV production, the dashed blue line is the 3 h ahead MRANEKF network forecast, the dotted purple line and green line are respectively the 8 and 18 h ahead forecast

This will be the reference value that the algorithm has to improve taking into account that the self-consumption reduces the feed in tariff of δ (production and consumptions are in [KWh], while prices and feed in tariffs in [eur/KWh]). When the user plan to start an appliance with end time H, the algorithm used to minimize the price of the appliance cycle and find the best hour to start it is summarized as follows:

  • min = X *;

  • for k = 1, …, H − J

  • X(k) = 0;

  • for i = 1, …, J

  • if P PV (k + i − 1) − C 0(k + i − 1) − C 1(k + i − 1) < 0

  • X(k) = X(k) + (P PV (k + i − 1) − C 0 (k + i − 1) − C 1 (k + i − 1)) * P (k) + C 1 (k + i − 1) * δ

  • else X(k) = X(k) + C 1(k + i − 1) * δ

  • end; end;

  • if X(k) < min

  • min = X(k); hour = k * 2;

  • end; end

In the following section we will examine a case study on the proper sizing of a PV plant together with an economic evaluation of energy management benefits.

7 Photovoltaic Plant Sizing: A Case Study

Due to the random nature of solar energy, great effort must be made to design PV systems that optimize energy savings, self consumption and costs. In this section we propose a PV sizing case study in the Italian scenario using the consumption pattern of one of the previously considered household with an annual electrical consumption of 2,300 KWh.

The key of the proposed sizing method is the self consumption percentage, computed by the simulation tool. In Italy the government took the decision to cut PV incentives on June 2013, instead of 2016 as previously expected. An example on how PV incentives varied for a building integrated 3 kWp plant since their introduction in 2005 is shown in Fig. 14.

Fig. 14
figure 14

Year 2005–2013. Evolution of the Italian FITs, according to the Ministerial Decrees, for a 3 kWp building integrated PV plant

To provide support to PV industry a new net metering scheme has been amended Regulatory Authority for Electricity and Gas (2013) and came into effect on 1st January 2013. Under this decree PV system owners can get credits for the value of the excess of electricity fed into the grid over a time period. Further encouraging self-consumption, the Italian Revenue Agency introduced tax breaks for off-grid PV systems installed on buildings.

A 3 year historical solar irradiance data set is used to calculate the output of a varying size PV plant (1–3.5 kWp) and compared with the consumption pattern computed by the simulator in order to obtain the self consumption percentage for each considered PV plant size. A financial evaluation technique is used to compare the different investments under the revised Italian net metering scheme known as “scambio sul posto” in which GSE pays a contribution E t to the customer equal to:

$$E_{t} = C_{t} \cdot \hbox{min} (F_{t} ,W_{t} )$$
(27)

where F t and W t are respectively the injected and withdrawn electricity in KWh and C t represents a coefficient comprehensive of the electricity cost and net services cost in eur/KWh. For the global cost of the PV plant, an average of the main solar installer prices in the considered area has been considered.

7.1 Economical Analysis

The cost-benefit analysis (CBA) is a financial valuation technique used to predict the effects of a project, a program or an investment, verifying its benefits. CBA, as an alternative to traditional methods of economic analysis, represents also a method of ex-ante evaluation by external parties that have to decide on the financial viability of an investment or have to choose how to allocate scarce financial resources among different possible investments.

To evaluate the economic convenience of PV systems on the considered building we carried out the CBA of different sizes of PV plants to choose the best one. The discounted cash flows generated from each investment have been calculated for 20 years, equal to the period in which PV module producers guarantee at least 80 % of their initial performance. The net present value (NPV), calculated for each PV plant size, is:

$$NPV = \sum\limits_{t = 0}^{K} \frac{{C_{t} }}{{(1 + r)^{t} }}$$
(28)

where C t is the cash flow at time t, r the discount rate (equal to 5 % in our case) and K the considered lifetime of the investment. The cash flow C t is the difference between the discounted annual cash inflows I t and outflows O t . In particular I t consists of the annual directly saved energy by self consumption (considering a 3 % annual increase of the unitary energy price), the net metering contribution E t and government contributions (50 % of the plant cost in taxes deduction for the first 10 years).

O t consists instead of the initial cost of the plant (we consider an investment made only with own capital) and the annual maintenance costs (0.5 % of the initial cost per year). Considering that NPV calculation strongly depends on the used reference discount rate r used (for which the same investment may be convenient or less in relation to its value) it is useful to consider as financial indicator also the IRR (internal rate of return), calculated as the rate r * for which results:

$$NPV(r^{*} ) = 0$$
(29)

Table 6 reports the unitary costs (Cost), the self consumption percentages of two simulated scenarios (user performing EM actions and user maintaining the same behavior) and CBA results for different PV plant sizes in the analyzed case study.

Table 6 Unitary costs, self consumption percentages (SC) and CBA results (NPV and IRR) for the considered case study with and without energy management actions

Figure 15 shows the trend of NPV and IRR depending on the PV plant size when a user do not perform any EM action. The values of NPV, which range between 790 and 2,070 €, IRR, between 6.89 and 9.71 %, show better results for a 2.25 KWp plant. In particular revenues decrease from 2,070 to 1,360 € with a 3 KWp plant and IRR decrease of 2 %, emphasizing the need of the correct sizing of the plant.

Fig. 15
figure 15

Results of the cost benefits analysis. NPV (blue line) and IRR (red line) for the different sizes of PV plants computed when a user performs EM actions (squared markers) or maintains the same energy behavior (triangular markers)

We have furthermore analyzed the situation in which the user performs basic EM actions (starting the 2 main shiftable appliances around the peak production hours of each day, according to the results provided by the energy management algorithms presented).

8 Conclusions

In recent years (2005–2013), the whole Europe has highlighted a rapid growth of the photovoltaic sector, after the introduction of economical incentives by governments.

In this context, due to higher feed in tariffs, the expansion involved mainly PV systems on buildings. This situation poses notable issues since demand tend to be relatively low during peak power production periods. On the same time a new PV installation needs aa accurate sizing to smooth the so called “back-flow” effect and maximize economical benefits to owners.

In this scenario the modeling of residential energy use and the planning of energy management actions can play a crucial role. Indeed the matching of the production and consumption patterns is the only way to achieve satisfying economical benefits.

This chapter deals with the description of a novel Fuzzy approach to model household electrical consumption. The model is built using a “bottom-up” approach and the basic block is the single appliance. Using as inputs patterns of active occupancy (i.e. when people are at home and awake) and typical domestic habits (i.e. start frequency of some appliances), the FIS model give as output the starting probability of each appliance. To validate the model we have recorded electricity demand within 12 dwellings in Ripatransone (AP), in the central east coast of Italy, over the period of 12 months. Simulation performances, in particular for what regards daytime period (the mean error is 0.52 %), make possible its use for self consumption estimation and PV sizing.

Energy management problem has been introduced and a neural network based algorithm to forecasts of both photovoltaic production and home consumptions presented. The considered algorithm, based on the minimal resource allocating networks method, is used to perform long range predictions. In particular the power production and home consumptions presented in the above tests is forecasted up to 24 h ahead. The proposed algorithm performs an on-line prediction and no previous measures of PV plant’s production or electrical consumptions are needed. Therefore the algorithm have been proposed with a pre-trained net based only on few historical informations found on the web.

A case study on a possible use of the fuzzy tool has been presented. Starting from the simulated consumption of a dwelling, a residential photovoltaic (PV) plant has been sized according to a cost benefits analysis (CBA) in the new Italian scenario. Net present value (NPV) and internal rate of return (IRR) have been computed for different PV plant sizes. The obtained results show that the NPV difference between the best and worst case can be 140 % (which results in more than 1,200 €). Furthermore a parallel analysis of the economical benefits of energy management actions (shifting of the two main appliances) has been performed. The CBA analysis shows that revenues can further increase from 250 to 600 € (depending on the plant size) thus imposing cost limitation for the EM equipment.