Application of distributed lighting control architecture in dementia-friendly smart homes

Dementia is a growing problem in societies with aging populations, not only for patients, but also for family members and for the society in terms of the associated costs of providing health care. Helping patients to maintain a degree of independence in their home environment while ensuring their safeties is considered as a positive step forward for addressing individual needs of dementia patients. A common symptom for dementia patients including those with Alzheimer’s Disease and Related Dementia (ADRD) is sleep disturbance, patients being awake at night and asleep during the day. One of the problems with night time sleep disturbance in dementia patients is the possible accidental falls of patients in the dark environment. An issue associated with un-hourly sleeping behavior in these patients is the lighting condition of their surroundings. Clinical studies indicate that appropriate level of lighting can help to restore the rest-activity cycles of ADRD patients. This study tackles this problem by generating machine learning solutions for controlling the lighting conditions of multiple rooms in the house in different hours based on patterns of behaviors generated for the patient. Several neural network oriented classification methods are investigated and their feasibilities are assessed with a collection of synthetic data capturing two conditions of balanced and unbalanced inter-class samples. The classifiers are utilized within two centric and distributed lighting control architectures. The results indicate the feasibility of the distributed architecture in achieving a high level of classification performance resulting in adequate control over lighting conditions of the house in various time periods. Keywords—Smart Home; Ambient intelligence; Machine Learning; Distributed Learning


I. INTRODUCTION
Intelligent health-care technologies often include utilizing smart devices or systems tuned to operate optimally under some specific conditions, fuse and interpret information, and make decisions that benefit the patients' care.In the context of smart home, such smart devices interact with each other through "plug and play" mechanisms, intelligent software agents and inter-connection messaging protocols.Smart home is an attractive concept with many potentials and applications in intelligent health-care due to its ability to provide cognitive assistance whenever required 1 , 2 .In this study, we investigate feasibility of smart lighting control for improving living conditions of dementia patients in the context of smart home.
The effectiveness of traditional verbal commands/prompts may be questioned especially for individuals with advanced Alzheimer's disease and Related Dementia (ADRD).Sleep disturbance is a common problem in ADRD patients that can cause possible accidental falls of patients in the dark environment [7].It is reported that 40% of patients suffering from dementia also suffer from sleep disorder and being frightened from room darkness while being incapable of turning on the lights 3 .Smart control over lighting conditions of patients' surroundings can effectively improve their quality of life due to minimizing chances of such accidents while allowing the patients to be less dependent to constant presence of caregivers.
This study focuses on investigating the feasibility of machine learning solutions for controlling the lighting conditions of multiple rooms in the house in different hours.This is to be facilitated by creating patterns of behaviors for the patients and carers and tuning the lighting conditions to the patients needs.In a small scale (single room or a small house), fuzzy logic systems are ideal candidates for developing a smart lighting condition monitoring and controlling system due to their design simplicity and their performance accuracy.However, extending such designs to larger scales such as special hospitals with multiple patients and multiple rooms might be problematic due to the required tedious design adaptation stage.
In this study a distributed lighting control architecture is proposed and its feasibility is assessed against a commonly used centric architecture.The study considers a set of synthetic data and investigates the potential of several classification methods.In order to provide clear indication on overall performance of the system both balanced and unbalanced data sample conditions are considered.
The structure of this paper is as follows: related works are presented in Section II.The architectural design is reported in Section III.The procedures considered for generating the synthetic data that is utilized in this study are discussed in Section IV.The results are reported in Section V and the final conclusions and the future works are discussed in Sections VI and VII.www.ijarai.thesai.org

