Notes on Compartment Models and
Pharmacokinetics
October 1998
Compartment models describe the flow of a substance (chemicals, drugs, information) between the components of a larger system. In general, there are N components (the compartments) and they may be linked to each other in any way . The flow rates or exchange constants between linked compartments are generally specified, and each compartment may also have output and input to and from the outside world.
\
As we saw in studying stirred tank reaction, the governing equation for x(t) is
subject to the initial condition x(0)=a. The rate constant k>0 specifies how quickly the substance is removed from the compartment.
Laplace transforms can be used to solve this initial value problem. To
anticipate what happens with more than one compartment, let's review the
process. We will let
denote the Laplace transform of
x(t). Taking tranforms of both sides of the ODE, we have
Using the derivative property, we have
Substituting x(0)=a and solving for X(s) gives us the transform of the solution:
where a and F(s) are known.
We can now invert the transform to recover the solution x(t). We see that
We use the inverse transform of the exponential function for the first term and the convolution theorem on the second term (some review may be needed!):
The first term of the solution reflects the effect of the initial condition (which is transient and eventually vanishes); the second term reflects the effect of the input. This solution could also have been obtained using an integrating factor. But the Laplace transform methods generalizes to systems of first order linear ODEs.
Notice that if we take a=0, then the transform of the solution can be written
The function G is called the transfer function because it relates the transform of the input, F(s) to the transform of the output, X(s).
\
We can now derive the governing equations for the N-compartment
system. Let
denote the mass of substance in compartment i at
time t. Over a small increment of time
, the change in mass
in compartment i is given approximately by
for
. In a familiar maneuver, we move
to the
left side of the equation, divide through by
, and take the
limit as
. This leads to the ODEs
for
.
We will let
and note that
.
Let
be the N-vector
, and let
be
the N-vector
. Then the system of N ODEs
can be written in matrix-vector forms as
where the
matrix A has entires
. We will assume the
initial conditions have the form
.
How do we solve a system of linear, constant coefficient, nonhomogeneous
ODEs? No method is particularly easy to carry out. But conceptually,
Laplace transforms work well. We can take the Laplace transform of a
vector of functions one component at a time. We will let
. Taking transforms across the system
, we get
We now have to solve for
using matrix-vector operations. Let
I be the
identity matrix and recall that
.
Then
Multiplying both sides by
gives u
Now what about the inversion? There are several ways to proceed. One is
to mimic the one-compartment case and use a matrix version of the
convolution theorem. This requires making sense of the matrix
exponential
, which can be done. However, we will take another
path that may require more work, but leads to some results. For the
moment let's take
so we can focus on the effect of the input.
Then we have
In analogy with the one-compartment case, the
matrix
is called the transfer matrix because it relates
the input to the output of the system. The key is to invert this matrix.
Recall a result from linear algebra which gives the inverse of a matric
B as
where adj(B) is the transpose of the matrix of cofactors of B and det(B) is the determinant of B. Therefore, we have
Now recall det(sI-A) is the Nth degree characteristic polynomial of
A. The roots (which we will assume to be distinct) are the
eigenvalues,
, of A.
At this point it probably doesn't pay to proceed in generality. But if
the matrix of cofactors, adj(sI-A), can be computed without too much
effort, then a solution in closed for can be found. A few examples will
illustrate the method.