Numerical Integration of Izhikevich and HH model neurons (Stewart and Bair 2009)

 Download zip file 
Help downloading and running models
Accession:117361
The Parker-Sochacki method is a new technique for the numerical integration of differential equations applicable to many neuronal models. Using this method, the solution order can be adapted according to the local conditions at each time step, enabling adaptive error control without changing the integration timestep. We apply the Parker-Sochacki method to the Izhikevich ‘simple’ model and a Hodgkin-Huxley type neuron, comparing the results with those obtained using the Runge-Kutta and Bulirsch-Stoer methods.
Reference:
1 . Stewart RD, Bair W (2009) Spiking neural network simulation: numerical integration with the Parker-Sochacki method. J Comput Neurosci 27:115-33 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism:
Cell Type(s): Hodgkin-Huxley neuron;
Channel(s):
Gap Junctions:
Receptor(s): AMPA; Glutamate;
Gene(s):
Transmitter(s): Gaba; Glutamate;
Simulation Environment: C or C++ program; MATLAB;
Model Concept(s): Simplified Models; Detailed Neuronal Models; Methods;
Implementer(s): Stewart, Robert [Robert.Stewart at pharm.ox.ac.uk];
Search NeuronDB for information about:  AMPA; Glutamate; Gaba; Glutamate;
% Injection current simulation function for Traub-Miles neuron
% Written by Dr Robert Stewart for Stewart & Bair, 2009
function [] = tm_inj(n_spikes,tols,n_tols,dt_vals,ip,fp)
  if(n_spikes==1)
    I_inj = 20; fp(9) = I_inj; %20 pA -> 1 spike
  elseif(n_spikes==10)
    I_inj = 52; fp(9) = I_inj; %52 pA -> 10 spikes
  end

  for(in_seed=1:10) %Use in_seed as repeat index
    disp(['Input Condition: ',num2str(in_seed)]);
    ps_only = 0; %use 1 for debugging ps code only
    ip(4) = int32(in_seed); ip(5) = int32(ps_only);
    for(cnd = 1:n_tols)
      disp(['Tolerance Condition: ',num2str(cnd)]);
    	%Set error tolerance and RK dt given condition
      tol = tols(cnd); dt_rk = dt_vals(cnd);
      fp(10) = tol; fp(11) = dt_rk;
      [PS_v,RK_v,BS_v,t_cpu] = tm_ps(fp,ip);
      all_PS_v(:,cnd)=PS_v;
      all_BS_v(:,cnd)=BS_v;
      all_RK_v(:,cnd)=RK_v;
      t_PS(in_seed,cnd)=t_cpu(1);
      t_BS(in_seed,cnd)=t_cpu(2);
      t_RK(in_seed,cnd)=t_cpu(3);
    end
    cnd=n_tols+1;
    tol=0; ps_only=1; fp(10) = tol; ip(5) = ps_only;
    [PS_v,RK_v,BS_v,t_cpu] = tm_ps(fp,ip);
    ref_v=PS_v*ones(1,cnd-1);
    t_ref(in_seed) = t_cpu(3);
    
    RK_err(in_seed,:) = mean(abs(all_RK_v-ref_v));
    BS_err(in_seed,:) = mean(abs(all_BS_v-ref_v));
    PS_err(in_seed,:) = mean(abs(all_PS_v-ref_v));  
    
    RK_per(in_seed,:) = 1./(RK_err(in_seed,:).*t_RK(in_seed,:))
    BS_per(in_seed,:) = 1./(BS_err(in_seed,:).*t_BS(in_seed,:))
    PS_per(in_seed,:) = 1./(PS_err(in_seed,:).*t_PS(in_seed,:))
  end
  n_neurons = ip(6);
  filename = ['tm_inj_results_',num2str(n_neurons),'_',num2str(n_spikes)]
  save(filename);
end