# Self-aligned hybrid nanocavities using atomically thin materials

C. F. Fong<EMAIL_ADDRESS>Nanoscale Quantum Photonics Laboratory,
RIKEN Cluster for Pioneering Research, Saitama 351-0198, Japan  D. Yamashita
Quantum Optoelectronics Research Team, RIKEN Center for Advanced Photonics,
Saitama 351-0198, Japan  Platform Photonics Research Center, National
Institute of Advanced Industrial Science and Technology (AIST), Ibaraki,
305-8568, Japan  N. Fang  Nanoscale Quantum Photonics Laboratory, RIKEN
Cluster for Pioneering Research, Saitama 351-0198, Japan  S. Fujii  Quantum
Optoelectronics Research Team, RIKEN Center for Advanced Photonics, Saitama
351-0198, Japan  Department of Physics, Faculty of Science and Technology,
Keio University, Yokohama, 223-8522, Japan  Y.-R. Chang  Nanoscale Quantum
Photonics Laboratory, RIKEN Cluster for Pioneering Research, Saitama 351-0198,
Japan  T. Taniguchi  Research Center for Materials Nanoarchitectonics,
National Institute for Materials Science, Tsukuba 305-0044, Japan  K. Watanabe
Research Center for Electronic and Optical Materials, National Institute for
Materials Science, Tsukuba 305-0044, Japan  Y. K. Kato<EMAIL_ADDRESS>Nanoscale Quantum Photonics Laboratory, RIKEN Cluster for Pioneering Research,
Saitama 351-0198, Japan  Quantum Optoelectronics Research Team, RIKEN Center
for Advanced Photonics, Saitama 351-0198, Japan

###### Abstract

Two-dimensional (2D) van der Waals layered materials with intriguing
properties are increasingly being adopted in hybrid photonics. The 2D
materials are often integrated with photonic structures including cavities to
enhance light-matter coupling, providing additional control and functionality.
The 2D materials, however, needs to be precisely placed on the photonic
cavities. Furthermore, the transfer of 2D materials onto the cavities could
degrade the cavity quality $(Q)$ factor. Instead of using prefabricated PhC
nanocavities, we demonstrate a novel approach to form a hybrid nanocavity by
partially covering a PhC waveguide post-fabrication with a suitably-sized 2D
material flake. We successfully fabricated such hybrid nanocavity devices with
hBN, WSe2 and MoTe2 flakes on silicon PhC waveguides, obtaining $Q$ factors as
high as $4.0\times 10^{5}$. Remarkably, even mono- and few-layer flakes can
provide sufficient local refractive index modulation to induce nanocavity
formation. Since the 2D material is spatially self-aligned to the nanocavity,
we have also managed to observe cavity PL enhancement in a MoTe2 hybrid cavity
device, with a cavity Purcell enhancement factor of about 15. Our results
highlights the prospect of using such 2D materials-induced PhC nanocavity to
realize a wide range of photonic components for hybrid devices and integrated
photonic circuits.

##  I Main

Two-dimensional (2D) van der Waals layered materials such as graphene,
hexagonal boron nitride (hBN) and transition metal dichalcogenides (TMDC) are
garnering significant attention for both fundamental science and device
applications [1, 2, 3, 4]. In particular, semiconducting TMDCs have a direct
bandgap at monolayer thickness [5, 6]. They exhibit bright optical emission
which is governed by their exciton (coulomb-bound electron-hole pair)
responses even up to room temperature due to the large exciton binding
energies of hundreds of meV [7]. Many 2D materials exhibit large optical
nonlinearities [8], which could also be intricately linked to the valley
polarization [9, 10]. The amenability to strain and defect engineering also
makes 2D materials promising for the creation of emitters for quantum light
sources [3, 11, 12]. 2D materials can also be stacked to achieve new
functionalities or physical phenomena. For example, mono- and few-layer TMDCs
are often used together with hBN as the insulating layer and with graphene for
gate tunable functionalities [13, 14]. In addition, stacks of 2D material
layers could give rise to proximity effects [15, 16, 17], as well as moiré
related behaviour [18, 19, 20, 21].

The integration of two-dimensional (2D) materials with nanophotonic
architectures [22, 23, 24, 25, 26], offers a promising avenue for tailoring
the dielectric environment and local optical density of states that govern the
interactions of 2D excitons with light. This strategy enables the manipulation
of light-matter coupling, thereby facilitating the realization of practical
hybrid devices such as lasers, nonlinear sources, quantum emitters and
photodetectors. To achieve optimal device performance, it is imperative to
couple 2D materials with cavities exhibiting a high quality factor over mode
volume ratio ($Q/V_{\text{mode}}$). The planar air hole photonic crystal (PhC)
nanocavities [27, 28, 29], promise strong light confining in an ultrasmall
mode volume, rendering them highly attractive for the aforementioned hybrid
device applications.

In previous reports, 2D materials such as TMDC mono- and few-layer flakes are
usually transferred onto prefabricated nanocavities. The flake transfer
requires precise alignment and placement to the cavity. Aside from absorption
by the flake, the transfer of a TMDC flake changes the dielectric environment
of the cavity and could induces other optical losses which results in
significant degradation in the cavity quality $(Q)$ factor, limiting device
performance [30, 31, 32, 33, 34]. This effect becomes even more severe and
unpredictable with stacks of 2D materials with irregular shapes and
thicknesses. Instead of being a detriment, the change in the dielectric
environment caused by the 2D material can be utilized to enable alternative
methods for cavity light-matter coupling.

Figure 1:  2D material hybrid PhC mode gap nanocavity. a Schematic of a device
structure showing cavity formation at the location of the 2D material. b
Photonic bands of the PhC waveguide showing the odd and even guided modes as
labelled, as well as the mode gap in green and the cavity mode within. The
solid (dashed) lines represent the guided modes with (without) the 2D
material. c Electric field Ey profile of the cavity mode in the $xy$\- and
$xz$-planes. The green shaded region represents the 2D material flake. d The
dependence of the cavity $Q$ factor against thickness of WSe2. (Inset) Plot of
the $Q$ factor against number of layers.

In this work, we demonstrate the formation of hybrid PhC mode gap nanocavities
by partially covering PhC waveguides post-fabrication with suitably-sized 2D
material flakes. The presence of the flake modulates the local refractive
index, causing a mode frequency mismatch, leading to optical confinement and
thus cavity formation. The flake is spatially self-aligned to the cavity,
facilitating optical coupling. We have successfully fabricated such
nanocavities with various 2D materials including hexagonal boron nitride
(hBN), tungsten diselenide (WSe2) and molybdenum ditelluride (MoTe2),
achieving high $Q$ factors of $10^{4}$–$10^{5}$. Contrary to our initial
expectations, we have discovered that even a monolayer flake could give rise
to sufficient local refractive index modulation to form a hybrid nanocavity.
In fact, according to simulation results, the thinner the flake, the more
moderate the refractive index modulation, the higher the $Q$ factor. In such
hybrid systems, the monolayer represents the extreme limit of index
modulation, promising high $Q$ factors. We have further observed the self-
aligned coupling of MoTe2 photoluminescence (PL) in a hybrid nanocavity
device, giving rise to Purcell enhanced emission and lifetime reduction
corresponding to a Purcell factor of about 15.

##  II Design of hybrid nanocavity

For simulating our device structure, we employ the air-suspended W1 line
defect PhC waveguide [35] made of silicon (refractive index, $n_{Si}$ = 3.48),
consisting of a triangular array of air holes with lattice period $a$, with a
2D material flake covering a section of the waveguide (Fig. 1a). We typically
consider a PhC waveguide with 48 and 14 air holes along the $\Gamma$–$K$ and
$\Gamma$–$M$ directions, respectively, with the air hole radius, $r$ = 0.28$a$
and $a$ = 340 nm. The PhC slab thickness is 200 nm. The photonic band
structure of the transverse-electric-like (TE-like) modes of the PhC waveguide
is shown in Fig. 1b. There are two guided modes, referred to as odd and even
in accordance with the symmetry of the $E_{y}$ field distribution about the
$x$-axis.

When a 2D material flake is present on the PhC waveguide, the local effective
refractive index increases, red shifting the frequencies of the guided modes.
The frequency mismatch between the regions with and without the 2D material
flake gives rise to field confinement and thus the formation of a cavity.
There are corresponding cavity modes to each of the guided modes with the mode
resonances in the near infrared (NIR) regime. The frequencies of the hybrid
nanocavity modes are usually lower than the band edge (frequency at
$k_{x}=0.5$) of the corresponding guided modes. The even cavity modes exhibit
much higher $Q$ factors as the modes are within the mode gap — the frequency
range between the even guided mode edge and the lower edge of the photonic
band gap (green region in Fig. 1b). In this work, we will mainly focus on the
even cavity modes.

Figure 2:  hBN-induced hybrid nanocavity. a Optical micrograph of an hBN
hybrid nanocavity device. The scale bar represents 5 µm. The “x” symbol marks
the location of the PL measurement in (b). The dotted box outlines the area of
the 2D imaging shown in (c). b PL spectrum showing signatures of cavity
emission. c 2D image of the integrated PL intensity over the wavelength range
of 1325–1336 nm showing localized cavity emission at the hBN flake (the flake
is indicated by the darkened region). d Transmission spectra showing the
cavity peak. (Inset) A closer look at the narrow peak fitted to a Lorentzian
function (magenta line).

To investigate the cavity mode properties, we consider a rectangular WSe2
flake (refractive index, $n_{WSe_{2}}$ = 3.95 [36]) of 10 nm thickness with a
lateral width of 14$a$, partially covering the surface of the PhC waveguide.
The flake is assumed to cover the PhC structure completely along the
$y$-direction. The simulated $E_{y}$ field amplitude profile of the
fundamental even cavity mode is shown in Fig. 1c. Due to the minimal thickness
of the 2D material flake, most of the field is concentrated within the slab in
the region covered by the WSe2 flake.

The simulated fundamental cavity mode $Q$ factor dependence on the thickness
of the WSe2 flake is summarized in Fig. 1d. At a thickness of 30 nm, the
cavity $Q$ is about 104. As the thickness of the WSe2 flake decreases, the $Q$
factor increases, reaching a theoretical value as high as 106 for few-layer
flakes. Simulation results indicate that not only can a monolayer form a
cavity, but it also promises an ultrahigh $Q$ factor of the order of 107. The
atomically thin nature of the flake causes a less abrupt change of the
refractive index in space, leading to a “gentle” perturbation to the fields.
This in turn corresponds to having less field components within the leaky
region in the momentum space (see Supplementary Fig. S1), indicating less loss
via coupling to free space, and thus results in ultrahigh $Q$ factors.

Other properties such as the mode profile remains similar for the range of
thickness considered in our simulations. The cavity mode wavelength increases
with flake thickness while the cavity mode volume remains relatively constant
before increasing when the flake thickness decreases below 10 nm
(Supplementary Fig. S1). These trends also apply to other 2D materials.
Further details about other factors that affect the cavity $Q$ factor such as
the flake lateral width and refractive index are provided in Supplementary
Fig. S2.

##  III hBN-induced hybrid PhC nanocavity

Dielectric hBN — which is often used to encapsulate TMDC to prevent exposure
to air — is also a suitable 2D material to form hybrid nanocavities. In
particular, high crystal quality hBN flakes with low defect densities promise
high $Q$ factors. Figure 2a shows an optical micrograph of a fabricated hBN-
on-PhC waveguide device. The PhC slab thickness is 200 nm, and the waveguide
consists of 48 and 14 air holes along the $\Gamma$–$K$ and $\Gamma$–$M$
directions, respectively. The lattice and the air hole radius are $a$ = 360 nm
and $r$ = 0.27$a$, respectively. For this PhC waveguide, semi-circular output
couplers are included at each end of the waveguide to facilitate laser
transmission measurements. The hBN flake is transferred onto the PhC waveguide
post-fabrication (see Methods section for further details). The thickness of
the hBN flake is estimated to be about 20 nm based on the optical contrast,
and its lateral width measured along the waveguide is about 12$a$.

By optically exciting the silicon PhC device above the bandgap, the weak
emission from silicon substrate can couple to the guided and/or cavity modes,
manifesting as peaks in the PL spectra. For this particular sample, emission
peaks appear near the frequency of the even guided mode edge (Fig. 2b). By
performing 2D PL imaging, we confirm that the emission peaks only appear when
exciting at the hBN flake along the waveguide, further indicating the
formation of a cavity (Fig. 2c). The polarization properties of the peak are
broadly consistent with expectations in accordance with the mode profile (see
Supplementary Fig. S3). However, the actual linewidth of the peaks, and thus
the $Q$ factors, cannot be determined using the spectrometer due to
insufficient resolution.

We then carried out transmission measurements by exciting at the hBN flake and
detecting the scattered light from the outcoupler to right of the waveguide. A
few features can be seen in the transmission spectrum (Fig. 2d): the guided
mode edge can be seen at about 1330.00 nm, as well as a relatively broad peak
centered at 1330.34 nm and a narrow peak at 1330.61 nm. The broad peak has a
linewidth of 60.2 pm, corresponding to $Q=2.2\times 10^{4}$ while the narrow
peak has a linewidth of 3.54 pm, giving $Q=3.8\times 10^{5}$. Given the
relative position and the $Q$ factors of the peaks, the narrow and broad peaks
should correspond to the fundamental and the first higher order cavity modes.

Figure 3:  Mono- & few-layer WSe2 hybrid nanocavity. a-c Optical micrograph of
mono-, bi- and trilayer WSe2-induced nanocavity device. The waveguide consists
of 96 and 14 air holes along the $\Gamma$ – $K$ and $\Gamma$ – $M$ directions,
respectively, to facilitate ease of 2D material flake transfer. The brightness
and contrast of the images have been adjusted to improve the visibility of the
WSe2 flake. For the mono- and trilayer device, the PhC waveguide has $a$ = 348
nm while the bilayer device is of $a$ = 356 nm. The lateral widths along the
waveguide of the monolayer, bilayer and trilayer flakes of the devices are
13$a$, 36.5$a$ and 10$a$, respectively. Some residues could be left on the
sample during the transfer process in the monolayer device. However, there is
no significant effect on the transmission spectra. d-f the corresponding
cavity peak in the transmission spectra for each of the devices. The
transmission measurements are performed by exciting the left output coupler
and detecting at the right output coupler for the mono- and trilayer devices.
As for the bilayer device, the laser excitation is focused on the sample and
the transmitted signal is detected at the right output coupler. The peak in
(d) is fitted with the Lorentzian function, while the peaks in (e) and (f) are
fitted with the Fano resonance. The scale bars in (a-c) represents 5 $\mu$m.

The extracted $Q$ factors from the resonant peaks of the transmission spectra
are the so-called loaded $Q$ factors which consist of the intrinsic cavity $Q$
($Q_{\text{i}}$) and cavity-waveguide coupling $Q$ ($Q_{\text{c}}$) [37]:
$\frac{1}{Q_{\text{l}}}=\frac{1}{Q_{\text{i}}}+\frac{1}{Q_{\text{c}}}$. For
this hBN device, by changing the transmission measurement configuration to
excite at the left output coupler and detecting light from the right output
coupler, we are able to observe the resonant dip that corresponds to the
absorption of light by the cavity, allowing us to calculate $Q_{\text{i}}$ of
this device to be about 4.5$\times 10^{5}$ (Supplementary Fig. S4).

Overall, our results show that the flake and the nanocavity are colocalized,
essentially forming a self-aligned device. The enhanced Si PL emission also
indicates cavity light-matter coupling.

##  IV Hybrid PhC nanocavities using atomically thin WSe2

Compared to hBN, it is easier to obtain and identify mono- and few-layer
flakes with TMDCs. Motivated by our simulation results, we conduct experiments
using WSe2 as it is relatively stable in air. We successfully fabricate seven
hybrid PhC nanocavity devices using monolayer to trilayer flakes. The
discussion here will focus on three exemplary devices with monolayer, bilayer
and trilayer flakes (Fig. 3). Summaries of all device configurations and $Q$
factors are presented in Fig. S10 and Supplementary Table 1.

The transmission spectrum for each device is shown in Fig. 3e-f. The cavity
peaks appear at the expected wavelengths in accordance with the PhC waveguide
lattice period. Due to the presence of background transmission signal, its
interference with the cavity peak could results in an asymmetric line shape.
By fitting the peaks to either the Lorentzian (symmetric line shape) or Fano
resonance (asymmetric line shape), $Q_{\text{l}}$ are determined to be
8.6$\times 10^{4}$, 1.0$\times 10^{5}$ and 4.0$\times 10^{5}$, for the
monolayer, bilayer and trilayer devices, respectively. Only for the bilayer
sample are we able to obtain the necessary transmission spectra with the
cavity resonant dip and peak in the different measurement configurations to
extract the $Q_{\text{i}}$ to be about 3.7$\times 10^{5}$. The cavity $Q$
factors do not show an obvious increase with the decrease flake thickness even
after considering the flake lateral widths. Various loss mechanisms could
affect the extracted $Q$ factors; further descriptions of the possible
mechanisms are provided in the discussion section. Our results here show
unambiguously that even a monolayer flake could give rise to sufficient local
refractive index modulation to form a high $Q$ hybrid nanocavity despite being
only one-atom thick.

Figure 4:  Purcell enhancement in MoTe2 hybrid nanocavity. a Optical
micrograph of an MoTe2 nanocavity device. The scale bar indicates 5 $\mu$m. b
Transmission spectra obtained by exciting at the left and detecting at the
right output coupler, showing the cavity peaks. The green curves are the
individual Lorentzian fits, and the magenta curve is the cumulative fit. c PL
spectrum showing the emission from the MoTe2 and cavity. (Inset) A zoom-in of
the region with the cavity emission peak. d Time-resolved PL decay curves of
the emission from the cavity and the bare MoTe2 flake (positions 1 & 2 in (a),
respectively) showing the reduced lifetime due to the cavity Purcell effect.
The cavity and the bare MoTe2 emission decay curves are fitted using a single
and double exponential reconvolution functions, respectively. The grey shaded
region shows the IRF.

##  V Cavity PL enhancement in self-aligned hybrid nanocavity with MoTe2

MoTe2 is optically active in the NIR, making it an ideal TMDC to induce a
nanocavity in the PhC and simultaneously couple its exciton emission to the
cavity. Figure 4a shows an optical micrograph of a MoTe2 hybrid nanocavity
device. The flake is about 6–8 layers thick based on optical contrast and the
PL peak position. The lateral width of the flake along the waveguide is about
6$a$. Despite not fully covering the PhC along the vertical ($y$) direction,
the flake managed to induce the formation of a cavity. Multiple peaks are
visible in the transmission spectrum (Fig. 4b) with $Q$ factors of the order
of $10^{3}$–$10^{4}$. The lower $Q$ factors are due to a combination of the
larger flake refractive index, the small lateral width, as well as the
absorption by the flake. Modelling a structure with similar properties as the
actual device in FDTD and FEM simulations, we confirmed that the formation of
cavity that could support multiple modes is indeed possible (Supplementary
Fig. S5). In fact, a local refractive index modulation of a small area
adjacent to the waveguide is sufficient to induce strong optical confinement
(Supplementary Fig. S6).

A broad background from the MoTe2 exciton emission can be seen in the PL
spectrum (Fig. 4c). Peaks close to 1200 nm correspond to the Fabry-Perot-like
emission arising from the odd guided mode, while the narrow peaks at around
1310 nm correspond to the cavity modes. The bright intensity of these peaks
indicates that the MoTe2 emission is indeed coupled to and enhanced by the
cavity. We further perform time-resolved PL measurements. A comparison of the
decay curves of the PL from the cavity and bare MoTe2 (positions 1 & 2,
respectively in Fig. 4a) is shown in Fig. 4d. From the decay curves, the bare
MoTe2 PL lifetime is extracted to be 46.1$\pm$0.3 ps, whereas the cavity
emission lifetime is 3.0$\pm$0.6 ps. The cavity decay curve is largely similar
to that of the instrument response function (IRF), suggesting that the actual
lifetime is shorter than the extracted value. Nonetheless, the PL lifetimes
indicate a Purcell enhancement factor, $F_{\text{P}}$ of 15$\pm$3\. Since the
emitter linewidth is broader than the cavity linewidth, we employ the
following equation to estimate the theoretical Purcell enhancement factor
[38]:
$F_{\text{P}}=1+\frac{3\lambda_{\text{cav}}^{3}}{4\pi^{2}n^{2}}\frac{Q_{\text{emitter}}}{V_{\text{mode}}}\frac{|E(r)|^{2}}{|E(r)|_{\text{max}}^{2}}$,
where $\lambda_{\text{cav}}$ is the cavity wavelength, $n$ is the refractive
index, $Q_{\text{emitter}}$ is the emitter $Q$ factor, $V_{\text{mode}}$ is
the mode volume and $\frac{|E(r)|^{2}}{|E(r)|_{\text{max}}^{2}}$ is the ratio
of the field intensity at the location of the emitter and the maximum field
intensity of the mode. Since the MoTe2 emitter is in air, $n$ is taken to be
1. From FEM simulations of a device with a similarly shaped and thick flake,
$V_{\text{mode}}=0.04(\lambda_{\text{cav}}/n)^{3}$ and
$\frac{|E(r)|^{2}}{|E(r)|_{\text{max}}^{2}}=0.49$. Based on the linewidth of
the MoTe2 PL emission, $Q_{\text{emitter}}=9$, resulting in a theoretical
$F_{\text{P}}$ of 9, close to the experimental $F_{\text{P}}$. Our results
unambiguously show that the spatial self-alignment of the flake to the
nanocavity facilitates light-matter coupling.

##  VI Discussion

We have successfully fabricated hybrid nanocavities using hBN, WSe2 and MoTe2
which exhibit a range of $Q$ factor values. It is worth reiterating that the
extracted $Q$ factors are $Q_{\text{l}}$ which is limited by either
$Q_{\text{c}}$ and $Q_{\text{i}}$. The $Q_{\text{i}}$ is in turned determined
only by the coupling losses to free space and is comprised of the theoretical
($Q_{\text{th}}$) and experimental ($Q_{\text{ex}}$) losses:
$\frac{1}{Q_{\text{i}}}=\frac{1}{Q_{\text{th}}}+\frac{1}{Q_{\text{ex}}}$. The
experimental $Q$ factors of the devices are lower than the theoretical values
due to fluctuations in the fabricated structure parameters, for example, non-
uniformity of air hole radii and lattice period, leading to scattering losses.
The broken vertical symmetry of the device could also contribute to loss via
the coupling of transverse electric and transverse magnetic modes [39, 40].
The irregular shape of the flake could also lead to losses as more of the
flake edges overlap with the air holes [41]. Wrinkles, bubbles, and
contaminants could also lead to air gaps between the 2D material flake and the
PhC waveguide, affecting the cavity $Q$. Nonetheless, the surface roughness of
the flakes are mostly smooth and the interface between the flake and the PhC
substrate clean, especially for the WSe2 devices which are fabricated using
the anthracene-assisted transfer method [42]. As such, the surface condition
of the flake is likely not the main factor that affects the $Q$ factor. From
the scanning electron micrograph of the fabricated PhC waveguide
(Supplementary Fig. S7), the PhC air holes show imperfect roundness with
slight ellipticity, which we believe to the main cause that limits the
experimental $Q$ factors.

Despite these issues, high $Q$ factors can be achieved in such 2D material-
induced hybrid PhC nanocavities as demonstrated by our devices. The high
$Q/V_{\text{mode}}$ of our hybrid nanocavity devices also enabled the
observation of nonlinear effects such as the optical bistability at low
excitation powers (Supplementary note 2 and Fig. S8). By comparing the
experimentally observed guided mode redshift caused by the 2D materials and
the required change in the slab refractive index of bare PhC waveguide to
produce the same redshift in FDTD simulations, it is estimated that a
monolayer flake results in 0.1–0.2% change in the local refractive index. This
is consistent with previous reports which suggested that ultrahigh $Q$ PhC
mode gap cavities could be formed in PhC waveguides with a local refractive
index modulation as small as 0.1% [35, 43]. Furthermore, the devices are
stable, with the cavities showing no significant degradation even after being
stored in ambient conditions for a time period ranging from several months to
more than a year (see Supplementary Fig. S9).

It is interesting to note that despite the 20 nm thickness of the hBN flake,
the obtained experimental $Q$ is an order of magnitude higher than the
theoretical $Q$ of a device with equally thick WSe2 flake (Fig. 1d). The
refractive index of hBN is taken to be 2.2, smaller than that of the silicon
PhC slab. In addition to modulating the local refractive index, the interface
between the hBN flake and the PhC waveguide facilitates total internal
reflection, resulting in good optical confinement and thus a high $Q$ factor.
In contrast to hBN, TMDCs have refractive indices comparable or larger than
that of silicon and thus do no facilitate total internal reflection at the
flake/waveguide interface. Nonetheless, obtaining mono- and few-layer flakes
with TMDCs is relatively easier. This advantage helps overcome the larger
refractive indices of TMDCs and enables the creation of high $Q$ hybrid
nanocavities.

In conclusion, we have demonstrated experimentally that a 2D material flake
can induce high $Q$ factor hybrid nanocavity in a PhC waveguide post-
fabrication. The cavity can be formed at arbitrary location along the
waveguide and could readily couple to the 2D material flake, forming a self-
aligned device. It is worth emphasizing that even a monolayer flake is capable
of forming a hybrid nanocavity, enabling the combination of the exceptional
optical properties of monolayers with the flexibility of optical engineering
offered by the PhC substrate. Our versatile approach to form hybrid PhC
nanocavities and self-aligned devices can be extended to encompass a wide
variety of 2D materials, allowing the creation of devices with diverse
functionalities. By transferring flakes of suitable 2D materials, passive PhC
waveguides can be transformed post-fabrication into active devices such as
laser, modulator, and detector, facilitating the development of hybrid
integrated photonic circuits.

##  VII Methods

Numerical simulations. The photonic band structure is calculated using MIT
Photonic Bands (MPB) [44], considering a unit cell of the PhC waveguide with
periodic boundary conditions in the $x$\- and $y$-directions. The finite-
difference time-domain (FDTD) simulations are performed using the open-source
package MEEP [45] on a computing cluster. The grid resolution is usually set
to at least $a$/24 or higher, depending on the thickness of the simulated 2D
materials. With subpixel averaging, we are able to simulate 2D material of
thicknesses down to 5 nm and obtain reliable results. Numerical finite element
method (FEM) simulations are carried out with COMSOL to simulate PhC
structures with mono- to few-layer thick 2D materials. The simulated PhC
waveguide consisting of 48 (14) air holes along the $\Gamma$ – $K$ ($\Gamma$ –
$M$) direction is sufficiently large such that any further increase in size
does not change the $Q$ factor, i.e., the $Q$ factor is limited only by out-
of-plane losses. The type of simulated 2D materials is controlled by setting
the value of the dielectric constant, obtained from reference Laturia  _et
al._ 36. We assume a monolayer effective thickness of 0.7 nm in our
simulations. Silicon has minimal absorption at the NIR regime where that
cavity mode is. Aside from MoTe2, hBN and WSe2 are not expected to have strong
absorption in the NIR and thus we do not include absorption losses in the
simulations. We also performed simulations using the isotropic or anisotropic
dielectric constants and found no significant difference in the results.

Silicon PhC waveguide fabrication. The PhC waveguides are fabricated on a
silicon-on-insulator substrate with a 200-nm-thick top silicon layer and a
1-$\mu$m-thick buried oxide layer. The PhC pattern is first defined on a
resist mask by electron beam lithography, then the pattern is transferred onto
the substrate via inductively coupled plasma using C4F8 and SF6 gases.
Following resist removal, the buried oxide layer is etched away using a
solution of 20% hydrofluoric acid to form air-suspended PhC waveguide
structures.

2D material dry transfer. The hBN flakes (NIMS) are prepared on a
polydimethylsiloxane (PDMS) sheet (Gelfilm by Gelpak) by mechanical
exfoliation of bulk crystals. Suitable flakes are identified using an optical
microscope and then transferred onto the target PhC waveguide using a
homebuilt micromanipulator setup. MoTe2 flakes (HQ Graphene) are prepared and
transferred using the same method.

WSe2 flakes (HQ Graphene) are prepared on a commercially available 90-nm-thick
SiO2/Si substrates via mechanical exfoliation to enable the identification of
the layer number via optical contrast. The WSe2 flakes are then placed on the
PhC waveguides using the anthracene-assisted transfer process [42]. To grow
the anthracene crystals, anthracene powder is heated to about 80∘C. The
sublimated anthracene vapor will then recrystallize on the bottom surface of a
glass slide placed at about 1 mm above the anthracene powder. The growth time
is typically 10h. A small PDMS sheet is then placed on a glass slide, followed
by an anthracene crystal on the PDMS to form an anthracene/PDMS stamp. Next,
this stamp is used to pick up the WSe2 flake. The WSe2 flake and the
anthracene crystal were then transferred together onto the target PhC
waveguide. Finally, the anthracene crystal is heated to about 80∘C or left in
ambient conditions to sublime, leaving behind clean flakes.

Optical spectroscopy. PL measurements are performed with a homebuilt confocal
microscopy system. A Ti:sapphire laser (Spectra Physics 3900S) is used for
excitation, usually at a wavelength of 760$\\--$780 nm. The excitation power
is controlled using neutral density filters, while the polarization of the
laser is adjusted using a half-wave plate to match the polarization of the
cavity mode. The laser beam is focused on the samples using an objective lens
(Olympus) of 50$\times$ magnification with a numerical aperture (NA) of 0.65.
The emission from the sample is collected with the same objective lens,
directed to a spectrometer (Princeton Instruments Acton SP2300), dispersed by
a 150 lines/mm grating, and then detected with a liquid nitrogen-cooled InGaAs
detector (Princeton Instruments PyLoN IR).

For transmission measurements, a wavelength tunable continuous-wave laser
(Santec TSL-550) is used. A steering mirror and a 4$f$ system are used to
displace the laser excitation spot while keeping the same detection spot. The
light scattered from the sample is collected by the objective lens and coupled
into an optical fiber to direct the signal to a photoreceiver (New Focus
2011).

For time-resolved measurements, a Ti:sapphire laser (Coherent MIRA) operating
in pulsed mode is used for excitation. The excitation wavelength is set to 780
nm. The laser beam is focused on the sample with an objective lens (Olympus)
of 100$\times$ magnification and NA of 0.85. The PL emission is collected by
the same objective lens and then filtered spectrally with a long-pass filter
to direct light of a specific wavelength range into an optical fiber connected
to a superconducting nanowire single photon detector (Quantum Design Eos). All
measurements are carried out at room temperature. The samples are kept in a
nitrogen gas environment in bid to reduce the oxidation rate of the TMDC
flakes.

###### Acknowledgements.

This work is supported in part by JSPS KAKENHI (JP22K14623, JP20H02558,
JP20J00817, JP22K14624, JP22K14625, JP22F22350 and JP23H00262) and ARIM of
MEXT (JPMXP1222UT1138), as well as the RIKEN Incentive Research Projects. K.W.
and T.T. acknowledge support from the JSPS KAKENHI (Grant Numbers JP21H05233
and JP23H02052) and World Premier International Research Center Initiative
(WPI), MEXT, Japan. C.F.F. is supported by the RIKEN SPDR fellowship. Y.-R.C.
is supported by the JSPS Postdoctoral Fellowship. We acknowledge support by
the RIKEN Information Systems Division for the use of the Supercomputer
HOKUSAI BigWaterfall and SailingShip, as well as the use of the COMSOL
license.

## Author contributions

C.F.F conceived the idea and performed the numerical simulations. C.F.F
fabricated the PhC waveguide under the guidance of D.Y. C.F.F carried out the
2D materials transfer with assistance from N.F and Y.-R.C. C.F.F performed the
optical measurements with some assistance from D.Y and S.F. K.W and T.T
provided the bulk hBN crystals. C.F.F analyzed the data and wrote the
manuscript. All authors contributed to the discussion of the results and the
manuscript. Y.K.K supervised the project.

