AUTOMATIC FAN CONTROL IN SMART HOME
WITH TSUKAMOTO FUZZY LOGIC METHOD
1st Muhammad Farhan
Departemen of Informatics Engineering
Universitas 17 Agustus 1945 Jakarta
Jakarta, Indonesia
Abstract — Smartphone users are increasing day by day, method, and Mamdani method. On method stukamoto every
but few of them are getting the most out of their smartphones consequent represent with fuzzy set whose membership
have. Where if you use your smartphone to its full potential, function watch. Output the results of each inference rule is z,
there are lots of things you can do on your smartphone,
the final result is obtained by using the weighted average.
including: is home control, where the house can be controlled
remotely, or turn the house into a smart home. Smarthomes
Sugeno method The resulting output is not a fuzzy set but
are often called smart homes, smarthomes are also very rather in the form of constants or linear equations. As for the
important in everyday life. Where house guarding or house Sugeno method, there are 2 models Sugeno method, namely,
control can be done remotely. So the homeowner doesn't have zero order Sugeno method and first order sugeno method. In
to provide it home security services. Fuzzy Logic is a problem the mamdani method The resulting implications are in the
solving methodology with thousands of applications in form of min, whereas composition rules in the form of max,
controllers stored and information processing. Suitable for mamdani method The resulting inference is in the form of
implementation in simple, small, embedded systems fuzzy numbers, then first a value must be determined
microcontroller, multi-channel PC or workstation based data
specific crisp as the output value.
acquisition and control system.
B. Smarthome
Keywords: Fuzzy Logic ,smarthome, smartphone
Smarthome consists of two words, namely smart and home
I. INTRODUCTION which means smart home. Smarthome too has another
meaning, namely a house equipped with lighting or heating
Smarthome is a house or building which is equipped with a
that can be regulated or controlled by smartphones [1].
microcontroller system can be accessed remotely using
Smarthome was first created by Scottish company in 1975.
smartphone or laptop, from security to control of furniture
Information exchange on smarthome for the first time via
that can be made more interactive. Smartphones are a form
cable that uses numerical language. Along with the
the latest developments in telephone technology wireless.
development of smarthome technology utilize the internet
Smartphones are also equipped with processor, memory, and
network as a medium exchange of information.
other equipment more sophisticated like the technology
found in computer or laptop. We often hear about theft C. Smartphone
occurring At home, house fires are caused by negligence Smartphone or often also called Android is a Linux-based
The homeowner, for example, forgot to lock the door or turn operating system which includes the middlware operating
off the stove fire so that this can be done cause losses to system. On In 2005 Google collaborated with android.inc
homeowners. With applying the fuzzy logic method in company in California, America Union. Google wants to
control smarthome uses a smartphone so The house can be dominate the telephone market cellular by collaborating
controlled from anywhere with connected to the internet with android.inc and Android as the operating system In
network. As for The advantage of the fuzzy logic method is 2007 Google introduced One type of GSM smartphone is
fuzzy logic have tolerance for data that is not fixed, highly the Nexus One with the Android operating system. Google
flexible, and capable of modeling very complex non-linear too owns the patent for the smartphone application then the
functions. Fuzzy logic can also be used as shows to what smartphone was produced by HTC Corporation.
extent the value is true and to what extent where the value is
false [1]. D. Fuzzy Tsukamoto
Fuzzy Tsukamoto Method The Tsukamoto method is a
II. THEORETICAL
fuzzy inference system that produces crisp outputs for each
A. Fuzzy Logic rule by using monotonic membership functions. The process
Fuzzy logic or fuzzy logic is something method used in involves fuzzifying inputs into linguistic terms, evaluating
determination analysis. Determination using fuzzy logic is rules to determine the degree of truth for each antecedent,
capable of map an input space into a space output without and calculating the rule outputs as crisp values using
ignoring existing factors. There are several methods in fuzzy monotonic membership functions. The final output is
logic solutions, namely, the Tsukamoto method, Sugeno obtained by aggregating these crisp outputs, typically using
a weighted average, making the method particularly useful D. Fuzzy Flow and Implementation
in control systems requiring precise outputs. This method
simplifies the defuzzification process, as the outputs are
inherently crisp, avoiding the need for an additional step.
III. SYSTEM DESIGN
A. Hardware
The hardware in the automatic fan includes the fan,
temperature sensor, microcontroller, relay module, and
power source. The temperature sensor sends data to the
microcontroller, which controls the fan through relays based
on the measured temperature, to keep the ambient
temperature stable [15].
B. System Design
This device is designed to adjust the fan speed based on
the temperature measured by the DHT11 sensor. The
temperature data received will be processed by the ESP8266 The explanation of fuuzy's logic flow above is :
microcontroller. In the microcontroller, fuzzy logic using the 1. Fuzzification is a process that converts input data with
Sugeno method is applied, which then processes the crisp values into fuzzy input in the form of linguistic
temperature input to regulate the fan speed as an output [6]. values, which are determined based on certain
membership functions.
2. Inference is the stage where reasoning is carried out
using fuzzy input and predefined fuzzy rules, producing
outputs in fuzzy form.
3. Defuzzification is a process that converts fuzzy outputs
into crisp values based on predefined membership
functions, to obtain results that can be understood and
applied concretely.
C. Flowchart E. Fuzzy Logic Implementation
A flowchart serves as a guide for designing programs by The application of fuzzy logic in smart home systems is
showing the sequence of instructions to be applied [16]. This used to control the speed of an automatic fan. This fan
device, which uses a microcontroller with a DHT11 sensor functions to circulate and remove air based on temperature
and a motor driver, is installed at a specific location to and humidity readings. Fuzzy logic dynamically regulates the
collect data from the sensor and send it to a database [2]. fan speed according to the received data, ensuring optimal
Here is the flowchart of the system : fan performance for environmental comfort [17].
The membership graph depicts the interpretation of
temperature from the DHT11 sensor in categories to
determine actions. The image below is a function graph
membership function of the DHT11 sensor in the room to
reading the temperature
F. Membership Function
The fan rotation speed is determined based on a
combination of criteria from the temperature data read by
the DHT11 sensor [17]. The following parameters refer to
the temperature measured by the DHT11 sensor. There are
two membership categories used as the basis for rule
generation. The temperature magnitude received by the
sensor will affect the defuzzification result, which further
determines the rotating speed of the fan based on the data
The membership graph illustrates the interpretation of provided by the sensor [18].
humidity from the DHT11 sensor in categories to determine Fuzzification is the process of converting a strict value
action. The image below is a membership function graph of into a fuzzy set form in a fuzzy logic system. This process
the function of the DHT11 sensor in the room against the maps strict data into degrees of membership in fuzzy sets
humidity reading using fuzzification operators, thus allowing the system to
handle uncertain or ambiguous information [19].
a. Rule
Rule evaluation is a decision-making process that uses
“if...then” rules to connect input and output fuzzy
variables. At this stage, the fuzzification results are
checked, and if there is an 'OR' operator, the output value
is the minimum value of the condition. If there is an 'OR'
operator, the output value is the maximum value of the
condition [20]. The membership functions of room
temperature and number of people have five functions
using categories VS (Very Slow), S (Slow), M
(Medium), F (Fast) and VF (Very Fast). Here are the 25
rules used in Sugeno's fuzzy method, which are integral
in drawing conclusions and making decisions based on
the principles of fuzzy logic.
IV. IMPLEMENTATION
In this study, tests were conducted to assess the accuracy
of the DHT11 temperature and humidity sensor in an
automatic fan system [6]. The sensor measurement results
will be compared with data from other measuring
instruments to ensure accuracy. In addition, the conformity
of the fan system output with the predefined fuzzy rules will
be evaluated.
A. Testing the DHT11 Sensor
DHT11 sensor testing aims to compare the temperature
and humidity measurement results with data from other
measuring instruments, such as thermometers and to
determine the error value of the DHT11 sensor reading. This
test uses environmental data from the room to ensure the
accuracy and effectiveness of the automatic fan speed
regulation system.
This project developed an automatic fan system that
connects online with ESP and Firebase, and can be controlled
through a mobile application created in MIT App Inventor.
Using ESP8266 for internet connection, the system sends
sensor data such as temperature to Firebase in real-time.
Firebase then controls the fans through relay modules
according to the specified conditions. Users can monitor and
control the fan remotely through a mobile app, increasing
convenience and efficient control in the management of Fuzzy Logic Testing
home devices. Fuzzy logic testing on the system is done by providing
varying temperature values. This data is processed by the
microcontroller and the results are compared with manual
calculations using Excel to verify the accuracy of the
system.
From the tests conducted, all outputs generated from five
separate trials were consistent with the established fuzzy
rules. This indicates that the system performs effectively in
detecting inputs and producing outputs that align with the
predefined fuzzy rules.
B. Defuzzyfikasi
The defuzzification stage is the final step in the Sugeno
fuzzy process, where the fuzzy output is converted into a
crisp value that can be implemented. In the automatic fan
system, this stage ensures that the result of the fuzzy
calculation is converted into a concrete and implementable
fan speed, according to the provided program code [21].
V. CONCLUSION [9] D. Restyo Nugroho, H. Harliana, and A. C. Fauzan,
The automatic fan system using Sugeno fuzzy method “Penerapan Algoritma Fuzzy Sugeno Dalam
can effectively adjust the fan speed based on the temperature Menentukan Keputusan Guru Berprestasi Di SMKS
and humidity of DHT11 sensor, improving comfort and Roudlotun Nasyiin,” J. Autom. Comput. Inf. Syst.,
energy efficiency. The fuzzification, inference, and vol. 3, no. 2, pp. 127–136, 2023, doi:
defuzzification processes work together to dynamically 10.47134/jacis.v3i2.63.
adjust the fan speed. The test results show stable and [10] H. Nasution, “Implementasi Logika Fuzzy pada
accurate system performance [22]. Compared to Sistem Kecerdasan Buatan,” ELKHA J. Tek. Elektro,
conventional control, the Fuzzy IF-THEN Rules method is vol. 4, no. 2, pp. 4–8, 2020, [Online]. Available:
more effective and preferred, although fuzzy values such as https://jurnal.untan.ac.id/index.php/Elkha/article/vie
linear index of fuzziness and fuzzy entropy do not always w/512%0Ahttp://
match user preferences. Conventional control is less download.garuda.kemdikbud.go.id/article.php?
responsive to changes in environmental conditions [23]. article=1559615&val=2337&title=Implementasi
Logika Fuzzy pada Sistem Kecerdasan Buatan
VI. REFERENCES [11] M. Alowaidi, “Fuzzy efficient energy algorithm in
[1] C. Pramartha, I. B. A. I. Iswara, I. P. G. H. Suputra, smart home environment using Internet of Things
and I. B. G. Dwidasmara, “Digital Humanities: for renewable energy resources,” Energy Reports,
Prototype Development for Balinese Script,” Lect. vol. 8, pp. 2462–2471, 2022, doi:
Notes Comput. Sci. (including Subser. Lect. Notes 10.1016/j.egyr.2022.01.177.
Artif. Intell. Lect. Notes Bioinformatics), vol. 12642 [12] R. Maulana, M. H. H. Ichsan, and G. E. Setyawan,
LNCS, no. semnasIF, pp. 205–214, 2021, doi: “Implementasi Pengkondisian Kipas dan Lampu
10.1007/978-3-030-73043-7_17. Otomatis Menggunakan Logika Fuzzy,” J.
[2] R. Zohara Shoma, S. Noertjahjono, and J. Dedy Pengemb. Tek. Inf. dan Ilmu Komput., vol. 2, no. 11,
Irawan, “Penerapan Logika Fuzzy Untuk pp. 5301–5309, 2018.
Pengendalian Kualitas Udara Pada Ruangan [13] W. Robson, I. Ernawati, and C. Nugrahaeni,
Smoking Area Dengan Mikrokontroler,” JATI “Perancangan Sistem Kendali Kipas Otomatis
(Jurnal Mhs. Tek. Inform., vol. 4, no. 1, pp. 287– Multisensor Dengan Logika Fuzzy,”
294, 2020, doi: 10.36040/jati.v4i1.2356. Repository.Upnvj.Ac.Id, pp. 1–11, 2019, [Online].
[3] S. K. Singh et al., “a Survey and Study of Different Available:
Types of Pwm Techniques Used in Induction Motor https://repository.upnvj.ac.id/6930/16/ARTIKEL
Drive,” no. 1, pp. 18–22, 2014. KI.pdf
[4] Y. N. I. Fathulrohman and A. Saepuloh, “Alat [14] R. Rizky, Z. Hakim, A. M. Yunita, and N. N.
Monitoring Suhu Dan Kelembaban Menggunakan Wardah, “Implementasi Teknologi IoT (Internet of
Arduino Uno,” Jumantaka, vol. 02, no. 1, p. 1, 2018, Think) pada Rumah Pintar Berbasis Mikrokontroler
[Online]. Available: ESP 8266,” J. Teknol. Inf., vol. 4, no. 2, pp. 278–
https://jurnal.stmik-dci.ac.id/index.php/jumantaka/ar 281, 2020, doi: 10.36294/jurti.v4i2.1452.
ticle/view/361 [15] C. Yohanes Oraplean, J. Dedy Irawan, and D.
[5] M. A. Al Karomi, “Fuzzifikasi Data untuk Rudhistiar, “IMPLEMENTASI LOGIKA FUZZY
Normalisasi Atribut dalam Perhitungan Algoritma PADA SISTEM MONITORING SUHU TERNAK
K-Nearest Neighbour,” IC-Tech, vol. 13, no. 2, AYAM PETELUR BERBASIS WEB,” 2021.
2018. [16] F. Wahab, A. Sumardiono, A. R. Al Tahtawi, and A.
[6] F. Z. Rachman, “Smart Home Berbasis Iot,” Snitt, F. A. Mulayari, “Desain dan Purwarupa Fuzzy
pp. 369–374, 2017, [Online]. Available: Logic Control untuk Pengendalian Suhu Ruangan,”
http://jurnal.poltekba.ac.id/index.php/prosiding/artic J. Teknol. Rekayasa, vol. 2, no. 1, p. 1, 2017, doi:
le/view/423 10.31544/jtera.v2.i1.2017.1-8.
[7] H. Thendean and M. Sugiarto, “Penerapan Fuzzy If- [17] A. ALGIFARI, “PERANCANGAN KIPAS ANGIN
Then Rules Untuk Peningkatan Kontras Pada Citra PENGATUR SUHU DAN KELEMBABAN
Hasil Mammografi,” J. Inform., vol. 9, no. 1, pp. 1– RUANGAN DENGAN METODE FUZZY
7, 2009, doi: 10.9744/informatika.9.1.1-7. SUGENO BERBASIS ARDUINO,” 2018.
[8] N. I. Widiastuti and R. Susanto, “Kajian sistem [18] M. N. Taukid, I. Elzandy, A. P. Adyani, and ...,
monitoring dokumen akreditasi teknik informatika “Program Pengendali Kipas Angin Berdasarkan
unikom,” Maj. Ilm. UNIKOM, vol. 12, no. 2, 2014, Suhu dan Kelembaban Menggunakan Logika
doi: 10.34010/miu.v12i2.28. Fuzzy,” Pros. Semin. …, vol. 3, pp. 42–52, 2023,
[Online]. Available:
http://santika.upnjatim.ac.id/submissions/index.php/
santika/article/view/186%0Ahttp://
santika.upnjatim.ac.id/submissions/index.php/
santika/article/download/186/90
[19] R. Ruuhwan, R. Rizal, and I. Karyana, “Sistem
Kendali dan Monitoring Pada Rumah Pintar UNTUK BUDIDAYA JAMUR,” vol. 2, pp. 5–10,
Berbasis Internet of Things (IoT),” Innov. Res. 2019.
Informatics, vol. 1, no. 2, pp. 43–50, 2019, doi:
[22] H. Chen, A. Wisnujati, and A. M. Widodo, “The
10.37058/innovatics.v1i2.877.
Internet of Things ( IoT ) for Automatic Control
[20] D. Rifai and F. Fitriyadi, “Penerapan Logika Fuzzy Mobile Based on Fuzzy Sugeno Method,” UEU J.,
Sugeno dalam Keputusan Jumlah Produksi Berbasis pp. 66–76, 2021.
Website,” Hello World J. Ilmu Komput., vol. 2, no.
[23] M. Monita and H. Hendri, “Sistem Kontrol Rumah
2, pp. 102–109, 2023, doi:
Pintar Menggunakan Kamera Berbasis IoT,” JTEIN
10.56211/helloworld.v2i2.297.
J. Tek. Elektro Indones., vol. 2, no. 1, pp. 107–112,
[21] A. A. Setiamy and E. Deliani, “IMPLEMENTASI 2021, doi: 10.24036/jtein.v2i1.141.
METODE FUZZY SUGENO PADA SISTEM
PENGENDALI SUHU DAN KELEMBABAN