550 likes | 808 Views
CEE162 Lecture 2: Nonlinear ODEs and phase diagrams; predator-prey. Overview. Nonlinear chaotic ODEs: the damped nonlinear forced pendulum 2 nd Order damped harmonic oscillator Systems of ODEs Phase diagrams Fixed points Isoclines/Nullclines Predator-prey model
E N D
CEE162 Lecture 2: Nonlinear ODEs and phase diagrams; predator-prey Overview • Nonlinear chaotic ODEs: the damped nonlinear forced pendulum • 2nd Order damped harmonic oscillator • Systems of ODEs • Phase diagrams • Fixed points • Isoclines/Nullclines • Predator-prey model References: Dym, Ch 7; Mooney & Swift, Ch 5.2-5.3; Kreyszig, Ch 4 CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Forced pendulum Frictional effect m m g CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Free-body diagram CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Derivation of the governing ODE CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
m CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Reduce and nondimensionalize! CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Governing nondimensional ODE CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Linearize CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
The damped harmonic oscillator CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
The particular solution CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Simulating the nonlinear system pendulum.zip CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Phase plane analysis CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Direction field for a1=0.5 phasedirection.m CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams 24
Computing phase lines analytically Solution in phase space Elliptic Integral! CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Analytical Phase Lines for CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Nullclines and fixed points CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Plotting nullclines and fixed points q=0 (no acceleration) increasing friction p=0 (no velocity) Fixed points CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
where the point is a fixed point corresponding to Behavior in the vicinity of fixed points Suppose we have a nonlinear coupled set of ODEs in the form We can determine the behavior of this ODE in the vicinity of the fixed points by analyzing the behavior of disturbances applied to the fixed points such that CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Using the Taylor series expansion about the fixed point, we have Substitution into the ODEs gives Since the fixed points satisfy CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
and , then the perturbations satisfy In vector form, this is given by The Jacobian matrix is given by CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
The behavior of the solution in the phase plane in the vicinity of the fixed points is determined by the behavior of the eigenvalues of the Jacobian. If then the eigenvalues of J are given by CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
complex pair, negative real part. two real negative roots. CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
complex pair, positive real part. two real positive roots. pure imaginary. CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Phase plane analysis for the pendulum CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Underdamped Critical or overdamped CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Spiral direction CW or CCW? Clockwise c<0 Counter- clockwise c>0 CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Behavior around saddle point CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
The predator-prey problem Overview • Lotka-Volterra predator-prey model • Phase-plane analysis • Analytical solutions • Numerical solutions References: Mooney & Swift, Ch 5.2-5.3; CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Compartmental Analysis • Tool to graphically set up an ODE-based model • Example: Population Immigration: ix Emigration: ex Population: x Births: bx Deaths: dx CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Logistic equation Population: x Can flow both directions but the direction shown is defined as positive CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Income class model Lower x Middle y Upper z CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
For a system the fixed points are given by the Null space of the matrix A. For the income class model: CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Classical Predator-Prey Model cxy bxy Predator y Prey x ax dy Growth in absence of predators Die-off in absence of prey Lotka-Volterra predator-prey equations CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Assumptions about the interaction term xy • xy = interaction; bxy: b = likelihood that it results in a prey death; cxy: c = likelihood that it leads to predator success. An "interaction" results when prey moves into predator territory. • Animals reside in a fixed region (an infinite region would not affect number of interactions). • Predators never become satiated. CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Phase-plane analysis CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Analytical solution CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Solution with Matlab lvdemo.m % Initial condition is a low predator population with % a fixed-point prey population. X0 = [x0,.25*y0]'; % Decrease the relative tolerance opts = odeset('reltol',1e-4); [t,X]=ode23(@pprey,[0 tmax],X0,opts); pprey.m function Xdot = pprey(t,X) % Constants are set in lvdemo.m (the calling function) global a b c d % Must return a column vector Xdot = zeros(2,1); % dx/dt=Xdot(1), dy/dt=Xdot(2) Xdot(1) = a*X(1)-b*X(1)*X(2); Xdot(2) = c*X(1)*X(2)-d*X(2); CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
at t=0, x=20 y=19.25 CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams
Nonlinear Linear CEE162/262c Lecture 2: Nonlinear ODEs and phase diagrams