## References

  * Xu  _et al._ [2014] X. Xu, W. Yao, D. Xiao, and T. F. Heinz, Spin and pseudospins in layered transition metal dichalcogenides, Nat. Phys. 10, 343 (2014), arxiv:1605.01972 .
  * Krasnok  _et al._ [2018] A. Krasnok, S. Lepeshov, and A. Alú, Nanophotonics with 2D transition metal dichalcogenides, Opt. Express 26, 15972 (2018).
  * Liu and Hersam [2019] X. Liu and M. C. Hersam, 2D materials for quantum information science, Nat. Rev. Mater. 4, 669 (2019).
  * He  _et al._ [2021] F. He, Y. Zhou, Z. Ye, S.-H. Cho, J. Jeong, X. Meng, and Y. Wang, Moiré Patterns in 2D Materials: A Review, ACS Nano 15, 5944 (2021).
  * Mak  _et al._ [2010] K. F. Mak, C. Lee, J. Hone, J. Shan, and T. F. Heinz, Atomically Thin MoS2: A New Direct-Gap Semiconductor, Phys. Rev. Lett. 105, 136805 (2010).
  * Ruppert  _et al._ [2014] C. Ruppert, B. Aslan, and T. F. Heinz, Optical Properties and Band Gap of Single- and Few-Layer MoTe2 Crystals, Nano Lett. 14, 6231 (2014).
  * Zhu  _et al._ [2015] B. Zhu, X. Chen, and X. Cui, Exciton Binding Energy of Monolayer WS2, Sci. Rep. 5, 9218 (2015).
  * Autere  _et al._ [2018] A. Autere, H. Jussila, Y. Dai, Y. Wang, H. Lipsanen, and Z. Sun, Nonlinear Optics with 2D Layered Materials, Adv. Mater. 30, 1705963 (2018).
  * Seyler  _et al._ [2015] K. L. Seyler, J. R. Schaibley, P. Gong, P. Rivera, A. M. Jones, S. Wu, J. Yan, D. G. Mandrus, W. Yao, and X. Xu, Electrical control of second-harmonic generation in a WSe2 monolayer transistor, Nat. Nanotechnol. 10, 407 (2015).
  * Zhang  _et al._ [2020a] D. Zhang, Z. Zeng, Q. Tong, Y. Jiang, S. Chen, B. Zheng, J. Qu, F. Li, W. Zheng, F. Jiang, H. Zhao, L. Huang, K. Braun, A. J. Meixner, X. Wang, and A. Pan, Near-Unity Polarization of Valley-Dependent Second-Harmonic Generation in Stacked TMDC Layers and Heterostructures at Room Temperature, Adv. Mater. 32, 1908061 (2020a).
  * Turunen  _et al._ [2022] M. Turunen, M. Brotons-Gisbert, Y. Dai, Y. Wang, E. Scerri, C. Bonato, K. D. Jöns, Z. Sun, and B. D. Gerardot, Quantum photonics with layered 2D materials, Nat. Rev. Phys. 4, 219 (2022).
  * Hötger  _et al._ [2023] A. Hötger, T. Amit, J. Klein, K. Barthelmi, T. Pelini, A. Delhomme, S. Rey, M. Potemski, C. Faugeras, G. Cohen, D. Hernangómez-Pérez, T. Taniguchi, K. Watanabe, C. Kastl, J. J. Finley, S. Refaely-Abramson, A. W. Holleitner, and A. V. Stier, Spin-defect characteristics of single sulfur vacancies in monolayer MoS2, NPJ 2D Mater. Appl. 7, 1 (2023).
  * Cadiz  _et al._ [2017] F. Cadiz, E. Courtade, C. Robert, G. Wang, Y. Shen, H. Cai, T. Taniguchi, K. Watanabe, H. Carrere, D. Lagarde, M. Manca, T. Amand, P. Renucci, S. Tongay, X. Marie, and B. Urbaszek, Excitonic Linewidth Approaching the Homogeneous Limit in MoS2-Based van der Waals Heterostructures, Phys. Rev. X 7, 021026 (2017).
  * Martin  _et al._ [2020] E. W. Martin, J. Horng, H. G. Ruth, E. Paik, M.-H. Wentzel, H. Deng, and S. T. Cundiff, Encapsulation Narrows and Preserves the Excitonic Homogeneous Linewidth of Exfoliated Monolayer MoSe2, Phys. Rev. Applied 14, 021002 (2020).
  * Avsar  _et al._ [2017] A. Avsar, D. Unuchek, J. Liu, O. L. Sanchez, K. Watanabe, T. Taniguchi, B. Özyilmaz, and A. Kis, Optospintronics in Graphene via Proximity Coupling, ACS Nano 11, 11678 (2017), arxiv:1705.10267 .
  * Seyler  _et al._ [2018] K. L. Seyler, D. Zhong, B. Huang, X. Linpeng, N. P. Wilson, T. Taniguchi, K. Watanabe, W. Yao, D. Xiao, M. A. McGuire, K.-M. C. Fu, and X. Xu, Valley Manipulation by Optically Tuning the Magnetic Proximity Effect in WSe2/CrI3 Heterostructures, Nano Lett. 18, 3823 (2018).
  * Zhong  _et al._ [2020] D. Zhong, K. L. Seyler, X. Linpeng, N. P. Wilson, T. Taniguchi, K. Watanabe, M. A. McGuire, K.-M. C. Fu, D. Xiao, W. Yao, and X. Xu, Layer-resolved magnetic proximity effect in van der Waals heterostructures, Nat. Nanotechnol. 15, 187 (2020).
  * Seyler  _et al._ [2019] K. L. Seyler, P. Rivera, H. Yu, N. P. Wilson, E. L. Ray, D. G. Mandrus, J. Yan, W. Yao, and X. Xu, Signatures of moiré-trapped valley excitons in MoSe2/WSe2 heterobilayers, Nature 567, 66 (2019).
  * Baek  _et al._ [2020] H. Baek, M. Brotons-Gisbert, Z. X. Koong, A. Campbell, M. Rambach, K. Watanabe, T. Taniguchi, and B. D. Gerardot, Highly energy-tunable quantum light from moiré-trapped excitons, Sci. Adv. 6, eaba8526 (2020).
  * Zhang  _et al._ [2020b] L. Zhang, Z. Zhang, F. Wu, D. Wang, R. Gogna, S. Hou, K. Watanabe, T. Taniguchi, K. Kulkarni, T. Kuo, S. R. Forrest, and H. Deng, Twist-angle dependence of moiré excitons in WS2/MoSe2 heterobilayers, Nat. Commun. 11, 5888 (2020b).
  * Shinokita  _et al._ [2022] K. Shinokita, K. Watanabe, T. Taniguchi, and K. Matsuda, Valley Relaxation of the Moiré Excitons in a WSe2/MoSe2 Heterobilayer, ACS Nano 16, 16862 (2022).
  * Gu  _et al._ [2012] T. Gu, N. Petrone, J. F. McMillan, A. van der Zande, M. Yu, G. Q. Lo, D. L. Kwong, J. Hone, and C. W. Wong, Regenerative oscillation and four-wave mixing in graphene optoelectronics, Nat. Photonics 6, 554 (2012).
  * Ono  _et al._ [2020] M. Ono, M. Hata, M. Tsunekawa, K. Nozaki, H. Sumikura, H. Chiba, and M. Notomi, Ultrafast and energy-efficient all-optical switching with graphene-loaded deep-subwavelength plasmonic waveguides, Nat. Photonics 14, 37 (2020).
  * Maiti  _et al._ [2020] R. Maiti, C. Patil, M. a. S. R. Saadi, T. Xie, J. G. Azadani, B. Uluutku, R. Amin, A. F. Briggs, M. Miscuglio, D. Van Thourhout, S. D. Solares, T. Low, R. Agarwal, S. R. Bank, and V. J. Sorger, Strain-engineered high-responsivity MoTe2 photodetector for silicon photonic integrated circuits, Nat. Photonics 14, 578 (2020).
  * Fang  _et al._ [2022] N. Fang, D. Yamashita, S. Fujii, K. Otsuka, T. Taniguchi, K. Watanabe, K. Nagashio, and Y. K. Kato, Quantization of Mode Shifts in Nanocavities Integrated with Atomically Thin Sheets, Adv. Opt. Mater. 10, 2200538 (2022).
  * Maggiolini  _et al._ [2023] E. Maggiolini, L. Polimeno, F. Todisco, A. Di Renzo, B. Han, M. De Giorgi, V. Ardizzone, C. Schneider, R. Mastria, A. Cannavale, M. Pugliese, L. De Marco, A. Rizzo, V. Maiorano, G. Gigli, D. Gerace, D. Sanvitto, and D. Ballarini, Strongly enhanced light–matter coupling of monolayer WS2 from a bound state in the continuum, Nat. Mater. , 1 (2023).
  * Song  _et al._ [2005] B.-S. Song, S. Noda, T. Asano, and Y. Akahane, Ultra-high- Q photonic double-heterostructure nanocavity, Nat. Mater. 4, 207 (2005).
  * Nomura  _et al._ [2010] M. Nomura, N. Kumagai, S. Iwamoto, Y. Ota, and Y. Arakawa, Laser oscillation in a strongly coupled single-quantum-dot–nanocavity system, Nat. Phys. 6, 279 (2010).
  * Kuruma  _et al._ [2018] K. Kuruma, Y. Ota, M. Kakuda, S. Iwamoto, and Y. Arakawa, Time-resolved vacuum Rabi oscillations in a quantum-dot–nanocavity system, Phys. Rev. B 97, 235448 (2018).
  * Majumdar  _et al._ [2013] A. Majumdar, J. Kim, J. Vuckovic, and F. Wang, Electrical Control of Silicon Photonic Crystal Cavity by Graphene, Nano Lett. 13, 515 (2013).
  * Wu  _et al._ [2014] S. Wu, S. Buckley, A. M. Jones, J. S. Ross, N. J. Ghimire, J. Yan, D. G. Mandrus, W. Yao, F. Hatami, J. Vučković, A. Majumdar, and X. Xu, Control of two-dimensional excitonic light emission via photonic crystal, 2D Mater. 1, 011001 (2014).
  * Fryett  _et al._ [2016] T. K. Fryett, K. L. Seyler, J. Zheng, C.-H. Liu, X. Xu, and A. Majumdar, Silicon photonic crystal cavity enhanced second-harmonic generation from monolayer WSe2, 2D Mater. 4, 015031 (2016).
  * Ota  _et al._ [2017] Y. Ota, R. Moriya, N. Yabuki, M. Arai, M. Kakuda, S. Iwamoto, T. Machida, and Y. Arakawa, Optical coupling between atomically thin black phosphorus and a two dimensional photonic crystal nanocavity, Appl. Phys. Lett. 110, 223105 (2017).
  * Li  _et al._ [2021] C. Li, R. Tian, R. Yi, S. Hu, Y. Chen, Q. Yuan, X. Zhang, Y. Liu, Y. Hao, X. Gan, and J. Zhao, MoTe2 PN Homojunction Constructed on a Silicon Photonic Crystal Cavity for High-Performance Photodetector, ACS Photonics 8, 2431 (2021).
  * Notomi and Taniyama [2008] M. Notomi and H. Taniyama, On-demand ultrahigh-Q cavity formation and photon pinning via dynamic waveguide tuning, Opt. Express 16, 18657 (2008).
  * Laturia  _et al._ [2018] A. Laturia, M. L. Van de Put, and W. G. Vandenberghe, Dielectric properties of hexagonal boron nitride and transition metal dichalcogenides: From monolayer to bulk, NPJ 2D Mater. Appl. 2, 1 (2018).
  * Akahane  _et al._ [2005] Y. Akahane, T. Asano, B.-S. Song, and S. Noda, Fine-tuned high-Q photonic-crystal nanocavity, Opt. Express 13, 1202 (2005).
  * van Exter  _et al._ [1996] M. P. van Exter, G. Nienhuis, and J. P. Woerdman, Two simple expressions for the spontaneous emission factor $\beta$, Phys. Rev. B 54, 6 (1996).
  * Kuramochi  _et al._ [2005] E. Kuramochi, M. Notomi, S. Hughes, A. Shinya, T. Watanabe, and L. Ramunno, Disorder-induced scattering loss of line-defect waveguides in photonic crystal slabs, Phys. Rev. B 72, 161318 (2005).
  * Tanaka  _et al._ [2006] Y. Tanaka, T. Asano, R. Hatsuta, and S. Noda, Investigation of point-defect cavity formed in two-dimensional photonic crystal slab with one-sided dielectric cladding, Appl. Phys. Lett. 88, 011112 (2006).
  * Tomljenovic-Hanic  _et al._ [2007] S. Tomljenovic-Hanic, C. M. de Sterke, M. J. Steel, B. J. Eggleton, Y. Tanaka, and S. Noda, High-Q cavities in multilayer photonic crystal slabs, Opt. Express 15, 17248 (2007).
  * Otsuka  _et al._ [2021] K. Otsuka, N. Fang, D. Yamashita, T. Taniguchi, K. Watanabe, and Y. K. Kato, Deterministic transfer of optical-quality carbon nanotubes for atomically defined technology, Nat. Commun. 12, 3138 (2021).
  * Chiba and Notomi [2019] H. Chiba and M. Notomi, Reconfigurable nanocavity formation in graphene-loaded Si photonic crystal structures, Opt. Express 27, 37952 (2019).
  * Johnson and Joannopoulos [2001] S. G. Johnson and J. D. Joannopoulos, Block-iterative frequency-domain methods for Maxwell’s equations in a planewave basis, Opt. Express 8, 173 (2001).
  * Oskooi  _et al._ [2010] A. F. Oskooi, D. Roundy, M. Ibanescu, P. Bermel, J. Joannopoulos, and S. G. Johnson, MEEP: A flexible free-software package for electromagnetic simulations by the FDTD method, Comput. Phys. Commun. 181, 687 (2010).


# Resilient Communication Scheme for Distributed Decision of Interconnecting
Networks of Microgrids

Thanh Long Vu, Sayak Mukherjee, , Veronica Adetola Authors are with the
Pacific Northwest National Laboratory, Richland, WA, USA. Corresponding
author: Thanh Long Vu (email: thanhlong.vu@pnnl.gov).

###### Abstract

Networking of microgrids can provide the operational flexibility needed for
the increasing number of DERs deployed at the distribution level and
supporting end-use demand when there is loss of the bulk power system. But,
networked microgrids are vulnerable to cyber-physical attacks and faults due
to the complex interconnections. As such, it is necessary to design resilient
control systems to support the operations of networked microgrids in responses
to cyber-physical attacks and faults. This paper introduces a resilient
communication scheme for interconnecting multiple microgrids to support
critical demand, in which the interconnection decision can be made
distributedly by each microgrid controller even in the presence of
cyberattacks to some communication links or microgrid controllers. This scheme
blends a randomized peer-to-peer communication network for exchanging
information among controllers and resilient consensus algorithms for achieving
reliable interconnection agreement. The network of 6 microgrids divided from a
modified 123-node test distribution feeder is used to demonstrate the
effectiveness of the proposed resilient communication scheme.

###### Index Terms:

Smart grid, resiliency, networked microgrids, consensus algorithms

##  I Introduction

Distributed energy resources (DERs), such as rooftop PV and battery energy
storage systems (BESS), are increasingly deployed in electric distribution
systems to support utility operations, as well as end-use customers. As points
of aggregation for DERs, microgrids have been considered as the enabling
technology to support the integration of DERs. When there are increasing
number of microgrids, it is possible to coordinate the operations of networks
of microgrids [1]. Interconnecting multiple microgrids can enhance their
operational flexibility, e.g., the strong system with redundant supply can
support the other weaker systems to provide better services to customers.

However, an interconnection of microgrids is also vulnerable to attacks and
faults due to the complex interactions. Various types of cyberattacks to
control systems have been reported in academic study and industrial
vulnerability assessment, e.g., denial-of-service attacks [2], false data-
injection attacks [3], replay attacks [4], covert attacks [5], etc. Therefore,
to support the reliable operations of networked microgrids, it is necessary to
take the resilience-to-attack into consideration when designing their control
systems.

In this paper, a resilient-to-cyberattack communication scheme is introduced
to support the interconnection decision of networked microgrids in the
presence of cyberattacks. To reduce the risk of one-point-failure, it is
assumed that there is no centralized controller coordinating all the
microgrids. The removal of centralized controller is also necessary in a mixed
ownership environment where each microgrid belongs to either utility and non-
utility, and hence, it is not authorized to collect information from all
microgrids by a centralized controller. Recently, [6] presented a distributed
architecture using the Open Field Message Bus (OpenFMB) that enables peer-to-
peer (p2p) communication at the application layer to be implemented. Using
such a p2p communication network, the microgrid controllers exchange
information to make the interconnection decision in a distributed manner. To
make it difficult for an attacker to be successful in targeting the
communication links, we propose a strategy whereby a communication agent
randomly generate the p2p communication graph (i.e., graph of who-talk-with-
who), without getting information from microgrids. Then, by using resilient
consensus algorithms, the microgrid controllers can reach interconnection
agreement even in the presence of cyberattacks to some controllers.

Designing advanced controllers for resilient networked microgrids have been
investigated. In [7], networked microgrids (MG) were investigated for self-
healing purpose when a generation deficiency or fault happens in a MG. Here,
the MGs are connected through a common point of coupling, and both
communication and physical network topologies are fixed. A framework for
assembling of networked microgrids was introduced in [8]; yet the
communication network was also fixed to an all-to-all topology. Our work
advances the current state-of-the-art by considering cyberattack to the
communication links and controllers and leveraging the flexibility of p2p
communication network.

The novelty and contributions of this paper include:

  * •

A resilient p2p communication framework is introduced for the distributed
decision of interconnecting networks of microgrids in the presence of
cyberattacks to communication links and microgrid controllers.

  * •

Resilient consensus algorithm is investigated to robustly evaluate the
networked microgrid’s interconnection criteria when there are attacked
controllers. In this paper, the criteria is based on the total supply and
critical demand of all participating microgrids.

  * •

The key to success of the resilient consensus algorithm is to have a
communication graph with enough vertex-connectivity. Accordingly, two
algorithms are introduced for generating a communication graph with a given
vertex-connectivity, in both cases when the cyberattacks to communication
links are known or unknown.

The remainder of this paper is organized as follows. In Section II, the
physical and cyber architecture supporting distributed decisions in networked
microgrids is presented. Also, the interconnection criteria and problem
statement are introduced. Section III provides the graph algorithms for
generating a p2p communication network and the resilient consensus algorithms
for the interconnection decision making. Numerical demonstration on a co-
simulation platform is presented in Section IV, followed by conclusions.

Graph theory preliminaries: The undirected graph $\mathcal{G}=(V,E)$ with
nodes $V=\\{1,\dots,N\\}$ and edges $E\subseteq V\times V$ is said to be
connected if there exists a path between two arbitrary nodes. $\mathcal{G}$ is
said to have vertex-connectivity of $c$ if we have to cut at least $c$ nodes
in $V$ to make $\mathcal{G}$ disconnected.

##  II Distributed Decision for Interconnection of Networked Microgrids

This section presents a cyber-physical architecture that can support the
distributed decision for electrical interconnection of multiple microgrids,
and formulates the resilient decision making problem for interconnection.

###  II-A Physical and cyber architecture of networked microgrids

The physical-cyber architecture of microgrids is presented in Fig. 1 and
includes the following components:

Figure 1: Physical and cyber architecture to support distributed decision
making of networked microgrids. The communication agent chooses suitable pairs
of microgrid-level controllers to exchange information. Using consensus
algorithm, the controllers distributedly process exchanged information, even
in the presence of cyberattacks, in order to reach the agreement on
interconnecting the network of microgrids.

  * •

Physical layer. A number of microgrids ${\bf S_{i}},i=1,...,N,$ in grid-
disconnected mode is considered to support the end-use demands when there is
loss of the bulk power system. In this severe condition, microgrids can choose
to support only critical demand.

  * •

Microgrid controllers. For microgrids operating in a mixed ownership
environment, it is impractical for one centralized controller to have access
to information from all microgrids. It is more reasonable to assume that each
microgrid has one controller that can collect information from devices in that
microgrid and perform different controlling objectives. In this paper, the
microgrid controllers aim to reach an agreement about whether the microgrids
electrically interconnect or not. To make this decision distributedly, the
controllers estimate local information from their microgrids and exchange such
information via a p2p communication network.

  * •

Communication agent. The p2p communication links for information exchange
among controllers can be vulnerable to cyberattacks. While reducing the number
of communication links can mitigate this risk, it may result in inadequate
information exchange among controllers. As such, appropriately controlling the
p2p communication network is necessary. In this paper, a communication agent
can fully control the p2p communication network (i.e., select which
controllers communicate with which controllers) to mitigate the impact of
cyberattacks to links. Different from a centralized controller, the
communication agent does not need to collect information from microgrids.

###  II-B Interconnection criterion and Problem Statement

The goal of interconnection is for microgrids to distributedly determine if
they should electrically interconnect, or potentially separate, to achieve
operational objectives. While several operational objectives can be
considered, supporting critical load demand in the presence of cyber and
physical attacks is the focus of resilient-by-design networked microgrids. As
such, in this paper the interconnection criterion is whether the total supply
of the participating microgrids can meet the total critical demand.

The interconnection decision will be evaluated in a periodical basis $T$,
typically every 1 hour. At the time $nT,n=0,1,2,...,$ each microgrid
controller estimates the supply and critical load demand for period
$[nT,(n+1)T]$, which are denoted as $S_{i}(nT)$ and $\bar{D}_{i}(nT)$ for
other microgrids in a distributed manner. Accordingly, all the participating
microgrids will electrically interconnect if the total supply can meet the
total critical demand in this period, i.e.,

$\displaystyle\sum_{i=1}^{N}S_{i}(nT)>\sum_{i=1}^{N}\bar{D}_{i}(nT),$ (1)

Otherwise, the microgrids operate independently.

Therefore, the problem statement is given as follows:

_Resilient Interconnection Problem: In the presence of cyberattacks, generate
communication graph and design distributed computation scheme to enable the
microgrid controllers to evaluate the interconnection criterion ( 1) and reach
the interconnection agreement._

##  III Algorithms for Distributed Decision

This section presents algorithms for solving the Interconnection problem in
Subsection II.C, including resilient consensus algorithms for distributed
computation at controllers and graph algorithms for selecting suitable pairs
of communicating controllers.

###  III-A Resilient Consensus Algorithm for Controllers

Consensus algorithm is used to allow each controller to estimate
$\sum_{i}S_{i}(nT)$ and $\sum_{i}\bar{D}_{i}(nT)$ from exchanged information,
however using a distributed peer-to-peer scheme. The following computation is
presented for supply, but also applied for critical load demand. When the
microgrid controller $i$ is not under any attack, it updates the supply value
by using consensus algorithm as follows:

$\displaystyle
S_{i}^{k+1}(nT)=w_{ii}S_{i}^{k}(nT)+\sum_{j\in\mathcal{N}_{i}}w_{ij}S_{j}^{k}(nT),$
(2)

where $w_{ij}$ are the weights, $k$ is the updating step, and
$\mathcal{N}_{i}$ is the set of all controllers that exchange supply
information with controller $i$. When controller $i$ gets attacked, the
attacker can inject malicious data into the updating process as follows:

$\displaystyle
S_{i}^{k+1}(nT)=w_{ii}S_{i}^{k}(nT)+\sum_{j\in\mathcal{N}_{i}}w_{ij}S_{j}^{k}(nT)+u_{i}^{k}(nT),$
(3)

where $u_{i}^{k}(T)$ denotes data injected by the attacker. Denote ${\bf
S}^{k}(nT)$ as the vector of supplies and ${\bf W}$ as the matrix of weights.
Then, the update (3) can be compactly rewritten as, ${\bf S}^{k+1}(nT)={\bf
W}{\bf S}^{k}(nT)+{\bf B}_{\mathcal{F}}{\bf u}^{k}_{\mathcal{F}}(nT).$ Here,
${\bf B}_{\mathcal{F}}=\begin{bmatrix}{\bf e}_{i1,N}&\dots&{\bf
e}_{if,N}\end{bmatrix}$, where ${\bf e}_{i1,N}$ denotes an ones-vector of size
$N$ with $1$ at the $i1^{th}$ row position, and ${\bf
u}^{k}_{\mathcal{F}}(nT)=\begin{bmatrix}{\bf u}^{k}_{i1}(nT)^{\top}&\dots&{\bf
u}^{k}_{if}(nT)^{\top}\end{bmatrix}^{\top}$.

As controllers exchange supply information, controller $i^{th}$ obtains a
vector of supply values as ${\bf y}_{i}^{k}(nT)={\bf C}_{i}{\bf S}^{k}(nT),$
where ${\bf C}_{i}$ is a matrix with a single $1$ in each row. After $K$
updating steps, controller $i$ has a matrix of supply values:

$\displaystyle\mathbf{Y}_{i}^{0:K}(nT)=\mathcal{O}_{i,K}\mathbf{S}^{0}(nT)+\mathcal{M}_{i,K}^{\mathcal{F}}\mathbf{u}_{\mathcal{F}}^{0:K-1}(nT),$
(4)

where
$\mathbf{Y}_{i}^{0:K}(nT)=\left[\begin{array}[]{llll}\mathbf{y}_{i}^{0\top}(nT)&\mathbf{y}_{i}^{1\top}(nT)&\cdots&\mathbf{y}_{i}^{K\top}(nT)\end{array}\right]^{\top}$,
$\mathbf{u}_{\mathcal{F}}^{0:K-1}(nT)=\left[\begin{array}[]{llll}\mathbf{u}_{\mathcal{F}}^{0\top}&\mathbf{u}_{\mathcal{F}}^{1\top}&\cdots&\mathbf{u}_{\mathcal{F}}^{(K-1)\top}\end{array}\right]^{\top}$.
Also,

$\displaystyle\mathcal{O}_{i,L}=\left[\begin{array}[]{c}\mathbf{C}_{i}\\\
\mathcal{O}_{i,L-1}\mathbf{W}\end{array}\right],\mathcal{M}_{i,L}^{\mathcal{F}}=\left[\begin{array}[]{cc}\mathbf{0}&\mathbf{0}\\\
\mathcal{O}_{i,L-1}\mathbf{B}_{\mathcal{F}}&\mathcal{M}_{i,L-1}^{\mathcal{F}}\end{array}\right],$

for $L=1,2,....$ Here, $\mathcal{O}_{i,0}={\bf C}_{i}$, and
$\mathcal{M}_{i,0}^{\mathcal{F}}$ is an empty matrix with zero columns. Using
(4), controller $i$ will estimate the original supplies of all microgrids. The
following core result summarizes the required connectivity condition of the
communication graph for the robust estimation of the supply in the presence of
a number of malicious controllers.

###### Lemma 1

[9] Let the graph $\mathcal{G}=(V,E)$ with $N$ nodes denote the communication
graph of controllers. Let $f$ be the maximum number of nodes that got
malicious data injection during the updates. Then, each node can recover the
original supply of all the other microgrids if the vertex-connectivity of the
communication graph is $\geq 2f+1$ and there exist an integer $K$, and weight
matrix $\bf W$ such that for set $\mathcal{Y}\subset X$ of $2f$ nodes we have,
$\mbox{rank}([\mathcal{O}_{i,K}\;\;\;\mathcal{M}_{i,K}^{\mathcal{Y}}])=N+\mbox{rank}(\mathcal{M}_{i,K}^{\mathcal{Y}})$.
Moreover, $\bf W$ can be constructed with almost any choice of real-valued
numbers with
$w_{ij}=0\;\;\;\mbox{if}\;\;\;j\not\in\mathcal{N}_{i}\cup\\{i\\}$.

When the rank condition in Lemma 1 is met, Algorithm 1 is used to estimate the
total supply of all participating microgrids.

Data: Communication graph with $(2f+1)$ vertex-connectivity, and identified
$f$ microgrid controllers under attack

Result: Estimates of the total supply of all participating microgrids

for  _n=0, 1,…_ do

for  _i=1,…, N_ do

1\. Run linear iterative updates as in (3).

2\. Get the supply values of the neighbouring microgrids and construct the
matrix of supply values ${\bf Y}_{i}^{0:K}(nT)$ in (4).

3\. Construct matrices $\mathcal{O}_{i,L}$ and
$\mathcal{M}_{i,L}^{\mathcal{F}}$.

end for

4\. Estimate ${\bf S}^{0}(nT)$ using the inverse of (4)

5\. Calculate total supply as $\sum_{i=1}^{N}{\bf S}^{0}(nT).$

end for

Algorithm 1 Estimation of total supply

###  III-B Graph algorithms for communication agent

As seen in Lemma 1, the key to the success of resilient consensus algorithm is
to have a communication graph with vertex-connectivity of at least $(2f+1)$ if
there are $f$ attacked controllers, while the weight matrix $\bf W$ can be
chosen arbitrarily. However, to the best of our knowledge, there is no
algorithms to generate a graph with a given vertex-connectivity. In this work,
we develop the following core result and use it to generate such communication
graphs.

######  Lemma 2 (Graph Extension Scheme)

Let $\mathcal{G}_{n}$ be a graph with $n$ nodes and vertex-connectivity $m$.
Extend the graph $\mathcal{G}_{n}$ to a $(n+1)$-node graph
$\mathcal{G}_{(n+1)}$ by adding 1 node to graph $\mathcal{G}_{n}$ and $m$
edges from this added node to $m$ arbitrary nodes of $\mathcal{G}_{n}$. Then
the new graph $\mathcal{G}_{(n+1)}$ has vertex-connectivity larger than or
equal to $m$.

Proof: See Appendix VI.

In the following, two scenarios of cyberattacks to communication links are
discussed, followed by algorithms for communication agent to generate
communication network.

####  III-B1 Preventive control

To reduce the likelihood and impact of successful attacks to the communication
links, we propose a randomization strategy, whereby the communication agent
generates the p2p communication graph with $(2f+1)$-vertex-connectivity by
randomly selecting the nodes and ordering them.

The preventive strategy is provided in Algorithm 2. Note that the
$(2f+1)$-node fully connected graph generated in Step 2 has the vertex-
connectivity of $(2f+1)$. As the graph is subsequently extended in Step 3, the
vertex-connectivity of the graph is larger than or equal to $(2f+1)$, as
proved in Lemma 2. Therefore, the $N$-node graph obtained by Step 3 also has
the vertex-connectivity larger than or equal to $(2f+1)$. The randomization of
node order in Step 1 and Step 4 does not change the vertex-connectivity of the
graph. Hence, Algorithm 2 results in a $N$-node graph with vertex-connectivity
larger than or equal to $(2f+1)$.

Data: Number of microgrids (i.e., nodes), $N$

Result: A random p2p graph with $(2f+1)$-vertex-connectivity for preventive
control

1\. Randomly select $(2f+1)$ nodes among $N$ nodes.

2\. Generate fully connected graph from these $(2f+1)$ nodes

3\. Subsequently extend the graph using the Graph Extension Scheme presented
in Lemma 2 until $N$-node graph is obtained.

4\. Randomly change the node order of the resulting graph from Step 3

Algorithm 2 P2p graph for preventive control

####  III-B2 Responsive control

When there are cyberattacks to communication links and they are known, the
communication agent will adapt the network by generating p2p communication
network with $(2f+1)$-vertex-connectivity from the remaining safe
communication links. Here we assume the ratio of compromised communication
links is sufficiently small to ensure the $(2f+1)$-vertex-connectivity
requirement is met. The procedure is presented in Algorithm 3.

Data: Number of microgrids (nodes), $N$

Result: A p2p graph with $(2f+1)$-vertex-connectivity for responsive control

1\. Select $(2f+1)$ nodes among nodes whose communication links do not get
attacked.

2\. Generate fully connected graph from the $(2f+1)$ nodes obtained in Step 1

3\. Subsequently add the safe communication links to extend the graph using
the Graph Extension Scheme presented in Lemma 2 until $N$-node graph is
obtained.

Algorithm 3 P2p graph for responsive control

It is noted that in Step 1, only the controller nodes with healthy (no attack)
communication links are selected. Therefore, the resulting fully connected
graph in Step 2 consists of non-attacked communication links. In Step 3, only
the safe communication links are used to extend the graph. Therefore,
Algorithm 3 results in a p2p communication graph with safe communication links
(edges) and vertex-connectivity larger than or equal to $(2f+1)$.

##  IV Demonstration

Figure 2: Co-simulation platform for demonstrating the resilient communication
scheme. Microgrid controllers and communication agent are programmed in
Python. Microgrid controllers distributedly decide if microgrids should
interconnect. It should be noted that after the interconnection decision is
reached, then microgrids can electrically interconnect using available
switches, and the critical demand will be met by the supply in any electrical
interconnection topology. How to optimize the electrical interconnection
topology is beyond the scope of this paper.

For demonstrating the introduced resilient communication scheme, a co-
simulation platform is developed, as showed in Fig. 2, in which the microgrids
are modeled in GridLAB-D [10] and microgrid controllers are programmed in
Python. A modified IEEE 123-node test feeder is divided into six microgrids,
each of which contains one generator.

The locations of generators and critical loads are in Table I. At a particular
time, the Python-based controllers get measurement data from GridLAB-D and
estimate the supply and critical demands of microgrids for the next 1 hour, as
in Table I. It can be observed that the supplies at MGs 3 and 5 do not meet
the critical load demand, and hence, it is beneficial to interconnect the MGs.

TABLE I: Local information of microgrids MG | Gen | Critical load | Critical demand | Supply
---|---|---|---|---
| nodes | nodes | (kVA-h) | (kVA-h)
1 | 50 | (46) | 22.30 | 24.17
2 | 300 | (111-114) | 44.72 | 64.31
3 | 100 | (68-71) | 111.80 | 89.19
4 | 95 | (88,94) | 89.44 | 134.43
5 | 62 | (52,53,55) | 89.44 | 49.65
6 | 35 | (39) | 22.36 | 79.69

Assume that all the microgrid controllers choose to participate in the
interconnection decision process and MG4’s controller is under attack. The
attacker injects malicious data into the decision making algorithm for three
consecutive update steps, and therefore, the supply and demand exchanged
between the controllers are inaccurate. The malicious data is arbitrarily
sampled from 3 distributions, as presented in Fig. 3. As there is 1 controller
that got attacked, communication agent generates a communication graph with
3-vertex-connectivity by using Algorithm 2, as shown in Fig. 4.

Figure 3: Distributions of noises for the attacker to sample data to inject
into the computation software at MG4’s controller. In each distribution, three
samples are arbitrarily selected. Figure 4: Random communication topology with
3-vertex-connectivity. MG $4$ malfunctions.

Next, Algorithm $1$ is used to estimate the total supply and critical load
demand values of all the microgrids. The weight matrix is selected as:

$\displaystyle{\bf W}=\begin{bmatrix}5&4&1&1&0&0\\\ 1&-3&-2&1&4&0\\\
-3&-3&-4&0&0&-3\\\ -1&-2&0&5&-1&-3\\\ 0&4&0&5&-1&-4\\\
0&0&-3&-1&1&-3\end{bmatrix}.$ (5)

The average consensus algorithm is used as the baseline for comparison with
the resilient consensus algorithm. The performance of two algorithms are
showed in Fig. 5. It can be observed that using resilient consensus algorithm,
each microgrid controller can accurately estimate the total supply and demand,
in the presence of the data injection attack, as: $\sum_{i=1}^{6}S=441.36$
(kVA-h), $\sum_{i=1}^{6}\bar{D}=380.04$ (kVA-h). As such, all the microgrid
reached a consensus that the interconnection criterion (1) is satisfied. But,
if controllers use the baseline algorithm, they cannot accurately estimate the
total supply and demand, and they cannot evaluate interconnection criterion
(1).

(a) Resilient consensus algorithm

(b) Baseline

Figure 5: Comparison between resilient consensus algorithm and baseline
performance under malicious data attack

##  V Conclusions

In this paper, a resilient communication scheme was introduced for distributed
decision of interconnecting networks of microgrids. Algorithms were presented
to generate a randomized p2p communication network to prevent or limit a
successful attack and an adapted network for situations where some of the
communication links are attacked and known. Based on the p2p communication
network, resilient consensus algorithm was applied to enable the microgrid
controllers to estimate global information of total supply and critical
demand, and then, agree to physically interconnect or disconnect the network,
even in the presence of cyberattacks. Simulations on a modification of the
123-node Test Feeder with 6 microgrids showed that the controllers can
distributedly make decision under a data injection attack.

##  VI Appendix: Proof of Lemma 2

Let’s remove $(m-1)$ arbitrary nodes and all the edges connected to these
nodes from the graph $\mathcal{G}_{(n+1)}$. Denote the remaining graph as
$\tilde{G}_{(n+1)}.$ There are two possibilities:

Case 1: The added node to extend from the graph $\mathcal{G}_{n}$ to graph
$\mathcal{G}_{(n+1)}$ is among the (m-1) removed nodes. Now, the remaining
graph $\tilde{G}_{(n+1)}$ is actually the one obtained by removing $(m-2)$
nodes from the graph $\mathcal{G}_{n}$. As the graph $\mathcal{G}_{n}$ is
$m$-vertex-connectivity, it is still connected after cutting $(m-2)$ nodes.
Hence, the graph $\tilde{G}_{(n+1)}$ is connected.

Case 2: The added node to extend from the graph $\mathcal{G}_{n}$ to graph
$\mathcal{G}_{(n+1)}$ is not removed. Then, the remaining graph
$\tilde{G}_{(n+1)}$ includes the added node and a graph obtained by removing
$(m-1)$ nodes from the graph $\mathcal{G}_{n}$ (which is denoted as
$\tilde{G}_{n}$). Because the graph $\mathcal{G}_{n}$ is $m$-vertex-
connectivity, the graph $\tilde{G}_{n}$ is also connected. Since the added
node is connected to m nodes in the graph $\mathcal{G}_{n}$ due to the Graph
Extension Scheme, it should be connected to at least one node in the graph
$\tilde{G}_{n}$. Hence, $\tilde{G}_{(n+1)}$ is connected.

