A Real Model of a Micro-Grid to Improve Network Stability

This paper discusses the smart energy model of a smart grid using a significant share of renewable energy sources combined with intelligent control that processes information from a smart metering subsystem. An algorithm to manage the microgrid via the demand-response strategy is proposed, accentuating the requirement that the total volume of energy produced from renewable sources is consumed. Thus, the system utilizes the maximum of renewable sources to reduce CO2 emissions. Another major benefit provided by the algorithm lies in applying the current weather forecast to predict the amount of energy in the grid; electricity can then be transferred between the local and the main backup batteries within the grid, and this option enables the control elements to prepare for a condition yet to occur. Individual parts of the grid are described in this research report together with the results provided by the relevant algorithm.


Introduction
The initial period within the development of electricity systems began in the mid-19th century.At this stage, electric energy was transferred via direct current (DC); the main obstacle consisted in the impossibility of producing and transferring higher electric power rates.Alternating current (AC) and its production perspectives then became known around 1870.However, within electrification through alternate current, an essential move forward only came later with the inventions of the synchronous alternator, three-phase system, transformer, and asynchronous motor (demonstrated by N. Tesla in 1887).Since then, transmission systems have exclusively used AC current, although generally in micro-grids and smart grids, DC current has recently re-assumed importance for energy transmission [1][2][3][4] as it reduces line loss caused by reactive power [5].The AC system is commonly used in households because most appliances are designed for this related type of feeding, but there still remains the question of whether DC-based appliances could be a more advantageous solution for home micro-grids.Obviously, the concept includes the possibility of switching between DC and AC loads via converters [6]; in this context [5], characterizes a controlled, full-wave AC/DC rectifier integrated in a closed control loop.The basic criterion for embedding DC appliances in DC smart grid consists in the economy of use [7].
Currently, direct current is being increasingly provided by photovoltaic sources and wind power plants.Both of these renewable sources, however, often reduce the stability of the grid, and control algorithms are thus required to maintain stable voltage and frequency.Grid control and optimization possibilities are outlined in many articles, using a wide range of simple and sophisticated methods [8][9][10][11].Sanchez et al., for example, analyzed the stability issue by means of the Nyquist criteria, and with the impedance relation method [12].Conti et al. then describe micro-grid stabilization via central controller aggregates exploiting a genetic algorithm to ensure all the information necessary for optimal operation is present [13], and Colson et al. utilize particle swarm optimization in conjunction with dynamic programming [14].Another sophisticated method to optimize grid stability is enhanced bee colony optimization [15,16].
The basic micro-grid control tool is embodied in the demand-response (DR) algorithm, which can be coupled with the optimization procedures described above.DR-based programs constitute an effective approach to resolving the problem of wind and photovoltaic power fluctuations [17][18][19][20].Further, Cha et al. propose an operational algorithm for the individual agents of a test micro-grid that comprises a battery energy storage system (BESS) and an intelligent load [21].
The central purpose of a smart grid is to secure an effective way to manage the load growth, reduce the pollution of the environment, and improve the comprehensive energy efficiency and power supply reliability.The low carbon requirement is closely related to emission cutting in the automotive industry [22][23][24][25][26]. From the perspective of the demand-response strategy as well, it appears suitable to charge vehicles with a smart grid in order to help maintain the stability of the network [27]; for example, diverse strategies for the vehicle-to-grid (V2G) connection are discussed by L. Drude [28], who set his proposals in the urban region of Florianópolis, Brazil.
In micro-grids, the most frequent energy storage method relies on batteries [29,30].Another major option is to use a hybrid electrothermal storage system that employs a battery and a hot water tank along with an electrical water heater as a controllable load; all of these components then facilitate the actual energy management within the micro-grid [31].The solution presented within this paper combines a battery with metal hydride-based storage.
Generally, the proposed article describes a smart energy model (SEM) of a micro-grid and defines a management strategy suitable for micro-grid control within the Czech Republic.The SEM to be discussed herein constitutes a hardware implementation of a laboratory smart grid, a smart metering system, and a physical simulator of energy consumption, all materialized by the Laboratory of Automation and Embedded Systems of the Centre for Research and Utilization of Renewable Energy (CVVOZE, Brno, the Czech Republic).The purpose of the SEM is to simulate the different physical states in all types of smart grid networks and to develop new network types and related control possibilities.A major advantage of the discussed model lies in its simplicity and economical character (low initial set-up costs), and it is also important to note that various scenarios, including the demand-response approach, can be effectively tested.Two different levels of control algorithm testing are available: plain software simulation of the energy balance in the grid, and the use of real energy from renewable sources to control the micro-grid stability.The latter option is obviously more time-consuming.In the given context, the article also contributes to the general awareness of micro-grids and their varied applications.
The paper is organized as follows: Section 2 describes the overall technical specification of the smart energy model; in Section 3, the actual micro-grid is described; Section 4 defines the strategy of the control centre (CC); and Section 5 presents the conclusions of the study.

General Technical Specifications of the Smart Energy Model
Considering the simplicity of the physical materialization, safety of experiments, and low implementation costs, together with the proposed usage in households, farms, and other small energy consumers, the SEM operates with 24 V DC .In all, the entire model is based on physical testing and simulation, stabilizes the grid, and enables maximal exploitation of the electric energy produced by the appended renewable energy sources (such as photovoltaics, wind power plants, hydroelectric stations, and fuel cells).Energy consumption from the grid is controlled by the real-time embedded industrial controller made by National Instruments for industrial control systems-CompactRIO (Austin, TX, USA) and CB1 control blocks (Brno, Czech Republic).The smart grid portion of the SEM is connected with the smart metering portion; smart metering and consumption control represent typical small consumers that participate in the smart energy system, utilizing the demand-response principles.Depending on the cost of the energy, the individual consumer, in conjunction with the central control station, will switch on or off large electrical appliances in the household or, in general, "control" their consumption rates.A block diagram of the proposed experimental micro-grid is shown in Figure 1, which includes a functional characterization of the blocks and principles of the computer-based control; the thick lines denote the energy flows.industrial controller made by National Instruments for industrial control systems-CompactRIO (Austin, TX, USA) and CB1 control blocks (Brno, Czech Republic).The smart grid portion of the SEM is connected with the smart metering portion; smart metering and consumption control represent typical small consumers that participate in the smart energy system, utilizing the demand-response principles.Depending on the cost of the energy, the individual consumer, in conjunction with the central control station, will switch on or off large electrical appliances in the household or, in general, "control" their consumption rates.A block diagram of the proposed experimental micro-grid is shown in Figure 1, which includes a functional characterization of the blocks and principles of the computer-based control; the thick lines denote the energy flows.

