|
| 1 | +<Lems xmlns="http://www.neuroml.org/lems/0.7.4" |
| 2 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 3 | + xsi:schemaLocation="http://www.neuroml.org/lems/0.7.4 ../../LEMS/Schemas/LEMS/LEMS_v0.7.4.xsd" |
| 4 | + description="New voltage clamp"> |
| 5 | + |
| 6 | + |
| 7 | + <ComponentType name="voltageClampTriple" extends="baseVoltageDepPointCurrent" |
| 8 | + description="Voltage clamp. Applies a variable current _i to try to keep parent at _targetVoltage. "> |
| 9 | + |
| 10 | + <Parameter name="active" dimension="none" description="Whether the voltage clamp is active (1) or inactive (0)."/> |
| 11 | + |
| 12 | + <Parameter name="delay" dimension="time" description="Delay before switching from conditioningVoltage to testingVoltage."/> |
| 13 | + <Parameter name="duration" dimension="time" description="Duration to hold at testingVoltage."/> |
| 14 | + <Parameter name="conditioningVoltage" dimension="voltage" description="Target voltage before time delay"/> |
| 15 | + <Parameter name="testingVoltage" dimension="voltage" description="Target voltage between times delay and delay + duration"/> |
| 16 | + <Parameter name="returnVoltage" dimension="voltage" description="Target voltage after time duration"/> |
| 17 | + |
| 18 | + <!-- seriesResistance renamed to simpleSeriesResistance & factor of 1e-5 removed from calculation of current. Still being tested... --> |
| 19 | + <Parameter name="simpleSeriesResistance" dimension="resistance" description="Current will be calculated by the difference in voltage between the target and parent, divided by this value"/> |
| 20 | + |
| 21 | + <!--TODO: remove! Only required as EventConnection is used in explicitInput to |
| 22 | + connect inputs to cells. Events aren't passed! ... --> |
| 23 | + <EventPort name="in" direction="in" description="Note this is not used here. Will be removed in future"/> |
| 24 | + |
| 25 | + <Dynamics> |
| 26 | + |
| 27 | + <StateVariable name="i" exposure="i" dimension="current"/> |
| 28 | + |
| 29 | + <OnEvent port="in"><!--TODO: remove, see above... |
| 30 | + <StateAssignment variable="i" value="0"/>--> |
| 31 | + </OnEvent> |
| 32 | + |
| 33 | + <OnCondition test="active .eq. 1 .and. t .lt. delay"> |
| 34 | + <StateAssignment variable="i" value="(conditioningVoltage - v) / simpleSeriesResistance"/> |
| 35 | + </OnCondition> |
| 36 | + |
| 37 | + <OnCondition test="active .eq. 1 .and. t .geq. delay"> |
| 38 | + <StateAssignment variable="i" value="(testingVoltage - v) / simpleSeriesResistance"/> |
| 39 | + </OnCondition> |
| 40 | + |
| 41 | + <OnCondition test="active .eq. 1 .and. t .gt. duration + delay"> |
| 42 | + <StateAssignment variable="i" value="(returnVoltage - v) / simpleSeriesResistance"/> |
| 43 | + </OnCondition> |
| 44 | + |
| 45 | + </Dynamics> |
| 46 | + |
| 47 | + </ComponentType> |
| 48 | + |
| 49 | + <voltageClampTriple id="vClamp" |
| 50 | + active = "0" |
| 51 | + delay="10ms" duration="30ms" |
| 52 | + conditioningVoltage="-63.77mV" |
| 53 | + testingVoltage="10mV" |
| 54 | + returnVoltage="-63.77mV" |
| 55 | + simpleSeriesResistance="1e4ohm"/> |
| 56 | + |
| 57 | +</Lems> |
0 commit comments