# Neural Harmonic-plus-Noise Waveform Model with Trainable Maximum Voice
Frequency for Text-to-Speech Synthesis

###### Abstract

Neural source-filter (NSF) models are deep neural networks that produce
waveforms given input acoustic features. They use dilated-convolution-based
neural filter modules to filter sine-based excitation for waveform generation,
which is different from WaveNet and flow-based models. One of the NSF models,
called harmonic-plus-noise NSF (h-NSF) model, uses separate pairs of source
and neural filters to generate harmonic and noise waveform components. It is
close to WaveNet in terms of speech quality while being superior in generation
speed.

The h-NSF model can be improved even further. While h-NSF merges the harmonic
and noise components using pre-defined digital low- and high-pass filters, it
is well known that the maximum voice frequency (MVF) that separates the
periodic and aperiodic spectral bands are time-variant. Therefore, we propose
a new h-NSF model with time-variant and trainable MVF. We parameterize the
digital low- and high-pass filters as windowed-sinc filters and predict their
cut-off frequency (i.e., MVF) from the input acoustic features. Our
experiments demonstrated that the new model can predict a good trajectory of
the MVF and produce high-quality speech for a text-to-speech synthesis system.

Index Terms: speech synthesis, source-filter model, harmonic-pluse-noise
waveform model, neural network

##  1 Introduction

In text-to-speech (TTS) systems using statistical parametric speech synthesis
[1], neural-network (NN)-based models have been introduced to both the front-
end text analyzer and the back-end acoustic models [2, 3, 4, 5, 6]. The recent
trend is to replace the signal-processing-based vocoder with a neural waveform
model, a component that generates a waveform from the acoustic features
predicted by the acoustic models.

A well-known neural waveform model called WaveNet-vocoder [7] uses a dilated
convolution (CONV) network [8] to produce the waveform samples in an
autoregressive (AR) manner, i.e., generating the current waveform sample with
the previously generated samples as condition. Although WaveNet outperformed
traditional vocoders [9], its sequential generation process is prohibitively
slow. Flow-based models [10, 11, 12] convert a noise sequence into a waveform
in one shot. However, some of them require sequential processing during
training [10], which dramatically increases the training time [13]. Others use
knowledge distilling to transfer the knowledge from an AR WaveNet to a flow-
based student model, which is complicated in implementation.

We recently proposed neural source-filter (NSF) waveform models which require
neither AR structure, knowledge distilling, nor flow-based methods [14]. The
NSF models generally use three modules to generate a waveform: a conditional
module that upsamples input acoustic features such as F0 and Mel-spectrograms,
a source module that outputs a sine-based excitation given the F0, and a
filter module that uses dilated-CONV blocks to morph the excitation into a
waveform. The models are trained to minimize the spectral amplitude distance
between the generated and natural waveforms. Without the flow-based approach,
the NSF models are easy to implement and train. Without the AR structure, the
NSF models are at least 100 times faster than WaveNet for waveform generation
[15].

An NSF model called harmonic-plus-noise NSF (h-NSF) inherits the efficiency of
the NSF models and demonstrates comparable or better performance than WaveNet
and other NSF models on a Japanese dataset [15]. The core idea of h-NSF is to
use separate pairs of the source and neural filter modules to generate
harmonic and noise waveform components before merging the two components into
an output waveform by using pre-defined finite impulse response (FIR) filters.
The harmonic-plus-noise architecture of h-NSF improves the quality of the
generated waveforms, especially on unvoiced sounds.

It is well known that the speech spectrum can be roughly divided into periodic
and aperiodic bands by a maximum voice frequency (MVF) [16]. Although MVF is
time-variant, our h-NSF chooses one of the two pre-defined MVF values (i.e.,
the cut-off frequency of FIR filters) according to the voicing status of the
sound. In this paper, we propose a new h-NSF model with trainable MVF. This
new model parameterizes the FIR filters as windowed-sinc filters [17] and
predicts their MVF values from the input acoustic features. Our experiments
demonstrated that the new h-NSF can predict the MVF reasonably well on the
basis of the voicing status. The quality of the generated waveforms has
improved without any detriment to the generation speed.

Because the new h-NSF model replies on windowed-sinc filters, we refer to it
as sinc-h-NSF, while the previous h-NSF is referred to as base-h-NSF. In
Section 2, we explain the details of base-h-NSF. In Section 3, we describe
sinc-h-NSF. In Section 4, we compare the two h-NSF models with WaveNet in
experiments. In Section 5, we draw a conclusion.

##  2 Review of base-h-NSF model

A neural waveform model converts input acoustic features into an output
waveform. Let us denote the input acoustic feature sequence as
$\bm{c}_{1:B}=\\{\bm{c}_{1},\cdots\bm{c}_{B}\\}$, where
$\bm{c}_{b}\in\mathbb{R}^{D}$ is the feature vector for the $b$-th frame. We
then use $\bm{o}_{1:T}=\\{o_{1},\cdots,o_{T}\\}$ and $\widehat{\bm{o}}_{1:T}$
to denote the natural and generated waveforms, respectively. Here, $T$ is the
waveform length and $o_{t}\in\mathbb{R}$ is the waveform value at the $t$-th
sampling point.

In our previous work, we proposed NSF models [14] to convert $\bm{c}_{1:B}$
into $\widehat{\bm{o}}_{1:T}$. The NSF models use three types of modules: a
source to produce an excitation signal, a neural filter to convert the
excitation into $\widehat{\bm{o}}_{1:T}$, and a condition part to processes
input $\bm{c}_{1:B}$ for the other two modules. The training is conducted by
minimizing the spectral distance between $\widehat{\bm{o}}_{1:T}$ and
${\bm{o}}_{1:T}$ [14]. Base-h-NSF model introduces harmonic-plus-noise
architecture to the NSF framework (Figure 1). The details of base-h-NSF are
explained in the following sections.

Figure 1: General network structure for baseline and proposed trainable h-NSF
models. LP and HP denote low- and high-pass FIR filters, respectively. Red
arrows denote gradients.

###  2.1 Condition module

The condition module is the bedrock of base-h-NSF. Its basic task is to
upsample the frame-rate acoustic features to the waveform rate. As Figure 1
shows, the condition module processes three types of features111 There is one
alternative feature $\bm{f}_{1:T}^{(c)}$ that is used by the trainable h-NSF
model proposed in this paper (Section 3). It is not used by the baseline h-NSF
models.: the upsampled F0 sequence $\bm{f}_{1:T}$ for the source module, the
upsampled and transformed acoustic feature sequence $\widehat{\bm{c}}_{1:T}$
for the neural filter module, and the upsampled unvoiced/voiced (U/V) flag for
the FIR filters.

Suppose each frame of the input $\bm{c}_{1:B}$ contains an F0 datum
$f_{b}\in{\mathbb{R}}_{\geq{0}}$ and a Mel-spectrum $\bm{s}_{b}$, i.e.,
$\bm{c}_{b}=[f_{b},\bm{s}_{b}^{\top}]^{\top}$. Then, it is straightforward to
upsample the F0 sequence $\\{f_{1},\cdots,f_{B}\\}$ of length $B$ into
$\bm{f}_{1:T}$ of length $T$ by simply copying each $f_{b}$ for $\left\lceil
T/B\right\rceil$ times. Similarly, the U/V flag sequence can be upsampled
after determining the U/V from the $f_{b}$ (e.g., voiced if $f_{b}>0$ or
unvoiced if $f_{b}=0$). For $\widehat{\bm{c}}_{1:T}$, the condition module
first transforms the sequence of $\bm{s}_{b}$ using two hidden layers: a bi-
directional long short-term memory (Bi-LSTM) layer with a layer size of 64 and
a 1-D convolution (CONV) layer with a layer size of 63 and a window size of 3.
After that, it concatenates the output feature vector with the F0 and
upsamples it as $\tilde{\bm{c}}_{1:T}$, where
$\tilde{\bm{c}}_{t}\in\mathbb{R}^{64},\forall{t}\in\\{1,\cdots,T\\}$.

(a)  (b)

Figure 2: Condition module (top) and neural filter block (bottom). FF, Bi-
LSTM, and CONV denote feedforward, bi-directional LSTM, and convolutional
layers, respectively. Layers in shaded area are only used to compute
$\bm{f}_{1:T}^{(c)}$ for the proposed new h-NSF model.

###  2.2 Source modules

The base-h-NSF model contains two source modules. One module generates
Gaussian noise excitation for the noise waveform component, while the other
generates a sine-based excitation signal $\bm{e}_{1:T}$ for the harmonic
component.

We briefly explain the sine-based excitation. Given the upsampled F0 sequence
$\bm{f}_{1:T}$, a sine waveform that carries the F0 or the $i$-th harmonic can
be generated as

$\displaystyle{e}_{t}^{<i>}=\begin{dcases}\alpha\sin(\sum_{k=1}^{t}2\pi\frac{i{f}_{k}}{N_{s}}+{\phi})+{n}_{t},&\text{if
}{f_{t}}>0\\\ \frac{\alpha}{3\sigma}{n}_{t},&\text{if }f_{t}=0\\\
\end{dcases},$ (1)

where $\phi\in[-\pi,\pi]$ is a random initial phase, $N_{s}$ is a waveform
sampling rate, and ${n}_{t}\sim\mathcal{N}(0,\sigma^{2})$ is Gaussian noise.
Note that ${e}_{t}^{<i>}$ is a Gaussian noise in unvoiced regions where
$f_{t}=0$. The hyper-parameter $\alpha$ adjusts the amplitude of
${e}_{t}^{<i>}$, while $\sigma$ is the standard deviation of the Gaussian
distribution. We set $\sigma=0.003$ and $\alpha=0.1$ [15].

We set $I=8$ for base-h-NSF, i.e., fundamental tone and seven higher
harmonics. A feedforward (FF) layer is then used to merge them into excitation
${\bm{e}_{1:T}}=\text{tanh}(\sum_{i=1}^{I}w_{i}{\bm{e}}_{1:T}^{<i>}+w_{b})$,
where ${e}_{t}\in\mathbb{R},\forall{t}\in\\{1,\cdots,T\\}$. Note that
$\\{w_{1},\cdots w_{I},w_{b}\\}$ are the FF layer’s weights.

###  2.3 Filter modules

The filter modules of the base-h-NSF can be described in three parts. The
first part uses one neural filter block to convert Gaussian noise into a noise
waveform component $\widehat{\bm{o}}_{1:T}^{(a)}$, while the second part uses
five blocks to convert $\bm{e}_{1:T}$ into a harmonic waveform component
$\widehat{\bm{o}}_{1:T}^{(p)}$. The third part uses FIR filters to merge
$\widehat{\bm{o}}_{1:T}^{(a)}$ and $\widehat{\bm{o}}_{1:T}^{(p)}$ into the
output waveform $\widehat{\bm{o}}_{1:T}$.

The neural filter block is plotted in Figure 2. Suppose the input signal is
$\bm{p}_{1:T}$, where
${p}_{t}\in\mathbb{R},\forall{t}\in\\{1,\cdots,T\\}$222For the 1st block that
receives $\bm{e}_{1:T}$ as input, $\bm{p}_{1:T}=\bm{e}_{1:T}$.. Each
$\bm{p}_{t}$ is first expanded to 64 dimensions through an FF layer, then
processed by a dilated-CONV layer with 64 output channels, and finally summed
with the output of the dilated-CONV layer and the conditional feature
$\tilde{\bm{c}}_{1:T}$. This process is repeated 10 times; the final output
sequence is transformed back into a 1-dimensional signal through a FF layer
and then summed with $\bm{p}_{1:T}$. Note that the dilation size of the $k$-th
dilated-CONV layer is $2^{\text{mod(k-1, 10)}}$, and its filter size is set to
3.

After the neural filter blocks generate $\widehat{\bm{o}}_{1:T}^{(p)}$ and
$\widehat{\bm{o}}_{1:T}^{(a)}$, the base-h-NSF uses low- and high-pass FIR
filters to mix them as the output waveform $\widehat{\bm{o}}_{1:T}=\text{Low-
pass}(\widehat{\bm{o}}_{1:T}^{(p)})+\text{High-
pass}(\widehat{\bm{o}}_{1:T}^{(a)})$. In implementation, we switch the cut-off
frequency (-3 dB) of the FIR filters on the basis of the U/V flag. In voiced
regions, the cut-off frequency values for the low- and high-pass filters are 5
kHz and 7 kHz, respectively. In unvoiced regions, they are 1 kHz and 3kHz. The
filter coefficients are calculated in advance [18] and fixed in the model.

##  3 Proposed h-NSF model with trainable maximum voice frequency

The cut-off frequency of the FIR filters in base-h-NSF is manually specified
and only changes according to the voicing conditions. In classical harmonic-
plus-noise models, however, the cut-off frequency is assumed to be time-
variant [16, 19]. It is thus reasonable to try time-variant FIR filters with a
cut-off frequency predicted from the input acoustic features.

The proposed h-NSF model is identical to the base-h-NSF except for the
procedure to calculate the time-variant cut-off frequency for the FIR filters.
Suppose we are using filters of order $M$, and their coefficients at time $t$
are $\bm{h}_{t}^{(p)}=\\{h_{t,0}^{(p)},\cdots,h_{t,M}^{(p)}\\}$ and
$\bm{h}_{t}^{(a)}=\\{h_{t,0}^{(a)},\cdots,h_{t,M}^{(a)}\\}$, respectively.
Given the periodic and aperiodic components
$\\{\widehat{\bm{o}}_{1:T}^{(p)},\widehat{\bm{o}}_{1:T}^{(a)}\\}$, the output
waveform $\widehat{{o}}_{t}$ at the $t$-th time step can be merged as

$\widehat{{o}}_{t}=\sum_{m=0}^{M-1}\widehat{{o}}_{t-m}^{(p)}h_{t,m}^{(p)}+\sum_{m=0}^{M-1}\widehat{{o}}_{t-m}^{(a)}h_{t,m}^{(a)}.$
(2)

Our goal is to predict $\\{\bm{h}_{t}^{(p)},\bm{h}_{t}^{(a)}\\}$ from the
acoustic features $\bm{c}_{1:B}$. For this purpose, we use a two-step
procedure as Figure 3 plots. First, the condition module predicts normalized
cut-off frequency $f_{t}^{(c)}\in(0,1)$333Being normalized means that
$f_{t}^{(c)}$ is equal to physical cut-off frequency (Hz) divided by Nyquist
frequency. given $\bm{c}_{1:B}$. After that,
$\\{\bm{h}_{t}^{(p)},\bm{h}_{t}^{(a)}\\}$ are calculated from $f_{t}^{(c)}$.
During back propagation, the gradients are computed and propagated backwards.

###  3.1 Forward computation

####  3.1.1 Predicting cut-off frequency

Because the MVF of a sound is influenced by its voicing status, we take the
U/V flag into consideration and revise the condition module of the base-h-NSF
in order to predict $f_{t}^{(c)}$ from $\bm{c}_{1:B}$. As the shaded area of
Figure 2 shows, a Bi-LSTM layer and a CONV layer with a tanh activation
function are added to predict a signal that will be upsampled to
$\bm{r}_{1:T}$, where $r_{t}\in{(-1,1)},\forall{t}\in\\{1,\cdots,T\\}$.
Meanwhile, the U/V flag is upsampled as signal $\bm{v}_{1:T}$. We then set
$v_{t}=0.7$ if the $t$-th time step is voiced or $v_{t}=0.3$ for an unvoiced
time step444These values are references suggesting that, for example, the MVF
of voiced sounds is around 5.6 kHz (=0.7 * 8 kHz). We can scale or shift these
values when we merge $v_{t}$ with $r_{t}$..

With ${v}_{t}\in\\{0.7,0.3\\}$ and ${r}_{t}\in(-1,1)$, we can fuse them into
the output $f_{t}^{(c)}\in(0,1)$ in various ways. Without loss of generality,
we design a fusion function as

$f_{t}^{(c)}=\mathcal{F}(a{v}_{t}+b{r}_{t}+c),$ (3)

where $\\{a,b,c\\}$ can be trainable parameters or fixed hyper-parameters.
$\mathcal{F}(\cdot)$ can be a sigmoid function or an identity function
$f(x)=x$ if $a{v}_{t}+b{r}_{t}+c$ is already between 0 and 1.

How we define Equation (3) depends on our prior knowledge about the MVF and
its relationship with the voicing status. For example, we may use three
definitions listed in Table 1. The first definition ensures that
$f_{t}^{(c)}\in(0.1,0.5)$ in voiced time steps while $f_{t}^{(c)}\in(0.5,0.9)$
in unvoiced time steps. The second definition only replies on the $r_{t}$,
i.e., predicting the MVF from conditional features without any prior knowledge
of the voicing status. Finally, the last definition learns the weight to
combine the $v_{t}$ and $r_{t}$. We compare these three definitions in our
experiments. Note that to prevent the abrupt change of the filter frequency
response, $\bm{f}_{1:T}^{(c)}$ is smoothed by taking the time domain average
over a window size of 5 ms.

Figure 3: Procedure to derive low-pass (LP) and high-pass (HP) filter coefficients in proposed trainable h-NSF model. Table 1: Four possible definitions of $f_{t}^{(c)}=\mathcal{F}(a{v}_{t}+b{r}_{t}+c)$ (Equation (3)) to merge ${v}_{t}\in\\{0.7,0.3\\}$ and ${r}_{t}\in(-1,1)$. Definition | $\mathcal{F}(x)$ | $a$ | $b$ | $c$
---|---|---|---|---
$f_{t}^{(c)}=v_{t}+0.2r_{t}$ | $x$ | 1 | 0.2 | 0
$f_{t}^{(c)}=0.5r_{t}+0.5$ | $x$ | 0 | 0.5 | 0.5
$f_{t}^{(c)}=\mathcal{F}(a{v}_{t}+b{r}_{t}+c)$ | sigmoid | trainable

####  3.1.2 Windowed-sinc filters

Given $f_{t}^{(c)}$, we follow the standard procedure to design windowed-sinc
filters and calculate $\\{\bm{h}_{t}^{(p)},\bm{h}_{t}^{(a)}\\}$. Suppose the
filter length $M$ is an odd number, and the index of the filter coefficient is
centered around 0, i.e.,
$n\in\\{-\frac{M-1}{2},-\frac{M-1}{2}+1,\cdots,0,\cdots,\frac{M-1}{2}\\}$.
Given the $f_{t}^{(c)}$ at the $t$-th time step, a coefficient can be computed
for each $n$ based on the sinc function and the Hamming window
$\text{Hamm}(\cdot)$ 555We used the Hamming window as SincNet did [20].
However, due to historical reasons, we used Hann window when calculating the
spectral distances (i.e., Framing in Figure 1.) :

$\begin{split}\tilde{h}^{(p)}_{t,n}&=f_{t}^{(c)}\text{sinc}(\pi{f_{t}^{(c)}}n)\text{Hamm(n)}\\\
&=\frac{\sin(\pi{f_{t}^{(c)}}n)}{\pi{n}}\big{(}0.54+0.46\cos(\frac{2\pi{n}}{M})\big{)}.\end{split}$
(4)

The desired filter coefficient $\bm{h}_{t}^{(p)}$ can then be calculated after
gain normalization and index shifting from $n$ to $m$:

${h}^{(p)}_{t,m}=\frac{\tilde{h}^{(p)}_{t,m-\frac{M-1}{2}}}{\sum_{n={-\frac{M-1}{2}}}^{\frac{M-1}{2}}\tilde{h}^{(p)}_{t,n}}$
(5)

Note that gain normalization makes the gain of the low-pass filter equal to 1
at 0 Hz. The index shift from
$n\in\\{-\frac{M-1}{2},\cdots,0,\cdots,\frac{M-1}{2}\\}$ to
$m\in\\{0,\cdots,{M}\\}$ makes the filter causal. Similarly, the high-pass
filter coefficients are deterministically computed by:

$\tilde{h}^{(a)}_{t,n}=\Big{(}\frac{\sin(\pi{n})}{\pi{n}}-\frac{\sin(\pi{f_{t}^{(c)}}n)}{\pi{n}}\Big{)}\text{Hamm}(n),$
(6)
${h}^{(a)}_{t,m}=\frac{\tilde{h}^{(a)}_{t,m-\frac{M-1}{2}}}{\sum_{n={-\frac{M-1}{2}}}^{\frac{M-1}{2}}\tilde{h}^{(a)}_{t,n}(-1)^{n}}.$
(7)

Trainable sinc-based FIR filters have been used in SincNet [20]. While SincNet
uses multiple time-invariant band-pass filters, we used time-variant low- and
high-pass ones. The cut-off frequency in SincNet is assumed to be the
parameter of the network, but our network predicts it from conditional
features.

###  3.2 Back propagation

We need to calculate the gradients of $f_{t}^{(c)}$ w.r.t the loss function
$\mathcal{L}$. By using the chain rule on Equation (2), we first get

$\frac{\partial{\mathcal{L}}}{\partial{f_{t}^{(c)}}}=\frac{\partial{\mathcal{L}}}{\partial{\widehat{o}_{t}}}\frac{\partial{\widehat{o}_{t}}}{\partial{f_{t}^{(c)}}}=\frac{\partial{\mathcal{L}}}{\partial{\widehat{o}_{t}}}\sum_{m=0}^{M-1}(\widehat{{o}}_{t-m}^{(p)}\frac{\partial{h_{t,m}^{(p)}}}{\partial{{f_{t}^{(c)}}}}+\widehat{{o}}_{t-m}^{(a)}\frac{\partial{h_{t,m}^{(a)}}}{\partial{{f_{t}^{(c)}}}}).$
(8)

Then, based on Equations (4) and (5), it can be shown that

$\frac{\partial{h_{t,m}^{(p)}}}{\partial{{f_{t}^{(c)}}}}=\sum_{n}\frac{\partial{h_{t,m}^{(p)}}}{\partial{\tilde{h}_{t,n}^{(p)}}}\frac{\partial{\tilde{h}_{t,n}^{(p)}}}{\partial{{f_{t}^{(c)}}}}=\frac{\alpha_{t,m-\frac{M-1}{2}}-{h}^{(p)}_{t,m}\gamma_{t}^{(p)}}{\beta_{t}^{(p)}},$
(9)

where $\alpha_{t,n}=\text{Hamm}(n)\cos(\pi{f_{t}^{(c)}}n)$,
$\beta_{t}^{(p)}=\sum_{n}\tilde{h}^{(p)}_{t,n}$, and
$\gamma_{t}^{(p)}=\sum_{n}\alpha_{t,n}$. Similarly,
${\partial{h_{t,m}^{(a)}}}/{\partial{{f_{t}^{(c)}}}}$ can be calculated as

$\frac{\partial{h_{t,m}^{(a)}}}{\partial{{f_{t}^{(c)}}}}=\frac{{h}^{(a)}_{t,m}\gamma_{t}^{(a)}-\alpha_{t,m-\frac{M-1}{2}}}{\beta_{t}^{(a)}},$
(10)

where $\beta_{t}^{(a)}=\sum_{n}(-1)^{(n)}\tilde{h}^{(a)}_{t,n}$ and
$\gamma_{t}^{(a)}=\sum_{n}(-1)^{n}\alpha_{t,n}$.

On the basis of Equations (9) and (10),
${\partial{\mathcal{L}}}/{\partial{f_{t}^{(c)}}}$ in Equation (8) can be
computed and propagated backwards.

##  4 Experiments

###  4.1 Data and feature configuration

For the experiment, we used the same data corpus and feature configuration as
our previous work [15]. Specifically, the corpus is a neural-style reading
speech dataset from a Japanese female speaker. The original speech waveforms
were down sampled from 48 kHz to 16 kHz for the experiments.

To train the neural waveform models, we randomly selected 9,000 utterances (15
hours) as the training set. We then prepared a validation set with 500
randomly selected utterances and a test set with another 480 utterances. The
acoustic features included the Mel-spectrograms of 80 dimensions and the F0
extracted using an ensemble of pitch estimators [21]. The frame shift of the
acoustic features was 5 ms (200 Hz).

Because we planned to evaluate the neural waveform models not only in copy-
synthesis but also in TTS scenarios, we also extracted linguistic features
from the transcripts to train acoustic models that predict the Mel-spectrogram
and F0 from the text. The linguistic features contained quin-phone identity,
phrase accent type, etc. [22]. These features were then aligned against the
acoustic feature sequences.

###  4.2 Experimental models

We compared the following models in the experiment666Codes, scripts, and
samples:https://nii-yamagishilab.github.io/samples-nsf/nsf-v3.html:

  * •

WaveNet: an AR WaveNet;

  * •

base-h-NSF: base-h-NSF using the fixed coefficients for the low- and high-pass
filters;

  * •

sinc1-h-NSF: h-NSF with windowed-sinc filters and cut-off frequency
$f_{t}^{(c)}=v_{t}+0.2r_{t}$;

  * •

sinc2-h-NSF: h-NSF with windowed-sinc filters and cut-off frequency
$f_{t}^{(c)}=0.5r_{t}+0.5$;

  * •

sinc3-h-NSF: h-NSF with windowed-sinc filters and cut-off frequency
$f_{t}^{(c)}=\text{Sigmoid}(a{v}_{t}+b{r}_{t}+c)$;

base-h-NSF was trained in our previous work [15]. It used five dilated-CONV
filter blocks (Figure 2) to generate the harmonic waveform component, and each
block contained ten dilated-CONV layers. The $k$-th dilated-CONV layer had a
dilation size of $2^{k-1}$. For the noise component, base-h-NSF used only one
block. The three sinc*-h-NSF models used the same network structure as base-h-
NSF except for the hidden layers to predict cut-off frequency for the time-
variant FIR filters. The FIR filters used $M=31$. All NSF models were trained
using the sum of three spectral amplitude distances with framing and windowing
configurations listed in Table 2.

Table 2: Short-time analysis configurations for the spectral amplitude distance of NSF models | $\mathcal{L}_{1}$ | $\mathcal{L}_{2}$ | $\mathcal{L}_{3}$
---|---|---|---
DFT bins | 512 | 128 | 2048
Frame length | 320 (20 ms) | 80 (5 ms) | 1920 (120 ms)
Frame shift | 80 (5 ms) | 40 (2.5 ms) | 640 (40 ms)
Note: all configurations use the Hann window.
Figure 4: Predicted $\bm{f}_{1:T}^{(c)}$ and $\bm{v}_{1:T}$ when model was
conditioned on natural acoustic features. Background is the spectrogram of
natural waveform. Figure for sinc3-h-NSF was not plotted because the generated
$\bm{f}_{1:T}^{(c)}$ was 1.0. Figure 5: Generated waveforms given natural Mel-
spectrogram and F0 for the same utterance as in Figure 4. Only the 370th to
510th frames are plotted.

WaveNet was trained in our previous work [9]. It contained 40 dilated CONV
layers, where the $k$-layer had a dilation size of $2^{\text{mod}(k-1,10)}$.
WaveNet took both Mel-spectrogram and F0 as conditional features and generated
10-bit $\mu$-law quantized waveform values.

To predict the acoustic features from the linguistic features, we used a deep
neural AR F0 model [6] for predicting the F0 and another deep AR model for the
Mel-spectrogram. The acoustic feature sequences were generated given the
duration aligned on the test set waveforms.

###  4.3 Results and analysis

We first compared the predicted MVF from the sinc*-h-NSF models. Figure 4
plots the predicted MVF trajectory and the natural waveform spectrogram.
Without using U/V, sinc2-h-NSF failed to predict MVF for some voiced regions,
for example, from the 400-th to 500-th frames. Although sinc3-h-NSF used the
U/V, the function $\text{Sigmoid}(a{v}_{t}+b{r}_{t}+c)$ was saturated and
produced 1.0 for all time steps. It seemed to be difficult to learn a
trainable function to merge the u/v and the other acoustic features for MVF
prediction. MVF predicted from sinc1-h-NSF is in general consistent with the
spectrogram, i.e., high MVF in voiced regions and low MVF in unvoiced regions.
These results suggest that MVF can be predicted reasonably well by summing the
U/V with a residual signal predicted from the input acoustic features.

Figure 6: MOS scores of experimental models. Error bars at confidence level of
95% are plotted.

We then compared the quality of the generated waveforms from the experimental
models in a subjective evaluation test. In a single evaluation round, an
evaluator listened to one speech waveform file on one screen, rated the speech
quality on a 1-to-5 MOS scale, and repeated the process for multiple screens.
The waveforms in one evaluation round were for the same text and were played
in a random order. Each evaluator could replay the waveform file during the
evaluation. All the waveforms were converted to 16-bit PCM format in advance.

Around 150 evaluators participated in the test, and 1604 sets of MOS scores
were obtained. The results plotted in Figure 6 demonstrate that sinc1-h-NSF,
base-h-NSF, and WaveNet performed equally well. In contrast, sinc2-h-NSF and
sinc3-h-NSF lagged behind. The reason for sinc2-h-NSF’s poor performance is
the ‘under-estimated’ MVF in voiced regions, as Figure 4 shows. As a result,
some voiced sounds generated by sinc2-h-NSF were over-aperiodic. For example,
as Figure 5 plots, the voiced sound had a weak harmonic structure only around
4 kHz. sinc3-h-NSF generated $\bm{f}_{1:T}^{(c)}=1$ for all utterances, and
the waveforms generated from sinc3-h-NSF lacked aperiodicity, which can be
observed in Figure 5. Furthermore, unvoiced sounds such as [s] were less
aperiodic (see Figure 7) and sounded like a pulse train.

Table 3: Number of network parameters and average number of waveform samples generated in 1-sec time on single Nvidia P100 GPU card. sinc*-h-NSF had similar performance. | No. of model | Generation speed
---|---|---
Model | parameters | memory-save | normal mode
WaveNet | $2.96e+6$ | - | 0.19 k
base-h-NSF | $1.20e+6$ | 71 k | 335 k
sinc1-h-NSF | $1.20e+6$ | 70 k | 335 k

Finally, Table 3 shows the number of parameters and the generation speed.
WaveNet was slow because of the AR generation process. However, the NSF models
were much faster because they produced the waveform in one shot. In the
memory-save mode, in which the NSF-models reduce GPU memory consumption by
releasing and allocating memory layer by layer, the generation speed decreased
because of the time for memory operation. However, they still surpassed
WaveNet.

Figure 7: Natural and generated waveforms from models given natural acoustic
features.

##  5 Conclusion

We proposed a new h-NSF model with trainable MVF. Compared with the baseline
h-NSF model using pre-defined FIR filters to merge the harmonic and noise
waveform components, the new h-NSF model predicts a time-variant MVF from the
input acoustic features to adjust the frequency response of the FIR filters.
We compared different strategies to predict the MVF in the experiments and
found that the U/V information can be useful as prior knowledge. Specifically,
we could predict a residual signal from the input acoustic features and add it
to the U/V signal, which was more stable than other strategies such as
directly predicting the MVF from scratch. Experiments demonstrated that the
proposed trainable h-NSF can generate high-quality waveforms as good as the
waveforms generated by WaveNet. Furthermore, the waveform generation speed of
the proposed model was comparable to other NSF models and was much faster than
that of WaveNet.

Acknowledgement: This work was partially supported by a JST CREST Grant
(JPMJCR18A6, VoicePersonae project), Japan, and MEXT KAKENHI Grants (16H06302,
17H04687, 18H04120, 18H04112, 18KT0051), Japan. The experiments partially were
conducted using TSUBAME 3.0 supercomputer of Tokyo Institute of Technology.

## References

  * [1] H. Zen, K. Tokuda, and A. W. Black, “Statistical parametric speech synthesis,” _Speech Communication_ , vol. 51, pp. 1039–1064, 2009.
  * [2] K. Yao and G. Zweig, “Sequence-to-sequence neural net models for grapheme-to-phoneme conversion,” in _Proc. Interspeech_ , 2015, pp. 3330–3334.
  * [3] H. Zen, A. Senior, and M. Schuster, “Statistical parametric speech synthesis using deep neural networks,” in _Proc. ICASSP_ , 2013, pp. 7962–7966.
  * [4] T. Kaneko, H. Kameoka, N. Hojo, Y. Ijima, K. Hiramatsu, and K. Kashino, “Generative adversarial network-based postfilter for statistical parametric speech synthesis,” in _Proc. ICASSP_ , 2017, pp. 4910–4914.
  * [5] G. E. Henter, S. Ronanki, O. Watts, M. Wester, Z. Wu, and S. King, “Robust TTS duration modelling using DNNs,” in _Proc. ICASSP_ , 2016, pp. 5130–5134.
  * [6] X. Wang, S. Takaki, and J. Yamagishi, “Autoregressive neural f0 model for statistical parametric speech synthesis,” _IEEE/ACM Transactions on Audio, Speech, and Language Processing_ , vol. 26, no. 8, pp. 1406–1419, 2018\.
  * [7] A. Tamamori, T. Hayashi, K. Kobayashi, K. Takeda, and T. Toda, “Speaker-dependent WaveNet vocoder,” in _Proc. Interspeech_ , 2017, pp. 1118–1122.
  * [8] A. van den Oord, S. Dieleman, H. Zen, K. Simonyan, O. Vinyals, A. Graves, N. Kalchbrenner, A. Senior, and K. Kavukcuoglu, “WaveNet: A generative model for raw audio,” _arXiv preprint arXiv:1609.03499_ , 2016.
  * [9] X. Wang, J. Lorenzo-Trueba, S. Takaki, L. Juvela, and J. Yamagishi, “A comparison of recent waveform generation and acoustic modeling methods for neural-network-based speech synthesis,” in _Proc. ICASSP_ , 2018, pp. 4804–4808.
  * [10] R. Prenger, R. Valle, and B. Catanzaro, “WaveGlow: A flow-based generative network for speech synthesis,” in _Proc. ICASSP_ , 2019, pp. 3617–3621.
  * [11] A. van den Oord, Y. Li, I. Babuschkin, K. Simonyan, O. Vinyals, K. Kavukcuoglu, G. van den Driessche, E. Lockhart, L. Cobo, F. Stimberg, N. Casagrande, D. Grewe, S. Noury, S. Dieleman, E. Elsen, N. Kalchbrenner, H. Zen, A. Graves, H. King, T. Walters, D. Belov, and D. Hassabis, “Parallel WaveNet: Fast high-fidelity speech synthesis,” in _Proc. ICML_ , 2018, pp. 3918–3926.
  * [12] W. Ping, K. Peng, and J. Chen, “ClariNet: Parallel wave generation in end-to-end text-to-speech,” in _Proc. ICLP_ , 2019.
  * [13] T. Okamoto, T. Toda, Y. Shiga, and H. Kawai, “Investigations of real-time neural vocoders with fundamental frequency and Mel-cepstra,” in _Proc. ASJ spring meeting_ , 2019, p. (in Japanese).
  * [14] X. Wang, S. Takaki, and J. Yamagishi, “Neural source-filter-based waveform model for statistical parametric speech synthesis,” in _Proc. ICASSP_ , 2019, pp. 5916–5920.
  * [15] ——, “Neural source-filter waveform models for statistical parametric speech synthesis,” _arXiv:1904.12088_ , 2019.
  * [16] Y. Stylianou, “Harmonic plus noise models for speech, combined with statistical methods, for speech and speaker modification,” Ph.D. dissertation, Ecole Nationale Superieure des Telecommunications, 1996.
  * [17] S. W. Smith, _The Scientist and Engineer’s Guide to Digital Signal Processing_. San Diego, CA, USA: California Technical Publishing, 1997.
  * [18] T. Parks and J. McClellan, “Chebyshev approximation for nonrecursive digital filters with linear phase,” _IEEE Transactions on Circuit Theory_ , vol. 19, no. 2, pp. 189–194, 1972.
  * [19] T. Drugman and Y. Stylianou, “Maximum voiced frequency estimation: Exploiting amplitude and phase spectra,” _IEEE Signal Processing Letters_ , vol. 21, no. 10, pp. 1230–1234, 2014.
  * [20] M. Ravanelli and Y. Bengio, “Speaker recognition from raw waveform with sincnet,” in _2018 IEEE Spoken Language Technology Workshop (SLT)_. IEEE, 2018, pp. 1021–1028.
  * [21] L. Juvela, X. Wang, S. Takaki, S. Kim, M. Airaksinen, and J. Yamagishi, “The NII speech synthesis entry for Blizzard Challenge 2016,” in _Proc. Blizzard Challenge Workshop_ , 2016.
  * [22] H.-T. Luong, X. Wang, J. Yamagishi, and N. Nishizawa, “Investigating accuracy of pitch-accent annotations in neural-network-based speech synthesis and denoising effects,” in _Proc. Interspeech_ , 2018, pp. 37–41.


# Consensus Control for Coordinating Grid-Forming and Grid-Following Inverters
in Microgrids

Ankit Singhal, Thanh Long Vu∗, and Wei Du The authors are with Pacific
Northwest National Laboratory, Richland, WA 99352. ∗ Corresponding author:
Thanh Long Vu (email: thanhlong.vu@pnnl.gov).

###### Abstract

In a purely inverter-based microgrid, both grid-forming (GFM) and grid-
following (GFL) inverters will have a crucial role to play in
frequency/voltage regulation and maintaining power sharing through their grid
support capabilities. Consequently, the coordination between these two
technologies becomes increasingly important for optimal system performance.
However, the existing work does not consider GFL’s potential to participate in
a secondary control in coordination with GFM, thus not able to utilize the
full capability of inverter resources. In this paper, we show that it is
possible to fully coordinate the GFL and GFM inverters to achieve accurate
power sharing, frequency/voltage regulation, and circulating var mitigation in
networked microgrids even without the support of any synchronous generators or
the bulk power system. We use the leader-follower consensus framework to
develop a GFM-GFL coordination control. The effectiveness of the proposed
coordination is verified under different disturbances and communication
degradation. In addition, we find that the proposed fully-coordinated
secondary control outperforms other approaches such as un-coordinated and
partially-coordinated secondary controls, in aspects of load sharing and
frequency and voltage regulation. Overall, this study emphasizes the need and
benefits of GFL-GFM coordination in microgrids.

###### Index Terms:

Inverters, DER, grid-forming, grid-following, consensus, frequency stability,
voltage regulation, power sharing.

##  I Introduction

A microgrid is defined as a group of interconnected loads and distributed
energy resources (DERs) within clearly defined electrical boundaries that acts
as a single controllable entity and can operate in grid-connected or islanded
mode. [1, 2]. A microgrid has the potential to provide energy surety to
critical services, improve the reliability of power grids during extreme
events, and can evolve as a key building block for the future power grid [3].
However, during its operation, a microgrid can experiences disturbances under
abrupt events like islanding, load changes, or re-synchronization. Especially,
in the islanded mode, voltages and frequency of the microgrid are no longer
supported by a host grid, and thus they must be controlled by DERs such as
generators and inverters. With the increasing penetration of inverters in
microgrids, it is imperative that the inverters-based DERs should be able to
contribute to frequency and voltage regulations, and load sharing in the
microgrids under disturbances without causing high circulating var [4], an
undesired consequence of parallel inverter operation.

To address these challenges, various control strategies have been proposed and
have subsequently been aggregated into a hierarchical control architecture [5,
3, 6], which include three levels with different functions: (i) the primary
control stabilizes the microgrid and establishes power sharing; (ii) the
secondary control removes the deviations in both global frequency and local
voltages from the nominal values; (iii) the tertiary control is concerned with
global economic dispatch over the network and depends on current energy
markets and prices.

In primary control, there have been few non-droop based power sharing methods
that addresses primary control in a centralized manner and relies on
communication to offer precise load sharing as reviewed in [6, 5]. Some
examples of such controls are centralized [7, 8], master-slave [9], circular
chain control method [10] etc. Nonetheless, in recent standards, the most
common and popular primary control is local proportional droop control due to
its simple implementation, plug-and-play feature and, reliable performance. It
only relies on local measurements and requires no communication as
demonstrated in [6, 11, 12, 13]. In secondary control, most of the existing
work has focused on centralized approaches due to easier decision making
process and coordination [5, 14, 13]. However, the centralized control
architecture does not have the flexibility to integrate the increasing number
or variety of new DER devices. Also, the centralized control architecture
requires long communications links, leads to decision delays, and a failure at
the control center in extreme events may disrupt the whole system. Therefore,
to enable large-scale integration of DERs in power systems, it is necessary to
explore decentralized secondary control architecture in microgrids. Recently,
some efforts have been pursued on peer-to-peer control architecture for the
secondary control [15, 16]. Here, each inverter sends the local measurement
signal to its neighboring inverters (i.e., inverters those it has
communication with), and then adjusts its dynamics based on the differences
between its signal with its neighboring inverters’ signal. Unlike the
centralized control, the peer-to-peer control architecture reduces
computational resources and allows for plug-and-play integration of DERs
(since it does not require the control center to update whenever a new DER
device is integrated).

On the power electronics aspect, the DER inverters are usually of two types,
namely grid-forming (GFM) and grid-following (GFL) [17, 18]. The GFM inverters
can directly control voltage and frequency and behave as a controllable
voltage source behind a coupling impedance as shown in Figure1(a), which is
much like a synchronous generator. Whereas, most of the existing DER inverters
are of GFL type that have the capability to control the output current
magnitude and phase angle, and thus, can regulate the real power and reactive
power (var) output as shown in Figure1(b). Initially, the common practice was
to control GFL inverters only to operate at maximum power point, leaving no
headroom for grid services and regulation. However, with improved control
schemes and recent grid codes (such as IEEE1547, Rule21, Hawaii’s UL 1741),
GFLs are encouraged to operate with certain headroom to provide freq/watt and
volt/var regulation [19, 20, 21]. A study [22] demonstrates the economic
benefits of implementing freq/watt control in Hawaiian electric utilities by
optimal curtailment. Similarly, a recent report [20] recommends maintaining
GFL headroom either by curtailment or via storage for improved grid
reliability in an inverter-dominated system. These developments have taken
state-of-the-art to a point where the potential of GFLs is expected to be used
in providing grid services beyond the primary controls such as secondary
regulation.

Two major gaps in the literature are identified. The first gap is that GFL
inverters, though dominant in practice, are not utilized to provide the
secondary control services in a microgrid i.e. voltage and frequency
regulation, power sharing and circulating var. The state-of-the-art peer-to-
peer secondary control only coordinates GFM inverters for secondary services
[16, 15]. GFL not being able to contribute to power sharing and
frequency/voltage regulation results in under-utilization of their grid
support capabilities as well as it may put extra burden on GFM sources in
extreme disturbances. The second gap is that almost no study discusses a
coordinated control of mixed GFL-GFM sources, at system level, to provide grid
services. Most studies have investigated GFM and GFL controllers performance
separately only, such as frequency control dynamics in [23, 24], fault-ride-
through and weak grid synchronization capabilities in [25] and, device level
stability in [26].

The objective of the paper is to fill these gaps by proposing GFL-GFM
coordination in secondary control and demonstrating its effectiveness by
comparing it with uncoordinated and GFM-only-coordinated approaches. We show
in this study that if GFLs are not coordinated, their capability remains
unutilized, and as a result, system performance is compromised in terms of
frequency/voltage regulation as well as power sharing.

In particular, we use a leader-follower consensus (LFC) control architecture
to coordinate between GFM and GFL, with the former being leaders and the
latter being followers. Unlike existing works, we consider both GFM and GFL
inveters for frequency/voltage regulations and power sharing. In addition,
rather than a standard consensus algorithm, our work utilizes the LFC
algorithm that exploits the physical characteristics of GFM-GFL inverters: (i)
the GFM inverters directly control frequency and voltage, and hence, serve as
leaders, (ii) the GFL inverters measure frequency/voltage to modulate their
outputs, and hence, they serve as followers. The effectiveness of the proposed
LFC coordination is tested on a networked microgrid test system under
different disturbances (load changes, intermittency, and, microgrid
switching), communication degradation and ’plug-n-play’ events i.e.,
integration or tripping of an inverter. We demonstrate that the proposed fully
coordinated control is robust to disturbances, while outperforming
uncoordinated and GFM-only-coordinated approaches. Overall, this work
emphasizes the necessity and benefits of the GFM-GFL coordination in the
secondary control of microgrids.

The structure of this paper is as follows. In Section II, we revisit the
dynamic models of GFM and GFL inverters and their primary droop controls.
Section III introduces the LFC framework for frequency/voltage regulation and
power sharing among GFM-GFL inverters. Section IV presents the co-simulation
framework and use cases to compare and demonstrate the effectiveness of the
proposed control. Conclusions follow in Section V.

##  II Modeling of Grid-Forming and Grid-Following Inverter Control Dynamics

A GFM and GFL inverter can be modeled as an equivalent voltage source and
current source, respectively, connected to a distribution network through a
filter impedance as shown in Figure1. Both the controls measure terminal
voltage ($V^{g}\angle\delta^{g}$) and current ($I^{g}\angle\phi^{g}$) and
regulate the internal voltage $E$ and corresponding angle $\delta$ of an
inverter. However, internally, both of these controls have different dynamics
as discussed below.

###  II-A Grid-Forming (GFM) Control

Figure 1: Equivalent representation of inverter controls (a) grid-forming, and
(b) grid-following Figure 2: Primary frequency and voltage droop control
curves of grid-forming and grid-following inverters

An inverter with GFM control can be modeled as an AC voltage source behind a
coupling impedance that can generate a desired constant voltage magnitude and
frequency in an islanded microgrid as shown in Figure1 (a). Mathematically, it
can be represented as following for an $i^{th}$ inverter:

$\displaystyle\dot{\delta_{i}}$ $\displaystyle=u_{i}^{\delta}$ (1)
$\displaystyle E_{i}$ $\displaystyle=u_{i}^{V}$ (2)

where $u_{i}^{\delta}$ and $u_{i}^{V}$ are frequency and voltage control
inputs or reference signals to the inverter. Several control strategies have
been proposed to define the $u_{i}^{\delta}$ and $u_{i}^{V}$ such as virtual
oscillator [27], virtual synchronous machine [28] and, droop controls [29,
12]. In this work, we choose a relatively well tested CERTS power-frequency
(P-f) droop and var-voltage (Q-V) droop controls as primary GFM controls [1].
These droop controls regulate the frequency and inverter terminal voltage
according to (3) and (4) respectively.

$\displaystyle\omega_{i}^{ref}=\omega_{i}^{nom}-m_{p_{i}}(P_{i}-P_{i}^{set})$
(3) $\displaystyle V_{i}^{ref}=V_{i}^{set}-m_{q_{i}}(Q_{i}-Q_{i}^{nom})$ (4)

where $\omega_{i}^{ref}$ is a reference frequency and act as control input to
the inverter i.e. $u_{i}^{\delta}=\omega_{i}^{ref}$. $P_{i}$ and $Q_{i}$
denote real and reactive power outputs of inverter respectively. P-f control
is further defined by 3 parameters i.e. $\omega_{i}^{nom}$, $m_{p_{i}}$ and
$P_{i}^{set}$ that represent nominal frequency, droop gain and real power set-
point as shown in Figure2(a). Similarly, in Q-V droop curve, $V_{i}^{ref}$
denotes a reference voltage signal. However, it is not directly used as
voltage control input to the inverter ($u_{i}^{V}$) because we are interested
in regulating terminal voltage $V_{i}$ rather than $E_{i}$ directly.
Therefore, $u_{i}^{V}$ is obtained by passing $V_{i}^{ref}-V_{i}$ through a PI
controller. Q-V control is further defined by 3 parameters i.e. $Q_{i}^{nom}$,
$m_{q_{i}}$ and $V_{i}^{set}$ that represent nominal var output (usually taken
as 0), droop gain and voltage set-point as shown in Figure2(b). Figure3 shows
the full GFM control schematic where measured terminal voltage ($V^{g*}_{i}$)
and output power ($,P_{i}^{*},Q_{i}^{*}$) are passed through low pass filter
before being used as input to the droop controllers.

The main purpose of P-f droop is to enable multiple inverters to share real
power. Q-V droop helps in mitigating circulating var among paralleled
inverters.

Figure 3: A schematic of grid-forming control dynamics

###  II-B Grid-Following (GFL) Control

Figure 4: A schematic of grid-following control dynamics with droop curves as
grid support functions

GFL control enables an inverter to behave like a current source that can
inject a specified real power ($P_{i}^{ref}$) and var ($Q_{i}^{ref}$) into the
grid as shown. In GFL control, it is achieved using a typical current control
loop in d-q reference frame which can be written as,

$\displaystyle I_{d_{i}}$ $\displaystyle=P_{i}^{ref}/V^{d}_{i}$ (5)
$\displaystyle I_{q_{i}}$ $\displaystyle=Q_{i}^{ref}/V^{d}_{i}$ (6)

where $I_{d_{i}}$ and $I_{q_{i}}$ are reference signals for inverter current
in d-q reference frame. $V^{d}_{i}$ is d-axis voltage obtained via d-q
reference frame transformation that requires both $V_{i}$ and $\delta^{g}_{i}$
as inputs. Therefore, a standard phase locked loop (PLL) is used to estimate
$\delta^{g}_{i}$ as $\delta^{PLL}_{i}$ by constantly regulating q-axis
voltage, $V^{q}_{i}$, to zero using a PI controller as shown in PLL control
block in Figure4 . PLL is an important component of GFL control to measure
grid side frequency i.e. $\omega_{i}=\dot{\delta}^{PLL}_{i}$. Similarly,
voltage measurements $V_{i}^{g}$ is processed through low pass filter to get
$V_{i}$. Thus obtained current reference signals are converted to inverter
source voltage ($E_{i},\delta_{i}$) by the current control loop such that the
desired $P_{i}^{ref}$ and $Q_{i}^{ref}$ can be injected. The whole schematic
sequence of GFL control is shown in Figure4. The detailed description of PLL
and current control loop can be obtained from [18].

Instead of providing fixed $P_{i}^{ref}$ and $Q_{i}^{ref}$ set-points, usually
an external grid support function is added to GFLs to indirectly regulate
voltage and frequency. In this work, we use DER integration standard
IEEE1547-based volt/var and freq/watt droop functions as primary control for
GFL inverters as defined below.

$\displaystyle P_{i}^{ref}$
$\displaystyle=P_{i}^{set}+(\omega^{nom}-\omega_{i})/m_{p_{i}}$ (7)
$\displaystyle Q_{i}^{ref}$
$\displaystyle=Q_{i}^{nom}+(V_{i}^{set}-V_{i})/m_{q_{i}}$ (8)

Similar to GFM droop curves, $P_{i}^{set},\omega^{nom},m_{p_{i}}$ and
$Q_{i}^{nom},V_{i}^{set},m_{q_{i}}$ are control parameters of freq/watt and
volt/var droop curves as shown in Figure2(c) and (d) respectively. It can be
observed here that GFM measures power outputs and dispatches frequency and
voltage reference signals whereas it gets revered in GFL.

###  II-C Equal Power Sharing

Equal power sharing is an important controller objective for both GFM and GFL.
For a given system condition, an equal power sharing is achieved when all
inverters are maintaining the real power dispatch proportional to their droop
in pu with respect to their ratings ($s_{i}$). This can be written as
$\eta_{p}=m_{p_{i}}P_{i}/s_{i}$ for each $i^{th}$ inverter, where $\eta_{p}$
denotes an equal power sharing parameter. Similarly, an equal var sharing
parameter, $\eta_{q}$ can also be defined. Consequently, an analytical
expression for $\eta_{p}$ and $\eta_{q}$ can be obtained as,

$\displaystyle\eta_{p}=\frac{\sum_{i}P_{i}}{\sum(s_{i}/m_{p_{i}})};\hskip
14.22636pt\eta_{q}=\frac{\sum_{i}Q_{i}}{\sum(s_{i}/m_{q_{i}})}$ (9)

Any divergence of $P_{i}$ from $\eta_{p}$ can be seen as a deviation from
equal power sharing. In the case of $Q_{i}$, a large deviation from $\eta_{q}$
can cause high circulating vars in the system.

In both GFL and GFM, the main purpose of primary droop controls is to maintain
the power sharing and prevent circulating var while providing the frequency
and voltage regulation. However, due to their proportional nature, the
accurate regulation can not be achieved as they always end up with a steady
state deviation in both frequency and voltage. A secondary control is needed
to accomplish removal of these errors.

###  II-D Need for Coordination among GFL and GFM

A secondary control is usually applied at GFMs by updating the $P_{i}^{set}$
in (3). However, in that process, the equal power sharing aspect of primary
control gets disturbed. To preserve that, coordination among GFM inverters is
needed.

Further, if GFLs are not coordinated with GFMs’ secondary control and left
with their primary control only, it will lead to undesired performance as one
of the following two situations arises: (a) if GFMs secondary control could
restore the frequency to nominal on their own, the GFLs will not see the need
of participating in power sharing (point A in Figure2(c)); thus freq/watt
capability of GFLs remains unutilized or; (b) if GFMs do not have enough
capacity to manage the disturbance on their own, GFLs do participate, but it
prevents frequency restoration (point B in Figure2(c)). Moreover, in both
situations, power sharing also gets disturbed as explained in the case study
later. This necessitates a control approach that coordinates among GFL and
GFM, which is explored in the next section.

##  III Leader-Follower Consensus (LFC) Architecture for GFL-GFM Coordination

A special consensus framework, namely LFC, will be utilized in this section to
implement a peer-to-peer coordinated secondary control for a fleet of GFL and
GFM inverters. In the standard consensus framework, multiple agents aim to
reach an agreement on some decision by exchanging information among their peer
agents. Then each agent adjusts its dynamics or behavior based on the
information received from the peer agents with whom it communicated with [30].
In the LFC framework, one or more agents are selected as leaders with external
inputs in addition to the consensus protocol, while the remaining agents are
followers only obeying the consensus protocol [31].

Mathematically, a group of agents can be denoted as $A=\\{1,2,...,n\\}$, in
which the first $n_{f}$ agents are selected as followers while the last
$n_{l}$ agents are selected as leaders with respective notations
$A_{F}=\\{1,2,...,n_{f}\\}$, $A_{L}=\\{n_{f}+1,n_{f}+2,...,n_{f}+n_{l}\\}$ and
$n=n_{f}+n_{l}$. Consider $\mathcal{N}_{i}$ as the set of agents that
communicate with agent $i$. For simplicity, let $x_{i}\in R$ be the position
of agent $i$, where we only consider the one dimensional case, yet the
framework can be extended to higher dimensions. The state evolution of each
follower $i\in A_{F}$ is governed by the first order consensus protocol:

$\displaystyle\dot{x}_{i}=\sum_{j\in\mathcal{N}_{i}}(x_{j}-x_{i}),i\in A_{F},$
(10)

while the state evolution of each leader $i\in A_{L}$ is governed by the first
order agreement protocol with an assigned external input $u_{i}\in R$:

$\displaystyle\dot{x}_{i}=\sum_{j\in\mathcal{N}_{i}}(x_{j}-x_{i})+u_{i},i\in
A_{L}.$ (11)

The external control input $u_{i}$ can be designed to achieve additional
control objectives, e.g., ensuring the agents reach the agreement in one
predefined way [32].

Since GFM inverter control actively sets the frequency and voltage whereas GFL
control measures them to modulate its output, their combination naturally fits
the leader-follower architecture, in which GFM inverters serve as leaders and
GFL inverters serve as followers. Consider a microgrid network with $N_{L}$
GFL and $N_{M}$ GFM inverters represented by sets $L=\\{1,2,3,\dots,N_{L}\\}$
and $M=\\{N_{L}+1,N_{L}+2,N_{L}+3,\dots,N_{L}+N_{M}\\}$ respectively, with
total number of inverters denoted by $N=N_{L}+N_{M}$. The communication link
pattern among the inverters can be represented by an $N\times N$ adjacency
matrix $C$, with elements $c_{ij}$, i.e., $c_{ij}=1$ if the communication
exists between inverter $i^{th}$ and $j^{th}$, and $c_{ij}=0$ otherwise. It
can be referred from graph theory that for a group of agents to converge to a
common consensus, the communication network among them must be connected i.e.
there must be a path in the communication graph between any two nodes [33,
34]. In a system of $N$ agents, the minimum and maximum communication links
required to keep graph connected are $N-1$ and $N\times(N-1)/2$, respectively.
In the next two subsection, we apply the leader-follower concept to design a
coordinated secondary controller for GFL and GFM inverters.

###  III-A Frequency Regulation and Real Power Sharing

There are two objectives to achieve while designing secondary control for P-f
(GFM) and freq-watt (GFL) droop controls i.e. frequency restoration to nominal
and equal real power sharing among inverters. To accomplish this, we propose
following secondary control for GFL (12) and GFM (13):

$\displaystyle-k_{i}^{p}\frac{dP_{i}^{set}}{dt}$
$\displaystyle=\sum_{j\in\mathcal{N}_{i}}{c_{ij}(m^{p}_{i}P_{i}^{set}-m^{p}_{j}P_{j}^{set})},\forall\;i\in
L$ (12) $\displaystyle-k_{i}^{p}\frac{dP_{i}^{set}}{dt}$
$\displaystyle=(\omega_{i}-\omega^{nom})+\\!\\!\sum_{j\in\mathcal{N}_{i}}{c_{ij}(m^{p}_{i}P_{i}^{set}-m^{p}_{j}P_{j}^{set})},$
(13) $\displaystyle\qquad\qquad\forall\;i\in M$

Here, $k_{i}^{p}$ is a positive gain for $i^{th}$ inverter and affects the
speed of frequency regulation. $P_{i}^{set}$ from primary controls is used as
secondary control variable. Following leader-follower concept, both GFL and
GFM have real power sharing terms whereas only GFM has an extra frequency
restoration term in (13). Thus, (3)+(13) and (7)+(12) make a complete
frequency control for GFM and GFL respectively. Note that with no
communication, this control will be an equivalent of frequency restoration
without ensuring power sharing what we term as uncoordinated secondary
control.

Remark 1: Our work assumes that GFL sources will have a planned headroom,
required for secondary regulation, based on the recent standards and
recommendations (discussed in Section I) that encourage non-dispatchable GFL
inverters (such as PV) to participate in frequency regulation by maintaining
certain headroom either via storage or curtailment [20, 22]. The optimal
headroom planning is an important aspect, though not the focus of this work,
and can be referred from some recent proposed methods [35, 36].

Remark 2: Even in the case of planned headroom, intermittency in the GFL
source may cause an unexpected reduction in the available headroom. In that
situation, the proposed control will be able to converge and achieve full
frequency restoration as long as other inverters together have sufficient
headroom to compensate for the intermittency, though with compromised power
sharing. Let’s assume for $i^{th}$ GFL inverter, the output $P_{i}$ is
saturated to a lower value $P_{i}^{max}$ while the power required for equal
power sharing is $P_{i}^{eq}$ such that $P_{i}^{max}<P_{i}^{eq}$. In this
case, equal power sharing is not possible. However, that information is not
known to the GFL controller (12), and it still converges assuming the original
droop set-point $P_{i}^{set}=P_{i}^{eq}$. It helps the controller to converge,
whereas at the device level, the actual output $P_{i}$ is saturated to
$P_{i}^{max}$ and the remaining power is compensated by the other non-
saturated inverters.

###  III-B Voltage regulation and reactive power sharing

Similar to previous section, we have two objectives here i.e. voltage
regulation and mitigating circulating var by equal var sharing. However,
unlike frequency regulation and real power sharing, it is not possible in
general to achieve both the objectives accurately. We can achieve the desired
internal voltage $E_{i}$ but terminal voltage $V_{i}$ is impacted by network
impedance. Therefore, an equal var sharing is not always possible with the
accurate voltage regulation in parallel inverter operations as observed and
explained by [16, 37]. Therefore, we design a compromise between two
objectives as following:

$\displaystyle-k_{i}^{q}\frac{dV_{i}^{set}}{dt}$
$\displaystyle=\sum_{j\in\mathcal{N}_{i}}{c_{ij}(m^{q}_{i}Q_{i}-m^{q}_{j}Q_{j})},\forall\;i\in
L$ (14) $\displaystyle-k_{i}^{q}\frac{dV_{i}^{set}}{dt}$
$\displaystyle=\alpha(V_{i}\\!-\\!V^{nom})+\\!\beta\\!\sum_{j\in\mathcal{N}_{i}}{\\!\\!c_{ij}(m^{q}_{i}Q_{i}-m^{q}_{j}Q_{j})},$
$\displaystyle\qquad\qquad\forall\;i\in M$ (15)

Here, $k_{i}^{q}$ is a positive gain and $V_{i}^{set}$ is a secondary control
variable from primary controls. $V^{nom}$ is a nominal voltage usually taken
as 1 pu. The trade-off between voltage regulation and var sharing is
implemented by scaling coefficients $\alpha$ and $\beta$ for GFM in (15). The
tuning of the scaling coefficient will depend on the network and utility
requirements. The tuning can also be made adaptive, though we use offline
tuning in this study. Thus, (4)+(15) and (8)+(14) make a complete voltage
control for GFM and GFL respectively. Note that with no communication, it will
be an equivalent of accurate voltage regulation with high circulating var.

##  IV Co-simulation for Validation

Figure 5: Co-simulation platform for implementing DER coordination control
Figure 6: A modified IEEE 123 test feeder to create a networked microgrid
system

We develop a co-simulation platform as presented in Fig. 5, in which the
secondary peer-to-peer controllers are programmed in Python to send control
action to the respective DER inverters. The microgrid modeling and inverter
dynamics are simulated in GridLAB-D [38]. An open-source middleware HELICS
[39] is used to handle the data exchange between GridLAB-D and the Python-
based controllers, and to maintain time synchronization between the individual
programs.

A modified and fully inverter-based IEEE 123-node test feeder is used to
demonstrate the impact of the proposed LFC control. As shown in Figure6, it is
a networked microgrid test system in which three microgrids (shown in the
shaded area) are interconnected via switches $sw$ ${1\\_2}$ and $sw$
${2\\_3}$. There are total 9 utility-scale inverters installed in the system,
out of which 6 are GFL, and 3 are GFM inverters at nodes shown in Figure6.
Each GFM and GFL has ratings of 600 and 350 kW respectively. Note that each
microgrid has 1 GFM and 2 GFL inverters. The total rating of the inverters is
about 3900 kW, and the total peak load in the networked microgrid is about
3500 kW. All inverters have 1% frequency droop and 5% voltage droop values. In
order to test the control performance in a very low-inertial microgrid, there
is no generator installed in the system.

To demonstrate the need for coordination among GFL and GFM, the performance is
compared with three other control strategies as following: (a) Case I (no-
control), where only primary droop control is deployed with no secondary
control; (b) Case II (un-coordinated), in which local secondary control is
deployed with no communication among inverters; (c) Case III (GFM-
coordinated), in which only GFM inverters are coordinated as proposed in [16]
but GFL inverters are left uncoordinated; (d) Case IV (fully coordinated) in
which GFL and GFM inverters are coordinated with proposed LFC control.

In order to evaluate power sharing performance, we define the mean power
sharing index for real power (MPSI) and var (MQSI) as following:

$\displaystyle
MPSI=\sum_{i=1}^{N}|(m_{p_{i}}P_{i}/s_{i}-\eta_{p})/\eta_{p}|/N$ (16)
$\displaystyle
MQSI=\sum_{i=1}^{N}|(m_{q_{i}}Q_{i}/s_{i}-\eta_{q})/\eta_{Q}|/N$ (17)

Lower values (close to 0) of MPSI and MQSI are desired as they represent an
average deviations of inverters dispatch from equal power. A higher MQSI is a
measure of high circulating var in the system.

Figure 7: Comparison of the frequency response by proposed LFC control with
existing secondary frequency controls in the events of islanding and load
disturbance. LFC outperforms all other secondary controls in the event 1.
Figure 8: Real power response of GFL and GFM inverters to frequency deviation
Figure 9: Real power sharing index performance comparison of LFC control with
existing secondary frequency controls. LFC significantly outperforms both un-
coordinated and GFM-coordinated secondary controls in both events.

###  IV-A Frequency Regulation and Real Power Sharing

We create two disturbance events (at $t=1$ and $t=4$) to emphasize the value
of the full coordination of GFL-GFM inverters. To begin with, at $t=0$, the
whole system is connected to the grid via substation. At $t=1$ (event 1), the
networked microgrid (shaded area) is isolated from the rest of the system and
substation by opening switch between bus 13 and 152. At $t=4$ (event 2), a
load disturbance is simulated by opening switch between bus 60 and 160 that
disconnects around 1200 kW load (35%). The frequency responses to these events
in all 4 cases are compared in Figure7. The islanding event at $t=1$ leads to
a dip in frequency followed by only partial recovery to 59.86 Hz by primary
droop control in Case I. It can be seen that only the proposed LFC control
(Case IV, blue line) is able to recover the frequency fully back to 60 Hz. The
Case II and III control strategies could only restore frequency to 59.92 Hz.
However, in response to event 2 at $t=4$, Case II and III are able to recover
the frequency overshoot back to 60 Hz along. The different responses to these
two events in Case II and III can be attributed to the non-coordination of
GFLs as discussed in Section II-D. The event 1 disturbance was large enough to
require both GFL and GFM inverters to share their power to meet the total load
demand of the microgrid. Therefore, GFLs participate but prevent frequency
restoration. Whereas, in event 2, since GFM inverters were enough to manage
the load disturbance and could recover the frequency to 60 Hz, GFL don’t see
the need for participation and settle at their nominal power without sharing
the load as can be observed in Figure8(a).

Consequently, the power sharing performance (MPSI) can be seen in Figure9. LFC
control is able to achieve 0 MPSI i.e. equal power sharing in less than 1
second in both the events whereas Cases II and III have non zero MPSI in both
disturbances. Note that the non-participation of GFL in event 2 for case II
and III leads to a worse power sharing reflected by a higher MPSI value,
compared to event 1. Table I summarizes the frequency regulation and real
power sharing performance comparison among all cases. The coordinated LFC
control (Case IV) is able to achieve frequency restoration as well as accurate
power sharing in both events.

This use case demonstrates the need for coordination and verifies that if GFL
and GFM left uncoordinated (Case II and III), the inverters capabilities
remain under-utilized and controller performance is compromised.

TABLE I: Frequency error and real power sharing index comparison  Case Type | Event 1 | Event 2
---|---|---
$|f-60|$ | $MPSI$ | $|f-60|$ | $MPSI$
no-control | 0.14 | 0.00 | 0.07 | 0.00
un-coordinated | 0.08 | 0.12 | 0.00 | 0.24
GFM-coordinated | 0.08 | 0.12 | 0.00 | 0.24
fully coordinated | 0.00 | 0.00 | 0.00 | 0.00
Figure 10: Comparison of the voltage response by proposed LFC control with
other secondary voltage controls in the events of islanding and load
disturbance. Figure 11: Var sharing index performance comparison of LFC
control with other secondary control approaches. Clearly, the LFC with full-
coordination of GFM-GFL inverters significantly outperforms other secondary
control approaches equal var sharing among inverters.

###  IV-B Voltage Regulation and Var sharing

For the same disturbance events, an average voltage responses and var sharing
performance (MQSI) in all 4 cases are compared in Figure10 and Figure11,
respectively. On investigating the first event at $t=1$, we observe that
primary droop controls are not able to bring voltages to nominal 1 pu in case
I. Further we observe in Figure10 that Case II and III are able to improve
voltage regulation significantly due to GFM’s secondary volt/var control.
However, it leads to a very high amount of circulating var as reflected from
higher MQSI values compared to the case I, shown in Figure11. This undesired
response occurs because each inverter tries to push it’s own voltage to 1 pu
by injecting more var with no coordination with other inverters in case II or
with GFL in case III. Note that Case III MQSI value is relatively better than
Case II because of partial coordination.

On the other hand, the proposed LFC coordinated control in Case IV arrives at
a compromise between voltage regulation and var sharing. The voltage is very
close to nominal voltage as shown in Figure10 while maintaining MQSI close to
0 in steady state as shown in 11. Table II summarizes the performance trade-
off, where the voltage regulation is evaluated by calculating a mean absolute
error over all inverters in steady state, defined as
$V_{error}={\sum_{i=1}^{N}|V_{i_{t}}-1|}/{N}$, where $N$ denote the total
number of inverters. It can be verified that the proposed Case IV is able to
improve both $V_{error}$ and MQSI significantly (more than 5 times) compared
to Case I. Whereas, in both Case II and III, a highly accurate voltage
regulation cost us significantly higher MQSI.

The second event at $t=4$ turns out to be a favorable disturbance for voltages
i.e. smaller $V_{error}$ in all cases. Nonetheless, the superior performance
of LFC control in voltage regulation as well as var sharing can be observed in
this event as well from Table II.

TABLE II: Voltage regulation and var sharing index comparison  Case Type | Event 1 | Event 2
---|---|---
$V_{error}$ | $MQSI$ | $V_{error}$ | $MQSI$
no-control | 0.015 | 0.22 | 0.006 | 0.30
uncoordinated | 0.001 | 2.03 | 0.000 | 1.66
GFM-coordinated | 0.002 | 1.77 | 0.002 | 1.07
fully-coordinated | 0.002 | 0.04 | 0.001 | 0.05

###  IV-C Impact of intermittency in GFL

The impact of intermittent nature of GFL sources is observed by simulating an
intermittency event (e.g., cloud cover) on GFL 2, 5 and, 8 at t=2.5 that
reduces their maximum power output by from 350 kW to 225 kW. It can be
observed in Figure12 (top), where after the islanding event 1 at t=1, all
inverters converge to an equal power sharing dispatch. At t=2.5, due to
intermittency, GFL 2 power converges to 225 kW while inverters (1 and 3)
compensate for it. A similar behavior is followed by other inverters as well.
Along with convergence, a full restoration of frequency to 60 Hz is also
maintained in the intermittent event as shown in Figure12 (bottom). However,
power sharing is disturbed, reflecting a lower MPSI value of 0.15, as reported
in Table III. It compares the impact of intermittent events of different
magnitude on power sharing and frequency deviation. It can be observed that
higher intermittency worsens the power sharing with no impact on frequency
deviation. The system can only handle the $P^{max}$ reduction of intermittent
GFLs till 200 kW due to limited headroom availability with all other inverters
at t=2.5. Further note that, in these intermittencies, with reducing real
power headroom, there is more room for reactive power in the inverter.
Therefore, the voltage regulation is not affected negatively by intermittency
as observed in Table III.

Figure 12: Impact of an intermittent event on control performance when the GFL inverters 2,5,8 are not fully dispatchable TABLE III: Impact of intermittent events of different magnitude on the frequency deviation and equal power sharing indices $P^{max}$ | No intermittency | Intermittency (kW)
---|---|---
350 kW (rated) | 275 | 250 | 225 | 200
MPSI | 0.00 | 0.07 | 0.11 | 0.15 | 0.20
$|f-60|$ | 0.00 | 0.00 | 0.00 | 0.00 | 0.00
$V_{error}$ | 0.002 | 0.002 | 0.002 | 0.002 | 0.002
MQSI | 0.004 | 0.004 | 0.004 | 0.004 | 0.004

###  IV-D Impact of Reduced Communication and Link Failure

Figure 13: Reduced communication among inverters Figure 14: Impact of reduced communication and a communication link failure on (top) frequency response and (bottom) power sharing of the LFC control TABLE IV: Impact of reduced communication and link failure on controller performance  cases | $|f-60|$ | MPSI | $V_{e}rror$ | MQSI
---|---|---|---|---
Full communication | 0.00 | 0.00 | 0.002 | 0.04
Reduced communication | 0.00 | 0.00 | 0.002 | 0.14
Link failure | 0.00 | 0.00 | 0.002 | 0.05

After comparative evaluation against existing control strategies, we now test
the robustness of the LFC control in cases of reduced communication and
communication link failure compared to full communication topology for the
islanding disturbance at $t=1$. In a reduced communication case, each
microgrid is considered as one cluster with one leader GFM inverter as shown
in Figure13. The communication across these clusters is only maintained
through leader GFMs i.e. inverter 1, 4, and 7 and all other communication
across the clusters are disabled. It can be noticed in Figure14 that even with
the reduced communication, the same steady state performance for frequency
restoration and power sharing can be achieved as full communication case,
though with a little slower control dynamics. Power sharing convergence takes
around 0.5 seconds more due to less communication as shown in Figure14
(bottom). Table IV tabulates the impact on all the performance indices. It can
be seen that only var sharing is affected by the reduced communication (MQSI
increases from 0.04 to 0.14), though it is still significantly better than all
other control methods i.e. Case I,II and III. It is worth noting that to
achieve a good trade-off between $V_{error}$ and MQSI, scaling parameters
$\alpha$ and $\beta$ had to be re-tuned with the reduced communication
pattern.

On the other hand, the communication link failure case is simulated by
disconnecting a link between inverter 4 and 7 with no update in controller
parameters. The overall performance of this case is similar to full
communication case as can be seen in Figure14 and Table IV except a slight
worsening of var sharing (increase in MQSI from 0.04 to 0.05).

###  IV-E Impact of Communication Topology on Convergence Rate

As discussed earlier, communication graph must be connected for convergence of
consensus. With $N=9$ in our study, the minimum and maximum possible
communication links are 8 and 36, respectively. We conduct a sensitivity study
by simulating various connected communication topology with different number
of links in the range of 8 to 36, using a random sampling. The consequential
convergence rates (seconds required to converge) are plotted in Figure15. It
is observed that compared to the full communication (all 36 links), the
convergence rate increases very slowly till topology with around 12 links.
However, convergence rate rises sharply closer to the minimum threshold i.e. 8
links. Nonetheless, we observe that the controller converges at optimal
steady-state in all topologies. Further, we verify that the consensus is not
able to converge the communication links are reduced below 8 as it does not
remain connected anymore.

Figure 15: Impact of communication topology on the convergence rate of the
proposed controller. Communication topologies with higher links achieve faster
convergence. Minimum links required for consensus convergence, among 9
inverters, is 8.

###  IV-F Performance under Plug-n-Play Case

To test the ‘plug-n-play’ feature, we simulate a scenario by disconnecting
inverter 2 at t=2 and reconnecting back at t=3 as shown in Figure16 It can be
seen the controller can quickly adapt in both situations and other inverters
adjust their power to restore frequency as well converge to equal power
sharing. A similar performance is observed at voltage regulation as well.
Controller’s adaptability with new devices is one of the key factors to
facilitate 100% DER integration in power system.

Figure 16: Controller performance in case of disconnecting and reconnecting
inverter 2 to test ‘plug-n-play’ functionality

###  IV-G Controller Performance under Microgrid Switching

Figure 17: LFC performance in the event of multiple microgrid islanding in a
networked microgrid system; (top):total inverter output in each microgrid;
(middle): frequency response; (bottom): voltage response of each microgrid

We also test the controller performance in the event of multiple microgrids
switching in a networked microgrid as shown in Figure6. After initial
islanding at $t=1$, microgrid switches $sw$ ${1\\_2}$ and $sw$ ${2\\_3}$ are
opened at $t=4$ so that all 3 microgrids become islanded networks, each with 1
GFM and 2 GFL inverters. Figure17 (top) shows the total generation profile in
each microgrid. The solid and dashed lines denote the real and reactive power
respectively. The microgrid 2 can be seen to have the largest adjustment in
real power at $t=4$ and therefore it goes through the highest frequency
transient peak as shown in Figure17 (middle). Due to different real power
adjustments, all 3 microgrids have different transient responses but settle
back to nominal frequency. Figure17 (bottom) shows the voltage response of
each microgrid. Note that since the var demand increases in microgrid 1
(Figure17 (top), dashed black line) unlike microgrid 2 and 3, its voltage
transients are also different. Nonetheless, all microgrids are able to settle
the voltage at 1 pu.

Table V lists all the performance indices values for each microgrid. It is
interesting to note that all 3 microgrids are able to achieve an equal var
sharing (MQSI=0) along with a accurate voltage regulation ($V_{error}=0$).
This is possible in these smaller microgrids because of the electrical
proximity of all 3 inverters within each microgrid. Similarly, an equal real
power sharing (MPSI=0) is achieved within each microgrid after switching out
from a common power sharing in a large networked-microgrid. The results show
the quick adaptability of the proposed LFC controller in an emerging networked
microgrid scenarios.

TABLE V: The LFC controller performance in an event of multiple microgrid switching  | $|f-60|$ | MPSI | $V_{e}rror$ | MQSI
---|---|---|---|---
microgrid 1 | 0.00 | 0.00 | 0.000 | 0.00
microgrid 2 | 0.00 | 0.00 | 0.000 | 0.00
microgrid 3 | 0.00 | 0.00 | 0.000 | 0.00

##  V Conclusions

This paper presented a fully coordinated secondary control of GFL and GFM
inverters for frequency and voltage regulations in microgrids. The
coordination among inverters was achieved using a leader-follower consensus
architecture on both GFM and GFL inverters, where the GFM inverters serve as
leaders and GFL inverters serve as followers. The performance of the proposed
controller was compared against existing secondary control methods, e.g.,
uncoordinated and partially coordinated secondary controls, under different
disturbances such as islanding, sudden load changes and intermittency. We
showed that the coordination is required to obtain equal power sharing among
all inverters, while ensuring that the frequency recovers back to the nominal
value after the system experiences a disturbance. Similarly, the proposed
control improved the voltage regulation while keeping circulating vars within
limit. Finally, we showed that this control is robust to communication
degradation, intermittency in GFL and can quickly adapt to multiple microgrids
switching from a networked microgrid.

## References

  * [1] B. Lasseter, “Microgrids [distributed power generation],” in _2001 IEEE PES Winter Meeting. Conference Proceedings (Cat. No.01CH37194)_ , vol. 1, 2001, pp. 146–149 vol.1.
  * [2] D. T. Ton and M. A. Smith, “The u.s. department of energy’s microgrid initiative,” _The Electricity Journal_ , vol. 25, no. 8, pp. 84 – 94, 2012\.
  * [3] D. E. Olivares, A. Mehrizi-Sani, A. H. Etemadi, C. A. Cañizares, R. Iravani, M. Kazerani, A. H. Hajimiragha, O. Gomis-Bellmunt, M. Saeedifard, R. Palma-Behnke, G. A. Jiménez-Estévez, and N. D. Hatziargyriou, “Trends in microgrid control,” _IEEE Transactions on Smart Grid_ , vol. 5, no. 4, pp. 1905–1919, 2014.
  * [4] B. Wei, J. M. Guerrero, J. C. Vásquez, and X. Guo, “A Circulating-Current Suppression Method for Parallel-Connected Voltage-Source Inverters With Common DC and AC Buses,” _IEEE Transactions on Industry Applications_ , vol. 53, no. 4, pp. 3758–3769, Jul. 2017.
  * [5] A. Bidram and A. Davoudi, “Hierarchical structure of microgrids control system,” _IEEE Trans. on Smart Grid_ , vol. 3, no. 4, pp. 1963–1976, 2012\.
  * [6] D. E. Olivares, A. Mehrizi-Sani, A. H. Etemadi, C. A. Cañizares, R. Iravani, M. Kazerani, A. H. Hajimiragha, O. Gomis-Bellmunt, M. Saeedifard, R. Palma-Behnke, G. A. Jiménez-Estévez, and N. D. Hatziargyriou, “Trends in microgrid control,” _IEEE Transactions on Smart Grid_ , vol. 5, no. 4, pp. 1905–1919, 2014.
  * [7] J. M. Guerrero, L. Hang, and J. Uceda, “Control of distributed uninterruptible power supply systems,” _IEEE Transactions on Industrial Electronics_ , vol. 55, no. 8, pp. 2845–2859, 2008.
  * [8] M. Prodanovic and T. C. Green, “High-quality power generation through distributed control of a power park microgrid,” _IEEE Transactions on Industrial Electronics_ , vol. 53, no. 5, pp. 1471–1482, 2006.
  * [9] J. P. Lopes, C. L. Moreira, and A. Madureira, “Defining control strategies for microgrids islanded operation,” _IEEE Transactions on power systems_ , vol. 21, no. 2, pp. 916–924, 2006.
  * [10] T.-F. Wu, Y.-K. Chen, and Y.-H. Huang, “3c strategy for inverters in parallel operation achieving an equal current distribution,” _IEEE Transactions on Industrial Electronics_ , vol. 47, no. 2, pp. 273–281, 2000.
  * [11] K. De Brabandere, B. Bolsens, J. Van den Keybus, A. Woyte, J. Driesen, and R. Belmans, “A voltage and frequency droop control method for parallel inverters,” _IEEE Transactions on Power Electronics_ , vol. 22, no. 4, pp. 1107–1115, 2007.
  * [12] P. Piagi and R. Lasseter, “Autonomous control of microgrids,” in _2006 IEEE Power Engineering Society General Meeting_ , Jun. 2006, pp. 8 pp.–, iSSN: 1932-5517.
  * [13] J. M. Guerrero, J. C. Vasquez, J. Matas, L. G. de Vicuna, and M. Castilla, “Hierarchical control of droop-controlled ac and dc microgrids—a general approach toward standardization,” _IEEE Transactions on Industrial Electronics_ , vol. 58, no. 1, pp. 158–172, 2011.
  * [14] M. Savaghebi, A. Jalilian, J. C. Vasquez, and J. M. Guerrero, “Secondary control scheme for voltage unbalance compensation in an islanded droop-controlled microgrid,” _IEEE Transactions on Smart Grid_ , vol. 3, no. 2, pp. 797–807, 2012.
  * [15] Q. Shafiee, J. M. Guerrero, and J. C. Vasquez, “Distributed secondary control for islanded microgrids—a novel approach,” _IEEE Transactions on Power Electronics_ , vol. 29, no. 2, pp. 1018–1031, 2014.
  * [16] J. W. Simpson-Porco, Q. Shafiee, F. Dörfler, J. C. Vasquez, J. M. Guerrero, and F. Bullo, “Secondary frequency and voltage control of islanded microgrids via distributed averaging,” _IEEE Transactions on Industrial Electronics_ , vol. 62, no. 11, pp. 7025–7038, 2015.
  * [17] D. Pattabiraman, R. H. Lasseter., and T. M. Jahns, “Comparison of grid following and grid forming control for a high inverter penetration power system,” in _2018 IEEE PESGM_ , 2018, pp. 1–5.
  * [18] W. Du, F. Tuffner, K. P. Schneider, R. H. Lasseter, J. Xie, Z. Chen, and B. P. Bhattarai, “Modeling of grid-forming and grid-following inverters for dynamic simulation of large-scale distribution systems,” _IEEE Transactions on Power Delivery_ , pp. 1–1, 2020.
  * [19] R. W. Kenyon, M. Bossart, M. Marković, K. Doubleday, R. Matsuda-Dunn, S. Mitova, S. A. Julien, E. T. Hale, and B.-M. Hodge, “Stability and control of power systems with high penetrations of inverter-based resources: An accessible review of current knowledge and open questions,” _Solar Energy_ , vol. 210, pp. 149–168, Nov. 2020. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0038092X20305442
  * [20] A. O. Hoke, R. Mahmud, A. Nelson, D. Pattabiraman, M. Asano, D. Arakawa, B. Pierre, M. Elkhatib, J. O. Tan, V. Gevorgian, C. Antonio, and E. Ifuku, “Fast Grid Frequency Support from Distributed Energy Resources,” National Renewable Energy Lab. (NREL), Golden, CO (United States), Tech. Rep. NREL/TP-5D00-71156, Mar. 2021. [Online]. Available: https://www.osti.gov/biblio/1772978
  * [21] A. Singhal, V. Ajjarapu, J. Fuller, and J. Hansen, “Real-Time Local Volt/Var Control Under External Disturbances With High PV Penetration,” _IEEE Transactions on Smart Grid_ , vol. 10, no. 4, pp. 3849–3859, Jul. 2019.
  * [22] J. Johnson, J. C. Neely, J. J. Delhotal, and M. Lave, “Photovoltaic Frequency–Watt Curve Design for Frequency Regulation and Fast Contingency Reserves,” _IEEE Journal of Photovoltaics_ , vol. 6, no. 6, pp. 1611–1618, Nov. 2016.
  * [23] D. Pattabiraman, R. H. Lasseter., and T. M. Jahns, “Comparison of Grid Following and Grid Forming Control for a High Inverter Penetration Power System,” in _2018 IEEE Power Energy Society General Meeting (PESGM)_ , Aug. 2018, pp. 1–5, iSSN: 1944-9933.
  * [24] B. K. Poolla, D. Groß, and F. Dörfler, “Placement and Implementation of Grid-Forming and Grid-Following Virtual Inertia and Fast Frequency Response,” _IEEE Transactions on Power Systems_ , vol. 34, no. 4, pp. 3035–3046, Jul. 2019.
  * [25] M. A. Awal and I. Husain, “Unified Virtual Oscillator Control for Grid-Forming and Grid-Following Converters,” _IEEE Journal of Emerging and Selected Topics in Power Electronics_ , vol. 9, no. 4, pp. 4573–4586, Aug. 2021.
  * [26] X. Fu, J. Sun, M. Huang, Z. Tian, H. Yan, H. H.-C. Iu, P. Hu, and X. Zha, “Large-Signal Stability of Grid-Forming and Grid-Following Controls in Voltage Source Converter: A Comparative Study,” _IEEE Transactions on Power Electronics_ , vol. 36, no. 7, pp. 7832–7840, Jul. 2021.
  * [27] B. B. Johnson, S. V. Dhople, A. O. Hamadeh, and P. T. Krein, “Synchronization of Parallel Single-Phase Inverters With Virtual Oscillator Control,” _IEEE Transactions on Power Electronics_ , vol. 29, no. 11, pp. 6124–6138, Nov. 2014.
  * [28] Q.-C. Zhong, “Virtual Synchronous Machines: A unified interface for grid integration,” _IEEE Power Electronics Magazine_ , vol. 3, no. 4, pp. 18–27, Dec. 2016.
  * [29] M. Chandorkar, D. Divan, and R. Adapa, “Control of parallel connected inverters in standalone AC supply systems,” _IEEE Transactions on Industry Applications_ , vol. 29, no. 1, pp. 136–143, Jan. 1993.
  * [30] R. Olfati-Saber, “Flocking for multi-agent dynamic systems: algorithms and theory,” _IEEE Transactions on Automatic Control_ , vol. 51, no. 3, pp. 401–420, 2006.
  * [31] A. Jadbabaie, Jie Lin, and A. S. Morse, “Coordination of groups of mobile autonomous agents using nearest neighbor rules,” _IEEE Transactions on Automatic Control_ , vol. 48, no. 6, pp. 988–1001, 2003.
  * [32] L. Macellari, Y. Karayiannidis, and D. V. Dimarogonas, “Multi-agent second order average consensus with prescribed transient behavior,” _IEEE Transactions on Automatic Control_ , vol. 62, no. 10, pp. 5282–5288, 2017.
  * [33] W. Ren, R. W. Beard, and E. M. Atkins, “Information consensus in multivehicle cooperative control,” _IEEE Control Systems Magazine_ , vol. 27, no. 2, pp. 71–82, Apr. 2007.
  * [34] R. Olfati-Saber, J. A. Fax, and R. M. Murray, “Consensus and Cooperation in Networked Multi-Agent Systems,” _Proceedings of the IEEE_ , vol. 95, no. 1, pp. 215–233, Jan. 2007.
  * [35] H. Yuan, J. Tan, Y. Zhang, S. Murthy, S. You, H. Li, Y. Su, and Y. Liu, “Machine Learning-Based PV Reserve Determination Strategy for Frequency Control on the WECC System,” in _2020 IEEE Power Energy Society Innovative Smart Grid Technologies Conference (ISGT)_ , Feb. 2020, pp. 1–5, iSSN: 2472-8152.
  * [36] A. F. Hoke, M. Shirazi, S. Chakraborty, E. Muljadi, and D. Maksimovic, “Rapid Active Power Control of Photovoltaic Systems for Grid Frequency Support,” _IEEE Journal of Emerging and Selected Topics in Power Electronics_ , vol. 5, no. 3, pp. 1154–1163, Sep. 2017.
  * [37] A. Tuladhar, H. Jin, T. Unger, and K. Mauch, “Parallel operation of single phase inverter modules with no control interconnections,” in _Proceedings of APEC 97 - Applied Power Electronics Conference_ , vol. 1, Feb. 1997, pp. 94–100 vol.1.
  * [38] D. P. Chassin, J. C. Fuller, and N. Djilali, “GridLAB-D: An Agent-Based Simulation Framework for Smart Grids,” _Journal of Applied Mathematics_ , vol. 2014, p. e492320, Jun. 2014.
  * [39] B. Palmintier, D. Krishnamurthy, P. Top, S. Smith, J. Daily, and J. Fuller, “Design of the HELICS high-performance transmission-distribution-communication-market co-simulation framework,” in _2017 Workshop on Modeling and Simulation of Cyber-Physical Energy Systems (MSCPES)_ , Apr. 2017, pp. 1–6.