Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
APqr Final
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
De Coster
APqr Final
Commits
af22736a
Commit
af22736a
authored
2 years ago
by
Tim De Coster
Browse files
Options
Downloads
Patches
Plain Diff
started commenting on APqrPID3
parent
e1b7560b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
APqr8/APqr8.cpp
+26
-19
26 additions, 19 deletions
APqr8/APqr8.cpp
APqrPID3/APqrPID3.cpp
+19
-8
19 additions, 8 deletions
APqrPID3/APqrPID3.cpp
with
45 additions
and
27 deletions
APqr8/APqr8.cpp
+
26
−
19
View file @
af22736a
...
...
@@ -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 amoun
t
of current into the excitable system
*) Vout voltage that is used to
power the LED driver tha
t
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
;
}
This diff is collapsed.
Click to expand it.
APqrPID3/APqrPID3.cpp
+
19
−
8
View file @
af22736a
...
...
@@ -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
*/
/*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment