Abstract

Noninvasive blood glucose sensors are still under development stage considering that they are far from being suitable for use in anartificial pancreas. The latter has three main parts: the blood glucose sensor, the insulin pump and the controller. However, for the biosensor analyzed here, some common failures such as signal shifts and unreal picks were found. They must be taken into account, for computing the correct insulin dosage for diabetic persons. Hence, a fault detection system based on discrete wavelets transform (DWT) is applied here. The main idea is, when the fault occurs, to do a proper measurement compensation for sending the corrected value to the predictive functional controller (PFC) algorithm. The study is done by reproducing the fault on the blood glucose measurements. They are obtained from a mathematical model of the endocrine system of an adult diabetic patient. This model was approved by the FDA in 2008. Then, the simulation environment includes faulty blood glucose measurements and a fault diagnosis and identification (FDI) system based on DWT. The FDI system gives to the PFC algorithm the correct information to turn it into a fault-tolerant controller (FTC). The main goal is to deliver the correct insulin dosage to the patient.

1. Introduction

Diabetes mellitus is a disease that often causes difficulties to maintain a normal level of blood glucose concentration in a patient, mainly because either insufficient insulin is produced by the beta cells in the pancreas, or the body is unable to effectively utilize that insulin. The problem is that high blood glucose levels induce secondary complications, such as nephropathy and retinopathy, and low levels lead to hypoglycaemic events, which can lead to insulin shock as well as death. It is a very frequent chronic disease that in the last years has reached the proportion of an epidemy. The prevalence of diabetes for all age groups worldwide was estimated to be 7.8% by 2030 by the International Diabetes Federation (IDF Diabetes Atlas). The total number of people with diabetes is projected to rise from 171 million in 2000 to 439 million by 2030.

Nowadays, to treat this disease, diabetic patients measure their blood glucose content by pricking their fingers several times a day and inject doses of insulin accordingly. From a control point of view, this is an open-loop method that tries to correct blood glucose no more than 6 times a day, usually before having a meal. The way that an artificial pancreas is thought to regulate glucose content in blood in real time by is just as the healthy human pancreas does. This could be done by means of a blood glucose sensor accurate enough to give the correct measurement in real time, the control algorithm which is responsible for calculating this amount of insulin in real time and an insulin pump that delivers the insulin that the body needs. This is recognized as an automatic closed-loop behavior.

To date, many control algorithms have been tested in computer-based environments with virtual diabetic patients. PID (proportional integral derivative) [1] and MPC (model predictive control) [2, 3] control laws are among the most well-known methodologies proposed the in literature. However, model-based control strategies have been used with more encouraging outcomes in tighter regulation of blood glucose levels. The knowledge incorporated by the models in these types of controllers is what makes them more appealing. It is worth mentioning that other types of control algorithms have been tested too, for example, robust [4] and fuzzy control [5].

Therefore, a real need exists for a continuous and accurate glucose monitoring system for the overall day. To satisfy this need, glucose sensors are of prime necessity so that control algorithms could determine precisely the insulin quantity a determined person needs. This quantity of insulin is then given subcutaneously to the diabetic patient functioning as an artificial pancreas. Most common and accurate monitoring systems are invasive or minimally invasive, causing pain, irritation, or difficulties in their daily use. This is why a lot of attention is paid to the development of noninvasive glucose monitoring systems. In Section 2, a brief summary of the most common technologies available nowadays is given.

In this work, the control algorithm used is a predictive functional controller. The PFC corresponds to the family of MPC. The authors have tested it before [6] with promising results. Now, PFC is evaluated coupled with a fault detection system using an impedance spectroscopy noninvasive biosensor. This type of sensor presents some typical faults (Section 2.2) that are going to be corrected by the FDI system based on DWT developed here. The performance evaluation is carried out using a novel simulation environment of the endocrine system of a type 1 diabetic patient. It is equipped with a cohort of 30 type 1 diabetic patients that range from child to adults and was obtained from [7]. It is based on real individuals data, spanning the observed variability of key metabolic parameters in the general population of people with type 1 diabetes mellitus. Several results are presented here to demonstrate the potentiality of the proposed methodology.

2. The Biosensor for Blood Glucose Concentration

There are many methods available for glucose determination, with the majority based on enzymatic reactions. In order of accurateness, the most common are directly measuring glucose in blood (invasive), measuring glucose in the interstitial fluid (minimally invasive), and estimating glucose using other corporal fluids like oral mucosa, aqueous humor of the eye, sweat, urine, saliva, tears, and so forth (noninvasive). The technologies employed could be polarimetry, electromagnetism, ultrasound, Raman spectroscopy, reverse iontophoresis, impedance spectroscopy, and so forth.

Why noninvasive measurement is important is evident; the pain caused by finger pricking or invasive sensors is the main reason. It is very common that minimally invasive glucose sensors cause irritation, infections, or even bruising. These sensors have to be renewed every 5 or 6 days, and, at worst, may require that the sensor be recalibrated at frequent intervals with a fingerstick meter. Noninvasive monitoring avoids all these disadvantages but is not as accurate as the invasive technologies.

The ideal glucose sensor [8] should be selective for glucose with a fast, predictable response to changing glucose concentrations. It should depend on a reversible and reproducible signal to provide results, and sensor fabrication must be reproducible and cheap on a large scale. It should have a long operational lifetime under physiological conditions, but most of all must be acceptable to the patient. Therefore, it should be noninvasive, should not require user calibration, and would ideally provide real-time continuous information regarding glucose. Continuous glucose monitoring provides data about the direction, magnitude, duration, frequency, and potential causes of fluctuations in blood glucose levels, providing patients with real-time data and alarms at times of hypoglycaemia or rapid glucose change. Continuous glucose monitoring is also required to implement closed-loop control.

2.1. Noninvasive Glucose Sensor

The noninvasive blood glucose biosensor taken into account in this work is one based on impedance spectroscopy [9]. It comprises a sensor attached to the skin by means of a double-sided adhesive tape to ensure defined skin contact and a measurement system. The measurement system consists of a signal generator and a microprocessor that controls the operation of the device. Glucose levels are then calculated by means of an algorithm based on changes in frequency, impedance, and temperatures. A visual display can provide information on glucose levels, rate of change, time, and battery status. Data can be downloaded to a computer for further data analysis. The device is powered by means of a rechargeable battery lasting up to 4 days. The entire system is the size of a wristwatch and can be seen in Figure 1.

This sensor uses electromagnetic waves in the selected frequency band that interacts with the skin and underlying tissue, to be able to monitor its electrical properties. This is the reason why the sensor can be represented as a serial resonant contour terminated to the fringing working capacitance. The impedance of the sensor at a given resonance frequency depends on impedance changes within the human skin and underlying tissue. The equivalent circuit of the sensor mounted on the skin is presented in Figure 2. The impedance of this RLC resonant circuit is measured over the specified frequency range by means of a vector network analyzer (VNA) or a resistive divider. It has been shown that the resonance frequency, the minimum of , as well as the factor of the resonant circuit changes with different blood glucose concentrations. In the defined frequency range (1–200 MHz), the described sensor can, therefore, provide sensitive measurements of the electrical properties of the skin and the underlying tissue. The sensitivity of the signal was between 20 and 60 mg/dL Glucose/Ω.

The impedance, in the case of the noninvasive portable glucose sensor, is measured in the same frequency interval by means of a resistive divider (Figure 3). A specifically designed stable, low harmonics voltage controlled oscillator (VCO), with uniform amplitude (<0.3 V) over the whole frequency range, sweeps through the selected frequency band in steps of 0.1 MHz. The VCO voltage is fed over the series resistance to the sensor impedance , where the sensor voltage is measured. The impedance can then be approximated as follows:

This approximation allows the measurement of the phase between the voltages and to be avoided.

2.2. Typical Faults of This Sensor

This type of noninvasive biosensor has shown some typical faults that are going to be taken into account by the fault diagnosis and identification system applied in this work.

It is known that in daily life situations, the impedance spectra are not only correlated with glucose changes, but also affected by a variety of other factors that perturb the determination of glucose concentration. A more recent work of Huber et al. [10] considered relevant disturbing factors such as temperature fluctuations, variations of the skin moisture and sweat, and changes in perfusion characteristics, as well as body movements affecting the sensor-skin contact. Their approach was based on the data obtained from multiple sensors of different variables: impedance, some optical properties and hydration levels (sweat/humidity) of the skin and underlying tissue, the pressure applied to the sensor as well as its acceleration and position relative to the center of gravity, and the skin surface temperature and ambient humidity close to the impedance sensor. Their work consists of linear regression models and variable selection techniques to estimate the blood glucose concentration. However, in a previous work, they reported some failures related to the body movements that affect the sensor-skin contact [11]. These failures are the ones that the system presented here would deal with and are explained in more detail in the next sections.

As this sensor is a kind of wristwatch, a typical problem was that as the user moves his arm very often, the sensor moves itself as well. This results in a rather noisy signal with level shifts when the movement is enough. This can be seen in Figure 4 shortly after 9:12 h and before 16:24 h. Figure 4 shows the sensor signal compared to blood glucose and interstitial fluid glucose levels during glucose clamps with glucose administered intravenously.

Another common error is the one shown in Figure 5. Again, the raw sensor signals are superimposed as raw data onto the blood glucose profile during an oral glucose administration. Spikes in the recorded signals shortly before 12:00 h and around 16:00 h are due to short removals of the sensor from the skin, exposing the open resonant circuit to air. Due to the permittivity of air = 1 (human body ca. 80), the impedance minimum is out of the sensor's measurement range. Such events induce spikes in the raw sensor signals.

3. Fault Detection and Identification System Based on Wavelet Decomposition

The fault detection and identification system applied in this work is based on the wavelet decomposition theory. This technique was chosen because it is capable of revealing aspects of data that other signal analysis techniques miss, aspects like trends, breakdown points, discontinuities in higher-order derivatives, and self-similarity. Apart from that, it helps estimating the magnitude of the deviation which is one of the most useful characteristics that were followed in this work. These properties are really useful in a closed-loop environment like the one presented in this work.

Taking into account that, where the systems are under control, like in this case, several times, the faults are masked by the control. In fact, for the sensor fault considered here (measurement offset), it looks like a perturbation effect in the blood glucose level. It has a transitory of short duration, usually of high frequency that seems to disappear due to the regulation capacity of the control structure. Indeed, as the measurement (erroneous) remains in the desired operating point, the real process variable changes towards another undesirable point, related to the failure magnitude. This effect is not directly observable from the process measurements, and it is necessary to rely on any tool that has the ability to quickly detect and estimate this abnormal event. One of the only tools available, capable of analyzing the transient response with good temporal and frequency resolution, is the well-known wavelet transform. The decomposition at different levels of the process measurements allows us to identify anomalies at different frequency ranges and to estimate their magnitudes at the right moment. This is the main reason for proposing the fault detection using wavelet decomposition.

3.1. Wavelet Analysis

Wavelet analysis [12] represents a logical step in signal processing tools; it is a windowing technique of variable dimension. Hence, using greater time intervals, the information at low frequencies becomes more precise, and with smaller regions, the focus is posed in the information at high frequencies. The resulting mapping is of the scale-time form, being the frequency related to the scale.

In the wavelet transform, the base functions are little signals called wavelets. Therefore, the signal being analyzed is decomposed utilizing scaled versions and temporarily displaced of a unique function called mother wavelet. This set of signals, forms an orthogonal basis (not redundant) of functions, where and are the scale and displacement parameters, respectively. Having as the signal to be analyzed, the DWT is defined by the internal product, where and with , are the discrete values of scaling and displacement also known as dyadic values. Index is known as level and or as resolution. From an intuitive point of view, the wavelet decomposition consists of calculating a similarity index between the signal and the wavelet localized in and scaled by .

Similar to other signal-processing tools, there exists an inverse wavelet transform. That is to say, a synthesis methodology by which the original signal is reconstructed is utilizing the wavelet coefficients of the decomposition. This inverse transform could be expressed as where is the detail of the original signal at level . Taking as a reference a given level, say , it could be expressed as where is called approximation at level and groups all the details at levels higher than which represent an approximation of the signal at lower resolution. The details of higher resolution () are grouped into and are called the details of the signal at level . Therefore, a relation between the levels of the approximations and details could be obtained in the following form: resulting in a pyramidal decomposition structure or decomposition tree as shown in Figure 6, where indicate the beginning of the structure.