Therefore, when we remove any (m-1) nodes from the graph
$\mathcal{G}_{(n+1)}$, then the remaining graph is still connected. Hence,
$\mathcal{G}_{(n+1)}$ has the vertex-connectivity of at least $m$.

## References

  * [1] Z. Li, M. Shahidehpour, F. Aminifar, A. Alabdulwahab, and Y. Al-Turki, “Networked microgrids for enhancing the power system resilience,” _Proc. IEEE_ , vol. 105, no. 7, pp. 1289–1310, 2017.
  * [2] Y. Yuan, Q. Zhu, F. Sun, Q. Wang, and T. Başar, “Resilient control of cyber-physical systems against denial-of-service attacks,” in _2013 6th International Symposium on Resilient Control Systems (ISRCS)_. IEEE, 2013, pp. 54–59.
  * [3] C.-Z. Bai, F. Pasqualetti, and V. Gupta, “Data-injection attacks in stochastic control systems: Detectability and performance tradeoffs,” _Automatica_ , vol. 82, pp. 251–260, 2017.
  * [4] M. Zhu and S. Martinez, “On the performance analysis of resilient networked control systems under replay attacks,” _IEEE Transactions on Automatic Control_ , vol. 59, no. 3, pp. 804–808, 2013.
  * [5] A. Barboni, H. Rezaee, F. Boem, and T. Parisini, “Detection of covert cyber-attacks in interconnected systems: A distributed model-based approach,” _IEEE Transactions on Automatic Control_ , 2020.
  * [6] K. P. Schneider, S. Laval, J. Hansen, R. B. Melton, L. Ponder, L. Fox, J. Hart, J. Hambrick, M. Buckner, M. Baggu, K. Prabakar, M. Manjrekar, S. Essakiappan, L. M. Tolbert, Y. Liu, J. Dong, L. Zhu, A. Smallwood, A. Jayantilal, C. Irwin, and G. Yuan, “A distributed power system control architecture for improved distribution system resiliency,” _IEEE Access_ , vol. 7, pp. 9957–9970, 2019.
  * [7] Z. Wang, B. Chen, J. Wang, and C. Chen, “Networked microgrids for self-healing power systems,” _IEEE Transactions on Smart Grid_ , vol. 7, no. 1, pp. 310–319, 2016.
  * [8] K. P. Schneider, J. Glass, C. Klauber, B. Ollis, M. J. Reno, M. Burck, L. Muhidin, A. Dubey, W. Du, L. Vu _et al._ , “A framework for coordinated self-assembly of networked microgrids using consensus algorithms,” _IEEE Access_ , 2022.
  * [9] S. Sundaram and C. N. Hadjicostis, “Distributed function calculation via linear iterative strategies in the presence of malicious agents,” _IEEE Trans. Automatic Control_ , vol. 56, no. 7, pp. 1495–1508, 2010.
  * [10] 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.


# How to automate a kinematic mount using a 3D printed Arduino-based system

Luis José Salazar-Serrano1, Gerard Jiménez2 and Juan P. Torres2,3
1Aistech Space, Esteve Terrades 1, Despacho 110, 08860, Castelldefels,
Barcelona, Spain
2ICFO - The Institute of Photonic Sciences, the Barcelona Institute of Science
and Technology
08860, Castelldefels, Barcelona, Spain
3Dep. Signal Theory and Communications, Universitat Politecnica de Catalunya
Campus Nord D3, 08034 Barcelona, Spain
Corresponding author<EMAIL_ADDRESS>
## 1\. Introduction

Over the last years the combination of 3D printing and Arduino has proved to
be an efficient and cost-effective way of making experimental equipment,
becoming in many occasions an attractive alternative to its commercial
counterparts. This combination of Arduino, 3D printed parts and simple
hardware have already been used in a system to determine the concentration of
dissolved species [1], to provide a carefully controlled dose of a given
reagent [2], to characterize easily the spatial profile of a laser beam [3],
and to centrifuge a substance for DNA extraction [4], among others.

In all of these cases, expensive and sometimes over-engineered components are
substituted by equipment that, despite costing a fraction of its commercial
counterpart, can be used to perform state-of-the-art research. Moreover,
thanks to the fact that the fabrication time is minimal, the characteristics
and quality of the components evolve very fast in the hands of researchers.
This evolution process has unexpectedly turned out to be a creative way to
engage young minds to research in natural sciences.

In this paper we report the development of a system that can motorize many of
the kinematic mounts available nowadays on the market. It combines 3D printed
components, simple hardware and electronics, and an Arduino board. The system
is intended to add automation capabilities to the Open-Source Optics Library
[5] already available on the Internet. The library is composed of a broad
selection of optical components ubiquitous in any optics experiment such as
lens holders [6], screen/filter holders [7, 8], lab jacks [9], fiber optic
holders [10], kinematic mirrors and translation stages [11, 12], and
parametric open-source chopper wheels [13], to name a few.

The system we demonstrate here is simple, flexible and cost-effective. The
simplicity of the system relies on the components used to implement it. It is
composed of a 3D printed plate that supports two stepper motors 28BYJ-48. Its
shafts are aligned with the knobs used to tip and tilt the plane of the
kinematic mount that supports the optics (see Figure 1). The cylindrical
adapter used to couple the shaft to the knob is also 3D printed. An Arduino
MEGA controls the motors. In order to simplify the connections with the motor
drivers, a shield (Sensor Shield V1.0) provides the capability of controlling
up to ten motors simultaneously by sending simple instructions defined by a
command table through the serial port.

Figure 1: Design in Freecad showing the implementation of the motorized system
for a kinematic mount from Thorlabs (KM100). 3D printed components are shown
in green, red and purple.

The hardware and software of the system are flexible and can be easily
modified according to the user needs. From the hardware side, since the 3D
printed components that couple the system to the kinematic mount were
parametrically designed using FreeCAD 0.16 [14], the system is highly tunable
by changing only a few parameters on a spreadsheet. Similarly from the
software side, the Arduino code is well documented and some usage examples are
provided in the *.ino file. The FreeCAD and Arduino source code can be
downloaded from the repositories Thingiverse [15] and Github [16],
respectively.

The low cost of the system is the byproduct of its simplicity. As a reference,
the average cost of fabricating a system composed of four stepper motors for
controlling two kinematic mounts is around 30 EUR . The system presented in
this letter compares thus favorably with respect to commercial alternatives,
since it can be roughly between 5 to 10 times less expensive. However, a word
of caution should be added here. Since the system keeps track of the number of
steps given by the stepper motor of each channel to estimate its current
position, some inaccuracies may appear due to the hysteresis present on the
stepper motors. Therefore, the true usefulness of the system presented in this
work will depend on its specific aim. Based on our experience in the
laboratory in a research institute, we find that the system is suitable for a
wealth of applications ranging from teaching to doing high-quality research
experiments.

To illustrate and validate the system developed, we consider two scenarios
that may require the use of two mirrors supported by two kinematic mounts. The
first scenario is the alignment of a laser beam through two reference
apertures, and the second scenario is the coupling of light into a multimode
or single-mode optical fiber. Both scenarios might be of great interest to
experimenters that require to re-align an optical beam or to increase the
coupling efficiency of an optical fiber on a daily basis.

## 2\. Results

To validate and test the performance of the motorized system, we have
implemented the two experimental schemes shown in Figure 2. We use a HeNe
laser, and align the laser beam with the help of two mirrors supported by two
kinematic mounts, $\mathrm{KM_{1}}$ and $\mathrm{KM_{2}}$.

Figure 2: Experimental schemes. $\mathrm{KM_{1}}$ and $\mathrm{KM_{2}}$:
Kinematic mounts; PM: Power meter; FC: Fiber coupler.

In each experiment, the tip and tilt of each of the two mirrors is
automatically controlled using a MATLAB routine. The power after the second
iris (Figure 2(a)) or at the output of the fiber (Figure 2(b)) is monitored
using a Thorlabs PM100A power meter. After scanning sequentially the tip and
subsequently the tilt of both mirrors, the final position of each kinematic
mount is set to the position that corresponds to the maximum power registered.

### 2.1. Alignment of an optical beam with the help of two irises

The experimental scheme is shown in Figure 2(a). The initial position of the
mirrors (without using the stepper motors) is set so that the optical beam
hits the first iris close to its center. This coarse alignment is mainly
driven by the first mirror $\mathrm{KM_{1}}$. Once the starting point is
defined, the motors are attached to the kinematic mounts knobs and a simple
MATLAB routine is executed where each motor move independently a defined
number of steps either in a clock-wise or anti-clockwise direction. The
optical power is measured by the detector located after the second iris.

To illustrate a step by step run of the MATLAB routine, a CCD camera is placed
just after the second iris and a beam image is acquired for several positions
of both motors. Figures 3 and 4 show the beam position registered for a given
combination of steps $(N_{1},N_{2})$ in the X and Y directions, respectively.
As a reference, the position of the second iris (set at a given aperture) is
indicated by a dashed circle in all images.

Figure 3: X-direction scan. Below each capture, in brackets, (X1-Motor
Position, X2-Motor Position).

In the example, each motor $KM_{1}$ and $KM_{2}$ is set to move between three
different positions separated by 300 steps, so that each motor can move
between the absolute positions -300, 0 and 300\. As a result, a full scan in
the X and Y directions is defined by 9 different positions indicated by the
array $(N_{1},N_{2})$ below each figure.

Notice that the maximum power is registered for the positions $(0,0)$, while
the positions with opposite angles $(-300,+300)$ and $(+300,-300)$ correspond
to a situation where the effect of one mirror is compensated by the other and
the centroid of each beam is slightly shifted to the right or left,
respectively.

Figure 4: Y-direction scan. Below each capture, in brackets, (Y1-Motor
Position, Y2-Motor Position).

### 2.2. Optimizing the coupling efficiency of a light beam into an optical
fiber

We replace the second iris of the previous experimental setup by a multi-mode
optical fiber (see Figure 2(b)). The aim is to test the performance of the
system, and the simple routine written in MATLAB code, for optimizing the
coupling of light into an optical fiber. The motors attached to the 3D printed
kinematic mounts perform a scan in the X direction, and later on in the Y
direction, controlled by a MATLAB program.

Figure 5 shows a table with the data obtained after performing a full scan in
both directions. First the X scan provides a power maximum (highlighted),
which is used as the starting point for a second scan in the Y direction
(highlighted).

Figure 5: Optimization of light coupling into an optical fiber. Example of the
data collected and saved in the .dat file generated by the MATLAB program
after performing a scan in the X and Y directions.

After the scan in the X and Y directions the motors will move to positions
$(-100,-100)$ and $(-100,0)$ respectively. For this final situation, the
recorded power is 1027 $\mu W$. Taking into account that the input power of
the laser is 1250 $\mu W$, we obtain that the laser-fiber coupling efficiency
is $82.16\%$.

## 3\. Discussion

The combination of 3D printing and simple hardware and electronics components
is becoming more and more popular as a tool for developing scientific
equipment. It offers the possibility to lower significantly the cost of an
experiment, and sometimes even more importantly, it helps to reduce
dramatically the delivery time of certain components.

Company |  Software |  Hardware |  Price [ EUR ]
---|---|---|---
Newport |  PicomotorTM |  8806 Picomotor Motorized Blank Plate Mount |  1885
Edmund Optics |  Via RS-232 Serial Interface |  Motorized Kinematic Mount |  1595
Standa |  8SMC5-USB Stepper and DC Motor Controller |  8MBM24 - Motorized Mirror Mounts |  940 + 699
Physik Instrumente (PI) |  PI Mikromove |  N-480 PiezoMike Linear Actuator |  2109.03
Thorlabs |  K-Cube DC Servo Motor Controller |  KS1-Z8 DC Motorized Mirror Mount |  580.41 + 1218.97
Table 1: Selected commercially available motorized kinematic mounts.

One important conclusion that is extracted from Table 1 is that worldwide
there are only a few companies that sell optical equipment that cover
satisfactorily the basic need to automate the alignment of optical systems. In
any case, prices are reasonably high, that leads to the need to reduce them
using new resources. Precisely our work addresses this last concern, and makes
use of 3D printing and simple electronics to lower cost.

Using 3D printed kinematic mounts dramatically reduces the cost, and greatly
increases flexibility and adaptability with respect to existing systems. The
experimental results obtained support the operation and viability of both the
low-cost hardware and the simple open-source software provided.

The convergence of the auto-alignment method is undoubtedly key and essential
to ensure its proper functioning. In our case, this convergence is guaranteed
by reducing the number of steps of the motors in the feedback loop. In other
words, the convergence must be done by the user, who must manually reduce the
number of steps. For the same reason, an obvious improvement of our MATLAB
routine would be the "automatization" of that convergence, that is, a code
designed to converge to the optimal solution that reduces the number of steps
of the motors automatically.

Another possible improvement that can be implemented in our code would be the
realization of a single feedback loop for the X-Y plane scan. Recall that in
our case there are two loops, one for scanning along the X direction and
another one for the Y direction. This seems reasonable, since it simulates the
alignment that is carried out manually by scientists. But for greater
compactness and lower computational cost, a single loop that synchronizes the
movement of the four motors could be implemented and be more advantageous.

## 4\. Materials and Methods

We have designed and implemented a system that can provide full automatic
control of a vast majority of standard kinematic mounts available on the
market. It combines open-source resources such as 3D printing and simple
electronics.

A single unit of the system, capable of controlling the tip and tilt of a
kinematic mount, is composed of two stepper motors attached to a 3D printed
plaque that aligns the knobs of the kinematic mount with the axis of the
motors. The axis are coupled to the knobs using a 3D printed knob adapter. The
motor drivers are connected to an Arduino MEGA sensor shield (attached to and
Arduino MEGA) using Dupont wire jumper cables. Table 2 provides the list of
materials required to motorize a kinematic mount for a single channel as well
as its estimated cost.

Component | Quantity | Unit Cost [ EUR ]
---|---|---
Parametric plaque (3D printed) | 1 | 2
Knob adapter (3D printed) | 2 | 2
M3 screw | 4 | 0.25
Motor 28BYJ-48 | 2 | 1.5
Arduino MEGA board | 1 | 10.0
Sensor shield for Arduino MEga | 1 | 3.0
Dupont cable (patch of 6 cables) | 2 | 1
| TOTAL | 25
Table 2: List of materials.

### 4.1. Hardware

Figure 6(a) provides a connection diagram for a single unit that makes use of
two channels (tip and tilt). Each channel is composed of a stepper motor
28BYJ-48, driver electronics and a Dupont cable patch with six wires. Given
the number of output pins available on the Arduino sensor shield, the board
can be used to control up to five kinematic mounts simultaneously as shown in
Figure 6B.

Figure 6: Connection diagram for two channels. Figure a) shows the connection
diagram between the motors and the driver electronics. Figure b) shows the
different ports available on the Arduino sensor shield.

Since the 3D printed components that couple the stepper motors to the
kinematic mount were designed using FreeCAD 0.16, the distance between motor
axis on the plate, and the inner diameter and height on the knob adapters can
be easily modified using a spreadsheet. To attach the motors to the plastic
plate, four M4 screws are required, whereas two M3 grub screws are used to
secure the knobs to the knob adapters (see figure 7).

Figure 7: Exploded view of the mechanical interface. The motors are attached
to the 3D printed plaque (shown in violet) using four M4 screws. The 3D
printed adapter knobs (shown in green and red) are secured to the kinematic
mount knobs using M3 grub screws.

Table 3 provides information on the parameters used for customizing the plate
and the knob adapter to fit into four different types of kinematic mounts (see
Figure 7(b)). The FreeCAD, FCStd files are available on a Thingiverse
[reference].

Parameter | Variable | PLA | Radiant Dyes | Thorlabs | Liop-Tec
---|---|---|---|---|---
Plaque axis distance | L | 45.0 | 43.8 | 53.3 | 49.0
Knob diameter | D | 15.0 | 16.1 | 14.5 | 15.0
Knob height | H | 9.0 | 6.0 | 8.0 | 9.0
Table 3: Parameters for 3D printed components. All dimensions are in
millimeters.

Regarding the motors used, the 28BYJ-48 is a very cheap stepper motor that
requires five wires for its connection to the motor driver circuit. The motor
can operate in the voltage range from 5V to 12V, and gives 4096 steps per one
turn. This number comes from the fact that the internal stepper motor that
requires 64 steps to give a complete turn is connected to a set of gears that
provide a reduction ratio of 1/64. As a result the 28BYJ-48 requires $64\times
64=4096$ steps to complete a full turn.

For the sake of illustration, Figure 8 shows the experimental setup
corresponding to Figure 2(b), where two kinematic mounts from Radiant Dyes are
motorized. Notice that for each channel we have used the following components:
one 3D printed supporting plate, two 3D printed knob couplers, two stepper
motors and the corresponding driving electronics. In this particular case, the
power supplied by the USB port is enough to move the motors. However, in order
to control more than four stepper motors simultaneously, it may be necessary
to connect the sensor shield to an external power supply.

Figure 8: Overall image of the system used to improve the light coupling
efficiency into a multi-mode (MM) optical fiber.

### 4.2. Software

In order to provide flexibility and simplicity from the software perspective,
each motor is controlled independently by sending a simple instruction defined
by a command table through the serial port. A command table is a dictionary of
instructions that can be divided into two categories: commands and queries.
The first category corresponds to a direct order such as "move stepper motor
connected to port 3, half-turn". The second type of command is used to ask
information to the device about its status; for example the state of a digital
variable, the value of a given counter or the identification string that
contains relevant information about the device and its manufacturer.

For reference, table 4 shows the complete list of commands used to control and
retrieve information about the status of each motor connected to the Arduino
board. Since the status of each motor is determined by a variable that keeps
track of the number of steps given by the motor, it is assumed a one-to-one
correspondence between the number of steps defined by software and the number
of steps given by the axis of the motor. A step on the clock-wise direction
adds one unit to the global counter; a step on the counter-clock-wise
direction subtracts a unit. To keep the current status of each motor over
time, the value of each global counter is stored in the non volatile section
of the Arduino (EEPROM memory) so that all the information is available even
though the Arduino board is powered off.

Command | Description
---|---
STPM:N:ABS:X | move STePper Motor N to ABSolute position X (in steps)
STPM:N:REL:X | move STePper Motor N, RELative to current position
STPM:N:RST | ReSeT STePper Motor N counter to 0
STPM:N:VEL:X | set STePper Motor N, VELocity to X, where X [1 fast | 10 slow]
STPM:N:ST? | retrieve motor N current STatus (position, velocity, state)
| velocity -> [1 fast | 10 slow]
| state -> [0 stop | 1 moving]
STOP | emergency stop. Press reset button to restart
Table 4: List of commands and queries to control and retrieve information from
the stepper motors.

Since the control method is based on a command table, there are many
alternatives to implement the software interface that controls the system.
Depending on the application, the user may require to perform simple actions
driven by simple commands, or a more elaborate sequence of tasks dependent on
external signals or defined by an algorithm with temporal dependence. The
former can be implemented by sending commands through the serial port using a
serial communication terminal compatible with the RS232 standard such as
Termite [reference] and the latter can be implemented using MATLAB, Python or
other software.

In our implementation a MATLAB routine communicates with the Arduino board,
moves the stepper motors and reads the power detected by a Thorlabs PM100-A
detector. The beam auto-alignment procedure is carried out by scanning the X-Y
plane in two steps: firstly, the horizontal direction (X) is scanned a certain
number of steps while the optical power is measured. Afterwards, the vertical
direction (Y) is scanned. In each step the power and motor position are
recorded and stored on a .dat file. When the loop finishes, the algorithm
returns the motors to the position at which maximum power was detected. The
power is first maximized for the X direction and later one for the Y
direction.

The number of steps used in each scan is selected initially by the user.
Larger ranges lead to a wider scanning of the X-Y plane. This setting is
advisable for a first approximation while smaller rotational ranges guarantee
the convergence and optimization of the auto-alignment method implemented in
MATLAB.

## 5\. Conclusions

In this article we demonstrate a system that can be used to motorize most of
the kinematic mounts available on the market. Notwithstanding being
implemented using 3D printed components, and Arduino board and simple
electronics, the system has proven to be effective, simple, flexible, and low-
cost. After performing two different experiments where a laser beam is aligned
through two reference points, we can conclude that the system is suitable for
applications where optical realignment using flat mirrors mounted on kinematic
mounts is required on a periodic basis. Even though the system is initially
intended to motorize kinematic mounts, its hardware and software can be easily
extended to control other opto-mechanical components such as translation
stages.

## 6\. Author Contributions

“L.J.S.S. and G.J. conceived and designed the experiments; L.J.S.S implemented
the motorized kinematic mount system; G.J. performed the experiments;
L.J.S.S., G.J. and J.P.T. analyzed the data; L.J.S.S., G.J, J.P.T. wrote the
paper.

## References

  * [1] Anzalone, G.C.; Glover, A.G.; Pearce, J.M. Open-Source Colorimeter. Sensors 2013 13, 5338-5346.
  * [2] Wijnen, B.; Hunt, E.J.; Anzalone, G.; Pearce, J.M. Open-source Syringe Pump Library, PLoS ONE 2014 9, e107216.
  * [3] Hossain, M.A.; Canning J.; Cook, K.; Jamalipour, A. Smartphone laser beam spatial profiler. Opt. Lett. 2015 40, 5156-5159.
  * [4] F.Lab’s DIYbio Centrifuge. Available: http://www.thingiverse.com/thing:1175393 (Accessed on 25 Oct 2016).
  * [5] Zhang C.; Anzalone, N.C.; Faria R.P.; Pearce, J.M. Open-Source 3D-Printable Optics Equipment, PLoS ONE 2013 8, e59840.
  * [6] Open-source lens holder. Available: http://www.thingiverse.com/thing:26752 (Accessed on 24 Oct 2016).
  * [7] Square Filter Holder for Open-source Optics. Available: http://www.thingiverse.com/thing:31483 (Accessed on 24 Oct 2016).
  * [8] Screen holder for OpenBeam Optical Rail. Available: http://www.thingiverse.com/thing:31403 (Accessed on 24 Oct 2016).
  * [9] Open-source Lab jack. Available: http://www.thingiverse.com/thing:28298 (Accessed 24 Oct 2016).
  * [10] Open-source fiber optic holder. Available: http://www.thingiverse.com/thing:28187 (Accessed 24 Oct 2016).
  * [11] Kinematic mirror/lens mount. Available: http://www.thingiverse.com/thing:30727 (Accessed 24 Oct 2016).
  * [12] Salazar-Serrano, L.J; Torres, J.P; Valencia, A. A 3D Printed Toolbox for Opto-Mechanical Components, PLoS ONE 2017 12, e0169832.
  * [13] Parametric open-source chopper wheel. Available: http://www.thingiverse.com/thing:28121 (Accessed 24 Oct 2016).
  * [14] FreeCAD. Available: http://https://www.freecadweb.org (Accessed 02 Feb 2017).
  * [15] Motorized Kinematic Mount. Available: http://https://www.thingiverse.com/thing:2809159 (Accessed 01 Mar 2018).
  * [16] Motorized Kinematic Mount (MKM). Available: http://https://github.com/totesalaz/MKM (Accessed 01 Mar 2018).