International Journal of Soft Comuting an Engineering (IJSCE) ISSN: 2231-2307, Volume-1, Issue-6, January 2012 FPGA Synthesis of Fuzzy (PD an PID) Controller for Insulin Pums in Diabetes Using Caene R. HariKumar, V.K. Suhaman, C.Ganesh Babu Abstrat his aer emhasizes on a FPGA synthesis of Fuzzy PD an PID Controller in biomeial aliation. We aim at ientifying a roer methoology for the infusion roess of insulin to iabeti atients using an automate fuzzy logi PD an PID ontroller. A synthesis of FPGA moel of the above automati ontroller is analyze an synthesize. In ye I an ye II iabetes the atient is eenent on an external soure of insulin to be infuse at an aroriate rate to maintain bloo gluose onentration. Hyoglyemia has short term effets whih an lea to iabeti oma an ossibly eath, while hyerglyemia has a long term imat that has been linke to nehroathy, retinoathy an other tissues amage. In this roess insulin is aministrate through an infusion um as a single injetion. he um is ontrolle by the automati ontrol Fuzzy PD Controller whih is more effiient omare to the onventional PD Controller. his is of rimary imortane where the roesses are too omlex to be analyze using the onventional one. he esigne ontroller is imlemente with low ower multilier an Fuzzy ontroller arhiteture. In ase of non- linear inuts, Fuzzy PD Controller erforms better omare to the onventional ontroller an onsumes lesser ower. he bloo gluose level is monitore from Photo Plethysmograhy of ulse Oximeter. his fuzzy ontroller moel will surely be a boon to the iabeti atients. Inex erms Fuzzy PD an PID ontroller, FPGA synthesis, Photo Plethysmograhy, Insulin um, Diabetes I. INRODUCION In this aer we aim at ientifying a roer methoology for the infusion roess of insulin to iabeti atients using an automate fuzzy logi PD ontroller. Diabetes Mellitus is one of the worl s most oular iseases whih affet aroximately one hunre million eole worlwie. When a healthy subjet has a meal, the bloo gluose level an inrease aroun 120-140 mg/l. hen, anreas releases insulin an the gluose level ereases to euglyemi level (i.e., 80-100mg/L)[1]. In absene of Manusrit reeive Deember 12, 2011 Dr.R.Harikumar,Professor, ECE Deartment,.Bannari amman Institute of ehnology, Sathyamangalam,Inia 9942932239 (e-mail: harikumarrajaguru@gamil.om). V.K.Suhaman, Asst Projet Leaer, M/s CS Chennai (e-mail: suhaman.vk@gmail.om) Dr.C.Ganesh Babu, Professor, ECE Deartment Bannari Amman Institute of ehnology,sathyamangalam,inia 9842250635 (e-mail: bits_ babu@yahoo.o.in) insulin release, the gluose level annot return to euglyemi level. here are two tyes of iabetes an are ye I an ye II. In this aer the fous is on ye I iabetes. Palo Magni an Riaro [11] resage about the reent avanes in tehnology whih have brought in noninvasive moes of insulin elivery suh as rans ermal, ulmonary an oral. Even though these moes are not ainful like invasive moes, but have roblems suh as low skin ermeability in the rans ermal moe, not inhaling the aurate amount of insulin in the ulmonary moe an issues onerne with the oral bioavailability for the oral moe. In this roess insulin is aministrate through an infusion um as a single injetion. he um is ontrolle by the automati ontrol Fuzzy PD Controller whih is more effiient omare to the onventional PD Controller. his is of rimary imortane where the roesses are too omlex to be analyze using the onventional one. In ase of non- linear inuts, Fuzzy PD Controller erforms better omare to the onventional ontroller. II. FUZZY CONROL SYSEM A logial system, whih is muh loser to the sirit of human thinking an natural language than the traitional logi system is alle a Fuzzy logi. Here the Fuzzy Controller is onsiere as new aroah between the onventional mathematial ontrol an human like eision making. A variety of methos have been there in the literature to moel the gluose-insulin ynamis. Akerman et al [12], [13] use a two omartment moel to reresent the ynamis of gluose an insulin onentration in the bloo system. his roess is base on omartmental tehnique. One of the features of this tehnique is that the moel esign base on an unerstaning of the hysiology. Hene this moel is hosen, as the bloo gluose level varies nonlinearly. his is of rimary imortane where the roesses are too omlex to be analyze using the onventional one. In ase of non- linear inuts, Fuzzy (PD an PID) Controller erforms better omare to the onventional ontroller. he task organization for obtaining FPGA Synthesis of Fuzzy PD&PID Controller is as follows: 1. Measurement of Bloo gluose level using Photo Plethysmograhy metho. 2. Design of Fuzzy PD ontroller (2x1) base on error an error rate as inuts an outut signal to ontrol the movement of infusion um. 324
FPGA Synthesis of Fuzzy (PD an PID) Controller for Insulin Pums in Diabetes Using Caene 3. Performane stuy of onventional PD&PID ontroller with Fuzzy PD&PID ontroller. 4. VLSI Design an Simulation of Fuzzy PD &PID Controller are analyze. 5. FPGA Imlementation of Fuzzy PD&PID Controller is analyze.. III.SYSEM ARCHIECURE he etermination of these Fuzzy sets is normally arrie out by initially roviing the system with a set of ata manually fe by the oerator. K.H.Kienitz an.yoneyama [4] ientifie that the Fuzzy system an be further enhane by the aative ontrol where the time onstant an gain are varie to self tune the ontroller at various oerating oint. he Figure.1 eits the Fuzzy Control system. he outut of Photogluometer (Photo lethysmograhy) is onverte to igital signal. his signal is omare with set oint (s) an error an rate of hange of error is alulate an they are given as an inut to the Fuzzy inferene Control system. he outut of the lant is alulate whih at as the osition ontrol of an insulin um. IV. PHOOGLUCOMEER In normal ratie the level of gluose in bloo is foun by finger rik an this is one many times ay. he Photogluometer offers a ainless alternative; here gluose ontent is measure without taking bloo samle. he infrare raiation is inient on the erson s finger. A ortion of light is transmitte through the skin a ortion is absorbe an a ortion is reflete. he sensor to extrat information regaring gluose ontent in the bloo uses the transmitte raiation. his is a simle non invasive sensor for the measurement of bloo gluose level. In this instrument, re an infrare light at wavelengths of 640 nm an 940 nm are asse through the finger of the subjet an the transmitte light is reeive with the hel of a hoto ioe an etetor isusse in the referenes [1],[2]. he outut of the Photogluometer obtaine is alle hotolethysmogram is given to voltage amlifier network an then roesse in an Analog to igital onverter to give in as the inut to the ontrol system. he voltage of the system is grauate by omaring with onventional Gluometer reaing. he figure.2 shows the blok iagram of a Photogluometer an the Photogluometer outut levels are shown in table.i. able.i Photo Gluometer Outut Levels A. Analysis of Fuzzy PD Controller Figure.2 Photogluometer Fuzzy logi ontrol tehnique has foun many suessful inustrial aliations an emonstrate signifiant erformane imrovements. In stanar roeure the esign onsists of three main arts Fuzzifiation, Fuzzy logi rule base, an Defuzzifiation. B. Mathematial Moels for Bloo Gluose Dynamis Akerman et al [12] use a two omartment moel to reresent the ynamis of gluose an insulin onentration in the bloo system. C.C.Lim an K.L. eo [5] mathematially moele otimum elivery of insulin to the atients base on bloo gluose ynamis an the bloo Gluose ynamis of an iniviual an be written as,. x 1 =-m1 x 1 -m 2 x 2 +( (1). x 2 =-m 3 x 2 +m 4 x 1 + (2) where x. 1 reresents bloo gluose level eviations,. x 2 enotes the net bloo glyemi harmoni level, ( reresents the inut rate of infusion of gluose, enotes the inut rates of infusion of insulin an m 1,m 2,an m 3 an m 4 are arameters. C. Design of Fuzzy PD ontroller Baogang et al [3] esribe that the onventional ontinuous time PD ontrol law an be written as, k e( k e( (3) Where k an k are the roortionality erivative gains of the ontroller an e( is the error signal efine by e( s( y( (4) S ( is the set oint an y ( is the system outut. he Figure.3 eits the Fuzzy PD Controller with y( the outut of Photogluometer (Photo Plethysmograhy) whih is omare with set oint (s), the error an rate of error are alulate an they are given as an inut to the Fuzzy inferene system whih onsists of fuzzifier, rule base an Defuzzifiation, whih roues the ontrol inut u (. he inut u ( of the lant is alulate whih at as the osition ontrol of an insulin um. By alying the stanar onformal maing, we have 1 1 z) [ k k (1 z ) /(1 z )] E( z) (5) 325
International Journal of Soft Comuting an Engineering (IJSCE) ISSN: 2231-2307, Volume-1, Issue-6, January 2012 aking inverse z-transform for equation (5) we have n n ) k k [ e( e( n )] [ e( e( n )] Define n ) r( n e( e( n ) ( e( e( n ) (6) (7) (8) (9) Where,r( an ( are the inremental ontrol, the rate of hange an the average of hange of the error signal resetively. Substituting (7), (8), (9) in (6) gives k ( k r( (10) Where k an k (2 ). k k efine by k k an Base on the membershi funtions as shown in figure 4, the fuzzy ontrol rules that we use are the following Figure.6 Rule base of Fuzzy PD simulate in MALAB Figure 6 an 7 Shows the MALAB simulate fuzzy Rule base an the Controller ontrol surfae resetively. Here the outut is the fuzzy ontrol ation u (, e means error ositive an oz means outut zero et., an the AND is the Zaeh s logial AND efine by, AND = min. } for any two membershi values A { A B A B an B on the fuzzy subsets A an B resetively. In the efuzzifiation enter of mass formula is emloye [13] r oz rn o en on en oz u r rn en en ( (13) We use o = 2; on = -3; z=0 Figure.5 iniates the ste resonse of otimal PD an Fuzzy PD system. Fuzzy PD ontroller erforms better than onventional PD ontroller. he esigne ontroller is simulate in MALAB an the results are obtaine. Figure.5 Ste resonses of otimal PD an otimal fuzzy PD ontrollers Figure.7 Control surfae of Fuzzy PD simulate in MALAB D. Design of Fuzzy PID ontroller he blok iagram of Fuzzy PID ontroller is eite in figure.8.he Fuzzy PID ontroller e ( is the error signal efine by [7] e( s( y( (14) S ( is the set oint an y ( is the system outut. r ( is the rate of hange of error signal efine by r( n e( e( n ) (15) he ontroller outut (ontrol inut to a lan is enote by u (n). B.Hu et al [6]esribe that the sale isrete-time outut u (ˆ is the sum of three terms as shown in Fig.4 an is reresente by ^ ^ ^ ^ n ^ ^ u ( n) n) K * u ( n) K I u ( i) K D* (16) t ^ i0 We efine u as a efuzzifie roortional outut; an its ^ hange is ( u (0) 0) ^ u for the samling erio t ^. 326
FPGA Synthesis of Fuzzy (PD an PID) Controller for Insulin Pums in Diabetes Using Caene ^ ^ ^ P, KI, KD K Are the normalize roortional, integral, an erivative gains, resetively. hey are all normalize within a range of [0, 1]. From the membershi funtions, the following fuzzy ontrol rules [8] are use as shown below, blok iagram of VLSI Arhiteture of Fuzzy Controller has an error generator, fuzzy ontroller, outut ontrol signal an the roess of infusion being arrie on by the insulin um in a single injetion roess. In this work the fuzzy arhiteture is imlemente an simulate using VHDL whih is IEEE stanar language for both simulation an synthesis. VLSI system is inororate using VHDL Design unit alle Proess. he simulation results of Fuzzy PD Controller Outut for Photogluometer Set (-3, 2) shown in able II. he simulation results of Fuzzy PID Controller Outut for Photogluometer Set (-1, 1) shown in able III. able.ii Fuzzy PD Controller Outut Levels For Photogluometer Set (-3, 2) he membershi funtions for error, rate, an outut signal are shown in Fig.9 Figure.9 Membershi funtions of a fuzzy PID ontroller Where e is the sale error signal. he fuzzy variable NB stans for negative big, PB for ositive big an AZ for aroximate zero. For simliity, we use triangular membershi funtions. While the membershi funtions for error signal an rate signal are fixe, the membershi funtions for outut signal may be hange. able II an able III iniate the simulation of Fuzzy PD an PID ontroller for ifferent inut onitions. From this set of simulate onitions it is ientifie that all the rules in the rule base are working erfetly. here is no gray region at the outut even though the inuts are overlae in the linguisti sets. able.iii Fuzzy PID Controller Outut For Photogluometer Set (-1, 1) Figure.10 Ste resonses of otimal PID an otimal fuzzy PID ontroller Figure.10 eits the ste resonse of otimal PID an Fuzzy PID ontroller. Fuzzy PID ontroller erforms better than onventional PID ontroller. V. VLSI DESIGN OF FUZZY PROCESSOR VLSI arhiteture is esigne to imlement the fuzzy base ontroller for insulin ums in iabeti atients. his imlementation aims at imrovement of see an effiieny of the system. he esign eveloe here was that of a low ost, high erformane fuzzy roessor with two inuts an a single ontrol outut. As shown in figure.11, the 327
International Journal of Soft Comuting an Engineering (IJSCE) ISSN: 2231-2307, Volume-1, Issue-6, January 2012 VI. FPGA IMPLEMENAION AND SYNHESIS IN CADENCE he esigne ontrol system in oe in VHDL an Imlemente in Caene EDA too l [14],[15]. It is omile in NC SIM an simulate in SIM vision for funtional verifiation an the outut of the system in wave form is as shown in Figure 12.he System is then synthesize in Caene enounter RL Comiler Ultra an the shemati RL viewer is as shown in figure.13. he ower utilization of the esign in aene is given below in Figure.14.It reveals that lesser ower that the Altera Cylone II FPGA [9] in figure.15.he Power onsume in Caene is of the range of 22.761uw (22761.56 nw) whereas in Altera FPGA 68uw.he system imlemente in aene onsumes lesser ower than the one imlemente in Altera ylone II FPGA. making. he Fuzzy ontroller has to be rovie with a re-efine range of ontrol arameters or sense of fiels. he etermination of these sets is normally arrie out by initially roviing the system with a set of ata manually fe by the oerator. he Fuzzy system an be further enhane by the aative ontrol where the time onstant an gain are varie to self tune the ontroller at various oerating oints. he arhiteture is simulate with various values of error an error rate values. he initial onitions for the overall ontrol systems have the following natural values. For the fuzzy ontrol ation U ( 0) 0 ; for the system outut y (0) =0an for the original error an rate signals e(0)=r (the set oin an r(0)=r resetively. For our iabeti um whih is a seon orer system, the transfer funtion is H ( S) 2 s 1 s 1. we remark that the Fuzzy PD ontroller esigne above has a self-tuning ontrol aability i.e., when the traking error e( kees inreasing, the term (=[e(+e(n-)]/ beomes larger. In this ase the fuzzy ontrol ation also kees inreasing aoringly, whih will ontinuously reue the traking error. Uner the steay-state onition ( 0, we foun that the ontrol erformane of the Fuzzy PD ontroller in VLSI Simulation is also as goo as, if not better than the onventional ontroller. his rojet synthesize in Caene EDA tool reveal that Power onsume in Caene simulation is of the range of 22.761uw (22761.56 nw ) whereas in Altera FPGA 68uw.his shows that the esigne system in aene EDA onsumes lesser ower than a ontroller in FPGA. VIII. CONCLUSION Figure.14 Power Usage reort in aene Figure.15 Power Estimation in Altera Quatrus II Power Play tool VII. RESULS AND DISCUSSION A logial system, whih is muh loser to the sirit of human thinking an natural language than the traitional logi system is alle a Fuzzy logi. Here the Fuzzy Controller is onsiere as a new rarohement between the onventional mathematial ontrol an human like eision he simulation results have shown that this Fuzzy PD Controller overries the onventional ontroller in hanling non-linear inuts. In this rojet it is assume that the atient is ontinuously attahe to the infusion um an the bloo gluose level is monitore at regular intervals. he esigne ontroller is simulate an the result shows that the Fuzzy ontroller erforms better than the onventional Controllers in hanling nonlinear inuts to the system. he esigne ontroller has self tuning aability that over omes traking error. In this rojet Insulin is aministere to iabeti atients with ye I Diabetes using an automate Fuzzy (PD an PID) Controller system. he ontrol system onsists of Photogluometer an an insulin um. his ontroller is a lose loo system not requiring a rior referene of bloo gluose ontent. he simulation results have shown that this Fuzzy PD, PID Controller overries the onventional ontroller in hanling non-linear inuts. In this work it is assume that the atient is ontinuously attahe to the infusion um an the bloo gluose level is monitore at regular intervals. Further researh an be in the iretion of imlementing an Aliation Seifi IC (ASIC) fuzzy ontroller for Insulin ums. IX.ACKNOWLEDGEMENS he authors exress their sinere thanks to the Management an the Prinial of Bannari Amman Institute of ehnology, Sathyamangalam for roviing the neessary failities for the 328
FPGA Synthesis of Fuzzy (PD an PID) Controller for Insulin Pums in Diabetes Using Caene omletion of this aer. his researh is also fune by AICE RPS.:F No 8023/BOR/RID/RPS-41/2009-10, ate 10th De 2010. REFERENCES [1] Harikumar.R an Selvan.S, Fuzzy Controller for Insulin Pums in Diabetes, Proeeings of International Conferene on Bio meial Engineering, Anna University, Chennai, Inia,.73-76, January 24-26, 2001. [2] Paramasivam.K an R.Harikumar an R. Sunararajan, Simulation of VLSI Design Using Parallel Arhiteture for Eilesy Risk Level Diagnosis in Diabeti Neuroathy, IEE Journal of Researh, Vol.50, no.4,. 297-304, August 2004. [3] Baogang Hu, George K.I. Mann, an Raymon G.Gosine, New Methoology for Analytial an Otimal Design of Fuzzy PID Controllers IEEE ransations on Fuzzy Systems, Vol. 7,no.5,.521-539,Otober 1999. [4] K.H.Kienitz an.yoneyama A Robust Controller for Insulin Pums base on H-Infinity heory IEEE ransations on Bio Meial Engineering, Vol.40, no.11,. 1133-1137, November 1993. [5] C.C.Lim an K.L.eo Otimal Insulin Infusion Control via a Mathematial Bloo Glio Regulator Moel with Fuzzy Parameters Cybernetis an Systems, Vol.22,.1-16, 1991. [6] H.A.Malki,H.Li an G.Cheng New Design an Stability Analysis of Fuzzy Proortional-Derivative Control Systems IEEE ransations on Fuzzy Systems, Vol. 2, no.4,.245-254, November 1994. [7] C.-L.Chen an F.-C.Kuo, Design an Analysis of a Fuzzy Logi Controller, Int.J. Syst. Si., Vol.26,.1223-1248, 1995. [8] C.C.Lee, Fuzzy Logi in Control Systems: Fuzzy Logi Controller- Part 1 an Part 2, IEEE ransations on Syst., Man,Cybern., Vol. 20,.404-435,1990. [9] Altera- FPGA Referene Manual, 2006. [10] A. E. Gamal, et al., An Arhiteture for Eletrially Configurable Gate Arrays, IEEE Journal of Soli-state Ciruits, Vol. 24, no. 2,. 394-398, Aril 1989. [11] Palo Magni, an Riaro Bellazzi, A Stohasti Moel to Assess the Variability of Bloo Gluose ime Series in Diabeti Patient Self- Monitoring, IEEE ransations on Bio Meial Engineering, Vol.53, no.6,. 977-985, June 2006. [12] Akerman, E., L.C. Gatewoo, J.W. Rosevear, an G.D. Molnar, Moel Stuies of Bloo Gluose Regulation, Bull. Math. Biohys., Vol. 27,.21-37,1965. [13] Sener, W.J. A Review of Programme Insulin Delivery Systems, IEEE ransation on Bio Meial Engineering, Vol. 28, no.3,.237-251,1981. [14] Caene Doumentation Caene EDA 1514,2010 [15] www.edaforum.om Dr.C.Ganesh Babu grauate in Eletronis an Communiation Engineering from P S G College ehnology, (Bharathiyar University), Coimbatore, uring 1994. He obtaine his ost grauation in Mirowave an Otial Engineering from Alagaa Chettiar College of Engineering an ehnology, Karaikui (Maurai Kamaraj University, Maurai), uring 1997. He obtaine his PhD from Anna university Chennai in the Information an Communiation Engineering, uring 2010. At resent he is working as Professor in the Deartment of Eletronis an Communiation Engineering, Bannari Amman Institute of ehnology, Sathyamangalam, amil Nau. He has aroun 14 years of teahing exeriene an 7 years of researh exeriene. His areas of interest are Seeh Signal Proessing, Digital Communiation an Virtual Instrumentation. V.K.Suhaman reeive his B.E (ECE) egree from Bannari Amman Institute of ehnology Sathyamangalam, Anna University Chennai in 2009. He has five International onferenes an a journal ubliation. He is urrently working as assistant rojet leaer in M/s CS Chennai. His area of interest is VLSI Design, Soft omuting, embee systems an Avane Eletronis Engineering. Dr. R. Harikumar reeive his B.E (ECE) egree from REC rihy1988.he obtaine his M.E (Alie Eletronis) egree from College of Engineering, Guiny, Anna university Chennai in 1990. He was aware Ph.D. in I&C Engg from Anna university Chennai in 2009. He has 21 years of teahing exeriene at ollege level. He worke as faulty at Deartment of ECE,PSNA College of Engineering & ehnology, Dinigul. He was Assistant Professor in I at PSG College of ehnology, Coimbatore. He also worke as Assistant Professor in ECE at Amrita Institute of ehnology, Coimbatore. Currently he is working as Professor ECE at Bannari Amman Institute of ehnology, Sathyamangalam. He is guiing eight PhD theses in these areas. He has ublishe hirty three aers in International an National Journals an also ublishe aroun seventy three aers in International an National Conferenes onute both in Inia an abroa. His area of interest is Bio signal Proessing, Soft omuting, VLSI Design an Communiation Engineering. He is life member of IEE, IEEE an ISE. 329
International Journal of Soft Comuting an Engineering (IJSCE) ISSN: 2231-2307, Volume-1, Issue-6, January 2012 Figure.1 Moel of Fuzzy Control System Figure.3 Fuzzy PD ontroller system Figure.4 he membershi funtion of e (, r ( an u ( Figure.8 Fuzzy PID ontroller 330
FPGA Synthesis of Fuzzy (PD an PID) Controller for Insulin Pums in Diabetes Using Caene Figure.11 VLSI Arhiteture of Fuzzy Controller Figure.12 Waveform Simulation of PD ontroller in Caene NC sim Figure.13 Caene RL net list simulation 331