The control logic underlying the building automation systems has consisted, traditionally, of embedded discrete programs created using either low-level or proprietary scripting languages, or using general purpose 4th generation visual languages like Simulink. It is also well known that programs developed in this way are hard to evolve, test, and maintain. These difficulties are intensified when continuous control problems have to be tackled or when the actuation must vary continually subject to the sensor inputs. Such is the case in day-lighting or occupancy-based control applications. In this paper, we propose a declarative high-level Domain-Specific Language (DSL) that aims to reduce the effort required to specify the control logic of building automation systems. Our language combines fuzzy logic and temporal logic, enabling to define the behaviour in terms of domain abstractions. Finally, the approach has been validated in two ways: i) in a case study that simulates the control system of an automated office room; and, ii) by means of an empirical study to confirm usability (with a System Usability Scale questionnaire) and effectiveness, here regarded from the perspective of correctness, of the proposed language with respect to a well known language like Simulink.
Keywords: Ambient intelligence, Context-aware systems, Building automation, Fuzzy control systems, Domain-Specific Languages