medical cyber-physical systems · 2019-12-03 · medical cyber-physical systems electrophysiology...

Post on 20-Jun-2020

21 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Medical Cyber-Physical Systems

Electrophysiology basics

Lecture 10

Pr inc ip les of Model ing for Cyber-Phys ica l Systems

Instructor: Madhur Behl

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 1

Many thanks to:Zhihao Jiang,Houssam Abbas, andRahul Mangharam,

For help with preparing this module.

Why explore cardiac modeling?

Cardiac disease is the leading cause of death in the USAround the world, 17.5 million people die of Cardiovascular Diseases (CVD) yearly

That’s an estimated 31% of all deaths

More than 75% of CVD deaths occur in low income and middle income countries

Implanted devices are a leading method of treating some CVDs

2Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu

Why study cardiac devices?

These devices are life-critical à must function correctly

Are constrained in their energy consumption à must be low-power

Are implanted in the body à very special design considerations (e.g., materials used, must be ex-plantable…)

Are regulated by the FDA à must follow certain best practices, but also have some inertia

These are life-critical embedded systems

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 3

Its shocking! Cardiac devices can have bugs

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 4

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 5

Implantable Cardiac Devices Recalls

• Over 600,000 cardiac medical devices recalled from 1990-2000

– 40% of which were due to software issues

• 2008-12: 15% of all the medical device recalls due to software

Implantable Pacemaker Implantable Cardioverter-Defibrillator (ICD)Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 6

The consequences of incorrect algorithms and implementations

Filmed and shared with patient’s consent

7Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu

8

Closed-Loop Evaluation

Scenario 1

Scenario 2

Scenario 3

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu

Need a model of the heart which can capture the physiological conditions of the heart and respond to pacemaker outputs.

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 9

Model/implement the pacemaker

Check if pacemaker is ‘safe’ for different heart conditions

Let our heart (model) catch the bugs before your heart does

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 10

This Module

Will be challenging:

◦ New domain (electrophysiology)

◦ New tools (Simulink and UPPAAL)

◦ New theory (timed automata)

◦ New concepts (model checking)

Simulink

UPPAAL

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 11

How do we go about understanding the heart?

Understand the electrical system as a circuit?Understand the cellular activity? Understand the molecular activity?What does one heart tell us about other hearts?What does a healthy heart tell us about an unhealthy heart?What is a healthy heart?

What is the purpose of our enquiry?

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 12

Need to understand the domain.

Speak the same language as the domain experts.

Remember….modeling choices and ‘usefulness’ depend on the problem at hand.

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 13

Electrophysiology of the heart

aka ..talking like a cardiologist without attending med schoolPrinciples of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 14

First, let’s examine the human heart

Principles of Modeling for CPS – Fall 2018 15

Circulatory system and heart function

16

Vein: towards the heart.Artery: away from the heart

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu

Electrical generation and propagation

Right atrium

Right ventricle

Left atrium

Right ventricle

Sino-atrial (SA) node

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 17

Bradycardia: bradus (slow) + kardia (heart)

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 18

Two leads in heart chambers

19

Implantable Pacemaker

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu

Two leads are placed in the right atrium and right ventricleMonitors the local electrical activities of the heart and deliver therapy according to the timing information

Madhur Behl madhur.behl@virginia.edu

Implantable Pacemaker

Principles of Modeling for CPS – Fall 2018 20

21

Implantable Pacemaker

A

V

AS

VS

Pacemaker

Pace

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu

Sinoatrial Node“Automaticity”

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 22

RA

RV

LA

LV

+Depolarization-

Bachmann’s bundle

Atrioventricular Node[delay bw Atria & ventricles]

Bundle of His L posterior fascicle

L anteriorfascicle

R bundle

L bundlePurkinje fibers

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 23

Pacemaker cells (naturally pace the atria and ventricles)and

Cardiac myocytes cells (“squeezing” the heart)

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 24

Pacemaker cells – “Automaticity”

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 25

1) Sino-Atrial (SA) node

2) Atrioventricular (AV) node

3) Bundle of His / Purkinje fibers

Pacemaker cells

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 26

mV

(+123) Ca2+

(+67) Na+

(-92) K+ -60

Na+

time

threshold

Na+Ca2+

“Voltage-gated”

-40Na+

K+

+10

-60

Dep

olar

izat

ion

Repo

lari

zatio

n

1 beat

Race to keep pace !

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 27

mV

SA AV BoH

threshold

“Normal Sinus Rhythm”

Race to keep pace !

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 28

Heart Rate (beats/min) 1 beat (sec)SA 60-90 0.66 secAV 40-60 1 sec

BoH 20-30 2 sec

0.66 sec

1 sec

2 sec

Race to keep pace !

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 29

0.66 sec

1 sec

2 sec

Race to keep pace !

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 30

SA AV BoH2cm 1cm

How does SA node control the heart beat ?“Normal Sinus Rhythm”

?

Can this signal arrive before 1 sec ?

0.5 m/sec 2 m/sec

Conduction velocity is very fast !

0.04 sec

0.66 sec0.7 sec+0.1 sec

0.005 sec0.805 sec

0.66 sec

1 sec

2 sec

Race to keep pace !

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 31

• SA node – Plan A• AV node – Plan B• BoH – Plan C

0.66 sec

1 sec

2 sec

Pacemaker cells (naturally pace the atria and ventricles)and

Cardiac myocytes cells (“squeezing” the heart)

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 32

Cardiac Myocytes – How does the heart squeeze

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 33

mV

time

(+123) Ca2+

(+67) Na+

(-92) K+

K+

-90

Na+

Ca2+

Neighboring cell depolarizes

K+

Na+

-70

+20+5

K+

Ca2+-90

Action Potential - TissueThe elementary signal of the heart

It affects the conduction velocity and signal passage of the tissue.

Closely related to most cardiac diseases.

Madhur Behl madhur.behl@virginia.edu

APD: Action Potential Duration Functional syncytium

Principles of Modeling for CPS – Fall 2018 34

Cellular Level - Action potentialIons refill

Divided into Effective Refractory Period(ERP) and Relative Refractory Period(RRP) for activation with certain strength

Block Interval during ERP, abnormal new action potential during RRP

Madhur Behl madhur.behl@virginia.edu

Refractory

ERP RRP

Principles of Modeling for CPS – Fall 2018 35

Refractory

Time

V out

Rest ERP RRP Rest

Refractory

TimeV out

Rest ERP RRP Rest

node

pathnode

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 36

Treating bradycardiaWe want to detect when the atria or the ventricles miss a beat, and pace the chambers when that happens

Start small and simple:◦ We know that usually, the atria contract together, and the ventricles contract together à sense only in right

atrium and ventricles◦ Usually, depolarization is synchronous with contraction à measure the electrical activity as a proxy for the

mechanical activity◦ Usually, depolarization in part of the atrium (or ventricle) is

propagated to the rest of that chamber à measure only inone location of the chamber

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 37

Two leads are placed in the right atrium and right ventricleMonitors the local electrical activities of the heart and deliver therapy according to the timing information

Madhur Behl madhur.behl@virginia.edu

Implantable Pacemaker

Principles of Modeling for CPS – Fall 2018 38

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 39

Timing info for local activation

40

Implantable Pacemaker

A

V

AS

VS

Pacemaker

Pace

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu

• Simulink and State-flow tutorials have been posted on the course website. • Not graded. No submission required.

• One week to brush up on Simulink/Stateflow.• Go through the tutorials before the Simulink/Stateflow model walkthrough lecture next week

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 41

Next Lecture:

• Pacemaker operation and heart conditions•Model checking vs Model testing• Heart modeling using timed automata

Principles of Modeling for CPS – Fall 2018 Madhur Behl madhur.behl@virginia.edu 42

top related