**4. The Experimental Scheme**

The purpose of this article is to continuously monitor patients with HD. To distinguish the patient's actions from other normal daily movements, so as to provide an objective clinical diagnosis basis for doctors and facilitate doctors to make appropriate treatment plans. The experimental flow chart is shown in Figure 3.

**Figure 3.** The experiment flow chart.

This experiment will collect the data of several actions like normal standing, normal sitting, normal walking, standing of HD, sitting of HD, and gait of HD, as shown in Table 1.


**Table 1.** The actions used in the experiment.

The simulation experiment was carried out in a laboratory in the new science and technology building of Xidian University, which is 7 m × 5 m in size. The transmitting and receiving antennas of the MSP were respectively placed at two ends of the laboratory, with a horizontal distance of 4 m. The transmitting antenna and receiving antenna were positioned 1.8 m from the ground and 1.2 m from the ceiling. The transmitting module of the MSP was composed of a control computer with a

wireless adapter and an omnidirectional antenna. The wireless adapter was configured in an injection mode for sending wireless signals. The receiving module of the MSP consisted of a control computer with a wireless adapter and three omnidirectional antennas. The wireless adapter was configured in a listening mode for receiving signals and extracting CSI data. The MSP operated in C-band (4.8 GHz) and used OFDM technology to modulate the signal with a total of 30 subcarriers. The signal bandwidth was set at 20 MHz. The transmitting antenna had a packet frequency of 200 Hz, and the time window was 12 s. We collected 300 samples for each action. The experimental scene is shown in Figure 4.

**Figure 4.** The experimental scene: (**a**) standing; (**b**) sitting; (**c**) walking.

In Figure 4c, the object moves in a direction perpendicular to the line connecting the transmitter and receiver, mainly considering that if the object moves along the line from the transmitter to the receiver, the line-of-sight transmission will be weakened, and most of the energy will be lost, resulting in a reduction of signal amplitude at the receiver, which is not conducive to any kind of communication. At the same time, in clinical trials, the movement tasks of patients are usually specified, so we chose a movement mode that is more conducive to study the feasibility of the technical scheme described in this article.

In this work, our research focuses on the feasibility of using wireless sensing technology to monitor HD patients, and the number of HD patients is very small [23]; hence, we did not recruit real patients, but volunteers from our team simulated HD movements.

Before the experiment, we fully informed the experimental participants of all relevant matters and contents of the clinical experiment. By watching videos of clinical manifestations of HD patients and reading related literature, all experimental participants were rigorously trained to simulate real HD patient movements.

Due to the limited staff in our team, there were a total of 10 volunteers who participated in our experiment, including 6 males and 4 females, aged between 24 and 48 years. Details of volunteers are shown in Table 2.


**Table 2.** Details of volunteers.

We randomly selected 5 volunteers (3 male and 2 female) to simulate the movements of HD patients, and the remaining 5 volunteers (3 male and 2 female) were used as normal reference. Each set of actions was repeated 60 times for each volunteer, and it took 6 days to collect the data.

#### **5. The Data Processing**

After collecting CSI data, we needed to perform a series of processing steps on the data. In this section, we follow the steps shown in Figure 3 to process the collected CSI data in turn.

#### *5.1. Data Preprocessing*

#### 5.1.1. Remove Outliers

In the process of data collection, due to the influence of environmental noise or internal voltage fluctuation of the device, there was a large number of outliers in the original signal. These outliers seriously distort the original signal and must be removed.

We used the "Hampel" function in MATLAB to remove the outliers of the original signal. For each sampling point of the original signal, the function calculates the median of the window consisting of the sampling point and the three sampling points on the left and right sides. Then the absolute value of the median is used to estimate the standard deviation of the median at each sampling point. If a sample is more than three standard deviations away from the median, the sample is replaced with the median [24]. The outliers contained in the original signal are shown in Figure 5. The original signal after removing the outliers is shown in Figure 6.

Outliers can affect signal de-noising. After removing the outliers of the original signal, we can de-noise the signal, which is described in the next section.

**Figure 5.** Outliers contained in the original signal.

**Figure 6.** The original signal after removing the outliers.

#### 5.1.2. Signal De-Noising

The patient's actions mainly affect the low-frequency components of the wireless signal, so we needed to filter out the high-frequency noise generated by environmental noise, slight internal voltage fluctuations, etc. In this paper, wavelet transform was used to realize signal de-noising [25]. The "wden" function with one-dimensional noise reduction in the MATLAB toolbox was used. The main principle of this function is to filter out noise through threshold processing of the wavelet decomposition coefficient of the original signal.

We used the "sym8" wavelet to decompose the original signal in 5 layers. The "SimN" (N = 2, 3, ... , 8) wavelet has good symmetry, which can reduce the phase distortion during signal decomposition and reconstruction to a certain extent. At the same time, we applied heuristics to overcome the problem of noise distribution at each decomposition level. The signal waveforms of each action after de-noising by wavelet transform are shown in Figure 7; the larger the variance, the larger the information. We chose the subcarrier according to the principle of maximum variance [26].

**Figure 7.** *Cont.*

**Figure 7.** The waveforms of each action after data preprocessing: (**a**) normal standing; (**b**) standing of Huntington's disease (HD); (**c**) normal sitting; (**d**) sitting of HD; (**e**) normal walking; (**f**) gait of HD.

#### *5.2. Feature Extraction*

It can be seen from Figure 7 that the time domain waveform of each action is quite different. We extracted eight time domain features from the signal waveform of each action, as shown in Table 3.


**Table 3.** Time domain features.

#### *5.3. Model Training*

We used SVM and RF to train the model to ensure the accuracy of data classification and to determine which algorithm has a better effect in practical applications. At the same time, in order to make the training model reliable, we used the four-fold cross validation method to divide the data set.

We selected the radial basis function (RBF) as the kernel function of SVM, and the RF contained 500 decision trees.

#### **6. Result and Discussion**

The confusion matrix of each classification algorithm is shown in Table 4.


**Table 4.** Confusion matrix of classification algorithms.

The experimental accuracy of each algorithm is shown in Figure 8.

**Figure 8.** Algorithm accuracy.

Figure 7a–d shows different waveforms of normal people and patients with HD under static action. It can be seen from the figure that the static action signal waveform of normal people is relatively gentle, while the static action signal waveform of patients fluctuates greatly because patients with HD have convulsions when they are ill and dance-like movements when they are serious. Figure 7e,f shows the signal waveforms of normal gait and gait in patients with HD. Due to the large amplitude of walking itself, the abnormal body swing of patients with HD may be covered by the walking movement, resulting in the signal waveform discrimination between normal gait and abnormal gait not being very obvious, which is consistent with reality. At the same time, we can see from Figure 7 that the differences between the action signal waveform of normal people and patients with HD are obvious in the time domain. In order to reduce the amount of data and improve the efficiency of the algorithm training model, we extracted eight time domain features from the samples, which can well describe the time domain waveform, and the experimental results also prove this.

Table 4 is the confusion matrix of SVM and RF. It can be seen that the SVM algorithm can completely distinguish the static actions of patients with HD, while the normal static actions have misclassification, which shows that the performance of patients in the static actions is inconsistent, the performance of body convulsion or dance is different, and the performance of normal people in static actions are consistent. It can also be seen that RF can completely distinguish between normal gait and normal sitting action. Both SVM and RF cannot distinguish the normal gait and the abnormal gait of patients with HD completely, because the time domain signal waveform of them is similar.

Figure 8 shows the prediction accuracy of the two algorithms. The prediction accuracy of SVM is 98.0%, and that of RF is 96.7%. Both algorithms can achieve high prediction accuracy, which proves that the experimental scheme described in this paper is feasible. At the same time, we can draw a conclusion that when using the method described in this paper to distinguish the actions of patients with HD, the performance of SVM is better than that of RF.

### **7. Conclusions**

As far as we know, this article first proposed a method for monitoring HD patients using wireless sensing technology and studied the feasibility of the proposed technical scheme in depth. We used the self-developed MSP to collect CSI data, then removed the outliers, and filtered the CSI data with the wavelet transform. After that, we extracted eight time domain features from each action data set and trained the model with SVM and RF machine learning algorithms. The experimental results show that the prediction accuracy of the SVM algorithm can reach 98.0%, and the prediction accuracy of the RF algorithm can reach 96.7%. Both algorithms can effectively distinguish the normal actions and the actions of patients with HD, which proves that the technical scheme described in this paper is feasible. This will provide a basis for doctors to objectively diagnose patients' conditions. At the same time, the technology can help doctors to follow up on the patient's condition development and improve the treatment plan in time. At present, the MSP described in this paper is not fully automated but also needs some manual operations. Next, we will continue to improve the experimental platform to make it fully automated to achieve data collection, data processing, and data analysis in a one-click operation. At the same time, we will also further explore the application of wireless sensing technology in medical care.

**Author Contributions:** Conceptualization, Q.Z.; methodology, L.G.; resources, X.Y.; writing—original draft preparation, Q.Z.; writing—review and editing, M.B.K.; supervision, X.Y.; project administration, X.Y.; funding acquisition, X.Y. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the National Natural Science Foundation of China grant number 61301175.

**Conflicts of Interest:** The authors declare no conflict of interest.

### **References**


© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
