doi: 10.56294/saludcyt2022243

 

ORIGINAL ARTICLE

 

Machine learning approach to predict delay in smart infusion pump

 

Aprendizaje automático para predecir el retraso de una bomba de infusión inteligente

 

Jayakumar Venkata Alamelu1  *, Asaithambi Mythili1  *

 

1Ramaiah Institute of Technology, Bangalore, India.

2Vellore Institute of Technology, Vellore, India.

 

Cite as: Alamelu JV, Mythili A. Machine learning approach to predict delay in smart infusion pump. Salud Cienc. Tecnol. 2022;2(S2):243. https://doi.org/10.56294/saludcyt2022243

 

Submitted: 06-11-2022                         Revised: 14-12-2022                        Accepted: 22-12-2022                      Published: 31-12-2022

 

Editor: Fasi Ahamad Shaik  

 

ABSTRACT

 

Wireless smart infusion pumps are currently under development. It is critical to ensure that the patient receives the correct drug concentration. Practically, the performance of the pump has relied on the minimum startup delay. The minimization of the startup delay is prominent in open-type infusion pumps and rarely in closed types. The emphasis on reducing startup delay puts practitioners and caregivers at ease while ensuring patient safety. The startup delay of the infusion pump is based on the flow rate and the lag time. The prediction of the flow rate and lag time for an infusion pump is necessitated to ensure a safe drug dosage for the patient. Currently, machine learning methods and computational methods to predict the desired parameter are widely used in healthcare applications and medical device performance. The reduction of start-up delay can be achieved by predicting its associated parameters lag time and flow rate. The flow rate is dependent on the speed of the infusion pump, which has to be calculated based on the number of gears and revolutions. The speed of the pump has to be predicted for accurate flow delivery. Our present research attempts to predict the lag time of an infusion pump using different kernel functions of support vector regression (SVR). The performance of the SVR for each kernel function is compared with R2, RMSE, MAE, and prediction accuracy. The prediction accuracy of 99,7 % has been obtained in optimized SVM.

 

Keywords: Infusion Pump; SVR; Kernel; Prediction; Delay; Flow Rate.

 

RESUMEN

 

Actualmente se están desarrollando bombas de infusión inteligentes inalámbricas. Es fundamental garantizar que el paciente reciba la concentración de fármaco correcta. En la práctica, el rendimiento de la bomba ha dependido del mínimo retardo de arranque. La minimización del retardo de arranque es importante en las bombas de infusión de tipo abierto y rara vez en las de tipo cerrado. El énfasis en la reducción del retardo de arranque tranquiliza a los profesionales y cuidadores, al tiempo que garantiza la seguridad del paciente. El retardo de arranque de la bomba de infusión se basa en el caudal y el tiempo de retardo. La predicción de la velocidad de flujo y el tiempo de retardo de una bomba de infusión es necesaria para garantizar una dosis de fármaco segura para el paciente. En la actualidad, los métodos de aprendizaje automático y los métodos computacionales para predecir el parámetro deseado se utilizan ampliamente en aplicaciones sanitarias y en el rendimiento de dispositivos médicos. La reducción del retardo de arranque puede lograrse mediante la predicción de sus parámetros asociados, el tiempo de retardo y el caudal. El caudal depende de la velocidad de la bomba de infusión, que debe calcularse en función del número de engranajes y revoluciones. La velocidad de la bomba debe predecirse para obtener un caudal preciso. Nuestra presente investigación intenta predecir el tiempo de retardo de una bomba de infusión utilizando diferentes funciones kernel de regresión de vectores de soporte (SVR). El rendimiento de la SVR para cada función kernel se compara con R2, RMSE, MAE y precisión de predicción. Se ha obtenido una precisión de predicción del 99,7 % en la SVM optimizada.

 

Palabras clave: Bomba de Infusión; SVR; Kernel; Predicción; Retraso; Caudal.

 

 

 

INTRODUCtion

