From Neurons to Networks: Unveiling Neural Dynamics Through Hodgkin-Huxley Simulations

Buse Bilgin
turkcell
Published in
13 min readMay 12, 2024

Bioelectronics, a fascinating intersection between biology and electronics, is an ever-evolving field that promises to revolutionize our understanding and interaction with biological systems. At the core of this discipline lies the exploration and manipulation of electrical processes in biological tissues, particularly nerve cells, which are pivotal for numerous biomedical applications ranging from prosthetics to neural therapy.

During my graduate studies, I delved into the practical applications of bioelectronics by undertaking two projects centered around the Hodgkin-Huxley (HH) model. This model is a cornerstone in neuroscience, renowned for its precise depiction of nerve action potentials. Action potentials are the fundamental means through which neurons communicate, and understanding them is essential for advancements in neuroprosthetics and other neural engineering applications.

The primary goal of my projects was to simulate nerve action potentials using the HH model, enhancing our comprehension of how various electrical stimuli can influence neuronal behavior. This exploration was not only a testament to the versatility of the HH model but also an opportunity to contribute to the broader field of neuroscience through computational simulation. The insights gained from these simulations have potential implications in medical technology, particularly in designing devices that can interact with the human nervous system in sophisticated ways.

In the following sections, we will explore the specific methodologies employed in these projects, the results obtained, and their implications for the future of bioelectronics and neuroscience!

Generated by Dall-E

Background on the Hodgkin-Huxley Model

The Hodgkin-Huxley model, named after Alan Hodgkin and Andrew Huxley, who developed it in the early 1950s, is an essential theoretical framework in neuroscience. This model was formulated to describe how neurons generate and propagate electrical signals known as action potentials. It revolutionized our understanding by quantitatively describing the ionic mechanisms underlying these electrical phenomena in neurons, particularly in the squid giant axon. For their groundbreaking work, Hodgkin and Huxley were awarded the Nobel Prize in Physiology or Medicine in 1963.

Understanding the Model’s Fundamentals

At its core, the Hodgkin-Huxley model is based on the concept that the movement of ions across the neuronal membrane, through specialized proteins known as ion channels, is critical for the generation of action potentials. The model specifically addresses the dynamics of potassium (K+) and sodium (Na+) ions, which play pivotal roles in the depolarization and repolarization phases of the action potential.

The model uses a set of nonlinear differential equations to represent the electrical characteristics of the neuron’s membrane. These equations describe:
- The membrane’s voltage as a function of ionic currents.
- The conductance of sodium and potassium ions, which vary with both time and membrane voltage.
- A leakage current that accounts for other ions passing through the membrane.

These components are combined to compute the change in membrane voltage over time, capturing the exquisite dance of ionic fluxes that give rise to the action potential.

Model Application and Relevance

The Hodgkin-Huxley model’s significance extends beyond its original application to squid neurons. It serves as a foundational model for all types of excitable cells, including human neurons. Researchers and clinicians use adaptations of this model to study a variety of neuronal behaviors and disorders, and to design medical devices that interact with neural tissue, such as pacemakers and neural prosthetics.

In bioelectronics, the Hodgkin-Huxley model provides crucial insights into how electrical stimulation affects neuronal behavior. This understanding is vital for developing effective therapeutic strategies that employ neural stimulation, offering hope for treating conditions like epilepsy, depression, and other neurological disorders.

By employing the Hodgkin-Huxley model, I aimed to extend its applications and explore how modifications to the model could enhance our understanding of neuron dynamics under various simulation conditions. This not only reaffirms the model’s enduring relevance but also showcases its adaptability to complex bioelectronic applications.

Exploring Neuronal Dynamics with the Hodgkin-Huxley Model

Objectives and Methodology
Let’s start with the hands-on application of the Hodgkin-Huxley model to understand how different types of electrical stimuli affect neuronal action potentials. The primary focus was on using both square wave and sinusoidal stimulation currents to explore their impacts on the neuronal behavior under controlled simulation conditions.

