Analog simulator of integro-differential equations with classical memristors
G. Alvarado Barrios,1, ∗ J. C. Retamal,1, 2 E. Solano,3, 4, 5 and M. Sanz3, †

arXiv:1803.05945v1 [cs.ET] 15 Mar 2018

1

Departamento de Fı́sica, Universidad de Santiago de Chile (USACH), Avenida Ecuador 3493, 9170124, Santiago, Chile
2
Center for the Development of Nanoscience and Nanotechnology 9170124, Estación Central, Santiago, Chile
3
Department of Physical Chemistry, University of the Basque Country UPV/EHU, Apartado 644, 48080 Bilbao, Spain
4
IKERBASQUE, Basque Foundation for Science, Maria Diaz de Haro 3, 48013 Bilbao, Spain
5
Department of Physics, Shanghai University, 200444 Shanghai, China
(Dated: March 19, 2018)
An analog computer makes use of continuously changeable quantities of a system, such as its electrical, mechanical, or hydraulic properties, to solve a given problem. While these devices are usually computationally
more powerful than their digital counterparts, they suffer from analog noise which does not allow to error control. We will focus on analog computers based on active electrical networks comprised of resistors, capacitors,
and operational amplifiers which are capable of simulating any linear ordinary differential equation. However,
the class of nonlinear dynamics they can solve is limited. In this work, by adding memristors to the electrical network, we show that the analog computer can simulate a large variety of linear and nonlinear integro-differential
equations by carefully choosing the conductance and the dynamics of the memristor state variable. We study the
performance of these analog computers by simulating integro-differential models of fluid dynamics type, nonlinear Volterra equations for population growth, and quantum models describing non-Markovian memory effects,
among others. Finally, we perform stability tests by considering imperfect analog components, obtaining robust
solutions with up to 13% relative error for relevant timescales.

Introduction.— Analog computers employ continuously
tunable quantities of a system, such as its electrical, mechanical, or hydraulic properties, to codify and solve a given problem. Usually, the dynamics of an analog computer perfectly
matches the dynamics of the simulated system. The advantage
of analog computers lies on the computational power provided
by real-time operation and complete parallelism, so that they
require less resources than a digital counterpart for the simulation. On the other hand, the accuracy of an analog computer
is limited by its computing elements and by the quality of its
analog components. Despite the astonishing evolution of digital computers during the last decades, the interest in analog
computers has re-emerged in recent years [1]. For example,
posible applications as math co-processors in VLSI architectures [2, 3], and wave-based analog computation in metamaterials have recently been proposed [4–6].
An electrical analog computer is an active network composed of electrical elements, namely, resistors, capacitors and
operational amplifiers which, connected together, are capable of simulating any set of linear ordinary differential equations [7]. In this case, the solutions of these equations are
encoded into the time evolution of the voltage waveform produced by the analog computer. Indeed, electrical analog devices can only work with a single independent variable when
codified in time [8, 9]. Nonetheless, by making use of finitedifference methods, it is also possible to solve partial differential equations [7, 10].
Memristors, resistors whose resistance depends on the history of charges crossing through the device, are passive circuit elements theoretically postulated by Leon Chua [11, 12]
and firstly constructed in HP Labs in a TiO2 thin film [13].
Afterwards, various other physical implementations of memristors have been reported [14–17]. The memory and nonvolatility properties of the memristor [18] have sparked great
interest in its applications in the fabrication of digital mem-

ories [19], and performance of computational tasks [20–24].
While most of the interest in memristors lies in applications in
digital computation, there has also been proposals of utilization of memristors in programmable analog components of
electrical networks [25] and in the design of highly efficient
operational amplifiers [26]. Therefore, a natural question is
to study whether the characteristic properties of memristors
could extend the applications of eletrical analog computers.
To the best of our knowledge, the role of memristors for efficient analog simulation of physical and mathematical models
has not yet been explored.
In this work, by adding classical memristors to the network
of an electrical analog computer, we show that it can simulate a large variety of linear and nonlinear integro-differential
equations with interest in mathematics and physics. This
is enabled by appropriately choosing the conductance of
the memristors and the dynamics of its state variable. We
study the performance of these analog computers by simulating integro-differential models of fluid dynamics, nonlinear
Volterra equations for population growth, and quantum models describing non-Markovian memory effects, among others.
Finally, by considering 10% error in the analog components,
we perform stability tests of the dynamics, showing the robustness of the simulations with up to 13% error for relevant
timescales. It is noteworthy to mention that the operation conditions of an off-the-shelf memristor fit those of usual circuit
toolboxes
Electric Analog Computer.— To simulate a linear ordinary
differential equation, the analog computer only requires the
following operations: (i) summation, (ii) sign inversion, (iii)
integration and (iv) multiplication by a constant.
We will describe briefly the implementation of the aforementioned operations for the analog computer. First, let us
consider the summation and sign inversion operations, which
are enabled by an adder circuit whose transfer characteristics

2

FIG. 2. Computer diagram for the simulation of the second-order
linear ordinary differential equation of Eq. (4).

FIG. 1. Symbolic representation and corresponding circuit of the
computing elements. (a) Adder for n inputs. (b) Integrator for n
inputs. After the initial charge of the capacitor, that part of the circuit
is switched off from the rest.

for n inputs are given by
Vout = −

n
X

Ki Vini ,

(1)

i

where Vout is the output voltage and Ki = R f /Ri . The symbolic
representation and equivalent circuit of the adder is shown in
Fig. 1(a). Sign inversion can be implemented by an adder with
a single input with K1 = 1.
Next, integration, is meant to be the most important operation in an analog computer. It can be implemented by an
integrator circuit, whose transfer characteristics for n inputs
are given by
Z
1 t X Vini (τ)
dτ + IC,
(2)
Vout (t) = −
C 0 i
Ri
where the constant IC stands for the initial condition. The
symbolic representation and equivalent circuit of the integrator is shown in Fig. 1(b). For the adder and integrator circuits,
we consider ideal operational amplifiers.
The last linear operation, multiplication by a constant, can
be implemented with a potentiometer, which is described by
Vout = αVin ,

(3)

where α < 1 is a constant that characterizes the device.
In addition, analog computers can also simulate nonlinear
dynamics to some extent, by considering signal generators and
function multipliers, which enable the mathematical multiplication of two signals.
We will consider a simple example to illustrate the configuration of an analog computer for the simulation of a linear
ordinary differential equation. Let us consider the following
second-order linear differential equation
ÿ(t) = −ẏ(t) + y(t).

(4)

This equation is written in this form to remark that ÿ can be
obtained as the sum of −ẏ and y, which are obtained from integrating ÿ once and twice, respectively. The computer diagram
that implements Eq. (4) is shown in Fig. 2. Therefore, we see
that integrator circuits enable the solution of ordinary differential equations by making use of feedback connections, which
make the input and output voltage in Eq. (2) to be equal. In
addition, several integrators connected in series stand for subsequent integrations of the desired variable. In this way, the
simulation of a linear differential equation of order n would
require n integrators.
This method can be extended to a system of m linear ordinary differential equations of order n, which can be written
as
m X
n
X
`=1 k=0

a`,k

d(k) y` (t)
= 0.
dtk

(5)

The simulation of such a system requires nm integrators, and
since the summation can be absorbed into the integrators, it
requires at most nm
2 sign inverters.
It is important to note that in order to solve a differential
equation with an analog computer it is not necessary to know
the voltage waveform at any point of the electrical network,
provided that the circuit was properly constructed, the desired
solution is obtained by measuring the voltage signal at the output of the circuit.
Memristive analog computation.— A voltage-controlled
memristor can be described by the following current-voltage
relation [11]
i = g(ω) v,
ω̇ = f (v),

(6)
(7)

where i(t) and v(t) are the current and voltage across the device, respectively. The quantity ω is an internal state variable
specified by the physical implementation of the memristor.
For ideal voltage-controlled memristors the state variable corresponds to the magnetic flux φ, which means f (v) = v. The
quantity g(ω) is the so-called memductance which has units
of conductance and is a function of the state variable. Since
the memristor is a passive circuit element, the memductance
g(ω) must always be positive.
The notion of memristive behavior can be extended to a
broader class of system whose characteristics resemble those

3
ing g(ω, v, t) = −a + bv + k1 (t)ω and ω̇ = k2 (t)v, then, substituting into Eq. (12) we have
Z t


v̇(t) = a − bv(t) −
k(t, τ)v(τ)dτ v(t),
(14)
0

FIG. 3. Integrator circuit where we have replaced the resistor for a
memristor. After the initial charge of the capacitor, the part denoted
by IC is switched off from the rest of the circuit.

of the memristor, and are called memristive systems [12].
These are defined by
i = g(ω, v, t) v,
ω̇ = f(ω, v, t).

(8)
(9)

Where in general, ω represents a set of n state variables, and
f and g are continuous functions.
Now, to study the inclusion of memristive devices into an
analog computer we will consider the case of an integrator
circuit with a single input, where we substitute the resistor
for a memristor, as is shown in Fig. 3. We will consider that
the memristor has a single state variable ω. In the figure, the
current across the memristor, i M , is given by Eq. (8). Then, by
Kirchhoff’s law at node A, we have
i M = iC ,

(10)

dv
g(ω, v, t) v = −C .
dt

(11)

Integrating Eq. (9) allows to write Eq. (11) as
Z

1  t
v̇(t) = − g
f (ω, v, τ)dτ, v(t), t v(t),
C
0

(12)

which in general will be a nonlinear integro-differential equation that will be specified by g and f , which describe the memductance and the memristor state variable dynamics, respectively. It must be noticed that these functions are specified by
memristor engineering.
We now show the type of equations that can be solved using
this circuit. Let us consider the equation that Volterra introduced for single populations in the study of growth of biological populations [27],
Z t


Ṅ(t) = N(t) a − bN(t) −
k(t − s)N(s)ds ,

t ∈ R+ , (13)

0

in which N(t) is the population size at time t, a and b are positive rate constants, and k(t) is the “hereditary” influence.
Now, in order to simulate this equation, we consider a memristive system as described by Eq. (8) and Eq. (9). By assum-

where we have chosen C = 1 and k(t, τ) = k1 (t)k2 (τ). This
is restricted, however, to kernels that can be separated in this
way, otherwise it is only possible to simulate single-variable
kernels. This equation can be implemented with a single integrator and memristor as shown in Fig. 3.
By connecting integrator circuits in series, we can generate
nonlinear integro-differential equations of higher-order. For
example, if we consider n integrators in series, where only
the first integrator circuit contains a memristor, then we can
generate the nth-order integro-differential equation
Z

1  t
d(n) v
=
−
g
f
(ω,
v,
τ)dτ,
v(t),
t
v(t).
(15)
C
dt(n)
0
On the other hand, if each of the n integrators contains a memristor, then the nth-order integro-differential equation will involve the composition of n memductance functions g1 , . . . , gn
corresponding to each memristor. The resulting equation can
be written as follows

Z t
  
1 
d(n) v
=
−
g
g
.
.
.
g
f (ω, v, τ)dτ, v(t), t . . . v(t).
n n−1
1
(n)
C
dt
0
(16)
This allows for the simulation of a wide class of nonlinear
integro-differential equation.
It is also possible to solve first-order linear integrodifferential equations with a suitable change of variables.
If we consider Eq. (12) and define the memristor by
g(ω, v, t) = −ω and ω̇ = k(t) ln(v), we obtain
Z

1 t
v̇(t) =
k(s) ln(v(s))ds v(t).
(17)
C 0
Then, with u = ln(v), we have
Z

1 t
k(s)u(s)ds .
u̇(t) =
C 0

(18)

Notice that we can avoid the sign inversion of the integrand
by normalizing the voltage such that 0 ≤ v ≤ 1. In this way, it
is possible to simulate several linear integro-differential equations coming from quantum models. An example of this is a
Volterra equation describing non-Markovian quantum memory effects [28], given by
Z t
∂t ρ =
K(t, s)Lρ.
(19)
0

Since L is a linear superoperator, the integral kernel will involve linear terms in the elements of ρ. This leads to a system
of integro-differential equations for the elements of ρ which
can be implemented by appropriately choosing the dynamics
of the internal state variable of the memristor. Aditionally, lin-

4
120

0.14

100

0.12
0.1

80

0.08

60

0.06

40

0.04

20
0

0.02
0

2

4

6

5

0

0

2

4

6

0.14
0.12

4

0.1
3

0.08

2

0.06
0.04

1
0

0.02
0

1

2

3

4

0

0

1

2

3

4

FIG. 4. Stability test of the solution of (a) Eq. (22) and (b) Eq. (23).
(Left) Shows the exact solution (black solid line) and the solution
considering imperfect analog components (red dashed line) with up
to 10% error in their corresponding coefficients. (Right) Shows the
average relative error over 100 iterations of the simulation with imperfect analog components.

ear integro-differential equations that appear in the model of
turbulent diffusion [29], have the form
Z t
u̇(t) + p(t)u(t) +
K(t, s)u(t − s)u(s)ds = 0.
(20)
0

Equations of this type can be implemented with a memristor
k2 (t)
2
defined by g(ω, v, t) = α(t)k1 (t)ω and ω̇ = α(t)
2 ln(v) , such
R

t
that K(t, s) = k1 (t)k2 (s), and where α(t) = exp 0 p(s)ds .
By using z(t) = α(t)u(t), we can configure Eq. (20) into the
analog computer as the following equation,
Z t

ż(t) = −
k0 (s)z(s)2 ds ,
(21)
0

Next, connecting the output z(t) to a signal
with k (s) =
1
multiplier with the signal α(t)
, we recover the solution u(t) of
Eq. (20).
In order to provide an example of the previous procedures
and to test the stability of the solutions, let us consider the
following integro-differential equation
Z t
s −(t−s)
2
Ṅ(t) = 2N(t)−0.001N(t) −N(t)
e
N(s)ds. (22)
1
+
s
0
0

k(s)
.
α(s)2

This equation can be implemented by taking C = 1 and choss
ing g(ω, v, t) = −2 + 0.001v + e−t ω and ω̇ = e s 1+s
v in Eq. (12).

In Fig. 4(a), we show the exact solution of this equation compared against the case with up to 10% error in the coefficients
of Eq. (22), which stands for imperfections in the analog components of the computer. We can see that the average relative
error stabilizes at ∼ 10% indicating that the solution is robust
against imperfections in the analog components.
As a second example we consider the following integrodifferential equation
Z t

1
1 −(t+s)
e
u(s)2 ds .
(23)
u̇(t) = − e−2t u(t) +
8
0 2
This equation can be taken into the form of Eq. (21) by considering α(t) = exp(−1/16(e−2t−1 )), k1 (t) = 1/2e−t , k2 (s) = e−s
and ω̇ = k2 (s) ln(v)2 . In Fig. 4(b), we show the solution of this
equation compared against the case with up to 10% error in
the coefficients of Eq. (23), as well. We observe that, in this
case, the error increases continuously, as it is usually the case
in analog computers, reaching up to 13% within the timescale
considered.
Conclusions.— We have studied the inclusion of memristors into the network of electric analog computers. We have
found that this addition enables analog computers to simulate
linear and nonlinear integro-differential equations by appropriately choosing the memductance and the dynamics of the
memristor state variable. This broadens the applicability of
analog computers which, otherwise, could only solve systems
of ordinary differential equations. We study the performance
of these analog computers by simulating integro-differential
models of fluid dynamics, nonlinear Volterra equations for
population growth, and quantum models describing nonMarkovian memory effects. Additionally, we test the stability
of the solutions against imperfections of analog components
by introducing up to 10% error in their corresponding coefficients, finding that the relative error reaches up to 13% for
relevant timescales. In this manner, we show the robustness
of the introduced methods. Moreover, it is noteworthy to
mention that our results have been obtained with minimal
architecture variations, leaving the possibility of complex
arrangements open for future studies. As a further scope, it
would be interesting to consider the proposed scenarios in
the context of quantum memristors [30–33] in the search of
quantum improvements for analog computers.
The authors would like to thank Unai Alvarez-Rodriguez
and Massimiliano Di Ventra for useful discussions. G.A.B.
acknowledges support from CONICYT Doctorado Nacional
21140587 and Dirección de Postgrado USACH. J.C.R. thanks
FONDECYT for support under grant No. 1140194. While
M.S. and E.S. are grateful for the funding of Spanish
MINECO/FEDER FIS2015-69983-P and Basque Government IT986-16. This material is also based upon work supported by the U.S. Department of Energy, Office of Science,
Office of Advance Scientific Computing Research (ASCR),
under field work proposal number ERKJ335.

5

∗
†

[1]
[2]

[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]

[11]
[12]
[13]
[14]
[15]
[16]

Gabriel Alvarado Barrios gabriel.alvarado@usach.cl
Mikel Sanz mikel.sanz@ehu.eus
B. J. MacLennan, Int. J. Gen. Syst. 43, 682 (2014).
G. E. R. Cowan, R. C. Melville, and Y. P. Tsividis, in ISSCC.
2005 IEEE International Digest of Technical Papers. SolidState Circuits Conference. (2005) pp. 82–586 Vol. 1.
G. E. R. Cowan, R. C. Melville, and Y. P. Tsividis, IEEE J.
Solid-State Circuits 41, 42 (2006).
A. Silva, F. Monticone, G. Castaldi, V. Galdi, A. Alù, and
N. Engheta, Science 343, 160 (2014).
S. AbdollahRamezani, K. Arik, A. Khavasi, and Z. Kavehvash,
Opt. Lett. 40, 5239 (2015).
A. Youssefi, F. Zangeneh-Nejad, S. Abdollahramezani, and
A. Khavasi, Opt. Lett. 41, 3467 (2016).
V. P. Kodali, IEEE Trans. Ind. Electron. Control Instrum.
IECI-14, 1 (1967).
M. B. Pour-El, Trans. Am. Math. Soc. 199, 1 (1974).
L. A. Rubel, Adv. Appl. Math. 9, 22 (1988).
N. Ratier, in 2012 6th International Conference on Sciences of
Electronics, Technologies of Information and Telecommunications (SETIT) (2012) pp. 275–282.
L. Chua, IEEE Trans. Circuit Theory 18, 507 (1971).
L. O. Chua and S. M. Kang, Proc. IEEE 64, 209 (1976).
D. B. Strukov, G. S. Snider, D. R. Stewart, and R. S. Williams,
Nature 453, 80 (2008).
S. H. Jo, T. Chang, I. Ebong, B. B. Bhadviya, P. Mazumder,
and W. Lu, Nano Lett. 10, 1297 (2010).
T. Chang, S.-H. Jo, K.-H. Kim, P. Sheridan, S. Gaba, and
W. Lu, Appl. Phys. A 102, 857 (2011).
A. Chanthbouala, V. Garcia, R. O. Cherifi, K. Bouzehouane,
S. Fusil, X. Moya, S. Xavier, H. Yamada, C. Deranlot, N. D.
Mathur, M. Bibes, A. Barthélémy, and J. Grollier, Nat. Mater.

11, 860 (2012).
[17] D. J. Kim, H. Lu, S. Ryu, C.-W. Bark, C.-B. Eom, E. Y. Tsymbal, and A. Gruverman, Nano Lett. 12, 5697 (2012).
[18] L. Chua, Appl. Phys. A 102, 765 (2011).
[19] R. Waser, R. Dittmann, G. Staikov, and K. Szot, Adv. Mater.
21, 2632 (2009).
[20] J. Borghetti, G. S. Snider, P. J. Kuekes, J. J. Yang, D. R. Stewart,
and R. S. Williams, Nature 464, 873 (2010).
[21] Y. V. Pershin and M. Di Ventra, Proc. IEEE 100, 2071 (2012).
[22] J. J. Yang, D. B. Strukov, and D. R. Stewart, Nat. Nanotechnol.
8, 13 (2012).
[23] M. S. Kulkarni and C. Teuscher, in 2012 IEEE/ACM International Symposium on Nanoscale Architectures (NANOARCH)
(2012) pp. 226–232.
[24] M. Cassinerio, N. Ciocchini, and D. Ielmini, Adv. Mater. 25,
5975 (2013).
[25] Y. V. Pershin and M. Di Ventra, IEEE Trans. Circuits Syst. I,
Reg. Papers 57, 1857 (2010).
[26] M. R. Jahromi, J. Shamsi, A. Amirsoleimani, K. Mohammadi,
and M. Ahmadi, in 2017 IEEE 30th Canadian Conference on
Electrical and Computer Engineering (CCECE) (2017) pp. 1–
4.
[27] V. Volterra, Theory of Functionals and of Integral and Integrodifferential Equations (Dover, New York, 2005).
[28] U. Alvarez-Rodriguez, R. Di Candia, J. Casanova, M. Sanz,
and E. Solano, Phys. Rev. A 95, 020301(2017).
[29] B. A. Velikson, USSR Comput. Math. & Math. Phys. 15, 256
(1975).
[30] P. Pfeiffer, I. L. Egusquiza, M. Di Ventra, M. Sanz, and
E. Solano, Sci. Rep. 6, 29507 (2016).
[31] S. N. Shevchenko, Y. V. Pershin, and F. Nori Phys. Rev. Appl.
6, 014006 (2016).
[32] J. Salmilehto, F. Deppe, M. Di Ventra, M. Sanz, and E. Solano,
Sci. Rep. 7, 42044 (2017).
[33] M. Sanz, L. Lamata, and E. Solano, arXiv:1709.07808v1
(2017).

