arxiv: v1 [nlin.cd] 25 Dec 2011

Similar documents
Deterministic Chaos Lab

Monitoring Soil Moisture by Accessing Weather Information through Matlab

Experimental and Simulated Chaotic RLD Circuit Analysis with the Use of Lorenz Maps

arxiv: v2 [physics.class-ph] 13 Nov 2011

Co-existence of Regular and Chaotic Motions in the Gaussian Map

Experimental Characterization of Nonlinear Dynamics from Chua s Circuit

Chaotic Random Bit Generator Realized with a Microcontroller

... it may happen that small differences in the initial conditions produce very great ones in the final phenomena. Henri Poincaré

xt+1 = 1 ax 2 t + y t y t+1 = bx t (1)

Assembly Programming through Arduino

A simple electronic circuit to demonstrate bifurcation and chaos

Dynamical Behavior of Logistic Equation through Symbiosis Model

Introducing chaotic circuits in an undergraduate electronic course. Abstract. Introduction

Experiment 19: The Current Balance

Using a Microcontroller to Study the Time Distribution of Counts From a Radioactive Source

Experiment 4. RC Circuits. Observe and qualitatively describe the charging and discharging (decay) of the voltage on a capacitor.

B5.6 Nonlinear Systems

BASINS OF ATTRACTION FOR TRIPLE LOGISTIC MAPS. 1. Introduction

Lecture 1: Introduction, history, dynamics, nonlinearity, 1-D problem, phase portrait

Diode. A diode is an semiconductor component that, in general, will pass current in only one direction

Dynamics of Two Resistively Coupled Electric Circuits of 4 th Order

The Magnetic Pendulum

Majid Sodagar, 1 Patrick Chang, 1 Edward Coyler, 1 and John Parke 1 School of Physics, Georgia Institute of Technology, Atlanta, Georgia 30332, USA

Synchronization and control in small networks of chaotic electronic circuits

P8X32A-Q44 SchmartBoard (#27150)

Overview. Multiplexor. cs281: Introduction to Computer Systems Lab02 Basic Combinational Circuits: The Mux and the Adder

Fundamentals of Dynamical Systems / Discrete-Time Models. Dr. Dylan McNamara people.uncw.edu/ mcnamarad

Chapter 23. Predicting Chaos The Shift Map and Symbolic Dynamics

Discrete Time Coupled Logistic Equations with Symmetric Dispersal

TORSION PENDULUM: THE MECHANICAL NONLINEAR OSCILLATOR

Experimental Characterization of Nonlinear Dynamics from Chua s Circuit

M E F I N A L P R O J E C T

Experiment A11 Chaotic Double Pendulum Procedure

SIMPLE CHAOTIC FLOWS WITH ONE STABLE EQUILIBRIUM

2 Discrete growth models, logistic map (Murray, Chapter 2)

Construction of the Caltech Ch 6 CP-FTMW Spectrometer

Nonlinear Dynamics and Chaos Summer 2011

Introduction to Dynamical Systems Basic Concepts of Dynamics

2 Electric Field Mapping Rev1/05

EXPERIMENT 5A RC Circuits

Digital Design through Arduino

A MINIMAL 2-D QUADRATIC MAP WITH QUASI-PERIODIC ROUTE TO CHAOS

Modeling the Duffing Equation with an Analog Computer

A SYSTEMATIC APPROACH TO GENERATING n-scroll ATTRACTORS

Mathematical Model of Forced Van Der Pol s Equation

Simplest Chaotic Flows with Involutional Symmetries

Proportional feedback control of chaos in a simple electronic oscillator

THREE DIMENSIONAL SYSTEMS. Lecture 6: The Lorenz Equations

(d) describe the action of a 555 monostable timer and then use the equation T = 1.1 RC, where T is the pulse duration

Are numerical studies of long term dynamics conclusive: the case of the Hénon map

Basins of Attraction Plasticity of a Strange Attractor with a Swirling Scroll

Arduino and Raspberry Pi in a Laboratory Setting

A Stability Analysis of Logistic Model

TWO DIMENSIONAL FLOWS. Lecture 5: Limit Cycles and Bifurcations

Introducing Chaotic Circuits in Analog Systems Course

A Two-dimensional Discrete Mapping with C Multifold Chaotic Attractors

Een vlinder in de wiskunde: over chaos en structuur

Lesson 4: Non-fading Memory Nonlinearities

Maps and differential equations

Howto make an Arduino fast enough to... Willem Maes

CHAOS -SOME BASIC CONCEPTS

ICMIEE-PI Design and Construction of a Digital Anemometer

Digital Electronics. Part A

Chaos in Dynamical Systems

Tracking board design for the SHAGARE stratospheric balloon project. Supervisor : René Beuchat Student : Joël Vallone

GIST 4302/5302: Spatial Analysis and Modeling Lecture 1: Overview

A SIMPLE MATHEMATICAL MODEL FOR BATESIAN MIMICRY

On a conjecture about monomial Hénon mappings

Demonstration of Chaos

Introduction. Outline

An Undergraduate s Guide to the Hartman-Grobman and Poincaré-Bendixon Theorems

Voltage Dividers, Nodal, and Mesh Analysis

Construction of a reconfigurable dynamic logic cell

More Details Fixed point of mapping is point that maps into itself, i.e., x n+1 = x n.

ECE 8803 Nonlinear Dynamics and Applications Spring Georgia Tech Lorraine

Measurement of Complex Permittivity of Dielectrics and Its Applications

CHALMERS, GÖTEBORGS UNIVERSITET. EXAM for DYNAMICAL SYSTEMS. COURSE CODES: TIF 155, FIM770GU, PhD

Chaotic Vibrations. An Introduction for Applied Scientists and Engineers

Nonsmooth systems: synchronization, sliding and other open problems

Electronic Circuit Simulation of the Lorenz Model With General Circulation

Electric Fields and Potentials

CHUA S ATOM. Received March 16, 1999; Revised April 20, 1999

Laboratory 3 Measuring Capacitor Discharge with the MicroBLIP

Chaos. Dr. Dylan McNamara people.uncw.edu/mcnamarad

Entrainment Alex Bowie April 7, 2004

Community College of Allegheny County Unit 9 Page #1. Thermocouples R1 = 1K

Chaos Theory. Namit Anand Y Integrated M.Sc.( ) Under the guidance of. Prof. S.C. Phatak. Center for Excellence in Basic Sciences

Nonlinear Systems, Chaos and Control in Engineering

Guided Inquiry Worksheet 2: Interacting Einstein Solids & Entropy

Liapunov Exponent. September 19, 2011

Demonstration of Chaos

Numerical Simulations in Jerk Circuit and It s Application in a Secure Communication System

Chapter 2 Chaos theory and its relationship to complexity

Lecture 1: A Preliminary to Nonlinear Dynamics and Chaos

Electrical Circuits Question Paper 8

A New Dynamic Phenomenon in Nonlinear Circuits: State-Space Analysis of Chaotic Beats

Lab 2: Kirchoff s Laws

Figure 1: Schematic of ship in still water showing the action of bouyancy and weight to right the ship.

Example Chaotic Maps (that you can analyze)

ConcepTest Clicker Questions. Chapter 26 Physics: for Scientists & Engineers with Modern Physics, 4th edition Giancoli

Transcription:

Visualizing the logistic map with a microcontroller arxiv:1112.5791v1 [nlin.cd] 25 Dec 2011 Juan D. Serna School of Mathematical and Natural Sciences University of Arkansas at Monticello, Monticello, AR 71656 Amitabh Joshi Department of Physics Eastern Illinois University, Charleston, IL 61920 December 25, 2011 Abstract The logistic map is one of the simplest nonlinear dynamical systems that clearly exhibit the route to chaos. In this paper, we explored the evolution of the logistic map using an open-source microcontroller connected to an array of light emitting diodes (LEDs). We divided the onedimensional interval [0, 1] into ten equal parts, and associated and LED to each segment. Every time an iteration took place a corresponding LED turned on indicating the value returned by the logistic map. By changing some initial conditions of the system, we observed the transition from order to chaos exhibited by the map. 1 Introduction Nonlinear dynamics is a topic that not only cover all the disciplines, in both natural and social sciences, but also is now becoming part of introductory level undergraduate courses in sciences. Searching for affordable, easy to setup, and reconfigurable classroom demonstrations that allow to investigate the physical and mathematical nature of nonlinear dynamical systems has been always a matter of interest for instructors. This paper describes a simple apparatus used to explore the behavior of one-dimensional chaotic maps, like the Logistic Map, when different initial conditions are chosen. The device consists of an inexpensive open-source microcontroller connected to an array of light emitting diodes (LEDs), and programmed to iterate the logistic map in the one-dimensional interval [0,1]. This interval is divided in ten equal parts and mapped one-to-one to a single LED in the array. When the logistic map produces certain value after an iteration, the corresponding LED lights up showing the value in the one dimensional domain approximately. After several iterations, it is possible to visualize the trajectory of the map by looking at the blinking LEDs sequence. Sensitivity to initial conditions, density of periodic orbits, strange attractors, and bifurcations are visualized easily with this device. serna@uamont.edu ajoshi@eiu.edu 1

2 One dimensional maps The logistic map is, perhaps, the simplest example of how a nonlinear dynamical equation can give rise to very complex, chaotic behavior. 1 Initially introduced as a mathematical model of population growth, 2 it rapidly found applications in diverse areas like mathematical biology, biometry, demography, condense matter, econophysics, and computation. 3 The logistic map function is defined as X n+1 = AX n (1 X n ) f A (X), (1) where the factor A is a model-dependent parameter representing external conditions to the system, and X n is the population in the nth-period cycle, scaled so that its value fits in the interval [0,1]. 4 The function f A is called an iteration function because we may find the population fraction X in the following period cycle by repeating the mathematical operations expressed in (1). 5 It is also one-dimensional since there is only a single variable X, and the resulting curve is a line. 3 Setup We show a photograph of the apparatus setup in Fig. 1, and its schematics in Fig. 2. Figure 1: Setup of the Logistic Map device. An array of ten LEDs are connected to the Arduino microcontroller using the same number of 220 Ω resistors. The apparatus uses an open-source Arduino prototyping platform made up of an Atmel AVR processor (microcontroller). It has 14 digital input/output pins, 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. 6 Arduino is a registered trademark only the official boards are named Arduino so clones usually have names ending with duino. 7 The Arduino can be connected to a computer through the USB port and programmed using a language similar to C++. The program is uploaded into the microcontroller using an Integrated Development Environment (IDE). In the Arduino world, programs are known as sketches. We connected an array of ten 5mm LEDs to the digital pins of the microcontroller using 220Ω resistors (or 1kΩ for dimmer LEDs). We also used a solderless breadboard to hook up all the electric components to the microcontroller. 2

4 The sketch Figure 2: Circuit diagram of the ten LEDs array connected to the Arduino. Listing 1 shows a simple program (sketch) used to operate the microcontroller, and visualize the logistic map by looking at the array of blinking LEDs. A glowing LED represents an iteration of the one-dimensional map, and it is linked with a value in the interval [0,1]. Arduino programs require two mandatory functions: setup() and loop(). Any variable or constant defined outside these two functions is considered to be global. In the setup() function, we tell the microcontroller that there are 10 LEDs connected to the digital pins and that they are intended to be turned on and off. In the loop() function, the logistic map is iterated, and the visualization process takes place as we observe the LEDs turning on and off, one after another, following the evolution of the nonlinear system. Using the if() and else control structures, we divide the interval [0, 1] in ten identical segments and associate an LED to each one of them. For example, the first LED from the left represents the first interval segment [0,0.1), the second LED represents the segment [0.1,0.2), and so on. The last LED represents the final segment [0.9, 1.0]. When the microcontroller iterates the logistic map, a value belonging to one of these ten intervals is returned, and the corresponding LED turns on for 500 milliseconds. This process is repeated infinitely, so we can observe the orbit followed by the logistic map by watching at the blinking LEDs sequence. The initial conditions for the logistic map can be changed anytime and uploaded again into the microcontroller. Thus, we can explore the behavior of the chaotic map when different values of the parameters A and X 0 are chosen. It is amusing to study the bifurcations of the logistic map by looking at the blinking sequence of LEDs. We start with the parameter values A = 0.9 and X 0 = 0.5 (0 < A < 1). The LED associated with the interval [0.5,0.6) turns on first. As the iterations of the logistic map take place, we observe that the sequence of blinking LEDs moves toward the very first LED, which is associated with the segment [0,0.1). The sequence ends up with this first LED left on indefinitely. This evolution is shown in Fig. 3(a), the cobweb diagram of the logistic map for that selection of parameters. For this case, X = 0 is an attractor, and the domain [0,1] forms a basin of attraction. Another example of an attractor happens when A = 2.9 and X 0 = 0.2 (1 < A < 3). We see 3

Figure 3: Cobweb diagrams for the logistic map for different values of A and X 0. The 45 line, X n+1 = X n, is used to find the fixed points and follow the iteration process. Plots (a) and (b) show the presence of attractors at X = 0 and X = 0.655, respectively. Plot (c) displays a period doubling bifurcation, and (d) the onset of chaos. that, after few iterations and blinking LEDs, there is only one LED that remains on indefinitely. This LED corresponds to the interval [0.6,0.7). In this case, we have a fixed point occurring at X = 0.655. As it is shown in Fig. 3(b), the orbit of the map follows a square spiral that converges into that fixed point. Now, if A = 3.1 and X 0 = 0.2 (3 < A < 3.44948), we can observe a 2-period cycle; the value of X oscillates between 0.558 and 0.765, and the two corresponding LEDs turn on and off intermittently. Here, the fixed point X = 0.677 becomes a repeller. Figure 3(c) shows the periodic behavior of the logistic map for this set of parameters. Unfortunately, higher periodicity (like 4-period, 8-period cycles, or higher) cannot be observed clearly with this device because of the way the LEDs are mapped into the [0,1] interval. More LEDs are required to improve the resolution of the device. However, the microcontroller has a limit of 13 digital pins, and other electric components (like an extra microchip) need to be incorporated into the circuit if we want more LEDs controlled by the device. Finally, when A = 3.7 and X 0 = 0.05 (3.56994 < A < 4), chaos onsets. 8 An apparently randomness of blinking LEDs is observed. After many iterations, there is no single LED that remains on indefinitely, and no single LED that has not been turned on at least once. The orbit of the logistic map covers all the domain of the interval [0,1]. Figure 3(d) shows all points visited by the logistic map orbit after 10 000 iterations. 4

5 Final comments With this apparatus, students may understand more easily the behavior of one-dimensional chaotic maps looking at an actual one-dimensional array of LEDs; every point in the interval [0,1] produces another point within the same interval after the logistic map is iterated. By controlling the parameter A and the initial value X 0, the instructor and students can observe under what conditions periodic and chaotic behavior may occur, providing a better understanding of periodicity, bifurcations, and the route to chaos of a nonlinear dynamical system. The setup described here is inexpensive, easy, and fun to assemble, also enhances computer programming and electronics assembly skills. References 1. E. W. Weisstein, Logistic Map. From MathWorld A Wolfram Web Resource. http://mathworld.wolfram.com/logisticmap.html 2. P.-F. Verhulst, Recherches mathématiques sur la doi d accroissement de la population, Mem. Acad. Royale Belg. 20, 1 32 (1847). 3. M. Ausloos and M. Dirickx (eds.), The Logistic Map and the Route to Chaos : From the Beginnings to Modern Applications, (Springer, New York, 2006). 4. J. B. Marion and S. T. Thornton, Classical Dynamics of Particles and Systems, 4th ed. (Saunders, Fort Worth, 1995), p. 178. 5. R. C. Hilborn, Chaos and Nonlinear Dynamics, 2nd ed. (Oxford, New York, 1994), p. 19. 6. Arduino: www.arduino.cc 7. M. Schmidt, Arduino: A Quick-Start Guide, (Pragmatic Bookshelf, Raleigh, 2011). 8. J. C. Sprott, Chaos and Time-Series Analysis (Oxford, New York, 2003). 5

// Blinking Logistic Map // choose the pin for each LED const int NbrLEDs = 10; const int LEDpin [] = {2,3,4,5,6,7,8,9,10,11; const int wait = 500; // wait for 500 milliseconds // Logistic Map parameters const double A = 3.7; // Logistic map constant double X0 = 0.2; // Initial position (0 < X0 < 1.0) double X = X0; // Use X0 as your first calculated point // setup () initializes the LED pins void setup () { for (int i = 0; i < NbrLEDs; i++) { pinmode(ledpin[ i ], OUTPUT); // loop () iterates the Logistic Map and turn on/off LEDs void loop () { if (X < 0.1) blinkled(ledpin [0]); else if ((X >= 0.1) && (X < 0.2)) blinkled(ledpin [1]); else if ((X >= 0.2) && (X < 0.3)) blinkled(ledpin [2]); else if ((X >= 0.3) && (X < 0.4)) blinkled(ledpin [3]); else if ((X >= 0.4) && (X < 0.5)) blinkled(ledpin [4]); else if ((X >= 0.5) && (X < 0.6)) blinkled(ledpin [5]); else if ((X >= 0.6) && (X < 0.7)) blinkled(ledpin [6]); else if ((X >= 0.7) && (X < 0.8)) blinkled(ledpin [7]); else if ((X >= 0.8) && (X < 0.9)) blinkled(ledpin [8]); else blinkled(ledpin [9]); // iterates the Logistic Map function X0 = X; X = A X0 (1.0 X0); // blinkled function // turn on/off LEDs void blinkled(const int pin) { digitalwrite(pin, HIGH); // turn LED on delay(wait ); // wait 500 milliseconds digitalwrite(pin, LOW); // turn LED off Listing 1: Logistic Map sketch for the Arduino. 6