Keywords

1 Introduction

Nowadays, an energy crisis exists since reserves of coal-based fuels are being depleted, due to the increment of their exploitation and consumption. When generating energy with this type of fuel greenhouse gases are emitted, causing: global warming, the alteration of the climate, and the habitat [1]. The costs of production and storage of various low capacity renewable energy sources have decreased considerably, and currently, the world is working on integrating them into public power grids. The first steps in the integration of renewable energy sources came with the implementation of hybrid photovoltaic-wind systems as complementary sources for rural applications and weak connections to the grid.

Research is currently underway on the integration of various small-scale energy sources such as solar thermal, biomass, fuel cells and tidal power, under new and advanced control schemes constituting what is called a smart grid. Since the production costs of photovoltaic and wind farms have been significantly reduced, they have become the primary choice for power generation in smart grids [2, 3]

A smart grid is a kind of grid that can efficiently integrate the behavior and actions of all users connected to it. It ensures a sustainable and efficient energy system, with low losses and high levels of quality and security of supply. Humanity has experienced in the last century an immense development based on the energy of fossil origin consumption. These energies have been exploited assuming an unlimited availability, and without assessing at any time the environmental costs caused.

The human being has focused to date on an energy model in which a rigorous chain is followed in the following order: generation, distribution, transport, and consumption. However, changing this model is more than a necessity today, with the new model tending to the diversification of energy sources, greater use of renewable energies, efficiency, and energy saving. The new energy model aims to transform the current system into a distributed system, in which any agent that is connected to the network has the possibility of contributing energy, making possible the creation of microgenerators, so that there is no such direct dependence on the current energy generation [4,5,6,7].

Although there is no standard general definition of a smart grid. The European Smart Grids Platform (Smart Grids: European Technology Platform) defines a smart grid as “A power grid capable of intelligently integrating behavior and the actions of all the users connected to it, generators, consumers and those who carry out both actions, in order to safely and efficiently distribute electricity from a sustainable and economic point of view” [8].

2 Energy Management System

An energy management system (EMS) can be defined as a methodology to achieve sustained and continuous improvement of energy performance. The implementation of an EMS should not be understood as an objective itself, what really matters is the results of the whole system. Understood in this way, the effectiveness of an EMS will depend, to a large extent, on the commitment and willingness of all the factors involved to manage the use and cost of energy. The EMS aim at the continuous improvement in the use of energy through a more efficient use of energy, reducing consumption, associated financial costs and emissions of greenhouse gases, as well as by making better use of renewable energies [9,10,11].

An EMS brings the following benefits:

  • Helps identify, prioritize and select actions to improve energy performance, based on their potential savings and the level of investment required.

  • Reduce costs by making the most of the energy resources.

Boosts productivity and growth (greater use, less waste).

  • Ensures the trust and quality of the information used for making decisions.

  • It facilitates the integration of existing management systems.

2.1 Power Measurement Device

A power measurement device allows the measurement of current and voltage variables. This device replaces the use of voltmeters and amperemeter. It has the capacity to measure power incorporating additional benefits such as wireless communication through protocols ZigBee, with which we can integrate this equipment into the software to perform power management by implementing a monitoring system. An energy monitoring system can record electrical variables of interest that at some point provide information to establish the behavior of a power system. It is important to have these real-time data storage systems to monitor the operational performance.

The proposed measurement device has two voltage transducers and four current traducers, which convert the input power variables into other output variables of very small values. The resulting data is passed through six low pass filters, designed to condition the signal and finally direct them to the analog inputs of an “Arduino DUE”. A Xbee module is connected to carry out communication with the computer and obtain the measurement data in real time.

The main components of the wind generation system are illustrated in Fig. 1. This system is part of the microgrid installed in the Faculty of Engineering of the UADY. The power from turbines passes through the control panel, where it is verified that it is within the allowed operating ranges, otherwise, the turbine is protected by shutting down the entire system. Subsequently, the power produced is directed to rectifiers to regulate resistive loads. The resistive loads come into operation when there is an excessive surplus of power. From the resulting power passing through the rectifiers, two currents and the same voltage are generated for each pair of rectifiers. At this stage of the generation process of the wind system is where the measurement of voltages and currents is taken for the proposed device.

Fig. 1.
figure 1

Power measurement scheme in wind power systems

3 Artificial Neural Networks

An Artificial Neural Network (ANN) is a distributed parallel processor made up of simple processing units (neurons), which stores knowledge obtained experimentally, and makes it available for use. Knowledge is acquired by the network through a learning process and the connection weights between neurons, known as synaptic, are used to store it. The procedure used to perform the learning process is called training algorithm, whose function is to modify the synaptic weights of the network in an orderly way to achieve the desired design goal [12].

An ANN can be seen like a black box in which enters a database conformed by input variables. Each of the input variables is assigned with an appropriate weighting factor (W). The sum of the weighted inputs and the bias (b) produces the input for a transfer function which will generate an output value. The main characteristic of this model is that specific information about the physical behavior system or the way in which the data were obtained are not required [13, 14].

3.1 Model of an Artificial Neuron

The neuron is the fundamental information processing unit for the operation of a neural network. Figure 2 shows the model of a neuron, which forms the basis for the design of artificial neural networks [16, 17]. In the neuronal model presented four basic elements are identified:

Fig. 2.
figure 2

Model of an artificial neuron

  • Connection links \( \left( {w_{kj} } \right). \) Characterized by their own weight. Specifically, a signal \( x_{j} \) at the input of the synapse \( j \) connected to neuron \( k \) is multiplied by the synaptic weight \( w_{kj} \). It is important to note the notation: the first subscript refers to the receiving neuron and the second refers to the input of the synapse to which the weight is concerned. If \( w_{kj} > 0 \) the connection is excitatory; Also, if \( w_{kj} < 0, \) the connection is inhibitory.

  • Summing Junction \( \left( \varSigma \right). \) Add the input signals multiplied by \( w_{kj} \). The operations described in this point constitute a linear combination.

  • Activation function \( \left( \varphi \right). \) It limits the amplitude of the output of a neuron to a finite value. Usually, the normalized amplitude range of the output of a neuron is written as the closed unit interval [0,1] or alternatively [−1,1].

  • Threshold \( b_{k} \). It has the effect of increasing (positive value) or decreasing (negative value) the total input to the activation function.

3.2 Extended Kalman Filter

The Kalman filter is based on the state space formulation of linear dynamic systems, providing a recursive solution to the optimal linear filtering problem. It is applied in stationary environments as non-stationary. The solution is recursive; so, each update of the estimated state is calculated from the previous estimate and the new input data, so only the previous estimate requires storage. In the application of the Kalman filter for training neural networks, the synaptic weights of the network are the states that the Kalman filter estimates and the output of the neural network is the measurement used by this filter [17, 18].

With the algorithm based on the Extended Kalman Filter (EKF), learning convergence is improved. EKF training of neural networks, both static and recurrent, has proven to be reliable for many applications in the last twenty years. However, this training requires the heuristic selection of some design parameters which is not always an easy task [19].

Consider a nonlinear dynamic system described by the following state space model

$$ w\left( {k + 1} \right) = f\left( {k,w\left( k \right)} \right) + u\left( k \right) $$
(1)
$$ y\left( k \right) = h\left( {k,w\left( k \right)} \right) + v\left( k \right) $$
(2)

\( u\left( k \right) \) and \( v\left( k \right) \) are independent noises, empty, zero-mean and with covariance matrices \( Q\left( k \right) \) and \( R\left( k \right), \) respectively. \( f\left( {k,w\left( k \right)} \right) \) denotes the non-linear matrix function of transition, which can be variant in time and \( h\left( {k,w\left( k \right)} \right) \) denotes the nonlinear measurement matrix function, which can also be variant in time.

The idea of the extended Kalman filter is to linearize the state space model of (1) and (2) at each sampling instant around the most recent estimated state, which can be taken as \( \hat{w}\left( k \right) \) o \( \hat{w}^{ - } \left( k \right). \) Once the model is obtained, the Kalman filter equations are applied. The approximation proceeds:

Step 1. The following matrices are computed

$$ F_{k + 1,k} = \left. {\frac{{\partial f\left( {k,w\left( k \right)} \right)}}{\partial w}} \right|_{{w = \hat{w}\left( k \right)}} $$
(3)
$$ H\left( k \right) = \left. {\frac{{\partial h\left( {k,w\left( k \right)} \right)}}{\partial w}} \right|_{{\hat{w}^{ - } \left( k \right)}} $$
(4)

Step 2. Once the matrices \( F\left( \cdot \right) \) and \( H\left( \cdot \right) \) are evaluated, they are used in a first-order Taylor series approximation for the nonlinear functions \( f\left( {k,w\left( k \right)} \right) \) and \( h\left( {k,w\left( k \right)} \right) \) around \( \hat{w}\left( k \right) \) and \( \hat{w}^{ - } \left( k \right) \) respectively. Specifically, they approximate as follows

$$ f\left( {k,w\left( k \right)} \right) \approx F\left( {w,\hat{w}\left( k \right)} \right) + F_{k + 1,k} \left( {w,\hat{w}\left( k \right)} \right) $$
(5)
$$ h\left( {k, w\left( k \right)} \right) \approx H\left( {w,\hat{w}^{ - } \left( k \right)} \right) + H_{k + 1,k} \left( {w,\hat{w}\left( k \right)} \right) $$
(6)

With (3) and (4), the nonlinear state Eqs. (5) and (6) are approximated as:

$$ w\left( {k + 1} \right) \approx F_{k + 1,k} w\left( k \right) + u\left( k \right) + d\left( k \right) $$
(7)
$$ \bar{y}\left( k \right) \approx H\left( k \right)w\left( k \right) + v\left( k \right) $$
(8)

where

$$ \bar{y}\left( k \right) = y\left( k \right) - \left( {h\left( {w,\hat{w}^{ - } \left( k \right)} \right) - H\left( k \right)\hat{w}^{ - } \left( k \right)} \right) $$
(9)
$$ d\left( k \right) = f\left( {w,\hat{w}^{ - } \left( k \right)} \right) - F_{k + 1,k} \hat{w}\left( k \right) $$
(10)

Although there are some differences between the equations that define the neural networks of this work, both can be represented by the model

$$ w\left( {k + 1} \right) = w\left( k \right) +\Delta w\left( k \right) $$
(11)
$$ \hat{y}\left( k \right) = h\left( {w\left( k \right),\,{\varrho }\left( k \right)} \right) $$
(12)

Which is a simplification of the state space model given by (1) and (2). \( w\left( k \right) \) is the vector of synaptic weights, and \( \hat{y}\left( k \right) \) is the output vector of the neural network, \( {\varrho }\left( k \right) \) represents the input vector to the neural network and \( h\left( \cdot \right) \) is the nonlinear output function of the network. Considering the model (1112) and the extended Kalman filter, the following set of equations are used to update the synaptic weights of the neural networks at each iteration

$$ K\left( k \right) = P\left( k \right)H^{T} \left( k \right)\left[ {R + H\left( k \right)P\left( k \right)H^{T} \left( k \right)} \right]^{ - 1} $$
(13)
$$ w\left( {k + 1} \right) = w\left( k \right) + K\left( k \right)\left[ {y\left( k \right) - \hat{y}\left( k \right)} \right] $$
(14)
$$ P\left( {k + 1} \right) = P\left( k \right) - K\left( k \right)H\left( k \right)P\left( k \right) + Q $$
(15)

