Abstract
Activity recognition plays a key role in providing activity assistance and care for users in smart homes. In this work, we present an activity recognition system that classifies in the near real-time a set of common daily activities exploiting both the data sampled by sensors embedded in a smartphone carried out by the user and the reciprocal Received Signal Strength (RSS) values coming from worn wireless sensor devices and from sensors deployed in the environment. In order to achieve an effective and responsive classification, a decision tree based on multisensor data-stream is applied fusing data coming from embedded sensors on the smartphone and environmental sensors before processing the RSS stream. To this end, we model the RSS stream, obtained from a Wireless Sensor Network (WSN), using Recurrent Neural Networks (RNNs) implemented as efficient Echo State Networks (ESNs), within the Reservoir Computing (RC) paradigm. We targeted the system for the EvAAL scenario, an international competition that aims at establishing benchmarks and evaluation metrics for comparing Ambient Assisted Living (AAL) solutions. In this paper, the performance of the proposed activity recognition system is assessed on a purposely collected real-world dataset, taking also into account a competitive neural network approach for performance comparison. Our results show that, with an appropriate configuration of the information fusion chain, the proposed system reaches a very good accuracy with a low deployment cost.
Introduction
Activity Recognition (AR) is an emerging research topic, which is founded on established research fields such as ubiquitous computing, context-aware computing and multimedia, and machine learning for pattern recognition. Recognizing everyday life activities is a challenging application in pervasive computing, with a lot of interesting developments in the health care domain, the human behavior modeling domain and the human-machine interaction domain [20]. Inferring the activity of the users in their own domestic environments becomes even more useful in the Ambient Assisted Living (AAL) scenario, where facilities provide assistance and care for the elderlies and the knowledge of their daily activities can ensure safety and a successful aging.
From the point of view of the deployment of activity recognition solutions, we recognize two main approaches depending on whether the solution adopts wearable devices or not. The first kind of solutions generally use sensors (embedding accelerometers, or transducers for physiological measures) that make direct measures about the user movements. For example, a sensor placed on the user ankle may detect the number of steps based on the response of an embedded accelerometer that is shaken with a specific pattern every time the user makes a step. On the other hand, the disadvantage of this approach is that wearable devices can be intrusive on the user, even if, with recent advances in technologies of embedded systems, sensors tend to be smaller and smaller. Solutions that avoid the use of wearable devices instead, are motivated by the need for a less intrusive activity recognition systems. Among these solutions, those based on cameras are probably the most common [38]. However, even though this approach is physically less intrusive for the user, it suffers from several issues: low image resolution, target occlusion and time-consuming processing, which is still a challenge for real-time activity recognition systems. Furthermore, user privacy is also an important issue, especially if cameras are used to continuously monitor the user itself. More recently, a new generation of non wearable solution is emerging. These solution exploits the implicit alteration of the wireless channel due to the movements of the user, which is measured by devices placed in the environment and that measure the Received Signal Strength (RSS) of the beacon packets they exchange among themselves [14,60].
In this paper we propose an Activity Recognition system based on Multisensor data fusion (AReM) that makes use of both the approaches. Specifically, we use wearable and environmental sensors and we base the recognition of the user activity both on accelerometers embedded on the wearable sensors and on the RSS of the beacon packets exchanged between all the sensors (both wearable and environmental).
From the algorithmic point of view, the need for knowledge discovery of temporal patterns from potentially large amounts of raw sensor data has recently led to an increasing use of Machine Learning models in activity recognition systems (see e.g. [46] for a recent survey). In this context, the class of neural networks [27] provides an interesting range of models and architectures that are able to effectively learn in sequential data domains, with characteristics of robustness to noise and heterogeneity in the input sources considered. Neural networks for learning in sequential domains are particularly appropriate to deal with the characteristics of the tasks and the information involved in activity recognition applications, including methods based on windowing strategies, such as Time Delay Neural Networks (TDNNs) and Input Delay Neural Networks (IDNNs) [83,84], and methods based on explicit feedback connections in the class of Recurrent Neural Networks (RNNs) [39,78]. In particular, RNNs are widely used to process and capture dynamic knowledge from sequential information, allowing to provide predictions which depends on the temporal history of the input signals. Based on the short-term history of the signals received in input, RNNs are used in the context of human activity recognition to produce output values that represent classification labels/values corresponding to a target human activity. In this paper, within the class of RNNs, we take into consideration the efficient Reservoir Computing (RC) [52,82] paradigm in general, and the Echo State Network (ESN) [33,34] model in particular. The ESN model is supported by theoretical investigations (see e.g. [25,77]) and by hundreds of relevant successful experimental studies reported in literature (see e.g. [53,82]). Recently, RC models have proved to be particularly suitable for processing noisy information streams originated by networks of heterogeneous sensors, resulting in successful real-world applications in tasks related to AAL and human activity recognition (see e.g. [2,5,9,19,61]), and allowing to successfully build intelligent sensor networks tailored to specific activity recognition contexts, as testified by the recent successful results of the RUBICON Project [3,6] and detailed in Section 2.
The proposed activity recognition process is realized by the means of two layers of classification. The first classification layer, represented by a custom decision tree algorithm, detects a subset of activities and directs the flow of collected data to different Machine Learning modules. These modules represent the second layer of the processing chain, and are implemented as ESNs. An important aspect of our work consists in the use of common wireless sensor devices deployed in the environment in combination with wearable sensors embedding accelerometers, in order to increase the performance of the activity recognition system.
In order to test the performance of our activity recognition system, we presented a preliminary version of AReM to the third edition of the
This paper, based on ex-novo conducted experiments, extends the preliminary investigations presented in the conference paper [61], by proposing a more structured classification process and a complete performance analysis on a larger set of user activities, evaluated under different settings of the activity recognition system, also considering a competitive Machine Learning approach for performance comparison. Furthermore, an improved communication infrastructure is also proposed.
The rest of the paper is organized as follows. In Section 2 current trends and related works are presented, Section 3 describes the overall architecture of the AReM activity recognition system, Section 4 describes the steps of the refinement process of the system through the real test site experiences, and Section 5 goes into the details of the refined system’s performance focusing on ESNs outcomes. Finally, Section 6 draws the conclusions.
One of the main goals of AAL systems is the detection of human activity. This can be achieved by means of different tools and technologies spanning from smart homes (regular homes augmented with various type of sensors, including cameras, and actuators), mobile devices, and wearable sensors [72]. The activity itself can be represented and recognized at different resolutions, such as a single movement, action, activity, group activity, and crowd activity. The degree of the resolution should be chosen properly, according to the particular tool to be deployed. In the case of tools assisting the elderly doing rehabilitation tasks, a fine-grained resolution is needed in order to recognize the particular movement performed. Such systems, even though present an higher level of obtrusiveness (robotic tools [41]) or privacy issues (cameras [18,44]), are normally accepted since they are seen by the user as medical equipment with a precise and temporary scope. Within the broader context of a long-term monitoring AAL system, it is expected to be up and running all day long and over long periods of time in order to prevent cognitive or physical deterioration of the user. In this scenario, a system able to recognize simple activities (e.g. lying, sitting, standing, walking, bending, cycling, falling), instead of a single movement or action performed, is a good compromise between the possibility of inferring high-level activities (i.e. to infer activities of daily living) and the low level of obtrusiveness required together with the lower amount of data generated by the system. Furthermore, it enables short-term tasks dealing with in-home emergencies, like fall detection. In this field, solutions that make use of wearable and mobile sensors are the more established and studied [10,54,73]. Data are mostly gathered from accelerometer and gyroscope sensors in the form of time series. Simple actions such as walking, jogging, and running can be represented in the form of periodic time-series patterns. Important issues in these kinds of solution are the number of the devices to be deployed and their position on the user’s body. In [55], authors perform a study on how the position of the used device (embedding a triaxial accelerometer and a light sensor) influences the performance. They demonstrate that some positions are better for particular activities but confirm that there is not a generally valid position for all the possible activities to be recognized. Furthermore, in [80] authors suggest that for some activities more sensors improve the recognition. Also the use of ambient sensors has been deeply analyzed in the literature (e.g. [49,68,88]) in order to recognize more complex activities. In these solutions, a network of ambient sensors is usually used to model resident activities in the environment, as a sequence of sensor events. The main issue here is that the assumption of consistent predefined activities as a sequence of events does not hold in reality. Due to several physical, cognitive, cultural, and lifestyle differences, not all individuals perform the same set of tasks in similar sequences [72]. In order to overcome the deployment-related issues, we chose to use as primary data source the RSS of the beacon packets exchanged among a small set of wearable sensors (see Section 3.1 for the setting used in the experimentation) and some environmental devices placed in specific point of interests in the house related to the particular activity to be recognized (e.g. a device embedded in a stationary bike for the cycling activity). When used to infer close proximity and movements between near devices, the RSS is not so much affected by the particular orientation of the sensor’s antenna. Furthermore, the use of ambient sensors keeps the number of worn sensors low and it removes the constraint of predefined sequences of activations since they are only used to infer proximity to relevant point of interests.
Recently, Machine Learning techniques have found wide applications in building human activity recognition systems based on data generated from sensors. Depending on the nature of the treated data, of the specific scenario considered and of the admissible trade-off among efficiency, flexibility and performance, different Machine Learning methods have been applied in this application area [46]. From a learning perspective, human activity recognition problems often involve computational learning tasks characterized by a sequential nature. In this sense, the various estimations to be provided in relation to specific activities can be considered to be discernible basing on specific patterns of activations/values from a typically heterogeneous set of possibly noisy sensor sources (with potentially both continuous and discrete values), and based on the temporal order of such series. Focusing on supervised learning models for human activity recognition applications, a first example is represented by probabilistic-generative methods, including the family of Naïve Bayes classifiers and Hidden Markov Models (HMMs) [70] based classifiers, which have been applied to problems of daily-life human activity recognition (see e.g. [51,85,90]). However, the class of probabilistic-generative models often results to be severely limited in dealing with large amounts of low-level heterogeneous and noisy sensor data (see e.g. [57]). In this sense, discriminative methods often provide interesting approaches in terms of computational effort and predictive accuracy. For instance, the works in [37,71] make use of feed-forward neural networks for recognition of human activities from an accelerometer sensor placed on the waist of the user. Other works in the area of human activity recognition adopt Support Vector Machines (SVMs) [81]. For example, in [42] SVMs are used to approach an activity recognition problem considering a user in a smart environment with a variegate set of sensors. In [4,28,29] SVMs are used for problems of activity recognition using input from tri-axial accelerometer data. Some approaches, instead, are based on the use of multiple classification systems within a hierarchical activity recognition model (e.g. [23,47]). However, all these aforementioned discriminative approaches are based on learning models suitable for flat data domains, and therefore they are often restricted in the processing of sequential/temporal information. Other approaches which are also limited in the processing of dynamical information are based on decision tree models (e.g. [10,45,55]), instance based learning (e.g. [17]) or linear discriminant analysis (e.g. [67]).

The Activity Recognition multisensor processing chain.
On the other hand, in the neurocomputing area, neural network models for sequential domains processing represent good candidates for applications in human activity recognition problems, as they are characterized by the ability to effectively learn input-output temporal relations from a potentially huge set of noisy and imprecise heterogeneous streams of sensed data. In this context, delay neural networks are popular class of models [39], which represent temporal context using windowing/buffering techniques in conjunction with feed-forward neural architectures. In this concern, the IDNN model [83,84] represents a paradigmatic approach, and it is therefore considered in this paper for performance comparison with the proposed activity recognition system. Several works in literature report examples of applications of delay neural networks to problems in the field of human activity recognition, taking into consideration temporal windows with length typically in the range of 2–10 seconds. For example, in [43,65] delay networks are used to classify daily-life activities from accelerometer data, whereas a similar approach is used in [56] for human gesture recognition, and in [50] for recognition of workers activities. In [87] a delay network based approach is used to recognize human postures and activities from data collected by a smart-shoe device. More recently, in [74], delay neural networks are used for daily activity monitoring using accelerometer and gyroscope data generated by a smartphone. The versatility of IDNN based approaches in this context is also testified by applications in the area of animal activity recognition, as reported e.g. in [11,58,59]. Note, however, that windowing strategies adopted in delay neural networks may often imply several drawbacks, mainly related to the fact that the window length is a fixed a-priori defined parameter of the model, determining its memory length, i.e. the limit of the length of the longest sequences that can be successfully discriminated. An alternative approach is represented by RNNs architectures [39,78] with explicit recurrent connections, which are capable of dealing with sequential/temporal data through recursive processing based on the presence of feedback delay connections. As introduced in Section 1, a particular efficient approach to RNN training is represented by RC [52,82] networks, and in particular by ESNs [33,34]. Recently, promising results have been reported in applications of RC networks in the fields of AAL and human activity recognition. In this concern, the RC approach has been introduced and successfully experimentally assessed in tasks related to robot localization [19] and indoor user context localization in real-world environments from RSS data streams [5,7,8,26]. A further application of RC models for real-time user localization in indoor environments is presented in [12], in which by adopting a hybrid approach, RC networks have been showed to provide significant benefits to the accuracy of RSS-based localization systems. It is also worth mentioning the recent results of the European FP7 Project RUBICON [3,6], whose goal was to design and develop a self-learning robotic ecology made up of sensors, actuators and robotic devices. Within the aims of the RUBICON project, ESNs distributed on the low-powerful nodes of a Wireless Sensor Network (WSN) have been used to approach supervised computational tasks in the field of AAL, and pertaining to the classification of human activities, using input data streams coming from sensorized environments. In this context, the work in [2] describes the application of ESNs to a set of supervised tasks pertaining to the recognition of user daily-life activities, within an AAL real-life test bed scenario, including more than 50 sensors of different types. Moreover, an application of ESNs to adaptive planning for context-aware robot navigation is presented in [9]. Further applications of ESNs in the area of AAL are reported in [75], in which ESNs are used to classify physical activities in equestrian sports from a 3-axis accelerometer, a gyroscope and a magnetic sensor stripped to a horse rider wrist, and in [31], in which standard ESNs are used to estimate people count from multiple PIRs in indoor corridors at the Fraunhofer IAIS facilities. Overall, the aforementioned applications of the RC approach to problems in the area of AAL and human activity recognition show the potentiality of this methodology, still deserving further investigations and deep experimental assessment, in particular in combination with already established techniques in this specific application domain.
Following the recommendations of the technical annex of the
The proposed AReM activity recognition system can be described as a chain of processing steps, where each step is responsible for carrying out a particular task. The first task is to collect the raw data coming from the deployed wireless sensor network (WSN) and the inertial system embedded in the smartphone (Section 3.1). The data collected are forwarded to the next computational step by means of dedicated gateways exploiting the functionalities of the communication middleware (Section 3.2). Then the data are processed to extract significant features (Section 3.3), a first classification layer based on a custom decision tree is applied (Section 3.4), and finally the filtered data and features are given as input to dedicated learning modules, implemented by means of ESNs, for the final classification layer to provide the output activity (Section 3.5). The activity recognition chain presented in this paper is shown in Fig. 1.
We planned to use a sensor network that is partly worn by the user and partly deployed in the environment together with a smartphone carried out by the user. Specifically, we used four wearable (three part of the WSN and a smartphone) and one environmental sensors. The sensors composing the WSN are capable of measuring the signal strength of the incoming packets. The wearable sensors are placed on the chest and on the ankles of the user, while the smartphone was placed in the user’s trouser pocket. Furthermore, the WSN wearable sensors, which are connected in a clique, exchange among themselves beacon packets, with the purpose of measuring the respective RSS among themselves. The environmental sensor filters the beacon packets emitted by the wearable sensors to receive only to the beacons emitted by the sensor on the left ankle. The smartphone carried out by the user is used to exploit the data coming from the embedded inertial measurement system. All the data acquired by the wearable sensors are collected by the gateway that uses an instance of the communication middleware to transmit data to the other modules of the distributed system. The smartphone, instead, runs a mobile middleware instance.
The first classification layer is based on a custom decision tree, this classification technique has been successfully applied to activity recognition in numerous previous works [24,36,64,65]. It uses state-of-the-art techniques in order to discriminate a falling activity [16,48,69], to recognize the proximity of the user to a meaningful furniture in the environment [66], and to understand if the user is in a horizontal or vertical position [43].
The final activity classification is performed by ESN learning modules, which are dynamical neural networks able of directly processing temporal streams of sensed data generated by the nodes of the WSN (see Section 2). The internal parameters of the neural networks are adapted in a supervised fashion to the specific application by the means of learning on a sufficiently sampled training set of data, including both input data from the deployed sensors and ground-truth information, resulting in the definition of a learning task. Details on the ESN model can be found in Section 3.5.
Data collection
Recognizing human activities depends directly on the features extracted for motion analysis. In our activity recognition system we fuse information coming from inertial sensor embedded in a smartphone carried out by the user and the implicit alteration of the wireless channel due to the movements of the user, which is given by wireless sensors placed in the environment and on the user himself. These devices measure the RSS of the beacon packets they exchange among themselves in the WSN [14].
We collect RSS data using IRIS nodes embedding a Chipcon AT86RF230 radio subsystem that implements the IEEE 802.15.4 standard and programmed with a TinyOS firmware. Three of them are placed on the user’s chest and ankles, another one is placed on a furniture in the environment representing a meaningful place for a particular activity (i.e. a stationary bike for cycling activity recognition). For the purpose of communications, the beacon packets are exchanged by using a simple virtual token protocol that completes its execution in a time slot of 50 milliseconds [13]. A modified version of the Spin [89] token-passing protocol is used to schedule node transmission, in order to prevent packet collisions and maintain high data collection rate. When an anchor is transmitting, all other anchors receive the packet and perform the RSS measurements. The payload of the transmitting packet is the set of RSS values between the transmitting node and the other sensors sampled during the previous cycle. This packet has been received also by a sink node along with the node’s unique ID. The sink collects all the payloads for storage and later processing. The RSS values are acquired for a given channel c for all the nodes
We used the inertial system embedded in a Huawei G510 smartphone to collect accelerometer data. The smartphone inertial system worn by the user was placed along its sagittal plane and the sampling rate was set according to the SENSOR_DELAY_FASTEST setting of the Android operating system that for the particular model used has proved to be ≈70 Hz.
Communication middleware
The data collected through the WSN and the smartphone come from different hardware and communication protocols (i.e. the WSN sink running TinyOS, the desktop gateway running Linux operating system, the mobile gateway running Android system). In order to hide this hardware and software heterogeneity, we exploited the GiraffPlus [21] middleware capabilities in terms of service discovery and communication.

The bus-based communication middleware integration.
In GiraffPlus, the service discovery and communication functionalities are realized by intelligent buses, namely the context, service and control buses. All communications between services happen in a round-about way via one of them, even if, physically, the services are located on the same hardware node. Each of the buses handles a specific type of message/request and is realized by different kinds of topics. Topics are realized exploiting the communication connector interface based on the MQTT2
We integrated the inertial measurement system embedded in the smartphone using the mobile version of the GiraffPlus middleware running on Android devices [62], while the WSN sink was integrated in the system by means of the desktop version of the middleware [63] through an OSGi TinyOS wrapper.
Finally, we developed the AReM module as a GiraffPlus service that collects data exploiting the middleware context bus, processes the data extracting the requested features for the next steps of computation (Section 3.3), applies the decision tree (Section 3.4), and activates the selected ESN (Section 3.5).
As a result of the previous step we obtain data sampled at different frequencies with high dimensionality. Furthermore, consecutive values of a time series are usually highly correlated, thus there is a lot of redundancy. In this step of the activity recognition chain we extract the needed time-domain features to compress the time series and slightly remove noise and correlations. We choose an epoch time of 250 milliseconds according to the

A sample output sequence of the sensor data processing block.
The time-domain features extracted from these samples are shown in the Aggregate Values section of Fig. 3. They include the mean value and standard deviation for each reciprocal RSS reading from worn WSN sensors, the mean and standard deviation of the RSS between environmental node and left ankle worn sensor, the mean value of x and y axis accelerometer data and its max and min value magnitude over the 250 milliseconds time-slot. We consider the magnitude M as root-sum-of-squares of the three signals from the embedded tri-axial accelerometer sensor streaming expressed in g (9.80665 m/s2):

Structure of the decision tree fusion mechanism.
Starting from the output given by the sensor data processing block of the proposed activity recognition chain, we arrive to the decision of the user activity output applying to each time-slot data a first layer of classification using a custom decision tree classification algorithm. The decision tree is used to discriminate the sub-group of activities to be recognized by the specific ESN module (see Section 3.5) in the second layer of classification. The advantages of custom decision trees include low computation requirements, a simple implementation, and a good understanding of the classifier’s structure. The structure of the custom decision tree constructed is depicted in Fig. 4. The tree has three binary decision nodes and four leaf nodes, the latter representing the ESN to use except for the first one representing the falling activity.
The first decision node uses the magnitude M of the tri-axial accelerometer data to decide if a falling activity is happening. As proved in [16] the magnitude is a good measure to identify thresholds for falls detection. We define upper and lower fall thresholds as follows:
Upper Fall Threshold (UFT): set at the level of the smallest magnitude Upper Peak Value (UPV) of 100 falls recorded. The UFT is related to the peak impact force experienced by the body segment (thigh) during the impact phase of the fall. Lower Fall Threshold (LFT): set at the level of the smallest magnitude Lower Peak Value (LPV) of 100 falls recorded. The LFT is related to the acceleration of the thigh at or before the initial contact of the body segment with the ground.
Figure 5 shows the magnitude plot of one of the test made in the laboratory. Setting up a UFT of 2.74 g and a LFT of 0.6 g according to the results shown in [16], all the tests made were correctly recognized as falling activity. If the input data

Magnitude plot of the tri-axial embedded accelerometer, with thresholds used for falling detection. When stationary, the root-sum-of-squares signal from the tri-axial accelerometers is a constant +1 g.
The second decision node estimates the proximity [66] of the device placed on the user’s left ankle to one of the WSN node placed to the stationary bike. We define a device i to be in-range of device j if the received signal strength at j of the packet transmitted by i,

Acceleration plot for the vertical position.
The last decision node uses the x and y axis accelerometer mean values to determine if the user is in a vertical or horizontal position. As demonstrated in [43], it is clear that if the user is in a vertical or horizontal position, even if it exhibits periodic behavior related to the particular activity, he has distinctive patterns based on the relative magnitudes of the x, y, and z values. Figures 6 and 7 show that for vertical position activities like standing, walking, and bending keeping the legs straight (bending 1), the x relative magnitude

Acceleration plot for the horizontal position.

The two types of bending activity. Bending 1 on the left and bending 2 on the right.
In this paper, the activity recognition process is realized by the means of RNNs [39,78], which are dynamical neural networks models particularly suitable for processing temporal sequences of noisy data, such is the case of human activity recognition. In this context, RNNs are used to produce a classification output at each time step, based on the history of the RSS signals received in input. Based on a training set of data samples, learning is used to adapt the network parameters to the specific context and input patterns. As mentioned in Section 1, for RNN modeling we take into consideration the efficient RC paradigm [52]. This results in an approach which, on the one hand strongly reduces the computational cost of training, and on the other hand has been experimentally proved to be particularly effective in real-world problems pertaining to application contexts of interest for this paper, such are AAL and user/robot localization (see Section 2).
In this paper, within the RC/ESN paradigm, we focus on the Leaky Integrator ESN (LI-ESN) [35], which is particularly suitable for treating input data with the peculiarity of the RSS originated from a WSN [5,26].
The architecture of a LI-ESN is composed of an input layer with
At each time step t, the reservoir of the LI-ESN computes a state
At each time step t, the readout computes the output of the model
In particular, in this paper we consider the case of multi-classification learning tasks among K classes, where each class corresponds to one of the activities. In this case, every element in the output vector at time step t, i.e.
The readout is the only part of the LI-ESN which undergoes a process of training, typically by using efficient linear methods, e.g. pseudo-inversion and ridge regression [52]. The reservoir parameters are left untrained after a proper initialization under the constraints of the echo state property (ESP) [25,34]. A sufficient and a necessary condition for the ESP to hold are provided in literature [33,35]. In practical applications the sufficient condition is often considered too restrictive, and the necessary condition is generally considered for the initialization of the reservoir parameters. Such necessary condition states that the system governing the reservoir dynamics (Eq. (3)) is locally asymptotically stable around the zero-state. For the case of LI-ESN, the necessary condition for the ESP can be expressed as:
Fielding the system in a real smart environment
The proposed activity recognition system aims at becoming a robust solution for automatic and unobtrusive identification of user’s activities in AAL scenarios. Real-time monitoring of human movements could be a useful tool for many purposes and future applications such as life-log, health care or entertainment. To this purpose, we have performed a “deployment-and-evaluation” approach that includes different testbeds for each phase of development of the technology.
Specifically, we have conceived an approach that is based on the deployment and iterative refinement of the technology in three main steps. Once a prototype has been developed, it was first evaluated dealing with a subset of activities (i.e. standing up and down) in a laboratory settings. The results obtained in this phase are described in [61] and have been used to present the system to the
Starting from the encouraging results obtained in laboratory settings on the restricted set of activities, we performed further experiments in order to address the requirements of the
Figure 9 shows the sensors used for the measurement campaign, installed in the
Number of sequences for each activity in the Activity Recognition dataset

