{'fraction_non_alphanumeric': 0.022288261515601784, 'fraction_numerical': 0.012092022339498899, 'mean_word_length': 4.668893406912576, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fuzzy logic based fan controller of indoor air purifier fan

Received Jul 14, 2019 Revised Sep 12, 2019 Accepted Sep 26, 2019 Indoor air purifier (IAP) has been developed by various companies worldwide to address indoor air pollution. The manufacturers of these air purifiers rarely concentrate in controlling the rotation speed of the fan which results in the use of traditional control techniques wherein some still relies on human intervention. In this paper, Fuzzy Logic (FL) was applied to control the rotation speed of the fan of an indoor air purifier. The system automatically maintains a suitable fan speed based on the fuzzy values generated on the current environmental condition. The series of testing conducted using the system showed a very high accuracy in the interpretation of dust concentration to its equivalent Air Quality Index (AQI) levels of health concern. For each detected AQI, the system was able to regulate the voltage coming into a motor that controls the speed of the fan. The usage of the fuzzy logic fan controller in the indoor air purifier fan reduced the energy consumption by 41.67%.


INTRODUCTION
The World Health Organization (WHO) assessment on the range of risk factors about the common global diseases revealed that 2.7% was caused by indoor air pollution. Indoor air pollution was tagged as a major global killer that doubles the risk of pneumonia, acute lower respiratory infection, chronic obstructive pulmonary disease and lung cancer. Moreover, Environmental Protection Agency (EPA) estimated that people spend ninety percent of their time in an indoor environment and so, they are likely to accumulate more pollutants since indoor air is hundred times more polluted than the outside air.
Many companies worldwide have developed indoor air purifiers to address indoor air pollution. These air purifiers exhibit different features that were deemed useful for its purpose. However, there are only a few manufacturers that concentrate on controlling the rotation speed of the fan. Most air purifiers consist of a fan used to absorb and circulate air into the device. The fan is one of the key components of an air purifier because of its crucial role in inducing air flow through the device filter to capture particles and gases. According to EPA, air purifiers with a fan is typically much more effective than those units without a fan.
Studies that were conducted to control the rotation speed of the fan of an air purifier used sensors such as air quality sensor with proximity and odor sensor [1]; PM2.5 detector with smoke density sensor, temperature sensor and humidity sensor [2,3]; and infrared sensor [4] to purify the air faster based on the varying condition in the environment. While these existing air purifiers are already sold in the market, none have used FL in controlling the rotation speed of the fan of an air purifier. FL decision system resembles human thinking [5][6][7][8] and provides linguistic rules that are accurate in dealing with uncertainties, ambiguous and imprecise input information. The fuzzy mathematical concept is easier to understand and simpler compared to other control strategies. The fuzzy system can be made through the experience of people 1267 that knows the system to match any set of input and output data [9]. FL also provides an unorthodox way in dealing a control problem, and it focuses more on what a system could do rather than understanding how it works that lead to quicker and cheaper solutions [10]. Moreover, FL system minimizes energy consumption [11]. The rotation speed of the fan of existing indoor air purifiers is usually preset and constant which is sometimes unnecessary and may cause waste of electrical energy. To address this problem, a fuzzy logic based fan controller of indoor air purifier fan was developed. The rotation speed of the fan depends on the concentration of dust particle present in the air which is guided by fuzzy rules. A dust sensor was used to get the micrograms per cubic meter (ug/m3) of PM2.5 dust particles that were translated to its equivalent AQI values defined by EPA. The FL algorithm enabled the indoor air purifier fan to become self-adaptable. This algorithm analyzed the most suitable fan rotation speed in purifying the air to conserve energy. Also, the controller had a unique feature in which the sensing module was wireless and can be placed anywhere in a room for optimum detection of dust particles.

RESEARCH METHOD
The fuzzy logic based fan controller of indoor air purifier fan were composed of electronic and mechanical devices such as microcontrollers, dust sensor, transceiver, servo motor, voltage regulator and electric motor as presented in the block diagram shown in Figure 1. Two microcontrollers were used to facilitate the interaction between the various parts of the system. In the first microcontroller, a dust sensor was connected. The value of dust particles processed by the first microcontroller was presented through Light-Emitting Diodes (LED) which was composed of six different colors that respresents the levels of health concern. The sensor served as a detector for dust particles present in the indoor environment. A transceiver connected to the first microcontroller sent wirelessly this detected dust particles value to another transceiver connected to the second microcontroller. The servo motor connected to the second microcontroller was used in rotating the voltage regulator dimmer knob to control the voltage being supplied to the motor of the fan. To fully cut off any voltage flowing in into the regulator, a relay was connected to the voltage regulator.

Microcontroller
The Arduino Uno is the best board to choose when starting in the field of electronics [12,13] because it has much documentation. Users can tinker their Arduino Uno board free from worries when something might go wrong. The Arduino Uno is an inexpensive and cross-platform ready microcontroller. The open source Arduino IDE [14][15] used in writing codes for this microcontroller is not only flexible for advanced users but also easy-to-use for beginners.
The 14 digital I/O pins of the Arduino Microcontroller were adequate for the fuzzy logic based fan controller of indoor air purifier fan that only used six digital pins. The Arduino Uno was also compatible with the sensor that was utilized in the system. Its processing power and memory were enough to analyzed processed inputs from the sensors.

Dust Sensor
The DSM501a is a low cost particle sensor. It detects dust concentration and measures volume of floating particles in a room. The sensor can have a detectable range of concentration up to 0 -1.4μg/m 3 and detects particles as small as 2.5μm to 1μm such as house dust, germ, pollen, cigarette smoke, and mite.
The DSM501a was ideal for the fuzzy logic based fan controller of indoor air purifier fan because it was easy to assemble, install, and use. The sensor had a customized sensitivity and excellent long-term reliability. The amount of time (t sec.) that particles were seen was counted by the sensor. This amount of time, also called LPO (Low Pulse Occupancy), was measured in 30 seconds and its unit was microseconds. This was required to get the dust sensor low ratio (1) which was used in the computation of the pollutant concentration (2). (1) (2)

Transceiver
The Multi-channel UHF Data Transceiver (MUDT) in Figure 4 is a small device that both transmits and receives radio signals between two devices. In embedded system, wireless communication with other devices is often desirable. This mode of communication is accomplished through optical or radio frequency communication. The MUDT uses a radio frequency with a range of 431.1 -437.3 MHz. The frequency channel of MUDT can be altered by connecting a jumper at the select port. The channel selection allows each module channels with 400 kHz separation.
The MUDT was used to wirelessly connect the dust sensor into the fuzzy logic based fan controller of indoor air purifier fan. This enabled the system to comply on the technical recommendation in using the sensor wherein, it must be installed away from any artificial air. The MUDT had a wide range and only required a 5V operating voltage which worked well with the Arduino Uno microcontroller.

Voltage Regulator
A Silicon-Controlled Rectifier (SCR), in essence, is a Shockley diode with the addition of a terminal. This terminal also called 'the gate' is used as a triggering device into conduction (solid state latching switch) by applying small voltage. The SCR regulator is both very simple and efficient and is mainly used to control high powered devices.
The 220V working voltage of the SCR regulator is the AC voltage standard used in the Philippines. This made it suitable for regulating the voltage of the fuzzy logic based fan controller of indoor air purifier fan. The regulator controlled the power coming from the AC source and fed it into the motor. The regulator is the key component that controllled the rotation speed of the fan of the indoor air purifier.

Electric Motor
The electrical motor is one of the most significant achievements in the fields of engineering and technology since electricity was invented. It is because of motors that life is currently what it is in today's generation. Without electric motors, the purpose of electricity would only to glow bulbs like in Thomas Edison's era.
The electric motor was used in the development of the fuzzy logic based fan controller of indoor air purifier fan for its efficiency, long life span, low initial cost, and low maintenance requirements. The operational motor speed was adjustable and demanded less power upon start. It was mounted with a propeller that is commonly used by a fan to absorb and circulate air into an indoor air purifier.

Project Design and Specification
The schematic diagram of the fuzzy logic based fan controller of indoor air purifier fan shown in Figure 2 had two parts: the dust detector and the fan controller. The dust detector of the system was composed of Arduino Uno microcontroller, dust sensor, and transceiver. The pin 2 of the dust sensor was connected to the digital pin 6 of the Arduino Uno. The TX and RX of the transceiver that was used as the transmitter were connected to the TX (digital pin 1) and RX (digital pin 2) of the microcontroller, respectively. The LEDs which was composed of five different colors (green, white, yellow, orange, blue and red) having a 220 ohms resistor that was connected to the digital pin 8, 9, 10, 11, 12 and 13 of the microcontroller, respectively, was used as indicator of AQI level. The 5V and GND of the Arduino Uno microcontroller, dust sensor, transceiver, and LEDs were commonly connected to the VCC and GND of a 9V battery.
The fan controller part of the system had five components which include microcontroller, transceiver, servo motor, LEDs, voltage regulator and relay. The TX and RX of the transceiver that was utilized as the receiver were connected to the TX (digital pin 1) and RX (digital pin 2) of the microcontroller, respectively. The pin 3 of the servo motor was connected to the digital pin 11 of the microcontroller. The pin 1 and pin 2 of the voltage regulator was connected to the 220V source and into the normally closed terminal 1269 of the relay while the pin 3 and pin 4 were connected to the motor. The relay signal pin was connected to the digital pin 12 of the microcontroller. The 5V and GND of the Arduino Uno microcontroller, receiver, servo motor, and relay were commonly connected to the VCC and GND of a 12V power supply.

Air Quality Index
Air Quality Index is an indicator for determining an air quality level. In the system, only the PM2.5 was detected and translated to its equivalent AQI level of health concern based on the PM2.5 AQI conversion scale of EPA shown in Table 1. This conversion scale is now used in all countries since September 9, 2013. It is used in the calculation of AQI using the equation, where: I = Air Quality Index, C = concentration, Clow = concentration breakpoint that is less than or equal to C, Chigh = concentration breakpoint that is greater than or equal to C, Ilow = index breakpoint corresponding to Clow, Ihigh = index breakpoint corresponding to Chigh.

Fuzzy Logic Fan Control
In the study, fuzzy logic was utilized to control the rotation speed of the fan of an indoor air purifier. A fuzzy inference was formulated using Matlab to map the given input to an output. The structure of the fuzzy inference is shown in Figure 3. It was composed of one input and one output. The input was the computed AQI while the output was the input voltage (Vin) to the motor of the fan. The fuzzy sets for the input were M (moderate), USG (unhealthy for selected groups), U (unhealthy), VU (very unhealthy), and H (hazardous). This was based on the AQI level of health concern shown in Table 1. The good category was not included since the fan of the indoor air purifier will not rotate unless an AQI of more than 50 was detected. This was the reason why the range of the input was 51 to 500. On the other hand, the fuzzy sets for the output were VL (very low), L (low), A (average), H (high), and VH (very high). The output was between 60 and 240 because the required minimum input voltage for the motor of the fan to start rotating was 60V while the maximum input voltage was 240V. Figure 4 and Figure 5 shows the normalized membership function (MF) of the input variable and output variable, respectively. The rules indicated in Figure 6 were defined to determine the output value based on a given input value. The calculation of the input voltage to the motor of the fan was done using the Mamdani Model. Mamdani model is one of the foremost algorithms used in fuzzy logic [16] which has widespread acceptance. The output was converted to crisp numbers by defuzzification using the centroid method as shown in Figure 7. The centroid method is a common technique of defuzzification used in fuzzy logic systems.
The crisp output generated from the defuzzication process with their equivalent initial crisp input was written to the Arduino code. This code dictated how the system would respond based on the computed AQI.

Pearson Correlation Coefficient
Pearson's Correlation Coefficient produces a value between -1 and +1 as presented in Table 2. It is utilized in research for measuring strength of relationship of one variable to another variable.  In the study, Pearson's Correlation Coefficient was used to measure how strong the relationship between the input voltage from the defuzzification and the actual input voltage to the motor of the fan during the testing. To calculate the correlation which was represented as r, the formula (4) below was used: (4) where: n = number of samples ∑ = sum of the products of paired voltage ∑ = sum of expected voltage ∑ = sum of actual voltage ∑ 2 = sum of squared expected voltage ∑ 2 = sum of squared actual voltage

RESULTS AND ANALYSIS
This section presents the fuzzy logic based fan controller of indoor air purifier fan as well as the results gathered from testing the system. Figure 8 shows an indoor air purifier where the system developed was tested. The dust detector shown in Figure 9 is located outside the indoor air purifier. It is detachable so that it can be placed anywhere inside a room. This feature was not included in previous studies related to air purifiers [2,3,17,18] that have an embedded dust detector. The dust detector displayed the color representation of AQI level using the LEDs: green, white, yellow, orange, blue and red which signifies good, moderate, unhealthy for sensitive group, unhealthy, very unhealthy and hazardous, respectively. The color representation indicated the health concern to raised awareness about the air quality in the indoor environment. The fuzzy logic fan controller shown in Figure 10 is detachable. It was designed this way to make it portable and applicable to any indoor air purifiers.  Figure 9. The dust detector Figure 10. The fan controller

Interpretation of Air Quality
The ability of the system to accurately interpret the AQI to its corresponding level of health concern was verified using a data logger temporarily connected in the microcontroller of the system. The dust detector was placed in the kitchen to detect the amount of dust concentration within the place. The accumulated amount of dust was converted to AQI value and interpreted to its equivalent health concern.
The expected interpretation of level of health concern using the AQI to PM2.5 conversion scale and the actual interpretation of system based on the computed AQI is presented in Table 3. The result shows that the system accurately interprets the AQI to its equivalent levels of health concern with a success rate of 100%. The result in translating the level of health concern signifies the precision of the system in interpreting the PM2.5 to the six AQI levels of health concern. The levels of health concern represented by colored LEDs is helpful to individuals since they will have visual information about the quality of air in the room. This feature of showing the indoor air quality has not been implemented yet in any indoor air purifiers [17,18].

Purification Time of the System
The system adapts to the change in indoor air quality and efficiently purifies the surrounding air which something that previous inventions [2,[19][20][21][22] lack. Table 5 presents each level of health concern with the number of occurrences and the total time it occurred for 8 hours. The number of occurrences of a particular level of health concern indicates that at certain times, the condition of air in the room is in this state. The Good level has the greatest percentage of the total time which means that the system was capable of keeping the air healthy most of the time.

Energy Consumption Using the Fuzzy Logic Based Fan Controller of Indoor Air Purifier Fan
The energy consumption of the system was measured using an electric meter in 3 days. The meter reading is recorded at 11:30 am and 7:30 pm. Energy consumption of the indoor air purifier with the fuzzy logic fan control as shown in Table 6. The energy consumption was initially tested with the maximum input voltage of 240 volts to the motor of the fan without using the fuzzy logic based fan controller of indoor air purifier fan. The energy consumption in 3 days without using the system was 1.2 kWh. This shows that with the fuzzy logic fan controller on an indoor air purifier fan, energy consumption can be reduced by 0.5 kWh. The adaptive characteristics of fuzzy logic in reducing the energy consumption was appropriate in air purifier just like other related studies that used fuzzy logic [23][24][25].

CONCLUSION
The fuzzy logic based fan controller of indoor air purifier fan accurately interprets the measured PM2.5 concentration into its equivalent AQI levels of health concern. The measured input voltage of the motor followed the crisp out from the defuzzification. The system was able to maintain the air quality in For further enhancements of the present invention, the proponents suggests changing the voltage regulator and servo motor into a dimmer circuit to more accurately set the input voltage to the fan of an indoor air purifier. Also, the analog potentiometer of the voltage regulator should be replaced with digital potentiometer for better control on the resistance through digital signal instead of mechanical movement.