Using a detailed simulation setup on MATLAB, I implemented the Hodgkin-Huxley equations to calculate the changes in membrane voltage, ionic currents, and gating variables (m, h, n) in response to these stimuli. The simulations were carefully designed to mimic realistic neuronal conditions, providing insights into the dynamics of neuronal excitability and the mechanisms of action potential generation and propagation.

A) Square Wave Stimulation:

Let’s implement a square wave stimulation to our neurons! The stimulation current has a constant value for 0.2 ms and is zero elsewhere. The obtained results are shown in Figure 2. First of all, it is seen that there are two pulses applied to the membrane, however just the first stimulation can trigger the channels and cause voltage to pass the threshold level. The second stimulus cannot cause the change in the membrane voltage due to the short time interval between two stimuli. From the figure it is seen that the m gate are activated with the depolarization. This activation leads to the further depolarization, and this causes an autocatalytic positive feedback that increase this small depolarization into an action potential. The
threshold current needed to activate a channel is related with the current required to trigger this positive feedback. However, the h (i.e. becomes smaller) and n (i.e. its activation increases with the size of an outward potassium current) gates react to oppose depolarization. Moreover, we see that the m gate is the most sensitive gate to a voltage change, in other words, its value is changing faster than the other ones. This means that the rapid rising phase of the action potential occurs before the stabilizing influences of the h and n gates can engage to bring the membrane voltage back to near resting potential. The speed of h and n gates determine the width of the action potential.

Figure 2. Computed Membrane Action Potential Using the Hodgkin-Huxley Method.

The explained relationship between the gating variables also affects the ionic conductance and the current, which are shown in Figure 3. First of all, K+ channels are slower to activate or open than the Na+ channels. Since K+ channels are slow to activate, they are also slow to deactivate. Even the membrane voltage has turned to the resting potential, some of the K+ channels are still open, and this causes to occur a more negative membrane voltage that initially had. After all the K+ channels are closed, the membrane potential returns to the resting potential (i.e. the hyper-polarizing occurs after the potential). Due to this speed effect, the conductance of K+ channels are also increased and decreased slower than Na+ channels.

Figure 3. Computed Ionic Conductance and Currents Using the Hodgkin-Huxley Method.

This simulation revealed how brief, intense stimuli could trigger action potentials by rapidly changing membrane potentials. The study highlighted the critical thresholds needed for action potential initiation and how subsequent stimuli within short intervals affect the neuronal response.

B) Sinusoidal Stimulation:

By varying the frequency of sinusoidal currents, the project demonstrated the frequency-dependent behavior of neurons. To see the effect in the stimulation current with respect to time on the membrane voltage, instead of a square-waved current, a sinusoidal stimulation is implemented to the membrane model with four different frequencies.

The two main parameters differs between the two current definitions. First, the latter case does not have any dramatic change in the current. In addition, the applied current varies between the positive and the negative values. Before comparing the number of spike and the stimulus frequency, I first compare the individual membrane voltage profiles using two different cases: 1 and 10 Hz. The calculated membrane voltage is shown in Figure 4. The first spike is due to the capacitance over the membrane, and is not related with the membrane activation. It is seen that positive sinusoidal current causes the generation of spikes in the membrane voltage (15 spikes). Since the frequency of the signal is 1 Hz, there is just one period fits in the one second simulation therefore there is not any
repetition of the spikes.

Figure 4. Computed Membrane Action Potential under Sinusoidal Stimulation Current with 1 Hz Frequency

When we increase the frequency to 10 Hz, we end up with the voltage profile shown in Figure 5. At each positive region, we again show spikes on the membrane voltage (3 spikes), and due to the increase in the frequency, it repeats itself in each period of the signal. In other words, the number of spikes in one period is decreased with increased frequency, but the total number of spikes over on second simulation is increased. Moreover, due to the applied negative stimulation current, the membrane voltage becomes more negative than the resting potential during these periods.

Figure 5. Computed Membrane Action Potential under Sinusoidal Stimulation Current
with 10 Hz Frequency

When we compare the total number of spikes occurs in one second of simulations with the stimulus signal frequency, we obtain the relationship given in Figure 6. In order to understand the trend clearly, I also fitted a cubic polynomial using the calculated values. It is seen that the speed of spike count increase is getting slower when we increase the frequency further. In other words, a change in the frequency affects the number of spikes in the membrane voltage more significantly for the smaller frequencies.

Figure 6. Comparison of the Stimulus Frequency and Spike Count

Time Interval Between the Stimulus and Action Potential

Previous analyzes show that there is a time difference between the stimulus voltage and the peak of the action potential. In order to analyze this time difference and its relation with the stimulus current amplitude, three different current with different amplitudes are tested under the same conditions. The squarewaved stimulus is used for the analyzes. First of all, 50 uA/cm2 current is used for the analyzes. The obtained membrane voltage is shown in Figure 7. There is a 1.45 ms time differences between the stimulus current and the peak of the activation voltage. The reason of the time difference is that there is a current density needed to create the positive feedback loop explained previously. It is also seen that the second stimulation current cannot create an activation voltage due to the short time interval (i.e. gates cannot reach their steady-state conditions).

Figure 7. Computed Membrane Action Potential and the Time Interval Between the Peak of the Obtained Potential and the Stimulation Current with I = 50 mA/cm2

When we increase the current amplitude to 200 uA/cm2, the time interval is decreased to 0.66 ms. The obtained result is shown in Figure 8. Since we increase the amplitude of the stimulation current, the time needed to reach the needed current density is decreased; therefore, the activation voltage is increased more rapidly. There is one another interesting outcome of this change: the generation of the second activation voltage. In other words, there is also a relationship between the current strength and the
time interval between the pulses needed to generate the second stimulus, which will be discussed in the next section!

Figure 8. Computed Membrane Action Potential and the Time Interval Between the Peak
of the Obtained Potential and the Stimulation Current with I = 200 mA/cm2

Lastly, we increase the current amplitude to 500 uA/cm2, the results is shown in Figure 9. We see that the time interval drops to 0.39 ms. However, the speed of the decrease in the time interval is slightly diminished when we work with the high current levels, which is the similar with the previous analyzes. Since we are modeling the biological systems and the number of ions are limited in the environment, there should be a limit (i.e. that causes the saturation level). Therefore, when we increase our parameters further, their effect on the membrane characteristic will be decreased; and I assume that after some level, the system will be saturated and its properties cannot be upgraded further with the increase of the current amplitude.

Figure 9. Computed Membrane Action Potential and the Time Interval Between the Peak of the Obtained Potential and the Stimulation Current with I = 500 mA/cm2

Stimulus Time Interval

In the previous sections we saw that the second stimulus cannot generate an activation voltage due to the short time intervals. Also, we proved that there is a relationship between the current amplitude and the minimum time interval. This means that there is a minimum time interval needed to be given between the two pulses in order to trigger another activation in the membrane voltage. In order to see the effect of the current amplitude on the minimum time interval, three different current amplitude are used. The minimum time interval is obtained using the trial-and-error method, no specific algorithm was implemented to analyze the optimal time interval.

Note: The time difference values on the graphs have typos, so the correct ones are written in the text. Sorry for that!

Firstly, let’s apply 50 uA/cm2 amplitude of current and obtain a membrane voltage which is shown in Figure 10.

Figure 10. Computed Membrane Action Potential and the Time Interval Between the Two Action Potential under I = 50 mA/cm2

The minimum time interval between the stimuli signal in order to obtain another activation voltage is 14.75 ms. Based on the previous analyzes, we can assume that when we increase the current strength, this time interval will be decreased. To prove our hypothesis, we can increase the current amplitude to 200 uA/cm2, and the obtained voltage profile is shown in Figure 11.

Figure 11. Computed Membrane Action Potential and the Time Interval Between the Two Action Potential under I = 200 mA/cm2

The time difference is reduced to 7.85 ms, as we assumed. When we increase the amplitude to 500 uA/cm2, shown in Figure 12, the time difference is reduced to 5.25 ms.

Figure 12. Computed Membrane Action Potential and the Time Interval Between the Two
Action Potential under I = 500 mA/cm2

First observation that we can make is that the increase in the current strength cause a decrease in the time interval, which is expected with the same reason as in the previous case. Secondly, the decrease speed of the time interval is reducing with the increase in the current strength, which is also the same obtaining with the latter analyzes. There is another important finding that we obtained with this analyzes: the second stimulus has a slower increase profile than the first one. In order to understand the reason of this behaviors, we need to analyze the gating variables.

Figure 13. Activation Voltages and Gating Variables with Different Current Amplitudes

The activation voltages and gating variables are shown in Figure 13. It is seen that when the applied current strength is low, the activation speed of m is slower comparing the first stimulus. Moreover, due to the small time interval of high current strength scenario, not all the K+ channels can be closed, and this causes a spike observed in the voltage profile. In order to see how m gating variable behaves with longer time interval, analysis with 50 uA/cm2 is repeated with 17.75 ms time interval, and the obtained result is shown in Figure 14. It is seen that the time needed to activate the m gate is reduced with increased time interval. It means that besides the time interval needed to generate a second activation potential, there is a time needed to totally relax the m gate to obtain the same activation speed.

Figure 14: Activation Voltages and Gating Variables with Longer Time Interval Under I = 50 uA/cm2

Anode Break Excitation

All of the previous calculations are completed using the equal initial membrane and resting potential values, right? What happens when we decrease the initial membrane voltage, and make it lower than the resting potential? In order to see the behavior of our model, we decrease the membrane potential to -105 mV, and repeat the analysis with the square-wave shaped stimulation current, shown in Figure 15–16.

Figure 15. Computed Membrane Action Potential Using the Hodgkin-Huxley Method.
Figure 16. Computed Ionic Conductance and Currents Using the Hodgkin-Huxley Method.

We see something strange: the activation voltage is generated after the stimulus current is turned off! Moreover, the m gate is not activated fast, as in the previous case. In the original paper written by Hodgkin and Huxley, this process is described as follows:

The basis of the anode break excitation is that anodal polarization decreases the potassium conductance and removes inactivation of the sodium channel. These effects persist for an appreciable time so that the membrane potential reaches its resting value with a reduced outward potassium current and an increased inward sodium current. The total ionic current is therefore inward at V = 0 and the membrane undergoes a depolarization which rapidly becomes regenerative.

This process is called the anode-break excitation. The main mechanism that controls this process is the h gate. We see that the h gate starts with a value close to 0.6, which is its initial value; but then its value is increased up to 0.8 levels. After the stimulus ends, the h-gate value is started to decrease slowly. After the transmembrane voltage reach its resting state, the sodium current is larger than at rest because h gate has a larger value than its value at rest. This causes the depolarization of the membrane voltage more, then
it reaches its threshold level and creates the action potential. Besides the h gate, the value of n gate is also decreased, in other words n gate is closed during the hyperpolarizing stimulus, however the n gate is slightly faster than the h gate, the h gate is the main gate causes the anode-break excitation.

The Hodgkin-Huxley model remains a foundational pillar in neuroscience, offering profound insights into the electrical behavior of neurons. As we advance into an era where the integration of biological principles into technology becomes increasingly crucial, this model’s relevance extends beyond academic research into the burgeoning field of bioelectronics. Its detailed representation of ion channel dynamics makes it an invaluable tool for developing more effective neural prosthetics and brain-machine interfaces, which require precise manipulation of neural activity. Furthermore, as neuromorphic computing continues to evolve, the principles derived from the Hodgkin-Huxley model provide essential guidance for designing hardware that mimics neural processing capabilities. By bridging the gap between biological understanding and technological innovation, the Hodgkin-Huxley model not only enhances our grasp of neuronal function but also empowers the creation of advanced technologies that could transform medical treatments and computational paradigms!

--

--

Buse Bilgin
turkcell

Electronics Engineer || ML Enthusiast || R&D Engineer || Technology Follower