Description of the DC Micro-Grid
A number of small or miniature power plants using renewable energy sources are connected to the grid; some of these can be found within the automation laboratory where the SEM is located.Importantly, PV panels are installed on the roof of the building; for practical reasons, however, a significant portion of the plants are based at remote locations.After being produced, the electrical energy (power) from these distant suppliers is measured by a data logger, which then communicates the obtained information via GPRS to the control centre (CC).The physical equivalent of the energy generated in such external power plants is simulated by a relevant remote energy source model-a remote energy source (RES)-controlled power box (available at the automation laboratory) connected into the SEM by means of the CB1 modules (Figure 1).The RES is managed by the CompactRIO control system according to the data received from the wireless data logger.

Description of the DC Micro-Grid
A number of small or miniature power plants using renewable energy sources are connected to the grid; some of these can be found within the automation laboratory where the SEM is located.Importantly, PV panels are installed on the roof of the building; for practical reasons, however, a significant portion of the plants are based at remote locations.After being produced, the electrical energy (power) from these distant suppliers is measured by a data logger, which then communicates the obtained information via GPRS to the control centre (CC).The physical equivalent of the energy generated in such external power plants is simulated by a relevant remote energy source model-a remote energy source (RES)-controlled power box (available at the automation laboratory) connected into the SEM by means of the CB1 modules (Figure 1).The RES is managed by the CompactRIO control system according to the data received from the wireless data logger.

Energy Sources
This chapter discusses the renewable sources linked to the grid.

Photovoltaic Panels
A major energy source utilized within our micro-grid consists in two solar panels with the total power of 360 Wp; these panels are connected into the 24 V DC grid via a Solartec regulator.If the voltage provided by the solar panels is higher than that of the battery block, the device will charge the battery to its full capacity, using overvoltage protection to terminate the process at the desired moment.

Fuel Cell
The research laboratory is also equipped with a fuel cell (FC) [32], an H-200 FC Stack (Singapore) by Horizon Fuel Cell Technologies (Figure 2).The H-200 exhibits the following parameters: a rated power of 200 W; performance of 28.8 V @ 7.2 A and 48 cells.

Energy Sources
This chapter discusses the renewable sources linked to the grid.

Photovoltaic Panels
A major energy source utilized within our micro-grid consists in two solar panels with the total power of 360 Wp; these panels are connected into the 24 VDC grid via a Solartec regulator.If the voltage provided by the solar panels is higher than that of the battery block, the device will charge the battery to its full capacity, using overvoltage protection to terminate the process at the desired moment.

Fuel Cell
The research laboratory is also equipped with a fuel cell (FC) [32], an H-200 FC Stack (Singapore) by Horizon Fuel Cell Technologies (Figure 2).The H-200 exhibits the following parameters: a rated power of 200 W; performance of 28.8 V @ 7.2 A and 48 cells.

Miniature Hydroelectric Power Station
Water is one of the most powerful natural forces known to date, and hydropower plants capture and process rainfall energy to generate electricity.If we assume the actual manufacturing of components for electric energy stations and review the entire construction process, hydropower plants produce the lowest amount of CO2 (4-36 g/kWh).Thus, in addition to solar power systems, a micro-hydropower plant is also included in our micro-grid.This plant, located 120 km from the laboratory, is capable of generating the maximum power of 500 W; the basic layout and position are illustrated in Figure 3.For any effective modeling of the SEM, the performance of the hydroelectric plant has to be carefully monitored.Further, the performance depends on the volume of water passing the weir; this volume is then proportional to the level held by a purpose-built barrier to secure the influx to the turbine.The energy produced is fed to a regulator that keeps the harmonic network voltage at 230 VAC and maintains the frequency at 50 Hz.

Miniature Hydroelectric Power Station
Water is one of the most powerful natural forces known to date, and hydropower plants capture and process rainfall energy to generate electricity.If we assume the actual manufacturing of components for electric energy stations and review the entire construction process, hydropower plants produce the lowest amount of CO 2 (4-36 g/kWh).Thus, in addition to solar power systems, a micro-hydropower plant is also included in our micro-grid.This plant, located 120 km from the laboratory, is capable of generating the maximum power of 500 W; the basic layout and position are illustrated in Figure 3.For any effective modeling of the SEM, the performance of the hydroelectric plant has to be carefully monitored.Further, the performance depends on the volume of water passing the weir; this volume is then proportional to the level held by a purpose-built barrier to secure the influx to the turbine.The energy produced is fed to a regulator that keeps the harmonic network voltage at 230 V AC and maintains the frequency at 50 Hz.

Energy Sources
This chapter discusses the renewable sources linked to the grid.

Photovoltaic Panels
A major energy source utilized within our micro-grid consists in two solar panels with the total power of 360 Wp; these panels are connected into the 24 VDC grid via a Solartec regulator.If the voltage provided by the solar panels is higher than that of the battery block, the device will charge the battery to its full capacity, using overvoltage protection to terminate the process at the desired moment.

Fuel Cell
The research laboratory is also equipped with a fuel cell (FC) [32], an H-200 FC Stack (Singapore) by Horizon Fuel Cell Technologies (Figure 2).The H-200 exhibits the following parameters: a rated power of 200 W; performance of 28.8 V @ 7.2 A and 48 cells.

Miniature Hydroelectric Power Station
Water is one of the most powerful natural forces known to date, and hydropower plants capture and process rainfall energy to generate electricity.If we assume the actual manufacturing of components for electric energy stations and review the entire construction process, hydropower plants produce the lowest amount of CO2 (4-36 g/kWh).Thus, in addition to solar power systems, a micro-hydropower plant is also included in our micro-grid.This plant, located 120 km from the laboratory, is capable of generating the maximum power of 500 W; the basic layout and position are illustrated in Figure 3.For any effective modeling of the SEM, the performance of the hydroelectric plant has to be carefully monitored.Further, the performance depends on the volume of water passing the weir; this volume is then proportional to the level held by a purpose-built barrier to secure the influx to the turbine.The energy produced is fed to a regulator that keeps the harmonic network voltage at 230 VAC and maintains the frequency at 50 Hz.Advantageously, a load (such as a charger) can be connected to the output of the regulator.The charger services the 12 V battery of the datalogger transmitting, to a MySQL server, the data related to the water level and the current output power value; the procedure corresponds to that adopted in the photovoltaic station [33].

Miniature Wind Power System
The set of applied energy sources also includes a small wind power plant (Air 40 made by Primus Wind Power, Colorado, CO, USA), whose turbine is linked to a 12 V battery and supplies 160 W at its highest performance.Similarly to the hydroelectric station, the wind power plant is not connected directly to the grid, meaning that we employ the RES to simulate the physically generated energy according to the measured data.

Micro-Grid Storage
The central aim is to utilize the maximum renewable energy available at any moment.Ideally, this would be a logical and the most economical principle to follow, but in practice it denies the physical fundamentals of electric energy, considering the consumer requirements and respecting the possibilities of not only the electrical distribution but also the information and control systems.Moreover, the actual electricity storage is a difficult problem involving most of the methods currently applied for the given purpose.In the presented micro-grid, however, only two types of storage are used, and these will be discussed in the following sections.

Accumulators
The former approach relies on accumulators, employing six batteries within the entire smart grid.The capacity of one battery corresponds to 120 Ah.

Hydrogen Storage
The latter technique exploits a metal hydride storage tank, Figure 3.The vessel is made from special alloys capable of holding hydrogen atoms in their crystal lattice.In order to obtain the largest possible surface area to secure such storage, the alloys are pulverized.The hydrogen is introduced into the tank under a slightly positive pressure and reacts with the alloy to form metal hydride.This process is exothermic, i.e., heat is dissipated; then, in order to discharge the hydrogen from the tank, heat must be reintroduced.Metal hydride tanks exhibit a high storage density with respect to the volume, but they also have a low storage density in relation to the weight.We use an Ovonic™ metal hydride storage tank (Heliocentris, Berlin, Germany) with the hydrogen content of 850 L (Figure 4) [34].
Advantageously, a load (such as a charger) can be connected to the output of the regulator.The charger services the 12 V battery of the datalogger transmitting, to a MySQL server, the data related to the water level and the current output power value; the procedure corresponds to that adopted in the photovoltaic station [33].

Miniature Wind Power System
The set of applied energy sources also includes a small wind power plant (Air 40 made by Primus Wind Power, Colorado, CO, USA), whose turbine is linked to a 12 V battery and supplies 160 W at its highest performance.Similarly to the hydroelectric station, the wind power plant is not connected directly to the grid, meaning that we employ the RES to simulate the physically generated energy according to the measured data.

Micro-Grid Storage
The central aim is to utilize the maximum renewable energy available at any moment.Ideally, this would be a logical and the most economical principle to follow, but in practice it denies the physical fundamentals of electric energy, considering the consumer requirements and respecting the possibilities of not only the electrical distribution but also the information and control systems.Moreover, the actual electricity storage is a difficult problem involving most of the methods currently applied for the given purpose.In the presented micro-grid, however, only two types of storage are used, and these will be discussed in the following sections.

Accumulators
The former approach relies on accumulators, employing six batteries within the entire smart grid.The capacity of one battery corresponds to 120 Ah.

Hydrogen Storage
The latter technique exploits a metal hydride storage tank, Figure 3.The vessel is made from special alloys capable of holding hydrogen atoms in their crystal lattice.In order to obtain the largest possible surface area to secure such storage, the alloys are pulverized.The hydrogen is introduced into the tank under a slightly positive pressure and reacts with the alloy to form metal hydride.This process is exothermic, i.e., heat is dissipated; then, in order to discharge the hydrogen from the tank, heat must be reintroduced.Metal hydride tanks exhibit a high storage density with respect to the volume, but they also have a low storage density in relation to the weight.We use an Ovonic™ metal hydride storage tank (Heliocentris, Berlin, Germany) with the hydrogen content of 850 L (Figure 4) [34].

Hydrogen Circuit
In the presented micro-grid, a hydrogen circuit is applied when all the accumulators are fully charged and the smart grid shows an energy surplus (namely, the related photovoltaic panels, wind power plants, or small hydroelectric plants generate energy on a constant basis).Such a surplus is then used to produce hydrogen, and this product is stored in the metal hydride storage case.

