System analysis: Introduction to examples

David Kneis (firstname.lastname @ tu-dresden.de)

Use of models in this course

Motivations 1

  • We aim at understanding typical system behaviours (interactions of state variables, steady states, etc.).

  • Models allow us to …

    • study arbitrary scenarios,
    • quickly and repeatedly,
    • at no cost,
    • without killing organisms or producing waste.

Motivations 2

  • Data from experiments / monitoring reflect many simultaneous processes. Such data are subject to “noise” (stochastic events, measurement errors).

  • Model help to disentangle the effects of individual processes.

Motivations 3

  • Models can be used in “forward mode” to predict future states and to study resilience.

  • Models help solving “inverse problems” concerned with the estimation of quantities (e.g. parameters) which cannot be observed directly.

Our approach to ODE modeling

Figure 1: Modeling workflow using the “rodeo” R package.

Towards more complex systems

  • So far, we studied “well-behaved” systems exposed to simple and constant boundary conditions.

  • For a particular set of parameters, those systems converged to a unique steady state solution.

  • Many real-world systems are more complex internally (more variables and interactions). They are also exposed to time-varying external forcings.

  • Such systems exhibit additional phenomena like, e.g., oscillations, multiple steady states, hysteresis…

Towards more complex systems

  • In subsequent lessons, we study the behaviour of particular systems of interest.

  • With regard to formal mathematical analysis, we will only scratch the surface.

  • All example models are provided as rodeo-compatible worksheets.

State space & attractors

State space (or phase space)

  • The current state of a system can be regarded as a point in the so-called state space (or phase space).

  • The number of dimensions of the state space equals the number of state variables.

  • Consider a bacterial culture in a continuous flow stirred tank reactor: The two dimensions are bacterial biomass and substrate concentration.

Attractors

  • We already looked at systems converging towards a steady state when external forcings remain constant. Such points in state space toward which a system tends to evolve are called attractors.

  • Attractors are like magnets. If the the initial state of a system is close enough to the attractor, future states are pulled toward that point (or shape) in state space.

  • The region around the attractor where the apparent magnetic force is noticeable is a basin of attraction.

Attractor plot for bioreactor

rm(list=ls())
library("rodeo")

# load bioreactor model (adjust path as necessary)
m <- buildFromWorkbook("models/Ecoli.xlsx")

# create initial states scenarios
set.seed(42)                         # reproducible results
n <- 25                              # number of scenarios
scen <- data.frame(                  # random points in state space
  Ecoli=10^runif(n, min=5, max=8),
  LB=10^runif(n, min=-4, max=-1)
)
scen <- apply(scen, 1, function(x){x}, simplify=F)  # save as list
names(scen) <- paste0("scen",1:length(scen))        # names needed

Attractor plot for bioreactor

print(head(scen))                             # list of scenarios
$scen1
       Ecoli           LB 
5.551600e+07 3.488473e-03 

$scen2
       Ecoli           LB 
6.474798e+07 1.481189e-03 

$scen3
       Ecoli           LB 
7.218029e+05 5.214521e-02 

$scen4
       Ecoli           LB 
3.099866e+07 2.192345e-03 

$scen5
       Ecoli           LB 
8.418536e+06 3.221164e-02 

$scen6
       Ecoli           LB 
3.608177e+06 1.632251e-02 

Attractor plot for bioreactor

x <- m$scenarios(times=seq(0, 72, 0.1),        # simulate all scenarios
  scenarios=scen, plot.vars=FALSE)

print(head(x))                                 # understand the output
  scenario time          LB    Ecoli flow  growth
1    scen1  0.0 0.003488473 55515995  0.1 2110934
2    scen1  0.1 0.002482544 55113824  0.1 1499568
3    scen1  0.2 0.002500904 54714633  0.1 1499566
4    scen1  0.3 0.002519351 54319415  0.1 1499563
5    scen1  0.4 0.002537884 53928122  0.1 1499560
6    scen1  0.5 0.002556502 53540736  0.1 1499558

Attractor plot for bioreactor

par(mfrow=c(1,2))

plot(Ecoli ~ LB, data=x, type="n", log="xy")   # empty plot
addSingleTrajectory <- function(x) {           # draws a trajectory
  points(x[1,"LB"], x[1,"Ecoli"], pch=20)
  points(x[nrow(x),"LB"], x[nrow(x),"Ecoli"], cex=2)
  lines(x[,"LB"], x[,"Ecoli"], col="grey")
}
by(x, x[,"scenario"], addSingleTrajectory)     # add all trajectories

plot(0, 0, type="n", axes=F, ann=F)            # add legend
legend("bottomleft", bty="n", pch=c(20, 1, NA), lty=c(NA, NA, 1),
  legend=c("Initial states","Steady state (attractor)","Trajectories")
)

par(mfrow=c(1,1))

Attractor plot for bioreactor

Types of attractors (selection)

  • Fixed point attractors: A particular point in state space (see example).

  • Limit cycles: A closed trajectory in state space. Other trajectories starting at closeby positions spiral into that closed tracectory as time passes. Usually connected to systems with stable oscillations.

Types of attractors (selection)

  • Strange attractors: If the attractor cannot be described by a simple geometric shape (e.g. a point, line, surface, or sphere), it is called “strange”.

  • Strange attractors are usually related to systems whose dynamics are hard to predict, because the solution is extremely sensitive to perturbations.

  • Strange attractors are linked to deterministic chaos.

  • A well-known example is the Lorenz attractor.

Recovery from perturbations