2. Implemented model philosophy

The interaction between the HS elements described in Section 4 is done through a developed model predictive control (MPC) algorithm. In consequence, the development of a wind and solar radiation forecast algorithm, alongside the modeling of the different implemented generation devices, is presented.

#### 2.1. Forecast model

Energy forecasting is particularly meaningful when considering wind power because of dispatch planning and market operations [11]; the focus in this chapter is dispatch planning.

There are two approaches for wind speed forecasting, namely, weather-based and time seriesbased approaches. While the former uses hydrodynamic atmospheric models which incorporate physical phenomena such as frictional, thermal, and convective effects, the latter uses only historical wind speed data recorded at the site to build statistical models from which forecasts are derived [12].

The sample data used for the forecast was a 3-month data with a 10-min resolution (12,960 measurements) from a 1-year data recollected from Mexico City; the complete study was made for a whole year. Even though the collected measurement data covers a year, in this study only the first week of results was shown so the reader can truthfully see the behavior of the hybrid system and the output power in a clear way.

#### 2.1.1. Autoregressive (AR) model

most developed technologies, and, in both, intermittence is the major issue to attend for

Studies concerning non-dispatchable generation combined with storage which focus on isolated networks are [1–3] where a DC configuration is proposed for the renewable energy integration and storage is implemented to increase the use of wind power and reduce the operation of backup systems. For stand-alone systems employing two or more technologies to generate electricity is common. Another way to deal with intermittence is by combining the wind power with forecast, which leads to focusing on ways to accurately plan how to use the generated power and how to participate in market regulation [4, 5]. The wind power uncertainty has been another research topic as in [6] where wind power forecasting uncertainty is investigated in the unit commitment. The study of levelized costs of grid-connected wind turbines with ESD [7, 8] or renewable sources implemented as DG [9], as well as the analysis of the wind energy in Germany [10], is an example of the many studies in the implementation of renewable energies. The issue with intermittence in wind power can be decreased when a forecast model is implemented. The approach suggested in this study used an energy storage device (ESD) to stabilize the inherent variations and to balance the deviations of the actual wind power to better meet the planned network infeed. The purpose of the ESD is to reduce the intermittence with the implementation of a filter and to be able to meet the short-term planned production of the hybrid system (HS) at the distribution level. To keep a stable frequency in the network, what matters for the operation of the transmission system is not so much the variation in

production but the unpredictability of the production which is the study in this work.

the variations of the power generated by the wind turbine.

energies without depending in fossil power plants.

2. Implemented model philosophy

ation devices, is presented.

2.1. Forecast model

The major contribution, as shown in the following sections, is the ability to change the output power of the HS from a non-dispatchable to a semi-dispatchable generation giving the capability to inform the system operator to program the network dispatch. The flexibility of power dispatch depends greatly on the short-term prediction and the storage characteristics to reduce

Unlike other studies, we propose an energy management system (EMS) to overcome the frequency affectation when the hybrid system is connected as DG, by means of solely clean

The interaction between the HS elements described in Section 4 is done through a developed model predictive control (MPC) algorithm. In consequence, the development of a wind and solar radiation forecast algorithm, alongside the modeling of the different implemented gener-

Energy forecasting is particularly meaningful when considering wind power because of dispatch planning and market operations [11]; the focus in this chapter is dispatch planning.

connection to the grid.

22 Smart Microgrids

A stochastic model that can be extremely useful in the representation of certain practically occurring series is the autoregressive model. In this model, the current value of the process is expressed as a finite, linear aggregate of previous values of the process and a random shock at [13].

In this model, the current value of the process was expressed as a finite, linear aggregate of previous values of the process. The AR model is a classic forecast model implemented in time series analysis. An AR(r) model relates r historic observations to the value Ytþ1:

$$Y\_{t+1} = \mu + \sum\_{i=0}^{\rho - 1} \Theta\_i Y\_{t-i} + \varepsilon\_{t+1} \tag{1}$$

$$Y\_{t+1} = \widehat{Y}\_{(t+1|t)} + \varepsilon\_{t+1} \tag{2}$$

