modelling

Mathematical modelling and problem solving

Dynamic models

In this module we will investigate some simple dynamic models and their behaviour. The most basic thing you can do with a dynamic model is to simulate it. Other important issues concern the possible existence of stable states and other properties. It is sometimes to find an analytic solution.

  1. (WHALES AND KRILL PROBLEM)

    Here we will investigate the population dynamics of whales and krill, where krill is assumed to be the main source of food for the whales. We assume the following model:
    k' = (a-bw) k
    w' = (-m+nk) w
    where k is the krill population (as a function of the time in years), w is the whale population, and a, b, m and n are positive constants.

    1. Interpret this system of differential equations and suggest the meaning of the constants. (HINT: it can be difficult to give precise meanings to the constants. but look at the terms and try to interpret them in terms of what they model in reality.)

    2. Determine if there are any equilibrium points of this system. If so, can you say anything about the stability of these points?

    3. Write the equations for simulating this system with Eulers method. Consider the parameter values a=0.2, b=0.0001, m=0.5 , n=0.000001. With the starting points k(0)= 700000 and w(0)=3000, and time step deltaT= 0.3 years, manually simulate k(t) and w(t) for t=0.3 and t=0.6.

    4. Use the parameters given in c) and use Mathematica to simulate the model from several different starting points. To get interesting results do not just pick arbitrary starting points, but be systematic and think how they relate to the result in b). Discuss your observations. Can you draw general conclusions not dependent on this particular choice of values? You can use the Mathematica function NDSolve for the simulation of k(t) and w(t). You are recommended to first plot and study the two functions k(t) and w(t) (with the function Plot), before you plot with the function ParametricPlot.

      Here is some Mathematica code to help you get started:

        a=0.2
        b=0.0001
        m=0.5
        n=0.000001
        s=NDSolve[{k'[t]==(a-b*w[t])k[t],w'[t]==(-m+n*k[t])w[t],
        k[0]==70000,w[0]==3000},{k,w},{t,1000}]
        Plot[Evaluate[{k[t]}/.s],{t,0,100}]
        Plot[Evaluate[{w[t]}/.s],{t,0,100},PlotRange->All]
        ParametricPlot[Evaluate[{k[t],w[t]}/.s],{t,0,100},AspectRatio->1,PlotRange->All]
      

    5. Investigate the effect of krill fishing on these populations. To model this, we add a term -rk to the equation for k', where r<a. Interpret this term. Try out different values of r, simulate and discuss your observations.

    6. Can you suggest how the model could be refined or extended?

  2. (SIGNAL PROCESSING PROBLEM)

    A digital signal processing component has been defined by the following linear difference equation:
    y(n)=0.098 x(n)+0.195 x(n-1)+0.098 x(n-2)+0.942 y(n-1)-0.333 y(n-2)
    Here x(n) is the input signal, and y(n) is the output. The component is intended for audio processing. Test it by inputting a step function and sine waves of different frequencies 0-4000 Hz, assuming a signal sampling rate of 8000 Hz. This means that the signal is measured 8000 times a second, which is adequate for frequencies up to 4000 Hz. Describe your observations. What could be the purpose of such a component? How would it sound if you talked into such an equation?

    To help, use this Mathematica file (pdf version, txt version. If using the online version of Mathematica, copy and paste from the txt version of the file.).Make sure you go through and understand the definitions in the file!

    Explanation of the sampling to discrete time

    A sine wave with frequency f can be described by the function sin(2π f t), where t is the time in seconds. If we sample this function with a sampling rate s (s times per second), we can discretize the time as t = n/s, where n=0,1,2, … is an integer representing the index of the sample. If the sampling rate is s=8000 Hz, n=8000 corresponds to the time 1 second. The expression for a sine wave with frequency f then becomes sin(2π f n/s) (or equivalently sin(π f n/4000), which is what we wrote in the old version of the Mathematica file).

  3. (DRUG DOSAGE PROBLEM)

    A drug company wants to know how to calculate a suitable dose and time between doses to maintain a safe but effective concentration of a drug in the blood. To be simple for the users of the drug, only a fixed dose at regular time intervals is considered possible. Suggest a way to model the problem, determine the main issues involved, and work out a solution. The answer should be a formula or algorithm for computing the dose and time interval.

    It is up to you to make the problem formulation precise, to determine what additional input data you might need, to make necessary reasonable assumptions and simplifications, and to decide how to organize your work in suitable subtasks. Hint: Do not try to solve the entire problem in one step. First create the simplest model, then gradually add more features.

  4. (SOCRATIC QUESTIONING)

    In this course an important method of supervision has been to ask questions, and often you have then been able to answer these questions by yourself. Now temporarily place yourself in the role of the supervisor, and suggest one or a few good supervision questions in each of the following student situations:

    1. We have looked at this table for a while, but we haven't learned any method to find a curve for such tables (planets, can be solved without knowing about the least square method).
    2. We tried with the log function, and think it is about right but maybe not perfect. Is that the answer? (planets again)
    3. We don't know anything about economics, so we are stuck. (chocolate factory problem)
    4. This question is very unclear. What are we supposed to do? What do you expect us to write? (any problem)

  5. SELF-CHECK