{'fraction_non_alphanumeric': 0.030647648419429453, 'fraction_numerical': 0.010440760729889488, 'mean_word_length': 4.9622677647960165, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Advanced Control for Energy Management of Grid-Connected Hybrid Power Systems in the Sugar Cane Industry

This work presents a process supervision and advanced control structure, based on Model Predictive Control (MPC ) coupled with disturbance estimation techniques and a finite-state machine decision system, responsible for setting energy productions set-points. This control scheme is applied to energy generation optimization in a sugar cane power plant, with non-dispatchable renewable sources, such as photovoltaic and wind power generation, as well as dispatchable sources, as biomass. The energy plant is bound to produce steam in different pressures, cold water and, imperiously, has to produce and maintain an amount of electric power throughout each month, defined by contract rules with a local distribution network operator (DNO). The proposed predictive control structure uses feedforward compensation of estimated future disturbances, obtained by the Double Exponential Smoothing (DES ) method. The control algorithm has the task of performing the management of which energy system to use, maximize the use of the renewable energy sources, manage the use of energy storage units and optimize energy generation due to contract rules, while aiming to maximize economic profits. Through simulation, the proposed system is compared to a MPC structure, with standard techniques, and shows improved behavior.


INTRODUCTION
Energy generation in efficient ways is a key element for achieving greater goals aiming sustainable and eco-friendly development. The current foundations on energy generation are about to change in a profound way: affordable fossil fuel reserves are decreasing each year whereas, at the same time, energy demands grow in every country.
Notably, in the instance of this work, the Brazilian energy scenario will be taken into account, for the country has an immensely diversified energy matrix, as seen on Ministério de Minas e Energia (2015). The sugar cane processing plants, studied in González (2011), are, as well, particularly significant to this study, given the importance of sugar-ethanol power plants in the Brazilian energy setting and knowing that these are mostly established in high insolation sites, they become potential candidates to be managed as distributed power plants of hybrid sources, as seen in Costa Filho (2013), considering biomass, biogas, solar and wind power energy.
The optimization of a hybrid energy generation system, with the reuse of the sugar cane residues coupled with the The authors thank CNPq and Ministerio de Economía y Competitividad de España for financing the projects CNPq401126/2014-5, CNPq303702/2011-7 and DPI2016-78338-R.
use of other renewable sources, external to the plant, as photovoltaic panels and wind turbines, is discussed herein. The studied energy plant is based on a real sugar cane power plant and has to attend to process electric and steam demands and, also, ensure a pre-established multiobjective energy sales contract with the local Distribution Network Operator (DNO).
The control of hybrid generation and storage, including renewable and non-renewable sources, is a significant issue to be studied in order to allow the optimal management and operation, carrying out a coordination between legal standards, minimal environmental standards and state of the art techniques Ferrari-Trecate et al. (2004). Recent works have brought to light MPC -based control structures used for energy management of microgrids (a set of generators, loads and storage units that operate together, in isolated mode, or connected to the main grid) with renewable sources. Valverde et al. (2013) shows a MPCcontrolled hydrogen-based domestic microgrids; Garcia-Torres and Bordons (2015) also refer to optimal generation for renewable microgrid; Mendes et al. (2016) propose MPC structure for energy management of experimental microgrids, coupled with hydrogen storage systems. Solar radiation and wind speed present frequent changes due to climatic issues, and its stochastic behavior repre-

INTRODUCTION
Energy generation in efficient ways is a key element for achieving greater goals aiming sustainable and eco-friendly development. The current foundations on energy generation are about to change in a profound way: affordable fossil fuel reserves are decreasing each year whereas, at the same time, energy demands grow in every country.
Notably, in the instance of this work, the Brazilian energy scenario will be taken into account, for the country has an immensely diversified energy matrix, as seen on Ministério de Minas e Energia (2015). The sugar cane processing plants, studied in González (2011), are, as well, particularly significant to this study, given the importance of sugar-ethanol power plants in the Brazilian energy setting and knowing that these are mostly established in high insolation sites, they become potential candidates to be managed as distributed power plants of hybrid sources, as seen in Costa Filho (2013), considering biomass, biogas, solar and wind power energy.
The optimization of a hybrid energy generation system, with the reuse of the sugar cane residues coupled with the use of other renewable sources, external to the plant, as photovoltaic panels and wind turbines, is discussed herein. The studied energy plant is based on a real sugar cane power plant and has to attend to process electric and steam demands and, also, ensure a pre-established multiobjective energy sales contract with the local Distribution Network Operator (DNO).
The control of hybrid generation and storage, including renewable and non-renewable sources, is a significant issue to be studied in order to allow the optimal management and operation, carrying out a coordination between legal standards, minimal environmental standards and state of the art techniques Ferrari-Trecate et al. (2004). Recent works have brought to light MPC -based control structures used for energy management of microgrids (a set of generators, loads and storage units that operate together, in isolated mode, or connected to the main grid) with renewable sources. Valverde et al. (2013) shows a MPCcontrolled hydrogen-based domestic microgrids; Garcia-Torres and Bordons (2015) also refer to optimal generation for renewable microgrid; Mendes et al. (2016) propose MPC structure for energy management of experimental microgrids, coupled with hydrogen storage systems. Solar radiation and wind speed present frequent changes due to climatic issues, and its stochastic behavior repre-

INTRODUCTION
Energy generation in efficient ways is a key element for achieving greater goals aiming sustainable and eco-friendly development. The current foundations on energy generation are about to change in a profound way: affordable fossil fuel reserves are decreasing each year whereas, at the same time, energy demands grow in every country.
Notably, in the instance of this work, the Brazilian energy scenario will be taken into account, for the country has an immensely diversified energy matrix, as seen on Ministério de Minas e Energia (2015). The sugar cane processing plants, studied in González (2011), are, as well, particularly significant to this study, given the importance of sugar-ethanol power plants in the Brazilian energy setting and knowing that these are mostly established in high insolation sites, they become potential candidates to be managed as distributed power plants of hybrid sources, as seen in Costa Filho (2013), considering biomass, biogas, solar and wind power energy.
The optimization of a hybrid energy generation system, with the reuse of the sugar cane residues coupled with the use of other renewable sources, external to the plant, as photovoltaic panels and wind turbines, is discussed herein. The studied energy plant is based on a real sugar cane power plant and has to attend to process electric and steam demands and, also, ensure a pre-established multiobjective energy sales contract with the local Distribution Network Operator (DNO).
The control of hybrid generation and storage, including renewable and non-renewable sources, is a significant issue to be studied in order to allow the optimal management and operation, carrying out a coordination between legal standards, minimal environmental standards and state of the art techniques Ferrari-Trecate et al. (2004). Recent works have brought to light MPC -based control structures used for energy management of microgrids (a set of generators, loads and storage units that operate together, in isolated mode, or connected to the main grid) with renewable sources. Valverde et al. (2013) shows a MPCcontrolled hydrogen-based domestic microgrids; Garcia-Torres and Bordons (2015) also refer to optimal generation for renewable microgrid; Mendes et al. (2016) propose MPC structure for energy management of experimental microgrids, coupled with hydrogen storage systems. Solar radiation and wind speed present frequent changes due to climatic issues, and its stochastic behavior repre- Abstract: This work presents a process supervision and advanced control structure, based on Model Predictive Control (MPC ) coupled with disturbance estimation techniques and a finite-state machine decision system, responsible for setting energy productions set-points. This control scheme is applied to energy generation optimization in a sugar cane power plant, with non-dispatchable renewable sources, such as photovoltaic and wind power generation, as well as dispatchable sources, as biomass. The energy plant is bound to produce steam in different pressures, cold water and, imperiously, has to produce and maintain an amount of electric power throughout each month, defined by contract rules with a local distribution network operator (DNO). The proposed predictive control structure uses feedforward compensation of estimated future disturbances, obtained by the Double Exponential Smoothing (DES ) method. The control algorithm has the task of performing the management of which energy system to use, maximize the use of the renewable energy sources, manage the use of energy storage units and optimize energy generation due to contract rules, while aiming to maximize economic profits. Through simulation, the proposed system is compared to a MPC structure, with standard techniques, and shows improved behavior.

INTRODUCTION
Energy generation in efficient ways is a key element for achieving greater goals aiming sustainable and eco-friendly development. The current foundations on energy generation are about to change in a profound way: affordable fossil fuel reserves are decreasing each year whereas, at the same time, energy demands grow in every country.
Notably, in the instance of this work, the Brazilian energy scenario will be taken into account, for the country has an immensely diversified energy matrix, as seen on Ministério de Minas e Energia (2015). The sugar cane processing plants, studied in González (2011), are, as well, particularly significant to this study, given the importance of sugar-ethanol power plants in the Brazilian energy setting and knowing that these are mostly established in high insolation sites, they become potential candidates to be managed as distributed power plants of hybrid sources, as seen in Costa Filho (2013), considering biomass, biogas, solar and wind power energy.
The optimization of a hybrid energy generation system, with the reuse of the sugar cane residues coupled with the use of other renewable sources, external to the plant, as photovoltaic panels and wind turbines, is discussed herein. The studied energy plant is based on a real sugar cane power plant and has to attend to process electric and steam demands and, also, ensure a pre-established multiobjective energy sales contract with the local Distribution Network Operator (DNO).
The control of hybrid generation and storage, including renewable and non-renewable sources, is a significant issue to be studied in order to allow the optimal management and operation, carrying out a coordination between legal standards, minimal environmental standards and state of the art techniques Ferrari-Trecate et al. (2004). Recent works have brought to light MPC -based control structures used for energy management of microgrids (a set of generators, loads and storage units that operate together, in isolated mode, or connected to the main grid) with renewable sources. Valverde et al. (2013) shows a MPCcontrolled hydrogen-based domestic microgrids; Garcia-Torres and Bordons (2015) also refer to optimal generation for renewable microgrid; Mendes et al. (2016) propose MPC structure for energy management of experimental microgrids, coupled with hydrogen storage systems. Solar radiation and wind speed present frequent changes due to climatic issues, and its stochastic behavior repre- sents an additional challenge to energy management in renewable energy based power systems. Estimation of the future behavior of these variables is also important to the studied hybrid generation system. The importance of disturbance estimation is thoroughly discussed on Pawlowski et al. (2010) and Pawlowski et al. (2011).
In this work, a two-layer advanced control strategy is proposed to deal with the system's operational requirements and find an optimal operating point. The top level consists of a process supervision and decision layer and is responsible for deciding the monthly energy sale goal, while the second layer is composed by a MPC algorithm that aims to provide a stable operating point according the control goals and system constraints. The advanced control structure must be able to deal with the effect of the non-dispatchable disturbances predictions on the system operation conditions. By this, this study deals with the estimation of disturbances with long-term prediction horizons, as depicted on Reikard (2009), based on timeseries methods, seen on Brockwell and Davis (2002).
This paper is organized as follows: section 2 presents the studied power plant discrete model and the respective energy contract rules, section 3 describes the process supervision and decision layer, depicting the optimization problems that have to be solved and detailing the MPC control structure, section 4 presents the disturbance forecasting methods used to estimate wind speed and solar radiation. Finally, section 5 shows simulations of the proposed control strategy. The paper ends with conclusions.

THE STUDIED PROBLEM
The hybrid generation energy system herein studied is based upon a sugar cane processing plant, that produces sugar, ethanol and electric power. This system is composed by the following subsystems: two boilers, with different efficiencies; two steam turbines, with different efficiencies; a combined heat and power system, denoted as CHP ; a water chiller; a hot water tank; photovoltaic panels; water heating solar panels; a wind turbine; two pressure reduction valves; one heat exchanger; stocks of bagasse, straw and compressed biogas and a battery bank. This plant is interesting from an economic and sustainable point-of-view, as it proposes the use of renewable sources and the recycling of the sugar cane residues, aiming to use the best possible technology for sustainable energy generation.
This plant has four demands to satisfy: electric power demand, due to ethanol and sugar production process; middle and low pressure steam demands, defined by the process, and refrigeration (chilled water) demands, used to cool down generators, oil tanks and water for fermentation units. It is important to mention that satisfying each demand alone is not adequate, as they are inextricably linked.

Hybrid Energy Plant Model
It is important to depict the studied hybrid generation energy plant more minutely, as seen in Morato et al. (2016). Figure 1 shows the outline of the studied plant and  The studied energy plant is composed of internal stocks, put as system states. The use of intermediate storage units allows the system to accumulate energy (or biomass, that can be converted into energy) when the renewable generation is high and use fit when there is no renewable production. From a discrete time standpoint, a state x s , at sampling time k + 1, depends on the state at previous sample k and on the total exchanged flowȗ E s (k) during the period ∆T , ranging from k to k + 1, assumingȗ E s (k) to remain constant during ∆T -this is: x s (k+1) = A s x s (k)+ u E s (k)∆T . As described in Geidl (2007), the discrete state space representation model of the studied plant can be put as in (1). This mathematical model was obtained and validated through simulation and with the use of experimental data; to see full details refer to Morato et al. (2016) and Mendes (2016).
The system state vector is defined as on (2), where each entry represents the normalized percentage of each stock: battery bank, bagasse stock, straw stock, biogas stock and hot water tank. The system's manipulated variables are continuous and are put in table 1. The set-points will be treated by lower level internal controls. The complete manipulated variables vector is seen on (3). In terms of the system's outputs, the output vector is defined as on (4), Proceedings of the 20th IFAC World Congress Toulouse, France, July 9-14, 2017 being P P roc the electric power produced due to the sugar cane processing demand (kW ); Q M V the flow of middle pressure steam ( t h ); Q L V the flow of low pressure steam ( t h ); Q CW the flow of cold water required by the distillery process ( m 3 h ); finally, P Sale represents the electric power made available for the external network (kW ).
And, finally, the external disturbances to the system are herein put as on (5), being W nd in the speed of the wind (measured in km h ) present in the microgrid's area, used by the wind turbines to generate electric power, and Irrd in the amount of solar irradiation (measured in W m 2 ) on the microgrid's solar panels (photovoltaic and water heating). Bag in , Str in and Bg in represent the income (t/h) of bagasse, straw and compressed biogas to the respective stocks. These last three are known and well-described curves, whereas the first two are not -from a control pointof-view, they shall be estimated, as put in subsection 4.

Electric Energy Contract
The electric power that has to be produced by the microgrid consists of two factors: the internal power demands, to maintain the sugar cane processing -in average 5.76 GW h per month, and the amount of energy that is sold to the local distribution network operator (DNO). The later is a key point to this study. The rules accorded with the DNO can be summarized as this: the plant has to supply at least χ = 11.52 GW h (obligatory) of energy per month, without paying for transmission fees, and can supply more than χ, but, then, paying for the transmission fees (optional).
In the scenario of a production greater than χ, it is only profitable (without economic loss) when the production is greater or equal to 2χ per month. So, the energy production goals have to abide by the rules set in figure 2. It is important to remark that this studied energy plant has a generation capability of 2.5χ per month. It is also wise to mention that the contract rules also state that there is a tolerance of ψ = 15% when the production is over χ.

Fig. 2. Contract Production Rules
This work focuses on solving the problem brought by the energy production rules, proposing a process supervision and decision layer, composed by a finite state machine (FSM ), that aims to maximize production, whenever possible, using the future disturbance estimation information, passing energy production set-points to an advanced control layer.

PROPOSED SOLUTION
As depicted beforehand, the main problem to be addressed by this work is to maximize production, in the most efficient and profitable way, while always abiding to energy production contract rules (seen in figure 2), using the future disturbance estimation information. This shall be solved with an hierarchical control structure, as defined on Galus and Art (2012) and explained on this section.
The studied plant has to produce the contract-defined amount of electric energy, while still meeting all the system demands: internal power demand, steam demands and refrigeration demands. The optimization has to define the manipulated vector (3) so that the monthly production of energy corresponds to the set-point and the system state vector (2) follows a reference (for example: all stocks at 50 %). This is subject to the following restrictions: i) The manipulated variables have to stay within physical limits; ii) The system output vector (4) has to contemplate the system demands; iii) The system state vector (2) has to stay within bounded operational bands.
For this, a hierarchical control strategy is proposed, composed of two levels: a process supervision and decision layer, composed by a finite state machine (FSM ), and a Disturbance Estimation algorithm (DES ), that passes energy production set-points to a MPC predictive controller, which represents the lower level.
A view of the complete proposed system control strategy is seen in figure 3, depicting the FSM, the disturbance estimation, the MPC controller and the energy plant (process). The interactions between the two layers is, then, clear: the DES estimation algorithm is responsible for providing the future disturbance estimation for the FSM and the MPC (with different sampling rates); then, the FSM decides which operational set-point should be passed to the MPC (given estimation and produced energy data); finally, the MPC controller computes the control action u at every instant k and applies it to the process; there is a feedback of measured output y to the MPC controller and to the FSM.

Process Supervision and Decision Layer
The process supervision and decision layer is composed by a finite state machine of three states (X), correlated with the energy production goals: χ, 2χ and 2.5χ. As stated, χ represents the obligatory energy generation of 11.52 GWh per month. Every half day, the FSM decides whether to change or not the state, which implies on the set-points passed to the control layer. It is important to remark that this decision layer acts every ∆T = 12 h. This sampling period, chosen through simulation study, is appropriate so that there are not too many set-point changes and the influence of the oscillation of weather prediction on the MPC (lower level) is avoided.
The decision strategy is based on the future disturbance estimation data. The supervision structure knows how much energy has already been produced and makes a model-based (as put in section 4) end-of-month production estimate (P k ) of the controlled energy plant, taking into account the future disturbance estimations and the amount of produced energy. If the euclidean distance (d) between the iteration state X k andP k is greater than ψ (the production goal cannot be achieved), there is a state transition, so that the amount of produced energy, at the end of the month, never settles inside the unwanted interval (χ, 2.χ). What is of importance from the estimated future disturbance data to the FSM is the mean value of the data, so the effect of small prediction mistakes is mitigated.
The initial FSM state X 0 is set by the initial disturbance predictions. ψ is defined by the contract rules boundaries. The transitions between the FSM state can be exemplified: given a certain month, at day 15, the system is following a 2.5.χ energy production set-point, but the estimate of future disturbances is low, so the production estimate P 15 is inside 2χ ± ψ, then, there is a transition from state 2.5χ to 2χ. The schematic figure 4 and algorithm 1 explicit the FSM operation.
The state transitions conditions, seen on the algorithm, when ||P k − X k || ≤ ψ, were defined empirically, given the energy plant model.

