You are on page 1of 9

BME 301 Lab 2: Integrate-and-Fire Model of An Excitable Cell

Gavin Ovsak

Objective
The objective of this lab was to extend the previously developed model of a neuron
membrane as an RC circuit to include the scientific phenomena of threshold voltages
causing action potential firings and refractory periods after firing.

Apparatus
Computational and Plotting Software: MATLAB

Procedure
The procedure in the lab handout was followed with no deviation.
Shifted the RC voltage response to account for a negative rest voltage
Added controls to cause a voltage firing once a threshold is reached
Compared firing frequency to the stimulated current

Calculation
2C. In order to modify the discrete equation from Lab 1 (Equation 1) to produce a non-zero
rest potential a modifying factor V_rest was introduced (Equation 2).
V (i + 1) = V (i) + t * (I(i)
Cm
V (i + 1) =

V (i)
Equation 1
CmRm )
I(i) V (i)V rest
V (i) + t * ( Cm CmRm ) Equation

2G. Using Equation 1, it was found that to make the voltage level off at 5mV, the applied
2
current needed to be 5mV
Rm = 0.0333A/m . Using the new equation and a V_threshold of -45mV,
the required current to reach the threshold was calculated to be
(V threshV rest)

= 45mVRm 65mV = 0.133A/m2 .


Rm
2I. In order to determine if the firing frequency is linearly dependant on the applied current,
linearity must be defined. A system is linear if the result of two signals inputted as a sum is
the sum of the the results of those two signals inputted on their own. The following is the
formula for the firing rate of the system given in Equation 2.
Based on the charging equation:

V thresh = I stimRm[1 etcharge/RmCm] + V rest tcharge = RmC mln(


f req(Hz) = t

charge+tpeak+trefractory

= R

V restV thresh
+1)+tpeak+trefractory
mCmln( I
stimRm

V restV thresh
IstimRm

+ 1)

Equation 3

Because of the logarithmic transformation on the input of I_stim, this function is not linear
and will not produce the sum of the result from two inputs when the inputs are summed
before being transformed.

Results
2C. Using the modified version of Equation 1 shown in Equation 2 which account for a
non-zero rest voltage of V_rest = -65mV, the following plot (Figure 1) was made to contrast
the difference in the voltage response to a fixed stimulus current with both the original and
shifted models. As you can see in Figure 1, the shift had no effect on the shape of the curve,
just the vertical displacement.

Figure 1: Voltage response shifted to have a non-zero rest potential


2G. Using the calculated minimum stimulus current of 0.133A/m2 needed to reach the
voltage threshold, voltage responses due to currents slightly under and slightly above that
minimum current were plotted alongside the applied currents (Figure 2).

Figure 2: Over and above threshold current and the voltage response.
2H. The firing rate for various stimulation currents was calculated by tabulating the number
of firings in a simulation which used converting to Hz. These values were plotted in Figure 3
and reveal a curve which levels off to a maximum frequency. With a 1ms stimulation period
and no refractory time, the maximum firing rate was 1000 Hz.

Figure 3: Firing frequency over stimulated current using no refractory period


2I. From inspection of the graph, the relationship between frequency and stimulation
current is non-linear. The slope of the curve starts off steep and then levels off to zero.
Linear functions have a constant slope, so this is non-linear.
2J. Real cells have a period of time during which it cant fire an action potential known as the
refractory period. By simulating this to be 1 ms, the new firing rate over stimulation current
was plotted in Figure 4. The maximum firing rate in this case was 500 Hz which could be
A
achieved with a current over 0.45 cm
2 .

Figure 3: Firing frequency over stimulated current using a 1 ms refractory period

Discussion
Action potentials propagate along axons membranes due to the selective permeabilities of
the ion channels, which hold back charged ions. These ion channels are voltage gated and so
they can be simulated by a voltage threshold which causes a temporary voltage spike once
the threshold voltage is reached. Also, membranes have been measured to have a non-zero
resting voltage, so including it in our model increases its fidelity. Finally, refractory periods
after action potentials ensure that action potentials only move in one direction along an
axon and are important to include in a model especially since it affects the calculated firing
rate for a given stimulation current. All of these phenomena were integrated into the matlab
model and it was observed that the relationship between firing frequency and stimulation
current was non-linear. This makes sense because Equation 3 relating firing frequency and
stimulation current is also non-linear.

Summary
By expanding the model of the neuron to include non-zero resting voltage, voltage
thresholded action potentials, and refractory times, not only can a neurons membrane
voltage be predicted with more accuracy, but also relationships like the one between

applied current and firing rate can be explored almost like an experiment. In this lab it was
found that the relationship between applied current and firing frequency is non-linear and
the firing frequency is decreased when refractory time is added.

Appendix
[# matlab #]

%{
===BME301Lab2:IntegrateandFireModelofAnExcitableCell===
Student:GavinOvsak(ggo3)
Teacher:WarrenM.Grill
%}

functionbme301lab2()

globaltaudelta_tmax_tRmCmVrestVpeakVthreshAP_lengthdur
Refractory_length
tau=0.0015
%timeconstant=Rm*Cm(s)
delta_t=0.000015
%timedelta(s)
max_t=0.015
%maxtime
Rm=1.5
%surfaceresistance(kOhms*cm^2)
Cm=0.001
%surfacecapacitance(mF/cm^2)
Vrest=0.065
%mV
Vpeak=0.06
%mV
AP_length=0.001
%s
Refractory_length=0.0
%s
dur=max_t

%PreviousLabsVoltageResponse
t1=0:delta_t:dur
%timearray
V1=zeros(1,numel(t1))
%voltagearray(V)
V2=zeros(1,numel(t1))
%voltagearray(V)
I1=zeros(1,numel(t1))
%currentarray(A)
I1(1:(numel(t1)1))=(0.005)/Rm

for
i=1:(numel(t1)1)
V1(i+1)=V1(i)+delta_t*(I1(i)/CmV1(i)/(Cm*Rm))
end

%PartC
%Plotofoldchargingcurveandnewshiftedchargingcurve
figure(1)

Vthresh=1
%mV
subplot(1,2,1)
plot(t1,V1,t1,testVoltageResponse(0.005/Rm))
legend(
'Original'
,
'Shifted'
)
xlabel(
'Time(s)'
)
ylabel(
'Voltage(V)'
)
title(
'VoltageovertimeforachargingRCcircuit'
)

subplot(1,2,2)
plot(t1,I1)
xlabel(
'Time(s)'
)
ylabel(
'Current(A)'
)
title(
'CurrentovertimeforachargingRCcircuit'
)

%PartG
%Plotofvoltageresponsefromunderthresholdcurrentand
overthreshold
%current
figure(2)
Vthresh=0.045
%mV
I_below=(VthreshVrest0.001)/Rm
I_above=(VthreshVrest+0.001)/Rm

subplot(1,2,1)
plot(t1,testVoltageResponse(I_below),...
t1,testVoltageResponse(I_above))
legend(
'BelowThreshold'
,
'AboveThreshold'
)
xlabel(
'Time(s)'
)
ylabel(
'Voltage(V)'
)
title(
'Voltageovertime'
)

subplot(1,2,2)
plot(t1,I_below,t1,I_above)
legend(
'BelowThreshold'
,
'AboveThreshold'
)
xlabel(
'Time(s)'
)
ylabel(
'Current(A)'
)
title(
'Currentovertime'
)

%PartH
%Plotoffiringfrequencyvsstimulationcurrent
%current
figure(3)

I_thresh=(VthreshVrest)/Rm
I_stims=I_thresh:0.001:(I_thresh+1)
frequencies=zeros(1,numel(I_stims))
for
i=1:numel(I_stims)
[VoutnumPeaks]=testVoltageResponse(I_stims(i))
frequencies(i)=numPeaks
end

plot(I_stims,frequencies)
axis([I_thresh(I_thresh+1)016])
xlabel(
'StimulationCurrent(A)'
)
ylabel(
'Numberoffirings'
)
title(
'FrequencyOveraRangeofStimulationCurrent'
)

%PartJ
%Plotoffiringfrequencyvsstimulationcurrentwithrefractory
period
%current
figure(4)

Refractory_length=0.001
%s
I_thresh=(VthreshVrest)/Rm
I_stims=I_thresh:0.001:(I_thresh+1)
frequencies=zeros(1,numel(I_stims))
for
i=1:numel(I_stims)
[VoutnumPeaks]=testVoltageResponse(I_stims(i))
frequencies(i)=numPeaks
end

plot(I_stims,frequencies)
axis([I_thresh(I_thresh+1)016])
xlabel(
'StimulationCurrent(A)'
)
ylabel(
'Numberoffirings'
)
title(
'FrequencyOveraRangeofStimulationCurrent'
)
end

function[Vout,numPeaks]=testVoltageResponse(Istim)
globaltaudelta_tmax_tRmCmVrestVpeakVthreshAP_lengthdur
Refractory_length

t1=0:delta_t:dur
%timearray
Vout=zeros(1,numel(t1))
%voltagearray(V)
I1=zeros(1,numel(t1))
%currentarray(A)

I1(1:(numel(t1)1))=Istim
numPeaks=0

startPeak=100
atPeak=false
Vout(1)=Vrest
%mV

for
i=1:(numel(t1)1)
ifi>1&&Vout(i)>=Vthresh&&Vout(i1)<Vthresh
startPeak=i
atPeak=true
numPeaks=numPeaks+1

end
ifi<=startPeak+AP_length/delta_t
Vout(i+1)=Vpeak
elseifi<=startPeak+(AP_length+
Refractory_length)/delta_t||atPeak
Vout(i+1)=Vrest
atPeak=false
else
Vout(i+1)=Vout(i)+delta_t*(I1(i)/Cm(Vout(i)
Vrest)/(Cm*Rm))

end

end
end

[# end #]

You might also like