Breaking a biexponential function in two

276 Views Asked by At

I have the following two equations:

$$ I(t) = \sum_iw_i\alpha(t-t_i) $$ $$ \alpha(t) = \beta\frac{\tau_2}{\tau_2-\tau_1}(e^{-t/\tau_1}-e^{-t/\tau_2}). $$

When implemented in a particular software package, these equations are represented as follows (where $I$ equals the $I$ above):

$$ \operatorname{invpeak} = (\frac{\tau_2}{\tau_1})^{\tau_1/(\tau_2-\tau_1)} $$ $$ \frac{dI}{dt}=(\operatorname{invpeak}I_{in}-I)\frac{1}{\tau_1} $$ $$ \frac{dI_{in}}{dt}=\frac{-I_{in}}{\tau_2} $$ At each timepoint $t_i$, the software adds $w_i$ to $I$. (And the software uses a numerical integration method to solve for $I$ using its derivative.)

My question is, how were the equations in the software derived from the two equations at the top of this post? Can someone walk me through this, step by step? (Or give me enough information to walk myself through it step by step?)

1

There are 1 best solutions below

0
On BEST ANSWER

Let's work in reverse, from the software implementation to the equations I started with:

1) Use the equation for $\frac{dI_{in}}{dt}$ to solve for $I_{in}$

\begin{align} \frac{dI_{in}}{dt}&=\frac{-I_{in}}{\tau_2}\\ I_{in}&=\frac{-1}{\tau_2}\int{I_{in}dt}\\ I_{in}&=e^{-t/\tau_2} \end{align}

2) Plug this value into the equation for $\frac{dI}{dt}$ and solve for $I$

\begin{align} \frac{dI}{dt}&=(\operatorname{invpeak}e^{-t/\tau_2}-I)\frac{1}{\tau_1} \end{align}

This is where the Laplace transform is helpful. Take the Laplace transform of both sides of the equation for $\frac{dI}{dt}$:

\begin{align} sI_L(s)&=\bigg[\operatorname{invpeak}\mathcal{L}\{e^{-t/\tau_2}\}-I_L(s)\bigg]\frac{1}{\tau_1}\\ I_L(s)\bigg(s+\frac{1}{\tau_1}\bigg)&=\operatorname{invpeak}\frac{1}{s+1/\tau_2}\frac{1}{\tau_1}\\ I_L(s)&=\operatorname{invpeak}\frac{1}{\tau_1}\frac{1}{s+1/\tau_2}\frac{1}{s+1/\tau_1}\\ \end{align}

Now take the inverse Laplace transform:

\begin{align} I&=\operatorname{invpeak}\frac{1}{\tau_1}\mathcal{L}^{-1}\bigg\{\frac{1}{s+1/\tau_2}\frac{1}{s+1/\tau_1}\bigg\}\\ &=\operatorname{invpeak}\frac{1}{\tau_1}\int_0^t{e^{-(t-\tau)/\tau_2}e^{-\tau/\tau_1}d\tau}\\ &=\operatorname{invpeak}\frac{1}{\tau_1}e^{-t/\tau_2}\int_0^t{e^{(1/\tau_2-1/\tau_1)\tau}d\tau}\\ &=\operatorname{invpeak}\frac{1}{\tau_1}\frac{1}{1/\tau_2-1/\tau_1}e^{-t/\tau_2}\bigg[e^{(1/\tau_2-1/\tau_1)\tau}\bigg]^t_0\\ &=\operatorname{invpeak}\frac{1}{\tau_1}\frac{1}{1/\tau_2-1/\tau_1}e^{-t/\tau_2}\bigg(e^{(1/\tau_2-1/\tau_1)t}-1\bigg)\\ &=\operatorname{invpeak}\frac{1}{\tau_1}\frac{1}{1/\tau_2-1/\tau_1}\bigg(e^{-t/\tau_1}-e^{-t/\tau_2}\bigg)\\ &=\operatorname{invpeak}\frac{1}{\tau_1/\tau_2-1}\bigg(e^{-t/\tau_1}-e^{-t/\tau_2}\bigg)\\ &=\operatorname{invpeak}\frac{\tau_2}{\tau_1-\tau_2}\bigg(e^{-t/\tau_1}-e^{-t/\tau_2}\bigg).\\ \end{align}

Ta da! That's it!

This is the equation for $\alpha$, where $\beta=-\operatorname{invpeak}$.