The sensors setup during the competition.
After the competition, the enhanced system presented in this paper was tested again under laboratory settings in order to perform a complete experimental assessment of the reservoir computing networks used for the activity recognition system, and to compare the obtained results with alternative methods (IDNNs) considered as baseline reference. The obtained results are illustrated in the following section.
Based on the overall architecture of the AReM system described in Section 3, here we describe the results obtained by the learning modules performing the activity recognition process. As described in Section 3.4, the fall detection mechanism in the AReM system is implemented by exploiting state of the art solutions. Therefore, for the purposes of assessing the performance of our RC-based activity recognition process, here we restrict the attention to the remaining activities: Bending1, Bending2, Cycling, Lying, Sitting, Standing and Walking. Moreover, the performance achieved with the proposed RC-based approach is compared with the one obtained using IDNNs, representing a popular paradigmatic approach in the field of neurocomputing models for application in human activity recognition problems (see Section 2). Through such a comparison it is also possible to investigate whether the use of a recurrent approach for learning in sequence domains (such is the case of RC), not limited to the use of finite-size windows for treating streams of input data (as instead is the case of IDNN), allows to effectively take advantage on the considered tasks.
For our experiments, we considered both the settings in which only the RSS data from the wearable IRIS sensors (see Fig. 1) are available to the ARS, and the case in which also data from additional sensors (additional environmental RSS and smartphone accelerometer) are available (see details in Section 3). In the former setting, referred in the following as RSS-based AReM setting, or simply RSS-based, all the aforementioned activities are considered, and classification of the user actions is performed by a single learning model. In the latter case, referred in the following as Heterogeneous AReM setting, or simply Heterogeneous, the augmented set of available data allows to apply the rule-based classification process described in Section 3, through the application of the decision tree in Fig. 4. According to the structure of the considered decision tree, the classification of the user activity is performed in this case by resorting to 3 learning models, each of which specialized by training on sub-groups of activities, and allowing a more accurate activity discrimination. Through a comparison of performances achieved under the RSS-based and the Heterogeneous settings, it is possible to experimentally assess the advantages brought by the availability of an augmented set of input data sources and by the design of the data fusion process, exploiting the specialization of the learning models trained on sub-sets of activities.
According to these settings, the collected Activity Recognition dataset described in Section 4 was used for the definition of different multi-classification learning tasks. In particular, 4 multi-classification learning tasks were arranged, the first one for the RSS-based ARS setting, and the remaining 3 for the different sub-systems of the Heterogeneous setting. Table 2 provides the information about the organization of the learning tasks based on the different settings considered.
Organization of the computational learning tasks and activities involved in the different ARS settings
Organization of the computational learning tasks and activities involved in the different ARS settings
For each learning task in Table 2, we split the available data into a training set and an external separate test set (for performance evaluation only). The number of sequences in the training set and in the test sets is 64 and 24, respectively, for the learning task in the RSS-based setting. For the learning tasks in the Heterogeneous setting, the number of sequences in the training and test sets is 22 and 8, respectively, for task 1, 27 and 10, respectively, for task 2, and 26 and 10 respectively, for task 3 (note that the Standing activity is present in both tasks 1 and 2). For each multi-classification learning task, the values of the hyper-parameters of LI-ESNs and IDNNs were selected (in order to maximize the K-class classification accuracy, see Eq. (11)) on a validation set, according to a holdout model selection scheme over the training set of data. For every task in Table 2, the number of sequences in the validation set was ≈25% of the number of sequences in the training set, i.e. 14 for the learning task in the RSS-based ARS setting, and 4, 6 and 6, respectively, for the three learning tasks in the Heterogeneous ARS setting.
For model selection purposes (on the validation sets), in our experiments with LI-ESNs we considered, for every learning task, networks with reservoir dimension
For what concerns the comparative experiments carried out using IDNNs, we considered networks trained using Back-propagation with learning rate
The predictive performance of the ARS systems proposed was assessed by computing accuracy and F1 score obtained for each learning task in Table 2, in accordance to the evaluating criteria of the
In the results reported in the following, performances (accuracy and F1 scores) were averaged, and standard deviations were computed, over the 5 reservoir guesses considered for each LI-ESN hyper-parametrization. Analogously, for the experiments with IDNNs the performance corresponding to each network setting was averaged over 5 different runs, corresponding to different initializations of the weight values from a uniform distribution in
The performance achieved by LI-ESNs on the multi-classification learning task corresponding to the RSS-based ARS setting is shown in Table 3, which reports the test per-class accuracy and F1 score for each activity, along with the averaged accuracy (Eq. (9)) and macro-F1 (Eq. (10)) of the resulting ARS system. For performance comparison, Table 3 also reports the performance achieved by IDNNs in the same experimental conditions. Moreover, the confusion matrices for the two cases of LI-ESNs and IDNNs are graphically illustrated in Fig. 10, considering an enumeration of the activities according to the order in Table 3. Figure 10 shows for each case a compact graphical representation where each row of the matrix corresponds to the class assigned by the classifier (Output), while each column represents the activity actually performed (Target). A classification method with ideal performance will only have bars (Frequency) on the main diagonal of the matrix. The more bars on the non-diagonal cells are high, the worst the classification performance.
Test set per-class accuracy and F1 score achieved by LI-ESNs and IDNNs on the activities in the RSS-based ARS setting. The last row reports the accuracy averaged over the different activities and the macro-F1 score

Confusion matrices of the performance in the multi-classification learning task obtained by the proposed LI-ESN based (AReM) system (a) and the IDNN based one (b), respectively. The two axes on the base of each graph represent the target activity class and the output class predicted by the system, respectively. The height of the bars represent the number of instances normalized to the total number of target elements in the corresponding class (Frequency). The smaller the bars outside of the main diagonal, the better is the performance. Activities are enumerated according to the same order as in Table 3: 1 for Bending1, 2 for Bending2, 3 for Cycling, 4 for Lying, 5 for Sitting, 6 for Standing, 7 for Walking.
There results show that the performance obtained by LI-ESNs in the RSS-based setting is already good, with averaged test accuracy of 0.944, macro F1 score of 0.816 and K-class classification accuracy of 0.805. As can be seen from Table 3 and Fig. 10, in general, single activities are well recognized, with per-activity accuracy between 0.825 and 0.999. However, due to the nature of the RSS input signals used, the activities Sitting and Standing results to be hardly distinguishable between each other (see Fig. 10a), with F1 scores close to 0.5. Specifically, the activities Sitting and Standing, as described in the
Test set per-class accuracy and F1 score achieved by LI-ESNs and IDNNs on the activities pertaining to the Heterogeneous ARS setting, task 1 (involving the activities Cycling and Standing). The last row reports the accuracy averaged over the different activities and the macro-F1 score
Test set per-class accuracy and F1 score achieved by LI-ESNs and IDNNs on the activities pertaining to the Heterogeneous ARS setting, task 2 (involving the activities Bending1, Standing and Walking). The last row reports the accuracy averaged over the different activities and the macro-F1 score
The performance of the LI-ESNs on the 3 multi-classification learning tasks corresponding to the Heterogeneous ARS setting are reported in Tables 4, 5 and 6, which also present the results of IDNNs in the same experimental settings, for the sake of comparison. Results shown in such tables are computed by considering for each learning task only the sequences pertaining to the involved activities. In general, LI-ESNs showed very good performances on these 3 learning tasks, with average accuracy and macro F1 score above 0.93 and 0.89, respectively, for every task. In particular, for task 1, involving the activities Cycling and Standing (see Table 4), average accuracy and macro F1 score are both equal to 1. For task 2, involving the activities Bending1, Standing and Walking (see Table 5), average accuracy and macro F1 score are 0.997 and 0.995, respectively. For task 3, involving the activities Bending2, Sitting and Lying (see Table 6), average accuracy and macro F1 score are 0.935 and 0.896, respectively. It is also worth to note that Tables 4, 5 and 6 show that LI-ESNs generally outperform IDNNs on the three tasks considered in the Heterogeneous ARS setting. Indeed, the performance achieved by LI-ESNs improves the one obtained by IDNNs up to 10.1 and 14.2 percentage points, respectively, in terms of averaged accuracy and macro F1. The performance improvement obtained by the LI-ESN approach is particularly evident in correspondence of the activities in task 3, i.e. Bending2, Sitting and Lying (see Table 6).
Test set per-class accuracy and F1 score achieved by LI-ESNs and IDNNs on the activities pertaining to the Heterogeneous ARS setting, task 3 (involving the activities Bending2, Sitting, Lying). The last row reports the accuracy averaged over the different activities and the macro-F1 score
The performance evaluation of the Heterogeneous ARS system as a whole is computed by aggregating the results of the learning models for tasks 1, 2 and 3, according to the decision tree in Fig. 4. It is worth to recall that in this case the classification output of the activity recognition system is the activity corresponding to the readout unit with the highest activation (see Eq. (5)) in the LI-ESN activated by the decision tree in Fig. 4 (analogously for the case of IDNNs).
Test set per-class accuracy and F1 score achieved by LI-ESNs and IDNNs on the activities in the Heterogeneous ARS setting. The last row reports the accuracy averaged over the different activities and the macro-F1 score
Table 7 reports the test performance achieved by LI-ESNs and IDNNs for the Heterogeneous setting, considering all the sequences for all the activities. Note that results for the activity Standing are averaged between the two possible cases represented in task 1 and task 2 (i.e. proximity and non-proximity to the bicycle). Graphical representations of the confusion matrices for the results of LI-ESNs and IDNNs under the Heterogeneous ARS setting are shown in Fig. 11. Figure 12 reports the output of the LI-ESN (Fig. 12a) and of the IDNN (Fig. 12b) models in correspondence of the Heterogeneous ARS setting. For the sake of clarity of representation, data pertaining to the different activities are grouped in Fig. 12 based on the ground-truth and concatenated according to the same order as in Tables 3 and 7.

Confusion matrices of the performance obtained under the Heterogeneous ARS settings by the proposed LI-ESN based (AReM) system (a) and the IDNN based one (b), respectively. Activities are enumerated according to the same order as in Tables 3 and 7: 1 for Bending1, 2 for Bending2, 3 for Cycling, 4 for Lying, 5 for Sitting, 6 for Standing, 7 for Walking.

Graphical representation of the results obtained by LI-ESN (AReM) (a) and by IDNN (b) under the Heterogeneous ARS setting on the test set of the activity recognition dataset. X-axis represents the progressive time-slots of 250 milliseconds. Y-axis represents the activity: 1 for Bending1, 2 for Bending2, 3 for Cycling, 4 for Lying, 5 for Sitting, 6 for Standing, 7 for Walking.
As it can be observed in Table 7 and in Figs 11 and 12, results obtained by LI-ESN on single activities are extremely good, with test average accuracy between 0.971 and 1.000 and F1 scores between 0.832 and 1.000. In particular, the performance obtained for the two activities Standing and Sitting is greatly improved with respect to the RSS-based setting, showing the great advantage of the availability of the augmented set of sensor data to the ARS, which is also appreciable through a comparison between the confusion matrices in Figs 10 and 11. Averaged accuracy and macro F1 score for the Heterogeneous setting with LI-ESNs are 0.988 and 0.956, respectively, which represents an improvement of 4.4 and 14 percentage points with respect to the RSS-based case. The K-class classification accuracy for the Heterogeneous setting with LI-ESNs is 0.959, which overcomes the K-class classification in the corresponding RSS-based case of more that 15 percentage points. Moreover, the comparison between the results obtained by LI-ESN and by IDNN in the Heterogeneous ARS setting, reported in Table 7 and Figs 11 and 12, confirms the general superiority of the LI-ESN approach in this application context. Indeed, the performance of LI-ESNs is always higher than or equal to the performance of IDNNs on the single activities considered, with an improvement up to approximately 6 and 20 percentage points in terms of per-class accuracy and F1, respectively. In this regard, it is also worth to observe that the advantage of IDNNs on the accuracy for the activities Sitting and Standing, noted for the RSS-based setting, does not hold anymore in the Heterogeneous setting. IDNNs in the Heterogeneous setting resulted in an average test accuracy of 0.969, macro F1 score of 0.885 and K-class classification accuracy of 0.897, which are respectively approximately 2, 7 and 6 percentage points lower than the results obtained with LI-ESNs. It is also interesting to observe that the results achieved with IDNNs in the two ARS settings considered, although generally inferior to the corresponding ones obtained with the proposed LI-ESN based ARS system, show also in this case a substantial improvement of the performance obtained in the Heterogeneous setting with respect to the RSS-based one. This aspect represents a further confirmation of the effectiveness of the use of the augmented set of available sensors within the decision tree fusion mechanism shown in Fig. 4 and described in Section 3.
In this work, we presented AReM, an activity recognition system that exploits the strengths of the RC approach for modeling RNNs, which resulted to be particularly appropriate for the identification and classification of temporal pattern in time series. Data collected from both environmental and wearable sensors were used as input for the classification process, realized by means of two classification layers. The first layer is based on a custom decision tree that exploits consolidated signal processing techniques in order to discern and group static features extracted from the data in terms of usefulness for the following steps of classification. The second layer is based on a set of RC networks implemented as LI-ESNs, realizing the final activity recognition step.
Our activity recognition system has been experimentally validated on a real-world activity recognition dataset, collected with iterative rounds of measurements campaigns. Extremely good performance results were obtained on an external test set, both in terms of average accuracy, up to 0.988, and in terms of macro F1 score, up to 0.956. The effectiveness of the refined multi-sensor processing chain has been assessed through a comparison of the performances achieved under different settings of the activity recognition system. In particular we took into consideration the case in which only RSS data from wearable sensors are available, and the case in which additional (environmental and wearable) sensors data can be used. The latter setting, allowing to better focus the training on specific sub-sets of activities, resulted in a significant performance enhancement. Moreover, for the sake of performance comparison with our proposed model, we took into consideration the competitive IDNN approach as a paradigmatic representative of the class of delay networks, a popular choice for neural networks learning in human activity recognition problems. This comparison on the one hand showed that the results obtained by the proposed LI-ESN approach generally outperform those achieved by IDNN in every setting considered, and on the other hand further confirmed the effectiveness of the proposed multi-sensor processing chain with the augmented set of available sensors.
Overall, the activity recognition system proposed in this paper intends to provide a flexible and robust solution for the identification of user’s activities. The system is particularly interesting since it can constitute the premise not only for user monitoring applications, but can be part of a more general solution for ambient assisted living. To this purpose, as future work, we plan to use the proposed system in real test sites coming from EU funded project DOREMI4
Footnotes
Acknowledgements
This work is partially supported by the EU FP7 RUBICON project (contract no. 269914), by the EU FP7 GiraffPlus project (contract no. 288173), and by the EU FP7 DOREMI project (contract no. 611650).
