Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

A SIMULINK compartmental model for

Depth of Anaesthesia
Nicolas Cardoso De Castro

INESC-ID (Portugal)
on leave from INPGrenoble - ESISAR (France)

April 14, 2008

Abstract

The aim of this document is to describe the models used to represent a patient subject to
general anaesthesia considering only the DoA (Depth of Anaesthesia) part. The models
are built using MATLAB/SIMULINK. The report also studies the influence of the model
parameters on the output1 .

1 Introduction
Anaesthesia comprises three actions [1]: keeping the patient still (achieved through NeuroMus-
cular Blockade - NMB), inducing a desired level of loss of consciousness (Depth of Anaesthesia -
DoA) and reducing the response to noxic stimuli (“alleviating his pain”, analgesia). This report
describes SIMULINK models for DoA. Since the drug used as analgesic (remifentanil) has a
non-negligible effect on DoA, it is taken into account as an accessible disturbance.

Diffusion of a drug in the body (from the administration point to the actual effect) is a complex
process. It is modelled using two stages [2].

• The first stage, represented by the “Pharmacokinetic” model (PK model), describes the
spreading of the drug over the blood and tissue. The concentration of the drug on plasma
is a function of time denoted cp .

• The second stage, represented by the “Pharmacodynamic” model (PD model), describes
the relationship between the plasma drug concentration and the drug effect. This stage
comprises two steps: the transport of the drug from the plasma (with a certain plasma
concentration given by the PK model) to the effect compartemnt (the brain, with an effect
concentration denoted ce ), and the effect of the drug on the body.

This overall structure is depicted on figure 1. The drug used for analgesia is remifentanil
(analsegic drug) and the one to control the DoA is propofol (hypnotic drug). Note on this
figure that the two drugs only interact in the last block. Moreover there are independent PK
and effect compartment models for both remifentanil and propofol.

1
This work has been done under the framework of project IDEA - Integrated Design for Automation of
Anaesthesia, contract PTDC/EEA-ACR/69288/2006.
2 PHARMACOKINETIC MODEL

Figure 1 – DoA and pain model (general structure)

Here, cremi
e is assumed to be given and only the propofol chain is considered. This is acceptable
in a first approximation if the TCI (Target Control Infusion) method is used.
This document describes the models used to represent DoA for a patient subject to general
anaesthesia.
The data used in the models correspond to published results and/or typical values that lead to
responses similar to published ones.

2 Pharmacokinetic model
2.1 Introduction
Several approaches can be used to represent the PK model. These approaches are not discussed
here. A model based on a compartmental approach (Nunes et al.[3]) is used. According to
this approach, the body is assumed to be divided into several compartments. In each compart-
ment the drug concentration is homogeneous and there are exchanges between compartments.
A three compartments model is used, in which the main compartment represents intravascular
blood (blood within arteries and veins) and highly irrigated organs (such as heart, brain, liver
and kidney). The two other compartments represent muscles, fat and other organs or tissues.

Figure 2 – 3-compartments pharmacokinetic model

This is illustrated on figure 2. The drug is administrated via intravenous, so it enters in the
main compartment (infusion rate on the figure 2). This will be the manipulated variable later.
The dissipation of drug (due to metabolism) is modelled by an outter flow from the main com-
partment. Transfer coefficients (k10 , k12 , k21 , k13 and k31 ) are taken from Marsh et al.[4].

2.2 Derivation of the model


Finding the model from figure 2 is direct using Physic laws. For each compartment, a mass mi
(given in [µg]) of drug is assumed to be present. For a tank, mass conservation implies that:

dV olume
= Σf lows (1)
dt

2/11
3 PHARMACODYNAMIC MODEL

The difference here is that masses instead of volumes are considered. Hereafter (1) is applied to
each compartment. Flows are given in [µg/s]. The balance (1) yields:

dm1 104
Compartment one: dt = 3600 r + k21 m2 + k31 m3 − k10 m1 − k12 m1 − k13 m1 (2)
dm2
Compartment two: dt = k12 m1 − k21 m2 (3)
dm3
Compartment three: dt = k13 m1 − k31 m3 (4)

Remark that the inner infusion rate (r) is in [mL/hour] since the other variables require it in
104
[µg/s], this implies the coefficient 3600 in the equation of compartment one (the dilution of
propofol is assumed to be 10 mg/mL). The units of kij are [s−1 ].
From that, the following three dimensions state space representation follows:

m  " 104 #
1 3600 r + k21 m2 + k31 m3 − k10 m1 − k12 m1 − k13 m1
x1 = m2 and ẋ1 = k12 m1 − k21 m2
m3 k13 m1 − k31 m3
" # " 4 #
−k10 − k12 − k13 k21 k31 10 /3600
⇒ ẋ1 = k12 −k21 0 x1 + 0 r (5)
k13 0 −k31 0

The plasma concentration on the main compartment (cp ) can be computed from the first state
of the system, m1 , by:

m1
cp = (6)
1000 × v1

where v1 is the volume of compartment 1 given in [L]. As m1 is given in [µg] and v1 in [L], cp
is in [µg/mL].
This yields the continuous linear state space model:

ẋ1 = A1 x1 + B1 r
n
cp = C1 x 1 (7)

" # " 104 #


−k10 − k12 − k13 k21 k31
, B1 = 3600
 1 
with A1 = k12 −k21 0 0 and C1 = 1000×v1
0 0
k13 0 −k31 0

v1 is computed with the weight of the patient and the coefficient vc [L/kg] which represents
the volume of compartment one per patient unit weight [kg]:

v1 = weight × vc (8)

3 Pharmacodynamic model
3.1 Introduction
The PD model can be divided into two parts, one linear (the effect compartment) and another
non linear (the interaction). The linear part only involves propofol. It links the plasma concen-
tration cp to the effect concentration ce . The non linear part takes into account both propofol
and remifentanil. It links the effect concentraction of the two drugs to the DoA.
Before continuing, it should be noticed that (for feedback control) the measure of DoA is re-
quired. There are several ways to do so (Bispectral index or entropy measures based on EEG
or auditory evoked potentials). In order to model the interaction, the method used for DoA
measurement must be fixed because different methods do not lead to the same mesured values,
i.e. to the same model. Here Bispectral index, called BIS, is used.

3/11
3.2 Derivation of the effect compartment model 3 PHARMACODYNAMIC MODEL

3.2 Derivation of the effect compartment model


As in the comparative study between PK models by Nunes et al.[3], a low-pass filter is used to
relate cp and ce :
1
ce = 1 cp (9)
ke0 s +1

The pharmacodynamic coefficient ke0 = 0.25


60 [s−1 ] is taken from Marsh et al.[4].
This transfer function can be turned into a state space representation (with one state):
ẋ2 = A2 x2 + B2 cp
n
ce = C2 x2 (10)

where A2 = −ke0 , B2 = ke0 and C2 = 1.

3.3 Derivation of the interaction model


3.3.1 Non linear model
The interaction model used here has been developed by Minto et al.[5]. It is called the Hill
equation since it generalizes the Hill equation used for simular purposes in NMB modelling.
It consists of a static model with two inputs (the remifentanil cremi
e and propofol cprop
e effect
concentrations) and one output (DoA level).
First, the effect concentrations are normalised by dividing them by the concentration at half
the maximal effect. We note Uremi the normalised concentration (of remifentanil), C50E remi the

concentration at half the maximal effect (for remifentanil) and similarly to propofol, so as to
have :
cremi cprop
Uremi = e
remi
C50E
and Uprop = e
prop
C50E
(11)

The resulting effect is given in terms of the normalised individual concentrations by:
 
Uprop + Uremi
E = E0 1 − (12)
1 + Uprop + Uremi
where E is the resulting effect (the DoA) and E0 is the effect at zero concentrations.
An improved model, that does not assume a purely additive system is obtained by changing
the effect of the drug mixture Uprop + Uremi according to the ratio of the drugs θ where θ =
Uprop /(Uprop + Uremi ). Introduce U50 (θ) = 1 − βθ + βθ2 where β is a given constant. The
resulting effect becomes:
[(Uprop + Uremi )/U50 (θ)]γ
 
