Next Article in Journal
Monitoring Data Study of the Performance of Renewable Energy Systems in a Near Zero Energy Building in Spain: A Case Study
Previous Article in Journal
Research on Flow-Induced Vibration and Energy Harvesting of Three Circular Cylinders with Roughness Strips in Tandem
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hardware-in-the-Loop Validation of Energy Management Systems for Microgrids: A Short Overview and a Case Study

by
Giovanni Mercurio Casolino
1,*,
Mario Russo
1,
Pietro Varilone
1 and
Daniele Pescosolido
2
1
Dipartimento di Ingegneria Elettrica e dell’Informazione ‘Maurizio Scarano’, Università degli Studi di Cassino e Lazio Meridionale, Via G. Di Biasio 43, 03043 Cassino, Italy
2
Schneider Electric SpA, Automation Center, 24040 Stezzano, Italy
*
Author to whom correspondence should be addressed.
Energies 2018, 11(11), 2978; https://doi.org/10.3390/en11112978
Submission received: 10 October 2018 / Revised: 26 October 2018 / Accepted: 29 October 2018 / Published: 1 November 2018
(This article belongs to the Section F: Electrical Engineering)

Abstract

:
The energy management system (EMS) of a microgrid often presents a complex structure and a large number of control functions, which must be validated to ensure a reliable and optimal operation of the microgrid. Control system validation is typically performed by using hardware-in-the-loop (HIL) architectures in which the microgrid is simulated in real time and interfaced with the actual system under test. The simulation must ensure both an accurate representation of the microgrid and a reliable replica of the field communication of the EMS with all the control devices. In this paper, an overview of the various HIL architectures proposed in the literature is firstly outlined. Then, an HIL validation facility is presented and used to validate the EMS of an industrial microgrid. Finally, some results of the validation tests are reported to give evidence of the effectiveness of the proposed facility. In the proposed architecture, the soft real-time digital simulator of the microgrid is interfaced with the actual EMS using the same communication system and protocol as on the field. The main advantages of the proposed testing facility are: (i) the use of commercial PCs and the absence of dedicated interface modules, resulting in inexpensive hardware components; (ii) the capability to validate both control and communication functions of the EMS; (iii) the applicability to microgrids of different types (industrial, commercial, residential), as well as of various dimensions, including large microgrids; (iv) the easiness in changing the microgrid and the EMS under validation by only software modifications of the simulator tasks and of the exchange interface. As drawbacks, the proposed testing facility presents the need to adapt the software interface between EMS and the field to the EMS under test and the possibility of testing only the EMS functions and not fast-acting local controllers of the microgrid such as the protection systems.

1. Introduction

The concept of the microgrid [1] was introduced as a building block of the smart grid of the future, being a solution for reliable interconnection of distributed energy resources (DERs, i.e., generating units, storage units, controllable loads). A microgrid is connected to the host grid through a point of common coupling (PCC) and can operate in both grid-connected mode and islanded mode, as well as switch between these two modes [2]. In the former mode, the microgrid is a single controllable entity that provides the host grid power exchange and ancillary services. In the latter mode, in absence of the host grid, the microgrid must guarantee a reliable connection among DERs and loads. In this frame, microgrids are innovative entities in distribution networks. However, also existing industrial grids equipped with internal generating units can behave as microgrids if adequately controlled and operated.
In microgrid operation, a key point is the structure of the monitoring and control system, which is typically hierarchical and includes both distributed and centralized functions [3]. The latter ones are assigned to the energy management system (EMS), which is capable of supervising and managing the microgrid in its various configurations and modes of operation, as well as of cooperating with the host grid [2,4]. The EMS pursues various objectives such as microgrid security operation, voltage profile and reactive power optimization, microgrid loss reduction, load balancing and minimization of costs in islanded operation, maximization of the economic profits from power exchange and ancillary services in grid-connected operation.
Validation of an EMS is typically performed by using hardware-in-the-loop (HIL) testing facilities, in which the real-time simulation of the microgrid is interfaced with the actual EMS under validation [5]. An adequate level of detail in the representation of the microgrid is needed to ensure that simulation results are accurate enough for validation purposes. At the same time, the simulation of the microgrid should be computationally-efficient so as to ensure real-time simulation while avoiding the need for expensive computing machines. Another issue concerns the adoption of adequate tools for the data exchange between the EMS and the real-time simulator of the microgrid. In fact, the data exchange should reliably replicate the communication system and protocol between the EMS and the field (including distributed controllers of lower levels), so as to test the correct timing, response and coordination of all the functions of the EMS.
In this paper, a validation facility of the EMSs for microgrids is presented and used in a practical application. The main advantages of the proposed testing facility are:
  • the use of standard computers as PCs and the absence of dedicated interface modules, resulting in inexpensive hardware components;
  • the capability to validate both the control and communication functions of the EMS;
  • the applicability to microgrids of different types (industrial, commercial, residential), as well as of various dimensions, including large microgrids;
  • the easiness of changing the microgrid and the EMS under validation by only software modifications of the simulator tasks and of the exchange interface.
