Title: Modeling Biosystems
1Modeling Biosystems
- Mathematical models are tools that biomedical
engineers use to predict the behavior of the
system. - Three different states are modeled
- Steady-state behavior
- Behavior over a finite period of time
- Transient behavior
2Modeling Biosystems
- Modeling in BME needs an interdisciplinary
approach. - Electrical Engineering circuits and systems
imaging and image processing
instrumentation and measurements sensors. - Mechanical Engineering fluid and solid
mechanics heat transfer robotics and
automation thermodynamics. - Chemical Engineering transport phenomena
polymers and materials biotechnology drug
design pharmaceutical manufacturing - Medicine and biology biological concepts of
anatomy and physiology at the system, cellular,
and molecular levels.
3Modeling Biosystems
- A framework for modeling in BME
- Step one Identify the system to be analyzed.
- Step two Determine the extensive property to
be accounted for. - Step three Determine the time period to be
analyzed. - Step four Formulate a mathematical expression
of the conservation law.
4Modeling Biosystems
- Step one Identify the system to be analyzed
- SYSTEM Any region in space or quantity of
matter set side for analysis - ENVIRONMENT Everything not inside the system
- BOUNDARY An infinitesimally thin surface that
separates the system from its environment.
5Modeling Biosystems
- Step two Determine the extensive property to be
accounted for. - An extensive property doe not have a value at a
point - Its value depends on the size of the system
(e.g., proportional to the mass of the system) - The amount of extensive property can be
determined by summing the amount of extensive
property for each subsystem comprising the
system. - The value of an extensive property for a system
is a function of time (e.g., mass and volume) - Conserved property the property that can
neither be created nor destroyed (e.g. charge,
linear momentum, angular momentum) - Mass and energy are conserved under some
restrictions - The speed of the system ltlt the speed of light
- The time interval gt the time interval of quantum
mechanics - No nuclear reactions
6Modeling Biosystems
- Step three Determine the time period to be
analyzed. - Process A system undergoes a change in state
- The goal of engineering analysis predict the
behavior of a system, i.e., the path of states
when the system undergoes a specified process - Process classification based on the time
intervals involved - steady-state
- finite-time
- transient process
7Modeling Biosystems
- Step four Formulate a mathematical expression of
the conservation law. - The accumulation form (steady state or
finite-time processes) - The rate form (transient processes)
8Modeling Biosystems
- The accumulation form of conservation
- The time period is finite
-
- Mathematical expression algebraic or integral
equations - It is not always possible to determine the
amount of the property of interest entering or
exiting the system.
9Modeling Biosystems
- The rate form of conservation
- The time period is infinitesimally small
-
- Mathematical expression differential equations
10Modeling Biosystems
Example How to derive Nernst equation? Backgroun
d Nernst equation is used to describe resting
potential of a membrane
The flow of K due to (1) diffusion (2) drift in
an electrical field
11Modeling Biosystems
Example How to derive Nernst equation? Diffusion
Ficks law
- J flow due to diffusion
- D diffusive constant (m2/S)
- I the ion concentration
- the concentration gradient
12Modeling Biosystems
Example How to derive Nernst equation? Drift
Ohms law
- J flow due to drift
- ? mobility (m2/SV)
- I the ion concentration
- Z ionic valence
- v the voltage across the membrane
13Modeling Biosystems
Example How to derive Nernst equation? Einstein
relationship the relationship between
diffusivity and mobility
- K Boltzmanns constant (1.38x10-23J/K)
- T the absolute temperature in degrees Kelvin
- q the magnitude of the electric charge
(1.60186x10-19C)
14Modeling Biosystems
Example How to derive Nernst equation?
K
15Concepts of Numerical Analysis
- Errors absolution and relative (given a quantity
u and its approximation) - The absolute error u - v
- The relative error u v/u
- When u ?1, no much difference between two errors
- When ugtgt1, the relative error is a better
reflection of the difference between u and v.
16Concepts of Numerical Analysis
- Errors where do they come from?
- Model errors approximation of the real-world
- Measurement errors the errors in the input data
(Measurement system is never perfect!) - Numerical approximation errors approximate
formula is used in place of the actual function - Truncation errors sampling a continuous process
(interpolation, differentiation, and integration) - Convergence errors In iterative methods, finite
steps are used in place of infinitely many
iterations (optimization) - Roundoff errors Real numbers cannot be
represented exactly in computer!
17Concepts of Numerical Analysis
- Taylor series the key to connecting continuous
and discrete versions of a formula - The infinite Taylor series
- The finite Taylor formula
18Concepts of Numerical Analysis
- h10.(-200.50)
- dif_fsin(0.5h)-sin(0.5)./h numerical
derivative for sin(0.5) - deltaabs(dif_f-cos(0.5)) absolute errors
- loglog(h,delta,'-')
- hgt10-8, truncation errors dominate roundoff
errors - hlt10-8, roundoff errors dominate truncation
errors
19Concepts of Numerical Analysis
Floating point representation in computer
Not saved!
- IEEE 754 standard, used in MATLAB
- di 0 or 1
- 64 bits of storage (double precision)
- 1bit sign s 11 bits exponent (e) 52 bits
fraction (t) - A bias 1023 is added to e to represent both
negative and positive exponents. (e.g., a stored
value of 1023 indicates e0)
20Concepts of Numerical Analysis
Floating point representation in computer
- Overflow A number is too large to fit into the
floating-point system in use. FATAL! - Underflow The exponent is less than the
smallest possible (-1023 in IEEE 754). Nonfatal
sets the number to 0. - Machine precision (eps) 0.52(1-t)
21Concepts of Numerical Analysis
Floating point representation in computer
- How to avoid roundoff error accumulation and
cancellation error - If x and y have markedly different magnitudes,
then xy has a large absolute error - If yltlt1, then x/y has large relative and
absolute errors. The same is true for xy if
ygtgt1 - If x ?y, then x-y has a large relative error
(cancellation error)
22Concepts of Numerical Analysis
The ill-posed problem The problem is sensitive
to small error
Example Consider evaluating the integrals
n0,1,2,25
n1,2,3,25
23Concepts of Numerical Analysis
The ill-posed problem The problem is sensitive
to small error
yzeros(1,26) allocate memory for
y y(1)log(11)-log(10) y0 for
n226,y(n)1/(n-1)-10y(n-1)end plot(025,y)