Predictive Control Strategy
The Model Predictive Control strategy aims at demand optimization, one of the key topics of this study and was previously used with success to control renewable energy based power plants, as seen on Mendes et al. (2015). The proposed MPC controller works at sampling time ∆T = 1 h and uses future estimation data of wind speed and solar radiation. It has the following objective function: SP ← X k Pass Set-Point to Lower Layer where E sum represents the electric energy that has already been produced by the microgrid, at given iteration k; SP F SM represents the energy production set-point given by the FSM ; the system state reference is put asx ref ; N p = 12 h represents the prediction horizon, while N c = 5h represents the control horizon. As it can be seen, (SP F SM − E sum ) represents how much electric energy the microgrid still has to produce until the end of the month, due to contract requirement. For this, when minimizing ∆T ], the main controller forces the production of energy at iteration k to approach the necessary amount to meet the contract requirement, so, by the end of the month, the amount of electric energy supplied to the network is the one defined by contract. The objective function (6) is subject to the following constraints: 0 ≤ P ot N etwork (k) (10) for i = 0, . . . , N p − 1, where q u is a positive defined vector, Q P and Q x are positive definite weighting matrices. The notation hat over variables (â) is used to denote variables over the prediction horizon, a i andā i denote minimum and maximum allowed values respectively. The matrix Q P is adjusted so that the electric energy production is prioritized; Q x is used to maintain the system state vector values near a referenced region of 50 % of all stocks. The vector q u is used so that the production of energy comes preferably from the most efficient and sustainable energy sources. It is important to remark that the model used by the controller to compute u is based on what is put on (1), where z represents, here, the estimated disturbances.
Proceedings of the 20th IFAC World Congress Toulouse, France, July 9-14, 2017 Details about the implementation and solution to the MPC problem presented herein are clearly explained on Morato et al. (2017).

