Permalink
Browse files

Tuned the parameters of both the thalammic and the cortical column.

Increased g_KLeak to and g_KNa to counteract excitation from the other
column.

Signed-off-by: Schellenberger <schellenberger@inb.uni-luebeck.de>
  • Loading branch information...
1 parent 1e80959 commit b409096462c5522a0ab5e4069deb722ec9c49a70 @miscco committed Aug 21, 2014
Showing with 64 additions and 107 deletions.
  1. +3 −4 Cortical_Column.h
  2. +0 −59 Figures.m
  3. +34 −22 Plots.m
  4. +18 −13 Stimulation.h
  5. +9 −9 Thalamic_Column.h
View
@@ -55,8 +55,7 @@ class Cortical_Column {
{set_RNG();}
Cortical_Column(double* Par, double* Con)
- :sigma_e (Par[0]), alpha_Na (Par[1]), tau_Na (Par[2]), g_KNa (Par[3]),
- dphi (Par[4]),
+ :sigma_e (Par[0]), g_KNa (Par[1]), dphi (Par[2]),
N_te (Con[2]), N_ti (Con[3])
{set_RNG();}
@@ -142,7 +141,7 @@ class Cortical_Column {
/* parameters of the firing adaption */
const double alpha_Na = 2; /* Sodium influx per spike in mM ms */
- const double tau_Na = 1.2; /* Sodium time constant in ms */
+ const double tau_Na = 1; /* Sodium time constant in ms */
const double R_pump = 0.09; /* Na-K pump constant in mM/ms */
const double Na_eq = 9.5; /* Na-eq concentration in mM */
@@ -152,7 +151,7 @@ class Cortical_Column {
const double gamma_i = 58.6E-3;
/* Axonal flux time constant */
- const double nu = 60E-3;
+ const double nu = 120E-3;
/* Conductivities in mS/cm^-2 */
/* Leak */
View
@@ -1,59 +0,0 @@
-% mex command is given by:
-% mex CXXFLAGS="\$CXXFLAGS -std=c++0x" TC.cpp Cortical_Column.cpp Thalamic_Column.cpp
-
-function Figures(T)
-
-if nargin == 0
- Input_N3 = [ 8.7; % sigma_e
- 2.6; % alpha_Na
- 3; % tau_Na
- 1.6; % g_KNa
- 60E-3]; % dphi
-
-
- Input_N2 = [ 4.6; % sigma_e
- 2; % alpha_Na
- 1.2; % tau_Na
- 1.33; % g_KNa
- 60E-3]; % dphi
-
- Connectivity= [2; % N_et
- 2; % N_er
- 4; % N_te
- 4]; % N_ti
-
- % stimulation parameters
- % first number is the mode of stimulation
- % 0 == none
- % 1 == periodic
- % 2 == phase dependend up state
- % 3 == phase dependend down state
-
- var_stim = [ 1; % mode of stimulation
- 40; % strength of the stimulus in Hz (spikes per second)
- 50; % duration of the stimulus in ms
- 5; % time between stimuli in s
- 0]; % time until stimuli after min in ms
-
- T = 30; % duration of the simulation
-end
-
-[Ve_N2, Vt_N2] = TC(T, Input_N2, Connectivity, var_stim);
-
-[Ve_N3, Vt_N3] = TC(T, Input_N3, Connectivity, var_stim);
-
-L = max(size(Vt));
-timeaxis = linspace(0,T,L);
-
-figure(1)
-subplot(211), plot(timeaxis,Ve_N2)
-title('Pyramidal membrane voltage'), xlabel('time in s'), ylabel('Ve in mV')
-subplot(212), plot(timeaxis,Vt_N2)
-title('Thalamic relay membrane voltage'), xlabel('time in s'), ylabel('Vt in mV')
-
-figure(2)
-subplot(211), plot(timeaxis,Ve_N3)
-title('Pyramidal membrane voltage'), xlabel('time in s'), ylabel('Ve in mV')
-subplot(212), plot(timeaxis,Vt_N3)
-title('Thalamic relay membrane voltage'), xlabel('time in s'), ylabel('Vt in mV')
-%save('TC.mat','Ve','Vt')
View
56 Plots.m
@@ -1,26 +1,22 @@
% mex command is given by:
-% mex CXXFLAGS="\$CXXFLAGS -std=c++0x" TC.cpp Cortical_Column.cpp Thalamic_Column.cpp
+% mex CXXFLAGS="\$CXXFLAGS -std=c++11" TC.cpp Cortical_Column.cpp Thalamic_Column.cpp
function Plots(T)
if nargin == 0
- Input_N3 = [ 8.7; % sigma_e
- 2.6; % alpha_Na
- 3; % tau_Na
- 1.6; % g_KNa
- 60E-3]; % dphi
+ Input_N3 = [ 6.5; % sigma_e
+ 2.1; % g_KNa
+ 120E-3]; % dphi
- Input_N2 = [ 4.6; % sigma_e
- 2; % alpha_Na
- 1.2; % tau_Na
- 1.33; % g_KNa
- 60E-3]; % dphi
-
- Connectivity= [2.5; % N_et
- 2.5; % N_er
- 4; % N_te
- 4]; % N_ti
+ Input_N2 = [ 4.7; % sigma_e
+ 1.5; % g_KNa
+ 120E-3]; % dphi
+
+ Connectivity= [2.4; % N_et
+ 2.5; % N_er
+ 5; % N_te
+ 5]; % N_ti
% stimulation parameters
% first number is the mode of stimulation
@@ -30,22 +26,38 @@ function Plots(T)
% 3 == phase dependend down state
var_stim = [ 0; % mode of stimulation
- 40; % strength of the stimulus in Hz (spikes per second)
- 150; % duration of the stimulus in ms
- 5; % time between stimuli in s
- 0]; % time until stimuli after min in ms
+ 60; % strength of the stimulus in Hz (spikes per second)
+ 100; % duration of the stimulus in ms
+ 5; % time between stimuli in s
+ 650]; % time until stimuli after negativ peak in ms
T = 30; % duration of the simulation
end
-[Ve, Vt] = TC(T, Input_N2, Connectivity, var_stim);
+[Ve, Vt, Marker_Stim] = TC(T, Input_N2, Connectivity, var_stim);
L = max(size(Vt));
timeaxis = linspace(0,T,L);
figure(1)
subplot(211), plot(timeaxis,Ve)
title('Pyramidal membrane voltage'), xlabel('time in s'), ylabel('Ve in mV')
+% vertical line for markers
+%hx = graph2d.constantline(Marker_Stim(3,:));
+%changedependvar(hx,'x');
+
subplot(212), plot(timeaxis,Vt)
title('Thalamic relay membrane voltage'), xlabel('time in s'), ylabel('Vt in mV')
-%save('TC.mat','Ve','Vt')
+% vertical line for markers
+%hx = graph2d.constantline(Marker_Stim(3,:));
+%changedependvar(hx,'x');
+
+
+% [Pxx,f] = pwelch(Ve-mean(Ve),[], [], [], L/T);
+% n = find(f<=30, 1, 'last' );
+%
+% figure(2)
+% plot(f(1:n),log(Pxx(1:n)))
+% title('Powerspectrum with pwelch'), xlabel('frequency in Hz'), ylabel('Power (log)')
+% save('Timeseries', 'Ve', 'Vt');
+end
View
@@ -49,20 +49,23 @@ class Stim {
/* Mode of stimulation */
mode = (int) var_stim[0];
- /* Scale the stimulation strength from s^-1 to ms^-1 */
+ /* Scale the stimulation strength from s^-1 (Hz) to ms^-1 */
strength = var_stim[1] / 1000;
/* Scale duration from ms to dt */
duration = (int) var_stim[2] * res / 1000;
- /* Scale the ISI from s to ms^-1 */
+ /* Scale the ISI from s to ms */
ISI = (int) var_stim[3] * res;
/* Scale time to stimulus from ms to dt */
time_to_stim= (int) var_stim[4] * res / 1000;
+ /* Set the onset correction for the marker */
+ correction = onset * res;
+
if(mode==1) {
- time_to_stim = (onset+1) * res;
+ time_to_stim = (int) (onset+1) * res;
}
correction = onset * res;
@@ -80,7 +83,7 @@ class Stim {
/* Periodic stimulation */
case 1:
- /* Check if time is reached */
+ /* Check if stimulation time is reached */
if(time == time_to_stim) {
/* Switch stimulation on */
stimulation_started = true;
@@ -89,7 +92,7 @@ class Stim {
/* Update the timer */
time_to_stim += ISI;
-
+ /* Add marker */
marker_threshold.push_back(0);
marker_minimum.push_back(0);
marker_stimulation.push_back(time - correction);
@@ -181,15 +184,17 @@ class Stim {
/* Create MATLAB container for marker storage */
mxArray* get_marker(void) {
+ extern const int res;
mxArray* Marker = mxCreateDoubleMatrix(0, 0, mxREAL);
mxSetM(Marker, 3);
mxSetN(Marker, marker_stimulation.size());
mxSetData(Marker, mxMalloc(sizeof(double)*3*marker_stimulation.size()));
double* Pr_Marker = mxGetPr(Marker);
for(unsigned i=0; i<marker_stimulation.size(); ++i) {
- Pr_Marker[0+i*3] = marker_threshold[i];
- Pr_Marker[1+i*3] = marker_minimum[i];
- Pr_Marker[2+i*3] = marker_stimulation[i];
+ /* Division by res transforms marker time from sample rate to sec */
+ Pr_Marker[0+i*3] = marker_threshold[i]/res;
+ Pr_Marker[1+i*3] = marker_minimum[i]/res;
+ Pr_Marker[2+i*3] = marker_stimulation[i]/res;
}
return Marker;
}
@@ -205,10 +210,10 @@ class Stim {
int ISI = 5E4;
/* Threshold for phase dependent stimulation */
- double threshold = -80;
+ double threshold = -70;
/* Time until stimulus after minimum was found */
- int time_to_stim = 5500;
+ int time_to_stim = 900;
/* Mode of stimulation */
/* 0 == none */
@@ -246,9 +251,9 @@ class Stim {
Thalamic_Column* Thalamus;
/* Data containers */
- std::vector<int> marker_threshold;
- std::vector<int> marker_minimum;
- std::vector<int> marker_stimulation;
+ std::vector<double> marker_threshold;
+ std::vector<double> marker_minimum;
+ std::vector<double> marker_stimulation;
};
/****************************************************************************************************/
/* end */
View
@@ -154,18 +154,18 @@ class Thalamic_Column {
const double theta_r = -58.6;
/* Sigmoid gain in mV */
- const double sigma_t = 2;
- const double sigma_r = 2;
+ const double sigma_t = 4;
+ const double sigma_r = 4;
/* Scaling parameter for sigmoidal mapping (dimensionless) */
const double C1 = (3.14159265/sqrt(3));
/* PSP rise time in ms^-1 */
const double gamma_e = 70E-3;
- const double gamma_i = 58.6E-3;
+ const double gamma_i = 100E-3;
/* axonal flux time constant */
- const double nu = 60E-3;
+ const double nu = 120E-3;
/* Conductivities in mS/cm^-2 */
/* Leak current */
@@ -174,14 +174,14 @@ class Thalamic_Column {
/* Potassium leak current */
const double g_LK_t = 0.025;
- const double g_LK_r = 0.02;
+ const double g_LK_r = 0.025;
/* T current */
const double g_T_t = 3;
const double g_T_r = 2;
/* h current */
- const double g_h = 0.06;
+ const double g_h = 0.08;
/* Reversal potentials in mV */
/* Synaptic */
@@ -216,14 +216,14 @@ class Thalamic_Column {
/* Noise parameters in ms^-1 */
const double mphi = 0E-3;
- const double dphi = 20E-3;;
+ const double dphi = 10E-3;;
double input = 0.0;
/* Connectivities (dimensionless) */
- const double N_tr = 5;
+ const double N_tr = 6;
const double N_rt = 5;
- const double N_rr = 50;
+ const double N_rr = 100;
const double N_et = 10;
const double N_er = 10;

0 comments on commit b409096

Please sign in to comment.