Where \( P\left( k \right) \in {\mathbb{R}}^{N \times N} \) and \( P\left( {k + 1} \right) \in {\mathbb{R}}^{N \times N} \) are the covariance matrices of the prediction error in iterations \( k \) and \( k + 1, \) respectively; N represents the total number of synaptic weights in the neural network; \( w\left( k \right) \in {\mathbb{R}}^{N} \) is the vector of weights (states); And \( y\left( k \right) \in {\mathbb{R}}^{o} \) is the vector with the desired output of the network; Or is the total number of outputs of the neural network; And \( \hat{y}\left( k \right) \in {\mathbb{R}}^{o} \) is the output vector produced by the neural network; \( K\left( k \right) \in {\mathbb{R}}^{N \times o} \) is the Kalman gain matrix; \( Q \in {\mathbb{R}}^{N \times N} \) is the covariance matrix of the process noise; \( R \in {\mathbb{R}}^{o \times o} \) is the covariance matrix of the measurement noise and \( H\left( k \right) \in {\mathbb{R}}^{o \times N} \) is the matrix containing the derivatives of each output of the neural network \( \hat{y}_{i} \) with respect to each of the weights \( w_{j} \) of the network, as indicated by:

$$ H_{ij} \left( k \right) = \left[ { \frac{{\partial \hat{y}_{i} \left( k \right)}}{{\partial w_{j} \left( n \right)}} } \right]_{{w\left( k \right) = \hat{w}\left( {k + 1} \right)}} , i = 1, \ldots ,o; j = 1, \ldots ,N $$
(16)

3.3 Embedding Dimension

To build a prediction model of a time series, it is important to determine the embedding dimension of the series. The embedding dimension defines the number of previous values in the time series known as regressors that will determine the next value. The method used in the present work to determine the embedding dimension is called the Cao method [20].

The reconstruction of the dynamics immersed in the time series was performed, for this purpose two parameters must be calculated, the first is the optimal delay of embedding \( \tau e \), and the second is the embedding dimension \( d e \). The method is based on the construction of the delay vector of the series. The dimension vector \( d e \) is defined as:

$$ y\left( n \right) = \left[ {s\left( n \right), s\left( {n + T} \right),s\left( {n + 2T} \right), \ldots ,s\left( {n - \left( {d_{e} - 1} \right)\tau_{e} } \right)} \right] $$
(17)

In this method, the quantity is defined as:

$$ a\left( {n,d} \right) = \frac{{\left\| {y_{n} \left( {d + 1} \right) - y_{k(n,d)} \left( {d + 1} \right)} \right\|}}{{\left\| {y_{n} \left( d \right) - y_{k(n,d)} \left( d \right)} \right\|}} $$
(18)

The number \( k\left( {n,d} \right) \) is an integer such that the vector of dimension d, is the nearest value of the vector \( y_{n} \left( d \right). \) The advantage of this method lies in defining the average:

$$ E\left( d \right) = \frac{1}{{N - d\tau_{e} }}\sum\nolimits_{n = 1}^{{N - d\tau_{e} }} {a\left( {n,d} \right)} $$
(19)

And define the parameter

$$ E_{1} \left( d \right) = \frac{{E\left( {d + 1} \right)}}{E\left( d \right)} $$
(20)

While d increases, the value of parameter \( E_{1} \left( d \right) \) is stabilized in \( d_{0} \), in this case it, is expected that \( d_{0} \) approaches to 1. When this happens the minimum dimension of embedding will be when \( d_{0} \approx 1. \) For the calculation of the optimal delay of embedding as shown in Fig. 3(A), an autocorrelation function was used, where the first value close to zero was selected and the delay was calculated for each database. The embedding dimension was obtained, using the autocorrelation function previously obtained. Figure 3(B) shows the convergence of the method for the time series of wind speed.

Fig. 3.
figure 3

(A) Autocorrelation function, (B) Embedding convergence using Cao’s method

4 Optimization Problem Formulation

