You are on page 1of 4

2010 12th International Workshop on Cellular Nanoscale

Networks and their Applications (CNNA)

CNN Using Memristors for Neighborhood


Connections
Eero Lehtonen, Mika Laiho
University of Turku
Department of Information Technology
FI-20014 Turku, Finland
{elleht, mlaiho}@utu.fi

AbstractIn this paper we consider using memristors to


implement the neighborhood connections of a CNN. First the
benefits and drawbacks of using memristors as programmable
CNN weights are described. Then, an existing memristor model
is improved to allow full-scale simulation of the design. The new
model is implemented in the SPICE simulation environment and
is not restricted to CNN applications. Then, the CNN cell design
is presented and simulations describing memristor programming
are performed.
Keywords: Cellular nonlinear neural networks, CNN cell,
Memristor, Model

I. I NTRODUCTION
Memristors have been proposed to work as synaptic weights
in neural networks [1] due to the natural implementation
of learning the weights (e.g., Hebbian learning). In cellular
nonlinear networks (CNNs) the template weights are usually
known and need to be updated between each template in a
sequence of templates. Therefore, there needs to be a way to
rapidly change the weights. Also, the CNN cell needs to be
modified to work with passive memristors as programmable
couplings. Programming a memristor selectively requires that
either each memristor is equipped with programming circuits,
or programming circuit is shared by a group of memristors so
that an individual device can be isolated. The latter one is the
only practical option if dense implementations are of interest.
Isolation of transistors can be arranged when memristors are
arranged in a crossbar formation, and the memristors require
a certain threshold voltage in order to be programmed [2].
The use of crossbar connections, arranged in a flossbar [3]
yields a locally connected, large neighborhood well suited for
implementing a CNN.
The programming threshold assures that half-selected devices will not be programmed. It is also needed to guarantee
that the devices will not get programmed unintentionally
during normal use. However, reporting of the first experimental
memristor [4] did not show the existence of such a threshold.
After that, there have been numerous articles on memristor
modeling, for example [5] and [6]. These articles focus on
the current controlled memristor (without the programming
threshold), for which the time derivative of the state variable
is directly proportional to the current.
In this paper we investigate and improve the empirical
model of [7]. In our model, the state variable depends nonlinearly on the voltage across the memristor, effectively yielding a

978-1-4244-6678-8/10/$26.00 2010 IEEE

programming threshold. This nonlinearity phenomenon allows


the memristor to be readily used as an analog memory element.
It is important to note that the available models for the memristor are operationally fundamentally different and instead of
calling the corresponding physical devices memristors it might
be more appropriate to call them simply memristive systems
[8] with different characteristics. In this paper we propose
a CNN cell design using memristors as continuously-valued
neighborhood connections.
II. T HE E XISTING M ODEL OF

THE

M EMRISTOR

In [7], the following relation between the current and


voltage of the memristor is witnessed:
I = wn sinh(V ) + (exp(V ) 1).

(1)

Here w is the state variable of the memristor [4] and the


constants ,, and depend on the physical properties of the
component. The exponent n determines how the state variable
w affects the I V curve. The time derivative of the state
variable w is modeled as
dw
= a f (w) g(V ),
(2)
dt
where a is a constant, f : [0, 1] R is called the window
function and g : R R is some function, assumed to be
linear in [4].
Let us partially solve the differential equation (2). Suppose
that the voltage over the memristor is of the sinusoidal form
V (t) = Vm sin(2f t). Let us restrict the values of the state
variable w to [s1 , s2 ] where 0 s1 < s2 1 and suppose that
w is initially set to w = s1 . Finally, let T = 1/(2f ) be the
time until which V (t) is positive. From equation (2) it follows
that
Z s2
Z T
dw
=a
g(V (t)) dt.
(3)
0
s1 f (w)
If g is injective and satisfies
g(V (t)) = g(Vm sin(2f t)) = g(sin(2f t)) for all t, (4)
where the constant R depends only on Vm , it follows that
!
Z s2

Z T
dw
=
g(sin(2f t)) dt .
/ a
s1 f (w)
0

Therefore the equation (3) defines a function

x 10

(s1 , s2 ) 7 7 Vm .

III. E NHANCING

THE

M ODEL

mem

0.5
V

0.5

0
0.5

1
1.5

2
2

0
Time (s)

2
Time (s)

4
7

x 10

x 10
2

which implies that the integration time which takes w from


s1 to s2 is inversely proportional to . It should be noted
that the exponent n of w in (1) has no impact on this result.
However this leads to contradiction, since the experimental
results presented in [7] imply that the integration time is highly
nonlinear with respect to the voltage across the memristor.
We conclude that in order to imitate the behaviour of the
memristor reported in [7], g must be nonlinear, odd and
monotonically increasing function.

0.5

1.5
0.8
1
Imem

1.5
I/V curve

Using this function one is able to determine the amplitude


of the voltage V (t) which yields appropriate change to the
resistance of the memristor.
To point out the necessity of a nonlinear g we study the
following situation. Let g be a linear function as in [7], and
suppose for a moment that the voltage V1 (t) = Vm is constant.
Let V2 (t) = Vm , where > 0. Then g(V2 (t)) = g(V1 (t))
and thus
Z T /
Z T
g(V2 (t)) dt = (T /) g(Vm ) =
g(V1 (t)) dt,

1.5

0.6

0.5
0

0.4

0.5

0.2

1.5

2
Time (s)

Fig. 1.

x 10

2
Time (s)

Memristor driven with sine of 2VPP.

On the basis of the current available experimental data it is


plausible to assume that g is a polynomial function,
g(V ) = V q
for some q 2N 1. This function satisfies the equation (4)
of Section II.
It should be noted that the exponent n in (1) is used to
mimic the rapid behaviour of the switching process. When the
conducting channels are formed through the electronic barrier,
the memristor switches to the conducting state in a sudden
manner and vice versa, switching to the nonconducting state
takes place rapidly.
Without the nonlinearity with respect to voltage, this would
imply poor performance for the memristor as a memory element, since a small reverse voltage would take the conducting
state to a nonconducting one when n is large. In [7] suitable
range for n is reported to be n [14, 22].
A window function with the property f (0) = f (1) = 0
implies infinite memory. To avoid this result we restrict w in
[s1 , s2 ] where the window function is always positive. In the
previous models, e.g. [6], this restriction has not been done,
leading to problems at the boundaries. No requirements on the
symmetricity of the window function are posed.
According to these enhancements we end up in the following Eldo (a commercial variant of SPICE) simulation model.
Note that s1 corresponds to lim min and s2 to lim max.
.SUBCKT memristor Plus Minuss 0 PARAMS:
+ a=2 b=9 c=0.01 g=4 n=4 q=13 p=1
lim_max=0.95 lim_min=0.05 skaala=10n

rleak=0.01
**********************************
* DIFFERENTIAL EQUATION MODELING *
**********************************
Rseries Minuss Minus 0.01Meg
Gxpos 0 x value={ sign2(-V(x) +
lim_max)*sign2(V(plus,minus))*
(( V(Plus,Minus) )q)*f(V(x),p) }
Gxneg 0 x value={ sign2( V(x) lim_min)*sign2(V(minus,plus))*
(( V(Plus,Minus) )q)*f(V(x),p) }
Cx x 0 0.00008
Raux x 0 0.01T
.IC V(x) 0.15
***********************************
* RESISTIVE PORT OF THE MEMRISTOR *
***********************************
Gmem plus minus value={ (((V(x)n)+
rleak)*b*sinh(a*V(plus,minus))+
c*( exp(g*V(plus,minus))-1 ))
*skaala }
Exn xn 0 value={ (V(x))n }

x 10

Rxn xn 0 0.01T
*window function, according to Joglekar
.func f(x,p)={1-(2*x-1)(2*p)}
.func sign2(val)=(sign(val)+1)/2
.ENDS memristor
***********************************
IV. CNN

CELL STRUCTURE

Using memristors as CNN weights is worth investigating


because it allows implementing very large neighborhoods in a
dense fashion. It also makes possible having space-dependent
templates at no additional cost. Figure 2 shows a generic CNN
cell using memristors for couplings. The input currents are
summed at the virtual ground node of the integrator. The integrator output is buffered by an inverting- and a noninverting
unity gain buffer. The outputs of these buffers control the
positive and negative memristor connections. Two memristors
per connection (positive and negative) are used here because
the resistance of the memristor cannot be negative. There
are ways to obtain the required four quadrant operation also
differently, but the benefit of the chosen approach is that no
DC bias current is needed.
N

PROG
GLOBAL
s8a

RP

s8b

RC

IN
Vp

s9a

+
-

S Q
R Q

s9b

s1n

VDD
s7

s2

CNN_OUT

OPA_OUT

s3

VDD-
VSS
s5
s1p
s6
s4
GND

-1

VSS+
S

Fig. 2.

CNN cell using memristors.

Figure 1 shows that the memristor model presented in the


paper has a proper programming threshold. The CNN cell
of Figure 2 can be used to program the templates. For this
purpose, a voltage global is input into the cell. This voltage
is used to convey the weight of one connection into the cells.
The level of the virtual ground and the switches are controlled
so that the memristor connected to a particular neighbor is
biased above the programming threshold, until it has reached
the desired resistance value.
Figure 3 shows a simulation of programming. The approach
taken in this paper is that the weights are programmed so
that the programming automatically stops when the desired
template value has been reached. Figure 3 shows an example
of template programming, where initially the memristor to
be programmed has been set to a nonconducting state. The
switches are controlled so that s1n, s2, s6, s8a and s9b are

HI (thus the corresponding switches are conducting). This


combination of switches programs the negative self-feedback
memristor driven by the noninverting amplifier. It can be
observed that the feedback path driven by the noninverting
output amplifier is negative since a positive increment into
CNN OUT causes a negative increment at OPA OUT.
Prior to programming, the SR latch is reset using the PROG
signal. After this, the programming starts since voltage VDDVSS+=1.5V (in this case GLOBAL=0V, thus =0.5V)
appears over the self-feedback memristor; memristor state
variable w starts to increase until OPA OUT reaches voltage
GLOBAL. At this point, the SR latch is set, CNN OUT is
no longer pulled to VDD and thus programming stops. At
this point Imem RP = . By changing the value of voltage
GLOBAL, different weights can be programmed.
Figure 4 shows a simulation where the cell is configured
into computing mode by setting bits s1n, s4 and s8b. Only
the negative self-feedback memristor is programmed into a
nonzero state. Voltage CNN OUT is driven from zero to 2
V in a transient simulation, whereas GND level is set to
1V. The nonlinearity of memristor current Imem is clearly
observable, making the OPA OUT respond nonlinearly to a
linear input. This nonlinearity may be problematic in some
CNN applications. Also shown is memristor state variable w
that stays unaltered in the computing mode as desired.
The nonlinearity of the current needs to be taken into
account also in the programming phase. The method of Figure
3 sets the current through the memristor into a value that
generates a desired voltage () over RP . Because in the computing mode the voltages are lower, the nonlinearity causes
that a lookup table needs to be used to map programming
voltages to desired template values.
In practice control signals s2, s3, s4 and s5, s6 are generated
using two sets of row/col decoder signals and additional
control signals. With these decoders the Vp and CNN OUT
nodes can be controlled independently, making possible that
each memristor can be individually programmed as in the
programming of memristor-based crossbar memories [9]. Unlike in transistor-based CNN realizations that convey template
patterns in parallel as global voltages, different template elements need to be programmed sequentially. Also, it should
be noted that even the same template elements cannot be
programmed in parallel if they are too close to each other
[10]. Thus, the template programming is quite slow. Therefore,
the programming of an individual template element should
be as fast as possible. The CNN cell proposed in this paper
has a continuous-time feedback that stops the programming
when a correct template value has been reached. This is faster
than sequential, discrete time programming where measuring
and programming increment cycles are applied consecutively
[11]. However, the increased speed comes at the cost of more
complex hardware compared to [11].
V. C ONCLUSIONS
We consider using memristors to implement the neighborhood connections of a CNN. Problems with existing SPICE

0.6
CNN OUT

0.4
0.2

IN
OPA OUT

0
0

0.2

1
0

0.4

0.6

0.8

0.2

0.4

0.6

0.8

x 10
2

CNN OUT

IN
OPA OUT

1.5
1

1
0.5

0
0

0.2

0.4

0.6

0.8

0.2

0.4

0.6

0.8

x 10
1
W

1
W

1
6

x 10

0.5
0

0.5
0

0.2

0.4

0.6

0.8

0.2

0.4

0.6

0.8

1
6

x 10

1
6

x 10

x 10

x 10

x 10

Imem

mem

0
1

0.2

0.4

0.6

0.8

0.2

Fig. 3.

CNN cell using memristors.

simulation models for memristors are identified and a new


memristor SPICE model is shown that has a steep programming threshold and works also in the extremes of the
programming range. A generic CNN cell using memristors
as continuously-valued neighborhood connections is shown.
Programming and computing modes are simulated. Based on
this, it can be concluded that for purposes of CNNs, a memristor with linear I/V characteristics in computing mode and
steep programming threshold are desirable. The memristorbased CNN cell has compact interconnections, but the cell
itself requires a number of analog CMOS building blocks
thus the cell is not particularly compact. Also, despite a real
time feedback control in the template programming, the partly
serial nature of the process makes changing templates slow
compared to CMOS implementations. Thus, memristor-based
CNNs are best suited for applications in which templates do
not need to be changed fast. Alternatively, multiple parallel
memristive networks can be considered so that templates could
be changed by rapidly switching between preprogrammed
neighborhood representations.
VI. ACKNOWLEDGMENTS
This work was funded by the Academy of Finland (131295),
Nokia foundation, and the GETA graduate school.
R EFERENCES
[1] G. S. Snider, Self-organized computation with unreliable, memristive
nanodevices, Nanotechnology, Vol. 18, pp. 1-13, June 2007.
[2] P. Vontobel, et al., Writing and reading from a nano-scale crossbar
memory based on memristors, Nanotechnology, 2009.

0.4

0.6

0.8

Time (s)

x 10

Fig. 4.

1
6

x 10

CNN cell using memristors.

Turel, J. H. Lee, X. Ma, K. Likharev, Neuromorphic Architectures


[3] O.
for Nanoelectronic Circuits, International Journal of Circuits Theory
and Applications, Vol. 32, pp. 277-302, 2004.
[4] D. Strukov, et al., The missing memristor found, Nature, vol. 453, pp.
80-83, May 2008.
[5] N. Joglekar and S. J. Wolf, The elusive memristor: properties of basic
electrical circuits, arXiv:0807.3994 v2 [cond-mat.mes-hall], pp.1-24,
January 2009.
[6] D. Biolek, Z. Biolek, and V. Biolkova, SPICE Modeling of Memristive,
Memcapacitative and Meminductive Systems, Proceedings of ECCTD
09, European Conference on Circuit Theory and Design, Antalya,
Turkey, pp. 249-252, August 2009.
[7] J. J. Yang, M. D. Pickett, X. Li, D. A. A. Ohlberg, D. R. Stewart and
R. S. Williams, Memristive switching mechanism for metal/oxide/metal
nanodevices, Nature Nanotechnology, Vol. 3, pp. 429 - 433, 2008.
[8] L. O. Chua and S. M. Kang, Memristive devices and systems, Proceedings of the IEEE, vol. 64, iss. 2, pp. 209-223, February 1976.
[9] D. Strukov, K. Likharev, A Defect-Tolerant Architecture for Nanoelectronic Resistive Memories, 7th Annual Non-Volatile Memory Technology
Symposium, 2006, pp. 58 - 63, 2006.
[10] M. Laiho and E. Lehtonen, Cellular Nanoscale Network Cell with
Memristors for Synapses and Local Implication Logic, Submitted to
appear in Proceedings of ISCAS 2010, IEEE International Symposium on
Circuits and Systems, May 2010.
[11] M. Laiho and E. Lehtonen, Arithmetic Operations within MemristorBased Analog Memory, To appear in Proceeding of CNNA 2010, IEEE
International Workshop on Cellular Nanoscale Networks and Applications, February 2010.

You might also like