From Eq. (1), μ is a term correcting the mean value, Θ<sup>i</sup> is the coefficient of each past observation Yt�<sup>i</sup> is describing its influence on the next value Ytþ1, and finally ε<sup>t</sup> is assumed to be white noise [13, 14]. This is an iterative process, meaning that a six-steps-ahead forecast is required to calculate Eq. (2), to upgrade Yt plugging in the last forecast value generated, and to repeat the process:

$$
\widehat{Y}\_{t+k|t} = \mu + \sum\_{i=0}^{\rho - 1} \widehat{\Theta}\_i \widehat{Y}\_{t+k-(i+1)|t} \tag{3}
$$

Yb<sup>t</sup>þk�ð Þ <sup>i</sup>þ<sup>1</sup> <sup>∣</sup><sup>t</sup> is equal to the observation if the observation exists; otherwise, it is equal to the prediction. An AR process is a linear process characterized by a finite number of terms.

#### 2.1.2. Recursive least square with forgetting factor

Notice that the k-step AR(r) model can be written as [15]

$$Y\_{t+k} = \begin{pmatrix} Y\_t, Y\_{t-1}, \dots, Y\_{t-\rho+1} \end{pmatrix} \begin{pmatrix} \Theta\_0 \\ \vdots \\ \Theta\_{\rho-1} \end{pmatrix} + \varepsilon\_{t+k} \tag{4}$$

which, by introducing the standard notation using X as the regressor vector, becomes

$$Y\_{t+k} = X\_t^T \widehat{\theta}\_t + \varepsilon\_{t+k} \tag{5}$$

2H2O ! 2H<sup>2</sup> þ O2: (11)

http://dx.doi.org/10.5772/intechopen.76760

25

<sup>F</sup>∙p∙<sup>z</sup> (12)

The basic operation of the electrolyzer can be demonstrated by a small experiment, which is shown in Figure 1 [18]. The water is electrolyzed into hydrogen and oxygen by passing an

A Proposed Energy Management System to Overcome Intermittence of Hybrid Systems Based on Wind, Solar,…

The electrolysis is fundamental for the production of pure hydrogen, and this must be taken into account in the hybrid system model, by implementing the laws of Faraday electrolysis.

Faraday's first law of electrolysis. The mass of the substance altered at the electrode during the electrolysis is directly proportional to the amount of electricity transferred to that electrode. The quantity of electricity indicates the amount of electrical charge, typically measured in

Faraday's second law of electrolysis. When the same quantity of electricity is passed through several electrolytes, the mass of the substances deposited is proportional to their respective

The first law can be used to obtain the amount of hydrogen generated according to a DC current in a certain amount of time, being relevant to the operation of the fuel cell. It can be

Vg <sup>¼</sup> Rg∙I∙T∙<sup>t</sup>

The gas volume in liters is represented by Vg, Rg is the ideal gas constant equal to 0.0820577 (L�atm/mol�K), I means the current in amperes, T is the temperature in �K, t is the time in seconds, z is the number of excess electrons and takes the value of 2 for H<sup>2</sup> and 4 for O2, p represents the ambient pressure in atmospheres, and F represents the Faraday constant equal

electric current through it.

chemical equivalent or equivalent weight [19].

expressed in mathematical form as follows

coulombs [19].

to 96485.33 in C/mol.

Figure 1. Water electrolysis experiment.

Recursive least square (RLS) with forgetting factor is based on the AR process and allows the parameter vector θ to change over time. For the weighted least squares estimator, the weighted estimation is calculated as

$$
\widehat{\boldsymbol{\Theta}}\_{t} = \widehat{\boldsymbol{\Theta}}\_{t-1} + \boldsymbol{R}\_{t}^{-1} \boldsymbol{X}\_{t-k} \left[ \boldsymbol{Y}\_{t} - \boldsymbol{X}\_{t-k}^{T} \widehat{\boldsymbol{\Theta}}\_{t-1} \right] \tag{6}
$$

where

$$R\_t = \lambda R\_{t-1} + X\_{t-k} X\_{t-k}^T \tag{7}$$

This is a recursive implementation of a weighted least squares estimation, where the weights are exponentially decaying over time. With Xt as the regressor vector, θ<sup>t</sup> as the coefficient vector and Yt as the dependent variable (observation at time t), the k-step prediction at t is

$$
\widehat{Y}\_{t+k|t} = X\_t^T \widehat{\theta}\_t \tag{8}
$$

The parameter λ is the forgetting factor, describing how fast historical data are downweighted. The weights are equal to

$$
\omega(\Delta t) = \lambda^{\Delta t} \tag{9}
$$

Δt is the age of the data [16]. If λð Þt is constant λðÞ¼ t λ, then the memory is of the form

$$T\_0 = \frac{1}{1 - \lambda}.\tag{10}$$

Typical values for λ are in the range from 0.90 to 0.995. The forgetting factor can be chosen based on assumptions of the dynamics, or it can be a part of the global optimization [15].

#### 2.1.3. Electrolyzer model

Hydrogen production through water electrolysis is a method of storing wind energy, and it is of great importance to understand that the hydrogen is fundamental to the implementation of this hybrid system, since it is the energy carrier that allows the hybrid system to work autonomously for long periods of time. The hydrogen can be stored and distributed to be used a posteriori to generate electricity via the fuel cell (FC); the only by-product of this combustion is water, so no additional pollution is generated [17].

The hydrogen production by electrolysis of water is reached by the decomposition of water into oxygen and hydrogen gas, thanks to an electric current passed through the water. The reaction has a standard potential of 1.23 V, meaning it ideally requires a potential difference of 1.23 V to split water. The chemical representation is given by

A Proposed Energy Management System to Overcome Intermittence of Hybrid Systems Based on Wind, Solar,… http://dx.doi.org/10.5772/intechopen.76760 25

$$2\mathrm{H}\_{2}\mathrm{O} \to 2\mathrm{H}\_{2} + \mathrm{O}\_{2}.\tag{11}$$

The basic operation of the electrolyzer can be demonstrated by a small experiment, which is shown in Figure 1 [18]. The water is electrolyzed into hydrogen and oxygen by passing an electric current through it.

The electrolysis is fundamental for the production of pure hydrogen, and this must be taken into account in the hybrid system model, by implementing the laws of Faraday electrolysis.

Faraday's first law of electrolysis. The mass of the substance altered at the electrode during the electrolysis is directly proportional to the amount of electricity transferred to that electrode. The quantity of electricity indicates the amount of electrical charge, typically measured in coulombs [19].

Faraday's second law of electrolysis. When the same quantity of electricity is passed through several electrolytes, the mass of the substances deposited is proportional to their respective chemical equivalent or equivalent weight [19].

The first law can be used to obtain the amount of hydrogen generated according to a DC current in a certain amount of time, being relevant to the operation of the fuel cell. It can be expressed in mathematical form as follows

$$V\_{\mathcal{S}} = \frac{\mathcal{R}\_{\mathcal{S}} \cdot I \cdot T \cdot t}{F \cdot p \cdot z} \tag{12}$$

The gas volume in liters is represented by Vg, Rg is the ideal gas constant equal to 0.0820577 (L�atm/mol�K), I means the current in amperes, T is the temperature in �K, t is the time in seconds, z is the number of excess electrons and takes the value of 2 for H<sup>2</sup> and 4 for O2, p represents the ambient pressure in atmospheres, and F represents the Faraday constant equal to 96485.33 in C/mol.

Figure 1. Water electrolysis experiment.

Ytþ<sup>k</sup> <sup>¼</sup> <sup>X</sup><sup>T</sup>

<sup>θ</sup>b<sup>t</sup> <sup>¼</sup> <sup>θ</sup>b<sup>t</sup>�<sup>1</sup> <sup>þ</sup> <sup>R</sup>�<sup>1</sup>

estimation is calculated as

weighted. The weights are equal to

2.1.3. Electrolyzer model

is water, so no additional pollution is generated [17].

1.23 V to split water. The chemical representation is given by

where

24 Smart Microgrids

Recursive least square (RLS) with forgetting factor is based on the AR process and allows the parameter vector θ to change over time. For the weighted least squares estimator, the weighted

Rt <sup>¼</sup> <sup>λ</sup>Rt�<sup>1</sup> <sup>þ</sup> Xt�kX<sup>T</sup>

This is a recursive implementation of a weighted least squares estimation, where the weights are exponentially decaying over time. With Xt as the regressor vector, θ<sup>t</sup> as the coefficient vector and Yt as the dependent variable (observation at time t), the k-step prediction at t is

