Control of APD alternans on a 1D strip

In this applet, we produce an APD that oscillates (as in the 1d alternans applets) because we pace the 1d strip at a fast pacing and the restitution of the model has points with slope greater than one at this pacing periods.
We can bring the APD to the unstable fix point (which is approximately equal to (APD_max+APD_min)/2) by using a feed back control which relates the previous period with the existing one. We record the period at T-1 and use it as a control by applying a current in a number of electrodes. The more electrodes used the sooner the control is reached.
Start button will initiate the APD. after two rotations then the control is automatically started, the blue dash line represents the potential at the previous period, while the black line represents the potential at the present period.
One can change the number of control points (indicated by red lines) by using the menu-button.
By using the fast, slow, stop and continue buttons it is possible to observe more in detail the simulation.
For review of the control method used see: PRL Vol 83, p456, July 1999. By Rappel, Fenton and Karma.