Next Article in Journal
Hybrid Beamforming for Millimeter-Wave Heterogeneous Networks
Previous Article in Journal
Wireless Sensor Networks for Smart Homes: A Fuzzy-Based Solution for an Energy-Effective Duty Cycle
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Optimized Fuzzy Logic Control Model Based on a Strategy for the Learning of Membership Functions in an Indoor Environment

Department of Computer Engineering, Jeju National University, Jeju 63243, Korea
*
Author to whom correspondence should be addressed.
Electronics 2019, 8(2), 132; https://doi.org/10.3390/electronics8020132
Submission received: 21 October 2018 / Revised: 18 December 2018 / Accepted: 11 January 2019 / Published: 28 January 2019
(This article belongs to the Section Computer Science & Engineering)

Abstract

:
The Mamdani fuzzy inference method is one of the most important fuzzy logic control (FLC) techniques and has several applications in different fields. Despite its applications, the Mamdani fuzzy inference method has some core issues which still require solutions. The most critical issue is the selection of accurate shape and boundaries of membership functions (MFs) in the universe of discourse. In this work, we introduced a methodology called learning to control (LtC) to resolve the problem. The proposed methodology consisted of two main modules, namely, a control algorithm (CA) module and a learning algorithm (LA) module. In the CA module, the Mamdani FLC method has been used, whereas, in the LA module, we have used the artificial neural network (ANN) algorithm. Inputs into the ANN were the error difference between environmental temperature and the required temperature. The output of the ANN was the MF set to the FLC. Inputs into the fuzzy logic controller (FLC) were the error difference between environmental temperature and required temperature (D), and the output was the required power for the fan actuator. The purpose of the ANN was to tune the MFs of the FLC to improve its efficiency. The proposed learning-to-control method along with the conventional fuzzy logic controller method was applied to the data to evaluate the model’s performance. The results indicate that the proposed model’s performance is far better than that of conventional fuzzy logic techniques.

1. Introduction

Currently, user comfort in electric vehicles has grasped the attention of many researchers. The purpose is to provide passengers with a comfortable environment and a high-quality transportation service. Novel heating, ventilation, and air conditioning (HVAC) systems are needed to provide passengers with a comfortable environment in electric vehicles. With the help of a new artificial control method, passenger comfort in electric vehicles can be improved [1,2].
Fuzzy inference systems and artificial neural networks (ANNs) have drawn the attention of the researchers in different areas [3,4], such as consumer products [5], industrial process control [6], medical instrument control [7], information systems [8], decision-making systems, and many more. With time, applications of fuzzy logic systems and ANNs have increased, and it can solve the issue of tuning. The neural network (NN) has the potential to learn from given data. The fuzzy logic controller, on the other hand, can work with structural knowledge by using rules. The combination of an ANN and an FLC provides the possibility to solve the issue existing in the FLC [9].
Temperature is one of the critical parameters that contribute greatly to the passenger or occupant comfort in electric vehicles and buildings [10]. Thermal comfort represents the satisfaction level of individuals in the environment. Temperature control inside an electric vehicle is not an easy task if a passenger wishes to maintain the thermal comfort conditions inside the vehicle.
Currently, the fuzzy logic (FL) method has been widely used in several areas for different purposes [11]. Fuzzy logic and neural networks together have interested researchers in many areas of research [3,12]. The applications of fuzzy logic and the neural network are increasing tremendously in different fields such as consumer products [5] and industrial process control [12], risk index assessment [11], energy optimization [1], and so forth. Mostly, fuzzy logic control systems have been used where the exact mathematical model for controlling applications is unknown, but the behavior of the application can be identified based on the experience [13]. The ANN method is considered a regression technique which indicates a sophisticated nonlinearity between independent and dependent variables [14]. Researchers have deployed NNs to analyze various types of prediction problems in a variety of conditions. There are many types of ANN models, such as a feed-forward neural network (FFNN), a feed-forward back propagation neural network (FFBPNN), a recurrent neural network. In this work, we have used the FFBPNN because it is an efficient and straightforward method used by many authors for prediction purposes [15,16].
Several solutions have been proposed for energy consumption management in smart homes [1]. The energy optimization methodology comprises three main modules, namely, prediction, optimization, and control. Most of the research focuses on developing new prediction and optimization techniques to minimize energy consumption and maximize user comfort. However, control is the most critical part, and many researchers have ignored this aspect which can improve performance, ultimately contributing to system performance. The Mamdani fuzzy logic method has been used in most studies because it is a very simple, familiar, and effective method. The central problem in the Mamdani fuzzy logic method is that once the boundaries of the membership functions (MFs) have been defined, they remain fixed for the entire data.
In the proposed method, we introduced a new learning-to-control model based on the fuzzy logic controller (FLC) and neural networks. The determination of a membership function’s boundaries is a somewhat trial and error type of exercise, and the membership function’s boundaries play a critical role in the performance of the fuzzy logic controller. In the conventional fuzzy logic controller, the membership function has fixed boundaries which affect the performance of the fuzzy logic controller because, for a particular value, different membership functions provide different results. The proposed method has the capability of tuning the membership function boundaries with each value which improves the performance of the fuzzy logic controller regarding accuracy. The proposed model comprises a control algorithm (CA) module and a learning algorithm (LA) module. In the CA module, we used a Mamdani fuzzy logic controller (FLC) algorithm and, in LA module, we used the ANN. First, the ANN was trained using the historical data. Current environmental parameters were used as input into the LA module as well as into the CA module.
Similarly, the user-required set parameter values has been used as inputs into the LA module as well as into the CA module. We used different sensors in order to get the environmental parameter values. In the traditional fuzzy logic controller, there are no accurate mechanisms of membership function determination. The objectives of this study were to determine the MFs in the FLC accurately and to fulfill the passenger user comfort requirement in an indoor environment. The central problem in the conventional FLC is the accurate determination of the distribution of membership functions. In the conventional Mamdani FL, the determination of membership functions is carried out by experts, and once the membership function distribution has been determined, it remains fixed for the entire data. In this work, we used a neural network to recommend the best-suited membership function set to a Mamdani fuzzy logic controller. Another critical issue of the conventional Mamdani fuzzy logic controller (MFLC) is the accurate number of membership functions specification for a variable. To handle the problem of selecting the exact number of membership functions for a variable, we calculated the standard deviation (STD) of the data for the variables.
The rest of the paper is organized as follows: the related work is presented in Section 2, and the proposed learning-to-control model with a detailed explanation of its structure is presented in Section 3. In Section 4 and its subsections, the implementation, results, and discussion are elaborated. Finally, the conclusion is provided in Section 5.

2. Related Work

Several techniques have been used in different areas for different purposes based on fuzzy logic and machine learning algorithms. However, appropriate literature on fuzzy logic and neural network coupling for comfort index measurement is rarely available.
A hybrid model for indoor thermal comfort in an HVAC system was explained by Homod et al. [17]. They suggested a building model and a fuzzy logic configuration for achieving indoor thermal comfort in buildings. Collotta et al. [10] designed an approach consisting of fuzzy logic and a neural network. They used an ANN for temperature prediction and the predicted outputs as inputs into the fuzzy logic controller unit for HVAC management. Also, the optimization of the ANN was carried out by systematic computation of the embedding factors. The evaluation of the proposed technique was carried out using MATLAB. The FLC has been driven through the inside temperature predicted by the ANN, and it had the membership function dynamic adjustment capability. Gouda et al. [18] proposed a quasi-adaptive FLC for building control applications. They used an ANN for the prediction of inter-air temperature. They also designed the FLC which consisted of two inputs, the first being the difference between the user-set and indoor temperature and the second being the forecasted indoor temperature. Van Cleave and Rattan [12] proposed a method for the tuning of membership functions. The training of the learning module was carried out with training data, and the output of the proportional neuro-fuzzy controller was used for membership function adjustment. They used offline training. In the neuro-fuzzy controller, the ANN learning methods has been used for FLC membership function tuning. Solmaz et al. [19] suggested a technique based on an ANN for the hourly cooling prediction of vehicles. The calculation of cooling was carried out during the cool season in the southern region of Turkey. Many authors have used fuzzy logic and neural networks for thermal comfort prediction and optimization in electric vehicles. Beinarts [20] suggested a method based on FL for determining passenger comfort in electric vehicles. Ibrahim et al. [21] suggested a strategy for temperature and humidity control for the HVAC of electric vehicles. The proposed method was based on the FLC. Busl [2] designed a novel evolutionary algorithm and a simplified system model for increasing individual comfort and decreasing energy consumption in electric cars. The verification of the implementation was carried out on a thermal car interior simulation model.
Several researchers have proposed methods for membership function optimization. Zhang et al. [22] suggested a technique based on a genetic algorithm for automatic designing and tuning of MF factors of fuzzy logic. A comparison of the optimized FLC with the conventional FLC was carried out. The results showed that their proposed technique performed well as compared to the conventional FLC. Martínez-Marroquín et al. [23] proposed a model based on an ant colony algorithm (ACO) to optimize MF parameters of an FLC for finding the optimal intelligent controller for a wheeled mobile robot. Fang et al. [24] suggested a model based on particle swarm optimization (PSO) for MF tuning of a Mamdani FLC. A demonstration of the proposed model was carried out to show its effectiveness.
Different authors proposed different techniques for fuzzy logic controller optimization, energy consumption, and user comfort maximization. Membership functions play a crucial role in FLC performance, but there is no accurate method to determine appropriate membership functions. In this work, we used an ANN to determine accurate MFs for the FLC. The FLC tuned the MFs, which in turn helped to determine the perfect set of MFs. The accurate determination of membership function improved the system.

3. Proposed Model

The determination of a membership function’s boundaries is a somewhat trial and error type of exercise, and there is no accurate mechanism to determine membership boundaries in conventional fuzzy logic models. In the traditional FLC, once the boundary determination of membership functions has been carried out, it remains fixed for the entire data. Hence, if the determination of MF boundaries is not accurate, it can drastically affect the performance of the FLC. Thus, techniques to tune the FLC are required. To tackle these issues, we proposed a learning-to-control model. The proposed method uses the learning methods for membership function tuning. Figure 1 contains the recommended learning-to-control (LtC) model. It consists of two main modules, namely a control algorithm (CA) module, and a learning algorithm (LA) module. Current environmental parameters were used as input into the learning algorithm module as well as into the control algorithm module.
Similarly, the user-required set parameter values have been used as inputs into the LA module as well as into the CA module. We used different sensors in order to get the environmental parameter values.
A moderately detailed diagram of the proposed learning-to-control model is shown in Figure 2. The proposed model has been designed for temperature control in an indoor environment. First, we designed a learning-to-control model based on the Mamdani fuzzy logic method and an artificial neural network. The FLC module takes the error difference between environmental temperature and user-required temperature. The ANN takes the current temperature values from the environment, the required temperature values from the user, and the error difference between environmental temperature values and current temperature values as inputs. The ANN uses training data and selects the best membership functions for fuzzy logic. The environmental temperature values has been collected through a temperature sensor, and the user sets the required temperature value. The de-fuzzified output of the controller’s inference machine is the required power for the fan. The coordinator takes the output power as an input and sets the fan speed accordingly. The fan speed changes the environmental temperature. After a specific interval of time, the proposed model gets the same parameter values and performs operations accordingly.
Figure 3 contains a detailed description of the proposed generic model. In the proposed model, the ANN has been trained using historical data as discussed above. The error difference between the current temperature from the environment and the user-set temperature is the input of the fuzzy logic module. The fuzzy logic controller consists of three main modules: fuzzification, rules base, and defuzzification. The neural network module uses training data to provide the best-suited membership function set to the fuzzy logic module. According to the error difference values between environmental parameters and user-required parameters, the fuzzy logic module provides required power to the fan actuator. Next, after the actuators operate on the required environmental conditions, these parameter values are changed after a specific time, the environmental parameter and required parameter values have been entered into the fuzzy logic controller, the fuzzy logic takes the error difference between current parameter values and user-requested parameter values. The process repeats itself whenever specific changes in the environmental conditions occur.
Researchers have extensively used ANN models for prediction and recommendation in several areas. The ANN can be used for regression purposes to signify erudite nonlinearity between variables [25,26]. In the recent past, ANN methods have been used extensively to solve prediction problems in different fields. The ANN model used in this work is the feed forward neural network with error backpropagation; inputs into the neural network model are current temperature (Tk), required temperature (Tr), and the difference between environmental temperature and required temperature (D). The output of the ANN is the membership function (MF) set for the FLC module. The ANN algorithm has been trained on historical data where the inputs are previous temperature (Tp) from the environment, previous user-required temperature (Trp), and the difference of both (Dp), and their corresponding outputs are the MF sets.
The output of the fuzzy inference method is the required power (Pr) for the fan actuator, and the required power is then inputted into the coordinator. The coordinator adjusts the fan speed (Sp) according to the required power.
The ANN model combined with the error propagation algorithm (FFBPNN) is a prevalent ANN model for estimation and prediction [27,28]. It usually has three layers, namely, input, hidden, and output. In this work, three neurons in the input layer have been defined, one for each input. In the hidden layer, ten (10) neurons have been determined, and after using the trial and test method, it has been observed that ten (10) neurons in combination with the input and output layer neurons were well suited Finally, in the output layer, one neuron was defined. The structure diagram of the ANN for this work is illustrated in Figure 4.
The value of the hidden layer can be computed using Equation (1):
v j = ( 1 + exp ( 1 × i = 1 1 x i w ij ) ) 1 ,   j = 1 ,   ,   J ,
where v j represents the jth neuron in the hidden layer, x i represents the ith neuron in the input layer, and the weight between neurons is represented by wij. The output layer node value can be computed using Equation (2):
m = ( 1 + exp ( 1 × j = 1 j v j w ij ) ) 1 ,
where m represents the output layer node (in this research, only one output node was taken; later on, as per requirements, we can use multiple nodes as well). The error between actual and computed data has been calculated using Equation (3):
Err = 0.5 ( a m ) 2 ,
where a represents the actual data propagation from the output and hidden layers, as expressed in Equations (4) and (5), respectively.
δ y = ( a m ) ( 1 m ) ,
δ m = v j ( a v j ) ( 1 y ) δ m w j 1 ,   j = 1 , , J ,
The weight adjustment between layers can be carried out using Equations (6) and (7):
Δ w ij = α δ m v j ,   i = 1 , , I ;   j = 1 , , J ,
Δ w ij n = α δ m v j ,   j = 1 , , J ,
where α represents the learning rate and, additionally, momentum can be measured as Equations (8) and (9), respectively:
Δ w ij n = α δ m v j + β Δ w j 1 n 1 ,   j = 1 , , J ,
Δ w ij n = α δ m v j + β Δ w j 1 n 1 ,   i = 1 , , I ;   j = 1 , , J ,
where n indicates iterations of error backpropagation and β represents momentum constant. The training process in the flat region of the error surface avoids variations in the weights and has been accelerated using this momentum method. Usually, three types of membership functions can be used in the hidden and output layers of a multi-layer perceptron, namely, the linear, tang-sigmoid, and logarithmic sigmoid functions as represented in Equations (10)–(12), respectively.
χ ( x ) = linear   ( x ) ,
Φ ( x ) = 2 ( 1 + e 2 x ) 1 ,
ψ ( x ) = 1 ( 1 + e x ) .
The selection of the appropriate activation function in the hidden layer is usually carried out using the trial and error method; in the proposed method, different activation functions have been applied, such as tan-sigmoid, linear, and logarithmic, and so forth. The specification of the number of neurons in the hidden layer is also a somewhat trial and error type of exercise. To optimize the ANN structure, we used a different number of neurons in the hidden layer.
Table 1 illustrates the description of notations used in the formulation.
There are many types of FLC systems, the most essential being Mamdani, Tsukamoto, Sugeno, and Larsen. The most extensively used and common fuzzy inference method is Mamdani fuzzy logic which was suggested by Mamdani as mentioned in Klir and Yuan [29] for the steam engine and boiler combination. The Mamdani fuzzy inference system can be divided into many modules, namely, fuzzy knowledge-base, fuzzifier, inference engine, and de-fuzzifier. The combination of rules base and the database is referred to as the knowledge base. A rules base has IF-THEN rules, and the database contains fuzzy sets. The fuzzifier uses the MFs stored in the fuzzy knowledge base to convert the crisp input into a linguistic variable. Several types of membership functions can be used in Mamdani fuzzy logic, such as trapezoidal, bell-shaped, and so forth. In the suggested work, the triangular MFs has been used because they were the most common, efficient and straightforward MFs. Equation (13) shows the formula of a triangular membership function, where x represents the actual difference value, a is the lower bound, c is the upper bound, and b is the mid-point:
F ( a , b , c ) = { 0 , x m x m n m x m n p x p n n x p 0 p x } ,
The inference engine takes fuzzy values as input and uses IF-THEN fuzzy rules to convert the fuzzy inputs into the fuzzy outputs. For combination and implication operations, the “MIN” operator has been used, and for aggregating fuzzy outputs, we have used the “MAX” operator in Mamdani fuzzy logic. The de-fuzzifier converts the fuzzy output of the inference engine to crisp values which use MFs analogous to the ones used by the fuzzifier. The centroid of area method was used for defuzzification processes in this work, as shown in Equation (14). The structure diagram of the Mamdani fuzzy logic [30,31] is shown in Figure 5.
z = μ A ( z ) · zdz μ A ( z ) dz
In this work, the tuning of the MFs was carried out in order to get better results when compared to the conventional Mamdani FLC method where the MFs are fixed. The tuning of MFs is a very necessary step in order to improve the fuzzy logic controller’s performance. Membership functions having different distributions are given in Table 2.
In order to get the membership degree values of the same membership function having different distribution values, we put the above distribution in Equation (1) as given below.
F ( 5 ,   2 ,   4 ,   6 ) = 6 5 6 4 = 1 2 = 0.5 , F ( 5 ,   1 ,   4 ,   7 ) = 7 5 7 4 = 2 3 = 0.6 , F ( 5 ,   2 ,   4.5 ,   7 ) = 7 5 7 4.5 = 2 2.5 = 0.8 .
Hence, it is a very necessary step to determine appropriate membership function distribution values in order to get accurate results for a system. In this work, the ANN algorithm was used to tune the membership function boundaries of the FLC method.
Another critical issue of the conventional Mamdani fuzzy logic controller (MFLC) is the accurate number of membership functions specification for a variable. In order to handle this problem, we used the standard deviation (STD). First, the standard deviation [32] of the data of a variable has been calculated, and according to that standard deviation value, the number of membership functions for a variable has been specified. The formula for standard deviation is given in Equation (15):
STD   ( σ ) = 1 N k = 1 n ( x x ¯ ) 2 ,
where x represents the observed values, x ¯ represents the arithmetic mean values, and N is the number of observations. In this work, the error between the environmental temperature and required temperature has been used as input into the Mamdani FLC. First, the standard deviation of the input variable difference has been calculated which is equal to 2.56988 (°C). According to this variation, seven (7) membership functions for input variables were defined for the difference (error between user-set temperature and environmental temperature) as well as for the output variable power. The abbreviations EL, VL, L, M, H, VH, and EH were defined for the input variable difference as well as for the output variable power (P), which represented extremely low, very low, low, medium, high, very high, and extremely high, respectively. In this work, a full structure Mamdani fuzzy inference controller has been used, and to specify the number of rules in a fuzzy logic method, Equation (16) can be used [32]:
R = M v ,
where M indicates the number of membership functions and v represents the number of input variables. As in the proposed Mamdani fuzzy logic, there is only one input variable, and nine (9) membership functions have been defined for that input variable. Hence, the total number of rules in the proposed method is equal to 10 1 = 10 . The rules used in the proposed LtC model are shown in Table 3.
In this work, the difference between environmental temperature and required temperature was used to calculate the output power (P) for the fan using the proposed learning-to-control model. Therefore, the output of the fuzzy logic controller was power; however, because the fan speed had to be optimized, some mathematical work was done for the fan speed calculation using power. The mathematical formulas as shown in Equations (17)–(19) were used to calculate the speed from the power provided by fuzzy logic:
P i = F i   ( D i ) ,
S pi = P i C 1 ,
T k + 1 = T k ( EI i + C 2 ) ,
where D i represents the difference between the current temperature and required temperature, F i represents fuzzy logic, and P i represents power generated through fuzzy logic. S pi represents the speed of the fan, T k represents current temperature, C 2 represents the difference between maximum P i value and maximum D i value, and EI i represents environmental impact which can be calculated as in Equation (20):
EI i = S pi × C 1 ,   i = 1 ,   ,   N ,
where C 1 is any constant number, the C 1 is changing environmental impact when the fan rotates, and N is the number of observations. Similarly, for the summer season, Equations (17), (18) and (20) can be used, but for Equation (21) some modifications are required in Equation (19):
T k + 1 = T k + ( EI i + C 2 ) .
For the performance evaluation of the proposed LtC model, we used mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE), which are represented in Equations (22)–(24):
RMSE = 1 N k = 0 n ( A i E i ) 2 ,
MAE = 1 N i = 1 n | T i E i | ,
MAPE = 1 N i = 1 n | T i E i i | T i × 100 ,
where N indicates the number of observations, A is the actual value, and E is the estimated values.

