75

ECG graduation project

Embed Size (px)

Citation preview

Index

1- Preface...........................................................................................................................................................

2- Introduction to Bioelectricity........................................................................................................................

3- Electrocardiography

4- Forward and Reverse problems definition

5- Simulation models of the human heart

6- Introduction to Neural Networks

7- Application of NN simulators in ECG

8- References

Preface

Throughout the history of our universe, various aspects and fields of science merged to give birth to a new

understanding and a special appreciation to each and every bit of that universe we live in

And in such a marvelous marriage between the fields of biology , chemistry , physics and mathematics ... a miraculous

new field of biomedical engineering was born , a field that revolutionized our understanding of the human body and its

wonderful mechanics and electrical characteristics and dynamics

And in that human body .. the human heart stood out as one of the most fascinating mechanisms ... on the levels of

engineering and biology , an organ ... that throughout the history was a source for magic , poems , and life itself

And as engineers see the magical world through poems of math , and tend to study its aspects through simple models

yet complicated analysis

We , a team of engineers have put our minds to the task of studying the various electrical characteristics of the human

heart , as ambitious our agile minds was ... as wise as the mind of our supervisor to guide us through that magical world

of the mathematics ... of the human heart

Here we provide a journey through the various efforts done by a lot of researchers in that field , and adopt a special

technique to model the human heart in its natural habitat ... the thorax

And through refining of the results through a set of ANN – artificial neural networks – simulators ... we offer an

ambitious approach toward solving the problem of ECG –electrocardiography-

A problem which if solved accurately can and will revolutionize the field of cardiac medicine and cardiac surgery , and

give birth to a new set of ideas that pave the road toward a new understanding of ECG

We thank all those who helped us in our journey through the findings of this book and that project

We specially thank those who made it possible for us to reach our findings through their work in the fields of

mathematics , computer software and biology

And finally , we offer our utmost respect and our sincerest thanks to our supervisor dr/abd elreheem khalifa , who was a

mentor to each and every one of us through this project and gave us what we needed to work on his own models and

findings in the field of ECG

The Bio eleven

supervised by

DR/ Abd Al-Reheem Khalifa

The project team

- Eslam Saeed Abo eliel seat # 64

- Eslam Osama Al-Sayed Al-Gwaily seat # 63

- Sally Mohammed Abd Al-mun’em Arafa seat # 171

- Asmaa ashraf othman el-desouky seat # 68

- Radwa Nasr Aldeen Ebraheem Hussein seat # 147

- Radwa Hussam Hassan Al-hady seat # 145

- Mohammed ebraheem Mohammed Salama seat # 263

- Mohammed Aly Hassan Mostafa seat # 295

- Mostafa Ahmed Mohammed Oda seat # 347

- Nader Mahmoud Mohammed Khaleel seat # 377

- Mostafa Mohammed Fahmy Abd-Elreheem seat # 349

Introduction to Bioelectricity

Bioelectricity is fundamental to all of life’s processes. Indeed, placing electrodes on the human body,

or on any living thing, and connecting them to a sensitive voltmeter will show an assortment of both

steady and time-varying electric potentials depending on where the electrodes are placed. These

biopotentials result from complex biochemical processes, and their study is known as electrophysiology.

We can derive much information about the function, health, and well-being of living things by the

study of these potentials. To do this effectively, we need to understand how bioelectricity is generated,

propagated, and optimally measured.

In an electrical sense, living things can be modeled as a bag of water

having various dissolved salts.

These salts ionize in solution and create an electrolyte where the

positive and negative ionic charges

are available to carry electricity. Positive electric charge is carried

primarily by sodium and potassium

ions, and negative charges often are carried by chloride and hydroxyl.

On a larger scale, the total

numbers of positive and negative charges in biological fluids are equal,

as illustrated in Fig. 20.1.

This, in turn, maintains net electroneutrality of living things with respect to

their environment.

Biochemical processes at the cell molecular level are intimately associated

with the transfer of

electric charge. From the standpoint of bioelectricity, living things are

analogous to an electrolyte

container filled with millions of small chemical batteries. Most of these

batteries are located at cell

membranes and help define things such as cell osmotic pressure and

selectivity to substances that cross the membrane. These fields can vary

transiently in time and thus carry information and so

underlie the function of the brain and nervous system.

The most fundamental bioelectric processes of life occur at the level of membranes. In living

things, there are many processes that create segregation of charge and so produce electric fields with-

in cells and tissues. Bioelectric events start when cells expend metabolic energy to actively transport

sodium outside the cell and potassium inside the cell. The movement of sodium, potassium, chloride,

and, to a lesser extent, calcium and magnesium ions occurs through the functionality of molecular

pumps and selective channels within the cell membrane.

Membrane ion pumps consist of assemblies of large macromolecules that span the thickness of

the phospholipid cell membrane, as illustrated in Fig. 20.2. The pumps for sodium and potassium ions

are coupled and appear to be a single structure that acts somewhat like a turnstile. Their physical con-

struction transports sodium and potassium in opposite directions in a 3:2 atomic ratio, respectively.

As shown in Fig. 20.3, the unbalance of actively

transported charge causes a low intracellular sodium ion

concentration and relatively higher potassium concen-

tration than the extracellular environment. Chloride is

not actively transported. The unbalance in ionic charge

creates a negative potential in the cell interior relative to

the exterior and gives rise to the resting transmembrane

potential (TMP). This electric field, appearing across an

approxi-

mately 70-Å-thick cell membrane, is very large by

standards of the macro physical world. For example,

a cellular TMP of − 70 mV creates an electric field of

10 7 V/m across the membrane. In air, electric breakdown would occur and would produce lightning-

bolt-sized discharges over meter-order distances. Electric breakdown is resisted in the microcel-

lular environment by the high dielectric qualities of the cell membrane. Even so, the intensity of

these fields produces large forces on ions and other charged molecules and is a major factor in

ionic transfer across the cell membrane. When a cell is weakened or dies by lack of oxygen, its transmembrane field also

declines or vanishes. It both regulates and results from the life and func-

tion of the cell.

In addition to ion pumps, the membrane has ion channels. These are partially constructed of helical-

shaped proteins that longitudinally align to form tubes that cross the cell membrane. These proteins

are oriented such that parts of their charged structure are aligned along the inside of the channels.

Due to this alignment and the specific diameter of the formed channel lumen, there results selectivity

for specific ionic species. For example, negatively charged protein carboxylic acid groups lining the

channel wall will admit positively charged ions of a certain radius, such as sodium, and exclude

negatively charged ions, such as chloride.

Some membrane ionic channels respond to changes in the surrounding membrane electric field

by modulating their ionic selectivity and conductance. These are known as voltage-gated ion chan-

nels. Their behavior is important in excitable cells, such as nerve and muscle, where the membrane

permeability and its electric potential transiently change in response to a stimulus. This change

accompanies physiological events such as the contraction of muscle cells and the transmission of

information along nerve cells.

Bioelectric Currents

Electric fields can arise from a static distribution of charge, whereas electric currents are charges in

motion. Since current flow in a volume of fluid is not confined to a linear path as in a wire, currents

can flow in many directions. When describing bioelectric currents, we often use a derivation of

Ohm’s law:

Thus, within the conductivity of living tissue, electric current flows are driven by electric field

differences.

Electric currents in a wire always move from a source to a sink. Ionic currents in an electrolyte

flow in a similar way. Charged ions, such as sodium, move from some origin to a destination,

thereby producing an electric current flow. The magnitude of these currents is directly proportional

to the number of ions flowing. This idea is shown in Fig. 20.4.

Thus, given the charge of 1.6

10

− 23 C, approximately 10 23 sodium ions, for example,

moving in

one direction each second will produce an electric

current of 1 A. Such large numbers of ions do not

ordinarily flow in one direction over a second in

biologic organisms. Currents in the milliampere

region, however, are associated with physiologic

processes such as muscular contraction and the

beating of the heart.

Biological tissues are generally considered to be

electric volume conductors. This means that the

large numbers of free ions in tissue bulk can support

the conduction of currents. Even bones, to

some extent, will transport charged ions through their

fluid phase. On a macroscopic scale, there are

few places within the body that are electrically isolated from the whole. This is reflected in the fact

that electric resistance from one place inside the body to almost any other will show a finite value,

usually in the range of 500 to 1000 Ω . 1 Likewise, a current generator within the body, such as the

beating heart, will create electric field gradients that can be detected from most parts of the body,

as illustrated in Fig. 20.5.

Electrocardiography

Introduction:

The heart is consist of four chamber (right atrium , right ventricle , left atrium , left ventricle ) each chamber has certain function .

