Hardware in-the-loop testing for microgrids

Author: Kati Sidwall, RTDS Technologies, Canada

Regardless of the topology and components present in a given microgrid, we can expect that it will be required to operate both as a part of the larger surrounding grid and as an independent, self-contained network. Ensuring stable operation in both states and seamless transition between the two is a challenge for owners and operators. Power flow between the macro and microgrid depends on a variety of technical and economic factors and requires its own monitoring and control.
At a lower level, another odious technical challenge lies in wait. A microgrid might contain many distributed energy resources, each having its own conversion hardware. Inverters from multiple vendors with different operational standards, in an electrically close environment, present a major coordination challenge. Beyond steady state operation, achieving confidence in the interoperability of these devices during system transients is trying for engineers.
Given our expectations for microgrid performance, their relative novelty, and the multiple levels of tiered control required to manage these systems, the demand for detailed microgrid simulation and testing facilities is high.

The Unique Role and Potential for Real Time Simulation as a Microgrid Testing Tool
Modeling tools have played a longstanding role in power systems analysis, equipment development, and project implementation. Often, these programs run offline - they are software tools running on the user's PC to represent the behavior of the grid under steady state or transient conditions. Load flow, transient stability analysis, and electromagnetic transient simulation programs exist, offering various levels of detail and frequency reproduction.
Real time digital simulation was introduced to the power industry in the early 1990s.  At the time, it revolutionized the way engineers performed the factory acceptance testing of HVDC and FACTS devices. The technology takes advantage of powerful, specialized parallel processor computing hardware to run simulations much faster than a PC can. Running electromagnetic transient simulations in real time - that is, with subsequent instantaneous outputs separated by a constant, microsecond-scale duration of time in which all calculations required to reach the output are performed - has a distinct benefit. Real time operation means that physical devices can be connected to the simulated system in a closed loop. This closed loop interface can be made either by conventional analogue and digital inputs and outputs or via Ethernet-based communication protocols.
The interaction between the network and protection, control, and power devices during system transients can then be studied in great detail over a wide frequency bandwidth. Real time simulation is the only tool that offers this capability - hardware in the loop testing.

The efficiency of simulating in real time is also of interest. With a powerful, dedicated computing device, the time of interest to the user (whether that be the milliseconds following a fault, the seconds taken for a microgrid's frequency to stabilize, or events occurring over larger time scales) is equal to the time taken to complete the simulation. Scripting facilities to automate large numbers of simulations, in which system conditions or parameters may need to vary, make testing even more efficient.
Traditionally, real time simulation had a specific role for engineers, and was used for testing the operation of HVDC and FACTS controls and transmission-level protective relays. Over the last quarter century, as our power systems have changed, so too has the way this technology has been adapted and applied. Real time simulation has been used for wide area protection and control testing, digital substation automation, distribution automation, and inverter testing. At the time of writing, it has also been successfully applied to many microgrid projects. (Figure 2).

As applications have changed, real time simulator providers have had to furnish their technologies with capabilities and features to meet the needs of distribution engineers and those in the microgrid domain. For example, the communication protocols often used in microgrid control, such as MODBUS, must be "compatible" with any real time simulator that is to test them - that is, the simulator must have the innate capability to convert the power system data into a standard-compliant communication packet and send it to the device via LAN. Additionally, accurate and robust software models for renewable energy components and both common and custom-topology converters must be (and have been) developed. As new protocols and standards develop, simulator providers must be aware of their relevance. 
The potential for real time simulation in the microgrid domain is varied. The simulated microgrid can be connected to primary, secondary, and/or tertiary controls in order to assess their performance in managing power flow, stabilizing voltage and frequency, maintaining power quality, and/or preventing overcurrent in conversion devices. The simulated system could also be connected via a power interface to a particular inverter (and connected DER) of interest to evaluate its performance under contingency conditions, often in an environment with many other simulated converters. Full protective schemes can also be tested at secondary level through the use of power amplifiers.
Interesting use cases for real time simulation in the microgrids field are presented in this article.

Inverter Testing - the Challenge and Benefit of Power Hardware in the Loop

It is possible to connect physical power electronic energy conversion hardware to a simulated grid through a power interface - often referred to as "power hardware in the loop" (or PHIL) testing. PHIL requires a four-quadrant amplifier, which can both source and sink real and reactive power, to serve as the interface between the simulated system and the physical hardware. Beyond that, several interface methods and test setups are possible. (Figure 1).
In one case, the DC side of a commercially-available microinverter was connected to a 250W solar panel. The inverter's AC side was connected to the output terminal of an amplifier, which provides values from the simulated grid. The inverter current, measured by a sensor on the amplifier, was sent back to the real time simulator in order to close the loop. (Figure 3).

Establishing a valid and stable PHIL interface is not trivial, and selecting an appropriate amplifier is a crucial step of the process, with several technical considerations including response times, slew rate, harmonic distortion, frequency resolution, and input/output ratings and impedances. Filtering is also a major technical consideration in order to reduce the impact of noise (introduced by voltage and current sensors, physical wiring, and electromagnetic coupling between devices) on the simulation. Any error introduced by noise can be amplified in the interface via positive feedback until hardware limits are exceeded. Filters for noise reduction introduce challenges of their own, including additional delays that may be added to the interface, so filter parameters should be determined carefully.

An interface like this can be used to investigate inverter behavior under a variety of conditions. For example, in this particular case, the inverter response to a simulated line to ground fault was investigated. Current plots obtained from the simulation show that the inverter disconnects from the grid after a fault with a 5-cycle duration was applied. Multitudes of tests can be run with varying fault severities and types, and interaction with the macrogrid, other DERs, and control behaviors simulated in detail. Gaps between the engineer's expectations for inverter performance and actual behavior can be identified. With a real time simulator, these tests can be run for even the least likely of conditions (providing that embedded device protection exists for these conditions), significantly or fully de-risking the installation of an inverter in a complex system. (Figure 4).

The UK'S Power Networks Demonstration Center (PNDC), which has unique testing abilities provided by an impressive on-site 11kV network, has performed significant inverter testing studies using a real time simulator. Seven off the shelf low-voltage PV inverters were tested with the goal of evaluating stability during disturbances resulting from transmission-level faults. Additionally, recently proposed engineering recommendations for the connection of small-scale embedded generators in Great Britain include more potent stability requirements for inverters under voltage shift conditions. The proposed test conditions were applied to these inverters and trip/no-trip boundaries for each device were determined. (Figure 5).

The results from these tests provided some insight into how varied the behavior of inverters really is. For example, faced with unsymmetrical faults, three-phase inverters from different vendors behaved entirely differently, with one tripping on none of the test faults, and another tripping for all of them.
Voltage shift stability varied significantly and showed that under typical faults, certainly some amount of inverter-connected energy generation would be lost. An inventory of all of the various types of inverters installed in the network would be a first step in attempting to accurately quantify the impact of a worst-case scenario.
Potential impacts of inverter behavior on other protection and control systems can also be investigated via real time simulation. For example, the PNDC's study found that some inverters remained connected but significantly reduced power output during voltage shift and reduction events.
This effect may magnify system rate of change of frequency and potentially negatively impact the stability of loss-of-mains protection following a major event.

Microgrid Control Testing - de-risking the Deployment of New Technology in a Complex System

Borrego Springs, a small community located at the end of a single transmission line in southern California subject to extreme and volatile weather conditions, has experienced many power outages historically. For this reason and the fact that the community already had a high concentration of resident-owned rooftop solar PV plus nearby commercial PV systems, it was chosen by the local utility, San Diego Gas and Electric (SDG&E), as an ideal location for a renewable energy-based microgrid to increase the community's energy resiliency. Involving a utility substation, two substation batteries, a large ground-based solar PV array, megawatts of customer-owned rooftop PV, three distributed battery energy storage systems, and about 2,500 residential and 300 commercial/industrial customers, the goal of the microgrid is to provide uninterrupted energy to the community.
Real time simulation played a major role when SDG&E decided to upgrade the microgrid to involve an advanced microgrid controller. Implementing the controller enabled them to control the microgrid both locally and remotely from their distribution control center, increasing both the reliability of islanding/reconnection and their Electric Distribution Operation (EDO) department's capabilities in managing customer-owned distributed resources. EDO did not have significant experience with this prior to the project.

Both control hardware in the loop and power hardware in the loop techniques were used to interface the simulated grid to physical PV and battery inverters, lower-level physical distributed generation controllers, and a substantially similar copy of the centralized microgrid controller installed on site. The testbed allowed for the functional testing of the microgrid controller. This is an example of a sophisticated testing setup, made possible by a real time simulator, but complex to execute for many reasons, including a high penetration of PV and the potential for interaction between parallel converters (now characteristic of many systems worldwide). (Figure 6).

A data manager gateway, which also acts as a communication protocol converter, was used to create an interface between the simulated grid and the microgrid controller. The data manager was compatible with both DNP3 and MODBUS protocols and as such was able to communicate between the microgrid controller, distributed controllers, and simulated system, all of which are compatible with either DNP3 or MODBUS. The real time simulator in this case was equipped with Ethernet-based communication capabilities to allow it to communicate to external devices in real time via DNP3 or MODBUS (among other protocols).

Various scenarios were simulated, sending microgrid values to the controller and interfacing its responses, such as open/close breaker and real/reactive power setpoints, back into the simulation. Individual asset tests were performed in order to determine the response of each asset to changes in voltage and frequency. In this way, the functional requirements of the controller were evaluated, and the SDG&E team became more familiar with the remote control of distributed assets.
Southwest of Borrego Springs at the University of California San Diego (UC San Diego), another microgrid control testing project took place. UC San Diego has an advanced campus microgrid including a diverse generation portfolio including a megawatt-scale fuel cell, solar array, gas-turbine cogeneration plant, energy storage system, chiller plant, gas and steam plants, and emergency diesel generators. With centers for medicine, science, and engineering as critical loads, the campus is required to provide reliable, undisrupted power if necessary. A microgrid monitoring and control system, consisting of controllers, protective relays, meters, and visualization tools, was put in place with expected functionalities including contingency- and frequency-based load shedding, peak shaving, generation control, adaptive protection, and islanding detection and decoupling based on synchrophasor measurements.

Dynamic performance testing of the control system was performed with a real time simulator. The system put in place protects the UC San Diego microgrid at wide-area speeds of less than 25 milliseconds.
To mimic the field setup, the campus microgrid model was connected in a closed-loop with load-shedding controllers, asset controllers, and protective relays. The controllers involved use a range of non-wires communication protocols such as DNP3, MODBUS, IEC 61850, and IEEE C37.118 for synchrophasor measurements - all of which were compatible with the real time simulator to enable bidirectional communication between the power system model and the external control hardware.  Conventional analogue output was used to interface values from the simulated instrument transformers to the relays, as well as digital input and output to handle breaker status and command signals between the simulation and the relays.

The system events simulated in real time - and which the microgrid controller proved to fulfill its operational requirements successfully - included:

  • Decoupling of the microgrid due to a frequency disturbance with a decay rate of 2.5 Hz/s:  As the utility grid frequency decayed past the defined threshold, the microgrid successfully decoupled from the utility grid and loads were shed on the megawatt scale. Gas generators switched to isochronous mode
  • Loss of generation within the microgrid at the gas plant:  When the gas plant generator was tripped within the microgrid, power flow increased to the utility breaker (exceeding the normal rating). In response, the controller shed loads to prevent overloading and tripping of the utility transformer tie and the microgrid continued normal grid-connected operation
  • Loss of intertie breakers within the microgrid, producing islands:  A disconnection of intertie breakers created two islands within the microgrid. When a gas plant was then tripped under load, causing a contingency event, the controller was able to shed loads based on priority within the required island
  • Three-phase fault on the utility tie and loss of generation:  A chain reaction of closely timed contingencies was simulated. A fault that tripped utility tie breakers caused the fuel cell, one steam generator, and one gas generator to also trip within thirty seconds.  Load shedding was initialized and the microgrid was able to stabilize and continue to operate as an island (Figure 7)

Looking Ahead
It is clear that more engineers are using real time simulation as a tool to support their work with microgrids and distributed energy resources. As more microgrid operational and control standards, specialized microgrid communication protocols, and hardware options become available, the potential need for hardware in the loop testing will grow, and the demand on real time simulator providers to equip their products with sufficient facilities will be high. As we continue to understand the benefits of hardware in the loop testing in this space and the situations where it is a particular advantage or requirement, we will have a better idea of where real time simulation sits in the microgrid engineer's toolbox. For now, we must share information between not only technology leaders, but also policy makers, regulators, and thought leaders as microgrids continue to push the envelope of what we demand from our power systems.

Biography

Kati Sidwall received her Bachelor of Engineering from Carleton University in Ottawa, Canada. While at school, she founded the annual Carleton University Green Energy Symposium, managed the engineering student newspaper, and founded the Carleton Engineering Musical - an annual charity musical produced and performed by engineering students. She is now based in Winnipeg, Manitoba, where she spends time performing with a community musical theatre company, writing stories for the page and the stage, and playing Dungeons & Dragons. Kati works in technical marketing at RTDS Technologies Inc., the world standard for real time digital power system simulation.