E = E0 1 − (13)
1 + [(Uprop + Uremi )/U50 (θ)]γ
where γ is the steepness of the concentration-response relation.
The non-linear equation (between remifentanil and propofol) is the Hill equation, used as the
interaction model.

3.3.2 Linear model approximation


In order to be used with a MPC controller, the Hill equation (13) has to be linearised. Let
equation (13) be written:
y = f (z1 , z2 )
with y = E = DoA, z1 = cremi
e and z2 = cprop
e . Then:
ȳ + ∆y = f (z̄1 + ∆z1 , z̄2 + ∆z2 ) (14)

∂f ∂f
ȳ + ∆y ≈ f (z̄1 , z̄2 ) + .∆z̄1 + .∆z̄2 (15)
∂z1 z̄1 ,z̄2 ∂z2 z̄1 ,z̄2

∂f ∂f
⇒ ∆y ≈ .∆z̄ 1 + .∆z̄2 (16)
∂z1 z̄1 ,z̄2 ∂z2 z̄1 ,z̄2

4/11
4 GLOBAL MODEL

This results then in the following linear approximation of the Hill equation around a constant
operating point:

∆DoA ≈ C3 .∆cprop
e + D3 .∆cremi
e (17)

4 ∂f 4 ∂f
where C3 = ∂z2 z̄ ,z̄ and D3 = ∂z 1
.
1 2 z̄1 ,z̄2

4 Global model
4.1 Non linear model
A discrete model of the DoA chain (built in SIMULINK) is given on figure 3. The discretisation
of the continuous state equations is computed on MATLAB.

Figure 3 – Non linear DoA model built in SIMULINK

Figure 3 contains three blocks. The first one is the PK model in a discrete state space represen-
tation. The second block is the linear part of the PD model, a discrete transfer fonction. And
finally the third block is the non-linear static part of the PD model, i.e. the Hill equation.
As mentioned before, cremi
e is assumed to be available, so there is no need for neither the PK
model nor the linear PD model for remifentanil. Indeed, although the remifentanil effect con-
centration may not be directly measured, an estimate can be obtained using the PK/PD model
for this drug.
For the first control attempts, the non linear model will only be controlled around the steady
state (e.g. 50% of the DoA). It is thus interesting to have the non linear model at the steady
state at the begining of the simulation. In this case, the state space representation for the
linear part of the PD model should be used instead of the transfer function. In this way, initial
conditions can be given to both PK and PD models such as to have the non linear model at the
steady state in the begining of the simulation.
From equation (10) and since C2 = 1, the steady state of the PD model is given by:
¯
x¯2 = cprop (18)
e