In this section, the optimization problem solution of a microgrid operation, interconnected to the public grid of the Engineering Faculty of the Autonomous University of Yucatan (UADY), is developed, besides there are batteries for storage and supply of energy. The objective is to determine the optimal amounts of energy for the wind, solar, battery and public power supply systems, to satisfy the demand generated by a building. A scheme is proposed that minimizes the purchase of energy from the public grid and the operating costs of the hybrid system’s energy sources.

The problem of optimization to be solved is the type of linear programming, and for its solution, a recurrent neural network is proposed capable of solving the problem of optimization proposed by [8]. Computer programs are designed in Matlab to simulate the optimal operation of the hybrid system, using the proposed neural network. The simulation results show the performance of the neural network. In addition, it is necessary to define the operating costs of each energy source that forms the system.

The electric microgrid installed in the Engineering Faculty of the Autonomous University of Yucatan is illustrated in Fig. 4. It is composed of the public power grid, wind generators, photovoltaic systems, batteries for energy storage and a load management system. The objective is to determine the optimal amounts of power supplied for each energy source, over a time horizon, to satisfy the electrical demand, with respect to a time horizon. Minimizing the energy acquired from the public grid subject to constraints and power balance equations, as shown below intervals and the short-term generation scheduling problem can be formulated as follows:

Fig. 4.
figure 4

Scheme of the microgrid installed in the Faculty

$$ CT = \sum\nolimits_{t = 1}^{N} {FC\left( t \right)} $$
(21)

where

\( CT \) :

Total energy cost acquired from the microgrid

\( FC \) :

Energy cost of the microgrid at each time interval

The optimization problem minimizes the purchase of energy from the public grid and the operating costs of the microgrid, the objective function arises as follows

$$ FC\left( t \right) = C_{G} P_{G} \left( t \right) + C_{W} P_{W} \left( t \right) + C_{S} P_{S} \left( t \right) + C_{BD} P_{BD} \left( t \right) + C_{BC} P_{BC} \left( t \right) $$
(22)

where \( P_{B} \left( t \right) = P_{BD} \left( t \right) - P_{BC} \left( t \right). \) The optimization problem is subject to constraints, which are also defined in each subsystem that compose the electric microgrid as

$$ P_{G} \left( t \right) + P_{W} \left( t \right) + P_{S} \left( t \right) + P_{BD} \left( t \right) - P_{BC} \left( t \right) = L_{c} \left( t \right) + L_{o} \left( t \right) $$
(23)

where

\( P_{G} \left( t \right) \) :

Power output of the public grid at time t

\( P_{W} \left( t \right) \) :

Power output of the wind system at time t

\( P_{S} \left( t \right) \) :

Power output of the solar system at time t

\( P_{BD} \left( t \right) \) :

Power input of the battery bank at time t

\( P_{BC} \left( t \right) \) :

Power output of the battery bank at time t

\( L_{c} \left( t \right) \) :

Power demand of the critical load at time t

\( L_{o} \left( t \right) \) :

Power demand of the ordinary load at time t

\( L_{T} \left( t \right) \) :

Total power demand at time t

The total power demand is considered as follows \( L_{T} \left( t \right) = L_{c} \left( t \right) + L_{o} \left( t \right) \)

To solve the energy management problem a canonical form of a linear programming problem is described in the following way

$$ min\quad c^{T} v $$
(24)
$$ Av \le b $$
(25)
$$ v \ge 0 $$
(26)

where \( v \in {\mathbb{R}}^{n} \) is a vector column of decision variables, \( c \in {\mathbb{R}}^{n} , b \in {\mathbb{R}}^{m} \) are column vectors of parameters and \( A \in {\mathbb{R}}^{m\,x\,n} \) is a coefficients matrix. For operative reasons, it is assumed that the feasible region denoted \( \hat{V} \) is not empty and limited. Therefore, an upper bound \( v_{max} \) exists \( 0 \le v \le v_{max} \,for\,i = 1, 2, \ldots ,n. \) Moreover, the inequality of (25) can easily be converted to equality by the addition of \( m \) slack variables. Without loss of generality, the linear programming problem is described as follows

$$ min \quad c^{T} v $$
(27)
$$ Av = b $$
(28)
$$ 0 \le v_{i} \le v_{max} ,\quad \,i = 1,2, \ldots , n. $$
(29)

To solve an optimization problem through neural computation, the key is to propose the problem in a neural network whose steady state represents the solution to the optimization problem [21]. The state equations of the analog neural network are presented as follows

$$ \dot{u}\left( t \right) = - \eta A^{T} Av\left( t \right) + \eta A^{T} b - c\xi \left( t \right) $$
(30)
$$ v_{i} \left( t \right) = \frac{{v_{max} }}{{1 + exp\left[ { - \beta u_{i} \left( t \right)} \right]}}, i = 1,2, \ldots ,n $$
(31)

where \( u\left( t \right) \in {\mathbb{R}}^{n} \) is the instantaneous input vector of the network to the neurons and \( v\left( t \right) \in R^{n} \) is the state vector of the activation respectively. The initial conditions \( u\left( 0 \right) \) y \( v\left( 0 \right) \) are initialized randomly, \( \xi \left( t \right) \in {\mathbb{R}}^{n} \) is an auxiliary state vector and \( \xi \left( 0 \right) > 0, \eta , \beta , y T, \) are positive scalar parameters. The dynamic neural network proposed for linear programming consists of \( n \) connected artificial neurons massively. The connection weights between the neurons are given by \( - \eta A^{T} A \) and the polarization thresholds of the neurons are given by \( \eta A^{T} b. \) Figure 5 represent the block diagram of (30) and (31).

Fig. 5.
figure 5

Proposed dynamic neural network

For a neural network to perform a solution procedure for a linear programming problem, the steady state of a neural network must represent at least one feasible solution in the feasible region. To this end, two theorems are derived from [21].

Theorem 1.

The steady state of the proposed neural network represents a feasible solution to the problem of linear programming (2729), \( lim_{t \to \infty } v\left( t \right) \in \hat{V} \).

Theorem 2.

If \( T \gg \frac{4}{{\beta V_{max} \lambda_{min} }}where\,\lambda_{min} = min\left\{ {\lambda_{i} ;\,i = 1,2, \ldots ,min\left\{ {m,n} \right\}} \right\} \) and \( \lambda_{i} \) is the \( i - {\text{ieth}} \) of \( \eta A^{T} A, \) then the steady state of the proposed neural network represents an optimal solution to the linear programming problem (2729), \( lim_{t \to \infty } v\left( t \right) = arg \,min_{{v \in \hat{v}}} c^{T} v. \)

According to Theorem 1, the asymptotic stability of the proposed neural network implies the viability of the solution generated by the neural network.

5 Simulation Results

To achieve the optimization of the operation of a microgrid it is necessary to know the generation capacities of the renewable energy sources, as well as to estimate the energy demand in a determined period with the ability to make estimates from previously measured data. The simulation results are presented for the operation optimization of the microgrid installed in the Faculty. To perform the microgrid simulations, predictions of wind and photovoltaic power, wind speed and energy demand are considered, using high order neural networks. Each sample of the time series used in each prediction process is the average measurement at fifteen-minute intervals.

A neural network predictor for wind speed and wind power is implemented based on the high order recurrent neural network training method with Kalman filter. First, the optimum vector dimension is determined, then the number of hidden units for both hidden layers are selected. The training of the network is performed using measured data every fifteen-minutes for five days.

To train the high order recurrent neural network for each variable corresponding to wind generation, the following design parameters for each neural network was followed:

  • 7 regressors

  • 10 elements in the hidden layer

  • 1 neuron in the output layer

  • 250 maximum iterations

  • The synaptic weights values were initialized randomly

The wind system has two wind turbines of 10 kW each, and the total wind power is applied to the inverter mathematical model, the result is illustrated in Figs. 6 and 7. A good prediction horizon was obtained with an average square error of 0.0048 for the prediction of wind speed and 0.0050 for wind power.

Fig. 6.
figure 6

Wind speed prediction of the wind system area (five days)

Fig. 7.
figure 7

Wind power prediction of the system installed in the Faculty (five days)

The total photovoltaic power generated by 86 panels installed in the Faculty is applied to the mathematical model of the inverter to obtain the power of the photovoltaic system, and the result is illustrated in Fig. 8. For the prediction of photovoltaic generation, the data was normalized before being processed by the network and the output of the network was scaled, the following design parameters for the neural network was followed:

Fig. 8.
figure 8

Photovoltaic power prediction (five days)

  • 8 regressors

  • 8 neurons in the hidden layer

  • 1 output neuron

  • 200 maximum iterations

  • The synaptic weights values were initialized randomly

For the prediction of energy demand, the following design parameters for the neural network was followed:

  • 6 regressors

  • 8 neurons in the hidden layer

  • 1 neuron in the output layer

  • 200 maximum iterations

  • The synaptic weights values were initialized randomly

The prediction of the energy demand used in the simulation is presented in Fig. 9. Previously obtained data corresponding to the energy consumption of the mechatronics building in the Faculty. The prediction was successful with a good prediction horizon and a mean square error of 0.00012.

Fig. 9.
figure 9

Energy demand of the building (five days)

From the predictions and the tariff scheme, the algorithm determines if it is necessary to perform energy storage in the battery bank and when it should be used, taking as constraints the maximum and minimum state of charge of the batteries. On the other hand, in the case where the current power delivered by the photovoltaic and wind system is not enough to satisfy the demand, the management system determines the amount of power that it must acquire from the public grid.

After obtaining the predictions corresponding to the power and wind speed, photovoltaic generation and energy demand, they were used in a high order recurrent neural network, where the energy loads management is performed. Figure 10 shows the graph of five days of generation and consumption respectively. According to the results obtained in the simulation, it is observed that the energy demand is always higher than the generation of the wind and photovoltaic systems, and the battery bank, so the system determines the amount of power that is lacking and this is acquired from the public grid.

Fig. 10.
figure 10

Power flow in the microgrid with the management system (five days)

In Mexico de the information of the energy cost from the public grid is available on its website, in this work, a maximum rate of $ 3.85 per kWh of energy consumed to the public grid was established. According to the results obtained in the simulation, it is obtained that the total operation cost of the microgrid is $ 1395.70, where the daily power consumption of the public grid in kWh is 172.85 and the monthly energy consumption in kWh is 5185.73.

The state of charge of the batteries in the system operation, as is illustrated, the loading and unloading behavior is very linear, this behavior is because the energy demand is always higher than the energy generated and stored, so the batteries are in constant operation. The system behaves correctly within the range of the parameters set.

The main advantage of the computational intelligence techniques presented in this chapter is the availability of a reliable tool for forecasting the energy production and the corresponding distribution of the charges and storage of the batteries using artificial neural networks.

6 Conclusions

In this work, the optimization of the operation of a microgrid based on recurrent neural networks was performed. According to the results obtained, it is established that the proposed network configuration proves to be functional. In addition, based on the proposed configuration, it is possible to implement mathematical models of the different elements of the system. The goal was to determine the optimum amounts of energy for wind, solar, battery bank and public grid systems.

High order recurrent neural networks were applied to predict the energetic variables presented in the microgrid with good estimation results. The network used has a compact structure but considering the dynamic nature of the system that is required to predict the behavior, high order neural networks demonstrated in the simulation to be a tool that adequately models the complexity associated with the dynamics of energy generation. The importance of having a permanent measurement system is that it leads users sooner or later to achieve improvements in the electrical system and obtaining energy savings based on a real base of comparison, as well as energetic.

The number of iterations in the range of 200 to 250 was chosen to improve the speed of convergence, since a greater number of iterations does not significantly improve the error, but the computation time increases. Likewise, it was tested with a greater number of neurons, however, the result did not improve, so it was decided to use as few neurons as possible, without losing fidelity at work.