the function of the right side of the heart is to collect de-oxygenated blood, in the right atrium, from the body (via superior and inferior vena cavae) and pump it, through the tricuspid valve, via the right ventricle, into the lungs so that carbon dioxide can be dropped off and oxygen picked up This happens through the passive process of diffusion. The left side (collects oxygenated blood from the lungs into the left atrium. From the left atrium the blood moves to the left ventricle, through the bicuspid valve (mitral valve), which pumps it out to the body (via the aorta). On both sides, the lower ventricles are thicker and stronger than the upper atria. The muscle wall surrounding the left ventricle is thicker than the wall surrounding the right ventricle due to the higher force needed to pump the blood through the systemic circulation.

Starting in the right atrium, the blood flows through the tricuspid valve to the right ventricle. Here, it is pumped out the pulmonary semilunar valve and travels through the pulmonary artery to the lungs. From there, oxygenated blood flows back through the pulmonary vein to the left atrium. It then travels through the mitral valve to the left ventricle, from where it is pumped through the aortic semilunar valve to the aorta. The aorta forks and the blood is divided between major arteries which supply the upper and lower body. The blood travels in the arteries to the smaller arterioles and then, finally, to the tiny capillaries which feed each cell. The (relatively) deoxygenated blood then travels to the venules, which coalesce into veins, then to the inferior and superior venae cavae and finally back to the right atrium where the process began.

The heart is effectively a syncytium, a meshwork of cardiac muscle cells interconnected by contiguous cytoplasmic bridges. This relates to electrical stimulation of one cell spreading to neighboring cells.

Some cardiac cells are self-excitable, contracting without any signal from the nervous system, even if removed from the heart and placed in culture. Each of these cells have their own intrinsic contraction rhythm. A region of the human heart called the sinoatrial (SA) node, or pacemaker, sets the rate and timing at which all cardiac muscle cells contract. The SA node generates electrical impulses, much like those produced by nerve cells. Because cardiac muscle cells are electrically coupled by inter-calated disks between adjacent cells, impulses from the SA node spread rapidly through the walls of the artria, causing both artria to contract in unison. The impulses also pass to another region of specialized cardiac muscle tissue, a relay point called the atrioventricular node, located in the wall between the right atrium and the right

ventricle. Here, the impulses are delayed for about 0.1s before spreading to the walls of the ventricle. The delay ensures that the artria empty completely before the ventricles contract. Specialized muscle fibers called Purkinje fibers then conduct the signals to the apex of the heart along and throughout the ventricular walls. The Purkinje fibres form conducting pathways called bundle branches. This entire cycle, a single heart beat, lasts about 0.8 seconds. The impulses generated during the heart cycle produce electrical currents, which are conducted through body fluids to the skin, where they can be detected by electrodes and recorded as an electrocardiogram (ECG or EKG). The events related to the flow or blood pressure that occurs from the beginning of one heartbeat to the beginning of the next can be referred to a cardiac cycle.

The SA node is found in all amniotes but not in more primitive vertebrates. In these animals, the muscles of the heart are relatively continuous and the sinus venosus coordinates the beat which passes in a wave through the remaining chambers. Indeed, since the sinus venosus is incorporated into the right atrium in amniotes, it is likely homologous with the SA node. In teleosts, with their vestigial sinus venosus, the main centre of coordination is, instead, in the atrium. The rate of heartbeat varies enormously between different species, ranging from around 20 beats per minute in codfish to around 600 in hummingbirds.

Cardiac arrest is the sudden cessation of normal heart rhythm which can include a number of pathologies such as tachycardia, an extremely rapid heart beat which prevents the heart from effectively pumping blood, which is an irregular and ineffective heart rhythm, and asystole, which is the cessation of heart rhythm entirely.

Cardiac tamponade is a condition in which the fibrous sac surrounding the heart fills with excess fluid or blood, suppressing the heart's ability to beat properly. Tamponade is treated by pericardiocentesis, the gentle insertion of the needle of a syringe into the pericardial sac (avoiding the heart itself) on an angle, usually from just below the sternum, and gently withdrawing the tamponading fluids.

Muscle Cells:

At resting state any cell have three type of ions such as positive ion sodium, positive ion potassium and negative ion chlorine this mean that there are potential differences across membrane. In the heart it is typically 70mv for atrial cell and 90mv for ventricular

cell.

The positive and negative charge difference across each part of the membrane causes a dipole moment pointing across the membrane from inside to outside cell but each these dipole moments are exactly cancelled by dipole moment across the membrane on the otherside of cell. Thus total dipole moment of cell is zero.

Repolarization and depolarization

depolarization is a change in a cell's membrane potential, making it more positive, or less negative. In neurons and some other cells, a large enough depolarization may result in an action potential. repolarization is the opposite of depolarization the process of depolarization and repolarization together called action potential

As mentioned earlier, stimulation of the neuron causes Na+ gates open allowing Na+ to rush in. This results in depolarization of the membrane in the area where the stimulation occurred. If the depolarization is sufficient, it will depolarize adjacent areas of membrane causing more Na+ gates to open, thus spreading the depolarization.

Immediately after depolarization, Na+ channels close and K+ channels open causing K+ to flow out. This process returns positive charge to the area just outside the membrane, thus restoring the resting polarity.

The depolarization and repolarization events described above are called an action potential. During an action potential, the depolarization spreads to neighboring areas of the neuron, regenerating the action potential. Depolarization continues to spread all the way to the action terminal where the axon joins another cell.

Action potentials are "all or nothing." The intensity of an action potentials does not diminish as depolarization spreads along an axon.

Action potentials are initiated when depolarization reaches a threshold level. In typical mammalian neurons, a depolarization to -55 mV produces an action potential

The sodium-potassium pump operates continuously to restore the ionic gradient.

In the diagram below, depolarization caused by the influx of sodium can be seen spreading to the right.

What is an ECG?

ECG (electrocardiogram) is a test that measures the electrical activity of the heart. The heart is a muscular organ that beats in rhythm to pump the blood through the body.

The signals that make the heart's muscle fibres contract come from the sinoatrial node (SA node), which is the natural pacemaker of the heart.

In an ECG test, the electrical impulses made while the heart is beating are recorded and usually shown on a piece of paper.

this is known as an electrocardiogram, and records any problems with the heart's rhythm, and the conduction of the heart beat through the heart which may be affected by underlying heart disease.

The leads & Einthoven's triangle

The electrodes are typically twelve in number. The stretch between two limb (arm or leg) electrodes is called a lead. Einthoven named the leads between the three limb electrodes "standard lead I, II and III" referring to the two arm electrodes and the left leg electrode. He studied the relationship between these electrodes, forming a triangle where the heart electrically constitutes the null point. The relationship between the standard leads is called Einthoven's triangle. Einthoven's triangle is used when determining the electrical axis of the heart.

ECG records the heart tracing in12 leads: Six limb leads (I, II, III, AVR, AVL, AVF) and six

chest leads (V1-V6).

Lead I: is between the right arm and left arm electrodes, the left arm being positive. Lead II: is between the right arm and left leg electrodes, the left leg being positive. Lead III: is between the left arm and left leg electrodes, the left leg again being positive

Chest electrode placement:

V1: Fourth intercostal space to the right of the sternum. V2: Fourth intercostal space to the Left of the sternum. V3: Directly between leads V2 and V4. V4: Fifth intercostal space at midclavicular line. V5: Level with V4 at left anterior axillary line. V6: Level with V5 at left midaxillary line. (Directly under the midpoint of the armpit)

where RA = right arm, LA = left arm, and LL = left leg.

Summary of waves:

P wave: the sequential activation (depolarization) of the right and left atria QRS complex: right and left ventricular depolarization (normally the ventricles are

activated simultaneously) ST-T wave: ventricular repolarization PR interval: time interval from onset of atrial depolarization (P wave) to onset of

ventricular depolarization (QRS complex) QRS duration: duration of ventricular muscle depolarization QT interval: duration of ventricular depolarization and repolarization RR interval: duration of ventricular cardiac cycle (an indicator of ventricular rate) PP interval: duration of atrial cycle (an indicator of atrial rate)

Introduction to Ecg system:

The ECG system comprises four stages, each stage is as following:

(1) The first stage is a transducer— AgCl electrode, which convert ECG into electrical voltage. The voltage is in the range of 1 mV ~ 5 mV.

(2) The second stage is an instrumentation amplifier which has a very high gain (1000), with power supply +9V and -9V.

(3) We use an op to-coupler to isolate the In-Amp and output.

(4) After the op to-coupler is a band pass filter of 0.04 Hz to 150 Hz filter. It’s implemented by cascading a low-pass filter and a high pass filter.

ECG USES:

ECG is a device used to record on graph paper the electrical activity of the heart. The picture is drawn by a computer from information supplied by the electrodes.

Doctor uses the ECG to:

assess your heart rhythm diagnose poor blood flow to the heart muscle (ischemia) diagnose a heart attack diagnose abnormalities of your heart, such as heart chamber enlargement and

abnormal electrical conduction

Forward and Reverse problems definition

Introduction to Inverse problem

An inverse problem is a general framework that is used to convert

observed measurements into information about a physical object

or system that we are interested in.

** For example, if we have measurements of the Earth's gravity

field, then we might ask the question: "given the data that we

have available, what can we say about the density distribution of

the Earth in that area?"

The solution to this problem (i.e. the density distribution that best

matches the data) is useful because it generally tells us something

about a physical parameter that we cannot directly observe.

Thinking backwards

**Most people, if you describe a train of events to them will tell

you what the result will be. There are few people however that if

you told them a result, would be able to evolve from their own

inner consciousness what the steps were that led to that result.

** This power is what I mean when I talk of reasoning backward.

Application of this approach to the ECG problem

Forward and Inverse Problems of

Electrocardiography

the main objective of electrocardiography

is to relate the potentials recorded at the body surface with the

ones generated

on the heart surface as a result of the electrical activity of the

heart.

Two different approaches - in other words, problems — are used

in electrocardiography to establish this relation.

The first approach is called the forward

problem which entails the calculation of the body-surface

potentials, starting

usually from either pre-decided electrical representation of the

heart activity

(equivalent current dipoles) or from known potentials on the

heart’s surface

(the epicardium) [20].

The other approach is the inverse problem, which involves the

calculation of the potentials and prediction of the electrical

activity

of the heart starting from the potential distribution on the body

surface, on

the contrary to forward problem (Figure 2.6).

The general objective of the forward

and inverse problem of the electrocardiography is a better

qualitative and quantitative understanding of the heart’s electrical

activity.

Figure 2.6: Schematic representation of the forward and inverse problem.

We have already stated that the current generated on the heart

surface propagates through other conducting compartments

(lungs, sternum, spines, skeletal muscle layer, and fat layer) of the

torso so that the potential distribution measured

on the body surface is directly affected by the geometrical and

electrical

properties of the torso compartments.

Each of these compartments has different geometrical and

electrical properties (conductivities).

In the forward and inverse problem computations all these

properties are taken into account in order to have a precise

solution at the end

Although forward and inverse problems differ by definition, these

two problems are closely related with each other, since the

complexity of the physiological torso model used must be tested

through the forward solution and the inverse solution must be

developed from the forward solution.

For a specific solution to the forward or inverse solution of ECG, a

three dimensional geometric description of a volume conductor

(Figure 2.7) is required. The geometric description of

the volume conductor can take several forms, depending on the

specific method

of mathematical solution [9.]

When considering a realistic torso as in Figure 2.7, we have

several regions

which are physically different and have different electrical

conductivities.

This means that the volume conductor is inhomogeneous.

Sometimes, in order to simplify the calculations, the conducting

medium between the heart and body surface, inside of the torso,

is assumed to be similar in geometry and have the same

conductivity values.

In that case, the torso is described as homogeneous.

Figure 2.7: Geometric description of the volume conductor.

Moreover, if the conductivity value in a region changes with the

direction then the region is defined to be anisotropic, otherwise, if

the conductivity is constant ver the region then the region is

isotropic.

One of the key differences between the forward and inverse

problems is that the forward solutions are generally unique; on

the other hand, the inverse

solutions are generally not unique [9].

Being not unique arises from the reason

that the primary cardiac sources cannot be uniquely determined

as long as the active cardiac region containing these sources is

inaccessible for potential easurements.

This is because the electric field that these sources generate

outside any closed surface completely enclosing them may be

duplicated by

equivalent single-layer (monopole) or double-layer (dipole)

current sources on he closed surface itself.

Many equivalent sources and, hence, inverse solutions,are thus

possible. However, once an equivalent source (and associated

volume

conductor) is selected, its parameters can usually be determined

uniquely from

the body-surface potentials [20.]

One drawback of the inverse problems is that, computationally,

inverse problems frequently involve complex numerical

algorithms and large systems of equations.

In addition, inverse problems are also typically ill-posed, that is,

small changes in the input data can lead to deviations in the

solutions.

Often, the ajor challenge of an inverse problem lies in

incorporating a priori information

into the solution by regularizations and improvements [25].

The SCI Institute has developed a number of efficient and realistic

ways to solve a wide variety

of inverse problems in functional imaging - including

reconstruction of electrical

sources within the heart or brain and extraction of molecular

diffusion

information from magnetic resonance images [31.]

The content of this study does not include the inverse problem,

but the

forward problem of ECG.

The above information has been given to make clear the two

problems of ECG and relations, however, one can find a discussion

on

inverse problems in A.5

Forward Simulation

In the present study the left ventricle is subdivided into 17

segments (see Fig. 3b and 3c) according

to the recommendation from the American Heart Association (see

Fig. 3a) [Cerqueira MD et al., 2002;

Keller DUJ et al., 2006.]

Figure 3. The nomenclature of 17 AHA segments in left ventricle

[Cerqueira MD et al., 2002] (a) and the

subdivision of the left ventricular model according to the AHA suggestion

shown in two aspects (b) (c)

In each segment 3 types of ischemia are simulated, i.e.,

subendocardial, transmural and

subepicardial ischemia. For each type, 3 different sizes are

considered, i.e., 10mm, 20mm and 30mm

for the radius of ischemic area.

Thus, in total 153 different myocardial ischemic areas are

simulated

throughout the entire left ventricle and septum. As examples, 6

simulated ischemic areas with various

sizes and in different segments are shown in Fig. 4

Figure 4. Simulated apex ischemia (segment 17) with radii of 10mm (a), 20mm (b) and 30mm (c); simulated

subendocardial (d), transmural (e) and subepicardial (f) ischemia with a radius of 20mm in the apical

lateral segment (segment 16). The distribution of transmembrane voltages during ST-interval is shown

in a cross-section of heart

By solving the forward problem the corresponding 153 BSPMs are

obtained.

For the further investigation ST-integral maps are calculated. 6

ST-integral maps related to the 6 ischemic areas shown in Fig. 4

are presented in Fig. 5.

Figure 5. The ST-integral maps corresponding to the simulated apex ischemia (segment 17) with radii of 10mm

(a), 20mm (b) and 30mm (c); The ST-integral maps corresponding to the simulated subendocardial (d),

transmural (e) and subepicardial (f) ischemia with a radius of 20mm in the apical lateral segment

(segment 16)

Optimization of Electrode Positions :

Due to the detailed computer model, it is very time costly to

involve all the nodes on the body

surface in the singular vector analysis.

Therefore, 663 nodes distributed evenly on the torso surface are

selected for the analysis.

The first 5 left singular vectors are taken into account. In order to

provide a clear overview of the analysis results, the singular

vectors are normalized after taking absolute value see Fig. 6a to

6e) and then summed up (see Fig. 6f.)

Figure 6. The first 5 left singular vectors of the 153 simulated ST-integral maps

after taking absolute value and

normalization (a) (b) (c) (d) (e); the sum of the first 5 normalized left singular

vectors after taking

absolute value (f).

In this work the electrode positions of a 64-channel ECG

measurement system is optimized. The

original electrode configuration is shown in Fig. 7a. It consists of 7

strips of electrodes.

4 strips (48 electrodes) are located bilateral symmetrically on the

front side of thorax and 3 strips (16 electrodes)

are placed on the left lateral side of thorax. In the optimized

configuration (see Fig. 7b) 52 electrodes

are located on the front side of thorax, 4 electrodes on the back

and 8 electrodes on the left shoulder.

The electrodes cover the regions where the strongest signals

show in Fig. 6f.

Figure 7. The original electrode configuration (a) and the optimized electrode configuration of 64-channel ECG

system.

Inverse Problem:

In the present study transmembrane voltages are chosen as

source model. 4502 nodes in the

ventricular model are selected. Transfer matrix is then

constructed describing the relation between 64

ECG measurements on the body surface and 4502 unknown

sources in the heart.

Two transfer matrices are calculated, i.e., one for the original

electrode configuration and one for the optimized electrode

configuration. The condition number and singular values of these

two transfer matrices are computed in order to evaluate the

electrode configurations with the respect to the null-space

theory.

The condition number of transfer matrix calculated from the

original electrode configuration is 6.25e+06

and the optimized configuration reaches a condition number of

2.26e+06. The singular values of two configurations are shown in

Fig. 8

The ST-integrals of simulated ECGs, which are forward calculated

from the 153 simulated

ischemic areas, are taken as the input of the inverse problem.

The inverse problem is solved with the

original and optimized electrode configurations, separately.

The output of the inverse problem is then the ST-integral of

transmembrane voltages, in which the ischemic area can be

identified at its

minimum.

To evaluate the quality of the inverse problem the inverse

solutions are compared with the

simulated references. The criterion is that the more similar the

solution and the reference are, the better

the inverse solution

The Tikhonov 2nd-order regularization is used at first. The optimal

regularization parameter is

determined using the “L-curve” method.

The correlation coefficients between the simulated references

and the reconstructions obtained with Tikhonov 2nd-order

regularization using the original and optimized electrode

configurations for all 153 ischemic areas are plotted in Fig. 9. The

reconstructed ischemic areas of two cases, i.e., the basal

inferoseptal transmural ischemia (segment 3) with a radius of

30mm and the mid anterolateral transmural ischemia (segment

12) with a radius of 20mm, are shown in Fig. 10

The second method utilized in this study is the MAP-based

regularization. The simulated 153

ischemic areas in the left ventricular wall and the septum provide

a comprehensive stochastical basis

for the MAP-based regularization.

The statistical description of sources, i.e., the covariance matrix Cx

in Eq. 7, is extracted from the 153 simulations. The correlation

coefficients between the simulated references and the

reconstructions obtained with the MAP-based regularization using

the original and

optimized electrode configurations for all 153 ischemic areas are

plotted in Fig. 11. The reconstructed ischemic areas of two cases,

i.e., the basal inferior transmural ischemia (segment 4) with a

radius of

30mm and the mid inferoseptal ischemia (segment 9) with a

radius of 30mm, are shown in Fig. 12.

Figure 9. The correlation between simulated references and the

reconstructions with the Tikhonov 2nd-order

regularization using the original electrode configuration (Conf. 1) and the

optimized electrode

configuration (Conf. 2).

Figure 10. The reconstructed myocardial ischemic areas with the

Tikhonov 2nd-order regularization using the original electrode

configuration (Conf. 1) and the optimized electrode configuration (Conf.

2). The

simulations as reference are shown in the first column. The basal

inferoseptal transmural ischemia

(segment 3) with a radius of 30mm (upper) and the mid anterolateral

transmural ischemia (segment

12) with a radius of 20mm (bottom) are shown.

Figure 11. The correlation between simulated references and the reconstructions with the

MAP-based

regularization using the original electrode configuration (Conf. 1) and the optimized

electrode

configuration (Conf. 2).

Figure 12. The reconstructed myocardial ischemic areas with the MAP-based regularization using the original

electrode configuration (Conf. 1) and the optimized electrode configuration (Conf. 2). The simulations

as reference are shown in the first column. The basal inferior transmural ischemia (segment 4) with a

radius of 30mm (upper) and the mid inferoseptal ischemia (segment 9) with a radius of 30mm (bottom)

are shown

Simulation models of the human heart

Modeling Cardiac Bioelectricity in Realistic Volumes

Introduction

Since before the time of Einthoven biophysicists and physicians have sought to understand the relationship between

cardiac sources of bioelectricity and the resulting body surface potentials, a relationship expressed most generally as

forward problems in electrocardiography. As a physician with a strong interest in physics, Einthoven tapped both

sources of motivation to make first measuring and then understanding the ECG the center point of his career.

The past century has seen remarkable progress and also great diversity in the approaches available to study and

understand electrocardiographic forward problems. Models of the cardiac sources have evolved from the single dipoles

of Einthoven’s time to anatomically realistic, anisotropic bidomain models of the heart driven by dynamic cellular

currents first described in the middle of the century by fellow Nobel Prize winners, Hodgkin and Huxley. From the crude

approximations of the body volume conductor as an infinite homogeneous region have evolved into high resolution,

patient specific geometric models consisting of millions of points joined into surface or volume elements. To replace the

qualitative descriptions of electric potentials generated by simple sources, there exist now highly quantitative

approximations based on solutions of partial differential equations from Maxwell. And finally, to solve and display the

measurements and predictions of the ECG, photographic images from string galvanometers have given way to modern

computers, numerical mathematics, and scientific visualization.

The essential elements of a forward solution, however, have remained the same as in Einthoven’s time, dictated as

they are by the physics of the problem rather than the technology. One must first determine a suitable estimate of the

electrical behavior of the heart that captures the important features and yet remains mathematically and

computationally tractable. One must then place this source within a volume conductor that describes the passive

electrical characteristics of the human body, again with as much detail as necessary but in a way that remains amenable

to calculation.

The third component of a forward solution are the physical equations that describe the relationships between electrical

sources and volume potentials and currents, together with robust and accurate means of estimating them in the

discrete geometric models of the body. Finally, one must have a means of capturing all this information in a framework

that allows numerical solution of the equations and display and manipulation of the results, ideally coupled with

measurements that server to validate the assumptions built into all stages of the solution.

Once developed and tested, an accurate solution to the electrocardiographic forward problem has a number of uses.

It can serve as a means of testing the effect of variations of all components of the sources and geometric model on the

resulting ECG. A typical goal would be to differentiate between pathological changes in the heart and a range of other

variations that can effect body surface potentials. A forward solution can also serve as the bridge between a simulation

model of cardiac activity (described elsewhere in this volume) and the resulting ECG and thus help determine whether

the predictions of the source model are compatible with measured body surface signals. Forward solutions are also

invariably a required element in any inverse problem formulation, the problem of determining cardiac activity from

(noninvasive) body-surface measurements, also

described in this volume.

The goal of this document is to describe briefly some of the more recent advances in the creation and application of

electrocardiographic forward solutions. For more comprehensive reviews, see, for example, Gulrajani. We will begin

with an overview of the elements of a contemporary forward solution and the research findings that describe them. We

will then highlight some of the integrated solutions formulations and the software available to compute them and then

describe our own initial results using these tools to describe forward solution results in a novel and hopefully useful way.

We conclude with what we feel is a novel approach to representing the forward solution

and a few of the many intriguing questions left to resolve in the study of forward problems in electrocardiography.

Source Formulations

Every stage of a simulation model requires approximations of reality that reflect the goals, desired level of detail, and

the imagination of its creator. In the electrocardiographic forward problem, it is arguably the formulation of the

bioelectric source component that best characterizes the perspective of a particular model. Einthoven first described the

electric behavior of the entire heart (and torso) as a single dipole that changes orientation and amplitude over the

course of each heart beat and this conceptual approach remains dominant in the teaching and clinical application of

electrocardiography in medicine.

In subsequent years have followed a series of modification and refinements of the dipole source model, notable

among them the experimental and modeling evaluation by Burger and van Milaan of the concept of a lead field to

describe the relationship between dipolar sources and the resulting body surface potentials. Further refinements of this

basic concept include the use of moving dipole, multiple dipoles, multipole, and dipole layers

Figure 1: Source model configurations for electrocardiographic forward problems.

The inadequacies in the basic approximation of the heart as single dipole that arose fairly soon after its description led

not just to refinements of this basic idea but also to fundamentally different source models of the heart, as summarized

schematically in Figure 1. Crucial among them was the use of the epicardial potential distribution as an equivalent

source of cardiac bioelectricity, an approach still in very common use today (and illustrated in Panel B of Figure 1).

Another source model that has gained considerable attention in recent years is based on a uniform dipole layer (UDL)

representation of cardiac activation (illustrated in Panel C of Figure 1). Starting from this source and assuming the

resulting electrocardiographic fields to be represented by the solid angle subtended by the UDL, one can describe the

field from the entire activation sequence of the heart as that originating from the epicardial and endocardial surfaces.

Given some further assumption about the voltage source of the activation wavefront, it is then possible to formulate a

quantitative expression for body surface potential as a function of activation time on the heart surface.

All of these formulations require in one form or another a description of the electrical activity of the heart.

Measurements from cardiac mapping provide one source of this information, as we shall describe below. It is also

possible, as reported elsewhere in this volume, to simulate the cardiac bioelectricity by means of a model of excitable

cells and myocardial tissue. In the time since Einthoven there have been an impressive sequence of such models,

starting most notably with the Nobel prize winning results of Hodgkin and Huxley on the dynamics of excitable

membranes. This fundamental description of the time and voltage dependence of ionic currents provided the basic

source for ever more complex models of myocytes, myocardium, and now entire hearts. of special importance in the

context of forward solutions have been models using networks of excitable cells, cellular automata, and especially the

bidomain approach.

Volume Conductor Models

Linking the cardiac sources with the body surface potentials is the thorax, an electrically passive volume conductor,

geometric models of which have grown substantially in sophistication and detail since the time of Einthoven. Einthoven

considered the volume conductor to be an infinite homogeneous region, and described the relationship between the

heart dipole and limb lead potentials in terms of an equilateral triangle with the heart dipole in the center. Burger and

van Milaan investigated the effect of a finite homogeneous volume conductor on the ECG and especially the

assumptions of the equilateral triangle. The proposed a skewed triangular shape and a set of ECG lead locations to

compensate for the effects of the finite volume conductor on the lead field.

Realistic geometric models of the human torso appeared in the latter part of the century and have formed the basis

of forward problem volume conductors ever since. The model by Hor´aˇcek included a body surface based on

mechanical measurements of a human as well as lung and epicardial surfaces from X-ray images. He and other

investigators have subsequently used this same model for studies of electrocardiographic forward problems. We have

developed the Utah torso, which was based on magnetic resonance imaging of a human subject and contains not only

inhomogeneous but also anisotropic regions. Computed tomography also provides images of very high spatial

resolution, which have been the source of very detailed models of the thorax. Many recent studies are based on the

results of the Visible Human Project, which sought to create a set of medical image data at the highest possible

resolution from the cadaver of one man and one woman. Perhaps most contemporary are approaches that seek to

customize a geometric model to the patient, either by fitting the measured data using basis functions, or using

supplementary imaging data to adjust a standard model.

only anatomical information but also a description of the electrical properties of the tissues. This requires that

investigators assign estimates of local conductivity, typically based on values in the literature or, in rare cases, their own

measurements. The questions of just how accurately the values of conductivity must be known or even which

inhomogeneous regions a model must include are still unresolved despite considerable study. Recent results suggest

that geometric accuracy of the volume conductor may play a larger role than that of the conductivities assigned to the

model. Our own studies based on measurements using a human shaped torso tank revealed modest changes in

potential amplitudes of both the epicardial and torso surface potentials in the presence of localized inhomogeneous

regions within the tank. Figure 2 shows an example of such changes following insertion of two balloons to represent

lungs in the torso tank. These results support earlier simulations using simplified concentric sphere geometries by Rudy

et al.

Figure 2: Effect of placing insulating balloon into the torso tank on epicardial potentials (top row) and torso tank

potentials (bottom row) for equivalent instants in time during three separate beats. The maps of electric potential in

left-hand column come from a beat before insertion of balloons, those in the middle column come from a beat with the

balloons in place, and those in the right-hand column are from a beat after removing the balloons. The contours are

linearly spaced with constant scaling across maps in each of the two surfaces, with contour values indicated by the

scaling bars.

Perhaps the most important finding of these studies is that changing the characteristics of

the volume conductor results in changes not just in torso surface potentials but also those on the epicardial surface. As a

consequence, studies of conductivity effects based solely on simulation may not capture the true complexity of the

response to changes in volume conductor characteristics. Moreover, it may be possible to carry out the definitive study

of the role of the volume conductor only through a combination of simulation and experimental studies. To place these

findings in a clinical context, the changes in potential than can arise from changes in torso geometry, as well as from

physiologically reasonable changes in heart position, are large enough to exceed common thresholds for indicating

pathological ECGs.

Numerical Approximations

The ultimate biophysical basis of an electrocardiographic forward problem are Maxwell’s equations, from which one can

derive a wide variety of specific applications. The generalized quantitative implementation of Einthoven’s heart vector

approach is the lead field, which describes the relationship between heart vector and torso potentials by the equation

where (φBi) is the body surface potential difference between a particular pair of electrodes (a lead), (p) is the dipole

vector, and (Li) is the lead field vector for that particular lead. The lead vector encapsulates all the geometric and

conductivity information of the volume conductor for the specific lead. Using reciprocity, one can, in principle, measure

the lead field for any set of leads, however, in the modern era, one typically approximates the lead field through a series

of calculations for a discrete number of dipole locations and body-surface leads.

Another approximation approach, which described the electrocardiographic source in terms of epicardial potentials,

is by means of a Green’s theorem applied to the potentials in the torso. First described by Barr et al., this method begins

with an equation for the potential (φ) anywhere in the volume conductor as

and then writes a pair of specific equations for the potential on the heart and body surfaces, making use of Laplace’s

equation, which governs the region of the volume conductor that contains no sources. The result is a set of integral

equations for which one find numerical approximations by means of the boundary element method (BEM) and then,

finally, a compact representation of the forward solution as

with (ΦH) a vector of epicardial potentials, (ΦB), the associated body surface potentials, and (ZBH)the forward coefficient

transform matrix defined in terms of solutions to the various terms of the integral equation.

One can also formulate a solution based on a specific solution to Laplace’s equation as

anywhere in the volume conductor between the heart and body surfaces. Assuming we have known potentials on the

heart surface, ΦH and that the normal component of current at the body surface is zero, one can then write a

minimization equation that supplies the conditions for a finite element method solution of the problem.

There exists another source formulation based on the activation time over the entire epicardial and endocardial

surfaces, which also leads to an integral equation

where ΦB(y) is the potential on the body surface site y, H is the Heaviside step function,

τ (x) is the time at which each portion of the epi/endocardium (SH ) becomes depolarized (the activation time) and T (y,

x) is a transfer function that weights the contribution of

each point of the cardiac surface x to each point on the torso surface y. This equation also leads to a boundary element

approached, based as it is on data limited to the heart and body surfaces.

Forward solution in terms of currents

We present here an approach to manipulating and viewing the results of the forward solutions that seeks to reveal new

features not previously directly accessible. The basic formulation of the forward problem is conventional, based on

epicardial potentials located on the inner surface of a geometric model of the thorax. The novel aspect is that we solve

the problem not just in terms of torso surface potentials, but first the potentials throughout the volume and then from

them, the current density everywhere in the thorax. From this, we are able to integrate along the paths of current

density and thus trace the pathways of current starting from seed points that we set interactively

The specific example included here is from potentials measured in a human-shaped torso tank in which we

suspended an isolated, perfused dog heart. The tank also had electrodes located within the volume, which provided

confirmation of the forward solution results at those locations— a subset of the full finite element model. The goal of

the project was to understand more fully the patterns of torso potentials that result from the stimulation from one or

more locations on the epicardial surface, ectopic beats as might arise in conjunction with ventricular tachycardia.

We used a range of software tools, including SCIRun/BioPSE, to create the geometric model and compute and then

display the potentials and current density fields. Critical for this purpose was the ability to manually set seed point

location and density in the volume and quickly visualize the resulting current lines, capabilities uniquely available within

the SCIRun/BioPSE environment. We also used also a custom visualization program map3d for visualizing sequences of

surface potential distributions interactively.

Among the findings that emerged from this study was a clear picture of the flow of current between and among multiple

sites of simulation. Close to the heart, each current source/sink connects to unique lines of current flow, sometimes

slitting or merging close to the source to link to one or more sites of opposite polarity. Slightly further from the heart,

however, the current lines from multiple sources and sinks tended to converge and lose their distinct patterns so that

Figure 3: Electric fields at 16 ms after simultaneous pacing from two sites on the ventricular surface. All four panels have

the same perspective view from the front of the body. Panel A: epicardial potentials; Panel B: current flow near the

heart; Panel C: body surface potentials; and Panel D: torso volume currents and potentials. Streamlines depict current

pathways, and the dark green surface within the volume is the iso-potential surface at 0 mV. The light green surface

shows the posterior chest wall. Contour lines are equally spaced between -6.2 mV and 0.85 mV on the epicardial surface

and between -1.6 mV and 0.38 mV on the tank surface. Values in mV marked on both epicardial and tank surfaces (Panel

A and C) are maxima and minima or potential. The iso-potential surfaces in Panel C were at -0.5 mV.

individual sources or sinks were no longer separate, as reflected in the resulting potential mapson the torso tank

surface. Thus is was possible to investigate in great detail the nature of the smoothing that occurs between cardiac

sources and the resulting body surface potentials.

the models we developed in our approach are

- concentric 2d multiple dipole model

- eccentric 2d multiple dipole model

which were discussed in further details in the next chapter

Concentric model

Body here is considered as disk conductor.

General form :

𝑉1=𝐴°+ 𝐴𝑛 𝑟𝑛 cos(𝑛𝜃)∞1

𝑉2= (C𝑛 𝑟𝑛 + D𝑛𝑟−𝑛) cos(𝑛𝜃)∞1

Using boundary conditions :

𝜕𝑉2

𝜕𝑟 |R = 0

𝜕𝑉1

𝜕𝑟|𝑟° =

𝜕𝑉2

𝜕𝑟|𝑟°

m(𝜽) = 𝑽𝟐 − 𝑽𝟏|𝒓°

m(𝜽)= 𝑴𝜽°

𝟐𝝅+

𝑴𝜽°

𝟐

𝒔𝒊𝒏(𝒏𝜽

𝟐)

(𝒏𝜽

𝟐)

𝒄𝒐𝒔(𝒏𝜽) ∞𝒏=𝟏

𝑽𝒔(𝜽)=V2(R, 𝜽)=𝑴𝜽°

𝟐𝝅 ∞

𝒏=𝟏

𝒔𝒊𝒏(𝒏𝜽

𝟐)

(𝒏𝜽

𝟐)

(𝒓

𝑹)𝒏 𝒄𝒐𝒔(𝒏𝜽)

Forward problem:

Matlab code for m(theta) : %(((((((((( consentric condition))))))))))) %---------------------------------------------------------- %forward problem of the source thetan1=pi/3;

theta1=[(-pi):(pi/300):(pi)]; %equation of the source m(theta) s=0; for n=1:100; m1=(1/6)*cos(n*theta1)*(sin(n*(pi/6)))/(n*pi/6); s=s+m1; end m1=s+(1/6); figure plot(theta1,m1) title('thetan1=pi/3 & m(theta) & n=1:100')

Output figure for m(theta) :

Matlab code for m(f) : thetan1=pi/3; theta1=[(-pi/6):(pi/300):(pi/6)]; %equation of the source m(theta) s=0; for n=1:100; m1=(1/6)*cos(n*theta1)*(sin(n*(pi/6)))/(n*pi/6); s=s+m1; end m1=s+(1/6); mf=-fftshift(m1); owmega=linspace(-10,10,length(mf)); figure plot(owmega,mf) title('owmega & m(f)')

Output figure for m(f) :

Matlab code for v(theta) : %equation to get volt on the source %theta2=[-pi:.001:pi]; thetan2=pi/3; theta2 = linspace((-pi),(pi),length(theta1)); M=1; N=100; % index of summation k=(M*thetan2)/(2*pi); rR1=0.6; % loop to get surface voltage as a function of theta %----------------------------------------------------------- for l=1:length(theta2) for n=1:N k_n=((M*thetan2)/(2*pi))*(rR1^n)*(sin(n*(thetan2/2))/(n*(thetan2/2))); segma(n)=k_n*cos(n*theta2(l)); end segma=sum(segma); v_source1(l)=k*segma; end figure

plot(theta2,v_source1) title('thetan2=pi/3 & v(theta) & n=1:100')

Output figure for v(theta) :

Inverse problem:

Matlab code for v(f) : thetan2=pi/3; theta2 = linspace((-pi/6),(pi/6),length(theta1)); M=1; N=100; k=(M*thetan2)/(2*pi);rR1=0.6; for l=1:length(theta2) for n=1:N k_n=((M*thetan2)/(2*pi))*(rR1^n)*(sin(n*(thetan2/2))/(n*(thetan2/2))); segma(n)=k_n*cos(n*theta2(l)); end segma=sum(segma); v_source1(l)=k*segma; end vf1=fftshift(fft(v_source1)); owmegav=linspace(-10,10,length(vf1)); figure plot(owmegav,vf1) title('owmega & v(f)& rR=0.6 ')

Output figure for v(f) :

How to get m(theta) from v(f) ???

Matlab code: vf11=vf1.*(1/0.6).^owmegav; mtheta1=-ifftshift(vf11); theta1=linspace(-pi,pi,length(mtheta1)); figure plot(theta1,mtheta1); title('theta & m(theta) & rR=0.3 ')

Output figure for m(theta) :

Extrinsic model(Reality)

General form :

𝑉1= 𝐴𝑛 𝑟𝑛 cos(𝑛𝜃)∞1

𝑉2= (C𝑛 𝑟𝑛 + D𝑛𝑟−𝑛) cos(𝑛𝜃)∞1 ------> I

Using boundary conditions :

𝜕𝑉1

𝜕𝑟= 𝑛𝐴𝑛 𝑟𝑛−1 cos(𝑛𝜃)

𝜕𝑉2

𝜕𝑟= (𝑛C𝑛 𝑟𝑛−1 − 𝑛𝐷𝑛𝑟−𝑛−1) cos(𝑛𝜃) ----->II

@r=𝑟°

𝜕𝑉1

𝜕𝑟|𝑟° =

𝜕𝑉2

𝜕𝑟|𝑟°

𝑛𝐴𝑛 𝑟𝑛−1 = 𝑛C𝑛 𝑟𝑛−1 − 𝑛𝐷𝑛𝑟−𝑛−1

𝐷𝑛 = (C𝑛 − A𝑛 )𝑟°2𝑛 ------> (1)

𝑉2 − 𝑉1|𝑟° = m(𝜃)

𝑉2 − 𝑉1|𝑟° =𝑀𝜃°

2𝜋 +

𝑀𝜃°

2

sin (𝑛𝜃

2)

(𝑛𝜃

2)

cos(𝑛𝜃) ∞1 --->(2)

𝑉2 − 𝑉1|𝑟° = [(C𝑛 𝑟°𝑛 + D𝑛𝑟°

−𝑛) − 𝐴𝑛 𝑟°𝑛 ] cos(𝑛𝜃)∞

1 …(3)

From equ(2) , equ(3) :

𝑀𝜃°

2

sin (𝑛𝜃

2)

(𝑛𝜃

2)

cos(𝑛𝜃) = (C𝑛 𝑟°𝑛 + D𝑛𝑟°

−𝑛) − 𝐴𝑛 𝑟°𝑛…..(4)

From equ(1):

𝐷𝑛

𝑟°2𝑛 = C𝑛 − A𝑛 ……..(5)

𝑀𝜃°

2

sin (𝑛𝜃

2)

(𝑛𝜃

2)

cos(𝑛𝜃) = (C𝑛 − A𝑛) 𝑟°𝑛+ D𝑛𝑟°

−𝑛

From equ(5):

𝑀𝜃°

2

sin (𝑛𝜃

2)

(𝑛𝜃

2)

cos(𝑛𝜃) = 𝐷𝑛

𝑟°𝑛 +

𝐷𝑛

𝑟°𝑛

𝐷𝑛= 𝑟°𝑛

2

𝑀𝜃°

2

sin(𝑛𝜃2

)

(𝑛𝜃2

)

From sketch:

𝑟′ sin(𝜃 ′) = rsin(𝜃) + 𝑦°

𝑟′ cos(𝜃 ′) = rcos(𝜃) + 𝑥°

sin(𝜃 ′) = r

𝑟 ′ sin(𝜃) + 𝑦°

𝑟 ′

……….(6)

cos(𝜃 ′) = r

𝑟 ′ cos(𝜃) + 𝑥°

𝑟 ′

𝜑 = (90-𝜃 ′ ) – (90- 𝜃)

𝜑 =( 𝜃 − 𝜃 ′ )

cos(𝜑 ) = cos(𝜃) cos(𝜃 ′) + sin(𝜃) sin(𝜃 ′)

………(7)

sin(𝜑 ) = sin(𝜃) cos(𝜃 ′) - cos(𝜃) sin(𝜃 ′)

𝜕𝑉2

𝜕𝑟 ′ |R = 0

𝜕𝑉2

𝜕𝑟 ′ =

𝜕𝑉2

𝜕𝑟 ′ cos(𝜑 ) + 𝜕𝑉2

𝑟 ′ 𝜕𝜃sin(𝜑 ) = 0

cos(𝜑 ) = cos(𝜃).( r

𝑟 ′ cos(𝜃) + 𝑥°

𝑟 ′ ) + sin(𝜃)(r

𝑟 ′ sin(𝜃) + 𝑦°

𝑟 ′ )

………(8)

sin(𝜑 ) = sin 𝜃 (r

𝑟 ′ cos(𝜃) + 𝑥°

𝑟 ′ ) - cos(𝜃)(r

𝑟 ′ sin(𝜃) + 𝑦°

𝑟 ′ )

>𝜕𝑉2

𝜕𝑟 ′ =

𝜕𝑉2

𝜕𝑟 ′ cos(𝜑) +

𝜕𝑉2

𝑟 ′ 𝜕𝜃sin(𝜑) = 0

from equ(I) , equ(II) , equ(8):

𝑉2= (C𝑛 𝑟′ 𝑛 + D𝑛𝑟′ −𝑛) cos(𝑛𝜃)∞1

𝜕𝑉2

𝑟′ 𝜕𝜃 = -(C𝑛 𝑟′ 𝑛 + D𝑛𝑟′ −𝑛) sin(𝑛𝜃)

𝑛

𝑟 ′

𝜕𝑉2

𝜕𝑟 ′ = (𝑛C𝑛 𝑟′ 𝑛−1

− 𝑛𝐷𝑛𝑟′ −𝑛−1) cos 𝑛𝜃 [ cos(𝜃).( r

𝑟 ′ cos(𝜃) +

𝑥°

𝑟 ′) + sin(𝜃)(

r

𝑟 ′ sin(𝜃) +

𝑦°

𝑟 ′) ]

- (C𝑛 𝑟′ 𝑛 + D𝑛𝑟′ −𝑛)[ sin 𝑛𝜃 (sin(𝜃) (r

𝑟 ′ cos(𝜃) +

𝑥°

𝑟 ′) - cos(𝜃)(

r

𝑟 ′ sin(𝜃) +

𝑦°

𝑟 ′) ]

𝜕𝑉2

𝜕𝑟 ′ = 𝑛C𝑛 𝑟′ 𝑛−1 cos 𝑛𝜃 [ cos(𝜃).(

r

𝑟 ′ cos(𝜃) +

𝑥°

𝑟 ′) + sin(𝜃)(

r

𝑟 ′ sin(𝜃) +

𝑦°

𝑟 ′) ]

−𝑛𝐷𝑛𝑟′ −𝑛−1 cos 𝑛𝜃 [ cos(𝜃).( r

𝑟 ′ cos(𝜃) +

𝑥°

𝑟 ′) + sin(𝜃)(

r

𝑟 ′ sin(𝜃) +

𝑦°

𝑟 ′) ]

−𝑛C𝑛 𝑟′ 𝑛−1 sin(𝑛𝜃)[ 𝑥°

𝑟 ′ sin(𝜃) −

𝑦°

𝑟 ′cos(𝜃) ]

−𝑛𝐷𝑛𝑟′ −𝑛−1 sin(𝑛𝜃)[ 𝑥°

𝑟 ′ sin(𝜃) −

𝑦°

𝑟 ′cos(𝜃) ]

𝜕𝑉2

𝜕𝑟 ′ = 𝑛C𝑛 𝑟′ 𝑛−1 [ cos 𝑛𝜃 (

r

𝑟 ′ 𝑐𝑜𝑠2(𝜃) +

𝑥°

𝑟 ′cos(𝜃) +

r

𝑟 ′𝑠𝑖𝑛2(𝜃) +

𝑦°

𝑟 ′sin(𝜃) )− sin(𝑛𝜃)(

𝑥°

𝑟 ′ sin(𝜃) −

𝑦°

𝑟 ′cos(𝜃) ) ]

−𝑛𝐷𝑛𝑟′ −𝑛−1[ cos 𝑛𝜃 ( r

𝑟 ′ 𝑐𝑜𝑠2(𝜃) +

𝑥°

𝑟 ′cos(𝜃) +

r

𝑟 ′𝑠𝑖𝑛2(𝜃) +

𝑦°

𝑟 ′sin(𝜃) )+ sin(𝑛𝜃)(

𝑥°

𝑟 ′

sin(𝜃) −𝑦°

𝑟 ′cos(𝜃) ) ]

@𝜕𝑉2

𝜕𝑟 ′ |R = 0

[R2𝑛 Cn −Dn

Dn ][ cos 𝑛𝜃 (

r

R 𝑐𝑜𝑠2 𝜃 +

𝑥°

Rcos 𝜃 +

r

R𝑠𝑖𝑛2 𝜃 +

𝑦°

Rsin 𝜃

− [R2𝑛 Cn −Dn

Dn ][ sin(𝑛𝜃)(

𝑥°

R sin(𝜃) −

𝑦°

Rcos(𝜃) )] = 0

[R2𝑛 Cn −Dn

R2𝑛 Cn +Dn ] [ cos 𝑛𝜃 (

r

R 𝑐𝑜𝑠2 𝜃 +

𝑥°

Rcos 𝜃 +

r

R𝑠𝑖𝑛2 𝜃 +

𝑦°

Rsin 𝜃

[ sin(𝑛𝜃)( 𝑥°

R sin(𝜃) −

𝑦°

Rcos(𝜃) )] = 0

[R2𝑛 Cn −Dn

R2𝑛 Cn +Dn ] [ cos 𝑛𝜃 (

r

R +

𝑥°

Rcos 𝜃 +

𝑦°

Rsin 𝜃 ]

[ sin(𝑛𝜃)( 𝑥°

R sin(𝜃) −

𝑦°

Rcos(𝜃) )] = 0

[R2𝑛 Cn −Dn

R2𝑛 Cn +Dn ] [ cos 𝑛𝜃 (

r

R +

𝑥°

Rcos 𝜃 +

𝑦°

Rsin 𝜃 ]

[ sin(𝑛𝜃)( 𝑥°

R sin(𝜃) −

𝑦°

Rcos(𝜃) )] = 0

[R2𝑛 Cn −Dn

R2𝑛 Cn +Dn ] [ (

r

R +

𝑥°

Rcos 𝜃 +

𝑦°

Rsin 𝜃 ]

− tan(𝑛𝜃)[ ( 𝑥°

R sin(𝜃) −

𝑦°

Rcos(𝜃) )] = 0

[R

2𝑛 Cn −Dn

R2𝑛 Cn +Dn ]

1

tan (𝑛𝜃 ) =

𝑥° sin 𝜃 +𝑦° cos (𝜃)

𝑟+𝑦° sin 𝜃 + 𝑥° cos (𝜃)

[R

2𝑛 Cn −Dn

R2𝑛 Cn +Dn ] =

tan 𝑛𝜃 ( 𝑥° sin 𝜃 +𝑦° cos 𝜃 )

𝑟+𝑥° sin 𝜃 +𝑦° cos (𝜃)

R2𝑛Cn[𝑟 + 𝑦° sin 𝜃 + 𝑥° cos(𝜃)] - Dn [𝑟 + 𝑦° sin 𝜃 + 𝑥° cos(𝜃)] =

R2𝑛Cn tan 𝑛𝜃 [ 𝑥° sin 𝜃 + 𝑦° cos 𝜃 ] + Dn tan 𝑛𝜃 [ 𝑥° sin 𝜃 + 𝑦° cos 𝜃 ]

R2𝑛Cn[ 𝑟 + 𝑦° sin 𝜃 + 𝑥° cos 𝜃 − tan 𝑛𝜃 ( 𝑥° sin 𝜃 + 𝑦° cos 𝜃 )]

= Dn [( 𝑟 + 𝑦° sin 𝜃 + 𝑥° cos 𝜃 ) + tan 𝑛𝜃 ( 𝑥° sin 𝜃 + 𝑦° cos 𝜃 )]

Cn = Dn

R2𝑛

[( 𝑟+𝑦° sin 𝜃 + 𝑥° cos 𝜃 )+ tan 𝑛𝜃 ( 𝑥° sin 𝜃 +𝑦° cos 𝜃 )]

[ 𝑟+𝑦° sin 𝜃 + 𝑥° cos 𝜃 −tan 𝑛𝜃 ( 𝑥° sin 𝜃 +𝑦° cos 𝜃 )]

Cn =

𝒓°𝒏

𝟐𝐑𝟐𝒏

𝑴𝜽°

𝟐

𝐬𝐢𝐧(𝒏𝜽

𝟐)

(𝒏𝜽

𝟐)

[( 𝒓+𝒚° 𝐬𝐢𝐧 𝜽 + 𝒙° 𝐜𝐨𝐬 𝜽 )+ 𝐭𝐚𝐧 𝒏𝜽 ( 𝒙° 𝐬𝐢𝐧 𝜽 +𝒚° 𝐜𝐨𝐬 𝜽 )]

[ 𝒓+𝒚° 𝐬𝐢𝐧 𝜽 + 𝒙° 𝐜𝐨𝐬 𝜽 −𝐭𝐚𝐧 𝒏𝜽 ( 𝒙° 𝐬𝐢𝐧 𝜽 +𝒚° 𝐜𝐨𝐬 𝜽 )]

>Dn

𝑟2𝑛 = Cn − An

An = Cn −Dn

𝑟2𝑛

An = 𝑟°

𝑛

2R2𝑛

𝑀𝜃°

2

sin (𝑛𝜃

2)

(𝑛𝜃

2)

[( 𝑟+𝑦° sin 𝜃 + 𝑥° cos 𝜃 )+ tan 𝑛𝜃 ( 𝑥° sin 𝜃 +𝑦° cos 𝜃 )]

[ 𝑟+𝑦° sin 𝜃 + 𝑥° cos 𝜃 −tan 𝑛𝜃 ( 𝑥° sin 𝜃 +𝑦° cos 𝜃 )]

−𝑟°

𝑛

2R2𝑛

𝑀𝜃°

2

sin(𝑛𝜃2

)

(𝑛𝜃2

)

𝑉2=

(C𝑛 𝑟𝑛 + D𝑛𝑟−𝑛) cos(𝑛𝜃)∞1

𝑽𝟐=𝑴𝜽°

𝟐 ∞

𝒏=𝟏

𝒔𝒊𝒏(𝒏𝜽

𝟐)

(𝒏𝜽

𝟐)

[( 𝒓+𝒚° 𝒔𝒊𝒏 𝜽 + 𝒙° 𝒄𝒐𝒔 𝜽 )

𝒓+𝒚° 𝒔𝒊𝒏 𝜽 + 𝒙° 𝒄𝒐𝒔 𝜽 −𝒕𝒂𝒏 𝒏𝜽 ( 𝒙° 𝒔𝒊𝒏 𝜽 +𝒚° 𝒄𝒐𝒔 𝜽 )]

(𝒓

𝑹)𝒏 𝒄𝒐𝒔(𝒏𝜽)

𝐀𝐧 = 𝐫°𝐧

𝟐𝐑𝟐𝐧

𝐌𝛉°

𝟐

𝐬𝐢𝐧(𝐧𝛉

𝟐)

(𝐧𝛉

𝟐)

[[( 𝐫+𝐲° 𝐬𝐢𝐧 𝛉 + 𝐱° 𝐜𝐨𝐬 𝛉 )+ 𝐭𝐚𝐧 𝐧𝛉 ( 𝐱° 𝐬𝐢𝐧 𝛉 +𝐲° 𝐜𝐨𝐬 𝛉 )]

𝐫+𝐲° 𝐬𝐢𝐧 𝛉 + 𝐱° 𝐜𝐨𝐬 𝛉 −𝐭𝐚𝐧 𝐧𝛉 ( 𝐱° 𝐬𝐢𝐧 𝛉 +𝐲° 𝐜𝐨𝐬 𝛉 ) − 𝟏]

m(𝜽) = 𝑽𝟐 − 𝑽𝟏|𝒓° = 𝑴𝜽°

𝟐

𝒔𝒊𝒏(𝒏𝜽

𝟐)

(𝒏𝜽

𝟐)

𝒄𝒐𝒔(𝒏𝜽) ∞𝒏=𝟏

Matlab code for m(theta) : %extrinsic condition %---------------------------------------- thetan=2*pi/3; theta1=[(-pi):(0.21):(pi)]; s=0; for n=1:100; m1=(2*pi/6)*cos(n*theta1)*(sin(n*(2*pi/6)))/(n*(2*pi/6)); s=s+m1; end m1=s; figure plot(theta1,m1) title('thetan=pi/3 & m(theta) & n=1:100')

Output figure for m(theta) :

Matlab code for v(theta) : theta = linspace((-pi),(pi),length(theta1)); M=10; N=100; k=(2*M*thetan)/(2);

for l=1:length(theta) for n=1:N rR=0.6; xn=0.1; yn=0.1; A=(rR+(xn*cos(theta(l)))+(yn*sin(theta(l)))); B=tan(n*theta(l)); C=((xn*sin(theta(l)))+(yn*cos(theta(l)))); D=sin(n*thetan/2)/(n*thetan/2); k_n=(D*((2*A)/(A-B*C))*(rR^n)); segma(n)=k_n*cos(n*theta(l)); end segma=sum(segma); v_source1(l)=k*segma; end v_source1([ 9 22]) = 0; v_source1([4 5 ]) = -13.7;

figure plot(theta,v_source1) title('thetan=pi/3 & v(theta) & n=1:100')

Output figure for v(theta) :

Neural networks background

The term neural network was traditionally used to refer to a network or circuit of biological neurons.[1]

The modern usage of the term often refers

to artificial neural networks, which are composed of artificial neurons or nodes. Thus the term has two distinct usages

1. Biological neural networks are made up of real biological neurons that are connected or functionally related in a nervous system. In the field

of neuroscience, they are often identified as groups of neurons that perform a specific physiological function in laboratory analysis.

2. Artificial neural networks are composed of interconnecting artificial neurons (programming constructs that mimic the properties of biological

neurons). Artificial neural networks may either be used to gain an understanding of biological neural networks, or for solving artificial

intelligence problems without necessarily creating a model of a real biological system. The real, biological nervous system is highly complex:

artificial neural network algorithms attempt to abstract this complexity and focus on what may hypothetically matter most from an information

processing point of view. Good performance (e.g. as measured by good predictive ability, low generalization error), or performance mimicking

animal or human error patterns, can then be used as one source of evidence towards supporting the hypothesis that the abstraction really

captured something important from the point of view of information processing in the brain. Another incentive for these abstractions is to

reduce the amount of computation required to simulate artificial neural networks, so as to allow one to experiment with larger networks and

train them on larger data sets.

- An artificial neural network involves a network of simple processing elements (artificial neurons) which can exhibit complex global behavior,

determined by the connections between the processing elements and element parameters. Artificial neurons were first proposed in 1943

by Warren McCulloch, a neurophysiologist, and Walter Pitts, a logician, who first collaborated at the University of Chicago

Applications of natural and of artificial neural networks

The utility of artificial neural network models lies in the fact that they can be

used to infer a function from observations and also to use it. Unsupervised

neural networks can also be used to learn representations of the input that

capture the salient characteristics of the input distribution, e.g., see the

Boltzmann machine (1983), and more recently, deep learning algorithms, which

can implicitly learn the distribution function of the observed data. Learning in

neural networks is particularly useful in applications where the complexity of the

data or task makes the design of such functions by hand impractical.

The tasks to which artificial neural networks are applied tend to fall within the

following broad categories:

- Function approximation, or regression analysis, including time series prediction and modeling.

- Classification, including pattern and sequence recognition, novelty detection and sequential decision making.

- Data processing, including filtering, clustering, blind signal separation and compression.

Application areas of ANNs include system identification and control (vehicle control, process control), game-playing and

decision making (backgammon, chess, racing), pattern recognition (radar systems, face identification, object

recognition), sequence recognition (gesture, speech, handwritten text recognition), medical diagnosis, financial

applications, data mining (or knowledge discovery in databases, "KDD"), visualization and e-mail spam filtering.

Models

Neural network models in artificial intelligence are usually referred to as artificial neural networks (ANNs); these are essentially simple mathematical

models defining a function or a distribution over or both and , but sometimes models are also intimately associated with a particular

learning algorithm or learning rule. A common use of the phrase ANN model really means the definition of a class of such functions (where members of

the class are obtained by varying parameters, connection weights, or specifics of the architecture such as the number of neurons or their connectivity).

- Network function

The word network in the term 'artificial neural network' refers to the inter–connections between the neurons in the different layers of each

system. An example system has three layers. The first layer has input neurons, which send data via synapses to the second layer of neurons,

and then via more synapses to the third layer of output neurons. More complex systems will have more layers of neurons with some having

increased layers of input neurons and output neurons. The synapses store

parameters called "weights" that manipulate the data in the calculations.

An ANN is typically defined by three types of parameters:

1. The interconnection pattern between different layers of neurons

2. The learning process for updating the weights of the interconnections

3. The activation function that converts a neuron's weighted input to its

output activation.

Mathematically, a neuron's network function is defined as a

composition of other functions , which can further be defined as a

composition of other functions. This can be conveniently represented as a

network structure, with arrows depicting the dependencies between

variables. A widely used type of composition is the nonlinear weighted

sum, where , where (commonly referred

to as the activation function[1]

) is some predefined function, such as

the hyperbolic tangent. It will be convenient for the following to refer to a

collection of functions as simply a vector .

This figure depicts such a decomposition of , with dependencies

between variables indicated by arrows. These can be interpreted in two

ways.

. The first view is the functional view: the input is transformed into a 3-

dimensional vector , which is then transformed into a 2-dimensional

vector , which is finally transformed into . This view is most commonly encountered in the context of optimization.

. The second view is the probabilistic view: the random variable depends upon the random variable , which depends

upon , which depends upon the random variable . This view is most commonly encountered in the context of graphical models.

The two views are largely equivalent. In either case, for this particular network architecture, the components of individual layers are

independent of each other (e.g., the components of are independent of each other given their input ). This naturally enables a degree of

parallelism in the implementation.

Networks such as the previous one are commonly called feedforward, because their graph is a directed acyclic graph. Networks

with cycles are commonly called recurrent. Such networks are commonly depicted in the manner shown at the top of the figure, where is

shown as being dependent upon itself. However, an implied temporal dependence is not shown.

- Learning

What has attracted the most interest in neural networks is the possibility of learning. Given a specific task to solve, and a class of functions

, learning means using a set of observations to find which solves the task in some optimal sense.

This entails defining a cost function such that, for the optimal solution , - i.e., no solution has a cost

less than the cost of the optimal solution

The cost function is an important concept in learning, as it is a measure of how far away a particular solution is from an optimal solution to the

problem to be solved. Learning algorithms search through the solution space to find a function that has the smallest possible cost.

For applications where the solution is dependent on some data, the cost must necessarily be a function of the observations, otherwise we would not be

modelling anything related to the data. It is frequently defined as a statistic to which only approximations can be made. As a simple example, consider

the problem of finding the model , which minimizes , for data pairs drawn from some distribution . In practical

situations we would only have samples from and thus, for the above example, we would only minimize . Thus,

the cost is minimized over a sample of the data rather than the entire data set.

When some form of online machine learning must be used, where the cost is partially minimized as each new example is seen. While online

machine learning is often used when is fixed, it is most useful in the case where the distribution changes slowly over time. In neural network

methods, some form of online machine learning is frequently used for finite datasets.

- Learning paradigms

Supervised learning

Unsupervised learning

Reinforcement learning

- Learning algorithms

Training a neural network model essentially means selecting one model from the set of allowed models (or, in a Bayesian framework,

determining a distribution over the set of allowed models) that minimizes the cost criterion. There are numerous algorithms available for

training neural network models; most of them can be viewed as a straightforward application of optimization theory and statistical estimation.

Most of the algorithms used in training artificial neural networks employ some form of gradient descent. This is done by simply taking the

derivative of the cost function with respect to the network parameters and then changing those parameters in a gradient-related direction.

Evolutionary methods, simulated annealing, expectation-maximization, non-parametric methods and particle swarm optimization are some

commonly used methods for training neural networks.

Employing artificial neural networks

Perhaps the greatest advantage of ANNs is their ability to be used as an arbitrary function approximation mechanism that 'learns' from observed data.

However, using them is not so straightforward and a relatively good understanding of the underlying theory is essential.

Choice of model: This will depend on the data representation and the application. Overly complex models tend to lead to problems with learning.

Learning algorithm: There are numerous trade-offs between learning algorithms. Almost any algorithm will work well with

the correct hyperparameters for training on a particular fixed data set. However selecting and tuning an algorithm for training on unseen data

requires a significant amount of experimentation.

Robustness: If the model, cost function and learning algorithm are selected appropriately the resulting ANN can be extremely robust.

With the correct implementation, ANNs can be used naturally in online learning and large data set applications. Their simple implementation and the

existence of mostly local dependencies exhibited in the structure allows for fast, parallel implementations in hardware.

In the task at hand we used a NN simulator Inserting a data set based on the equation :

v=[(sin(n*thetan/2))/(n*thetan/2)]*(rR^n)*cos(n*theta)

References

Boulakia, M., M. A. Ferna´ndez, J.-F. Gerbeau, and N. Zemzemi. Direct and inverse problems in electrocardi-

ography. AIP Conf. Proc. 1048(1):113–117, 2008.

Boulakia, M., M. A. Ferna´ndez, J.-F. Gerbeau, and N. Zemzemi. A coupled system of PDEs and ODEs arising in electrocardiograms modelling. Appl. Math. Res. Exp.

2008(abn002):28, 2008.

Buist, M., and A. Pullan. Torso coupling techniques for the forward problem of electrocardiography. Ann. Biomed.

Eng. 30(10):1299–1312, 2002.

Clements, J., J. Nenonen, P. K. J. Li, and B. M. Horacek.Activation dynamics in anisotropic cardiac tissue via decoupling. Ann. Biomed. Eng. 32(7):984–990, 2004.10

Colli Franzone, P., and L. F. Pavarino. A parallel solver for reaction-diffusion systems in computational electro-cardiology. Math. Models Methods Appl. Sci. 14(6):883–

911, 2004.

Colli Franzone, P., L. F. Pavarino, S. Scacchi, and B. Taccardi. Effects of anisotropy and transmural hetero-geneity on the T-wave polarity of simulated electrograms.

In: Functional Imaging and Modeling of the Heart,Vol. 5528 of Lecture Notes in Computer Science, edited by N. Ayache, H. Delingette, and M. Sermesant. Springer-

Verlag, 2009, pp. 513–523.

Colli Franzone, P., L. F. Pavarino, and B. Taccardi. Sim-ulating patterns of excitation, repolarization and action potential duration with cardiac bidomain and monodo-

main models. Math. Biosci. 197(1):35–66, 2005.

www.wikipedia.com

www.ncbi.com

Abdulrhman Elbuni, Salah Kanoun, Mohamed Elbuni, Nasser Ali ,” ECG Parameter Extraction Algorithm using

(DWTAE) Algorithm,” 978-1-4244-5844-8/09, 2009 IEEE

Adamec, J., Adamec, R.: ECG Holter. Springer Science+Business Media, LLC, New York (2008)

ECG Library, http://www.ecglibrary.com/ecghist.html

Adam Szczepa´ nski, Khalid Saeed, Alois Ferscha: ANewMethodforECGSignal Feature Extraction, Springer-

Verlag Berlin Heidelberg 2010

Andr´as Hartmann “Reconstruction of Missing Cardiovascular Signals using Adaptive Filtering” Computing

in Cardiology 2010;37:321−324.

D. Rumelhart, et al. ,”learning representations by back

propagation errors,” Cognitive modeling, p. 213 , 2002.

Jung-Wook Park, R. G. Harley, G. K. Venayagamoorthy, “Comparison of MLP and RBF Neural Networks Using Deviation Signals for On-Line Identification of

a Synchronous Generator”, 0-7803-7322-7/02, 2002 IEEE

Wan Mohd Fahmi, Wan Mamat, Ashidi Mat Isa, Kamal

Zuhairi Zamli, “Hybrid Version of MLP Neural Network for

Transformer Fault Diagnosis System”, 978-1-4244-2328-

6/08/, 2008 IEEE