Definition at line 51 of file VClamp.h.
const Cinfo * VClamp::initCinfo |
( |
| ) |
|
|
static |
Definition at line 68 of file VClamp.cpp.
References currentOut(), getCommand(), getCurrent(), getGain(), getMode(), getTau(), getTd(), getTi(), getVin(), Neutral::initCinfo(), process(), reinit(), setCommand(), setGain(), setMode(), setTau(), setTd(), setTi(), setVin(), and vclampCinfo.
71 "Handles 'process' call on each time step.",
74 "Handles 'reinit' call",
76 static Finfo * processShared[] = {
82 "Shared message to receive Process messages from the scheduler",
83 processShared,
sizeof(processShared) /
sizeof(
Finfo*));
86 "Command input received by the clamp circuit.",
90 "Working mode of the PID controller.\n"
92 " mode = 0, standard PID with proportional, integral and derivative"
93 " all acting on the error.\n"
95 " mode = 1, derivative action based on command input\n"
97 " mode = 2, proportional action and derivative action are based on"
102 "Integration time of the PID controller. Defaults to 1e9, i.e. integral"
103 " action is negligibly small.",
108 "Derivative time of the PID controller. This defaults to 0,"
109 "i.e. derivative action is unused.",
113 "Time constant of the lowpass filter at input of the PID"
114 " controller. This smooths out abrupt changes in the input. Set it to "
115 " 5 * dt or more to avoid overshoots.",
119 "Proportional gain of the PID controller.",
123 "The amount of current injected by the clamp into the membrane.",
128 "Membrane potential read from compartment.",
131 "The `VmOut` message of the Compartment object should be connected"
136 " The command voltage source should be connected to this.",
139 static Finfo* vclampFinfos[] = {
154 static string doc[] = {
156 "Author",
"Subhasis Ray",
157 "Description",
"Voltage clamp object for holding neuronal compartments at a specific"
160 "This implementation uses a builtin RC circuit to filter the "
161 " command input and then use a PID to bring the sensed voltage (Vm from"
162 " compartment) to the filtered command potential.\n"
164 "Usage: Connect the `currentOut` source of VClamp to `injectMsg`"
165 " dest of Compartment. Connect the `VmOut` source of Compartment to"
166 " `set_sensed` dest of VClamp. Either set `command` field to a"
167 " fixed value, or connect an appropriate source of command potential"
168 " (like the `outputOut` message of an appropriately configured"
169 " PulseGen) to `set_command` dest.\n"
170 "The default settings for the RC filter and PID controller should be"
171 " fine. For step change in command voltage, good defaults with"
172 "integration time step dt are as follows:\n"
173 " time constant of RC filter, tau = 5 * dt\n"
174 " proportional gain of PID, gain = Cm/dt where Cm is the membrane"
175 " capacitance of the compartment\n"
176 " integration time of PID, ti = dt\n"
177 " derivative time of PID, td = 0\n"
186 sizeof(vclampFinfos) /
sizeof(
Finfo*),
189 sizeof(doc)/
sizeof(
string));
void reinit(const Eref &e, ProcPtr p)
unsigned int getMode() const
void setTau(double value)
static SrcFinfo1< double > * currentOut()
static const Cinfo * vclampCinfo
void setMode(unsigned int mode)
void setCommand(double v)
void setGain(double value)
void process(const Eref &e, ProcPtr p)
double getCurrent() const
static const Cinfo * initCinfo()
double getCommand() const
Definition at line 287 of file VClamp.cpp.
References cmdIn_, command_, current_, currentOut(), DERIVATIVE_ON_PV, dtByTi_, e1_, e2_, e_, expt_, Kp_, mode_, oldCmdIn_, PROPORTIONAL_ON_PV, tau_, tauByDt_, td_, tdByDt_, ti_, v1_, and vIn_.
Referenced by initCinfo().
static SrcFinfo1< double > * currentOut()
static const unsigned DERIVATIVE_ON_PV
static const unsigned PROPORTIONAL_ON_PV
Definition at line 313 of file VClamp.cpp.
References cmdIn_, command_, currentOut(), ProcInfo::dt, dtByTi_, e1_, e2_, e_, Eref::element(), expt_, Field< A >::get(), Element::getNeighbors(), Kp_, oldCmdIn_, tau_, tauByDt_, td_, tdByDt_, ti_, v1_, and vIn_.
Referenced by initCinfo().
328 if (p->
dt /
tau_ > 1e-15){
337 vector<Id> compartments;
static SrcFinfo1< double > * currentOut()
Element * element() const
unsigned int getNeighbors(vector< Id > &ret, const Finfo *finfo) const
static A get(const ObjId &dest, const string &field)