Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modeling Biosystems Mathematical models are tools that biomedical engineers use to predict the behavior of the system. Three different states are modeled.

Similar presentations


Presentation on theme: "Modeling Biosystems Mathematical models are tools that biomedical engineers use to predict the behavior of the system. Three different states are modeled."— Presentation transcript:

1 Modeling 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

2 Modeling 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.

3 Modeling 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.

4 Modeling 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.

5 Modeling 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 << the speed of light The time interval > the time interval of quantum mechanics No nuclear reactions

6 Modeling 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

7 Modeling 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)

8 Modeling Biosystems The accumulation form of conservation The time period is finite Net amount generated Inside the system Net amount Accumulated Inside the system Net amount transported Into the system =+ 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.

9 Modeling Biosystems The rate form of conservation The time period is infinitesimally small Generation rate Into the system at t Rate of change inside the system at t Transport rate into the system at t =+ Mathematical expression: differential equations

10 Modeling Biosystems Example: How to derive Nernst equation? Background: 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

11 Modeling Biosystems Example: How to derive Nernst equation? Diffusion: Fick’s law J: flow due to diffusion D: diffusive constant (m 2 /S) I: the ion concentration : the concentration gradient

12 Modeling Biosystems Example: How to derive Nernst equation? Drift: Ohm’s law J: flow due to drift  : mobility (m 2 /SV) I: the ion concentration Z : ionic valence v: the voltage across the membrane

13 Modeling Biosystems Example: How to derive Nernst equation? Einstein relationship: the relationship between diffusivity and mobility K: Boltzmann’s constant (1.38x10 -23 J/K) T : the absolute temperature in degrees Kelvin q: the magnitude of the electric charge (1.60186x10 -19 C)

14 Modeling Biosystems Example: How to derive Nernst equation? K+K+

15 Concepts 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 |u|>>1, the relative error is a better reflection of the difference between u and v.

16 Concepts 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!

17 Concepts of Numerical Analysis Taylor series: the key to connecting continuous and discrete versions of a formula The infinite Taylor series The finite Taylor formula

18 Concepts of Numerical Analysis h=10.^(-20:0.5:0); dif_f=[sin(0.5+h)-sin(0.5)]./h; % numerical derivative for sin(0.5) delta=abs(dif_f-cos(0.5)); % absolute errors loglog(h,delta,'-*') h>10 -8, truncation errors dominate roundoff errors h<10-8, roundoff errors dominate truncation errors

19 Concepts of Numerical Analysis Floating point representation in computer IEEE 754 standard, used in MATLAB d i = 0 or 1 64 bits of storage (double precision) s; 11 bits: exponent (e); 52 bits: fraction (t) 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 e=0) A bias 1023 is added to e to represent both negative and positive exponents. (e.g., a stored value of 1023 indicates e=0) Not saved!

20 Concepts of Numerical Analysis Floating point representation in computer Overflow: FATAL Overflow: A number is too large to fit into the floating-point system in use. FATAL! Underflow Underflow: The exponent is less than the smallest possible (- 1023 in IEEE 754). Nonfatal: sets the number to 0. Machine precision (eps): 0.5*2^(1-t)

21 Concepts 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 x+y has a large absolute error If |y| >1 If x  y, then x-y has a large relative error (cancellation error)

22 Concepts of Numerical Analysis The ill-posed problem: The problem is sensitive to small error Example: Consider evaluating the integrals n=0,1,2,…25 n=1,2,3,…25

23 Concepts of Numerical Analysis The ill-posed problem: The problem is sensitive to small error y=zeros(1,26); %allocate memory for y y(1)=log(11)-log(10); %y0 for n=2:26,y(n)=1/(n-1)-10*y(n-1);end plot(0:25,y)


Download ppt "Modeling Biosystems Mathematical models are tools that biomedical engineers use to predict the behavior of the system. Three different states are modeled."

Similar presentations


Ads by Google