LabVIEW Based Fuzzy Controller Designed For A Microwave Oven

Transcription

Tikrit Journal of Engineering Sciences 23 (1) (2016) 61- 68ISSN: 1813-162XTikrit Journal of Engineering Sciencesavailable online at: http://www.tj-es.comLabVIEW Based Fuzzy Controller Designed for a Microwave OvenSura Nawfal Abd AlrazaaqComputer Engineering Department, University of Mosul, Mosul, IraqAbstractThis paper presents a new design for controlling microwave oven (MWO) device which hasbecome used daily in last few years. The aim of this work is to develop the operation of the recentMWOs, where three new features have been proposed to be supplemented to the new design, thefirst one is adding a load cell under a turntable specified for MWO to measure the weight of theprocessed food instead of setting it manually. The second feature is incorporating the fuzzytechniques with the design of MWO by designing a fuzzy controller capable to decide the suitablepower level and total heating time automatically according to the measured weight. While in thethird feature a steam sensor has been suggested to be added in the upper cavity of the MWO, sothe controller will be able to decide the remaining time to finish once the presence of a steam isdetected. Finally the output results of the controller have been tested practically on some kinds offood using the available MWO. The results proved the efficiency of using this design by finding thesuitable parameters to process food without dependence on the repeated estimation by the user.Keywords: Microwave oven, LabVIEW, Fuzzy controller, Weight. مسيطر مضبب على عمل فرن المايكروويف باالعتماد على بيئة اآلالت االفتراضية الخالصة يقدم هذا البحث تصميما جديدا للسيطرة على عمل فرن المايكروويف الذي أصبح استخدامه بشكل يومي في السنوات القليلة إن الهدف من هذا العمل هو تطوير عمل أفران المايكروويف الحالية باقتراح ثالث خصائص جديدة تضاف إلى . الماضية الخاصية األولى هي وضع خلية حمل تحت الصحن الدوار الخاص بالجهاز وذلك لقياس وزن الطعام المراد . التصميم الجديد الخاصية الثانية هي دمج التقنيات المضببة في تصميم فرن . تسخينه او طبخه عوضا عن إدخاله يدويا من قبل المستخدم المايكروويف وذلك بتصميم مسيطر مضبب قادر على إيجاد مستوى القدرة و زمن التسخين الكلي المناسبين أوتوماتيكيا باالعتماد أما الخاصية الثالثة فتتلخص بإضافة متحسس للرطوبة في التجويف العلوي للفرن وذلك ليتمكن المسيطر من . على الوزن المقاس أخيرا تم اختبار نتائج إخراج المسيطر عمليا على بعض . تحديد الوقت المتبقي النتهاء عملية التسخين عند تحسسه لوجود البخار أثبتت النتائج كفاءة استخدام هذا التصميم إليجاده .AM820AGX أنواع األغذية وذلك يدويا باستخدام فرن مايكروويف نوع . المعامالت المناسبة لمعالجة الغذاء دون االعتماد على التخمين المتكرر من قبل المستخدم . الوزن ، المسيطر المضبب ، البفيو ، فرن المايكروويف : الكلمات الدالة IntroductionMicrowave ovens (MWOs) have becomemore popular over the last years and can beused daily not only in home kitchens, but alsoit can be used in industry applications for foodtreatment or drying products as macaroni. Useof MWOs in food preparation may be aneasier, fast and safer task to teach thantraditional cooking skills that involve moredirect contact with potentially dangerousappliance, therefore there has been an61

Abd Alrazaaq / Tikrit Journal of Engineering Sciences 23(1) (2016) 61-6862increasing interest in MWOs which canovercome certain limitations of conventionalthermal food treatment [1]. But over thedeveloped technology, MWOs are not asautomatic as they could be where theparameters of this device are still being setmanually by the household or the user andthey must estimate the values of theseparameters and repeat setting them byexperimentation with try and error procedure.These parameters included: the entire heatingtime and the power level which must bepredictive by the user before each startingoperation.It is evident that this process needshuman intuition, so more intelligent controlstrategies are needed. In current work thefuzzy techniques are used because fuzzy logicincorporates the natural human way ofthinking in a control system, making possiblethe implementation of a controller with aperformance like a human operator [2]. Thisfuzzy controller for a MWO device can givethe correct heating time and the suitablepower level even though a precise model ofthe input/output relationship is not available.The work presented in this paper coversfull design of a fuzzy logic controller (FLC) forMWO in LabVIEW environment version 2009.LabVIEW (Laboratory Virtual InstrumentEngineering Workbench) is a powerful andversatile graphical programming tion control and analysis whichcan be used with a wide range of applicationsespecially in control field [3]. LabVIEW has aFuzzy Logic Toolkit that enables users tointegrate fuzzy logic control into virtualinstruments (VI), this toolkit is utilized incurrent work to design and implement rulebased fuzzy logic system for expert decisionmaking.Literature ReviewAt present, many researches utilized thefuzzy techniques for different applications likeair condition system, auto focus camera,washing machine . etc, but there isn’t anattention or researches to develop the MWOdesign. The recent researches that concernedwith this device are for drying single kind offood with constant ON-OFF power cycle ratiowithin a predefined time interval manually, sonowadays the parameters of the MWO are stillleft uncontrolled and could only be estimatedby experimentation.Liang et al. [4] dried flowers withmicrowaves which offered a number ofadvantages over conventional methods,including faster heating, more uniform drying,and little variation in colour values. Theyconcluded that a “10 sec ON: 45 sec OFF”cycle was suitable for rose flower drying.Changrue et al. [5] recommended that, toachieve an efficient drying process, carrotcubes should be dried under a fixed powerdensity of 1 W/g with 70 C hot air. The powerto the magnetron was manually controlled withan initial pattern of “55 sec ON: 5 sec OFF”followed by a pattern of “30 sec ON: 30 secOFF” when the moisture content of the carrotcubes dropped below 30% (wet basis).Wang Gui-juan et al. [6] combined neuralnetwork with fuzzy technique to design awashing machine controller. They consideredthat the main factors which influence thewashing time are turbidity level and thechange rate of turbidity level. So, the turbidityand change rate of turbidity was used as theinput parameter of control system, andwashing time was used as control variable ofcontrol system, that is, the output of thesystem.Microwaves and MWO TechnologyIn the middle of 1950s, a microwaveheating becomes the custom with microwaveovens, and later it was used in food industryfor drying [7]. MWO are the high voltagesystem that generate microwave energy whichheats or cooks food by radiation withoutapplying any external heat.Microwave radiationMicrowavesareapartoftheelectromagnetic radiation spectrum betweencommon radio and infrared frequencies, thisradiation are extremely high frequency radiowaves 0.3-300 GHz [1]. Microwavesabsorption and reflectivity are functions of thematter subjected to them. Hence, electricallynon-conductive materials like glass, paper,plastic and ceramic allow microwave to passthrough them with very little absorption and allother materials that fall between metals andelectrical isolators absorb microwave at

Abd Alrazaaq / Tikrit Journal of Engineering Sciences 23(1) (2016) 61-68different rates. So materials that containingmoisture (such as food and even people),absorb microwave energy in a process calleddielectric heating. If this energy is absorbed ata rate greater than the rate at which thematerial loses energy (rate of cooling) itstemperature increases [8].MWO TechnologyA microwave oven is a metal box,furnished with a glass door that is covered bya net of metal, which attenuate the leakage ofmicrowave radiations [8]. The heart of thissystem is the magnetron which is specializedvacuum tube, in which electrical energyconverted to oscillating electromagnetic fieldsof 2,450 GHz frequency (a Wavelength of12.24 centimeters (4.82 in)) which istransmitted into the enclosed metal ovencavity. In the cavity, they are reflected by theoven walls and absorbed in food or drinkplaced in the oven as described in theprevious section. To produce these very highfrequency waves, a magnetron requires a veryhigh voltage supply (4Kv for commercialMWOs), so the line power 220 volt (in Iraq) isconverted by a high voltage transformer andsupplied to the magnetron, which generatesthe microwaves [9].In fact, these waves are not heating inthemselvesbutmicrowave-generatedalternating electric fields are a form of energy,converted to heat through their interaction withcharged particles and polar molecules [10].All food molecules have positive andnegative particles which attract and repel eachother like magnets. The alternating electricfield forces the polar molecules in the food torotate back and forth, by continuouslyreversing the polarity of the food molecules atremendous number of times (2,450,000,000times per second), This causes molecularagitation and thus agitation causes frictionbetween the molecules which produces arapid rise in temperature to develop heat.Once the microwaves stop, this friction actioncontinues by itself, eventually returning tonormal molecular action [11]. The oven wallsare not directly heated by microwaves, as theydo not absorb microwave energy, but theinside of the oven may feel warm due to thepresence of the hot food and the heatgenerated by the electrical circuits.Recent and Proposed MWOIn order to develop the commercial MWOsoperation, the automatic control and especiallyintelligent fuzzy techniques are utilized in thisdesign. In recent MWO the user must set thepower level besides either setting thetemperature duration time or in some newMWOs the user can set the weight of theprocessed food instead, this type is listed asauto reheat term, but in this case the settingvalue of this weight will be approximated orthe user need to weigh the food beforeprocessing it, however, according to this setweight value the program delimits the totalneeded duration time with a linear relationshipas shown in Table 1, these values are takenfrom the available MWO model AM820AGX byDélonphy Company.Table.1 The linear relationship betweenweight and timeTotal processingWeight (g)time (min.)1001.162002.323003.484004.64::200023.2Hence the ideas of the proposed design areconcluded firstly by designing a fuzzycontroller that decides the duration time andthe ON interval time automatically accordingto the weight of the processed food. Secondlyinstead of setting the weight of food manually,a load cell can be used and located under theturntable dish to measure the weight of foodbefore starting the operation and thisinformation is used as an input to the fuzzycontroller to control the program by decidingthe suitable required time instead ofcalculating it by linear relationship inconventional MWO design. The advantage ofthis technique that would, to a large extent,makes the operation easier for users byautomating the MWO system design, thus thecost of these weighing scales is presently nothigh in price, so this modification on the recentdesign don’t cost as compared to its benefitsand this feature may be incorporated easily indomestic microwave ovens.63

64Abd Alrazaaq / Tikrit Journal of Engineering Sciences 23(1) (2016) 61-68Implementing the MWO Design as FLCThe Proposed DesignThe fuzzy controller is designed with dualinputs and dual outputs, the first input variableis the weight which represents the amount offood outcome from the load cell, the secondinput variable is the classification for the typeof process that the user want to do, theseprocesses are classified as: defrost, reheatand cook. On the other hand the FLC isdesigned with two outputs, one of them to setand control the entire duration time (T 1)needed to complete the required process,another important controlling parameter is theON power time interval (ton) which set thepower level. There is no doubt that the powersupplied as a constant value for each deviceand it is not an adjustable value, but in MWOsor even conventional ovens the differentpower levels setting is done as a simple ONOFF operation to change the mean powerdelivered to load, where the oven is turned ONat full power for some time (ton) during thecycle and switched off during the rest of thecycle, the time fraction of ON-OFF operationrepresents the duty cycle defined asduty cycle ton / ( ton toff ) . .(1)duration time (t) ton toff . .(2)Actually the power level term is used as aGUI term that represents the percent ratio ofthe duty cycle, in the proposed design thisparameter would be set automatically for eachclassification, in addition to possibility ofsetting it manually as another option for theuser. According to Equation (1) duty cyclerepresents the ratio between ton and t,therefore in the proposed design the ton valueis considered as a second output parameterfor this controller, so by this on-off fuzzycontrol the FLC sets all unknown parametersrequired to produce the supplied electricpower to magnetron. By this procedure thefuzzy controller designed got rid of settingthese parameters manually by the user.The Fuzzy System Designer toolkit inLabVIEW environment is used to design thecontroller, where the weight input variable isset with a universe of discourse UOD from 0gto 2000g and with five fuzzy sets (very small,small, medium, Large and very Large),whereas the second input (classification) isconsidered as a crisp input with singletonmembership functions MFs, because there isno middle state between its terms (reheat,cook and defrost) this input variable is addedinstead of designing three FLC for eachprocess. Figure (1-a) and Figure (1-b) showthe MFs of these two inputs. Figure (2-a) andFigure (2-b) show the MFs of the outputsvariables: T1 and ton of the proposed controllerwhereas T1 variable is designed with a UODrange from 0 to 20 minutes and ton from 0 to 2minutes. These UOD ranges are set by trialand error procedure.(a) Classification(b) WeightFig. 1. Input variable MFs for the designedFLC(a) total duration time (T1)(b) ton duration timeFig. 2. Output variables MFs for the designedFLC

Abd Alrazaaq / Tikrit Journal of Engineering Sciences 23(1) (2016) 61-68The decisions which are made by the FLCare basically based on if–then rules, thesefuzzy rules are obtained and created by manyrepeated experiences on the MWO and bydepending on the human intuition derived fromcommon sense for typical home usage, wherefor defrosting mode the duty cycle must beextremely less than the other two modesbecausethefrozenfoodneedsadiscontinuous heat for deliquescence it, aswell as to avoid cooking the food under thecontinuous heat since the defrosting mode isfor deliquescence food only. On the otherhand the cooking mode requires full powerlevel to cook the food besides the operation ofa grill heater this type of cooking is called aconvection cooking so in this case there is noneed to calculate the ton parameter in thefuzzy rules, also the output duration times ofthe FLC are multiplied by a scalar factor toexpand the output UOD for output variables.The number of these rules is five for eachmode or classification, so the total number ofrules is 15 rules as listed below:1. If 'classification' is 'defrosting' and 'weight'is 'Very Small ' then ' T1 ' is 'Very Short'also ' ton ' is 'Very Short '.2. If 'classification' is 'defrosting' and 'weight'is 'Small' then ' T1 ' is 'Short' also 'ton' is'Short '.3. If 'classification' is 'defrosting' and 'weight'is 'Medium' then ' T1 ' is 'Medium' also 'ton'is 'Medium '.4. If 'classification' is 'defrosting' and 'weight'is 'Large' then ' T1 ' is 'Long' also 'ton' is'Long'.5. If 'classification' is 'defrosting ' and 'weight 'is ' Very large ' then ' T1 ' is ' Very Long 'also 'ton' is ' Very Long '.6. If 'classification' is 'reheating' and 'weight' is'Very Small' then ' T1 ' is 'Very Short ' also'ton ' is 'Very Short '.7. If ' classification ' is 'reheating' and 'weight 'is ' Small ' then ' T1 ' is 'Very Short' also'ton' is ' Short '.8. If 'classification' is 'reheating' and 'weight' is' Medium' then ' T1 ' is ' Short ' also 'ton' is'Medium '.9. If 'classification' is 'reheating' and 'weight' is' Large' then ' T1 ' is ' Medium ' also 'ton' is'Long '.10. If 'classification' is 'reheating' and 'weight 'is ' Very Large ' then ' T1 ' is ' Long ' also'ton' is 'Very Long '.11. If 'classification' is 'cooking' and 'weight' is' Very small ' then ' T1 ' is ' Short '.12. If 'classification' is ' cooking ' and 'weight'is ' Small ' then ' T1 ' is 'Medium '.13. If 'classification' is ' cooking ' and 'weight'is 'Medium ' then ' T1 ' is ' Long '.14. If 'classification' is ' cooking ' and 'weight'is ' Large ' then ' T1 ' is ' Very long '.15. If 'classification' is 'cooking' and 'weight' is' Very Large ' then ' T1 ' is Very Long' .This FLC is integrated with a completedesign in LabVIEW that creates the ON- OFFpower fuzzy control system. This controls thevery high voltage 4Kv after it is transformedfrom the voltage supply 220v to change thepower output of the magnetron in an on-offmode (duty cycle control). Figure (3) andFigure (4) show the block diagram and thefront panel for this design.Fig. 3. The block diagram of the designed MWOFig. 4. The front panel of the designed MWOin LabVIEW65

66Abd Alrazaaq / Tikrit Journal of Engineering Sciences 23(1) (2016) 61-68The Modified Proposed DesignTo improve the previous design, in thissection another modification is added to it,where the state of the processed food couldbe returned to the controller to adapt itsoutputs, i.e. a feedback control system hasbeen accomplished in this design. Clearly it isdifficult to set a temperature sensor inside thefood during microwave operation, and thisneeds a certain type of contact sensors aswell as for a frozen food it is impractical to fixany sensor inside that food. So anothertechnique is considered.During processing food in MWO, a certainamount of steam is produced eventually,therefore a humidity sensor is utilized andplaced at a point where the steam leaves thecavity and collect at the end of a certain duct.This sensor detects the presence of steamemitting by the food being processed, andthen measures the moisture content of therising gasses from the food. The percent valueof the measured humidity is send to a fuzzycontroller in addition to the measured weightfrom the load cell as in preceding design,according to this information the fuzzyinference decides the second duration time T2and stop the first duration time T1.For this modified design, Figure (5),another fuzzy controller has been added to thefirst one, where the first controller decides theinitial interval time T1 and the secondcontroller determine the remaining time orwhich is called the balance time T2 with asmall range from 0 sec to 2 min., where thistime interrupts the T1 period when steam isdetected and the design automatically jumpsto a second period T2 and this value appearsin the display LED window.The second added controller has beendesigned with two inputs (the T1 value and theclassification type) and single output T2remaining time. The rules of this controller areset according to human intuition and usage ofthis device. It is evident that for defrostclassification type the steam sensor is notuseful because the defrosting process do notproduce steam, therefore the controlleroperates only for cooking and reheating mode.The time T2 for cooking must be longercompared with reheating, and the later mustbe very small because at moment the steam isescaped from the food, it will be hot. Forcooking mode when T1 time is long i.e. theweight is big, the controller decides that the T2value must be long and vice versa if T1 is shorttime, T2 must be short too and so on. Figure(6) shows the output variable MFs.Hot steamTurntableSteam sensorMagnetronLoad cellFig. 5. The modified design for MWOFig. 6. Output MFs for (T2) variable in themodified FLCThe fuzzy rules for this controller are listedbelow:1. If 'classification' is 'reheating' and 'T1' is'very short' then ' T2 ' is 'very short'.2. If 'classification' is 'reheating' and 'T1' is'short' then ' T2 ' is 'very short '.3. If 'classification' is 'reheating' and 'T1' is'medium' then ' T2 ' is 'short'.4. If 'classification' is 'reheating' and 'T1' is'long' then ' T2 ' is 'medium'.5. If 'classification' is 'reheating' and 'T1' is'very long' then ' T2 ' is 'long'.6. If 'classification' is 'cooking' and 'T1' is 'veryshort' then ' T2 ' is 'medium'.7. If 'classification' is 'cooking' and 'T1' is'short' then ' T2 ' is ' medium'.8. If 'classification' is 'cooking' and 'T1' is'medium' then ' T2 ' is 'long'.

Abd Alrazaaq / Tikrit Journal of Engineering Sciences 23(1) (2016) 61-689. If 'classification' is 'cooking' and 'T1' is 'long'then ' T2 ' is 'very long'.10.If 'classification' is 'cooking' and 'T1' is'very long' then ' T2 ' is 'very long'.Experimental ResultsAs the LabVIEW environment has beendesigned specifically for test, measurement,and control, the output times of the designedFLC is firstly tested using this software then itis applied on a domestic MWO (modelAM820AGX 800 watt) to test the efficiency ofthis design practically. Different weights offood are used, so the output times of the firstproposed controller is summarized in Table(2). The consequential on-off power signal foreach mode selection is shown in figures67 below, where the Figures (7) and (8) show theon-off power signal for the defrosting modewith 100g and 500g respectively and thepower level is set to (auto power) for all thesemeasurements. For reheating mode Figure (9)show the on-off signal for 1000g and Figure(10) shows the signal of cooking mode for700g of food.Table 2. Time produced according to the FLCDefrosting modereheating .3229.5021.43717.5171.76612.0121.666Weight (g)10030050070010002000OFF4000tCooking .98927.01127.01136.83336.8334000ONFig. 7. The corresponding ON-OFF time (T1)for defrosting mode, the weight is 100gFig. 9. The corresponding ON-OFF time (T1)for reheating mode, the weight is 1000gOFF4000ON4000ONFig. 8. The corresponding ON-OFF time (T1)for defrosting mode, the weight is 500gONFig. 10. The corresponding ON-OFF time (T1)for cooking mode, the weight is 700g67

68Abd Alrazaaq / Tikrit Journal of Engineering Sciences 23(1) (2016) 61-68The next experimental measurements iscarried out practically using MWO, wherethree kinds of food are utilized since theproposed design has three classificationmodes, these kinds is considered the mostfrequently used kinds in the home MWOapplications in the kitchen. Each one withdifferent weights are specified for each mode,for reheating mode the precooking rice areused and the frozen meat are used fordefrosting mode, finally pieces of chicken areused for cooking mode. Actually thesemeasurements are applied especially forsetting fuzzy rules of the FLC, manyexperiences is repeated to fine-tune theserules to get best duration times for differentfood and for different processing modes.ConclusionsIn this paper new ideas have beenproposed to develop the operation of MWOs,where the aim of this work was to modify therecent MWOs to be as other automaticdevices that reduces the manual usage asmuch as possible. The design performancewas evaluated in the experimental work wherethe output times applied on the MWO, as theresults of the reheating and defrosting modesare proved to be practical and suitable for thetested food, but for the cooking mode theresults show that the microwave alone is notenough radiation to stew the food, so thismode requires a grill heater besides themicrowave radiation, therefore it must bementioned that the considered times is setaccording to this assumption.References1- Zhenfeng L., "Aroma Detection and Controlin Passive and Dynamic Food Systems forSuperiorProduct",Doctorthesis,Department of Bioresource Engineering,McGill University, Quebec- Canada, March2008.2- Cirstea M., Dinu A., Khor J., McCormick M.,“Neural and Fuzzy Logic Control of Drivesand Power Systems”, Newnes, ISBN 0 750655585, 2002.3- Bitter R., Mohiuddin T. and Nawrocki M.,“LabVIEWAdvancedProgrammingTechinques”, CRC Press LLC, 2001.4- Liang L., Mao Z., Cheng Y., "Study on theApplication of Freeze Drying and MicrowaveDrying to Flower", ASAE paper No. 036075.St. Joseph, Mich.: ASAE, 2003.5- Changrue V., Sunjka P. S., Gariepy Y.,Raghavan G.S.V., and Wang N., "Real-TimeControl of Microwave Drying Process”, TheProceedings of the 14th International DryingSymposium, Sao Paulo, Brazil, August 24,2004.6- Wang G., Wang Z., Zhang X. and Xu H.,"The Application of Fuzzy-neural NetworkBased on HGA in The Washing MachineControl System", International Conferenceon Intelligent Computation Technology andAutomation,ISBN:978-0-7695-40771/10,2010.7- Rakhmankulov D.L., Shavshukova S.,Latypova N., and Zorin V., “Laboratory andIndustrialApplicationsofMicrowaveTechniques”, Russian Journal of AppliedChemistry, Vol.75, No.9, PP.1377-1383,2002.8- Shaiyek M. Buland T., Shaikh M. RubayiatT., "Investigation of Suitability of OperatingFrequency and Electro technical Modeling ofMicrowave Oven" IEEE transaction 978-14244-8782-0/11. 2011.9- Young-Jin W., Sang-Kyung K., and GyuHyeongC., "Voltage Clamped Class EInverter With Harmonic Tuning Network forMagnetron Drive", IEEE Transactions onCircuits and Systems—II: Express Briefs,Vol. 53, No. 12, pages: December, 2006.10- Buffler C. R., "Microwave Cooking andProcessing", New York: Van NostrandReihold ISBN 10- 0442008678, 1993.11- The Government of the Hong KongSpecial Administrative Region, "MicrowaveCooking and Food Safety", Food andEnvironmental Hygiene Department, RiskAssessment Studies No.19, June 2005.

Finally the output results of the controller have been tested practically on some kinds of food using the available MWO. The results proved the efficiency of using this design by finding the suitable parameters to process food without dependence on the repeated estimation by the user. Keywords: Microwave oven, LabVIEW, Fuzzy controller, Weight.