# An Occupancy Based Cyber-Physical System Design for Intelligent Building Automation

Authors: Kottarathil Eashy Mary Reena; Abraham Theckethil Mathew; Lillykutty Jacob
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

Cyber-physical system (CPS) includes the class of Intelligent Building Automation System (IBAS) which increasingly utilizes advanced technologies for long term stability, economy, longevity, and user comfort. However, there are diverse issues associated with wireless interconnection of the sensors, controllers, and power consuming physical end devices. In this paper, a novel architecture of CPS for wireless networked IBAS with priority-based access mechanism is proposed for zones in a large building with dynamically varying occupancy. Priority status of zones based on occupancy is determined using fuzzy inference engine. Nondominated Sorting Genetic Algorithm-II (NSGA-II) is used to solve the optimization problem involving conflicting demands of minimizing total energy consumption and maximizing occupant comfort levels in building. An algorithm is proposed for power scheduling in sensor nodes to reduce their energy consumption. Wi-Fi with Elimination-Yield Nonpreemptive Multiple Access (EY-NPMA) scheme is used for assigning priority among nodes for wireless channel access. Controller design techniques are also proposed for ensuring the stability of the closed loop control of IBAS in  the presence of packet dropouts due to unreliable network links.


---

## Body

## 1. Introduction

Cyber-physical systems (CPSs) are the system level integrations of the computation, networking, and physical dynamics, in which embedded devices such as sensors and actuators are (wirelessly) networked to sense, monitor, and control the physical world [1]. CPSs are expected to have a tremendous impact on many critical sectors (such as energy, manufacturing, healthcare, transportation, and aerospace) of the economy and they transform the way human-to-human, human-to-object, and object-to-object interactions take place in the physical and virtual worlds [2]. Complex cyber-physical systems are compositions of heterogeneous components; they often include thermal, electromechanical, chemical, computing, and communication elements with an underlying data network thread for communication and control. The dynamics of all the networked elements, both cyber and physical, are critical to the performance of the overall system [3]. In energy conservation application of CPS in large scale and comfort critical systems, like Intelligent Building Automation System (IBAS), various physical systems comprise HVAC (heating, ventilation, and air conditioning), lighting, elevators, and other electrical subsystems on each floor, which are networked and controlled to achieve the set goal of energy efficiency, user comfort, and economic operation [4].Further, the skyrocketing energy costs and the widely accepted concept of green buildings are driving the adoption of Networked Control Systems (NCSs) for building automation so as to use the best technology for the purposes mentioned above [5, 6]. NCSs combine low cost and low power devices with embedded processors networked in order to provide intelligent and efficient sensing and actuation over a geographic area [7]. Energy efficiency and occupant comfort are two major issues in building control system design as discussed above, and research efforts are needed to develop appropriate communication and control strategies for minimizing the total energy consumed without compromising the indoor comfort. Here, the problem is formulated as a critical control system so that the economy and longevity are assured by exploiting the advantages of modern communication and control technologies.In order to build intelligence in BAS, a sensor network consisting of hundreds of sensors in a building can accurately be deployed to monitor/measure the temperature, air quality, light, humidity, door or window’s open/close position, and occupancy, accurately [8]. Occupancy sensors can be installed to automatically switch the HVAC and lighting system in accordance with the occupancy status of the building zones. Actuator nodes, in turn, would have the responsibility to control the subsystems within the building zones. Energy savings can be more when the separate subsystems cooperate and communicate with each other. Integration of these subsystems would add more sophistication to the control system and it would be possible to render an intelligent system of Building Automation System (BAS). Enhancement of battery life of sensor nodes will naturally lead to network availability and system reliability.Looking at the cost factor and deployability, it is seen that the necessity of wireless BAS arises in various situations: (i) when wiring is expensive and time-consuming; (ii) when it demands scalability and flexibility in the deployment of sensor/actuator nodes; and (iii) when there is need for redeployment or retrofit without affecting the aesthetics of existing buildings [9]. With due design considerations and planning, and by adopting appropriate implementation techniques, wireless technology can be used economically and efficiently. The advantages of wireless technology cannot be outweighed by the challenges like poor channel conditions and competition for channel access, which may create unreliable and delayed communication of control and data traffic. Hence, intense research efforts are needed to address the diverse issues in real time control of BAS over wireless networks, using open standards rather than proprietary standards.The scenario of control that has been considered in this work is the automation of large shared spaces of commercial buildings where big crowd occupies the space and moves from one space to another. Occupancy pattern changes dynamically and unpredictably, thus making the control needed for comfort and economy difficult otherwise [10]. Normally, the settings of the building climate control system are to be in such a way that occupant comfort level is the maximum. However, this results into wastage of energy for lighting lamps, cooling/heating space, and for air quality assurance for unoccupied spaces also. Moreover, energy is wasted for overcooling and for cooling less occupied spaces. In modern approaches, the building thermal zones are divided based on the positioning of variable air volume (VAV) boxes of HVAC [11]. The problem considered here is of a large shared space comprising more than one thermal zone of the building. Occupancy patterns vary dynamically and the zones are classified into different priority classes. The requirement is that comfort level of heavily occupied “prime zones” shall be maintained maximum compared to the lightly occupied zones, in concurrence with the energy saving in “vacant”/lightly occupied zones. In the proposed method, priority is assigned for wireless traffic of prime zones using quality of service (QoS) medium access control (MAC) protocol. Emphasis is given to the competition among prime zones’s sensors belonging to the same shared space. Stability of the closed loop control over wireless networks has been ensured while packet drops due to unreliable links exist. Additionally, the energy consumed by the nodes have to be minimized to provide longer battery life and extended network availability.The proposed architecture has a hierarchical structure for communication and control and has the following features/functionality: (i) it decides the status of a particular zone based on its density and rate of change of occupancy and assigns proportional weights to the objective functions using fuzzy logic rule base; (ii) it offers priority to the network traffic of prime zones by QoS differentiated medium access control (MAC) via Elimination-Yield Nonpreemptive Multiple Access (EY-NPMA) scheme adopted with Wi-Fi protocol; (iii) it optimizes energy consumption and user comfort in every zone based on occupancy, using Nondominated Sorted Genetic Algorithm-II (NSGA-II); (iv) it schedules transmit power and sampling rates of wireless sensor nodes through the algorithm proposed; (v) it deals with design of distributed local controllers to guarantee the stability of the closed loop control in presence of packet drops (due to unreliable network links).The remaining part of the paper is organized as follows: a brief review of the related work is given in Section2. Architecture for an energy-efficient priority-access based decentralized controller for wireless BAS is described in Section 3. Sections 3.1–3.5 explain the fuzzy rule base for zone status selection; the concept of EY-NPMA scheme; the multiobjective optimization problem formulation using NSGA-II; the sensor node power scheduling algorithm for WSN; and the decentralized controller design in the sequel. Simulation results and discussions are described in Section 4. Paper is concluded in Section 5.


## 2. Related Work

### 2.1. Wireless Sensor Networks in Intelligent Building Automation

There has been an overwhelming interest in the recent past for using the advanced technology to make the building control more intelligent. Wang et al. [12] present a building energy management system with wireless sensor networks using multiagent distributed control methodology that concentrates on optimized target of air conditioning, lighting, and official electrical devices. A multitier system view point is used to incorporate the various levels of sensing, processing, communication, and management functionality. The cyber-physical building energy management system (CBEMS) has been assumed with a high level of intelligence and automation. The occupant comfort quality level is not a concern here. Authors in [13] describe a simple web service called the Simple Measuring and Actuation Profile (sMAP) which allows instruments and other producers of physical information to directly publish their data in cyber space. Self-describing physical information which is uniform and with machine independent access would avoid the innumerable drivers and adapters for specific sensor and actuator devices found in industrial building automation, process control, and environmental monitoring solutions.In [14], authors discuss joint problems of control and communication in wireless sensor and actuator networks (WSANs) used for closing control loops in building-environment control systems. The paper presents a centralized control (CC) scheme (decisions are made based on global information) and a decentralized control (DC) scheme (distributed actuators to make control decisions locally). Inference has been given as DC outperforms CC when traffic and packet-loss rates are high. Mady et al. in [15] present a BAS using interactive control strategies leading to energy efficiency and enhanced user comfort through the deployment of embedded WSANs. A codesign strategy to a distributed control of building lighting systems is described and an assessment of the cost of WSAN deployment while achieving particular control performance has been presented also. In [16], a codesign control algorithm and embedded platform for building HVAC systems are described. Control algorithms are put in place to reduce sensing errors and to optimize energy cost and monetary cost while satisfying the constraints for user comfort level.Yahiaouti and Sahraoui in [17] use distributed simulations to investigate the impact of advanced control systems on building performance applications through virtual representations rather than using experimental trials, which are usually time-consuming and cost prohibitive. Authors describe the development and implementation of a framework for distributed simulations involving different software tools over a network. In [18], study on parameter-adaptive building (PAB) model which captures system dynamics through an online estimation of time-varying parameters of a building model is carried out, which helps to reduce model uncertainty and can be used for both modeling and control. An MPC (model predictive control) framework that is robust against additive uncertainty has also been described.In [19], authors suggest a system that adapts its behavior according to the past “discomfort” and thus plays the dual role of saving energy when discomfort is smaller than the target budget and maintaining comfort when the discomfort margin is small. Kastner et al. [20] explain the task of building automation and communications infrastructure necessary to address it. An overview of relevant standards is given, including the open standards BACnet and LonWorks that are commonly adopted in the building automation domain. Xia et al. [21] examine some of the major QoS challenges raised by WSANs used for building cyber-physical control systems, including resource constraints, platform heterogeneity, dynamic network topology, and mixed traffic. The paper focuses on addressing the problem of network reliability (measuring packet loss-rate, PLR) and presenting prediction algorithm to solve the issue.


### 2.2. Occupancy Based IBAS

Occupancy based control of building for lighting, HVAC, and so forth, is a relatively new area. A study on how the fine-grained occupancy information from various sensors helps to improve the performance of occupant-driven demand control measures in automated office buildings has been conducted in [22]. It also discusses the pros and cons of the experimental results from the performance evaluation of chair sensors in an office building for providing fine-grained occupancy information. Power-efficient occupancy based energy management (POEM) system is introduced in [23] for optimally controlling HVAC systems in buildings based on actual occupancy levels. It consists of wireless network of cameras (OPTNet) that functions as an optical turnstile to measure area/zone occupancies. Another wireless sensor network of passive infrared (PIR) sensors functions alongside OPTNet. Energy efficiency is achieved through combining both the prediction model and current occupancy measured using sensors. Authors claim 30% energy saving without sacrificing thermal comfort based on live tests.Occupancy pattern extraction and prediction in an intelligent inhabited environment are addressed in [24]. The daily behavioral patterns of the occupant are extracted using a wireless sensor network, and a recurrent dynamic network prediction model is built with feedback connections, enclosing several layers of a Nonlinear Autoregressive Network with Exogenous (NARX) inputs network and authors claimed better prediction results. Sookoor and Whitehouse in [10] presented an occupancy based room level zoning of a centralized HVAC system using WSAN and a 15% energy saving has been reported through experimental verification. Zhou et al. [25] developed a demand-based supervisory control to realize temperature control only for occupied zones while considering the thermal coupling between occupied and unoccupied zones.


### 2.3. Controller Design for IBAS

Dobbs and Hencey in [26] demonstrate the use of model predictive control with a stochastic occupancy model to reduce HVAC energy consumption. They incorporate the building’s thermal properties, local weather predictions, and self-tuning stochastic occupancy model to reduce energy consumption while maintaining occupant comfort. A prediction-weighted cost function provides conditioning of thermal zones before occupancy begins and reduces system output before occupancy ends, and the occupancy model requires no manual training and adapts to changes in occupancy patterns during operation. In [27], authors describe a multistep ahead predictor for the MPC control and a two-stage identification process, known as MPC relevant identification technique (MRI), for multistep predictor. It also proposes a new two-level control strategy, which enables the formulation of a convex optimization problem within the MPC control. Algorithm has been applied on a real occupied office building, where it reduced energy consumption by 17% in average.The design of decentralized Networked Control Systems has been considered in [28]. It explains the methods to handle the effects of packet dropouts, transmission delays, and so forth, with the decentralized NCS design. Donkers et al. analyse the stability of the NCS based on stochastically time-varying discrete-time switched linear system framework in [29]. They have provided conditions for stability in the mean square sense using a convex over approximation and a finite number of linear matrix inequalities (LMIs). Elmahdi [30] introduces a general framework that converts a generic decentralized control configuration of nonnetworked systems to the general setup of NCS. An observer based output feedback controller design problem has presented in [31] for Networked Control Systems with packet dropouts. In this paper, dynamical systems approach and the average dwell-time method have been used. Sufficient conditions for the exponential stability of the closed loop NCS are derived in terms of nonlinear matrix inequalities, and the relation between the packet dropout rate and the stability of the closed loop NCS is established. An observer based output feedback controller design has been employed using an iterative algorithm.In all the works reviewed above, authors presented different methods and techniques for energy saving of BAS in various aspects. However, to the best of our knowledge, no work has considered energy saving potential of BAS for both control subsystem and wireless communication subsystem. Also, we are not aware of any work that deals with the stability aspects of NCS due to unreliable network links, for dynamic occupancy based energy management system. Thus, unlike the previous works, we consider the stability of the NCS in the presence of packet losses due to unreliable wireless links, intelligent energy management, and occupant comfort level adjustments, in the proposed BAS framework.


## 2.1. Wireless Sensor Networks in Intelligent Building Automation

There has been an overwhelming interest in the recent past for using the advanced technology to make the building control more intelligent. Wang et al. [12] present a building energy management system with wireless sensor networks using multiagent distributed control methodology that concentrates on optimized target of air conditioning, lighting, and official electrical devices. A multitier system view point is used to incorporate the various levels of sensing, processing, communication, and management functionality. The cyber-physical building energy management system (CBEMS) has been assumed with a high level of intelligence and automation. The occupant comfort quality level is not a concern here. Authors in [13] describe a simple web service called the Simple Measuring and Actuation Profile (sMAP) which allows instruments and other producers of physical information to directly publish their data in cyber space. Self-describing physical information which is uniform and with machine independent access would avoid the innumerable drivers and adapters for specific sensor and actuator devices found in industrial building automation, process control, and environmental monitoring solutions.In [14], authors discuss joint problems of control and communication in wireless sensor and actuator networks (WSANs) used for closing control loops in building-environment control systems. The paper presents a centralized control (CC) scheme (decisions are made based on global information) and a decentralized control (DC) scheme (distributed actuators to make control decisions locally). Inference has been given as DC outperforms CC when traffic and packet-loss rates are high. Mady et al. in [15] present a BAS using interactive control strategies leading to energy efficiency and enhanced user comfort through the deployment of embedded WSANs. A codesign strategy to a distributed control of building lighting systems is described and an assessment of the cost of WSAN deployment while achieving particular control performance has been presented also. In [16], a codesign control algorithm and embedded platform for building HVAC systems are described. Control algorithms are put in place to reduce sensing errors and to optimize energy cost and monetary cost while satisfying the constraints for user comfort level.Yahiaouti and Sahraoui in [17] use distributed simulations to investigate the impact of advanced control systems on building performance applications through virtual representations rather than using experimental trials, which are usually time-consuming and cost prohibitive. Authors describe the development and implementation of a framework for distributed simulations involving different software tools over a network. In [18], study on parameter-adaptive building (PAB) model which captures system dynamics through an online estimation of time-varying parameters of a building model is carried out, which helps to reduce model uncertainty and can be used for both modeling and control. An MPC (model predictive control) framework that is robust against additive uncertainty has also been described.In [19], authors suggest a system that adapts its behavior according to the past “discomfort” and thus plays the dual role of saving energy when discomfort is smaller than the target budget and maintaining comfort when the discomfort margin is small. Kastner et al. [20] explain the task of building automation and communications infrastructure necessary to address it. An overview of relevant standards is given, including the open standards BACnet and LonWorks that are commonly adopted in the building automation domain. Xia et al. [21] examine some of the major QoS challenges raised by WSANs used for building cyber-physical control systems, including resource constraints, platform heterogeneity, dynamic network topology, and mixed traffic. The paper focuses on addressing the problem of network reliability (measuring packet loss-rate, PLR) and presenting prediction algorithm to solve the issue.


## 2.2. Occupancy Based IBAS

Occupancy based control of building for lighting, HVAC, and so forth, is a relatively new area. A study on how the fine-grained occupancy information from various sensors helps to improve the performance of occupant-driven demand control measures in automated office buildings has been conducted in [22]. It also discusses the pros and cons of the experimental results from the performance evaluation of chair sensors in an office building for providing fine-grained occupancy information. Power-efficient occupancy based energy management (POEM) system is introduced in [23] for optimally controlling HVAC systems in buildings based on actual occupancy levels. It consists of wireless network of cameras (OPTNet) that functions as an optical turnstile to measure area/zone occupancies. Another wireless sensor network of passive infrared (PIR) sensors functions alongside OPTNet. Energy efficiency is achieved through combining both the prediction model and current occupancy measured using sensors. Authors claim 30% energy saving without sacrificing thermal comfort based on live tests.Occupancy pattern extraction and prediction in an intelligent inhabited environment are addressed in [24]. The daily behavioral patterns of the occupant are extracted using a wireless sensor network, and a recurrent dynamic network prediction model is built with feedback connections, enclosing several layers of a Nonlinear Autoregressive Network with Exogenous (NARX) inputs network and authors claimed better prediction results. Sookoor and Whitehouse in [10] presented an occupancy based room level zoning of a centralized HVAC system using WSAN and a 15% energy saving has been reported through experimental verification. Zhou et al. [25] developed a demand-based supervisory control to realize temperature control only for occupied zones while considering the thermal coupling between occupied and unoccupied zones.


## 2.3. Controller Design for IBAS

Dobbs and Hencey in [26] demonstrate the use of model predictive control with a stochastic occupancy model to reduce HVAC energy consumption. They incorporate the building’s thermal properties, local weather predictions, and self-tuning stochastic occupancy model to reduce energy consumption while maintaining occupant comfort. A prediction-weighted cost function provides conditioning of thermal zones before occupancy begins and reduces system output before occupancy ends, and the occupancy model requires no manual training and adapts to changes in occupancy patterns during operation. In [27], authors describe a multistep ahead predictor for the MPC control and a two-stage identification process, known as MPC relevant identification technique (MRI), for multistep predictor. It also proposes a new two-level control strategy, which enables the formulation of a convex optimization problem within the MPC control. Algorithm has been applied on a real occupied office building, where it reduced energy consumption by 17% in average.The design of decentralized Networked Control Systems has been considered in [28]. It explains the methods to handle the effects of packet dropouts, transmission delays, and so forth, with the decentralized NCS design. Donkers et al. analyse the stability of the NCS based on stochastically time-varying discrete-time switched linear system framework in [29]. They have provided conditions for stability in the mean square sense using a convex over approximation and a finite number of linear matrix inequalities (LMIs). Elmahdi [30] introduces a general framework that converts a generic decentralized control configuration of nonnetworked systems to the general setup of NCS. An observer based output feedback controller design problem has presented in [31] for Networked Control Systems with packet dropouts. In this paper, dynamical systems approach and the average dwell-time method have been used. Sufficient conditions for the exponential stability of the closed loop NCS are derived in terms of nonlinear matrix inequalities, and the relation between the packet dropout rate and the stability of the closed loop NCS is established. An observer based output feedback controller design has been employed using an iterative algorithm.In all the works reviewed above, authors presented different methods and techniques for energy saving of BAS in various aspects. However, to the best of our knowledge, no work has considered energy saving potential of BAS for both control subsystem and wireless communication subsystem. Also, we are not aware of any work that deals with the stability aspects of NCS due to unreliable network links, for dynamic occupancy based energy management system. Thus, unlike the previous works, we consider the stability of the NCS in the presence of packet losses due to unreliable wireless links, intelligent energy management, and occupant comfort level adjustments, in the proposed BAS framework.


## 3. Proposed Architecture

The large floor area is assumed to be divided into different thermal zones based on the VAV box location. Figure1 is the modified diagram of a building zone (Z0009) generated using BRCM toolbox [32]. The wireless sensor network consists of different sensors for measuring occupancy, temperature, light, and air quality. The occupancy and its flow rate can be measured accurately using sensors with varying granular information and of implicit/explicit type [33, 34]. To obtain the optimum values for indoor climate based on the occupancy rate, we have formulated and solved a multiobjective optimization problem of energy consumption and user comfort using NSGA-II [35].Figure 1
Schematic showing the different priority zones in IBAS.The different zone categories, their comfort level and energy consumption requirements, and their priorities for wireless channel access are as follows.Prime zone (P-zone): it is large occupancy level with a high rate of change of occupancy; it needs high comfort level and energy consumption and the highest priority in wireless traffic access.
Normal zone (N-zone): occupancy level is in the expected range, and the rate of change of occupancy is not high with moderate comfort level and energy consumption requirements; priority status is high.
Minimal zone (M-zone): occupancy is lower with a small rate of change of occupancy; it requires the minimum comfort level and lower energy consumption with low priority status.
Vacant zones (V-zone): it is almost zero or of very low occupancy with the least rate of change in occupancy status; it requires the least comfort level and energy consumption with the lowest priority status. The zones belong to any of these categories at a given point of time.The proposed architecture for wireless networked BAS is shown in Figure2. Sensor outputs for occupancy, temperature, illumination, and air quality (O
k, T
k, L
k, and I
k) are forwarded to the centralized coordinator/controller. Zones’ status, priority, and associated weights in the objective functions are determined at central fuzzy inference engine, based on the occupancy level (see Figure 2). The inputs to the fuzzy inference engine [36, 37] are occupancy density and change of occupancy (difference between the present occupancy density and the previous occupancy density) obtained from the processing of occupancy sensor measurements. The gateway block, responsible for the prioritization of traffic through the network, communicates the status of each zone (S
z) to the corresponding zone coordinator node. Here, the EY-NPMA scheme integrated with the Wi-Fi protocol (discussed in Section 3.2) imparts priority to different zone classes during the priority phase and to zones in the same class using the burst signal sequences during elimination and yield phases. The difference between the two QoS MAC protocols, 802.11e protocol [38] and the EY-Wi-Fi [39], is in the inclusion of the elimination phase which helps us to assign priority further among zones with the same access category class, at the expense of increased overhead. Authors in [40, 41] established that the performance of EY-Wi-Fi is better than 802.11e, in terms of packet delay, jitter, and packet delivery ratio.Figure 2
Architecture of CPS for wireless IBAS.The optimum desired values of climate control for zone-z (T
z, L
z, I
z), obtained using multiobjective optimization algorithm NSGA-II (discussed in Section 3.3) to meet the requirements of user comfort and energy consumption of each zone, were communicated to the local distributed controllers. The optimized transmit power levels (P
i) of sensor nodes, matching the zone’s occupancy status and the rate of sampling, are computed at each sensor node (discussed in Section 3.4). The distributed local controllers are designed to ensure stability of the closed loop control system over wireless network in the case of unreliable channel conditions (discussed in Section 3.5).Controller gains are obtained via solving linear matrix inequalities (LMIs) through semidefinite programming (SDP) [42]. Resources available for climate control within a zone are termed as “own resources,” and those available in nearby zones are termed as “neighboring resources.” In several circumstances, based on the demand for quick response in comfort control, the adjacent vacant or minimal zones’ resources also should be utilized along with the prime zones’ resources [25]. Control and tracking of neighboring resources are entrusted with central coordinator/control module. The sequence of functions of the proposed architecture is shown in the steps as follows:(1)
activate WSN;
(2)
compute occupancy and change in occupancy using advanced occupancy sensors;
(3)
categorize the shared space area into P, N, M, and V zones and set the sample rates using fuzzy inference engine. Assign priority to sensors among equal status zones via EY-NPMA and run the optimization algorithm (NSGA-II) at centralized control/coordinator;
(4)
select the appropriate gains of distributed controller via SDP to operate the actuator at the optimized set point values; switch nodes to the appropriate power levels using algorithm run at nodes;
(5)
control and track the indoor environment using own resources in the zone;
(6)
identify the neighbouring resources that should be operated to increase the comfort level through centralized control/coordinator;
(7)
control and track the neighbouring resources;
(8)
compute occupancy and change in occupancy; if it varies from that of previous sample, identify the new status of zone and repeat the steps (3)–(7).


### 3.1. Fuzzy Logic Inference Engine

The density of occupancy and change of density are the inputs to the proposed fuzzy rule engine. The outputs of the fuzzy system are the zone priorities and their sampling rates and weights to the objective functions of the optimization block. The output of each rule is calculated by the rule evaluation method (REM) [37] and the results are mapped to a consequence class. The weight outputs corresponding to occupancy status from fuzzy block are given to the optimization algorithm for selecting optimum comfort level settings for various zones while keeping the energy consumption rate low. Tables 1 and 2 show the fuzzy rules.Table 1
Fuzzy rules for zone status.
Change of occupancy
NB
NS
Z
PS
PB
Occupancy
VL
V
V
V
V
M
L
V
V
M
M
N
AV
M
M
M
N
N
H
M
N
N
N
P
VH
N
P
P
P
PTable 2
Fuzzy rules for weights.
Change of occupancy
NB
NS
Z
PS
PB
Occupancy
VL
L
L
L
AV
AV
L
L
L
L
AV
H
AV
AV
AV
H
H
H
H
AV
H
H
VH
VH
VH
H
VH
VH
VH
VHThe linguistic variables used in Tables1 and 2 are as follows: VH: very high; H: high; AV: average; L: low; VL: very low; NB: negative big; NS: negative small; Z: zero; PS: positive small; PB: positive big; P, N, M, and V are zone statuses as defined earlier. Occupancy and change of occupancy inputs have trapezoidal and triangular membership functions. The outputs, zone status and weights, have singleton and triangular membership functions, respectively. When the occupancy status is VH and change of occupancy is NB, then the zone status is N and the weight assigned is H. Similarly, we can interpret all the rules as shown in the tables.


### 3.2. EY-Wi-Fi Medium Access Protocol

In accordance with the occupancy status, distinct priorities are to be given to the sensors in different zones by using a QoS MAC. We chose EY-NPMA [40] enabled Wi-Fi (EY-Wi-Fi), rather than IEEE 802.11e, because of the ability of the former one to further differentiate the sensors among the same priority class zones.Zones belonging to the same priority class need to be further prioritized based on the rate of change of occupancy. Only the nodes with equal priorities compete in the elimination phase (second phase). They try to make the channel busy by transmitting a burst signal of random length. Those nodes that do not transmit for the longest duration are eliminated. In the yield phase (third phase), the nodes that send the burst signal earliest win the contention and start the data packet transmission. The channel access mechanism of EY-NPMA is shown in Figure3. In this figure, we have considered three P-zones (z
1, z
2, and z
3) contending for the channel access. With all three being prime zones, they possess equal priority status with the same CWmin (contention window minimum) and AIFS (arbitrary interframe space) values and enter into the elimination phase by the transmission of assertion slot. In the elimination phase, z
1 and z
3 have the same burst length, longer than that of z
2; so they move into the yield phase. In the yield phase, z
3 wins the contention and starts data packet transmission, as it transmits the shorter yield burst sequence compared to that of z
1. Priority can be assigned among N-zones or M-zones in a similar way.Figure 3
EY-Wi-Fi access mechanism.


### 3.3. Nondominated Sorting Genetic Algorithm-II (NSGA-II)

The main objectives of the proposed intelligent control of building space over wireless network are (i) to minimize the total energy consumption of the building space comprising multiple thermal zones with dynamic occupancy and (ii) to maximize the comfort level of occupants of the zones through maintaining a desirable climate. NSGA-II is a multiobjective evolutionary algorithm capable of finding multiple Pareto-optimal solutions in a single stretch of simulation itself. The Pareto-optimal front presents a number of viable solutions for the multiobjective problem, which cannot optimize all the objectives simultaneously. NSGA-II has the advantages of low computational requirements and elitism as compared to NSGA [35]. Once the population (solution set) is initialized, the population is sorted based on nondomination into each front. Each solution is assigned a fitness (or rank) equal to its nondomination level (1 is the best level, 2 is the next-best level, and so on). Thus, minimization of fitness is assumed with the first front being completely nondominant set in the current population and the second front being dominated by the individuals in the first front only, and thus each front is formed in this manner. NSGA-II algorithm working is depicted in Figure 4.Figure 4
NSGA-II algorithm.In addition to fitness value, a parameter called crowding distance is calculated for each individual. The crowding distance is a measure of how close an individual is to its neighbors. Large average crowding distance will result in better diversity in the population. Parents are selected from the population by using binary tournament selection based on the rank and crowding distance. An individual is selected if the rank is lesser than that of the others or if crowding distance is greater among the individuals in the same front to which it belongs. The selected population generates offsprings from crossover and mutation operators. The population with the current population and current offsprings is sorted again based on nondomination and only the bestN individuals are selected, where N is the population size. The selection is based on the rank and the on the crowding distance on the last front. Following [43], the first objective of minimizing the total energy consumption can be expressed as follows:(1)
m
i
n
E
=
∑
z
=
1
n
w
z
E
T
z
x
T
+
E
L
z
x
L
+
E
I
z
x
I
s.t
E
T
z
≤
E
T
m
a
x
E
L
z
≤
E
L
m
a
x
E
I
z
≤
E
I
m
a
x
,where E is the total energy consumption of the building space, E
T
z is the energy expenditure to maintain the desired temperature in zone z, E
L
z is to provide lighting in zone z, and E
I
z is to keep the required air quality level of the zone z. The decision variables associated with energy expenditures are represented by x
T, x
L, and x
I, respectively. The weight communicated from fuzzy logic rule engine is represented as “w
z,” and “n” represents the total number of thermal zones in the shared space. Following [43], the second objective of maximizing the comfort level of occupants (i.e., minimizing the occupants’ discomfort level) can be expressed in terms of occupant discomfort factor (ODF) as follows:(2)
m
i
n
O
D
F
=
∑
z
=
1
n
1
-
1
-
w
z
1
-
x
T
-
T
z
T
z
2
+
1
-
x
L
-
L
z
L
z
2
+
1
-
x
I
-
I
z
I
z
2
s.t
T
m
i
n
≤
T
z
≤
T
m
a
x
L
m
i
n
≤
L
z
≤
L
m
a
x
I
m
i
n
≤
I
z
≤
I
m
a
x
,
T
z, L
z, and I
z are representing the zonal values of temperature, illumination, and air quality, respectively. This multiobjective optimization problem is solved using NSGA-II as described earlier.


### 3.4. Power Scheduling in Wireless Sensor Nodes

The proposed IBAS framework addresses energy efficiency of not only the control subsystem but also the communication subsystem. The energy consumption of the sensor nodes is reduced by an efficient power scheduling algorithm, which can increase the battery life of sensor nodes and extend the network lifetime also. The amount of energy consumed (E
s
t
x) for sending k-bit message over wireless link with a distance of between transmitter and receiver is [44](3)
E
s
t
x
=
E
e
l
e
c
k
+
E
f
s
k
d
2
,
d
<
d
0
E
e
l
e
c
k
+
E
f
d
k
d
2
,
d
≥
d
0
,where E
e
l
e
c is the fixed energy consumed in the transmitter and E
f
s is the energy consumption per unit distance in channel propagation; and (4)
d
0
=
E
f
s
E
f
d
.Different power levels are associated with the different operation modes of a sensor node. The power states of the nodes can be linked with the status of its zone based on the occupancy. Table3 summarizes the details of sensor node states [45]. Power saving in wireless networked sensor nodes is achieved using a power scheduling algorithm proposed in [46]. All nodes in a P-zone are assumed to be in S
0 state which is the highest power level state. Some of the nodes can be either in S
1 or S
2 states when the zone is with normal or minimal occupancy. Most of the nodes in vacant zone are in S
3 state, which is the lowest power level state. Depending on the dynamic occupancy pattern the nodes can select appropriate states for minimizing the energy consumption in sensor network. This concept of switching between different power level states is shown in Figure 5. The sensor node which is operating in state S
0 with power consumption P
S
0 at time t
1 changes the state to S
1, with power consumption P
S
1, where P
S
0
>
P
S
1. The switching time between state S
0 and S
1 is t
S
0
,
S
1 and the energy consumed is t
S
0
,
S
1
(
P
S
0
+
P
S
1
)
/
2. The sensor node remains in that state for time t
S
0
-
t
S
0
,
S
1 (t
S
0: time duration for which node remains in S
0 if there is no switching to low power level). The energy consumption in state S
0 for t
S
0 is P
S
0
t
S
0. The total energy saving is given by the area under the “ABCDA” in Figure 5 as follows:(5)
E
S
,
s
a
v
e
d
=
t
S
0
-
t
S
0
,
S
1
2
P
S
0
-
P
S
1
.The energy expenditure needed to bring back the sensor node from P
S
1 to P
S
0 at t
2 is(6)
E
S
,
e
x
p
e
n
d
=
t
S
1
,
S
0
P
S
0
+
P
S
1
2
.Transition from the higher power level to lower power level is beneficial only if the time interval t
S
0 is large so that E
S
(
s
a
v
e
d
) is greater than E
S
(
e
x
p
e
n
d
):(7)
t
S
0
>
1
2
t
S
0
,
S
1
+
P
S
0
+
P
S
1
P
S
0
-
P
S
1
t
S
1
,
S
0
.Table 3
Power states of sensor nodes.
State
Processor
Memory
Sensor
Radio
S
0
Active
Active
on
T
x, R
x
S
1
Ideal
Sleep
on
R
x
S
2
Sleep
Sleep
on
R
x
S
3
Sleep
Sleep
on
offFigure 5
Graph showing the transmit power switching in sensor nodes.This is applicable to the transitions between other power states of the sensor node. State transition scheduling is done taking several factors into consideration like energy saving and user comfort, in addition to the communication and processing abilities. Transition times for discrete state transitions are shown in Figure6 based on the data given in [47]. Modeling of the energy consumption of different node components in different operation modes and state transitions are also described in [47]. In the power scheduling algorithm shown in Algorithm 1, “O” is occupancy; “C” is the maximum capacity of occupancy for each zone; “δ
O” is the rate of change of occupancy density; “P
S
i” is the sensor node power consumption in state S
i; and t
S
i
,
S
j is the transition time for state change from state S
i to S
j. If the occupancy density is very high (e.g., greater than 75% of the maximum capacity C) and the change of occupancy with respect to time is also increasing, the thermal zone is assumed to be the status of prime zone with high user comfort level and high energy consumption requirements. So, the sensor node will be in state S
0, with power level P
S
0 and with a sampling rate of 3 minutes. If the occupancy rate change is decreasing at least for a minimum time period t
S
t
h in which E
S
(
s
a
v
e
d
)
-
E
S
(
e
x
p
e
n
d
) is positive or if the density of occupancy retains greater than 50% for the specified time period given in the algorithm, then the power level is switched to P
S
1 and the sampling rate is set as 5 minutes. If the occupancy density is greater than 50% of the specified maximum with a decreasing rate of change or if the occupancy density is higher than 25%, the power level is changed to P
S
2 and a sampling rate is set as 10 minutes. If the zone is almost empty (<10% of C) or more than 25% with a decreasing rate of change for specified t
S
t
h value, then the power level is changed to P
S
3 and the sampling rate is set as 15 minutes.Algorithm 1
(1)if
δ
O
is  positive  then
(2)switch  O  do
(3)case  O
>
75
%
(4)
P
S
i  is  P
S
0
; zone status: P; sample rate: 3 min.
(5)case  O
>
50
%
(6)
if  t
S
i
>
t
S
th  then
(7) P
S
i  is  P
S
1
; zone status: N; sample rate: 5 min.
(8)
end if
(9)case  O
>
25
%
(10) if  t
S
i
>
t
S
th  then
(11)  P
S
i  is  P
S
2
; zone status: M; sample rate: 10 min.
(12) end if
(13)case  O
>
10
%
(14) if  t
S
i
>
t
S
th  then
(15)  P
S
i  is  P
S
3
; Zone status: V; sample rate: 15 min.
(16) end if
(17)else  δ
O
is negative
(18)switch  O  do
(19)case  O
>
100
%
(20) if  t
S
i
>
t
S
th  then
(21)  P
S
i  is  P
S
0
; zone status: P; sample rate: 3 min.
(22) end if
(23)case  O
>
75
%
(24) if  t
S
i
>
t
S
th  then
(25)P
S
i  is  P
S
1
; zone status: N; sample rate: 5 min.
(26) end if
(27)case  O
>
50
%
(28) if  t
S
i
>
t
S
th  then
(29)  P
S
i  is  P
S
2
; zone status: M; sample rate: 10 min.
(30) end if
(31)case  O
>
25
%
(32) if  t
S
i
>
t
S
th  then
(33)  P
S
i  is  P
S
3
; one status: V; sample rate: 15 min.
(34) end if
(35)end ifFigure 6
State transition times of sensors for switching power levels.


### 3.5. Distributed Controller Design

The local distributed controllers in the two-tier control structure (see Figures1 and 2) are linear switched controllers. The set point values are decided by the occupancy driven optimization algorithms run at central control block (first-tier). The central controller also decides sampling rates associated with priority status of the zone. A look up table comprising the set of gains for switched controllers, considering the network topology of the zones, and all the possible wireless link reliability statuses, is maintained at the local controllers.The set of gains which guarantees closed loop stability in the mean square sense is synthesized offline using semidefinite programming (SDP) in linear matrix inequality (LMI) solvers (see Figure2) such as YALMIP at the central control module [42]. Different sets of local control laws are derived for every possible network topology (that may arise due to the wireless link reliability status), eliminating the need of communication among distributed controllers to get the information of whole network, thus reducing the conservativeness of the control law. Model of packet dropouts based on a finite-state Markov chain is used in order to exploit the available knowledge about the stochastic nature of the network and improve the closed loop performance. Reliability of network links can be represented by means of an adjacency matrix (connectivity between sensors and actuators) Λ
=
[
λ
i
j
]
m
×
n with λ
i
j
∈
(
1,0
,
-
1
). Here, λ
i
j = “1” indicates ideal/reliable link between actuator-sensor pair (
i
,
j
), λ
i
j = “0” indicates no link, and λ
i
j = “−1” indicates a lossy/unreliable link where packet dropout occurs. Consider the linearized model of nonlinear building thermal system, which is assumed to be controllable and observable [48]. Linear time-invariant discrete-time system is given in (9). Consider(8)
x
k
+
1
=
A
x
k
+
B
u
k
,where x
=
[
x
1
,
…
,
x
n
]
T
∈
R
n is the state vector corresponding to the sensor outputs of measured temperature, light, and indoor air quality; u
=
[
u
1
,
…
,
u
n
]
T
∈
R
n is the input vector for actuators; k
∈
N is the time index; and A and B are system matrices. Assume that states and inputs are subject to the constraints with the maximum values. The goal is to find a state feedback gain matrix K
∈
R
m
×
n such that system (8) in closed loop with control input (9) becomes asymptotically stable. We have(9)
u
k
=
K
x
k
,where K
∈
R
m
×
n. The distributed control law allows actuators to exploit the local sensor measurements only as per the network topology. The structure of K depends on the network links as follows: (10)
λ
i
j
=
0
⟹
k
i
j
=
0
,where k
i
j is the (
i
,
j
)
th element of K.The lossy links are characterized by two-state Markov chains, resulting in dynamic network topology. This aspect is accounted using statistical means. LetL be the total number of unreliable links in the network. All the possible network topologies at a given time step k can be represented by replacing every “−1” in the adjacent matrix Λ with either “1” or “0,” thereby obtaining l
=
2
L matrices Λ
f
=
[
λ
i
j
]
m
×
n, f
=
1
,
…
,
l. The probability distribution of the network configurations has been computed using the two-state Markov chain (MC) for each link [42, 49]. Let the two states of the MC be represented as Z
1 and Z
2. The transition probability matrix of the Markov chain is represented as follows:(11)
T
=
q
1
1
-
q
1
1
-
q
2
q
2
=
t
i
j
2
×
2
,where t
i
j
=
Pr
⁡
[
z
(
k
+
1
)
=
Z
j
∣
z
(
k
)
=
Z
i
]. An emission matrix E
=
[
e
i
j
]
2
×
2
L with e
i
j
=
Pr
⁡
[
Λ
(
k
)
=
Λ
j
∣
z
(
k
)
=
Z
i
] is computed. The packet dropouts on the network links are assumed to be iid (independent and identically distributed) random variables with drop probability d
1 while in state Z
1 of the Markov chain and with drop probability d
2 while in state Z
2. All the unreliable links are mapped as ideal links or no links in Λ
f
,
f
=
1
,
…
,
l. Clearly, we have to design two sets of control gains {
K
1,1
,
…
,
K
1
,
l
} and {
K
2,1
,
…
,
K
2
,
l
} and the switching control can be defined using these gains so that the closed loop system is asymptotically stable in the mean square. Now, we can write switching control law as shown in the following equation:(12)
u
k
=
K
1,1
x
k
i
f
z
k
=
Z
1
,
Λ
k
=
Λ
1
⋮
K
1
,
l
x
k
i
f
z
k
=
Z
1
,
Λ
k
=
Λ
l
K
2,1
x
k
i
f
z
k
=
Z
2
,
Λ
k
=
Λ
1
⋮
K
2
,
l
x
k
i
f
z
k
=
Z
2
,
Λ
k
=
Λ
l
.Mean square stability condition is given as follows:(13)
E
V
x
k
+
1
-
V
x
k
≤
-
x
k
T
Q
x
x
k
-
E
u
k
T
Q
u
u
k
,where Q
x
∈
R
n
×
n and Q
u
∈
R
m
×
m are weight matrices; V
(
x
) is a switching stochastic Lyapunov function for the closed loop NCS and it is defined as (14)
u
k
=
x
k
T
P
1
x
k
i
f
z
k
=
Z
1
x
k
T
P
2
x
k
i
f
z
k
=
Z
2
.The expectations in (13) can be written as(15)
E
V
x
k
+
1
=
∑
f
=
1
l
∑
z
=
1
2
e
j
f
t
j
z
x
k
T
A
+
B
K
j
,
f
T
P
z
A
+
B
K
j
,
f
x
k
,
E
u
k
T
Q
u
u
k
=
∑
f
=
1
l
e
j
f
x
k
T
K
j
,
f
T
Q
u
K
j
,
f
x
k
.By substituting P
j
=
γ
Q
j
-
1, K
j
,
f
=
Y
j
,
f
Q
j
-
1
∀
j
,
f, we can translate (13) to an appropriate LMI condition, and, by solving it through SDP problem [42], the required gains K
j
,
f where j
=
1,2
,
f
=
1
,
…
,
l, are obtained. The controller performance is evaluated in terms of the accumulated stage cost over k
=
1 to k
=
k
m
a
x and is given by(16)
J
=
∑
k
=
1
k
m
a
x
Q
x
x
k
2
+
Q
u
u
k
2
.


## 3.1. Fuzzy Logic Inference Engine

The density of occupancy and change of density are the inputs to the proposed fuzzy rule engine. The outputs of the fuzzy system are the zone priorities and their sampling rates and weights to the objective functions of the optimization block. The output of each rule is calculated by the rule evaluation method (REM) [37] and the results are mapped to a consequence class. The weight outputs corresponding to occupancy status from fuzzy block are given to the optimization algorithm for selecting optimum comfort level settings for various zones while keeping the energy consumption rate low. Tables 1 and 2 show the fuzzy rules.Table 1
Fuzzy rules for zone status.
Change of occupancy
NB
NS
Z
PS
PB
Occupancy
VL
V
V
V
V
M
L
V
V
M
M
N
AV
M
M
M
N
N
H
M
N
N
N
P
VH
N
P
P
P
PTable 2
Fuzzy rules for weights.
Change of occupancy
NB
NS
Z
PS
PB
Occupancy
VL
L
L
L
AV
AV
L
L
L
L
AV
H
AV
AV
AV
H
H
H
H
AV
H
H
VH
VH
VH
H
VH
VH
VH
VHThe linguistic variables used in Tables1 and 2 are as follows: VH: very high; H: high; AV: average; L: low; VL: very low; NB: negative big; NS: negative small; Z: zero; PS: positive small; PB: positive big; P, N, M, and V are zone statuses as defined earlier. Occupancy and change of occupancy inputs have trapezoidal and triangular membership functions. The outputs, zone status and weights, have singleton and triangular membership functions, respectively. When the occupancy status is VH and change of occupancy is NB, then the zone status is N and the weight assigned is H. Similarly, we can interpret all the rules as shown in the tables.


## 3.2. EY-Wi-Fi Medium Access Protocol

In accordance with the occupancy status, distinct priorities are to be given to the sensors in different zones by using a QoS MAC. We chose EY-NPMA [40] enabled Wi-Fi (EY-Wi-Fi), rather than IEEE 802.11e, because of the ability of the former one to further differentiate the sensors among the same priority class zones.Zones belonging to the same priority class need to be further prioritized based on the rate of change of occupancy. Only the nodes with equal priorities compete in the elimination phase (second phase). They try to make the channel busy by transmitting a burst signal of random length. Those nodes that do not transmit for the longest duration are eliminated. In the yield phase (third phase), the nodes that send the burst signal earliest win the contention and start the data packet transmission. The channel access mechanism of EY-NPMA is shown in Figure3. In this figure, we have considered three P-zones (z
1, z
2, and z
3) contending for the channel access. With all three being prime zones, they possess equal priority status with the same CWmin (contention window minimum) and AIFS (arbitrary interframe space) values and enter into the elimination phase by the transmission of assertion slot. In the elimination phase, z
1 and z
3 have the same burst length, longer than that of z
2; so they move into the yield phase. In the yield phase, z
3 wins the contention and starts data packet transmission, as it transmits the shorter yield burst sequence compared to that of z
1. Priority can be assigned among N-zones or M-zones in a similar way.Figure 3
EY-Wi-Fi access mechanism.


## 3.3. Nondominated Sorting Genetic Algorithm-II (NSGA-II)

The main objectives of the proposed intelligent control of building space over wireless network are (i) to minimize the total energy consumption of the building space comprising multiple thermal zones with dynamic occupancy and (ii) to maximize the comfort level of occupants of the zones through maintaining a desirable climate. NSGA-II is a multiobjective evolutionary algorithm capable of finding multiple Pareto-optimal solutions in a single stretch of simulation itself. The Pareto-optimal front presents a number of viable solutions for the multiobjective problem, which cannot optimize all the objectives simultaneously. NSGA-II has the advantages of low computational requirements and elitism as compared to NSGA [35]. Once the population (solution set) is initialized, the population is sorted based on nondomination into each front. Each solution is assigned a fitness (or rank) equal to its nondomination level (1 is the best level, 2 is the next-best level, and so on). Thus, minimization of fitness is assumed with the first front being completely nondominant set in the current population and the second front being dominated by the individuals in the first front only, and thus each front is formed in this manner. NSGA-II algorithm working is depicted in Figure 4.Figure 4
NSGA-II algorithm.In addition to fitness value, a parameter called crowding distance is calculated for each individual. The crowding distance is a measure of how close an individual is to its neighbors. Large average crowding distance will result in better diversity in the population. Parents are selected from the population by using binary tournament selection based on the rank and crowding distance. An individual is selected if the rank is lesser than that of the others or if crowding distance is greater among the individuals in the same front to which it belongs. The selected population generates offsprings from crossover and mutation operators. The population with the current population and current offsprings is sorted again based on nondomination and only the bestN individuals are selected, where N is the population size. The selection is based on the rank and the on the crowding distance on the last front. Following [43], the first objective of minimizing the total energy consumption can be expressed as follows:(1)
m
i
n
E
=
∑
z
=
1
n
w
z
E
T
z
x
T
+
E
L
z
x
L
+
E
I
z
x
I
s.t
E
T
z
≤
E
T
m
a
x
E
L
z
≤
E
L
m
a
x
E
I
z
≤
E
I
m
a
x
,where E is the total energy consumption of the building space, E
T
z is the energy expenditure to maintain the desired temperature in zone z, E
L
z is to provide lighting in zone z, and E
I
z is to keep the required air quality level of the zone z. The decision variables associated with energy expenditures are represented by x
T, x
L, and x
I, respectively. The weight communicated from fuzzy logic rule engine is represented as “w
z,” and “n” represents the total number of thermal zones in the shared space. Following [43], the second objective of maximizing the comfort level of occupants (i.e., minimizing the occupants’ discomfort level) can be expressed in terms of occupant discomfort factor (ODF) as follows:(2)
m
i
n
O
D
F
=
∑
z
=
1
n
1
-
1
-
w
z
1
-
x
T
-
T
z
T
z
2
+
1
-
x
L
-
L
z
L
z
2
+
1
-
x
I
-
I
z
I
z
2
s.t
T
m
i
n
≤
T
z
≤
T
m
a
x
L
m
i
n
≤
L
z
≤
L
m
a
x
I
m
i
n
≤
I
z
≤
I
m
a
x
,
T
z, L
z, and I
z are representing the zonal values of temperature, illumination, and air quality, respectively. This multiobjective optimization problem is solved using NSGA-II as described earlier.


## 3.4. Power Scheduling in Wireless Sensor Nodes

The proposed IBAS framework addresses energy efficiency of not only the control subsystem but also the communication subsystem. The energy consumption of the sensor nodes is reduced by an efficient power scheduling algorithm, which can increase the battery life of sensor nodes and extend the network lifetime also. The amount of energy consumed (E
s
t
x) for sending k-bit message over wireless link with a distance of between transmitter and receiver is [44](3)
E
s
t
x
=
E
e
l
e
c
k
+
E
f
s
k
d
2
,
d
<
d
0
E
e
l
e
c
k
+
E
f
d
k
d
2
,
d
≥
d
0
,where E
e
l
e
c is the fixed energy consumed in the transmitter and E
f
s is the energy consumption per unit distance in channel propagation; and (4)
d
0
=
E
f
s
E
f
d
.Different power levels are associated with the different operation modes of a sensor node. The power states of the nodes can be linked with the status of its zone based on the occupancy. Table3 summarizes the details of sensor node states [45]. Power saving in wireless networked sensor nodes is achieved using a power scheduling algorithm proposed in [46]. All nodes in a P-zone are assumed to be in S
0 state which is the highest power level state. Some of the nodes can be either in S
1 or S
2 states when the zone is with normal or minimal occupancy. Most of the nodes in vacant zone are in S
3 state, which is the lowest power level state. Depending on the dynamic occupancy pattern the nodes can select appropriate states for minimizing the energy consumption in sensor network. This concept of switching between different power level states is shown in Figure 5. The sensor node which is operating in state S
0 with power consumption P
S
0 at time t
1 changes the state to S
1, with power consumption P
S
1, where P
S
0
>
P
S
1. The switching time between state S
0 and S
1 is t
S
0
,
S
1 and the energy consumed is t
S
0
,
S
1
(
P
S
0
+
P
S
1
)
/
2. The sensor node remains in that state for time t
S
0
-
t
S
0
,
S
1 (t
S
0: time duration for which node remains in S
0 if there is no switching to low power level). The energy consumption in state S
0 for t
S
0 is P
S
0
t
S
0. The total energy saving is given by the area under the “ABCDA” in Figure 5 as follows:(5)
E
S
,
s
a
v
e
d
=
t
S
0
-
t
S
0
,
S
1
2
P
S
0
-
P
S
1
.The energy expenditure needed to bring back the sensor node from P
S
1 to P
S
0 at t
2 is(6)
E
S
,
e
x
p
e
n
d
=
t
S
1
,
S
0
P
S
0
+
P
S
1
2
.Transition from the higher power level to lower power level is beneficial only if the time interval t
S
0 is large so that E
S
(
s
a
v
e
d
) is greater than E
S
(
e
x
p
e
n
d
):(7)
t
S
0
>
1
2
t
S
0
,
S
1
+
P
S
0
+
P
S
1
P
S
0
-
P
S
1
t
S
1
,
S
0
.Table 3
Power states of sensor nodes.
State
Processor
Memory
Sensor
Radio
S
0
Active
Active
on
T
x, R
x
S
1
Ideal
Sleep
on
R
x
S
2
Sleep
Sleep
on
R
x
S
3
Sleep
Sleep
on
offFigure 5
Graph showing the transmit power switching in sensor nodes.This is applicable to the transitions between other power states of the sensor node. State transition scheduling is done taking several factors into consideration like energy saving and user comfort, in addition to the communication and processing abilities. Transition times for discrete state transitions are shown in Figure6 based on the data given in [47]. Modeling of the energy consumption of different node components in different operation modes and state transitions are also described in [47]. In the power scheduling algorithm shown in Algorithm 1, “O” is occupancy; “C” is the maximum capacity of occupancy for each zone; “δ
O” is the rate of change of occupancy density; “P
S
i” is the sensor node power consumption in state S
i; and t
S
i
,
S
j is the transition time for state change from state S
i to S
j. If the occupancy density is very high (e.g., greater than 75% of the maximum capacity C) and the change of occupancy with respect to time is also increasing, the thermal zone is assumed to be the status of prime zone with high user comfort level and high energy consumption requirements. So, the sensor node will be in state S
0, with power level P
S
0 and with a sampling rate of 3 minutes. If the occupancy rate change is decreasing at least for a minimum time period t
S
t
h in which E
S
(
s
a
v
e
d
)
-
E
S
(
e
x
p
e
n
d
) is positive or if the density of occupancy retains greater than 50% for the specified time period given in the algorithm, then the power level is switched to P
S
1 and the sampling rate is set as 5 minutes. If the occupancy density is greater than 50% of the specified maximum with a decreasing rate of change or if the occupancy density is higher than 25%, the power level is changed to P
S
2 and a sampling rate is set as 10 minutes. If the zone is almost empty (<10% of C) or more than 25% with a decreasing rate of change for specified t
S
t
h value, then the power level is changed to P
S
3 and the sampling rate is set as 15 minutes.Algorithm 1
(1)if
δ
O
is  positive  then
(2)switch  O  do
(3)case  O
>
75
%
(4)
P
S
i  is  P
S
0
; zone status: P; sample rate: 3 min.
(5)case  O
>
50
%
(6)
if  t
S
i
>
t
S
th  then
(7) P
S
i  is  P
S
1
; zone status: N; sample rate: 5 min.
(8)
end if
(9)case  O
>
25
%
(10) if  t
S
i
>
t
S
th  then
(11)  P
S
i  is  P
S
2
; zone status: M; sample rate: 10 min.
(12) end if
(13)case  O
>
10
%
(14) if  t
S
i
>
t
S
th  then
(15)  P
S
i  is  P
S
3
; Zone status: V; sample rate: 15 min.
(16) end if
(17)else  δ
O
is negative
(18)switch  O  do
(19)case  O
>
100
%
(20) if  t
S
i
>
t
S
th  then
(21)  P
S
i  is  P
S
0
; zone status: P; sample rate: 3 min.
(22) end if
(23)case  O
>
75
%
(24) if  t
S
i
>
t
S
th  then
(25)P
S
i  is  P
S
1
; zone status: N; sample rate: 5 min.
(26) end if
(27)case  O
>
50
%
(28) if  t
S
i
>
t
S
th  then
(29)  P
S
i  is  P
S
2
; zone status: M; sample rate: 10 min.
(30) end if
(31)case  O
>
25
%
(32) if  t
S
i
>
t
S
th  then
(33)  P
S
i  is  P
S
3
; one status: V; sample rate: 15 min.
(34) end if
(35)end ifFigure 6
State transition times of sensors for switching power levels.


## 3.5. Distributed Controller Design

The local distributed controllers in the two-tier control structure (see Figures1 and 2) are linear switched controllers. The set point values are decided by the occupancy driven optimization algorithms run at central control block (first-tier). The central controller also decides sampling rates associated with priority status of the zone. A look up table comprising the set of gains for switched controllers, considering the network topology of the zones, and all the possible wireless link reliability statuses, is maintained at the local controllers.The set of gains which guarantees closed loop stability in the mean square sense is synthesized offline using semidefinite programming (SDP) in linear matrix inequality (LMI) solvers (see Figure2) such as YALMIP at the central control module [42]. Different sets of local control laws are derived for every possible network topology (that may arise due to the wireless link reliability status), eliminating the need of communication among distributed controllers to get the information of whole network, thus reducing the conservativeness of the control law. Model of packet dropouts based on a finite-state Markov chain is used in order to exploit the available knowledge about the stochastic nature of the network and improve the closed loop performance. Reliability of network links can be represented by means of an adjacency matrix (connectivity between sensors and actuators) Λ
=
[
λ
i
j
]
m
×
n with λ
i
j
∈
(
1,0
,
-
1
). Here, λ
i
j = “1” indicates ideal/reliable link between actuator-sensor pair (
i
,
j
), λ
i
j = “0” indicates no link, and λ
i
j = “−1” indicates a lossy/unreliable link where packet dropout occurs. Consider the linearized model of nonlinear building thermal system, which is assumed to be controllable and observable [48]. Linear time-invariant discrete-time system is given in (9). Consider(8)
x
k
+
1
=
A
x
k
+
B
u
k
,where x
=
[
x
1
,
…
,
x
n
]
T
∈
R
n is the state vector corresponding to the sensor outputs of measured temperature, light, and indoor air quality; u
=
[
u
1
,
…
,
u
n
]
T
∈
R
n is the input vector for actuators; k
∈
N is the time index; and A and B are system matrices. Assume that states and inputs are subject to the constraints with the maximum values. The goal is to find a state feedback gain matrix K
∈
R
m
×
n such that system (8) in closed loop with control input (9) becomes asymptotically stable. We have(9)
u
k
=
K
x
k
,where K
∈
R
m
×
n. The distributed control law allows actuators to exploit the local sensor measurements only as per the network topology. The structure of K depends on the network links as follows: (10)
λ
i
j
=
0
⟹
k
i
j
=
0
,where k
i
j is the (
i
,
j
)
th element of K.The lossy links are characterized by two-state Markov chains, resulting in dynamic network topology. This aspect is accounted using statistical means. LetL be the total number of unreliable links in the network. All the possible network topologies at a given time step k can be represented by replacing every “−1” in the adjacent matrix Λ with either “1” or “0,” thereby obtaining l
=
2
L matrices Λ
f
=
[
λ
i
j
]
m
×
n, f
=
1
,
…
,
l. The probability distribution of the network configurations has been computed using the two-state Markov chain (MC) for each link [42, 49]. Let the two states of the MC be represented as Z
1 and Z
2. The transition probability matrix of the Markov chain is represented as follows:(11)
T
=
q
1
1
-
q
1
1
-
q
2
q
2
=
t
i
j
2
×
2
,where t
i
j
=
Pr
⁡
[
z
(
k
+
1
)
=
Z
j
∣
z
(
k
)
=
Z
i
]. An emission matrix E
=
[
e
i
j
]
2
×
2
L with e
i
j
=
Pr
⁡
[
Λ
(
k
)
=
Λ
j
∣
z
(
k
)
=
Z
i
] is computed. The packet dropouts on the network links are assumed to be iid (independent and identically distributed) random variables with drop probability d
1 while in state Z
1 of the Markov chain and with drop probability d
2 while in state Z
2. All the unreliable links are mapped as ideal links or no links in Λ
f
,
f
=
1
,
…
,
l. Clearly, we have to design two sets of control gains {
K
1,1
,
…
,
K
1
,
l
} and {
K
2,1
,
…
,
K
2
,
l
} and the switching control can be defined using these gains so that the closed loop system is asymptotically stable in the mean square. Now, we can write switching control law as shown in the following equation:(12)
u
k
=
K
1,1
x
k
i
f
z
k
=
Z
1
,
Λ
k
=
Λ
1
⋮
K
1
,
l
x
k
i
f
z
k
=
Z
1
,
Λ
k
=
Λ
l
K
2,1
x
k
i
f
z
k
=
Z
2
,
Λ
k
=
Λ
1
⋮
K
2
,
l
x
k
i
f
z
k
=
Z
2
,
Λ
k
=
Λ
l
.Mean square stability condition is given as follows:(13)
E
V
x
k
+
1
-
V
x
k
≤
-
x
k
T
Q
x
x
k
-
E
u
k
T
Q
u
u
k
,where Q
x
∈
R
n
×
n and Q
u
∈
R
m
×
m are weight matrices; V
(
x
) is a switching stochastic Lyapunov function for the closed loop NCS and it is defined as (14)
u
k
=
x
k
T
P
1
x
k
i
f
z
k
=
Z
1
x
k
T
P
2
x
k
i
f
z
k
=
Z
2
.The expectations in (13) can be written as(15)
E
V
x
k
+
1
=
∑
f
=
1
l
∑
z
=
1
2
e
j
f
t
j
z
x
k
T
A
+
B
K
j
,
f
T
P
z
A
+
B
K
j
,
f
x
k
,
E
u
k
T
Q
u
u
k
=
∑
f
=
1
l
e
j
f
x
k
T
K
j
,
f
T
Q
u
K
j
,
f
x
k
.By substituting P
j
=
γ
Q
j
-
1, K
j
,
f
=
Y
j
,
f
Q
j
-
1
∀
j
,
f, we can translate (13) to an appropriate LMI condition, and, by solving it through SDP problem [42], the required gains K
j
,
f where j
=
1,2
,
f
=
1
,
…
,
l, are obtained. The controller performance is evaluated in terms of the accumulated stage cost over k
=
1 to k
=
k
m
a
x and is given by(16)
J
=
∑
k
=
1
k
m
a
x
Q
x
x
k
2
+
Q
u
u
k
2
.


## 4. Simulation Results and Discussion

Performance evaluation using simulation for fuzzy rule base, EY-Wi-Fi, NSGA-II, and controllers are discussed in this section. Fuzzy logic rules were framed to find zone status and weights based on the current occupancy status. Simulation was done using FIS editor of MATLAB. Figures7-8 show the occupancy and change of occupancy as the input variables with trapezoidal and triangular membership functions and weight and priority as the output variables with triangular and singleton output membership functions depicted in Figures 9-10, respectively.Figure 7
Membership functions for fuzzy input variables.Figure 8
Membership functions for fuzzy input variables.Figure 9
Membership functions for output variables.Figure 10
Membership functions for fuzzy output variables.NSGA-II algorithm simulation was done in MATLAB with the parameters given in Table4. The curve fitting has been done for obtaining the energy function based on the data given in [50]. The zone’s various sensor reference values are taken as 70 (K), 750 (lux), and 800 (ppm), respectively. Figures 11–13 show simulation results for P, N, and V zones with energy consumption versus ODF Pareto-optimal fronts. In P-zone, discomfort values are smaller (high user comfort value) and power consumption is higher than that of other zones. The power consumption is reduced in normal/minimal/vacant zones at the cost of increase in occupant discomfort factor. From the obtained Pareto-optimal front values we can choose the desired parameter set values corresponding to the occupancy status of the zones. The whole building’s energy consumption and user comfort can be obtained through the summation of individual zones’ energy consumption and user comfort functions. Energy saving of the proposed architecture is found varying based on the variation in occupancy levels.Table 4
Parameters of NSGA simulation.
Parameters
Values
Population size
100
Generations
100
Pool size
50
Crossover distribution index
20
Mutation distribution index
20Figure 11
Pareto-front for P-zone.Figure 12
Pareto-front for N-zone.Figure 13
Pareto-front for V-zone.For illustrating the claim, zones shown in Figure1 are categorized into prime zone (maximum power consumption, P
m
a
x = 48 KW); normal activity zone (P
m
a
x = 37 KW); and vacant zone (P
m
a
x = 13 KW), obtained from the Pareto-fronts depicted in the figures while selecting the values corresponding to the maximum occupant comfort level. Obtain 31% of energy savings compared with the case in which all the zones were treated as prime zones.Implementation of EY-Wi-fi [41] in ns-3 simulator [51] was used for performance evaluation of channel access protocol. The protocol parameters were chosen following the study in [52]. The channel access for the case of four nodes is shown in Figure 14. The plots show the duration of transmission for each node (“ON” represents channel listening/receiving, and “OFF” represents transmission) with time. Node 2 belonging to a prime zone in Figure 14 has the longest elimination burst and survives to the yield period. Node 2 wins the contention in yield phase also and begins its data packet transmission. At the end of the transmission of node 2, node 1, which belongs to another prime zone, tries to gain access to the channel again. It sends a burst signal of longer sequence now, and thus it wins the contention and starts data packet transmission. In this fashion, all the nodes transmit their data. Comparison of the performance of IEEE 802.11e and EY-Wi-Fi is shown in Figures 15-16, respectively. Probability of a node to win the contention using 802.11e is 0.1726 and the probability of collision is obtained as 0.1465. But the probability of a node to win the contention using EY-Wi-Fi is 0.4630 with a probability of collision equaling 0.0841. Hence, the performance of EY-Wi-Fi is found better.Figure 14
Transmission activity of sensor nodes.Figure 15
Probability of win for a node with 802.11e.Figure 16
Probability of win for a node with EY-Wi-Fi.The distributed and decentralized controllers were tested using randomly generated matrices forA
8
×
8 and B
8
×
3 (which could not be included due to space limitation). The performance of the proposed controllers was evaluated through simulation using WIDE toolbox [53] in MATLAB platform. Network topology with three unreliable links and network topology with six unreliable links were considered. The performance indices taken are the minimum cost J in (16) to reach the stable equilibrium state of the system and the CPU time (in seconds) expended for that.Adjacency matrixΛ
1 is (17)
1
1
1
0
-
1
0
0
0
0
0
-
1
0
1
1
0
0
0
0
-
1
0
0
0
1
1
.
Adjacency matrixΛ
2 is(18)
1
-
1
1
0
-
1
0
0
0
0
0
-
1
0
1
-
1
0
0
0
0
-
1
0
0
0
-
1
1
.The results of 30 simulation runs are tabulated in Table5. The distributed stochastic controllers have got a higher performance cost value as the network links become more and more unreliable. That is, more control effort is needed to bring back the system to the stable equilibrium state when the unreliability is increased. Figures 17-18 show the poles of the system obtained by the synthesis of distributed stochastic controllers with two topologies. Initially the system was made unstable with one pole lying outside the unit circle. Open loop poles are marked using “×” and closed loop poles are marked using “0.” The CPU time required to solve SDP to find decentralized controller gains, which guarantee stability, also shoots up, if there are more number of unreliable links. We have run the simulation on Intel i5, 2.5 GHz processor with 4 GB RAM.Table 5
Controller performance for different topologies.
Topology 1
costJ
1859
CPU time (sec)
1024
Topology 2
costJ
2390
CPU time (sec)
2696Figure 17
System poles for topology 1.Figure 18
System poles for topology 2.Even though the performance of the proposed techniques could not be evaluated on experimental basis as that of now, we believe firmly that the proposed methods can achieve energy savings in the wirelessly networked building zones with varying dynamic occupancy patterns.


## 5. Conclusion

In this paper, a new architecture of CPS for occupancy based wireless networked Intelligent Building Automation System has been proposed with the objectives to maximize the occupant comfort and minimize the total energy consumption. The proposed architecture is suitable for the dynamically varying occupancy patterns in the shared spaces of commercial buildings. Fuzzy logic system and NSGA-II are used to identify the prime zones (where higher occupancy with large variation occurs) and to optimize the energy requirement of zones. EY-NPMA scheme with 802.11 wireless LAN enables us to prioritize prime zones’ traffic and hence minimize the channel access delay. The distributed local controller design ensures stability of system even in the presence of unreliable network links. More efforts are needed to incorporate estimation algorithms for occupancy based demand control of intelligent building automation. In future we plan to include the design and analysis of model predictive controllers, and investigating a suitable mathematical thermal model of building zones also.



---

*Source: 132182-2015-09-27.xml*