# Van der Pol oscillator_01

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)

NB: Since this model is very slow while run in NetLogo Web it is recommended to download and run it on your PC.

## WHAT IS IT?

This is a model of a phase-space plot generated by the Van der Pol oscillator, showing limit cycles with different initial conditions and different values of the scalar parameter μ.

The model is an example of a dynamical system used by Mary Cartwright, British mathematician, one of the first to study the theory of deterministic chaos, particularly as applied to this oscillator.

## HOW IT WORKS

The Van der Pol oscillator is a non-conservative oscillator with non-linear damping. It evolves in time according to a second-order differential equation, which after transformation can be written in its two-dimensional form:

dX/dt = Y

dY/dt = μ(1-X^2)Y - X

where μ is a scalar parameter indicating the nonlinearity and the strength of the damping.

Governed by these equations and calculations a phase-space plot is generated. With each calculation a turtle is generated and plotted on the plane with respective coordinates.

## HOW TO USE IT

Press the buttons:

(1) Setup: creates basic conditions for the model to run (i.e. erases data from previous runs, generates X and Y axes, etc.). The plots from previous runs are preserved for further comparison.

(2) Go: starts running the model with generation of new points (turtles) in accordance with numeric values as a result of calculations, performed every time-step.

Activating/Pressing the above buttons will run the model with initial settings.

(3), (4) and (5) Sliders are used to change the global variables: X, Y and μ respectively (usually before a new model run).

(6) This chooser is for selecting the color of the plot for the next model run. Colors are presented by their number on color swatches pallet. On the right there is a list of available colors and their numeric values.

(7) The plot shows X and Y values over time.

(8) and (9): These two monitors show X and Y values at any particular time-step during the model run.

(10) ‘Clear-drawing’ button clear all the values: globals, ticks, turtles, patches, drawing, plots, and output.

## THINGS TO NOTICE

Initially the model parameters are set as follows: X = 2.0, Y = 2.5, μ = 5.1

Changing these parameters will lead to change in phase-plot shape. Running the model with different values of the parameters may help to clarify the impact of a certain parameter(s) on the phase-plot shape.

## THINGS TO TRY

You can change model parameters one by one or combined and observe the impact of these changes on the phase-plot.

What happens if the model is run using different initial conditions for X and Y and keeping μ constant?

Before running the model with new settings you should first set the parameters using respective sliders, then select the color for the new plot and then press “Setup” and “Go”.

## NETLOGO FEATURES

This model was originally built in NetLogo System Dynamics Modeler. In some aspects it was converted from ‘System Dynamics’ version to a ‘regular’ one by recompiling the code and adding new pieces of the code with respective changes/additions in the model interface (buttons, sliders, etc.).

## RELATED MODELS

* Lotka-Volterra Equation: Phase-plot

* Wolf Sheep Predation (System Dynamics)

## CREDITS AND REFERENCES

This simple abstract model was developed by Victor Iapascurta, MD. At time of development he was in the Department of Anesthesia and Intensive Care at University of Medicine and Pharmacy in Chisinau, Moldova / ICU at City Emergency Hospital in Chisinau. Please email any questions or comments to viapascurta@yahoo.com

The model was created in NetLogo 6.0.1, Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

This model was inspired by Introduction to Dynamical Systems and Chaos (Fall, 2017) MOOC by David Feldman @ Complexity Explorer (https://www.complexityexplorer.org/courses).

## Comments and Questions

globals [ mylist-x mylist-y X Y dt ] to setup clear-globals clear-ticks clear-patches clear-all-plots ask patches with [ pxcor = 0 ] [ set pcolor white ] ask patches with [ pycor = 0 ] [ set pcolor white ] ask patches with [ pxcor = 1 ] [ set pcolor white ] ask patches with [ pycor = 1 ] [ set pcolor white ] set mylist-x list 0 (X-slider) set mylist-y list 0 (Y-slider) system-dynamics-setup system-dynamics-do-plot end to system-dynamics-setup reset-ticks set dt 0.001 set X X-slider set Y Y-slider end to go system-dynamics-go system-dynamics-do-plot set mylist-x lput result-x mylist-x set mylist-y lput result-y mylist-y crt 1 [ set color phase-plot-color set xcor (last mylist-x * 40) set ycor (last mylist-y * 40) set size 0.7 set shape "circle" ] end to system-dynamics-go let local-m m let local-inflow inflow let local-inflow1 inflow1 let new-X ( X + local-inflow1 ) let new-Y ( Y + local-inflow ) set X new-X set Y new-Y tick-advance dt end to-report inflow report ( m * ( 1 - X * X ) * Y - X ) * dt end to-report inflow1 report ( m * Y ) * dt end to system-dynamics-do-plot if plot-pen-exists? "X" [ set-current-plot-pen "X" plotxy ticks X ] if plot-pen-exists? "Y" [ set-current-plot-pen "Y" plotxy ticks Y ] end to-report result-x report X end to-report result-y report Y end to clear-picture ca end

There is only one version of this model, created 3 months ago by Victor Iapascurta.

## Attached files

File | Type | Description | Last updated | |
---|---|---|---|---|

Van der Pol oscillator_01.png | preview | Preview for 'Van der Pol oscillator_01' | 3 months ago, by Victor Iapascurta | Download |

This model does not have any ancestors.

This model does not have any descendants.