You are on page 1of 6

Community Microgrid Controller Evaluation using

Hardware-in-the-Loop Testbed
Qian Long, Yuhua Du, Jian Lu, David Lubkeman, John S. Camilleri
Srdjan Lukic, Ning Lu Green Energy Corporation
Department of Electrical & Computer Engineering Durham, NC, USA
NSF FREEDM Systems Center jcamilleri@greenenergycorp.com
North Carolina State University
Raleigh, NC, USA
{qlong2, ydu7, jlu18, dllubkem, smlukic, nlu2}@ncsu.edu

Abstract — This paper introduces a controller hardware-in-the- HIL) or physical devices (power HIL) with real-time
loop (HIL) microgrid testbed that is built to allow not only simulation, providing a more realistic testing environment. A
dynamic validation, but performance evaluation of community HIL microgrid system is presented in [5], composed of real-
microgrid controllers. The performance metrics and evaluation time digital simulators, a prototype microgrid management
methodology are developed related to efficiency, greenhouse gas
system and a communication emulator. It was designed to test
(GHG) emission, economics and reliability. The real-time
community microgrid model is developed to adapt to extended two-layer control algorithms for a microgrid pilot plant. A HIL
time-domain simulation that includes the voltage and frequency microgrid testbed with comprehensive multi-agent framework
dynamics of the microgrid components. A hybrid testbed is demonstrated in [6] for decentralized hierarchical and
configuration is described to demonstrate the capability of distributed microgrid control. A controller HIL microgrid
controller integration, testing automation and post-processing testbed is introduced for commercial microgrid controller
analysis. Case studies based on an actual utility distribution evaluation in [7]. Actual distributed energy resources (DERs)
system are presented to demonstrate the functionality of the controllers are interfaced with real-time simulation, including
microgrid testbed as well as the effectiveness of the evaluation commercial genset controller and inverter controllers for solar
methodology.
and energy storage. An RTDS-based HIL microgrid testbed
Index Terms — hardware-in-the-loop, microgrid testbed, designed for assessing microgrid device-level and system-level
community microgrid controller, performance evaluation control is described in [8, 9]. The hybrid communication
between Microgrid Master Controller, SCADA and Intelligent
I. INTRODUCTION Electronic Device controller has been developed to support
microgrid time-critical operations like islanding and
With microgrid controller technology advancing towards resynchronization.
standardization [1] – [2], the testing of microgrid controllers is Compared to the existing HIL microgrid testbeds, the one
becoming more and more critical. Various testing techniques presented in this paper allows not only dynamic stability
and methodologies have been proposed to verify and assess validation, but also performance evaluation in extended time-
microgrid control from multiple perspectives [3]. Software- domain for the microgrid controller. The proposed HIL
only simulation provides a flexible and cost-effective method microgrid testbed is introduced in Section II, which mainly
for testing, but its performance is inhibited by the difficulty of focuses on real-time modeling approach and testbed
achieving high simulation accuracy and low computational configuration. Section III describes methodology for evaluating
costs at the same time. In addition, real-world challenges like the performance of microgrid controller with respect to
communication implementation and interoperability efficiency, greenhouse gas (GHG) emission, economics and
coordination are hard to be fully replicated using simulation- reliability. Section IV presents case studies to demonstrate how
based testing. On the contrary, a full hardware test bench performance evaluation is done using the HIL testbed. Finally,
provides the highest fidelity environment for evaluating conclusions and next steps are given in Section V.
control, communication and interoperability of a microgrid,
such as the CERTS microgrid [4]. However, it usually involves II. HIL MICROGRID TESTBED
prohibitive costs, high risks and more space. A. Real-Time Community Microgrid Model
The Hardware-in-the-loop (HIL) testbed becomes a popular
A community microgrid is defined in this paper as a
alternative during the middle stage of microgrid testing recently
microgrid system that serves critical community assets by
[3]. It permits the integration of controller boards (controller
integrating DERs owned by multiple parties across the
978-1-5386-7138-2/18/$31.00 ©2018 IEEE

Authorized licensed use limited to: UNIVERSITY OF MANITOBA. Downloaded on December 13,2020 at 05:21:48 UTC from IEEE Xplore. Restrictions apply.
Figure 2. CHP model diagram

Figure 1. BESS model diagram

community with existing distribution circuits [10]. A typical Figure 3. PV system model diagram
community microgrid includes major components such as
community loads, and community-level DERs, such as battery generated reusable waste heat (Qex) and mechanical torque
energy storage systems (BESS), photovoltaic (PV) systems, (Tm). Reusable waste heat drives ABS to supply building
wind turbines (WT), combined heat and power (CHP) units, thermal load when waste heat temperature is higher than a
and so on. This section presents the modeling approach for certain threshold while mechanical torque serves as input power
BESS, PV systems, CHP units and community loads. The to synchronous machine (SM). The detailed CHP model is
models are developed under the consideration of including further described in [13].
certain features that are needed for performance evaluation. Frequency-active power droop controller is used as the
1) BESS turbine governor, which allows the CHP unit to operate under
In this testbed, the purposes of BESS modeling are 1) to either grid-connected or islanded mode without any need of
accommodate extended time-domain real-time testing of the control mode change. Also, the controller can be easily
given microgrid controller; 2) to provide battery operation modified to allow isochronous operation of the CHP unit.
states for microgrid controller evaluation. The BESS model is 3) PV Systems
composed of two parts as shown in Fig. 1: battery equivalent The PV system is modeled as three-phase current controlled
circuit model and battery inverter model. mode voltage source converter (CCM-VSC) and synchronized
An equivalent circuit model based on lithium battery is with the grid using a phase-lock-loop (PLL) as presented in Fig.
developed to capture battery operation states (State-of-Charge 3. The proposed PV system model operates in MPPT mode and
(SOC), operation temperature, etc.) at the device-level [11]. injects power that follows an irradiance profile. In islanded
The battery inverter is modeled as voltage control mode voltage operation, PV generation might be curtailed by the master
source converter (VCM-VSC) [12]. An average converter microgrid controller for stability purposes. One-second
model is used to provide enough fidelity on simulated converter resolution real-time PV profiles are utilized, which are
power flow dynamic with reduced computational complexity. generated by interpolating real-world 5-minute data [14].
The local controller design of VCM-VSC, as shown in Fig. 1, 4) Community Loads
allows the BESS operates under either grid-forming and grid-
following operation mode as well as a smooth transition Community loads are classified into four criticality levels:
between the two modes. high, medium, low and optional. Load criticality levels are
considered during the modeling stage because these features
2) CHP Units have an impact on reliability evaluation for critical loads, which
In this testbed, besides modeling the mechanical dynamics is of particular interest in the context of community microgrid.
of the CHP unit, fuel system, compressor and absorption chiller Load breakers are added such that each load group only
(ABS) are also modeled to represent its thermal physics, as responds to its own load modulation/shedding signals sent by
shown in Fig. 2. Based on frequency feedback (ωr), frequency the microgrid controller. Load modeling includes the modeling
reference (ωref) and power reference (Pref), the governor of both electric and thermal load. For electric load, a composite
provides fuel control command signal (Vce) to the fuel system. ZIP model is used. Thermal load is only considered for building
The fuel system model dynamically captures the actual fuel load at the same location of the CHP unit and estimated using
flow (Wf) required under the current rotor speed and ambient the thermal-to-gross ratio obtained in [15]. Thermal load and
temperature. The compressor & turbine model calculates the electric load profiles are obtained using (1) and (2).

Authorized licensed use limited to: UNIVERSITY OF MANITOBA. Downloaded on December 13,2020 at 05:21:48 UTC from IEEE Xplore. Restrictions apply.
PT = min ( QABS , α Pload ) (1)
PE = Pload − PT (2)
where PT and PE are thermal and electric load being supplied.
Thermal load being supplied depends on ABS output QABS (in
the unit of kW) and the actual thermal load α Pload . Note α is
the estimated thermal-to-gross ratio and Pload is the gross
building load located at the same location of the CHP unit.
Load profiles are obtained using hourly load historical data
from a real-world utility database [10]. Load variation time
series are superimposed over hourly data and interpolation is
applied to generate 1-second real-time data. For testing
purposes, different load types are characterized with respect to
seasons (spring/summer/fall/winter) and load levels Figure 4. Controller HIL testbed configuration
(max/min/typical kWh). For example, a summer maximum
kWh day refers to the day with maximum daily energy
consumption between June and August.
B. Hybrid Testbed Configuration
The configuration of the controller HIL testbed, located at
NCSU NSF FREEDM Systems Center, is shown in Fig. 4.
OPAL-RT® OP5031 is used for microgrid real-time simulation.
A National Instrument® LabVIEW User Interface (UI) is used
as testbed console interface to support data acquisition,
parameter control and testing automation during real-time
testing.
DNP3 is used as the communication protocol to allow the
integration of the microgrid controller with the real-time
simulator. Fig. 5 shows the Odroid DNP3 gateway and the
Figure 5. DNP3 master and slave interface
DNP3 slave interface implemented in real-time microgrid
model. The Odroid unit, as the DNP3 master, obtains system
support various states of the system. The platform and APIs are
states as Analog Input and Binary Input from the microgrid
licensed under an AGP 3.0 and Apache License. It can be
testbed by either periodically polling the microgrid testbed or
accessed through a local human machine interface in the lab,
receiving unsolicited response from it. The microgrid testbed,
allowing testers to view all the microgrid operation and status.
as the DNP3 slave, is configured to report event data using
report by exception and receives control setpoints as Analog III. MICROGRID CONTROLLER EVALUATION
Output and Binary Output from the DNP3 master. All the data To evaluate any given microgrid controller design,
points are indexed in the DNP3 point list, which is implemented quantitative performance metrics are required to allow
in the communication interfaces for both DNP3 master and evaluation and comparison among different microgrid
DNP3 slave. Between microgrid controller and OPAL-RT® controller technology. Few papers have addressed the issue of
simulator, the Odroid unit translates DNP3 to a standard defining performance metrics for HIL testing of microgrid
messaging protocol for secure transport and communication controller. In this paper, performance metrics are defined
through public internet. related to efficiency, GHG emission and economics as well as
The hosted microgrid controller, namely GreenBus®, is an reliability.
open source telemetry control platform, deployed in a hosted The efficiency metric Eff considers losses on both utility
environment, and communicate with the network operation
center (NOC), which is set up using an Amazon® EC2-hosted side and DER side (i.e. inverter losses and CHP rejected heat).
service. This underlying communication leverages a standard It is defined for a period T using (3).
messaging protocols that enable best in practice security Etot _ loss
Eff = 1 − (3)
controls for authentication and authorization. The master Etot _ loss + Eload
microgrid controller consists of a number of services that were
where Eload is the energy of load consumption, including both
built on top of the GreenBus® platform using application
programming interfaces. These services include load thermal load and electric load. Etot _ loss is the total energy loss.
forecasting, energy storage optimization based on cost Grid loss involves distribution network loss plus losses from
equations, 48 hour predictive scheduling, control algorithms for generation and transmission. PV system loss is considered as
islanding and resynchronization, and other algorithms to PV inverter loss, using the difference between PV DC energy

Authorized licensed use limited to: UNIVERSITY OF MANITOBA. Downloaded on December 13,2020 at 05:21:48 UTC from IEEE Xplore. Restrictions apply.
and PV AC energy output. CHP loss is obtained using input fuel
minus electric/thermal output in the units of kWh. The BESS
losses EBESS _ loss is calculated using (4) given the measurement
of BESS SOC and battery inverter AC power output.
EBESS _ loss = ΔSOC × kWhcap −  PBESS dt (4)
t∈T

where ΔSOC is the change between the starting SOC and the
ending SOC over a period T. Note kWhcap is the kWh capacity
of BESS. PBESS is the BESS discharging/charging rate in unit of
kW. The BESS loss term includes both battery inverter
operating losses and internal resistor energy losses.
Based on the fact that, for a microgrid, GHG emission is
mainly generated due to the utilization of CHP and electricity
purchase from utility grid, microgrid average emission factor
AEF can be defined over a period T using (5):
EM grid + EM CHP
AEF = (5) Figure 6. Community microgrid reliability evaluation
E grid + EPV + EBESS + ECHP
where EM grid is the GHG emission incurred by energy import
from utility grid, and EM CHP is the GHG emission caused by
fuel burning in CHP unit. Egrid , EPV , EBESS , ECHP are energy
production over a period T from utility grid, PV systems, BESS
and CHP unit, respectively.
Microgrid cost saving is defined over a period T in (6)
considering the difference between energy cost by only
purchasing utility electricity (baseline case) and the one by
purchasing utility electricity plus utilizing microgrid DERs
(microgrid case).
Savings = Cbase − C MG
  (6)
=  WMPt × E grid
base
, t −   WMPt × E grid ,t +  C fuel , t × ECHP , t 
t∈T  t∈T t∈T 
where Cbase is the cost of supplying microgrid load in baseline
case. C MG is the cost of supplying microgrid load in microgrid
case and contains the cost of energy imports from utility grid
and CHP fuel purchase. WMPt is the wholesale market price at
base
hour t and C fuel ,t is the fuel price at hour t. E grid , t is the energy

production from grid at hour t in baseline case while E grid ,t is


the energy production from grid at hour t in microgrid case.
ECHP,t is the CHP energy production at hour t.
SAIDI has been widely used to report the duration of
outages of distribution systems and is used here as the metric to Figure 7. Community microgrid one-line diagram
evaluate microgrid reliability. A series of HIL test scenarios
need to be done before the SAIDI can be calculated, and evaluated based on how many loads are shed and whether BESS
evaluation methodology is shown in the following Fig. 6. SOC is sustained for an islanded operation until the mean time
The test scenarios can be determined by selecting the most to repair (MTTR) elapses.
common fault locations based on historical outage data. For
IV. CASE STUDIES
each scenario, depending on fault locations, the microgrid will
follow different post-fault operations. If there are extra Two case studies are shown in this section to present testing
overcurrent protection devices like reclosers or fuses in the results and performance analysis: 1) grid-connected energy
microgrid, these devices will be coordinated to guarantee the management for and 2) reliability evaluation. Fig. 7 shows the
smallest number of interrupted customers. Note that if the 13.2 kV/480V community microgrid model in real-time
microgrid transitions to islanded mode, the controller will be simulation. It is connected to the local distribution system via a

Authorized licensed use limited to: UNIVERSITY OF MANITOBA. Downloaded on December 13,2020 at 05:21:48 UTC from IEEE Xplore. Restrictions apply.
TABLE I. MICROGRID RESOURCES AND LOAD CONFIGURATION

Microgrid Resources and Loads


Generation PV BESS NG-CHP Load
kW/kVA 248 (70-
500/625 165/250 755 at peak
Capacity ton ABS)
Microgrid Load Criticality
Load
High Medium Low Optional
Criticality
Load
L1-L4 L5 None L6-L10
Group
PCC head breaker and a PCC tail breaker. Those breakers are
normally closed in grid-connected mode and are tripped when
the microgrid transitions to islanded mode. The information on
microgrid resources and loads is shown in Table I.
A. Grid-Connected Energy Management
The objective of this test is to evaluate the performance of
microgrid controller optimal BESS dispatch during grid-
connected operation. The dispatch algorithm is based on a
(a)
multi-objective optimization accounting for efficiency,
economics and environmental impacts utilizing load and
renewable forecast. The input to the testbed are load profiles
and PV renewable profiles representing a summer maximum
kWh day. Information such as wholesale market price,
simulation time and initial system states are used for initializing
the microgrid controller.
Fig. 8(a) shows the dispatch schedule from the microgrid
controller based on a 24-hour real-time test. Note that the data
is averaged to hourly data for post-processing analysis. In terms
of BESS and grid power, positive (negative) means discharge
(charge) and energy import to microgrid (energy export from
microgrid), respectively. The BESS is charged at night during
a low-price period to 80% SOC, and is discharged from 14:00
to 17:00 in order to limit power import from utility grid during
high wholesale price period. Fig. 8(b) shows BESS operation is
close to SOC neutral at the end of the day, indicating a
sustainable energy management for the BESS. (b)
Fig. 8(b) also shows microgrid efficiency and emission are Figure 8. Summer maximum kWh day: (a) Grid-connected dispatch schedule
dynamically captured using definitions in (3-5). Since these (b) BESS SOC (top) and efficiency & GHG emission (bottom)
metrics are defined over a period, they can adapt to analysis in
any time domain. The daily performance metrics are TABLE II. PERFORMANCE SUMMARY FOR SUMMER MAXIMUM KWH DAY
summarized in Table II for the above grid-connected energy
management test. It shows that the tested microgrid controller Improvement
Baseline Microgrid
Rate
is able to provide improved system efficiency, emissions and
Efficiency (%) 40.00 48.32 20.79%
economics. Note that in cases of extended time-domain
Total GHG Emission
evaluation, PV and load characterization are needed to shorten (kg)
6307.74 4266.88 32.35%
real-time testing duration, and linear regression techniques are Average Emission Factor
required for extrapolation analysis [10]. 0.5040 0.3409 32.35%
(kg/kWh)
B. Reliability Evaluation Microgrid Total Cost
471.6
Savings ($)
Four locations are chosen as the most common fault and voltage regulation. Fig. 10 shows that, when the fault
locations as shown in Fig. 7, based on a six-year historical happens at 5:34 AM, load shedding is triggered right away.
utility outage map. Each fault scenario is tested in the HIL Note that this is initiated by microgrid controller based on PV
testbed and the reliability metrics are summarized in Table III and load forecast. The microgrid controller only keeps high
with critical loads being highlighted. critical loads online and dispatches CHP for the purpose of
For fault scenario 1 (F1), the microgrid goes to islanded maintaining BESS SOC. Since the BESS SOC is maintained
operation and the BESS acts as the master unit for frequency for 4 hours (MTTR for overhead), the system is connected back
to the grid and restores the interrupted load once the MTTP

Authorized licensed use limited to: UNIVERSITY OF MANITOBA. Downloaded on December 13,2020 at 05:21:48 UTC from IEEE Xplore. Restrictions apply.
TABLE III. MICROGRID RELIABILITY METRICS SUMMARY
Fault Number of Shutdown Number of Number of Number of High Number of High
Location Events Period (hrs) Customers Customers Not Critical Customer Critical Customer
(counts/year) Served Served Served Not Served
1 0.652 3 32 18 32 0
2 0.054 4 16 34 16 16
3 0.017 4 16 34 16 16
4 0.027 4 35 15 29 3
For All Loads For Critical Loads
SAIDI (min/customer/year)
55.7 9.1

This paper is based on work supported by Microgrid


Institute and the U.S. Department of Energy under Award
Number DE-OE0000734.
REFERENCES
[1] IEEE Standard for the Specification of Microgrid Controllers, IEEE Std
2030.7-2017, pp.1-43, Apr. 23 2018.
[2] IEEE Draft Standard for the Testing of Microgrid Controllers, IEEE
P2030.8/D12, pp. 1-43, Jan. 1 2018.
[3] A. S. Vijay, S. Doolla and M. C. Chandorkar, "Real-Time Testing
Approaches for Microgrids," IEEE Journal of Emerging and Selected
Topics in Power Electronics, vol. 5, no. 3, pp. 1356-1376, Sept. 2017.
[4] R. H. Lasseter et al., "CERTS Microgrid Laboratory Test Bed," IEEE
Transactions on Power Delivery, vol. 26, no. 1, pp. 325-332, Jan. 2011.
[5] J. H. Jeon et al., "Development of Hardware In-the-Loop Simulation
System for Testing Operation and Control Functions of Microgrid,"
IEEE Transactions on Power Electronics, vol. 25, no. 12, pp. 2919-2929,
Dec. 2010.
[6] M. H. Cintuglu, T. Youssef and O. A. Mohammed, "Development and
Figure 10. Fault scenario 1: islanded dispatch schedule (top) and BESS SOC Application of a Real-Time Testbed for Multiagent System
(bottom) Interoperability: A Case Study on Hierarchical Microgrid Control,"
IEEE Transactions on Smart Grid, vol. 9, no.3, pp. 1759-1768, May
2018.
elapses. If BESS SOC is beyond a permissible range during the [7] R. O. Salcedo, et al., “Development of a Real-Time Hardware-in-the-
MTTR period, the system will go to blackout and shuts down Loop Power Systems Simulation Platform to Evaluate Commercial
all the loads. For fault scenario 2 and 3 (F2 and F3), the Microgrid Controllers,” Massachusetts Institute of Technology Lincoln
microgrid goes through similar post-fault operation except PCC Lab, Lexington, MA, Tech. Rep. TR-1203, Feb. 2016.
[8] Bailu Xiao et al., "Development of hardware-in-the-loop microgrid
head breaker and internal recloser are both open to isolate fault. testbed," in 2015 IEEE Energy Conversion Congress and Exposition
L2 and L3 are interrupted for the whole MTTR period. In fault (ECCE), Montreal, QC, 2015, pp. 1196-1202.
scenario 4 (F4), the nearest fuse to the fault blows and L1, L6 [9] B. Xiao et al., "Implementation of system level control and
and L7 are interrupted. It is worth noting that the baseline communications in a Hardware-in-the-Loop microgrid testbed," in 2016
IEEE Power & Energy Society Innovative Smart Grid Technologies
SAIDI for the distribution circuit is around 176 Conference (ISGT), Minneapolis, MN, pp. 1-5, 2016.
min/customer/year and the microgrid controller is proven to be [10] Michael Burr, John Camilleri, David Lubkeman, Qian Long, and Yuhua
effective in enhancing system reliability. Du, “Microgrid optimized resource dispatch for public-purpose
resiliency and sustainability,” United States Department of Energy
V. CONCLUSIONS Office of Energy Efficiency and Renewable Energy (EERE), Report No.
DOE-MGI-00734 (2017).
In this paper, a controller HIL microgrid testbed is [11] Y. Du, R. Jain and S. M. Lukic, "A novel approach towards energy
introduced and a hybrid testbed configuration is presented. The storage system sizing considering battery degradation," in 2016 IEEE
real-time models being developed include certain features for Energy Conversion Congress and Exposition (ECCE), Milwaukee, WI,
facilitating performance evaluation of community microgrid pp. 1-8, 2016.
[12] Yunwei Li, D. M. Vilathgamuwa and Poh Chiang Loh, "Design,
controllers. The designed metrics are able to benchmark the analysis, and real-time testing of a controller for multibus microgrid
controller performance related to efficiency, GHG emission, system," IEEE Transactions on Power Electronics, vol. 19, no. 5, pp.
economics and reliability, and can be applied for extended time- 1195-1204, Sept. 2004.
domain analysis, such as yearly evaluation. Next steps will [13] T. Sun, J. Lu, Z. Li, D. Lubkeman and N. Lu, "Modeling Combined Heat
and Power Systems for Microgrid Applications," IEEE Transactions on
include the development of a distribution system testbed with Smart Grid, in press.
multiple microgrids to support the evaluation of distribution- [14] “FREEDM Open Access Renewable Energy Database project,”
level control algorithms. FREEDM [Online]. Available: http://freedm.mybluemix.net/home.
[15] “Commercial and Residential Hourly Load Profiles for all TMY3
ACKNOWLEDGEMENT Locations in the United States - OpenEI Datasets,” OpenEI Datasets.
[Online]. Available: https://openei.org/datasets/dataset/commercial-and-
residential-hourly-load-profiles-for-all-tmy3-locations-in-the-united-
states.

Authorized licensed use limited to: UNIVERSITY OF MANITOBA. Downloaded on December 13,2020 at 05:21:48 UTC from IEEE Xplore. Restrictions apply.

You might also like