DISTURBANCE FORECASTING METHODS
This section exposes the selected time-series methods used, herein, to estimate wind speed and solar radiation present on field. The estimated curves are based upon real meteorological data from a real sugar cane processing plant, settled on the state of Paraná, Brazil. A time-series can be put as a continuous or discrete sequence of events Hamilton (1994) and can be applied to identify and analyse the nature of different phenomena, depicted as a sequence of measurements.
In this work, the Double Exponential Smoothing (DES ) technique is used to estimate the behavior of wind speed and solar radiation curves, present on the studied hybrid energy plant. The DES technique can be depicted, as seen in LaViola (2003), by the following equations: where S k is the forecast to be adjusted, b k is the predicted course, α and λ 1 are the smoothing parameters for the curve and the course, respectively. The actual measured event of the time-series z k is used to compute the respective smoothed value S k in the DES. The next (estimated) sample event and j steps ahead event are given bŷ The initial values for S 0 and b 0 follow the suggestion put in Finally, it is important to show the estimation of the disturbances by the DES technique. Figure 5 shows the respective DES time-series estimation curves to wind speed and solar radiation present on the field, with a 12 hour prediction horizon, compared with real meteorological data. It is notable how this chosen technique can be helpful to the advanced control structure and to the decision layer, presenting good estimations to the studied curves.

APPLICATION AND RESULTS
The results of the proposed control strategy, applied to a simulated model of the studied energy plant, are presented in this section. The control strategy and process supervision and decision layer were implemented using the software Matlab Mathworks (2009) with Yalmip toolbox 1 α and λ ∈ (0, 1) can be obtained by optimization techniques Lofberg (2004) andCPLEX solver ILOG (2007). Once again, the tuning of the predictive controller is thoroughly discussed on Morato et al. (2017). The control objectives are to maximize the use of renewable energy sources, ensure the energy production defined by contract and ensure the load demand at all periods of time. The use of the renewable sources and the respectfulness to contract rules are visible.
The results of the proposed advanced control strategy, coupled with the FSM and the efficient disturbance estimation (DES ), are summarized on figures 6 and 7.
Firstly, figure 6 displays the need for the FSM decision layer: the production starts with a set-point of χ, but, as the days pass, the FSM cognizes the possibility of generating 2χ and, later on, 2.5χ, given the high prediction (DES ) of non-dispatchable renewable sources (wind speed and solar radiation). The proposed control structure (MPC+DES+FSM ) is compared with a "complete" predictive control structure (MPC-Perfect), that has the actual future disturbance information (instead of the DES estimates) and follows a fixed set-point of 2.5χ. It can be observed that the proposed structure presents a very close behavior to the MPC with future disturbance knowledge case, being robust.
Finally, figure 7 shows a different simulation scenario, where the presence of renewable energy sources gradually increases during the month. A raw MPC controller (only lower layer of the full proposed advanced control structure) is set to a χ energy production set-point, for the given month. This controller is compared with the proposed structure (MPC+FSC+DES ), set on the same month. It can be seen that the proposed structure can manage to produce 2.5χ, given the presence of the FSM and the continuous predictions of the DES layer, while the raw MPC infringes the energy contract rules (penalty region), given the gradual increase of the renewable sources.

CONCLUSION AND FUTURE WORK
This paper presented the issue of controlling a microgrid that integrates renewable energy generation and hybrid storage technologies, with energy production rules. A MPC control structure and a process supervision and decision layers, combined with disturbance estimation techniques were proposed to perform the electric energy production optimization, management of storage and subsystems and maximize economic profit. As showed by the simulation results, the proposed control structure presented satisfactory results. On future publications, the exploitation of different operating scenarios (months with different seasonal conditions) shall be presented and discussed with care. For future works, an interesting theme is to study other disturbance estimation techniques and a higher level management system, considering different contracts of electric energy production to be diluted upon several microgrids.