Professional Documents
Culture Documents
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
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
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
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
Authorized licensed use limited to: UNIVERSITY OF MANITOBA. Downloaded on December 13,2020 at 05:21:48 UTC from IEEE Xplore. Restrictions apply.