4. Implementation, Simulation Results, and Discussion

4.1. Implementation

The implementation of the proposed learning-to-control model was carried out on an Intel(R) Core (TM) i5-3570 CPU @ 3.40 GHz with MATLAB 2010a installed on it. The fuzzy logic implementation of fuzzy rules, rule viewer, rules editor, and membership function was carried using the fuzzy logic toolbox. The neural network implementation was also carried out in MATLAB. The implementation process continued by specifying the number of neurons in the input layer, hidden layer, and output layer, respectively. In this work, we have used three inputs into the ANN, namely, the difference (D), current environmental temperature, and required temperature. Hence, three neurons have been defined for the input layer, one for each input. The number of neurons in the hidden layer was defined later, using a trial and error mechanism, and one neuron has been defined for the output layer. The configuration model for the ANN is shown in Figure 6. For the suitable ANN model, different hidden layer activation functions have been tried. Similarly, different training functions and output layer transfer functions were applied. To achieve the best combination of the number of hidden layers with an input layer, an output layer, and various activation, training, and transfer functions, we tried a different number of neurons in the hidden layer, starting from 5 to 40.
After training the neural network, we then carried out the implementation of Mamdani fuzzy logic module in our proposed learning-to-control model. The input into the neural network was the difference between the current environmental temperature and the user-set temperature. In this work, nine (9) membership functions according to Equation (1) has been defined. The input/output membership functions are represented in Figure 7, where the x-axis indicates the universe of discourse and the y-axis indicates the membership degree in [0, 1] interval. In this work, triangular membership functions have been considered. The type of membership function depends on the number of MFs. In the proposed method, 10 MFs has been used, which is a considerable number. MFs with nonlinear borders (e.g., Gaussian, trapezoidal, sigmoidal) are suitable to be considered if the number of MFs is small, but we used triangular membership functions.

4.2. Results

The current temperature values are shown in Figure 8a, the required temperature values are shown in Figure 8b, and the error difference between the current temperature and the required temperature values is shown in Figure 8c.
The input data used in the proposed method, namely, the error difference between environmental temperature and the required temperature, the current temperature from the environment, and the required temperature from the user, are shown in Figure 8.
In this work, we needed to indicate a relationship between different parameters: the learning-to-control (LtC) model produced the power, but we had to adjust the fan speed (rpm) according to that power. The relationship between difference and power is illustrated in Figure 9a. The relationship between speed and power is illustrated in Figure 9b. The relationship between speed and environmental temperature is shown in Figure 9c.
For the next step, the comparison between the current temperature and the required temperature was carried out. First, we compared the environmental temperature and required temperature after a 15-minute interval of the fan rotating as shown in Figure 10a. Figure 10b shows the required temperature and environmental temperature after a one-hour interval of the fan rotating. The blue line indicates the required temperature from user and the green line indicates the environmental temperature in Figure 10a and Figure 10b respectively for 15-minutes interval and one-hour interval.
To measure the performance of the proposed algorithm, the RMSE, MAE, and MAPE have been used. The results of the proposed LtC model have been compared with the conventional FLC. The same data and same procedure have been used in the conventional FLC as for the LtC model. The RMSE value of the proposed model was 2.5852, while the conventional FLC’s MAE value was 0.3850, MSE value was 0.2129, and MAPE value was 2.548. Similarly, for the conventional fuzzy logic control method, the MAE, MAPE, and RMSE values were 2.0008, 5.7077, and 2.2451, respectively. The results indicate that the proposed LtC model’s performance is better when compared to the conventional FLC method. The mean square error’s given value is far better than that of the conventional FLC.
The most important advantage of the proposed approach is that it enhanced the performance (regarding accuracy) of the conventional Mamdani fuzzy logic method by defining accurate membership function boundaries using a neural network. The proposed model is also generic and can be used in different areas for different purposes. The proposed learning-to-control model also has some disadvantages, such as the fact that it required historical data for training and that its computation time was high than for the conventional Mamdani fuzzy logic method due to the learning module.

5. Conclusions and Future Work

In this work, we proposed a novel model called the learning-to-control (LtC) model. The idea of the LtC model has been developed because of certain bottlenecks in the conventional FLC. The determination of the suitable membership function distribution in conventional fuzzy logic is a critical issue which affects the system’s performance. In the proposed model, a new module called the learning module has been added to the conventional FLC for membership function tuning. Hence, the suitable membership function distribution has been assigned to a value which brings a specific improvement to the system performance. The proposed model has been deployed on simulated data that have been taken from related papers. The proposed learning-to-control model is a generic model that can be applied to different areas for controlling purposes. The proposed model has been compared with the conventional Mamdani fuzzy inference method. The results indicate that the performance of the proposed LtC model is better when compared to the conventional FLC method. The mean square error’s given the value is far better than that of the conventional FLC.
In future work, we would like to compare the proposed approach with other control methods. We also plan to deploy the proposed LtC method in our energy consumption minimization and user comfort maximization work for controlling purposes.

Author Contributions

M.F. designed, implemented the proposed method and also did experimental work and paper writing. I.U. assisted in writing review and results analysis. D.K. conceived the overall idea of learning to control model, and supervised the work.

Funding

This work was supported by Institute for Information & communications Technology Promotion (IITP) grant funded by the Korea government (MSIT) and MSIT(Ministry of Science and ICT), Korea, under the ITRC (Information Technology Research Center).

Acknowledgments

This work was supported by Institute for Information & communications Technology Promotion(IITP) grant funded by the Korea government (MSIT) (No.2018-0-01456, AutoMaTa: Autonomous Management framework based on artificial intelligent Technology for adaptive and disposable IoT), and this research was supported by the MSIT(Ministry of Science and ICT), Korea, under the ITRC (Information Technology Research Center) support program(IITP-2017-2016-0-00313) supervised by the IITP (Institute for Information & communications Technology Promotion). Any correspondence related to this paper should be addressed to Dohyeun Kim.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Fayaz, M.; Kim, D.H. Energy Consumption Optimization and User Comfort Management in Residential Buildings Using a Bat Algorithm and Fuzzy Logic. Energies 2018, 11, 161. [Google Scholar] [CrossRef]
  2. Busl, M. Design of an Energy-Efficient Climate Control Algorithm for Electric Cars. Master’s Thesis, Department of Automatic Control, Lund University, Lund, Sweden, 2011. [Google Scholar]
  3. Asakawa, K.; Takagi, H. Neural Networks in Japan. Commun. ACM 1994, 37, 106–112. [Google Scholar] [CrossRef]
  4. Von Altrock, C.; Krause, B.; Zimmerman, H.J. Advanced Fuzzy Logic Control Technologies in Automotive Applications. In Proceedings of the IEEE International Conference of Fuzzy Systems, San Diego, CA, USA, 8–12 March 1992. [Google Scholar]
  5. Shao, S. Fuzzy self-organizing controller and its application for dynamic processes. Fuzzy Sets Syst. 1988, 26, 151–164. [Google Scholar] [CrossRef]
  6. Culliere, T.; Titli, A.; Corrieu, J. Neuro-Fuzzy Modeling of Nonlinear Systems for Control Purposes. In Proceedings of the IEEE International Conference on Fuzzy Systems, Yokohama, Japan, 20–24 March 1995; pp. 2009–2016. [Google Scholar]
  7. Bridgett, N.; Brandt, J.; Harris, C. A Neuro-Fuzzy Route to Breast Cancer Diagnosis and Treatment. In Proceedings of the IEEE International Conference on Fuzzy Systems, Yokohama, Japan, 20–24 March 1995; pp. 641–648. [Google Scholar]
  8. Kruse, R.; Gebhardt, J.; Palm, R. (Eds.) Fuzzy-Systems in Computer Science; Vieweg: Braunschweig, Germany, 1994. [Google Scholar]
  9. Werbos, P.J. Neurocontrol and Fuzzy Logic: Connections and Design. Int. J. Approx. Reason. 1992, 6, 185–220. [Google Scholar] [CrossRef]
  10. Collotta, M.; Messineo, A.; Nicolosi, G.; Pau, G. A dynamic fuzzy controller to meet thermal comfort by using neural network forecasted parameters as the input. Energies 2014, 7, 4727–4756. [Google Scholar] [CrossRef]
  11. Fayaz, M.; Ullah, I.; Park, D.H.; Kim, K.; Kim, D. An integrated risk index model based on hierarchical fuzzy logic for underground risk assessment. Appl. Sci. 2017, 7, 1037. [Google Scholar] [CrossRef]
  12. Van Cleave, D.; Rattan, K.S. Tuning of fuzzy logic controller using neural network. In Proceedings of the Proceedings of the IEEE 2000 National Aerospace and Electronics Conference (NAECON 2000) Engineering Tomorrow (Cat. No.00CH37093), Dayton, OH, USA, 12 October 2000. [Google Scholar]
  13. Fayaz, M.; Ullah, I.; Kim, D.-H. Underground Risk Index Assessment and Prediction Using a Simplified Hierarchical Fuzzy Logic Model and Kalman Filter. Processes 2018, 6, 103. [Google Scholar] [CrossRef]
  14. Khosravani, H.R.; Castilla, M.D.M.; Berenguel, M.; Ruano, A.E.; Ferreira, P.M. A comparison of energy consumption prediction models based on neural networks of a bioclimatic building. Energies 2016, 9, 57. [Google Scholar] [CrossRef]
  15. Kalogirou, S.A. Artificial neural networks in energy applications in buildings. Int. J. Low-Carbon Technol. 2006, 1, 201–216. [Google Scholar] [CrossRef]
  16. Fayaz, M.; Kim, D.H. A Prediction Methodology of Energy Consumption Based on Deep Extreme Learning Machine and Comparative Analysis in Residential Buildings. Electronics 2018, 7, 222. [Google Scholar] [CrossRef]
  17. Homod, R.Z.; Sahari, K.S.M.; Almurib, H.A.F.; Nagi, F.H. RLF and TS fuzzy model identification of indoor thermal comfort based on PMV/PPD. Build. Environ. 2012, 49, 141–153. [Google Scholar] [CrossRef]
  18. Gouda, M.M.; Danaher, S.; Underwood, C.P. Quasi-adaptive fuzzy heating control of solar buildings. Build. Environ. 2006, 41, 1881–1891. [Google Scholar] [CrossRef]
  19. Solmaz, O.; Ozgoren, M.; Aksoy, M.H. Hourly cooling load prediction of a vehicle in the southern region of Turkey by Artificial Neural Network. Energy Convers. Manag. 2014, 82, 177–187. [Google Scholar] [CrossRef]
  20. Beinarts, I. Fuzzy logic control method of HVAC equipment for optimization of passengers’ thermal comfort in public electric transport vehicles. Eurocon 2013. [Google Scholar] [CrossRef]
  21. Ibrahim, B.S.K.K.; Aziah, M.A.N.; Ahmad, S.; Akmeliawati, R.; Nizam, H.M.I.; Muthalif, A.G.A.; Toha, S.F.; Hassan, M.K. Fuzzy-based temperature and humidity control for HV AC of electric vehicle. Procedia Eng. 2012, 41, 904–910. [Google Scholar] [CrossRef]
  22. Zhang, H.-X.; Wang, F.; Zhang, B.O. Genetic optimization of fuzzy membership functions. In Proceedings of the 2009 International Conference on Wavelet Analysis and Pattern Recognition, Baoding, China, 12–15 July 2009. [Google Scholar]
  23. Ricardo, M.-M.; Castillo, O.; Soria, J. Optimization of membership functions of a fuzzy logic controller for an autonomous wheeled mobile robot using ant colony optimization. In Evolutionary Design of Intelligent Systems in Modeling, Simulation and Control; Springer: Berlin/Heidelberg, Germany, 2009; pp. 3–16. [Google Scholar]
  24. Fang, G.; Kwok, N.M.; Ha, Q. Automatic fuzzy membership function tuning using the particle swarm optimization. In Proceedings of the 2008 IEEE Pacific-Asia Workshop on Computational Intelligence and Industrial Application, Wuhan, China, 19–20 December 2008; Volume 2. [Google Scholar]
  25. Neto, A.H.; Fiorelli, F.A.S. Comparison between detailed model simulation and artificial neural network for forecasting building energy consumption. Energy Build. 2008, 40, 2169–2176. [Google Scholar] [CrossRef]
  26. Wahid, F.; Ghazali, R.; Fayaz, M.; Shah, A.S. Statistical features based approach (SFBA) for hourly energy consumption prediction using neural network. Int. J. Inf. Techno.Comput. Sci. 2017, 9, 23–30. [Google Scholar] [CrossRef]
  27. Wahid, F.; Ghazali, R.; Shah, A.S.; Fayaz, M. Prediction of energy consumption in the buildings using multi-layer perceptron and random forest. IJAST 2017, 101, 13–22. [Google Scholar] [CrossRef]
  28. Wahid, F.; Ghazali, R.; Fayaz, M.; Shah, A.S. A simple and easy approach for home appliances energy consumption prediction in residential buildings using machine learning techniques. J. Appl. Environ. Biol. Sci. 2017, 7, 108–119. [Google Scholar]
  29. Klir, G.; Yuan, B. Fuzzy Sets and Fuzzy Logic; Prentice Hall: Upper Saddle River, NJ, USA, 1995; Volume 4. [Google Scholar]
  30. Lee, C.-C. Fuzzy logic in control systems: Fuzzy logic controller. I. IEEE Trans. Syst. Man Cybern. 1990, 20, 404–418. [Google Scholar] [CrossRef]
  31. Ullah, I.; Fayaz, M.; Kim, D. Analytical Modeling for Underground Risk Assessment in Smart Cities. Appl. Sci. 2018, 8, 921. [Google Scholar] [CrossRef]
  32. Fayaz, M.; Ahmad, S.; Ullah, I.; Kim, D. A Blended Risk Index Modeling and Visualization Based on Hierarchical Fuzzy Logic for Water Supply Pipelines Assessment and Management. Processes 2018, 6, 61. [Google Scholar] [CrossRef]
