Hi I am currently studying physics at the undergraduate level. As part of my final year project Ive got to implement the HH model and investigate certain types of behaviour.

My issue is the following.

I understand that for $I_{inj}>I_{thresh}$ we should expect action potentials that spike at a regular frequency.

enter image description here Here I've got an input current that seems to generate 2 initial spikes however no further spikes are generated. Is this physical? The presence of the initial spikes must mean that the input current is greater than the threshold, but we do not see consistent spikes across the entire stimulatory current.

Increasing the current slightly gives the expected behavior: enter image description here

Is this an error in the code or is this a real physical phenomena?

EDIT------------------------------ Following Bryan Krause's suggestions, here is the full picture with the gating variables.

Case 1: Stimulus current with amplitude 35 mA with period 100ms enter image description here

Case 2: Stimulus current with amplitude 37 mA with period 100ms enter image description here

Case 3: Stimulus current with amplitude 500 mA with period 100ms enter image description here

  • $\begingroup$ Welcome to Biology.SE. The Biology.SE community has agreed that questions that show little or no prior research effort are off-topic on this site as are "homework" questions unless you have shown your attempt at an answer. Please edit your question and tell us where you've looked for answers, what you do know about the topic, and where exactly you still have questions. Please take the tour and consult the help center starting with How to Ask for details. $\endgroup$
    – tyersome
    Nov 14, 2021 at 18:10
  • 3
    $\begingroup$ @tyersome I believe I have shown my attempt at an answer by providing the second example as going by the HH model, that is what I believe should have also been observed in case 1. $\endgroup$ Nov 14, 2021 at 18:26
  • $\begingroup$ What are the equations this model is solving? Your case 1 looks like a strongly damped oscillator in the voltage, whereas case 2 looks like an oscillating solution. If you have a nonlinear damping constant, that could explain the difference between case 1 and 2 qualitatively. $\endgroup$ Nov 15, 2021 at 17:58
  • 1
    $\begingroup$ @AtmosphericPrisonEscape The HH model is quite a famous standard model in neuroscience. $\endgroup$
    – Bryan Krause
    Nov 15, 2021 at 18:21

1 Answer 1


This is happening due to sodium channel inactivation. Some relevant sources:


https://www.st-andrews.ac.uk/~wjh/hh_model_intro/ (I guess this link is broken for some people? works fine for me as-is; see the links before and after instead, then)


In the HH model, inactivation is sometimes referred to as the "h-gate" based on the parameter they use for this inactivation, assigned the variable "h".

Sodium channel inactivation changes the action potential threshold and can even prevent action potentials completely. The easy way to understand this is that inactivated channels aren't available to participate in the positive feedback loop of an action potential. Because of this, it's not quite correct to think of a constant threshold for action potentials for a given cell/model. Instead, there is a threshold for any given holding potential or recent history of the membrane potential. Most often, you'll be concerned with the threshold at the resting membrane potential, but if you apply a constant external stimulus (or if you trigger a lot of action potentials in sequence without enough time spent at hyperpolarized or resting potentials) then the number of available sodium channels is not the same as at rest.

I would suggest a couple things...first, try other steps, too! What happens if you use an even bigger stimulus? Second...plot out the HH gating parameters m, n, and h as a function of time, not just the voltage.

  • $\begingroup$ Ive added a few more cases to my original question. Based on your answer I can't understand why case 3 and case 1 look identical. $\endgroup$ Nov 15, 2021 at 13:48
  • $\begingroup$ @Vishal Look at the h-gate! Compare h before the first stimulus to after the first action potential (or first couple, once the APs stop). $\endgroup$
    – Bryan Krause
    Nov 15, 2021 at 14:20
  • $\begingroup$ Your St. Andrews link is dead. $\endgroup$ Nov 15, 2021 at 17:56
  • $\begingroup$ @AtmosphericPrisonEscape Works fine for me. $\endgroup$
    – Bryan Krause
    Nov 15, 2021 at 18:19
  • 1
    $\begingroup$ @VishalJain h is only close to 1 at rest; later in the pulse, it is less than 1. In the first case, it's low enough that the threshold has shifted so the stimulus is no longer superthreshold after the first spike, and h continues to decrease (more inactivated). In the second case, there is enough of a relaxation of the h gate during the hyperpolarization between spikes. In the third case, the stimulus is too strong and the h gate never has a change to reopen; h stays low and so there are not available sodium channels to open. $\endgroup$
    – Bryan Krause
    Nov 15, 2021 at 18:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .