L PREPRINT - accepted at 59th ACM/IEEE Design Automation Conference (DAC)
20224.5cm,1cm1.001.8

# Designing ML-Resilient Locking at Register-Transfer Level

Dominik Sisejkovic1, Luca Collini2*, Benjamin Tan3, Christian Pilato4,
Ramesh Karri2, and Rainer Leupers1 1 RWTH Aachen University, Germany, 2 New
York University, USA, 3 University of Calgary, Canada, 4 Politecnico di
Milano, Italy{sisejkovic<EMAIL_ADDRESS>{lc4976,
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
(2022)

###### Abstract.

Various logic-locking schemes have been proposed to protect hardware from
intellectual property piracy and malicious design modifications. Since
traditional locking techniques are applied on the gate-level netlist after
logic synthesis, they have no semantic knowledge of the design function. Data-
driven, machine-learning (ML) attacks can uncover the design flaws within
gate-level locking. Recent proposals on register-transfer level (RTL) locking
have access to semantic hardware information. We investigate the resilience of
ASSURE, a state-of-the-art RTL locking method, against ML attacks. We used the
lessons learned to derive two ML-resilient RTL locking schemes built to
reinforce ASSURE locking. We developed ML-driven security metrics to evaluate
the schemes against an RTL adaptation of the state-of-the-art, ML-based
SnapShot attack.

††copyright: none††journalyear: 2022††conference: Design Automation
Conference; July 10–14; San Francisco, CA, USA††price: 15.0011footnotetext:
This work was done while L. Collini was with Politecnico di Milano, Italy.

##  1\. Introduction

Integrated circuits (ICs) are a critical layer for security in modern
electronic systems. However, there are security concerns due to third parties
in the supply chain. As external design houses and foundries have full access
to the IC intellectual property (IP) during production, attackers could
reverse engineer the IP for malicious purposes, such as IP theft and hardware
Trojan insertion (et al., 2017b). Design-for-trust methodologies aim to
counteract such threats. Logic locking has been recognized as a premier
technique to safeguard ICs throughout the supply chain (et al., 2019). Logic
locking builds on the concept of design obfuscation (et al., 2020c, 2008,
2016, 2017a, a), where designers insert key-driven logic to functionally and
structurally alter ICs, thus concealing functional intent. Only the correct
activation key unlocks the intended functionality of the IC.

Recently, machine learning (ML) techniques have challenged the security of
gate-level locking (et al., 2021d). ML-driven attacks exploit the predictable
relation between the key value and the functional or structural aspects of
locking. This has led to potent attacks that can either predict the correct
key value or remove the locking circuitry from the netlist (et al., 2021f, e,
b, h). While ML-driven attacks often lack output certainty, their
applicability adds another requirement for logic locking success—prevention of
key-related residue within the locking mechanics. As long as the structural
change is related to key values, it is possible to use ML to guess the keys.

Figure 1. Machine learning vs. logic locking: impact on RTL?

Traditional gate-level locking schemes are limited to local changes and do not
use the semantic information of the circuit, as logic synthesis and
optimization disperse the semantics to a low granularity. Therefore, gate-
level locking schemes operate “blindly” on the design without considering its
functional traits. In response, RTL locking has emerged as a way to overcome
this issue (et al., 2021a; Chakraborty and Bhunia, 2010). At the RTL, locking
can use the full spectrum of semantic information, including operations,
constants, and control flow constructs. Hence, RTL locking is a promising
basis to build ML-resilient locking. However, compared to gate-level locking,
ML attacks on RTL locking remain unexplored as shown in Fig. 1.

Contributions: Thus, this study explores ML resilience of RTL locking focusing
on operation obfuscation, where we:

  * •

Introduce theoretical concepts to evaluate ML-resilience of RTL locking.

  * •

Expose security faults in ASSURE RTL locking (et al., 2021a).

  * •

Define ML-resilience security metrics for RTL locking.

  * •

Introduce two ML-resilient locking algorithms: (1) ERA: Exact ML-Resilient
Algorithm and (2) HRA: Heuristic ML-Resilient Algorithm.

  * •

Evaluate the locking algorithms against an RTL adaptation of the ML-based
SnapShot attack.

To the best of our knowledge, the presented concepts and locking procedure are
the first to address the challenges of ML resilience on RTL. The
implementation of this study will be made available to the community once
published.

##  2\. Background

###  2.1. Threat Model

Since ML-driven attacks do not need a working chip (oracle) to succeed (et
al., 2021b), our threat model includes the following assumptions. (1) The
attacker has only access to the locked design in the form of a locked gate-
level netlist or GDSII layout file. As a working copy of the locked chip is
not available, this attack model is often referred to as oracle-less (OL).
Starting from the provided design level, the attacker can perform reverse
engineering to recover the RTL design. To simulate the best-case scenario for
the attacker, we assume the attacker can retrieve an exact copy of the
initial, locked RTL design. (2) The attacker is aware of the algorithmic
details of the applied locking scheme. (3) The location of the key inputs
(pins) is known (i.e., distinct ambiguity (et al., 2019)). In the rest of this
study, we refer to the locked RTL design under attack as the target.

###  2.2. ML-Driven Structural Attacks

In the OL model, an attacker has only access to the target design without I/O
patterns. An ML-based attack has to exploit structural key-related patterns to
produce a (correct) key prediction. Thus, we selected the OL SnapShot attack
(et al., 2021b) as a basis for the evaluation. SnapShot was initially designed
to attack locked gate-level netlists, following four major steps (Fig. 2).
First, the attack prepares a set of locked samples by relocking (self-
referencing) the target benchmarks with new keys. Second, a training set is
assembled by extracting a netlist sub-graph for each single-bit key input from
all data samples. The extracted sub-graphs are transformed into a vector of
numbers, where each entry encodes a single gate from the derived sub-graphs.
These vectors are referred to as localities. In essence, a locality represents
a key-affected portion of the netlist. Next, the attack trains a dedicated ML
model to associate localities with their respective key values. Finally, the
trained ML model is deployed to predict the key of the target design. Since
SnapShot has previously only been applied on gate level, we adjust the
extraction and ML model of SnapShot to support RTL locking in this work.

Alongside SnapShot, the most prominent OL, ML-based attacks on gate-level
locking are OMLA (et al., 2021f), GNNUnlock (et al., 2021e), and SAIL (et al.,
2021h). OMLA and GNNUnlock use graph neural networks, thus relying on a graph
representation of the input design that is natural to gate-level netlists.
SAIL exploits the deterministic and local changes of gate-level locking by
learning to reverse the transformations induced by logic synthesis. Since we
operate on RTL and assume a perfect reconstruction of the locked RTL, SAIL is
not considered.

Figure 2. ML-driven SnapShot attack flow.

###  2.3. The Concept of RTL Locking

To protect the design, we focus on the locking techniques proposed in ASSURE
(et al., 2021a)—one of the latest RTL locking policies. ASSURE offers three
locking techniques: constant, branch, and operation obfuscation. Constant
obfuscation extracts constants into the activation key. For example, a =
4’b1101 is locked as a = $K$, where $K$ is the 4-bit constant stored as the
key. Branch locking works by XOR-ing the condition of the branch with a key
bit, thereby inverting the condition if the value is 1. For example, the
condition a $>$ b is locked as (a <= b)$\wedge{}K$. Operation locking works by
inserting a key-controlled multiplexer to choose between a real and dummy
operation. For example, the expression a = b + c can be locked either as a =
$K$ ? (b + c) : (b - c) or a = $K$ ? (b - c) : (b + c), depending on the value
of $K$. In terms of security, constant obfuscation does not offer any apparent
attack vectors, as the secret is fully omitted from the attacker. Branch
obfuscation only affects the existing control flow based on the key, without
inserting additional logic. Operation obfuscation manipulates the design by
inserting additional logic depending on the existing one. This dependence
offers the potential for an attack. Therefore, we focus on the security of
operation obfuscation.

Figure 3. ASSURE operation locking and representation. Figure 4. Impact of
operation selection on learning resilience in RTL locking.

Operation obfuscation: The security of this locking concept lies in the
assumption that the attacker cannot guess which operation of the observed pair
is the correct one. The paired real and dummy operations are called locking
pairs. In the general case, locking pairs are defined as $(T,T^{\prime})$,
where $T$ and $T^{\prime}$ are the real and dummy operations, respectively. On
RTL, a locking pair is typically implemented in the form of a ternary
operator. For instance, as depicted in Fig. 3a, the real operation $+$ can be
locked in the form of $(+,-)$ for the correct key value 1, or in the form of
$(-,+)$ for the correct key value 0. Hence, an addition is always locked in
pair with a subtraction, and vice versa. Note that all other operations have
predefined locking pairs (et al., 2021a). In case an already locked pair is
relocked, both $T$ and $T^{\prime}$ are locked separately. As shown in Fig.
3b, relocking results in a tree of multiplexers, i.e., nested ternary
operators. The compact notation of locked pairs from Fig. 3 is used in the
rest of this study for visualization purposes.

##  3\. Learning Resilience for RTL Locking

Learning attacks make predictions about the key by studying the locked design.
A scheme that is secure against learning attacks is considered learning-
resilient (et al., 2021c). As discussed in (et al., 2021c), netlists that
exhibit regular, repetitive structures maximize the exposure of a locking
scheme’s mechanics, making it is easy to identify potential leakage points.
This is because key-related structural changes are more likely to be
identified within repetitive constructs. To evaluate RTL locking for
structural leakage, let us consider its workings on a structurally regular
design that only contains connected $+$ operations. The following challenge
arises: how do we lock it without suggesting anything about the correctness of
the key? Let us consider the two methods of operation selection in ASSURE:
serial and random. Furthermore, we need to take two data sets into account:
test and training. The test set consists of locking samples for which the key
is unknown and represents the design under attack. The training set comprises
locking samples that are added in additional relocking rounds of the target
with known keys. This process is also known as self-referencing (et al.,
2021h, b). The attacker uses the training set to collect observations about
the relation between the locking pairs and the key. The ensuing discussion
follows visualizations in Fig. 4, where we consider different locking
scenarios using locking pairs and symbols from Fig. 4a, and the $+$ operation
network.

Serial selection is the standard selection in ASSURE. As shown in Fig. 4b, the
initial locking (test set) selects $+$ operations for locking to create
locking pairs in the form of $(+,-)$ and $(-,+)$ (encoded with a single symbol
for simplicity). This ”serial” selection always selects the operations in a
serial manner w.r.t. the design topology. Due to the serial selection, the
subsequent locking rounds (training set) select the same operations as the
test set for relocking; already-locked $+$ operations are extended with
additional locking pairs. In the example, the left operation is selected for
key value 1 and the right for key value 0, according to the rule of ternary
expressions. As portrayed in Fig. 4e, both the $+$ and $-$ operations are
equally related to the key value 0 and 1, resulting in confusing observations.
This suggests that ASSURE is, in principle, learning-resilient. However, this
case arises only due to the deterministic order of selecting operations—it can
easily be broken by either using a longer training key to ensure locking
untouched operations during training or by randomizing the order of selection.
Hence, the standard ASSURE procedure is not secure w.r.t. data-driven attacks.

Random selection is depicted in Fig. 4c. Here, the samples from the test and
training set are likely to overlap only to some extent. Hence, the
observations of the training set are contaminated by some contradictory
observations. By analyzing the training set (Fig. 4f), one can learn that the
$+$ operation is more likely to be the correct one. The random selection might
result in a favorable outcome for the attacker when training and test samples
do not overlap (Fig. 4d). In this scenario, all observations from the training
set (Fig. 4g) suggest that the $+$ operation is always the correct one. This
knowledge can be used to infer a correct key.

###  3.1. Observations

$(1)$ Learning resilience on RTL can be achieved if the likelihood of any
operation in a locking pair is equally related to key value 0 and 1. $(2)$
Operation selection impacts learning resilience. $(3)$ The initial
distribution of operation types determines if learning-resilience is
achievable. Evidently, the effectiveness of learning-resilient locking should
not depend on circuit features. Even if real-world designs are not represented
by the $+$ network, focusing on this biased case ensures that the scheme
offers security even in general cases.

Based on the above observations, we can conclude that learning resilience on
RTL is achievable if the occurrence frequency of every operation within a
locking pair is equal for all operations in the pairings. This is the case if
the design has the same number of $+$ and $-$ operations after locking. In
that case, any selection procedure for training results in an equal number of
contradictory observations. In the next section, we introduce two locking
algorithms that use this rule for learning resilience on RTL.

###  3.2. ASSURE Leakage Points

We analyzed the serial selection of ASSURE (et al., 2021a), and the current
pairing of operations is leaky as operations are incorrectly paired. For
example, ASSURE assumes these pairs: $(*,+)$, $(+,-)$, and $(-,+)$. Here, * is
paired with a +, but + is also paired with -. Hence, if the locked pair
$(*,+)$ is encountered, the attacker can infer * as the correct operation, as
$(+,*)$ does not exist. Similarly, leakage exists for modulo, xor, power, and
division. Thus, currently ASSURE can be broken by analyzing operation pairs.
Hence, every operation must exist as a real and dummy operation with the same
pair, e.g., $(*,/)$ and $(/,*)$. This fix applies to all evaluations in this
study.

##  4\. ML-resilient RTL Locking

Based on the discussion, we introduce the following definition:

###### Definition 0.

An RTL design is learning-resilient w.r.t. operation locking if the number of
operations of type $T$ is equal to the number of operations of type
$T^{\prime}$ for each locking pair for which at least one operation of type
$T$ or $T^{\prime}$ is locked.

If neither $T$ nor $T^{\prime}$ are involved in locking, the locked design is
learning-resilient even if the number of $T$ and $T^{\prime}$ operations is
not balanced. The reason is that, during training, locking “untouched” $T$ and
$T^{\prime}$ operations does not provide feedback for the target samples.
Henceforth, secure refers to security in the context of Def. 4.1. Next, we
introduce two ML-resilient locking algorithms built on top of ASSURE: ERA:
Exact ML-Resilient Algorithm and Heuristic ML-Resilient Algorithm. ERA
guarantees security w.r.t. Def. 4.1, but requires a large key budget. HRA
trades-off key length with security, yielding less secure solutions if the key
budget is limited.

Input: Locking type $T$, operation distribution table $ODT$, RTL design D, and
pair mode P

Output: Number of used bits

$n\leftarrow 0$

// Initialize used bits var

1 $T^{\prime}\leftarrow\textsc{GetPairType}(T)$

$o_{i}\leftarrow\textsc{RndSelect}(D.ops[T])$

// Select a T-type op.

2 $o_{j}\leftarrow\textsc{RndSelect}(D.ops[T^{\prime}])$

3 if  _$ODT[T] >0$ and $!P$_ then

$\textsc{AddPair}(D,o_{i},T^{\prime})$

// Add T’ node to $o_{i}$

4 $ODT[T]\leftarrow ODT[T]-1$

5 $ODT[T^{\prime}]\leftarrow ODT[T^{\prime}]+1$

6 $n\leftarrow n+1$

7

8 else if  _$ODT[T] <0$ and $!P$_ then

$\textsc{AddPair}(D,o_{j},T)$

// Add T node to $o_{j}$

9 $ODT[T]\leftarrow ODT[T]+1$

10 $ODT[T^{\prime}]\leftarrow ODT[T^{\prime}]-1$

11 $n\leftarrow n+1$

12

13 else

$\textsc{AddPair}(D,o_{i},T^{\prime})$

// Add T’ node to $o_{i}$

$\textsc{AddPair}(D,o_{j},T)$

// Add T node to $o_{j}$

14 $n\leftarrow n+2$

15

16 end if

17

18return _$n$_

Algorithm 1 Lock

Operation distribution: The first step in ERA and HRA is to analyze operation
distribution in the input RTL. We store this information in an operation
distribution table ($ODT$). For each $T$, the table stores a number
representing the difference between the distribution of $T$-type and the
locking-pair $T^{\prime}$-type operations. Assuming the pair $(+,-)$, a design
with 7 ”$+$” and 5 ”$-$” has the following $ODT$ entries: $ODT[+]=+2$ and
$ODT[-]=-2$. A positive (negative) $ODT$ value indicates that the operation
type has more (less) operations than its locking-pair type. The $ODT$ entries
can inform a secure design by balancing the number of $T$ and $T^{\prime}$
operations.

The locking step: Algorithm 1 outlines Lock, the common locking step for HRA
and ERA. For a selected type $T$, the RTL $D$ is locked following three cases.
If $ODT[T]$ is positive (lines 6-9), pair a new $T^{\prime}$-type operation
with an existing $T$-type to reduce the excess of $T$. If $ODT[T]$ is negative
(lines 11-14), pair a new $T$-type operation with an existing
$T^{\prime}$-type to reduce the deficiency of $T$. Otherwise (lines 16-18),
pair new $T$\- and $T^{\prime}$-type operations with existing operations. This
is used by specific operation-selection algorithms to derive HRA and ERA.
Before describing the locking algorithms, we introduce a security metric for
resilience w.r.t. Def. 4.1.

###  4.1. Security Metric for Learning Resilience

$ODT$ entries can be used as a vehicle to measure security in the context of
Def. 4.1. To design a metric that indicates how ”far” a locked design is from
the optimal distribution, let us consider the following notation. The content
of $ODT$ in iteration $j$ of a selected locking algorithm can be represented
as the vector $\bm{v_{j}}=[x_{0},\ldots,x_{l-1}]$, where $l$ is the number of
available locking pairs, and $x_{i}=\lvert ODT[T]\rvert$. Note that $\lvert
ODT[T]\rvert\equiv\lvert ODT[T^{\prime}]\rvert$. A secure solution is reached
if all entries of $ODT=0$. Hence, the optimal distribution can be defined as
$\bm{v_{o}}=[y_{0},\ldots,y_{l-1}]$, where $y_{i}=0$ for $i\in{[0,l-1]}$.
Using this notation, we can define the learning-resilience security metric as:

(1)
$M_{sec}=100\cdot{\left(1-\frac{d_{e}(\bm{v_{j}},\bm{v_{o}})}{d_{e}(\bm{v_{i}},\bm{v_{o}})}\right)},$

where $d_{e}$ is a modified version of the Euclidean distance, $\bm{v_{i}}$
the initial distribution vector of the target design, $\bm{v_{o}}$ the optimal
distribution vector, and $\bm{v_{j}}$ the distribution vector after the $j$-th
locking iteration. Note that $M_{sec}\in{[0,100]}$, where the highest value
indicates $\bm{v_{j}}\equiv\bm{v_{o}}$. In that case, all locking-pair
operation types are equally represented within the locked design, disabling
the ability of ML to learn from relocking (as discussed in Section 3).
Furthermore, the formulation of the Euclidean distance was adjusted as
presented in Algorithm 2. For a selected $\bm{v_{o}}$, the algorithm allows
the exclusion of selected $\lvert ODT\rvert$ values from the calculation,
enabling two metric variants: restricted and global learning resilience.

Input: Current vector $\bm{v_{j}}$ and optimal vector $\bm{v_{o}}$

Output: Distance

1

$s\leftarrow 0$

// Initialize sum var

2 for  _$i\leftarrow 0;i <\lvert\bm{v_{o}}\rvert;i++$_ do

/* Check if value should be considered */

3 if  _$\bm{v_{o}}\neq$ ’x’_ then

4 $s\leftarrow s+(\bm{v_{o}}[i]-\bm{v_{j}}[i])^{2}$

5

6

7 end for

8

9return _$\sqrt{s}$_

Algorithm 2 $d_{e}$: Modified Euclidean Distance

Global security metric ($M_{sec}^{g}$) considers all $ODT$ entries to
determine $d_{e}$, regardless of whether operations from a selected locking
pair are affected by locking or not. This metric is suitable to guide
heuristics when it is not clear which operation types will be locked. Thus,
$M_{sec}^{g}$ describes the potential for exploitation within a design. Since
$M_{sec}^{g}$ considers all $ODT$ values, $\bm{v_{o}}$ does not contain any
’x’ values. Hence, $M_{sec}^{g}$ is monotonic.

Restricted security metric ($M_{sec}^{r}$) only considers $ODT$ entries in
which either $T$ or $T^{\prime}$ are affected by locking. The reason is that
an ML model cannot learn from operations from a selected locking pair if
neither $T$ nor $T^{\prime}$ operations are locked. In this sense,
$M_{sec}^{r}$ captures the security of the design when only considering locked
operations, i.e., the actual exploitability of the design. If a selected
locking pair is included during a locking procedure, certain ’x’ values in
$\bm{v_{o}}$ are set to 0. Thus, $M_{sec}^{r}$ is not monotonic.

If all types in $ODT$ are affected by locking, $M_{sec}^{r}\equiv
M_{sec}^{g}$. Furthermore, $M_{sec}^{r}=100$ does not imply $M_{sec}^{g}=100$,
since some operation types are not affected by locking. However, if
$M_{sec}^{g}=100$ then $M_{sec}^{r}=100$. These metrics are used by the
locking algorithms.

Input: Key budget $k_{b}$ and RTL design $D$

Output: Locked RTL design

$\textsc{LoadODT}(D)$

// Populate ODT

$n\leftarrow 0$

// Initialize used bits var

$\Theta\leftarrow\\{(T_{1},T^{\prime}_{1}),\ldots,(T_{n},T^{\prime}_{n})\\}$

// Valid locking pairs

1 while  _$n <k_{b}$_ do

$\vartheta\leftarrow\textsc{RndSelect}(\Theta)$

// Select a pair

$T\leftarrow\textsc{RndSelect}(\vartheta)$

// Select a type

2

3 while  _$\lvert ODT[T]\rvert >0$_ do

$s\leftarrow\textsc{Lock}(T,ODT,D,False)$

// Apply lock (Algorithm 1)

4 $n\leftarrow n+s$

5

6 end while

7

8 end while

9

10return _$D$_

Algorithm 3 ERA: Exact ML-Resilient Algorithm

###  4.2. Exact ML-Resilient Algorithm (ERA)

ERA (Algorithm 3) ensures that locking always yields a secure design even if
the key budget is exceeded. While the key budget is not exceeded (line 4), ERA
randomly selects a type $T$ from a randomly selected pair $\vartheta$ from
valid locking pairs $\Theta$ (lines 5-6). To ensure a secure solution after
each selection, the algorithm repeats the locking for the selected type until
$ODT[T]$ reaches 0 (lines 7-10). This way the selected operation pairs yield a
balanced solution. Thus, $M_{sec}^{r}=100$ after each locking round even if
the cost is more than allowed. Hence, ERA prioritizes security over cost. ERA
always locks all selected pairs until $ODT[T]$ reaches 0—all affected pairs
are guaranteed to be balanced. The security evaluation of an ERA-locked design
will result in $M_{sec}^{r}=100\%$, but not necessarily in
$M_{sec}^{g}=100\%$. The former states that all affected pairs are perfectly
balanced. The latter indicates that other parts of the design are exploitable
by ML if not locked properly (if $M_{sec}^{g}<100\%$).

Input: Key budget $k_{b}$ and RTL design $D$

Output: Locked RTL design

$\textsc{LoadODT}(D)$

// Populate ODT

$n\leftarrow 0$

// Initialize used bits var

$\bm{v_{i}}\leftarrow\textsc{ExtractVector}(D.ODT)$

// Initial vector

$\Theta\leftarrow\\{(T_{1},T^{\prime}_{1}),\ldots,(T_{n},T^{\prime}_{n})\\}$

// Valid locking pairs

1 while  _$n <k_{b}$_ do

$M_{sec}^{g}\leftarrow 0$

// Track max metric value

$j\leftarrow 0$

// Track operation index

$P\leftarrow\textsc{RndBoolean}(\hbox{})$

// Include randomness

2 if  _$P$_ then

3 $j\leftarrow\textsc{RndSelect}(\lvert\Theta\rvert)$

4

5 else

6 $\textsc{Shuffle}(\Theta)$

7 for  _$i\leftarrow 0;i <\lvert\Theta\rvert;i++$_ do

8 $\textsc{Lock}(\Theta[i][0],ODT,D,False)$

9 $\bm{v_{j}}\leftarrow\textsc{ExtractVector}(D.ODT)$

10 $M_{i}\leftarrow\textsc{EvalMetric}(\bm{v_{i}},\bm{v_{j}})$

$\textsc{UndoLock}(D)$

// Undo last lock

11 if  _$M_{i} >M_{sec}^{g}$_ then

12 $M_{sec}^{g}\leftarrow M_{i}$

13 $j\leftarrow i$

14

15

16 end for

17

18 end if

$s\leftarrow\textsc{Lock}(\Theta[j][0],ODT,D,P)$

// Apply lock (Algorithm 1)

19 $n\leftarrow n+s$

20

21 end while

22

23return _$D$_

Algorithm 4 HRA: Heuristic ML-Resilient Algorithm

###  4.3. Heuristic ML-Resilient Algorithm (HRA)

HRA (Algorithm 4) performs iterative fine-grained balancing of locking-pairs
in the target design to get closer to the secure solution at every step
without exceeding the key budget. While key bits are available (line 5), HRA
randomly chooses (line 8). Either a random operation type is chosen (line 10)
or the best type is chosen (lines 12-21). The latter case evaluates all
locking pairs in $\Theta$ and checks which one yields the highest increase in
$M_{sec}^{g}$. In both cases, the selected pair is locked by the Lock function
(line 23). As HRA performs fine-grained design adjustments, it uses the exact
key budget and trades off against the guarantee to reach a secure solution.
Since HRA ensures that every step increases security and decreases operation
imbalances, it must be guided by the monotonic $M_{sec}^{g}$ metric.

Figure 5. Security metrics: (a) search space and (b) evolution.

DES3DFTFIRIDFTIIRMD5RSASHA256SASCSIM_SPIUSB_PHYI2C_SLN_2046N_1023$0$$25$$50$$75$$100$Random
guessBenchmarksKPA (%)ASSUREHRAERA (a) KPA per benchmark

ASSUREHRAERA$0$$25$$50$$75$$100$$74.78$$74.26$$47.92$RTL locking algorithmsKPA
(%) (b) Average KPA

Figure 6. Evaluation results for the ML-based SnapShot attack on RTL locking.

###  4.4. Metric-Guided Design

The proposed metrics can be used to design various locking algorithms
targeting learning resilience. Let us consider a design with the following
$ODT$ entries: $\lvert ODT[(+,-)]\rvert=25$ and $\lvert
ODT[(<<,>>)]\rvert=10$. As depicted in Fig. 5a, $M_{sec}^{g}$ represents a
smooth, monotonic surface. Fig. 5b presents the evolution of the metric in
each step. The goal of locking is to move the target design from the initial
point (bottom right) to the secure point (top left). The path between these
two points represents different heuristic approaches. ERA forces selected
$ODT$ values to 0, thus jumping in two steps to the secure solution alongside
the edges of the surface. HRA travels in the steepest direction, taking small
steps and remaining on the highest line across the surface. A greedy approach
(same as HRA where $P$ in line 8 is always false) traverses the same points as
HRA. Fig. 5b suggests that a greedy approach is more efficient than HRA since
it reaches full security (i.e., metric equal to 100) with fewer key bits.
However, a greedy approach has a negative consequence: reversibility. An
attacker can reverse the locking procedure alongside the steepest decreasing
direction. Therefore, including random locking decisions within HRA (variable
$P$) thwarts reversibility—even if it takes longer to get to the secure
solution. Similar observations hold for $M_{sec}^{r}$ since $M_{sec}^{r}\equiv
M_{sec}^{g}$ when all $ODT$ entries are affected.

##  5\. Evaluation

We evaluate ASSURE-based locking policies against the state-of-the-art ML-
based SnapShot attack on a subset of the benchmarks used in (et al., 2021a).
Some benchmarks were excluded due to the low number of operations. We also
composed two synthetic benchmarks: N_2046 and N_1023, representing a fully
imbalanced (biased) design (a network of 2046 $+$ operations) and a fully
balanced design (a network with 1023 $+$ and $-$ operations), respectively. We
consider ASSURE (serial implementation), HRA, and ERA. Note that the cost of
the proposed algorithms are in line with the original ASSURE, as the cost of a
locking pair per key bit has not changed (et al., 2021a).

SnapShot for RTL: We adapted SnapShot (Fig. 2) to learn RTL key leaks by
extracting all key-controlled pairs $[K[i],C_{1},C_{2}]$, where $K[i]$ is the
key-bit value, and $C_{1}$, $C_{2}$ are encodings for an operation pair. We
assign each type a unique integer. The extractor uses the Pyverilog library
(Takamaeda-Yamazaki, 2015). Instead of one neural network type as in (et al.,
2021b), we use auto-sklearn (et al., 2015), a library for automatic ML (auto-
ml) model exploration. Auto-ml searches for an ML model among the
implementations and optimizes the hyperparameters. We selected 600 seconds per
attack iteration as this was enough for the attack to converge.

Attack setup: The test set for each algorithm comprises every benchmark locked
10 times with different keys. We assembled the training set by relocking each
test sample 1,000 times with different keys. Relocking was performed with
random ASSURE locking so that all parts of the design were used for learning;
thus, simulating the most effective attack. Both test and training keys are
set to 75% of the operations for each benchmark. This was exceeded for the
N_2046 benchmark, as its perfect imbalance requires a 100% key budget for ERA.
We assumed a best-case scenario for the attacker: a perfect reconstruction of
the initial, locked RTL.

Accuracy metric: Key Prediction Accuracy (KPA) is used to measure attack
success (et al., 2021b). N% KPA indicates that N of the key bits are correctly
predicted. The baseline random guess has 50% KPA.

###  5.1. Results and Discussion

Results: Fig. 6a presents the KPA evaluation results per locking algorithm and
benchmark, and Fig. 6b presents the average KPA across all benchmarks.
SnapShot correctly predicts 74.78% key bits for the original ASSURE
implementation, on average. The average KPA for HRA is slightly lower, 74.26%.
ERA averages $\sim$47.92% KPA with consistent KPA values around (or lower)
than a random guess.

Lessons learned: SnapShot’s success on HRA is at first surprising since it is
supposed to have a higher level of security than non-ML-driven serial locking.
However, since we use a key budget of 75% of the available operations, parts
of the design remain unaffected by locking. Hence, the training step can
extract knowledge about the design for an educated guess ($\sim$24 percentage
points better than random). Once all operations are fully balanced—as
guaranteed by ERA—the training fails to extract useful observations. The above
leads to a significant conclusion: when it comes to ML-driven attacks, half
measures are not effective. Data-driven approaches can exploit even the
slightest imbalance. In contrast, half-way measures can mitigate non-ML-driven
attacks, e.g., slightly increasing the key length can deteriorate a brute-
force attack. While HRA appears less promising, the heuristic is useful if
multiple security objectives must be reached, such as learning-resilience,
output corruptibility, and Boolean Satisfiability (SAT)-resistance (et al.,
2020b). Since ERA makes coarse-grained modifications, it might create radical
changes in the design. HRA improves learning resilience of locked designs
alongside other objectives in smaller and controlled locking steps as it only
decreases operation imbalance.

Limitations and opportunities: This study exploits individual locking
pairs—but is there a ”global bias” among designs? If so, this bias could help
determine the correct function of locked designs. The metric in Section 4.1
can extract the initial distance for selected designs by considering the
distance between the initial distribution and the optimal one. Are the locking
algorithms resilient to oracle-guided attacks? Moreover, locking has recently
been explored in combination with high-level synthesis (et al., 2021g, 2018,
2020d). Future efforts should evaluate the problem of learning resilience on
this abstraction level and address the mentioned challenges.

##  6\. Conclusion

We introduced the first concepts on designing and evaluating RTL locking using
ML-based attacks on operation obfuscation, and proposed two ML-resilient
locking algorithms. The heuristic algorithm is a controlled procedure that
decreases the imbalance of operations in an RTL design in small steps,
adhering to the allowed key budget. The exact algorithm guarantees ML
resilience but can exceed a key budget. We presented a security metric to
assess resilience of RTL locking to ML attacks that can guide the design
process of heuristic locking. Finally, we presented the first ML-based oracle-
less attack on RTL locking by adapting the state-of-the-art SnapShot attack.

ACKNOWLEDGMENTS
R. Karri was supported in part by ONR Award # N00014-18-1-2058, NSF Grant #
1526405, NYU Center for Cybersecurity, and NYUAD Center for Cybersecurity.

## References

  * (1)
  * Chakraborty and Bhunia (2010) R. S. Chakraborty and S. Bhunia. 2010.  RTL Hardware IP Protection Using Key-Based Control and Data Flow Obfuscation. In _2010 VLSI Design_. 405–410.  https://doi.org/10.1109/VLSI.Design.2010.54
  * et al. (2020a) B. Tan et al. 2020a.  Benchmarking at the Frontier of Hardware Security: Lessons from Logic Locking.  arXiv:cs.CR/2006.06806
  * et al. (2020b) C. Karfa et al. 2020b.  Is Register Transfer Level Locking Secure?. In _2020 DATE_. 550–555.  https://doi.org/10.23919/DATE48585.2020.9116261
  * et al. (2018) C. Pilato et al. 2018\.  TAO: Techniques for Algorithm-Level Obfuscation during High-Level Synthesis. In _2018 DAC_.  https://doi.org/10.1109/DAC.2018.8465830
  * et al. (2021a) C. Pilato et al. 2021a.  ASSURE: RTL Locking Against an Untrusted Foundry.  _IEEE TVLSI_ 29, 7 (2021), 1306–1318.  https://doi.org/10.1109/TVLSI.2021.3074004
  * et al. (2021b) D. Sisejkovic et al. 2021b.  Challenging the Security of Logic Locking Schemes in the Era of Deep Learning: A Neuroevolutionary Approach.  _ACM JETC_ 17, 3, Article 30 (May 2021), 26 pages.  https://doi.org/10.1145/3431389
  * et al. (2021c) D. Sisejkovic et al. 2021c.  Deceptive Logic Locking for Hardware Integrity Protection against Machine Learning Attacks.  _IEEE TCAD_ (2021).  https://doi.org/10.1109/TCAD.2021.3100275
  * et al. (2021d) D. Sisejkovic et al. 2021d.  Logic Locking at the Frontiers of Machine Learning: A Survey on Developments and Opportunities. In _2021 VLSI-SoC_. 1–6.  https://doi.org/10.1109/VLSI-SoC53125.2021.9606979
  * et al. (2008) J. A Roy et al. 2008\.  EPIC: Ending Piracy of Integrated Circuits. In _2008 DATE_. 1069–1074.  https://doi.org/10.1109/DATE.2008.4484823
  * et al. (2019) K. Shamsi et al. 2019\.  IP Protection and Supply Chain Security through Logic Obfuscation: A Systematic Overview.  _ACM Trans. Des. Autom. Electron. Syst._ 24, 6, Article 65 (sep 2019), 36 pages.  https://doi.org/10.1145/3342099
  * et al. (2021e) L. Alrahis et al. 2021e.  GNNUnlock: Graph Neural Networks-based Oracle-less Unlocking Scheme for Provably Secure Logic Locking. In _2021 DATE_. 780–785.  https://doi.org/10.23919/DATE51398.2021.9474039
  * et al. (2021f) L. Alrahis et al. 2021f.  OMLA: An Oracle-less Machine Learning-based Attack on Logic Locking.  _IEEE TCSII_ (2021), 1–1.  https://doi.org/10.1109/TCSII.2021.3113035
  * et al. (2015) M. Feurer et al. 2015\.  Efficient and Robust Automated Machine Learning. In _Advances in Neural Information Processing Systems 28 (2015)_. 2962–2970.
  * et al. (2021g) M. Muttaki et al. 2021g.  HLock: Locking IPs at the High-Level Language. In _2021 DAC_. 79–84.  https://doi.org/10.1109/DAC18074.2021.9586159
  * et al. (2016) M. Yasin et al. 2016\.  On Improving the Security of Logic Locking.  _IEEE TCAD_ 35, 9 (2016), 1411–1424.  https://doi.org/10.1109/TCAD.2015.2511144
  * et al. (2017a) M. Yasin et al. 2017a.  Evolution of logic locking. In _2017 VLSI-SoC_. 1–6.  https://doi.org/10.1109/VLSI-SoC.2017.8203496
  * et al. (2020c) M. Yasin et al. 2020c.  _Trustworthy Hardware Design: Combinational Logic Locking Techniques_.  Springer.  https://doi.org/10.1007/978-3-030-15334-2
  * et al. (2021h) P. Chakraborty et al. 2021h.  SAIL: Analyzing Structural Artifacts of Logic Locking Using Machine Learning.  _IEEE TIFS_ 16 (2021), 3828–3842.  https://doi.org/10.1109/TIFS.2021.3096028
  * et al. (2017b) S. Amir et al. 2017b.  Comparative Analysis of Hardware Obfuscation for IP Protection. In _2017 GLSVLSI_. 363–368.  https://doi.org/10.1145/3060403.3060495
  * et al. (2020d) S. A. Islam et al. 2020d.  High-Level Synthesis of Key-Obfuscated RTL IP with Design Lockout and Camouflaging.  _ACM Trans. Des. Autom. Electron. Syst._ 26, 1, Article 6 (oct 2020), 35 pages.  https://doi.org/10.1145/3410337
  * Takamaeda-Yamazaki (2015) S. Takamaeda-Yamazaki. 2015\.  Pyverilog: A Python-Based Hardware Design Processing Toolkit for Verilog HDL. In _2015 ARC_. 451–460.  http://dx.doi.org/10.1007/978-3-319-16214-0_42


# KG-particles in a cosmic string rainbow gravity spacetime in mixed magnetic
fields

Omar Mustafa<EMAIL_ADDRESS>Department of Physics, Eastern
Mediterranean University, 99628, G. Magusa, north Cyprus, Mersin 10 - Turkiye.

###### Abstract

Abstract: We investigate and report the effects of rainbow gravity on the
spectroscopic structure of KG-oscillators in a mixed magnetic field (in the
sense that it has the usually described as a uniform and a non-uniform
magnetic fields, each at a time) introduced by the 4-vector potential
$A_{\mu}=(0,0,A_{\varphi},0)$, where $A_{\varphi}=B_{1}r^{2}/2+B_{2}r$, and
$B_{1}$ and $B_{2}$ are magnetic field strengths. We also discuss and report
the effects of such a mixed magnetic field on the spectra of KG-oscillators in
cosmic string rainbow gravity. In so doing, we introduce a new and quite handy
conditionally exact solution associated with the truncation of the biconfluent
Heun functions into polynomials. Using a loop quantum gravity motivated
rainbow functions, we observe interesting effects when the magnetic field
strength $B_{2}$ grows up from zero. Such effects include energy levels
crossings which, in this case, turns the spectra of the KG-oscillators upside
down. Moreover, Landau-like signature on the spectra are observed and
discussed. Yet, interestingly, we also observe that rainbow gravity affects
the magnetic field as well, in the sense that the magnetic field becomes probe
particle energy-dependent one.

PACS numbers: 05.45.-a, 03.50.Kk, 03.65.-w

Keywords: Klein-Gordon (KG) oscillators, KG-Coulombic particles, magnetic
field, cosmic string spacetime, rainbow gravity.

##  I Introduction

Topological defects in the spacetime fabric are stable configurations of
matter that are believed to be formed during the rapid expansion and cooling
process at the phase transitions in the very early universe CR1 ; CR2 . The
type of the topological defect is determined by the symmetry properties of the
matter and the nature of the phase transition. Domain walls CR020 ; CR021
(two-dimensional objects formed when a discrete symmetry is broken), cosmic
strings CR021 ; CR3 ; CR4 ; CR5 ; CR6  (one-dimensional objects formed when
cylindrical symmetry is broken), and global monopoles (GM) CR2 ; CR3 ; CR6 ;
CR7  (zero-dimensional objects formed when spherical symmetry is broken), are
among such feasible topological defects, to mention a few. Cosmic strings are
the topological defects of our interest in the current study.

Rainbow gravity (RG), on the other hand, has inspired research studies for
years CR8 ; CR9 ; CR10 ; CR11 ; CR12 , for being a semi classical extension of
the doubly special relativity. In the ultra high energy regime (i.e.,
ultraviolet limit) , nevertheless, RG suggests that the energy of the probe
particle affects the spacetime background, in the sense that the corresponding
spacetime metric (using the units $c=\hbar=8\pi G=1$) takes the energy-
dependent form CR8 ; CR9 ; CR10 ; CR11 ; CR12 ; CR13 ; CR14 ; CR15 ; CR16 ;
CR17 ; CR18 ; CR19 ; CR20 ; CR21 ; CR22 ; CR23 ; CR24 ; CR25 ; CR26 ; CR27

$ds^{2}=-\frac{1}{g_{{}_{0}}\left(y\right)^{2}}dt^{2}+\frac{1}{g_{{}_{1}}\left(y\right)^{2}}\left(dr^{2}+\alpha^{2}\,r^{2}d\varphi^{2}+dz^{2}\right);\,\,0\leq\left(y=E/E_{p}\right)\leq
1.$ (1)

Where $0<\alpha^{2}=1-\eta/2\pi<1$ is a constant related to the deficit angle
of the conical spacetime, $G$ is the Newton’s constant, $\eta$ is the linear
mass density of the cosmic string, and $g_{{}_{k}}(y),k=0,1$, are called the
rainbow functions. The corresponding metric tensor $g_{\mu\nu}$ is given by

$g_{\mu\nu}=diag\left(-\frac{1}{g_{{}_{0}}\left(y\right)^{2}},\frac{1}{g_{{}_{1}}\left(y\right)^{2}},\frac{\alpha^{2}\,r^{2}}{g_{{}_{1}}\left(y\right)^{2}},\frac{1}{g_{{}_{1}}\left(y\right)^{2}}\right);\;\mu,\nu=t,r,\varphi,z,$
(2)

with

$\det\left(g_{\mu\nu}\right)=-\frac{\alpha^{2}\,r^{2}}{g_{{}_{0}}\left(y\right)^{2}g_{{}_{1}}\left(y\right)^{6}}\Longrightarrow
g^{\mu\nu}=diag\left(-g_{{}_{0}}\left(y\right)^{2},g_{{}_{1}}\left(y\right)^{2},\frac{g_{{}_{1}}\left(y\right)^{2}}{\alpha^{2}\,r^{2}},g_{{}_{1}}\left(y\right)^{2}\right).$
(3)

Under RG model, however, the Planck energy $E_{p}$ represents a threshold that
separates quantum from classical mechanical descriptions and introduces itself
as another invariant energy scale, in addition to the speed of light. RG
justifies, therefore, the modified relativistic energy-momentum dispersion
relation

$E^{2}g_{{}_{0}}\left(y\right)^{2}-p^{2}c^{2}g_{{}_{1}}\left(y\right)^{2}=m^{2}c^{4};\;0\leq\left(y=E/E_{p}\right)\leq
1,$ (4)

where $mc^{2}$ is its rest mass energy. Such a modification is significant in
the high energy regime and is restricted to retrieve the standard general
relativity dispersion relation in the infrared limit so that

$\lim\limits_{y\rightarrow 0}g_{{}_{k}}\left(y\right)=1;\;k=0,1.$ (5)

At this point, one should observe that the rainbow function variable $y$
satisfies $0\leq\left(y=E/E_{p}\right)\leq 1$ This would, in turn, suggest
that as long as relativistic quantum particles ($E=+|E|=E_{+}$) and anti-
particles ($E=-|E|=E_{-}$) are in point, it is mandatory to use a fine tuned
rainbow function variable $y=|E|/E_{p}$. Using such a fine tuned rainbow
function variable, we have very recently shown CR28 ; CR29  that rainbow
gravity works on relativistic particles and anti-particles alike. Otherwise,
rainbow gravity shows its effect on particles only and anti-particles would
have indefinitely unbounded energies. Violating, therefore, the intended
characteristic of rainbow gravity that the Planck energy $E_{p}$ is the
maximum possible energy for particles and anti-particles, i.e., $|E|=E_{p}$,
as observed in CR16 ; CR17 ; CR19 ; CR20 ; CR21 ; CR27 , to mention a few. We
have found CR28 ; CR29  that the loop quantum gravity motivated CR30 ; CR31
fine tuned rainbow functions pair

$g_{0}(y)=1,\,\,g_{1}(y)=\sqrt{1-\epsilon\,y^{n}}=\sqrt{1-\epsilon\left(\frac{|E|}{E_{p}}\right)^{n}};\,\,n=1,2,$
(6)

completely complies with the rainbow gravity model and secures Planck energy
$E_{p}$ as the maximum energy for particles and anti-particles. Whereas, the
rainbow function pairs $g_{0}(y)=g_{1}(y)=(1-\epsilon y)^{-1}$ used in
resolving the horizon problem CR22 ; CR32 , and $g_{0}(y)=(e^{\epsilon
y}-1)/\epsilon y$, $g_{1}(y)=1$ obtained from the spectra of gamma-ray bursts
CR13  have only partially complied with the intended rainbow gravity effect.
Hereby, we shall use the loop quantum gravity motivated pairs in (6) in the
current study.

Yet, the inclusion of a 4-vector potential $A_{\mu}=(0.0,A_{\varphi},0)$ CR33
, with $A_{\varphi}=A_{1,\varphi}+A_{2,\varphi}=B_{1}r^{2}/2+B_{2}r$ would
introduce a magnetic field $\textbf{B}=B_{z}\hat{z}$, where

$B_{z}^{2}=\frac{1}{2}F_{\mu\nu}F^{\mu\nu}=g^{rr}g^{\varphi\varphi}(\partial_{r}A_{\varphi}-\partial_{\varphi}A_{r})^{2}\Rightarrow
B_{z}=\frac{g_{1}(y)^{2}}{\alpha}\left[B_{1}+\frac{B_{2}}{r}\right].$ (7)

Obviously, in no rainbow gravity (i.e., $\epsilon=0\rightarrow g_{1}(y)=1$),
the first term would identify $B_{1}$ as the strength of the uniform magnetic
field part, and the second term would identify $B_{2}$ as the strength of the
non-uniform (i.e., $r$-dependent) magnetic field part. Yet, $B_{2}$ can be
identified as the strength of a uniform magnetic field (i.e., constant) at
every specific value of $r$. The magnetic fields produced by $A_{1,\varphi}$
and $A_{2,\varphi}$ are readily discussed in some details in CR33  (the reader
is advised to refer to for more details). However, under rainbow gravity, we
observe that both parts of the magnetic field in (7) are dependent on the
energy of the probe particle/anti-particle. The classifications of uniform
and/or non-uniform magnetic fields is a matter of perspective. We shall adopt
the simple notion of a mixed magnetic field hereinafter, therefore.

Rainbow gravity, nevertheless, has been a subject of different studies. To
mention a few, thermodynamical properties of black holes in RG CR33.1 ; CR33.2
; CR33.3 ; CR33.4 ; CR33.5 ; CR33.6 ; CR33.7 ; CR33.8 , stability of neutron
stars CR33.9 , TeV photons CR25 , and $f(R)$ theories CR33.10 . On the
relativistic and non-relativistic quantum mechanical side, moreover, studies
are carried out, for example, on Landau levels CR17 , Aharonov-Bohm effects on
Dirac oscillators CR33.11 ; CR33.12 , KG-Coulombic particles CR27 ; CR28 ,
DKP-particles by Hosseinpour et al. CR12 , etc.

In the current methodical proposal, we shall investigate KG-particles in a
cosmic string rainbow gravity spacetime in a mixed magnetic fields. In section
2, we start with KG-particles in cosmic string fine tuned rainbow gravity
spacetime and in a mixed magnetic field given by (7). In the same section, we
consider the KG-oscillators and bring the corresponding KG equation into the
one-dimensional Schrödinger oscillator form. The resulting Schrödinger form
consequently includes a harmonic oscillator, a Coulombic-like, and a linear
type interaction potential terms. The solution of which is usually given in
terms of the biconfluent Heun functions $H_{B}(\alpha,\beta,\gamma,\delta,z)$
that are truncated to a polynomial of order $n_{r}\geq 0$ when
$\gamma=2(n_{r}+1)+\alpha$. However, in the current methodical proposal, we
shall truncate the biconfluent Heun functions to a polynomial of order
$n_{r}+1$ and introduce a new condition that not only facilitates conditional
exact solvability of the problem at hand but also retrieves the condition
$\gamma=2(n_{r}+1)+\alpha$. We do so in section 3. Therein, we report and
discuss the most intriguing observation of the current study, represented by
energy levels crossings that flip the spectra of the KG-oscillators upside
down. This effect is a consequence of the structure of the mixed magnetic
field used (and has nothings to do with RG). In section 4 we discuss Landau-
like signatures on the spectroscopic structure of the KG-oscillators. Our
concluding remarks are given in section 5.

##  II KG-particles in cosmic string rainbow gravity spacetime and a mixed
magnetic field

In the cosmic string rainbow gravity spacetime background (1), a KG-particle
of charge $e$ in the 4-vector potential $A_{\mu}=(0,0,A_{\varphi},0)$, with
$A_{\varphi}=B_{1}r^{2}/2+B_{2}r$ is described (in $c=\hbar=1$ units) by the
KG-equation

$\frac{1}{\sqrt{-g}}\tilde{D}_{\mu}\left(\sqrt{-g}g^{\mu\nu}\tilde{D}_{\nu}\right)\Psi=m_{\circ}^{2}\Psi\Longrightarrow\frac{1}{\sqrt{-g}}\left(D_{\mu}+\mathcal{F}_{\mu}\right)\sqrt{-g}g^{\mu\nu}\left(D_{\nu}-\mathcal{F}_{\nu}\right)\Psi=m_{\circ}^{2}\Psi.$
(8)

where $D_{\mu}$ is the gauge-covariant derivative given by
$D_{\mu}=\partial_{\mu}-ieA_{\mu}$ and admits minimal coupling, $m_{\circ}$ is
the rest mass energy of the KG-particle, and $\mathcal{F}_{\mu}$ is usually
used to incorporate KG-oscillators CR33.13 ; CR33.14 . This equation would, in
a straightforward manner, imply, with

$\Psi\left(t,r,\varphi,z\right)=\exp\left(i\left[m\varphi+kz-
Et\right]\right)\phi\left(r\right),$ (9)

that

$\left\\{\tilde{E}^{2}+\left[\partial_{r}^{2}+\frac{1}{r}\partial_{r}-M\left(r\right)-\frac{1}{\alpha^{2}\,r^{2}}\left(m-eA_{\varphi}\right)^{2}\right]\right\\}\phi\left(r\right)=0,$
(10)

where $m=0,\pm 1,\pm 2,\cdots$ is the magnetic quantum number,

$\tilde{E}^{2}=\frac{g_{0}(y)^{2}E^{2}-m_{\circ}^{2}-g_{1}(y)^{2}k^{2}}{g_{1}(y)},$
(11)

and

$M\left(r\right)=\mathcal{F}_{r}^{\prime}+\frac{\mathcal{F}_{r}}{r}+\mathcal{F}_{r}^{2},$
(12)

We now substitute $A_{\varphi}=B_{1}r^{2}/2+B_{2}r$, and
$\mathcal{F}_{r}=\Omega r$ (to incorporate KG-oscillators CR33.13 ; CR33.14
in the process), to obtain

$\left\\{\partial_{r}^{2}+\frac{1}{r}\partial_{r}-\frac{\tilde{m}^{2}}{r^{2}}-\tilde{\Omega}^{2}r^{2}+\frac{2\tilde{m}\tilde{B}_{2}}{r}-\tilde{B}_{1}\tilde{B}_{2}r+\lambda^{2}\right\\}\phi\left(r\right)=0,$
(13)

where

$\lambda^{2}=\tilde{E}^{2}-(\tilde{B}_{2}^{2}-\tilde{m}\tilde{B}_{1})-2\Omega\,;\;\tilde{\Omega}^{2}=\Omega^{2}+\frac{\tilde{B}_{1}^{2}}{4}\,,\;\tilde{m}=\frac{m}{\alpha},\;\tilde{B}_{i}=\frac{eB_{i}}{\alpha}.$
(14)

Moreover, with $\phi\left(r\right)=U\left(r\right)/\sqrt{r}$ we obtain the
two-dimensional radial KG-oscillators

$\left\\{\partial_{r}^{2}-\frac{\left(\tilde{m}^{2}-1/4\right)}{r^{2}}-\tilde{\Omega}^{2}r^{2}+\frac{2\tilde{m}\tilde{B}_{2}}{r}-\tilde{B}_{1}\tilde{B}_{2}r+\lambda^{2}\right\\}U\left(r\right)=0.$
(15)

This equation is known to admit a solution in the form of biconfluent Heun
functions so that

$U(r)=r^{|\tilde{m}|+\frac{1}{2}}\,e^{\left(-\frac{\tilde{\Omega}r^{2}}{2}-\frac{\tilde{B}_{1}\tilde{B}_{2}r}{2\tilde{\Omega}}\right)}\,H_{B}\left(2|\tilde{m}|,\frac{\tilde{B}_{1}\tilde{B}_{2}}{\tilde{\Omega}^{3/2}},\frac{\tilde{B}_{1}^{2}\tilde{B}_{2}^{2}+4\lambda^{2}\tilde{\Omega}^{2}}{4\tilde{\Omega}^{3}},-\frac{4|\tilde{m}|\tilde{B}_{2}}{\sqrt{\tilde{\Omega}}},\sqrt{\tilde{\Omega}}r\right).$
(16)

The biconfluent Heun function $H_{B}(\alpha,\beta,\gamma,\delta,z)$ is
truncated to a polynomial of order $n_{r}\geq 0$ for
$\gamma=2(n_{r}+1)+\alpha$ to imply that

$\lambda^{2}=2\tilde{\Omega}(n_{r}+|\tilde{m}|+1)-\frac{\tilde{B}_{1}^{2}\tilde{B}_{2}^{2}}{4\tilde{\Omega}^{2}}.$
(17)

This truncation condition is to be accompanied by additional conditions that
facilitate a so called conditional exact solvability of the problem at hand.
One of such additional conditions is discussed by Ronveaux CR34 , some other
conditions on the confluent Heun functions are discussed by Ishkhanyan et al
CR35 , and very recently a quit handy condition is introduced by Mustafa et al
CR36 . The later is to be adopted and followed in the current methodical
proposal to obtain a conditional exact solution, as well as retrieve the
results of some special examples, to be illustrated below .

##  III Conditionally exact energies for KG-oscillators in cosmic string
rainbow gravity spacetime and a mixed magnetic field

We recollect equation (13) and use the substitution

$\phi\left(r\right)=exp\left(-\frac{\tilde{\Omega}r^{2}}{2}-\frac{\tilde{B}_{1}\tilde{B}_{2}r}{2\tilde{\Omega}}\right)\,\frac{R(r)}{\sqrt{r}},$
(18)

Figure 1:  The energy levels for the KG-oscillators in cosmic string rainbow
gravity and a mixed magnetic field with the rainbow functions pair
$g_{0}(y)=1,\,g_{1}(y)=\sqrt{1-\eta|E|}$, given by Eq.(35), plotted at
$\alpha=0.5,\,m_{\circ}=1=q=k$ for $n_{r}=0,1,2,3,$ and $m=1$, where (a) $E$
against $B_{1}$ for $\eta=0$ (no rainbow gravity) and $B_{2}=1$, (b) $E$
against $B_{1}$ for $\eta=0.1$ and $B_{2}=1$, and (c) $E$ against the KG-
oscillator frequency $\Omega$ for $\eta=0.1$ and $B_{2}=1$.

to obtain

$-\frac{\tilde{\Omega}^{2}r^{2}}{2}R^{\prime\prime}(r)+\tilde{\Omega}r^{2}\left(\tilde{\Omega}^{2}r+\frac{\tilde{B}_{1}\tilde{B}_{2}}{2}\right)R^{\prime}(r)-\frac{1}{2}(P_{1}r^{2}+P_{2}r-P_{3})R(r)=0,$
(19)

where

$P_{1}=\lambda^{2}\tilde{\Omega}^{2}+\frac{\tilde{B}_{1}^{2}\tilde{B}_{2}^{2}}{4}-\tilde{\Omega}^{3}\,,\,\,P_{2}=2\tilde{m}\tilde{B}_{2}\tilde{\Omega}^{2}\,,\,\,P_{3}=\tilde{\Omega}^{2}\left(\tilde{m}^{2}-\frac{1}{4}\right).$
(20)

We now use a power series expansion in the form of

$R(r)=r^{\nu}\sum\limits_{j=0}^{\infty}A_{j}\,r^{j},$ (21)

to obtain

$\displaystyle\sum\limits_{j=0}^{\infty}\left\\{A_{j}\,\left[\tilde{\Omega}^{3}(j+\nu)-\frac{P_{1}}{2}\right]+A_{j+1}\left[\frac{\tilde{B}_{1}\tilde{B}_{2}\tilde{\Omega}}{2}\left(j+\nu+1\right)-\frac{P_{2}}{2}\right]\right.$
$\displaystyle\left.+A_{j+2}\left[\frac{P_{3}}{2}-\frac{\tilde{\Omega}^{2}}{2}\left(j+\nu+1\right)\left(j+\nu+2\right)\right]\right\\}r^{j+\nu+2}$
$\displaystyle+\left\\{A_{0}\left[\frac{\tilde{B}_{1}\tilde{B}_{2}\tilde{\Omega}\nu}{2}-\frac{P_{2}}{2}\right]+A_{1}\left[\frac{P_{3}}{2}-\frac{\tilde{\Omega}^{2}}{2}\nu\left(\nu+1\right)\right]\right\\}r^{\nu+1}$
$\displaystyle+A_{0}\left[\frac{P_{3}}{2}-\frac{\tilde{\Omega}^{2}}{2}\nu\left(\nu-1\right)\right]r^{\nu}=0.$
(22)

Which would suggest that since $A_{0}\neq 0$ we get

$\frac{P_{3}}{2}-\frac{\tilde{\Omega}^{2}}{2}\nu\left(\nu-1\right)=0\Rightarrow\nu=|\tilde{m}|+\frac{1}{2},$
(23)
$A_{0}\left[\frac{\tilde{B}_{1}\tilde{B}_{2}\tilde{\Omega}\nu}{2}-\frac{P_{2}}{2}\right]+A_{1}\left[\frac{P_{3}}{2}-\frac{\tilde{\Omega}^{2}}{2}\nu\left(\nu+1\right)\right]=0\Rightarrow
A_{1}=\frac{\tilde{B}_{2}\left[\frac{\tilde{B}_{1}}{2}\left(|\tilde{m}|+\frac{1}{2}\right)-\tilde{m}\tilde{\Omega}\right]}{\tilde{\Omega}\left(|\tilde{m}|+\frac{1}{2}\right)}A_{0},$
(24)

and

Figure 2:  The energy levels for the KG-oscillators in cosmic string rainbow
gravity and a mixed magnetic field with the rainbow functions pair
$g_{0}(y)=1,\,g_{1}(y)=\sqrt{1-\eta|E|}$, given by Eq.(35), plotted at
$\alpha=0.5,\,m_{\circ}=1=q=k$ for different $(n_{r},m)$-states, where (a) $E$
against $B_{1}$ for $\eta=0$ (no rainbow gravity) and $B_{2}=1$, (b) $E$
against the KG-oscillator frequency $\Omega$ for $\eta=0.1$ and $B_{2}=1$, (c)
$E$ against $B_{2}$ for $\eta=0$ (no rainbow gravity) and $\Omega=1$, and (d)
$E$ against $B_{2}$ for $\eta=0.1$ and $\Omega=1$.

$\displaystyle
A_{j}\,\left[\tilde{\Omega}^{3}(j+\nu)-\frac{P_{1}}{2}\right]+A_{j+1}\left[\frac{\tilde{B}_{1}\tilde{B}_{2}\tilde{\Omega}}{2}\left(j+\nu+1\right)-\frac{P_{2}}{2}\right]$
$\displaystyle+A_{j+2}\left[\frac{P_{3}}{2}-\frac{\tilde{\Omega}^{2}}{2}\left(j+\nu+1\right)\left(j+\nu+2\right)\right]=0.$
(25)

Consequently, one obtains, for $j=0,1,2,\cdots$,

$\displaystyle
A_{2}=\frac{A_{0}\,\left[\tilde{\Omega}^{3}(\nu)-\frac{P_{1}}{2}\right]+A_{1}\left[\frac{\tilde{B}_{1}\tilde{B}_{2}\tilde{\Omega}}{2}\left(\nu+1\right)-\frac{P_{2}}{2}\right]}{\left[\frac{\tilde{\Omega}^{2}}{2}\left(\nu+1\right)\left(\nu+2\right)-\frac{P_{3}}{2}\right]},$
(26) $\displaystyle
A_{3}=\frac{A_{1}\,\left[\tilde{\Omega}^{3}(\nu+1)-\frac{P_{1}}{2}\right]+A_{2}\left[\frac{\tilde{B}_{1}\tilde{B}_{2}\tilde{\Omega}}{2}\left(\nu+2\right)-\frac{P_{2}}{2}\right]}{\left[\frac{\tilde{\Omega}^{2}}{2}\left(\nu+2\right)\left(\nu+3\right)-\frac{P_{3}}{2}\right]},$
(27)

Figure 3:  The energy levels for the KG-oscillators in cosmic string rainbow
gravity and a mixed magnetic field with the rainbow functions pair
$g_{0}(y)=1,\,g_{1}(y)=\sqrt{1-\eta E^{2}}$, given by Eq.(36), plotted at
$\alpha=0.5,\,m_{\circ}=1=q=k$ for $n_{r}=0,1,2,3,$ and $m=1$, where (a) $E$
against $B_{1}$ for $\eta=0$ (no rainbow gravity) and $B_{2}=1$, (b) $E$
against $B_{1}$ for $\eta=0.1$ and $B_{2}=1$, and (c) $E$ against the KG-
oscillator frequency $\Omega$ for $\eta=0.1$ and $B_{2}=1$.

and so on. At this point, we suggest a new truncation condition that
facilitates conditional exact solvability of the problem at hand and, at the
same time, retrieves the result in (17).

Our three terms recursion relation (25) allows us to use a valid/viable
truncation condition so that $\forall{j}=n_{r}$ we may assume that
$A_{n_{r}+2}=0$, $A_{n_{r}+1}\neq 0$, and $A_{n_{r}}\neq 0$. The first,
$A_{n_{r}+2}=0$, would truncate the power series to a polynomial of order
$(n_{r}+1)\geq 1$. The second and the third would, in turn, validate the
assumption that their coefficients identically vanish. That is,
$\forall{j}=n_{r}$, we have

$\frac{\tilde{B}_{1}\tilde{B}_{2}\tilde{\Omega}}{2}\left(n_{r}+\nu+1\right)-\frac{P_{2}}{2}=0\Rightarrow\Omega^{2}=\frac{\tilde{B}_{1}^{2}}{4\tilde{m}^{2}}\left[\left(n_{r}+|\tilde{m}|+\frac{3}{2}\right)^{2}-\tilde{m}^{2}\right],$
(28)

and

$\tilde{\Omega}^{3}(n_{r}+\nu)-\frac{P_{1}}{2}=0\Rightarrow\lambda^{2}=2\tilde{\Omega}(n_{r}+|\tilde{m}|+1)-\frac{\tilde{B}_{1}^{2}\tilde{B}_{2}^{2}}{4\tilde{\Omega}^{2}}.$
(29)

Notably, while the result in (29) is consistent with that in (17), the result
in (28) provides a parametric correlation between the magnetic fields
$B_{1,z}={g_{1}(y)^{2}B_{1}/\alpha}$ and the KG-oscillator’s frequency
$\Omega$. This correlation is clearly mandatory (and is an alternative to the
condition provided by Ronveaux CR34 ) for the condition used to obtain the
result in (17). Our result in (29) would consequently yield

$g_{0}(y)^{2}E^{2}-m_{\circ}^{2}=g_{1}(y)^{2}\mathcal{G}_{n_{r},m},$ (30)

where

$\mathcal{G}_{n_{r},m}=2\tilde{\Omega}(n_{r}+|\tilde{m}|+1)-\frac{\tilde{B}_{1}^{2}\tilde{B}_{2}^{2}}{4\tilde{\Omega}^{2}}+k^{2}+(\tilde{B}_{2}^{2}-\tilde{m}\tilde{B}_{1})+2\Omega.$
(31)

We start with the rainbow functions pair
$g_{0}(y)=1,\,\,g_{1}(y)=\sqrt{1-\epsilon y}=\sqrt{1-\eta|E|}$, where
$\eta=\epsilon/E_{p}$. In this case, our result in (30) would imply

$E^{2}+\eta\,\mathcal{G}_{n_{r},m}\,|E|-\left(m_{\circ}^{2}+\mathcal{G}_{n_{r},m}\right)=0.$
(32)

Figure 4:  The energy levels for the KG-oscillators in cosmic string rainbow
gravity and a mixed magnetic field with the rainbow functions pair
$g_{0}(y)=1,\,g_{1}(y)=\sqrt{1-\eta|E|}$, given by Eq.(36), plotted at
$\alpha=0.5,\,m_{\circ}=1=q=k$ for different $(n_{r},m)$-states, where (a) $E$
against $B_{1}$ for $\eta=0$ (no rainbow gravity) and $B_{2}=1$, (b) $E$
against the KG-oscillator frequency $\Omega$ for $\eta=0.1$ and $B_{2}=1$, (c)
$E$ against $B_{2}$ for $\eta=0$ (no rainbow gravity) and $\Omega=1$, and (d)
$E$ against $B_{2}$ for $\eta=0.1$ and $\Omega=1$.

Which would read

$E_{+}^{2}+\eta\,\mathcal{G}_{n_{r},m}\,E_{+}-\left(m_{\circ}+\mathcal{G}_{n_{r},m}\right)=0\Rightarrow
E_{+}=-\frac{\eta\,\mathcal{G}_{n_{r},m}}{2}+\sqrt{\frac{\eta^{2}\,\mathcal{G}_{n_{r},m}^{2}}{4}+\left(m_{\circ}^{2}+\mathcal{G}_{n_{r},m}\right)},$
(33)

for $E=+E_{+}=+|E|$, and

$E_{-}^{2}-\eta\,\mathcal{G}_{n_{r},m}\,E_{-}-(m_{\circ}+\mathcal{G}_{n_{r},m})=0\Rightarrow
E_{-}=+\frac{\eta\,\mathcal{G}_{n_{r},m}}{2}-\sqrt{\frac{\eta^{2}\,\mathcal{G}_{n_{r},m}^{2}}{4}+(m_{\circ}^{2}+\mathcal{G}_{n_{r},m})},$
(34)

for $E=E_{-}=-|E|$. This would eventually yield

$E_{\pm}=\mp\frac{\eta\,\mathcal{G}_{n_{r},m}}{2}\pm\sqrt{\frac{\eta^{2}\,\mathcal{G}_{n_{r},m}^{2}}{4}+\left(m_{\circ}^{2}+\mathcal{G}_{n_{r},m}\right)}.$
(35)

In Figures 1, we plot the energy levels for the KG-oscillators given by
Eq.(35), for $(n_{r},m)$-states with $n_{r}=0,1,2,3,$ and magnetic quantum
number $m=1$ (i.e., the minimum allowed $m$ value as mandated by the
correlation in (28)). To observe rainbow gravity effect, we compare the energy
levels, in 1(a), $E$ against $B_{1}$ at $\eta=0$ (no rainbow gravity) and
$B_{2}=1$, with those in 1(b) for $\eta=0.1$. Moreover, the rainbow gravity
effect is also observed in 1(c) for $E$ against the KG-oscillator frequency
$\Omega$ with $\eta=0.1$. In Figure 2, we plot the energy levels for different
$(n_{r},m)$-states, namely, states labeled $(2,1),(3,2),(4,3),(5,4)$. Where,
the comparison between 2(a), with no rainbow gravity, and 2(b), with rainbow
gravity, would clearly identify the rainbow gravity effect. In 2(b), without
rainbow gravity, and 2(c), with rainbow gravity, we plot $E$ against $B_{2}$
and observe, along with rainbow gravity effect, energy levels crossings. Such
energy levels crossings may very well be identified as occasional degeneracies
due to the structure of $\mathcal{G}_{n_{r},m}$ in (31) and has nothings to do
with rainbow gravity (as documented in 2(c)), but such degeneracies are rather
manifestly introduced by the two $B_{2}$ competing terms of
$\mathcal{G}_{n_{r},m}$ (i.e., the second and the fourth terms in (31)). These
energy levels crossing are consequences of the effect of $B_{2}$, therefore.
Such energy levels crossings turn the spectra of the KG-oscillator upside
down, as $B_{2}$ grows up passing the crossing points. In both figures 1 and
2, we observe that under rainbow gravity, the maximum allowed energy is given
by $|E|_{max}=1/\eta=E_{p}$ for $\epsilon=1$. This is made obvious in the
related figures as $|E|_{max}\approx 10$ for $\eta=0.1$ value used therein.

Next, we consider the rainbow functions pair
$g_{0}(y)=1,\,\,g_{1}(y)=\sqrt{1-\epsilon y^{2}}=\sqrt{1-\zeta E^{2}}$, where
$\zeta=\epsilon/E_{p}^{2}$ in (30) to obtain

$E^{2}\,\left(1+\zeta\,\mathcal{G}_{n_{r},m}\right)=m_{\circ}^{2}+\mathcal{G}_{n_{r},m}\Rightarrow
E=E_{\pm}=\pm\sqrt{\frac{m_{\circ}^{2}+\mathcal{G}_{n_{r},m}}{\left(1+\zeta\,\mathcal{G}_{n_{r},m}\right)}}.$
(36)

In Figures 3 and 4, we plot the energy levels we plot the energy levels for
(36) for $(n_{r},m)$-states with $n_{r}=0,1,2,3,$ and magnetic quantum number
$m=1$ (i.e., the minimum allowed $m$ value as mandated by the correlation in
(28)). We observe the rainbow gravity effects through the comparison between
the energy levels, in 3(a), against $B_{1}$ at $\eta=0$ (no rainbow gravity)
and $B_{2}=1$, with those in 3(b) against $B_{1}$ and in 3(c) against the KG-
oscillator frequency $\Omega$ for $\eta=0.1$. In Figure 4, we plot the energy
levels for different $(n_{r},m)$-states, namely, states labeled
$(2,1),(3,2),(4,3),(5,4)$. Where, the comparison between the energy levels in
4(a against $B_{1}$, in no rainbow gravity, and in 4(b) against $B_{1}$, in
rainbow gravity, clearly documents the rainbow gravity effect. In 4(c) against
$B_{2}$, without rainbow gravity, and 4(d) against $B_{2}$, with rainbow
gravity, and again observe, along with rainbow gravity effect, energy levels
crossings (such energy levels crossings, again, turn the spectra of the KG-
oscillator upside down, in this case. ). Yet again in both figures 3 and 4, we
observe that under, rainbow gravity, the maximum allowed energy is given by
$|E|_{max}=1/\sqrt{\zeta}=E_{p}$ for $\epsilon=1$. This is reflected on the
related rainbow gravity figures 3 and 4 as $|E|_{max}\approx 3.16$ for
$\zeta=0.1$ value used therein.

##  IV Landau-like signature on the KG-oscillators energies

Complementary to the above discussion, one may set $B_{2}=0$. In this case,
the coefficients of $A_{n_{r}+1}$ would readily disappear and our correlation
in (28) cease to exist (by the LHS part definition of the said correlation).
As a result, our solution would be now classified as an exact solution with
our $\mathcal{G}_{n_{r},m}$ in (31) now reads

${\mathcal{G}}_{n_{r},m}=2\tilde{\Omega}(n_{r}+|\tilde{m}|+1)+k^{2}-\tilde{m}\tilde{B}_{1}+2\Omega.$
(37)

Obviously, a Landau-like signature on the energy levels is introduced by the
third term, $\tilde{m}\tilde{B}_{1}$. Our energy levels reported in (35) and
(36) remain the same but with our new $\mathcal{G}_{n_{r},m}$ in (37). In the
absence of rainbow gravity, for example, the KG-oscillators’ Landau-like
energy levels are given by

$E_{\pm}=\pm\sqrt{m_{\circ}^{2}+2\tilde{\Omega}(n_{r}+|\tilde{m}|+1)+k^{2}-\tilde{m}\tilde{B}_{1}+2\Omega}.$
(38)

Of course, such Landau-like signatures can also be traced in the spectra of
the KG-oscillators discussed in the preceding section in the mixed magnetic
field used.

At this point, one should observe that the same result in (38) is also
obtainable using the intimate relation between the biconfluent Heun function
and the confluent hypergeometric functions
$H_{B}(\alpha,0,\gamma,0,z)=\,_{1}F_{1}\left(\frac{1}{2}+\frac{\alpha}{4}-\frac{\gamma}{4},1+\frac{\alpha}{2},z^{2}\right)$
in (16) and the related truncation condition for the confluent hypergeometric
function to a polynomial of order $n_{r}\geq 0$ (i.e.,
$\gamma=4n_{r}+2+\alpha$ so that our $\alpha=2|\tilde{m}|$,
$\gamma=\lambda^{2}/\tilde{\Omega}$, and $z=\sqrt{\tilde{\Omega}}r$ ).

##  V Concluding remarks

In this paper, we have studied and investigated KG-oscillators in cosmic
string rainbow gravity spacetime in a mixed magnetic field generated by the
4-vector potential
$A_{\varphi}=A_{1,\varphi}+A_{2,\varphi}=B_{1}r^{2}/2+B_{2}r$. Such a 4-vector
potential structure would introduce a magnetic field
$\textbf{B}=\textbf{B}_{1}+\textbf{B}_{2}=\hat{z}\,B_{z}$, representing the
superposition of two magnetic fields such that
$A_{1,\varphi}\Rightarrow\textbf{B}_{1}=\hat{z}\,{g_{1}(y)^{2}}B_{1}/{\alpha}$
and
$A_{2,\varphi}\Rightarrow\textbf{B}_{2}=\hat{z}\,{g_{1}(y)^{2}}B_{2}/{\alpha
r}$ to yield the total magnetic field given in (7). Obviously, in no rainbow
gravity (i.e., $g_{1}(y)=1$), $\textbf{B}_{1}$ is considered to be a uniform
magnetic field, whereas $\textbf{B}_{2}$ is considered as a non-uniform one.
Hence, the superposition of the two would be classified as non-uniform. At
this point, the reader should be reminded that $\textbf{B}_{1}$ satisfies the
homogeneous Maxwell equations whereas $\textbf{B}_{2}$ satisfies the
inhomogeneous Maxwell equations in the non-null electrovacuum. The later could
only be generated by a non-zero current
$J_{\varphi}=g_{\varphi\varphi}J^{\varphi}=-B_{2}\,g_{1}(y)^{2}/\mu_{\circ}r$
manifestly introduced by a string at $r=0$, at which the current is divergent.
Both magnetic fields, moreover, satisfy the two fundamental invariants of the
electromagnetic fields (as discussed in more details in CR33 ). Under rainbow
gravity, however, the two magnetic fields (each at a time or both at the same
time) become probe particle/anti-particle energy-dependent magnetic fields.
Interestingly, rainbow gravity does not only affect the spectroscopic
structure of the quantum mechanical system at hand but also affects the
magnetic field structure.

The mixed magnetic field setting is used for the first time in the current
proposal, to the best of our knowledge. Therefore, in order to clearly
distinguish between the effects of rainbow gravity and the effects of the
mixed magnetic field, we sought some rainbow functions pairs that fully comply
with the intended rainbow gravity characteristic (i.e., $|E_{max}|\leq E_{p}$
), for both particles and anti-particles alike. Our experience in CR28 ; CR29
has left us with no doubt that the loop quantum gravity motivated CR30 ; CR31
rainbow functions, (6), are the most suitable ones to use hereinabove. Only
under such a sample model one may do healthful analysis, in our opinion. One
may, nevertheless, wish to investigate, within the current methodical proposal
setting, the rainbow function pair $g_{0}(y)=(e^{\epsilon y}-1)/\epsilon y$,
$g_{1}(y)=1$ associated with gamma-ray bursts CR13 . and/or use the the pair
$g_{0}(y)=g_{1}(y)=(1-\epsilon y)^{-1}$ associated with the horizon problem
CR22 ; CR32 . The use of which already lies far beyond the scope of the
current study.

In the light of our experience above, the energy levels of the KG-oscillators
in cosmic string rainbow gravity are observed to fully comply with rainbow
gravity and secure their maximum possible energies to remain below the Planck
energy scale, i.e., $|E_{\pm}|\leq E_{p}$, for the loop quantum gravity
motivated rainbow functions in (6). Such rainbow gravity effect is readily
documented in the figures reported above.

Figure 5:  Equation (39) for different values of $B_{2}$ using the
corresponding values used in figure 2(c)

Notably, the correlation (28) that facilitates the conditional exact
solvability constraints our magnetic quantum number to satisfy $m\geq 1$. The
quantum states with $m=0$ are left unfortunate, therefore. This is the price
one has to pay in the absence of exact solvability of quantum mechanical
systems, However, we have reported a significant set of quantum states that
allowed us to adequately study/analyse the effects of the gravitational field
of the cosmic string on the KG-oscillators under rainbow gravity settings and
in a mixed magnetic field. The most intriguing observation of the current
study, nevertheless, are the energy levels crossings (or may very well be
identified as occasional degeneracies) that are manifested in the process of
increasing the magnetic field strength $B_{2}$. The energy levels crossings
have flipped over the spectra in such away that the KG-oscillators’ spectra is
turned upside down. This effect is in fact a consequence of the structure of
$\mathcal{G}_{n_{r},m}$ in (31) (and has nothings to do with rainbow gravity
as documented in 2(c)). That is, in terms of $\tilde{B_{1}}$ and
$\tilde{B_{2}}$ one may rewrite $\mathcal{G}_{n_{r},m}$ of (31)), using the
correlation (28) , as

$\displaystyle\mathcal{G}_{n_{r},m}=\frac{\tilde{B_{1}}}{|\tilde{m}|}(n_{r}+|\tilde{m}|+1)(n_{r}+|\tilde{m}|+\frac{3}{2})-\frac{\tilde{m}^{2}\tilde{B}_{2}^{2}}{(n_{r}+|\tilde{m}|+\frac{3}{2})^{2}}$
$\displaystyle+\tilde{B}_{2}^{2}-\tilde{m}\tilde{B}_{1}+\frac{\tilde{B_{1}}}{|\tilde{m}|}\sqrt{(n_{r}+|\tilde{m}|+\frac{3}{2})^{2}-\tilde{m}^{2}}+k^{2},$
(39)

where, by the correlation (28), we have used

$\tilde{B_{1}}=\frac{2|\tilde{m}|\Omega}{\sqrt{(n_{r}+|\tilde{m}|+\frac{3}{2})^{2}-\tilde{m}^{2}}}.$
(40)

Therefore, the implicit competition between the two magnetic fields in (39)
shapes the spectroscopic structure and yields energy levels crossing that
consequently turns the spectra upside down as $B_{2}$ increases. In figure 5,
we plot $\mathcal{G}_{n_{r},m}$ of (39) against $B_{2}$ for the corresponding
values used in figure 2(c). Figure 5 clearly indicates that the behavior of
$\mathcal{G}_{n_{r},m}$ against $B_{2}$ is inherited by the energy levels
against $B_{2}$ plotted and reported above. One should clearly observe that
the contribution of the second term in (39) decreases for larger quantum
numbers while the third term remains the same, for a given $B_{2}$.

Our new truncation approach of the biconfluent Heun function to a polynomial
of order $(n_{r}+1)\geq 1$ (and not to a polynomial of order $n_{r}\geq 0$)
has manifestly introduced a new alternative condition to those described by
Ronveaux CR34  and/or by Ishkhanyan et al CR35 . Such a new truncation recipe
retrieves the results of Ronveaux CR34  and/or Ishkhanyan et al CR35  on the
truncation of biconfluent Heun function $H_{B}(\alpha,\beta,\gamma,\delta,z)$
to a polynomial of order $n_{r}\geq 0$ (and not of order $(n_{r}+1)\geq 0$)
for $\gamma=2(n_{r}+1)+\alpha$. We have rather used the new truncation
conditions so that $\forall{j}=n_{r}$ we may assume that $A_{n_{r}+2}=0$,
$A_{n_{r}+1}\neq 0$, and $A_{n_{r}}\neq 0$. Whilst the first, $A_{n_{r}+2}=0$,
would truncate the power series into a polynomial of order $(n_{r}+1)\geq 1$,
the vanishing coefficients of the second, $A_{n_{r}+1}\neq 0$, would yield
that $\delta--\beta(2n_{r}+\alpha+3)$ as an alternative recipe (the details on
such recipe of the solution of the biconfluent Heun equation are discussed in
the Appendix below).

Finally, our analysis above provides a brute force documentation that supports
the argument of Bezerra et al CR17  on that rainbow gravity is not merely a
mathematical time-coordinate rescaling. We have clearly observed that rainbow
gravity not only significantly affects the spectroscopic structure of the
quantum particles but also renders the magnetic field to be energy-dependent.
To the best of our knowledge, KG-oscillators in a cosmic string rainbow
gravity in the above mixed magnetic field have never been discussed elsewhere.
Yet, the current methodical proposal provides a set of conditionally exactly
solvable models that are very frequently used to study the gravitational
fields effects that are of interest in not only quantum gravity but also in
condense matter physics.

##  VI Appendix: Biconfluent Heun equation conditional exact solvability

In this appendix we would like to recollect the biconfluent Heun equation and
introduce a new conditionally exact solution recipe. The biconfluent Heun
functions $H_{B}(\alpha,\beta,\gamma,\delta,x)$ are known to be the solutions
for the Heun equation CR34 ; CR35

$xy^{\prime\prime}(x)+(\tilde{\alpha}-\beta
x-2x^{2})y^{\prime}(x)+(\tilde{\gamma}x-\tilde{\delta})y(x)=0,$ (41)

where

$\tilde{\alpha}=1+\alpha,\,\,\tilde{\gamma}=\gamma-\alpha-2,\,\,\tilde{\delta}=\frac{1}{2}\left[\delta+(1+\alpha)\beta\right]$
(42)

The power series expansion in the form of

$y(x)=x^{\nu}\sum\limits_{j=0}^{\infty}A_{j}\,x^{j},$ (43)

would, in a straightforward manner, imply

$\displaystyle\sum\limits_{j=0}^{\infty}\left\\{A_{j}\,\left[\tilde{\gamma}-2(j+\nu)\right]-A_{j+1}\left[\tilde{\delta}+\beta(j+\nu+1)\right]+A_{j+2}\left[\left(j+\nu+2\right)\left(\tilde{\alpha}+j+\nu+1\right)\right]\right\\}x^{j+\nu+1}$
$\displaystyle+\left\\{A_{1}\left[(\nu+1)(\tilde{\alpha}+\nu)\right]-A_{0}\left[\tilde{\delta}+\beta\nu\right]\right\\}x^{\nu}+A_{0}\left[\nu(\tilde{\alpha}+\nu-1\right]x^{\nu-1}=0.$
(44)

The last term of which would suggest that since $A_{0}\neq 0$ we have $\nu=0$.
Consequently, $A_{1}=A_{0}\tilde{\delta}/\tilde{\alpha}$ and

$A_{j}\,\left[\tilde{\gamma}-2j\right]-A_{j+1}\left[\tilde{\delta}+\beta(j+1)\right]+A_{j+2}\left[\left(j+2\right)\left(\tilde{\alpha}+j+1\right)\right]=0.$
(45)

At this point. we impose the conditions that $\forall{j}=n_{r}$ we set
$A_{n_{r}+2}=0$, $A_{n_{r}+1}\neq 0$ and $A_{n_{r}}\neq 0$. The first
condition, $A_{n_{r}+2}=0$, would truncate the power series to a polynomial of
order $(n_{r}+1)\geq 1$. Moreover, we may facilitate the so called conditional
exact solvability by the requirement that the coefficients of $A_{n_{r}+1}\neq
0$ are vanishing, i.e.,

$\tilde{\delta}+\beta(n_{r}+1)=0;\,\forall
j=n_{r}\Rightarrow\delta--\beta(2n_{r}+\alpha+3).$ (46)

Furthermore, $A_{n_{r}}\neq 0$ implies
$\tilde{\gamma}-2n_{r}=0\Rightarrow\gamma=2(n_{r}+1)+\alpha$, which is in fact
in exact accord with that reported by CR34  and/or by Ishkhanyan et al CR35 ,
provided that the parametric correlation in (46) is satisfied.

The above recipe may very well be used for the solution of confluent Heun
equation that has very recently been followed and successfully implemented in
the study of KG-oscillators in Eddington-inspired Born-Infeld gravity global
monopole spacetime and a Wu-Yang magnetic monopole by Mustafa et al CR36 .

Data availability statement: The authors declare that the data supporting the
findings of this study are available within the paper.

Declaration of interest: The authors declare that they have no known competing
financial interests or personal relationships that could have appeared to
influence the work reported in this paper.

## References

  * (1) T W B Kibble, Phys. Rep. 67 (1980) 183.
  * (2) M. Barriola, A. Vilenkin, Phys. Rev. Lett. 63 (1989) 341\.
  * (3) A. Vilenkin, Phys. Rep. 121 (1985) 263.
  * (4) A. Vilenkin, Phys. Rev. D 23 (1981) 852.
  * (5) A. Vilenkin, Phys. Rev. Lett. 46 (1988) 1169.
  * (6) A. Vilenkin, Phys. Lett. B 133 (1983) 177.
  * (7) W A Hiscock, Phys. Rev. D 31 (1985) 3288.
  * (8) B Linet, Gen. Relativ. Gravit. 17 (1985) 1109,
  * (9) A L Cavalcanti de Oliveira, E R Bezerra de Mello, Class Quant. Grav. 23 (2006) 5249.
  * (10) J. Magueijo, L Smolin, Phys. Rev. Lett. 88 (2002) 190403\.
  * (11) P. Galan, G. A. Mena Marugan, Phys. Rev. D 70 (2004) 124003\.
  * (12) G. Amelino-Camelia, Int. J. Mod. Phys. D 11 (2002) 35.
  * (13) G. Amelino-Camelia, Int. J. Mod. Phys. D 11 (2002) 1643\.
  * (14) .H. Hosseinpour, H. Hassanabadi, J. Kříž, S. Hassanabadi. B. C. Lütfüoĝlu, Int. J. Geom. Methods Mod. Phys. 18 (2021) 2150224.
  * (15) G. Amelino-Camelia, J. R. Ellis, N. Mavromatos, D. V. Nanopoulos, S. Sakar, Nature 393 (1998) 763.
  * (16) J. Alfaro, H. A. Morales-Tecotl, L.F. Urrutia, Phys. Rev. D 65 (2002) 103509.
  * (17) J. Magueijo, L. Smolin, Class. Quant. Gravit. 21 (2004) 1725.
  * (18) V. B. Bezerra, H. F. Mota, C. R. Muniz, Eur. Phys. Lett. 120 (2017) 10005.
  * (19) V. B. Bezerra, I. P. Lobo H. F. Mota, C. R. Muniz, Ann. Phys. 401 (2019) 162.
  * (20) L Smolin, Nucl. Phys. B 742 (2006) 142
  * (21) Y. Ling, X. Li, H. B. Zhang, Mod. Phys. Lett. A 22 (2007) 2749.
  * (22) K. Sogut, M. Salti, O. Aydogdu, Ann. Phys. 431 (2021) 168556\.
  * (23) E. E. Kangal, M Salti, O Aydogdu, K. Sogut, Phys. Scr. 96 (2021) 095301.
  * (24) J. Magueijo, L Smolin, Phys. Rev. D 67 (2003) 044017.
  * (25) M. Takeda et al, Astrophys. J. 522 (1999) 225.
  * (26) M. Takeda et al, Phys. Rev. Lett. 81 (1998) 1163.
  * (27) D. Finkbeiner, M. Davis, D. Schleged, Astrophys. J. 544 (2000) 81.
  * (28) D. Sudarsky, L. Urrutia, H. Vucetich, Phys. Rev. Lett. 89 (2002) 231301.
  * (29) O. Mustafa, Phys. Lett. B 839 (2023) 137793.
  * (30) O. Mustafa, Nucl. Phys. B 995 (2023) 116334.
  * (31) O. Mustafa, arXiv:2301.12370 , PDM KG-Coulombic particles in cosmic string rainbow gravity spacetime and a uniform magnetic field.
  * (32) G. Amelino-Camelia, J. R. Ellis, N. Mavromatos, D. V. Nanopoulos, Int. J. Mod. Phys. A 12 (1997) 607.
  * (33) G. Amelino-Camelia, Living Rev. Relativ. 16 (2013) 5.
  * (34) J. Magueijo, L Smolin, Phys. Rev. Lett. 88 (2002) 190403.
  * (35) O. Mustafa, Phys. Lett. B 850 (2024) 138482.
  * (36) S. Gangopadhyay, A. Dutta, Eur. Phys. Lett. 115 (2016) 50005.
  * (37) A. Ali, M. Faizal, M. M. Khalil, Phys. Lett. B 743 (2015) 295.
  * (38) S. H. Hendi, M. Faizal, Phys. Rev. D 92 (2015) 044027.
  * (39) S. H. Hendi, Gen. Rel. Grav. 48 (2016) 50.
  * (40) S. H. Hendi, M. Faizal, B. Eslam Panah, S. Panahiyan, Eur. Phys. J. C 76 (2016) 296.
  * (41) S. H. Hendi, S. Panahiyan, B. Eslam Panah, M. Momennia, Eur. Phys. J. C 76 (2016) 150.
  * (42) B. Hamil, B. C. Lütfüoĝlu, Int. J. Geom. Methods Mod. Phys. 19 (2022) 2250047.
  * (43) Y. W. Kim, S. K. Kim, Y. J. Park, Eur. Phys. J C 76 (2016) 557.
  * (44) S. H. Hendi, G. H. Bordbar, B. Eslam Panah, S. Panahiyan, J. Cosmol. Astropart. Phys. 09 (2016) 013.
  * (45) R. Garattini, J. Cosmol. Astropart. Phys. 06 (2013) 017\.
  * (46) K. Bakke, H. Mota, Eur. Phys. J. Plus 133 (2018) 409.
  * (47) K. Bakke, H. Mota, Gen. Rel. Grav. 52 (2020) 97.
  * (48) M Moshinsky, A Szczepaniak, J. Phys. A: math. Gen. 22 (1989) L817.
  * (49) B Mirza, M Mohadesi, Commun. Theor. Phys. 42 (2004) 664.
  * (50) A. Ronveaux, Heun’s Differential Equations (Oxford University Press, New York, 1995).
  * (51) T A Ishkhanyan, V P Krainov, A M Ishkhanyan, J. Phys.: Conf. Series 1416 (2019) 012014.
  * (52) O. Mustafa, A. R. Soares, C. F. S. Pereira, R. L. L. Vitória, arXiv:2401.09502 ”On the Klein-Gordon oscillators in Eddington-inspired Born-Infeld gravity global monopole spacetime and a Wu-Yang magnetic monopole”, (2024).


# Mixed-Dimensional Geometric Coupling
of Port-Hamiltonian Systems

Jens Jäschke<EMAIL_ADDRESS>Nathanael Skrepek  Matthias Ehrhardt
Bergische Universität Wuppertal, Applied Mathematics and Numerical Analysis,
Gaußstraße 20, 42119 Wuppertal, Germany  Bergische Universität Wuppertal,
Functional Analysis, Gaußstraße 20, 42119 Wuppertal, Germany

###### Abstract

We propose a new interconnection relation for infinite-dimensional port-
Hamiltonian systems that enables the coupling of ports with different spatial
dimensions by integrating over the the surplus dimensions. To show the
practical relevance, we apply this interconnection to a model system of an
actively cooled gas turbine blade. We also show that this interconnection
relation behaves well with respect to a discretization in finite element
space, ensuring its usability for practical applications.

###### keywords:

Port-Hamiltonian System , Coupled Systems , Geometric Coupling , Infinite
Dimensional Systems

###### MSC:

[2020] 80A10 , 93C20

††journal: Applied Mathematics Letters

MnLargeSymbols’164 MnLargeSymbols’171

##  1 Motivation

Scientific models are inherently approximations of reality, and removing
unnecessary details can greatly simplify the resulting model. These
simplifications often involve reducing the spatial dimensions of the model: A
fluid flowing through a pipe is often modelled in 1D rather than using the
full 3D Navier-Stokes equations. Electronic components such as capacitors and
resistors are commonly modelled as 0D elements. When the interfaces of the
subsystems have the same dimension, there are formalisms such as Port-
Hamiltonian Systems (PHS) that treat the interconnection of these systems in a
fairly general way.

However, it becomes difficult when the subsystems have different spatial
dimensions. For example, modeling a one-dimensional pipe flow that interacts
with its environment via the pipe walls requires coupling a 1D interface (the
fluid flow) with a 2D interface (the pipe walls). Coupling the pipe walls to a
lumped-parameter model for the temperature of the room in which they are
located requires coupling the 2D pipe surface to a zero-dimensional system.

In the following sections, we will attempt to formulate an energy-conserving
connection of two port-Hamiltonian systems where the connected ports do not
have the same spatial dimension.

##  2 Motivating Example: Cooled Gas Turbine Blade

Consider the heat flow in a gas turbine blade cooled by an internal cooling
channel, as shown in Figure 1. We can model this as two interconnected
subsystems: the heat conduction within the metal of the turbine blade and the
coolant flow within the cooling channel. For more information and a discussion
of a greatly simplified version of this system, see [1].

(a) 3D view

(b) Top view

Figure 1: Simple model of a cooled turbine blade, with the cooling channel in
blue.

Heat conduction in the metal is, of course, modelled by a heat equation:

$\rho c\frac{\partial T}{\partial
t}(x,t)=\operatorname{div}\bigl{(}\lambda\operatorname{grad}T(x,t)\bigr{)}$

The formulation as a port-Hamiltonian system closely follows [2], choosing the
thermal energy $Q$ as Hamiltonian

$Q(t)=\int_{\Omega}q\bigl{(}s(x,t)\bigr{)}\mathop{}\\!\mathrm{d}{x},$

and considering the thermal energy density $q$ as a function of the entropy
density $s$ such that the thermodynamic relation
$\delta_{s}Q=\frac{\mathop{}\\!\mathrm{d}{q}}{\mathop{}\\!\mathrm{d}{s}}=T$ is
satisfied. Taking $s$ as a state variable, we obtain the usual flow
$f_{s}=\frac{\partial s}{\partial t}$ and the corresponding effort $e_{s}=T$.
As additional flows and efforts we choose the entropy flux
$e_{\Phi}=\Phi_{S}$, as well as $f_{\Phi}=-\operatorname{grad}(T)$,
$f_{\sigma}=T$ and $e_{\sigma}=-\operatorname{grad}(\frac{1}{T})\Phi_{Q}$ with
the heat flux $\Phi_{Q}$ to obtain the port Hamiltonian system

$\displaystyle\begin{pmatrix}f_{s}\\\ f_{\Phi}\\\
f_{\sigma}\end{pmatrix}=\begin{pmatrix}0&-\operatorname{div}&-1\\\
-\operatorname{grad}&0&0\\\ 1&0&0\end{pmatrix}\begin{pmatrix}e_{s}\\\
e_{\Phi}\\\ e_{\sigma}\end{pmatrix}.$

Since this has two algebraic equations, we add the two closure relations

$\displaystyle e_{s}e_{\Phi}=\lambda f_{\Phi}\quad\text{and}\quad
f_{\Phi}e_{\Phi}=-f_{\sigma}e_{\sigma},$

the former being Fourier’s law and the latter expressing the relation between
heat flux $\Phi_{Q}$ and entropy flux $\Phi_{S}$. Finally, we choose the input
$u=T|_{\partial\Omega}$ and output
$v=-\left(\Phi_{S}\vec{n}\right)|_{\partial\Omega}$ with $\vec{n}$ being the
surface normal vector.

The coolant flow in the cooling channel is modelled as a 1D compressible
fluid. This is consistent with common practice in engineering, since cooling
channels in practice are small, irregularly shaped, and exhibit highly
turbulent flow, making full 3D flow models infeasible for practical
applications and requiring the use of 1D parameter models, such as those
presented in [3]. A 1D model also allows us to use the formulation of
irreversible PHS with boundary control presented in [4]. We choose the
specific volume $\varphi=\frac{1}{\rho}$, the velocity $v$ and the entropy
density $s$ as state variables, and the Hamiltonian

$H(v,\varphi,s)=\int_{a}^{b}\Bigl{(}\frac{1}{2}v^{2}+u(\varphi,s)\Bigr{)}\mathop{}\\!\mathrm{d}{z},$

where the internal energy density $u$ fulfils the Gibbs relation
$\mathop{}\\!\mathrm{d}{u}=-p\mathop{}\\!\mathrm{d}{\varphi}+T\mathop{}\\!\mathrm{d}{s}$.
We can then formulate the quasi-Hamiltonian system

$\displaystyle\begin{pmatrix}\frac{\partial\varphi}{\partial t}\\\
\frac{\partial v}{\partial t}\\\ \frac{\partial s}{\partial t}\end{pmatrix}$
$\displaystyle=\begin{pmatrix}0&\frac{\partial\cdot}{\partial z}&0\\\
\frac{\partial\cdot}{\partial z}&0&-\frac{fv}{T}\\\
0&\frac{fv}{T}&0\end{pmatrix}\begin{pmatrix}-p\\\ v\\\
T\end{pmatrix}+\begin{pmatrix}0\\\ 0\\\ 1\end{pmatrix}w(z,t),$ $\displaystyle
y$ $\displaystyle=\begin{pmatrix}0&0&1\end{pmatrix}\begin{pmatrix}-p\\\ v\\\
T\end{pmatrix}=T,$

with the appropriate boundary conditions. This system is an infinite-
dimensional irreversible port Hamiltonian system as defined in [4, definition
1].

Coupling the two systems using the usual interconnections for PHS does not
work because the spatial dimensions do not match: The boundary port of the
heat equation is 2D, while the distributed port of the cooling channel is only
1D. We need a new interconnection to compensate for this dimensional mismatch.

##  3 Proposition: Mixed-Dimensional Geometric Coupling

######  Definition 3.1 (Dirac structure [5]).

Let $\mathcal{F}$ be a linear space, $\mathcal{E}$ its dual and
$\langle\cdot,\cdot\rangle\colon\mathcal{E}\times\mathcal{F}\to\mathbb{R}$
their dual product. Further let

$\left\llangle\begin{pmatrix}e_{1}\\\
f_{1}\end{pmatrix},\begin{pmatrix}e_{2}\\\
f_{2}\end{pmatrix}\right\rrangle=\langle e_{1},f_{2}\rangle+\langle
e_{2},f_{1}\rangle\quad\begin{pmatrix}e_{1}\\\
f_{1}\end{pmatrix},\begin{pmatrix}e_{2}\\\
f_{2}\end{pmatrix}\in\mathcal{E}\times\mathcal{F}.$

Then $\mathcal{D}\subset(\mathcal{E}\times\mathcal{F})$ is a _Dirac structure_
if $\mathcal{D}=\mathcal{D}^{\bot}$ with

$\mathcal{D}^{\bot}=\\{a\in\mathcal{E}\times\mathcal{F}\;|\;\llangle
a,b\rrangle=0\quad\forall\ b\in\mathcal{D}\\}.$

######  Theorem 3.2.

Let $\Gamma_{1}\subseteq\mathbb{R}^{n}$ compact,
$\Gamma_{2}\subset\mathbb{R}^{m}$ compact and
$\Gamma\coloneqq\Gamma_{1}\times\Gamma_{2}\subseteq\mathbb{R}^{n+m}$. Further
let $\mathcal{F}=\mathrm{L}^{2}(\Gamma_{1})\times\mathrm{L}^{2}(\Gamma)$ and
$\mathcal{E}=\mathcal{F}^{*}$ its dual. Note that we have for $x\in\Gamma$ the
decomposition $x=(x_{1},x_{2})$ with $x_{1}\in\Gamma_{1}$ and
$x_{2}\in\Gamma_{2}$. Finally, let

$A\colon\left\\{\begin{array}[]{rcl}\mathrm{L}^{2}(\Gamma)&\to&\mathrm{L}^{2}(\Gamma_{1}),\\\
u&\mapsto&\int_{\Gamma_{2}}u(\cdot,x_{2})\,\mathop{}\\!\mathrm{d}{x_{2}},\end{array}\right.$

and the embedding

$B\colon\left\\{\begin{array}[]{rcl}\mathrm{L}^{2}(\Gamma_{1})&\to&\mathrm{L}^{2}(\Gamma),\\\
v&\mapsto&v.\end{array}\right.$

The previous operator has to be understood as $(Bv)(x_{1},x_{2})=v(x_{1})$.
Then

$J\colon\left\\{\begin{array}[]{rcl}\mathcal{E}&\to&\mathcal{F},\\\
e&\mapsto&\begin{pmatrix}0&-A\\\ B&0\end{pmatrix}\begin{pmatrix}e_{1}\\\
e_{2}\end{pmatrix},\end{array}\right.$

induces a Dirac structure

$\mathcal{D}=\bigl{\\{}(e,f)\in\mathcal{E}\times\mathcal{F}\;|\;f=Je\bigr{\\}}.$

Note that $u\in\mathrm{L}^{2}(\Gamma)$ implies
$u(\cdot,x_{2})\in\mathrm{L}^{2}(\Gamma_{1})$ for almost every
$x_{2}\in\Gamma_{2}$. Moreover, by the triangle inequality and Cauchy-Schwarz
inequality

$\displaystyle\|Au\|^{2}_{\mathrm{L}^{2}(\Gamma_{1})}$
$\displaystyle=\int_{\Gamma_{1}}\left|\int_{\Gamma_{2}}u(x_{1},x_{2})\mathop{}\\!\mathrm{d}{x_{2}}\right|^{2}\mathop{}\\!\mathrm{d}{x_{1}}\leq\int_{\Gamma_{1}}\Big{(}\int_{\Gamma_{2}}1\cdot|u(x_{1},x_{2})|\mathop{}\\!\mathrm{d}{x_{2}}\Big{)}^{2}\mathop{}\\!\mathrm{d}{x_{1}}$
$\displaystyle\stackrel{{\scriptstyle
C.S.}}{{\leq}}|\Gamma_{2}|\int_{\Gamma_{1}}\int_{\Gamma_{2}}|u(x_{1},x_{2})|^{2}\mathop{}\\!\mathrm{d}{x_{2}}\mathop{}\\!\mathrm{d}{x_{1}}=|\Gamma_{2}|\|u\|_{\mathrm{L}^{2}(\Gamma)}^{2},$

where $|\Gamma_{2}|$ is the measure of $\Gamma_{2}$. Hence, the operator $A$
is well-defined. Note that this holds true for any finite measure on
$\Gamma_{2}$. In particular we will later use surface measures.

###### Proof.

Determine the adjoint operator of $B$: For $f\in\mathrm{L}^{2}(\Gamma)$,
$v\in\mathrm{L}^{2}(\Gamma_{1})$ we have

$\begin{split}\langle
f,Bv\rangle_{L^{2}(\Gamma)}&=\int_{\Gamma_{1}}\int_{\Gamma_{2}}f(x_{1},x_{2})v(x_{1})\mathop{}\\!\mathrm{d}{x_{2}}\mathop{}\\!\mathrm{d}{x_{1}}=\int_{\Gamma_{1}}\Bigl{(}\int_{\Gamma_{2}}f(x_{1},x_{2})\mathop{}\\!\mathrm{d}{x_{2}}\Bigr{)}v(x_{1})\mathop{}\\!\mathrm{d}{x_{1}}\\\
&=\left\langle\int_{\Gamma_{2}}f(\cdot,x_{2})\mathop{}\\!\mathrm{d}{x_{2}},v\right\rangle_{L^{2}(\Gamma_{1})}=\left\langle
B^{*}f,v\right\rangle_{L^{2}(\Gamma_{1})}=\left\langle
Af,v\right\rangle_{L^{2}(\Gamma_{1})}.\end{split}$

Since $A=B^{*}$ holds, $J$ is skew-symmetric and $\mathcal{D}$ is a Dirac
structure [6]. ∎

##  4 Coupled Example System

To apply the coupling described in Section 3 to the system of Section 2, we
first split the boundary of the heat equation domain $\partial\Omega=\Gamma$
into an external part $\Gamma_{\rm ext}$, which connects to the outside of the
blade and is disregarded here, and an internal part $\Gamma_{\rm int}$ which
denotes the wall of the cooling channel and will be coupled to the coolant
flow.

As the cooling channel is modelled as a tube, it can obviously be decomposed
into $\Gamma_{\rm int}=\Gamma_{1}\times\Gamma_{2}$ as in Theorem 3.2, with
$\Gamma_{1}$ containing the axial coordinate (along the flow direction) and
$\Gamma_{2}$ the azimuthal coordinate, i.e. describing the circumference. Now
we can choose the following interconnection

$\displaystyle u=T_{h}(x)=T_{c}(z)=y\quad\text{and}\quad
w=\int_{\Gamma_{2}}\Phi_{S}(x)\,\vec{n}\,\mathop{}\\!\mathrm{d}{x_{2}}=-\int_{\Gamma_{2}}v\,\mathop{}\\!\mathrm{d}{x_{2}},$
(1)

with $x\in\Gamma_{\rm int}$ and $\langle x,\hat{z}\rangle=z$, where $\hat{z}$
is the unit vector in $z$-direction. This interconnection has exactly the form
given in Theorem 3.2. Since it is an energy preserving interconnection, the
coupled system is a (quasi-)Hamiltonian system and would be a port-Hamiltonian
system if both sub-systems were PHS.

We note that this interconnection is also physically meaningful. The
temperature $T$, an intensive quantity, of the points that are in contact with
each other is the same, while the entropy flux $\Phi_{S}$, an extensive
quantity, is integrated and has the expected sign change.

##  5 Finite Element Discretization

The interconnection proposed in Section 3 can be easily discretized with a
finite element discretization. The result will then be a finite-dimensional
Dirac structure, as we will see in this section.

Let us assume that we have finite element discretizations for both sub-
systems, with ${\psi_{i}}$ the basis functions on the boundary of the higher-
dimensional system (the heat equation in our example), and ${\chi_{i}}$ the
basis functions of the lower-dimensional system (the compressible cooling
fluid in our example). We can then approximate the input $u$ and output $v$ of
the first system, and the input $w$ and output $y$ of the second system as

$\displaystyle\begin{aligned}
u&\approx\sum_{i}\psi_{i}(x)u_{i}(t)=\Psi^{\top}(x)\underline{u}(t),&v&\approx\sum_{i}\psi_{i}(x)v_{i}(t)=\Psi^{\top}(x)\underline{v}(t),\\\
w&\approx\sum_{i}\chi_{i}(x_{1})w_{i}(t)=X^{\top}(x_{1})\underline{w}(t),&y&\approx\sum_{i}\chi_{i}(x_{1})y_{i}(t)=X^{\top}(x_{1})\underline{y}(t).\end{aligned}$

Remembering that $x=(x_{1},x_{2})^{\top}$ and applying these approximations to
the continuous interconnection relations of Equation 1 results in

$\displaystyle
X^{\top}(x_{1})\underline{w}(t)=-\int_{\Omega_{2}}\Psi^{\top}(x)\underline{v}(t)\mathop{}\\!\mathrm{d}{x_{2}},\quad\text{and}\quad\Psi^{\top}(x)\underline{u}(t)=X^{\top}(x_{1})\underline{y}(t).$
(2)

We now take the weak form of Equation 2 to obtain the discretized forms of the
interconnection relations

$\displaystyle\begin{aligned}
M_{\chi}\underline{w}(t)&=\int_{\Gamma_{1}}X(x_{1})X^{\top}(x_{1})\underline{w}(t)\mathop{}\\!\mathrm{d}{x_{1}}=-\int_{\Gamma_{1}}X(x_{1})\int_{\Gamma_{2}}\Psi^{\top}(x)\underline{v}(t)\mathop{}\\!\mathrm{d}{x_{2}}\mathop{}\\!\mathrm{d}{x_{1}}\\\
&=-\int_{\Gamma_{1}}X(x_{1})\widehat{\Psi}^{\top}(x_{1})\underline{v}(t)\mathop{}\\!\mathrm{d}{x_{1}}=-D_{\chi}\underline{v}(t)\end{aligned}$

and

$\displaystyle\begin{aligned}
M_{\psi}\underline{u}(t)&=\int_{\Gamma}\Psi(x)\Psi^{\top}(x)\underline{u}(t)\mathop{}\\!\mathrm{d}{x}=\int_{\Gamma}\Psi(x)X^{\top}(x_{1})\underline{y}(t)\mathop{}\\!\mathrm{d}{x}\\\
&=\int_{\Gamma_{1}}\left(\int_{\Gamma_{2}}\Psi(x)\mathop{}\\!\mathrm{d}{x_{2}}\right)X^{\top}(x_{1})\underline{y}(t)\mathop{}\\!\mathrm{d}{x_{1}}\\\
&=\int_{\Gamma_{1}}\widehat{\Psi}(x_{1})X^{\top}(x_{1})\underline{y}(t)\mathop{}\\!\mathrm{d}{x_{1}}=D_{\psi}\underline{y}(t).\end{aligned}$

Since $D_{\psi}=D_{\chi}^{\top}$, the discretized interconnection relation

$\displaystyle\begin{pmatrix}M_{\chi}&0\\\
0&M_{\psi}\end{pmatrix}\begin{pmatrix}\underline{u}(t)\\\
\underline{w}(t)\end{pmatrix}$ $\displaystyle=\begin{pmatrix}0&-D_{\chi}\\\
D_{\psi}&0\end{pmatrix}\begin{pmatrix}\underline{v}(t)\\\
\underline{y}(t)\end{pmatrix}$

is a Dirac structure.

######  Remark 1.

The integration over $\Gamma_{2}$ will not expand the support of the basis
functions $\widehat{\psi}_{i}$ in $x_{1}$-direction. Therefore, the matrix
$D_{\chi}$ will still be sparse, although less sparse than the matrix
$M_{\chi}$.

##  6 Conclusion

It is possible to couple port-Hamiltonian systems of different spatial
dimensions if the interconnecting ports do not have the same spatial
dimension. The proposed interconnection structure forms a Dirac structure and
thus ensures that the resulting overall system again forms a port-Hamiltonian
system.

Application to an example system has shown that the interconnection has
practical use and a physically meaningful interpretation when the ports
consist of both extensive and intensive variables. This is usually the case
for physically motivated port-Hamiltonian systems, but cannot be guaranteed in
general.

Finally, we showed that the interconnection behaves well with respect to the
discretization in finite element space, leading to a finite-dimensional Dirac
structure.

## References

  * Jäschke et al. [2021] Jens Jäschke, Matthias Ehrhardt, Michael Günther, and Birgit Jacob.  A port-Hamiltonian formulation of coupled heat transfer.  IMACM Preprint 21/08, March 2021.  URL https://www.imacm.uni-wuppertal.de/fileadmin/imacm/preprints/2021/imacm_21_08.pdf.
  * Serhani et al. [2019] Anass Serhani, Ghislain Haine, and Denis Matignon.  Anisotropic heterogeneous n-D heat equation with boundary control and observation: I. Modeling as port-Hamiltonian system.  _IFAC-PapersOnLine_ , 52(7):51–56, 2019.
  * Meitner [1990] Peter L Meitner.  Computer code for predicting coolant flow and heat transfer in turbomachinery.  Technical report, NASA, 1990.
  * Ramirez et al. [2022] Hector Ramirez, Yann Le Gorrec, and Bernhard Maschke.  Boundary controlled irreversible port-Hamiltonian systems.  _Chemical Engineering Science_ , 248:117107, 2022.
  * Le Gorrec et al. [2005] Y. Le Gorrec, H. Zwart, and B. Maschke.  Dirac structures and boundary control systems associated with skew-symmetric differential operators.  _SIAM J. Control Optim._ , 44(5):1864–1892, 2005\.
  * van der Schaft and Maschke [2002] A.J. van der Schaft and B.M. Maschke.  Hamiltonian formulation of distributed-parameter systems with boundary energy flow.  _J. Geom. Phys._ , 42(1):166–194, 2002.