# Difference between revisions of "Predator prey"

(→Discrete Time Model) |
|||

Line 13: | Line 13: | ||

|- valign=top | |- valign=top | ||

| colspan=5 align=left | | | colspan=5 align=left | | ||

− | '''Figure | + | '''Figure {{fig:modeling:lynxhare}}:''' Predator versus prey. The photograph on the left shows a Canadian lynx and a snowshoe hare, the lynx’s primary prey. The graph on the right shows the populations of hares and lynxes between 1845 and 1935 in a section of the Canadian Rockies (MacLuluch, 1937). The data were collected on an annual basis over a period of 90 years. (Photograph copyright Tom and Pat Leeson.) |

|} | |} | ||

Line 69: | Line 69: | ||

==== Continuous Time Model ==== | ==== Continuous Time Model ==== | ||

+ | |||

+ | We now replace the difference equation model | ||

+ | used there with a more sophisticated differential equation model. Let <amsmath>H(t)</amsmath> | ||

+ | represent the number of hares (prey) and let <amsmath>L(t)</amsmath> represent the number of | ||

+ | lynxes (predator). The dynamics of the system are modeled as | ||

+ | {| width=100% | ||

+ | |- align=middle | ||

+ | | align=center | | ||

+ | <amsmath> | ||

+ | \aligned | ||

+ | \frac{dH}{dt} &= r H \left(1 - \frac{H}{k}\right) - | ||

+ | \frac{a H L}{c + H}, \qquad H \geq 0, \\ | ||

+ | \frac{dL}{dt} &= b \frac{a H L}{c + H} - d L, \qquad L \geq 0. \\ | ||

+ | \endaligned | ||

+ | </amsmath> | ||

+ | | (3.31) | ||

+ | |} | ||

+ | In the first equation, <amsmath>r</amsmath> represents the growth rate of the hares, | ||

+ | <amsmath>k</amsmath> represents the maximum population of the hares (in the absence of | ||

+ | lynxes),\index{carrying capacity, in population models} <amsmath>a</amsmath> represents | ||

+ | the interaction term that describes how the | ||

+ | hares are diminished as a function of the lynx population and <amsmath>c</amsmath> | ||

+ | controls the prey consumption rate for low hare population. In the | ||

+ | second equation, <amsmath>b</amsmath> represents the growth coefficient of the lynxes | ||

+ | and <amsmath>d</amsmath> represents the mortality rate of the lynxes. | ||

+ | Note that the hare dynamics include a term that resembles the | ||

+ | logistic growth model {{eq:popdyn:logisticgrowth}}. | ||

+ | |||

+ | Of particular interest are the values at which the population values | ||

+ | remain constant, called ''equilibrium points''. | ||

+ | The equilibrium points for this system can be determined by setting | ||

+ | the right-hand side of the above equations to zero. Letting <amsmath>H_e</amsmath> and | ||

+ | <amsmath>L_e</amsmath> represent the equilibrium state, from the second equation we | ||

+ | have | ||

+ | {| width=100% | ||

+ | |- align=middle | ||

+ | | align=center | | ||

+ | <amsmath> | ||

+ | L_e = 0 \quad\text{or}\quad H^*_e = \frac{cd}{ab - d}. | ||

+ | </amsmath> | ||

+ | | align=right | {{eq:predprey:hareequil}} | ||

+ | </amsmath> | ||

+ | |} | ||

+ | Substituting this into the first equation, we have that for <amsmath>L_e = 0</amsmath> | ||

+ | either <amsmath>H_e = 0</amsmath> or <amsmath>H_e = k</amsmath>. For <amsmath>L_e \neq 0</amsmath>, we obtain | ||

+ | {| width=100% | ||

+ | |- align=middle | ||

+ | | align=center | | ||

+ | <amsmath> | ||

+ | L^*_e = \frac{r H_e (c + H_e)}{a H_e} \Bigl(1 - \frac{H_e}{k} \Bigr) | ||

+ | = \frac{b c r (a b k - cd - dk)}{(ab - d)^2 k}. | ||

+ | </amsmath> | ||

+ | | align=right | {{eq:predprey:lynxequil}} | ||

+ | |} | ||

+ | Thus, we have three possible equilibrium points <amsmath>x_e = (L_e, H_e)</amsmath>: | ||

+ | <center><amsmath> | ||

+ | x_e = \begin{bmatrix} 0 \\ 0 \end{bmatrix}, \qquad | ||

+ | x_e = \begin{bmatrix} k \\ 0 \end{bmatrix}, \qquad | ||

+ | x_e = \begin{bmatrix} H_e^* \\ L_e^* \end{bmatrix}, | ||

+ | </amsmath></center> | ||

+ | where <amsmath>H_e^*</amsmath> and <amsmath>L_e^*</amsmath> are given in | ||

+ | equations {{eq:predprey:hareequil}} | ||

+ | and {{eq:predprey:lynxequil}}. Note that the equilibrium | ||

+ | populations may be negative for some parameter values, corresponding to a | ||

+ | nonachievable equilibrium point. | ||

+ | |||

+ | Figure {{fig:examples:predpreysim}} shows a simulation of the | ||

+ | dynamics starting from a set of population values near the nonzero | ||

+ | equilibrium values. | ||

+ | {| width=100% | ||

+ | |- valign=middle | ||

+ | | [[Image:predprey-sim.png]] | ||

+ | | | ||

+ | | [[Image:predprey-pp.png]] | ||

+ | |- valign=top | ||

+ | | colspan=3 | | ||

+ | '''Figure {{fig:examples:predpreysim}}:''' | ||

+ | Simulation of the predator--prey system. The figure on the left | ||

+ | shows a simulation of the two populations as a function of time. | ||

+ | The figure on the right shows the populations plotted against | ||

+ | each other, starting from different values of the population. | ||

+ | The oscillation seen in both figures is an example of a ''limit cycle''. The parameter values used for the simulations are | ||

+ | <amsmath>a = 3.2</amsmath>, <amsmath>b = 0.6</amsmath>, | ||

+ | <amsmath>c = 50</amsmath>, <amsmath>d = 0.56</amsmath>, | ||

+ | <amsmath>k = 125</amsmath> and <amsmath>r = 1.6</amsmath>.} | ||

+ | |} | ||

+ | We see that for this choice of parameters, the simulation predicts an | ||

+ | oscillatory population count for each species, reminiscent of the data | ||

+ | shown in Figure {{fig:modeling:lynxhare}}. |

## Revision as of 16:31, 21 October 2012

This page contains a description predator prey model that is used as a running example throughout the text. A detailed description of the dynamics of this system is presented in Chapter 3 - Examples and these dynamics are analyzed in Chapter 4 - Dynamic Behavior. A state space feedback controller is designed in Chapter 6 - State Feedback. This page brings together this material into a single place, to illustrate the application of analysis and design tools for this system. Links to MATLAB scripts are included that generate the analysis and figures described here.

### System Description

The predator-prey problem refers to an ecological system in which we have two species, one of which feeds on the other. This type of system has been studied for decades and is known to exhibit interesting dynamics. The figure below shows a historical record taken over 90 years for a population of lynxes versus a population of hares (MacLulich, 1937).

#### Discrete Time Model

A simple model for this situation can be constructed using a discrete-time model by keeping track of the rate of births and deaths of each species. Letting represent the population of hares and represent the population of lynxes, we can describe the state in terms of the populations at discrete periods of time. Letting be the discrete-time index (e.g., the day or month number), we can write

(2.13) |

where is the hare birth rate per unit period and as a function of the food supply , is the lynx mortality rate and and are the interaction coefficients. The interaction term models the rate of predation, which is assumed to be proportional to the rate at which predators and prey meet and is hence given by the product of the population sizes. The interaction term in the lynx dynamics has a similar form and represents the rate of growth of the lynx population. This model makes many simplifying assumptions -- such as the fact that hares decrease in number only through predation by lynxes -- but it often is sufficient to answer basic questions about the system.

To illustrate the use of this system, we can compute the number of lynxes and hares at each time point from some initial population. This is done by starting with and then using equation (2.13) to compute the populations in the following period. By iterating this procedure, we can generate the population over time. The output of this process for a specific choice of parameters and initial conditions is shown below:

Using the parameters , and in equation~\eqref{eq:modeling:predprey} with daily updates, the period and magnitude of the lynx and hare population cycles approximately match the data in Figure 2.4. While the details of the simulation are different from the experimental data (to be expected given the simplicity of our assumptions), we see qualitatively similar trends and hence we can use the model to help explore the dynamics of the system.

#### Continuous Time Model

We now replace the difference equation model used there with a more sophisticated differential equation model. Let represent the number of hares (prey) and let represent the number of lynxes (predator). The dynamics of the system are modeled as

(3.31) |

In the first equation, represents the growth rate of the hares, represents the maximum population of the hares (in the absence of lynxes),\index{carrying capacity, in population models} represents the interaction term that describes how the hares are diminished as a function of the lynx population and controls the prey consumption rate for low hare population. In the second equation, represents the growth coefficient of the lynxes and represents the mortality rate of the lynxes. Note that the hare dynamics include a term that resembles the logistic growth model (3.30) in Chapter 3 - Examples.

Of particular interest are the values at which the population values
remain constant, called *equilibrium points*.
The equilibrium points for this system can be determined by setting
the right-hand side of the above equations to zero. Letting and
represent the equilibrium state, from the second equation we
have

(3.32)
</amsmath> |

Substituting this into the first equation, we have that for either or . For , we obtain

(3.33) |

Thus, we have three possible equilibrium points :

where and are given in equations (3.32) and (3.33). Note that the equilibrium populations may be negative for some parameter values, corresponding to a nonachievable equilibrium point.

Figure 3.20 shows a simulation of the dynamics starting from a set of population values near the nonzero equilibrium values.

We see that for this choice of parameters, the simulation predicts an oscillatory population count for each species, reminiscent of the data shown in Figure 2.6.