Professional Documents
Culture Documents
Analog Implementation
Analog Implementation
6, JUNE 2011
Abstract— In this paper, we aim at developing an analog ventricles in reference to the natural signal of the sinoatrial
spiking neural network (SNN) for reinforcing the performance node. Since physiological conditions and cardiac rhythms vary
of conventional cardiac resynchronization therapy (CRT) devices from person to person and depend on the physical conditions
(also called biventricular pacemakers). Targeting an alterna-
tive analog solution in 0.13-µm CMOS technology, this paper of each individual patient, the performance of conventional
proposes an approach to improve cardiac delay predictions in pacemakers is quite limited and suboptimal as they can only
every cardiac period in order to assist the CRT device to deliver the constant cardiac rhythm set by the physician during
provide real-time optimal heartbeats. The primary analog SNN the implantation procedures or during the periodic followups.
architecture is proposed and its implementation is studied to Consequently, the variation of the physical and physiological
fulfill the requirement of very low energy consumption. By using
the Hebbian learning and reinforcement learning algorithms, the situations of each patient cannot be timely taken into account.
intended adaptive CRT device works with different functional In this context, the ADAPTER project led by ELA Medical
modes. The simulations of both learning algorithms have been (Sorin group) has undertaken the research of an auto-adaptive
carried out, and they were shown to demonstrate the global solution for a CRT device of a new generation. The targeted
functionalities. To improve the realism of the system, we intro- adaptive CRT device [3], [4] aims at resynchronizing the
duce various heart behavior models (with constant/variable heart
rates) that allow pathologic simulations with/without noise on contractions of both ventricles in every heartbeat (HB) so
the signals of the input sensors. The simulations of the global as to maximize the volume of blood pumped to the body
system (pacemaker models coupled with heart models) have during the contractions of cardiac muscle. Two basic features
been investigated and used to validate the analog spiking neural of this resynchronization are the atrioventricular (AV) delay
network implementation. and the interventricular (VV) delay [3], [4], which represent
Index Terms— Cardiac resynchronization therapy device, Heb- respectively the contraction delay between the right ventricle
bian learning, reinforcement learning, spiking neural network. (RV) and the right atria (RA) and that between the left
ventricle (LV) and right ventricle. The use of “hemodynamic”
I. I NTRODUCTION sensors allows the measurement of the volume of pumped
blood (also called stroke volume: SV) [5] by the heart, which is
D URING the last decade, the number of patients suffering
from moderate to severe congestive heart failure, which
significantly lowers their life quality, has increased substan-
a critical criterion to evaluate the performance of pacemakers.
Hence, the objective of this adaptive CRT device is to optimize
tially. Cardiac resynchronization therapy (CRT) [1], which is both AV and VV delays in order to maximize the SV output.
as an efficient treatment for these patients, has been developed The nonexplicit relations between the input and the output
not only to improve cardiac functions but also to greatly of the CRT device and the important variations in situation
reduce the risk of sudden death [2]. The principle of the over time caused by the aging or the general health of each
biventricular pacemaker, which is also known as the “CRT patient have prescribed an auto-adaptive system based on the
device” [3], [4], is the stimulation synchronization of both artificial neural networks. Their capabilities of approximating
the nonexplicit input/output relations of the system by different
Manuscript received December 9, 2009; revised February 18, 2011; accepted learning algorithms and tracking slowly varying parameters of
February 19, 2011. Date of publication April 29, 2011; date of current version
June 2, 2011. This work was supported in part by the collaboration in the the system [6], [7] match perfectly the need of our project.
Eureka “ADAPTER” under Project EUKA 00501 and the French National Particularly, the spiking neural network (SNN) uses the timing
Research Agency. of neural firing to express analog information and can solve
Q. Sun, F. Schwartz, J. Michel, and Y. Herve are with the Het-
erogeneous Systems and Microsystems, Institute of the Solid Elec- problems in the continuous domain such as time series analysis
tronics and the Systems, University of Strasbourg, Strasbourg 67037, [8], [9], which is just our case (real-time online learning). Even
France (e-mail: qing.sun@iness.c-strasbourg.fr; françois.schwartz@iness.c- with an increasing structural complexity, the spiking neurons
strasbourg.fr; jacques.michel@iness.c-strasbourg.fr; yrv@wanadoo.fr).
R. Dalmolin is with the Sorin Cardiac Rhythm Management are normally easier to implement in a large neural network
Business Unit SAS, Sorin Group, Clamart 92140, France (e-mail: [10], [11]. Thus, on one hand, for the ease of design and
renzo.dalmolin@sorin.com). testing of various potential system functions, the ADAPTER
Color versions of one or more of the figures in this paper are available
online at http://ieeexplore.ieee.org. project was initiated with the pure digital SNN implementation
Digital Object Identifier 10.1109/TNN.2011.2125986 [4] of the AI Medical Semiconductor Ltd. On the other
1045–9227/$26.00 © 2011 IEEE
SUN et al.: ANALOG SPIKING NEURAL NETWORK FOR ASSISTING CARDIAC DELAY PREDICTION 859
Impulse General principle between the general controller and the SNN allows
Programming
Generator Controller
Interface accepting or rejecting the delay predictions made by the SNN
& Core
Heart
Sensor part [3], otherwise, it maintains the settings made by physicians.
Interface Neural Processor In general, the adaptive CRT device has three functional
Battery
CRT-device
(SNN1 & SNN2) modes to work.
1) Nonadaptive Mode: It is the default and safe mode of
Fig. 1. Internal module description of the adaptive CRT device. the system that contains the default AV and VV delays
preset by physicians. These delays are learned by SNN1
with HL algorithm in the background.
hand, considering the continuous computation of continuous 2) Adaptive Sensed Mode: As the “online learning” mode
variables intrinsically provided by analog computation and the run by SNN1, this mode uses the RL algorithm to
high integration density of analog SNN [12], [13], an analog updates the firing timing output in every HB by super-
SNN implementation could be very interesting for reducing vising the SV output variations.
power consumption and the silicon area of the system. So, 3) Adaptive Optimal Mode: The SNN2 adopts a guided
this paper presents a feasibility study of an analog SNN RL algorithm for adjusting the learning rates of the RL
implementation as an alternative to the digital version. algorithm in order to add the stabilities and preserve the
This paper is organized as follows. The global description plasticity.
of the adaptive CRT device is briefly introduced in Section II.
The system always begins with the nonadaptive mode under
Section III explicitly describes the architectures of the analog
the supervision of a physician when the patient is under cardiac
SNN as well as the Hebbian learning (HL) and reinforcement
monitoring. In this mode, the physician initializes the default
learning (RL) algorithms used for two different functional
AV and VV delays (called P AV and P V V ). The CRT device
modes. The global simulations with different heart models
is then just a simple classic pacemaker for the patient. The
(with constant/variable heart rates, HRs) under the influences
general controller transmits impulses corresponding to the
of uniformly distributed noise are reported in Section IV. This
cardiac delays preset by physicians. On the inside, the SNN1
paper concludes with a performance comparison between the
learns to predict these preset delays with the best possible
analog implementation and the digital one. The perspective of
accuracy. When the general controller approves the delay
this paper on the future research will be presented in the end.
predictions by SNN1, it shifts to the adaptive sensed mode.
The nonadaptive mode is also the safe mode of the system.
If the neural processor cannot work properly, the system will
II. G LOBAL D ESCRIPTION OF THE A DAPTIVE return to this mode and work without the assistance of the
CRT D EVICE neural processor for the global security.
In this section, we describe the internal functional modules The startup of the adaptive sensed mode is performed with
and the functional modes of the adaptive CRT device based on P AV and P V V . In this mode, the neural processor aims at
the original solution proposed by AI Medical Semiconductor maximizing the SV through the optimal control of the AV and
Ltd. [4]. The CRT device receives the signals of three elec- VV delays. This optimization depends on the gaps between
trodes (RA, RV, and LV) of input/output type and the signals the actual measured SV value and the previous one. The RL
of two hemodynamic sensors of input type only, which are algorithm will guide SNN1 to search for the maximal value
placed in the RV and LV, from the heart. Meanwhile, the of the pumped blood volume (SV).
adaptive CRT device sends a series of impulses to the RV In the adaptive optimal mode, the hemodynamic signals of
and LV electrodes for the depolarization stimulation. These the input sensors will be analyzed by SNN2 and more precise
electrical impulses exciting RV and LV are sent in accord with system states can be recognized. The target of this mode is to
the delays determined by the internal general controller. The optimize the Hebbian plasticity/stability dilemma. This is our
following five internal functional modules can be found in the future work and this paper focuses on the architectures and
adaptive CRT device (Fig. 1). algorithms implemented in the first neural network SNN1.
1) A sensor interface (receiving the signals from sensors
III. D ESCRIPTION OF THE N EURAL P ROCESSOR
and electrodes) and a cardiac impulse generator (exciting
the heart via the electrodes). This section describes the functional partition of the neural
2) A general controller working as the master of the processor in the beginning. Then the primary analog imple-
adaptive CRT device. mentation of one SN in SNN1 and the two employed learning
3) A neural processor of two SNN (called SNN1 and algorithms (HL, RL) will be analyzed in detail.
SNN2) functioning as the slaves of the general con-
troller. A. Functional Partition of the Neural Processor
4) A programming interface for physicians. The first SNN, i.e., SNN1, is composed of two identi-
5) A battery block ensures the power supply of the whole cal spiking neurons, called S N AV and S N V V (see Fig. 2),
adaptive CRT device for 5–7 years. which generate the targeted firing timings T AV and T V V ,
The core part of this device is based on the connections respectively, used as optimized AV and VV delay. The second
of the general controller with both SNNs. The master–slave network SNN2 receives the hemodynamic signals from the
860 IEEE TRANSACTIONS ON NEURAL NETWORKS, VOL. 22, NO. 6, JUNE 2011
SNN1 TAV
RA SNAV Module 1: Temporal synchronizerdecoder
TVV
VV
SN Shift Registers for 40 synapses Temporal
MonoStable
Synaptic Clock λt
SV, PAV, PVV RA
Algorithm sequencer weights DQ DQ DQ DQ
(HL, RL)
RA SNN2 SI
Time step λt
Hemodynamic
signals Algorithm sequencer (GRL) T = 5 ms SIi1 SIi2 SIi3 SIi40
T0 ti0 ti1 ti2 ti 3 ti40 THB
Di t
Timing of the i
T T T T s
D m M
Fig. 2. Internal functional blocks of the neural processor. RA depolarization + + 2 3 4 0 250 BP
i + i + + 40
i
T0 D i +
+ +
D
+
D D T0 =2
T0 T0 T0 + R
hemodynamic sensor. It is proposed to assist the SNN1 block T0 H
with guided RL algorithm. The SNN1 block has R A, SV , Module 2: Dynamicsynapses
i {AV, VV}
P AV , and P V V as input signals. ωij Synapstic
MonoStable j [1, 40], j Ν
weight
B. Functional Description of One SN in SNN1 SI i
PSR i
j j
1) Internal Structures of One SN in SNN1: For clear Post Synapse Response (PSR)
indication, the functional description begins with the process
Module 3: Integrate & Fire
timeline of each spiking neuron SN. Its behavior described
40
here is fulfilled in one HB. In the extreme human case of 240 PSRi1
PSR i
LIi MonoStable
beat per minute (i.e., HR = 240 BPM), the duration of one
j
PSRi2 j=1
PSRi3 CRRC Comparator Ti
HB (TH B ) is 250 ms. The timing of the RA depolarization
(T0 ) is considered as the beginning of every HB and it will PSRi40 Threshold
be the time reference of the time variable t in the following
descriptions (i.e., T0 ≤ t ≤ T0 + TH B ). According to the LeakyIntegration Fire
clinical observations of the ADAPTER project, the appropriate
range for the AV delay is [40, 240] ms and [−100, 100] ms Fig. 3. Synopsis of the three analog modules of one SN in SNN1.
for the VV delay. Thus, the dynamic range for both delays
is uniformly set to 200 ms. The time resolution of the SN
S I ij (t) = δ t − t ij , t ij = T0 + D i + j · T (1)
is then bounded by the “time step” (T ) within this range.
Considering the design tradeoffs over the fast convergent where δ(t) is the Dirac delta function.
speed, the small area occupation of the silicon implementation 2) The second module is composed of 40 “dynamic
in the tiny adaptive CRT device and the ultralow power synapses” per neuron. Each synapse, receiving one
consumption, we choose a T equal to 5 ms. At each time temporal-shifted S I ij from the first module, emits an
step, a unitary impulse (SI) excites a synapse. Depending on impulse called the post synapse response (P S R ij ) toward
the weight of the synapses, the SI signals will be transmitted to the neuron. P S R ij is an impulse balanced by the synaptic
the integrate and fire (I & F) neuron after weighting. So, each
weight ωij , which is adjusted by the learning algorithms
neuron has 40 dynamic synapses to cover the delay adjustment
range (200 ms). To distinguish these SI, we will name them (HL, RL). P S R ij can be expressed as
S I ij with i the property of neurons i ∈ {AV, VV} and j the
P S R ij = ωij · S I ij = ωij · δ t − t ij . (2)
row of synapse j ∈ [1, 40], j ∈ N. The internal structures
of both neurons are identical so that we describe a general Since SIij is unitary and ωij ∈ [0, 1], so P S R ij ∈ [0, 1].
neuron S N i , which can be further divided into three modules 3) The third module comprises the “leaky integration” part
as follows (see Fig. 3). and the “fire” part of the neuron. The first part com-
1) The first module is a “temporal synchronizer decoder” bines the 40 P S R ij signals sent by the second module
synchronized to the RA signal. After the detection of 40 i
to generate j =1 P S R j . This signal passes through
the RA depolarization, the monostable block generates
the CRRC to create the leaky integration signal (L I i ).
a preset delay D i to reach the range beginning of the AV
The expression of L I i is given by
or VV delay. As an example, for AV ∈ [40, 240] ms,
D AV is set to 35 ms so as to generate the S I1AV at
40
C0 C1 R1 C2
where (∗) is the convolution product. The function h(t)
is the CRRC impulse response and u(t) is the Heaviside
function. The second part works as a comparator with LIi
R2
a threshold. If the accumulated energy surpasses this
threshold, a firing will be emitted as the targeted firing
timing T i . After this firing, all the shift registers from
first module are reset to 0 and no more firing can be
emitted in this HB. Fig. 4. Diagram of the CRRC.
The first module can be designed with basic digital cells
considering the low power consumption requirements. The 3) Leaky Integrator Response to One Input Impulse: To
firing timing set in the third module is based on the impulse study the targeted firing timing and the evolution of synaptic
sequence of P S R ij signals sent by the second module. So weights according to different algorithms, we analyze the L I i
we will start our detailed analysis by the key unit (the CRRC) amplitude variations related to the input sequence of P S R ij
of the third module. signals. To identify the CRRC response of a specific input
2) Architecture of the Analog Leaky Integrator: The design sequence of P S R ij signal, we define a sequence K below
target of the analog leaky integrator is to have a transfer
function of h(t)t arget = t · e−t /τ · u(t). Its Laplace transform ωij = 1, j ∈ [1, K ] ,
K ∈ N, K ≤ 40. (8)
is given by ω j = 0, j ∈ N − [1, K ] ,
i
τ2
H (P)target = . (4) The CRRC response to this sequence K , i.e., L I i(K ) (t), is
(1 + τ p)2
40 K
In practice, we choose a classic CRRC cell used in the L I i(K ) (t) ωij · h t − t ij · u t − t ij = L I ij (t)
high-energy particle physic experiments [14] as an analog j =1 j =1
implementation of the leaky integrator part for the following (9)
reasons: where L I ij (t) = ωij · h t − t ij · u t − t ij is the independent
1) the CRRC presents an impulse response stretching over CRRC response of a isolated input impulse P S R ij at the
time, which allows the “addition” of input impulses by instant t ij . For t ≥ t1i , we note t i(K ) max as the instant when
stacking up their amplitudes and taking into account the L I i(K ) (t) reaches its maximum L I i(K ) max (Fig. 5). First of
leak of the incoming energy; all, we analyze the amplitude response of L I i(1) (t) based on
2) the CRRC uses a current input and a voltage output so (9) for a simple input sequence with K = 1. We get
that the summation of the P S R ij signals (current flow)
40
1.5
PSRij 40
1 T
j =1 PSRij Sequence K = 5
Sequence K = 2 j =1 0.5
1 0
0 1 2 3 4 5 6 7 8 9
T = 5 ms T 3
t ti(K)max
2.5 T τ 5 ms
i i
t 0
t 1 ti2 2
LIi(2)max Peaking
LIi(t) LIi(1)(tiP ) 1.5 delay τ
1 tiP points
LI (t ) = LI (t ) + LI 2(t )
i i
P2
i
1
i
P2
i i
P2 1
j
1
LIi2(tiP )
2 0.5
LIi1(tiP ) 0
τ τ 2
t 0 1 2 3 4 5 6 7 8 9
time (t)
ti(2)max
ti0 tiP1 tiP ti2 tiP ti0 ti1 ti2 ti3 ti4 ti5 ti6 ti7 ti8 ti9
1 2
Fig. 5. CRRC amplitude response of two input P S R ij impulses j ∈ {1, 2}. Fig. 6. Amplitude variations of L I i (t) in the case of receiving five
consecutive unitary P S R ij impulses.
Evolution of LI i(K)(max)
5 N 0.5
In Fig. 5, the maximum of the CRRC response to a sequence
K = 2, i.e., L I i(2) max , is reached at the instant t i(2) max , which 4
is different from t Pi 2 . Since the L I i(2) max occurs when t > t2i >
t1i , with (14) and (15), we get 3
i i
i(2) t − t1i − t−t1 t − t2i − t−t2 2
LI (t) = e e τ +e e τ (16)
τ τ
11 2 3 4 5 6 7 8 9 10
d L I i(2) (t i(2) max ) T
= 0 ⇒ t i(2) max = t1i +τ + −T
(17) K
dt 1+e τ
Fig. 7. Evolution of L I i(K ) max as a function of K .
⇒ t2i <t i(2) max < t2i +τ = t ip2 . (18)
Thus, t i(2) max is always smaller than t Pi 2 so that the accumu- coefficient N = T /τ to choose an appropriate ratio in the
lated maximum arrives earlier than the second peaking point following study. Fig. 6 also illustrates that the t i(K ) max points
t Pi 2 . For a general case when the CRRC receives a sequence arrive a little bit earlier than the t Pi 2 points in accord with (18).
K , the expression of the t i(K ) max in (19) and the accumulated To study the influence of the coefficient N on the variations
maximal value of the CRRC response L I i(K ) max in (20) are of the accumulated amplitude, we trace the evolution of
noted L I i(K ) max based on (20) as a function of K for various ratios
bK N in Fig. 7.
t i( K ) max = t1i + τ + (19)
aK As we can observe, the value of the cumulated amplitude
b
L I i(K ) max increases with K for all values of the ratio N.
− K
L I i( K ) max = L I i t i(K ) max = a K e a K τ (20) For N = 2, the amplitude will reach its asymptotic value
−1 j (T /τ ) −1 after three consecutive impulses (K ≥ 3). For N = 0.5, the
where a K = Kj =0 e , bk = Kj =1 j T e j (T /τ ) . So, asymptotic value is reached for K > 10. For N = 1, four
if the learning algorithm can balance the synaptic weight ωij to consecutive impulses are not sufficient to reach the asymptotic
generate a sequence K , it is also able to control the maximal value. The asymptotic value can be expressed by
amplitude of the L I i (t). In this way, with the chosen threshold, N
S N i can control the targeted firing timing T i .
e (1−e )
−N
5) Choice of the Threshold: In (17) and (19), we observe L I i(∞) max = L I i(K ) max
= N . (21)
K →∞ e −1
that the ratio of T /τ is very important to decide both the
amplitude variations of the CRRC response and the timing The firing occurs when the signal L I i (t) surpasses the
to surpass the internal threshold. To well choose the internal threshold. To prevent undesired firing, we will introduce the
threshold value, we look into the accumulated amplitude following constraints. Due to the fact that noise can impact
variation of the L I i (t). any synaptic weight, a desired sequence (m) can be changed
Fig. 6 shows a simulation with a sequence K = 5 for the into a sequence (m − 1). To be sure that the lack of the mth
case T /τ = 1. If this ratio is less than 1, the “memory” SI will make it impossible to produce a firing, we state the
effect will be reinforced and the energy accumulations will following constraint.
be faster. In the opposite case, the effect of previous energy Even with a sequence K ≈ +∞ (in our case K = 40), if the
accumulations will be less important. Hence, we define a mth impulse is absent, then the contribution of the impulses
SUN et al.: ANALOG SPIKING NEURAL NETWORK FOR ASSISTING CARDIAC DELAY PREDICTION 863
LIi(t) 0.5
N=2
“Gap” − >0 N = 1, m = 4 N=1
0.25 N = 0.5
LIi(K)max Gap > 0
“Rest”
Calculation of Gap
i(m)max
LI 0
i(m −1)max
LI
Threshold −0.25
−0.75
t
0
−1
tim − 2 tim − 1 tim 0 1 2 3 4 5 6 7 8 9 10
Order number m of the input PSRim impulse
Fig. 8. Definition of the “Gap” and the “Rest.”
Fig. 9. Study on the choice of the threshold.
TABLE I
these coefficients are still unknown and often variable, which
R ij S ETTING WITH HL A LGORITHM
justifies our connectionist approach choice. Equation (25) can
Synapse state be modified as
R ij I & F state
PostHebb Hebb PreHebb
T i < Pi Hit −1∗ +1∗
AV = AV − AVopt and V V = V V − V Vopt
i
T >P i Hit +1♦ ∗ −1◦ ∗ ⇒ SV = SVmax − α (AV )2 − β (V V )2 .
T i < Pi Miss −1 +1 (26)
T i > Pi Miss +1 −1 This learning algorithm is an online learning algorithm. In
∗ corresponds to the specified impulse of the selected state of each HB, we measure the variation of the SV and suggest
“Synapse State” in Fig. 10 alternatively a new delay: AV or VV. We use the subscript m
to address the successive value of AV and the subscript n for
the successive value of VV. Since the algorithm for AV or VV
3) t ij − T i ∈ [0, ∇], ⇔ PreHebb; delay is identical, we take only the variation of AV delay as
an example
4) t ij − T i ∈ / [−2∇, ∇], ⇔ Out.
AVm = AVm − AVopt and AVm+1 = AVm+1 − AVopt
A synapse in the state “Out” has no contribution to the firing
Ti and its weight must be low (ideally 0). The ones in a state ⇒ AVm+1 − AVm = AVm+1 − AVm (27)
“Hebb” contribute to the firing and must have their weights
high (ideally 1). The weights of the synapses in “PreHebb” or ∂ SV
“PostHebb” states will be increased (R = +1) or decreased = SV(m+1,n) − SV(m,n) = −α AVm+1
2
− AVm2 .
∂m
(R = −1) by η according to Table I. (28)
This algorithm converges quickly with η = 1 and the proof
Equation (28) shows the impact of the last modification
of convergence is trivial. When we take η = 1/2, the firing
of AV delay on the SV output while keeping the VV delay
T i cannot occur in each HB. In the nonadaptive mode, the
unchanged. In the RL algorithm, the time step of the AV and
convergence takes less than 30 cardiac cycles.
VV delays is fixed to T = 5 ms as in the previous HL
7) RL Algorithm: In the adaptive sensed mode, the goal
algorithm for the rapidity and efficiency of the algorithm. The
is to adjust the AV and VV delays to dynamically maximize
variation of the AV delay based on (27) is
in each HB the volume of pumped blood estimated by the
SV measurement. In the medical report [19], Whinnett has
|AVm+1 − AVm | = T. (29)
observed the correlations between the SV and the values of
the AV and VV delays for 15 CRT patients. The relation The operations of the RL algorithm for modifying the AV
between SV and a couple (AV, VV) can be expressed by delays are described as follows:
SV = F N L (AV, VV). Such function can be used as a simple
model of the heart behavior. In [19], a preliminary expression AVm+1 = AVm + R AV (m) · T
j (30)
of SV surface is given that is a quadratic relation providing a R AV
j (m) = sign SV (m+1,n) − SV(m,n) ∈ {−1, 1}
“bell-shaped” SV surface. In the same report, Whinnett points
out that this relation can change very slowly with HR. Hence,
∂ SV
we can suppose that the neural network SNN1 could follow the if > 0, ⇒ R AV
j (m + 1) = R j (m)
AV
j (m + 1) = −R j (m) .
else, R AV
constant HR. The cases with variable HRs will be analyzed in AV
(31)
the following section.
The adaptive sensed mode starts with the default AV & VV For the simplicity of the SNN1, the evolution of the synaptic
delays (P AV , P V V ). One connectionist approach is chosen weights in RL algorithm use the same method introduced in
instead of a predictive one because of the following advan- HL algorithm. As the system is in the adaptive sensed mode,
tages. It does not have to know explicitly the FN L . It can the “I & F Neuron State” is always in “Hit” mode. η is set to
still subsist even if FN L slowly evolves over time. Intensive 1 to update the T i in every HB. Based on (24), we get
differential calculation is not necessary. It can share the same
analog architecture designed for the first mode in SNN1. Thus, ω AV
j (m + 1) = ω j (m) + η · R j (m) .
AV AV
(32)
the energy consumption as well as the silicon surface of the
We introduce the use of b to indicate the HB. In a general
adaptive CRT device can be reduced.
case, we opt to alternatively modify one delay (AV or VV
FN L is assumed to be a simple quadratic formula as follows
delay) in one HB (i.e., one m step after one n step and then
in accord with the “bell-shaped” SV surface in [19]:
the cycle restarts, b = m + n)
2 2
SV = SVmax − α AV − AVopt − β V V − V Vopt (25)
∂ SV
where SVmax is the only maximum of the SV output, AVopt =
and V Vopt are the optimal delay values that project the SVmax ∂b
on the SV surface. The coefficients α and β are to balance −α AVb+1
2 −AV 2 in the case of changing AV delays
b
the effects of AV and VV delays on the SV output. In fact, all 2 −V V 2 in the case of changing VV delays .
−β V Vb+1 b
SUN et al.: ANALOG SPIKING NEURAL NETWORK FOR ASSISTING CARDIAC DELAY PREDICTION 865
Stroke Volume
SV output Main Small step HB 500
SV (m,n) step Conditions (b) 0
m n
−500
SV(0,0) 0 0 0 Initialization of SV(0,0) 0
−1000
−1500
SV (1,0) 1 0 First random step of AV 1 60
1* 40
SV (1,1) 1 1 First random step of VV 2 20 Nonadaptivemode with HL algorithm
0
∂ SV = SV VV delay (ms) −20 220 240
SV (2,1) 2 1 ∂m (1,0) − SV(0,0) 3 160 180 200
−40 60 80 100 120 140 Start point
2
∂ SV = SV
(1,1) − SV(1,0)
SV (2,2) 2 2 4 AV delay (ms)
∂n
∂ SV = SV
SV (3,2) 3 2 ∂m (2,1) − SV(1,1) 5 Fig. 11. AV and VV pointer progression in the first two functional modes.
3
∂ SV = SV
(2,2) − SV(2,1)
SV (3,3) 3 3 6
∂n
∗ With the random beginning, the initial performance could
between the start and preset default points indicates the time
be unfavorable.
needed for the nonadaptive mode. This learning algorithm can
advance 4 · T in one cardiac cycle (CC) in the “Miss” mode
and 1 · T in one CC in the “Hit” mode. In the worst case
According to the “bell-shaped” SV surface [19], α and β
(Distancestart−preset = 195 ms), it takes 12 CCs to arrive the
have positive values. Thus, in the case of changing AV delays
preset default point. If we take into account the validation
∂ SV time of the general controller, the nonadaptive mode can be
if > 0 ⇒ SVb+1 > SVb ⇒ AVb2 > AVb+1 2
> 0.
∂b accomplished in less than 30 CCs.
(33) After having received the approval of the general controller,
AVb can be larger or smaller than AVopt . The RL algo- the system was switched to the adaptive sensed mode and run
rithm helps to reduce the gap between AVb+1 and AVopt . In with the RL algorithm. The convergence time depends on the
other words, the related projected position on the SV surface distance between the preset default point and the SVmax point
becomes closer to the one of the SVmax . This algorithm can be and this distance depends on the physical conditions of the
expressed by constructing a historic “matrix” of the measured patients and the preset adjustments during the last medical
SV output after each variation of the AV/VV delay. The followup. The first step of this mode begins in a random
evolution of this algorithm is detailed in the Table II. direction (not sure to be optimal) for initiating the variations
Every main step (except the initial main step 0) has two of the AV and VV delays. In this mode, the AV and VV delays
individual small steps for the processes on the AV/VV delay, change alternatively and they arrive around the SVmax instead
respectively. Every small step is processed in one HB. The of staying at that point so that they can detect and follow the
direction of the initial main step 0 is random to perform movement of the maximum. The RL algorithm will follow the
the first variation of the SV output. In the following steps, variation of the SVmax if there is only one maximum and the
the variations of the AV and VV delays depend on the result variation speed of the SVmax is inferior to the convergence
of their last modifications on the SV output. For instance, the speed of RL algorithm.
variation from small step (m, n) = (1, 1) to (2, 1) depends on
the last modification of AV delay from the small step (0, 0) to
(1, 0). If this modification increases the measured SV output, IV. G LOBAL S IMULATIONS WITH D IFFERENT SV
R ij (b) will have a positive value. Otherwise, it will be negative. S URFACES ( WITH C ONSTANT /VARIABLE H EART R ATES )
The synaptic weights are changed accordingly to generate the In order to evaluate the performances of the neural processor
new T i . Hence in every HB, the SNN1 will deliver new AV in various cardiac conditions, a simple heart model with con-
and VV delays to maximize the pumped blood volume (i.e., stant/variable HRs is created to carry out the global simulation
SV) toward the brain and the body in real time. (heart model + model of the adaptive CRT device).
8) Simulations of These Two Learning Algorithms: To val-
idate these two learning algorithms, both of them are imple-
mented firstly under MATLAB and then under VHDL-AMS. A. Exercise Scenario of Heart Rate
Fig. 11 illustrates the evolution of the AV and VV pointer According to [19] and the clinical observations of the
progression in the first two functional modes with the “bell- ADAPTER project [20], the optimized delays vary with the
shaped” SV surface. The starting point of the nonadaptive HR and they are especially pronounced at high HRs. In order
mode is randomly set in the first place to start the learning to study this phenomenon, we carry out an exercise scenario
process. After that, physicians will choose a safe start point of the HR to simulate both the relax situation and the exercise
according to the physiology condition of each patient. This situation of a virtual patient. The maximum of the SV surface
point will be further used as the restart point of the nonadaptive now depends on AV, VV, and HR. The coordinate of this
mode for the global security. As can be observed in Fig. 11, maximum will then be called AV H R and V V H R . With the
it converges quickly to the preset default AV and VV delays HR evolution, the related AV H R and V V H R delays will be
(P AV, P V V ) with the help of the HL algorithm. The distance changed according to [20] as shown below
866 IEEE TRANSACTIONS ON NEURAL NETWORKS, VOL. 22, NO. 6, JUNE 2011
Stroke Volume
Stroke Volume
3000 3000 2500
SV gmax 2850 3149 3464 3763 3901 3630
2000 2000 2000
AV H R (ms) 160 152.3 143.5 131.4 116 94
1000 1000
VV H R (ms) −40 −37.6 −35.0 −31.3 −26.7 −20.0 1500
0 0
AV gmax (ms) 100 100 100 100 100 100 −100 250 −100 250 1000
−50 200 −50 200
VV gmax (ms) 0 0 0 0 −5 −20 0 150 0 150 500
VV (ms) 50 100 50 100
VV (ms) 0
100 50 AV (ms) 100 50 AV (ms)
The exercise scenario
150 Fig. 13. Simulation of Surface 0 with variable HR (60, 120 BPM).
Heart Rate (BPM)
120
Surface 1 HR = 60 BPM Surface 1 HR = 120 BPM
4000 4000 4000
90
3500 3500 3500
3000 3000
60 100 CC 3000
Stroke Volume
Stroke Volume
2500 2500
One simulation period 2500
2000 2000
30 1500 1500 2000
0 1000 2000 3000 4000 5000 6000
1000 1000 1500
Cardiac Cycles (CC)
500 500
1000
0
Fig. 12. Exercise scenario of the heart rates. 100 0
100 500
50 0 50 0
−50 50 −50 50
−100 250 200 150 100 −100 250 200 150 100 0
VV (ms) AV (ms) VV (ms) AV (ms)
AV H R = 160 − 1.1 · (H R − 60)
Fig. 14. Simulation of Surface 1 with variable HR (60, 120 BPM).
V V H R = 0.3325 · (H R − 60) − 40 (34)
where 60 BPM < HR < 180 BPM. Surface2 HR = 60 BPM Surface2 HR = 100 BPM Surface2 HR = 120 BPM
In this exercise scenario (Fig. 12), the HR changes from AV: 100
VV: -5
AV: 100
VV: −20
4000
4000
60 BPM (relax situation) to 120 BPM (exercise situation) and 4000
AV: 100
4000
SV: 3901 SV: 3630 3500
Stroke Volume
Stroke Volume
2500
and then it shifts to a higher HR in every 25 CC (see Table III 2000 2000 2000
2000
for surface 2) until it reaches 120 BPM. After another 900 CC 1000 1000 1500
1000
at 120 BPM, the HR decreased to 60 BPM in the reverse 1000
0
way. The total simulation time is 6000 CC (three simulation 0
100 100 0
50 50 50 50 500
100
periods). 0
−50
150
100 0
−50
150
100 50
0 150
100
50
200 200 −50 200 0
VV (ms) −100 250 AV (ms) VV (ms) −100 250 AV (ms) VV (ms) −100 250 AV (ms)
B. SV Surfaces Fig. 15. Simulation of surface 2 with variable HR (60, 100, 120 BPM).
Our preliminary study was carried out with the “bell-
shaped” SV surface. The RL algorithm can follow changes
of this SV surface as long as there is only one maximum. the neural processor to reach the global maximum or probably
However, this kind of SV surface is not systematic. In [20], in some situations to get trapped in the local maximum. Fig. 14
it is shown that there are more than one maximum on certain shows that these two maxima are all quite close to 4000 and
SV surfaces. To improve the reality of our study, we introduce there is an almost flat region between them. However, when
several new SV surfaces with one or more local maxima. The AV delay is over 200 ms, the SV falls sharply.
maximal possible SV value of all these models is arbitrarily 3) Surface 2: As the most complex surface used for the
set to 4000 for the uniformity. simulations (Fig. 15), surface 2 is a surface with two fixed
1) Surface 0: Surface 0 is a quadratic surface with AV H R local maxima and one variable local maximum. This variable
and V V H R dependence on HR as illustrated in Fig. 13 (HR = one depends on the variation of the AV H R and V V H R . Since
60 and 120 BPM). Basically, this is the “bell-shaped” parabolic this variable one is close to one of the fixed local ones, the
curve in [19] varying with dynamic HR. With the variation of resulting global maximum (called SVgmax ) depending on the
HR, the location of the SVmax on the Surface 0 varies but its HR is located between them. Indeed, it provides a special
value remains at about 4000 (Fig. 13). This surface serves as situation with multi-maxima and variable position of the global
a standard basic surface to analyze the neural processor. maximum. The amplitude of the SVgmax is not always close to
2) Surface 1: Providing two maxima points (one fixed 4000. Surface 2 can be considered as a special case to verify
local maximum and one variable global maximum), surface 1 the performance of neural processor in diverse conditions
(Fig. 14) is modeled to test whether the RL algorithm can help with/without noise.
SUN et al.: ANALOG SPIKING NEURAL NETWORK FOR ASSISTING CARDIAC DELAY PREDICTION 867
Stroke Volume
(SV surfaces) Neural Processor 4000
3900
Zoom in HR 120
Projected Stroke Volume signal Input Measured Stroke Volume signal 3800
SV P = SV sensors SV N = SV N ± Noise 3700
HR 60
3600 0 1000 2000 3000 4000 5000 6000
Preset default Cardiac Cycles (CC) Exercise Scenario
Noise AV & VV delays Zoom in SV N without noise − “Surface 0”
Stroke Volume
4000
3900
Fig. 16. Diagram of the uniformly distributed noise added to the SV surface.
3800
3700
3600
0 20 40 60 80 100 120 140 160 180 200
We list in Table III the evolution of the SVgmax of the Cardiac Cycles (CC)
surface 2 as a function of HR. In the case of HR = 100 BPM,
Nonadaptive mode Adaptive sensed mode
SVgmax attains its maximal value (3901). For clear indication,
the coordinates of the variable local maximum ( AV H R and Fig. 17. Zoom in SV N in the simulation of surface 0 without noise.
V V H R ) depending on HR and the ones of the global maximum
( AVgmax & V Vgmax ) are shown together to present the gaps
SV N without noise − “Surface 0”
between them. We can see in the same HR condition that these 4500
Stroke Volume
two maxima do not locate in the same position. Only when 4000
HR = 120 BPM, the AV H R and V V H R delays are close to 3500
the coordinate of the SVgmax ( AVgmax and V Vgmax ).
3000
In fact, SVgmax here represents the best attainable SV output 0 1000 2000 3000 4000 5000 6000
on the grid of AV and VV delays with a time step T = 5 ms Cardiac Cycles (CC)
SV N with noise NL500 − “Surface 0”
since the real global maximum (3901 when HR = 100 BPM) 4000
Stroke Volume
is located in the middle of the grid (unattainable). The solution 3800
is to reduce the T and add accordingly the synapses in every 3600
3400
neuron to get the required precision. Thus, some tradeoffs 3200
should be made between the time resolution of the system 0 1000 2000 3000 4000 5000 6000
Cardiac Cycles (CC)
and the power consumption as well as the silicon area.
Fig. 18. Simulation of surface 0 with noise NL500.
C. Global Simulations with/without Noise
The main input signal comes from the contractions of the
atria and the ventricles. However, the lungs introduce the 4000 and SV P = SV ≤ SVmax . With a noise level NL500,
asynchronous additive signals, which can be considered as the signal-to-noise ratio is lower than 28.85 dB.
noise for the CRT device. Thus, the noise should be taken 1) Global Simulations with Surface 0: The first simulation
into account in the global system simulation. To simulate in is carried out on the basic surface 0. The Figs. 17 and 18 show
a more real situation, we add uniformly distributed noise to these simulations with N L = 0 and 500 respectively.
the noiseless SV signal. Fig. 16 shows how the noise model Initially, the system always begins with nonadaptive mode.
is integrated into the system. Receiving the optimized AV and Without noise, the measured SV N signal converges quickly
VV delay suggestions (T av and T vv ) from the neural proces- to the SVmax and the HR changes are not obvious (Fig. 17).
sor, the general controller sends the depolarization signals to This shows that if the SV surface changes slowly over time
the heart once the suggestions are accepted. We use our SV then the neural processor can continuously optimize the SV.
surfaces to calculate the projected stroke volume (SV P = SV ) With the introduction of noise, one can see in Fig. 18 that
signal for the next optimization. So SV P is just a mapping the projected SV P converges always to SVmax even with the
signal without noise. This signal enters the CRT device via noise.
the input sensors. To complete this model with noise, we 2) Global Simulations with Surface 1: Surface 1 has dual
add the random uniform noise to the projected SVP signal maxima and a flat region between them. The default AV
in order to produce the measured stroke volume (SV N = and VV delays of the nonadaptive mode are important for
SV P ± noise) noisy signal. Then, this signal will be sent back the following situation. If these preset default delays are
to the neural processor to calculate the next optimized AV located near the local maximum when the HR evolves, the
and VV delays. RL algorithm will guide the system to this local maximum
To reach various signal-to-noise ratios in the simulations, instead of the global one.
we modulate a mathematical random noise generator, which is In Fig. 19, we can observe that the default delays are set
bounded to [0, 1]. Our noise signal is then defined by Noi se = close to the local maximum in the early stage. Thus, the neural
(r andom − 1/2) ∗ N L, where N L stands for the noise level processor will take this point as the targeted maximum. The
to modulate the amplitude of the uniformly distributed noise. projected SV will stay around this point until we change the
For each SV surface, we simulate the whole system with four AV H R and V V H R values unless the random uniform noise
different noise levels, N L = 0 (without noise), 100, 300, and is large enough to drag the optimized AV and VV delays
500, respectively. We recall that maximal realizable SVmax is toward the global maximum. With the growth of the uniformly
868 IEEE TRANSACTIONS ON NEURAL NETWORKS, VOL. 22, NO. 6, JUNE 2011
3800
3600
3400
3200
The local maximum of the surface 1 SV N with noise NL300 − “Surface 2”
3000 4000
Stroke Volume
0 1000 2000 3000 4000 5000 6000 3500
3000
Cardiac Cycles (CC) 2500
2000
Fig. 19. SV P simulation of surface 1 with noise NL100 and NL500. 1500
1000
0 1000 2000 3000 4000 5000 6000
Cardiac Cycles (CC) : get stuck at the
local maximum
SV N without noise − “Surface 2”
Stroke Volume
4000
3500 SV P with noise NL500 − “Surface 2”
3000 4000
Stroke Volume
2500 HR 120 3500
2000 3000
1500 HR 60 2500
1000 2000
0 1000 2000 3000 4000 5000 6000 1500
Nonadaptive Mode Cardiac Cycles (CC) Exercise Scenario 1000
0 1000 2000 3000 4000 5000 6000
SV P without noise − “Surface 2” Cardiac Cycles (CC)
Stroke Volume
4000
3500
3000
2500 Fig. 21. SV P simulation of surface 2 with noise NL300 and NL500.
2000 HR = 60 BPM
1500 HR = 100 BPM HR = 120 BPM
SVgmax = 2850 SVgmax = 3901 SVgmax = 3630
1000
0 1000 2000 3000 4000 5000 6000
Cardiac Cycles (CC) will always lead the system to the nearest maximum of the
SV surface, which is not sure to be the global maximum. In
Fig. 20. Simulation of surface 2 without noise.
the cases of multi-maxima (surfaces 1 and 2), the introduced
noise can sometimes help the system to get out of the trapped
local maximum and then go toward the global maximum.
distributed noise, it is getting easier to make the optimized AV
and VV delays go around these two maxima. If they are close V. C ONCLUSION
to each other, SV P will go around them alternatively (see The above studies show that the implementation of an
Fig. 19). analog SNN in the adaptive CRT device of the ADAPTER
3) Global Simulations with Surface 2: Unlike the two project is feasible with interesting results. This analog SNN
previous surfaces, the amplitude of the global maximum of the can work with two adopted algorithms (HL and RL) in
surface 2 changes with the HR as can be observed in the noise- different functional modes in order to achieve different objec-
less case in Fig. 20. We can see that SVmax reaches its maximal tives. In this way, the silicon area occupations and the power
value (3901) as seen in Table III when HR = 100 BPM. consumptions of the system can be both reduced. The global
The amplitude variation of the SV is more pronounced when simulations of the system with different heart models have
HR = 60 BPM than in the case of HR = 120 BPM because demonstrated the adequate behaviors of the analog SNN for
the surface 2 is steeper around the global maximum when assisting cardiac delay prediction in real time despite the
HR = 60 BPM (see Fig. 15). As a result, SV varies more influences of the uniformly distributed noise. Sharing the
in this condition when the system goes around the global same testing platform under VHDL-AMS, we compare the
maximum in the adaptive sensed mode. performance of this analog implementation and its digital
After introducing the noise (Fig. 21), we observe more version in Table IV. In the global simulation with fixed HR
influences on the SV N signal but the signal form has been and without noise, the analog neural processor converges
mostly conserved. We can easily tell that the zone where the to the optimized AV and VV delays 33 times as fast as
exercise scenario changes, the HR and the SV always moves it digital counterpart. The estimated power consumption of
toward SVmax in each HR condition. In the simulation with the digital neural processor is four times as high as the
noise NL500 (Fig. 21), several pointed areas show that the analog one. Since we use the same analog SNN for two
SV output is trapped in the local maximum. In the middle of functional modes, the estimated silicon area of the analog
the third period, it cannot obtain the global maximum 3901 SNN is much smaller. With the introduction of the coming
because this HR phase (100 BPM for 25 CC) is too short to SNN2 block, this future work will help the SNN1 block
bring the perturbed SV output back to top. to get out of the local maximum in the shortest possi-
According to the above simulation results, despite the ble time, which will further improve the system perfor-
uniformly distributed noise, the two used learning algorithms mance.
SUN et al.: ANALOG SPIKING NEURAL NETWORK FOR ASSISTING CARDIAC DELAY PREDICTION 869