## 2 eHealth Monitoring System
### Multisensor Cloud Data Fusion  
As we can see in the previous subsection, our proposal is based on a multisensor network, but this does not mean that all sensors provide the same valid information to determine the correct state of the athlete. There are always some sensors that provide more important information to know the state of the athlete. It is true that, data integration of sensors provides better results than working only with the information of each one separately [17]. For these reasons, we have to select a suitable method to perform a correct data fusion. Our multi-sensor data fusion algorithm is based on the Dempster-Shafer inference theory of evidence [18]. This method is used when the sum of information, provided by the data sources (sensors), cannot be associated with 100% of the probability of success. This algorithm captures and combines certainty using the Dempster's rule, which finds the intersection or conjunction of events identified by information sources and their associated probabilities [19]. There are three important functions in Dempster-Shafer theory: the _basic probability assignment_ function (\(m\)), the _Belief_ function (\(Bel\)), and the _Plausibility_ function (\(PI\)). Being use our data fusion algorithm, our system will be able to determine the state of fatigue and/or events (denoted as D) related to monitoring process in athletes. As we can see in the previous subsection, our system has 8 sensors. The information of sensor \(i\) is represented by \(m_{i}\in[0,1]\), which assigns values to each of the subsets of the discernment set D (set of events considered), ignoring how these values are divided into the subset (see Figure 3). The combination is done by [PERSON]'s orthogonal sum, for 8 sources is:  
\[m(A)=\bigoplus_{i=1}^{8}m_{i}(A)= \begin{cases}0,&\text{if }A=\emptyset\\ \frac{1}{1-k}\sum_{B_{1}\bigcap B_{2}\bigcap\ldots B_{8}=A}m_{1}(B_{1})m_{2}( B_{2})\ldots m_{8}(B_{8}),&\text{if }A\
eq\emptyset\\ 1,&\text{if }A=D\end{cases}  \tag{1}\]  
where \(A\), \(B_{1}\),..., \(B_{n}\) are subsets of \(D\) and \(k\) is:  
\[k=\sum_{B_{1}\bigcap B_{2}\bigcap\ldots B_{8}=\emptyset}m_{1}(B_{1})m_{2}(B_{2 })\ldots m_{8}(B_{8}) \tag{2}\]  
Figure 2: Partial mesh network implemented in our system. Also the definition of two parameters like _belief_ and _plausibility_, defined as for all the athletes (set \(A\)):  
\[Bel(A)=\sum_{B\subset A}m(B) \tag{3}\]  
and  
\[Pl(A)=\sum_{B\bigcap A=\emptyset}m(B)=1-Cre(\overline{A}) \tag{4}\]  
Defining \(D=\{E_{1},E_{2},\ldots,E_{r}\}\) as the set of states to evaluate, we can establish the final decision according to the following criteria:  
* Maximum credibility rule: the most probable state is the one with more credibility, \[E_{k}=arg\max_{1\leq i\leq r}Bel(E_{i})\]
* Maximum plausibility rule: the most probable state is the one with more plausibility, \[E_{k}=arg\max_{1\leq i\leq r}Pl(E_{i})=arg\min_{1\leq i\leq r}Cre(E_{i})\]  
In our system, we have defined five states (\(E_{1}\), \(E_{2}\), \(E_{3}\), \(E_{4}\) and \(E_{5}\)), where fatigue increases according to the state. The state \(E_{1}\) corresponds to the rest state and \(E_{5}\) is associated to high fatigue state. Our system works with instant values and with a moving average with four minutes window. The use of these values allow the system to know the status of the athlete in real time and also evaluate their recovery phase, a very important aspect in athletes. Table 1 shows a health-status classification in terms of the pulsioxymeter ranges, the thermometer ranges, the GSR device ranges and the air exhalation sensor ranges (in terms of breathing amplitude and breathing rate). After a measurement session with three athletes, the interval values obtained for eight parameters in each state (\(E_{k}\)) are shown in Table 2. Depending on the optimum values of the parameters, each \(m_{i}\) value is obtained by considering a mapping function limited to 1 [20].