# Biofeedback Applied to Interactive Serious Games to Monitor Frailty in an Elderly Population
## 3 Materials and Methods
### Methods
#### 3.2.8 Data Comparison  
As described in Section 3.2.5, the signals received must be processed and certain characteristic data must be obtained from them. Therefore, the following parameters must be extracted from each signal:  
* _Time parameter:_ This is the exercise time in total. This characteristic helps to ascertain how fast or slow the player performed a particular exercise. * _Amplitude parameter:_ This includes the value of the minimum and maximum amplitude of the signal. The main purpose of the measurement is to represent the player's activity during the exercise,  
Figure 10: Result of game performance in Exercise 3. Figure 9: Result of normal performance in Exercise 3.  
namely to understand the spatial characteristic of the activity. Given that the amplitude value obtained during the analysis of the player's movements is shown in the percentage value of the deviation of the key points from the central plane lines on the screen, by obtaining this value, it is possible to judge, for example, how high the player raised their arms, how much they deflected when moving their hips, or how actively they moved in front of the camera. Frequency of repetitions:  
It is also important to understand the frequency with which the player performed a particular exercise. This parameter can be obtained by several methods, but since the data obtained in the time and graphical representation are a sinusoidal signal, the most convenient method is the application of the direct Fourier transform, the formula for which is shown below. \[f(t)=\frac{1}{2\pi}\int_{-\infty}^{\infty}F(j\omega)e^{j\omega t}d\omega \tag{1}\]  
Obtaining this parameter will help to keep track of how often the player is performing the exercise. This parameter is also important for understanding the quality of the exercise (whether it is too slow or too fast), and therefore its effectiveness. Shimmer and jitter:  
Shimmer and jitter values are an estimative characteristic of the quality of exercise performance. Thanks to these parameters, we can judge the quality of the periodicity of movements, both in terms of the difference in time of each repetition and the difference in the amplitude of the movements. Jitter absolute: Variation of fundamental frequency. The average absolute difference between consecutive periods:  
\[\mathit{jitter}\ (a)=\ \frac{1}{N-1}\sum_{i}^{N-1}\left|T_{i}-T_{i+1}\right| \tag{2}\]  
Jitter relative: Average absolute difference between consecutive periods, divided by the average period:  
\[\mathit{jitter}\ (r)=\ \frac{\frac{1}{N-1}\sum_{i}^{N-1}\left|T_{i}-T_{i+1} \right|}{\frac{1}{N}\sum_{i=1}^{N}T_{i}} \tag{3}\]  
where \(T_{i}\) is the extracted period lengths and \(N\) is the number of extracted periods. Shimmer dB: Expressed as the variability of the peak-to-peak amplitude in decibels, average absolute base-10 logarithm of the difference between the amplitudes of consecutive periods. \[\mathit{shimmer}\ (a)=\ \frac{1}{N-1}\sum_{i=1}^{N-1}\left|20\log\left(\frac{A_{ i+1}}{A_{i}}\right)\right| \tag{4}\]  
Shimmer relative: Defined as the average absolute difference between the amplitudes of consecutive periods, divided by the average amplitude, and expressed as a percentage. \[\mathit{shimmer}\ (r)=\ \frac{\frac{1}{N-1}\sum_{i}^{N-1}\left|A_{i}-A_{i+1} \right|}{\frac{1}{N}\sum_{i=1}^{N}A_{i}} \tag{5}\]  
where \(A_{i}\) are the extracted peak-to-peak amplitude data and N is the number of extracted fundamental frequency periods. Having obtained all of the above parameters, it is possible to compare the results obtained, as well as judge the quality of the exercise. Table 6 directly shows the results obtained from four cases of Exercise 3. As for the jitter and shimmer parameters, it is worth noting that the lower their values, the better the result obtained in the end. This will mean that the player performed the game exercise as clearly and correctly as possible. Additionally, the time and amplitude parameters should be compared in a different way.