CS计算机代考程序代写 SWEN90004

SWEN90004
Modelling Complex Software Systems
Lecture Cx.02 Dynamical Systems and Chaos
Artem Polyvyanyy, Nic Geard
artem.polyvyanyy@unimelb.edu.au;
nicholas.geard@unimelb.edu.au
Semester 1, 2021
1 / 31

Overview
In this lecture, you will learn about:
􏰀 using mathematics to model a system’s behaviour
􏰀 two mathematical models of population growth (exponential and logistic)
􏰀 chaotic behaviour in (discrete) systems
2 / 31

Outline
Dynamical systems
Population growth
Chaos
3 / 31

Recap: what is a dynamical system?
􏰀 a set of possible states (the state space)
􏰀 time t (which we may treat as discrete or continuous)
􏰀 a rule that determines the state at the present time (xt) in
terms of states at earlier times (xt−1, xt−2, . . .)
For now, we will require this rule to be deterministic, so that the history of the system (it’s past state) uniquely determines the present state.
􏰀 also, an initial condition x0 : the state that the system is in when t = 0
4 / 31

Functions and iteration
A function takes a number as an input, does something to it, and produces a number as an output; eg,
f (x) = 3x
The function f takes x as an input, multiplies it by 3 and returns
the resulting value as an output
Iteration is simply using the output of the previous application of a function as the input for the next application:
x0,f(x0),f(f(x0)),f(f(f(x0))),… x0,x1,x2,x3,…,xt
What happens to the state of a system as time progresses?
5 / 31

Outline
Dynamical systems
Population growth
Chaos
6 / 31

Red foxes in Australia
Red foxes were introduced to Australia by settlers from England in the 1830s
They are now listed among the world’s 100 worst invasive species
http://en.wikipedia.org/wiki/Red_fox http://en.wikipedia.org/wiki/Australia
7 / 31

Red foxes in Australia
Red foxes are an apex predator: they predate on other species (like the bilbies and numbats), but no other species predate on them
FigureBilby FigureNumbat
http://www.murweh.qld.gov.au/bilby-night-talk-and-tour http://www.abc.net.au/news/2011-08-23/numbat-numbers-in-decline-feature/2851582
8 / 31

Red foxes in Australia
A female red fox reproduces once per year, producing around 4 kits (baby foxes)
To keep things simple, let’s make the following assumptions:
􏰀 the initial population contained 2 female red foxes 􏰀 a female red fox reproduces in its first year of life 􏰀 a female red fox only reproduces once in it’s life 􏰀 half of newborn kits are female
Therefore, the number of female red foxes will double each year: xt+1 = 2xt
where xt is the number of female red foxes alive in year t
9 / 31

Red foxes in Australia
Figurefunction plot Figuretime series plot
What is the general formula for xt?
xt = x02t
The exponential model is often stated as xt = x0rt, where r is a parameter that governs how steeply the curve rises
10 / 31

But…
This model for the growth of the red fox population in Australia predicts that there should be approximately 2 × 1055 red foxes by 2016!
What is missing?
Before we move on to a different model of population growth: in the
model above, we used r = 2. Think about what happens when:
􏰀r=1 􏰀r<1 11 / 31 Refining our model Clearly the unlimited growth predicted by the exponential model is unrealistic: the red foxes will eventually run out of food or space Next, we will consider a model with the additional (more realistic) assumptions that: 􏰀 when there are few red foxes, there will be plenty of food, and their numbers will grow rapidly 􏰀 when there are many red foxes, there won’t be enough food to go around, and their numbers will grow more slowly 12 / 31 The logistic model of population growth Pt+1 = rPt where Pt is the population size at time t Let us say that A is the population size at which the red foxes eat all available food, leading to starvation and zero red foxes next year 􏰊 Pt􏰋 Pt+1=rPt 1−A When P is close to A, there will be fewer red foxes in the next year When P is close to 0, there will be more red foxes in the next year Dividing through by A and letting x = P/A, we can rewrite this as xt+1 =rxt(1−xt) This is known as the logistic map 13 / 31 The logistic map The logistic map (based on a the continuous equation introduced in 1838 by Pierre François Verhulst) displays a diverse range of behaviours, depending on the value of the parameter r FigureThe logistic map for r = 1 xt+1 =rxt(1−xt) 􏰀 rxt corresponds to positive feedback 􏰀 (1 − xt ) corresponds to negative feedback 14 / 31 The logistic map r = 0.9 15 / 31 The logistic map r = 1.5 16 / 31 The logistic map r = 1.5 17 / 31 The logistic map r = 3.2 18 / 31 The logistic map r = 3.52 19 / 31 The logistic map r = 3.56 20 / 31 The logistic map r = 3.84 21 / 31 The logistic map r = 4.0 22 / 31 Outline Dynamical systems Population growth Chaos 23 / 31 A definition of chaos A system is chaotic if it displays all of the following four properties: 􏰀 The dynamical update rule is deterministic 􏰀 The system behaviour is aperiodic 􏰀 The system behaviour is bounded 􏰀 The system displays sensitivity to initial conditions 24 / 31 The butterfly effect Coined by Edward Lorenz while working on a mathematical model of weather: he observed that his model’s behaviour could produce wildly different outputs with only very small modifications to input data: Two states differing by imperceptible amounts may eventually evolve into two considerably different states . . . If, then, there is any error whatever in observing the present state—and in any real system such errors seem inevitable—an acceptable predic- tion of an instantaneous state in the distant future may well be impossible . . . In view of the inevitable inaccuracy and in- completeness of weather observations, precise very-long-range forecasting would seem to be nonexistent. Lorenz (1963) Deterministic nonperiodic flow, Journal of Atmospheric Sciences 20: 130–141 25 / 31 The butterfly effect 26 / 31 Sensitive dependence on initial conditions FigureTwo trajectories beginning at x = 0.05 (red) and x = 0.0501 (black) 27 / 31 Bifurcation diagrams FigurePoints on attractors of the logistic map for various values of r Feldman (2012) Chaos and Fractals: An Elementary Introduction, Oxford University Press 28 / 31 Bifuraction diagrams FigureThe bifurcation diagram for the logistic map, r in [2.4, 4.0] http://en.wikipedia.org/wiki/Bifurcation_diagram 29 / 31 Summary 􏰀 To model a dynamical system, we define: 􏰀 our system variables and the states they can take 􏰀 the function that computes the next state 􏰀 This will usually involve simplifying assumptions about the real world 􏰀 important to record these 􏰀 When exploring the behaviour of our model, we need to evaluate it against what we know about the real system 􏰀 This may result in us refining our model 􏰀 Dynamical systems have several different types of characteristic behaviours 􏰀 fixed points 􏰀 limit cycles 􏰀 aperiodic orbits 􏰀 The dynamic behaviour that a system exhibits can depend critically on the values of system parameters 30 / 31 Further reading (both books available online through UniMelb library) For a gentle introduction: 􏰀 David P. Feldman, Chaos and Fractals: An Elementary Introduction, Section I on dynamical systems and Section II (parts 9-11) on chaos For a more mathematically rigorous treatment: 􏰀 Nino Boccara, Modeling Complex Systems, chapters 4 and 5 Video lectures – Introduction to Dynamical Systems and Chaos (Santa Fe Institute): 􏰀 http://www.complexityexplorer.org/courses/22-introduction- to-dynamical-systems-and-chaos-winter-2015/ 31 / 31