Application of Sensors in Intelligent Clothing Design

— In order to study the application of sensors in intelligent clothing design, the artificially intelligent cutting-edge technology -machine learning method was proposed to combine a variety of signals of non-contact sensors in several different positions. Higher accuracy was achieved, while maintaining the comfort brought by a non-contact sensor. The experimental results showed that the proposed strategy focused on the combination of clothing design technology and artificial intelligence technology. As a result, without changing the sensor materials, it enhances the comfort and precision of clothing, eliminates the comfort reduced by sensor close to the skin, and transforms inaccurate measurement into accurate measurement.


Introduction
One of the most important applications of intelligent clothing is currently based on the daily health care of people's sensors embedded in clothing, for real-time detection to the body's biological signal changes, such as body temperature, pulse, blood pressure and respiratory status [1]. Through the intelligent computer program, we can determine whether there are potential disease threats, to play the role of early warning and prevention in advance. Especially for infants and young children, this intelligent clothing will have more applications, because infants are less able to resist diseases than adults, and ability to timely and accurately give feedback on physical condition and predict diseases is also poor. There are two important factors in the design of infant intelligent clothing, one is the accuracy of intelligent clothing prediction disease, and the other is the comfort of clothing [2,3]. However, in the actual design, the two are often contradictory. For example, in order to get physiological signal with high precision, such as body temperature and pulse, we usually need to make sensor close to the skin, which leads to the loss of comfort and safety. On the contrary, if the sensor is not in direct contact with the skin, it will reduce greatly the quality of signal and accuracy of prediction. Therefore, it is a key issue in the field how to improve the design method and how to improve the prediction accuracy of intelligent clothing in the case of guaranteeing good comfort [4]. development of wearable computers has laid a good foundation for intelligent clothing, but there is still a great distance from people's expectations. Clothing is very different from rigid electronic computer. Clothing is usually comfortable, soft, beautiful and safe. It is necessary to embed the computer skillfully into the soft, beautiful and comfortable fabric, so as to achieve the perfect combination of clothing and computer. This ability to determine quantitatively internal distributions of physical parameters within a textile structural composite integrated with such sensors has been demonstrated by Majstorovi!, G [10]. At present, intelligent clothing has been applied to many fields, including health monitoring, for guarding people working in extreme environment, helping disabled people's daily life or entertainment, which has made a series of notable achievements. Although many researchers think that intelligent clothing will become one of the main trends of clothing development in the future, there are many challenges in research and practical application, which needs further exploration and upgrading [11,12,13].
To sum up, in previous studies, although smart clothing has been widely used in protecting extreme environment workers and helping people with disabilities in daily life and entertainment, their comfort needs to be further improved. To solve this problem, the artificially intelligent cutting-edge technology was proposed to combine a variety of signals of non-contact sensors in several different positions. Higher accuracy was achieved, while maintaining the comfort brought by a non-contact sensor. The proposed strategy focused on the combination of clothing design technology and artificial intelligence technology. As a result, without changing the sensor materials, it enhances the comfort and precision of clothing, eliminates the comfort reduced by sensor close to the skin, and transforms inaccurate measurement into accurate measurement.

Methodology
In this study, we use the method of point to lead aspect. Taking the intelligent clothing used for temperature measurement an example, we specifically study noncontact sensor effect and improvement of accuracy by the method based on clothing design technology and artificial intelligence. Because intelligent clothing can be regarded as wearable computer, this chapter introduces the design of intelligent clothing based on the temperature measurement from the aspects of computer hardware (including clothing version and structure design) and software.

Hardware design
The shirt described in this paper has two functions of real-time temperature measurement and high temperature warning. The difference between the two is mainly about software design, and the hardware design is basically the same. The shirt has three temperature sensors located on the chest, back and waist, respectively. Each sensor is placed on the inside of the garment, but not always in contact with the skin. For example, when the body erects, the back sensor often has no contact with the skin; but when he bends down, it will be close to the skin. The sensor on the waist contacts with the skin only when the body is sided; there is a clothes barrier between the sensor and the skin of the chest, so any actions or gestures are not in direct contact with the skin. In order to simulate the situation in everyday life, the experimenter in the shirt kept the different movements and positions, such as sitting, standing, lying and so on throughout the process. In the experiment, sometimes, the sensor contacts the skin and sometimes, it has a certain distance from the skin. Therefore, it effectively simulates the non-contact sensor signals in daily life. As a result, from these noncontact sensors, we got a series of noisy and unstable temperature signals.
In the experiment, we recorded the temperature signal of the sensor every 2 seconds and recorded the current room temperature. The reason is that unlike contact temperature sensors, non-contact sensors are affected not only by body temperature, but also greatly influenced by room temperature. In consequence, we will get a lot of signals from different sensors and these separate signals often have a lot of noise. But if there is a method to organically integrate the noise signals, learn from each other, and form a more accurate temperature signal? The answer is positive. Through a large number of experiments on intelligent algorithm design, we have achieved encouraging results. We found that only through the machine learning regression model for the fusion of these signals can make the temperature prediction accuracy greatly improved, without changing hardware structure of smart clothing. As a result, it did not reduce the comfort of clothing.
If the sensor is an electronic component, will it harm the human body? Especially for infant clothing, the consideration of safety is more important. This paper uses a small temperature sensor DS18B20, which has the characteristics of small size, high precision and safety to the human body. Since the principle is based on a thermistor, the voltage and current are usually very small; no evidence of harm to the human body is found in the present study.

Software design
This chapter mainly introduces the software design of the intelligent clothing. Its purpose is to use machine learning methods to integrate several inaccurate temperature measurement results into a relatively accurate result, so as to achieve just using the non-contact sensor to reach close to the touch sensor effect. In the design, we use the supervised machine learning method, including four main steps, data annotation, feature design, training and testing, as shown in Figure 1. They will be introduced respectively in the following:  Since the machine learning method is to obtain the model that can predict the new data from analyzing the historical data, in the implementation, a certain amount of sample annotation are necessary, or called the teacher signal. The computer learns under the guidance of teachers signal. For instance, the weight of the linear regression in Figure 2 is acquired through learning manual annotation data. In the experiment, data collection has gone through 10 days, and 100 samples are collected. Each sample corresponds to a time point, the current body temperature (obtained through the thermometer), all signals of each sensor in the first 5 minutes (every 2 seconds, there is a temperature measurement value) and the current room temperature (obtained by thermometer). In order to maintain the difference between samples and make each sample more representative, each sample is at least 5 minutes apart. Because if the distance between sampling points is very close, the measured body temperature change is very small, which will increase the redundancy of samples.
In the temperature prediction task based on regression model, the standard value (Gold standard) is a thermometer measured temperature. The observation values used to predict it comes from signal and ambient temperature of different temperature sensors. We design these observed signals into machine learning features. In the temperature classification task, because it is difficult to obtain the abnormal temperature of the sample in the experiment, we will define positive example as the situation of temperature more than 36.2 DEG C. The average temperature of all test data is regarded as the virtual threshold, so the task is a simulation experiment. The purpose is the inspection of whether the non-contact sensor fusion based on machine learning can improve the effect of warning temperature. The step is to represent each sample in the form of a eigenvector, and each element (or feature) in the vector reacts the attributes of the sample in a certain aspect. The common principle of feature selection is to select the characteristics with the strong ability of individual prediction, and make the characteristics as complementary as possible. Therefore, although the accuracy of each individual feature is very weak, if the multiple features can complement each other, the effect after fusion will be greatly improved compared with single features. For instance, the example in Figure 2 shows that a combination of the weak features can even achieve a perfect effect through a proper combination. In this experiment, 10 features are designed for each sample to reflect the measured signals of different sensors from different angles. These include the average temperature of each sensor in different time periods, and the temperature (room temperature) of the current environment. All these specific characteristics are listed in Table 2. According to the description, we can design feature extraction program and transform raw data into feature vector representation. For example, the iJOE -Vol. 14, No. 6,2018 features in the first line in the table (Back, average temperature, 2s) indicates the average temperature of the back sensor within 2 seconds before the current time point is measured. Again, the sixth line (Chest, average temperature, 120s) represents the average temperature of the chest sensor within 120 seconds before the sampling point.
After the data is tagged, we can use it to train the machine learning model, so as to integrate the different weak sensor signals. The labeled data are also known as the training set. For instance, in the example in Figure 2, linear regression weights are obtained by statistical learning from training sets. The training purpose is learning to get a series of parameters, so as to make the organic integration of different features, similar to the parameter estimation in statistics. This experiment uses the Weka toolkit, which includes many classic statistical machine learning models. For the temperature prediction task, we try to use different regression models, including linear regression, least square regression, radial basis function network, regression, Gaussian processes and support vector machine (SVM). In the experiment, we found that the effect of Gauss process based on the radial basis function is the best. Due to the small amount of training data, in order to prevent the phenomenon of over-fitting, the parameters of all the model are selected by default, and no parameters are adjusted according to the training set or test set. For the task of body temperature classification, we tried to use support vector machine, Logistic regression, Naive Bayes classifier, random forest and so on. The results show that most classifiers have little difference, and the performance of SVM based on polynomial kernel function is the highest.
The training process is done on the basis of artificial annotation data. When training model parameters, the standard answers of samples are used, such as the temperature from thermometer in body temperature estimation, and whether the temperature of the thermometer in the fever warning task more than 36.2 DEG C. However, in the process of testing, the standard answer of the samples to be tested will not be used, but to use the model obtained by other samples learning and to forecast the new sample. Then, the standard answer of samples and predicted results are compared, so as to obtain the relevant accuracy indexes. In the experiment, we use the leave one out to test, namely choosing samples one by one for testing. We also use all other samples to construct a machine learning model and to predict the sample. In addition, the prediction results and the sample standard answer are compared and assessed. In regression tasks, the evaluation index is correlation coefficient (CC) and mean absolute error (MAE), which are commonly used indicators in various regression tasks. The correlation coefficient is defined as: (1) In the above formulas, Y i and X i are the estimated value and true value of i-th sample, respectively. ! and ! are the mean values of the estimated value and true value, respectively. The range of the indicator is 0 to 1, and 0 and 1 represents the poorest and best effects, respectively. The mean absolute error is defined as: The index directly reflects the deviation degree between the estimated value and the true value. The lower the value is, the closer the estimated value is to the real value. 0 value represents a perfect estimate without any error.
For tasks of the second body temperature classification, we used a series of commonly used indicators to evaluate classification tasks, including precision, recall, Fscore, accuracy and AUC. (3) Among them, "#true positives" indicates the case of correct classification; "true negatives" indicates negative cases with correct classification; "false positives" indicates positive cases of classification errors; "false negatives" is a negative example of classification errors. The F-score is the harmonic average of the accuracy rate and the recall rate. The accuracy reflects the proportion of correct prediction. AUC refers to the area under the ROC curve, which reflects the average accuracy under the selection of different thresholds, and it is not affected by the threshold selection.

Temperature estimation task
In the experiment, we observe and study the effects and various statistical data of a single non-contact sensor. In Table 2, we can see that the temperature of the noncontact sensor is far lower than the temperature of the thermometer (used as the standard answer), and there are strong noise signals, which can be clearly seen from the standard deviation in Table 2. The reason is that the temperature of the environment is much lower than that of the body, and the signal of the sensor often changes with the movement of the body. The experimental result is also as we have predicted that, even the best non-contact sensor, the effect has only 12.9% correlation coefficient and 4.95 absolute error. Such a low accuracy is hard to be applied in practice. In Table 3, from results 4 to 6, based on a single sensor, we use the machine learning method, and compared with the results 1 to 3 in Table 2, it can be seen that the mean absolute error is greatly reduced. However, the correlation coefficient did not change significantly. The reason is that the machine learning method can use simple linear or nonlinear transform to adjust the predicted temperature to the range similar to the standard tem-perature. Whereas, only using a separate sensor cannot achieve similar fitting further, so the correlation coefficient changes little.

Non-contact sensor fusion
The effect of single sensor and multiple sensor combinations is compared in Table  3. In order to compare the effect of feature combination, the machine learning models used here are all Gauss process regression. From the data in the table, we can clearly see that the combination of multi sensors greatly improves the indicators. For instance, the sixteenth sets of results fuse all the characteristics of all sensors. In terms of the correlation coefficient, it achieved relative increase of more than 300%, so that the absolute error is reduced by 96%. This is a huge improvement compared with the prediction effect of individual sensors, which fully demonstrates the effectiveness of the proposed multi sensor fusion method in the paper. On the basis of keeping the sensor not close to the skin, the sensor measurement accuracy is improved significa-ntly. In addition, it can be seen from the table that all the estimated results have been greatly improved after the ambient temperature (feature 10) is added. This is easier to understand because a non-contact sensor has a great relationship with the temperature of the surrounding air and depends on the temperature of the skin and the environment.

Comparison of the effect of machine learning model
Machine learning is one of the most active branches of artificial intelligence. In recent years, people put forward many different machine learning models, which often has different effects in different application models. Therefore, one of the important purposes of this experiment is, through the experimental comparison of the effect, to select the machine learning model most suitable for the application. For temperature estimation tasks, we compare 6 popular regression methods, including linear regression, least squares regression, RBF network regression, neural network, support vector machine and Gauss process. The feature set uses all the features in Table 2. In order to make a fair comparison and prevent the influence of over fitting, all these models use default parameter settings in the whole experiment, and do not debug the best parameters according to the test data, which is conducive to the reproducibility of the experimental results. From table 4, we can see that the Gauss process has obtained the highest correlation coefficient and absolute error. The reason is probably that the temperature data of the sensor is in accordance with Gauss distribution to a certain extent.  Table 5 records the effect of different classifiers in temperature early warning task. Compared to the temperature regression estimation task, the goal of this task has been reduced. Because we only need to determine whether the temperature is higher than the specified limit, it is only necessary to know the relative size between the temperatures and then we can achieve accurate prediction. Therefore, most of the evaluation indicators seem to be better than the task of temperature regression estimation, although the classification and regression evaluation indicators are different.

Temperature early warning task
From table 5, we can get 66% accuracy (obtained by the waist sensor) without the use of machine learning of a single sensor. This contrast with 12.9% of the correlation coefficient in the regression estimate shows that, although the non-contact sensor cannot get the accurate temperature, the relative size of the obtained value has a great correlation with the real body temperature. For example, for two sample points, if the true temperature is 35.9 DEG C and 36.5 DEG C, the temperature from non-contact sensor temperature is 25.6 DEG C and 29.5 DEG C. Obviously, the temperature regression estimation results of a single non-contact sensor will be poor (such as CC, MAE and so on indexes). Howener, if 27 DEG C is selected as the decision threshold to judge whether the temperature exceeds the warning line, the sensor alone will still get the correct result. The reason is that the relative size of the measured temperature is consistent with the true value. The SVM based on the kernel function of the 3-order polynomial functions has obtained the best effect, which uses the default regularization parameter setting. Another interesting phenomenon is that the result of the tenth groups were only used the regression estimation results for the classification task, almost achieved the best effect. It indicated that the temperature regression estimation task had strong generalization ability, can be directly applied to a classification task. It is unnecessary for designing another machine learning model especially for the classification task, which can greatly simplify the design process of intelligent clothing.

Conclusion
In this paper, a design strategy of intelligent temperature monitoring clothing based on non -contact sensor is proposed. The experimental results show that the accuracy of temperature prediction can be greatly improved by effective fusion of multiple signals placed at different locations of the non-contact sensor, and the comfort degree will not be reduced due to the skin close to the sensor. The main contributions of this article can be summarized as follows: (1) This method only uses the ingenious combination of existing hardware devices, such as sensors, to achieve the effect of improving comfort. No other materials, such as smart fabrics, are introduced, which greatly reduces the cost of clothing production. And this method is not in contradiction with the new sensor technology, which will further improve the comfort of intelligent clothing.
(2) In the experiments, it is found that based on the best machine learning method at present, the simple average temperature characteristics are used to achieve an increase from 10% to 300% in the evaluation index. This is undoubtedly a great progress, and it has also left a lot of space for further development.