0% found this document useful (0 votes)
221 views23 pages

Intelligent Microwave System For Cooking

This is a mini project for the subject Artificial Intelligence whereby an intelligent microwave system is created by using fuzzy logic rules (Mamdani).

Uploaded by

Jolie Lynn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
221 views23 pages

Intelligent Microwave System For Cooking

This is a mini project for the subject Artificial Intelligence whereby an intelligent microwave system is created by using fuzzy logic rules (Mamdani).

Uploaded by

Jolie Lynn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

0

UNIVERSITI KUALA LUMPUR


MALAYSIA FRANCE INSTITUTE

ARTIFICIAL INTELLIGENCE
FSB 33303
M131D1
MINI PROJECT
MICROWAVE OVEN FUZZY LOGIC



Prepared by:
Name Matric No.
Jolynn Samantha Martin 50213211509
Muhamad Sahih Bin Juso 50213211160
Ahmad Hazim Mohd Rusli 50213212559




Date: 14 May 2014 Prepared for: Mr. Zalhan Mohd Zin
i

TABLE OF CONTENTS

Introduction to Fuzzy Logic....................................................................................................... 1
Overview of Mini Project .......................................................................................................... 3
Literature Review....................................................................................................................... 4
Problem Statement ..................................................................................................................... 6
Project Workflow ..................................................................................................................... 10
Development of Fuzzy Logic Applications ............................................................................. 12
Results and Discussion ............................................................................................................ 16
Conclusion ............................................................................................................................... 18
Recommendation ..................................................................................................................... 19
References ................................................................................................................................ 20
Appendix: Source Codes.......................................................................................................... 21
MATLAB Source Code for Fuzzy Inference System (FIS) ................................................ 21


1

INTRODUCTION TO FUZZY LOGIC

The concept of Fuzzy Logic was conceived by Lotfi Zadeh, a professor at the University of
California at Berkley, and presented not as a control methodology, but as a way of processing
data by allowing partial set membership rather than crisp set membership or non-
membership. This approach to set theory was not applied to control systems until the 70's due
to insufficient small-computer capability prior to that time. Professor Zadeh reasoned that
people do not require precise, numerical information input, and yet they are capable of highly
adaptive control. If feedback controllers could be programmed to accept noisy, imprecise
input, they would be much more effective and perhaps easier to implement. Unfortunately,
U.S. manufacturers have not been so quick to embrace this technology while the Europeans
and Japanese have been aggressively building real products around it.
In this context, fuzzy logic is a problem-solving control system methodology that lends itself
to implementation in systems ranging from simple, small, embedded micro-controllers to
large, networked, multi-channel PC or workstation-based data acquisition and control
systems. It can be implemented in hardware, software, or a combination of both. Fuzzy logic
provides a simple way to arrive at a definite conclusion based upon vague, ambiguous,
imprecise, noisy, or missing input information. Fuzzy logic's approach to control problems
mimics how a person would make decisions, only much faster.
Fuzzy logic incorporates a simple, rule-based IF X AND Y THEN Z approach to a solving
control problem rather than attempting to model a system mathematically. The fuzzy logic
model is empirically-based, relying on an operator's experience rather than their technical
understanding of the system. For example, rather than dealing with temperature control in
terms such as "SP =500F", "T <1000F", or "210C <TEMP <220C", terms like "IF (process is
2

too cool) AND (process is getting colder) THEN (add heat to the process)" or "IF (process is
too hot) AND (process is heating rapidly) THEN (cool the process quickly)" are used. These
terms are imprecise and yet very descriptive of what must actually happen. Consider what
you do in the shower if the temperature is too cold: you will make the water comfortable very
quickly with little trouble. Fuzzy logic is capable of mimicking this type of behavior but at
very high rate.
Fuzzy logic requires some numerical parameters in order to operate such as what is
considered significant error and significant rate-of-change-of-error, but exact values of these
numbers are usually not critical unless very responsive performance is required in which case
empirical tuning would determine them. For example, a simple temperature control system
could use a single temperature feedback sensor whose data is subtracted from the command
signal to compute "error" and then time-differentiated to yield the error slope or rate-of-
change-of-error, hereafter called "error-dot". Error might have units of degs F and a small
error considered to be 2F while a large error is 5F. The "error-dot" might then have units of
degs/min with a small error-dot being 5F/min and a large one being 15F/min. These values
don't have to be symmetrical and can be "tweaked" once the system is operating in order to
optimize performance. Generally, fuzzy logic is so forgiving that the system will probably
work the first time without any tweaking.
Fuzzy logic was conceived as a better method for sorting and handling data but has proven to
be an excellent choice for many control system applications since it mimics human control
logic. It can be built into anything from small, hand-held products to large computerized
process control systems. It uses an imprecise but very descriptive language to deal with input
data more like a human operator. It is very robust and forgiving of operator and data input
and often works when first implemented with little or no tuning.
3

OVERVIEW OF MINI PROJECT

Most household appliances use fuzzy logic for ease of use these days, especially for use in
the kitchen. This allows consumers to simply heat/cook and go with their food and provides
ease of use to those who are on the move, inept at cooking, or inept even at the heating of
food. Microwave ovens usually operate on the basis of type of food and/or weight of food to
heat and/or cook food as desired by the consumer. The use of microwave ovens have evolved
extraordinarily due to the integration of fuzzy logic in its system, allowing ease of use and
saves consumer time.
The microwave oven system includes a power output controller that controls the applicator
output power; weight sensor that automatically detects the weight of food on the microwave
ovens turntable; sensor that automatically classifies the food type as soft, medium or hard;
and fuzzy logic controller that receives a signal from the weight sensor indicating the current
weight of food on the turntable as well as signal from the sensor indicating the current food
type and adjusts the microwave output power based on the current weight of food and food
type in accordance with fuzzy logic rules by sending a control signal to the power output
controller. A membership function divides the expected range for the amount of weight and
food type into multiple regions, each region having a pre-computed regional output settings.
The regional output settings of the regions include the current weight of food and type of
food are used to compute the control signal.
The user controls the time that is needed to cook or heat the food. The microwave oven then
adjusts its power output level accordingly to effectively cook or heat the food. Establishing
the power output level in terms of percentage utilizes the microwaves magnetron well to
evenly cook the food. The centroid method is used for defuzzification.
4

LITERATURE REVIEW

The microwave oven has added an innovative dimension to todays kitchen as a preparation
and cooking appliance, differing from traditional cooking appliances. The first domestic
microwave oven was introduced in the 1960s by Litton, followed by Amana which brought
out the first countertop model in 1968 (Thompson & Sweaney, 1993). Today, the microwave
oven is used in 90% of American households and 68% of workplaces (The microwave tidal
wave, 1989).
Microwave ovens operate on the basis whereby when the weight of the food and/or the type
of food is detected by the controller, giving a fuzzy membership function. The fuzzy logic
membership then establishes how much power is to be supplied to the magnetron in order to
generate the microwave output power to cook and/or further heat the food. The microwave
output power level is measured in terms of percentage because of the correlation between
microwave oven output power percentages to conventional oven temperatures in order to
cook food evenly. It must also be taken into consideration that different microwave ovens
have different wattages. Therefore, a 1000 W microwave oven has a different operating
power when compared to a 750 W microwave oven.
Unlike the conventional oven that utilizes dry heat to cook food, the microwave oven cooks
food by exciting the water molecules in the food by using microwaves. Microwaves are a
type of wave that are sandwiched between radio waves and infrared radiation on the
electromagnetic spectrum. In the case of microwave ovens, the commonly used wave
frequency is roughly 2,450 megahertz (2.45 gigahertz). Waves in this frequency range have
an interesting property whereby they are absorbed by water, fats and sugars. Once absorbed,
they are converted directly into atomic motion which is heat. These waves boast another
5

interesting, related property too as they are not absorbed by most plastics, glass or ceramics.
Metal reflects microwaves, however, which is why metal pans do not work well in a
microwave oven. It is also why the devices have metal walls for reflection of the microwaves
In microwave cooking, the radio waves penetrate the food and excite water and fat molecules
almost evenly throughout the food. No heat has to migrate toward the interior by conduction.
There is heat everywhere all at once because the molecules are all excited together. There are
limits, of course. Microwaves penetrate unevenly in thick pieces of food and there are also
hot spots caused by wave interference. The entire heating process is different because of the
process of exciting atoms rather than the conventional process of conducting heat.
Using a microwave oven with fuzzy logic principles aids in cooking time and promotes ease
of use because of the superiority of the fuzzy logic controller especially when combined with
one or more sensors. For example, if one were to bake a whole potato in a conventional oven
with a conventional controller, it would take about an hour to fully cook the potato. However,
if one were to cook a whole potato in a microwave oven with a fuzzy logic controller, it
would take about 10 minutes to fully cook the potato. This clearly illustrates the superiority
of the fuzzy logic controller. It not only cooked the potato much faster, it also saved energy.
Fuzzy logic principles are applied to microwave ovens whereby by combining the input
values of the weight and type of food, the fuzzy logic controller then adjusts the output power
level accordingly to cook the food thoroughly. Solid foods require a longer cooking time and
thus, the fuzzy logic controller will signal to the microwaves magnetron to cook the solid
food at a lower power to prevent the food from becoming too hard on the outside yet
uncooked in the inside. Similarly, for foods in a soft or liquid state will require a shorter
cooking time. Therefore, a short burst of higher power is suitable to quickly boil the liquid
which is decided accordingly by the fuzzy logic controller.
6

PROBLEM STATEMENT

From an engineering standpoint, both microwave heating and cooking of foods are complex.
Thus, microwave cooking is certainly complex and a complete engineering description of this
process that includes physical, chemical, biological, and sensory aspects is simply not
available. Cooking depends on such a myriad of oven and food factors. Thus, there are
situations where cooking is more of an art than science. Patterns begin to emerge from
persistent testing of actual food products and processes. These can lead to the development of
simple, basic microwave techniques, developed from the other end of the spectrum, such as
the cooked final product.
Microwave ovens have various cooking patterns, and it is important to determine if there are
hot or cold areas which could cause uneven cooking of foods. To help ascertain where these
areas are, dampen a paper towel, place it on your turntable or the floor of your oven, and heat
it for a minute or two. Hot or cold spots will show up as damp and dry patterns on the towel.
Sometimes these areas can actually be used to an advantage by placing certain types of foods
within the areas to help cook them faster or slower. For example, a leg of lamb roast will
cook more evenly when the small end of the leg is placed in the cooler area, and the larger
end of the roast in the warmer area in the oven. Although newer microwaves have fewer hot
and cold spots, this can be a problem in many of the older models.
Electrical power in some areas may vary throughout the day. This can explain why food
cooked exactly the same way will turn out differently at times, which can be very frustrating
to microwave cooks. To help determine the peak time of power usage in a certain area, it is
helpful to boil a cup of room-temperature water (25C) at three separate times throughout the
day. It is best to do this test on a weekday when schedules are more similar than on weekends
7

or holidays. At certain times throughout the day, time for the water to reach boiling point may
vary as much as 1 or 2 min. Therefore, cooking times may need to be adjusted upward or
downward at certain times in order to achieve the same result in the food cooked. Microwave
oven power is measured in watts, which indicates the cooking power of each new oven.
Although the wattage information can usually be found in the owners manual, actual wattage
varies depending on the age of the oven and a number of other oven food.
Experience has shown that foods cook more consistently by correlating microwave
percentages of power to conventional oven temperatures. Table 1 shows this rule of thumb
for microwave power levels as they relate to conventional temperatures, for a full-size
microwave oven (600750 W). Higher wattage ovens will need to lower the power or lessen
cooking time. For example, 70% power on a microwave oven having 1000 W or more of
power would be equivalent to 100% power on a 600750 W oven. Use similar techniques as
in conventional heating, such as to cover or not to cover, and then correlate microwave power
levels to the proper conventional temperatures at which a particular food would cook
conventionally.
Refer to power levels as 100% or 70% rather than medium, low, simmer, or bake, which may
not be consistent from manufacturer to manufacturer. For example, one microwave
manufacturer may have a medium of 50% power while another may have a medium of 70%
power. By using percentages of power rather than inconsistent terminology, accuracy will be
greater when cooking foods in a microwave.

8

Table 1: Approximate Adaptations for Conventional Cooking Temperatures to Microwave Power Levels for 750 W Oven
Microwave Power Level, % Equivalent Setting on Conventional Oven, C
10 65 90 (low stovetop)
20 90 110
30 40 110 150
50 60 150 180 (medium stovetop)
70 180 195 (medium-high stovetop)
80 195 220
90 100 220 260 (deep-fat-fry, broil, high stovetop)

Below is a list of factors affecting cooking times in a microwave oven:
1. Starting temperature of the food (cold vs. room temperature or warm).
2. Quantity of food (large or small amount). Since small pieces of food cook quicker than
larger pieces, items of similar size cook more uniformly. Large foods such as turkeys or
roasts, which cannot be stirred, should be turned over rotisserie style while cooking.
This promotes uniform, even heating in the microwave just as a rotisserie cooks large
pieces of meat more evenly on a charcoal grill.
3. Shape of food (thin vs. thick; round vs. irregular).
4. Shape of container in which food is cooked (square vs. round vs. ring).
5. Composition of food (high sugar-fat content heats faster than lower sugar-fat content;
higher sugar-fat content heats faster than water). Fresh vegetables contain more water and
cook faster than those that are less fresh.
6. Density of food. Two foods weighing the same with different densities cook differently; a
dense or compact roast takes longer to cook than a porous loaf of bread of the same
weight.
7. Microwave power being usedpower level (e.g., 100% vs. 30%) and oven wattage.
9

8. Electrical power fluctuation (power supply in your home may vary throughout the day
and may affect the microwave cooking times).
9. Preference as to doneness (crisp vegetables vs. soft, tender vegetables).
10. Liquid being added to food (vegetables in sauce vs. vegetables cooked alone). Foods,
such as soups, with a high liquid content will take longer to cook than those that cook
from their own moisture content. Liquid ingredients slow down cooking. In other words,
500 grams of food with 50% moisture added will take less time to heat to a certain
temperature than 500 grams of food with 75% moisture added. If meat is cooked in
liquid, cooking time will be longer than meat not cooked in liquid; a potato cooked in
water will take longer to cook than one cooked by itself. Also, if meat or vegetables are
partially cooked prior to adding the liquid, cooking time will be shorter. Combine
partially cooked food with hot liquid, and the cooking time will be shorter still.

Due to these factors, the weight sensor and material sensor must accurately extract the weight
of food and type of food respectively so that the fuzzy logic controller will adjust the output
power accordingly to prevent the food from overcooking. However, there is no sensor to
determine that the food has been thoroughly cooked. Thus, the user must select an
appropriate cooking time to effectively cook the food in a microwave oven. There is also a
tendency for liquids to superheat when cooking in a microwave oven whereby it exceeds its
boiling point. Because of that, the fuzzy logic controller is adjusted accordingly so that it
signals the microwave ovens magnetron to supply a lower power when cooking liquids (or
soft food type).

10

PROJECT WORKFLOW

The basic structure of this mini project consists of a microwave oven with a fuzzy logic
controller. Two sensors are used. One is used to measure the weight of food and the second is
used to detect the type of food. The sensors with amplification are connected with the two
fuzzifiers of the fuzzy logic control system. Outputs of defuzzifiers are to control the range.

Figure 1: Basic model of microwave oven with fuzzy logic controller

This simplified design algorithm is used to design the fuzzifier, rules and defuzzifier for the
microwave oven to achieve an effective range (power) of cooking food in a microwave oven.
The design uses three membership functions:
1. Input: Weight of food with a range of 0 to 100% of the microwave ovens turntables
maximum acceptable weight.
2. Input: Type of food with a range of 0 to 100 % of solid food state.
3. Output: Output power with a range of 0 to 100 % of the microwave ovens maximum
operating power.
11

The fuzzifier uses the data of two input variables, weight of food and type of food to
determine the data of the output variable, output power. The membership functions and
range are given in the tables below.
Table 2: Membership function for weight of food
Membership Function for Weight of Food Range of Food Weight (%)
Light 0 40
Medium 30 75
Heavy 65 100

Table 3: Membership function for type of food
Membership Function for Type of Food Range of Food Type (%)
Soft 0 45
Medium 40 75
Hard 60 100

Table 4: Membership function for output power
Membership Function for Output Power Range of Output Power (%)
Very Low Power 0 25
Low Power 20 45
Medium Power 35 65
High Power 55 85
Very High Power 75 100

From the membership functions and range above, it is now possible to develop the rules for
the microwave ovens fuzzy logic controller. The centroid method is used for defuzzification.

12

DEVELOPMENT OF FUZZY LOGIC APPLICATIONS

Before developing the rules, the inputs range are determined.
X1 = Weight of Food = {Light, Medium, Heavy}, ranging from 0 to 100 percent.
X2 = Type of Food = {Soft, Medium, Hard}, ranging from 0 to 100 percent.
The outputs range is determined as well.
Y = Output Power = {Very Low, Low, Medium, High, Very High}, ranging from 0 to
100 percent output power.
The rules are then developed based on the inputs.
Table 5: Table of rules developed by two inputs
WEIGHT
TYPE
LIGHT MEDIUM HEAVY
SOFT Medium High Very High
MEDIUM Low Medium High
HARD Very Low Low Medium

The rules developed are as follows:
1. If Weight is LIGHT and Type is SOFT, then Power is MEDIUM
2. If Weight is LIGHT and Type is MEDIUM, then Power is LOW
3. If Weight is LIGHT and Type is HARD, then Power is VERY LOW
4. If Weight is MEDIUM and Type is SOFT, then Power is HIGH
5. If Weight is MEDIUM and Type is MEDIUM, then Power is MEDIUM
6. If Weight is MEDIUM and Type is HARD, then Power is LOW
7. If Weight is HEAVY and Type is SOFT, then Power is VERY HIGH
8. If Weight is HEAVY and Type is MEDIUM, then Power is HIGH
9. If Weight is HEAVY and Type is HARD, then Power is MEDIUM

13

The rule selector receives three crisp values of weight of food and type of food, distributes
the universe of discourse into regions, fires the rules, and then gives the output values
corresponding to each variable. The plots of membership functions generated in MATLAB
are provided in the figures below.

Figure 2: Plot of membership function for input variable Weight

14


Figure 3: Plot of membership function for input variable Type


Figure 4: Plot of membership function for output variable Power

15


Figure 5: Establishing the rules in MATLAB's Rules Editor

16

RESULTS AND DISCUSSION

The value for range of the microwave ovens output power is calculated using the Centroid of
Gravity method. If the weight of food is 65% of the microwave ovens maximum allowable
weight and the type of food is 23% of being solid, then the microwave ovens output power is
around 70% of its maximum operating power. The figures below display the result by
MATLABs Rule Viewer as well as the surface generated.


Figure 6: Rule viewer of MATLAB for Power Output

17


Figure 7: Surface generated by MATLAB's Rule Viewer


Figure 8: Output generated by MATLAB Simulink's scope


18

CONCLUSION

The convenience of the mini projects microwave oven model is to allow users to easily
operate a microwave oven without having to worry about having to set the food weight
and/or set the foods type/state. This is safer and may even prolong the life of the microwave
oven as well as ensure user safety by preventing the superheating of foods (especially in soft
or liquid state). Due to this, one can safely use the microwave oven without having the
knowledge of internal construction and technical knowledge of microwave ovens.
In conclusion, this microwave oven will help to save electricity in the long term due to
operating at its optimal output power level in correlation with the weight of food and type of
food initially detected by the microwave ovens sensors. The user only needs to set the
microwave cooking/heating time and can go on about other chores while waiting for the food
to be cooked or heated by the microwave oven.
Therefore, the integration of fuzzy logic control systems in everyday applications improve
the quality of life and promote ease of use.


19

RECOMMENDATION

Despite the microwave ovens ability to detect the weight of food and type of food, it must be
taken into consideration that the microwave oven does not brown food like its conventional
oven counterpart. The use of an inverter and current microwave oven technologies when
combined with this microwave oven may achieve the desired effect of browned foods.
In addition to that, microwave ovens cook food from the inside as opposed to external heat by
its conventional oven counterpart. This involves a very deep understanding about the
molecular structure of various types of foods as well as the moisture content of different
types of foods since microwave ovens cook food by exciting the water molecule within the
food. Therefore, the use of a moisture sensor may seem applicable in this context.
Converting this microwave oven to a combinational microwave oven (which is the current
trend in microwave oven technology) is also ideal because it allows users to cook food much
like a conventional oven.


20

REFERENCES

[1] Abramovitch, D. (1994). Some Crisp Thoughts on Fuzzy Logic. American Controls
Conference (p. 5). Baltimore: Hewlett-Packard Laboratories.
[2] Altrock, C. v. (2002). Fuzzy Logic and NeuroFuzzy Applications Explained.
[3] Datta, A. K., & Anantheswaran, R. C. (2001). Handbook of Microwave Technology for
Food Applications. New York: Marcel Dekker, Inc.
[4] Karambe, R. K., & Gahane, D. H. (2014). Automation of Grinder - An Introduction of
Fuzzy Logic. IOSR Journal of Electrical and Electronics Engineering (IOSR-JEEE), 5.
[5] Kim, J. W. (1994). Seoul, Republic of Korea Patent No. 5,283,410.
[6] Kipphan, H. (2001). Handbook of print media: technologies and production methods
(Illustrated ed.). In H. Kipphan, Handbook of print media: technologies and production
methods (Illustrated ed.) (pp. 130 - 144). Springer.
[7] Lee, I. K. (1995). Kyungsangnam-Do, Republic of Korea Patent No. 5,382,775.
[8] Perkowitz, M., & Etzioni, O. (2000). Adaptive Websites. In M. Perkowitz, & O. Etzioni,
Adaptive Websites (pp. 152 - 158). Commun ACM.
[9] Spott, M., & Nauck, D. (2006). Towards the Automation of Intelligent Data Analysis.
Appl. Soft Comput.




21

APPENDIX: SOURCE CODES
MATLAB Source Code for Fuzzy Inference System (FIS)
[System]
Name='microwave'
Type='mamdani'
Version=2.0
NumInputs=2
NumOutputs=1
NumRules=9
AndMethod='min'
OrMethod='max'
ImpMethod='min'
AggMethod='max'
DefuzzMethod='centroid'

[Input1]
Name='Weight'
Range=[0 100]
NumMFs=3
MF1='Light':'trimf',[0 20 40]
MF2='Medium':'trimf',[30 52.5 75]
MF3='Heavy':'trimf',[65 82.5 100]

[Input2]
Name='Type'
Range=[0 100]
NumMFs=3
MF1='Soft':'trimf',[0 22.5 45]
MF2='Medium':'trimf',[40 57.5 75]
MF3='Hard':'trimf',[60 80 100]

[Output1]
Name='Power'
Range=[0 100]
NumMFs=5
MF1='VeryLow':'trimf',[0 12.5 25]
MF2='Low':'trimf',[20 32.5 45]
MF3='Medium':'trimf',[35 50 65]
MF4='High':'trimf',[55 70 85]
MF5='VeryHigh':'trimf',[75 87.5 100]

[Rules]
1 1, 3 (1) : 1
1 2, 2 (1) : 1
1 3, 1 (1) : 1
2 1, 4 (1) : 1
2 2, 3 (1) : 1
2 3, 2 (1) : 1
3 1, 5 (1) : 1
3 2, 4 (1) : 1
3 3, 3 (1) : 1

You might also like