<sup>Y</sup>b<sup>t</sup>þk∣<sup>t</sup> <sup>¼</sup> <sup>X</sup><sup>T</sup>

The parameter λ is the forgetting factor, describing how fast historical data are down-

Δt is the age of the data [16]. If λð Þt is constant λðÞ¼ t λ, then the memory is of the form

<sup>T</sup><sup>0</sup> <sup>¼</sup> <sup>1</sup>

Typical values for λ are in the range from 0.90 to 0.995. The forgetting factor can be chosen based on assumptions of the dynamics, or it can be a part of the global optimization [15].

Hydrogen production through water electrolysis is a method of storing wind energy, and it is of great importance to understand that the hydrogen is fundamental to the implementation of this hybrid system, since it is the energy carrier that allows the hybrid system to work autonomously for long periods of time. The hydrogen can be stored and distributed to be used a posteriori to generate electricity via the fuel cell (FC); the only by-product of this combustion

The hydrogen production by electrolysis of water is reached by the decomposition of water into oxygen and hydrogen gas, thanks to an electric current passed through the water. The reaction has a standard potential of 1.23 V, meaning it ideally requires a potential difference of

<sup>t</sup> Xt�<sup>k</sup> Yt � <sup>X</sup><sup>T</sup>

<sup>t</sup>�<sup>k</sup>θb<sup>t</sup>�<sup>1</sup> h i

<sup>t</sup> θb<sup>t</sup> þ ε<sup>t</sup>þ<sup>k</sup> (5)

<sup>t</sup>�<sup>k</sup> (7)

<sup>t</sup> θb<sup>t</sup> (8)

<sup>ω</sup>ð Þ¼ <sup>Δ</sup><sup>t</sup> <sup>λ</sup><sup>Δ</sup><sup>t</sup> (9)

<sup>1</sup> � <sup>λ</sup> : (10)

(6)

Electrolysis has the advantages of being static, simple, and able to operate for long periods without attention while generating hydrogen to be used in a fuel cell.

Considering Faraday's law of electrolysis (Eq. (12)) and the fact that the power required by the electrolyzer can be computed by means of the power equation Pel ¼ Vc � I, where I is the current, Vc represents the cell voltage, and Pel is the power required for the electrolyzer, the volume of hydrogen generated from a certain amount of power can be expressed as

$$V\_{H\_2} = \frac{P\_{el} \cdot R \cdot T \cdot t}{2 \cdot F \cdot p \cdot V\_c} \tag{13}$$

The cell has internal electrical losses such as ohmic, activation, and mass transport [20, 21]. The ohmic losses are caused by ionic resistance in the electrolyte and electrodes; electronic resistance in the electrodes, current collectors, and interconnects; and contact resistances. Ohmic losses are proportional to the current density, depending on materials selection and stack

A Proposed Energy Management System to Overcome Intermittence of Hybrid Systems Based on Wind, Solar,…

The activation-related losses stems from the activation energy of the electrochemical reactions at the electrodes. These losses depend on the reactions at hand, the electro-catalyst material and microstructure, reactant activities (and hence utilization), and weakly current density.

Mass transport-related losses are a result of finite mass transport limitation rates of the reactants and depend strongly on the current density, reactant activity, and electrode structure.

The cell voltage is calculated based on the reversible open-circuit voltage E and the voltage

The internal losses in the fuel cell are neglected in this model, because their values tend to be very small and therefore do not significantly alter the result, as demonstrated in [22]. For the cell voltage, a value between 0.6 and 0.7 V can be assumed [23]. A value of 0.68 is assumed in

The operation of the fuel cell can be understood to be essentially the reverse process of electrolysis of water, as this technology recombines the hydrogen with oxygen to generate

Individual fuel cell units are combined as modules in series or parallel configurations to provide desired voltage and output power. The mechanical arrangement must ensure not only electrical contact among units but also adequate circulation of gases, allowing catalyst reactions to take place at the correct temperatures and humidity levels [21]. The electric power

in which Vc is the voltage cell, I represents the current cell, and n is the number of fuel cells

To know the amount of hydrogen needed by the fuel cell, one must know the number of fuel cells that make up the stack of the final FC array. By means of Eq. (12) and Eq. (16), the

<sup>H</sup>2used <sup>¼</sup> Pfc∙<sup>n</sup>

Another way to calculate the hydrogen used is in kg/s, while considering the molar mass of the

hydrogen used by the stack, in mol/s [21, 24], is deduced as

Vc .

hydrogen and the Faraday constant (F), deduced as

Vc ¼ E � ΔVohm � ΔVact � ΔVtrans (15)

http://dx.doi.org/10.5772/intechopen.76760

27

Pe ¼ Vc � I � n (16)

<sup>2</sup>∙Vc∙<sup>F</sup> (17)

H2used ¼ lfc∙Pfc (18)

geometry and on temperature.

accordance with the efficiency of the FC.

electrical power and water.

generated by a FC is defined as

lfc is determined by 1:<sup>05</sup> � <sup>10</sup>�<sup>8</sup> <sup>n</sup>

integrating the stack.

losses, as follows

VH2 is the volume of hydrogen produced by the cell. Implementing Eq. (13) the volume of hydrogen produced by the electrolyzer with Pel input power is deduced. Considering that the model applied to the HS will calculate the power required for the electrolyzer in the function of the wind power forecast, Eq. (13) is reorganized as

$$V\_{H\_2} = P\_{el} \cdot l\_{el} \tag{14}$$

where lel <sup>¼</sup> <sup>R</sup>∙T∙<sup>t</sup> 2∙F∙p∙Vc .

#### 2.1.4. Fuel cell model

The PEMFC is the type of cell that was used to develop the model and is characterized by an efficient production of energy with high power density represented in Figure 2. Since the cell separator is a polymer tape, the cell operates at a relatively low temperature, which potentially allows quick start-up, and issues such as sealing, assembly, and operation are less complex than in other cell types. The need for handling corrosive acids or bases in this system is removed [20].

Figure 2. Schematic of representative PEMFC.

The cell has internal electrical losses such as ohmic, activation, and mass transport [20, 21]. The ohmic losses are caused by ionic resistance in the electrolyte and electrodes; electronic resistance in the electrodes, current collectors, and interconnects; and contact resistances. Ohmic losses are proportional to the current density, depending on materials selection and stack geometry and on temperature.

The activation-related losses stems from the activation energy of the electrochemical reactions at the electrodes. These losses depend on the reactions at hand, the electro-catalyst material and microstructure, reactant activities (and hence utilization), and weakly current density.

Mass transport-related losses are a result of finite mass transport limitation rates of the reactants and depend strongly on the current density, reactant activity, and electrode structure.

The cell voltage is calculated based on the reversible open-circuit voltage E and the voltage losses, as follows

$$V\_c = E - \Delta V\_{ohm} - \Delta V\_{act} - \Delta V\_{trans} \tag{15}$$

The internal losses in the fuel cell are neglected in this model, because their values tend to be very small and therefore do not significantly alter the result, as demonstrated in [22]. For the cell voltage, a value between 0.6 and 0.7 V can be assumed [23]. A value of 0.68 is assumed in accordance with the efficiency of the FC.

The operation of the fuel cell can be understood to be essentially the reverse process of electrolysis of water, as this technology recombines the hydrogen with oxygen to generate electrical power and water.

Individual fuel cell units are combined as modules in series or parallel configurations to provide desired voltage and output power. The mechanical arrangement must ensure not only electrical contact among units but also adequate circulation of gases, allowing catalyst reactions to take place at the correct temperatures and humidity levels [21]. The electric power generated by a FC is defined as

$$P\_e = V\_c \cdot I \cdot n \tag{16}$$

in which Vc is the voltage cell, I represents the current cell, and n is the number of fuel cells integrating the stack.

To know the amount of hydrogen needed by the fuel cell, one must know the number of fuel cells that make up the stack of the final FC array. By means of Eq. (12) and Eq. (16), the hydrogen used by the stack, in mol/s [21, 24], is deduced as

$$H\_{2used} = \frac{P\_{fc} \cdot n}{2 \cdot V\_c \cdot F} \tag{17}$$

Another way to calculate the hydrogen used is in kg/s, while considering the molar mass of the hydrogen and the Faraday constant (F), deduced as

$$H\_{2\text{used}} = l\_{\text{fc}} \cdot P\_{\text{fc}} \tag{18}$$

lfc is determined by 1:<sup>05</sup> � <sup>10</sup>�<sup>8</sup> <sup>n</sup> Vc .

Electrolysis has the advantages of being static, simple, and able to operate for long periods

Considering Faraday's law of electrolysis (Eq. (12)) and the fact that the power required by the electrolyzer can be computed by means of the power equation Pel ¼ Vc � I, where I is the current, Vc represents the cell voltage, and Pel is the power required for the electrolyzer, the

> VH<sup>2</sup> <sup>¼</sup> Pel∙R∙T∙<sup>t</sup> 2∙F∙p∙Vc

VH2 is the volume of hydrogen produced by the cell. Implementing Eq. (13) the volume of hydrogen produced by the electrolyzer with Pel input power is deduced. Considering that the model applied to the HS will calculate the power required for the electrolyzer in the function of

The PEMFC is the type of cell that was used to develop the model and is characterized by an efficient production of energy with high power density represented in Figure 2. Since the cell separator is a polymer tape, the cell operates at a relatively low temperature, which potentially allows quick start-up, and issues such as sealing, assembly, and operation are less complex than in other cell types. The need for handling corrosive acids or bases in this system is

VH<sup>2</sup> ¼ Pel∙lel (14)

(13)

volume of hydrogen generated from a certain amount of power can be expressed as

without attention while generating hydrogen to be used in a fuel cell.

the wind power forecast, Eq. (13) is reorganized as

where lel <sup>¼</sup> <sup>R</sup>∙T∙<sup>t</sup>

26 Smart Microgrids

2.1.4. Fuel cell model

removed [20].

2∙F∙p∙Vc .

Figure 2. Schematic of representative PEMFC.

Figure 3. Step response function.

In order to design the MPC, the impulse response function for the fuel cell is needed. Taking into account that the FC is an electrochemistry element, its dynamic is very fast as demonstrated in [25, 26]. To compute the impulse response of the FC, the function in Figure 3 is implemented to obtain lfc, <sup>k</sup> for future use in the MPC. The same function is required to obtain the impulse response for the electrolyzer and storage, lel, <sup>k</sup>, and lst, <sup>k</sup>, respectively.

#### 3. Hybrid system setup and EMS strategy

The proposed HS, according to the historic wind measurements from meteorological stations in Mexico City, is composed by a 5 kW Iskra small wind turbine [27], a 2 kW KC200GT photovoltaic (PV) array [28], a 2.4 kW PEMFC [29], an electrolyzer from the brand Proton OnSite with a net production rate of 18.8 standard liter per minute [30], and a 16,500 l hydrogen storage [31]; the device modeling is subsequently illustrated. In order to achieve the desired output power from the HS, the use of a forecasting method as explained in this section is proposed.

The control is recreated in a computational form, in which the HS output is reflected in the activation, the power regulation, and the interaction between the HS elements as seen in Figure 4, where the continuous, dashed, and pointed arrows represent the electric, control data, and hydrogen flow, respectively. The HS is supposed to connect to the distribution network, taking into account the power level used by normal households in Mexico City at different times of the year [32]. The HS can be adjusted to work as a constant power generator or to meet a signal reference output power, based on the daily historic load of the household(s). This can make the user change the consumption habits in order to have a better response to the system and to decrease the total cost of their electric consumption [33, 34].

ones [35, 36]. In addition, the MPC introduces feedforward control to compensate measurable

A Proposed Energy Management System to Overcome Intermittence of Hybrid Systems Based on Wind, Solar,…

http://dx.doi.org/10.5772/intechopen.76760

29

Figure 5 shows the basic MPC structure; the future outputs for a horizon N are predicted at each instant t. The predicted outputs for k ¼ 1, …, N depend on the known values up to instant t and on the future control signals, k ¼ 0, …, N � 1, which are to be sent to the system. The future control signals are calculated by optimizing a criterion in order to keep the process close

, which is computed as the result of

activation vector of the FC, and Pelmax is the activation vector of the electrolyzer, where the last two are computed according to the priority given in the different scenarios. Eq. (19) is then filtered through a moving average filter, which operates by averaging a number of points from the input signal to produce each point in the output signal [38]. In equation form it is written as

<sup>t</sup>þk∣<sup>t</sup> <sup>þ</sup> Pfcmax, <sup>k</sup> � Pelmax, <sup>k</sup> (19)

<sup>t</sup>þk∣<sup>t</sup> is the forecasted PV power, Pfcmax is the

Ptþk∣<sup>t</sup>½ � k þ j (20)

disturbances, allowing its application to this work to be more satisfactory [37].

<sup>t</sup>þk∣<sup>t</sup> <sup>þ</sup> <sup>P</sup>bpv

½ �¼ <sup>k</sup> <sup>1</sup> M M X�1 j¼0

tþk∣t

<sup>t</sup>þk∣<sup>t</sup> represents the forecasted wind power, <sup>P</sup>bpv

Ptþk∣<sup>t</sup> <sup>¼</sup> <sup>P</sup>b<sup>w</sup>

Pref tþk∣t

to the reference trajectory Pref

Figure 4. Wind-solar-FC hybrid system.

Pbw

Figure 4 shows the flow of the main energies that sustain the HS where the left side is the hydrogen flow and the right side is the electric power flow with the inputs and outputs of the systems. This figure also shows the electric conversion AC/DC and DC/AC taking into account that the FC has a DC output. The power will be controlled, regulated, and distributed to the network and electrolyzer with the purpose of storing energy in the form of hydrogen.

In order to implement a controller, one must understand and describe the models used in the system. Therefore, in the following section, the basic operation of the HS components will be introduced.

Depending on the objective function, various MPC strategies can be implemented. Model predictive control has the inherent advantages like the use for controlling a great variety of processes, including systems with long delay times or of non-minimum phases or unstable A Proposed Energy Management System to Overcome Intermittence of Hybrid Systems Based on Wind, Solar,… http://dx.doi.org/10.5772/intechopen.76760 29

Figure 4. Wind-solar-FC hybrid system.

In order to design the MPC, the impulse response function for the fuel cell is needed. Taking into account that the FC is an electrochemistry element, its dynamic is very fast as demonstrated in [25, 26]. To compute the impulse response of the FC, the function in Figure 3 is implemented to obtain lfc, <sup>k</sup> for future use in the MPC. The same function is required to obtain

The proposed HS, according to the historic wind measurements from meteorological stations in Mexico City, is composed by a 5 kW Iskra small wind turbine [27], a 2 kW KC200GT photovoltaic (PV) array [28], a 2.4 kW PEMFC [29], an electrolyzer from the brand Proton OnSite with a net production rate of 18.8 standard liter per minute [30], and a 16,500 l hydrogen storage [31]; the device modeling is subsequently illustrated. In order to achieve the desired output power

The control is recreated in a computational form, in which the HS output is reflected in the activation, the power regulation, and the interaction between the HS elements as seen in Figure 4, where the continuous, dashed, and pointed arrows represent the electric, control data, and hydrogen flow, respectively. The HS is supposed to connect to the distribution network, taking into account the power level used by normal households in Mexico City at different times of the year [32]. The HS can be adjusted to work as a constant power generator or to meet a signal reference output power, based on the daily historic load of the household(s). This can make the user change the consumption habits in order to have a better response to the

Figure 4 shows the flow of the main energies that sustain the HS where the left side is the hydrogen flow and the right side is the electric power flow with the inputs and outputs of the systems. This figure also shows the electric conversion AC/DC and DC/AC taking into account that the FC has a DC output. The power will be controlled, regulated, and distributed to the

In order to implement a controller, one must understand and describe the models used in the system. Therefore, in the following section, the basic operation of the HS components will be

Depending on the objective function, various MPC strategies can be implemented. Model predictive control has the inherent advantages like the use for controlling a great variety of processes, including systems with long delay times or of non-minimum phases or unstable

network and electrolyzer with the purpose of storing energy in the form of hydrogen.

from the HS, the use of a forecasting method as explained in this section is proposed.

system and to decrease the total cost of their electric consumption [33, 34].

the impulse response for the electrolyzer and storage, lel, <sup>k</sup>, and lst, <sup>k</sup>, respectively.

3. Hybrid system setup and EMS strategy

Figure 3. Step response function.

28 Smart Microgrids

introduced.

ones [35, 36]. In addition, the MPC introduces feedforward control to compensate measurable disturbances, allowing its application to this work to be more satisfactory [37].

Figure 5 shows the basic MPC structure; the future outputs for a horizon N are predicted at each instant t. The predicted outputs for k ¼ 1, …, N depend on the known values up to instant t and on the future control signals, k ¼ 0, …, N � 1, which are to be sent to the system. The future control signals are calculated by optimizing a criterion in order to keep the process close to the reference trajectory Pref tþk∣t , which is computed as the result of

$$P\_{t+k\mid t} = \widehat{P}\_{t+k\mid t}^{w} + \widehat{P}\_{t+k\mid t}^{pv} + P\_{f\text{max},k} - P\_{e\text{max},k} \tag{19}$$

Pbw <sup>t</sup>þk∣<sup>t</sup> represents the forecasted wind power, <sup>P</sup>bpv <sup>t</sup>þk∣<sup>t</sup> is the forecasted PV power, Pfcmax is the activation vector of the FC, and Pelmax is the activation vector of the electrolyzer, where the last two are computed according to the priority given in the different scenarios. Eq. (19) is then filtered through a moving average filter, which operates by averaging a number of points from the input signal to produce each point in the output signal [38]. In equation form it is written as

$$P\_{t+k|t}^{ref}[k] = \frac{1}{M} \sum\_{j=0}^{M-1} P\_{t+k|t}[k+j] \tag{20}$$

Figure 5. MPC structure.

where M is the number of points in the average. Afterward, Pref <sup>t</sup>þ6∣<sup>t</sup> is reported, and <sup>P</sup>ref <sup>t</sup>þk∣<sup>t</sup> for k ¼ 1, …, N is used in the MPC.

horizons k as shown in Figure 7. The algorithm implemented to forecast 1 h ahead, with a

A Proposed Energy Management System to Overcome Intermittence of Hybrid Systems Based on Wind, Solar,…

http://dx.doi.org/10.5772/intechopen.76760

31

The time series models are updated in each iteration of the process as described later in this section, taking into account the new data measured every 10 min. The expressions obtained for

The autocorrelation function (ACF) analysis result of the short-term forecast is shown in

Figure 9 shows the RMSE as a function of the horizon k (10-min steps). The black curve is the RMSE for persistence, and the red curve is for RLS. Some improvement of the RLS over the persistence is observed, but it is beyond the scope of the study to investigate the impact of

Figure 8, indicating that the used model is suitable for this study purpose.

Yt ¼ 161:2 þ 0:8324Yt�<sup>1</sup> þ 0:0461Yt�<sup>2</sup> (21)

Ytþ<sup>1</sup> ¼ 248:3 þ 0:8275Yt � 0:00922Yt�<sup>1</sup> (22)

Ytþ<sup>2</sup> ¼ 342:65 þ 0:8228Ytþ<sup>1</sup> � 0:0698Yt (23)

Ytþ<sup>3</sup> ¼ 439:93 þ 0:7703Ytþ<sup>2</sup> � 0:0835Ytþ<sup>1</sup> (24)

Ytþ<sup>4</sup> ¼ 525:09 þ 0:6905Ytþ<sup>3</sup> � 0:0641Ytþ<sup>2</sup> (25)

Ytþ<sup>5</sup> ¼ 634:7 þ 0:7555Ytþ<sup>4</sup> � 0:1978Ytþ<sup>3</sup>: (26)

resolution of 10 min, is called a six-steps-ahead forecast.

each horizon of wind forecast (k ¼ 1, …, 6) are

Figure 6. Optimal forgetting factor.

using the forecasts compared to persistence.

Figure 7. Actual and k-step ahead forecast.

Ptþk∣<sup>t</sup> is computed considering that the activation vector of the FC and electrolyzer depend on the priority given by the behavior of the HS. Afterward, the forecast signal is filtered as to remove the high-frequency changes and leave a smooth signal to be used as the reference trajectory.

The MPC manages the electric power of the HS and takes into account the output power, the filtered forecast, and the actual wind power, so that the control decides how much power the FC is going to produce and how much power will be directed to the electrolyzer for saving energy for future fluctuations; thus, the output power will be almost without frequency changes and minimizing in a great extent the intermittence and variability of the wind power.
