The primary goal of this study is to calibrate the total daily insulin dosage for type 1 diabetes patients undergoing insulin treatment regimens using a fuzzy logic based system. Three patient-related factors (PRFs), i.e. patient weight, body mass index (BMI), and average daily carbohydrate intake were identified and limned as crucial to this study. Data was collected for these three PRFs for a sample of 25 arbitrary type 1 diabetes patients and was used to develop rules for a fuzzy-based system using MATLAB. This system then generated an output insulin dose which was in turn compared to the prescribed insulin doses recommended by the patients’ personal physicians. The fuzzy-based dosing system was observed to bring about better regulation to the insulin treatment regimen for a particular patient in comparison to the traditional non-fuzzy based methods which calculate total daily insulin dose based on each PRF separately. The upshot of the study was that this system suggested better control on patient blood glucose levels for type 1 diabetes patients just as it did in type 2 diabetes patients in a previous study conducted by this group. In this study, the utilization of a fuzzy-based system allows for fewer instances of hyper and hypoglycemic events among type 1 diabetes patients as was the case for type 2 diabetes patients in our previous study
Keywords: Insulin; Fuzzy; MATLAB; Type 1 Diabetes; Hypoglycemia; Hyperglycemia; Dose Adjustment; Drug Dosing
Type 1 diabetes is a relatively rare form of diabetes which is characterized as insulin dependent, prevalent among 5% to 10% of the total diabetic population according to American Diabetes Association [1]. The proper etiology of this disease is yet unknown but it is hypothesized that type 1 diabetes may arise from a combination of both genetic and environmental factors [2]. The human body immune system destroys β-cells in the islets of Langerhans of the pancreas which leads to the elimination of insulin production and eventually to type 1 diabetes [3]. Type 1 diabetes is mostly prevalent in European and North American regions; however, South-East Asian regions are at a close third position. Bangladesh is ranked th 8 among the Asian countries in the prevalence of type 1 diabetes [4]. According to International Diabetes Federation (IDF), new prevalence rate of type 1 diabetes in Bangladesh was depicted at 4.2 out of 100,000 by the year 2013 [5]. Polyuria, polydipsia, polyphagia, fatigue, blurry vision, weight loss are the common symptoms of type 1 diabetes. It may also manifest in the form of microvascular and macrovascular complications that causes damage to the eyes, nerves, blood vessels, kidney ketoacidosis and it is currently ranked as the sixth leading cause of death in the world [6]. Until now, no complete remedy is available for this deadly disease, but it could be managed better with insulin therapy along with a strictly regimented diet and exercise plan. Physicians usually prescribe insulin doses to regulate blood glucose level considering critical patient related factors (PRFs) such as height, weight, BMI (Body Mass Index) and quality of lifestyle as it relates to exercise and fat intake. However, erroneous dosing of insulin by physicians often lead to life threatening conditions such as hypoglycemia (decreased blood glucose level) or hyperglycemia (increased blood glucose level) [3].
To overcome these complications, the exploration of a superior insulin dosing system is essential. A dosing system that takes into account various patient related factors in order to determine a more accurate insulin dose for individual patients might bring about better regulation of blood glucose for type 1 diabetes patients as well as create lower instances of hypo and hyperglycemia. This was the general trend that was observed in a study conducted on 39 random type 2 diabetes patients by this group [7]. Personalized dosage regimens may be calculated using a fuzzy-logic based system, where the individual patients by considering several PRFs [7, 8, 17]. Considering only a single patient factor for insulin dose prescription is a parlous process that may lead to erroneous dosing and cause overshoot or undershoot of insulin, eventually causing hypoglycemia or hyperglycemia. If PRFs such as patients weight, BMI, daily carbohydrate intake can be taken into account a more precise dosing may be possible [9]. The fuzzy-logic based system, takes these PRFs in account as input values and then generates an output to provide a more inclusive insulin dosage for individual patients. This novel insulin dosing method may help prevent instances of hyperglycemic and hypoglycemic as it relates to insulin therapy [7, 10-12].
25 type 1 diabetes patients currently undergoing insulin treatment were randomly selected from the population of the city of Dhaka, Bangladesh; a patient pool comprising of 15 males and 10 females. The following individual information was recorded for each patient: weight, height, average carbohydrate intake per day over a period of a month and prescribed insulin dose by their personal physician. For all of the cases, the physicians calculated an insulin dose based on the patient‟s body weight and then later on calibrated the daily amount of insulin given in assent to further consultation with the patients. The height and weight data was then used to calculate the BMI for each patient. Each patient was informed about specifics by which their data was to be used and strictly consented to the usage and publication of any results that may have been obtained.
MATLAB was used for the development of this method and analysis of the data obtained. The dosage of insulin was calculated by using the fuzzy-based interface developed in MATLAB. Each PRF (i.e. weight, BMI, average carbohydrate intake in a given month in grams) was used as input variables in the system and the predicted insulin dose was the output. Three separate nonfuzzy based traditional methods used for calculating insulin dose were integrated to one system to generate an output. These standard methods were: calculation of insulin dosage based on body weight, calculation of insulin dosage based on BMI and calculation of insulin dosage based on average carbohydrate consumption. In order to combine these three traditional methods of insulin dosage and produce a fuzzy output, each method was used by itself to calculate an insulin dose. These calculations are shown in tables 1, 2, and 3 and for added shown only for the first 10 patients of the patient population. Table 1 shows the insulin dosage calculated when only the patient's body weight is used. In this case, the body weight is simply multiplied by a factor of 0.5 to acquire an insulin dose [13-15].
Table 2 shows the insulin dosage calculated when only the patient's BMI is used as a determinant factor. In this case, if the patient has a BMI of less than 25 then the body weight is multiplied by a factor of 0.4 in order to determine the number of units of insulin. If the patient has a BMI in between 25-30 then the body weight is multiplied by a factor of 0.5. And finally, if the patient has a BMI of greater than 30 then the body weight is multiplied by a factor of 0.6 in order to determine the number of units of insulin [13-15].
Table 3 shows the insulin dosage calculated when the patient's average carbohydrate intake is used as a determinant factor. In this case, the standard 500 rule is used to determine the number of total daily insulin units for that patient [16]. Firstly, the patient's body weight is used to determine the number of daily insulin units required per day. Then the number 500 is divided by this number in order to calculate the number of grams of carbohydrates 1 unit of insulin will cover for that particular patient. Lastly the patients average daily carbohydrate intake is divided by this number in order to determine the number of units of insulin required on a daily basis. (Note: this method does not take correct for the average blood glucose levels of the patient) [16].
Both input and output was made into membership functions according to set ranges and fed into the fuzzy system. The system was then made to generate an output for daily insulin units which incorporated all three patient related factors.
To determine the Insulin dose for type 1 diabetes patient with the aid of fuzzy logic, the MATLAB Fuzzy Logic Toolbox has been used. In this system, the output- Insulin dosage (insulin Dose)- is determined for the inputs, i.e. a subject‟s Weight (WEIGHT), Body Mass Index (BMI) and Carbohydrate intake (CHO). The input and output variables, i.e. insulin Dose, WEIGHT, BMI and CHO, are fuzzified with triangular membership functions of different ranges. The membership of BMI and CHO are fuzzified with three membership functions each; and the fuzzy values are named Low (L), Optimum (O), High (H). The WEIGHT, on the other hand, has been fuzzified with six membership functions, namely Very Low (VL), Low (L), Optimum 1 (O1), Optimum 2 (O2), High (H), Very High (VH). For the output variable, i.e. insulin Dose, five triangular membership functions- A, B, C, D and E- are used. The ranges, considered for the system, of the input/output variables are shown in Table 4.
Table 5. illustrates the ranges and unity membership point used for the fuzzification of the input variables BMI and CHO.
In fuzzy logic, there can be no membership greater than 1, i.e. the greatest membership a fuzzy variable can have is unity. Thus, at “Unity membership point” the membership value of the corresponding fuzzy variable is 1; and everywhere else the membership is less than 1. To further elaborate, the “Unity membership point” in Table 5 depicts the points where the carbohydrate intake (CHO), for example, are perfectly Low (L), Optimum (O) or High (H); everywhere else the CHO is Low, Optimum or High to a certain degree. Similarly, a BMI of 27.5, as per Table 5, can be regarded as absolutely Optimum for a subject, in the topic under consideration.
Six triangular membership functions are used fuzzify the input variable WEIGHT; and the breakdown is given in Table 6.
For the fuzzification of the output variable, insulin Dose, five triangular membership functions are used. The ranges and unity membership points are delineated in Table 7.
The six triangular membership functions, as stated previously, of the input variable WEIGHT are shown in Figure 1. It is seen in the figure, that there are no regions of overlapping among the membership functions.
The illustration of the three triangular membership functions of the input variable BMI are shown in Figure 2.
The third input variable, CHO, has the membership functions as depicted on Figure 3.
The final set of five triangular membership functions for this system belongs to the output, i.e. insulin Dose. Figure 4
It is evident, from the tables and figures discussed so far, that all of the membership functions are triangular and none of them has any overlapping region.
After defining the membership functions, the succeeding step, for fuzzy inferencing, is to set the rules for the system inputs/output. The decision making about the insulin dosage is outlined here. The rules are set using the if/then relationships. The developed system has 54 if/then rules. To construct the if/then rules, all the membership functions of every input variable (WEIGHT, BMI, and CHO) are combined with each other; and every combination is mapped to the proper output membership function of the output variable (insulinDose). To set the if/then rules, some decision tables were constructed. The decision tables, given in Tables 8 through 13, render the insulinDose for type 1 diabetes patients with different WEIGHT, BMI, and CHO.
The insulin dose recommendation for a patient can easily be interpreted from the decision tables. For example, if a optimum (i.e. BMI = O), and carbohydrate intake is high (i.e. CHO = H) then the recommended insulin dose for him/her would be E (i.e. between the range 49.5 – 55 units), as derived from Table 13. The data was extracted from Table 13 because this is the decision table for patients with very high WEIGHT. The WEIGHT = VH, BMI = O, CHO = H, and insulinDose = E are all variables with different ranges, as illustrated in Tables 5 through 8. Thus, it is evident that fuzzy logic takes in ranges of values and uses the defined if/then rules for the calculations and mappings among inputs and outputs. The fuzzy if/then rules used in developing this system, with the aid of the decision tables, are as follows 1. If (WEIGHT is VL) and (BMI is L) and (CHO is L) then (insulin Dose is A) 2. If (WEIGHT is VL) and (BMI is L) and (CHO is O) then (insulin Dose is C) 3. If (WEIGHT is VL) and (BMI is L) and (CHO is H) then (insulinDose is C) 4. If (WEIGHT is VL) and (BMI is O) and (CHO is L) then (insulin Dose is B) 5. If (WEIGHT is VL) and (BMI is O) and (CHO is O) then (insulin Dose is B) 6. If (WEIGHT is VL) and (BMI is O) and (CHO is H) then (insulin Dose is C) 7. If (WEIGHT is VL) and (BMI is H) and (CHO is L) then (insulin Dose is C) 8. If (WEIGHT is VL) and (BMI is H) and (CHO is O) then (insulin Dose is C) 9. If (WEIGHT is VL) and (BMI is H) and (CHO is H) then (insulin Dose is D) 10. If (WEIGHT is L) and (BMI is L) and (CHO is L) then (insulin Dose is B) 11. If (WEIGHT is L) and (BMI is L) and (CHO is O) then (insulin Dose is C) 12. If (WEIGHT is L) and (BMI is L) and (CHO is H) then (insulin Dose is C) 13. If (WEIGHT is L) and (BMI is O) and (CHO is L) then (insulin Dose is C) 14. If (WEIGHT is L) and (BMI is O) and (CHO is O) then (insulin Dose is C) 15. If (WEIGHT is L) and (BMI is O) and (CHO is H) then (insulin Dose is D) 16. If (WEIGHT is L) and (BMI is H) and (CHO is L) then (insulin Dose is C) 17. If (WEIGHT is L) and (BMI is H) and (CHO is O) then (insulin Dose is D) 18. If (WEIGHT is L) and (BMI is H) and (CHO is H) then (insulin Dose is D) 19. If (WEIGHT is O1) and (BMI is L) and (CHO is L) then (insulin Dose is A) 20. If (WEIGHT is O1) and (BMI is L) and (CHO is O) then (insulin Dose is B) 21. If (WEIGHT is O1) and (BMI is L) and (CHO is H) 22. If (WEIGHT is O1) and (BMI is O) and (CHO is L) then (insulin Dose is B) 23. If (WEIGHT is O1) and (BMI is O) and (CHO is O) then (insulin Dose is B) 24. If (WEIGHT is O1) and (BMI is O) and (CHO is H) then (insulin Dose is D) 25. If (WEIGHT is O1) and (BMI is H) and (CHO is L) then (insulin Dose is C) 26. If (WEIGHT is O1) and (BMI is H) and (CHO is O) then (insulin Dose is D) 27. If (WEIGHT is O1) and (BMI is H) and (CHO is H) then (insulin Dose is D) 28. If (WEIGHT is O2) and (BMI is L) and (CHO is L) then (insulin Dose is A) 29. If (WEIGHT is O2) and (BMI is L) and (CHO is O) then (insulin Dose is B) 30. If (WEIGHT is O2) and (BMI is L) and (CHO is H) then (insulin Dose is C) 31. If (WEIGHT is O2) and (BMI is O) and (CHO is L) then (insulin Dose is B) 32. If (WEIGHT is O2) and (BMI is O) and (CHO is O) then (insulin Dose is C) 33. If (WEIGHT is O2) and (BMI is O) and (CHO is H) then (insulin Dose is D) 34. If (WEIGHT is O2) and (BMI is H) and (CHO is L) then (insulin Dose is C) 35. If (WEIGHT is O2) and (BMI is H) and (CHO is O) then (insulinDose is D) 36. If (WEIGHT is O2) and (BMI is H) and (CHO is H) then (insulin Dose is D) 37. If (WEIGHT is H) and (BMI is L) and (CHO is L) then (insulin Dose is B) 38. If (WEIGHT is H) and (BMI is L) and (CHO is O) then (insulin Dose is C) 39. If (WEIGHT is H) and (BMI is L) and (CHO is H) then (insulin Dose is C) 40. If (WEIGHT is H) and (BMI is O) and (CHO is L) then (insulin Dose is B) 41. If (WEIGHT is H) and (BMI is O) and (CHO is O) then (insulin Dose is D) 42. If (WEIGHT is H) and (BMI is O) and (CHO is H) then (insulin Dose is D) 43. If (WEIGHT is H) and (BMI is H) and (CHO is L) then (insulin Dose is C) 44. If (WEIGHT is H) and (BMI is H) and (CHO is O) then (insulin Dose is D) 45. If (WEIGHT is H) and (BMI is H) and (CHO is H) then (insulin Dose is E) 46. If (WEIGHT is VH) and (BMI is L) and (CHO is L) then (insulin Dose is B) 47. If (WEIGHT is VH) and (BMI is L) and (CHO is O) then (insulin Dose is C) 48. If (WEIGHT is VH) and (BMI is L) and (CHO is H) then (insulin Dose is D) 49. If (WEIGHT is VH) and (BMI is O) and (CHO is L) 50. If (WEIGHT is VH) and (BMI is O) and (CHO is O) then (insulin Dose is D) 51. If (WEIGHT is VH) and (BMI is O) and (CHO is H) then (insulin Dose is E) 52. If (WEIGHT is VH) and (BMI is H) and (CHO is L) then (insulin Dose is D) 53. If (WEIGHT is VH) and (BMI is H) and (CHO is O) then (insulin Dose is E) 54. If (WEIGHT is VH) and (BMI is H) and (CHO is H) then (insulin Dose is E)
Till now, the membership functions and rules have been defined, which involved ranges of values; but the main point of interest is to get a crisp number for the insulinDose, as a patient cannot take insulin dose in ranges. In order to obtain a crisp number, the last step is carried out- namely defuzzification. In MATLAB, the defuzzification can be done in a number of ways. For the purpose of this paper, the „Centroid‟ method is used because the output obtained using this method are closest to that of the expected value. A single crisp number is obtained, for insulinDose, after defuzzification. Figure 5 illustrates an insulin dose recommendation of 40 units- for a patient having a weight of 80kg, a BMI of 26.1 kg, and a carbohydrate intake of
Another advantageous feature of the MATLAB Fuzzy Logic Toolbox is- the surface diagram. Presented in Figures 6 through 8 are the surface diagrams that depicts the relationships among the variables chosen for the system (i.e. WEIGHT, BMI, CHO, and insulinDose.) For the purpose of visualizing the relationships among variables, the usefulness of surface diagrams is momentous. Sometimes, major flaws in the system, if any available, can be readily identified and addressed just by looking at the surface diagrams. Thus, the surface diagrams for this system are provided.
The subjects used in this study were all patients with Type 1 diabetes and were chosen at random. All of the patients are residents of Dhaka, Bangladesh and were already undergoing insulin treatment on a regular basis, hence they all had access to prescription knowledge beforehand. Enacting our developed fuzzy-logic based program, the predicted doses for all of the 25 patients were obtained from the system output. The data acquired were then compared to the actual prescribed doses of the patients as recommended by the physicians are listed below in Table 14. Table 14 also depicts the numerical differences between the two doses for each patient.
From the table 14, the observed numerical differences between the prescribed and the predicted insulin doses advocate that there was a dose correction based on the provided patient related factors (PRFs).
Such a case is detected in case of patient 19 where the numerical difference was found to be -12.5 units. This suggested that the dose prescribed by the physician for her was significantly higher than the predicted dose. Therefore, in order to prevent the hypoglycemic events she was frequently experiencing that our predicted dose obtained from the fuzzy interface was suggested to the patient. This patient was observed for a week with the adjusted dose, with multiple daily measurements of blood glucose levels and only one instance of hypoglycemia was noted. An appropriate point of comparison was identified as the fasting blood glucose levels of patient 19 before noon every day. Before the fuzzy dose adjustment the average blood glucose was reported by the patient as 3.4 ± 0.6 mmol/L. However after the dose adjustment, the average blood glucose was observed to be 7.2 ± 0.8 mmol/L.Thus, with the adjusted dose obtained from our developed system the patient had a superior regulation of blood glucose. However it is worthwhile to notice that these results are purely observational at best and all of these observational cases have to be validated by the patient‟s personal physicians in order to be prescribed to other patients. This is one limitation of the study but further data collection will help resolve this issue. In a separate case, for patient number 22, the numerical difference obtained was +12.0 units. This was an indication that his initially prescribed dose was significantly lower than the predicted dose obtained for his personalized profile in the fuzzy system. In this case, we again adjusted the dose for the patient and kept him under observation for a week to monitor the performance of the fuzzy predicted dose. There were very few instances of hyperglycemic events observed with this patient post-implementation of the adjusted dose, thereby confirming the legitimacy of our fuzzy-based dosing system. Similarly to patient 19, the fasting blood glucose levels of patient 22 before noon every day were compared. Before the fuzzy dose adjustment the average blood glucose was reported by the patient as 14.4 ± 1.3 mmol/L. And after the dose adjustment, the average blood glucose was observed to be 8.7 ± 0.8 mmol/L. The system therefore was instrumental in being utilized effectively for both hypo and hyperglycemic events in Type1 diabetic patients in this study.
The fuzzy based insulin dosing system dispensed precise insulin dose for individual patients and hence demonstrated substantial control of blood sugar regulation. Due to the nature of this approach being highly personalized in calculating the daily insulin doses, it has the promise for better management of Type-1 diabetes among patients. This fact should eventuate once the patient blood glucose levels are monitored over long periods of time. Our system was further perfected through remediation of hypoglycemic instances for patient 19 and also for mitigation of hyperglycemic events in the case of patient 22 through precise control. Thus, through our previously published study in conjunction with this current investigation, it is substantiated that our fuzzy-based insulin dosage system may be very effective for diabetes management in a clinical setting and holds promises that merits further research..