# br i br It is considered

i

It is considered that there exists a set of controllers C =
i=1 Ci ,
The values that have demonstrated better results are K = 300 days,

performance in Si ∈ S, being Si the neighborhood of the model
To prevent excessive arbitrarily fast switches that may lead to

parameter vector pˆi , defined according to a convenient metrics.
instability, a hysteresis algorithm [38] is used during the mini-

Since the plant P is unknown, finding the model Mi that best fits
mization of Ji . Instead of simply minimizing at each instant the

the patient dynamics is a role executed by the supervisor, that has
performance index, a hysteresis dead zone is considered. Thus,

as inputs the least toxic therapy effect UT
and the plant output y.
switching takes place only if

Its output is the signal i∗ , responsible for activating controller Ci∗ ,
mini Ji (t) < ıJilast (t)
(15)

which belongs to the controller bank, that is associated with model

Mi∗ . This process is illustrated in Fig. 6 and it is fully detailed in the
where Jilast (t) is the last Ji chosen and ı is the hysteresis constant,

next subsections.

Chattering is avoided by using a dwell time condition [39]. After

a switch the system continues selecting the same model for a mini-

The supervisor aim is to choose for the output signal i∗ , a value

mum amount of time D , denoted by dwell time. By dwelling in each

that corresponds to the index i of the model Mi which is the closest

model, at least during that interval, the same controller remains

to the plant. To do so, it is made of an observer bank, a filter bank,
connected with the plant which prevents possible instabilities that

and a decision logic.

can arise due to swift switching. Besides that, in [40], despite using

The observer bank is responsible for computing the output esti-

a slightly different structure, additional ABT 263 conditions are pro-

mations yˆi for each of the N models, based on UT , since u is not

vided, by considering that model switching stops in finite time for

measurable, and on y. Those estimations are performed by Eqs. (11)
systems without noise, disturbances and unmodelled dynamics, or

by considering a uniformly exponentially stability when bounded

Based on the models output estimations yˆi , a prediction error
noise or disturbances are included.

eˆi = y − yˆi for each model Mi can be computed. This error is squared
The value that showed better results in terms of stability was

and filtered by a first-order low pass filter with cutoff frequency of
D = 30 days.

fc = 30 mHz, in order to smooth transactions and to remove high fre-

A resume of all sequential steps performed by the decision logic

quency components. After obtaining the filtered signal i , a local

is illustrated in Fig. 7

controller is chosen by using a decision logic, composed by a per-

formance index, a hysteresis condition and a dwell time criterion.
2.3.2. Controller bank

The performance index Ji [37] evaluates which model should be

chosen not only by considering the current instant t, but also by
The controller bank is a set of different controllers C1 , . . ., CN ,

balancing it with the past information. This feature is incorporated
each one designed as described in Section 2.2.1 by considering dif-

in the definition

ferent patient models Mi , that are switched according to i∗ . The bank

K

also includes a bumpless transfer and anti-windup system, and a

mean filter. It is important to point out that the set of three differ-

(14)
ent signals generated by Ci , from now on, is going to be considered

unitary to simplify the explanation.

where A, B and C are the previously defined state model matrices, and Us and Ub are the drug effects before and after the bumpless transfer system, respectively.
The system composed by Eqs. (16) and (17) is controllable but not observable. However, since Ub is computed in software, direct state measurements are available, being x estimated with the expansion of the matrices K and Q.
An actuator saturation has to be considered after the integrator, since drug’s effect U must respect U ∈ [0, 1]. When integral action is used, the control variable remains integrated leading to larger values when the actuator saturates. This process is called windup [34] and can cause large transients if the system is not correctly designed.
The anti-windup system used [43] is illustrated in Fig. 8, where an extra feedback signal that measures the error es is added between the desired and the true control signal. The signal es is then fed back to the integrator, being given by