Observer Design for the Hodgkin-Huxley Neuronal Model

Hodgkin-Huxley (HH) neuronal model has been widely accepted neuronal model in neuroscience. The variation of the ionic currents in neuron cell causes the variations in the membrane potential. The level of membrane potential indicates the activation and inactivation dynamics. In this paper, in order to observe the unmeasurable states and parameters of HH neuron accurately, Runge-Kutta discretization based nonlinear observer is designed. In numerical simulations, the membrane potential is measured and the ionic currents are estimated. The numerical results provide accurate estimation results that can be used both in monitoring and control of neuron dynamics.


Introduction
Mathematical model of a biological system presents an understanding for the behavior of the system.Recently, mathematical models of the bacteria populations, diseases, microbiological organisms and nerve cells have increasing applications for biology, medicine, biomedical, neuroscience fields.In this work, we have interested on Hodgkin-Huxley neuronal model.In general, nervous systems have very complex structures with largely interconnected neuron cells.These neurons carry out the computational and communication tasks with electrical potentials.The charge ionic distribution of the neuron cell generates of the electrical potential on the membrane potential.When a membrane has enough action potential, then firing threshold can be reached then there exist spikes on the membrane voltage [1].The communication with neighbouring neurons or the information patterns stored on the neurons are occurred based on this membrane potential such that the control of the membrane potential by ionic currents is an important subject of the neuroscience and biomedical engineering.
In neuroscience, Hodgkin-Huxley (HH) model is a first introduced model of the neuron cell [2].The mathematical model of the HH model explaining the relations between membrane potential and ion channels is experimentally constructed using the electrical behavior of the giant axon in squad.In fact, it is a five state model that are the membrane potential and four ion channel currents modelled as an electrical circuit.Based on the HH model, there are developed electrical circuits to realize its behavior and stimulate under different conditions.At the same time, in order to produce practical and implementable neuron model, different neuron models are developed based on the HH model such as namely FitzHugh Nagumo model (FHN), Morris-Lecar model, Hindmarsh-Rose model and etc. [1].In order to analyse the behaviour of neuron models, some of models are realized using electronic components [3]- [5] Nonlinear observers have been used for considerably amount of applications in the subject of such as state estimation, parameter estimation, fault detection and isolation, disturbance estimation, unknown input estimation and other applications.Therefore, in literature, various types of the nonlinear observers can be found for a specific application.As a leading work on state observers have been first published for linear systems [6], and then extended for nonlinear systems [7].With the requirements on the state estimation, there have introduced several nonlinear observers such as extended-Luenberger observer [8], extended-Kalman filter [9], sliding-mode observer [10], [11], high-gain observer [12], Takagi-Sugeno fuzzy observers [13], Runge-Kutta observer [14]- [16] etc.The nonlinear observers mentioned above are based on the mathematical model of the nonlinear system.
In this study, some of nonlinear observers are chosen to estimate the states of HH neuronal model.For the HH neuronal model, the membrane potential is assumed to be measurable but the currents or auxiliary variables are assumed to unmeasurable.The aim is to estimate the unmeasurable states of the HH neuron model for an observer based future work such as in neuroscience medicine; there exist some mental diseases to treat using external stimulus of the nerve cells.The designed observers are selected purposely such that extended Kalman filter (EKF), sliding-mode observer (SMO), and discretization based gradient observer (DBGO).The chosen and designed nonlinear observers are applied to estimate the states of the HH neuron model then estimation results are plotted and root-mean squared errors (RMSE) are given in Table .As a general result, state estimation results are accurately obtained for the HH neuronal model of future applications in neuroscience, biomedical engineering and medicine.This paper is organized as follows: In Section 2, nonlinear observers, which are designed here, are explained in detail.Section 3 presents the Hodgkin-Huxley neuron model with mathematical dynamics.The Section 4 illustrates the state estimation results of the HH neuronal model using designed nonlinear observers.The discussions about the design conditions and application results of the observers are given in Section 5.

Nonlinear Observers
Consider a nℎ order continuous-time nonlinear multi-input where () ∈ X ⊂ ℜ N is the state vector, () ∈ U ⊂ ℜ R is the vector of measured control inputs and () ∈ ℜ  is the vector of outputs measurements.Nonlinear dynamics are subject to state and input constraints written as It is assumed that the functions   (. ) and   (. ) [ = 1, … , ,  = 1, … , ] are known and continuously differentiable with respect to the control inputs and the state variables and also the state variables are not available for measurement.The problem is to get the estimates  ̂() of the unmeasured states of the system (1) by using only the available input and output measurements.
The nonlinear system is given in Eq. ( 1) is discretized to get samples from the time instants.The Runge-Kutta (RK) discretization method is adopted for obtaining discretized models of the continuous-time nonlinear system.The states and the output values of the system which belong to the next sampling time as in compact form can be predicted as where where it is called as the discretized model of the continuous-time system.For a Lipschitz nonlinear system the stability of RK discretization is shown using sufficiently small step size [17].

Extended Kalman Filter
The EKF uses a recursive algorithm consisting of two parts namely prediction and measurement correction [9].Consider the following state-space model of a discretized nonlinear dynamic system of (1) the states of which are to be estimated, where [] is a N-dimensional state vector, [] ∈ ℜ R is the vector of input signals and [] ∈ ℜ  is the vector of output signals.In (6), (. ) is the discrete model of the nonlinear system.The random variables  and  represent the process and measurement noises, respectively, which are assumed to have independent and normal probability distributions with zero mean.Moreover, they have uncorrelated  and  noise covariance matrices.In the measurement correction stage a posteriori state estimates  ̂[] and the a posteriori error [] are calculated using current measurements and the observer model.Thus, error covariance of the estimator is minimized.Time update equations for prediction stage are as follows, Similarly, measurement update equations related to correction stage are, where These matrices, which are updated at every sampling time, are used recursively in prediction and correction update equations of the EKF.

Sliding Mode Observer
The sliding-mode observers are known for robustness to uncertainties and finite-time convergence properties [10], [11].SMOs construct a sliding-motion of output estimation error between the measured system output and observer output.There are some applications of the SMOs for state and parameter estimation of nonlinear systems [18], [19].One of the states is measured and the estimated states are corrected using measurement error in a switching function and multiplying by a feedback constant.For the state estimation of nonlinear system (1), classical sliding-mode observer is designed as follows.
).The constants ℎ  's are chosen to ensure the asymptotical decay of the estimation error and the constants   's are the design parameters for switching of the sliding surface.Then, the estimation error dynamics of th-order are given by the following equation: =  ̂−  is assumed to be bounded as   ≥ ||.The asymptotic convergence and stability conditions are given [10], [11].

Discretization Based Gradient Observer
The discretization based gradient observer (DBGO) has the same structure as given in (3).The nonlinear functions  and  are approximated using estimated states.When the gradient observer approximates accurately the real values, then states converges correctly to real states.However, the estimated states is achieved using current output measurement error in gradient-descent method as where term, which plays a crucial role in the DBGO structure, is obtained by using the discretized model.Derivative components of the jacobian matrix can be extracted using time update of the RK based discretized model.Thus, the merit of the gradient observer has been exploited in the exact jacobian calculation.The jacobian matrix of the output is followed as where and partial derivative components required in Eq. ( 15 Using the jacobian matrix of the states and Levenberg-Marquadt direction, the DBGO state updates are performed as where  is  ×  identity matrix, and change of the states is ) For bounded input case of the nonlinear DBGO, convergence was proved in [15].

Hodgkin-Huxley Neuronal Model
The Hodgkin-Huxley (HH) model is a mathematical model that describes how action potentials in neurons are initiated and propagated [2].HH model defines the electro-physiological behavior of a neuron.The interoperability of neuron's is important for memory, calculation, motion control and diseases such as epilepsy.Also, synchronized activity and temporal correlation are fundamental tools for encoding and exchanging information for neuronal information processing in the brain [2].It is a set of nonlinear ordinary differential equations that approximates the electrical characteristics of excitable cells.The basic single HH neuron is described by a Markov model as a set of nonlinear ODEs:  ̇= −   3 ℎ( −   ) −    4 where  is the membrane capacitance and  is the membrane potential., ℎ,  are the gating variables.They represent the activation of the sodium flow current, the inactivation of the sodium flow current and activation of the potassium flow current, respectively.The spikes are generated with very low current levels.The explicit form of the functions   (),  ℎ (),   (),   (),  ℎ () and   (), which describes the transition rates between open and closed states of the channels in Eq. ( 19), are given below: The gating variables are described the probability for appropriate gate to be open.Therefore, these variables take values between 0 and 1, where 0 means that the gate is closed, and 1 means that the gate is open.The parameters of the single neuron based on the HH model are given in Table 1..An example of chaotic dynamics of the HH neuronal model is shown in Fig. 1 for initial conditions  = 0,  = 0.0529, ℎ = 0.5961 and  = 0.3177 with sampling period   = 0.01.

Numerical Results
In this section, the state estimation results are plotted separately and a comparative table is shown to discuss the estimation performances of nonlinear observers in root-mean squared errors (RMSE).The main goal of the study is to provide accurate state estimation results for HH neuronal model using different nonlinear observers.At the same time, we have chance to compare and discuss the observer's estimation capability.In order to get fair estimation results, the observers are initialized with same states and the parameters observers are tuned to get best estimation results for each designed observer.For the HH neuronal model, EKF observer based state estimation results are obtained and presented in Figure 4, respectively.It is seen that the EKF is slower than the DBGO and SMO.The design parameters of the EKF are determined through grid search as follows: 0 = 10 −2  4 ,  = 0.1 4 , and R = 10 −1 , respectively.

Conclusion
The designed nonlinear observers can be discussed and compared addressing the design conditions and performance results.The design conditions are mostly about the parameter selection and updating rule of the designed observer.If we want to order the designed nonlinear observers here about structural complexity, the simplest one is the SMO observer, which is designed as a classical sliding mode observer in this study.Beside its simple structure of classical SMO, there is faced very difficult parameter selection problem.For a four state system estimation, there is required to define eight parameters.Second observer is the DBGO observer here which has a complex state updating rule is based on the gradient update.The advantage of the DBGO is that there is no parameter tuning for a state estimation.On the other hand, there is needed to define Jacobian matrix and detailed update rule based on the RK discretization.Third observer is the EKF.EKF has a parametric structure where the estimation accuracy depends on the choice of process and measurement noise covariance matrices.Finally, we can rank the sensing algorithms from the one having the simplest structure to the most complex one as SMO, DBGO, EKF, respectively.
In order to compare the performance of the designed observers for state estimation results of HH neuronal model the Table 2 can be seen in detail.In the experiments, SMO exhibits better estimation performance than EKF.This is mainly because SMO exhibits robustness to the parameter uncertainties such that there could be uncertain or un-modeled dynamics of the systems.Moreover, DBGO does not need parameters which rectify the error dynamics where Levenberg-Marquardt direction is chosen for the faster convergence.There is an important difference between DBGO observer and other observer results in the Table 2.The second order gradient direction of the DBGO observer makes very fast the observer dynamics.However, it has a lack of robustness since any tiny change in the dynamics affect the observer performance.As a general result, if we want to design a feedback controller or an online fault estimator, we need to check the model uncertainty and noise existence.If there is small unmodeled dynamics, the DGBO is a suitable selection.In the case of noise and uncertainty, the SMO must be chosen.

Figure 1 .
Figure 1.Membrane potential  vs sodium flow current .

a)
Membrane potential () estimate (mV) b) Activation of the sodium flow current () estimate c) Inactivation of the sodium flow current (ℎ) estimate d) Activation of the potassium flow current () estimate

Figure 2 .Fig 2 Figure 3 .
Figure 2. DBGO estimation results for Hodgkin-Huxley neuronal model.Fig 2 presents state estimation results using DBGO.The estimation results are very accurate for all four states such that the estimated states are rapidly converging to the real neuron states which are promising to use for real-time control studies.
̂[] is state estimation vector, [] and [] matrices are Kalman gain and error covariance matrices, respectively.It is assumed that the functions  ̂(. ) and (. ) are differentiable with respect to  and  parameters where [] and [] matrices are the Jacobian matrices as ̂[] is the state estimate,  ̂[n] is the output estimate.Quadratic cost function of estimation is defined as [] = .When the output estimation error is defined as [] = [] −  ̂[n], the gradient of the cost function with respect to state estimate is ∂

Table 1 .
Model variables and parameters

Table 2 :
Comparison results of designed observersThe numerical simulations are summarized in Table2for the HH neuronal model.The RMSE errors of the estimations are similar with figures.It is seen that the DBGO observer is much better than both SMO and EKF for the model based neuronal model state estimations.DBGO observer is based on the mathematical model of the system such that there is no parameter to adjust.However, SMO and EKF are difficult to design.Neuronal model has fast dynamics and the states have small values.Therefore, it is one of the difficulties for parameter adjustment and the selection of sampling time in integration routine.