XPP Instructions To run XPP from the command line you should be in a directory with a link to the xppaut executable and a file such as lin-example2.ode containing XPP commands. At the command line prompt, typing ./xppaut lin-example2.ode should start XPP and create a figure window. Once this window is up, the menus on the left and the top allow control of the simulation. Each command on the left has an equivalent keystroke sequence, for example: IG (Initial conditions; Go) calculates trajectories starting from the initial conditions provided. (If none were provided, 0 is taken by default.) To view or change the initial conditions, click the blue ICs button at the top left of the window. IM (Initial conditions; Mouse) lets you start from an arbitrary location on the phase plane. IO (Initial conditions; Old) continues integration from the end of the previous trajectory. NN (Nullcline; New) draws the nullclines for the equations given in the .ode file. DD (Direction Field; Direction Field) plots the direction field of the flow. DF (Direction Field; Flow) plots the flow from an array of starting points. W (Window/Zoom) gives options for zooming in or out of the figure. U (Numerics) gives options for choosing different solvers, time steps etc. P (Parameters) lets you set specific parameters as identified in the .ode file. You can also view and change parameters by clicking on the blue "Param" button on the top of the window. E (Erase) clears the window. SM (Singular Points; Mouse) lets you click on a point on the phase plane to find a nearby singular point (i.e. a point where both nullclines intersect). XPP will then offer to print the eigenvalues at the singular point, and indicate their stability (it prints them in the terminal or xterm window from which XPP was originally called). V (View axes) opens a dialogue where you can change which variable is plotted on the x or y axis, the ranges of the axes, etc. When entering values, XPP uses "Return" to toggle from one entry to the next, and "Tab" to accept the values entered and close the window. X (Xi vs t) prompts you to choose which variable to plot against time. To create an additional window, use M (Makewindow). Here are some exercises to try: 1. Use XPP to run lin-example2.ode Change the parameters to find examples of phase portaits giving the following phase spaces: - a stable node (try to get this in 2-3 different ways) - an unstable node (try 2-3 different versions) - a flow given by a singular matrix (one with determinant equal to 0) - a stable spiral - an unstable spiral - a couple of different saddles - a center (concentric circle; concentric ellipse). 2. Run fhn.ode -Visualize the phase space, the nullclines and the direction field. -Find the fixed point. Visualize the flow field. Is the fixed point stable? -Find the eigenvalues of the linearization around the fixed point. -Change the current I_0 to 0.25. How does the trajectory change? What happens to the stability of the equilibrium point? -Vary the current between 0 and 0.25. Find the point (to reasonable accuracy) at which the equilibrium loses stability. What are the eigenvalues at this point? -Try varying other combinations of constants to create multiple fixed points. Find their stability and describe the phase space. -Open the file fhn.ode in a text editor and remove the comments to try forcing the oscillator (set I_0 to 0.25 for this). 3. Run Izhikevich's I(Na,p)+I(K) model (called nap+k.ode) 3.a. Click on the "Param" button and set iapp to 0. -Visualize the phase space, the nullclines and the direction field. -Use the mouse (Initial/Mouse) to start a trajectory near the fixed point. Is the equilibrium stable? What kind of local phase portrait does it have? Start with initial conditions in each of the four regions defined by the intersections of the nullclines, and confirm that the trajectories move in the expected directions (down and right, up and right, etc.) -Find the eigenvalues of the dynamics linearized about the fixed point. -Using initial conditions specified by your mouse, explore the trajectories starting near n=0 and -60 < v < -40. See how close you can come to putting the trajectory through the right "knee" of the v-nullcline. Does this model have a well-defined threshold for spiking? 3.b. Click on the "Param" button and set iapp to 43. -Visualize the phase space, the nullclines and the direction field. -Use the mouse (Initial/Mouse) to start a trajectory near the fixed point. Is the equilibrium stable? What kind of local phase portrait does it have? Does the trajectory have move in the directions (up/down, left/right) predicted in each of four regions between the nullclines? -Find the eigenvalues of the dynamics linearized about the fixed point. -From the eigenvalues, estimate the "period" of the decaying oscillation about the fixed point. -Make a new window and plot V versus time. Was your estimate of the period approximately correct? -