Smart infusion pumps are designed to administer drugs and fluids in both single and multiple infusion models. The infusion protocol settings are handled by clinicians manually as well as in a semi-automated manner.(1) Several internal and external disturbances in the system affect the desired delivery rate and lead to delays in drug concentration. The concentration of the drug is a key factor in medical therapies. The smart infusion pumps are designed with a smart drug library to reduce drug delivery errors.(2)

Drug infusions should be optimal and appropriate for each corresponding dosage. Slow infusions lead to a potential impact on patients’ health. A slow infusion usually occurs due to a start-up delay in the infusion pump.(3) Addressing this parameter is desirable. The influencing parameters are dead volume, carrier infusion, and lag time.(4) Specifically, the prediction of lag time for a specific drug from the dataset needs attention.(5)

The performance and functionality of these medical pumps are critical because precision and accuracy in fluid and drug delivery are critical in a real-time situation.(6)

Bequette (2013) conducted research on the use of various infusion pumps for anesthesia based on drug dosage and medication infusion for patients.(7) The ANOVA test has been used to examine the practical constraints of delivering the desired volume with three infusion pumps at a specified flow rate.(8) Statistical studies of infusion pump performance address issues about effective drug administration. Flow rate and dosage requirements have been handled using statistical analysis, optimal control approaches, and prediction techniques.(9,10)

ANN, ANFIS, SVM, and Linear regression are some of the soft computing algorithms that are commonly used for prediction and classification.(11)

Machine learning techniques are powerful for predicting the performance of the system. The prediction has been carried out using ANFIS, SVR, and multiple regression techniques. Each technique provides varied results for different applications. SVR is a powerful technique that can be employed for linear and non-linear systems. The kernel is an important function in SVR.(12)

The kernel aids to implement a model in a higher-dimensional space (feature space) without describing a mapping function from the input space to the feature space, such that non-linear separable conditions are predicted to be linear separable in the feature space. The boundary conditions have been defined as the hyperplane.(13)

Smart infusion pumps when used in multiple infusion situations, a delay in drug delivery is possible. This delay has an impact on the accurate dosing of the drug at the patient's prescribed infusion rate. Consequently, the start-up delay, which is an important parameter, needs to be addressed. The start-up delay of an infusion pump depends on the lag time of the pump. In this work, delay time prediction was carried out to reduce the delay in the start-up of infusion pumps. Moreover, the prediction accuracy and errors have been verified using different SVR kernel functions.(14)

 

Infusion Pump Control

Methodology

The intelligent medical infusion pump is the most advanced device of the current era. The prediction of the smart infusion pump is needed for an accurate flow rate of the dosage to be concentrated for the patient.(15)

The essential parameters required to achieve the accurate drug concentration for single and multiple infusions are flow rate and delay. In ICU and critical conditions, patients are administered with more than one drug at the same time. Under this scenario, multiple infusions are possible. The catheters and carrier tubes may cause a delay with the amount of drug to be carried to the patient and dead volume will be observed.(16,17)

The infusion protocol and specifications for continuous infusion drug information and data were extracted from the PubMed database, electronic medical compendium (emc), and literature. The extracted data set included drug dosage and infusion flow rate information for each drug. The lag time was calculated based on the dosage and flow rate for the set of drugs considered in this study. The lag time for each drug flow rate were computed with other parameters such as dead volume and carrier flow rate. 

 In order for each drug to be delivered at the right dose, smart pumps need to be configured. Therefore, predicting the delay time required for an infusion pump is crucial. The proposed method of the current work is shown in Figure 1.

The prediction of lag time for intravenous, continuous infusion of drug flow rates was identified with the machine learning technique SVM. The prediction of lag time for single and multiple infusions was evaluated using SVR with linear, quadratic, cubic, and Gaussian kernel functions.(18)

 

Figure 1. Proposed workflow to predict lag time

 

Infusion rate

The key attributes of infusion flow rate Qd are drug dosage, drip rate, and carrier flow Qc. Drip rate is the rate of application of a liquid drug required to provide a certain dosage per unit. Flow rate is similar to drip rate and is measured in gtts/min; it is the product of drip rate and drop factor as in (1) and (2).(19)

 

                    (1)

                                                          (2)

 

where,

Q = Flow rate

Dr = Drip rate

Df = Drop factor based on carrier flow

DD = drug dosage for a specified treatment

Wp=weight of the patient

Vb = total volume of one bag of the liquid drug in ml,

Db = mass weight of the medicine in the drug solution in mg.

Dr and Q can be obtained based on the predefined protocol used by the practitioner and the infusion pump. Df depends on carrier flow, which is calibrated for a range of 10, 15, and 20 at gtts/ml. Even though these settings are preprogrammed, lag time may cause interruptions in the drug delivery to the patient. It is determined as in (3). 

Lag time (LT) is determined as:

                                                         

                                                          (3)

 

From the given relationship the total flow rate Qt is defined as provided in (4)      

 

                                                         (4)

 

where Vd is the dead volume that ranges from 0,2–4,0 and varies with catheters,(20) Qd is drug flow rate and Qc is carrier flow rate.

Qd is the drug flow rate, and Qc is the carrier flow rate.

The support of the pumping mechanism with dead volume, lag time flow rate should be analyzed carefully for different drugs and fluids that have to be administered to patients. The drug dosage and infusion flow rate for different drugs, as a sample infusion template (drug names are not mentioned), are shown in Table 1.

In clinical practice, the distance between the patient and a pump is approximately 1 m hence the dead volume of 1,5 ml will be considered. 160 data instances of drug dosage and flow rate for mean patient weight of 60 kg have been retrieved from emc.(21) As per the nursing information, the drug dosage was measured in terms of mcg/kg/min. Furthermore, based on the nursing calculations, the dosage can be converted to the infusion flow rate in ml/hr.(22)

 

Table 1. Sample infusion flow rate ranges

  S.No

Dosage (µg/kg/min)

or (mg/h)

Infusion Flow rate (ml/hour) *

Minimum

Maximum

  1.

Drug 1

3,5

135

  2.

Drug 2

1

12,5

  3.

Drug 3

4,5

225

  4.

Drug 4

3,6

216

 

Support Vector Machine (SVM) regression

SVM is a typical supervised learning method in machine learning. SVM performs classification and regression. SVM has a solid mathematical foundation in statistical theory and can solve classification and regression problems for a wide range of applications where the predictions are prominent. SVR is based on the structural risk minimization hypothesis, which seeks to reduce both empirical risk and the confidence interval. This leads to produce better simplification ability. The current work is intended to predict the lag time of the drug dosage infusion and analyze the related statistical parameters using the SVM regression model.(23) SVR is similar to linear regression as in (5)

                                                                   

                   (5)                      

 

where w is the coefficient, x is the input, b is a constant, and y is the output that has to be predicted. In SVR, the straight line is called a hyperplane, and the data points scattered around this plane are termed support vectors, which are needed to plot the boundary line. The distance between the boundary and the hyperplane y=wx+b should lie within ±ε, which is required to predict the lag time. Once the boundaries were satisfied, the statistical parameters were determined and analyzed for a better fit. The regression function for SVR is expressed as in

                                                 

                      (6)                             

 

where f(x) denotes the predicted values, x is the input variable, w is the weight coefficient, b is the deviation value, ∅x is the high dimensional feature space. The regularized risk function is given as in (7)

                          

                 (7)                              

   

where is a regularized term, c is the penalty parameter, and the empirical error is, ε is the loss function. The loss function is minimized to determine the values of w and b and then predicted output is identified.

The kernel is an important function given it aids in predicting the output by acquiring input data. The transformation of the training data set to linear form in higher dimensional space was handled with minimized cost. The different kernel functions utilized to predict the lag time are linear, quadratic, and Gaussian kernel functions. 

A linear kernel is given in (8) for the set of input parameters xi for a set of T in a given space.

                                                             

                       (8)

 

A quadratic kernel is defined as in (9),  , where d is 4                (9)                  

 

Further gaussian RBF is given as in (10),                            (10)          

 

Many computational statistical tools are available to analyze the predicted data. In the current work, the regression learner toolbox from MATLAB was used to verify the predicted lag time. 

 

Performance evaluation

Data processing and performance evaluation are important measures to determine prediction error and accuracy. The drug data set has been trained and verified using different SVR kernels.

The data set comprises independent variables (drug dosage, infusion flow rate), and a dependent variable (lag time). The study is focused on determining the lag time prediction performance, which was estimated for different Qc scenarios.

The dead volume, carrier flow rate, and infusion flow rate are key parameters that require intensive attention for reducing start-up delay in infusion pumps. The performance of each model has been trained with five cross-fold validations. Statistical metrics such as prediction accuracy, Mean Absolute Error (MAE), root mean square error (RMSE), and coefficient of determination (R2) were found.(24)

The evaluation was carried out for two different Qc for the set of drugs considered. Qc considered in this study are 10 ml/hr and 50 ml/hr. To evaluate optimized error, the data was trained by employing a Bayesian optimizer with SVR. The minimum MSE value and hyperparameters values have been identified using an independent variable (xi) dependent variable (yi).

The statistical metrics are shown in (11), (12), (13)           

 

                      (11)

 

                           (12)

 

 

               (13)

 

RESULTS AND DISCUSSION

The prediction of lag time for two different carrier flow rates Qc 10ml/hr and 50 ml/hr was carried out using SVM. The prediction performance was verified using statistical metrics. The statistical metrics were tabulated in Table 2. Furthermore, the prediction accuracy determined for different kernels of SVM is shown in Figure 2.

 

Table 2. Comparison of statistical parameters

Kernel function

Flow rate Qc (ml/h)

RMSE

R2

MAE

Prediction

Accuracy

(%)

Linear

10

0,0259

0,49

0,0181

98,2

50

0,005

0,2

0,0035

99,65

Quadratic

10

0,0229

0,60

0,0144

98,56

50

0,009

0,65

0,0032

99,68

Gaussian

10

0,0169

0,78

0,0109

98,91

50

0,003

0,7

0,002

99,8

Optimizable SVM

10

0,0138

0,86

0,0059

99,41

50

0,003

0,71

0,0026

99,7

 

Figure 2. Prediction accuracy comparison for different kernels

 

In this study, a Bayesian optimizer was used to achieve the lowest possible error.  It was evaluated for 30 iterations on a kernel scale of 27,1455 for both the Qc values. The epsilon values ranged from 0,0001 to 0,004. The prediction accuracy was better in the case of the Bayesian optimized SVM with minimum errors when compared to other SVM models. Apart from prediction accuracy, the R2 was 0,87 for Qc 10 ml/hr and 0,71 for Qc 50 ml/hr. The performance of the infusion pump exclusively relies upon its speed and dosage drip and flow rate, the system performance based on the control system strategies needs analysis(25) and it can be further incorporated. A quick induction of the dosage with less dead time, lag time, has to be achieved. 

The prediction response or residual response to predict the lag time for both Qc using a bayesian optimized SVR is shown in Figure 3 (a), (b), (c), and Figure 4(a), (b), (c). The prediction response indicates the closeness of the predicted lag time and the values are scattered around the diagonal line. The error that is indicated as residues should be around 0. The obtained residual response indicates that residues are close to zero for both the carrier flow rate. This is needed to verify the performance of the model, which was plotted against the true response and residue. Figures 3(c) and 4(c) show the minimum MSE value for the predicted values. The prediction accuracy and error varied with different dead volume and carrier flow rates (Fig. 3(c) and 4(c)).

 

(a)

(b)

(c)

Figure 3. Responses for (a) Predicted lag time (b) Residual error (c) Minimum MSE for Qc 10ml/hr

 

(a)

(b)

(c)

Figure 4. Responses for (a) Predicted lag time (b) Residual error (c) Minimum MSE for Qc 50ml/hr

 

CONCLUSION

