1 Introduction

Optimal and safe automatic drug administration system with bolus and continuous infusion play a key role to avoid over and under dosing situation. Adequate depth of anesthesia must be maintained at a certain anesthetic state (loss of sedation) in order to prevent the awareness of pain and to attenuate the body’s stress response to injury [1, 2]. Generally, anesthesiologists use BIS, derived from EEG signal to monitor and maintain the proper depth of hypnosis. BIS value decreases from 100 (awake state) to 0 (no electrical activity) with increases the depth of anesthesia. Target Control Infusion (TCI) is well known for automatic infusion based on brain concentration but anesthesiologist’s intervention required to adjusting drug dose based on BIS response [3, 4]. To do effective manipulation of the drug infusion considering the dynamics of the patient body that usually includes a dead time. Dead time and surgical stimulations can produce high oscillations in BIS signal, which may be a main cause of over and under dosing of anesthetics drugs. This demand is critical in surgery because patient must stay in the hospital if post-operative adverse reactions are serves. In anesthesia automation, most important is to guarantee a smooth BIS response around the reference value with adequate propofol dosing.

Many control studies had used conventional design of Proportional–Integral–Derivative (PID) controller for anesthesia automation [10,11,12,13, 19, 38, 39] and hemodynamic control [42]. PID controller also had been used for intravenous drug infusion during knee and hip surgeries of 10 real patients [35]. Other prominent studies have been reported based on advanced adaptive [16, 20]. Model Predictive Control (MPC) [15, 17, 18], and PID with Linear Model Predictive Control (LMPC) [37], PID with Model Predictive Control (MPC) techniques [14], Smith Predictor with PI/PID [1, 31] to compensate the effect of delay and disturbance. The main aim of the recent studies [5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21] is to improve linear approaches by appropriately tuning of the parameters of controller to achieve sufficient robustness margin for recognizable uncertainty. Control algorithms work on linearized model of patient; hence, the patient model displaying non-linear behavior is linearized. Such approximation provides good performance of control scheme only when a small difference between actual and predicted signals exist [40]. Conventional PID is providing oscillatory behavior during clinical trials due to inter patient variability, transport delay and surgical disturbances.

There are two major issues, with BIS signal based frequent adaptation and BIS signal based control system.

1st issue, direct use of BIS has some drawbacks from control point of view: (1) Indirect measurement introduces variable time delays [16]. (2) BIS signal is noisy. (3) BIS value does not vary significantly during induction phase of anesthesia and introduces nonlinearity [22], due to the shape of Hill curve. In order to overcome the above problem, this proposal uses brain concentration (Ce) as a control variable, derived from inverse Hill function (which relates BIS to brain concentration (Ce)) to compensate BIS nonlinearity.

2nd issue, different works present adaptive control method based on BIS error of actual BIS signal and predicted BIS signal. This procedure was repeated every 10 s to 1 min throughout the length of surgery [15,16,17,18, 23]. These algorithms may not be preferable for real application due to two reasons. Firstly, computational efforts will increase. Secondly, the patient parameter state does not vary expressively in few second or minute.

To overcome above problems and to mimic recorded signals and clinical procedure, the proposed adaptive smith predictor-based control scheme has used. Main aim of smith predictor design with PID controller and lead–lag filter is to compensate delay; disturbance effect and model mismatch errors from the system. Also, the purpose of this work is to examine the prospective benefit of individualized propofol delivery based on rule-based adaption and provide alternative approach of adaptive control. The main advantage of rule-based adaption of controller parameters as opposed to model identification-based adaption is the smooth response to unmeasured surgical stimulus during the maintenance phase. In particular, innovations in adaptive method, patient’s drug sensitivity parameters are used for rule-based adaption algorithm to achieve optimal performance in most of the patients. The Proposed adaptive module is an efficient solution to optimize computational effort.

This work also focuses on combine infusions with delay because only continuous infusion is painful to the patient while the depth of anesthesia is low during induction phase. Therefore, bolus dose is more preferable to achieve adequate depth of anesthesia within short time with fewer BIS oscillations during induction phase as compare to only continuous infusion proposed in previous studies [13, 15, 17]. But bolus dose produce nonlinearity in output due to unsystematic drug clearance, thus infusion delay is essential to minimize this nonlinearity.

In order to obtained real propofol infusion rate and BIS signal, 22 volunteers received a manual bolus dose of 2 mg/kg in induction phase. After average 80 s delay, continuous infusion switched on through TCI system during maintenance phase. The real BIS has an unknown delay and reasonable amount of noise. To estimate drug dynamic parameters of specific patient after bolus dose, the real propofol signal is applied to simulator and produces the simulated BIS and propofol brain concentration signal. Patient model uses combined infusion based 4th order pharmacokinetic (PK) and pharmacodynamics’ (PD) model with estimated delay to obtain a propofol brain concentration signal. This signal is given to nonlinear Hill model with estimated drug sensitivity parameters (EC50 and λ) to generate simulated BIS. Individual patient optimal drug sensitivity parameters are estimated from BIS and brain concentration data using cubic polynomial regression, before switch on continuous infusion (estimation of EC50 and λ deliberated in next section). These estimated parameters will be used further in an adaptive module of control system (discussed in Sect. 4). 5% white noise is added in simulated BIS to achieve reality.

The organization of the paper is as follows: it starts with the basic concepts and challenges in anesthesia control. Then the results of the nonlinear polynomial regression to estimate patient drug sensitivity parameters are describe in Sect. 2. Section 3 describes patient model with infusion delay. In the next section, a dead-time compensator is designed and simulation results are shown in Sect. 5. Result discussion for proposed scheme validation and robustness. Also, results comparisons with manually adjusted controller.

2 Drug sensitivity parameters estimation

The main aim of this section is to provide alternate adaption method to avoid frequent adaption procedure and to achieve optimal controller performance in most of the patients. Controller is anticipated for an accurate administration of drugs, when the model used in the design must capture the well enough dynamics of the patient in response to the drug. Hence, this work uses individual patient drug sensitivity parameters EC50 and λ for controller gains adaption in place of BIS signal. Where, EC50 represents the value of the brain concentration in ug/ml to achieve loss of consciousness after bolus dose. λ is the steepness of brain concentration versus response curve [23, 26]. If these parameters are known, the dose required to achieve the target BIS signal can be calculating. This work uses regression model to estimate optimal values of the EC50 and λ by analyzing BIS signal and predicted brain concentration from the patient model. Previously reported literatures considered nominal/fixed values of EC50 and λ. Here, proposed scheme is estimating the optimal values of EC50 and λ. To improve the robustness of the controller against patients’ intra variability, optimal value of EC50 and λ estimation is essential. Nominal values of the EC50 and λ (slope) are 2.56 μg/ml, 1.65 in induction phase and 2.23 μg/ml and 1.5 in maintenance phase respectively [26]. Patient real BIS signal and simulated BIS signal should match with each other to estimate optimum value of EC50 and λ. Both signals perfectly match with each other, when the estimated delay value was optimum (see Fig. 1). The time delay estimated using cross correlation [16]. We have applied linear regression to derive relation between real BIS and simulated BIS signal. Relation can be expressed by the Eq. (1).

$$BIS(t) = \overline{m} \widehat{BIS}(t - \overline{{d_{1} }} ) + \overline{Ca}$$
(1)

here variable \(\overline{m}\) and \(\overline{Ca}\) are line slope and BIS axis intercepts respectively.

Fig. 1
figure 1

The procedure to produce BIS and brain concentration (Ce) signal

Variable \(\overline{{d_{1} }} = d_{r} - d_{s}\) resents time delays of real and simulated BIS signal. Average values of \(\, \overline{m} = 1.1 \,\) and seconds derived by cross correlation [27]. To calculate EC50 value, we are using BIS signal and PK-PD patient model based predicted brain concentration of the same patient after bolus dose. Real BIS has a sigmoidal shape, therefore cubic polynomial regression analysis provides best fit value of predicted brain concentration (see Fig. 2). Actual value of EC50 is derived from real BIS recorded signal and predicted brain concentration, using polynomial regression model Eq. (2) with \(Y(t) = C_{e} (t)\).

Fig. 2
figure 2

Scatter plot of BIS versus predicted brain concentration

$$Y_{i} (t - \tau ) = A_{1} (BIS(t))^{3} + A_{2} (BIS(t))^{2} + A_{3} (BIS(t)) + A_{4}$$
(2)

Assuming no disturbance, simulated BIS relation with brain concentration represents by Eq. (3).

$$Y_{i} (t - \overline{\tau } ) = B_{1} (\widehat{BIS}(t))^{3} + B_{2} (\widehat{BIS}(t))^{2} + B_{3} (\widehat{BIS}(t)) + B_{4}$$
(3)

here Ai and Bi (i = 1, 2, 3, 4) represents polynomial coefficients for real and simulated case. The polynomial coefficients may be determined by solving matrix Eq. (4). Here, φi = Ai (i = 1, 2, 3, 4) for real signal and φi = Bi for simulated case. xi (i = 1, …, n) represents value of real BIS and simulated BIS respectively. Yi (i = 1, …, n) represents predicted brain concentration. N represents number of samples.

$$\left[ {\begin{array}{*{20}c} N & {\sum\limits_{i = 1}^{n} {x_{i} } } & {\sum\limits_{i = 1}^{n} {x_{i}^{2} } } & {\sum\limits_{i = 1}^{n} {x_{i}^{3} } } \\ {\sum\limits_{i = 1}^{n} {x_{i} } } & {\sum\limits_{i = 1}^{n} {x_{i}^{2} } } & {\sum\limits_{i = 1}^{n} {x_{i}^{3} } } & {\sum\limits_{i = 1}^{n} {x_{i}^{4} } } \\ {\sum\limits_{i = 1}^{n} {x_{i}^{2} } } & {\sum\limits_{i = 1}^{n} {x_{i}^{3} } } & {\sum\limits_{i = 1}^{n} {x_{i}^{4} } } & {\sum\limits_{i = 1}^{n} {x_{i}^{5} } } \\ {\sum\limits_{i = 1}^{n} {x_{i}^{3} } } & {\sum\limits_{i = 1}^{n} {x_{i}^{4} } } & {\sum\limits_{i = 1}^{n} {x_{i}^{5} } } & {\sum\limits_{i = 1}^{n} {x_{i}^{6} } } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\varphi_{1} } \\ {\varphi_{2} } \\ {\varphi_{3} } \\ {\varphi_{4} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\sum {Y_{i} } } \\ {\sum {x_{i} Y_{i} } } \\ {\sum {x_{i} Y_{i}^{2} } } \\ {\sum {x_{i} Y_{i}^{3} } } \\ \end{array} } \right]$$
(4)

\(\tau\) and \(\bar{\tau }\) represents drug transport delay from blood to brain concentration of real and simulated signal. Polynomial regression model evaluation equation is representing by Eq. (5).

$$R^{2} = 1 - \sum\limits_{i}^{n} {(Y_{i} - \hat{Y}_{i} )^{2} } /\sum\limits_{i}^{n} {(Y_{i} - \bar{Y}_{i} )^{2} }$$
(5)

R2 measures the percentage of difference in the response variable Y explained by the regression variable \(x\) [28].

$$R^{ * 2} = R^{2} - \frac{{(1 - R^{2} )K}}{n - (K + 1)}$$
(6)

If Adj. R2 values much lower than R2 it means regression equation may be over-fitted to the sample data. Higher than 0.9 values of R2 provides good fitness [28]. Regression model performance evaluation and estimated EC50 for different patients are listed in Table 1.

Table 1 Performance indices of regression model and estimated value of EC50

2.1 Estimation of Hill coefficient

Hill coefficient is a slope of brain concentration versus drug effect after linearization. Here E(t) represents output of drug effect (i.e. BIS). E0 represents initial value of BIS and BISmax indicates the maximum effect intensity achieved by the drug administration. Hill equation represented by Eq. (7) [8, 16,17,18, 29]. The hill coefficient is derived by:

$$E(t) = BIS_{\hbox{max} } \frac{{Ce^{\lambda } (t)}}{{(EC_{50} )^{\lambda } + Ce^{\lambda } (t)}}$$
(7)

Here \(E(t) = BIS(t) - E_{0}\).

Equation (8) derived from Eq. (7)

$$100 - E(t) = 100 - BIS_{\hbox{max} } \frac{{Ce^{\lambda } (t)}}{{(EC_{50} )^{\lambda } + Ce^{\lambda } (t)}}$$
(8)

Equation (9) derived from Eqs. (7) and (8).

$$\begin{aligned} \log \left( {\frac{E(t)}{100 - E(t)}} \right) & = \log \left( {\frac{{Ce^{\lambda } (t)}}{{(EC_{50} )^{\lambda } }}} \right) \\ & = \lambda \log Ce(t) - \lambda \log EC_{50} \\ \end{aligned}$$
(9)

λ is the slope of \(\log Ce(t)\) versus \(\log (E(t)/100 - E(t))\).

λ is identified using linear least square estimation method. Actual λ derived from real signal and estimated λ derived from simulated signal. Difference between estimated EC50 value from simulated and real signal represents by Fig. 3a, b. The patient’s model can be classified into four categories-the sensitive, the nominal, the insensitive and the oscillatory model.

Fig. 3
figure 3

Comparison of regression models based actual and estimated parameters. a Comparison of EC50 values and b comparison of λ values

We have tried to identify the patient body characteristics based on estimated value of EC50 and λ to account for the patient inter-intra variability. Model sensitivity parameters are never same for every patient. Patient model is influenced by linear and nonlinear disturbances due to stochastic activity, blood loss and drug response delay. Specific body characteristic can be identified from the patient sensitivity parameters EC50 and λ.

Higher value of EC50 indicates slower patient body response to drug dose due to long BIS flat plateau and higher drug dose is required to maintain BIS = 50, means patient has an insensitive body characteristic. Lower value of EC50, means fast patient body response to administrated drug indicates sensitive body characteristic due to short BIS flat plateau [14]. Higher value of λ increases nonlinearity in BIS response. Thus, higher value of λ represents oscillatory patient body characteristic [14]. The value of EC50 and λ highly influence the BIS response, therefor fine-tuned gain setting may be best for only selected range of the value of EC50 and λ not for all, it can be seen in Fig. 4a. As observed from Fig. 4a, fixed controller parameters are not satisfactory and not able to maintain the BIS at set point 50 in most of the patients.

Fig. 4
figure 4

a Controller evaluations for different values of EC50 and λ and b control scheme BIS output response with nominal and estimated values of EC50

There are two reasons for controller performance degradation, first is the different patient variability and second is that the nominal/fixed sensitivity parameters are not the optimum in most of the patients.

From Fig. 4b, large difference between the actual values and nominal/fixed values of sensitivity parameters EC50 and λ increases variations in BIS response, propofol dose in induction phase, offset error in maintenance phase and also decreases robustness of the controller. Mean and standard deviation values of drug sensitivity parameters and transport delay (to reach BIS at 50) of 22 different patients are listed in Table 2.

Table 2 Sensitivity parameters are estimated from effect of bolus propofol dose

3 Model of the patient

According to hypnosis control, final controlled variable is not the blood concentration but the brain concentration. The human body is separated into some mammillary compartments and all compartments are linked via drug micro rate [14]. Fig 5 shows four compartments-based PK and PD patient model for combine infusion with delay. Fast peripheral compartment represents a compartment of the body that absorbs the drug rapidly from the central compartment. The slow peripheral compartment represents drug re-distribution more slowly. Sawaguchi et al. [18] used a combined model of Schüttler–Ihmsen et al. [30] for fixed bolus and continuous infusion with brain compartment but had not considered delay between bolus and continuous infusion to minimize bolus dose nonlinearity. Patient model with infusion delay is shown in Fig. 5, where, Ci (i = 1, 2, 3, 4) are the central, other two peripheral and brain compartment concentration of propofol (μg/ml) respectively. Ki and Vi are the distributions micro rates constants (l/min−1) and volumes (l) of compartments respectively central, fast, slow and brain compartment. U con1 , K con i and V con i (i = 1, 2, 3, 4) represents continuous infusion input and patient model parameters. In addition, U is an input administration rate of propofol in (ml/h). K con1 the hepatic metabolism representing abolition rate of drug from body through kidney and liver organ’s (min−1). Propofol concentration is 10 mg/ml represented by ρ. Parameter δ = 60 (min/h) for propofol, obtained from the pooled analysis (Yelneedi et al. [14]). Propofol infusion rate is in (ml/h) but clinically rate represented by mg/kg/h. To convert U in mg/kg/h, it is multiplied by ρ/ω. Where, ω is the body weight of patient in kg. The parameters Ki of the PK model depend on age and weight of the patient. Authors have modified the mathematical equations of drug distribution micro rates parameters suggested by Sawaguchi et al. [18] and Yelneedi et al. [14]. The real patient information like age and weight are used to calculate PK equations. All mathematical formulas to calculate PK model are given in “Appendix” section. Equation (10) denotes mathematical form of central compartment.

Fig. 5
figure 5

Combined infusion-based PK-PD model with delay

$$\begin{aligned} SC_{1} (s) & = \frac{{ - \left[ {(K_{1}^{con} + K_{2}^{con} + K_{3}^{con} )} \right]}}{{V_{1}^{con} }}C_{1} (s) + \frac{{K_{2}^{con} }}{{V_{1}^{con} }}C_{2} (s) \\ & \quad + \,\frac{{K_{3}^{con} }}{{V_{1}^{con} }}C_{3} (s) + U_{1}^{con} (s - Td_{1} )\frac{1*\rho }{{\delta *\omega *V_{1} }} + U_{2}^{bol} (s)b_{1} \\ \end{aligned}$$
(10)

Similarly, other two (2nd and 3rd) peripheral compartments, the corresponding mass balance equations are given by Eqs. (11) and (12).

$$SC_{2} (s) = \frac{{K_{2}^{con} }}{{V_{2}^{con} }}C_{1} (s) - \frac{{K_{2}^{con} }}{{V_{2}^{con} }}C_{2} (s) + U_{2}^{bol} b_{2}$$
(11)
$$SC_{3} (s) = \frac{{K_{3}^{con} }}{{V_{3}^{con} }}C_{1} (s) - \frac{{K_{3}^{con} }}{{V_{3}^{con} }}C_{3} (s)$$
(12)

In this study, propofol is given at the rate of 2 mg/kg as an induction bolus dose U bol2 (t) with a rate of 10 mg/s within first 0–25 s. The bolus coefficients b1 and b2 have been selected by solving the minimum error after a bolus input to the patient model Eqs. (1012). Set minimum rate of infusion as 1.5 mg/kg/h during infusion delay (Td1 = 80 s) before continuous propofol administrated by control scheme in maintenance phase. Adequate infusion during delay is required to fast settling of BIS against higher drug clearance rate. According to anesthetics practices, during various kinds of surgery bolus dose hypnotic effect depends on amount of bolus dose and patient body tolerance against drug. Final Eq. (13) of PK model is derived from Eqs. (1012). Where C1 (s) represents plasma concentration and U (s) represents propofol infusion. Mathematical relation of k1, k12, k21, k13, k31 are given in “Appendix” section.

