# Excitable Medium in the Phase Plane

This page was automatically generated by NetLogo 4.1. Questions, problems? Contact feedback@ccl.northwestern.edu.

The applet requires Java 5 or higher. Java must be enabled in your browser settings. Mac users must have Mac OS X 10.4 or higher. Windows and Linux users may obtain the latest Java from Sun's Java site. If the display appear cut off with Firefox, then try another browser (Safari works).

## WHAT IS IT?

This section could give a general understanding of what the model is trying to show or explain.

## HOW IT WORKS

This section could explain what rules the agents use to create the overall behavior of the model.

## HOW TO USE IT

This section could explain how to use the model, including a description of each of the items in the interface tab.

Epsilon controls the speed of the dynamics without changing the nullclines. Do you see why?

## THINGS TO NOTICE

This section could give some ideas of things for the user to notice while running the model.

## THINGS TO TRY

This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model.

Begin with function G-II, which gives a Type II model. Start with Default parameters, including B = 0, and you will see the state go to the fixed point where the nullclines cross. (The calculated fixed point is u = -1.5, w = -0.3. How do your observations compare?) Rerun with greater values of B. For B > 1.24 you should see oscillatory behavior. Try several B values in the range [1.24, 1.56] and estimate the oscillation frequency for each. What happens for B > 1.57? Can you explain the significance of the B values 1.24 and 1.57 in terms of the shape of the u-nullcline where the w-nullcline crosses it?

Now try function G-I, which gives a type I model, and start again with the Default parameters. Once again it should exhibit fixed point behavior, and as you increase B you should find a threshold for oscillatory behavior at about B = 1.11. Estimate the frequency at several B values less than 1.57. Observe how Type I behavior differs from Type II. For B > 1.57 you will have fixed point behavior again; try to explain the thresholds by observing the nullclines for various B values.

## EXTENDING THE MODEL

This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc.

## NETLOGO FEATURES

This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.

## RELATED MODELS

This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.

## CREDITS AND REFERENCES

This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references.

## PROCEDURES

```globals [ u-lwb u-upb w-lwb w-upb u-color w-color prev-B ]breed [states state]breed [scribes scribe]breed [icons icon]states-own [ cur-u cur-w ]to set-defaults set B 0set epsilon 0.1set a0 0.02set a1 0.8set b0 2set b1 1.5set G-function "G-II"set init-u -3set init-w -1set delta-t 0.01set delay 0.002  set impulse-size 1endto setup caset u-lwb -3set u-upb 3set w-lwb -3set w-upb 5set u-color redset w-color greenset prev-B B draw-nullclines init-icons set-plot-pen-interval delta-t set-plot-x-range 0 nominal-graph-width create-states 1 [ init-state ]endto init-icons create-icons 1 [ setxy 0 (max-pycor - 2) set color u-color set heading 270set label "-"]create-icons 1 [ setxy 0 (min-pycor + 2) set color u-color set heading 90set label "+"]create-icons 1 [ setxy (min-pxcor + 2) 0set color w-color set heading 180set label "-"]create-icons 1 [ setxy (max-pxcor - 2) 0set color w-color set heading 0set label "+"]ask icons [ set size 2set label-color black]endto init-state set color whiteset cur-u init-u set cur-w init-w setxy (xcor-from-u init-u) (ycor-from-w init-w) set heading 90endto draw-nullclines clear-drawingcreate-scribes 1 [ ] draw-u-nullcline draw-w-nullcline ask scribes [ die ]endto go if prev-B != B [ draw-nullclines set prev-B B ] ask states [ let delta-u delta-t * (F cur-u cur-w) let delta-w delta-t * (G cur-u cur-w) set cur-u cur-u + delta-u set cur-w cur-w + delta-w facexy (xcor-from-u cur-u) (ycor-from-w cur-w) setxy (xcor-from-u cur-u) (ycor-from-w cur-w) plot cur-u ifelse draw-trajectory? [ if pen-mode = "up" [ pen-down ] ] [ if pen-mode = "down" [ pen-up ] ] ] wait delayendto-report F [u w] report u - u ^ 3 / 3 - w + Bendto-report G [u w] ifelse G-function = "G-I"[ report epsilon * (a0 * u + exp (a1 * u) - w) ] [ report epsilon * (b0 + b1 * u - w) ]endto-report u-nullcline [u] report u - u ^ 3 / 3 + Bendto-report w-nullcline [u] ifelse G-function = "G-I"[ report a0 + exp (a1 * u) ] [ report b0 + b1 * u ]endto draw-u-nullcline ask scribes [ set color redsetxy(xcor-from-u u-lwb)(min list max-pycor (max list min-pycor (ycor-from-w (u-nullcline u-lwb)))) foreach n-values 1000 [ u-lwb + ? * (u-upb - u-lwb) / 1000 ] [ let x xcor-from-u ? let y ycor-from-w (u-nullcline ?) ifelse x >= min-pxcor and x <= max-pxcor and y >= min-pycor and y <= max-pycor[ pd setxy x y ] [ pu setxy x y ] ] pu]endto draw-w-nullcline ask scribes [ set color greensetxy(xcor-from-u u-lwb)(min list max-pycor (max list min-pycor (ycor-from-w (w-nullcline u-lwb)))) foreach n-values 1000 [ u-lwb + ? * (u-upb - u-lwb) / 1000 ] [ let x xcor-from-u ? let y ycor-from-w (w-nullcline ?) ifelse x >= min-pxcor and x <= max-pxcor and y >= min-pycor and y <= max-pycor[ pd setxy x y ] [ pu setxy x y ] ] pu]endto-report xcor-from-u [u] report min-pxcor + (u - u-lwb) * (max-pxcor - min-pxcor) / (u-upb - u-lwb)endto-report ycor-from-w [w] report min-pycor + (w - w-lwb) * (max-pycor - min-pycor) / (w-upb - w-lwb)endto-report u-from-xcor [x]endto-report w-from-ycoy [y]end
```