In clinical settings, the performance of smart infusion pumps is crucial. Start-up delays affect the delivery rate, which results in patient safety. The influencing parameter in start-up delay is lag time. The key factors required to determine a lag time are drug dosage, flow rate, carrier flow rate, and dead volume. The lag time estimation for this particular drug data set with a carrier flow rate of 10ml/hr and 50 ml/hr was carried out. Using the three kernels of the SVR model, the performance of the infusion pump's lag time was evaluated for prediction errors and accuracy.  The start-up delay of an infusion pump is determined by the lag time as well as the speed of the infusion pump. In addition, the performance error minimization was computed using a Bayesian optimizer with SVM. This hybrid combination of optimized SVM resulted in a minimum error and better prediction accuracy.

 

REFERENCES

1.    Smith EA, Gray G. Developing a Smart Infusion Pump Dedicated to Infusion Safety. Ergonoics in Design 2022;30:4–12. https://doi.org/10.1177/1064804620944760.

 

2.    Brown TD, Michael M, Grady DS. Implementation of Smart Pump Technology With Home Infusion Providers: An Assessment of Clinician Workflow and Patient Satisfaction. Journal of Infusion Nursing 2018;41:344. https://doi.org/10.1097/NAN.0000000000000302.

 

3.    Banerjee A, Gupta SKS, Fainekos G, Varsamopoulos G. Towards modeling and analysis of cyber-physical medical systems. Proceedings of the 4th International Symposium on Applied Sciences in Biomedical and Communication Technologies, New York, NY, USA: Association for Computing Machinery; 2011, p. 1–5. https://doi.org/10.1145/2093698.2093852.

 

4.    Parker MJ, Lovich MA, Tsao AC, Deng H, Houle T, Peterfreund RA. Novel Pump Control Technology Accelerates Drug Delivery Onset in a Model of Pediatric Drug Infusion. Anesthesia & Analgesia 2017;124:1129. https://doi.org/10.1213/ANE.0000000000001706.

 

5.    Capogna G, Camorcia M, Stirparo S, Farcomeni A. Programmed Intermittent Epidural Bolus Versus Continuous Epidural Infusion for Labor Analgesia: The Effects on Maternal Motor Function and Labor Outcome. A Randomized Double-Blind Study in Nulliparous Women. Anesthesia & Analgesia 2011;113:826. https://doi.org/10.1213/ANE.0b013e31822827b8.

 

6.    Snijder RA, Konings MK, Lucas P, Egberts TC, Timmerman AD. Flow variability and its physical causes in infusion technology: a systematic review of in vitro measurement and modeling studies. Biomedical Engineering / Biomedizinische Technik 2015;60:277–300. https://doi.org/10.1515/bmt-2014-0148.

 

7.    Bequette BW. 2 - Control in Physiology and Medicine. In: Carson E, Cobelli C, editors. Modelling Methodology for Physiology and Medicine (Second Edition), Oxford: Elsevier; 2014, p. 13–44. https://doi.org/10.1016/B978-0-12-411557-6.00002-1.

 

8.    Kim UR, Peterfreund RA, Lovich MA. Drug Infusion Systems: Technologies, Performance, and Pitfalls. Anesthesia & Analgesia 2017;124:1493. https://doi.org/10.1213/ANE.0000000000001707.

 

9.    Samarah S. A Data Predication Model for Integrating Wireless Sensor Networks and Cloud Computing. Procedia Computer Science 2015;52:1141–6. https://doi.org/10.1016/j.procs.2015.05.148.

 

10. Elenkov M, Ecker P, Lukitsch B, Janeczek C, Harasek M, Gföhler M. Estimation Methods for Viscosity, Flow Rate and Pressure from Pump-Motor Assembly Parameters. Sensors 2020;20:1451. https://doi.org/10.3390/s20051451.

 

11. Sidey-Gibbons JAM, Sidey-Gibbons CJ. Machine learning in medicine: a practical introduction. BMC Medical Research Methodology 2019;19:64. https://doi.org/10.1186/s12874-019-0681-4.

 

