MA 432  Tue/Thur 11.45 am - 1 pm

    Class-room: 1218 SAS Hall

    Instructor: Mette S Olufsen
    Office: SAS 3216
    Office Hours: By appointment via email.
    Phone Number: 515-2678
    Email address: msolufse@ncsu.edu


NOTES

    1.    Syllabus
    2.    About modeling (handout), (powerpoint)
    3.    Compartment models (Notes)
    4.    Euler example in matlab
    5.    Improved Euler method (Trapezoidal rule) in matlab
    6.    Euler example using Matlabs ODE solvers
    7.    Notes on Euler's method and RK methods
    8     Notes on ordinary differential equations
    9.    Text for chemostat model: Part 1, Part 2, Part 3, Problems
   10.    Phase plane analysis: Part1, Part2 (chemostat), Part 3
   11.   Text for chemostat part 2
   12.    Matlab code 2 ODEs
   13.    Population dynamics: Part 1, Problems
   14.    Disease models: SIR models, Problems, References
   15:    Base code SIR model
http://www4.ncsu.edu/%7Emsolufse/CVmodels.pdf
   16.    Curve fitting
   17.    The Nelder Mead method

   18.    Introduction to cardiovascular models (steady state) (pdf)

   19.    Cardiovascular models (steady state): notes and exercises
   20.    Cardiovascular models (time-varying Lec 1) (pdf)
   21.    Cardiovascular models (time-varying Lec 2) (pdf)
   22.    Time varying cardiovascular model: paper
   23.    Measurement of blood pressure
RawData
   24.    Measurement of blood pressure PreparedData
   25.    Neural models text, powerpoint (pdf), and Matlab code

HOMEWORK

Homework 1 (Due Thursday 1/16)
        1: From the modeling powerpoint presentation - do problems on slides 9, 12, 14, 16, 21
        2: In notes on compartment models complete problems 1.8 (2-4)
        3: Complete problem on cleaning the great lakes. For (c) set up the equations but you don't need to solve them.


Homework 2 (Due Thursday 1/23)
       1:  For the differential equation y' = y(1-y) with initial conditions y(0)=0.1. Let 0 < t <= 5.
            A:    Use Euler's method, the improved Euler method, the 2nd and 4th order Runge Kutta method. Compare results with those obtained using ode45.
            B:    Plot the absolute error and use plots to discuss the order of accuracy of the methods.
       2:  Solve the system of equations x' = y / 60 - 3 x /40 and y' = 3 x/40 - y/ 20, with initial conditions x(0)=1 and y(0)=0.
            Let 0 < t <= 100.
            A:    Plot x(t) and y(t).
            B:    Plot the absolute error as you reduce the step size h, discuss what happens to the error when you reduce h.

       3: Use Matlab's build in ODE solver ode45 to solve the same system of equations

Homework 3 (Due Tuesday 2/4)
         1: Use matlab to solve the chemostat model (see notes in 7 - above) with
             dN/dt = alpha1 C N / (1+C) - N
             dC/dt = - C N / (1+C) - C + alpha 2
             using appropriate parameter values and initial conditions.
             Show that the solution reaches the steady state value that we predicted in class.

         2: Do problems 8 and 10 in text for chemostat problems.

         3: For the chemostat model with
             dN/dt = alpha1 C N / (1+C) - N
             dC/dt = - C N / (1+C) - C + alpha 2
             In class we found nullclines for this model
             N-nullclines dN/dt = 0 are given by N = 0 and C = 1/(1-alpha1)
             C-nullclines dC/dt = 0 are given by N = (alpha2 - C) (1+C)/C
             Use analysis discussed in Note on "Phase plane analysis" given in 10 (above)
             to compute direction field along each of the 3 nullclines. Also for the two fixpoints, calculate the Jacobian
             needed to determine the stability of the fixpoints. Determine conditions for alpha1 and alpha2.

             You may use pplane8 to illustrate your solutions or you can use the online version, which can be found at: http://math.rice.edu/~dfield/dfpp.html.

        
        4:  Interpret what happens to the solution if we start the nutrient level N at zero versus at some small value epsilon. Support your solution with
             phaseportrait and your solution from matlab where you can plot N(t) and C(t).

