# Machine Learning for Vortex Induced Vibration in Turbulent Flow

Xiaodong Bai 1
Ministry-of-Education Key Laboratory
of Coastal Disaster and Defence,
Hohai University, Nanjing 210098, China
<EMAIL_ADDRESS>
&Wei Zhang 2,∗
Science and Technology on Water-Jet Propulsion Laboratory
Marine design and research institute of China
Shanghai 200011, China
Corresponding Author<EMAIL_ADDRESS>

###### Abstract

Vortex induced vibration (VIV) occurs when vortex shedding frequency falls
close to the natural frequency of a structure. Investigation on VIV is of
great value in disaster mitigation, energy extraction and other applications.
Following recent development in machine learning on VIV in laminar flow, this
study extends it to the turbulent region by employing the state-of-the-art
parameterised Navier-Stokes equations based physics informed neural network
(PNS-PINN). Turbulent flow with Reynolds number $Re$ = $10^{4}$, passing
through a cylinder undergoing VIV motion, was considered as an example. Within
the PNS-PINN, an artificial viscosity $\nu_{t}$ is introduced in the Navier-
Stokes equations and treated as a hidden output variable. A recently developed
Navier-Stokes equations based PINN, termed NSFnets (Jin et al., J COMPUT PHYS
426: 109951, 2021), was also considered for comparison. Training datasets of
scattered velocity and dye trace concentration snapshots, from computational
fluid dynamics (CFD) simulations, were prepared for both the PNS-PINN and
NSFnets. Results show that, compared with the NSFnets, the PNS-PINN is more
effective in inferring and reconstructing turbulent flow under VIV
circumstances. The PNS-PINN also shows the capability to deal with unsteady
and multi-scale flows in VIV. Inspired by the Reynolds-Averaged Navier-Stokes
(RANS) formulation, by implanting an additional artificial viscosity, the PNS-
PINN is free of complex turbulence model closure, thus may be applied for more
general and complex turbulent flows.

_K_ eywords Machine learning $\cdot$ Vortex induced vibration (VIV) $\cdot$
Turbulent flow $\cdot$ Physics informed neural network (PINN) $\cdot$
Reynolds-Averaged Navier-Stokes (RANS)

##  1 Introduction

Flow induced vibration is widespread in nature, industry and everyday human
life. VIV, as a branch of the flow induced vibration, occurs when the natural
vibration frequency of a structure is close to the vortex shedding frequency.
According to the conditions of the reduced velocity, the structural dynamic
characteristics, the Reynolds number and other factors, VIV may cause large
amplitude vibration of structures [1, 2]. Research on VIV has great
significance for disaster mitigation in ocean and civil engineering practices
[3, 4, 5], and even the sustainable energy extraction [6, 7]. CFD, as an
efficient way to study VIV, is mostly limited to flows with low Reynolds
number [8, 9, 10, 11], due to the high computational cost introduced by mesh
refinement and update of the fluid-structure interaction (FSI), and more
importantly the stiffness issue induced by high Reynolds number $Re$. For VIV
in turbulent flow with high $Re$, experimental measurement exists an important
approach for investigation. With experiment, motions of the structure can be
measured precisely. Meanwhile, scattered velocity or dye trace distribution
around the VIV structure in a small region can be obtained experimentally, for
example, via the particle image velocimetry [12] or the Schlieren image
velocimetry measurements [13, 14]. Yet it is also acknowledged that the
pressure distribution is difficult to acquire [15, 16]. Thus, how to
accurately reconstruct the pressure field and thereafter predict the forces
according to limited available data in finite time-space coverage is of
interest and importance.

With the proliferation of large-scale computing capability witnessed in recent
years, the machine learning technique provides a powerful alternative to
explore complex fluid mechanics. Modeling of turbulent flow based on data-
driven machine learning, for example by developing or improving turbulence
closure models, has gained considerable progress. Ling et al. [17] devised a
deep neural network incorporating the Galilean invariance, which provides
better representation for the Reynolds stress compared with that from baseline
RANS models. Xiao et al. [18] developed a data-driven and physics-informed
Bayesian framework for quantifying and reducing uncertainties in RANS
simulations, and show that the proposed framework delivered better quantities
even with sparse observations. To improve the accuracy of RANS models, Wang et
al. [19] established a machine learning based on the random forest method, to
train the discrepancy function with data from direct numerical simulation
(DNS). Weatheritt and Sandberg [20] developed a multi-dimensional gene
expression programming (MGEP) algorithm and introduced an additional algebra
term to reduce discrepancy and to calibrate close coefficients of quadratic
eddy-viscosity models. Based on MGEP and DNS data, Zhang et al. [21]
considered a constraint-free model for Reynolds stress within a rotating frame
of reference, and studied the anisotropic behavior of Reynolds stress. Zhu et
al. [22] employed a one-layer radial basis function neural network to predict
flows around airfoils, and demonstrated higher efficiency of the network
compared to the original Spallart-Allmaras model. Machine learning was also
employed early in works of Sarghini et al. [23] and Barone et al. [24] to
determine the large-eddy simulations (LES) closures and to reduce
computational cost. Schoepplein et al. [25] extended the MGEP in RANS to model
subgrid stresses, and demonstrated that evolutionary algorithms can
successfully be incorporated in the framework of LES. Zhou et al. [26]
established an artificial neural network to investigate the relation between
the resolved flow field and the subgrid-scale stress tensor, and found that
the correlation of the new subgrid-scale stress tensor and the DNS data was
mostly over 0.9 and the energy transfer rate can be well predicted at various
Reynolds numbers.

The above mentioned investigations are mostly application-oriented, and
focused on specific turbulence models. Machine learning can be more
intelligent if the neural network is well informed by proper algorithms.
Recently, Raissi et al. [27] introduced physics informed neural network
(PINN), which was designed to embed underlying physics laws that govern the
known and unknown data, thus solutions of the forward or inverse problems can
be inferred with higher fidelity. The PINN was later extended by the authors
to explore more complex fluid problems, such as hemodynamics [28]. With that,
Jin et al. [29] proposed the NSFnets, which incorporate the Navier-Stokes
equations based on the PINN, to simulate laminar and turbulent channel flows
with DNS. Bai et al. [30] applied the PINN with various attempts on flow data
assimilation, concerning flow inference, reconstruction, identification for
both laminar and turbulent flow scenarios. Therein, both the discrete
Boltzmann equation and the Navier-Stokes equations were employed as physics
constraints. To explore missing fluid dynamics with high Reynolds numbers, a
parameterised Navier-Stokes equations based PINN (PNS-PINN) was proposed
recently by Xu et al. [31]. Inspired by the RANS equation, an artificial
viscosity $\nu_{t}$ was introduced and trained as a hidden variable in the
system. The parameterised system is free of extra turbulence modeling or
additional closure calibrations for data assimilation.

Machine learning has also been used for VIV studies with low Reynolds number
laminar flow, to infer flow field and predict the forces acting on structure.
In Raissi et al.’s recent work [32], VIV of a freely vibrating cylinder in
laminar flow with $Re$ = 100 was studied via the deep neural network. Therein,
the incompressible Navier–Stokes equations considering the dynamic motion of
the VIV cylinder were integrated in the loss function. Scattered velocity data
of flow close to the cylinder were considered as the training dataset. Their
results show that the PINN can be employed to predict the drag and lift forces
with promising precision. To the best of our knowledge, the possibility of
exploring VIV in turbulent flow via machine learning has not been demonstrated
yet, probably due to high Reynolds number stiffness.

Inspired by the works mentioned above, especially the PINN configuration [32]
and the parameterised governing systems [31], this paper investigates the VIV
in turbulent flow via the PNS-PINN. In Section 2, the parameterised Navier-
Stokes equations are introduced, followed by details of the VIV system, the
configuration and dataset preparation of the PNS-PINN, as well as a normal
Navier-Stokes equation based PINN (NSFnets). Flow inference, pressure field
reconstruction and force prediction of the VIV using the PINNs with various
datasets are reported in Section 3. The performances of the PINNs based on two
datasets (velocity and dye trace) are also analyzed and evaluated. Concluding
remarks are made in Section 4.

##  2 Methods

###  2.1 Parameterised Navier-Stokes equations

Incompressible flows are governed by the Navier-Stokes equations as follows,

$\displaystyle\frac{\partial\bf{u}}{\partial
t}-\nu\nabla^{2}\bf{u}+\bf{u}\cdot\nabla\bf{u}+\nabla p=\bf{f}$ (1)
$\displaystyle\nabla\cdot\bf u=\text{0}$

where, $\bf{u}$ = $[u,v,w]^{\text{T}}$, $p$ and $\nu$ are the flow velocity,
pressure and kinematic viscosity respectively; $\bf{f}$ is the force acting on
a finite volume.

Ideally, incompressible flows that are governed by Eq. (1) can be resolved
numerically with properly defined initial and boundary conditions. However,
when $\nu$ is of very small value, as the case for most turbulent flows,
direct solution for the above partial differential equations becomes extremely
difficult due to not only large computational cost, but more importantly, the
illness or stiffness of the algebraic matrices involved. For industrial
practices, despite of well-known limitations, RANS models with various
formulas still serve with great reputation when dealing with complex turbulent
flow scenarios [33]. To eliminate the temporal dependency, the RANS employs an
ensemble-averaging process, which leads to unclosed Reynolds stress. The key
point of the enclosure and modeling of the Reynolds stress is to treat it as a
function of the gradient of average flow velocities. Inspired by that, an
artificial viscosity is introduced in the governing equations for PINN [31],
and the parameterised system reads as following,

$\displaystyle\frac{\partial\bf{\overline{u}}}{\partial
t}-(\nu+\nu_{t})\nabla^{2}\bf{\overline{u}}+\bf{\overline{u}}\cdot\nabla\bf{\overline{u}}+\nabla\overline{p}=\bf{\overline{f}}$
(2) $\displaystyle\nabla\cdot\bf\overline{u}=\text{0},$

In the above equation, the overline label $\overline{(\cdot)}$ denotes an
operator that can be either of ensemble average processing in RANS or
filtering processing in LES (large eddy simulation), so that the PNS-PINN can
be used to treat multi-scale flow data of turbulent flow.; $\nu_{t}$ is the
introduced artificial viscosity and plays as the key parameter.

###  2.2 Details of the VIV

The VIV motion of a circular cylinder and the surrounding turbulent flow are
considered in this study. The structure motion is modeled as an elastically
supported mass-spring-damper system, with only the cross-flow motion allowed.
The governing equation of the cylinder motion $\eta$ is thus given by Eq. (3),
same as that used in Ref. [32]:

$m\frac{\text{d}^{2}\eta}{\text{d}t^{2}}+b\frac{\text{d}\eta}{\text{d}t}+k\eta=F_{L}(t)$
(3)

Parameters $m$, $b$ and $k$ are the mass, damping and stiffness of the
elastically supported system respectively. $F_{L}$ is the lift force as a
result of the FSI.

CFD simulations of the VIV were carried out, and the numerical results were
used as the training datasets. It should be noted that dataset from
experimental measurement can also be used for the training. Two-dimensional
fluid motions were simulated via the solver, pimpleDyMFoam, implemented in
OpenFOAM®, which is an open source framework of finite volume method. Two
turbulence models, including the SST (shear stress transport) $k-\omega$ model
and the SST-SAS (scale adaptive simulation) mixed model were employed. The
former model is robust for external aerodynamics, while the latter one is an
improved version at dealing with multi-scale wake flows, as discussed in Refs.
[34] and [35].

The computational domain is a circular area with a diameter of 70$D$. $D$ is
the diameter of the cylinder, whose centroid point is located at $O$ (0, 0).
The inlet flow is applied on the left half part of the computational boundary
with a Dirichlet boundary condition $\bm{u}=$ ($U_{\infty},0)$, while the
right half is defined as an outlet boundary with zero-gradient pressure. The
cylinder boundary is non-slip. The Reynolds number, $Re$ = $U_{\infty}D/\nu$,
is $10^{4}$. The cylinder wall is prescribed with a constant concentration
value $c_{0}$ = 10, which will be transported downstream due to both the
advection and diffusion. The governing Péclet number $Pe$ =
$U_{\infty}D/\nu_{\text{diff}}$ = 90 is adopted, where $\nu_{\text{diff}}$ is
the diffusivity of the concentration. The parameters for the cylinder are $m$
= 2, $b$ = 0.084 and $k$ = 2.202, same as those used in Ref. [32], and the
natural frequency of the cylinder vibration is $f_{0}$ = 0.167 Hz. The reduced
velocity can be determined as $U_{r}$ = $U_{\infty}/Df_{0}=6.0$, with $D$ and
$U_{\infty}$ the characteristic length and velocity respectively. A dynamic
mesh scheme is adopted to update the computational mesh as the cylinder
boundary moves due to the VIV.

Figure 1: Configurations of the PNS-PINN and the NSFnets.

###  2.3 PINNs and the training dataset

The purpose of this study is to infer the turbulent flow and the forces acting
on the moving structure, based on scattered {${t^{n},\eta^{n}}$}, and
scattered flow information such as velocity {$t^{n},x^{n},y^{n},u^{n},v^{n}$}
or dye trace {$t^{n},x^{n},y^{n},c^{n}$} in the near vicinity of the VIV
cylinder. Here, $t$ is the time; $x$ and $y$ are the spatial coordinates; $u$
and $v$ are the velocity components; $n=1:N$, where $N$ is total number of
data points used for training. The PINN setup, is shown in Fig. 1. For VIV
applications, we incorporated the cylinder motion into the momentum equation
shown in Eq. (2). Depending on whether the artificial viscosity $\nu_{t}$ is
involved or not, the PINN can be PNS-PINN (with red labels in Fig. 1) or
NSFnets. In PNS-PINN,the artificial viscosity $\nu_{t}$ is treated as an
output variable. For the cases based on dye trace, the concentration of the
dye trace {$t^{n},x^{n},y^{n},c^{n}$} and the cylinder motion
{${t^{n},\eta^{n}}$} are used as training dataset; while for cases based on
velocity, the dataset contains the velocity {$t^{n},x^{n},y^{n},u^{n},v^{n}$}
and also the cylinder motion. The PINN variant for the latter can be reduced
by eliminating the corresponding parts involving the concentration $c$ in Fig.
1 .

Particularly, 12 hidden layers, with 32 neuros for each layer are considered.
The activation function $\sigma$ is of sinusoidal type, while the temporal and
spatial differential operations $\partial/\partial t$, $\partial/\partial x$,
$\partial^{2}/\partial x^{2}$ are processed with automatic differentiation
formulated in TensorFlow [36]. Firstly, the loss function induced by physics
governing equations of the above PINNs consists of four parts. Therein,
$e_{1}$, $e_{2}$ and $e_{3}$ are contributed by the streamwise velocity
component $u$, the cross-flow velocity component $v$, and the mass
conservation respectively. $e_{c}$ is for the transport of the concentration
scalar if dye trace dataset is used for training. To be more specific, they
read as following,

$\displaystyle e_{1}$ $\displaystyle=\frac{\partial u}{\partial
t}+u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial
y}+\frac{\partial p}{\partial
x}-(\nu+{\color[rgb]{1,0,0}\nu_{t}})(\frac{\partial^{2}u}{\partial
x^{2}}+\frac{\partial^{2}u}{\partial y^{2}}),$ (4) $\displaystyle e_{2}$
$\displaystyle=\frac{\partial v}{\partial t}+u\frac{\partial v}{\partial
x}+v\frac{\partial v}{\partial y}+\frac{\partial p}{\partial
y}-(\nu+{\color[rgb]{1,0,0}\nu_{t}})(\frac{\partial^{2}v}{\partial
x^{2}}+\frac{\partial^{2}v}{\partial y^{2}})+\frac{\partial^{2}\eta}{\partial
t^{2}},$ $\displaystyle e_{3}$ $\displaystyle=\frac{\partial u}{\partial
x}+\frac{\partial v}{\partial y},$ $\displaystyle e_{c}$
$\displaystyle=\frac{\partial c}{\partial t}+u\frac{\partial c}{\partial
x}+v\frac{\partial c}{\partial y}-\frac{1}{Pe}(\frac{\partial^{2}c}{\partial
x^{2}}+\frac{\partial^{2}c}{\partial y^{2}}).$

For the simplicity of presentation, the overline symbol for the operator in
Eq.2 is omitted. It should be noted that the cylinder motion $\eta$ has been
incorporated in $e_{2}$, so that the fluid motion coordinate system is
attached to the cylinder.

Then, the overall loss function is the summation of the loss of target
training variables $[u,v,c,p,\eta]^{\text{T}}$, and the loss from the
governing equations $e_{i}$ ($i=1,2,3$) and $e_{c}$. The loss function can be
formulated depending on whether the velocity dataset or the dye trace dataset
is provided for the machine learning, which reads as,

$L=\begin{cases}\begin{aligned}
L_{u}+L_{v}+L_{\eta}=&\sum\limits_{n=1}^{N}\left|u(t^{n},x^{n},y^{n})-u^{n}\right|^{2}+\sum\limits_{n=1}^{N}\left|v(t^{n},x^{n},y^{n})-v^{n}\right|^{2}\\\
&+\sum\limits_{n=1}^{N}\left|\eta(t^{n})-\eta^{n}\right|^{2}+\sum\limits_{i=1}^{3}\sum\limits_{n=1}^{N}\left|e_{i}\right|^{2},&\text{using
velocity dataset},\\\
L_{c}+L_{\eta}=&\sum\limits_{n=1}^{N}\left|c(t^{n},x^{n},y^{n})-c^{n}\right|^{2}+\sum\limits_{n=1}^{N}\left|\eta(t^{n})-\eta^{n}\right|^{2}\\\
&+\sum\limits_{i=1}^{3}\sum\limits_{n=1}^{N}\left|e_{i}\right|^{2}+\sum\limits_{n=1}^{N}\left|e_{c}\right|^{2},&\text{using
dye trace dataset},\end{aligned}\end{cases}$ (5)

where, $u(t^{n},x^{n},y^{n})$, $v(t^{n},x^{n},y^{n})$, $c(t^{n},x^{n},y^{n})$,
$\eta(t^{n})$ are the neural network training results at scattered time and
spatial points. The training results for $[u,v,c,p,\eta]^{\text{T}}$ is
determined when the loss function $L$ gets converged and minimized.

In this study, an adaptive optimization algorithm, Adam optimizer [37], is
used to back-propagate the loss function. Due to the multi-target variables to
be trained, the convergence of the loss function needs additional treatment. A
modified fully-connected learning rate annealing algorithm developed by Wang
et al. [38] is employed to overcome the stiffness for high Reynolds number
flow. In this algorithm, two transformer networks are designed to project the
inputs to a high-dimensional feature space, also a point-wise multiplication
is chosen to update the hidden layers. More details can be found in Ref. [38].
It is noted that the pressure distribution will be determined as a hidden
variable through the physics constraint shown in Eq. (4) and loss function Eq.
(5) by the neural network.

Figure 2: Temporal and spatial training data. (a) Data points at selected time
instants; (b) Spatial distribution of the data points at $t$ = $\Delta t$/2.

Snapshots of velocity field or the concentration distribution close to the
cylinder, together with the cylinder motion are extracted from the CFD
simulation results after the VIV motion of the cylinder becomes statistically
stable. These snapshots are later used as the training datasets. Ultimately,
the time interval of the dataset for the PINN training is determined to be
$\Delta t=14D/U_{\infty}$, and the time step of the training snapshots is
$dt=D/50U_{\infty}$. Thus there are $N_{s}$ = 701 temporal snapshots. In the
spatial domain, 4$\times 10^{4}$ data points are selected within a rectangular
zone with $x\sim$ [-2, 8] and $y\sim$ [-3, 3] around the moving cylinder.
Those scattered points have a locally dense distribution near the cylinder
wall and get sparser in relatively far field. Fig. 2 illustrates the point
distribution at selected time instants and a more straightforward view at time
$t$ = $\Delta t$/2 in the $x-y$ plane.

A brief summary on the PINN setup and the dataset preparation can be found in
Table. 1. The training datasets and the output variables for different PINNs
are listed for clarity. Depending on whether the velocity or dye trace data is
used for training, the performance of the PINNs dealing with VIV in turbulent
flow will be investigated and evaluated in next section.

Table 1: Cases setup of the machine learning studies Dataset | PNS-PINN | NSFnets | dataset source
---|---|---|---
training dataset | output | training dataset | output
velocity | $[u,v,\eta]^{T}$ | $[u,v,p,\nu_{t}]^{T}$ | $[u,v,\eta]^{T}$ | $[u,v,p]^{T}$ |  CFD simulations with SST $k-\omega$ or SST-SAS model
dye trace | $[c,\eta]^{T}$ | $[u,v,p,c,\nu_{t}]^{T}$ | $[c,\eta]^{T}$ | $[u,v,p,c]^{T}$

##  3 Results and Discussion

###  3.1 Machine learning using velocity dataset

In this section, we analyze the machine learning results based on the
scattered velocity snapshots provided by CFD simulations. We first focus on
the convergence performance of the loss function, whose time histories are
given in Fig. 3. For the training using the dataset with SST $k-\omega$ model,
when the learning rate for first 3$\times 10^{4}$ iterations is $1.0\times
10^{-3}$, the loss function witnesses high loss level and also large
fluctuation. As the learning rate is reduced to $1.0\times 10^{-4}$ and even
lower values, the loss function declines quickly and eventually converges when
the iteration number is over $10^{5}$. The converged loss levels for the PNS-
PINN and the NSFnets using the dataset with SST $k-\omega$ model are 0.21% and
0.62% respectively, with the latter higher than the former and indicating
probable better inferred results of the quantities involved in the loss
function. Comparable but slightly higher loss levels for the trainings using
the dataset with SST-SAS model are 0.38% and 0.78%, which may be explained by
the fact that flow simulated by the SST-SAS model are more complicated in
aspect of unsteadiness.

Figure 3: Time histories of the loss functions of (a) the PNS-PINN and (b) the
NSFnets trainings using velocity dataset. Figure 4: Flow fields inferred via
the PINN and the velocity dataset with SST $k-\omega$ model: (a) reference
data by CFD simulation; (b-c) inferred results via the PNS-PINN and the error
distribution; (d-e) inferred results via the NSFnets and the error
distribution.

Based on the dataset with SST $k-\omega$ model, a series of flow data
snapshots will be generated as a result of the PINN training with a total
number equal to that of the dataset, i.e., $N_{s}$ = 701. Fig. 4 illustrates
the inferred flow passing through the VIV cylinder at a representative time
instant $t$ = $\Delta t$/2, i.e., exactly the middle time instant of the
dataset coverage. The flow information by CFD simulation, shown in the first
column, is labeled as the reference to evaluate the PINN training.

In Fig. 4(b), from top to bottom, the inferred velocity ($u,v$) and pressure
$p$ distributions via the PNS-PINN are presented respectively. It is found
that the PNS-PINN training can reproduce the flow distributions accurately
compared with the reference ones in Fig. 4(a). Specially, the pressure field
is reconstructed with satisfying approximation both in close vicinity of the
cylinder and in relatively far field. Similarly, the inferred flow via the
NSFnets is shown in Fig. 4(d) for comparison. It shows that the NSFnets
provides close results. The differences between the reference flow data and
the inferred ones are shown in Fig. 4(c) and (e). For the PNS-PINN, the error
distributions for velocity components are in similar pattern with those of the
NSFnets, except the magnitudes of the latter are augmented at the head parts
of the shedding vortices and also the wall-bounded areas of the cylinder.
Meanwhile, for the pressure field, the error via the PNS-PINN is obvious in
the regions with vortex head and near cylinder wall. For the NSFnets, the
error of the pressure is at a higher level in the entire domain, especially in
the vicinity of the cylinder wall. As a result, it indicates that, the
pressure data can be inferred with preferable accordance via PNS-PINN,
considering that the error is reduced compared with NSFnets. The successful
reconstruction of the pressure field based on limited and scattered data is
quite promising, considering the difficulty to acquire its distribution either
in measurement (e.g., PIV) or in nature.

To quantitatively evaluate the flow inference by the PINN training, a normal
error coefficient $E_{L2}$ is defined as,

$\displaystyle
E_{L2,X}=\left[\sum\limits_{n=1}^{N}\frac{\left|X(t^{n},x^{n},y^{n})-X^{n}\right|^{2}}{\left|X^{n}\right|^{2}}\right]^{1/2},$
(6)

where, $X$ is a certain quantity of interest for analysis, i.e., $u$, $v$ or
$p$; $X(t^{n},x^{n},y^{n})$ denotes the inferred data at scattered time and
space ($t^{n},x^{n},y^{n}$); $X^{n}$ is the corresponding snapshot data of the
training dataset.

Fig. 5 illustrates the relative errors for PINN trained velocity components
and pressure at convergence. It can be seen that the PNS-PINN is capable of
inferring the flow with a relative error level of 2$\sim$5% overally. The
errors via the PNS-PINN are smaller and approximately in half of those
obtained via the NSFnets.

Figure 5: Relative error at convergence of the PNS-PINN and the NSFnets using
velocity dataset with SST $k-\omega$ model: (a) velocity $u$; (b) velocity
$v$; (c) pressure $p$. Figure 6: Inferred drag and lift coefficients via the
PNS-PINN and the NSFnets using the velocity dataset with SST $k-\omega$ model.

Based on the inferred flow fields, the lift and drag force coefficients of the
vibrating cylinder can be determined through integration of pressure and
velocity gradient distributions over the cylinder wall, with the following
expressions,

$\displaystyle F_{L}=\oint_{\bm{\Gamma}}[\frac{1}{Re}(\frac{\partial
u}{\partial y}+\frac{\partial v}{\partial x})n_{x}+\frac{2}{Re}\frac{\partial
v}{\partial y}n_{y}-pn_{y}]\text{d}s,$ (7) $\displaystyle
F_{D}=\oint_{\bm{\Gamma}}[\frac{2}{Re}\frac{\partial u}{\partial
x}n_{x}+\frac{1}{Re}(\frac{\partial u}{\partial y}+\frac{\partial v}{\partial
x})n_{y}-pn_{x}]\text{d}s,$

where, $\bm{\Gamma}$ is the boundary of the cylinder wall; $n_{x}$ and $n_{y}$
are the $x$\- and $y$-components of the unit normal vectors of the wall
surface. The non-dimensional lift and drag coefficients are thus calculated
with $\displaystyle C_{L,D}=F_{L,D}/(0.5\rho U_{\infty}^{2}D)$, and $\rho$ is
of unit value.

The predicted drag and lift coefficients obtained from the inferred flow field
are shown in Fig. 6. It shows that the peaks and troughs of the lift force
coefficients are exaggerated via the NSFnets, while the PNS-PINN attains
better agreement with the reference CFD result. Also, the drag force is much
better inferred via the PNS-PINN. The large deviation of the predicted forces
via NSFnets can be well interpreted if we refer to the unfavourable flow
inference shown in Fig. 4, especially the distorted pressure field in the near
vicinity of the cylinder wall, as presented in above content. The deviation of
the mean drag force from the reference data reflects an unacceptable
background pressure field. The parameterised Navier-Stokes method, on the
contrast, can well resolve the turbulent flow distribution, especially the
pressure field, so that the force coefficients acting on the VIV cylinder can
be much better predicted.

Next, we move on to the machine learning of VIV in turbulent flow using the
dataset with SST-SAS mode. Comparing with the SST $k-\omega$ model, the SST-
SAS model performs better when dealing with flows with multiple scales,
compared with the SST $k-\omega$ model. So, it is of further interesting to
verify the effectiveness of reconstructing more complex flow characteristics
via the PNS-PINN we applied in this work. The reference flow data provided by
the CFD simulation at time instant $t$ = $\Delta t$/2 are shown in Fig. 7(a).
Together, Fig. 7(b-c) and 7(d-e) show corresponding inferred flow
distributions at $t$ = $\Delta t$/2. Via the PNS-PINN, visualization based on
the inferred velocity fields are quite satisfying, except that there shows
comparatively obvious error at the head parts of the shedding vortices. As for
the pressure distribution, larger error is visible not only at the head parts
of the shedding vortices but also in the downstream region, especially at
lower-right zone around $x\sim$ [4, 8]. One may also notice the errors of the
inferred results for the dataset with SST-SAS model are overally larger than
those those shown in Fig. 4 using the dataset with SST $k-\omega$.

Figure 7: Flow fields inferred via the PINN and the velocity dataset with SST-
SAS model: (a) reference data by CFD simulation; (b-c) inferred results via
the PNS-PINN and the error distribution; (d-e) inferred results via the
NSFnets and the error distribution.

Additionally, the inferred flow distributions via the NSFnets show a larger
discrepancy with the reference ones than the PNS-PINN, as is also found for
the SST $k-\omega$ dataset. The errors of the velocity components, $u$ and
$v$, are not only augmented at the vortex head parts but more importantly with
much lower accuracy around the cylinder. As for the pressure distribution, the
flow is poorly reconstructed especially in the near vicinity of the moving
cylinder.

A more straightforward comparison of effectiveness between the two PINNs in
this study for trainings using dataset with SST-SAS model can be found in Fig.
8, where the the relative errors at convergence are illustrated. The errors
for velocity distributions are around the order of 5-10$\times 10^{-2}$, and
15$\times 10^{-2}$ for the pressure field when the PNS-PINN are adopted. The
error levels are much higher than PINN training results using dataset with SST
$k-\omega$ model, as illustrated in Fig. 5. On the other hand, the NSFnets
provides flow results with larger convergence errors.

Figure 8: Relative error at convergence of the PNS-PINN and the NSFnets using
velocity dataset with SST-SAS model: (a) velocity $u$; (b) velocity $v$; (c)
pressure $p$. Figure 9: Inferred drag and lift coefficients via the PNS-PINN
and the NSFnets using velocity dataset with SST-SAS model.

The inferred force coefficients on the VIV cylinder were obtained and shown in
Fig. 9. The multi-scale motion of the flow obtained by the SST-SAS model CFD
simulation induced multi-component variation of the drag and lift in time
dimension, which is not obvious when we look into those by the SST $k-\omega$
simulation dataset in Fig. 6. Again, the peaks and troughs of the lift force
curve are exaggerated via the NSFnets, while the PNS-PINN delivers lift force
with quite high accuracy throughout the time coverage. Via PNS-PINN, the
results present improvement over the NSFnets configuration.

###  3.2 Machine learning using dye trace dataset

In this section, scattered dye trace data and the motion of the VIV cylinder
are provided to the PINN, and the performance of the PNS-PINN and that of the
NSFnets are evaluated. Here we assume that only the dye trace data behind the
cylinder and the motion record are available. Our focus is to gain flow
physics accompanying the VIV phenomenon with high fidelity in turbulent
scenario. This is of importance, for example, for flow diagnosis either in
laboratory tests or even large-scale engineering or natural events.

Figure 10: Time histories of the loss functions of (a) the PNS-PINN and (b)
the NSFnets trainings using dye trace dataset. Figure 11: Flow fields inferred
via the PINN and dye trace dataset with SST $k-\omega$ model: (a) reference
data by CFD simulation; (b-c) inferred results via the PNS-PINN and the error
distribution; (d-e) inferred results via the NSFnets and the error
distribution.

Based on the SST and SST-SAS CFD simulation dataset, the PINN training
incorporating the dye trace concentration $c$ and its governing transport
equation are performed for both the parameterised and the normal NS
configurations. The convergence history of the loss function is shown in Fig.
10. The initial loss values are larger than those in the velocity dataset
based training shown in Fig. 3, still they converge to steady levels as the
learning rate gets smaller after $N_{I}>3\times 10^{4}$. For the SST
$k-\omega$ dataset, convergence loss values for the PNS-PINN and the NSFnets
are 0.30% and 0.74%; Similar with the velocity data based training, loss
function at convergence attain higher values using the SST-SAS dataset and are
0.47% and 1.00% respectively for the two PINNs.

Figure 12: Relative error at convergence of the PNS-PINN and the NSFnets using
dye trace dataset with SST $k-\omega$ model: (a) velocity $u$; (b) velocity
$v$; (c) pressure $p$. Figure 13: Inferred drag and lift coefficients via the
PNS-PINN and the NSFnets using dye trace dataset with SST $k-\omega$ model.

Fig. 11 illustrates the reference flow and the inferred results for both the
PNS-PINN and NSFnets configurations, using the training dataset with SST
$k-\omega$ model. Regarding the parameterised Navier-Stokes based PNS-PINN,
the dye concentration together with the velocity and pressure fields can be
well reproduced in aspect of visualization, as shown in Fig. 11(b-c). Yet,
compared with those shown in Fig. 4 using the velocity dataset, one may notice
that the errors of the velocity components are larger though with a similar
error distribution pattern. The error for the pressure field is not only
higher in magnitude, but also it has a background value that does not show up
in Fig. 4. It is speculated that the the discrepancy is mainly induced by the
locally insufficient concentration data, for example in the upstream and the
farfield regions of the cylinder. The above comparison and findings
demonstrate that, for VIV flow in turbulent regime, the flow inference
obtained via the PNS-PINN using merely the dye trace can deliver satisfying
visualisation, despite being less accurate to some extent than the training
results directly using the velocity dataset.

The inference of turbulent VIV flow via the NSFnets witnesses distortions in
the near vicinity of the cylinder wall, both for the velocity components and
the pressure, as pictured in Fig. 11(d-e), although the inferred dye
concentration is comparably as accurate as that by the PNS-PINN. The relative
errors, illustrated in Fig. 12, also shows that the pressure field inferred
via NSFnets has been much distorted, having an error level over 40%. The
relative errors for $u$ and $v$ via the NSFnets are also higher than 20%. On
the contrast, the PNS-PINN delivers approximately half of error level for each
flow field data via NSFnets.

Figure 14: Flow fields inferred via the PINN and the dye trace dataset with
SST-SAS model: (a) reference data by CFD simulation; (b-c) inferred results
via the PNS-PINN and the error distribution; (d-e) inferred results via the
NSFnets and the error distribution.

The accuracy of the inferred results analyzed above will consequently affect
the prediction of forces acting on the VIV cylinder. Fig. 13. The lift force
via the PNS-PINN configuration generally holds up to the reference result
except that the amplitude is underestimated by around 20%, which is quite
close to the loss level of the pressure field as shown in Fig. 12. For the
NSFnets, the amplitude and also the mean value of the drag force coeffcient
via the PNS-PINN are both underestimated. The lower mean drag force indicates
there exist a deviation of the mean pressure field (or most responsibly)
between the inferred and the reference flows, as can be seen in Fig. 11. The
lower mean drag result by the NSFnets can be readily understood when we refer
to the inferred pressure as well.

Figure 15: Relative error at convergence of the PNS-PINN and the NSFnets using
dye trace dataset with SST-SAS model: (a) velocity $u$; (b) velocity $v$; (c)
pressure $p$. Figure 16: Inferred drag and lift coefficients via the PNS-PINN
and the NS-PINN using dye trace dataset with SST-SAS model.

The inferred flow data based on the dye trace dataset using the SST-SAS mixed
model simulation have been also obtained. The results concerning the flow
inference, reconstruction, error evaluation and the force coefficients on the
VIV cylinder itself have been illustrated in Figs. 14 \- 16. More detailed
comments are omitted here for simplicity, as the main findings and conclusions
for the training using dataset with SST-SAS model are in close accordance with
those using dataset with SST model. Minor error level differences can be
observed between the results by the two datasets.

###  3.3 Discussion

In the above section, totally eight cases, with different PINN configurations
and dataset sources, were performed. Results for flow data inference and
forces on VIV cylinders were reported. To further evaluate the effectiveness
of the PINNs for VIV in turbulent flows, a summary of these cases and
comparison between them, are made here.

The loss convergence $L$ and relative error levels $E_{X}$ are listed in
Table. 2. The relative error function $E[.]$ is defined in Eq. (6), while
$E_{X}$ in the table are averaged results of the relative error over a time
range of $t\sim$ [2, 12].

The PNS-PINN training results are presented in bold font. Taking trainings
using dataset with the SST $k-\omega$ model for example, based on velocity,
the flow data inferred via the PNS-PINN has the best convergence performance
and the smallest relative errors, overally below 5%. The forces can also be
accurately inferred. Based on the dye trace data, the loss convergence of the
PNS-PINN training can be delivered with comparable level, despite that the
relative errors of flow distributiobs are larger than those obtained using
directly the velocity data. Specially the error in pressure reconstruction (up
to 22.32%) induces consequently considerable errors of the forces acting on
the VIV cylinder. The NSFnets training generally doubled the loss and the
error level of the inferred flow data based on velocity, while it brought 4-5
times larger error concerning the forces on cylinders undergoing VIV. This
demonstrates successful application of the parameterised Navier-Stokes
equation based PINN for VIV studies in turbulent flow. Flow inference via the
PNS-PINN based on the dye trace, though not accurate as based on velocity
data, can also provide a rough estimate of the flow and the forces in cases
where the velocity data are not available.

The training results by dataset with SST-SAS model indicate that, for
turbulent flow with more unsteady characteristics, the PNS-PINN configuration
in this study still proves to be qualified in VIV studies, though slightly
higher error levels are found compared with that using dataset with SST
$k-\omega$ model.

Table 2: A summary on loss level and relative errors of inferred quantities
via the PNS-PINN and the NSFnets trainings for VIV turbulent flow fields and
force coefficients of the cylinder. Dataset: SST $k$-$\omega$
---
Dataset | PINN type | $L$ | $E_{u}$ | $E_{v}$ | $E_{p}$ | $E_{c}$ | $E_{C_{D}}$ | $E_{C_{L}}$
velocity | PNS-PINN | 0.21% | 2.52% | 4.39% | 4.97% | – | 2.03% | 3.45%
NSFnets | 0.62% | 3.85% | 5.93% | 10.05% | – | 10.20% | 11.87%
dye trace | PNS-PINN | 0.30% | 11.81% | 15.66% | 22.32% | 1.39% | 12.55% | 24.54%
NSFnets | 0.74% | 19.50% | 23.86% | 45.40% | 1.94% | 39.30% | 72.90%
Dataset: SST-SAS
Dataset | PINN type | $L$ | $E_{u}$ | $E_{v}$ | $E_{p}$ | $E_{c}$ | $E_{C_{D}}$ | $E_{C_{L}}$
velocity | PNS-PINN | 0.38% | 3.49% | 5.98% | 7.04% | – | 3.18% | 3.70%
NSFnets | 0.78% | 4.42% | 7.01% | 9.58% | – | 9.53% | 5.54%
dye trace | PNS-PINN | 0.47% | 12.49% | 16.98% | 23.30% | 1.91% | 8.54% | 21.19%
NSFnets | 1.00% | 18.06% | 23.46% | 41.95% | 2.43% | 32.43% | 62.28%
Figure 17: Inferred $\nu_{t}$ by the PNS-PINN using dataset with SST
$k-\omega$ model: (a) reference distribution; (b) inferred distribution using
the velocity dataset; (c) inferred distribution using the dye trace dataset.

In the PNS-PINN configuration we applied in this study for turbulent flows
passing cylinder undergoing VIV, the hidden variable $\nu_{t}$ is inferred
through the machine learning using velocity or dye trace dataset, cylinder
motion and corresponding physics constraints, i.e., governing partial
differential equations. The analysis in preceding sections shows that, based
on limited and scattered velocity or dye trace and cylinder motion data, the
parameterised Navier-Stokes equation based physics informed neural network can
be used to predict the flow distribution, especially the pressure data that is
not so straightforward to obtain, as well as the forces acting on cylinder
undergoing VIV motions in turbulent flows, e.g., in experimental occasions.

Here, we will explore the artificial viscosity that we introduced in the
parameterised Navier-Stokes equation and its inferred distribution obtained by
the PINN trainings. Fig. 17 (a) presented the reference eddy viscosity
$\nu_{t}$ through the SST $k-\omega$ turbulence model CFD simulations. In Fig.
17 (b-c), the inferred values through the PNS-PINN training using the velocity
and the dye trace datasets are pictured.

One can tell that the inferred artificial viscosity $\nu_{t}$ does not match
well with the reference distribution resolved by the CFD simulation. However,
the distribution patterns are similar to some extent between the reference and
the inferred artificial viscosity results. It is noticed that the low-value
and the high-value $\nu_{t}$ regions match well with the reference one for
results using both the velocity and the dye trace datasets. Also, in the
regions where vortices take dominance, the PNS-PINN training underestimated
the viscosity using the velocity dataset, while overestimated the viscosity
using the dye trace dataset. Thus, the inference through the concentration
transport introduces more viscosity effect. On the other hand, it is of
interest when we consider the fact that conventional turbulence models seek
calibrations by tuning model constants according to specified engineering
practices. However, in the PNS-PINN applied in this study, the viscosity
$\nu_{t}$ is introduced as a hidden output variable, and the determination of
$\nu_{t}$ via PNS-PINN is free of special calibrations and model tunings. It
indicates that, by implanting additional eddy viscosity, the PNS-PINN method
can be applied in more universal and complex studies, compared with
conventional turbulence models.

##  4 Conclusions

In this study, a parameterised Navier-Stokes equation based PINN, termed PNS-
PINN, was employed to investigate the turbulent flow around a cylinder
undergoing VIV motion with Reynolds number $Re$ = $10^{4}$. A Navier-Stokes
equation based PINN, termed NSFnets, was also considered for comparison. The
training datasets were prepared by the CFD simulations with the SST and the
SST-SAS turbulence models. Input of the both the PNS-PINN and the NSFnets
includes scattered velocity and cylinder motion data, or dye trace and
cylinder motion data. Results on the training convergences, the inferred flows
and forces, were presented and discussed. Main conclusions of this study
include:

  * (1)

The PNS-PINN, which introduces an artificial viscosity parameter $\nu_{t}$ as
a hidden variable in the neural network and the physics constraint, performs
better in loss convergence, flow inference and force prediction concerning the
VIV in turbulent flow scenario. Specially, the pressure field is delivered
with satisfying accuracy without any training data source itself. The NSFnets,
on the other hand, encounters lower accuracy in velocity inference and
distortion in pressure field reconstruction. Consequently, the relative errors
of the predicted forces via the PNS-PINN are around one third of those via the
NSFnets.

  * (2)

For the PNS-PINN, based on the velocity dataset, the relative errors of
quantities of interest (i.e., velocity components $u$ and $v$, pressure $p$,
force coefficients $C_{D}$ and $C_{L}$), are all below 5% for turbulent VIV
flow. The relative errors based on dye trace dataset are generally 10%-17% for
the velocity components, 22%-24% for the pressure field, and 10%-25% for the
force coefficients.

  * (3)

The PNS-PINN can deal with flow inference for dataset with both the SST and
the SST-SAS models, though slight larger error levels are found for the
latter. This implies promising effectiveness of the PNS-PINN to deal with
turbulent VIV flows.

  * (4)

Unlike conventional turbulence modeling in CFD simulations, by implanting
additional eddy viscosity, the PNS-PINN employed in this study is free of
extra calibaration and tunings. In future, more applications of the PNS-PINN
for flow data assimilationc are expected, such as in circumanstances of
experimental measurement and flow diagnosis, etc.

##  5 Acknowledgements

The authors owe great appreciation to Dr. Yong Wang in Max Planck Institute
for Dynamics and Self-Organization, for his constructive advice and all the
effort in manuscript preparation. This work was financially supported by the
National Natural Science Foundation of China (Grant Nos. 51809084, 91851127),
the National Science Fund for Distinguished Young Scholars of China (Grant No.
51425901), the Fundamental Research Funds for the Central Universities of
China (Grant No. B200202049).

## References

  * [1] R. D. Blevins.  Flow-induced vibration.  Krieger Pub Co, New York, second edition, 1990.
  * [2] C. H. K Williamson and R. Govardhan.  Vortex-induced vibrations.  Annual Review of Fluid Mechanics, 36(1):413–455, 2004.
  * [3] S. Laima, H. Li, W. Chen, and F. Li.  Investigation and control of vortex-induced vibration of twin box girders.  Journal of Fluids and Structures, 39:205–221, 2013.
  * [4] G. Liu, H. Li, Z. Qiu, D. Leng, Z. Li, and W. Li.  A mini review of recent progress on vortex-induced vibrations of marine risers.  Ocean Engineering, 195:106704, 2020.
  * [5] H. Wang, Q. Zhai, and J. Zhang.  Numerical study of flow-induced vibration of a flexible plate behind a circular cylinder.  Ocean Engineering, 163:419–430, 2018.
  * [6] M. M. Bernitsas, K. Raghavan, Y. Ben-Simon, and E. M. H. Garcia.  VIVACE (Vortex Induced Vibration Aquatic Clean Energy): A new concept in generation of clean and renewable energy from fluid flow.  Journal of Offshore Mechanics and Arctic Engineering, 130(4):1–15, 2008.
  * [7] J. Wang, L. Tang, L. Zhao, G. Hu, R. Song, and K. Xu.  Equivalent circuit representation of a vortex-induced vibration-based energy harvester using a semi-empirical lumped parameter approach.  International Journal of Energy Research, 44(6):4516–4528, 2020\.
  * [8] C. Evangelinos and G. Em Karniadakis.  Dynamics and flow structures in the turbulent wake of rigid and flexible cylinders subject to vortex-induced vibrations.  Journal of Fluid Mechanics, 400:91–124, 1999.
  * [9] T. K. Prasanth and S. Mittal.  Vortex-induced vibrations of a circular cylinder at low reynolds numbers.  Journal of Fluid Mechanics, 594:463–491, 2008.
  * [10] M. D. Griffith, D. Lo Jacono, J. Sheridan, and J. S. Leontini.  Flow-induced vibration of two cylinders in tandem and staggered arrangements.  Journal of Fluid Mechanics, 833:98–130, 2017.
  * [11] D. Sabino, D. Fabre, J. S. Leontini, and D. Lo Jacono.  Vortex-induced vibration prediction via an impedance criterion.  Journal of Fluid Mechanics, 890, 2020.
  * [12] M. Raffel, C. E. Willert, and J. Kompenhans.  Particle image velocimetry.  Springer, New York, 3rd edition, 1998.
  * [13] D. R. Jonassen, G. S. Settles, and M. D. Tronosky.  Schlieren “piv” for turbulent flows.  Optics and Lasers in Engineering, 44(3):190–207, 2006.
  * [14] M. J. Hargather, M. J. Lawson, G. S. Settles, and L. M. Weinstein.  Seedless velocimetry measurements by schlieren image velocimetry.  AIAA Journal, 49(3):611–620, 2011.
  * [15] P. L. van Gent, D. Michaelis, B. W. van Oudheusden, P.. Weiss, R. de Kat, A. Laskari, Y. J. Jeon, L. David, D. Schanz, F Huhn, S. Gesemann, M. Novara, C. McPhaden, N. J. Neeteson, D. E. Rival, J. F. G. Schneiders, and F. F. J. Schrijer.  Comparative assessment of pressure field reconstructions from particle image velocimetry measurements and Lagrangian particle tracking.  Experiments in Fluids, 58(4):33, 2017.
  * [16] J. Zhang, S. Bhattacharya, and P. P. Vlachos.  Using uncertainty to improve pressure field reconstruction from piv/ptv flow measurements.  Experiments in Fluids, 61(6):131, 2020.
  * [17] J. Ling, A. Kurzawski, and J. Templeton.  Reynolds averaged turbulence modelling using deep neural networks with embedded invariance.  Journal of Fluid Mechanics, 807:155–166, 2016.
  * [18] H. Xiao, J. L. Wu, J. X. Wang, R. Sun, and C. J. Roy.  Quantifying and reducing model-form uncertainties in reynolds-averaged navier–stokes simulations: A data-driven, physics-informed bayesian approach.  Journal of Computational Physics, 324:115–136, 2016.
  * [19] J. Wang, J. L. Wu, and H. Xiao.  Physics-informed machine learning approach for reconstructing reynolds stress modeling discrepancies based on dns data.  Physical Review Fluids, 2(3), Mar 2017.
  * [20] J. Weatheritt and R. D. Sandberg.  The development of algebraic stress models using a novel evolutionary algorithm.  International Journal of Heat and Fluid Flow, 68(August):298–318, 2017.
  * [21] W. Zhang, B. Zhu, H. Xu, and Y. Wang.  Applying extended intrinsic mean spin tensor in evolution algorithm for rans modelling of turbulent rotating channel flow.  Journal of Hydrodynamics, 31(6):1255–1258, 2019.
  * [22] L. Zhu, W. Zhang, J. Kou, and Y. Liu.  Machine learning methods for turbulence modeling in subsonic flows around airfoils.  Physics of Fluids, 31(1):015105, 2019.
  * [23] F. Sarghini, G. D. Felice, and S. Santini.  Neural networks based subgrid scale modeling in large eddy simulations.  Computers & Fluids, 32:97–108, 2003.
  * [24] M. F. Barone, J. A. Fike, J. Ling, and Warren L. D. Iv.  Machine learning models of errors in large eddy simulation predictions of surface pressure fluctuations.  In AIAA AVIATION Forum, 47th AIAA Fluid Dynamics Conference, number June, pages 1–20, Denver, 2017.
  * [25] M. Schoepplein, J. Weatheritt, R. Sandberg, M. Talei, and M. Klein.  Application of an evolutionary algorithm to les modelling of turbulent transport in premixed flames.  Journal of Computational Physics, 374:1166–1179, 2018.
  * [26] Z. Zhou, G. He, S. Wang, and G. Jin.  Subgrid-scale model for large-eddy simulation of isotropic turbulent flows using an artificial neural network.  Computers & Fluids, 195:104319, 2019.
  * [27] M. Raissi, P. Perdikaris, and G. E. Karniadakis.  Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations.  Journal of Computational Physics, 378:686–707, 2019.
  * [28] M. Raissi, A. Yazdani, and G. E. Karniadakis.  Hidden fluid mechanics: Learning velocity and pressure fields from visualizations.  Science, 367(6481):1026–1030, 2020.
  * [29] X. Jin, S. Cai, H. Li, and G. E. Karniadakis.  NSFnets (Navier-Stokes flow nets): Physics-informed neural networks for the incompressible Navier-Stokes equations.  Journal of Computational Physics, page 109951, 2020.
  * [30] X. Bai, Y. Wang, and W. Zhang.  Applying physics informed neural network for flow data assimilation.  Journal of Hydrodynamics, 2020.
  * [31] H. Xu, W. Zhang, and Y. Wang.  Explore missing flow dynamics by physics-informed deep learning : the parameterised governing systems.  pages 1–14, 2020.  arXiv: 2008.12266.
  * [32] M. Raissi, Wang Z., M. S. Triantafyllou, and G. E. Karniadakis.  Deep learning of vortex-induced vibrations.  Journal of Fluid Mechanics, 861:119–137, 2019.
  * [33] D. C. Wilcox.  Turbulence modeling for CFD.  DCW Industries, Inc., La Canada, USA, 3rd edition, 2006.
  * [34] F. Menter.  Two-equation eddy-viscosity turbulence models for engineering applications.  AIAA Journal, 32(8):1598–1605, 1994.
  * [35] F. Menter, M. Kuntz, and R. Bender.  A scale-adaptive simulation model for turbulent flow predictions.  In AIAA 41th Aerospace Science Meeting and Exhibit, number January, pages 1–11, Reno, Nevada, 2003.
  * [36] M. Abadi, P. Barham, J. Chen, Z. Chen, A. Davis, J. Dean, M. Devin, S. Ghemawat, G. Irving, M. Isard, et al.  Tensorflow: A system for large-scale machine learning.  In 12th $\\{$USENIX$\\}$ Symposium on Operating Systems Design and Implementation ($\\{$OSDI$\\}$ 16), pages 265–283, 2016.
  * [37] D. P. Kingma and J. L. Ba.  Adam: A method for stochastic optimization.  3rd International Conference on Learning Representations, ICLR 2015 - Conference Track Proceedings, pages 1–15, 2015.  arXiv: 1412.6980.
  * [38] S. Wang, Y. Teng, and P. Perdikaris.  Understanding and mitigating gradient pathologies in physics-informed neural networks.  pages 1–28, 2020.  arXiv: 2001.04536.


# Federated Learning for Wireless Applications: A Prototype ††thanks: We
acknowledge the research grants from MeITY and DST SERB, the govt. Of India.

Varun Laxman Muttepawar1,∗, Arjun Mehra1,∗, Zubair Shaban∗, Ranjitha Prasad∗,
J. Harshan† ∗Indraprastha Institute of Information Technology Delhi, India;
†Indian Institute of Technology Delhi, India

###### Abstract

Wireless embedded edge devices are ubiquitous in our daily lives, enabling
them to gather immense data via onboard sensors and mobile applications. This
offers an amazing opportunity to train machine learning (ML) models in the
realm of wireless devices for decision-making. Training ML models in a
wireless setting necessitates transmitting datasets collected at the edge to a
cloud parameter server, which is infeasible due to bandwidth constraints,
security, and privacy issues. To tackle these challenges, Federated Learning
(FL) has emerged as a distributed optimization approach to the
decentralization of the model training process. In this work, we present a
novel prototype to examine FL’s effectiveness over bandwidth-constrained
wireless channels. Through a novel design consisting of Zigbee and NI USRP
devices, we propose a configuration that allows clients to broadcast
synergistically local ML model updates to a central server to obtain a
generalized global model. We assess the efficacy of this prototype using
metrics such as global model accuracy and time complexity under varying
conditions of transmission power, data heterogeneity and local learning.

###### Index Terms:

Software Defined Radios Federated Learning, Distributed Learning, Over the
air, MNIST

##  I Introduction

In the era of global connectivity and the Internet of Things (IoT), efficient
and privacy-preserving machine learning (ML) solutions are crucial. Federated
Learning (FL) [1], an innovative paradigm in ML, emerges as a powerful
approach to train models across decentralized devices without compromising on
data privacy. Essentially, FL advocates the aggregation of local ML model
parameters to obtain a global ML model.

In this dynamic landscape of modern connectivity, where wireless devices
permeate our daily lives, the significance of implementing FL on hardware, for
example, using software-defined radios (SDRs), is apparent. SDRs serve as the
backbone of decentralized networks, facilitating real-time communication.
Harnessing the power of FL on such hardware not only optimizes model training
but also ensures that privacy-preserving ML becomes a tangible reality. The
key objectives of our work are the following:

  * •

Privacy-Preserving ML: Establishing an FL protocol, which is privacy-
preserving by design and transmits parameter updates over the wireless
channel.

  * •

Real-time ML: Demonstrating the seamless integration of learning with NI-USRPs
(National Instruments-Universal Software Radio Peripheral) and Zigbee for
real-time update communication.

  * •

Decentralized Model Training: Showcasing the efficiency gains achieved by
distributing the learning process across the hardware devices.

Our demo provides a hands-on guide for setting up an FL environment using
USRPs and Zigbee devices. The convergence of FL principles with tangible
hardware platforms opens new avenues for collaborative and privacy-conscious
ML, thereby unlocking the potential of FL on wireless devices. This work also
helps to bridge the gap between theoretical advancements [2, 3] and practical
implementations in wireless FL.

##  II Federated Learning & FedAvg Algorithm

Federated learning is a decentralized ML approach where model training occurs
locally on the edge devices, and only the model updates, not the raw data, are
shared with a central server. In particular, in Federated Averaging (FedAvg),
clients share their parameter updates with the server. The server aggregates
these updates by computing a weighted average which is assigned as a global ML
model. The algorithm is summarized in the following steps:

  1. 1.

Initialization: The central server initializes and broadcasts a global
initialization to the clients.

  2. 2.

Training & Local updates: Each client computes the local updates by training
the model on its local data and transmits them to the central server.

  3. 3.

Aggregation & Global model: The central server aggregates the local updates
using a weighted average and updates the global model.

  4. 4.

Re-transmission of Global model: The central server then broadcasts the new
global model to all the clients, who train on it for the next round.

  5. 5.

Convergence criteria are monitored, such as reaching an accuracy threshold or
a number of iterations.

This collaborative training paradigm enables privacy-preserving communication,
making it particularly suitable for scenarios with sensitive distributed data
sources, such as mobile devices or edge computing environments. Each edge
device is tasked with locally training a model based on its received signal
data, capturing unique characteristics of the wireless environment. The goal
is to create a global model that not only performs well on the individual
signals observed by each edge device but also generalizes effectively across
the diverse signal characteristics contributed by different devices. One such
work is studied in [4], where the goal is to train models that can identify
adversarial attacks in a decentralized fashion by exploring the usage of deep
neural networks. The intent is to create a strong and secure wireless network
where numerous nodes work together to detect and eliminate attacks by
implementing the principles of FL.

##  III Details of the Demonstration

In this section, we discuss the details of the proposed demonstration. Our
experimental setup is based on the federated averaging protocol as described
in the previous section. Throughout the training process, only model updates
(in the form of gradients) are exchanged with a central server, thereby
preserving local raw data. Through iterative updates and aggregation, a global
model emerges, embodying generalized features of the data despite each client
having observed only a subset of the data. We conducted the experiments on a
reduced MNIST dataset, where we consider any $4$ classes distributed across
two clients. We simulate the following scenarios:

  * •

Independent and identically distributed (IID) Setup: We shuffle the dataset
and randomly assign half of the dataset to each client. Since we assign the
samples randomly, the local data at the clients are inherently IID.

  * •

Non-IID setup: We assign two classes to each of the clients with no overlap,
i.e., the client’s local dataset is sampled from different distributions and,
hence, non-IID.

###  III-A Local Learning

On the clients’ side, ML model training involves learning the parameters of a
Multi-Layer Perceptron (MLP) with three linear layers, producing approximately
$12,000$ parameters per client. The learning rates for the IID and non-IID
cases are $10^{-5}$ and $10^{-4}$, respectively. The number of epochs is $10$
by default. ReLU activation is applied, and the model is trained using cross-
entropy loss with the Adam optimizer.

###  III-B Hardware Setup

Our hardware setup is partitioned into three core components: Clients 1 and 2
and a central server as depicted in Fig. 1. As shown in Fig. 2 each of these
segments is equipped with essential hardware components, including NI USRP
2900 and Xbee S2C devices. Here, the NI USRP 2900, mounted with an
omnidirectional VERT 2450 antenna, is used for physical layer communication,
and Xbee S2C devices are used for network-level synchronization. The USRPs
leverage differential modulation to enhance system robustness and eliminate
the need for channel estimation. The other key signal specifications encompass
various parameters crucial for the communication system. These include an
operating frequency of $2.5$ GHz, pulse shaping using Root Raised Cosine, a
reception gain of $20$ dB, an IQ rate of $50$k, a symbol rate of $6.25$k with
$8$ samples per symbol, and transmission power of $20$dB by default.

Figure 1: Synergizing Zigbee and USRP for FL Synchronization.

Figure 2: FL prototype using USRPs and Xbee devices.

###  III-C Synchronization Process

The synchronization process is a challenging aspect of implementing a wireless
FL system since the transmission of parameter updates needs to be scheduled
meticulously. We realize synchronization by employing Time Division Multiple
Access (TDMA) to optimize the scheduling of transmissions. It commences with
Client 1, transmitting its locally trained model parameters to the server (in
$T_{c1,s}$ seconds). Upon receiving this data, the server promptly
acknowledges the reception through the established Zigbee network. It is
important to note that the server intentionally waits for a response from
Client 1 before the server signals Client 2 to initiate the transmission of
its locally trained model parameters. Following the reception of data from
Client 2 (in $T_{c2,s}$ seconds), the server, once again, acknowledges the
successful reception through the Zigbee network. Subsequently, with data from
both clients in hand and having received confirmation responses from both
clients via the Zigbee network, the server calculates the necessary aggregate
of local model parameters to update the global model. Subsequently, the server
broadcasts a signal to both clients, instructing them to activate their
receptors. The synchronization process concludes one communication round when
both clients independently confirm to the server through the Zigbee network
that they have received the updated information, at which point the server
halts its broadcasting. The order of activation of the SDRs has been depicted
in Fig. 2 (left), and the overall time taken for such a TDMA-based scheme is
shown in Fig. 3. Note that $T_{c1,c1}$, $T_{c2,c2}$ and $T_{s,s}$ refer to
computation time at client1, client 2 and the server, respectively.

Figure 3: Temporal aspects of one communication round.

###  III-D Client-Server Communication

In our demonstration, USRP is managed through LabVIEW, the XBee devices are
controlled using XCTU, and the ML model parameters are generated via Python.
These software components seamlessly work in sync, creating an integrated
system for the FL experiment. After obtaining the model updates from the local
ML models, it is converted into binary format. This binary data is
subsequently organized into packets marked by a unique identifier, effectively
serving as its ‘jacket number.’ These packets consist of $128$ bits and are
further enhanced by the inclusion of guard bits, sync bits (PN Sequence order
$=31$), as well as blank frames. A $60$-bit cyclic redundancy is added to each
packet to bolster recognition at the receiver’s end. Once these packets are
prepared, the final data packet undergoes differential modulation,
transforming it into a complex signal (I+Q). This complex signal then advances
through the up-conversion stage, ultimately culminating in the process of
final transmission. After down-converting the sampled signal over an
acquisition time of $40$ milliseconds, we eliminate any DC offset and unwanted
frequencies by applying the Hamming window. Subsequently, we employ threshold
voltage detection to transform the analog signal into a digital bit stream
through demodulation. The synchronized detection is facilitated through
convolution using the same PN sequence order. Once the synchronization process
is complete, we extract the message bits from the data packets. These bits are
then mapped to their corresponding packet numbers embedded into the generated
bit stream.

##  IV Numerical Results

In this section, we present the outcomes of our demonstration. In Fig. 5
(left), we compare IID and non-IID scenarios comprehensively. While we see
that in the IID scenarios, an accuracy of $99\%$ is obtained, it drops to
$90\%$ under severe heterogeneity, as expected. From Fig. 5 (right), we see
that transmission power impacts the stability, accuracy, and rate of
convergence in the non-IID setting. However, we also observe improved
convergence with higher transmission power.

Figure 4: Confusion Matrix for Cross-accuracy.

In Table. I, we report the best accuracy as a function of the epochs, which
measures the amount of local learning and the transmission power. We observe
that the convergence is fast in the case of IID data, and higher local
learning helps. Albeit reduced accuracy gains in the non-IID context, more
local learning helps here as well. However, the time taken to achieve
convergence is much larger as it takes several more communication rounds as
compared to the IID setting.

In order to ensure that we have a generalized global model, we test the cross-
accuracy, i.e., since Client 1 has classes $0$ and $1$, we test if Client 1
can predict well on classes $2$ and $3$, and analogously, we test Client 2 on
classes $0$ and $1$. In Fig. 4, the confusion matrix shows that the cross-
accuracy reported by Client 1 is $87\%$ and Client 2 is $90\%$, which
ascertains that our global ML model is well-generalised.

Figure 5: (Left)Accuracy performance in the IID and non-IID setting & (right) for different transmission powers. TABLE I: Best accuracy values for varying epochs and transmission power along with the time taken. IID | # Epochs | Power(dB)
---|---|---
5 | 10 | 10 | 15
Accuracy(%) | 99 | 99 | 99 | 99
# Tx. Rounds | 5 | 3 | 3 | 3
Time taken(s) | 215.43 | 180.89 | 180.89 | 178.71
Non-IID | # Epochs | Power(dB)
5 | 10 | 10 | 15
Accuracy(%) | 91 | 90 | 90 | 92
# Tx. Rounds | 11 | 8 | 8 | 8
Time taken(s) | 539.55 | 507.36 | 507.36 | 494.63

##  V Conclusions

In this work, we present a hardware prototype of FL system that utilizes a
wireless backbone. The results of our research exemplify the power of FL in
establishing a collaborative and privacy-preserving learning environment over
wireless channels where multiple clients collectively contribute to a unified,
general model. Establishing a network of SDRs and USRPs to enable private ML,
while achieving performance similar to centralized architectures is the key
takeaway of this prototype. Our approach offers a basic blueprint for
implementing FL, which can be extended to delay-specific wireless networks,
network with stragglers, etc.

## References

  * [1] B. McMahan, E. Moore, D. Ramage, S. Hampson, and B. Aguera y Arcas. “Communication-efficient learning of deep networks from decentralized data.” In AISTATS 2017, pages 1273–12
  * [2] T. Sery, N. Shlezinger, K. Cohen and Y. C. Eldar, “COTAF: Convergent Over-the-Air Federated Learning,” GLOBECOM 2020, pp. 1-6.
  * [3] Amiri, M., and D. Gündüz. ”Federated learning over wireless fading channels.” IEEE Trans. on Wireless Communications 19, no. 5 (2020).
  * [4] Hussain, A., N. Gundapu, S. Drugkar, S. Kiran, J. Harshan, and R. Prasad. ”Seeing is Believing: A Federated Learning Based Prototype to Detect Wireless Injection Attacks.” arXiv preprint:2311.06564 (2023).