Skip to content
Snippets Groups Projects
Commit af22736a authored by Tim De Coster's avatar Tim De Coster
Browse files

started commenting on APqrPID3

parent e1b7560b
No related branches found
No related tags found
No related merge requests found
......@@ -46,8 +46,8 @@ IN:
*) noise_tresh The noise level that is allowed around the ideal value
before correcting
OUT:
*) Vout voltage that is used to inject the calculated amount
of current into the excitable system
*) Vout voltage that is used to power the LED driver that
regulates the light that is shined onto the cells
*/
/*
......@@ -411,27 +411,34 @@ OUT:
*/
void gAPqr8::initParameters()
{
Vm = -80; // mV
Cm = 150; // pF
Rm = 150; // MOhm
slope_thresh = 5.0; // mV
corr = 1;
Iout = 0;
output(0) = -Iout * 0.5e-3;
period = RT::System::getInstance()->getPeriod() * 1e-6; // ms
// system related parameters
systime = 0;
count = 0;
period = RT::System::getInstance()->getPeriod() * 1e-6; // ms
// cell related parameters
Vm = -80; // mV
Cm = 150; // pF
Rm = 150; // MOhm
// upstroke related parameters
slope_thresh = 5.0; // mV
V_cutoff = -40; // mV
// logging parameters
log_ideal_on = 0;
lognum = 3;
APs = -1;
count2 = 0;
// correction parameters
act = 0;
corr = 1;
noise_tresh = 2; // mV
Rm_corr_up=2;
Rm_corr_down=2;
noise_tresh = 2; // mV
BCL = 0;
count2 = 0;
APs = -1;
V_cutoff = -40;
BCL_cutoff = 0.98;
// standard loop parameters
count = 0;
enter = 0;
log_ideal_on = 0;
lognum = 3;
BCL = 0; // ms
BCL_cutoff = 0.98;
modulo = (1.0/(RT::System::getInstance()->getPeriod() * 1e-6)) * 1000.0;
Iout = 0; // pA
output(0) = -Iout * 0.5e-3;
}
......@@ -41,7 +41,6 @@ starts from the (X+1)-st AP onwards. This correction occurs with the use of
LED-controlled illumination on optogenetically modified cells.
IN:
*) Cm Capacitance of the cell
*) V_cutoff Threshold potential for the detection of the beginning
of an AP
*) Slope_tresh Slope threshold that defines the beginning of the
......@@ -49,14 +48,26 @@ IN:
*) BCL_cutoff Threshold value for the end of an AP, given as a
percentage of the total APD
*) lognum Number of APs that need to be logged as a reference
*) Rm Initial resistance
*) Rm_corr_up Factor to increase Rm with when necessary
*) Rm_corr_down Factor to decrease Rm with when necessary
*) noise_tresh The noise level that is allowed around the ideal value
before correcting
*) Rm_blue Initial resistance for the blue LED channel
*) Rm_red Initial resistance for the red LED channel
*) corr_start Gives the possibility to start at a later time than
the lognum+1-st AP with correcting the AP
*) Blue_Vrev Apparent reversal potential of the 'blue' ChR current
*) K_p Scale factor for the proportional part of the PID
*) K_i Scale factor for the integral part of the PID
*) K_d Scale factor for the derivative part of the PID
*) length Amount of points that need to be taken into account to
find the derivative (slope of the linear trend line of
these points)
*) PID_tresh treshold value under which the same output as before
gets repeated
*) min_PID value under which the lights get switched off
*) reset_I_on value that indicates whether or not to reset I at RMP
OUT:
*) Vout voltage that is used to inject the calculated amount
of current into the excitable system
*) VLED1 voltage that is used to power the first LED driver that
regulates the light that is shined onto the cells
*) VLED2 voltage that is used to power the second LED driver that
regulates the light that is shined onto the cells
*/
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment