ece602 bme i ordinary differential equations in biomedical engineering

10
ECE602 BME I Ordinary Differential Equations in Biomedical Engineering

Post on 20-Dec-2015

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: ECE602 BME I Ordinary Differential Equations in Biomedical Engineering

ECE602 BME I

Ordinary Differential Equations in Biomedical Engineering

Page 2: ECE602 BME I Ordinary Differential Equations in Biomedical Engineering

Classification of ODEs Canonical Form of ODE Linear ODEs Nonlinear ODEs Steady-State Solutions and Stability Analysis BME Example 1- The dynamics of Drug

Absorption BME example 2 – Hodgkin-Huxley Model for

Dynamics of Nerve Cell Potentials

Page 3: ECE602 BME I Ordinary Differential Equations in Biomedical Engineering

Classification of ODEs

General Form of ODE

)()()(...)()( 011

1

1 tRytbdt

dytb

dt

ydtb

dt

ydtb

n

n

nn

n

n

• The order of an ODE: the order of the highest derivative

• R(t)=0: Homogeneous; R(t)0: Nonhomogeneous

• Nonlinear: an ODE contains powers of the dependent variable, powers of the derivatives, or products of the dependent variable with the derivatives

Page 4: ECE602 BME I Ordinary Differential Equations in Biomedical Engineering

Classification of ODEs

Examples

0 ydt

dyFirst-order, linear, homogeneous

ktydt

dy First-order, linear, nonhomogeneous

ktydt

dy 2 First-order, nonlinear, nonhomogeneous

teydt

dy

dt

yd

2

2

Second-order, linear, nonhomogeneous

)cos(2

2

tydt

dy

dt

ydy Second-order, nonlinear, nonhomogeneous

)sin()(2 22

2

3

3

tydt

dy

dt

yd

dt

yd Third-order, nonlinear, nonhomogeneous

Page 5: ECE602 BME I Ordinary Differential Equations in Biomedical Engineering

Canonical Form of ODEs

Canonical form

• A set of n simultaneous first-order ODEs

• Required for methods for integrating ODEs

0,021

0,2022122

0,1012111

)( ),,,(

)( ),,,(

)( ),,,(

nnnnn

n

n

ytyyyytfdt

dy

ytyyyytfdt

dy

ytyyyytfdt

dy

00 )( ),( yyyfy

ttdt

d

Vector format

Page 6: ECE602 BME I Ordinary Differential Equations in Biomedical Engineering

Canonical Form of ODEs

Transformation to Canonical form

),...,,,,(1

1

2

2

n

n

n

n

dt

zd

dt

zd

dt

dzztG

dt

zddt

dy

dt

zd

ydt

dy

dt

zd

ydt

dy

dt

zd

ydt

dy

dt

dz

yz

nn

n

nn

n

n

1

1

1

32

2

2

21

1

.

.

.

),...,,(

.

.

.

21

32

21

nn yyytGdt

dy

ydt

dy

ydt

dy

Page 7: ECE602 BME I Ordinary Differential Equations in Biomedical Engineering

Linear ODEs

0)0(

'

yy

Ayy

0yy Ate

...!3!2

3322

tt

te t AAAIA

Matrix Exponential Method

Page 8: ECE602 BME I Ordinary Differential Equations in Biomedical Engineering

Linear ODEs

EXPM Matrix exponential. EXPM(A) is the matrix exponential of A.

>> syms t>> >> A=[1 1;-1 1]; y0=[1;1];>> y=expm(A*t)*y0y = exp(t)*cos(t)+exp(t)*sin(t) -exp(t)*sin(t)+exp(t)*cos(t)

Page 9: ECE602 BME I Ordinary Differential Equations in Biomedical Engineering

Linear ODEs

0)0(

'

yy

Ayy

Method using eigenvalues and eigenvectors

01][ yXXy Λ te

XΛAX

Eigenvector matrix Eigenvalue matrix

Page 10: ECE602 BME I Ordinary Differential Equations in Biomedical Engineering

Linear ODEs

EIG Eigenvalues and eigenvectors. [X,D] = EIG(A) produces a diagonal matrix D of eigenvalues and a full matrix X whose columns are the corresponding eigenvectors so that A*X = X*D.

>> syms t>> A=[1 1;-1 1]; y0=[1;1];>> [X,D]=eig(A);>> y=(X*expm(D*t)*inv(X))*y0 y = exp(t)*cos(t)-1/2*i*(exp(t)*cos(t)+i*exp(t)*sin(t))+1/2*i*(exp(t)*cos(t)-i*exp(t)*sin(t)) 1/2*i*(exp(t)*cos(t)+i*exp(t)*sin(t))-1/2*i*(exp(t)*cos(t)-i*exp(t)*sin(t))+exp(t)*cos(t)

>> y=simplify(y) y = exp(t)*(cos(t)+sin(t)) exp(t)*(-sin(t)+cos(t))