Question about inconsistent units in equations

g(t) = \frac{1}{\tau_{dec}-\tau_{rise}} \left(e^{\frac{-t}{\tau_{dec}}} - e^{\frac{-t}{\tau_{rise}}}\right)
\frac{dg}{dt} = \frac{\frac{gx}{\tau_{rise}}-g}{\tau_{dec}}
If that’s the case, it looks to me like g has units of 1/time, while gx has units of 1 (dimensionless)…
Then (gx/tau - g) would be consistent, and dg/dt would have units (1 / time^2), while dgx/dt would have units of (1/time). You’d write that something like

dg/dt = (gx/tau_rise - g)/tau_decay : 1/second
dgx/dt = -gx/tau_rise : 1

(note that for differential equation, the : units are expressed without the additional 1/time factor, i.e. the units of g rather than dg/dt).

To me, this still looks “off” even if it works in Brian…

This equation should also work if gx has units of time, and g is dimensionless:

dg/dt = (gx/tau_rise - g)/tau_decay : 1
dgx/dt = -gx/tau_rise : second

all that being said, this looks remarkably similar to the equation for a “biexponential synapse” or “dual exponential synapse”

V(t)=\frac{τ2}{τ2−τ1}\left(e^\frac{−t}{τ_1}−e^\frac{-t}{τ_2}\right)
which has the following dimensionless differential form (taken from Brian2 docs here: Converting from integrated form to ODEs — Brian 2 2.5.1 documentation )

eqs = '''
dV/dt = ((tau_2 / tau_1) ** (tau_1 / (tau_2 - tau_1))*x-V)/tau_1 : 1
dx/dt = -x/tau_2                                                 : 1
'''

which looks very similar, but multiplies by an additional time term in V(t) and inside dV/dt which make both components dimensionless.

Here’s my favorite textbook chapter on this synapse model, which also has a version which describes conductance g, rather than voltage (eq. 7.4)

There g_{syn} is expressed in units of time then rescaled by an arbitrary constant to be dimensionless.

To summarize all that rambling, I think the problem lies in the specification of the original conductance equation, and what’s needed is to decide/check the assumption for the units of g, and either update the units for the differential equations, or introduce a scaling factor which makes g and gx dimensionless:

dg/dt = (gx*(tau_rescale/tau_rise) - g)/tau_decay : 1
dgx/dt = -gx/tau_rise : 1

See also: