## 2 Methodology
### EEG-Specific Feature Extraction for the SVM-ML Model  
In this work, the RSPmean and RSPmax values in different frequency bands were selected as the EEG features for input to the SVM-ML model as they represent the average and maximal cortical changes, respectively, during fabric stimulations based on manual recognition from the previous study [28]. During the real-time EEG recording, the sampling frequency was 1000 Hz. In the preparation of the EEG RSP features, a Butterworth bandpass filter from 0.1 to 100 Hz was first applied to the EEG to eliminate irrelevant high-frequency components. Then, an additional Butterworth notch filter from 49 Hz to 51 Hz was applied to eliminate the 50 Hz noise from the environment. Following this, the filtered EEG was segmented into different epochs, i.e., 30 s pre-stimulus baseline and three 13 s stimuli with different fabrics. The numbers of EEG samples after segmentation were 108 from the SA group (12 participants \(\times\) 3 trials \(\times\) 3 fabric stimuli), 108 for the SU group (12 participants \(\times\) 3 trials \(\times\) 3 fabric stimuli), and 135 for the UD group (15 participants \(\times\) 3 trials \(\times\) 3 fabric stimuli). Next, the EEG samples were transformed into their power spectra by Pwelch estimation [47], and the entire frequency band (0.1-100 Hz) of each segmented EEG epoch was decomposed into five frequency bands, i.e., delta (0.5-4 Hz), theta (4-8 Hz), alpha  
Figure 1: Electroencephalography (EEG) experimental setup and protocol. (**a**) Participant wearing the EEG cap, ear plugs, and eye mask, is seated in a chair and tested with their hands comfortably placed on the table. The areas of each fabric stimulation are the ventral forearms. The three fabric samples, namely cotton, nylon, and wool, are placed on the table. (**b**) Illustration of fabric stimulation. The nylon fabric is placed on the ventral forearm. (**c**) Protocol for fabric stimulation. (8-12 Hz), beta (12-30 Hz), and gamma (30-100 Hz) [48]. Finally, the RSP [49] of each frequency band for each fabric stimulus was calculated using the following equations:  
\[\mathrm{P(f_{1},f_{2})=\int_{f_{1}}^{f_{2}}p(f)df} \tag{1}\]  
\[\mathrm{RSP(f_{1},f_{2})=\frac{P(f_{1},f_{2})}{P(0.1,100)}-\frac{P_{baseline}(f_ {1},f_{2})}{P(0.1,100)},} \tag{2}\]  
where \(p(f)\) is the power spectral density; \(f_{1}\) and \(f_{2}\) are the low and high cutoff frequencies of a given EEG frequency band, respectively; \(P(f_{1},f_{2})\) is the power spectrum from \(f_{1}\) to \(f_{2}\); and \(P_{baseline}\) is the power spectrum of the EEG segments during the baseline test in each trial. The above spectral analysis of the raw EEG signals was implemented offline with the EEGLAB v12 toolbox in MATLAB (The MathWorks Inc., Natick, MA, USA). After obtaining the RSP value from each EEG channel, the \(\mathrm{RSP_{mean}}\) and \(\mathrm{RSP_{max}}\) values were acquired to represent the RSP features of the multichannel EEG, where \(\mathrm{RSP_{mean}}\) is the average value of the RSPs of all the channels in a given frequency band of a signal epoch, and \(\mathrm{RSP_{max}}\) is the highest value among all the EEG channels. Then, the \(\mathrm{RSP_{mean}}\) and \(\mathrm{RSP_{max}}\) of the 62-channel EEG (ground and reference channels were neglected), which covered the entire cortical area, were calculated for each frequency band.