# Estimating Time-Varying Applied Current in the Hodgkin-Huxley Model
## 1 Introduction  
The Hodgkin-Huxley model is a classical system of differential equations that is widely used for understanding the electrophysiological dynamics of a single neuron [1]. The model is based on a simple circuit analogy, where each piece of the circuit corresponds to an electrophysiological component, representing the resistance of an electrically charged ion channel as a function of time and voltage [2, 3]. While the Hodgkin-Huxley equations can be used to model the total current resulting from an applied voltage, the model can also be used to predict voltage given an externally applied current. The latter is particularly useful in experimental settings where voltage measurements are obtainable, making it possible to estimate the applied current based on observed voltage data [4, 5]. In this setting, the applied current can be thought of as a synaptic input stimulus received by a single neuron. It is common in in-vitro experimental setups to inject a known current (typically a constant or pulse) into the cell and measure voltage using patch-clamp recordings [4] or imaging procedures [6]. However, information regarding the input current is generally more difficult to obtain, e.g., for synaptic stimuli from multiple neurons in a neural circuit [5], or in in-vivo settings where the current is either unavailable or must be inferred from external stimuli [4]. It therefore remains an important challenge to estimate the underlying input current given experimentally obtainable measurements of voltage. While applying a low-amplitude constant current to the system results in a single voltage spike, it is possible to obtain multiple voltage spikes by increasing the magnitude of the constant current or by applying time-varying currents. The work in this paper focuses on the application of various deterministic, time-varying currents to the Hodgkin-Huxley system. More specifically, the aim of thiswork is to estimate time-varying applied currents of different deterministic functional forms given noisy measurements of voltage. To tackle this inverse problem, we utilize an augmented ensemble Kalman filter (EnKF) with parameter tracking to estimate the Hodgkin-Huxley model states and time-varying applied current parameter. Various methods have been used in the literature to estimate certain constant (or static) parameters in the Hodgkin-Huxley equations; see, e.g., [7; 8; 9; 10]. Our goal is to estimate the applied current, which we treat as an unknown, time-varying system parameter. In particular, we consider the case when this parameter is unmeasurable with unknown dynamics, with the aim of obtaining a time series approximation. Previous work estimating time-varying currents in Hodgkin-Huxley-type models includes use of a linearized reconstruction approach to approximate single-step and periodic stimuli [11] and use of an unscented Kalman filter to track single-step and sinusoidal currents along with unobserved intracellular components [5]. In this work we employ an augmented EnKF with parameter tracking. The EnKF is particularly useful for the problem at hand due to the sequential nature of the algorithm's updating scheme, which corrects the model prediction with the available data one point at a time [12; 13]. If the time-varying parameter changes more slowly than the system dynamics, parameter tracking allows the filter to capture the change in the parameter over time using a random walk [14; 15; 16]. Further, since unknowns are treated as random variables in the Bayesian framework, there is a natural measure of uncertainty in the resulting parameter estimates, which lies in the estimated ensemble covariances of the underlying posterior probability distributions [17; 18].