Wearable Accelerometer Layout Optimization for Activity Recognition Based on Swarm Intelligence and User Preference

Wearable intelligent systems that recognize the daily activities of humans have significantly contributed to many useful applications. However, in practical wearable applications, the target individuals may have different demands in terms of sensor wearing. Sensors may return different information depending on their placement, which to some extent determines the quality of a recognition system. Obtaining the optimal sensor positions with the highest recognition accuracy plays a significant role in activity recognition design. To contribute to a flexible and user-friendly wearable sensor layout, this paper designed a multistage and multiswarm discrete particle swarm optimization algorithm to explore the best sensor combinations and accuracy trends corresponding to different requirements of sensor numbers. The proposed optimization scheme is applied to investigate the influences that different numbers and placements of wearable accelerometers have on an activity recognition system. Furthermore, to address the issue of user preference regarding the sensor position, a relevant sensor layout can also be designed based on the demands and physical condition of the subject. The proposed method can determine the best sensor position (combinations) with lower computational cost for various activity recognition systems.


I. INTRODUCTION
The recognition of human activity has drawn much attention from multiple disciplines and applied scenarios. The systems used in this endeavor have enhanced people's lives due to their convenience and high performance in domains such as health rehabilitation [4], injury prevention [5], and diagnosis [6], among others. Human activity recognition (HAR) regarding the activities of daily living (ADLs), as the core technique to identify the human's motion type, is becoming a significant target of investigation [7][8][9].
Decreasing the space limitations and enabling the subject to move in a wider range, based on the inertial measurement unit (IMU), many studies have been conducted to develop wearable HAR systems [11][12][13]. Both the handcrafted feature-based classifier and the deep network exist to facilitate the development of a corresponding system [14][15][16][17][18][19]. Currently, increasing attention in the HAR field has been focused on off-the-shelf commercial electronic products embedded with accelerometers, such as smartwatches, smartphones, etc. However, these types of systems only provide a limited interface for users and require the devices to be attached to designated locations on the body, such as the wrist or the trouser pocket. In practical, the human body can be abstracted into a multi-segment rigid body model, and various segments of the body can present alterations of acceleration during activities. So, when combined with clothing and accessories, wearable sensors can be placed on the body in various positions from the head to the foot. Prior studies related to the sensor positions normally concentrated on the position specific HAR system or the transfer learning across the different sensor positions [20,21]. Nevertheless, the examined sensor positions still maintain the less number and fails to generate the optimal sensor positions under the different conditions.
From the perspective of human-computer interaction, HAR combined with consumer electronics enhances convenience and availability, while sensor placement considering the practical requirements and physical condition of the user is still necessary. For example, in some cases, the monitored subject may be a patient with a specific disease or physical condition such as lacking one or more limbs and thus unable to wear the sensor on the established location [22]. For long-term monitoring, a fixed location can also cause discomfort to users. Considering the foregoing, a specific position on the human body is not conducive for all subjects due to the differences in demand. Moreover, a wearable system with specific sensor types can only generate limited data and provide scant robustness against placements on different parts of the body [23].
Therefore, seeking a favorable sensor position to improve the relevant recognition accuracy as well as balance the recognition results and the user's conditions can be an effective compromise scheme. This paper intends to evaluate all the possible obvious sensor placements on the body and design an optimization scheme to generate sensor layout with respect to best accuracy under different scenarios. The main contributions of this work can be summarized as follows: 1.
A swarm intelligence-based algorithm has been developed for solving such sensor combinational/optimization problems with lower computational times. 2. The potential locations of wearable accelerometers on the human body have all been examined using different combinations and numbers of sensors to explore the best sensor layout and the accuracy trend against different types of activities. 3. A series of results based on specific positions of user preference on the human body with different adopted sensor numbers are presented.

II. RELATED WORK
HAR systems are categorized according to the equipment used and the various approaches, including the classifier establishment, data processing, and fusion method [24]. Wearable systems have emerged from calculations of the obvious variations of signals reflecting human motion. For this type of system, the accelerometer has been widely utilized for activity recognition and subsequent applications. The accelerometer can be not only embedded in consumer electronics but also specialized to monitor specific people's activity and conduct related applications [25,26]. Most studies have been dedicated to improving the existing classifier structure to fit more ubiquitous devices and form a pervasive sensing system [27][28][29]. However, the single sensor used sometimes is not adequately accurate. If more than one sensor is used, the selection of the sensors' positions needs to be considered. Optimal sensor placement is an issue that has received extensive attention in several domains. Given the limitations of the sensed subjects, multiple quantities or multimodal sensors are generally adopted to improve the performance of the perceiving system. To find the global best sensor sites or layout, the most effective method is trying every possible combination, but this carries high computational cost. Some heuristic optimization and greedy algorithms have been utilized to optimize the sensor layout. Blanloeuil et al. [30] adopted the particle swarm optimization method to optimize the ultrasonic structural health monitoring (SHM) system in a 2D coordinate. Flynn et al. [31] established the fitness function with Bayesian approach between the sensor locations and the error criterion in the detection system and employed a genetic algorithm to optimize the sensor space. Mallardo et al. [32] abstracted the optimization task into a discrete issue. An artificial neural network was adopted to build the object functions using the genetic algorithm to optimize the sensors' location. Swarm intelligence and an evolutionary algorithm have been designed to address the sensor space optimization issue effectively and improve performance.
However, for HAR systems based on wearable data, fewer schemes have been investigated with respect to optimal sensor placement. As the detected data from the wearable sensor contain physical characteristics of the motion to some extent, more sensor information will contribute to improved accuracy. Nevertheless, blindly increasing the number of sensors does not generate a good result. The inherent tradeoff between the amount of sampled data and the recognition result emerges from this. Kunze et al. [33] presented an approach to compensate for the effects of the different sensor placements, namely, arranging the sensors in such a way as to give adequate performance, given that different parts of the human body contain different information regarding the activity being conducted. Atallah et al. [11] investigated optimal sensor placement for specific activities by means of the k-Nearest Neighbor (KNN) classifier. The study investigated the influence of a single sensor on daily activity recognition; however, the option of involving more sensors to improve the accuracy of the results was not discussed. Gjoreski et al. [34] developed an ADL recognition system using one to three sensors on three different parts of the human body to recognize eight activities. However, only three potential locations are mentioned in their work, and only 69.8% accuracy was obtained via a random forest classifier when only a chest sensor was used. With two more sensors added, the average prediction accuracy increased to 94.3%. Olgun et. al [35] utilized the Hidden Markov Model (HMM) to classify eight common human daily activities. Again, three positions on the human body were considered. Using the SVM classifier, Cleland et al. [36] proposed a more complete work that employed six sensors placed on the human body, and all possible combinations of the six sensors were tested. They showed that the best single sensor location is on the hip, generating 96.66% accuracy. When they evaluated all possible sensor combinations, all combinations achieved similar accuracy (differences were within 1%). Although these studies varied the number of sensors for measuring a specific activity, they demonstrate little comparison of different sensor placements.
Sztyler et al. [20] added the process of predicting the onbody position of a wearable device before executing HAR.
They conducted subject-specific and cross-subject validations, assuming the system could be used with the labelled data and under the condition that the user could not produce the training data. After comparing seven different body parts, they recognized the waist as the most suitable position. Additionally, Kurban et al. [37] investigated several classifiers with three common positions on the human body. They used the HAR system to classify five simple activities, and the chest was identified as the best sensor placement.
Thus, various researchers have utilized different machine learning models for HAR to study the influence of sensor placement on accuracy. However, as stated in [20], the optimal sensor placement depends on the recognized activities. The factors affecting the system accuracy are complicated, including the sensor position, the selected learning network, and the method for processing the sampled data. It is meaningless to evaluate the optimal sensor layout without the specific HAR system and the recognized activities as the premise. Based on these previous studies, this paper proposes an optimization scheme to offer the best wearable sensor layout to fit the user's requirements. The designed scheme is effective once the adopted HAR system and dataset are determined. In contrast to other works, we expanded the potential sensor placement over the whole body according to the human motion rigid-body model, and 17 different parts of the human body were examined with different given conditions.

A. Greedy Approach (combinational method)
To investigate the optimal combination of sensors under different requirements of sensor numbers, we first considered the greedy approach due to its lower computational times. The greedy method merely generates the optimal solution based on the current best solution. It requires first determining the best position for a single sensor, Sop1. To this end, the acceleration data from 17 sensors were used to train and test the model, and thus, the optimal sensor use could be identified. We subsequently combined Sop1 with one of the remaining 16 sensors in turn and compared the results to find the best two-sensor combination, i.e., Sop1+ Sop2. The adopted criterion is the maximum average accuracy of classification for 10 different activities. Each test was executed three times, and the average accuracy was calculated as the result. The solution was derived based on the previous best solution, and the result was normally the local optimal solution.

B. Multistage and Multiswarm Discrete Particle Swarm Optimization (MSMS-DPSO)
The greedy method trends toward accuracy, and the corresponding computational complexity is relatively low. However, the results obtained depend greatly on previous findings. Possible combinations other than those based on previous results are not tested (e.g., testing the combination of two positions with worse results). To avoid such issues, a heuristic global searching algorithm can be adopted.
A particle swarm optimization (PSO) algorithm as a type of heuristic algorithm imitates the behavior of birds foraging. The goal of the search is set as the best solution of the specific fitness function. The PSO algorithm normally generates a series of initial solutions within an N-dimensional space as a random distribution of particles. Each particle is assessed by the corresponding value of a specific fitness function, i.e., its fitness value. The particle has its own velocity of movement and position. With different forms of PSOs, each discrete PSO (DPSO) normally requires that the position of each particle should be an integer and not repeated in different dimensions [45][46][47][48][49]. Such discrete problem optimizations all follow the basic principle of updating the velocity of a particle and combining with other algorithms to update the position of the particle based on different problems. (1) For a DPSO algorithm, the velocity is updated by formula (1), where i represents the current dimension. The x indicates the particle's position. The equation for updating velocity v consists of three parts: a self part, an "individual" part, and a "social" part. The self part is based on the previous velocity and is normally multiplied by the weight w to control the degree to which the previous velocity affects the current one. The "individual" part enables the particle to be close to the best position from its individual history, Pbest. The Gbest is the core of the "social" part, which is the best position among the history of all particles. This part allows the particle to converge on the overall best position. The coefficients r1 and r2 are randomly produced from (0,1). c1 and c2 are operators of the "individual" part and the "social" part, respectively. The position is subsequently altered based on the new velocity of a particle, as shown in formula (2).
(2) As a swarm intelligence algorithm, PSO emphasizes the randomness and convergence of the algorithm itself. The randomness requires the position of the particle concerned to be altered disorderly and freely. This is reflected in the principles of generating and updating velocity (random operators r1 and r2). For a convergence characteristic, it requires all the particles involved to be able to converge to the best position. Thereby, the "social" part of the velocityupdating formula provides the direction for the other particles. During the iteration period, all particles will "fly" to the global best position Gbest, updating their positions based on fitness values. Thus, the characteristics of randomness and convergence constantly guarantee that particles may converge to find the best position. Relevant improvements from previous studies may concern ways to update particle position, like redefining the velocity operator, involving a sigmoid function, employing a hybrid searching algorithm, and so on. Hence, in this case, the final goal is to figure out the best optimal combinations among 17 sensors positions given the number of sensors required. It is vital to ensure the particles' movement and to avoid repetition in Thus, the methods of updating velocity and position used in this paper are not altered. We have designed a multistage and multiswarm discrete PSO (MSMS-DPSO) algorithm for optimal sensor combination searching. The dimensionality of space established is related to the quantity of sensors used on the human body. The relevant workflow of the MSMS-DPSO is shown in Figure. 1. The main process of the algorithm can be divided into two periods: the first is intragroup optimization, and the second is whole swarm optimization. During the first period, different swarms carry out respective PSO optimization in their own swarms. The global best position and local best position are both defined within their group, and different swarms' best positions do not affect each other. In this period, the key point is to find the maximum fitness value by means of optimization within various swarms. The position corresponding to the maximum value among different swarms in each iteration needs to be recorded and updated as well. Once any dimension's position has been changed, the fitness value is calculated and used to update the local best position and the global best position. After the completion of intragroup optimization, the beginning of the second optimization period enables the selected particle to be the global best position from each swarm in first stage. The global best position at this moment is the optimal position among the global best positions of all swarms at the last step of the previous stage. In this period, both accelerating convergence and simultaneously testing other combinations are necessary, and the fitness calculation is performed after the positions of one particle in different dimensions have been all updated. The velocity limitation is also extended to quicken the particle's movement.
However, before applying the velocity-and positionupdating formulas, the initial positions of all particles need to be considered seriously. The initial positions of the particles could have a functional influence on the performance of a PSO [45]. In our paper, the position of the first dimension is assigned to the odd position. Two border particles ( [1, 2, 3…, N], [17, 16, 15…, 17-N+1]) are also defined to make sure the particle does not move out of bounds. These numbers indicate the position of the corresponding sensor. After the position of the first dimension has been specified, the position numbers of the remaining dimensions are chosen randomly and do not repeat the position of the first dimension.  The most important part of the optimization is the velocity and position updating process. Unlike a typical PSO algorithm, the velocity cannot simply be updated by formula. It needs to ensure that the particle position is not repeated in different dimensions and simultaneously ensure the ergodicity of the particle. After calculating velocity and position from equations (1) and (2), to obtain the discrete value, the calculated new position needs to be rounded using equation (3).
When is equal to , a position repeat appears, and the algorithm requires processing to ensure that no dimension's position number is the same. When the new position of dimension 1 has been calculated, it is subsequently checked against the positions of the other dimensions. If the current dimension's position is equal to any of the positions of the remaining dimensions, its position number will decrease by 1, while convergence velocity v<0 (as shown in Figure  These positions include all possible active parts involved in daily activities and more or less cover all potential locations of sensors in current research [4][5][6]. We also listed the possible corresponding practical sensor installation locations combined with clothes, consumer electronics, and accessories according to 17 different body parts, as shown in Table Ⅰ. Details of the sensor locations on the human body are displayed in Figure 1. Thus, the examined sensor number is 17. Recognized activity: Ten different human daily activities were executed in the experiment to ensure a more comprehensive range of testing activities. Selected activities are commonly set as the recognized targets in related work [12,41,42]. These activities can be divided into three groups: static activities, transitional activities, and dynamic activities (as shown in Table Ⅱ).
Device: The sensing device is selected by high-precision IMU commercial product, Xsens MVN. The acceleration detected from a triaxial accelerometer in each unit was sampled at 60Hz.   Sitting-to-standing, Standing-to-sitting, Squatting-to-standing, Standing-tosquatting VOLUME XX, 2017 9 Dataset: As the tested sensor positions cross the whole body and there is no public dataset that could satisfy the requirement of our experiment. We recorded the data for testing, which involved 10 subjects (5 males and 5 females) wearing 17 sensors on their bodies. The subjects' heights ranged from 160cm to 188cm, and the subjects were instructed to do the relevant activities naturally.
Procedure: After signing an informed consent, the subjects were directed to perform static and dynamic activities for durations of 90 seconds at a time and transitional activities in sets of 15 repetitions. Data was recorded by the XSens MVN capture system, which can reconstruct a human model with visualization. This system can also perform annotation of related activities.
B. DATA PROCESSING Acceleration data from each axis was segmented via a sliding window method. According to Wang et al. [12], the length of the sliding window may directly affect the results of ADL prediction, regardless of the classifying methods chosen. Their study states that the window size should be larger than 2.5s to obtain acceptable accuracy. Therefore, the sliding window length in this work was set at 4s with an overlap of 2s to ensure continuity of motion.

C. CLASSIFIER
Considering the characteristics of the dataset used, we adopted a classifier with handcrafted features. Li et al. [42] evaluated different classifiers with the same feature sets for HAR, and the best prediction result was shown by SVM compared with the KNN, FNN, and DT classifiers. SVM can map the data to high-dimensional space via a Kernel function to discover a hyperplane to classify the dataset [43].

D. FEATURE EXTRACTION
Normally, a sampled acceleration signal can be used to derive the orientation vector of acceleration [34]. Because the calculation of the orientation of acceleration is influenced by the sensor placement, the features used in this research are independent from the orientation. Features involved in the human ADL recognition process are commonly divided into time-domain features, frequency-domain features, and time frequency features [44]. Due to the significance of feature extraction, Atallah et al. [11] argued that the average entropy of the acceleration signal could have a relatively high ranking among 13 time-frequency features examined. Moreover, Preece et al. [44] also demonstrated that time-frequency features do not present an advantage compared with timedomain and frequency-domain features for the recognition of eight activities. Therefore, this work utilizes time-domain and frequency-domain features. The extracted features are listed in Table Ⅲ. All features shown are calculated from the signal of each axis.

V. EVALUATION AND RESULTS
The evaluation can be divided into three parts, first, we evaluated the different sampling rate influence on the optimal sensor positions by the combinational method, which is able to figure out the basic trend of sensor number effect on classification accuracy. The evaluation is based on crossvalidation for different sensor position specific datasets.
Secondly, our MSMS-DPSO method is evaluated. The baseline method is selected as the Dynamic Programming. The baseline method related to finding the global optimal position combinations, testing all the combinations of a given number of sensors. Because the goal is to test how close the result from MSMS-DPSO to Dynamic programming and the computational times, the benchmark testing and baseline are supposed to be the same.
Finally, we provide the usage of our method on deriving the optimal sensor positions according to the user preference.

1) STUDY WITH GREEDY APPROACH (COMBINATIONAL METHOD) FOR DIFFERENT SAMPLING RATES
The greedy approach based on the best sensor position from the previous time can be used to generate the local optimal solution with less computational time. Furthermore, we down-sampled the acceleration to validate a more practical situation and determined the impact of sampling rate on the best position. The dataset of 60Hz, 30Hz, and 20Hz sampling frequency was examined. In this experiment, we used the 10-fold cross validation (CV) method to calculate the accuracy of mentioned sensor positions. The training data and testing data are separated independently and randomly with no overlapping for accuracy of calculation.
The results also show that the more sensors used for each sampling rate, the greater the total classification accuracy. Nevertheless, when five or more sensors are used, the increase in average classification accuracy is not obvious. This may be due to the overfitting of the SVM classifier. Also, in practical applications, it is more worthwhile for us to concentrate on investigating the use of four or fewer sensors. In this way, both actual application and the range of large changes in accuracy are taken into account.

2) STUDY WITH MSMS-DPSO APPROACH FOR DIFFERENT CLASSIFIERS
The MSMS-DPSO algorithm was only adopted to determine the best solution when using two, three, or four sensors. The parameters applied to the MSMS-DPSO algorithm in this paper are listed in Table Ⅴ.
In this experiment, the compared objects are from two points, the accuracy and computational times between our method and baseline method (Dynamic programming). For the accuracy calculation, to decrease the randomness of classification, the random environment was set as the same. and the examined dataset (including training and testing) was the same as well (the training and testing dataset are divided by 75% and 25% respectively). The computational times is the total number of accuracy calculations during the iteration.
As the application of our algorithm is for a certain HAR system, it is necessary to validate the generalizability for different classification methods for the same recognized task. Therefore, we conducted an experiment that applied the MSMS-DPSO to several different classification approaches. Since we selected the SVM as the chief classifier for our study, the compared methods are (a) Random Forest (30 estimators), (b) baseline CNN classifier, (c) DNN+LSTM from [1], and (d) DeepCNN [3]. Methods (c) and (d) maintained the network structure described in the original papers. Method (b) is indicated as the baseline deep learning method, which consists of a 16-feature map with 2x2 kernels and Relu activation, a dropout layer with 0.1 rate, a 32feature map with 2x2 kernels and Relu activation, a dropout layer with 0.2 rate, a flattened layer, a dense layer with 128 nodes and Relu activation, a dropout layer with 0.5 rate, and finally, a 10-node dense layer as output. The learning methods were developed based on TensorFlow 2.1 within Python 3.6 and GPU GTX 1080ti. The batch size and epoch were 30 and 20, respectively, for all learning methods. To decrease the randomness of classification, the random environment was set as the same, and the examined dataset (including training and validation) was the same as well. Additionally, the baseline method related to finding the global optimal position combinations, testing all the combinations of a given number of sensors, was executed to validate the results from the MSMS-DPSO. Figure 4 illustrates the working process of the MSMS-DPSO with three sensors as an example. The corresponding experimental results are presented in Table Ⅵ and Figure 5.
As Figure 5 (a) to (e) shows, the effect from different classifiers is not significantly obvious for ADL recognition. This has been reported by other works as well [3,15]. For example, in [3], the difference among the SVM and Random Forest classifiers and the deep learning network is less than 0.1%. This is mainly because the signal captured from the accelerometer maintains limited channels, and the recognized activities are relatively simple. Therefore, the deep learningbased classification method cannot extract more obvious features to outperform artificial feature-based classifiers, such as SVM and Random Forest. Because there were no significant differences among several classifiers except the baseline CNN, we still chose the SVM for subsequent analysis.
In terms of optimization, Table Ⅶ and Figure 5 (f) demonstrate that the MSMS-DPSO can calculate the "best" sensor placement and combination. For lower sensor numbers, like two sensors used, MSMS-DPSO can more successfully find the global optimal positions compared with testing all combinations. With higher sensor numbers, the  task is more challenging. In some cases, the result from the MSMS-DPSO was not the so-called global best position. This is because of the restricted particle searching feasibility of DPSO, which is prone to be trapped into the local optimum. Even so, the accuracy difference between the MSMS-DPSO and baseline methods is quite small (less than 1%). Because we stabilized the random characteristic of the selected learning method for algorithm comparison, different random characteristics would influence the results slightly, which may cause some differences between the results from the two methods. So, the designed MSMS-DPSO can be shown to effectively determine the optimal sensor position. Compared with the all-possible-combinations test, the computational time is lower, especially when the required number of sensors is higher.

