Approach for the development of a Framework for 2 the Identification of Activities of Daily Living using 3 Mobile Devices ’ Sensors 4

Sensors available on mobile devices allow the automatic identification of Activities of 18 Daily Living (ADL). This paper describes an approach for the creation of a framework for the 19 identification of ADL, taking in account several concepts, including data acquisition, data 20 processing, data fusion, pattern recognition, and machine learning. These concepts can be mapped 21 in a module of the framework, including the use and creation of several algorithms. For the 22 development of a framework that works in several conditions, e.g. without Internet connection, 23 these algorithms should take in account the hardware and software limitations of the mobile devices 24 to run all main tasks locally. The main purpose of this paper is related to the presentation the 25 sensors, algorithms, and architecture of the proposed approach. 26


Introduction
Sensors embedded in off-the-shelf mobile devices, e.g., accelerometer, gyroscope, magnetometer, microphone, and Global Positioning System (GPS) receiver [1], are able to use in the creation of a method for the recognition of Activities of Daily Living (ADL) [2] and their environments.The recognition of ADL and their environments is part of research for the development of a personal digital life coach [3].This research is related to the development of ambient assisted living (AAL) systems, and it is widely important for the monitoring of a plethora of situations in people with some disabilities, and elderly people.
Multi-sensor data fusion technologies may be implemented with mobile devices, because they have several sensors available in different categories, such as motion sensors, magnetic/mechanical sensors, acoustic sensors, and location sensors [4], improving the accuracy of the recognition of several types of activities, e.g., walking, running, going downstairs, going upstairs, and standing, and environments, e.g., bar, classroom, gym, library, kitchen, street, hall, watching TV, and bedroom.The recognition of physical activities may be performed with motion, and magnetic/mechanical sensors, and the environments may be recognized with acoustic sensors.The fuse of the data acquired from motion, magnetic/mechanical, and acoustic sensors increases the number of the ADL recognized, allowing the distinction between sleeping, and standing activities.In order to recognize the driving activity, the fuse of the data acquired from motion, magnetic/mechanical, acoustic, and location sensors allows the distinction between sleeping, standing, and driving activities.
The research about the identification of ADL and their environments using sensors has been studied during the last years, and several methods and frameworks [5][6][7][8][9][10] have been implemented using smartphones.However, this problem should be separated in a set of modules, such as data acquisition, data processing, data fusion, and artificial intelligence systems, and the frameworks developed in the previous studies commonly are only focused one some part of the problem.The Acquisition Cost-Aware QUery Adaptation (ACQUA) framework [11] has been adapted for data acquisition and data processing, but it does not include all steps needed for data processing.Related to data fusion methods previously developed, there are no structured frameworks implemented, but some methods have been developed related to the recognition of the ADL [12][13][14].The frameworks and methods previously developed are no structured for the holistic approach of the identification of the ADL, and they mainly focused on the use of motion sensors for the identification of physical activities, but this paper presents a structure of a structured framework, using other types of sensors for the recognition of the environment.
In accordance with the previous work [4,15,16], the aim of this paper consists on the presentation of an approach for the creation of a framework for the identification of ADL and their environment mainly focused on the use of the data acquired from several sensors available in the offthe-shelf mobile devices.Around the concept of the fusion of the sensors' data, the selection of the sensors that are able to use for this purpose is the first step for the creation of the framework, defining a method for the acquisition of the data, and, consequently, processing of the data acquired.The processing of the data includes the data cleaning, data imputation, and extraction of the features.The final step for the development of the framework proposed consists on the use of the features extracted for the application of an artificial intelligence method, i.e., the implementation of some types of Artificial Neural Networks (ANN) in order to choose the best method for the accurate recognition of the ADL and their environments.
The remaining sections of this paper are organized as follows: Section 2 presents the previous research studies performed in this topic, presenting a set of methods for each module.Section 3 presents a new approach for the development of a framework for the identification of ADL using the sensors available in off-the-shelf mobile devices, and the sensors and methods that will be used.
Section 4 presents a discussion and conclusions about the new approach.