Homework 4 (Due Thursday 2/13)
        1:  Population dynamics problems: 2, 7,12, 13
        2:  In Matlab try to reproduce the graph shown in Fig 6.3
        3:  SIR models problems: 25, 26 (Discuss the table and verify at least 3 results in the table), 30

Homework 5 (Due Thursday 2/27)
           Code: SIRSdata.m; SIRSsens.m; SIRSopt.m

              1: Derive sensitivity equations (on paper and input in code SIRSsens) and predict the following:
                        - classical sensitivities dx/dp (x is the variable, p the parameter)
                        - absolute sensitivities abs(dx/dp)
                        - relative sensitivities dx/dp p/x (note you cannot divide by zero, so if x=0 for any t you need to
                          think about how you get relative sensitivities that makes sense.
               2: The next couple of lines in the code involves generating ranked sensitivities.
                        - Overall what parameter is the solution the most sensitive to?
                        - Assuming you only have data for S, what parameter is S the most sensitive to?
                        - Assuming you only have data for I, what parameter is I the most sensitive to?
                        - Assuming you only have data for R, what parameter is R the most sensitive to?
               3: Change initial parameter values and initial conditions, how does that affect the sensitivities?
               4: Generate data (SIRSdata) without noise, with a medium level noise, and very noisy
               5: Use fminsearch (SIRSopt) to estimate optimal parameter values.
                        - Find initial parameter values and initial conditions, estimate parameters for all 3 data-sets gene
                           rated in 1, can you find the correct parameters for all datasets?
                           Repeat simulations with 2 different parameter sets, that are further away from the optimal values.
                        - Change the code so in addition to estimating parameters you also estimate initial conditions. Note
                           for this part of the problem you need to start with values away from the initial values used for
                           generating the data.

Homework 6 (Due Thursday 3/6)
            Use the harelynx data and modify codes from SIR model to estimate parameters for a population model predicting
            the competition between hare's and lynx. Use the same model you used in HW4 problem 2.

Homework 7 (Due Tuesday 3/18 - after spring break)
           1:  Solve equations displayed on Fig 1.6 for V, P, and Q as a function of parameters (R's, C's, and K's).
                The figure can be found in the pdf and notes on CV models.
           2:  Solve problems 1.2, 1.3, 1.4, 1.5, and 1.10 from the notes on CV models.
           3:  Show that the elastance function is smooth.

Homework 8 (Due Tue 4/8)
        1:  HW1 stated in lecture notes 2 on CV system [Notes 21.] (code)
        2:  HW2 stated in lecture notes 2 on CV system [Notes 21.] (code)
             Run code with your own data.
        3:  Discuss how the kind of model derived for the CV system can be used to gain knowledge of physiology or to design new and better diagnosis or treatment protocols.

Homework 9 (Due last day of class)
      1:  HWstated in lecture pdf on neural models  [Notes 25.]


PROJECT

Presentation 1
        1: Outline topic
        2: Problem formulation with questions
        3: Model diagram
        4: Discussion of how the model can answer the proposed questions

Presentation 2 (Thur 4/10)
       
1: Outline reduced problem and questions
        2: Show data to be used for the model
        3: Show updated model diagram
        4: Discuss model assumptions
        5: Show model equations
        6: Show initial computations

        Hand in outline for report - all sections should be named, and an introduction should be written.
        Discuss briefly what goes in each section.

Presentation 3 (Tue 4/22 - last day of class - expected extended class-time)

Reports and answer to individual questions due 4/29 at 9AM to be handed in - at my office SAS3216.
I need one report per group, and each student should email me the answer to his/her individual question.



ALL HOMEWORK REDO'S AND LATE RETURNS DUE TUE 3/13 (AFTER SPRING BREAK)

 

GRADES

    Homework 30%
    Cardiovascular homework 30%
    Project 40% (report, presentations, answer to individual question)

This page was last modified January 7th 2014.