EEG-based depth of anaesthesia control.
In addition to industry, the medical field has also seen a significant increase in the use of information technology combined with advanced process control methods. In this sense, much research is being done on computerised drug dosing in general anaesthesia, which belongs to the era of so-called personalised medicine.
The depth of anaesthesia is most commonly quantified by analysis of the electroencephalogram (EEG) using the bispectral index (BIS) and the patient state index (PSI). The goal of these measurements is to more accurately assess the depth of hypnosis, although other measurements, such as the flow of anaesthetic into the patient's body, can also be used and, in conjunction with appropriate pharmacokinetic and pharmacodynamic models, provide the anesthesiologist with additional information about the patient's condition.
The goal of computer-assisted drug delivery is to reduce the anesthesiologist's workload, increase safety, and shorten the patient's postoperative recovery time by reducing the dosage of the drug used.
The complete study (in Slovenian and English) is also available as a pdf document.
Matlab scripts with Simulink models can be used to test different methods of controlling the depth of anaesthesia:
- Open loop control
- Target Controled Infusion (TCI)
- Model Reference Control with Particle Swarm Optimisation (PSO)
- Closed loop control
- PID regulator
- Predictive Functional Controller (PFC)
Open Source Patient Simulator should be installed from MATLAB Central File Exchange and added to PATH.
![]() |
---|
Patient Simulator concept – Clara Mihaela Ionescu (2023). Open Source Patient Simulator, MATLAB Central File Exchange. |
The parameters of the controllers or models can be varied in scripts at predefined places to get different results
-
main_pid.m
- scipt for testing PID controller. -
main_tci.m
- scipt for testing TCI. -
main_pso.m
- scipt for testing TCI PSO. -
main_pfc.m
- scipt for testing PFC. -
pfc_vs_tci.m
- scipt for automated side-by-side PFC vs TCI comparison. -
main_pfc_pd_analysis.m
- scipt for automated PFC analysis with wrong estimated PD model parameters. -
main_pfc_detail_analysis.m
- scipt for automated PFC analysis with wrong estimated PK and PD model parameters.
-
Patient_PID_noDeadTime.slx
- model used for PID control without taking dead time into account. -
Patient_PID.slx
- model used for PID control. -
Patient.slx
- model used for PFC (main topic). -
Patient_TCI.slx
- model used for TCI. -
Patient_TCI_PSO.slx
- model used for TCI PSO.
Q_rand_<X>pct.mat
- matrix used for simulating wrong estimated parameters of PK model (X% range of system matrix)
User can use model that takes (long) dead time into account. If that dead time is not taken into account, control algorithm is not stable.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%% Select PID type %%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sim('Patient_PID_noDeadTime');
%sim('Patient_PID');
PID control without taking dead time into account:
![]() |
---|
PID without dead time. |
PID control with taking dead time into account:
![]() |
---|
PID with dead time. |
TCI with exact estimated parameters:
![]() |
---|
TCI with exact parameters. |
TCI with wrong estimated parameters of PK model (10% range of system matrix). We can see bias:
![]() |
---|
TCI with wrong estimated parameters. |
TCI PSO with exact estimated parameters:
![]() |
---|
TCI PSO with exact parameters. |
PFC with exact estimated parameters:
![]() |
---|
PFC with exact parameters. |
PFC vs TCI comparison with exact estimated parameters:
![]() |
---|
PFC vs TCI with exact parameters. |
PFC vs TCI comparison with with wrong estimated parameters of PK model (20% range of system matrix):
![]() |
---|
PFC vs TCI with wrong estimated parameters. |
Sensitivity of parameter
![]() |
---|
Parameter |
Sensitivity of parameter
![]() |
---|
Parameter |
Sensitivity of parameter
![]() |
---|
Parameter |
Sensitivity of parameter
![]() |
---|
Parameter |
Sensitivity of parameter
![]() |
---|
Parameter |
In the simulations used to obtain the results presented above to analyse the impact of parameter misestimation, we have assumed that we know the exact parameters of the PK models. However, if we do not know them precisely, the final results may of course differ. In the case that we misestimate the parameters of the PK model in the range of 20% and we also misestimate the parameters of the PD model, the simulation results can be seen:
![]() |
---|
PFC detailed analysis. |