# Equations for MATLAB Simulation

In this article I’ll be describing the equations and intervals that I’ve derived for initiating tachycardia and initiating double-wave reentry.

## Initiating Tachycardia

In the MATLAB simulation, tachycardia is initiated by a manually set premature impulse. This impulse has to come during a specific window defined by the ERPs of the nearby nodes and the rest time of the stimulated node. This window is often referred to as the *tachycardia window* in the primary literature. A diagram of the reentrant circuit is below for reference throughout this article.

Currently, premature impulses are set to be delivered directly to node 1. Later developments to this model will hopefully include multiple stimulation sites.

Anyway, if a premature impulse is delivered directly to node 1, then the ERPs of node 2 and node 6 will directly affect that impulse’s ability to conduct through the rest of the circuit. The following equation hows the window of opportunity for the premature impulse, which is basically the period of time when node6 is refractory but node 2 isn’t:

[ erp6+(rest1+4)(k+1) > t ≥ erp2+(rest1+4)(k+1)]

where

rest1 = rest time of node 1 (for normal sinus rhythm)

erp2 = effective refractory period of node 2

erp6 = effective refractory period of node 6, and

k = some integer (number of NSR beats before tachycardia is initiated)

The equation is dependent on the following conditions:

erp2 ≥ erp3, and

erp6 ≥ erp5

## Terminating Tachycardia

It is much more complicated to determine the exact window during which a premature impulse can terminate tachycardia. Basically, a premature impulse must come when node2 is refractory but node6 isn’t. These are the reverse conditions for initiating tachycardia, which will result in a impulse traveling in the opposite direction of the reentrant circuit. The incoming impulses will crash head-on with each other and terminate each other. This gives the sinoatrial node a chance to restart normal sinus rhythm.

## Initiating Double-Wave Reentry (DWR)

Double-wave reentry is just one studied mechanism of tachycardia acceleration, along with figure 8 loops and transitions between functional circuits. Double-wave reentry is the easiest acceleration mechanism to model in MATLAB and is characterized by two impulses traveling through the same reentrant circuit, effectively halving the time between tachycardia beats.

3 things must be true for a double reentrant circuit to develop:

- The tachycardia window must be large in order to accommodate two impulses,
- The node refractory periods must not be larger than the distance between the two impulses, otherwise the 2nd impulse will crash and DWR will not be sustained, and
- Tachycardia must already exist before another impulse enters the circuit

To satisfy the first condition, I initially set the refractory period of node6 to be very large in order to increase the size of the tachycardia window. I called this initial refractory period *erp6a*. The following equation describes the value of erp6a:

VTCL/2 + 2FPA < erp6a

In other words, we assume the 2nd impulse arrives when the 1st impulse is halfway through the circuit (VTCL/2), and we must also accommodate for their traveling times (2FPA).

However, to satisfy the second condition I had to change erp6 to a smaller value after the 2nd impulse was delivered. I called this value *erp6b*. This implies that the refractory periods of myocardial cells are not static and are changing enough to accommodate DWR.

My overall equation for the DWR window, assuming the 2nd impulse arrives when the 1st impulse is halfway through the circuit, is as follow:

imp1 + erp6a + VTCL(k) > imp2 > imp1 + VTCL/2 + VTCL(k)

Where

imp2 = time of deliverance of the 2nd impulse

imp1 = time of deliverance of the 1st impulse

VTCL = ventricular tachycardia cycle length, and

k = some integer (number of VT beats before DWR is initiated)

The equation is dependent on the condition:

VTCL/2 > erp2

## Terminating DWR

Terminating DWR is based on the same concepts as terminating VT, it just takes twice as much effort. The following output shows the termination of DWR by an automated ATP algorithm. It requires two detection and application cycles to finally return to NSR. The first cycle involves the termination of the 1st impulse, and the second cycle involves the termination of the 2nd impulse.