1) SINGLE SENSOR USED AMONG THE DIFFERENT BODY SEGMENTS
When using one accelerometer, the sensor placed on the right shoulder expresses a relatively higher average classification accuracy. Furthermore, sensors on the lower part of the human body normally result in worse accuracy, especially on the foot. The results from the sensors located behind the forearm (arms straight down naturally), except the waist sensor, are all relatively lower.
For the three types of activities involved, the classifier can provide different prediction results depending on the different positions of the sensors. Figure 6 displays the confusion matrix from the right shoulder, right upper leg, and right foot when using one sensor. The results show that the average prediction accuracy decreases as the sensor position moves down the body. Figure 7 presents the F1 scores of each single type of activity recognition corresponding to these three sensors.
Figures 6 and 7 together show that for static activity classification, there is no significant difference among the three sensor positions. The main factor that causes a decrease in the rate of recognition is the variance of the other two kinds of activity classification, especially dynamic activity classification. Based on Figure 7, the signal from the right foot cannot effectively discriminate between dynamic activities. In its related confusion matrix, the trained classifier has a worse capacity to classify the activities "going upstairs" and "going downstairs." The same situation also emerges for the right upper leg sensor. For transitional activity recognition, none of the three sensors has relatively good performance in classifying a reversible transitional activity. However, increasing the number of sensors can improve the situation.
2) MORE THAN ONE SENSOR USED EVALUATED WITH OPTIMAL LAYOUT Figure 8 shows the confusion matrix of two-, three-and foursensor optimal combinations found by the MSMS-DPSO algorithm. The F1 scores for respective types of activity for different numbers of sensors used is also presented in Figure  8. With many more sensors used, the most obvious improvement related to the prediction of results is the classification of transitional activities. The F1 score of this type of activity increases from 73.31% (one sensor used) to 88.49% (four sensors used).
For dynamic activities, the F1 score of only one sensor used on the right shoulder is 92.04%, while a four-sensor combination raises the score to 97.65%. For these two kinds of activity, increasing the number of sensors contributes to a better performance for the SVM classifier. However, a continual increase in the number of sensors does not generate a significant improvement. For static activities, the right shoulder sensor used alone can offer an adequate classification accuracy of 96.98%. For four sensors used, the highest accuracy achieved is 98.79%. So, compared with identifying the two other types of activities, varying the number of sensors does not significantly improve the classifier's performance for static activities.
These results provide the basic information for human ADL recognition using an accelerometer. Among 17 different positions on the human body, using accelerometers on the upper body with the SVM classifier provides an acceptable result. For recognizing static activity, any location for accelerometers can produce an adequate classification result. However, signals from lower body sensors generally have less ability to identify the actions of going upstairs and downstairs as well as transitional activities. If a better result is required, especially for the recognition of transitional activities, increasing the number of sensors can be a favorable solution.

3) SENSOR LAYOUT BASED ON USER PREFERENCE
As mentioned before, one important factor of applying the HAR system to individuals is where the wearable sensor should be worn. The selection of sensor position not only determines the prediction performance of the system but also To present the usage of our method to satisfy different user conditions, we investigated user preferences for the placement of wearable devices using an online questionnaire. There were 100 respondents (50 male and 50 female) aged between 20 and 60 involved in the online survey. The involved participants number is common from the related community [2,50]. The results are shown in Figure. 10.
Although different people have different demands for wearable sensor position, more than half of people prefer to wear the sensor on the wrist. Also, some would like to keep the device on the head or glasses. Via the proposed MSMS-DPSO algorithm, we can examine several combinations with specific user-preferred positions as the fixed positions. The relevant results are shown in Table Ⅷ.

VI. DISCUSSION
According to the results, sensors on the upper body show better performance in detecting a series of human ADL, especially the waist, chest, head, and shoulder. As Figure 10 shows, the waist is given the highest ranking, which is consistent with the work of [20]. However, in our work, we contributed to the generation of more sensor layouts when the designated sensor placement is ineffective due to the physical condition or preference of the user.
When more sensors are adopted to increase the accuracy of the results, the best results come from combining the waist sensor, chest sensor, head sensor, shoulder sensor, and upper arm sensor. Nevertheless, we found no notable improvement in accuracy when the number of sensors used exceeded two. This is similar to Cleland's results [7], but their work did not consider transitional activity. Additionally, with increasing number of sensors, the most significant improvement is seen for dynamic and transitional activity, especially the latter. But for static activity, one sensor can provide acceptable classification results. Compared with the related literature, our work is relatively more comprehensive, using 17 accelerometers placed on different locations of the human body to investigate the effect of various numbers and positions of sensors on classification performance As sensor position has been given close attention, many researchers have investigated the influence of sensor position on the performance of an HAR system from various vantage points, such as exploring the best position [11,33], validating different classifiers [20,37], testing sensor numbers [36], and examining the position-specific classifier [20,21]. However, based on not only previous investigation results but also the findings of this paper, the optimal sensor placement depends on the specific HAR system as well as recognized activities. The discussed optimal sensor placement is supposed to be under certain conditions. In contrast to concentrating on the study of a recognition algorithm, focusing on sensor position ultimately aims to leave the sensor selection in the hands of the end user and maintain the user-to-sensor interaction in such wearable HAR systems. Thus, the optimization perspective proposed in this paper not only aims to investigate which part of the human body is most suitable for accelerometer placement but also intends to combine the user's preferences and demands to produce a flexible sensor layout scheme. Not limited to the conclusions obtained from previous works, this paper expands the examined positions of wearable sensors based on the rigid body model and the symmetry of the human body. The optimization scheme developed has the general ability to fit different HAR systems and offer different optimal solutions.
However, there are still some limitations and shortages in this research. Because the paper concentrated more on the optimization scheme, only some simple activities were selected. While, to better sever more people, more types of activities could be considered, such as context-aware activities in daily life. Furthermore, although we proposed the searching algorithm based on DPSO for addressing relevant sensor selection issues, the slow operating speed only allows this algorithm to be applied in an offline scenario. Using a rapid optimization algorithm is more likely to allow the related sensor selection system to be utilized in online optimization scenarios, allowing for more applications. Moreover, the survey of user's preference can be recognized as only a preliminary result. We considered the other works and merely conducted a small range investigation (100 participants) to acquire the user's preference. It is believed that the results will be more convincing with the increase of participant's diversity. While the focus of this study is related to the optimal sensor position derivation, we used the results from survey to demonstrate that the user's conditions are different and proposed method can be employed to output the optimal sensor positions according to the user's conditions.

VII. CONCLUSION AND FUTURE WORK
This paper studied the impact of the number and placement of accelerometers on human daily activity recognition. Two methods, the greedy approach and the developed MSMSDPSO, were proposed to investigate the issue of sensor layout on the body. The results from these methods reveal that with an increase in the number of sensors used, the average prediction accuracy can be effectively improved, particularly when the number increases from one s to two. A subtle improvement in accuracy is seen when the sensor number is higher than four. The proposed MSMS-DPSO optimization scheme can be used to produce the best sensor layout based on specific positions as a premise for accommodating different user demands. The designed system aims to maintain the user's selection regarding sensor placement and keeps the interface between the HAR system and user to generate a more individualized pervasive sensing system. Based on the results, different body segments generate different levels of accuracy in HAR response, and upper and lower body sensors show significant variance in dynamic and transitional activity recognition. With more sensors used, classification performance in terms of transitional activity effectively improves. If the recognized activities basically consist of static and dynamic activities, two sensors can produce acceptable results. A sensor placed on the upper body (waist, chest, head, shoulder, upper arm, in order of relative performance) maintains an increasing prediction ability in various types of activity recognition.
The optimization scheme helps the HAR obtain a more flexible sensor position interface to realize the personalization of the user, such as some training cases for patients [51]. To better push forward the method results of this study, the next step is likely to keep on building an lightweight system fusing the optimization scheme to better support the HAR system design, and also consider more factor in the design period besides the user's preference, like the sensor weight and cost, which is going to seek a multidimensional optimization scheme to benefit the decision making in the wearable HAR systems.