Tutorials › Quantitative Systems Pharmacology (QSP) › Erlang Transit Chains as Distributed Delay Approximations

Delay and Stochastic Extensions · Tutorial 94 of 799

Erlang Transit Chains as Distributed Delay Approximations

Learn how sequential exponential stages produce an Erlang delay kernel, how to calculate the chain’s output for common inputs, and what the approximation does and does not represent.

Advanced 12 min read

What You'll Learn

  • Derive the transit-chain ODEs from sequential first-order stage transitions.
  • Obtain the Erlang kernel and connect final-stage outflow to a convolution of the input.
  • Calculate outputs for impulse and constant inputs while checking units.
  • Interpret the chain as a distributed, rather than fixed, delay.
  • Diagnose mass-balance, initialization, and numerical implementation errors.
  • Compare transit chains with explicit convolution and fixed-delay formulations.

From Sequential Stages to a Delayed Output

A biological response may appear only after material or a signal passes through several processes: maturation, intracellular trafficking, or a sequence of activation steps. Treating the response as if it occurred after one exact waiting time can be too restrictive when transit times vary across the material or population. A transit chain represents that spread using a sequence of first-order stages. Its final-stage outflow is a delayed version of the input, with the delay distribution determined by the chain.

The earlier material on convolution formulations for distributed delays gives the general input–kernel–output relationship. Here, the focus is how a particular kernel arises from sequential exponential stages and how to implement and interpret its ODE representation.

Definition: An Erlang transit chain has \(k\) sequential stages, each with the same transition rate constant \(\lambda>0\). Let \(x_i(t)\) be the amount in stage \(i\), in units of amount; let \(u(t)\) be the input rate into stage 1, in amount per time; and let \(y(t)\) be the outflow rate from stage \(k\). With no material initially in the chain, its equations are $$ \frac{dx_1}{dt}=u(t)-\lambda x_1,\qquad \frac{dx_i}{dt}=\lambda x_{i-1}-\lambda x_i\quad (i=2,\ldots,k),\qquad y(t)=\lambda x_k(t). $$ Here, \(\lambda\) has units of inverse time. Thus, every term in a state equation has units of amount per time, and \(y(t)\) also has units of amount per time.

Each stage removes material at a rate proportional to the amount currently in that stage. The outflow from one stage is the inflow to the next, so the chain does not create or destroy material internally. The common value of \(\lambda\) makes the resulting delay kernel an Erlang distribution; using different rates would produce a more general sequence of exponential stages.

Deriving the Erlang Kernel

Consider first a unit impulse entering stage 1 at time zero. In a probabilistic description, the time spent in each stage is exponential with rate \(\lambda\). If these stage times are independent, the total transit time is the sum of \(k\) exponential waiting times. The density for one stage is \(g_1(\tau)=\lambda e^{-\lambda\tau}\) for \(\tau\geq 0\). Adding one more independent stage convolves the previous transit-time density with this exponential density.

For completeness, suppose the density after \(k\) stages is \(g_k(\tau)=\lambda^k\tau^{k-1}e^{-\lambda\tau}/(k-1)!\). The density after one further stage is

$$ \begin{aligned} g_{k+1}(\tau) &=\int_0^\tau g_k(s)\lambda e^{-\lambda(\tau-s)}\,ds\\ &=\int_0^\tau \frac{\lambda^k s^{k-1}e^{-\lambda s}}{(k-1)!}\lambda e^{-\lambda(\tau-s)}\,ds\\ &=\frac{\lambda^{k+1}e^{-\lambda\tau}}{(k-1)!}\int_0^\tau s^{k-1}\,ds\\ &=\frac{\lambda^{k+1}\tau^k e^{-\lambda\tau}}{k!}. \end{aligned} $$

The base case \(g_1(\tau)=\lambda e^{-\lambda\tau}\) and this recursion establish the formula for every positive integer \(k\). This density has units of inverse time. For an impulse of amount \(D\), the final-stage output is \(Dg_k(\tau)\), a rate of amount per time.

Result: With zero initial amounts and a causal input, the output of the chain is the input convolved with the Erlang kernel $$ g_k(\tau)=\frac{\lambda^k\tau^{k-1}e^{-\lambda\tau}}{(k-1)!},\quad \tau\geq 0, \qquad y(t)=\int_0^t u(t-\tau)g_k(\tau)\,d\tau. $$ The kernel is nonnegative and integrates to one, so it redistributes input over time rather than changing its total amount. A nonzero initial state adds a separate transient output; the displayed convolution alone describes the response to the input when the chain starts empty.

The same result follows directly from the ODEs: each stage is a linear first-order system, and passing material through one stage applies one exponential waiting-time kernel. Passing it through all \(k\) stages gives the convolution of \(k\) such kernels, which is the density derived above. The ODE implementation therefore represents the distributed-delay response without storing and repeatedly evaluating the full input history.

Worked Examples

Worked Example: Output After an Impulse

Suppose a hypothetical chain has \(k=3\) stages and \(\lambda=1\ \text{day}^{-1}\). An idealized impulse of \(D=10\ \text{mg}\) enters at time zero. Find the final-stage output rate 2 days later.

For an impulse, the output at elapsed time \(\tau\) is \(Dg_3(\tau)\). Substituting the values, while retaining units, gives

$$ \begin{aligned} y(2\ \text{days}) &=10\ \text{mg}\, \frac{(1\ \text{day}^{-1})^3(2\ \text{days})^2e^{-2}}{2!}\\ &=10\ \text{mg}\,(2e^{-2}\ \text{day}^{-1})\\ &\approx 2.707\ \text{mg/day}. \end{aligned} $$

The kernel value is a rate density, not an amount. The result is the output rate at that instant, not the total amount that has exited by day 2. The total output over all time is \(10\ \text{mg}\), because the density integrates to one.

Worked Example: Constant Input Through Two Stages

Consider a hypothetical constant input \(u(t)=3\ \text{mg/day}\), a two-stage chain, \(\lambda=1\ \text{day}^{-1}\), and zero initial amounts. Find the output at \(t=2\ \text{days}\). The first state satisfies \(dx_1/dt=U-\lambda x_1\), where \(U=3\ \text{mg/day}\), so

$$ x_1(t)=\frac{U}{\lambda}\left(1-e^{-\lambda t}\right). $$

The second stage satisfies \(dx_2/dt=\lambda x_1-\lambda x_2\), with \(x_2(0)=0\). Substitution of \(x_1(t)\), or integration of the resulting linear equation, gives

$$ x_2(t)=\frac{U}{\lambda}\left[1-(1+\lambda t)e^{-\lambda t}\right], \qquad y(t)=\lambda x_2(t)=U\left[1-(1+\lambda t)e^{-\lambda t}\right]. $$

The factor \(U/\lambda\) has units of amount, as required for \(x_1\) and \(x_2\); multiplying \(x_2\) by \(\lambda\) gives an output rate. At 2 days, \(\lambda t=2\), so

$$ \begin{aligned} y(2\ \text{days}) &=3\ \text{mg/day}\,[1-3e^{-2}]\\ &\approx 3\ \text{mg/day}\,(0.593994)\\ &\approx 1.782\ \text{mg/day}. \end{aligned} $$

The calculation uses the unrounded value of \(e^{-2}\) for the reported approximation. The output is below the ongoing input at this time because the initially empty chain is still filling; at steady state, both stages hold material and the output rate reaches \(3\ \text{mg/day}\).

Worked Example: Comparing One and Three Stages

A hypothetical constant input of \(4\ \text{mg/day}\) begins at time zero into initially empty chains with \(\lambda=1\ \text{day}^{-1}\). Compare the outputs at 2 days for \(k=1\) and \(k=3\). Integrating the Erlang kernel from zero to \(t\) gives the fraction of a constant input that has emerged by that time:

$$ \frac{y(t)}{U} =\int_0^t g_k(\tau)\,d\tau =1-e^{-\lambda t}\sum_{j=0}^{k-1}\frac{(\lambda t)^j}{j!}. $$

For one stage, the output is

$$ y_{k=1}(2)=4\ \text{mg/day}\,(1-e^{-2}) \approx 4(0.864665)\ \text{mg/day} \approx 3.459\ \text{mg/day}. $$

For three stages, the output is

$$ y_{k=3}(2)=4\ \text{mg/day}\,[1-e^{-2}(1+2+2)] \approx 4(0.323324)\ \text{mg/day} \approx 1.293\ \text{mg/day}. $$

Both chains ultimately approach the input rate of \(4\ \text{mg/day}\), but their transient outputs differ. This comparison shows how adding stages changes the shape of the delayed response; it does not establish that either chain is a better representation of a particular biological process.

Interpreting and Checking a Transit Chain

For a finite chain, the output is spread across time rather than concentrated at one exact delay. The parameter \(\lambda\) controls the transition rate in every stage, and \(k\) controls how many sequential stages are represented. Together they determine the location and spread of the response kernel. A chain can therefore serve as a mechanistic, ODE-based representation of a distributed delay while remaining straightforward to couple to other differential equations.

A useful structural check comes from summing all stage equations. Internal transfers cancel, leaving

$$ \frac{d}{dt}\sum_{i=1}^k x_i(t)=u(t)-y(t). $$

Thus, the rate of change in the amount stored in the chain equals input rate minus output rate. For a finite input pulse and an initially empty chain, the eventual total output equals the total input, provided the chain is allowed to empty. For a constant input maintained long enough, the steady state has \(y=u\). These checks can reveal a missing \(\lambda\), an incorrectly indexed transfer, or a mistaken output definition.

When implementing the system, verify that all stage amounts have the same amount units, each transition term is a rate, the output is \(\lambda x_k\), and the initial conditions match the intended scenario. Compare solver results with the analytic one- or two-stage responses when possible, and check numerical convergence as the integration tolerances are tightened. A negative stage amount or an output that does not respond after input is applied can indicate an implementation or solver problem. For sharp input changes, ensure that the numerical integration resolves the change rather than smoothing it away.

RepresentationWhat it specifiesUseful distinction
Erlang transit chainSequential ODE stages with a common transition rateRepresents a particular distributed response through a compact state-space model
Explicit distributed-delay convolutionAn input history weighted by a chosen delay kernelCan use a broader choice of kernels, but requires evaluating the history-weighted integral
Fixed delayAn input or response shifted by one exact delay timeConcentrates the delay at a single time rather than spreading it across a kernel

The chain is not a universal substitute for every distributed delay. Its equal-rate stages impose a specific kernel shape; if data or mechanism imply a different shape, an explicit alternative kernel or a different stage structure may be needed. The ODE states also describe aggregate material or signal flow. They do not mean that every individual unit in a biological population experiences the same deterministic transit time.

Common Mistakes and Limitations

  • Equating output with the last-stage amount. The last-stage amount is \(x_k\); the output rate is \(y=\lambda x_k\). Omitting \(\lambda\) gives the wrong units and numerical output.
  • Dropping the rate constant from a state solution. With input rate \(U\), the state scale is \(U/\lambda\), which has units of amount. Writing \(U(1-e^{-\lambda t})\) as an amount is dimensionally incorrect.
  • Calling the chain a fixed delay. A finite Erlang kernel spreads response over time. It is a distributed delay, even though it can be made more concentrated by suitable parameter choices.
  • Using the input convolution with a nonempty chain and no initial-state term. The convolution shown here is the input-driven response from zero initial amounts; initial material contributes its own transient output.
  • Assuming any delay distribution is Erlang. Equal-rate stages produce this specific family of kernels. Fit and mechanism should support that structural choice.
Key takeaway: A sequence of \(k\) first-order stages with rate \(\lambda\) produces an Erlang transit-time kernel, and the chain’s output is the convolution of that kernel with the input. Keep the state amounts, transition rates, and final outflow dimensionally distinct.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. For a four-stage chain, what is the final-stage output in terms of the last state and \(\lambda\)? State its units if \(x_4\) is in mg.
  2. A two-stage chain has \(\lambda=0.5\ \text{hour}^{-1}\) and receives an impulse of \(8\ \text{mg}\). Write the output rate density at elapsed time \(\tau\), including units.
  3. For a zero-initialized chain, explain why summing the state equations provides a mass-balance check.
  4. Why is a finite Erlang transit chain not identical to a fixed delay?

Solutions. (1) \(y=\lambda x_4\), so its units are \(\text{hour}^{-1}\times\text{mg}=\text{mg/hour}\) if \(\lambda\) is measured per hour. (2) For \(k=2\), \(g_2(\tau)=\lambda^2\tau e^{-\lambda\tau}\), so the impulse output is \(8\ \text{mg}\,(0.5\ \text{hour}^{-1})^2\tau e^{-0.5\tau}\), with \(\tau\) in hours; the result has units of mg/hour. (3) Each internal outflow appears as the next stage’s inflow and cancels in the sum, leaving \(d(\sum_i x_i)/dt=u-y\). Internal transfers therefore cannot change total chain amount. (4) A finite Erlang kernel has nonzero spread over a range of transit times, whereas a fixed delay places the response at one exact elapsed time.

Clinical Biostats