Figure 1. Conceptual learning-to-control model.
Figure 1. Conceptual learning-to-control model.
Electronics 08 00132 g001
Figure 2. Learning to fuzzy logic control model for temperature control in an indoor environment.
Figure 2. Learning to fuzzy logic control model for temperature control in an indoor environment.
Electronics 08 00132 g002
Figure 3. Detailed processing diagram of the learning-to-control model.
Figure 3. Detailed processing diagram of the learning-to-control model.
Electronics 08 00132 g003
Figure 4. Structure diagram of the artificial neural network (ANN) in our proposed learning-to-control model.
Figure 4. Structure diagram of the artificial neural network (ANN) in our proposed learning-to-control model.
Electronics 08 00132 g004
Figure 5. Structure diagram of Mamdani fuzzy logic used in this work.
Figure 5. Structure diagram of Mamdani fuzzy logic used in this work.
Electronics 08 00132 g005
Figure 6. ANN configuration model for this work.
Figure 6. ANN configuration model for this work.
Electronics 08 00132 g006
Figure 7. Membership functions for Mamdani fuzzy controller: (a) input difference (D) and (b) output power (P).
Figure 7. Membership functions for Mamdani fuzzy controller: (a) input difference (D) and (b) output power (P).
Electronics 08 00132 g007
Figure 8. (a) Current temperature, (b) required temperature, and (c) the error difference between the current temperature and the required temperature.
Figure 8. (a) Current temperature, (b) required temperature, and (c) the error difference between the current temperature and the required temperature.
Electronics 08 00132 g008
Figure 9. Relationship: difference between (a) current temperature and required temperature, (b) speed and power, and (c) speed and next temperature.
Figure 9. Relationship: difference between (a) current temperature and required temperature, (b) speed and power, and (c) speed and next temperature.
Electronics 08 00132 g009
Figure 10. Proposed model results for the environmental temperature and the required temperature.
Figure 10. Proposed model results for the environmental temperature and the required temperature.
Electronics 08 00132 g010
Table 1. Description of notations used in the formulation.
Table 1. Description of notations used in the formulation.
NotationDescription
TrRequired Temperature
DChange Between Environmental Temperature and User-Required Temperature
TkCurrent Environmental Temperature
FLCFuzzy Logic Controller
MFsMembership Functions
FISFuzzy Inference System
PrRequired Power
STDStandard Deviation
Tk+1Next Environmental Temperature
SpFan Speed
PPower
EIEnvironmental Impact
CAControl Algorithm
LALearning Algorithm
LtCLearning to Control
TTemperature
Table 2. Membership functions with different distributions.
Table 2. Membership functions with different distributions.
TableDistribution
MF(1, 4, 6)
MF(1, 4, 7)
MF(1, 3.75, 6.5)
Table 3. Fuzzy rules for the temperature fuzzy controller.
Table 3. Fuzzy rules for the temperature fuzzy controller.
Temperature Fuzzy Rules
If (D = = EVL) then P = EVL
If (D = = EL) then P = EL
If (D = = VL) then P = VL
If (D = = L) then P = L
If (D = = LM) then P = LM
If (D = = M) then P = M
If (D = = H) then P = H
If (D = = VH) then P = VH
If (D = = EH) then P = EH
If (D = = EVH) then P = EVH
P: Power, D: Difference.

Share and Cite

MDPI and ACS Style

Fayaz, M.; Ullah, I.; Kim, D. An Optimized Fuzzy Logic Control Model Based on a Strategy for the Learning of Membership Functions in an Indoor Environment. Electronics 2019, 8, 132. https://doi.org/10.3390/electronics8020132

AMA Style

Fayaz M, Ullah I, Kim D. An Optimized Fuzzy Logic Control Model Based on a Strategy for the Learning of Membership Functions in an Indoor Environment. Electronics. 2019; 8(2):132. https://doi.org/10.3390/electronics8020132

Chicago/Turabian Style

Fayaz, Muhammad, Israr Ullah, and DoHyeun Kim. 2019. "An Optimized Fuzzy Logic Control Model Based on a Strategy for the Learning of Membership Functions in an Indoor Environment" Electronics 8, no. 2: 132. https://doi.org/10.3390/electronics8020132

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop