Skin Temperature Prediction in Lower Limb Prostheses

Increased temperature and perspiration within a prosthetic socket is a common complaint of many amputees. The heat dissipation in prosthetic sockets is greatly influenced by the thermal conductive properties of the socket and interface liner materials. These materials influence the body's temperature regulation mechanism and might be the reason for thermal discomfort in prosthetic sockets. Monitoring interface temperature at skin level is notoriously complicated. The problem might be considered notorious because embedding wires and sensors in an elastomer eventually results in elastomer failures because of the high strain induced when donning a liner (amputees roll the liners onto their limbs). Another reason is because placing sensors and wires directly against the skin could cause irritation and chaffing over just a short period of time. We describe a route wherein if the thermal properties of the socket and liner materials are known, the in-socket residual limb temperature could be accurately predicted by monitoring the temperature between socket and liner rather than skin and liner using the Gaussian process technique.


I. INTRODUCTION
M ONITORING and predicting the residual limb skin health in lower limb amputees is of principal importance as the socket of the prosthesis creates a warm and humid microenvironment that encourages growth of bacteria and skin breakdown [1], [2]. Elevated residual limb skin temperature is considered one of the major factors that could affect the health of soft tissues in that region [3]- [7]. Studies on temperature within the prosthetic sockets of transtibial prosthetic users have been described by Peery et al. [8], [9]. They investigated the in-socket temperature of five transtibial amputees at 14 different locations on the residual limb and at four different stages, i.e., donning, steady-state resting, initial walking, and steadystate walking. Their results indicated that the thermal dissipation characteristics of socket and liner restrict heat loss from the residual limb and the temperature increase is larger in areas where there is more muscle bulk. It was also seen that different socket and liner materials affect the temperature increase in the residual limb differently. Also these temperature rises were different between patients. The impact of environmental factors has also been investigated by Klute et al. [10], [11] by looking at the in-socket residual limb temperature at four locations throughout a whole day. Simultaneously, they recorded environmental temperature, humidity, and also the activity of the patient. It was found that in-socket residual limb temperature increased gradually throughout the day, and an increase in activity caused a further increase in temperature. Also, the environmental humidity and temperature influence the perception of whole body and residual limb thermal comfort [12]. Limitations to this study were small sample size and the variation of prosthetic liners and socket materials between patients. The population on which these studies were done was small. Hence, a generalized statement about the temperature of residual limb skin cannot be made. Limited research has been done on the thermal behavior of the socket and liner materials and their effect on stump skin temperatures [13]- [16]. Klute et al. [17] investigated the thermal conductivity of different liner and socket materials. Their investigations disclosed that there was a large variation in the thermal conductivity of liner materials, whereas the prosthetic socket materials-thermoplastic and carbon fiber-had similar thermal conductivities. They concluded that liner material selection has a considerable effect on the residual limb skin temperature as compared to the thermoplastic and carbon fiber socket materials which has little effect. The results presented in [17] suggested that some prosthetic components can act as a barrier to conductive heat transfer due to low thermal conductivity. This implies that different liner and socket materials produce a different thermal environment and, hence, can lead to different residual limb skin temperatures [18], [19].
This leads to a hypothesis that if the thermal properties of the socket and liner materials are known, then the in-situ skin temperature could be predicted by monitoring between socket and liner. The purpose of this is to assess whether or not a temperature measurement device can accurately measure the temperature of the residual limb when it is placed either on the inner or outer surface of a prosthetic socket. If that is achievable, then the monitoring of the residual limb skin temperature can be done without undesirable contact of any temperature sensor with the skin thus avoiding any increased skin irritation.
Our approach was to determine an accurate mathematical model using the Gaussian processes for machine learning (GPML) to predict the residual limb skin temperature of the amputee. The temperature measurement device when placed directly in contact with the skin would give the most accurate reading. However, this could create practicality issues with normal prosthetic use in a domestic situation such as protruding lead wiring, consistent positioning of sensors, and possible skin irritation. Embedding sensors and wires in the hard prosthetic socket is possible during the manufacturing process for prosthetic sockets. This would eliminate the practicality issues as described earlier. In addition, no damage to the device would occur through donning and doffing and the longevity of the device would not be impaired.
The aims of this project are to investigate how differing activity levels and ambient temperatures influence the in-socket temperature. It would be then investigated that whether the predictive model developed is accurate enough and its response time and repeatability are also sufficient.

II. METHOD
To investigate the correlation between the position of thermocouples (skin and in-socket), one transtibial traumatic amputee was recruited to perform in a 35-min laboratory protocol. The investigation was implemented following ethical approval granted by the University of Strathclyde Ethics Committee (Ref UEC13/04).
The subject was a 68-year-old male who weighed 70 kg and wore a 6-mm Otto Bock HealthCare GmbH Technogel liner with a resin laminate socket. For the experiment, the subject was dressed in shorts and t-shirt. Hence, it should be noted that there was no extra clothing layer on the prosthesis. To monitor and record the skin and in-socket temperatures, four K-type thermocouples via a data logger (type HH1384; Omega Engineering) were used. Two thermocouples were taped onto the residual limb in lateral and medial position. The other two thermocouples were put on the corresponding positions on the liner (in-socket). This is indicated in Fig. 1. Data from the four channels were simultaneously collected at 0.5 Hz at a predetermined ambient temperature.
After the thermocouple heads were secured with tape, the prosthesis was donned with the thermocouple wires exiting the proximal edge of the socket. The subject was asked to complete the following protocol: resting (sitting) for 10 min, walk at selfselected pace of 0.62 m/s on a treadmill for 10 min, and finally rest for 15 min. The residual limb skin and the socket temperatures were sampled at 0.5 Hz for the entire 35-min protocol. For analysis purposes, three steady-state periods were defined as the last minute of each period: initial rest, walking, and final rest. The temperature profile of the residual limb skin and liner was analyzed at different ambient temperatures to see how closely they are correlated. This study was conducted in Scotland for the Spring/Summer profile where the ambient temperature ranges from approximately 10°C to 25°C. Hence, the temperatures from this range were picked. We conducted the experiment at 10°C and then repeated for 15°C, 20°C, and 25°C (Dataset A). The experiments were conducted again after a time span of two months to confirm the influence of ambient temperature on the residual limb skin temperature (Dataset B). All experiments were conducted in a climate-controlled chamber with zero wind velocity and 40% humidity level.

III. RAW DATA
The temperature profiles of the liner and residual limb skin at ambient temperatures of 10°C, 15°C, 20°C, and 25°C from set B are shown in Figs. 2-5. From the studies on the amputee subject, it is seen that donning causes a moderate temperature increase as also reported in [20], walking causes a significant increase, and the rest periods following activities must be substantially long to return the limb  to temperatures before donning the prosthesis. Figs. 2 and 3 indicate that the residual limb temperature profile for ambient temperatures of 10°C and 15°C has a similar pattern of being steady throughout the experiment. However, this temperature profile of the residual limb is significantly different from that at ambient temperatures of 20°C and 25°C as indicated in Figs. 4 and 5.
Both the lateral and medial residual limb skin temperatures showed a steady increase in the temperature throughout the experiment. After the end of the experiment, the temperatures in both lateral and medial side were 2.1°C higher than the starting.
It can be seen from these studies on amputee subject that the residual limb skin temperature behavior is a function of ambient temperature. This reflects that though the human body self regulates to maintain a stable internal environment despite changes in the external environment, in case of prosthetic users there are layers of liner and socket materials which inhibit the body's ability to thermoregulate effectively.
Since, the temperature profiles of the residual limb are almost similar for the ambient temperature pairs of 10°C, 15°C and 20°C, 25°C, the Gaussian predictive model at ambient temperatures of 10°C and 25°C are only discussed in this study.

IV. GAUSSIAN PROCESS FOR MACHINE LEARNING
The data from the data logger indicated that at any given ambient temperature, the trace of the liner temperature follows that of the residual limb skin as in Figs. 2-5. This suggested a possibility to model the liner temperature as a function of skin temperature and create a mathematical model of the same. Processing was performed with custom developed software (using MATLAB, Mathworks). The model designed takes the liner temperature as the input x and the predicted output is the residual limb skin temperature y.
The predictive model was developed using the GPML [21]. Similar with other regression methods, the goal of Gaussian process regression is to infer a continuous function f(x) from a training set of input-output pairs in a supervised learning context. The key assumption in Gaussian process modeling is that our data can be represented as a sample from a multivariate Gaussian distribution. A Gaussian process model infers a joint probability distribution over all possible outputs for all inputs. This form enables the implementation of Bayesian framework in a simple way [22], [23]. Bayes' theorem states that the posterior probability of a condition is given by the product of the prior probability and the likelihood in the light of the evidence. This can be written as .
(1) H) is the posterior probability that statement B is true, given that condition A is observed and that hypothesis H is correct. P(A|B,H) is the probability of observing A if B is true and H is correct, which is called the likelihood. P(B|H) is the prior probability of B being true, without having made any observations. P(A|H) is the evidence: the probability of observing A if hypothesis H is correct [23].
The inference of a joint probability distribution function involves deducing a number of quantities called the hyperparameters Θ. These hyperparameters are an indication of the precision and relevance of the input parameters for predicting the output. Thus, the aim in a Gaussian process model is to choose model parameters for which the probability of the training data is maximized [22].
If the training data contain N points comprising of their set of targets y N with their corresponding input x N , then the Gaussian model is defined by an N-dimensional covariance matrix C N . The covariance matrix is basically indicative of the closeness to each other outputs for different inputs, taking into account the model parameters. This allows predictions of outputs y * to be made, based on the difference between the new inputs x * and those seen in the training data. Each element of C N is defined by covariance function C f , which is a function of inputs and hyperparameters [22]- [24]. For the element ij in covariance matrix, C ij = C f (x i , x j , Θ). The covariance function can be user defined. In this study, the covariance function that was used was where the set of hyperparameters Θ = {θ 1 , l, σ n } and δ ij is a delta function whose value is zero for all i = j. The first term in the above equation allows the closeness of two outputs to be related to the closeness of the inputs. The length scale l for an input parameter indicates how much the output will vary relative to changes in an input. The initial values of the hyperparameters were selected as [0.1, 1, 1]. To prepare for Gaussian process regression, we calculate the covariance function, (2), for all possible combinations of these points, summarizing in the matrices in the following equations: Since the key assumption in Gaussian process modeling is that the data can be represented as a sample from a multivariate Gaussian distribution, we have where T indicates the matrix transposition. The conditional probability p (y * |y), "given the data, how likely is certain prediction for y * ," follows a Gaussian distribution as The reliability of the regression depends upon on covariance function and in turn the hyperparameters. Typically, we would not a priori know the values of the hyperparameters. To get the optimal hyperparameters, (1) becomes Referring to (8), it is apparent that the evidence is independent of hyperparameters and is constant for a given dataset. To find the optimal hyperparameters, the posterior probability is maximized as the prior maybe noninformative. This corresponds to minimizing the log marginal likelihood (nlml) as in (9). Hence, for a particular training set and covariance function, the Gaussian process would select the best hyperparameters that give the best predictions for training data [23], [24] logp (y|x, Θ) = − 1 2 Several multivariate optimization algorithms can be utilized to calculate the hyperparameters, such as Laplace's approximation, Markov Chain Monte Carlo sampling, Kullback-Leibler optimal approximation, or the Variational Bayes approximation. In the present study, kernel hyperparameters were optimized by the exact inference technique. For real-valued outputs, it combines the Gaussian process prior with a Gaussian likelihood and perform an exact posterior inference in closed form.

V. MODEL GENERATION AND PREDICTION
The aim of the model is to predict the residual limb skin temperature from the liner temperature. Hence, the input to the model is the liner temperature and the output of the model would be the residual limb skin temperature. To test the predictive capability of a model, it is trained on one set of data and tested on previously unseen data. It is seen from Section II that the skin temperature is dependent on ambient temperature. Hence, individual Gaussian process models for the lateral and medial side of the residual limb were designed, using the principle as described in the previous section for ambient temperatures of 10°C and 25°C. Consider the ambient temperature 10°C, first the lateral side model was trained on different scenarios to investigate the optimal training required. Table I presents the different testing and training cases presented to the model. Initially the model was trained by 250 data points from set A. The training points are inclusive of the three stages of protocol (initial rest, walking, and final rest) and are picked in the ratio of time intervals used for the respective protocol periods. Hence, the first 70 points from initial rest, first 70 points from walking, and first 110 points from the final rest were taken for training. The predictive capability of the model is gauged by computing the training error, test error, and the normalized log likelihood by testing with 100 data points (not seen by the model during training) from set A which are again drawn in the ratio of time intervals used for the respective protocol periods. This process is continued by increasing the number of training data points from set A. The normalized log likelihood for each set of test data is also given, calculated by dividing the value of marginal likelihood by the number of points in the test set. It can be seen that as the number of training points increase, the error value decreases and the likelihood of the data increases. This implies that with greater training points, the new model either predicts data closely or has higher confidence due to a higher density of training points.
When the model is trained on all the values of set A and tested with 100 points (randomly picked from set A), the training error does decrease while the likelihood also decreases slightly. This might be an indication that too much of training to the model might lead to over fitting the data. Next the model trained on the entire set A was tested on 100 points in set B which were unseen by the model. The results indicated that the test error has a substantial increase, but the likelihood function is still consistent with the uncertainty predictions of the Gaussian model. This may be because the dataset B is similar to dataset A, leading to points closer to the smooth relationship predicted by the Gaussian process. It was then deduced that when the model is trained on whole dataset A and hyperparameters optimized in (9), then its predictions for set B lie in the 95% confidence interval (±2 standard deviations). This is indicated in Figs. 6 and 7.
After hyperparameter optimization, the covariance hyperparameters for the lateral side at 10°C were [−1.27, 2.92, −1.41] and the likelihood hyperparameter was −1.79. The final negative log marginal likelihood (optimized) was 285.84. Table II presents the hyperparameters for the predictive model at different ambient temperatures.
A similar process was done for the medial side of residual limb skin. After the predictive algorithm was formulated, the actual and predicted data are then averaged after every five samples to create a single mean, and done till the end of all data points. This helps in smoothening out short-term fluctuations and highlighting the longer term trends.

VI. DISCUSSION
From the raw data, it can be noted that for the ambient temperature of 10°C, the lateral skin temperature was almost same  at the start and end of the experiment. However, the medial residual limb skin temperature followed a steady profile, but the temperature at the end of the experiment was 1°C lower than the start. At ambient temperature of 25°C, both the lateral and medial residual limb skin temperatures showed a steady increase in the temperature throughout the experiment. After the end of the experiment, the temperatures in both lateral and medial sides were 2.1°C higher than the starting. It can be seen from Figs. 2 and 5 that since the volume of the data set is big, the overall trend of the temperature profile is difficult to gauge. Time averaging of 5 s done on the recorded data helps in identifying the trend better and improves the joint probability function with an enhanced fit of the Gaussian to the data; so that more points are more accurately predicted. The actual skin temperature obtained by the Gaussian predictive model is shown in Figs. 8 and 9 for two very different ambient temperatures of 10°C and 25°C, respectively. For both these experiments done at two different ambient temperatures, our predictive model using Gaussian process provides a simple, effective, practical, and probabilistic approach to determine the unknown skin temperature of the subject within the prosthetic device from the actual liner measurements. The predictive model we developed leads to results which are in 95% confidence interval which translates to an accuracy of ± 0.8°C. However, this approach has certain limitations as well. Although this study was conducted on one amputee subject over a number of times to verify the influence of ambient temperatures on the in-socket temperatures, there is a need to extend it on a greater population in order to define a generic behavior. Since the residual limb temperature profile varies with changes in environmental temperatures, the Gaussian model has to be trained with individual datasets corresponding to changes in the ambient temperatures.

VII. CONCLUSION
The challenge of noninvasively monitoring the residual limb skin temperature has been addressed in this study. This study which was conducted on a subject performing various tasks in an environmental chamber at different ambient temperatures clearly indicated that the residual limb skin temperature and the liner temperature are majorly affected by both the ambient temperature and the activity level of the subject. The obtained data from the experimentation at ambient temperatures of 10°C and 25°C were then used to develop a predictive model using GPML. GPML is a nonparametric approach, which harnesses the training data provided to determine the underlying function. The Gaussian model was individually trained for each of the ambient temperatures on which the tests were done. With 5 s time averaging in order to suppress random fluctuations, the developed model provides results which lie in the 95% confidence interval when predicting subject skin temperature within the prosthesis from the liner temperature measurements. Future scope of the work includes comparing the prediction accuracy of the Gaussian Process model with other mathematical models like the adaptive network-based fuzzy inference system using support vector regression.