II. RELATED WORK
In the context of smart lighting control, Nagy et al [6] proposed an occupant centric lighting control strategy that utilizes occupant specific set-points with fixed minimum and maximum illuminance threshold set to the satisfaction of each occupant.The results indicated that within a six weeks duration in an environment with 10 offices total of 37% energy savings is achieved using the proposed strategy.
Gopalakrishna et al [8] investigated the use of prediction methods (decision trees) for intelligent lighting control in an office environment.The study is conducted on the basis of synthetic data within a large environment with 2 different areas for resting and having informal meetings.Various sample sizes in the range of 100 to 50k are considered with each sample reflecting mixtures of six sensory inputs.Although systematic experimentation is carried out to identify the maximum number of samples required to make an informed decision, the results are questionable due to possible repetition of samples caused by limitations imposed from using non-numeric sensory values.
In the context of smart home and elderly care, Mahmoud et al [1] investigated implications of various soft computing approaches for generating patterns of occupancy behaviour and predicting upcoming abnormal behaviours.The study considered both synthetic and physical data and identified nonlinear autoregressive network with exogenous inputs as an ideal type of recurrent neural network for the prediction and forecasting task.
Lotfi et al. [2] investigated the use of simple network of sensors to monitor the behavior elderly people suffering from dementia with a focus on improving their ability to live independently.Standard home automation sensors such as motion and door entry sensors are utilized.Abnormal behaviors are identified using the acquired data and recurrent neural network is employed to forecast the upcoming events and possible sensory readings.Utilizing such predictions, the system transit certain messages to the caregivers informing them about any possible abnormal behavior in the near future.
In the context of smart home, Dawadi et al [3] and [4] utilized a machine learning based approach for monitoring the well being of individuals and assessing their cognitive health.combinations of principle component analysis, support vector machine, and logistic regression methods are utilized to assess the quality of an activity performed by participants.The study gathered sensory data from 263 participants and using the hybrid machine learning mechanism achieved a meaningful classification performance distinguishing two classes of dementia and cognitive healthy.The mixture of door, item, power usage, and motion sensors combined with activity time log are utilized to represent the activities conducted by participants.Similar study is conducted by Dawadi et al [5].In the study sets of activities are defined and after their completions with participating elderly people, features representing each of the activities performed are assessed separately with machine learning based predictive models that are pre-trained only with features of such activity.The study considered Naive Bayse, J48, SMO, and Neural Network approaches among which Naive Bayse and Neural Network methods performed better than others.

III. SYSTEM ARCHITECTURE FOR DEMENTIA FRIENDLY SMART HOUSE
As mentioned earlier, in this study, a machine learning paradigm capable of providing intelligence control over lighting condition of a smart house is to be designed.Figure 1 depicts an schematic layout of the environment being consider in the study.In this study, two different designs are considered.In the first architecture, a single learning mechanism, e.g. a variation of Artificial Neural Network (ANN), with sufficient number of output nodes that is capable of handling the lighting condition of all rooms in the house is considered.The layout of this architecture is depicted in figure 2. Although this architecture is commonly employed in literature, such an architecture suffers from lack of flexibility.That is, similar to a fuzzy-based controller, adaptation of such system to a larger scale problem, e.g.controlling the lighting condition of a hospital for example, is likely to be tedious and problematic.
In order to provide a flexible and reconfigurable learning mechanism capable of being adapted to larger scale problems with minimum adaptation effort, an alternative architecture is proposed.In this architecture, the lighting condition of each room in the house is to be controlled by a separate classifier.That is, in this architecture, the lighting control is distributed across the rooms in the house.The structural design of this architecture is illustrated in figure 3.In here, the learning is distributed across classifiers that are controlling the rooms' lighting conditions.As a result, although the samples are to be representative of the status of the entire house, however, the expected reactions in terms of changes in the lighting conditions within each room are to be varied.This is facilitated by providing separated labels for each room with each sample (training and/or testing).The resulting distributed architecture www.ijarai.thesai.org is highly flexible and re-scalable.

IV. SYNTHETIC DATA
This section presents the procedures followed for generating the synthetic data.In this study, following sensory inputs are considered: • Light Detection Range (LDR) sensor: The range of sensory outputs for this sensor is assumed to be varied by time.That is, the 24 hour (day) is divided to 6 equal length periods (4 hours length each).The sensory reading within each period follows normal distribution within period-specific ranges.These periods, their associated ranges and values are presented in table I.
• Thermal camera: The camera detects whether the patient or the caregivers are present in a room.Considering a house with 4 rooms, a binary representation is utilized in which bits with 0 and 1 values respectively represent absence and presence of patient and/or caregivers.
• Displacement sensor: the sensor detects if the patient is on bed.Similar to the LDR sensor, 6 periods of 4 hours long are considered and the sensory readings within each period follow normal distribution within a certain range.These periods and their associated ranges are presented in table II.Although all the ranges are selected arbitrary however, they are deliberately set to overlap each other.
In this study, each sample represents sensory readings originating from LDR, displacement and thermal sensors.The Figure 4 depicts the rules utilized for generating room specific labels for each sample.Two sets of datasets capturing balanced and unbalanced condition within inter classes of 'Lights Off', 'Half Bright' and 'Lights On' are considered.The choice of considering both balanced and unbalanced conditions is made due to difficulties associated with conducting complete recording sessions with patients suffering from dementia.That is, in such patients, it often happens that the data collection procedures are left uncompleted with only a sub-set of samples recorded due to inability or unwillingness of the patients to finish the tasks or recording sessions.As a consequence, it is considered advantageous for a system to be able to maintain some degree of efficiency with both balanced and unbalanced sampling conditions.

V. EXPERIMENTS & RESULTS
As mentioned in previous sections, two neural network oriented architectures of centric and distributed are considered in this study.Two sets of experiments are considered in this section to help investigating the feasibility of these two architectures with unbalanced and balanced synthetic datasets.Four well-known variations of ANN (Perceptron, Single hidden layer feed-forward neural network (SLNN) with 80 hidden nodes, Probabilistic neural network (PNN) and Multilayer feed-forward back-propagation neural network (MLNN) with three hidden layers with 40, 20 and 20 nodes in each hidden layer respectively) are considered.The first experiment investigates the feasibility of the proposed architectures under unbalanced sampling condition.To do so, sets of 100 datasets utilized in this experiment are deliberately altered in a way to lack inter class balance within samples.That is, in all datasets, high percentage of samples in training and testing sets represent 'Lights Off' class.In the training set, the percentage of samples reflecting 'Lights Off' class in rooms one to four are set to 90%, 70%, 68% and 68% respectively.This distribution is in the range of 75%, 65%, 60% and 60% across rooms one to four respectively in the testing sets.
The overall results achieved with the centric architecture is reported in figure 5.In order to provide consistency with the distributed architecture in terms of general performance visualization, the performances are broken-down between rooms.The results indicate overall superiority of PNN across rooms closely followed by MLNN.A clear performance difference is observed between the first room (the room with a bed for the dementia suffering patient) and the other three rooms in the house.
Applying N-way ANOVA to the results revealed statistical significance across classifiers (p=1.61728e−019 ) and rooms

B. Experiment 1: Unbalanced Data, Distributed Architecture
In this section the classification performance achieved with the introduced distributed architecture using the generated unbalanced synthetic data are reported.The results are illustrated on the basis of average accuracy achieved and it is categorized on the basis of the rooms in the house (see figure 8).As mentioned in previous sections, the classification approaches considered in the study includes Perceptron, Single-Layer NN, Probabilistic NN, and Multi-Layer NN.First, the differences between the performances achieved with various classifiers in each room are discussed and later the inter-class performance of the classifiers are reported.
The results indicate overall superiority of PNN across rooms followed by MLNN.Considering the best performing classification method in experiment 1, e.g.PNN, comparison between results presented in figures 5 and 8 indicate a clear advantage over using the distributed architecture.It is noteworthy that unlike the clear performance difference of PNN observed across rooms in centric architecture, such performance degradation is less obvious when the distributed architecture is utilized.siderably higher share of training samples compared with the other 2 conditions.This results in developing learning models that are incapable of recognizing and predicting 'Lights On' and 'Half Bright' conditions since their training is highly biased towards the 'Lights Off' condition.Similar effect reported with testing sets indicate that the classification performance achieved from various classifiers studied in previous sections are likely to represent how well they can identify the 'Lights Off' condition rather than their ability to adequately distinguish the three conditions from each other.

C. Experiment 2: Balanced Data, Centric Architecture
Considering that the results of TP, TN, FP, and FN conditions in experiment 1 indicated the variation in the performance across classifiers due to having unbalance/unequal number of training samples from different classes, the conclusion of PNN being the best performing classifier is at best restricted to the condition of lacking adequate balance between training samples.In order to better understand the feasibility of these methods for the dementia-friendly smart home scenario identified in the study, in here, the first experiment is repeated with new sets of synthetic datasets with balanced training and testing samples.
Figure 11 reports average classification performances (across 100 datasets) achieved by the classifiers under centric architecture with balanced datasets.The results indicate consistent average classification performance across classifiers in all rooms with the exception of PNN that reached to the best average classification performance in room 1 while it consistently performed poorly in all other rooms.From comparison of results presented in figures 5 and 11 it is noteworthy that with the exception of PNN, all other classifiers have considerable improvement in their average classification performances across all rooms with MLNN showing the highest performance improvement.It is also noteworthy that with the exception of room 1 in which PNN outperformed all other methods, a considerable performance degradation is observed in PNN in all other 3 rooms.
Closer look at the differences between reported inter-class performances in figures 12,13 and 6,7 reveals a noticeable  in FPs across rooms 2 and 4 in 'Lights On', 'Half Bright' and 'Lights Off' conditions with PNN.This phenomenon is followed by considerable increased TPs in rooms 1 and 3 under 'Lights On' and 'Half Bright' conditions.Finally, it is noticeable that although PNN reported increment TN in rooms 1 and 3 under 'Lights Off' condition, the decrement in TNs across all rooms under that condition is another reason behind the declined classification performance.Unlike PNN, MLNN showed consistent decrease of FNs and increased TNs in most cases.Similarly, SLNN reported declines in FPs and FNs and increases in TPs and TNs (only under 'Lights Off' condition).
Applying N-way ANOVA to the results revealed statistical significance across classifiers (p=0) and rooms (p=0) and their interactions (p=0).The results indicate statistical significance among all classifiers.Between rooms, with exception of rooms 1 that is significantly different from all other rooms, no other statistical significance is observed.Comparison between results achieved with the centric (figure 11) and the distributed (figure 14) architectures indicate clear performance improvement when the distributed

VI. CONCLUSION
Dementia is a growing problem in societies with aging populations due to intense level of care required and the associated costs in order to facilitate such care.Providing a safe environment in which the dementia patients (who are in the earlier stages of the disease) can live independently can improve the patients quality of life.Sleep disturbance is a common symptom in dementia patients.Patients inability to turn on the light by themselves, being frightened by room darkness, and possible accidental falls are some of the issues associated to such sleep disturbance.Clinical studies indicate that appropriate level of lighting can help to restore the rest-activity cycles of these patients.This study proposed a distributed learning mechanism on the backbone of machine learning solutions to address the required lighting control.The proposed architecture considered a collection of learning methods (classifiers) each being responsible to handle the lighting condition of a single room in the house.This architecture is scalable and provides efficient and smart control over lighting condition of multiple rooms in the house.An alternative lighting control architecture, called centric architecture, that employs a single learning mechanism, e.g. a classifier, to control the lighting condition of all rooms in the house is considered to assess feasibility of the proposed distributed architecture.
Four classification methods are considered and their feasibilities are assessed using a collection of synthetic data.Two sets of experiments reflecting balanced and unbalanced data sampling scenarios for a smart house with four rooms are designed.The samples reflected multiple scenarios with www.ijarai.thesai.orgpossibility of having a dementia patient and caregiver in different rooms of the house.The results indicated the feasibility of such distributed control approach for controlling the lighting conditions of multiple rooms irrespective to each other.Probabilistic neural network is identified as the most feasible classification method for such an architecture.

VII. FUTURE WORK
Several future directions can be considered for the current study including assessing the robustness of the distributed architecture proposed in this study in higher scale environments such as special dementia facilities and hospitals with multiple patients with higher variety of patients' behavioural patterns.Another possible future direction is to introduce more complex scenarios capturing more than three lighting conditions (e.g., Lights on, Lights off, and Half Bright) as well as extending the current architecture to cover multi-objective scenarios in which in addition to addressing the lighting needs of the patients and caregivers the overall energy consumption is reduced.The stated future directions are in addition to obvious necessity of assessing the feasibility of the architecture proposed in the study against real-world data to be captured from activities of real patients interacting with the system.

Fig. 1 :
Fig. 1: A sample layout of a house with four rooms being considered in this study.

Fig. 2 :
Fig. 2: Structural design of the system for a house with 4 rooms.The centric architecture.

Fig. 3 :
Fig. 3: Structural design of the system for a house with 4 rooms.The distributed architecture.

Fig. 4 :
Fig. 4: Description of rules utilized for generating room specific labels for every given sample.

Fig. 5 :
Fig. 5: Average classification accuracy achieved with the centric architecture on unbalanced datasets across four rooms in the house using variations of ANN.

Fig. 6 :
Fig. 6: Inter-class performances achieved with Perceptron and Single-Layer NN unbalanced datasets and centric architecture.

Fig. 7 :
Fig. 7: Inter-class performances achieved with Probabilistic and Multi-Layer NNs unbalanced datasets and centric architecture.
Applying N-way ANOVA to the results revealed statistical significance across classifiers (p=3.81547e−132 ) and rooms (p=5.44377e−8 ) and their interactions (p=2.03979e−23 ).The results indicate statistical significance among all classifiers and all rooms.Figures 9 and 10 present inter-class confidence of the classifiers using a representation inspired by table of confusion.It is noteworthy that Perceptron, SLNN, and MLNN are performing similarly on both centric and distributed

Fig. 8 :
Fig. 8: Average classification accuracy achieved with the distributed architecture on unbalanced datasets across four rooms in the house using variations of ANN.

Fig. 9 :
Fig. 9: Inter-class performance achieved with Perceptron and Single-Layer NN unbalanced datasets and distributed architecture.

Fig. 11 :
Fig. 11: Average classification accuracy achieved with the centric architecture on balanced datasets across four rooms in the house using variations of ANN.

Fig. 12 :
Fig. 12: Inter-class performances achieved with Perceptron and Single-Layer NN balanced datasets and centric architecture.

Fig. 13 :
Fig. 13: Inter-class performances achieved with Probabilistic and Multi-Layer NNs balanced datasets and centric architecture.

D. Experiment 2 :
Balanced Data, Distributed ArchitectureThis section replicates the previous experiment by utilizing distributed architecture.Figure14 depicts the classification performance achieved by various classification methods in each room (averaged across all synthetic datasets).Similar to previous experiment, the datasets have inter-class balance in their training and testing sets.

Fig. 14 :
Fig. 14: Average classification accuracy achieved with the distributed architecture on balanced datasets across four rooms in the house using variations of ANN.

Fig. 15 :
Fig. 15: Inter-class performances achieved with Perceptron and Single-Layer NN balanced datasets and distributed architecture.