To achieve a wavelet decomposition, an efficient algorithm was developed by [13]. This algorithm is based on reformulating the wavelet decomposition as a pyramidal structure composed of convolutions with quadrature mirror filter (QMF) and variable sample rate depending on the level (multiresolution filtering). A decomposition instance could be observed in Figure 7 for a generic level. The approximation discrete signal is convolved with the filters and to be decimated in dyadic form after that.

The filters (high-pass) and (low-pass) with impulse responses and , respectively, are mirror filters, and they are directly defined by the wavelet and the selected scaling function .

3.2. FDI Approach

We adopted the FDI based on wavelets decomposition because of the successful application presented in [14]. According to the faulty behavior of the noninvasive sensor explained in Section 2.2, it is clear that if an FDI is available and able to detect the quick changes in the measured signal, it will be useful for having accurate measurements provided by the noninvasive sensor. Another important reason is the fact that only if the correct glycaemia value is available, the insulin dosage will be properly administrated. For the application considered here, the Daubechies wavelet family of the second order was used, and the decomposition scale was selected to be equal to one. In Section 6 (Figure 11), it will be presented the wavelet detail decomposition of the noninvasive sensor signal when failure no. 1 occurs. There it can be easily seen how the wavelet detail at level 1 can detect the moment when the sensor gives the wrong measurement. Negative deviations (peaks) correspond to positive shift in the sensor signal and vice versa. In addition, the height of the peak is closely related with the magnitude of the shift measurement. For more details about the implementation of DWT to a faulty biosensor, the reader should see [15].

4. Fault-Tolerant Predictive Functional Controller

If we incorporate the technique presented in Section 3.2 to a PFC, we have a FTPFC (Figure 8) that can be used to regulate the blood glucose content of a diabetic patient using a noninvasive sensor and the in silico model described in the appendix.

The PFC technique is the third generation of a family of model algorithmic control. It has been used many times in very different industrial applications with excellent results. Particularly, this type of controller has a great capacity to handle nonlinear systems, unstable and with large dead times. Moreover, PFC methodology has incorporated what is called control zone. This means that the set point changes (±Δ%—control zone) depending on the difference between the process output and the desired value, making it more versatile.

PFC basically consists of four main elements such as a process dynamic model, a reference trajectory , a self-compensation of the predicted error, and a specific structure for the manipulated variable. The future error between and the predicted output over the coincidence horizon is estimated. A self-compensation is done accounting for the actual mismatch between real data and model output. The estimation of the future error at the coincidence horizon by a specific kind of extrapolation, allows to improve the model prediction. Within PFC, feedforward and feedback control actions can be jointly designed, and constraints are taken into account in a very natural way.

Calling the inputs of the manipulated variable (insulin from the pump) and the perturbation (a meal), the first-order model response at the coincidence point becomes The reference trajectory, which is the path to the future set point, is resetted at every instant and is given by where is the set point, is the real process output and is a parameter that represents the exponential convergence of the algorithm, and thus, fixes the closed-loop behaviour. is the sampling time and was considered as 5 minutes because of the sensor readings per hour.

The parameters to be tuned for the PFC are as follows: number of coincidence points , closed-loop time response (CLTR) of the reference trajectory, the control zone considered so that CLTR could move linearly between two extremes values recognized as CLTR_L (low) and CLTR_H (high), the transition zone (%) that sets the allowed zone for the controlled variable expressed as ±Δ(%) with respect to the set point value, and constraints to the manipulated variable are also included by fixing maximum , minimum , and variations for it .

Here, just a brief summary of the PFC technique was presented. For more details about the implementation of PFC, the reader should see [16].

4.1. Models for the PFC Controller Implementation

The PFC has three inputs, the glucose measurement, the glucose set point (100 mg/dL in our case), and the glucose rate of appearance into the glucose compartment (Ra). The last input is only present if the meal is announced. To avoid the nonlinearities in the stomach compartment, the model for the controller was linearized without this compartment present. As a consequence of this, the meal disturbance has to be given as a filtered response into the glucose compartment and not as a step response into the stomach compartment [17].

To announce a meal, the mean of all model parameters for each group of patients was taken, and the glucose rate of appearance of each group was saved in a matrix. Then, the controller receives a mean absorption profile. Another way of solving this problem could be detecting when a patient receives a meal as shown in [18].

In our case, the relationship between insulin infusion (manipulated variable) and blood glucose (controlled variable) is called . Meanwhile refers to the relationship between exogenous glucose (glucose rate of appearance Ra from a meal) and blood glucose. Both models were set to be first order with time delay, and their identification was done by means of a step excitation in the insulin delivery and in the meal ingestion at the nominal condition. The step used depends on the group studied. For the manipulated variable, having the information of the total daily insulin (TDI (U)) consumed by each patient, the mean value of all patients was taken. For the perturbation, the was calculated.

4.2. PFC Tuning

The PFC was tested in a previous work [6] for the data of 30 patients but considering accurate measurements of blood glucose. The controller was adjusted for each patient and rigorously evaluated through the control variability grid analysis (CVGA) methodology. The results shown in this work are based on just one adult patient because the specific faults considered here are absolutely independent of the own characteristics for each subject. The main parameters were set as follows: (1)for the patient, two first-order models with time delay were proposed (the plant and the disturbance): (2)the CLTR_L, CLTR_H, , and were computed as (i), (ii), (iii), (iv),

Then, the only parameter manually determined to finally tune the controller was .

The parameter represents the aggressiveness of the controller. If it is set in a low value, the response of the controller is very soft. Increasing it, the controller becomes more and more aggressive. The adopted parameters for the simulations shown in this work are included in Table 1.

5. The In Silico Preclinical Trial

The performance of the controller and the FDI was tested on a 1-day virtual protocol (Figure 10) based on [19]. For an adult: (1)admission state: patient blood glucose steady is at 100 mg/dL at 18:00 Day 1; (2)control loop is closed at 21:00 Day 1; (3)at 7:30 Day 2, the patient has breakfast lasting about 2 min with a carbohydrate (CHO) content of 50 grams; (4)at approximately noon (12:00) Day 2, the patient takes a lunch meal containing 65 grams CHO. Meal duration is 15 min; (5)at 18:00 Day 2, the patient takes a dinner meal containing 80 grams CHO. Meal duration is 15 min.

6. Results and Discussion

The error of the first kind of fault as mentioned in Section 2.2 was reproduced in silico as can be seen in Figure 9. This diagram shows the blood glucose time evolution when this type of fault occurs at nearly 8:00 o'clock during breakfast without FTPFC strategy. In this case, the controller masks the fault and behaves quite similar as when a perturbation enters in the system producing a good rejection of it. The problem is that blood glucose moves towards hyperglycemic values because of the fact that as the blood glucose content seen by the controller is smaller than its real value, the insulin dose administered is smaller leading to higher blood glucose values.

Another situation can be seen in Figure 10 when the FTPFC is working. The corrected signal given to the controller is superimposed to see the difference with the previous case. The real blood glucose is returned to its original and safety value without posing a threat to the patient thanks to the FDI integration. In this case, the risk of suffering from hyperglycaemic problems is diminished by the use of the FTPFC. In Figure 11, the wavelet detail of level 1 is shown. As can be seen, the high-frequency content of the wavelets when there is a fault changes dramatically, making it easily recognizable as an abnormal event by the FDI. This characteristic allows one to make accurate correction of the signal to be accounted for by the PFC. So, Figure 12 shows how the FTPFC delivers the correct insulin dosage. The FTPFC delivers more insulin than the PFC without FDI and gives better results.

The other typical failure (no. 2) is tackled with the same technique leading to excellent results. In Figure 13, it can be seen how the FDI detects the uncorrect signal coming from the biosensor at nearly 11:00 in the morning and compensates its value. Hence, the controller receives the correct blood glucose content in real time.

7. Conclusions

According to the reported problems on a type of noninvasive biosensor of blood glucose, the obtained results demonstrate that the use of the FDI system, based on DWT, is helpful for improving the accuracy of these devices. It was challenged with the most recorded typical faults throwing excellent results. So, the use of an efficient detection and identification provided the correct insulin dosage and prevented hyperglycaemic problems. In particular, it is crucial for the patients or if a control algorithm works as a decision support maker for proper insulin dosage determination. Even though, the preliminary good results are obtained here through simulation, the use of the well-recognized model of a type 1 diabetic patient gives confidence to be taken into account as a good contribution to this field. Another important point is the fact that the FDI is helpful for being integrated into the control algorithm to turn it as fault tolerant. The proofs done with the PFC show the potentiality of the overall methodology.

Appendix

A. The Simulation Environment, Type 1 Diabetic Patients

The mathematical model used in this work to synthesize and test the controller is the one developed by [20] because it is one of the few models that have been validated against clinical and experimental data and have been approved by the FDA as a substitute to animal trial in the preclinical testing of closed-loop control algorithms. This model allows simulating the dynamic effect of exogenous glucose and insulin dosage under different specific tests for diabetic patients, and it is summarized in the following subsections.

A.1. Glucose Intestinal Absorption

It is modeled by a recently developed three-compartment model: where (mg) is the amount of glucose in the stomach (solid, , and liquid phase, ), (mg) is the glucose mass in the intestine, is the rate of grinding, is the rate constant of intestinal absorption, is the fraction of intestinal absorption which actually appears in plasma, (mg/min) is the amount of ingested glucose, (kg) is the body weight, (mg/kg/min) is the glucose rate of appearance in plasma, and is the rate constant of gastric emptying which is a time-varying nonlinear function of : where with and , respectively, start time and end time of the last meal, , , and model parameters.

A.2. Glucose Subsystem

A two-compartment model is used to describe glucose kinetics: with , , . Here and (mg/kg) are glucose masses in plasma and rapidly equilibrating tissues and in slowly equilibrating tissues, respectively, (mg/dL) is plasma glucose concentration, suffix denotes basal state, EGP is endogenous glucose production (mg/kg/min), Ra is glucose rate of appearance in plasma (mg/kg/min), is renal excretion (mg/kg/min), and are insulin-independent and -dependent glucose utilizations, respectively (mg/kg/min), is the distribution volume of glucose (dL/kg), and and (min−1) are rate parameters.

A.3. Glucose Renal Excretion

Renal excretion represents the glucose flow which is eliminated by the kidney, when glycaemia exceeds a certain threshold : The parameter (1/min) represents renal glomerular filtration rate.

A.4. Endogenous Glucose Production

EGP comes from the liver, where a glucose reserve exists (glycogen). EGP is inhibited by high levels of glucose and insulin: where and are model parameters and (pmol/L) is a delayed insulin signal, coming from the following dynamic system: where (pmol/L) is plasma insulin concentration or insulinemia and (1/min) is a model parameter.

A.5. Glucose Utilization

Glucose utilization is made up of two components: the insulin-independent one , which represents the glucose uptake by the brain and erythrocytes, and the insulin-dependent component , which depends nonlinearly on glucose in the tissues: where (1/min) is a linear function of interstitial fluid insulin (pmol/L) which depends on insulinemia in the following way: where , , and are model parameters, (pmol/L) is the basal insulin level, and (1/min) is called rate of insulin action on peripheral glucose.

A.6. Insulin Subsystem

Insulin flow , coming from the subcutaneous compartments, enters the bloodstream and is degraded in the liver and in the periphery: where (L/kg) is the distribution volume of insulin and , , , and (1/min) are model parameters.

A.7. Subcutaneous Insulin Subsystem

The subcutaneous insulin subsystem is modeled here with two compartments, and (pmol/kg), which represent, respectively, polymeric and monomeric insulin in the subcutaneous tissue: where (pmol/kg/min) represents injected insulin flow, is called degradation constant, and and are absorption constants.

A.8. Subcutaneous Glucose Subsystem

The delay of the sensor was modeled with a system of first order: