Modeling with ODEs in Matlab – Part 5B

And so we reach the end. We will wrap up this series with a look at the fascinating Lorenz Attractor. Like the logistic map of the previous lesson, the Lorenz Attractor has the structure and behavior of a complex system. Unlike the logistic map, the Lorenz Attractor is defined by a system of first order autonomous ordinary differential equations. Thus, it is a perfect example to use for this last lesson where we examine the importance of error tolerance in evaluation chaotic systems of ODEs.
Continue reading

Bookmark and Share

Modeling with ODEs in Matlab – Part 5A

We are going to wrap up this tutorial series with a fun exploration of complex systems. Complex systems behave in unpredictable ways. This often makes it difficult to design and use models to examine their behavior. In this lesson we will look at some hallmarks of complex systems and examine a canonical example. Finally, in the next installment we will look at how differential equation models of complex systems can be difficult to examine using numerical solutions.
Continue reading

Bookmark and Share

Modeling with ODEs in Matlab – Part 4B

Welcome to Modeling with ODEs in Matlab – Part 4B! The previous post, Part 4A, introduced the idea of fitting ODE coefficients to empirical data. We saw that proper use of the nlinfit function combined with ode45 or ode15s allows us to fit a model to data when given a good initial estimate of the parameter values. Unfortunately, this approach does not work as well if the initial guess is not within the basin of attraction of the best fit. Today we will look at a new approach to function optimization: Genetic Algorithms (GAs). Genetic Algorithms are part of a search family I like to call “intelligent randomized search”, which also includes techniques such as Simulated Annealing and Particle Swarm Optimization.
Continue reading

Bookmark and Share

Modeling with ODEs in Matlab – Part 4A

It’s finally time for Part 4! Now that we know how to design and numerically solve simple ODE models it’s time to take a look at how to fit these models to empirical data. It is important to remember that we design models to simulate real behavior. Thus, it is important to be able to tie our ODE equations to the real system we are trying to model. We do this by choosing values for our model parameters that makes the system behave similar to real world behavior. This lesson continues in Part 4B.
Continue reading

Bookmark and Share

Modeling with ODEs in Matlab – Part 3

Well, I feel like I should apologize for such a long delay between posts. It’s been a crazy summer that has included some vacation time plus an overseas trip to a conference. Regardless, I’m finally back in the swing of things and ready to write up Part 3! To recap: Lesson 1 and Lesson 2 looked at how ODEs are solved numerically and how higher order solutions are more accurate than naive implementations. Today we’ll look at two simulations of living systems (Lotka-Volterra and SIR). Finally, the series will conclude with a post on model fitting and a post about chaotic systems.
Continue reading

Bookmark and Share