As drawbacks, the proposed testing facility presents the need to adapt the software interface between EMS and the field to the EMS under test and the possibility of testing only the EMS functions and not fast acting local controllers of the microgrid such as the protection systems.
The paper is organized as follows. In Section 2, an overview of the HIL architecture is outlined according to the existing literature, and the peculiar characteristics of the proposed architecture are evidenced in comparison with other architectures. In Section 3, an overview of the proposed HIL architecture and a description of each component of the validation setup are given, together with the description of the communication structure needed for data exchange between the real-time simulator and the EMS. In Section 4, the validation facility is used to test a real EMS realized by Schneider Electric in the practical application of an industrial plant that can operate as a microgrid. The performance of the validation facility in terms of computation and communication times is analyzed. Finally, some test results are reported to show the fulfillment of the EMS requirements in monitoring and controlling the industrial microgrid in response to changes of the operating conditions.

2. The Hardware-in-the-Loop Architecture

Various papers in the literature propose HIL architectures to validate components and control systems for electric power systems and, in particular, for microgrids.
In [5], a real-time development platform for simulation studies of the updated control and operation of power system functions was introduced. The paper focused on a laboratory setup with attention to the utilization of real-time simulation equipment in some typical reference applications. The scope of the setup was mainly the communication system, whereas the control system functions were simulated. In this case, an expensive real-time simulator of the microgrid is needed.
In [6], an HIL integrated framework for testing operation and control of microgrids, as well as their individual components was proposed. Such an approach is suitable for testing the EMS and the hardware controllers at the signal level, as well as hardware devices like power converters at the power level. The proposed platform architecture is universal, but requires a microgrid real-time simulator with expensive dedicated hardware and software.
In [7,8], similar architectures, but with different costs of implementation were proposed for the validation of power electronics control hardware, firmware and software design. The schematic of the architecture is depicted in Figure 1. The specific type of application requires dedicated real-time simulators with very small simulation time steps.
The works in [9,10,11] presented a compendious summary of power HIL simulations that were used for designing, analyzing and testing of electrical power system components. The focus was mainly power system components and power electronic devices, and the analyzed HIL architectures adopted the general schematic shown in Figure 2.
In [12], a grid-tied micro-grid with a battery energy storage system was considered. The proposed energy management strategy was validated by the HIL experiments for real-time micro-grid operation. The HIL facility allowed the validation of a specific function of the EMS on a long-term horizon and did not include the replica of the communication system between the EMS and the field.
In [13], a real-time energy management system (EMS) for small microgrids was considered. Indeed, a specific function concerning the economic optimization of the power exchange with the host grid was analyzed, which is a long-term horizon optimization. A hybrid exploration simulation framework that exchanges data over a real Ethernet network was developed to study the sensitivity of the system to networking issues such as transmission delays, data availability and reliability, among other factors. The microgrid was not simulated, but a PV system and loads were emulated from actual data.
Within the above frame, in the present paper, the microgrid to be controlled is modeled and simulated for testing the response of the actual EMS system under validation. Some simplifications are introduced in the microgrid model, such as neglecting fast electric transients, because EMS functions typically tackle medium- and long-term dynamics of the microgrid operation (such as frequency and voltage transients, power unbalances). Consequently, the simulation time step can be large enough, and soft real-time simulation [14] can be used. This approach is different from the one followed in other real-time simulators (such as RTDS, RT-LAB, dSPACE), which are used in many HIL testing platforms, since they ensure a full and detailed simulation of the system under analysis with a small simulation time step. As a drawback, such simulators are expensive because of their dedicated hardware and software, and they are not required for all the EMS functions’ tests [14].
The HIL architecture of the validation facility is depicted in Figure 3 [15]. It is based on a soft real-time digital simulator of the electric microgrid that is suitable for the EMS under validation. The task that implements the exchange interface between the real-time simulator and the actual EMS uses the same Ethernet protocol as the one adopted in the field. In this way, no specific hardware is needed, and the validation facility results in being inexpensive. At the same time, a reliable replica of the data exchange between the EMS and the field is guaranteed.
The proposed architecture for the testing facility presents the following features with respect to previous papers:
  • no specific and/or expensive hardware or software interface module is needed between the simulator and EMS system, as in [5];
  • the peculiar communication protocol adopted by the EMS for data acquisition from the plant is actually implemented: this results in less flexibility, but higher fidelity to reality with respect to [6,16];
  • the microgrid is simulated in detail, including all the dynamic components (i.e., machines) and their local controls, the controllable loads, so as to analyze the response of the EMS functions to transients rather than only the optimization function performance on a long-term horizon, as in [12,13]; at the same, a soft real-time simulation can be used, because very fast electric transients are not modeled, differently from the applications to power electronic devices as in [7,8], which require hard real-time simulation with small sampling times;
  • no expensive linear power amplifier is needed as in the applications analyzed in [9,10,11].

3. The Proposed Validation Facility

In principle, a validation facility should adequately represent the evolution of operating conditions of the microgrid and the actions of the EMS, as well as model and monitor their reciprocal interactions. Typical interactions concern, among others, the start and stop commands of controllable loads and of generating units, the frequency control and load-shedding in islanded operation, the voltage regulation and reactive power control and the power exchange in grid-connected operation.
In the proposed HIL architecture (Figure 3), the soft real-time simulator of the microgrid and the actual EMS under test interact by the exchange interface, which is the key task. A more detailed block description of the architecture, including the subsystems and their assignments, is shown in Figure 4.
The core of the setup consists of two subsystems: the power dynamic simulator (PDS) and the MATLAB Runtime Scheduler (MRS). The PDS is a dynamic-link library (dll) that is derived from a Simulink model simulating the microgrid, as explained in detail in the following. The MRS is a low level code script, which runs the linked PDS dll in real-time by timing its execution to preserve the coherence with the real-world clock.
The MRS realizes also the communication with the actual EMS, which is typically interfaced by a PLC. The EMS sends to MRS the control signals needed to manage the microgrid in the form of commands for the PDS and receives back the characterization of the microgrid. Since the MRS dialogues with the real EMS, the data exchange between MRS and EMS requires the same communication protocol as in the field. At present, the EMS adopts an Ethernet/Modbus TCP/IP protocol, but other protocols can easily be implemented.
Eventually, in Figure 4, two additional subsystems are present, for monitoring/control functions on external PCs. The first one, named the PDS monitoring interface (PDSMI) is a separate, independent and asynchronous process with respect to the MRS. The PDSMI communicates with the MRS by a TCP/IP protocol: it acquires and visualizes the PDS variables and is also able to initialize and start/stop the simulation by a JAVA GUI. The adoption of PDSMI reduces the computation burden of the MRS/PDS, which does not need to take into account graphical issues. The second subsystem, named man-machine interface (MMI), allows the direct supervision by the human operator on the EMS. In the following, a detailed description of the subsystems of Figure 4 is given.

3.1. Power Dynamic Simulator

The PDS emulates the response of the microgrid to the EMS’s control actions; in general, for the modeling of the electric system, a tradeoff must be arranged to match the opposite goals of ensuring a realistic behavior of the simulated microgrid, limiting in the meantime the complexity of the simulation so as to react in real time to the EMS’s actions. However, for the applications under study, it can be noticed that the EMS is characterized by sampling times with an order of magnitude of about 100 ms; this allows neglecting the short-term dynamics in the microgrid simulation (which correspond to pulses greater than 100 rad/s), by considering only medium- and long-term dynamics [17]. Consequently, for an accurate digital simulation of the microgrid, a sampling time of the PDS equal to 1 ÷ 5 ms is adequate enough.
In the above assumption, the components of the microgrid such as rotating machines (generators and motors), static loads and electric network are modeled according to [18] with phasorial representation of electrical quantities; the interaction among the models follows the reference scheme of Figure 5 [17]. For each simulation step, in this scheme, each component model exchanges the necessary information to interact with the other components; all data are adequately transformed to ensure that coherence is maintained when passing among the different reference systems of the models.
The exchanging variables in Figure 5 mainly concern the interaction between the rotating machines and the static electric network; in particular, it is required that:
-
the models of generators and motors provide their stator emfs, to the model of the electric network, so as to compute the electric network solution;
-
the model of the electric network provides the stator voltage and current to each machine model in order to allow the computation of its stator emfs and of electromechanical quantities.
Particular attention to co-ordinate transformations is paid if the electric microgrid switches from islanded operation to operation in connection to a host grid and vice versa. In islanded operation, the system reference is a fixed co-ordinate frame rotating at nominal pulse; in connection to a host grid, the system reference is a co-ordinate frame synchronized with the phasor of the voltage at the PCC.
The frequency considered for the electric microgrid is evaluated as the one established by the speed of each generator in islanded operation or by the frequency of the host grid if connected. Two types of speed governor are implemented for generators: isochronous (ISO) and droop (DROOP). In the former, the speed is forced to be equal to its setpoint after a transient, and a full frequency error compensation is guaranteed; in the latter, the speed decreases by a fixed percentage when the generator varies from no-load to full load, and a stable working point can be found according to a predefined dispatch of power among generators and the host grid, if connected.
The dynamic model of the microgrid is firstly implemented in a Simulink environment and then converted into a linkable dll, invoked by the MRS (see Figure 4). This converting procedure requires both the definition of the exchanging variable with the MRS and the declaration of the three internal MATLAB prototype functions (start, stop and single step of simulation) needed by the MRS for invoking and timing the PDS.
To allow the remote control management, the following data are made available by the PDS to MRS, which will care for their transmission to the EMS:
-
the status of all the switches;
-
the status of all controllable loads;
-
the status of generators and their machine switches;
-
the type of frequency control for the generators (ISO/DROOP);
-
the active and reactive powers injected by the generators;
-
the reserve of generation, evaluated on the basis of capability curves and the external temperature of all the group of generators;
-
active and reactive powers, frequency, voltages, current for all loads and simulated switches;
-
frequency and voltages on the main busbars.
The other way round, the data from the EMS are passed to the PDS by the MRS; their description is detailed in the following sections.

3.2. MATLAB Runtime Scheduler

The MRS is a MATLAB script that manages the execution of the PDS in soft real time and realizes also the communication with the actual EMS (see Figure 4). The ‘soft real-time’ term means that the simulation is performed on commercial operating systems (e.g., Windows), which presents other active tasks that can introduce a delay in a simulation step, in contrast with the ‘hard real-time’ term, which means that it uses a hard interrupt to ensure that the system has fixed operation deadlines, from event to system response. The design of the PDS is conceived of so as to keep an adequate margin on the average computing times of the simulation steps; in this way, if a delay is introduced in a simulation step by other events in the operating system, the time margin allows recovering the delay in the subsequent simulation steps and maintains the soft real-time simulation. The recovery of the time delays is always monitored to check the validity of the real-time simulation.
The execution of the simulation is managed by three functions, internal to the PDS and invoked by MRS: start, stop and single step, which, as by name, permit starting and stopping the simulation or running a single simulation step. These functions can be invoked based on the delay time with the real-world clock. To ensure the results of a real-time simulation, an adaptive step of simulation is also adopted [19]. The MRS adapts the simulation speed, by dynamically cycling the simulation steps, so as to maintain the delay between the simulation time and the real-world clock within an assigned boundary. The MRS cycle is defined according to the EMS sampling time, which is of an order of magnitude of 100 ms. According to Section 3.1, since the sampling time of the PDS is about 1 ÷ 5 ms, in a single MRS cycle, multiple steps (N) of PDS simulation are performed.
In its cycle, the MRS handles also the information exchange with the EMS by a TCP/IP protocol (as a first application Modbus protocol). If the amount of data to be exchanged is very large, to guarantee the real-time simulation, the information exchange can be split into different sessions, which are assigned to subsequent MRS cycles. The communication with the PDSMI subsystem on an external PC is guaranteed by a TCP/IP protocol (Figure 4).
The flowchart of the MRS is depicted in Figure 6, in which the following tasks can be identified.
Task 1 (initialization): In this step, the initial status of the microgrid is established: all parameters of generators, motors, electric networks and static loads are set, as well as the status of all switches. A starting condition is also sent to the PLC(s) for initializing the EMS; similarly, the PDSMI receives a configuration, concerning the number and type of PDS variables that need to be monitored and visualized. All parameters are set, for the initial configuration, by customizable configuration files.
Task 2 (linking PDS dll): The PDS dll of the microgrid is loaded into the memory of MRS. A custom set of MATLAB functions (MATLAB prototype functions) grants the possible execution of the dll (by the internal functions of PDS: start, stop and single step) and creates the interface needed for the data exchange with the other subsystems (by the MRS) and to save and load the state of simulation. The structure of the Simulink dll is also invoked in the linking, so as to make accessible all the variables and states of the PDS’s simulation.
Task 3 (application of the user’s commands): According to the user’s choice, the state of the simulation can be loaded/saved/paused/stopped or started. A simple GUI, built internally by the MATLAB graphic user interface development environment (GUIDE) and invokable externally by the PDSMI, is used to pass commands to the MRS scheduler and manage the user’s events.
Task 4 (executing PDS single step function): If the simulation is started (start command), the single step function of the PDS is executed N times to simulate the response of the microgrid to the EMS commands and an updating of the PDS status results. The integer N represents the number of simulation steps of the PDS dll in the given time interval of the MRS cycle. For example, if the MRS cycles every 100 ms and the PDS simulation time step is 5 ms, then it is N = 100 / 5 = 20 .
Task 5 (data to/from EMS): Every MRS cycle of assigned time interval (e.g., 100 ms), the PDS data are transferred to/from the EMS. The transfer is operated by a Modbus TCP/IP protocol, in which the opening of the sessions is commanded by the MRS that reads and writes on the data memory of the EMS.
Task 6 (data to PDMSI): Every MRS cycle of assigned time interval (e.g., 100 ms), the PDS data are transferred to PDMSI for monitoring and visualization.
Wait: In normal operation, since the average time to perform Tasks 4, 5 and 6 is smaller than the time reserved for an MRS cycle, a wait state interval is introduced, to preserve the correct match between the simulation time and the real clock time.
Stop of simulation: The whole procedure stops when the corresponding user command is given.

3.3. Energy Management System

The EMS ensures the monitoring, control and diagnosis of the microgrid, provides control and management of generators and prevents plant shut down in case of faults of the electrical network [20,21,22]. Both the grid-connected and islanded operation have to be considered by the EMS. In the grid-connected mode, the voltage and frequency of the PCC can be assumed fixed by the host grid, assuming that the shortfall or the surplus of the microgrid power balance are compensated by the host grid. In this situation, a governor based on DROOP characteristics is widely used. In the islanded condition, a control strategy must regulate the voltage and frequency of the internal generation, so as to balance the net demand and generation of the microgrid; moreover, a load shedding function must be implemented to avoid a too rapid frequency drop in the case of consistent load surplus [2]. In this case, a governor based on ISO characteristics is required to bring the frequency value back to the normal condition. Basically, the EMS function are assigned to three subsystems:
-
SCADA system;
-
Power management system (PMS);
-
Load shedding system (LSS).
The first two subsystems operate in both grid-connected and islanded mode (with the different DROOP and ISO regulation for the second function); the third one is typical of islanded operation.
SCADA system The SCADA system performs the supervision and control of circuit breakers and disconnectors, gathers information from the protection relays and detects anomalies and events in chronological sequence to update the disturbance records.
Power management system (PMS): The PMS manages the control and regulation of the generators connected to the grid. Its main functions concern:
-
supervising the internal electric power production and the consumption of the electrical system;
-
maintaining the frequency of the electric system within assigned limits;
-
maintaining the voltages of the electric system within assigned limits;
-
maintaining the electric system in stable conditions in case of slow changes of the absorbed power;
-
increasing the efficiency of the generating sets with load sharing;
-
reducing the overloads of the generators.
-
changing generator control mode (ISO/DROOP) when switching from host grid connected to islanded operation and vice versa.
These functions are typically performed by specific algorithms developed on a dedicated PLC.
Load shedding system (LSS): The LSS avoids the collapsing of the electric power supply under fast and abnormal perturbations of the operating conditions when the microgrid is in islanded operation. The load shedding function is automatically activated, as fast as possible, to disconnect specific loads and maintain the voltage and frequency within assigned limits. The LSS functions are performed by specific algorithms developed on a dedicated PLC.
To allow the remote control management, the following signals are sent from the EMS to the PDS:
-
the open/close commands for all electric network switches;
-
the commands for all controllable loads;
-
the command of start and synchronize for the generators;
-
the command of increasing/decreasing of speed, active/reactive power, voltages for secondary regulation;
-
the setpoints for the governors.
-
the type of frequency control for the generators (ISO or DROOP).

3.4. PDS Monitoring Interface

The PDSMI is a GUI written in Java that grants the monitoring, visualizing and plotting of PDS variables; the interface is linked to the stand-alone executable of MRS and allows also saving in files the time evolution of variables, as well as facilitating logging operations. The PDSMI invokes the stand-alone executable, to run the simulation in the PDSMI environment. The aim of the interface is to reduce the computation burden of the PDS, by leaving heavy graphical aspects to the PDSMI. This is possible thanks to the PDSMI process, which is separated, asynchronous and independent of the PDS.

3.5. Man-Machine Interface

The MMI allows a remote control of the EMS by a human operator; the communication with the EMS is established by an Ethernet protocol. A dedicated PLC interface, which is executed on an external PC, is used to pass the user commands.

4. Validation Results

4.1. Study System

For validating the functions of an actual EMS, the industrial grid of Figure 7 has been considered. It includes three generators, each one with a power of 51 MVA, and can be connected to a host network with prevailing power. Both islanded operation and operation in connection to the external grid are allowed.
The network presents a primary busbar at 33 kV with three tie-switches; this main busbar connects all generators and the external grid to the loads and permits the independent supply of nine secondary bars at 6 kV (Figure 7). The main busbar and the derived ones supply a total of controllable loads, consisting of 56 motors, 9 equivalent static loads and 5 power factor correction capacitors. The EMS manages about 90 switches that connect/disconnect all generators, loads and busbars. Various operating conditions are possible, even including the particular case of islanded operation with different frequencies for separate sections of the main busbar.

4.2. Test Facility Setup

The implementation of the test facility has been carried out in four steps:
(a)
Firstly, the electric microgrid has been modeled in Simulink and converted into the PDS dll. The modeling includes the complete representation of all 3 generators, the host grid, the 56 dynamic loads (motors), the 9 static loads and the 5 power factor correction capacitors together with the representation of the electric network that connect them; details about the adopted models are reported in [18]. The control logic includes the frequency and power control (ISO and DROOP) and the excitation systems of the generators [23], the management of the start and stop command of the generators and motors/loads and the distributed load shedding functions. In addition dedicated functions have been considered for the management and treatment of the command signal from/to the EMS. The validation of the dynamic models of the machines and the electric network is reported in [18]. The off-line validation of the overall system has been assessed by comparison with commercial software (Mathpower and PSCAD).
(b)
Secondly, the PDS dll has been linked to the MATLAB script of MRS, which manages the timing and execution of the PDS (see Section 3.1 and Section 3.2); this step is necessary to temporize the simulation with the times of the EMS adequately.
(c)
Thirdly, the stand-alone executable of the simulation has been generated from the MATLAB script of the MRS and connected, via Modbus TCP/IP, to the EMS; this step realizes the interface for exchanging commands between the EMS and the simulated electric microgrid;
(d)
Finally, the expected temporal boundaries of the soft real-time simulation are verified, as illustrated in the next section.
The test of the simulation has been conducted on a PC mounting an Intel Core i7, 4870HQ processor at 2.5 GHz, with 32 Gb of RAM installed on-board and 64-bit Windows operating system. The EMS under test has been developed by Schneider Electric and implemented in a Modicon M580. Data from the stand-alone executable of simulation and the EMS have been made available, to remote PCs, for monitoring the PDS variables (by the PDSMI) and supervising the EMS (by MMI).

4.3. Computing Time Validation

With reference to the MRS flowchart of Figure 6 (see Section 3.2), the mean time of each task has been evaluated to check that an adequate margin is guaranteed for soft real-time simulation. The MRS cycle time is 100 ms, and the PDS simulation time step is 5 m; consequently, N = 20.
Offline MRS tasks: Tasks 1 and 2 do not affect the simulation times of the PDS and are operated offline; they require an overall time of about 60 ms.
Cycled MRS tasks: Tasks from 3–6 are operated online during the cycle of the simulation and require a mean time of about 80 ms, as depicted in Figure 8. The time that remains of 100 ms can be operated in a wait state or to accelerate the simulation to match with real time, if a delay occurs. It is important to note that Task 4, which performs N PDS simulation steps, requires 4.2 ms, which is very small in comparison with the MRS cycle time (100 ms). Task 5 alone, which concerns the data transfer via Modbus TCP/IP, demands about 60 ms; the significant amount of time required depends both on the amount of data that need to be transferred to/from the EMS and the requirement of using a Modbus TCP/IP 8-bit-based standard as the communication protocol, which requires opening multiple sessions to transfer all data.
The possibility of using an improved communication standard could probably allow reducing this time. Task 6 requires about 12 ms, but this time is strictly dependent on the amount of PDS variables to be monitored; for the considered case, all the busbar network voltages, frequencies and active and reactive powers injected by generators have been monitored. As a result, the MRS stays in a wait state for an average time of 22.5 ms.
Concerning the EMS tasks, the PLC software requires an overall mean time of about 8 ms to execute its program. The rest of the time is dedicated to the communication.

4.4. EMS Performance Evaluation

4.4.1. Trip of a Turbine and Load Shedding

The behavior of the industrial microgrid of Figure 7 under the EMS control action is analyzed in the case of the trip of a turbine. The system is assumed in islanded operation (no external grid), and the three main tie-switches at 33 kV are closed. The monitoring of electric variables, as their saving, is carried out by PDSMI; the graphs related to these data are reported in the following. The EMS control actions are monitored and, if it is the case, manually operated by its MMI; an example of its GUI is shown in Figure 9.
Initially, all generators are operative, and the electric microgrid works in its steady state conditions at its nominal frequency (50 Hz).
At time instant 10 s, the loss of one of the generators is simulated (nominally, Generator 1) with a consequent unbalance between generation and load demand. The time evolutions of the frequency and voltage at the main busbar at 33 kV and the active and reactive powers injected by the three generators in the system, due to the event, are shown in Figure 10, Figure 11, Figure 12, Figure 13 and Figure 14. Since no external grid is present, the frequency of the system depends only on the two remaining generators (Generators 2 and 3), which compensate the loads and the losses. When Generator 1 is disconnected, the load unbalance rapidly provokes the frequency decreasing, with the activation of the two consecutive load shedding boundaries, set at 49.6 and 49.2 Hz; these limits are highlighted in Figure 10 with red dashed lines.
As a consequence of the EMS load shedding function, part of the load is disconnected, to prevent the frequency from assuming too low values and permitting generators to compensate the frequency error. At each load disconnection, the frequency slope changes with a delay depending on the inertia of the system and the control speed. The load shedding control signal sent by the EMS is indicated in Figure 11; in Figure 12, the effects of two load disconnections on the voltage busbar are apparent, resulting in the increase of the voltage value.
For the two generators, different frequency regulation controls are tested: Generator 2 is in ISO control, whereas Generator 3 is in DROOP control. During the transient in the first few seconds, the behavior of the two generator is similar in terms of active powers (see Figure 13). When steady-state is reached, the effects of the two regulations is evident: while Generator 3 returns to the active power value before perturbation, Generator 2 is obliged to increase its share of active power to bring frequency again to its rated value. Little differences can be noticed between Generator 2 and 3 concerning the time evolution of reactive power (Figure 14) since the influence of frequency regulation on reactive power is limited; in general, for each generator, a decrease of reactive power can be noticed due to the load shedding, which reduces also the reactive loads.

4.4.2. Regulation of a Generator and Management of Subsystems with a Different Frequency

The second case considers the regulation of a generator, assuming one of the main tie-switches opened. The opened tie-switches identify two independent frequency subsystems, one dependent on the combination of Generators 1 and 2 and one on Generator 3; no external grid is present. Initially (see Figure 7), Generators 2 and 3 are set in a running state, satisfying all the load present in the subsystems, while Generator 1 does not produce power. In this situation, both microgrid’s subsystems work at their steady state conditions at their nominal frequency (50 Hz). The regulation control is set to ISO for Generators 2 and 3 and DROOP for Generator 1. Figure 15, Figure 16, Figure 17 and Figure 18 report the time evolution of the frequency, of the voltage at the 33-kV busbars for the two subsystems and of the active and reactive powers injected by the generators. At a given time (10 s), the ENMCS sends to the PDS the command to increase the power of Generator 1: as a result, Generator 1 is accelerated to take its part of the load, and the frequency of the first subsystem as a result is increased; the second subsystem is not affected by the command, and its frequency remains unaltered (see Figure 15). The ISO control mode of Generator 2 slightly adjusts the frequency to report it to the steady-state at 50 Hz. In the meantime, the active power of Generator 1 is increased to reach its share of load at the cost of the active power of Generator 2, which reduces its contribution; Generator 3 is on an independent subsystem and is not affected at all (see Figure 17). A small variation in reactive power can be noticed for Generators 2 and 3 due to the new set of generators (see Figure 18).

5. Conclusions

In this paper, a test facility for the validation of the energy management systems (EMS) for microgrids is proposed; it is based on a real-time digital simulator and a hardware-in-the-loop architecture; specific details are provided concerning the framework of the test facility and the simulation times. The main advantages of the proposed testing facility are:
(i) the use of commercial PCs and the absence of dedicated interface modules, resulting in inexpensive hardware components;
(ii) the capability to validate both control and communication functions of the EMS;
(iii) the applicability to microgrids of different types (industrial, commercial, residential), as well as of various dimension, including large microgrids;
(iv) the easiness in changing the microgrid and the EMS under validation by only software modifications of the simulator tasks and of the exchange interface.
As drawbacks, the proposed testing facility presents the need to adapt the software interface between EMS and the field to the EMS under test, and the possibility of testing only the EMS functions and not fast acting local controllers of the microgrid such as the protection systems.
The results of the validation on an actual EMS for a industrial microgrid are reported to give evidence of the features of the validation facility.

Author Contributions

G.M.C. developed the PDS and HIL facility and wrote the main part of the paper. M.R. collaborated in the development of the PDS and HIL facility and in the writing of the paper. P.V. supervised the project. D.P. contributed to the PLC hardware and the EMS control logic.

Funding

This research was funded by Schneider Electric and by the MIUR’s Department of Excellence project.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

References

  1. Hatziargyriou, N.; Asano, H.; Iravani, R.; Marnay, C. Microgrids. IEEE Power Energy Mag. 2007, 5, 78–94. [Google Scholar] [CrossRef]
  2. Yazdanian, M.; Mehrizi-Sani, A. Distributed Control Techniques in Microgrids. IEEE Trans. Smart Grid 2014, 5, 2901–2909. [Google Scholar] [CrossRef]
  3. Bidram, A.; Lewis, F.L.; Davoudi, A. Distributed Control Systems for Small-Scale Power Networks: Using Multiagent Cooperative Control Theory. IEEE Control Syst. 2014, 34, 56–77. [Google Scholar]
  4. Lee, E.K.; Shi, W.; Gadh, R.; Kim, W. Design and Implementation of a Microgrid Energy Management System. Sustainability 2016, 8, 1143. [Google Scholar] [CrossRef]
  5. Westermann, D.; Kratz, M. A Real-Time Development Platform for the Next Generation of Power System Control Functions. IEEE Trans. Ind. Electr. 2010, 57, 1159–1166. [Google Scholar] [CrossRef]
  6. Wang, J.; Song, Y.; Li, W.; Guo, J.; Monti, A. Development of a Universal Platform for Hardware In-the-Loop Testing of Microgrids. IEEE Trans. Ind. Inf. 2014, 10, 2154–2165. [Google Scholar] [CrossRef]
  7. Majstorovic, D.; Celanovic, I.; Teslic, N.D.; Celanovic, N.; Katic, V.A. Ultralow-Latency Hardware-in-the-Loop Platform for Rapid Validation of Power Electronics Designs. IEEE Trans. Ind. Electr. 2011, 58, 4708–4716. [Google Scholar] [CrossRef]
  8. Lu, B.; Wu, X.; Figueroa, H.; Monti, A. A Low-Cost Real-Time Hardware-in-the-Loop Testing Approach of Power Electronics Controls. IEEE Trans. Ind. Electr. 2007, 54, 919–931. [Google Scholar] [CrossRef]
  9. Lauss, G.F.; Faruque, M.O.; Schoder, K.; Dufour, C.; Viehweider, A.; Langston, J. Characteristics and Design of Power Hardware-in-the-Loop Simulations for Electrical Power Systems. IEEE Trans. Ind. Electr. 2016, 63, 406–417. [Google Scholar] [CrossRef]
  10. Lauss, G.; Strunz, K. Multi-rate Partitioning (MRP) Interface for Enhanced Stability of Power-Hardware-in-the-Loop Real-time Simulation. IEEE Trans. Ind. Electr. 2018, 66, 595–605. [Google Scholar] [CrossRef]
  11. Mao, C.; Leng, F.; Li, J.; Zhang, S.; Zhang, L.; Mo, R.; Wang, D.; Zeng, J.; Chen, X.; An, R.; et al. A 400-V/50-kVA Digital-Physical Hybrid Real-Time Simulation Platform for Power Systems. IEEE Trans. Ind. Electr. 2018, 65, 3666–3676. [Google Scholar] [CrossRef]
  12. Wu, J.; Xing, X.; Liu, X.; Guerrero, J.M.; Chen, Z. Energy Management Strategy for Grid-tied Microgrids considering the Energy Storage Efficiency. IEEE Trans. Ind. Electr. 2018, 65, 9539–9549. [Google Scholar] [CrossRef]
  13. Youssef, T.A.; Hariri, M.E.; ElSayed, A.T.; Mohammed, O.A. A DDS-Based Energy Management Framework for Small Microgrid Operation and Control. IEEE Trans. Ind. Inf. 2017, 14, 958–968. [Google Scholar] [CrossRef]
  14. Cheng, Y.; Yang, D.; Zhou, H. Det-LB: A Load Balancing Approach in 802.11 Wireless Networks for Industrial Soft Real-Time Applications. IEEE Access 2018, 6, 32054–32063. [Google Scholar] [CrossRef]
  15. Butera, P.; Casolino, G.M.; Russo, M.; Pescosolido, D. Test facility for control system validation in electric industrial plants. In Proceedings of the 2015 AEIT International Annual Conference (AEIT), Naples, Italy, 14–16 October 2015; pp. 1–6. [Google Scholar]
  16. Rankin, D.J.; Jiang, J. A Hardware-in-the-Loop Simulation Platform for the Verification and Validation of Safety Control Systems. IEEE Trans. Nucl. Sci. 2011, 58, 468–478. [Google Scholar] [CrossRef]
  17. Marconato, R. Electric Power Systems—Dynamic Behaviour, Stability And Emergency Controls; CEI: Milano, Italy, 2008; Volume 3, p. 910. [Google Scholar]
  18. Butera, P.; Casolino, G.M.; Russo, M. Computationally-efficient simulation of electric industrial plants. In Proceedings of the IEEE 15th International Conference on Environment and Electrical Engineering (EEEIC), Rome, Italy, 10–13 June 2015; pp. 1083–1088. [Google Scholar]
  19. Tarnawski, J.; Karla, T. Real-time simulation in non real-time environment. In Proceedings of the 21st International Conference on Methods and Models in Automation and Robotics (MMAR), Miedzyzdroje, Poland, 29 August–1 September 2016; pp. 577–582. [Google Scholar]
  20. Kulkarni, A.; Payne, J.; Mistretta, P. Integrating SCADA, Load Shedding, and High-Speed Controls on an Ethernet Network at a North American Refinery. IEEE Trans. Ind. Appl. 2015, 51, 1360–1368. [Google Scholar] [CrossRef]
  21. Li, S.; Jiang, B.; Wang, X.; Dong, L. Research and Application of a SCADA System for a Microgrid. Technologies 2017, 5, 12. [Google Scholar] [CrossRef]
  22. Netto, R.S.; Ramalho, G.R.; Bonatto, B.D.; Carpinteiro, O.A.S.; Zambroni de Souza, A.C.; Oliveira, D.Q.; Braga, R.A.S. Real-Time Framework for Energy Management System of a Smart Microgrid Using Multiagent Systems. Energies 2018, 11, 656. [Google Scholar] [CrossRef]
  23. IEEE Recommended Practice for Excitation System Models for Power System Stability Studies. In IEEE Std 421.5-2016 (Revision of IEEE Std 421.5-2005); IEEE: New York, NY, USA, 2016; pp. 1–207.
Figure 1. HIL architecture in papers [7,8].
Figure 1. HIL architecture in papers [7,8].
Energies 11 02978 g001
Figure 2. HIL architecture in [9,10,11].
Figure 2. HIL architecture in [9,10,11].
Energies 11 02978 g002
Figure 3. HIL architecture adopted in this paper.
Figure 3. HIL architecture adopted in this paper.
Energies 11 02978 g003
Figure 4. Block diagram and information exchange among subsystems. dll, dynamic-link library; PDS, power dynamic simulator.
Figure 4. Block diagram and information exchange among subsystems. dll, dynamic-link library; PDS, power dynamic simulator.
Energies 11 02978 g004
Figure 5. Functional block diagram of the interactions between machine rotors and the electric network in the simulation.
Figure 5. Functional block diagram of the interactions between machine rotors and the electric network in the simulation.
Energies 11 02978 g005
Figure 6. Flowchart of the MATLAB Runtime Scheduler (MRS). PDSMI, PDS monitoring interface.
Figure 6. Flowchart of the MATLAB Runtime Scheduler (MRS). PDSMI, PDS monitoring interface.
Energies 11 02978 g006
Figure 7. One-line diagram of the considered industrial microgrid.
Figure 7. One-line diagram of the considered industrial microgrid.
Energies 11 02978 g007
Figure 8. Computing times for the cycled tasks of the MRS; see Figure 6.
Figure 8. Computing times for the cycled tasks of the MRS; see Figure 6.
Energies 11 02978 g008
Figure 9. A screenshot sample of the man-machine interface (MMI) of the EMS.
Figure 9. A screenshot sample of the man-machine interface (MMI) of the EMS.
Energies 11 02978 g009
Figure 10. Time evolution of frequency on the busbar at 33 kV.
Figure 10. Time evolution of frequency on the busbar at 33 kV.
Energies 11 02978 g010
Figure 11. Load shedding control signal sent by the EMS.
Figure 11. Load shedding control signal sent by the EMS.
Energies 11 02978 g011
Figure 12. Time evolution of voltage on the busbar at 33 kV.
Figure 12. Time evolution of voltage on the busbar at 33 kV.
Energies 11 02978 g012
Figure 13. Time evolution of the active powers (Pgen) of the three generators.
Figure 13. Time evolution of the active powers (Pgen) of the three generators.
Energies 11 02978 g013
Figure 14. Time evolution of reactive powers (Qgen) of the three generators.
Figure 14. Time evolution of reactive powers (Qgen) of the three generators.
Energies 11 02978 g014
Figure 15. Time evolution of frequency on the busbar at 33 kV.
Figure 15. Time evolution of frequency on the busbar at 33 kV.
Energies 11 02978 g015
Figure 16. Time evolution of voltage on the busbar at 33 kV.
Figure 16. Time evolution of voltage on the busbar at 33 kV.
Energies 11 02978 g016
Figure 17. Time evolution of active powers (Pgen) of the three generators.
Figure 17. Time evolution of active powers (Pgen) of the three generators.
Energies 11 02978 g017
Figure 18. Time evolution of the reactive powers (Qgen) of the three generators.
Figure 18. Time evolution of the reactive powers (Qgen) of the three generators.
Energies 11 02978 g018

Share and Cite

MDPI and ACS Style

Casolino, G.M.; Russo, M.; Varilone, P.; Pescosolido, D. Hardware-in-the-Loop Validation of Energy Management Systems for Microgrids: A Short Overview and a Case Study. Energies 2018, 11, 2978. https://doi.org/10.3390/en11112978

AMA Style

Casolino GM, Russo M, Varilone P, Pescosolido D. Hardware-in-the-Loop Validation of Energy Management Systems for Microgrids: A Short Overview and a Case Study. Energies. 2018; 11(11):2978. https://doi.org/10.3390/en11112978

Chicago/Turabian Style

Casolino, Giovanni Mercurio, Mario Russo, Pietro Varilone, and Daniele Pescosolido. 2018. "Hardware-in-the-Loop Validation of Energy Management Systems for Microgrids: A Short Overview and a Case Study" Energies 11, no. 11: 2978. https://doi.org/10.3390/en11112978

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop