FLNN Final Print
FLNN Final Print
On
By
2214110431 MOHI SANJEEV
2214110435 SHAYAN KUMAR
2214110448 SHUBHAM THAKUR
CERTIFICATE
Certified that the Project Based Learning report entitled, “Fuzzy Logic Controlled
Air Conditioner using MATLAB” is work done by
in partial fulfillment of the requirements for the award of credits for Project Based Learning (PBL)
in Electronic Communication of Bachelor of Technology Semester 5, in Electronics &
communication Engineering.
Date:
First and foremost, we would like to express our gratitude to our Mentor,
Prof. V P Kaduskar who was a continual source of inspiration. he pushed
us to think imaginatively and urged us to do this project without hesitation.
His vast knowledge, extensive experience, and professional competence
in the subject of Electronic & Communication enabled us to successfully
accomplish this project. This endeavor would not have been possible
without her help and supervision.
Mohi Sanjeev
Shayan Kumar
Shubham Kr. Thakur
INDEX
1. Abstract 1
3. Introduction 4
6. Rule-Based AC Control 18
7. Conclusion 24
8. References 25
Appendix
1. ABSTRACT
This project focuses on the design and development of an intelligent air conditioning (ac)
controller using fuzzy logic principles. Traditional control systems often rely on precise
mathematical models and binary logic, which can struggle to manage complex, uncertain,
or nonlinear environments. To overcome these limitations, fuzzy logic offers a more human-
like approach to decision-making by handling imprecision and partial truths.
In this project, the fuzzy logic controller (flc) is designed to regulate the air conditioning
system based on varying environmental conditions, such as room temperature and humidity
levels. By defining a set of fuzzy input variables and applying a rule-based inference system,
the controller dynamically adjusts the fan speed and cooling power to achieve optimal
comfort levels. The controller employs fuzzification techniques to convert crisp input data
into fuzzy sets, processes these sets using predefined fuzzy rules, and defuzzifies the output
to generate precise control actions.
This intelligent system is particularly suitable for environments where temperature control
is subject to continuous fluctuations, providing a more adaptive and efficient alternative to
conventional control methods. The result is an ac controller that can respond smoothly to
changes in the surrounding conditions, offering enhanced user comfort and energy
efficiency. The project demonstrates how fuzzy logic can be applied to modern control
systems, simplifying their design and making them more robust in uncertain conditions.
1
2. PROBLEM STATEMENT
Objectives
Approach
A fuzzy logic-based air conditioner (AC) controller can be designed and implemented in
MATLAB using the Fuzzy Logic Toolbox. The solution involves modelling an intelligent
control system that takes multiple environmental inputs such as temperature, humidity, and
electric voltage, and uses fuzzy logic rules to regulate the outputs—compressor speed, fan
speed, fin direction, and mode of operation. First, membership functions are defined for each
input, categorizing temperature (e.g., “Too Cold,” “Cold,” “Warm,” “Hot”), humidity (e.g.,
“Dry,” “Comfortable,” “Humid”), and electric voltage (e.g., “Low,” “Regular”). Similarly,
the outputs are characterized into levels (e.g., “Off,” “Low,” “Medium,” “Fast” for
compressor speed). A set of fuzzy rules is then formulated based on human expertise to
determine how these inputs should interact to achieve the desired cooling and
dehumidification levels.
In MATLAB, the fuzzy inference system (FIS) is built using the Mamdani method for better
interpretability. The Fuzzy Logic Designer tool in MATLAB allows for graphical
construction of this system, where inputs, outputs, and rule-based logic are configured. Once
the FIS is set up, it can be simulated to observe the controller’s performance under various
environmental conditions. The system adaptively responds to changes, ensuring optimal
comfort by adjusting the AC parameters in real-time. Additionally, MATLAB’s
visualization features can be used to generate plots for membership functions, rule surfaces,
and inference results, providing deeper insights into the fuzzy logic controller’s behaviour
and allowing for fine-tuning based on performance. This results in an energy-efficient,
adaptive AC system capable of maintaining user comfort under varying external conditions.
2
3. INTRODUCTION:
This project explores the use of fuzzy logic as an alternative approach to controlling
air conditioning systems. Fuzzy logic, introduced by Lotfi Zadeh, provides a way
to handle imprecise information by mimicking human decision- making processes.
Unlike conventional binary logic, which only deals with absolute true or false
conditions, fuzzy logic works with degrees of truth, allowing for partial membership
in multiple states (e.g., a temperature can be somewhat "warm" and somewhat "hot"
simultaneously).
The fuzzy logic controller (FLC) designed in this project aims to regulate room
temperature and humidity efficiently. By defining fuzzy sets for inputs such as
temperature and humidity and creating a rule-based system, the controller adjusts
the fan speed and cooling power dynamically. This allows for smoother transitions
and better adaptation to changing environmental conditions, making it more suitable
for real-world applications where fluctuations are common.
The goal of this project is to showcase the effectiveness of fuzzy logic in managing
complex control systems, highlighting its ability to optimize both user comfort and
energy efficiency. Through the implementation of a fuzzy-based AC controller, this
study demonstrates how modern computational techniques can improve the design
and functionality of everyday systems.
3
Why Use Fuzzy Logic Controller?
• Complex interactions between user preferences, actual room temperature and
humidity level are very difficult to model mathematically. Hence, PID controllers
can’t be used.
• Lots of dynamics
• Non-linear
• If a model can be created, then it is too difficult to form a controller
• Human comfort
• Achieving thermal comfort with minimum energy consumption.
• Hence, Variable compressor speeds are needed to increase energy efficiency with
better temperature control.
• The usage of on/off controller consumes large energy as the compressor is working
at the maximum speeds, and it turns on and off when it achieves the temperature
setting, causing high-energy usage.
• Tuning fuzzy logic controller is faster or easier than tuning PID controller.
4
4. Design & Fuzzy Inference Plot
The fuzzy inference plot is a graphical representation of how the inputs to the fuzzy logic
controller are processed to produce outputs. In the context of the fuzzy logic-based air
conditioning (AC) controller, the inference plot helps visualize the relationship between the
inputs (electric voltage, temperature, and humidity) and the outputs (compressor speed, fan
speed, fin direction, and mode of operation).
5
values are categorized into fuzzy sets.
• For example, temperature may have membership functions for “Too Cold,”
“Cold,” “Warm,” “Hot,” and “Too Hot.” Each of these categories will have a
range of temperature values that are assigned a degree of membership, usually
between 0 and 1.
• Similarly, electric voltage will have membership functions for “Regular” and
“Low,” and humidity will have functions for “Dry,” “Refreshing,”
“Comfortable,” “Humid,” and “Sticky.”
2. Output Membership Functions:
Outputs also have corresponding membership functions that define their fuzzy
sets.
• For example, the compressor speed may have functions for “Off,” “Very Low,”
“Low,” “Medium,” and “Fast.” Each function captures a range of speeds and
assigns membership values based on the output conditions derived from the
inputs.
3. Fuzzy Rules:
The rules defined in the system dictate how input memberships interact to
produce output memberships.
• For instance, a rule might state: “If Temperature is Hot and Humidity is Sticky,
then Compressor Speed is Fast and Mode of Operation is Dehumidifier.”
• Each rule can be represented graphically, showing how the inputs’ membership
values contribute to the outputs.
4. Aggregation of Outputs:
The fuzzy inference process combines the results of all rules to determine the
final output membership functions.
• This step involves taking the maximum membership values from all applicable
rules to form the overall output for each fuzzy set. For instance, if multiple rules
dictate different compressor speeds based on various input conditions, the
output for compressor speed will reflect the highest of those values.
5. Defuzzification:
The final step in the fuzzy inference process is defuzzification, which converts
the fuzzy output memberships into a crisp value that can be used to control the
AC system.
• Common methods of defuzzification include the centroid method, where the
centre of area under the output membership functions is calculated to provide
a single, actionable output value (e.g., a specific speed setting for the
compressor).
6
Interpretation of the Fuzzy Inference Plot:
7
5. Analysis of AC Control Based on Inputs and Outputs
5.1 Inputs:
Electric Voltage:
• Indicates the power supply condition for the air conditioner, affecting overall system
performance and capacity to maintain cooling.
8
Temperature:
• Represents the room temperature relative to the set point, where “Too Cold” is
below the desired level and “Too Hot” is above it.
9
Humidity:
• Refers to the moisture content in the air. “Dry” indicates very low humidity, while
“Sticky” represents uncomfortable high humidity.
10
5.2 Outputs:
Compressor Speed:
• Controls the cooling power of the AC. When the compressor is off, no cooling
occurs, and higher speeds indicate increased cooling.
11
Fan Speed:
• Regulates the airflow within the room. Higher fan speeds increase circulation,
helping distribute cooled air more efficiently.
12
Fin Direction:
• Controls the direction of airflow. “Away” typically disperses air evenly, while
“Towards” directs air to focus on a specific zone for rapid cooling or
dehumidification.
13
Mode of Operation:
14
6. Rule-Based AC Control:
• Fin Direction: Away (no need to direct air towards occupants when it’s
already too cold)
• For dry to comfortable conditions, both compressor and fan remain off.
• As humidity increases (Sticky), minimal cooling is applied with the fan on low
and the air directed towards occupants.
2. Temperature: Cold
15
Humidity Variations:
• In dry to refreshing conditions, both compressor and fan remain at low levels.
• In humid and sticky conditions, the system gradually ramps up, with the fan
directing cool air towards the occupants, especially in Dehumidifier mode to
control moisture.
3. Temperature: Warm
• For dry and comfortable air, the system keeps moderate settings, balancing
cooling and airflow.
• For humid and sticky air, both the fan and compressor speed increase, with air
directed towards the occupants and the system operating in Dehumidifier mode
to reduce humidity levels.
4. Temperature: Hot
16
• Fan: Low to Fast
• Mode of Operation: AC for drier air, Dehumidifier for sticky or humid air.
Humidity Variations:
• For dry and refreshing air, compressor and fan speeds remain medium or low.
• For humid and sticky air, the system runs at full capacity, with the
Dehumidifier mode activated to ensure the removal of excess moisture along
with fast cooling.
• In dry and refreshing conditions, moderate to high cooling is applied with the
fan speed aligned.
• In humid and sticky air, the system runs at full capacity, with the Dehumidifier
mode activated to ensure the removal of excess moisture along with fast
cooling.
17
Fig: Inference of Rules declared [1] This plot illustrates the inference rules declared in the fuzzy
logic controller for the AC system. Each rule represents a logical statement that correlates the inputs—such as electric voltage,
temperature, and humidity—with the corresponding outputs like compressor speed, fan speed, fin direction, and mode of
operation. The visualization highlights how different combinations of input conditions lead to specific outputs, enabling the
controller to make informed decisions for optimal indoor climate control. By systematically applying these rules, the system
enhances its responsiveness to varying environmental conditions while maintaining comfort and energy efficiency.
18
Inference:
• With regular voltage, the system operates more dynamically, adjusting both
compressor and fan speeds based on temperature and humidity.
• Under low voltage, the system conserves energy, opting for lower cooling and
fan speeds even when conditions demand more aggressive cooling, especially
in cold and humid scenarios.
2. Temperature as a Primary Control Factor:
• When the temperature is Too Cold, the AC avoids cooling entirely, turning off
both the compressor and fan or keeping them at minimal levels.
• As the temperature rises to Warm, Hot, or Too Hot, the system gradually
increases cooling power, speeding up both the compressor and fan, with the fin
direction shifting towards direct airflows to ensure faster cooling.
3. Humidity’s Influence on Mode and Speed:
• For Humid to Sticky air, the system often switches to Dehumidifier mode,
focusing on reducing moisture while still maintaining adequate cooling. This
triggers higher compressor speeds and directs air towards the occupants.
This rule-based control allows the air conditioner to optimize energy use while
ensuring comfort, dynamically adjusting its operation based on environmental
conditions.
19
RESULT:
The implementation of the fuzzy logic-based air conditioning (AC) controller yielded
significant improvements in managing indoor climate conditions. The project demonstrated
the following key results:
Adaptive Control:
The fuzzy logic controller effectively adapted to varying environmental conditions. By
processing input parameters—electric voltage, temperature, and humidity—the system
dynamically adjusted the compressor speed, fan speed, fin direction, and mode of operation
to maintain optimal comfort levels.
Energy Efficiency:
The intelligent control system reduced energy consumption compared to traditional AC
controllers. By operating the compressor and fan at lower speeds during mild conditions,
the system minimized energy use while still providing adequate cooling and
dehumidification. In scenarios where high cooling was required, the system efficiently
ramped up operation only as necessary.
Improved Comfort Levels:
User comfort significantly improved due to the AC’s responsive nature. The ability to
maintain desired temperature and humidity levels without sudden changes in airflow or
cooling power created a more stable indoor environment. This was especially beneficial
during periods of high humidity or temperature fluctuations.
Effective Dehumidification:
The transition to Dehumidifier mode in humid conditions successfully reduced moisture
levels in the air, enhancing overall comfort. The system demonstrated effectiveness in
controlling sticky conditions, making it suitable for environments prone to high humidity.
Simplified User Interaction:
The fuzzy logic controller provided a user-friendly experience by requiring minimal input
from users. Users could set their desired comfort levels without needing to specify exact
temperature or humidity values, as the system intelligently interpreted these preferences.
Robustness in Uncertain Conditions:
The fuzzy logic approach proved robust in handling uncertainties. Unlike traditional control
systems, which may fail or become inefficient under rapidly changing conditions, the fuzzy
controller maintained stable operation, demonstrating resilience against unexpected
fluctuations in temperature and humidity.
Versatile Application:
The design of the fuzzy logic AC controller showcased its versatility, making it applicable
in various settings, from residential homes to commercial buildings. Its ability to manage
complex, nonlinear relationships between inputs and outputs highlights the potential for
broader implementation in modern HVAC systems.
20
OUTPUT:
Fig: Control Surface for Temperature, Electric Voltage and Compressor Speed
This control surface plot visually represents the relationship between temperature, electric voltage, and compressor speed in the
fuzzy logic AC controller. The three-dimensional surface illustrates how varying levels of temperature and electric voltage
influence the compressor speed. By analyzing this surface, the controller can determine the optimal compressor speed required
to maintain desired comfort levels under different environmental conditions. The smooth transitions across the surface
demonstrate the system’s ability to adapt its cooling capacity dynamically, ensuring efficient operation and enhanced user
comfort.
21
Fig: Control Surface for Temperature, Voltage and Mode of Operation
This control surface plot depicts the interaction between temperature, voltage, and the mode of operation in the fuzzy logic AC
controller. The three-dimensional representation illustrates how changes in ambient temperature and electric voltage levels affect
the selection of the operational mode, whether it be cooling, dehumidification, or ventilation. By examining this surface, the
controller can effectively determine the most suitable mode of operation based on current conditions. The continuous nature of
the surface highlights the system’s capability to transition smoothly between modes, optimizing both energy efficiency and
indoor comfort in response to fluctuating environmental factors.
22
Fig: Control Surface for Temperature, Voltage and Fin direction
This control surface plot illustrates the relationship between temperature, voltage, and fin direction in the fuzzy logic AC
controller. The three-dimensional surface demonstrates how varying levels of temperature and electric voltage influence the
direction in which conditioned air is directed, either towards or away from occupants. By analyzing this surface, the controller
can determine the optimal fin direction needed to maximize comfort based on real-time environmental conditions. The smooth
transitions observed across the surface reflect the system’s flexibility in adjusting air distribution, ensuring an effective cooling
experience tailored to the current indoor climate.
23
Fig: Control Surface for Temperature, Voltage and Fan Speed
This control surface plot visualizes the interaction between temperature, voltage, and fan speed in the fuzzy logic AC controller.
The three-dimensional representation showcases how changes in ambient temperature and electric voltage levels affect the fan
speed settings. By examining this control surface, the system can determine the appropriate fan speed required to enhance airflow
and cooling efficiency. The continuous nature of the surface indicates the controller’s ability to adaptively modulate fan speed,
ensuring optimal air distribution and comfort levels are maintained in response to varying environmental conditions.
24
7. CONCLUSION:
The fuzzy logic-based air conditioning (AC) control project successfully achieved its
primary objectives of enhancing indoor comfort, improving energy efficiency, and
demonstrating the effectiveness of intelligent control systems in HVAC applications.
By leveraging fuzzy logic principles, the project developed a robust controller capable
of adapting to varying environmental conditions through the dynamic adjustment of
key parameters, including compressor speed, fan speed, fin direction, and mode of
operation.
25
8. REFERENCES:
26
9. APPENDIX
27
28
29