Abstract
A substantial amount of scientific research and publications in the smart home domain deal with different aspects of fuzzy logic application. However, we feel there is a general lack of complex modelling done of the whole smart home environment. So, the main goal of this paper is threefold: 1) to present a virtual model of a smart home environment to be intellectualized, 2) to demonstrate the efficiency of Mamdani type inference procedure in modelling of intellectual behaviour of the environment and 3) to show that it is possible to minimize the quantity of fuzzy rules by taking the hierarchical approach and adding the Takagi-Sugeno inference procedure to empower it. The results of computerized modelling and simulation are delivered in the paper demonstrating the practical viability and efficiency of the theoretical approach. The model of the intelligent home environment was used in two projects. Since a formalized analytical method for evaluating the sensitivity of system parameters still does not exist, the experimental sensitivity simulation in our case is performed and presented in this paper. Characteristics obtained in the modelled virtual environment can be easily expanded and used in a real home environment by changing pixels into real coordinates and the light intensity into other real variables.
Keywords
Introduction: Related works and the goal of the paper
As can be seen from a large number of state-of-the-art research initiatives and publications in the sphere of intelligent home environments, fuzzy logic remains an important technique in various applications. The extent of research in this area stems from smart home applications that control lighting [1–5], energy savings [6–8], home security [9, 10] and healthcare monitoring systems [11]. A lot of attention is also devoted to the development of fuzzy-based systems for prediction of users’ behavior and recognition of their activity [12–21], assessing context awareness [22, 23] and other services [24]. So, because of their nature and applicability, fuzzy systems show great potential and yield promising results in dealing with many real-life problems. The advantages of these systems are grounded by practical implications of the research community: fuzzy systems are fairly comprehensible and considerably easy to design; control systems that use fuzzy logic are generally fast and memory efficient, as well as economically-effective in terms of realization costs. Most of the abovementioned publications conclude that experimental results obtained during research verify the feasibility of fuzzy systems in solving home environment related tasks, as well as the accuracy of the obtained results. However, these methods usually follow the typical fuzzy system development process. This process is based on expert knowledge in rule set creation and membership function definition, which might become undesirably complex and time consuming as the number of rules is subject to the specifics of certain applications and solvable tasks. Furthermore, complexity diminishes interpretability of fuzzy systems, forcing a trade-off between accuracy and interpretability [25]. This is especially common in the domain of smart environments. A smart home environment is usually non-determined; the variety of substantive tasks is followed by uncertainty, imprecise or incomplete information, as well as different user preferences, sometimes leading to conflicting situations. These issues must be considered while creating a reliable solution, regardless of its primary purpose and solvable tasks.
The most important problem that needs to be solved in order to make fuzzy-based smart environment applications even more computationally effective is to reduce rule sets. One of the approaches to reduce the complexity of the fuzzy rule base is presented in [27]. The method is based on minimization of logic, i.e. removal of logical redundancies. The authors have tested their approach on six classification benchmarks and the acquired results show that the percentage of complexity reduction ranges from 41.8% to 97.9% . Another work [28] presents a technique to automatically estimate corresponding parameters for method of reduction of the sensory fusion rule base. The parameters of the sensory fusion method were successfully found. The proposed algorithm was simulated with the inverted pendulum control system, reducing the amount of rules from 625 to 5, yet it was still sufficient enough to control a 4-th order system effectively [28]. Current rule reduction issues are also relevant in the smart home environment domain, as the number of sensors used in such environments is usually quite large, often connected to wireless sensor networks, and generate huge amounts of data. Defining the rules for actions associated with sensor data would lead to an undesirable size of rule sets, thus the authors in [29] suggested relating actions to actions in order to identify relevant associations between them, so that irrelevant aspects of the rules or even some rules could be removed. This allowed to reduce the number of rules by 91% . Similar rule set reduction results are presented in [26]. As stated by the authors, the optimization phase not only helped the authors to reduce the size of the rule base and enhanced the overall system performance; it also helped to extract the most significant attributes of the behavior of users. According to the published results, the elimination of irrelevant attributes led to substantial reduction in size of the rule base up to 99.65 % .
Summarizing the review of the most popular research publications [1–29], we have discovered that different aspects of fuzzy logic applications are thoroughly investigated. However, we feel a lack of complex modelling of the whole smart home environment in general. So, the main goal of this paper is threefold: 1) to present a model of a smart home environment to be intellectualized, 2) to demonstrate the efficiency of Mamdani type inference procedure [30] for intellectual behavior of the environment and 3) to show that it is possible to minimize the large list of fuzzy rules by taking the hierarchical approach and adding the Takagi-Sugeno inference procedure [31, 32] to empower it.
Preliminaries
General structure of the functional organization system is presented in Fig. 1. The denoted HE component represents the home environment to be intellectualized, while FDMS denotes the elements for the fuzzy analysis of environmental situations and decision making.
The FDMS –a fuzzy decision making system –is built according to a typical fuzzy controller structure. Here, NORM stands for a block of normalization of parameter x, F –a block of fuzzification, IF-THEN –a block of fuzzy rules and inference, DF –a block of defuzzification that performs one or several actions A in the home environment HE. Usually, a home environment is subjected to user’s personal wishes (PW) and to the random nature influence and changes (NAT). All event and situation changes that take place in a home environment are collected and stored in a specialized data base (DB) that is further analyzed and evaluated by a special expert system and/or by certain experts (ES). The results of this analysis serve as data for the creation of reasonable terms to verbalize the environmental parameters (x) and to produce a list of IF-THEN type inference rules. The dotted line emphasizes a possibility (if it is necessary) to influence or even change the shapes of F terms and IF-THEN rules automatically and in an online mode.
The multipurpose hardware-software framework has been created (Fig. 2) for the development of different smart home environment structures. It facilitates the work of researchers by enabling them to model and simulate different situations, scenarios and cases.
The development process of the artificially intellectualized home environment solution can be divided into three major phases. In the first phase, user’s requirements and information about the environment are gathered in order to define the specifications of the fuzzy system. Based on the specification of the requirements, the FuzzyTECH tool is used to design a fuzzy system by defining input/output terms and fuzzy rules. In the second phase, home environment simulation is performed with a multipurpose environment simulation tool BIASim. This tool allows to simulate the environment by placing various environment objects, including things (furniture), sensors, controlled devices and humans into a 2D graphical user interface area. The position and properties of each environmental object can be modified and recorded, making it possible to replay the scenario and capture the behavior of thesystem. In order to perform intellectual decision-making in BIASim, a decision model needs to be provided. BIASim is a multipurpose tool designed to support different decision models. It also allows dynamic activation of any decision model developed: a fuzzy logic (FL) based decision model, neural network decision model, Bayes decision model and any other decision models developed according to certain specifications of an abstract BIASim decision model. BiatechFuzzyLib is a fuzzy decision model which builds a Mamdani and/or Takagi-Sugeno inference system dynamically based on input/output terms and rules defined in the first phase. Decision-making in BIASim tool is based on iterations: events during which a decision is made by the decision model. A decision model based on FL is connected to the BIASim environment with inputs and outputs, where inputs are connected to the BIASim sensors and outputs are connected to the BIASim devices (e.g. a light switch). Different real life scenarios can be simulated using a FL-based decision model and the BIASim tool that enables to capture the behavior of a decision-making system. It can then be validated under the requirements in advance of actual implementation in the third phase. Transition from the second phase to the third phase is not complicated: FL-based decision model is reused on the hardware platform where the inputs of the decision model read real environment sensors and the outputs are connected to the control of actuators.
The modeling framework proposed in this paper plays a significant role not only in the simulation itself, but in the process of implementation of the system according to the needs of the user and industrial requirements for a concrete application area. The general idea of the universality of the modelling system under consideration and its integration into the design process can be seen and elaborated through the simulation environment proposed, implemented and used in the framework of the BIATech project (Fig. 3) [33]. Here, a simplified modelling block called BIAsim is presented as a significant element in the modelling and development of the system for the whole smart home environment.
The significance of BIAsim can be clearly seen in the results of a generalized analysis of the whole development process of the intellectualized home environment. Usually, a team (a) of users, professionals and IT people get together, discuss and prepare a set of requirements (b) to be formalized (c) and presented in the form of a special type of user cases (UC) and a matrix (d) with functional requirements (FR) of the system. At the same time, an analogous UC/FR matrix must be created. It serves as information necessary to produce a virtual home environment (f) that the user and IT experts are able to model, visualize and simulate in a 3D-coordinate system where all effects and consequences of any changes of the requirements can be observed. The prototypes of “shelf ready” software and hardware artefacts used for the intellectualization of a smart home environment are selected from the data base (DB) and transferred to a virtual multi-agent system (MAS) (g) that can later be implemented in a real MAS (h) used for direct control of an intellectualized smart home environment [34].
Experimentation results
A room with two working places (personal work areas) WP1 and WP2, each equipped with a table and a halogen lamp (L1, L2) represent the experimental model of the HE. The light intensity of the lamp is controlled by FDMS with changeable voltage. Actions A1 and A2 produced by FDMS serve as signals to increase or decrease the voltage of the lamps. The light intensity (expressed in lx) in each working place was measured by corresponding sensors (S1, S2). The structure of HE and FDMS is presented in Fig. 4.
Different personal wishes (PW) of two users (ID1 and ID2) were taken into account. The users (ID1 and ID2) prefer entirely different levels of light intensity at their work areas. The users can also use the room either separately or together. The positions of the users in the room are defined by an X-Y coordinate system. Concrete values of the coordinates (XID1, YID1 and XID2, YID2) and concrete values of light intensities on each table of the corresponding WP (s1, s2) are measured in the HE and supplied into FDMS where appropriate actions of the system (A1 and A2) are further determined. Actions are determined using the Mamdani type IF-THEN rule set and the center of gravity (CoG) defuzzification procedure [30]. Figure 5 represents the framework of these rules.
The terms defined by an expert and used for the fuzzification of input values (antecedents) and for the defuzzification of actions (consequents) are presented in Fig. 6.
The total number of rules N used in this simulation experiment is determined by the following formula: N = n[XID1]×n[YID1]×n[XID2]×n[YID2]×n[s1]×n[s2] = 2×5×2×5×5×5 = 2500.
The functionality of the described model was tested with a FuzzyTech 5.72c software package. A simplified fragment of the model is delivered in Appendix A. The provided example reveals two important aspects of the proposed method: 1) the viability of our approach for the simulation of an artificially intellectualized home environment, and 2) the unpleasant presence (even a curse) of an abnormal number of rules.
As noted in the introduction section of this paper, there are several rule reduction methods [26–29]. Some of them are very efficient, however, in our view they are overly artificial, highly specific (suitable only for a specific problem under investigation) and require too much additional effort to implement.
Here, we present a new method to minimize the number of rules. This new approach is based on a hierarchical description of the situation. The hierarchy covers increasing knowledge of the events occurring in the home environment to be intellectualized.
The experimental model of the HE is created to investigate a furnished room and its users who have their own personal requirements concerning the light intensity in their personal work areas (working places). For example (Fig. 7), the investigation of the situation in the room starts from the following question: “Is any of the ID1 or ID2 in, or are they both in?” Once a crisp answer to this question is received, a question concerning user’s (ID) fuzzy position X, Y and the level of light intensity s1, s2 must be investigated. The inference engine uses one or the other minimized set of rules to make a certain decision. The selection of a proper set of rules is usually made in the following hierarchical fuzzy blocks: ID1 fuzzy position set; ID2 fuzzy position set; ID1 and ID2 fuzzy position set. The branching rules in these blocks are activated by Takagi- Sugeno inference procedures [30]. Decisions made according to the Takagi- Sugeno inference procedure activate one of the 16 blocks from a set of fuzzy decision rules that function on the base of Mamdani procedures.
In the case under investigation, each set of Mamdani rules that are on the lowest hierarchical level (see “Set of fuzzy decision rules” in Fig. 7) contains 25 rules that must satisfy personal wishes of both users concerning light intensity s1 and s2 in a certain situation (determined according to the highest value of Takagi-Sugeno rules). The set of Takagi-Sugeno rules in the block “ID1 fuzzy position set” and “ID2 fuzzy position set” contains 10 rules each, and “ID1 and ID2 fuzzy position set” contains 100 rules. All in all, there are 520 rules (25×16+10+10+100 = 520). So, the method of hierarchical construction of rules enables to decrease the number of rules by 4.8 times.
For a better understanding, examples of the two sets of rules are presented in Fig. 8a, b. The list of Takagi-Sugeno type rules that correspond to the terms shown in Fig. 6 and are introduced in the block “ID2 fuzzy position set” is presented in Fig. 8a. There, the THEN part of those rules serves as an activator of the corresponding set of Mamdani rules:
ID2-WP1, ID2-Mid, ID2-WP2 and Far. The THEN part itself for the r-th rule is determined as follows:
(r) IF XID2 = a r and YID2 = b r THEN z r = K r μ(a r )×μ(b r ) for ∀r,
and GO TO has to be chosen according to the maxz _ r _ ∀ r.
Here, μ(*) is the membership function of the corresponding value, K r –positive weight coefficient that emphasizes the significance of the r-th rule.
Figure 8b presents one set of Mamdani type rules (ID2-WP2) from the lowest hierarchical level “Set of fuzzy decision rules”.
Different light intensity levels were considered during the simulation experiment: 300–340 lx was regarded as an appropriate level near the work area of user ID2, and 220–260 lx –near the work area of user ID1. The whole simulation experiment was performed on the multipurpose hardware-software framework shown in Fig. 2. An illustrative fragment of the simulation based on the lists of the aforementioned rules is presented in Appendix B. Two different situations are shown in these two Figures: 1) when the user ID2 is near the WP2 (XID2 = 155, YID2 = 305), the light intensity (measured by the sensor S2 = J403) near his work area is s2 = 302.38 lx and corresponds to user’s wishes; 2) when the user ID2 is far from the WP2 (XID2 = 160, YID2 = 400), then the light intensity is s2 = 50 lx, as it is determined in the rule lists. In our case, 50 lx is considered as a low light intensity (Dark).
During the experimental simulation, the performance of all 520 rules was tested with good results. A separate investigation was devoted to test the sensitivity of the system to the changes of parameters.
It is quite understandable that this sensitivity is predetermined and depends on the entire system of features and characteristics of the variables and their terms, as well as the terms of the defuzzification procedures. Unfortunately, a formalized method for analytical sensitivity evaluation does not exist to this day. The results of the experimental sensitivity simulation as seen in our case are presented in Fig. 9.
Simulation results delivered in Fig. 9a–d demonstrate that the FDMS, operating on the basis of fuzzification terms shown in Fig. 6, is able to guarantee the following values in terms of sensitivity of the system:
Δx = 4–7 pixels, Δy = 4–7 pixels and Δs2 = 3-4 lx.
Such sensitivity values are observed if we measure the corresponding distance between two neighboring peaks in Fig. 9a, b that determine the decision changes in the cases of Δx and Δy, and if we measure the points of interaction of the ΔA2 with the horizontal lines (0.5 and −0.5) that mark the thresholds of rounded values of output terms that determine decision changes during the defuzzification (Fig. 9d).
Data obtained from the virtual environment can be easily expanded and used in real home environments by changing pixels into real coordinates and the light intensity into other real variables under investigation.
The highest degree of sensitivity is expected in those intervals of changing variables where the number of terms, the neighboring crossing points and the precision of the output terms for defuzzification is higher. So, it is clearly evident that the degree of sensitivity is higher when the degree of fuzziness is lower.
Conclusion
The results of computerized modelling and simulation delivered in this paper demonstrate the practical viability and efficiency of the theoretical approach in realizing an intelligent home environment. These results were used in two projects: “Research and Development of Internet Infrastructure for IoT&S in the Smart Environment (IDAPI)” and “Research on Smart Home Environment and Development of Intelligent Technologies (BIATech)”.
To summarize the theoretical research and experimental results, it must be emphasized that: Application of fuzzy logic is a very efficient tool for the intellectualization of a home environment; only when combined, the hierarchical architecture based on Takagi-Sugeno inference procedures (on the highest levels of the architecture) and Mamdani inference procedures (on the lower levels of the architecture) is able to tackle the problem of large number of rules; the necessity of a specialized multipurpose hardware-software modeling framework that can be integrated in the whole design process of multi-agent systems for an intellectualization of a virtual home environment is confirmed inpractice; a separate investigation was devoted to test the sensitivity of the system to the changes of parameters; numerical evaluation was performed; data gathered in the virtual environment can be easily expanded and used in real home environments by changing pixels into real coordinates and the light intensity coordinates into other real variables under investigation.
Appendix A
Appendix B