Related Work
Following the previous researches related to the new approach for the development of a framework for the identification of ADL and their environments, the research is organized the research about the sensors available on mobile devices separated by categories (subsection 2.1), the presentation of data acquisition methods (subsection 2.2), the definition of the methods for data processing (subsection 2.3), the presentation of data fusion methods (subsection 2.4), the presentation of artificial intelligence methods (subsection 2.5), and, finally, in the section 2.6, the methods to combine the possible the sensors' data with the users' agenda.

Sensors
Sensors are small components present in mobile device that allows the acquisition of data related to ADL and their environments [16].These small components are able to capture different types of signals, such as electrical, mechanical, acoustic and others, in order to process and identify the ADL [1,17].
The number and types of sensors available on mobile devices are different for each mobile platform, and, for the recognition of ADL, should be used the sensors available in a major part of mobile devices.In general, the sensors available in mobile devices are Magnetic/Mechanical sensors, Environmental sensors, Location sensors, Motion sensors, Imaging/Video sensors, Proximity sensors, Acoustic sensors, Optical sensors, and Force sensors [4].
Based on the classification presented in [4], the sensors available on Android devices are microphone, accelerometer, gravity, linear acceleration, gyroscope, rotation, magnetometer, pedometer, altimeter, humidity, ambient light, ambient, temperature, GPS, touch screen, microphone, and camera [18,19].In addiction of the platform dependent restrictions of the use of sensors, the hardware differences between devices can influence the existence of the sensors.Thus, the sensors available in a major part of mobile devices, presented in table 1, are the accelerometer, the gyroscope, the magnetometer, the GPS, the microphone, the touch screen, and the camera.

Data Acquisition
Data acquisition consists in a process to receive the different types of data from the several sensors available in the off-the-shelf mobile devices, allowing the data collection in mobility.
However, the data acquisition with sensors available in mobile devices has several challenges, because the environment is not controlled and the user is able to enable the data acquisition processing in several conditions, including the incorrect positioning of the mobile device, the uncontrolled data sampling rate, the possibility of the unavailability of all sensors used in the framework developed, and the environmental conditions [20].
The ACQUA framework allows the control of the order of the data acquisition, the correct segments of the data requested, the calibration of the data acquisition rates, the packet sizes and radio characteristics, the adaptation of the dynamic changes in query selective properties, and the support of multiple queries and heterogeneous time window semantics from all sensors available in off-theshelf mobile devices, reducing the energy consumption of the real-time data acquisition [11].
The Orchestrator framework promotes the distributed execution of the data acquisition using several mobile devices, and all devices executes a part of the data processing, avoiding to reduce the requirements related to the processing power and energy consumption [21].
The same purpose of Orchestrator framework is achieved from ErdOS framework and LittleRock prototype, distributing the data acquisition and processing processes by all resources available in the devices used, and reducing the energy needed to process the data collected from all sensors [22,23].
The Jigsaw continuous sensing engine implements a method to control the different sample rates, adapting the data acquisition and processing for the different capabilities of the sensors [24].
The SociableSense framework has a mechanism to adapt the different sample rated of all sensors used and it is a cloud-based framework, reducing the locally data processing, but restricting the use of the framework to the availability of the Internet connection [25].
The authors of [26] implemented a CHG technique for the data acquisition with Windows Phonebased smartphones and low processing capabilities, capturing accelerometer and gyroscope data, storing the sensory data in the smartphone memory.
The BBQ framework applies a multi-dimensional Gaussian probability density function from all sensors, inferring the order of the data acquisition with conditional probabilities [27].
Data acquisition process implemented in mobile devices may be performed without the use of frameworks, improving only the data processing to the different resources capabilities.The authors of [28][29][30][31] implement the data acquisition process from accelerometer data based in Apple iPhone and Android-based smartphones for the identification of several activities, including driving, walking, sitting, standing, running, and jumping activities.The authors of [32] implemented a Cursor Movement Algorithm to detect several activities, capturing the real-time data from the accelerometer and storing them into a local database in the mobile device.
Table 2 presents a summary of the data acquisition methods and their main characteristics for further implementation the in new approach for the development of a framework for the identification of ADL and their environments.

No framework
• Adapted for low processing, memory, and energy capabilities.

Data Processing
After the data acquisition, the sensors' data should be processed in order to prepare the data for the fusion of all sensors data, and, consequently, application of the methods for the recognition of ADL.At the start, the data processing should validate the integrity and quality of the data, and, then, applying data cleaning and/or data imputation techniques [33].However, data processing depends on the environmental conditions, the types of sensors and data, the sensor failures, and the capabilities of the mobile devices [34].Several techniques have been developed to reduce the memory and energy consumption of the data processing techniques.
The ACQUA framework is also used to optimize the data processing, using automated storage and retrieval system (ASRS) algorithms [11].Other studies have presented methods to adapt the data processing methods to the low capabilities of the mobile devices, processing the data after splitting or using methods with low resources needed [20,[35][36][37].
The use of data cleaning methods, presented in the subsection 2.3.1, is important to decrease the influence of the environmental conditions or systems failures.In order to improve the results, when the data acquisition fails, subsection 2.3.2 presents the possible data imputation methods to correct the data acquired.However, these methods are not subject for the development of the new approach for the framework for the identification of ADL and their environments, assuming that the data acquired is sufficient for the extraction of the several features from the sensors' signal, presenting the feature extraction methods and possible features to extract in the subsection 2.3.3.

Data Cleaning
Data cleaning consists in the identification of the incorrect values, removing the outliers values and smoothing and filtering the invalid values obtained during the data acquisition process, commonly considered as noised values [38][39][40].Using data cleaning methods, the dependency of the environmental conditions, position of the mobile device, and systems failures occurred during the data acquisition process is reduces.The selection of these methods depends on the type of data acquired and spatiotemporal characteristics of the data acquired.
The authors of [41] proposed a weighted moving average (WMA) algorithm that collects the sensors' data and computes the weighted moving average and applies the weighted moving average filter for the normalization and cleaning of the sensors' data.
The filters used for the motion and magnetic/mechanical sensors may have two types, these are the low-pass filter, the high pass filter, and the KALMAN filter [42,43].On the other hand, for acoustic data, the moving average filter can also be used for filtering this type of data, but the different types of Fourier transforms, such as Discrete Fourier Transform (DFT), Inverse Discrete Fourier Transform (IDFT), and Fast Fourier Transform (FFT) are also used to filter the acoustic data [44,45].
Table 3 presents a summary of the data cleaning methods related to the different types of sensors, presented in the section 2.1, for further implementation the in new approach for the development of a framework for the identification of ADL and their environments.

Data Imputation
During the data processing, the verification of the existence of the faulty data is performed to validate the presence of inexistent values in some instants of the time series of data acquisition.The data imputation methods are mainly used for motion sensors, and magnetic/mechanical sensors.
However, for the development of the new approach of the framework for the identification of ADL and their environments, the data imputation techniques were not considered, assuming that the sensors' data acquired is complete.Thus, in this section, the best methods for data imputation will be presented based on a literature review.
Faulty data may have different types that can be classified as Missing Completely At Random (MCAR), Missing At Random (MAR) and Missing Not At Random (MNAR) [46].When the faulty data is randomly distributed during the time interval for the data acquisition, the classification of this data is MCAR, that is possible faulty data found in the new approach of the framework for the identification of the ADL and their environments.The other types of faulty data are MAR, verified when the faulty data is randomly distributed by different subsets of the data acquired, and MNAR, verified when the faulty data is distributed by defined instants of the data acquisition.
The K-Nearest Neighbor (k-NN) method are one of the most used methods for data imputation of data acquired from motion, and magnetic/mechanical sensors [47][48][49][50].The k-NN method has several variants that can be used for data imputation, such as MKNNimpute (K-nearest neighbor imputation method based on Mahalanobis distance), SKNNimpute (sequential K-nearest neighbor method-based imputation), and KNNimpute (K-nearest neighbor imputation) [47,48].
The clustering techniques are also used for the data imputation, including K-means clustering, K-means-based imputation, and fuzzy C-means clustering imputation [46,51,52], which are implement in the Imputation Tree (ITree) method presented in [46].
In general, these methods can be applied to data collection from motion, and magnetic/mechanical sensors, but the data imputation methods can also be applied to the acoustic data with k-NN methods and singular value decomposition (SVD) algorithms [60].
As the data imputation methods should be able to impute the empty instances of the data acquired by motion, and magnetic/mechanical sensors, the methods that are able to use with this purpose are MEI, EM, MICE, and FLk-NN [49].However, k-NN can be applied with the comparison between the history of the data acquisition that is similar to the data acquired in the stream with faulty values [49].The data imputation is not important for the acoustic, and location sensors.

Feature Extraction
The correct definition of the features increases the accuracy of the identification of ADL and their environments.This definition depends on the types of sensors and the data acquired, but the purpose of use is another variable that should be taken in account.
For the correct extraction of the features for the motion and magnetic/mechanical sensors' data, the Euclidean norm for each instant of outputs from the sensors defined as magnitude of vector (MV).
Related to the motion and magnetic/mechanical sensors' data, the most used features are mean, standard deviation, maximum, minimum, median, correlation, variance, and FFT spectral energy of MV.
For the location sensors, the feature that should be extracted is the distance travelled between a time interval, in order to identify ADL with high distance travelled.The distance between two points captured by GPS receiver is the ellipsoidal distance, because the two points are acquired in the geodetic coordinate system, where the calculation of this distance is measured with the Vincenty formula [76][77][78].
Table 4 presents a summary of the features extracted for each type of sensors presented in the section 2.1, for further implementation the in new approach for the development of a framework for the identification of ADL and their environments.
• These sensors are not useful for the development of the framework for the Identification of ADL and their environments.

Data Fusion
After the extraction of the features, the data acquired from all sensors should be fused to improve the accuracy of the identification of the ADL and their environments in the new approach for the framework proposed in this study [5].The data fusion methods implemented should be related with the final purpose of the framework presented in the subsection 2.6.
Based on the literature studies presented by several authors [6,14,79,80], the data fusion methods are grouped in four categories [6,79,80], these are the probabilistic methods, the statistical methods, the knowledge base theory methods and the evidence reasoning methods.
The statistical methods [6,79,80] for data fusion include covariance intersection, crosscovariance, and other robust statistics.However, other statistical methods used for data fusion are dynamic time warping (DTW) [83], which measures the similarity between two temporal sequences, based on the raw data or the features extracted.
Based on these categories of data fusion methods, several implementations have been performed and presented in several studies for the identification of a plethora of a real-life activities and environments.The Rao-Blackwellization unscented Kalman filter (RBUKF) [84] was implemented to fuse the data acquired from a compass, a gyroscope, and a GPS receiver.The Kalman filter was used to fuse the data acquired from the GPS receiver and the gyroscope in order to support a navigation system [85].The Naïve Bayes classifier is used to fuse the data acquired from acoustic, accelerometer and GPS sensors to recognize different situations during daily life [86].The Autoregressive-Correlated Gaussian Model was implemented in the KNOWME system [87].Bayesian analysis and Kalman filter where used to data acquired from the several sensors available in mobile devices for the identification of the ADL [88].The CHRONIOUS system implements several methods to recognize several ADL, such as Support Vector Machine (SVM), random forests, Artificial Neural Networks (ANN), decision trees, decision tables, and Naïve Bayes classifier, in order to fuse the data collection from several sensors available in mobile devices [89].In [90], the authors used the empirical mode decomposition (EMD) applied to the inertial sensors available in a mobile device, including accelerometer, gyroscope, and magnetometer, for the identification of several ADL.The authors of [91] implements several methods for data fusion, including SVM, random forest, hidden Markov models (HMMs), conditional random fields (CRFs), Fisher kernel learning (FKL), and ANN for several sensors, such as Accelerometer, RFID, and Vital monitoring sensors for the correct identification of ADL.
Table 5 presents a summary of the data fusion methods that can be applied for each type of sensors presented in the section 2.1, for further implementation the in new approach for the development of a framework for the identification of ADL and their environments.• These sensors are not useful for the development of the framework for the Identification of ADL and their environments.

Identification of Activities of Daily Living
The definition of the methods identification of the ADL represents the final module of the new approach for the development of a framework for the identification of ADL and their environments, presented in the figure 1.The identification of the ADL and their environments depends on the sensors' data used.Thus, if the implemented method used the data acquired from motion and/or magnetic/mechanical sensors, commonly, it will identify the ADL.On the other hand, if the implemented method uses the data acquired from acoustic sensors, it will identify the environments.
Finally, if the implemented method uses the location sensors, it probably is identifying activities will high movement, e.g., driving, or it will try to identify the place where the ADL is performed.
In general, the identification of ADL is performed at the same time of the data fusion, because the methods used has the same techniques.The machine learning is a set of several techniques for artificial intelligence, including the techniques for the identification of ADL and their environments.
The concept of machine learning will be presented in the subsection 2.5.1.In subsection 2.5.2, the pattern recognition methods are presented, which consists in a subset of the machine learning techniques.

Machine Learning
The Artificial Intelligence (AI) is one of the main areas for the development of computer science systems, and machine learning is composed by a subset of methods for AI, where the computers have the ability to learn and perform some tasks, taking in account the external conditions of the system in order to change the execution of some methods for obtaining of better results [92].
Machine learning methods are based on the creation and implementation of algorithms for the recognition and prediction of several situations based on the data acquired, and these methods are commonly classified in four categories [93,94], such as Supervised learning, Unsupervised learning, Reinforcement learning, and Semi-supervised Learning and Active Learning.
Supervised learning methods are based on the automatic adjustment of the network parameters, comparing the actual network output with the desired output previously defined in the data acquired, where the error obtained is the mean squared error (MSE) [94].The input data involved in the supervised leaning should be labeled, in order to perform the comparisons.
Unsupervised learning methods consists on the correction of the results obtained based on the input data, attempting to obtain the signification patterns or features in the unlabeled input data, automatically learning with intuitive primitives like neural competition and cooperation [94].
Reinforcement learning methods are similar to supervised learning methods, but the exact desired output is a priori unknown [94].Thus, these methods are learning based on the feedback provided during the execution of the algorithm by an artificial agent in order to maximize the total expected reward [94].
Semi-supervised Learning and Active Learning methods are methods that should be applied to dataset with a large collection of unlabeled input data and a few labeled examples to generalize the results and performance of the method, based on assumptions related to the probability of occurrence of some output.
For the development of a new approach for the development of a framework for the identification of ADL and their environments, the machine learning may be used, because it can be adapted to bioinformatics and human-related systems [95][96][97][98].Pattern recognition methods, described in the subsection 2.5.2, consists on a subset of machine learning methods for the recognition of patterns [99], which are very useful in the development of the framework for the identification of ADL and their environments.

Pattern Recognition
The use of pattern recognition methods is the final part of research for the creation of a new approach for a framework for the identification of ADL and their environments.Several sensors, presented in the section 2.1, may be used with pattern recognition methods, which should be applied to the features extracted from the input data.
The methods implemented during the pattern recognition step are similar to the methods implemented for the data fusion, presented in the section 2.4.As reported early in this paper, the data fusion and pattern recognition may be confused, and the pattern recognition is performed at the same time of the data fusion.The categorization of the methods is similar to the methods applied for data fusion, and they are separated in four categories [6,79,80], these are the probabilistic methods, the statistical methods, the knowledge base theory methods and the evidence reasoning methods.
Several ADL may be recognized with pattern recognition methods, as example for the recognition of standing, and walking activities may be used ANN [100].Several authors [7-10, 61-64, 66-71, 101-114] proposed the use of the ANN, the probabilistic neural networks (PNN), the deep neural networks (DNN), the SVM, the Random Forest, the Bayesian Network, the Sequential Minimal Optimization (SMO), the Logistic Regression, the Naïve Bayes, the C4.5 Decision Tree, the Logistic Model Trees (LMT), the J48 Decision tree, the K-Nearest Neighbor (KNN), and the Simple Logistic Logit Boost methods for the recognition of walking, running, jogging, jumping, dancing, driving, cycling, sitting, standing, lying, walking on stairs, going up on an escalator, laying down, walking on a ramp activities, cleaning, cooking, medication, sweeping, washing hands, and watering plants.
The Hidden Markov Model (HMM) and their variants are also a pattern recognition implemented in several studies related with the identification of ADL and their environments, such as the Hidden Markov Model (HMM) [66], the Hidden Markov Model Ensemble (HMME) [115], the Sliding-Window-based Hidden Markov Model (SW-HMM) [107].The ADLs commonly identified by the HMM method are walking, walking on stairs, standing, running, sitting, and laying.
Table 6 presents a summary of the pattern recognition methods that can be applied for each type of sensors presented in the section 2.1, for further implementation the in new approach for the development of a framework for the identification of ADL and their environments.• These sensors are not useful for the development of the framework for the Identification of ADL and their environments.

Relation between the Identification of Activities of Daily Living and User Agenda
After the correct identification of the ADL and their environments, the results obtained should be compared with the users' agenda for the validation of the scheduled activities performed during the daily life.With this comparison and inputs from agenda, the monitoring of the lifestyle [116] for the development of a personal digital life coach [3] is one of the possibilities for the use of the new approach developed.However, the inputs from agenda can also be used to validate the accuracy of the framework developed.The correct identification of several patterns to validate the lifestyles and combine the results with the users' agenda is most important in the for monitoring elderly people [117].

Methods and Expected Results
The new approach proposed for the creation of the framework for the identification of ADL (figure 1) is based on the studies in [4,15,16], and it is composed with several stages.The stages for the framework are the selection of the sensors, the data acquisition, the data processing, including data cleaning, data imputation, and feature extraction, the data fusion, the identification of ADL with artificial intelligence, including pattern recognition, and other machine learning techniques, and, at the end, the combination of the results obtained with the data available in the users' agenda.In order to create a new approach for a framework for the identification of ADL and their environments, the architecture, presented in the figure 1, and set of methods presented in the section 2 is proposed for obtaining results with good accuracy.The architecture presented in the figure 1  Following the list of sensors available in off-the-shelf mobile devices, presented in the section 2.1, the sensors that will be used in the framework should be dynamically selected, according to the sensors available in the mobile device.Thus, the types of sensors selected to use in the framework will be motion sensors, magnetic/mechanical sensors, acoustic sensors, and location sensors.Related to the motion sensors, the accelerometer is available in all mobile devices, but gyroscope is only available on some devices, but to cover the execution of the framework in all devices, two different methods should be implemented in the framework with accelerometer and gyroscope, and only with accelerometer.Related to the magnetic/mechanical sensors, the magnetometer is only available on some devices, and this sensor should be included in the same method of motion sensors, combining this sensor with the method only with accelerometer, and the method with accelerometer and gyroscope.Related to the acoustic sensors, the microphone is available in all mobile devices.Related to the location sensors, the GPS is available in a major part of the mobile devices.
With the presentation of the data acquisition methods, in the section 2.2, and aligned with the limitations of the mobile devices, it was verified that the use of a framework for the data acquisition is not needed, using a mobile application for capture the of sensors' data.In addition, the data acquisition method, implemented in the mobile application, should acquire 5 seconds of data from all sensors every 5 minutes.
Following the creation of the new approach for a framework for the identification of ADL and their environments, the selection of data processing methods, presented in the section 2.3, should contains the data cleaning, data imputation, and feature extraction methods.
The data cleaning methods adapted for the framework depends on the types of sensors.For the accelerometer, gyroscope, and magnetometer sensors, the data cleaning method that should be applied is a low pass filter to remove the noise occurred during the data acquisition process.On the other hand, for the acoustic sensors, the data cleaning methods that should be applied is the FFT in order to extract the frequencies of the audio.Finally, for the location sensors, there are no data cleaning methods needed.
The data imputation methods is not important to implement in the development of a new approach for a framework for the identification of ADL and their environments, assuming that the data acquired from all sensors is always filled.
Related to the feature extraction, the features needed to recognize the ADL and their environments should be selected based on each type of sensors.Firstly, the features selected for the accelerometer, gyroscope, and magnetometer sensors are the 5 greater distances between the maximum peaks, the average of the maximum peaks, the standard deviation of the maximum peaks, the variance of the maximum peaks, the median of the maximum peaks, the standard deviation of the raw signal, the average of the raw signal, the maximum value of the raw signal, the minimum value of the raw signal, the variance of the of the raw signal, and the median of the raw signal.
Secondly, the features selected for the microphone are the standard deviation of the raw signal, the average of the raw signal, the maximum value of the raw signal, the minimum value of the raw signal, the variance of the of the raw signal, the median of the raw signal, and 26 MFCC coefficients.Finally, the features selected for the GPS receiver are the distance travelled during the acquisition time.
Before the presentation of the data fusion and pattern recognition methods that should be used for in the framework, the ADL and environments to recognize should be defined.This process should be executed in several phases, presented in the figure 2 and table 6, these are: 1.The identification of ADL with motion and magnetic/mechanical sensors; 2. The identification of the environments with acoustic sensors; 3. The identification of more standing activities with the fusion of the data acquired from motion, magnetic/mechanical and acoustic sensors; 4. The identification of more standing activities with the fusion of the data acquired from motion, magnetic/mechanical, acoustic and location sensors.Firstly, the proposed ADL to identify with the framework will be going downstairs, going upstairs, running, walking, and standing.Secondly, the proposed environments to identify with the framework will be bar, classroom, gym, kitchen, library, street, hall, watching TV, and bedroom.
Thirdly, the proposed ADL to distinct with the framework will be sleeping, and standing.Finally, the proposed ADL to distinct with the framework are sleeping, standing, and driving.
Based on the list of data fusion methods and pattern recognition methods, defined in the sections 2.4 and 2.5, the method that should be applied in the framework are ANN, but, firstly, should implemented three types of ANN, in order to compare the different accuracies obtained with several parameters, and type of ANN with better accuracy should be implemented in the new approach for a framework for the identification of ADL and their environments.The selected method is ANN, because, based on the literature, it is the method that reports best accuracies and it is the most used.
The different types of ANN that will be applied to the acquired data, in order to identify the best type of ANN are: • Multilayer Perception (MLP) with Backpropagation; • Feedforward neural network with Backpropagation; • Deep Learning.
Regarding the data acquired from GPS receiver, it can be useful to increase the accuracy of the identification of the ADL and their environments, but it can also be used for the identification of the location where the ADL are executed, in order to improve the comparison with the users' agenda presented in the section 2.6.In the future, the use of users' agenda will be important to allow the creation of a personal digital life coach, or to validate the reliability of the implemented methods in the framework.

Discussion and conclusions
This paper presents the architecture of a new approach for a framework for the identification of ADL and their environments, using methods with a reported good accuracy.The development of the new approach for the development of a framework for the identification of ADL and their environments, based on the system presented in [4,15,16], is one of the steps for the creation of a personal digital life coach [3] using mobile devices.
The framework will be composed by several modules several, such as data acquisition, data processing, data fusion, and a module to implement artificial intelligence techniques for the identification of the ADL and their environments.
The sensors used in the framework will be accelerometer, gyroscope, magnetometer, microphone, and GPS, in order to recognize several ADL, including going downstairs, going upstairs, running, walking, standing, sleeping, and driving, and their environments, including bar, classroom, gym, kitchen, library, street, hall, watching TV, and bedroom.
The sensors' data should be acquired and, before the extraction of the features of the sensors' data, some filters (i.e., low pass filter, and FFT) should be applied.Afterwards, the data fusion and pattern recognition methods should be applied.The most used methods for data fusion and pattern recognition, that should be implemented in the framework, is the ANN to achieve the final purpose of the framework developed.

Figure 1 .
Figure 1.Schema for the framework for the recognition of Activities of Daily Living (ADL).
has several modules, these are the activation of the selected sensors, the data acquisition, the data processing, including data cleaning, data imputation, and feature extraction, the data fusion, the identification of ADL with artificial intelligence, including pattern recognition, and other machine learning techniques.The selection of the methods for all modules is based on the verification of the most used methods.

Figure 2 .
Figure 2. Sensors used for the recognition of Activities of Daily Living (ADL) and environments for each phase of development.

Table 1 .
List of sensors available in mobile devices.

Table 2 .
Summary of the data acquisition methods.
• Stores the sensory data in the smartphone memory;• Adapted for low processing, and energy capabilities.

Table 3 .
Relation between the types of sensors and the data cleaning techniques allowed.
• Location sensors • The data cleaning technique is not important for this type of data acquired.• Acoustic sensors • Moving average filter; • Discrete Fourier Transform (DFT); • Inverse Discrete Fourier Transform (IDFT);

Table 4 .
Relation between sensors and features extracted.

Table 6 .
Relation between the different types of sensors and some pattern recognition methods.

Table 7 .
Sensors, Activities of Daily Living (ADL), and environments for recognition with the framework proposed.