12. Ramírez J, Monasterio V, Mincholé A, Llamedo M, Lenis G, Cygankiewicz I, et al. Automatic SVM classification of sudden cardiac death and pump failure death from autonomic and repolarization ECG markers. Journal of Electrocardiology 2015;48:551–7. https://doi.org/10.1016/j.jelectrocard.2015.04.002.

 

13. Jove E, Gonzalez-Cava JM, Casteleiro-Roca J-L, Quintián H, Méndez Pérez JA, Vega Vega R, et al. Hybrid Intelligent Model to Predict the Remifentanil Infusion Rate in Patients Under General Anesthesia. Logic Journal of the IGPL 2021;29:193–206. https://doi.org/10.1093/jigpal/jzaa046.

 

14. Pano-Azucena AD, Tlelo-Cuautle E, Tan SX-D. Prediction of chaotic time series by using ANNs, ANFIS and SVMs. 2018 7th International Conference on Modern Circuits and Systems Technologies (MOCAST), 2018, p. 1–4. https://doi.org/10.1109/MOCAST.2018.8376560.

 

15. Zhao J, Kong K, Hei X, Tu Y, Du X. A Visible Light Channel Based Access Control Scheme for Wireless Insulin Pump Systems. 2018 IEEE International Conference on Communications (ICC), 2018, p. 1–6. https://doi.org/10.1109/ICC.2018.8422827.

 

16. Absalom AR, Mason KP. Total Intravenous Anesthesia and Target Controlled Infusions. New York: Springer Cham; 2017.

 

17. Snijder RA. Physical causes of dosing errors in patients receiving multi-infusion therapy. Ph.D. Thesis. Utrecht University, 2016.

 

18. Kovačević Ž, Gurbeta Pokvić L, Spahić L, Badnjević A. Prediction of medical device performance using machine learning techniques: infant incubator case study. Health Technol 2020;10:151–5. https://doi.org/10.1007/s12553-019-00386-5.

 

19. Wright K. How to calculate drug doses and infusion rates accurately. Nursing Times 2017:1–11. https://doi.org/113,10.

 

20. Yu D, Hsu KY, Kim JH, DeLaurentis P. Infusion pump informatics approach to quantify impact of alerts and alarms on healthcare delivery. Proceedings of the Human Factors and Ergonomics Society 2017;2017-Octob:681–5. https://doi.org/10.1177/1541931213601657.

 

21. Brindley J. Undertaking drug calculations for intravenous medicines and infusions. Nurs Stand 2018;32:55–63. https://doi.org/10.7748/ns.2018.e11029.

 

22. Snijder RA, Konings MK, van den Hoogen A, Timmerman AMDE. Impact of Physical Parameters on Dosing Errors due to a Syringe Exchange in Multi-Infusion Therapy. Pharmaceutical Technology in Hospital Pharmacy 2017;2:85–96. https://doi.org/10.1515/pthp-2017-0002.

 

23. Kanwal S, Khan B, Ali SM, Mehmood CA, Rauf MQ. Support vector machine and Gaussian process regression based modeling for photovoltaic power prediction. Proceedings - 2018 International Conference on Frontiers of Information Technology, FIT 2018 2019:117–22. https://doi.org/10.1109/FIT.2018.00028.

 

24. Guo N, Gui W, Chen W, Tian X, Qiu W, Tian Z, et al. Using improved support vector regression to predict the transmitted energy consumption data by distributed wireless sensor network. Eurasip Journal on Wireless Communications and Networking 2020;2020. https://doi.org/10.1186/s13638-020-01729-x.

 

25. Alamelu J V, Mythili A. Smart infusion pump control – The control system perspective . Computational Intelligence in Healthcare Springer, Cham, 2021 199-211 n.d.:1–13.

 

Conflicts of interest

None.

 

Financing

None.

 

Authorship contribution

Conceptualization: Jayakumar Venkata Alamelu, Asaithambi Mythili.

Methodology: Jayakumar Venkata Alamelu, Asaithambi Mythili.

Writing - Original Draft: Jayakumar Venkata Alamelu, Asaithambi Mythili.

Writing - Review & Editing: Jayakumar Venkata Alamelu, Asaithambi Mythili.