Hydrogen Circuit
In the presented micro-grid, a hydrogen circuit is applied when all the accumulators are fully charged and the smart grid shows an energy surplus (namely, the related photovoltaic panels, wind power plants, or small hydroelectric plants generate energy on a constant basis).Such a surplus is then used to produce hydrogen, and this product is stored in the metal hydride storage case.In our case, a small hydrogen circuit containing a metal hydride canister is applied; for an effective description, this hydrogen circuit can be subdivided into three main parts.The first of these components is an electrolyzer (a hydrogen generator) with a dryer and a purifier; the second one embodies the storage, or a metal hydride storage tank with a valve system to switch between charging and consumption; and the third one consists of an FC.
We opted to use an ACTA EL100c electrolyzer (Crespina, Italy) with a dryer hydrogen generator (Figure 5).The technical specifications of the EL100c are as follows: maximum hydrogen flow rate of @ 20 • C/1 bar, 100 NI/h; max.pressure of 30 bar; hydrogen purity of 99.95% @ 30 bar; max.power consumption of 700 W; and max.water consumption of 0.1 L/h [35].
Appl.Sci.2017, 7, 757 6 of 16 In our case, a small hydrogen circuit containing a metal hydride canister is applied; for an effective description, this hydrogen circuit can be subdivided into three main parts.The first of these components is an electrolyzer (a hydrogen generator) with a dryer and a purifier; the second one embodies the storage, or a metal hydride storage tank with a valve system to switch between charging and consumption; and the third one consists of an FC.
We opted to use an ACTA EL100c electrolyzer (Crespina, Italy) with a dryer hydrogen generator (Figure 5).The technical specifications of the EL100c are as follows: maximum hydrogen flow rate of @ 20 °C/1 bar, 100 NI/h; max.pressure of 30 bar; hydrogen purity of 99.95% @ 30 bar; max.power consumption of 700 W; and max.water consumption of 0.1 L/h [35].The hydrogen laboratory arrangement is outlined within the block diagram and image shown in Figure 6.The entire circuit can be controlled using LabView made by National Instruments (Austin, TX, USA) and CompactRIO, via a signal communicated by the CWP control program.If an energy surplus is detected, the program will send a signal to activate the relevant controlled switch; the electrolyzer and dryer will then start to operate.The electrolyzer is capable of producing very clean (with 99.95% purity) dry hydrogen at 30 bar.Such a high pressure has to be decreased to the value of 10 bar by means of a manual reduction valve; the reduced pressure is applied to fill the hydrogen storage, namely, the metal hydride canister.
In the opposite state, a condition when the local accumulators are discharged and only an insufficient amount of energy is available in the network, LabView dispatches a signal to open controlled valve 2; through the open valve, hydrogen will be transported from the metal hydride storage to the FC.The hydrogen pressure, however, has to be maintained at 0.45 bar; otherwise, the cell could be destroyed.Further, it is also possible to utilize a flowmeter to determine the quantity of hydrogen flowing from the metal hydride storage.The FC, too, is switched on by a signal because its actual start needs to be performed in the no-load mode; only after approximately 10 s, the controlled DC/DC converter is connected.The converter regulates the amount of current flowing from the FC, thus facilitating optimal operation of the cell.
The resulting efficiency of the hydrogen circuit can therefore be expressed as an amount of approximately 16%.The hydrogen laboratory arrangement is outlined within the block diagram and image shown in Figure 6.The entire circuit can be controlled using LabView made by National Instruments (Austin, TX, USA) and CompactRIO, via a signal communicated by the CWP control program.If an energy surplus is detected, the program will send a signal to activate the relevant controlled switch; the electrolyzer and dryer will then start to operate.The electrolyzer is capable of producing very clean (with 99.95% purity) dry hydrogen at 30 bar.Such a high pressure has to be decreased to the value of 10 bar by means of a manual reduction valve; the reduced pressure is applied to fill the hydrogen storage, namely, the metal hydride canister.
In the opposite state, a condition when the local accumulators are discharged and only an insufficient amount of energy is available in the network, LabView dispatches a signal to open controlled valve 2; through the open valve, hydrogen will be transported from the metal hydride storage to the FC.The hydrogen pressure, however, has to be maintained at 0.45 bar; otherwise, the cell could be destroyed.Further, it is also possible to utilize a flowmeter to determine the quantity of hydrogen flowing from the metal hydride storage.The FC, too, is switched on by a signal because its actual start needs to be performed in the no-load mode; only after approximately 10 s, the controlled DC/DC converter is connected.The converter regulates the amount of current flowing from the FC, thus facilitating optimal operation of the cell.
The resulting efficiency of the hydrogen circuit can therefore be expressed as an amount of approximately 16%.

Communication and Control Elements to Manage the Devices and Instrumentation of the Smart Energy Model
The physical equivalents of the energy generated through the water and wind power plants are simulated by the RES-controlled power module connected into the SEM via the CB1 module, Figures 1  and 7.The CB1 is a significant module facilitating energy transfer and voltage transformation from 12 VDC to 24 VDC and vice versa.The CB1 and RES are controlled by the CompactRIO system according to the data received from the wireless data logger.Each power control device (the CB1, CB2, and RES) uses its input/output circuits to communicate with the CC physically via wired connections in the laboratory.These low-power control connections are only schematically indicated in Figure 1 for better clarity.

Communication and Control Elements to Manage the Devices and Instrumentation of the Smart Energy Model
The physical equivalents of the energy generated through the water and wind power plants are simulated by the RES-controlled power module connected into the SEM via the CB1 module, Figures 1 and 7.The CB1 is a significant module facilitating energy transfer and voltage transformation from 12 V DC to 24 V DC and vice versa.The CB1 and RES are controlled by the CompactRIO system according to the data received from the wireless data logger.Each power control device (the CB1, CB2, and RES) uses its input/output circuits to communicate with the CC physically via wired connections in the laboratory.These low-power control connections are only schematically indicated in Figure 1 for better clarity.

Communication and Control Elements to Manage the Devices and Instrumentation of the Smart Energy Model
The physical equivalents of the energy generated through the water and wind power plants are simulated by the RES-controlled power module connected into the SEM via the CB1 module, Figures 1  and 7.The CB1 is a significant module facilitating energy transfer and voltage transformation from 12 VDC to 24 VDC and vice versa.The CB1 and RES are controlled by the CompactRIO system according to the data received from the wireless data logger.Each power control device (the CB1, CB2, and RES) uses its input/output circuits to communicate with the CC physically via wired connections in the laboratory.These low-power control connections are only schematically indicated in Figure 1 for better clarity.The CompactRIO regulates the flow of energy from different sources and controls the actual electricity consumption; the CC system can thus determine the power from the different simulated power plants.
The real power stations physically connected to the grid are the applied FC and solar panels, and each of them supplies the SEM with approximately 200-300 W peak.The simple physical The CompactRIO regulates the flow of energy from different sources and controls the actual electricity consumption; the CC system can thus determine the power from the different simulated power plants.
The real power stations physically connected to the grid are the applied FC and solar panels, and each of them supplies the SEM with approximately 200-300 W peak.The simple physical materialization, the safety of the experiments, and the low cost all enable the SEM to operate with 24 V DC and to store the surplus energy in electric car batteries.Instead of a large, centralized battery storage, the designed SEM employs a number of batteries, one for each power station.Although storing electric energy into hydrogen appears to be a less promising solution, a hydrogen FC (a metal-hydride container as serving as the hydrogen storage) will be integrated into the SEM to form a peak energy source.
The data transfer from the remote energy sources is performed using the Global Systgem for Mobile Communications (GSM) data logger.The related power meters are located near the water and wind power plants, and the measured data of the immediate generated power are transmitted wirelessly (GPRS) to the control centre with the CompactRIO.The laboratory provides for wired connection (RS 232 or RS 485) between the CB1 and CB2 power controllers.
The physical model of all the remote renewable energy sources (RES) is simulated by a QPX1200SP 1200 W DC power supply (Huntingdon, UK).The RES battery is connected to the SEM via one of the CB1 control blocks, a bidirectional power switcher enabling us to pump power to and from the grid.
block comprises a controlled DC/DC converter for voltage adjustment and utilizes the power from the local 12 V batteries (which can supply from 8 V to 14 V, according to the current charge level).Based on the information from the meter, the CompactRIO regulates the voltage and employs the related CB1 to control the power supplied into the SEM; this power corresponds to that obtained from the remote energy sources.
For any case where the energy produced by the RES connected to the SEM is greater than the total consumption of the SEM, each current regulator (CB1) is equipped with a controlled battery charger.According to the chosen algorithm, the SEM charges the batteries with controlled power until the selected recharge level is reached.Another physical source of the SEM is the FC; this cell is connected to the SEM via its own voltage regulator.
The energy consumption from the grid is regulated by the CompactRIO control system and the CB2 box.
The described smart grid part of the SEM is connected with the smart metering one [15,16].The actual smart metering and the consumption control represent a typical small energy consumer to participate in the smart energy system, utilizing the demand-response principle.Depending on the cost of the energy, an individual consumer, in cooperation with the control centre, will switch on or off the main electrical appliances in the household; in other words, and more generally, he or she will "control" their consumption.
Importantly, household consumption is also simulated, including 30 appliances turned on according to their use during the day.The relevant tables invariably define the frequency and duration of an appliance's activity within a definite time period.The switching times are generated randomly to operate as close to reality as possible.From these data, we then obtain the total generated appliance power, which is recalculated and communicated partly to the real appliances in the laboratory and partly to the electrical load.The battery capacity and power output of the sources are used to calculate the individual appliance powers in such a manner that they correspond to the real operating conditions At this point, it is important to note that our model is 30-fold smaller than a real home network.

Controlled Consumption System
Figure 1 shows the elements that can be involved in a controlled consumption system.First, we need to consider the laboratory instrumentation, or the programmable logical controllers, with 24 V DC power supply; these are connected to the SEM via a controlled circuit breaker.Second, there are a number of PCs connected via a non-controlled DC/AC converter.We also plan to design, materialize, and connect into the model a vehicle charging station (ST) equipped with a controlled ST to provide for not only e-car battery charging, but also the related energy take-off for cases of energy deficiency in the grid.
The system is fitted with a STATRON Electronic Load Type 3229 (LOAD) (Fürstenwalde, Germany) controlled load device, which enables us to consume more than 50 A at 24 V.The Electronic Load is managed by the CC according to the smart control algorithms, and facilitates the physical simulation of total energy consumption typical of small energy consumers.

Microgrid Voltage Stability Control
This section chapter characterizes the microgrid control strategy, which is to improve the voltage stability.The voltage in the 24 V DC grid is intended to be stable, namely, to exhibit the lowest possible fluctuation rate.An exact voltage value, however, cannot be obtained if several energy sources and multiple appliances are connected; importantly, the proposed strategy will maintain the voltage within the range of (22-26) V.

Microgrid Voltage Level Stability Control: Control Strategy of the CC
The control framework is centrally implemented in LabView.The algorithm recognizes two control levels, a higher and a lower one (Figure 8).The lower layer is responsible for distributing the energy as needed or according to the higher level strategy.The control commands are transmitted at a very high speed, in the order of milliseconds.The safety of the system and the basic operations are ensured mainly at the lower level.In terms of security, the primary problem lies in monitoring the battery charge to prevent power off take at a low voltage or, conversely, to eliminate any charging if the voltage is too high.These protective elements are contained twice in the model: first, they are installed as hardware in the CB1 and remain effective during the energy transfer between the main network and the other batteries; second, the system comprises software protection, which duplicates its hardware counterpart, and also controls the transfer of energy from the power stations directly into the battery.Specifically, the elements are used in simulating the remote sources, another part of the lower layer.The data from these sources are processed, enabling the influx of a corresponding amount of energy to the grid through two 12 V batteries (denoted as BAT2 in Figure 1).Load is managed by the CC according to the smart control algorithms, and facilitates the physical simulation of total energy consumption typical of small energy consumers.

Microgrid Voltage Stability Control
This section chapter characterizes the microgrid control strategy, which is designed to improve the voltage stability.The voltage in the 24 VDC grid is intended to be stable, namely, to exhibit the lowest possible fluctuation rate.An exact voltage value, however, cannot be obtained if several energy sources and multiple appliances are connected; importantly, the proposed strategy will maintain the voltage within the range of (22-26) V.

Microgrid Voltage Level Stability Control: Control Strategy of the CC
The control framework is centrally implemented in LabView.The algorithm recognizes two control levels, a higher and a lower one (Figure 8).The lower layer is responsible for distributing the energy as needed or according to the higher level strategy.The control commands are transmitted at a very high speed, in the order of milliseconds.The safety of the system and the basic operations are ensured mainly at the lower level.In terms of security, the primary problem lies in monitoring the battery charge to prevent power off take at a low voltage or, conversely, to eliminate any charging if the voltage is too high.These protective elements are contained twice in the model: first, they are installed as hardware in the CB1 and remain effective during the energy transfer between the main network and the other batteries; second, the system comprises software protection, which duplicates its hardware counterpart, and also controls the transfer of energy from the power stations directly into the battery.Specifically, the elements are used in simulating the remote sources, another part of the lower layer.The data from these sources are processed, enabling the influx of a corresponding amount of energy to the grid through two 12 V batteries (denoted as BAT2 in Figure 1).Yet another item affiliated with this level consists of the energy transfer control, materialized on the basis of the actual voltage values in each battery; here, the central idea is invariably to secure enough energy in the main network, from which the appliances draw the required power.
Figure 1 introduces four different types of storage, A to D. For better orientation in the network management, we will describe their function within the grid.The first part, A, is directly connected to the main smart grid network, with the energy stored in two 12 V batteries connected in series; the main line is thus 24 V.As already mentioned, all appliances are connected to this line.To eliminate any unnecessary energy transfer, the largest source of energy is directly connected to the 24 V storage tool, and therefore directly to the main network.In this case, the grid comprises also the two photovoltaic panels.The remaining parts of the sequence A to D, starting with portion B, are used Yet another item affiliated with this level consists of the energy transfer control, materialized on the basis of the actual voltage values in each battery; here, the central idea is invariably to secure enough energy in the main network, from which the appliances draw the required power.
Figure 1 introduces four different types of storage, A to D. For better orientation in the network management, we will describe their function within the grid.The first part, A, is directly connected to the main smart grid network, with the energy stored in two 12 V batteries connected in series; the main line is thus 24 V.As already mentioned, all appliances are connected to this line.To eliminate any unnecessary energy transfer, the largest source of energy is directly connected to the 24 V storage tool, and therefore directly to the main network.In this case, the grid comprises also the two photovoltaic panels.The remaining parts of the sequence A to D, starting with portion B, are used predominantly for energy storage or to store the energy supplied by the other sources.In block B, the simulated energy from the remote sources is stored in two 12 V batteries connected in parallel and can be transferred to the main line, if necessary.
Simultaneously, however, the batteries are used as temporary storage for the main line, especially when the remote sources do not generate sufficient energy.Part C is only used to store electricity temporarily and finds application mainly in situations when the solar panels and remote sources provide too much power and the consumption or storage size cannot cover the entire incoming volume.The last part, D, is hydrogen storage.
The overall control is set to a three-day cycle.In this cycle, the normal operating condition occurs if the power plants supply enough energy during one day but only a reduced amount over the two days that follow.For such operation, it is sufficient to regulate the energy transfer only at the lower level of control.In any case when the sources ensure only a low volume of energy during all the three days, the public power grid must be used to compensate for the shortage.Otherwise, with surplus energy, the higher level is involved in the control process.In this context, one of the aims of the higher layer is to use all the energy from the sources available at a given moment.If there are more days with surplus supply, the storage of energy is disabled by the high voltage of the batteries, and the source powers must be reduced.To avoid this situation, the higher control level uses the weather forecast to predict the volume of generated energy.

Algorithm Using the Weather Forecast to Predict the Microgrid-Generated Volume of Energy
Conceptually, the algorithm exploits the scenario where the Sun is expected to shine, enabling the 24 V grid battery block to become fully charged, while at the same time, another storage spot of the microgrid (such as the hydrogen canister) contains only a modest amount of energy.A similar scheme applies to hydropower plants and rainy weather.
The weather forecast is acquired from a remote web server, https://www.yr.no, providing data related to the temperature, cloud cover, and precipitation, with an interval of one hour.This server was identified as the most effective tool of its kind in satisfying our basic requirements, namely, weather forecasting for the city of Brno, (Moravia, Czech Republic), where the microgrid is located.As indicated in Figure 9, the data from the server are modified using Hypertext Preprocessor (PHP) script, stored in the MySQL database, and then read out to control the microgrid via LabView.The obtained information enables us to direct the energy flows within the individual means of storage, utilizing CompactRIO and CB1.predominantly for temporary energy storage or to store the energy supplied by the other sources.
In block B, the simulated energy from the remote sources is stored in two 12 V batteries connected in parallel and can be transferred to the main line, if necessary.Simultaneously, however, the batteries are used as temporary storage for the main line, especially when the remote sources do not generate sufficient energy.Part C is only used to store electricity temporarily and finds application mainly in situations when the solar panels and remote sources provide too much power and the consumption or storage size cannot cover the entire incoming volume.The last part, D, is hydrogen storage.
The overall control is set to a three-day cycle.In this cycle, the normal operating condition occurs if the power plants supply enough energy during one day but provide only a reduced amount over the two days that follow.For such operation, it is sufficient to regulate the energy transfer only at the lower level of control.In any case when the sources ensure only a low volume of energy during all the three days, the public power grid must be used to compensate for the shortage.Otherwise, with surplus energy, the higher level is involved in the control process.In this context, one of the aims of the higher layer is to use all the energy from the sources available at a given moment.If there are more days with surplus supply, the storage of energy is disabled by the high voltage of the batteries, and the source powers must be reduced.To avoid this situation, the higher control level uses the weather forecast to predict the volume of generated energy.

Algorithm Using the Weather Forecast to Predict the Microgrid-Generated Volume of Energy
Conceptually, the algorithm exploits the scenario where the Sun is expected to shine, enabling the 24 V grid battery block to become fully charged, while at the same time, another storage spot of the microgrid (such as the hydrogen canister) contains only a modest amount of energy.A similar scheme applies to hydropower plants and rainy weather.
The weather forecast is acquired from a remote web server, https://www.yr.no, providing data related to the temperature, cloud cover, and precipitation, with an interval of one hour.This server was identified as the most effective tool of its kind in satisfying our basic requirements, namely, weather forecasting for the city of Brno, (Moravia, Czech Republic), where the microgrid is located.As indicated in Figure 9, the data from the server are modified using Hypertext Preprocessor (PHP) script, stored in the MySQL database, and then read out to control the microgrid via LabView.The obtained information enables us to direct the energy flows within the individual means of storage, utilizing CompactRIO and CB1.In our case, 48-h weather forecasts are utilized.If we establish that some source will generate a large amount of energy while the direct storage battery is full, the control will attempt to move the energy from the battery to another means of storage (such as the hydrogen circuit) in order to increase the capacity of the batteries located close to the power plant.
Another method to regulate available storage space depending on the weather forecast consists in the demand-response principle; this enables us to switch on the appliances in which the start-up time is not a critical parameter.However, not many appliances of the given type are present in the home, and thus the principle finds wider applications in more extensive networks.In our case, 48-h weather forecasts are utilized.If we establish that some source will generate a large amount of energy while the direct storage battery is full, the control will attempt to move the energy from the battery to another means of storage (such as the hydrogen circuit) in order to increase the capacity of the batteries located close to the power plant.a part of the control strategy (Figure 8) executed through LabVIEW.The applied procedure then allowed us to activate the load (including but not limited to water heaters, freezers, air conditioning, thermoregulators, and powerbank or other chargers); this step led to an increased energy off-take in the grid.The corresponding pattern is plotted in violet (Figure 10).

Demand-Response Principle Implemented in the Microgrid
Figures 10 and 11 show that, at almost all the given instants of time, more energy than produced was taken off the grid.As regards the voltage stability (Figure 12), however, the energy in the microgrid can be neglected because the appliances are supplied from selected storage spots in the grid and the implemented weather forecast informed the control algorithm that at least the following three days would be sunny, making it possible for the photovoltaic panels to supply the maximum energy.This energy would subsequently be stored back into the relevant storage reservoirs.
Appl.Sci.2017, 7, 757 12 of 16 three days would be sunny, making it possible for the photovoltaic panels to supply the maximum energy.This energy would subsequently be stored back into the relevant storage reservoirs.Without the demand-response algorithm, the surplus energy, represented in black (Figure 11), could not be utilized.Integrating the pattern showed that the energy lost during the 75 min cycle amounted to approximately 7.9 kJ; conversely, the proposed algorithm facilitates reaching the pursued goal of "consume all you produce".The diagram in Figure 12 indicates that the voltage in the direct current grid stabilized between approximately 23.7 V and 25.4 V. the relative deviation from the 24 V was about 6%, a value acceptable for the connected devices.Without the demand-response algorithm, the surplus energy, represented in black (Figure 11), could not be utilized.Integrating the pattern showed that the energy lost during the 75 min cycle amounted to approximately 7.9 kJ; conversely, the proposed algorithm facilitates reaching the pursued goal of "consume all you produce".three days would be sunny, making it possible for the photovoltaic panels to supply the maximum energy.This energy would subsequently be stored back into the relevant storage reservoirs.Without the demand-response algorithm, the surplus energy, represented in black (Figure 11), could not be utilized.Integrating the pattern showed that the energy lost during the 75 min cycle amounted to approximately 7.9 kJ; conversely, the proposed algorithm facilitates reaching the pursued goal of "consume all you produce".The diagram in Figure 12 indicates that the voltage in the direct current grid stabilized between approximately 23.7 V and 25.4 V. the relative deviation from the 24 V was about 6%, a value acceptable for the connected devices.The diagram in Figure 12 indicates that the voltage in the direct current grid stabilized between approximately 23.7 V and 25.4 V. the relative deviation from the 24 V was about 6%, a value acceptable for the connected devices.

Conclusions
The article discusses the physical materialization of a smart energy model (SEM, Figure 1).The SEM is a smart grid model exhibiting a significant proportion of renewable energy sources, which are further combined with intelligent control utilizing information from a smart metering subsystem.The main advantages of the proposed grid consist in its simplicity, portability, and the broader possibility of testing the control algorithm, which exploits the demand-response strategy.Conversely, the actual use of a 24 VDC grid may be interpreted as a drawback; however, a DC/AC converter can obviously be connected, and alternating loads are applicable too.The results of the tested algorithms also generally hold for networks with a higher grid voltage.To facilitate the energy transfer from the 12 VDC batteries to the grid and vice versa, we designed and characterized a special CB1 module.This block can operate as a step-up or step-down converter, and is controlled via CompactRIO and LabView.
A micro-grid control strategy utilizing the demand-response mode was proposed and outlined within the paper; the central aspect of this approach consists in that the entire volume of energy produced through renewable sources must be effectively utilized.Thus, the analyzed method promoted the maximum use of renewable sources to decrease the current rate of CO2.Another major benefit brought by the algorithm can be identified in employing the current weather forecast to predict the amount of energy in the network; this property then enables us to transfer the applicable energy between the local BATs and the main backup BAT of the grid.The designed algorithm, described in Section 4, is mainly useful in a stand-alone microgrid; its performance and results are presented in Figures 10 and 11.
The end user will benefit mainly from the more effective consumption of energy produced by renewable sources.Further, the algorithm will switch, within a pre-selected interval (this may reduce the user's comfort, but the interval can be chosen by the user himself), appliances included in the demand-response strategy; such a feature is very convenient for multiple consumers who regularly operate various types of chargers or power banks, namely, appliances connectable to a microgrid in the demand-response mode.The actual usage of smart metering then enables us to monitor and assess the consumption of individual devices.
The proposed hardware and software concepts were verified on one of the possible scenarios, specified in Section 5.It follows from Figure 11 that using the microgrid control approach characterized in Section 4 embodied the factor to verify the pre-set goal of "consume all you produce".The relative voltage error during the tests did not exceed 6%, as shown in Figure 12.

Conclusions
The article discusses the physical materialization of a smart energy model (SEM, Figure 1).The SEM is a smart grid model exhibiting a significant proportion of renewable energy sources, which are further combined with intelligent control utilizing information from a smart metering subsystem.The main advantages of the proposed grid consist in its simplicity, portability, and the broader possibility of testing the control algorithm, which exploits the demand-response strategy.Conversely, the actual use of a 24 V DC grid may be interpreted as a drawback; however, a DC/AC converter can obviously be connected, and alternating loads are applicable too.The results of the tested algorithms also generally hold for networks with a higher grid voltage.To facilitate the energy transfer from the 12 V DC batteries to the grid and vice versa, we designed and characterized a special CB1 module.This block can operate as a step-up or step-down converter, and is controlled via CompactRIO and LabView.
A micro-grid control strategy utilizing the demand-response mode was proposed and outlined within the paper; the central aspect of this approach consists in that the entire volume of energy produced through renewable sources must be effectively utilized.Thus, the analyzed method promoted the maximum use of renewable sources to decrease the current rate of CO 2 .Another major benefit brought by the algorithm can be identified in employing the current weather forecast to predict the amount of energy in the network; this property then enables us to transfer the applicable energy between the local BATs and the main backup BAT of the grid.The designed algorithm, described in Section 4, is mainly useful in a stand-alone microgrid; its performance and results are presented in Figures 10 and 11.
The end user will benefit mainly from the more effective consumption of energy produced by renewable sources.Further, the algorithm will switch, within a pre-selected interval (this may reduce the user's comfort, but the interval can be chosen by the user himself), appliances included in the demand-response strategy; such a feature is very convenient for multiple consumers who regularly operate various types of chargers or power banks, namely, appliances connectable to a microgrid in the demand-response mode.The actual usage of smart metering then enables us to monitor and assess the consumption of individual devices.
The proposed hardware and software concepts were verified on one of the possible scenarios, specified in Section 5.It follows from Figure 11 that using the microgrid control approach characterized in Section 4 embodied the factor to verify the pre-set goal of "consume all you produce".The relative voltage error during the tests did not exceed 6%, as shown in Figure 12.

Figure 1 .
Figure 1.A block diagram of the smart energy model (SEM) (CB1-control block 1; CB2-control block 2; BAT (BAT1, BAT2)-battery; RES-physical model of a remote energy source; EL-electrolyzer; S-valve to switch and control the hydrogen flow to the fuel cell (FC); ST-vehicle charging station; G1-wind turbine generator, 12 VDC and 160 W; G2-water turbine generator with 230 V, 50 Hz, and 500 W; CC-control centre, CWP-central workplace.

Figure 1 .
Figure 1.A block diagram of the smart energy model (SEM) (CB1-control block 1; CB2-control block 2; BAT (BAT1, BAT2)-battery; RES-physical model of a remote energy source; EL-electrolyzer; S-valve to switch and control the hydrogen flow to the fuel cell (FC); ST-vehicle charging station; G1-wind turbine generator, 12 V DC and 160 W; G2-water turbine generator with 230 V, 50 Hz, and 500 W; CC-control centre, CWP-central workplace.

Figure 2 .
Figure 2. The H-200 FC Stack by Horizon FC Technologies (left-and right-hand side).

Figure 3 .
Figure 3.The small hydropower plant with a maximum power of 500 W.

Figure 2 .
Figure 2. The H-200 FC Stack by Horizon FC Technologies (left-and right-hand side).

Figure 2 .
Figure 2. The H-200 FC Stack by Horizon FC Technologies (left-and right-hand side).

Figure 3 .
Figure 3.The small hydropower plant with a maximum power of 500 W.

Figure 3 .
Figure 3.The small hydropower plant with a maximum power of 500 W.

Figure 5 .
Figure 5.The ACTA EL100c hydrogen generator including a dryer.

Figure 5 .
Figure 5.The ACTA EL100c hydrogen generator including a dryer.

Figure 6 .
Figure 6.A block diagram of the hydrogen circuit.

Figure 6 .
Figure 6.A block diagram of the hydrogen circuit.

Figure 7 .
Figure 7.A diagram of the CB1 power controller.

Figure 7 .
Figure 7.A diagram of the CB1 power controller.

Figure 8 .
Figure 8.The structure of the SEM control and the control levels.

Figure 8 .
Figure 8.The structure of the SEM control and the control levels.

Figure 9 .
Figure 9. Controlling the energy flow in the microgrid, using the data extracted from the applied weather forecast source.

Figure 9 .
Figure 9. Controlling the energy flow in the microgrid, using the data extracted from the applied weather forecast source.

Figure 10 .
Figure 10.The microgrid: The patterns describing the power supplied and taken off (red-the power consumption with demand response disabled; violet-the power consumption with demand response activated; green-power supplied by all sources).

Figure 11 .
Figure 11.The difference between the energy rates supplied to and consumed in the microgrid, with and without demand response activated.

Figure 10 .
Figure 10.The microgrid: The patterns describing the power supplied and taken off (red-the power consumption with demand response disabled; violet-the power consumption with demand response activated; green-power supplied by all sources).

Figure 10 .
Figure 10.The microgrid: The patterns describing the power supplied and taken off (red-the power consumption with demand response disabled; violet-the power consumption with demand response activated; green-power supplied by all sources).

Figure 11 .
Figure 11.The difference between the energy rates supplied to and consumed in the microgrid, with and without demand response activated.

Figure 11 .
Figure 11.The difference between the energy rates supplied to and consumed in the microgrid, with and without demand response activated.

Figure 12 .
Figure 12.The grid voltage pattern related to time.

Figure 12 .
Figure 12.The grid voltage pattern related to time.