The steady state of the PK model (equation 7) can also be computed easily:
m1
cp = C1 x 1 = (19)
1000 × v1
⇒ m̄1 = c¯p × 1000 × v1 = c¯p × 1000 × weigth × vc
and A1 x̄1 + B1 r̄ = 0 (at steady state) (20)
104
(
m̄1 (−k10 − k12 − k13 ) + m̄2 k12 + m̄3 k13 + 3600 r̄ = 0
⇒ m̄1 k12 − m̄2 k21 = 0
m̄1 k13 − m̄3 k31 = 0
(
m̄2 = kk21 12
m̄1
⇒ k13 (21)
m̄3 = k31 m̄1

Of course, the controller will be able to lead the non linear model to the steady state.

4.2 Linear incremental model


The whole model can be written as one linear state space representation (figure 4), considering
equations (7), (10) and (17). The linear model can only be considered around a working point.

5/11
4.3 Linear augmented incremental model 4 GLOBAL MODEL

Figure 4 – Linear DoA model built in SIMULINK

m1
 
 
x1 m ∆r
h i
2
Let x = x = m , u = .
2 3 ∆cremi
e
x2
r = r̄ + ∆r is the propofol infusion rate and cremi ¯ + ∆cremi is the remifentanil effect
= cremi
e e e
¯ + ∆DoA is the depth of anaesthesia (with r̄ cremi¯ T the work-
 
concentration and DoA = DoA e
¯
ing point that implies DoA).

ẋ1 = A1 x1 + B10 u
(7) ⇒ prop (22)
∆cp = C1 x1
" # " 104 #
−k10 − k12 − k13 k21 k31 0
, B10 = 3600
 1 
with A1 = k12 −k21 0 0 0 and C1 = 1000×v1 0 0 .
k13 0 −k31 0 0

= A2 x2 + B2 ∆cprop

ẋ2 p
(10) ⇒ prop
∆ce = C2 x 2

ẋ2 = A2 x 2 + B 2 C 1 x 1
⇔ ∆cprop = C2 x 2 (23)
e

with A2 = −ke0 , B2 = ke0 and C2 = 1.

(17) : ∆DoA ≈ C3 .∆cprop


e + D3 .∆cremi
e
⇔ ∆DoA ≈ C3 .C2 x2 + D3 .∆cremi
e (24)

∂f ∂f
with C3 = ∂z 2
and D3 = ∂z 1
.
z̄1 ,z̄2 z̄1 ,z̄2
Equations (22), (23) and (24) yield the global linear incremental model:
ẋ = Ax + Bu
n
∆DoA = Cx + Du
m˙ 1
 
0 m1
  
  
0



 m
  =2 A 1 0 m
  +2 B 1
∆r
 m3 0 m3 0 0 ∆cremi

 
e
⇔ x2 B2 C1 A2 x2  (25)
 m1  
 m 2 ∆r
∆DoA = [0 0 0 C3 C2 ] m  + [0 D3 ]


∆cremi


 3 e
x2
This model is controlable and observable.

4.3 Linear augmented incremental model


For control purposes, an integrator can be added to the system (25) as shown on figure 5.
The state space representation for the integrator is:
ẋ0 = ∆r0
n
∆r = x0 (26)

6/11
6 RUNNING THE MODELS

and for the linear model:

  
∆r
ẋ = Ax + [Br Bce ] ∆cremi


e 
(25) ⇒  (27)
∆r
 ∆DoA = Cx + D ∆cremi


e

where Br is the B part acting on ∆r and Bce is the B part acting on ∆cremi
e .
This yields the augmented model:

ẋa = Aa xa + Ba ua
n
∆DoA = Ca xa + Dua
h i h
∆r0
i 
x˙0 0 0 x0 1 0
ih i h
 x = B A x + 0 B

remi


r
ce ∆c0
e
(28)
x ∆r
h i
∆DoA = [0 C] x0 + D

∆cremi


e

This model is controlable but not observable. The loss of observability is due to pole-zero
cancellation. From MATLAB results, there is not an exact pole-zero cancellation, but it seems
enough to loose observability with MATLAB criteria.

Figure 5 – Block diagram for the linear augmented model

5 Noise models
During the surgery, the patient is subject to several sources of disturbance, for instance when
the surgeon incises the skin. These disturbances add to measurement noise to yield deviations
from the deterministic model. Although, strictly speaking, part of these deviations are due to
unmodelled dynamics, they are, hereafter, refered simply as noise, with an abuse of language.

Models have been derivated by coloring white noise to fit typical data.

6 Running the models

Two SIMULINK models have been developed: The files created for the DoA models are:

• DoA openloop.mdl: the non linear DoA model (the block diagram is shown on figure 6).

• DoA lin openloop.mdl: the linear DoA model (not shown, but similar to figure 6).

7/11
6 RUNNING THE MODELS

Figure 6 – SIMULINK block diagram of the non linear DoA model

The buttons on the left side of the window can be used to run actions on the models.
Parameters table: open a window where user can set parameters to be used for the simulation.
Load parameters from parameters table: initialize the model with the parameters defined
in the parameters table.
Load default parameters: initialize the model with the default parameters.
Plot results after simulation: plot figures to show the results of a simulation.
Plot the results from noise models: plot figures from the computation of the noise models.
These plots are independant from the DoA models.
Parameters for drugs influence: open a window where user can set parameters to be used
for computation of the drugs influence in steady state.
Plot drugs influence in steady state: use the parameters defined in the previous window
to compute and plot the drugs influence in steady state.
Plot parameters influence: plot figures illustrating the influence of main parameters on the
DoA signal.
Info: display a text window explaning how to get started with the model.

To perform these actions, the following MATLAB functions have been developed:
• DoA openloop parameters.m: compute parameters for both linear and non linear SIMULINK
model.
• DoA openloop results.m: compare data from the simulation with real data from patient
files and plot figures.
• DoA openloop param influence.m: run simulations to evaluate the influence of several
prop remi , the gain of the PD model and k ) on the non linear model.
parameters (γ, C50E , C50E e0

• DoA openloop steady state.m: run simulations to evaluate the influence of drugs in
steady state on the Hill equation.
• DoA lin openloop results.m: compare data from the non linear and the linear models
and plot figures. This function also compute controlability and observability of the linear
and augmented models.
• DoA noise models.m: compute noise models for each patient files and plots comparison
between real and modelled data.
• hill equation.m: compute the DoA signal from propofol and remifentanil effect concen-
trations (it is the Hill equation).

8/11
7 INFLUENCE OF THE PARAMETERS

Additionally, there are three patient files which contain the data from real anaesthesias. These
files are nammed data filt patXX.mat where XX is the patient number (17, 23 and 25). These
files are used in the MATLAB functions to know the patient characteristic (only the weight is
used) and the amounts of propofol and remifentanil which should be injected to the model.
All the MATLAB files are written in function form to be easily reused.
To use the SIMULINK models, just use the buttons to perform the desired action. Parameters
should first be loaded. A simulation should has been run to plot the results.

7 Influence of the parameters


We would like to see the influence of changes in the parameters on the DoA signal. Tested
prop remi (figure 7(c)), the gain of the PD model
parameters are γ (figure 7(a)), C50E (figure 7(b)), C50E
(figure 8) and ke0 (figure 9).

prop
(a) γ (b) C50E

remi
(c) C50E

Figure 7 – Parameters influence on the DoA

9/11
7 INFLUENCE OF THE PARAMETERS

Figure 8 – Parameters influence on the DoA and on cprop


e (gain of the PD
model)

Figure 9 – Parameters influence on the DoA and on cprop


e (ke0 )
prop remi which the effect on
It can noticed that γ and C50E influence visibly the DoA contrary to C50E
the output is negligible. Concerning the linear part, the gain has an influence on the DoA signal
prop
comparable to the ones of γ and C50E . The effect of the pole ke0 is negligible on both DoA and
cprop
e signals.

10/11
REFERENCES REFERENCES

Figure 10 – Influence of cremi


e cprop
e on the steady state of DoA

Figure 10 shows the effect of the drug concentrations (remifentanil and propofol) on the steady
state of the DoA. Of course, the effect increases with the concentrations.

References
[1] Eiko Furutani and Mituhiko Araki. Computer contol of physiological states of patients under
and after surgical operation. Annual Reviews in Control, 29:229–236, 2005.
[2] Wassim M. Baily, James M.; Haddad. Drug dosing control in clinical pharmacology. IEE
Control Systems Magazine, 2005.
[3] Catarina S. Nunes and Teresa F. Mendonça. Modelling propofol and remifentanil pharma-
codynamic interaction using two different pharmacokinetic models: a comparative study.
[4] M. N. Marsh, B.; M. White and G. N. C. Kenny. Pharmacokinetic model driven infusion of
propofol in children. Bristish Journal of Anaesthesia, 67:41–48, 1991.
[5] C. F.; T. W. Schnider; T. G. Short; K. M. Gregg; A. Gentilini Minto and S. L. Shafer.
Response surface model for anesthetic drug interactions. Anesthesiology, 92:1603–1616, 2000.

11/11

You might also like