Software-Defined Microgrid Control: The Genesis of Decoupled Cyber-Physical Microgrids
Software-Defined Microgrid Control: The Genesis of Decoupled Cyber-Physical Microgrids
ABSTRACT Nowadays, microgrid controllers are often embedded in specialized hardware such as PLC
and DSP. The hardware-dependency and fit-and-forget design make it difficult and costly for microgrid
controllers to evolve and upgrade under frequent changes such as plug-and-play of microgrid components.
Furthermore, different distributed energy resources in a microgrid require customized controllers, leading
to long development cycles and high operational costs for deploying microgrid services. To tackle the
challenges, a software-defined control SDC) architecture for microgrid is devised, which virtualizes tradi-
tionally hardware-dependent microgrid control functions as software services decoupled from the underlying
hardware infrastructure, fully resolving hardware dependence issues and enabling unprecedentedly low costs.
A generic SDC prototype is designed to generate microgrid controllers autonomously in edge computing
facilities such as distributed virtual machines. Extensive experiments verify that SDC outperforms traditional
hardware-based microgrid control in that it empowers a decoupled cyber-physical microgrid and thus makes
microgrid operations unprecedentedly affordable, autonomic, and secure.
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
VOLUME 7, 2020 173
FIGURE 1. SDC-enabled microgrid architecture.
flexible and reliable solution to operate the microgrid, sup- frame is designed in the SDC architecture, which auto-
porting diverse quality-of-service (QoS) requirements and matically generates controllers for microgrid, providing
making it much easier to develop new applications and enable high reliability and easily-deployable redundancy.
fast innovation in microgrid [12]. However, although a few • A discrete model of virtual droop control, which incor-
works have been done on developing SDN-enabled microgrid porates double-loop controllers using the trapezoidal
or even networked microgrids [12], [13], the existing litera- rule, is derived as an example for implementing inter-
ture is unfortunately largely silent on the topic of developing faces between DERs and virtualized controllers.
software-defined microgrid controls. Part of the reason for • A testbed is built in an RTDS environment to evaluate
this stems from the fact that achieving the transition – replac- the SDC’s performance. Extensive experimental results
ing hardware-dependent controllers with software-based vir- validate the robustness, plug-and-play capability and
tual ones – is not straightforward. It was unclear how to reliability of the SDC-based system. Results also ver-
guarantee the software-based controllers perform as well as ify that the software-defined controllers perform better
the hardware-dependent ones, and how to provide the redun- when microgrid encounters hardware failures.
dancy for controllers with software-based solutions. The rest of this paper is organized as follows: Section II
In this paper, we present a software-defined control (SDC) presents the SDC-enabled microgrid architecture, the SDC’s
architecture for microgrid. It decouples the hardware infras- work flow and implementation, and the benefits of using SDC
tructure with microgrid control functions. Decoupling soft- for microgrid. The derived discrete model of virtual droop
ware from dedicated hardware enables easier modifications, control is presented in Section III. Section IV provides the
managements and updates. Virtualization allows multiple experimental results, and Section V concludes the paper.
independent users to efficiently use computational and net-
work resources (e.g., processing power and communication II. SDC-ENABLED MICROGRID
bandwidth) by abstracting them into logical units. Specifi- Virtualization provides a promising opportunity to develop
cally, the controllers are implemented in software, and run on novel applications flexibly in microgrid. To implement
white-box hardware platforms via an ultra-fast network [14]. software-based control functions through virtualization on
As an illustration purpose, a primary DER microgrid con- general-purpose servers, a critical challenge is to design a
troller, droop controller, is virtualized and implemented in the framework for SDC with no performance degradation. In this
SDC architecture to demonstrate the system’s performance. section, the devised SDC-enabled microgrid architecture is
Extensive experiments in an RTDS environment verify that first presented, and this is followed by the description of
virtualization of microgrid controllers can get rid of the SDC’s work flow and implementation. The benefits of using
restriction of hardware implementation and at the same time SDC for microgird are also provided.
achieve the goal of hot standby [15] and seamless switching
of controllers at zero cost. The contributions of this paper are A. ARCHITECTURE OF THE SDC-ENABLED MICROGRID
threefold: The high-level design of the SDC-enabled microgrid archi-
• A novel SDC architecture is devised for microgrid, tecture is illustrated in Fig. 1, where the physical and cyber
where the concept and validation of virtualized micro- layers are fully decoupled. The control plane and its corre-
grid controller are addressed. A generalized control sponding functions are pushed to the edge of the microgrid,
receives a request from a battery storage, a software-defined framework for a droop-controlled inverter-based microgrid
droop controller is created from the generalized DER con- are presented in reference [24], where the double-loop con-
troller, and corresponding control signals are generated. The trollers are not included. Moreover, the PI regulator is shown
server then enters the sending mode and starts to send out con- using the z-transformation, which however cannot be applied
trol signals whose destination IP and port are the IP and port directly for software evolutions. In this paper, a droop con-
of the DER, respectively. The handover function is executed troller considering the power calculation, frequency control,
when the SDC manager detects one controller stops working. voltage-current loop control is presented in detail using the
The IP and port of that controller will be transferred to a trapezoidal rule, which can be directly applied with the soft-
backup controller, and the corresponding control parameters ware. Discrete models for other controllers, such as PQ and
will also be set for the backup controller. V/f controls, can be generated in a similar way.
For a droop control, the frequency and voltage magnitudes
D. BENEFITS AND COST OF USING SDC FOR at time k can be obtained as follows:
MICROGRID
f (k) = f ∗ − m(P(k) − P∗ ) = f ∗ − m1P(k), (2)
Virtualized controllers running on the commodity hard-
ware use virtualized computational resources to facilitate and
the implementation of the SDC framework. A virtualized
controller has the ability to produce optimal results with E(k) = E ∗ − n(Q(k) − Q∗ ) = E ∗ − n1Q(k), (3)
minimum resources. Integrating the intervention into exist- where f (k) and E(k) are the frequency and voltage magni-
ing structures greatly requires the replacement of existing tudes at time k, respectively. P(k) and Q(k) are the discrete
controllers with virtualized resources and the establishment samples of the active and reactive powers, respectively. f ∗ and
of connections between virtualized controllers and DERs. E ∗ are the frequency and voltage references, respectively;
Compared to the existing hardware-dependent control archi- and P∗ and Q∗ are the active and reactive power references,
tectures, SDC offers the following benefits for microgrid: respectively. 1P(k) and 1Q(k) are the corresponding active
• The separation of software from hardware infrastruc- and reactive power error inputs for the droop controller,
ture allows the software to evolve independently, which and m and n are frequency and voltage droop coefficients,
provides microgrid with great flexibility such as the respectively.
flexible deployment of control functions for different For a converter-based DER, the droop control is typically
requirements in microgrid. implemented using a double-loop control diagram, where
• The dynamic service provided by the SDC manager the outer control loop is designed to provide current refer-
offers more intensive monitoring for controllers. ences for inner loop, and the inner loop generates modulation
• The generalized DER control framework offers a high waves for SPWM generation [25]. Let vd (k) and vq (k) be the
efficiency and great convenience to develop specific new voltage components in dq coordinate transformed from the
controllers for DERs. three-phase voltage in abc coordinate at time k. Then, Er (k)
• The convenient creation and deployment of software- can be defined as follows:
defined backup controllers provide high reliability for X4 1
microgrid to operate with redundancy. Er (k) = vd (k)(1 + (−1)n 82n (k))
n=1 2n
X4 1
III. VIRTUAL DROOP CONTROLLER +vq (k)(8(k)+ (−1)n 82n+1 (k)), (4)
The communication process between a DER and a virtual
n=1 2n+1
controller can be summarized as follows: 1) the controller where 8(k) is the output of the PLL function at time k, and
establishes communication with the DER using information can be calculated recursively as follows:
provided by the SDC manager; 2) at the DER side, measure-
8(k + 1) = 8(k) + (w(k) + w(k + 1))T /2, (5)
ments such as three phases of the output current and voltage
of DER are sampled and transferred to the controller; and where T is the sampling time, and is set at 0.2 ms in this study.
3) control signals such as those used to generate SPWM are w(k) can be calculated recursively as follows:
sent back to the DER.
w(k + 1) = kp Er (k + 1)
k
A. VIRTUAL DROOP CONTROLLER MODEL X
Discrete control algorithms deployed in the processor are the +ki T ((Er (0)+Er (k + 1))/2+ Er (n)), (6)
n=1
main components to operate DERs’ controllers. In [21]–[23],
different distributed discrete secondary control approaches where kp and ki are the PI parameters.
are proposed to minimize frequency and voltage devia- The phase of the voltage at time k, θ(k), in discrete domain
tions and ensure accurate active and reactive power sharing can be calculated recursively as follows:
for either radial- or mesh-structured microgrids. However,
θ(k + 1) = θ(k) + 2π(f (k) + f (k + 1))T /2, (7)
the primary discrete controllers are not addressed in these
papers. A discrete-time mathematical model and an analytical where f (k) can be obtained from (2).
With vdref and vqref obtained from (11), the current refer-
ences for the inner loop can be calculated as follows:
idref (k + 1) = kpvd (1vdref (k + 1)) + kivd T (1vd (0)
Xk
FIGURE 5. The cyber and physical components in the simulation
1vd (n))
+1vd (k + 1)/2 +
n=1 (9) testbed.
iqref (k + 1) = kpvq (1vqref (k + 1)) + kivq T (1vq (0)
as follows:
Xk
1vq (n)),
+1vq (k + 1)/2 +
1ẋMG (t) = AMG0 1xMG (t) + BMG0 1yMG (t)
n=1
S
where kpvd , kivd , kpvq and kivq are PI parameters, and
X
(A 1x (t − τ )
1idref (k) = idref (k) − id (k). Then, the voltage modulation
MGi MG i
(11)
i=1
references vdm and vqm are obtained as follows:
+BMGi 1yMG (t − τi ))
0 = CMG0 1xMG (t) + DMG0 1yMG (t)
vdm (k + 1) = vd (k + 1) + kpid (1idref (k + 1))
+kiid T (1id (0) + 1id (k + 1)/2
where τi = τmi + τei (i = 1, . . . , m) refers to the time
Xk
1id (n)) + iq (k + 1)wL delay constants, and 0 < τ1 < . . . < τ1 , τmax . In the
+
n=1 (10) SDC-enabled architecture, the measurement and execution
vqm (k + 1) = vq (k + 1) + kpiq (1iqref (k + 1))
delays are trivial compared with the switching and communi-
+kiiq T (1iq (0) + 1iq (k + 1)/2
Xk cation delays caused by master and backup controllers. The
1iq (n)) − id (k + 1)wL,
+ delay’s impact will be further discussed in Section IV.
n=1
where kpid , kiid , kpiq and kiiq are PI parameters. id (k) and iq (k) IV. TEST AND VALIDATION OF SDC
are the current components in dq coordinate transformed A. EXPERIMENTAL SETUP
from the three-phase current in abc coordinate at time k. w To test the SDC’s performance, a real-time simulation testbed
is the frequency reference, i.e., 120π, and L is the inductance is built in an RTDS environment. As illustrated in Fig. 5,
of the filter in the droop controller. this testbed consists of the RTDS hardware, its auxiliary
A variety of functions in a droop control such as inner loop facilities such as the GTNET cards, and the servers. A console
and outer loop, can be used for other software-defined con- PC is used to develop and compile the microgrid model in
trols. Similar methodologies can be applied for the derivation the RSCAD, a power system simulation software designed
of discrete models for other software-defined controls such to interact with the RTDS hardware. The GTNET cards
as PQ and V/f controls. can be used to transmit data between RTDS and external
equipment through a LAN/WAN using protocols such as the
B. TIME DELAY FACTORS IN VIRTUAL DROOP GTNET-SKT (Socket) Protocol. The RTDS and servers are
CONTROLLER connected through switches and a campus network. Mean-
In the SDC architecture, the flow of the information consists while, each server has a specific port, which is linked to
of three steps: 1) measurement, 2) communication among the campus network and can be used for the console PC to
controllers, and 3) execution. In the measurement process, access the server. In this study, the simulator in RDTS has
transmitting the incremental frequency in the f/P droop con- 16 cores for physical-layer simulation running in real time.
trol from a DER to a virtualized controller can introduce a It provides Gigabit Ethernet ports for all IP-based commu-
time-delay τm in the feedback path. The execution process nications including data transmissions between RTDS and
uses an interface to send control signals from a virtualized external servers.
controller to a DER. The control delay τe , which can affect A typical microgrid shown in Fig. 6 is used to test and
the stability of the distributed system, should be considered. validate the SDC’s performance. This test system contains
The impact of the control algorithms’ iterations in the SDC two diesel units, one photovoltaic (PV) unit, one wind tur-
can be neglected due to the large computing capacity of the bine, and one battery. The microgrid can operate in islanded
SDC. The delay in the closed-loop τ , which is the sum of τm or grid-connected mode, depending on whether the circuit
and τe , forms the total delay of the SDC-enabled microgrid. breaker S1 is open or closed. The detailed parameters of the
The small signal model [26] of the time-delayed microgrid is microgrid can be found in Appendix.
In the simulation, the sampling time step is set at 2 µs C. IMPACT OF AN SDC-ENABLED DER ON MICROGRID
for converter-based components and 50 µs for other compo- In this test case, we demonstrate how the microgrid reacts
nents in microgird. The sampling rate of transmission data when an SDC-enabled DER is plugged into the system.
is 600 packets per second. A software-defined virtual droop Initially, the microgrid operates in islanded mode with the
control is designed for the battery in Fig. 6, whose parameters battery disconnected. At time t = 1.2 s, the battery is plugged
are given in table 2 in Appendix V. The battery is connected into the system. Meanwhile, the SDC manager receives a
to Bus 2 through a 0.48/13.2 kV step-up transformer. As the handshake request, and immediately generates and installs
current constraint is commonly set at 1.1-1.3 times of the a virtual droop controller on the remote server. A new con-
rated current [27], [28], a constraint of 1.25 p.u. is set for the nection is built between the battery and the virtual droop
converter’s current in the test cases. controller. The three phases of voltage and current of the
battery’s output are sampled and transferred to the virtual
B. COMPARISON WITH TRADITIONAL DROOP droop controller on the server through the campus network.
CONTROLLER At time t = 6.8 s, the active power of Load 6 suddenly
The performances of the SDC and a traditional droop con- increases from 1 MW to 5 MW.
troller are compared in this subsection. In this test case, The current and voltage responses of the battery before and
the two diesels share the same droop factor and capacity. after the battery is plugged in the microgrid are illustrated
Diesel 1 is controlled by a software-defined droop controller in Fig. 8. It can be seen that:
running on a remote server, and Diesel 2 is controlled by a • The virtual droop controller immediately starts to con-
traditional droop controller, which runs in the RTDS. trol the battery when the battery is plugged in the micro-
The operation of the microgrid works as follows: Initially, grid at time t = 1.2 s. The current of the battery is
the microgrid is connected to the main grid, and the bat- stabilized in a very short time.
tery and capacitor banks are disconnected. At time t = • The voltage of the battery has a little fluctuation but
4 s, the switch S1 is open, making the microgrid operate becomes stable within only around 0.05 s after the bat-
in islanded mode. Meanwhile, the two diesels immediately tery is connected to the microgrid.
start to regulate their output powers for balancing the power • When Load 6 increases at time t = 6.8 s, the voltage
generation with the load consumption. At time t = 11.5 s, magnitude of the battery maintains constant, while the
the active power of Load 6 (see Fig. 6) suddenly increases current magnitude of the battery increases. It indicates
from 1 MW to 5 MW. that the SDC-enabled battery has started to participate
The comparison results of the two diesels’ active powers in the power sharing within the microgrid.
are given in Fig. 7. It can be observed that:
• From time t = 4 s to around t = 7 s, the two diesels have D. IMPACT OF SWITCHING BETWEEN MASTER AND
almost the same dynamic performances. The maximum BACKUP SOFTWARE-DEFINED CONTROLLERS RUNNING
difference between the active powers of the two diesels ON THE SAME SERVER
is only around 0.05 MW. A backup controller can be implemented in microgrid to pro-
• At time t = 11.5 s, the two diesels increase their vide redundancy. In this subsection, the impact of the switch-
active power to an almost same degree during the reg- ing between a master controller and a backup controller
ulation of the active power output. It verifies that the running on the same server is evaluated. Specifically, at time