Unterabschnitte


Aufgabe 4: Leaky Integrate and Fire Neuron

[16 Punkte, ausgegeben am 19.4.2005, Abgabe bis 10.05.2005, pdf, ps.gz]

In dieser Aufgabe sollen Sie das Verhalten eines leaky-integrate and fire Neurons (LIF-Neuron) studieren. Sie sollen dazu den Simulator csim verwenden. Dazu müssen Sie die Datei csim.zip in Ihrem Arbeitsverzeichnis dekomprimieren (sie enthält die Dateien csim.dll für Windows und csim.mexglx für Linux).

a) Gain function eines LIF-Neurons (8 Punkte)

Verwenden Sie den unten angegebenen Programmkode um in ein LIF-Neuron einen konstanten Strom zur Zeit $ t=100$ ms zu injizieren (setzen Sie dazu USE_CONSTANT_CURRENT=1 und USE_SINUSOID_CURRENT=0).

b) Phase Locking (8 Punkte)

Verwenden Sie nun ein periodisches Sinus-Signal als Input (USE_SINUSOID_CURRENT=1). Der Sinus-Input schwingt mit 20 Hz.

Matlab Programm

Der folgende Matlab Code zeigt, wie man das oben beschriebene Setup in csim implementieren kann.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NNB SS05: lif_neuron.m
% Aufgabe 4
% Robert Legenstein
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

close all

clear all classes

%%%%%%%%%%%%%%%%%%%%%%%%%% NEURON PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%
Rm     = 1e6;  % Membrane resistance [Ohm]
Cm     = 3e-8; % Membrane capacity [Farad]
Inoise = 0;    % Inject noise current [nA]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%% INPUT DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%
USE_CONSTANT_CURRENT=1;
I_delay = 0.1;     % Delay of input current [sec]
I_duration = 0.8;  % Duration of input current [sec]
I_amp = 16;        % Amplitude of input current [nA]
Vthresh = -0.045;  % Threshold voltage [V]

USE_SINUSOID_CURRENT=0;
sin_f=10; % [Hz]
sin_amp = 5; %[nA]
sin_amp = 15; %[nA]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%SIMULATION PARAMETERS %%%%%%%%%%%%%%%%%%%%%%
Tsim   = 1;     % how long to simulate [sec]
dtRec = 0.5e-3; % Time step for recorders [sec]
dtSim = 0.1e-3; % Time step for simulator [sec]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


csim('set','dt',dtSim); 

% create an analog input neuron which provides a current step
input = csim('create','AnalogInputNeuron');

% create an I&F neurons
neuron = csim('create','LifNeuron');

% create an Analog Inpout Synapse
synapse = csim('create','StaticAnalogSynapse');

% set some neuron parameters
csim('set',neuron,...
     'Inoise',Inoise*1e-9,...
     'Rm',Rm,...
     'Cm',Cm,...
     'Trefract',5e-3,...
     'Vthresh', Vthresh);
     
% show neuron parameters
csim('get',neuron)

% set the synaptic weight
csim('set',synapse,'W',1);

% connect the neurons with the synapses
csim('connect',synapse,input);
csim('connect',neuron,synapse);

% set up to record the membran potential and the spikes
rec=csim('create','Recorder');
csim('set',rec,'dt',dtRec);
csim('connect',rec,neuron,'Vm');
csim('connect',rec,neuron,'spikes');

% set up input stimulus S
t=dtRec:dtRec:Tsim;

S.spiking = 0;
S.dt = dtRec;
S.idx = input;
S.data = zeros(1,ceil(Tsim/S.dt));

if USE_CONSTANT_CURRENT
  startIdx = ceil(I_delay/S.dt);
  endIdx = ceil((I_delay+I_duration)/S.dt);
  S.data(startIdx:endIdx)=I_amp*1e-9;
end
if USE_SINUSOID_CURRENT
  omega = sin_f*2*pi;
  S.data=sin_amp*1e-9*sin(t*omega) + sin_amp*1e-9;
end
% simulate the network
csim('reset');
csim('simulate',Tsim,S);

% get the results from the recorder
R=csim('get',rec,'traces');
vm=R.channel(1).data;   % membrane voltage of neuron 
st=R.channel(2).data;   % spike train of neuron 

% Number of spikes
nb_spikes = length(st);

fprintf('Number of spikes = %d\n',nb_spikes);

% plot the results in one figure
figure(1); clf reset;

% plot input current
subplot(3,1,1);
plot(t,S.data*1e9);
set(gca,'YLim',[min(S.data)*1e9 1.5*max(S.data)*1e9]);
title('Input Current [nA]','FontWeight','bold');

% plot membrane voltage
subplot(3,1,2);
plot(t,vm);
title('membrane voltage [V]','FontWeight','bold');

% plot spikes
subplot(3,1,3);
if ~isempty(st), line([st; st],1+[0.5; -0.5]*ones(1,length(st)),'Color','b'); end
set(gca,'XLim',[0 Tsim]);
title('spikes','FontWeight','bold');


Neuronale Netzwerke B (SS05), Rober Legenstein, 2005