Application of Distributed Expert Systems to the advanced control of smart houses ALBERTO BONASTRE, JUAN V. CAPELLA, RAFAEL ORS
Department of Computer Engineering
Polytechnical University of Valencia
Camino de Vera, s/n - E46022 Valencia
Abstract: - A distributed expert system has been proposed for the smart house control. Its configuration is mainly based on the use of distributed nodes connected by means of a CAN network. This kind of systems permit the implementation of highly flexible control systems capable of adapting themselves to different situations. The expert system used is based on Rule Nets (RN), which are a formalism that seeks to express an automatism in a similar way to as would make it a human being: “IF antecedents THEN consequents”. But at the same time Rule nets are a tool for the design, analysis and implementation of rule based systems (RBS), and consist on a mathematic-logical structure which analytically reflects the set of rules that the human expert has designed. Additionally, the RN is able to take decisions concerning possible malfunctions and has bounded response time.
In this paper the design of the proposed control system is shown with the methodology that is presented. Satisfactory results have been obtained when the control system has been applied, important advantages being shown over previously implemented centralized knowledge-based systems.
Key-Words: - Distributed and intelligent control, artificial intelligence, expert systems, home automation, smart house.
The control systems are evolving in a quick way. The current challenge in this field is centered in three main aspects: In the first place, it is looked for that the control systems are flexible, programmable, so that they can be adapted easily to the process modifications. This would allow, in turn, the definition of generic modules that could be adapted to concrete problems. In second place, the modern control systems can extend in big surfaces. It seems, because, indispensable, the application of control systems distributed in the space, so that several nodes collaborates to carry out a concrete task, that they are connected by means of industrial local area networks. In third place, a makers tendency to build intelligent and standardized elements is observed , so that it is simple its interconnection with other makers elements. In front of these new challenges the traditional control systems should evolve. As answer to the necessity of facilitating the programming, a marked tendency is appreciated to the application of expert systems to the automated control, because it offers some interesting advantages . In this field, some of the techniques that probably offer the most interesting perspectives are those coming from Artificial Intelligence, and within them the so-called Expert Systems, which attempt to simulate the reasoning of a human technician. Most of them consist on the denominated rule-based systems, since they express the desired system behavior by means of simple production rules. In this case we can add the flexibility and easiness of programming, so that an user does not require a solid computer background to specify the desired knowledge base. This is why the expert systems, simulating the knowledge of a human operator, are considered one of the best bets when implementing these control systems.
On the other hand, the most used devices in those systems have an ever-increasing capability of processing data and transmitting them through communication networks. In this way, apart from solving the problem associated to the distance among the system elements, it is also possible to build generic modules that will be assembled to meet specific requirements. It also allows the implementation of fault-tolerant systems by means of replicated nodes.
Apart from the system physical elements being distributed, it is also possible to do the same with the own control system. This permits the configuration of a control system as a distributed one. Then, a distributed system (DS) can be defined as a group of physically distributed nodes (each one of them being an element of the analysis system, e.g. an actuator, sensor or a PC) that collaborate with each other to carry out a common task (the successful system control), communicated by means of a local area network.
The application of distributed control systems to industrial systems has grown in a spectacular way. The advantage of the DS on the networked conventional systems consists on the transparency. This way, the distributed system user should not know the physical elements distribution, but rather interact as if it was a conventional centralized system, being hidden the space distribution of the elements.
As answer to the communications interfaces homogenization problem, diverse focuses have appeared. In this work it has been opted for an abstraction system that represents any device of a system as a group of input and output lines, so much analog as digital. To each one a variable will be assigned, being the value of the variable bound with the physical value of the line.
The confluence of the aforementioned trends has given rise to the distributed expert systems (DES) development as a new technique which, by combining the advantages of both approaches, offers very interesting possibilities in the future for the automated processes monitoring and control .
Another focus that we could really call distributed expert system, would be that in the one that the nodes that are part of the system are not limited to the acquisition of data, but rather they participate in the expert system execution. Evidently, this introduces a bigger complexity in the nodes design and in the communication protocols, but it offers significant advantages as the flexibility, the modularity, that allows to enlarge the system in an almost infinite way, and the hardware fault tolerance.
It can be seen how the expert system information it is distributed among the system nodes. Each one executes its corresponding part of the global reasoning, and diffuses the obtained results through the network. These data will be employed for some other nodes to continue its reasoning. This scheme corresponds to a truly distributed expert system.
Once mentioned the advantages of this system, let us pass to enumerate their inconveniences. Besides the biggest complexity in the nodes, already mentioned, serious problems arise, such as the nodes programming. This way, the programming easiness been able when using artificial intelligence techniques.
The true distributed system functionality would be obtained by means of a centralized programming system, where the expert system to use would be defined and tested in a single node. Later on, an automatic distribution of the rules among the nodes that belong to the system is required. This distribution would be carried out through the communications network, so that each node would obtain its part of the expert system to execute. It is possible to conceive several politicians of tasks distribution, as the traffic minimization or the rules redundancy in more than a node to offer fault tolerance.
A system complying with the features described above is currently being developed by the authors, and successful results having already been obtained.
3 Rule Nets
Basically, Rule Nets (RN) are a symbiosis between Expert Systems (based on rules) and Petri Nets (PN) , in such a way that facts resemble places and rules are close to transitions. Similarly, a fact may be true or false; on the other hand, since a place may be marked or not, a rule (like a transition) may be sensitized or not. In the first case, it can be fired, thus changing the state of the system.
Like Petri Nets, RN admit a graphic representation as well as a matricial one; additionally, it also accepts a grammatical notation as a production rule, which drastically simplifies the design, thus avoiding the typical problems associated with PN.
3.1 Introduction to RN
Every control system works with input and output variables, among other internal variables. In the case of RN, each variable has associated facts (corresponding to their possible status). For each associated fact, the set of complementary facts is defined as the one formed by the rest of facts associated with that variable.
Mathematically, a RN is a pair RN = < F, R >, where:
F is the set constituted by all the facts associated to all system variables (the ordinal of F will be f)
R is the set of rules. Each rule has one or several antecedents as well as one or several consequent facts (the ordinal of Ris assumed to be r)
In order to represent a RN in matricial form, the following structures are defined:
Matrix A of antecedents. It is an r·f matrix where element Aij is 1 if fact fj is antecedent in rule ri, or 0 if it is not.
Matrix C of consequents. It is a r·f matrix where element Cij is 1 if fact fj is consequent in rule ri, or 0 if it is not.
Matrix D of dismarking. It is a r·f matrix where element Dij is 0 if element Cik is 1 and fact fj is complementary of fact fk ; if it is not so, Dij is 1.
Vector S of states. It is a vector with f components, so that each component corresponds to a fact of the system. In this vector, component Si is 1 if fact fi is true and 0 if it is false.
Rule rj is sensitized in a determined states S if the two following conditions are met:
(where from now on Xj will denote the jth row of matrix X).
The firing of rule rjsensitized in the Em state yields a change in the state vector into a new one, En, which may be calculated from the equation (3):
It can be easily demonstrated that all operations necessaries to run the RN are implemented by means of easy logical operations. It should also be remarked that there are other figures dealt with in the RN that are useful in the automation of processes, such as timers, etc., as well as the possibility of obtaining the dynamic properties (liveness, cyclicity, etc.) owned by a system.