longtable Ginwidth=,height=,keepaspectratio

# LBR-Stack: ROS 2 and Python Integration of KUKA FRI for Med and IIWA Robots

Martin Huber  0000-0003-4603-6773 Christopher E. Mower  School of Biomedical
Engineering and Image Sciences, King’s College London, United Kingdom
0000-0002-3929-9391 Sebastien Ourselin  School of Biomedical Engineering and
Image Sciences, King’s College London, United Kingdom  0000-0002-5694-5340 Tom
Vercauteren  0000-0003-1794-0456 Christos Bergeles  0000-0002-9152-3194

(21 November 2023)

Figure 1: Supported robots in the LBR-Stack. From left to right: KUKA LBR
IIWA7, IIWA14, Med7, Med14. Visualizations made using Foxglove 111Foxglove:
https://foxglove.dev/ros..

## Summary

The LBR-Stack is a collection of packages that simplify the usage and extend
the capabilities of KUKA’s Fast Robot Interface (FRI) (Schreiber et al.,
2010). It is designed for mission critical hard real-time applications.
Supported are the KUKA LBR Med7/14 and KUKA LBR IIWA7/14 robots in the Gazebo
simulation (Koenig & Howard, 2004) and for communication with real hardware. A
demo video can be found here. An overview of the software architecture is
shown in Figure 2.

At the LBR-Stack’s core are two packages:

  * •

fri: Integration of KUKA’s original FRI client library into CMake.

  * •

fri_vendor: Vendor library that integrates the fri into the ROS 2 build sytem.

All other packages are built on top. These include Python bindings and
packages for integration into the Robot Operating System (ROS) and ROS 2:

  * •

pyFRI: Python bindings for the fri.

  * •

lbr_fri_ros2_stack: ROS 1/2 integration of the KUKA LBRs through the
fri_vendor.

For brevity, and due to the architectural advantages over ROS (Macenski et
al., 2022), only ROS 2 is considered in the following. The lbr_fri_ros2_stack
comprises the following packages:

  * •

lbr_bringup: Python library for launching the different components.

  * •

lbr_description: Description files for the Med7/14 and IIWA7/14 robots.

  * •

lbr_demos: Demonstrations for simulation and the real robots.

  * •

lbr_fri_msgs: Interface Definition Language (IDL) equivalent of FRI protocol
buffers.

  * •

lbr_fri_ros2: FRI ROS 2 interface through realtime_tools (Chitta et al.,
2017).

  * •

lbr_ros2_control: Interface and controllers for ros2_control (Magyar et al.,
2023).

  * •

lbr_moveit_config: MoveIt 2 configurations (Coleman et al., 2014).

Figure 2: An overview of the overall software architecture. There exists a
single source for KUKA’s FRI. This design facilitates that downstream
packages, i.e. the Python bindings and the ROS 2 package, can easily support
multiple FRI versions. The ROS 2 side utilizes vcstool222vcstool:
https://github.com/dirk-thomas/vcstool..

## Statement of need

An overview of existing work that interfaces the KUKA LBRs from an external
computer is given in Table 1. We broadly classify these works into custom
communication solutions (Hennersperger et al., 2017; Safeea & Neto, 2019;
Serrano-Muñoz et al., 2023) and communication solutions through KUKA’s FRI UDP
channel (Bednarczyk & Guzmán, 2023; Chatzilygeroudis et al., 2019). The former
can offer greater flexibility while the latter offer a well defined interface
and direct software support from KUKA. Contrary to the custom communication
solutions, the FRI solutions additionally enable hard real-time communication,
that is beneficial for mission critical development. Stemming from
translational medical research, this work therefore focuses on the FRI.

Limitations with the current FRI solutions are:

  1. 1.

Only support IIWA7/14 robots, not Med7/14.

  2. 2.

Don’t provide Python bindings.

  3. 3.

Maintainability:

     * •

Modified client source code iiwa_ros.

     * •

FRI client library tangled into source code iiwa_ros2.

  4. 4.

Partial support of FRI functionality. Both, iiwa_ros and iiwa_ros2,
exclusively aim at providing implementations of the ROS 1/2 hardware
abstraction layer. This does not support:

     * •

FRI’s cartesian impedance control mode.

     * •

FRI’s cartesian control mode (FRI version 2 and above).

The first original contribution of this work is to add support for the KUKA
LBR Med7/14 robots, which, to the best author’s knowledge, does not exist in
any other work. The second novel contribution of this work is to provide
Python bindings. This work solves the maintainability by outsourcing the FRI
into the separate fri and fri_vendor packages, which leaves the FRI’s source
code untouched and simply provides build support. 4. is solved by defining an
IDL message to KUKA’s nanopb command and state protocol buffers in
lbr_fri_msgs. These messages can then be interfaced from ROS 1/2 topics or
from the ROS 1/2 hardware abstraction layer.

Table 1: Overview of existing frameworks for interfacing the KUKA LBRs. A square indicates support for the respective feature. List of abbreviations: Hard Real-time (RT), Position Control (Pos), Impedance Control (Imp), Cartesian Impedance Control (Cart Imp), Hardware Interface (HW IF). |  |  |  |  |  |  |  |  |  |  |
---|---|---|---|---|---|---|---|---|---|---|---
Framework |  IIWA |  Med |  ROS |  ROS 2 |  RT |  FRI |  pyFRI |  Pos |  Imp |  Cart Imp |  HW IF
lbr-stack |  $\bullet$ |  $\bullet$ |  $\bullet$ |  $\bullet$ |  $\bullet$ |  $\bullet$ |  $\bullet$ |  $\bullet$ |  $\bullet$ |  $\bullet$ |  $\bullet$
iiwa_ros |  $\bullet$ |  |  $\bullet$ |  |  $\bullet$ |  $\bullet$ |  |  $\bullet$ |  $\bullet$ |  |  $\bullet$
iiwa_ros2 |  $\bullet$ |  |  |  $\bullet$ |  $\bullet$ |  $\bullet$ |  |  $\bullet$ |  $\bullet$ |  |  $\bullet$
iiwa-stack |  $\bullet$ |  |  $\bullet$ |  |  |  |  |  $\bullet$ |  $\bullet$ |  $\bullet$ |
libiiwa |  $\bullet$ |  |  $\bullet$ |  $\bullet$ |  |  |  |  $\bullet$ |  $\bullet$ |  $\bullet$ |
KST-KUKA |  $\bullet$ |  |  |  |  |  |  |  $\bullet$ |  $\bullet$ |  $\bullet$ |

## Acknowledgement

We want to acknowledge the work in (Hennersperger et al., 2017), as their
MoveIt configurations were utilized in a first iteration of this project.

This work was supported by core funding from the Wellcome/EPSRC
[WT203148/Z/16/Z; NS/A000049/1]. This project has received funding from the
European Union’s Horizon 2020 research and innovation programme under grant
agreement No 101016985 (FAROS project).

## References

reBednarczyk, M., & Guzmán, J. H. G. (2023). ROS 2 stack for KUKA iiwa
collaborative robots. In _GitHub repository_. GitHub.
https://github.com/ICube-Robotics/iiwa_ros2

preChatzilygeroudis, K., Mayr, M., Fichera, B., & Billard, A. (2019).
_Iiwa_ros: A ROS stack for KUKA’s IIWA robots using the fast research
interface_. http://github.com/epfl-lasa/iiwa_ros

preChitta, S., Marder-Eppstein, E., Meeussen, W., Pradeep, V., Rodríguez
Tsouroukdissian, A., Bohren, J., Coleman, D., Magyar, B., Raiola, G., Lüdtke,
M., & Fernández Perdomo, E. (2017). Ros_control: A generic and simple control
framework for ROS. _The Journal of Open Source Software_.
https://doi.org/10.21105/joss.00456

preColeman, D., Sucan, I., Chitta, S., & Correll, N. (2014). Reducing the
barrier to entry of complex robotic software: A moveit! Case study. _arXiv
Preprint arXiv:1404.3785_.

preHennersperger, C., Fuerst, B., Virga, S., Zettinig, O., Frisch, B., Neff,
T., & Navab, N. (2017). Towards MRI-based autonomous robotic US acquisitions:
A first feasibility study. _IEEE Transactions on Medical Imaging_ , _36_(2),
538–548.

preKoenig, N., & Howard, A. (2004). Design and use paradigms for gazebo, an
open-source multi-robot simulator. _2004 IEEE/RSJ International Conference on
Intelligent Robots and Systems (IROS) (IEEE Cat. No.04CH37566)_ , _3_ ,
2149–2154 vol.3. https://doi.org/10.1109/IROS.2004.1389727

preMacenski, S., Foote, T., Gerkey, B., Lalancette, C., & Woodall, W. (2022).
Robot operating system 2: Design, architecture, and uses in the wild. _Science
Robotics_ , _7_(66). https://doi.org/10.1126/scirobotics.abm6074

preMagyar, B., Stogl, D., Knese, K., & Community. (2023). Generic and simple
controls framework for ROS 2. In _GitHub repository_. GitHub.
https://github.com/ros-controls/ros2_control

preSafeea, M., & Neto, P. (2019). KUKA sunrise toolbox: Interfacing
collaborative robots with MATLAB. _IEEE Robotics Automation Magazine_ ,
_26_(1), 91–96. https://doi.org/10.1109/MRA.2018.2877776

preSchreiber, G., Stemmer, A., & Bischoff, R. (2010). The fast research
interface for the kuka lightweight robot. _IEEE Workshop on Innovative Robot
Control Architectures for Demanding (Research) Applications How to Modify and
Enhance Commercial Controllers (ICRA 2010)_ , 15–21.

preSerrano-Muñoz, A., Elguea-Aguinaco, Í., Chrysostomou, D., BØgh, S., &
Arana-Arexolaleiba, N. (2023). A scalable and unified multi-control framework
for KUKA LBR iiwa collaborative robots. _2023 IEEE/SICE International
Symposium on System Integration (SII)_ , 1–5.
https://doi.org/10.1109/SII55687.2023.10039308

p


# Computing with volatile memristors: An application of non-pinched hysteresis

Y. V. Pershin<EMAIL_ADDRESS>Department of Physics and Astronomy,
University of South Carolina, Columbia, South Carolina 29208, USA  Nikolaev
Institute of Inorganic Chemistry SB RAS, Novosibirsk 630090, Russia  S. N.
Shevchenko  B. I. Verkin Institute for Low Temperature Physics and
Engineering, Kharkov 61103, Ukraine  V. N. Karazin Kharkov National
University, Kharkov 61022, Ukraine

###### Abstract

The possibility of in-memory computing with volatile memristive devices,
namely, memristors requiring a power source to sustain their memory, is
demonstrated. We have adopted a hysteretic graphene-based field emission
structure as a prototype of volatile memristor, which is characterized by a
non-pinched hysteresis loop. Memristive model of the structure is developed
and used to simulate a polymorphic circuit implementing in-memory computing
gates such as the material implication. Specific regions of parameter space
realizing useful logic functions are identified. Our results are applicable to
other realizations of volatile memory devices.

##  1 Introduction

Currently, there is a strong interest in in-memory computing concept. In
particular, there are expectations that in-memory computing architectures may
help to overcome the Von Neumann bottleneck problem [1] of conventional
computers and thus provide us with better computing machines. Memristive [2]
(memory resistive) and memcapacitive [3] (memory capacitive) elements that
combine information processing and storage functionalities in simple device
structures of nanoscale dimensions have received a great deal of attention in
the context of in-memory computing (memcomputing [4]) paradigm. In fact, the
material implication gate was demonstrated experimentally with non-volatile
memristive devices several years ago [5]. This idea has been further developed
and reviewed in a number of papers [6, 7, 8, 9, 10, 11, 12].

While there is a wide variety of physical systems with memory [13], it is
generally agreed that the non-volatile memory devices are the most suitable
candidates for in-memory computing, and for good reason. In this paper,
however, we explore a different route to in-memory computing based on volatile
memristive devices. It is shown that, in principle, simple circuits of
volatile memristors can provide some useful logic functions. Here, we do not
aim to develop a practical in-memory computing architecture, but rather
present a proof of concept application of volatile memristors. Eventually, it
may find its own application niche.

To make our description physically based, in this paper we consider the
hysteretic behavior of carbon-based field emitters [14, 15, 16, 17, 18]. For
concreteness, we have chosen a hysteretic graphene-based field emission
structure [17] as a prototype of volatile memristor. The memory effect in such
a structure is attributed to a field-induced detachment of a portion of
graphene sheet from substrate [17]. As in this system the minimum voltage
required to induce an OFF to ON transition $V_{\mathrm{ON}}$ is larger than
that needed for the transition from ON to OFF, $V_{\mathrm{OFF}}$, there is a
voltage interval where the structure remembers its state (defined by the
history of voltage applied).

Thus, there are two main results reported in this paper: (i) the memristive
model of graphene field emitters, and (ii) realization of in-memory computing
gates based on such devices. Accordingly, this paper is organized as follows.
We develop a memristive model of hysteretic graphene-based field emitters in
Sec. 2. In particular, in the first part of this Section we formulate general
equations of the model, while in the second part (that may be skipped by those
readers who are not interested in model details), we formulate the model
parameters based on our understanding of physical processes associated with
graphene detachment from substrate. In Sec. 3, an implementation of logic
gates based on volatile memristors is explored. We conclude in Sec. 4 with a
summary of our study.

##  2 Memristive model of graphene field emitters

In this Section we develop a memristive model of graphene field emitters [17]
showing that such devices can be classified as first-order voltage-controlled
memristive systems. Our model is well suited for the description of
experimental results, as it captures both the switching dynamics and physics
of field emission. We emphasize that the suggested memristive model can be
adopted for the description of other nanomechanical systems with memory
including those [19, 20] that do not require high voltages for their
operation.

Figure 1: (a) and (b): Schematic representation of low- and high-current
states of the graphene field emitter: (a) the low-current state (the edge is
attached to substrate, $x=0$) and (b) the high-current state (the edge is
detached/standing, $x=1$). Both states are stable at
$V_{\mathrm{OFF}}<V<V_{\mathrm{ON}}$. (c) Memristive circuit model of circuits
in (a) and (b).

###  2.1 Memristive model

In a recent experiment [17] a strong hysteresis in current-voltage
characteristics of field emission from the edge of graphene on SiO2 was
observed. This behavior was explained by a field-assisted local detachment of
the graphene edge from the substrate (for a schematic illustration see Fig.
1). In particular, it was demonstrated that when the system is subjected to an
increasing voltage $V$ from 0 to a maximum value, there is a rapid increase in
the current at a certain $V_{switch}$ (in what follows, denoted by
$V_{\mathrm{ON}}$). On the way back, a current drop is observed at
$V_{\mathrm{OFF}}<V_{\mathrm{ON}}$ such that
$V_{\mathrm{ON}}/V_{\mathrm{OFF}}\approx 7$. Importantly, in the hysteretic
region (ranging from $V_{\mathrm{OFF}}$ to $V_{\mathrm{ON}}$) the current is
stable in the sense that the system can stay arbitrary long in one of two (in
some samples, many) possible current states. Thus, the memory of such field
emitters can be classified as long-term and volatile (the memory is lost at
small $V$ including $V=0$). A similar memory effect in field emission from
graphene was also observed in our own in-house experiments [21].

In order to describe the hysteretic field emission from graphene, we use the
formalism of memristive devices developed by Chua and Kang [2]. According to
the definition, an $N$-order voltage-controlled memristive system is given by

$\displaystyle I(t)$ $\displaystyle=$ $\displaystyle
R_{M}^{-1}(\mathbf{x},V,t)V(t),$ (1) $\displaystyle\dot{\mathbf{x}}$
$\displaystyle=$ $\displaystyle f(\mathbf{x},V,t),$ (2)

where $R_{M}$ is the memristance (memory resistance), which depends on the
input voltage $V$ and vector $\mathbf{x}$ of $N$ internal state variables. The
function $f$ in Eq. (2) defines the dynamics of internal state. Nowadays, Eqs.
(1)-(2) are widely used to model a broad range of emergent non-volatile memory
devices [13]. Moreover, the present authors applied Eqs. (1)-(2) to field
emission from carbon nanotubes [18].

It is natural to select the internal state variable $x$ as $x=L_{p}/L_{tot}$,
where $L_{p}$ is the length of detached (standing) portion of the edge, and
$L_{tot}$ is the edge length. Two limit cases (completely attached, $x=0$, and
detached, $x=1$, edges) are schematically depicted in Fig. 1. Generally, $x$
can take any intermediate value between 0 and 1. To formulate the memristive
model of graphene field emitters, we assume that the current in $x=0$ and
$x=1$ states can be described by the Fowler-Nordheim law [22]. Note that this
assumption is in agreement with experimental observations [17].

The total current can be written as a sum of currents through the attached and
detached regions of the edge:

$I=\left(1-x\right)I_{\mathrm{OFF}}+xI_{\mathrm{ON}},$ (3)

where $I_{\mathrm{OFF}}$ and $I_{\mathrm{ON}}$ are the total emission currents
at $x=0$ and $x=1$, respectively. $I_{\mathrm{OFF}}$ and $I_{\mathrm{ON}}$ are
represented using the Fowler-Nordheim law as

$I_{\mathrm{OFF(ONN)}}=A_{\mathrm{OFF(ON)}}V^{2}e^{-\frac{B_{\mathrm{OFF(ON)}}}{V}}.$
(4)

Here, $A_{\mathrm{OFF(ON)}}$ and $B_{\mathrm{OFF(ON)}}$ are constants
discussed in Subsec. 2.2.

Figure 2: Hysteretic curves for the internal state variable $x$ of (a)
volatile (graphene field emitter) and (b) hypothetical nonvolatile memristor.
Insets demonstrate respective non-pinched and pinched hysteretic $I-V$ curves.

In order to reproduce experimental results [17], it is sufficient to select
the function $f$ in the Eq. (2) as

$f(V)=\left\\{\begin{array}[]{cc}\gamma&\;\textnormal{if}\;V\geq
V_{\mathrm{ON}}\\\ -\gamma&\;\textnormal{if}\;V\leq V_{\mathrm{OFF}}\\\
0&\textnormal{otherwise}\end{array},\right.$ (5)

where $\gamma>0$ is the rate of change of $x$. In fact, the function $f$
defined by Eq. (5) can describe both types of memristors: non-volatile and
volatile. Assuming a positive $V_{\mathrm{ON}}$, the memristor type is defined
by inequalities

$\displaystyle V_{\mathrm{ON}}$ $\displaystyle>$ $\displaystyle
V_{\mathrm{OFF}}\geq 0\text{ : volatile,}$ (6) $\displaystyle V_{\mathrm{ON}}$
$\displaystyle>$ $\displaystyle 0>V_{\mathrm{OFF}}\text{ : non-volatile.}$

Figure 2 schematically shows examples of the dynamics of $x$ in a volatile
memristor (such as the graphene field emitter), Fig. 2(a), and in a
hypothetical non-volatile memristor, Fig. 2(b), subjected to a periodic
quasistatic waveform voltage.

Figure 3: $I-V$ curve of the graphene field emitter found using Eqs. (1)-(5)
with the following set of parameter values: $V_{\mathrm{OFF}}=50$ V,
$V_{\mathrm{ON}}=350$ V, $A_{\mathrm{ON}}=2.32\cdot 10^{-9}$ A/V2,
$B_{\mathrm{ON}}=662.2$ V, $A_{\mathrm{OFF}}=1.99\cdot 10^{-14}$ A/V2,
$B_{\mathrm{OFF}}=160.6$ V, $\gamma T=100$, where $T$ is the voltage period.
Inset: the same curve shown in the linear scale.

A calculated $I-V$ curve of graphene field emitter subjected to a triangular
waveform voltage is shown in Fig. 3. We emphasize that our volatile memristor
exhibits a non-pinched hysteresis.

###  2.2 Physical basis of the model

Here, we briefly discuss the expressions for the model parameters
$A_{\mathrm{OFF(ON)}}$ and $B_{\mathrm{OFF(ON)}}$.

Consider the field emission from a graphene-based cathode, as presented in
Fig. 1. The potential difference $V(t)$ between the cathode and anode results
in the electric field $E=\beta V/D$, where $D$ is the distance between the
electrodes and $\beta$ is the form factor. Then the current is described by
the Fowler-Nordheim formula [14, 23, 21]

$\displaystyle I(V)$ $\displaystyle=$ $\displaystyle
AV^{2}\exp\left(-B/V\right),$ (7) $\displaystyle A$ $\displaystyle=$
$\displaystyle\frac{e^{3}}{16\pi^{2}\hbar}\frac{1}{\varphi}\left(\frac{\beta}{D}\right)^{2}S,\text{
\ \
}B=\frac{4\sqrt{2m}}{3e\hbar}\varphi^{3/2}\left(\frac{\beta}{D}\right)^{-1},$

where $e$ and $m$ are the electron charge and mass, $\hbar$ is the Planck
constant, $S$ is the effective emitting surface, and $\varphi=4.8$ eV is the
work function.

In Fig. 1, the situation (a) corresponds to the graphene sheet entirely
attached to the substrate, while in the case (b), the edge of the sheet is
detached. Following the arguments put forward in Refs. [17, 21], we believe
that the main effect is likely associated with the change in the form factor
$\beta$ and effective emitting surface $S$. Introducing
$\beta_{\mathrm{OFF(ON)}}$ and $S_{\mathrm{OFF(ON)}}$ for the low- and high-
current states, the model parameters are defined as
$A_{\mathrm{OFF(ON)}}\equiv A(S_{\mathrm{OFF(ON)}},\beta_{\mathrm{OFF(ON)}})$
and $B_{\mathrm{OFF(ON)}}\equiv
B(S_{\mathrm{OFF(ON)}},\beta_{\mathrm{OFF(ON)}})$. An intermediate situation
is described by the superposition state, Eq. (3).

##  3 Logic gates

Figure 4: In-memory computing circuit considered in this work. The circuit
combines two memristors Mi, resistor R and two voltage sources.

###  3.1 Circuit and calculation of the operation code

The possibility of in-memory computing with volatile memristors is
investigated employing Fig. 4 circuit, which is similar to the circuit used in
the demonstration of the material implication with non-volatile memristors
[5]. In what follows this circuit is simulated based on the Kirchhoff’s
circuit laws equation for $V_{R}(t)$

$\frac{V_{1}-V_{R}(t)}{R_{M,1}}+\frac{V_{2}-V_{R}(t)}{R_{M,2}}=\frac{V_{R}(t)}{R},$
(8)

which is supplemented by Eqs. (1), (2) for the dynamics of memristances
$R_{M,1}$ and $R_{M,2}$. In Eq. (8), $V_{R}(t)$ is the voltage across R.

Table 1: Codes [12] of logic operations calculated according to Eq. (9). These codes are defined with respect to different pairs of initial states of M1 and M2 and can describe the final state of any device of interest (in our case, M1 or M2). For more information, see the text and Ref. [12]. set to 0 | 0 | XOR | 6 | copy M1 | 12
---|---|---|---|---|---
NOR | 1 | NAND | 7 | IMP2 | 13
NOT(IMP2) | 2 | AND | 8 | OR | 14
NOT M1 | 3 | NOT(XOR) | 9 | set to 1 | 15
NOT(IMP1) | 4 | copy M2 | 10 |  |
NOT M2 | 5 | IMP1 | 11 |  |

(a) (b)

Figure 5: Operation type as a function of applied voltages calculated using
Fig. 4 circuit with $R=10^{6}$ $\Omega$. The final states of M1 and M2 hold
the logic function outputs presented in (a) and (b), respectively. These plots
were obtained with the same parameters of M1 and M2 as in Fig. 3.

(a) (b)

Figure 6: Operation type as a function of applied voltages calculated using
Fig. 4 circuit with $R=10^{8}$ $\Omega$ and $10^{13}$ $\Omega$. These plots
were obtained with the same parameters of M1 and M2 as in Fig. 3.

Following Ref. [12], we analyze the simulations results calculating a
numerical code that can be associated with a specific logic operation. Taking
$w_{i}=1,2,4,8$ as weights for the input combinations (0,0), (0,1), (1,0) and
(1,1), the numerical code is calculated as a weighted sum of the final state
of a selected memristor,

$\mathnormal{code}=\sum\limits_{i=1}^{4}w_{i}b_{ij}^{f},$ (9)

where $b_{ij}^{f}$ is the final state ($0$ or $1$) of the device of interest
$j$ (in our case, M1 or M2) for $i$-th input combination $(0,0)$, $(0,1)$,
$(1,0)$ or $(1,1)$ that correspond to $i=1,2,3,4$. Table 1 summarizes logic
functions for all possible code values. In this Table the standard notations
are used for the logic functions, e.g., NOT is the logical negation, IMP is
the material implication (in particular, IMP1 is M${}_{1}\rightarrow$M2), etc.
In our numerical simulations of Fig. 4 circuit, we have encountered the
following operation codes: $0$, $2$, $4$, $10$-$13$, $15$.

###  3.2 Diagrams of logic operations

Figs. 5 and 6 show some selected results of our simulations. In order to
obtain each point of these plots, we simulated the dynamics of Fig. 4 circuit
for all possible pairs of initial states of M1 and M2 subjected to $V_{1}$ and
$V_{2}$. The operation code was found with Eq. (9) and interpreted based on
the Table 1.

(a) (b)  (c) (d)  .

Figure 7: Effect of variability of memristor parameters. To obtain these plots
we used $R=10^{6}$ $\Omega$, and higher $V_{\mathrm{ON(OFF)}}$ for M2:
$V_{\mathrm{OFF}}=60$ V and $V_{\mathrm{ON}}=420$ V in (a) and (b), and
$V_{\mathrm{OFF}}=70$ V and $V_{\mathrm{ON}}=490$ V in (c) and (d). All other
model parameters were as in Fig. 3. Compare with Fig. 5.

According to Fig. 5, the logic operations are symmetric for M1 and M2 with
respect to $V_{1}=V_{2}$ line. As expected, at low voltages applied to Mi,
$x_{i}$ changes to 0, at high voltages – to 1, and there is also a stability
region (copy to Mi). At $R=0$, the common stability region is a square defined
by the lines $V_{i}=V_{\mathrm{ON(OFF)}}$. This square is deformed at $R>0$
(this can be seen by placing Fig. 5(b) over Fig. 5(a) or vice versa). The most
important voltages regions, however, are those providing the material
implication (IMP) and negation of implication (NOT(IMP)) gates. The importance
of the material implication stems from the fact that it is a fundamental logic
gate [24], which, together with ’set to 0’ (FALSE) operation form a
computationally complete logic basis.

Fig. 6 shows the effect of the resistance of R on logic operations regions.
One can notice that, generally, an increase in $R$ scales the operation
regions in Fig. 5 (a) to higher voltages. In particular, one can notice the
disappearance of ’set to 1’ regions (these regions are now beyond the scales
presented) and, in fact, an increase of the region of NOT(IMP). This
observation, actually, is of value as the proper choice of R simplifies the
experimental realization of logic gates and improves reliability.

In order to demonstrate the proposed logic gates experimentally, one can
implement, for example, the following operation protocol. First of all, the
memristors can be independently initialized by grounding the common point of
their connection with R and applying suitable voltage sequences $V_{1}(t)$ and
$V_{2}(t)$. Next, the grounding of the connection point is released while
$V_{1}$ and $V_{2}$ are kept in the stability region of memristors (operation
codes $10$ and $12$). Third, $V_{1}$ and $V_{2}$ can be simultaneously placed
into the desired operation point and switched back into the stability region.
The calculation results will be stored in the final states of memristors.

###  3.3 Parameter variability effects

In this subsection we investigate the effect of variability of memristor
parameters on the logic functions realized with Fig. 4 circuit. Specifically,
we consider the operation of Fig. 4 circuit employing memristors with
different threshold voltages. For this purpose, the simulations are performed
using higher values of threshold voltages of M2 keeping all other simulation
parameters as in Fig. 5 simulations. Fig. 7 presents two examples of such
calculations showing the diagrams found at about $20\%$ and $40\%$ higher
threshold voltages of M2 compared to M1.

In Fig. 7, one can notice that the diagrams for M1 and M2 are no more
symmetric. At the same time, the general topologies of diagrams are the same
as these in Fig. 5. Importantly, the areas of useful logic functions for M1
(the implication and negation of implication) increase with an increase in
$V_{\textnormal{OFF}}$ and $V_{\textnormal{ON}}$ of M2. This observation can
be used, e.g., to achieve more stable operation of such memristive logic
gates.

##  4 Conclusion

We considered the possibility of in-memory computing (in the form of boolean
logic) based on volatile memristive devices. As a prototype of such
structures, a hysteretic graphene field emitter was adopted. A memristive
model of field emission from the graphene cathode was developed. This model is
practical for the description of real experiments.

Moreover, it was shown that simple circuits of volatile memristors can serve
as a polymorphic logic gate. Specifically, we have demonstrated that in
addition to the trivial operation set (FALSE, TRUE and hold the state) the
same circuit can implement the material implication and the negation of
implication. We expect that volatile memristors could find their own
applications, e.g., in low-level information processing circuits.

##  5 Acknowledgment

This work has been supported by the Russian Scientific Foundation grant No.
15-13-20021. The authors gratefully acknowledge fruitful discussions with A.
V. Okotrub and D. V. Gorodetskiy.

## References

## References

  * [1] J. Backus.  Can programming be liberated from the von Neumann style? A functional style and its algebra of programs.  Comm. Assoc. Comp. Machin., 21:613–641, 1978.
  * [2] L. O. Chua and S. M. Kang.  Memristive devices and systems.  Proc. IEEE, 64:209–223, 1976.
  * [3] M. Di Ventra, Y. V. Pershin, and L. O. Chua.  Circuit elements with memory: Memristors, memcapacitors, and meminductors.  Proc. IEEE, 97(10):1717–1724, 2009.
  * [4] M. Di Ventra and Y. V. Pershin.  The parallel approach.  Nature Physics, 9:200, 2013.
  * [5] J. Borghetti, G. S. Snider, P. J. Kuekes, J. J. Yang, D. R. Stewart, and R. S. Williams.  Memristive switches enable stateful logic operations via material implication.  Nature, 464:873–876, 2010.
  * [6] J. J. Yang, D. B. Strukov, and D. R. Stewart.  Memristive devices for computing.  Nature nanotechnology, 8(1):13–24, 2013.
  * [7] S. Kvatinsky, G. Satat, N. Wald, E. G. Friedman, A. Kolodny, and U. C. Weiser.  Memristor-based material implication (imply) logic: Design principles and methodologies.  IEEE Trans. VLSI Syst., 22(10):2054–2066, 2014.
  * [8] S. Kvatinsky, D. Belousov, S. Liman, G. Satat, N. Wald, E. G. Friedman, A. Kolodny, and U. C. Weiser.  Magic memristor-aided logic.  IEEE Trans. Circuits Syst. II, 61(11):895–899, 2014.
  * [9] F. L. Traversa, F. Bonani, Y. V. Pershin, and M. Di Ventra.  Dynamic computing random access memory.  Nanotechnology, 25:285201, 2014.
  * [10] A. Siemon, S. Menzel, R. Waser, and E. Linn.  A complementary resistive switch-based crossbar array adder.  IEEE J. Emerg. Sel. Topics Circuits Syst., 5(1):64–74, 2015.
  * [11] A. Siemon, S. Menzel, A. Chattopadhyay, R. Waser, and E. Linn.  In-memory adder functionality in 1s1r arrays.  In 2015 IEEE Int. Symp. Circ. Syst. (ISCAS), pages 1338–1341, 2015\.
  * [12] Y. V. Pershin, F. L. Traversa, and M. Di Ventra.  Memcomputing with membrane memcapacitive systems.  Nanotechnology, 26:225201, 2015.
  * [13] Y. V. Pershin and M. Di Ventra.  Memory effects in complex materials and nanoscale systems.  Adv. Phys., 60:145, 2011.
  * [14] A. V. Eletskii.  Carbon nanotube-based electron field emitters.  Physics-Uspekhi, 53:863, 2010.
  * [15] Y. V. Fedoseeva, L. G. Bulusheva, A. V. Okotrub, M. A. Kanygin, D. V. Gorodetskiy, I. P. Asanov, D. V. Vyalikh, A. P. Puzyr, and V. S. Bondar.  Field emission luminescence of nanodiamonds deposited on the aligned carbon nanotube array.  Sci. Rep., 5:9379, 2015.
  * [16] Y. Li, Y. Sun, and J. T. W. Yeow.  Nanotube field electron emission: principles, development, and applications.  Nanotechnology, 26:242001, 2015.
  * [17] Victor I. Kleshch, Denis A. Bandurin, Anton S. Orekhov, Stephen T. Purcell, and Alexander N. Obraztsov.  Edge field emission of large-area single layer graphene.  Appl. Surf. Sci., 357, Part B:1967 – 1974, 2015.
  * [18] D. V. Gorodetskiy, A. V. Gusel’nikov, S. N. Shevchenko, M. A. Kanygin, A. V. Okotrub, and Y. V. Pershin.  Memristive model of hysteretic field emission from carbon nanotube arrays.  J. Nanophoton., 10:012524, 2016.
  * [19] H Nieminen, V Ermolov, K Nybergh, S Silanto, and T Ryhanen.  Microelectromechanical capacitors for rf applications.  J. Micromech. Microeng., 12:177, 2002.
  * [20] J. Sun, M. E. Schmidt, M. Muruganathan, H. M. H. Chong, and H. Mizuta.  Large-scale nanoelectromechanical switches based on directly deposited nanocrystalline graphene on insulating substrates.  Nanoscale, 8:6659, 2016.
  * [21] D. V. Gorodetskiy, S. N. Shevchenko, A. V. Okotrub, and Y. V. Pershin.  to be published.
  * [22] R. H. Fowler and L. Nordheim.  Electron Emission in Intense Electric Fields.  Proc. R. Soc. Lond. A, 119:173–181, 1928.
  * [23] E. P. Sheshin.  Surface structure and electron field emission properties of carbon materials.  MFTI, Moscow, 2001.
  * [24] A. N. Whitehead and B. Russell.  Principia mathematica, volume 2.  University Press, 1912.