**3. Results**

This section presents the experimental results regarding the various sensors of the proposed low-cost IoT SN, as well as their comparison, where possible, with expensive certified sensors. The tested sensors mainly include the Galvanic Skin Response Sensor (GSR), the Body Temperature Sensor-(BT), the Airflow Sensor (AF), the Patient Position Sensor (PP), and the sensor for Electromyogram (EMG).

It should be mentioned that the e-Health kit of Libelium which has been used as the basis for the development of the IoT SN presented here, also supports the digital sensors for Blood Pressure (BP) and glucose measurement. However, they could not be used because these sensors, together with the Wi-Fi communication board, are required to be connected to the same physical resource: the serial port. Given that the communication of the IoT SN with the gateway is performed via Wi-Fi, it is obvious that these sensors could not be included in this evaluation procedure

Moreover, the digital pulsioximeter (SPO2) sensor is autonomous with its own display. The IoT SN is simply used to transfer the measured results from the particular sensor to the gateway without any change in accuracy of the measured values, and so it had no meaning to test it further. Regarding the remaining sensors that were tested, we attempted to provide an objective evaluation concerning their measurements. The results of some of them could be easily checked and evaluated, such as

the Patient Position Sensor one. However, this is not always possible. For example, the airflow and the EMG sensors cannot be evaluated by comparing absolute values. It is sufficient though, to check whether these sensors can follow the breathing or muscle contraction patterns. Therefore, in this case, it is not required to compare their output with the output of similar commercial devices. However, such a comparison is performed whenever possible, like in the case of the temperature sensor, which was evaluated against a commercial medically certified one. Regarding the GSR sensor, an attempt was made to match the peaks of its output with another medically certified commercial one by Shimmer [19]. In the following, the evaluation-testing results of the various sensors are given, along with a number of conclusions that were derived from this procedure. It has to be stressed that the presented sensor curves are representative of numerous identical experiments carried out with similar results. This holds for all the different types of experiments described.

In Figure 8, the temperature sensor values are evaluated against the reference ones as provided by a certified thermometer and the values that are produced after the application of the filtering algorithms described in Section 2.2. The Moving Average Window is applied for *k* = 5 samples that are initially averaged, and two of these samples are excluded (the ones with the highest deviation from the initial average). The PCA algorithm was applied using *m* = 3 columns of the *n* = 10 of the U matrix (compression 30%). The Kalman filter is applied following the exact algorithm described in Section 2.2. The same filtering algorithms and configurations have also been used for the GSR sensor in Figure 9. The Mean Square Error (MSE), the Normalized MSE (NMSE) and the Signal to Noise Ratio (SNR) parameters were mainly used for comparison. The aforementioned parameters are defined for a reference signal *vref* of *N* samples and a real signal *v* according to Equations (14) and (15).

$$MSE\left(v, v\_{ref}\right) = \frac{1}{N} \sum\_{i=1}^{N} \left(v(i) - v\_{ref}(i)\right)^2,\tag{14}$$

$$MSEE\left(v, v\_{ref}\right) = \frac{MSE\left(v, v\_{ref}\right)}{MSE\left(v, 0\right)},\tag{15}$$

$$SNR = 10\log\_{10}\left(\frac{v\_{ref}}{v - v\_{ref}}\right)^2,\tag{16}$$

**Figure 8.** Temperature measurement with sampling period 1 s.

**Figure 9.** Skin Conductance Voltage Measurement with sampling period 500 ms.

Table 1 depicts the MSE, NMSE, and SNR parameters for the signals illustrated in Figures 8 and 9. Even though the skin resistance (*Rs*) and skin conductance (1/*Rs*) are used rather than the skin conductance voltage (*Vs*), these values are simply estimated taking into account the skin conductance voltage according to the formula *Rs* = 50 kΩ/V−0.5 V, as in our case.


**Table 1.** MSE/NMSE/SNR parameters' comparison for Figures 8 and 9.

It is deduced from Figures 8 and 9 and Table 1 that the usage of the Moving Window Average filtering algorithm on the original (sensor) values has improved them significantly when compared to the reference measurements. Regarding application of the PCA algorithm, in most cases reduces the error and compresses the signal. Moreover, if a higher compression rate had been selected (with a lower m value) an even lower error would have been achieved in the particular examples where the smoothing is preferable than the preservation of the original signal details. At this point we would like to mention that, to our knowledge, this is one of the few works where PCA is used mainly for noise reduction of biometric signals. Undoubtedly, there exists a plethora of works in the literature where PCA techniques are applied to various biometric sensors (ECG, EEG, EMG etc.), like in [37,38], but their exclusive target in most of these cases was to achieve compression and classification. In the last few years the efficiency of PCA in noise reduction was acknowledged and it has been proposed to be used in applications like noise reduction for Doppler radars [39] and in SNR improvement for Inchoate Faulty Signals [40].

The application of the Kalman filter was not successful since a higher error appears. This error could have been reduced by tuning appropriately the parameters *P*0 and *Rn* defined in Section 2.2. However, a different tuning would have been required for different sensors. In Figure 10, a pair of GSR sensors was connected to different users responding to the same stimuli. As shown from this figure, the resistance pattern was quite similar in the two plots in terms of local peaks (minima and maxima), taking into consideration that the User 1 responds about 1 s earlier to the same stimuli than User 2. The dashed lines in Figure 10 show the peak correspondence between User 1 and User 2. However, the absolute resistance values corresponding to the two users and their amplitude are significantly different.

**Figure 10.** Comparison of two identical Libelium GSR sensors attached to different users that are subject to the same test. The vertical dashed lines denote the corresponding local minima between the two users.

Figure 11, shows the resistance variation of a Libelium e-Health GSR sensor and a Shimmer one, attached to the same user that is subject to a Stroop test. The difference in the absolute values of the two plots should not be taken into consideration. The important issue noticed here is that the patterns are similar and most of their peaks match as shown by the dashed lines. This is an indication that the GSR sensor of the developed e-health system operates reliably.

**Figure 11.** Comparison of the Libelium and the Shimmer GSR sensors behavior on the same person. The vertical dashed lines denote the corresponding local minima between the two sensors.

In Figure 12, the airflow sensor of the developed system is tested with a pattern of two deep breaths followed by two moderate ones. The sensor was used without applying filtering (Section 2.2) and as a result of this, additional peaks appear. In Figures 13 and 14, the breathing pattern used is alternately a deep and a moderate breath. A slightly different type of averaging is used in these figures. Filter *type 1* depicted on Figure 13 extracts the average by employing three successive samples. Filter *type 2* shown in Figure 14 follows the averaging method described in Section 2.2 with 5 initial samples, and rejecting 2 extremes for estimating the final average. As it is derived by these figures, both averaging schemes represent clearly the breathing pattern used. The rippling at the end of the curves is due to the fact that the sensor is removed at that time instant from the user.

**Figure 12.** Airflow sensor tested; the user takes two deep breaths followed by two moderate ones. No filtering is used.

**Figure 13.** Airflow sensor tested; the user takes alternately a deep and a moderate breath. Filter *type 1* was applied.

**Figure 14.** Airflow sensor tested; the user alternately takes a deep and a moderate breath. Filter *type 2* was applied.

The EMG sensor's results are shown in Figures 15 and 16. In Figure 15 a relatively small sampling period of 200 ms was used with no filtering. A moderate muscle contraction is followed by a strong and then a small one. Although an intense rippling appears, the muscle contraction pattern is recognizable. The same muscle contraction pattern is used in Figure 16 with a longer sampling interval of 1 s that allows the various filtering types to be applied. The reduced rippling allows the three muscle states to be recognized more clearly when averaging is used and especially when Filter *type 2*, of Section 2.2, is applied.

**Figure 15.** EMG measurement: a moderate muscle contraction is followed by a strong and a loose one. 200 ms sampling period is used with no filtering.

**Figure 16.** EMG measurement with the same muscle contraction pattern as in Figure 15. A sampling period of 1 s is used with various filtering options.
