Identity Recognition in Sanitary Facilities Using Invisible Electrocardiography

This article proposes a new method of identity recognition in sanitary facilities based on electrocardiography (ECG) signals. Our team previously proposed a novel approach of invisible ECG at the thighs using polymeric electrodes, leading to the creation of a proof-of-concept system integrated into a toilet seat. In this work, a biometrics pipeline was devised, which tested four different classifiers, varying the population from 2 to 17 subjects and simulating a residential environment. However, for this approach to be industrially viable, further optimization is required, particularly regarding electrode materials that are compatible with industrial processes. As such, we also explore the use of a conductive silicone material as electrodes, aiming at the industrial-scale production of a toilet seat capable of recording ECG data, without the need for body-worn devices. A desirable aspect when using such a system is matching the recorded data with the monitored user, ideally using a minimal sensor set, further reinforcing the relevance of user identification through ECG signals collected at the thighs. Our approach was evaluated against a reference device for a population of 17 healthy and pathological individuals, covering a wide age range (24–70 years). With the silicone composite, we were able to acquire signals in 100% of the sessions, with a mean heart rate deviation between a reference system and our experimental device of 2.82 ± 1.99 beats per minute (BPM). In terms of ECG waveform morphology, the best cases showed a Pearson correlation coefficient of 0.91 ± 0.06. For biometric detection, the best classifier was the Binary Convolutional Neural Network (BCNN), with an accuracy of 100% for a population of up to four individuals.


Introduction
Biometric identification is the use of anatomical or physiological characteristics to determine the identity of a user before a system. Methods such as fingerprint or facial recognition currently have widespread use in real-world applications, however, research has explored other modalities such as the gait or Electroencephalogram (EEG) [1][2][3]. Cardiovascular signals are readily available and have also been shown to have interesting properties for biometric recognition. In particular, the ECG has been shown to have low intra-subject variability and high inter-subject variability, making it a promising modality for biometrics [2,4].
In [5], we introduced a proof-of-concept (PoC) system for invisible ECG, implemented in the form of a toilet seat. The PoC allowed for us to experimentally demonstrate the possibility of measuring ECG signals on the thighs. A specific sensor was designed, and polymeric dry electrodes with conductive properties were used as the interface with the body. Given the natural barriers to signal propagation (e.g., androgenic hair), this previous work also explored different textures of the electrode surface. While simpler textures (i.e., a flat surface) do not allow for adequate ECG signal acquisition in some morphotypes, a pyramidal texture consistently showed adequate results across all the different criteria under evaluation. This opens up a new approach to automated health-monitoring systems that can function as an extension of people's everyday lives, without changing the look and feel of the objects in which they are integrated.
Based on our results, an instrumented toilet seat was created, which aggregates the technical solutions that demonstrated the best performance during the research and development process. However, considering that the use of such a device may be shared amongst multiple inhabitants within a household, a desirable property of such a system is the ability to match the recorded data to the subject that provided it. Although previous work has demonstrated the biometric potential of ECG signals, in this work, we investigate the biometric potential of ECG signals acquired at the thighs, which differ significantly from signals acquired at standard locations.
We explored Binary Convolutional Neural Network (BCNN), Support Vector Machines (SVM), Gaussian Naive Bayes (GaussianNB), and the K-Nearest Neighbors algorithm (3-NN) as classifiers to identify different users. In doing so, we tested a different number of registered users to simulate households of different sizes. To our knowledge, this is the first study of its kind.
Furthermore, for the final implementation, two elongated electrodes were designed with a shape consistent with the toilet seat (Figures 1 and 2a). These retain the pyramid-like texture proposed in [5,6], but modified so that the portion of the electrode in contact with the body has a more aesthetically pleasing appearance. Conductive silicone is also explored for the electrode material, which increases the comfort and has a higher compatibility with industrial processes.  The paper is presented as follows. Section 2 describes the background and most relevant previous work in this area. Section 3 presents the main details of the experimental setup. Section 4 summarizes the methods used to identify and classify individuals. Section 5 summarizes the experimental evaluation and results. Finally, Section 6 presents the main conclusions and future work directions.

Related Work
The accurate and automatic identification of individuals is becoming an integral part of our daily lives. For our use case, automatic identification is needed to distinguish individuals when they use the toilet seat for ECG acquisition; however, there are usability and privacy aspects related with this particular application that make it especially challenging.
The topic of identity recognition in sanitary facilities is extremely rare in the literature. In [7], the authors describe a patent application related to a toilet seat and smart close-stool, designed to monitor human bioimpedance using multiple electro-acoustic transducers applied to the toilet seat body on both sides. To address the problem of user identification, an external unit is proposed to obtain the fingerprint.
The authors of [8] also highlight the relevance of obtaining user identification, in this case in the context of a multifunctional toilet cover plate. In addition to acquiring ECG signals, the authors proposed a keyboard, an iris scanner, or a fingerprint sensor for identity recognition. However, these options exhibit multiple usability constraints when considering the target application.
A recent work by Park et al. [9] describes a smart toilet designed for the long-term analysis of excreta through multimodal data collection. In this work, the problem of user identification is addressed through fingerprint recognition, but a novel approach is also proposed, based on anodermic features extracted from video imaging.
The authors of Zhang et al. [10] describes an Artificial Intelligence toilet (AI-Toilet) for an integrated health-monitoring system (IHMS) using intelligent triboelectric pressure and image sensors. This study addresses a frustum structure and the spacer structure in the eco-flex layer to extend the detection range for measuring the seating pressure. The biometric information obtained with this prototype from six users sitting on the toilet seat enabled identification with 97.14% accuracy.
Kurahashi et al. [11] focused on another perspective in their work, by focusing on the creation of a personal identification system based on the rotation of toilet paper rolls. They focus on the differences in the way a toilet roll is pulled, proposing a system that identifies individuals based on the rotation characteristics of toilet rolls with a gyroscope. A recognition accuracy of 83.9% was reached for a group of five individuals.
If we can demonstrate the feasibility of thighs ECG signal as biometric, then the recognition system using the ECG can be activated as an extension of the regular monitoring process. However, due to the characteristics of the thighs ECG, there are variability conditions that greatly affect the signal and its quality [2,12,13].

Experimental Setup
To test our proposed approach, a full-scale toilet seat model was created, as in Figure 1, with an indentation on each side to slot the electrodes. The electrical connection to the sensor module located on the back is made by means of a wire soldered to a brass plate, which, in turn, is capped by the electrode. The sensor and data acquisition system is the same as that used in [5], allowing for the toilet seat to transmit the signals collected via Bluetooth to a receiver (i.e., a computer or smartphone).

Conductive Silicone
A central component of our work is the interface with the body, using non-gelled materials that can be used as an electrode. In [5], we explored the Proto-Pasta CDP1 (ProtoPlant Inc., Vancouver, WA, USA) conductive Polylactic Acid (PLA) carbon black/polymer thermoplastic [14], herein described as a PLA Electrode. Experimental results for this material on a 1 cm 3 sample have shown a surface resistivity between 150 and 200 Ω cm (along the Y axis), and a volume resistivity between 170 and 240 Ω cm (along the Z axis) [14].
However, the melting point (195-215 • C), decomposition (250 • C), and auto-ignite (300 • C) temperatures of the PLA Electrode [14] have proven to be technically challenging for industrial scale-up. Fused filament fabrication (FFF), the process for which this material was primarily designed, also has low resource efficiency and presents long-term mechanical robustness problems. The latter is particularly troublesome when minutiae geometries are involved (as is the case in our hemispherical texture), and when the parts are repeatedly subjected to abrasion (e.g., when the surface is cleaned with a scrub sponge).
While the PLA Electrode will be used for benchmarking with [5], in this work we explore a conductive silicone material as a new alternative. A custom electrode was produced in the shape of the chosen texture, and evaluated through experimental trials. In particular, Conductive High-Consistency Silicone Rubber filled with carbon black is used as the material for the electrode (herein designated as a Silicone Electrode). Vulcanised parts made from this compound have a unique combination of properties, characterised by their good flexibility, mechanical properties, electrical specifications and very good industrial processing properties (suitable for both injection moulding and extrusion applications, Table 1).

Electrode Texture
When measured at the thighs, ECG signals have amplitudes in the µV range [5]. An adequate electrical contact between the skin of the subject and the electrode is, therefore, of paramount importance. However, the electrical contact can be compromised by natural barriers such as androgenic hair [15,16], which is a particularly relevant problem in the context of our work. For benchmarking purposes, we use the PLA Electrode with the hemispherical texture (Figure 2a), as it achieved the best results in [5].
Nevertheless, for the Silicone Electrode, a new texture was designed and tested; this design has slight undulations and longer ridges, which was found to be more aesthetically pleasing and suitable for real-world deployment (Figure 2b).

Skin-to-Electrode Impedance
Some factors can affect the impedance of the skin, resulting in a change in ECG signal quality. For example, moisturisers, age, sunlight, humidity and temperature can affect the impedance of the skin. This impedance is measured as a voltage-to-current ratio and can be described as the resistance experienced by the alternating electrical current at the interface between the skin and the electrode. When the electrode makes contact with the skin surface, the skin becomes part of the measurement circuit. This can result in significant noise and even signal loss as the insulation of the skin-electrode interface degrades the circuit due to high skin impedance, leading to lower signal quality.
A circuit was created with a resistor R = 1 kΩ, two pre-gelled Ag/AgCl electrodes, and the experimental electrode, for which we would like to determine the impedance in contact with the skin (Figure 3). Using the oscilloscope, we determined the maximum amplitude value for each channel, V A and V B . From these values, the amplitude of the impedance was determined according to Equation (1).
Silicone showed similar behaviour to the best-performing electrode, PLA, as shown in Figure 4 and Table 2.

ECG Acquisition Setup
In parallel with the toilet seat, data are simultaneously collected with a second system applied at a reference location on the body of the tested subjects (herein considered as the reference system). The experimental setup also included a luminosity sensor (LUX) on the reference system and a LED on the toilet seat, to enable the synchronization of both independent time series in post-processing. This optical approach was adopted to ensure electrical decoupling between the two systems. Figure 5 shows the general design of our study. Data acquisition was simultaneously performed with our setup, the reference system, and the silicone electrodes. From our setup, four data sources were produced; these were channels O1-LED and A1-ECG REF in the reference device, and channels A1-ECG EXP and A6-LUX in the toilet seat.  With the ECG REF, disposable Covidien (Covidien Ltd., Gosport, UK) KENDALL ARBO H124SG EMG/ECG/EKG surface electrodes (24-mm diameter) were used, while the electrodes described in Section 3.2 were used with the toilet seat sensor. The latter is a dry electrode, while the Covidien electrode is a typical clinical use electrode, which has an adhesive side with non-irritating gel, especially developed to improve conductivity, preventing allergic reactions. Figure 6 shows the pipeline for our system analysis, which was organised in the following order: ECG data acquisition, pre-processing, R-peak detection, feature extraction and, finally, classification for identity recognition.

Data Acquisition
A total of 17 healthy and pathological volunteers aged 24-70 years were enrolled for this phase; of these subjects, 13 were female and 2 had androgenic body hair. For each participant, 5 min of data were recorded while sitting down with the skin in contact with the electrodes and the legs projected to the front (heels touching the ground, to ensure a uniform weight distribution across the electrodes). Data acquisition was performed according to the principles of the Declaration of Helsinki, following an approval of the protocol by the Data Protection Officer (PDO) of the Instituto de Telecomunicações (IT) to ensure that the experimental protocols and methods conformed to the previously established ethical guidelines. Informed consent was obtained from all the participants.
For data analysis, mean and standard deviation were calculated for each subject. Python 3.8 and the BioSPPy (0.6.1) [17] and PyHRV (0.4.0) libraries were used for digital filtering and segmentation methods and heartrate variability (HRV) analysis, respectively. Further details on the signal pre-processing steps can be found in the article [5]. However, the analysed signals were filtered using a Finite Impulse Response (FIR) bandpass filter of order 300 with cuttoff frequency of 3-45 Hz, and were segmented according to the method proposed by Hamilton [15].

Biometric Templates
After extracting the ECG signal characteristics for each subject, an average of 90 templates per subject was obtained. From this template total, two types of analysis were performed, pertaining the selection of the training and testing sets: random and static. For random profiling, the templates of each subject were randomly selected to create the testing and training sets, and these formed the inputs to the classifiers. For the static characterization, the goal was to find out if the performance of the classifier is the same when there is a gap in the timeline. That is, for each subject, the first 30 templates from each subject were chosen for the training and for test sets, and separated into the following proportions: • 30 30 Training/Test, in which, for the test set, the last 30 templates of the total were used; • 30 20 Training/Testing, in which, for the test, the last 20 templates of the total were used; • 30 15 Training/Testing, in which, for the test, the last 15 templates of the total were used. This ensures that the templates used for testing did not have the same temporal sequence as the randomly obtained ones, thus demonstrating that even if the morphology of the signal slightly changes, the classifier can still identify the subject. For both characterizations, the process was repeated 30 times so that the generalization ability of the algorithm could be more accurately evaluated. In addition, the performance of the classifier as a function of the number of subjects was analyzed. That is, the classifier was tested with templates for a number of subjects ranging from 2 to 17.

Classification
Different numbers of subjects were tested to simulate families of different sizes. Binary Convolutional Neural Network (BCNN), Support Vector Machine (SVM), Gaussian Naive Bayes (GaussianNB) and K-Nearest Neighbour (3-NN) classifiers were explored for thigh ECGbased identification. These classifiers were chosen because they have already been addressed in the literature as a method for identifying individuals using ECG signals [18][19][20].
Due to the novelty of the problem, a Neural Network (NN) had to be developed from the ground-up. A 1D Convolutional Neural Network (CNN) was picked as a baseline because it is the current state-of-the-art for ECG-based identification. A CNN is also very skilled at finding spatial features, which is especially attractive for time-series data, where successive datapoints are time-dependent and related to each other. In this work, we explore a novel architecture based on Binary Neural Networks (BNN), i.e., a CNN-based BNN (BCNN), which maximizes the computational performance [21]. Similarly to state-ofthe-art works, we used the filtered and segmented ECG recordings (templates) as inputs. After the segmentation, the BCNN input data were represented as 32-bit floating point numbers. To minimize the memory footprint, the data were quantized to 8-bit unsigned integers. It is common practice to perform standardization on the NN's input data, which we also adopted [21].
For the biometric identification method using SVM, we used the multiclass SVM, one-against-all (OAA) with Linear Kernel [22]. GaussianNB consists of determining a posteriori probability by multiplying the a priori probability by the probability of a positive outcome, called the conditional independence of class [18]. The 3-NN algorithm results in a classification where an object is classified by a majority vote of its neighbours, with the most frequent object among its three nearest-neighbours being assigned to the class [23].

Results
We performed signal quality assessment through rhythm and waveform morphology analysis, evaluated the thigh ECG-based identification performance, and the user satisfaction. The results for each of these experiments are presented in this section.

Rhythm Analysis
With this analysis, we seek to characterize potential differences in the heart rate as computed from the signals collected with ECG REF (gold standard) and with ECG EXP (Silicone Electrode). Distortions in the R peak may introduce a latency that affects the heart rate calculation, and artefacts in the signal may lead to undetected or wrongly detected peaks. Due to the influence of noise, there may be a lack of compatibility between the QRS complexes of the EXP and REF sensors. It is, therefore, important to evaluate the correlation between the heart rates and P-QRS -T morphology obtained with the EXP and REF sensors. It is worth noting that the heartrate is only performed when there are two or more consecutive R-peaks.
In this section, the statistical analysis with mean (µ) and standard deviation (σ) of the heartrate difference in the EXP sensor relative to the REF sensor is presented for each pair of consecutive R peaks. The signal detection error (SDE in %) is also examined, which is the percentage of segments that are saturated or corrupted by noise, given by Equation (2), where S represents the total signal and N the out-of-range signal (both in seconds). All the results are summarized in Table 3.  Figure 7 shows a radar plot of Heart Rate Variability (HRV) parameters to provide a visual comparison of parameters calculated from the R-peaks in ECG EXP signals comparatively to those obtained from the ECG REF. The radar plot normalizes the values of the NNI reference series with the values extracted from the experimental series, and this series is used with the reference values at 100% (also described in Table 4).   The results show that the signals obtained from the population under study had a 75% recognition of QRS complexes, with a 15% excluded signal on average. For this new acquisition system, these are positive results, especially when considering that the acquisition is carried out at the thighs. A great similarity was found between the heartrate obtained using the ECG EXP and the ECG REF, which encourages us to further study the thighs for ECG acquisition.

Heartbeat Waveform Morphology
An analysis was performed to evaluate the morphological similarities between the heartbeat waveforms detected with the REF and EXP sensors. Following the methodology described in [5], the R peaks in the REF sensor were first determined and correlated with the cycles of the EXP sensor for each beat cycle. In this way, it was possible to detect and remove the outliers of the heartbeat waveform, to ensure only valid waveforms were obtained in the EXP sensor.
In Figure 8 we illustrate the individualized heartbeat waveforms, with the heartbeat waveforms that were considered valid represented in yellow and the heartbeat waves considered as outliers represented in gray. Table 5 presents the values of Pearson's Correlation Coefficient (PCC) and Normalized Root Mean Square Error (NRMSE). Based on the results from Section 5.1, which were further confirmed experimentally, the Silicone Electrode shows the best performance compared to the PLA electrode. However, despite the high morphological correlation, there are significant differences that could influence the biometric recognition results, again reinforcing the importance of studying this topic and the work. In Figure 9 we have an example of the ECG EXP signal (green) obtained using the toilet lid compared to the signal obtained using the ECG REF (blue). The red and purple points show the R peaks detected by the algorithm used in this work.

Biometric Identification
Figures 10 and 11 present the performance, expressed in terms of accuracy, recall and precision for each tested classifier, as a function of the population size. Figure 10 shows the results for the random template selection described in Section 4.2, which achieves an accuracy between 97 and 100% for a population of up to four subjects. As the population increases, as expected, the performance of the classifier decreases and among the four tested classifiers, the one with the best results was the BCNN. Figure 11 shows the results for the static template selection described in Section 4.2. In these results, it is possible to observe a reduction in the performance of the classifier that, for a population with up to four subjects, presents an accuracy of 100%. The BCNN is the best classifier and proves that when values with distant temporal intervals are used, there may be a greater difficulty in correctly identifying the subject, because its morphology may be slightly different over time. However, for all cases, and based on the literature [24], it was possible to obtain viable user identification results through ECG signals collected at the thighs.

Satisfaction Form
Besides the functional evaluation, in this work, we also performed a user satisfaction survey as a way of assessing the subjects' acceptance of the proposed device. This can consider the subjects' overall experience with the device, or specific aspects of their interaction. With the survey results, it is possible to identify what needs to be improved from a user's perspective and what can already be considered stable. With this part of the study, we seek to evaluate how users perceive that their needs are addressed by the device. Table 6 details the population that was enrolled in the tests.
To this end, the population answered a questionnaire assessing the usability of the device (Table 7) [25], and a satisfaction questionnaire about the system ( Table 8). The questionnaire about the usability of the device describes the user's opinion about the impact of the device at first sight and how comfortable it was on a scale of 1-5. The satisfaction questionnaire is used to validate the device for the end user and to assess the impact of using it. From the results, it is possible to verify the great acceptance of the device. Despite its being something that had never been seen by the users, from the System Usability Scale (SUS) responses, it is possible to calculate a usability index of 96%, allowing us to conclude that the subjects participating in the trial considered it to be easy to use and learn; 75% of the subjects would use the system frequently. Comfort is also essential for adoption of the device, with 19% of respondants finding it comfortable and 81% extremely comfortable given its intent.  Table 7. System Usability Scale (SUS) and number of subjects whom chose each option.

Questions 1 2 3 4 5
I think that I would like to use this system frequently 0 0 0 12 5 I found the system unnecessarily complex 7 8 0 0 0 I thought the system was easy to use 0 0 0 2 15 I think that I would need the support of a technical person to be able to use this system 10 3 3 1 0 I found the various functions in this system were well integrated 0 1 11 3 2 I thought there was too much inconsistency in this system 0 17 0 0 0 I would imagine that most people would learn to use this system very quickly 0 1 3 4 9 I found the system very cumbersome to use 0 13 4 0 0 I felt very confident using the system 0 0 2 5 10 I needed to learn a lot of things before I could get going with this system 5 12 0 0 0 1-I strongly disagree, 2-I disagree, 3-I agree moderately, 4-I agree and 5-I strongly agree. Table 8. Satisfaction Questionnaire and number of subjects that chose each option.

Questions 1 2 3 4
How convenient is the use of our system? 0 0 6 11 1-Nothing convenient, 2-Not very convenient, 3-Convenient and 4-Very convenient How comfortable did you feel using our system? 0 4 0 13 1-Nothing comfortable, 2-Not very comfortable, 3-Comfortable and 4-Very comfortable Compared to our competitors, is the quality of our system better, worse or the same? 0 11 6 0 1-N/A, 2-Worst, 3

Conclusions
This paper builds upon our previous work, further contributing to the state-of-the-art in invisible ECG by exploring the feasibility of signals collected at the thighs, with a sensor integrated in a toilet seat, for subject identification. Our approach enables ECG signal acquisition without the use of body-worn devices, bringing a new paradigm to automated health-monitoring systems embedded in the subjects' living space.
Based on the experimental evaluation by the morphological analysis of the collected ECG signals, heartrate variability (HRV) and heartrate, the custom textured conductive silicone dry electrodes showed satisfactory results for the acquisition of ECG signals on a toilet seat (described in Sections 5.1 and 5.2). A proof-of-concept of a smart toilet seat that allows for the identification of different users based on ECG recordings was created. This proof-of-concept summarises the technical solutions that have shown the best performance during development and serves as an essential theme for the expansion of this topic in the prior art (described in Section 5.3).
Future work will be focused on performing further data acquisition in healthy controls and subjects with cardiovascular diseases, evaluating if/how the biometric templates change over time (e.g., multiple months apart), exploring privacy-preserving template representations, and devising automated biometric template update strategies. In addition, we envision the study of template fusion techniques, and assessment of the minimum contact time with the device, not only for biometric identification but also to allow for the early detection of cardiovascular disorders. However, this work further strengthens the feasibility of thigh ECG data acquisition using electrodes embedded in a surface with which subjects interact on a regular basis [26]. Funding: This work has been partially funded by FCT/MCTES through national funds and when applicable co-funded by EU funds under the project UIDB/50008/2020, which the authors gratefully acknowledge.
Institutional Review Board Statement: The study was conducted according to the guidelines of the Declaration of Helsinki, and approved by the IT-Instituto de Telecomunicações.
Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.
Data Availability Statement: Not applicable.