Energy Management System for Smart Grids: Tests in Cyber-Physical Mode

. The objective of this work regards the laboratory assessment of the energy management system (EMS) for a smart grid, to be applied to the Eigerøy island (Norway) inside the H2020 ROBINSON project. The smart grid is based on the integration of industrial needs (a steam boiler fueled by LNG) with renewable sources and waste recycling (internal production of syngas and biogas). The mentioned EMS, developed to minimize energy generation costs, includes an optimization tool and a Model Predictive Control (MPC) software for the calculation of the activation and the set-point values of the prime movers. Moreover, a special scheduling approach was proposed for the electrolyzers connected to a hydrogen storage pressure vessel. In this work the EMS was tested in cyber-physical mode in the Innovative Energy Systems (IES) laboratory of the University of Genoa. In details, the tests were performed coupling component models with real hardware (microturbine and solar panels) available in the laboratory. The obtained optimization performance was highlighted on the basis of a comparison with a standard management of the smart grid.


Introduction
Considering the worldwide energy scenario and the related environmental issues [1], polygeneration smart grids represent an important option for future generation, especially if including (or fully based) on renewable sources [2].This technology could be significantly interesting for islands including the management of different energy sources, such as with resource recycling in industrial symbiosis layouts.Another important contribution could come from energy storage in the hydrogen form, allowing energy security margin and optimization opportunities for compensating the variability of renewable sources, such as wind or solar systems [3].Due to these aspects, the ROBINSON H2020 European Union project is aiming to integrate different generation types under the supervision of an Energy Management System (EMS), a real-time software for the smart grid optimization [4].The effectiveness of the energy system optimal management was demonstrated by different previous activities on the basis of different algorithms [5,6] usually applied in offline mode.However, few activities performed real-time optimization of energy generation applied to hardware components.So, considering that the final ROBINSON aim will be the concept demonstration in the Eigerøy island (Norway), this paper shows the EMS experimental validation performed in the Innovative Energy Systems laboratory of the University of Genoa [7].Due to the difficulties to have the same components of the demo site, the validation is performed in cyber-physical mode (available hardware interacting with software for what not physically installed in the laboratory and the EMS), an effective approach as demonstrated in previous activities [8].This is an important innovation of this work due to the possible EMS validation using an experimental method, with the laboratory flexibility (in case of wrong operations it is possible to stop the test and perform the necessary changes without the complexity of a real demo site).So, this approach is an important improvement in the EMS development process reducing the tool refining time that would be necessary without this laboratory intermediate step.

Grid layout and Energy Management System
The polygeneration grid layout for the Eigerøy island is reported in Fig. 1, including the interaction with the EMS.The energy demands are: (i) the electrical needs for houses, industries and vehicles, (ii) the steam needs (thermal demand) for the Prima Protein industry [4] and (iii) the hydrogen demand for truck charging.The grid is equipped with these technologies: (i) a microturbine able to produce 400 kW electrical power, (ii) a 22 MW boiler for steam generation, (iii) two electrolyzers of 500 kW size (consumed electrical power), (iv) a very small bioelectrochemical anaerobic digester (<0.25 Nm 3 /day of biogas) using the industrial waste, and (v) a wood gasifier for producing about the 70% of the microturbine fuel, (vi) a 100 kW wind turbine and (vii) solar photovoltaic panels.The grid also includes a hydrogen pressure vessel (40 m 3 ) for storage reasons, and a gas mixer for fuelling the microturbine.It is important to highlight (as in Fig. 1 scheme) that the microturbine thermal power generation (an A400 machine in cogeneration -CHP -mode [9]) is a boiler input (to pre-heat the water upstream of the steam generation).The anaerobic digester and the gasifier are not included in Fig. 1 because they are not directly controlled by the EMS due to their very slow response.So, they are supposed to be operated by an internal control system to maintain constant the pressure in their outlet buffers.The sizes of these systems were not obtained from an optimization process.They were defined considering the following aspects: (i) the boiler was already installed in the Eigerøy site to satisfy the steam needs, (ii) the microturbine and the wind turbine were sized to cover an electrical demand representative of an average behaviour, (iii) the size of the electrolyzers was based on the available commercial devices and the hydrogen demand (considering a 6-hour safety margin with the microturbine at maximum), (iv) the hydrogen vessel was defined considering the available space and to ensure 12-hour autonomy for the microturbine.

The Energy Management System
The Energy Management System (EMS) is composed of a decision maker and a Model Predictive Control (MPC) tool.The first component calculates the optimal management strategy with a 15-minute time step, obtaining the values of the machine preliminary set points (r in Fig. 1) to minimize the variable costs.The second software is a controller that provides the actual set-point calculations taking into account the dynamic response aspects of the devices.
The decision maker performs a cost minimization on the basis of a cost function composed of the following terms: costs related to the exchanges with the electrical grid (this is negative in case of energy selling), operation and maintenance costs, fuel costs for the turbine and costs related to the machine startup operations.The decision variables are two electrical power values: the one exchanged with the grid and the amount produced by the turbine.The optimization problem, that is performed with the "patternsearch" function called in Matlab-Simulink, includes some constraints: minimum and maximum values for the devices (grid, turbine) and the electrical demand matching needs (the algebraic sum of the turbine produced electrical power and the grid power needs to be equal to the related demand).Moreover, since the system has to satisfy the thermal demand too (not associated to a cost due to an internal production/consumption), three cases have been defined: (i) thermal demand lower than the turbine minimum, (ii) intermediate situation, (iii) thermal demand higher than the maximum thermal generation by the gas turbine.For each case, two different options are implemented: if the electrical generation is suitable from cost point of view the turbine is at its optimal power condition (usually at its maximum at high load demand), if the electrical generation is not cost decrease effective the turbine is operated at its minimum (for case i), to satisfy the thermal demand (case ii) or switched off (case iii).All the details about this approach are reported in [10].The MPC tool was developed using the procedure by Wang [11].The initialization performs the time window definition for the prediction horizon (NP = 40 steps) and the receding control horizon (NC = 1 step).Moreover, the MPC development was based on information related to the turbine and the steam boiler, considering a linearized state-space representation.So, the MPC architecture is based on the following two functions: one for the discrete model predictive control (DMPC) and one for the observer [11].The model developed for the control implementation is based on an augmented state-space approach, i.e.Non-Minimal State Space [11].The observer estimates the system state at each time step, to be fed back to the DMPC dynamic model.The integration within the MPC is performed through the application of the Laguerre network to simplify MPC computation with tuneable parameters.Also for the MPC all details are reported in [10].
The management of the electrolyzers was implemented considering the connection with the storage vessel.So, a scheduling approach based on the electricity costs related to an entire day was included.In agreement with this approach, the electrolyzers are managed at maximum load (to recharge the storage vessel) when the electricity price is lower than the average, and they are managed by a devoted controller (with the minimum pressure set-point) in the opposite case.In details, the hydrogen vessel target pressures are 40 bar (low electricity price) or 22 bar (high electricity price).These set-point values are defined due to constraints provided by the manufacturer and to guarantee a good margin for energy safety.

Test rig
The rig used in this work is a test bench available at the Innovative Energy Systems laboratory of the University of Genoa.It was developed and installed in previous research activities on distributed generation topics with special attention to the experimental validation of EMS tools [7].This plant is a local grid (with electrical and thermal generators) including the following devices: a T100 microturbine operating in cogeneration mode, a 20 kW heat pump, 10 kWp thermal solar panels, 1.1 kWp photovoltaic panels, an absorption chiller, two hot water thermal energy storage tanks (5 m 3 each), a thermal grid composed of two distribution pipes and including fan coolers for generating local thermal loads, and a connection with the electrical grid.In this work, attention was focused on the components included in the ROBINSON project (Eigerøy site).For this reasons, the tests were performed involving just the following components of the laboratory: (i) the microturbine, (ii) the photovoltaic panels, (iii) the electrical grid, (iv) the thermal grid (including the fan coolers).Since the laboratory does not include all the ROBINSON components, the tests were performed in cyber-physical mode (software and hardware connected, communicating and operating in real-time mode).This is an effective solution (between software simulations and demonstrations) to introduce experimental aspects, without the critical costs and risks of a complete prototype.For this activity, the cyber-physical mode produced experimental results (for the EMS validation and improvement) before the demonstration, reducing time, costs and risks.The software/hardware communication is shown in Fig. 2. The software receives four measurements from the laboratory rig: produced electrical power by the turbine (±1% accuracy), produced thermal power by the turbine (±3% accuracy), turbine fuel mass flow (±1% accuracy), and power by the photovoltaic panels (±1% accuracy).The hardware receives two values from the software: the turbine on-off signal and the related set-point values.Moreover, a data conversion system was included to use the T100 microturbine (100 kW maximum electrical load) for calculations that regarded a 400 kW turbine (lookup tables were implemented to scale the signals in both senses).For the T100 microturbine, the operations were performed in the 30 kW -90 kW range to avoid problems due to external disturbances, such as the ambient temperature change.Also the photovoltaic panels included a signal re-scaling due to the different installed panel area, in comparison with the configuration in the Eigerøy site.Fig. 3. Electrical cost, demands and results in cyber-physical mode: EMS against simulations obtained with a standard component management, as described in [10].

Results
Attention in this work was focused on a specific part of the day proposed in [10].It is a working day related to November 2021 including the start-up of Prima Protein facilities.The electrical cost is shown in Fig. 3, including also the flag values for the management of the electrolyzers.Moreover, these costs were considered: 150 €/MWh for the LNG and 100 €/MWh for the syngas (maintenance and stat-up costs were neglected at this stage).Although this is a very high value for the syngas, it was chosen to operate the system in a range including CHP load change.
The results in Fig. 3 mainly show that the EMS maintained the CHP at its minimum during the low demand conditions coupled with low electrical energy price, while increased its load to the maximum when the electrical energy selling generated high earning.Finally, at high thermal demand and low electrical prices, the CHP was switched off.Fig. 3 shows a good load following for the boiler and the results for the management of the electrolyzers.The comparison with the standard management proposed in [10] produced a 12.9% cost decrease coupled with an important benefit also on the CO2 side (21.4% emission decrease).

Conclusions
Starting from the developed EMS and the simulation results presented in [10], this is an important improvement step for validating the EMS with an experimental rig.So, the test performed in cyber-physical mode validated the EMS capabilities producing a significant cost decrease (-12.9%) and benefits on the CO2 emission side (-21.4%).