In finding an optimal stimulus waveform for inducing switches in neuronal states, analytical techniques from optimal control theory are often found to be difficult to use or extremely time intensive. Here, we present the code for a gradientbased algorithm approach that has been used to find energetically optimal stimulus waveforms to trigger an action potential in the HodgkinHuxley model as well as initiating and repressing repetitive firing in the FitzHughNagumo models. These two models serve just as examples and the code can be easily adapted to any other system.
This work was presented in:
Project description
This directory contains code and documentation for three applications of a stochasticallyseeded gradient algorithm as described in the paper included. The gradient algorithm is used to solve optimization problems given a set of constraints and an optimization metric. We have applied the algorithm to three different neuronal applications:
 Triggering an action potential in the HodgkinHuxley model (an empirically validated ionic model of neuronal excitability)
 Initiating repetitive firing in the FitzHughNagumo model (an abstract model applied to a wide range of biological systems that exhibit an oscillatory state and a quiescent state), and
 Suppressing repetitive firing in the FitzHughNagumo model
We demonstrate in our study that this algorithm enables automated exploration of a wide solution space with stochastic seeding that allows us to find multiple locally optimal solutions. Furthermore, this algorithm is robust enough that no a priori knowledge of the optimal stimulus is necessary.
The code provided here are preset to run for these three applications, but they can be used as training tools to apply the gradient algorithm to any other application so desired.
Directory Contents
 Gradient Algorithm.pdf
 The paper which describes the work that we have done.
 HodgkinHuxley/

 gradAlg.m
 This is the main program to run.
 hh.m
 Function describe the HodgkinHuxley equations
 pInfluence.m
 Function describing the p influence equations
 RInfluence.m
 Function describing the R influence equations
 FitzHughNagumo/Initiating Repetitive Firing/

 fhn.m
 Function describing the FitzHughNagumo equations
 gradAlg.m
 This is the gradient algorithm for a single run with a given initial and terminal condition.
 optInOut.m
 This is the main program to run used to process every single run between the quiescent state and every single point on the repetitive firing limit cycle.
 outX.mat
 A set of 68 points defining the repetitive firing limit cycle.
 pInfluence.m
 Function describing the p influence equations
 RInfluence.m
 Function describing the R influence equations
 FitzHughNagumo/Suppressing Repetitive Firing/

 fhn.m
 Function describing the FitzHughNagumo equations
 gradAlg.m
 This is the gradient algorithm for a single run with a given initial and terminal condition.
 optOutIn.m
 This is the main program to run used to process every single run between the quiescent state and every single point on the repetitive firing limit cycle.
 outX.mat
 A set of 68 points defining the repetitive firing limit cycle.
 pInfluence.m
 Function describing the p influence equations
 RInfluence.m
 Function describing the R influence equations
Name Last modified Size Description
Parent Directory  FitzHughNagumo/ 21Aug2015 13:59  HodgkinHuxley/ 21Aug2015 13:59  README.txt 21Aug2015 13:59 2.7K local.css 02Oct2015 18:29 3.1K C# source file
If you would like help understanding, using, or downloading content, please see our Frequently Asked Questions. If you have any comments, feedback, or particular questions regarding this page, please send them to the webmaster. Comments and issues can also be raised on PhysioNet's GitHub page. Updated Friday, 28 October 2016 at 18:58 BRST 
PhysioNet is supported by the National Institute of General Medical Sciences (NIGMS) and the National Institute of Biomedical Imaging and Bioengineering (NIBIB) under NIH grant number 2R01GM10498709.