$$PK_{M} (s) = \frac{{C_{1} (s)}}{U(s)} = \frac{{(s^{2} + s(k_{21} + k_{31} ) + k_{21} k_{31} )}}{{((s^{3} + s^{2} (k_{1} + k_{12} + k_{21} + k_{13} + k_{31} ) + s(k_{1} k_{21} + k_{1} k_{31} + k_{13} k_{21} + k_{31} k_{21} ) + (k_{1} k_{21} k_{31} ))}}$$
(13)

Rewrite the Eq. (13) in generalized form as

$$PK_{M} (s) = \frac{{C_{1} (s)}}{U(s)} = \frac{{ax_{2} s^{2} + ax_{1} s + ax_{0} }}{{bx_{3} s^{3} + bx_{2} s^{2} + bx_{1} s + bx_{0} }}$$
(14)

where

$$\begin{aligned} ax_{0} & = 1, \, ax_{1} = 1, \, ax_{2} = (k_{21} + k_{31} ), \, \\ bx_{0} & = (k_{1} k_{21} k_{31} ), \, bx_{1} = (k_{1} k_{21} + k_{1} k_{31} + k_{13} k_{21} + k_{31} k_{21} ) \\ bx_{2} & = (k_{1} + k_{12} + k_{21} + k_{13} + k_{31} ), \, bx_{3} = 1 \, \\ \end{aligned}$$

The main controlled pharmacodynamics’ (PD) variable Ce (s) measures brain concentration and its evolution is directed by Eq. (16). Assuming K4/V4 = Ke0. Internal drug transport delay (td (s)) caused by travelling of propofol drug from a three-way stopcock to the human’s body in an intravenous fluid line and spreading of propofol in blood vessels.

$$SCe(s) = \frac{{K_{4} }}{{V_{4} }}C_{1} (s)e^{{ - t_{d} (s)}} - \frac{{K_{4} }}{{V_{4} }}Ce(s)$$
(15)
$$Ce(s) = \frac{{K_{e0} }}{{S + K_{e0} }}C_{1} (s)e^{{ - t_{d} (s)}}$$
(16)

Authors have taken the volume of brain compartment V4 equal to 100th of V1 and Ke0 = 0.12 l/min [18].

The BIS response to propofol infusion includes significant drug transport time delay and BIS instrumental delay. The delay td (s) is patient drug transport delay. Subsequently this delay reduces due to saturated drug concentration in maintenance phase. Overall patient model Gp(s) derived from the cascade connection of 3rd order PK model and 1st order PD model.

$$Gp(s) = \underbrace {{\frac{{ax_{2} s^{2} + ax_{1} s + ax_{0} }}{{bx_{3} s^{3} + bx_{2} s^{2} + bx_{1} s + bx_{0} }}}}_{\text{PK model}} \cdot \underbrace {{\left( {\frac{{K_{e0} }}{{S + K_{e0} }}} \right)e^{{ - t_{d} (s)}} }}_{\text{PD model}}$$
(17)

\(\overline{Gp} (s)\) model derived using the same PK-PD equations based on normal patient information and connected in parallel with Gp(s) (See Fig. 6). The BIS function is commonly using an Emax model (detail is discussed in Sect. 2) [8, 16,17,18, 29].

Fig. 6
figure 6

a Schematic of the proposed method and b Matlab Simulink block diagram of proposed scheme

$$BIS(t) = BIS_{0} - BIS_{\hbox{max} } \frac{{(Ce(t))^{\lambda } }}{{(EC_{50} )^{\lambda } + (Ce(t))^{\lambda } }}$$
(18)

In this scheme, brain concentration (Ce(t)) estimated from measured BIS and used as a controlled variable in proposed design using Eqs. (19, 20). The estimated values of the drug sensitivity are used in feedback inverse Hill function f2 (see Fig. 6) to derive feedback brain concentration from BIS, using Eq. (19).

$$Ce(t) = EC_{50} \left[ {\frac{{E_{0} - BIS(t)}}{{E_{\hbox{max} } - E_{0} + BIS(t)}}} \right]^{{\frac{1}{\lambda }}}$$
(19)

Normally set value of BIS is 50 during surgery. Similarly, reference brain concentration \(\overline{Ce} (t)\) is calculated using Eq. (20).

$$\overline{Ce} (t) = EC_{50} \left[ {\frac{{E_{0} - BIS^{set} }}{{E_{\hbox{max} } - E_{0} + BIS^{set} }}} \right]^{{\frac{1}{\lambda }}}$$
(20)

4 Design of adaptive smith predictor

Smith predictor scheme is a simple and robust classical method to effectively compensate delay, disturbance and model mismatch error due to patients’ model’s variability. As a result, a time-delay free section is achieved for which an ideal controller can be designed.

In case, if real BIS is not available or suspended due to poor quality of EEG signal, smith predictor design predicts feedback signal using reference patient model (patient model discussed in Sect. 3). The main objective of a proposed rule based Adaptive Smith Predictor (ASP) control strategy is to design modest structure of hypnosis controller having capability of showing satisfactory response in a real time clinical environment (see Fig. 6a, b).

Controller needs to achieve the subsequent performance criteria:

  1. 1.

    Set-BIS equal to 50.

  2. 2.

    Settling time within 200–600 s and overshoot less than 10%.

  3. 3.

    No steady-state with an error tolerance of ± 5 from set BIS.

  4. 4.

    Cost function on integrated absolute error (IAE) represent by Eq. (39) should be minimized.

In addition to above tighter regulations controller also has upper and lower propofol infusion bound to avoid under and over dosing. Figure 6a represents structure of proposed control scheme. The outer loop of design delivers real patient model feedback signal. The inner loop with reference patient model works to eliminate the actual delayed output and to provide the predicted feedback output to the controller.

From Fig. 6a, b, smith predictor controller scheme connected in series with real and reference patient models. Figure 7 depicts the proposed control strategy to carry out simulation study. For the induction phase in simulation, proposed control scheme provide bolus signal to the patient models to generate simulated BIS and brain concentration signals. Time based switch is used to record these signals up to threshold time period. The estimated values of EC50 and λ calculated from these recorded signals via regression module (please see Sect. 2). Adaption module is used these estimated values to select final settings of PID controller (please see pseudo code). A final gain setting is obtained by IAE error optimization. Also estimated values of EC50 and λ are updated in Hill and Inverse Hill functions to optimize the output offset error.

Fig. 7
figure 7

Depiction of implemented control strategy

The maintenance phase in simulation, time based switching manager is used to connect controller after stipulated time period. After 80 s infusion delay the value of actual BIS shall be closer to 50 due to the effect of induction dose. According to the difference between reference and feedback brain concentration [see Eqs. (19) and (20)] proposed ASP controller will adjust the continuous infusion rate. Unlike existing methods, proposed work has utilized the knowledge of patient’s drug sensitivity parameters for PID gain adaption instead of model identification based adaptive algorithm (listed in Table 4). Smith predictor controller design procedure has been explained in next section.

4.1 IMC based smith predictor controller design scheme

In this study, authors have used optimal IMC designing rules to derive the transfer function of smith predictor controller based on real and reference patient models \(Gp(s)\) and \(\overline{Gp} (s)\).

Basic structure of smith predictor is discussed previously (please see Fig. 6). Patient model is discussed in Sect. 3. From Fig. 6, The closed loop smith predictor transfer function for set point tracking is given by Eq. (21).

$$G_{smith} (s) = \frac{{G_{C} (s)Gp(s)e^{{ - t_{d} s}} }}{{1 + G_{C} (s)[\overline{Gp} (s) + Gp(s)e^{{ - t_{d} s}} - \overline{Gp} (s)e^{{ - t_{dP} s}} ]}}$$
(21)

We have considered ideal case; \(Gp(s) = \overline{Gp} (s)\quad \text{and}\quad \, t_{d} s = t_{dP} s\) and disturbance Gd(s) = 0. GC (s) represents controller transfer function. tds and tdPs are the positive drug delay constants of real and reference patient. The Eq. (22) derived from Eq. (21) for set point tracking. To track set point perfectly Y(s) = R(s) should be satisfied.

$$G_{smith} (s) = \frac{Y(s)}{R(s)} = \frac{{G_{C} (s)Gp(s)e^{{ - t_{d} s}} }}{{1 + G_{C} (s)\overline{Gp} (s)}}$$
(22)

Smith predictor controller transfer function can be obtained based on IMC condition. IMC design gives guaranteed closed loop stability by testing the stability of patient model and controller. To derive final controller equation we have used First Order Plus Time Delay (FOPTD) model (see Eq. (23)). FOPTD model patient’s parameters obtained using process reaction curve method (see Table 3).

Table 3 Patients’ parameters values for FOTD model
$$Gp(s) = \overline{Gp} (s) = \frac{K}{{(1 + \tau_{1} s)}}e^{{ - t_{d} s}}$$
(23)

Here τ1 is time constant and td is the initial drug transport delay and K is the sensitivity of patient inform of constant gain. All time constants are measured in seconds. Average different patients FOPTD model parameters are listed in Table 3.

IMC rules for smith predictor controller design:

  • Rule 1 Factorization of patient model in invertible part

\(\overline{{Gp_{ - } }} (s)\) and non-invertible part \(\overline{{Gp_{ + } }} (s)\).

$$\overline{Gp} (s) = \overline{Gp}_{ - } (s)\overline{Gp}_{ + } (s)$$
(24)

FOPTD model factorization with delay approximation via pade approximation is specified by Eq. (25).

$$\overline{Gp}_{{_{ - } }} (s) = \frac{K}{{(\tau_{1} s + 1)(1 + \gamma t_{d} s)}},\overline{Gp}_{ + } (s) = (1 - \gamma t_{d} s)$$
(25)

As per the standard formula of pade approximation, chosen γ = 0.5 for all patients.

  • Rule 2 Define the IMC based controller with Lead–lag filter

$$G_{C} (s) = \overline{{Gp_{ - } }} (s)^{ - 1} \cdot G_{f} (s)$$
(26)

Patient inverse model may generate problem of instability, non-causality and physically unreliable. So, the inverse model followed by improved lead–lag series filter. Filter is normally used to reduce the model mismatch effects [31, 32, 36]. Gf (s) represents transfer function of lead–lag filter design suggested by Gopikrishna et al. [32]. GC (s) represents transfer function of IMC controller. For ideal control,\(\mathop {\lim }\nolimits_{s \to 0} G_{f} (s) = 1\).

$$G_{f} (s) = \frac{{(\alpha s + 1)^{n} }}{{(\beta s + 1)^{n + 1} }} , { }\quad \alpha ,\beta ,n > 0 \,$$
(27)

Where α and β are regulation and time constant parameters of filter. The values of α and β parameter adjudicators of the speed of closed-loop response system, and also eliminates real patient/reference patient model mismatch error which arises at high frequency, thus these parameters responsible for closed loop system robustness. In our case, order of filter n = 2 chosen to convert GC (s) into proper/semi-proper transfer function. α is obtained by the Eq. (28).

$$\alpha = \tau_{1} [1 - \sqrt {(1 - \frac{\beta }{{\tau_{1} }})^{3} e^{{ - \frac{{t_{d} }}{{\tau_{1} }}}} } ]$$
(28)

The pole s = − 1/τ1 is cancelled by the extra degree of freedom provided by α. Characteristic equation \(\left[ {1 - G_{C} (s)\overline{Gp} (s)} \right]_{{s = - \frac{1}{{\tau_{1} }}}} = 0\).

α will not familiarize undesired zeros in Right Half Plane (RHP), for this α > 0. β is estimated form IMC design based on FOPTD system, through the Eq. (29) [41].

$$\beta = \frac{{1.508 - 0.451 \cdot M_{s} }}{{1.45 \cdot M_{s} - 1.508}}t_{d}$$
(29)

here td represents initial delay. Recent analytical method the maximum sensitivity Ms is used to measure robustness and guaranteed stability of closed loop system.

$$M_{s} = \mathop {\hbox{max} }\limits_{0 \le \omega < \infty } \left| {\frac{1}{{1 + G_{C} (j\omega )Gp(j\omega )}}} \right|$$
(30)

The value of Ms decreases, robustness increases [32]. So normally Ms selected in the rage of 1.2–2. If τ > β and θ/τ ≪ 1 are desirable for good set-point tracking and disturbance rejection response [32]. Based on this condition, the value of β and α is selected. Final transfer function of GC(s) is derived by substituting Eqs. (25) and (27) into Eq. (26).

$$G_{C} (s) = \frac{{(\alpha s + 1)^{n} }}{{(\beta s + 1)^{n + 1} }}\frac{{(1 + \tau s)(1 + \gamma t_{d} )}}{K} , { }\quad n = 2$$
(31)

IMC controller converted in feedback controller GASP (s) by Eq. (32).

$$G_{ASP} (s) = \frac{{G_{C} (s)}}{{1 - G_{C} (s)\overline{Gp}_{ - } (s)}}$$
(32)

From Eqs. (31) and (32), final transfer function of ASP is given by (33).

$$G_{ASP} (s) = \frac{{(\gamma t_{d} \tau_{1} s^{2} + (\gamma t_{d} + \tau_{1} )s + 1)(\alpha s + 1)^{n} }}{{K\left( {(\beta s + 1)^{n + 1} (1 + \gamma t_{d} s) - (\alpha s + 1)^{n} (1 - \gamma t_{d} s} \right)}}$$
(33)
$$G_{ASP} (s) = \frac{{(\alpha s + 1)^{2} }}{{Ks(3\beta + t_{d} - 2\alpha )}}\frac{{(\gamma t_{d} \tau_{1} s^{2} + (\gamma t_{d} + \tau_{1} )s + 1)}}{{\left[ \begin{aligned} \frac{{\gamma t_{d} \beta^{3} }}{{(3\beta + t_{d} - 2\alpha )}}s^{3} + \left( {\frac{{\beta^{3} + 3\gamma t_{d} \beta^{2} + \gamma t_{d} \alpha^{2} }}{{(3\beta + t_{d} - 2\alpha )}}} \right)s^{2} \hfill \\ + \left( {\frac{{3\beta^{2} + 3\gamma t_{d} \beta + t_{d} \alpha - \alpha^{2} }}{{(3\beta + t_{d} - 2\alpha )}}} \right)s + 1 \hfill \\ \end{aligned} \right]}}$$
(34)

Rewrite the Eq. (34) in form of Eq. (35).

$$G_{ASP} (s) = K_{p} (1 + \frac{1}{{T_{i} s}} + T_{d} s)\frac{{(\overline{d} s^{3} + ds^{2} + cs + 1)}}{{(\overline{b} s^{3} + bs^{2} + as + 1)}}$$
(35)

From Eqs. (34) and (35) we have obtained mathematical relations for controller and filter parameters, which are listed in Table 4 [32]. These mathematical relations provide good stability and robustness.

Table 4 PID gain settings and filter co-efficient parameters

The final PID controller parameters for different patients has been determined by employing optimization in order to minimize the Integrated Absolute Error (IAE) cost function defined by Eq. (39) (discussed in next section) and BIS oscillations. The small value of IAE index has been selected as it is considered fast response without significant BIS oscillation. Table 5 depicts summary of final PID settings for different patients.

Table 5 Final PID gains setting

Adaption rules are described in pseudo code:

figure a

4.2 Clinical environment for patient data

In the operation theater, the patient was connected to the BIS monitor. After the patient had breathed 100% oxygen for 3 min, Bolus dose of propofol was given by anesthetics doctors at a 2 mg/kg and wait for 80 s to achieve a BIS ¼ of starting value. After that TCI system is switched on for automatic infusion to regulating the BIS around 50. BIS were measured using a BIS monitor of Covidien BIS™ Complete Monitoring System. This data have been recorded for 1–2.5 h. Other anesthetic drugs like, tramadol infusion was adjusted manually and vecuronium was administered in bolus as needs during surgery by the anesthetic doctor. Premedication with supplemental IV bolus dose of drugs, pentazocine (fortwin) as 0.5 mg/kg, glycopyrolate dose at 8–10 μg/kg and diclofenac sodium at 1.5 mg/kg were administrated to reduce pain and secretions during surgery. The real BIS and propofol signals have been recorded under the described clinical environment.

The study was approved by the Ethical and Research Committee of the Surat Municipal Institute of Medical Education And Research (SMIMER), India and Informed consent was obtained from all individual participants included in the study. The study was performed on a population of 22 patients of 18–60 years [American Society of Anesthesiologists (ASA) physical status (PS) class I–II].

5 Results and discussion

The main aim of proposed scheme, to make automatic TCI infusion of propofol to optimize BIS settling time, maintain smooth BIS around target during surgery and to achieve optimum BIS response in most of the patients without changing controller parameters frequently. A simulation study is performed on 22 patient models. In this work, proposed sensitivity based adaptive control scheme is compared with recently reported control schemes based on set point tracking and performance error indices. Then the performance of the ASP control scheme compared with manual control scheme based on disturbance rejection. The results evidently validate the potential of a sensitivity based adaptive control scheme. In terms of IAE, the sensitivity based adaptive controller could deliver a 29% reduction in error compared with the recently proposed continuous infusion method [17]. In our design, nominal values of filter coefficients are selected based on normal patient parameters.

$$\begin{aligned} b & = 2.7978, \, a = 2.398, \, d = 0.00067, \, c = 0.052, \, \\ \overline{b} & = 0.65620, \, \alpha = 0.026, \, \beta = 1.7 \\ \end{aligned}$$

5.1 Performance evaluation of the proposed control scheme

Controller’s performance errors comparisons are calculated as per Eqs. (3639), which was used by Struys [33]. MDPE (median performance error) and MDAPE (median absolute performance error) is calculated form the Eqs. (37, 38). MDPE sign presents direction of (over and under control) performance error [26, 33]. Negative sign of MDPE indicted over control means BIS level below set value. A positive sign indicates lighter anesthesia, means BIS level above set value. MDAPE reflects magnitude of the control inaccuracy.

$$PE = \frac{(Measured\,\,BIS - Set\,\,BIS)}{Set\,\,BIS} \cdot 100$$
(36)
$$MDPE = Median\left\{ {PE_{i,} i = 1,2, \ldots ,N} \right\}$$
(37)
$$MDAPE = Median\left\{ {\left| {PE_{i} } \right|\text{ }i = 1,2, \ldots ,N} \right\}$$
(38)
$$IAE = \int\limits_{0}^{t} {\left| {e(t)} \right|} d(t)$$
(39)

MDPE and MDAPE comparison of proposed system with their published hypnosis control system and manual method are listed in Table 6. Proposed system has smaller MDAPE error as compare to others. Smaller MDAPE value indicates tighter control around set point.

Table 6 Comparison of proposed control scheme vis-à-vis previously reported hypnosis control techniques

This may reduce time of excessive anesthesia and provide protection against risk of awareness. MDAPE less than 5% is acceptable from a clinical point of view. Integrated Absolute Error (IAE) is the main performance index. This value is calculated by integrating the absolute difference of reference BIS and measure BIS. Large value of IAE represents more sluggish and less desirable response.

Figure 8 shows the comparison for 42 year female (50 kg weight) patient’s actual BIS response obtained from the septoplasty surgery, BIS response without infusion delay based on scheme designed by Sawaguchi et al. [18], only continuous infusion scheme used by Nascu et al. [17] and BIS response of proposed scheme with infusion delay. Result shows that real BIS response has some oscillations during first 10 min.

Fig. 8
figure 8

BIS response comparison of proposed control scheme with previously reported studies and actual recorded data

These oscillations are produced due to patient body delay. Due to these oscillations, BIS is not reliable as a feedback signal. Therefore, brain concentration used as a feedback in proposed control scheme. Lately proposed only continuous propofol infusion based model predictive control technique [17] takes long time for the adequate hypnosis level in induction phase due to fast drug clearance rate. Only continuous propofol infusion requires higher dose in maintenance as compared to bolus and continuous dose [24, 25, 34]. Continuous propofol infusion requires frequent dose variation to achieve adequate depth of anesthesia infusion during induction phase compare to bolus dose [25, 34]. Sawaguchi et al. [18] had used 120 mg fixed bolus dose for all patients. But fixed bolus dose may not be adequate for all patients. Hence, the proposed system used 2 mg/kg bolus dose for all patients. Comparisons results show that the sensitivity based gain adaption with combine infusion scheme of the controller provides fast induction settling time as compared to others methods.

Sensitivity based adaption scheme has bonded undershoot, which corresponds to the infusion delay. These undershoot increases depth of anesthesia and provide protection against intraoperative arousal problem during intubation process of induction phase.

Figure 9a, b present the evolution of controller parameters under the self-adaptive system for 22 different patients. The controller gains are updated by patient’s drug sensitivity based adaptation model. Optimum controller gains settings are obtained by minimizing a cost-function involving IAE error (Eq. (39)). Suggested setting of PID gains archives all most performance criteria (see Sect. 4) in most of the patients. According to medical practices, the brain concentration Ce should be maintained between 0.5 and 5 μg/ml [14]. Therefor upper infusion bound is 10 mg/kg/h because high propofol concentration may lead to hypotension with bradycardia. Lower infusion bound is 0.5 mg/kg/h reflects the possibility to non-negative infusion of propofol.

Fig. 9
figure 9

Proposed ASP scheme performance for different patients a BIS response with delay and b propofol infusion rate

The set point tracking and necessary medical constrains with patient’s sensitivity based adaptive controller is always satisfactory.

MDAPE performance error (Mean ± standard deviation (SD)) without disturbance in percentage for the sensitive, normal, oscillatory and insensitive patients are respectively: 1 ± 0.4, 1.4 ± 1.1, 3.4 ± 0.9 and 2.6 ± 1.3. The difference in MDAPE value can be accredited to the different tuning of the controller gains that can be less or more aggressive response and thus produce different MDAPE value for different patient. Obviously there is some variability in the calculated MDAPE errors but, it is limited and doesn’t significantly influence the set-point tracking. Oscillatory and insensitive patients have large average settling time as compare to sensitive and normal patients. Usually, manual medical practices taking up to 15 min thus, a settling time between 5 and 10 min gives good performances..

ASP system was also implemented on Advantech PCI-1710 data acquisition hardware for the real time validation of the system can be seen in Fig. 10.

Fig. 10
figure 10

Real time ASP result for BIS response

5.2 Induction phase

Induction phase is more critical and smallest phase of anesthesia as compare to maintenance phase. From Fig. 8, bolus dose is given to achieve desire depth of anesthesia within a short time, so surgeon can start operation. BIS value should be within 40–60 during intubation process to avoid the critical BIS value of greater than 60. Average mean fluctuation value of BIS found to be ± 8 due to intubation process [34] in real BIS signal. Adequate amount of bolus dose provides protestation against intra operative arousal.

Figure 11a, b represents comparison of real and simulated BIS and propofol infusion signal for the nominal patient. From simulation result, it can be seen that, proposed scheme has (Mean ± SD) 4 ± 1.5 min settling time and average 8.6% undershoot and mean fluctuation value of BIS around 50 is ± 2 during maintenance phase. In all cases infusion delay and drug sensitivity based adaption proved better fitting with smallest average offset error and standard deviation are 0.38, 1.6 respectively. Average MDAPE with standard deviation is 2.1 ± 0.9 for induction phase. Proposed scheme has more smother BIS signal and lesser variations in propofol signal. Therefore proposed system is reducing requirement of propofol and also reduce patient discomfort level and adverse post reactions after surgery.

Fig. 11
figure 11

Performance comparison for induction phase a result of manual control proposed scheme BIS response and b result of propofol infusion

5.3 Maintenance phase

During maintenance phase, BIS signal may be despoiled by artifacts likes, measurement noise or a sudden disturbance in BIS signal due to some excitement in body. The sudden disturbances denote specific event of surgical incision during surgery. For better control performance noise and disturbance in the effect site BIS signal must be handled correctly (e.g. filtering for noise removal). If not, the inappropriate and unreliable values of the BIS signals can result in wrong drug dosage delivered to the patient.

To avoid wrong dosing during disturbance, proposed control scheme maintained infusion constrain rate between 0 and 10 mg/kg/h during maintenance phase. When, the sudden disturbances occurred during surgery, anesthesiologist try to bring patient set BIS as fast as possible. So, the simulation of ASP scheme is performed for the two surgical disturbance signals (see Fig. 12 for insensitive patient) with pulse strength + 20 and − 10 between 26 and 39 min. The controller disturbance rejection ability is playing an important role in maintenance phase.

Fig. 12
figure 12

Performance comparisons for disturbance a, b represents results of manual control. c, d Denotes results of ASP control scheme

In the case of surgical disturbances, the BIS go to the high exciting values and the ASP scheme has a fast response and minor undershoot/overshoot due to the smaller gain values. Intended for realistic assessment of ASP controller, white noise with zero mean and standard deviation of ± 3 is added in to the simulation BIS signal. Table 7 represents performance evolution of ASP for disturbance. At the time of disturbance, percentage undershoots and overshot are also given in Table 7. There is no significant difference in IAE values of different patients indicates that, optimal response is achieved by the proposed ASP in most of the patients. 8% amplitude of BIS undershoot/overshoot and disturbance rejection is given as well. This value suggested by the clinical practices. Average MDAPE standard deviation of 0.9 for disturbance rejection due to the infusion constrains and smaller gain value. Average total variation in propofol drug rate (mean ± SD) is 2.05 ± 1.3 respectively. Manual total propofol dose variation is almost twenty times higher than proposed automatic infusion system. MDPE and MDAPE of proposed system performance indices are better than existed methodologies. Main reason of improving MDPE and MDAPE is an estimation method of sensitivity parameters in place of nominal/fixed values. MDPE and MDAPE of proposed system are better than manual mode due higher sampling rate of feedback parameters during surgery.

Table 7 Effect of disturbance on the performance of the proposed control scheme

Average 6.7% improvement in MDAPE as compare to previously reported studies due to simple adaption technique and infusion delay based PK-PD patient model. PK-PD model has always mismatches and estimation error in pharmacodynamics parameter compare to actual patient. To attenuate these effects, proposed adaptive smith predictor control provide individualize control and also integrates information of a time delay and input constraints. Proposed scheme also tested on real time simulator for different types of patients’ profiles to analyze the effect of different drug tolerance rate, effect on BIS index and the corresponding propofol infusion rates.

Based on obtained result the following deliberation can be prepared.

  1. 1.

    Propofol drug sensitivity parameters based adaptive smith predictor controller provides expected performance (fast transient and small under-overshoot) in induction phase and limited BIS oscillations in maintenance phase. The performance is better than the recently proposed control strategy like model predictive [17].

  2. 2.

    Drug sensitivity based adaptive control scheme reduces total number of adaption procedures. BIS error based frequent adaption may be produce dangerous BIS oscillations. Indeed, minimum adaption in the controller gains are beneficial for real hardware infusion pump and also for the patient, smooth infusion implies a stable hemodynamic.

  3. 3.

    The design of proposed control scheme integrates the manual infusion given by the anesthesiologist and continuous infusion administered by the control system. Therefore, clearly supervised the overall behavior of the controller.

  4. 4.

    The proposed control scheme demanded optimum values of drug sensitivity parameters to provide required robustness.

6 Conclusions

The main motivation behind the use of advance control scheme is to abate the negative impact of imprecise propofol administration during surgery. Fine-tuned adaptive controller gains setting for specific range of EC50 and λ have a potential to provide optimal response in most of the patients with acceptable disturbance rejection capability. Combine infusion based proposed scheme reduces BIS settling time and total propofol variations to maintain smooth BIS. Estimated drug sensitivity parameters provide small offset error as compare to nominal/fixed sensitivity parameters value. Simulation results with real experimental data suggest that, global requirements such as smallest settling time, offset errors and fewer BIS oscillations maintained with minimum propofol infusion variations during surgery in most of the patients are well met by applying proposed ASP control scheme with lead–lag filter. Robustness of ASP control scheme with lead–lag filter for hypnosis control is compared with previously reported studies via performance errors. Proposed system compared with manual adjustment for future direction of our system before clinical trials.

Proposed system uses recorded BIS and brain concentration during induction phase to estimate the sensitivity parameters in place of online estimation. But this limitation does not posture any interruption in its real life application. Online estimation may be influenced by noisy BIS signal. Therefore, proposed system uses signals recording and processing them through polynomial regression analysis allows estimating patient sensitivity parameters. These estimated parameters used for online adaption model.

Future hardware module design based on proposed concept of control scheme reported in this work may be a good anesthetic assistant with a portable health monitoring system. It may be suggested for dose of anesthesia during surgery.