**3. Motion and biometric data acquisition**

Details regarding the motion detection and tracking, as well as biometric data acquisition, are covered in the following section. As mentioned earlier, the proposed smart wearable device could be used for several different sport applications, but due to being so miniature and lightweight plus with the battery autonomy of more than 5 h, it is especially suitable for sports like golf or tennis. We chose tennis to test the performance of the proposed system in a real environment. Tests were performed during competitive training. Challenges on tennis stroke detection and classification will also be addressed in this section.

## **3.1 Tennis stroke detection and classification**

#### *3.1.1 Tennis stroke detection*

For successful tennis stroke classification process, individual tennis strokes must first be accurately detected. We focused on detecting and classifying the three most common tennis strokes: forehand, backhand, and serve.

**Figure 6** presents the accelerations of individual axes during the tennis game. As expected, there are spikes in accelerometer data for every tennis stroke, where the maximum values of acceleration are usually higher than 10 G (for more powerful strokes like serve the maximum values can reach up to the 16 G). For stroke detection, one could easily compare the acceleration spike values with the predefined threshold. The stroke would then be detected if the acceleration values would surpass it. This is one of the most common methods that researches use for stroke

**63**

different players.

average calculation:

**Figure 6.**

*detection.*

*D*[*n*] = \_1

*Smart Wearables for Tennis Game Performance Analysis DOI: http://dx.doi.org/10.5772/intechopen.89544*

detection. The problem with this method is that it can produce false positives because the accelerometer values can be high even during the swing part of the stroke before the ball touches the racket. Therefore, we decide to use a different method for tennis stroke detection. We focused on the point of contact, where

*Graphical representation of the accelerometer data (x-axis = red, y-axis = green, z-axis = blue). The second subplot represents the average derivative of accelerometer data with a predefined threshold for tennis stroke* 

The moment of contact can most effectively be detected by calculation a two-point derivative of the acceleration values. We calculate the derivative average for all three axes because rotation normalization is not used. Rotation normalization is usually performed to normalize the acceleration readings orientation between individual players due to the fact that different players hold the racket differently and therefore the axes of the IMU unit are not aligned to the racket in the same way. The following expression is used for derivative


where *n* is the sample data index, *D[n]* is the average derivative value, and *i* is the gyro axis index (1 = X-axis, 2 = Y-axis, and 3 = Z-axis). The stroke is detected when the value *D[n]* exceeds the predefined threshold. Other arm movements can also trigger a tennis stroke detection. By observing **Figure 6**, one can notice small spikes in acceleration between time 0 and 10 s. They happened when the player was picking up the tennis ball with the racket. Acceleration spikes can also occur when the player is twirling the racket during the waiting for the opponent to serve, which is a very common thing [18]. Such events are not actual strokes and are undesirable to be detected. Therefore, the threshold for tennis stroke detection must be selected carefully. It is a tunable parameter and can be adapted to different conditions and

[*n* − 1]]|. (1)

3 ⋅ ∑ *i*=1 3

abrupt changes in the acceleration readings happen.

*Smart Wearables for Tennis Game Performance Analysis DOI: http://dx.doi.org/10.5772/intechopen.89544*

*Sports Science and Human Health - Different Approaches*

sented in **Figure 5** (left side).

**Figure 5.**

**3. Motion and biometric data acquisition**

classification will also be addressed in this section.

common tennis strokes: forehand, backhand, and serve.

**3.1 Tennis stroke detection and classification**

*3.1.1 Tennis stroke detection*

synchronization, uploading the data to the cloud, and for eventual firmware upgrades. When the wearable module is connected to the PC, it is detected as a generic HID device. The graphical user interface of the PC application is pre-

*PC application graphical user interface (left) and cloud service graphical web interface (right).*

When the recorded smart wearable data is uploaded to the cloud, it is visualized and processed. Due to the larger processing power being available and bigger memory space, more complex analyses on the recorded data are possible. Comparison of individual athletes is also possible. Because data from several different players and from different events can be stored in the cloud, big data analytics can be performed, and even more, information can be extracted. The visual representation of the proposed cloud service web interface is depicted in **Figure 5** (right side).

Details regarding the motion detection and tracking, as well as biometric data acquisition, are covered in the following section. As mentioned earlier, the proposed smart wearable device could be used for several different sport applications, but due to being so miniature and lightweight plus with the battery autonomy of more than 5 h, it is especially suitable for sports like golf or tennis. We chose tennis to test the performance of the proposed system in a real environment. Tests were performed during competitive training. Challenges on tennis stroke detection and

For successful tennis stroke classification process, individual tennis strokes must first be accurately detected. We focused on detecting and classifying the three most

**Figure 6** presents the accelerations of individual axes during the tennis game. As expected, there are spikes in accelerometer data for every tennis stroke, where the maximum values of acceleration are usually higher than 10 G (for more powerful strokes like serve the maximum values can reach up to the 16 G). For stroke detection, one could easily compare the acceleration spike values with the predefined threshold. The stroke would then be detected if the acceleration values would surpass it. This is one of the most common methods that researches use for stroke

**62**

**Figure 6.** *Graphical representation of the accelerometer data (x-axis = red, y-axis = green, z-axis = blue). The second subplot represents the average derivative of accelerometer data with a predefined threshold for tennis stroke detection.*

detection. The problem with this method is that it can produce false positives because the accelerometer values can be high even during the swing part of the stroke before the ball touches the racket. Therefore, we decide to use a different method for tennis stroke detection. We focused on the point of contact, where abrupt changes in the acceleration readings happen.

The moment of contact can most effectively be detected by calculation a two-point derivative of the acceleration values. We calculate the derivative average for all three axes because rotation normalization is not used. Rotation normalization is usually performed to normalize the acceleration readings orientation between individual players due to the fact that different players hold the racket differently and therefore the axes of the IMU unit are not aligned to the racket in the same way. The following expression is used for derivative average calculation:

$$D\left[n\right] = \frac{1}{3} \cdot \sum\_{i=1}^{3} \left| \left[ A\_i[n] - A\_i[n-1] \right] \right|. \tag{1}$$

where *n* is the sample data index, *D[n]* is the average derivative value, and *i* is the gyro axis index (1 = X-axis, 2 = Y-axis, and 3 = Z-axis). The stroke is detected when the value *D[n]* exceeds the predefined threshold. Other arm movements can also trigger a tennis stroke detection. By observing **Figure 6**, one can notice small spikes in acceleration between time 0 and 10 s. They happened when the player was picking up the tennis ball with the racket. Acceleration spikes can also occur when the player is twirling the racket during the waiting for the opponent to serve, which is a very common thing [18]. Such events are not actual strokes and are undesirable to be detected. Therefore, the threshold for tennis stroke detection must be selected carefully. It is a tunable parameter and can be adapted to different conditions and different players.

#### *3.1.2 Tennis stroke classification*

We worked on the problem of tennis stroke classification in one of our previous works presented in [29], where we proposed a classification method which is especially suitable for use with small embedded systems with low processing power because it is very simple but effective. The tests were performed on the strokes gathered from several different tennis players. In Kos and Kramberger [28], we extended the database and slightly modified the algorithm for tennis stroke classification. For test and experiments, we used our tennis stroke database (TSD). The database is composed of tennis stroke recordings of seven different players with different levels of tennis knowledge. The recordings were performed on several different occasions and in different conditions (different court surfaces, different tennis balls, and rackets). The recordings are a mix of individual stroke sequences during warm-up and recordings made during competitive training. Overall, the database is composed of 446 strokes. For easier TSD annotation, for each tennis player, a video was recorded in parallel with the wearable embedded device recordings. Other types of tennis strokes are also included in the recordings (e.g., slices, volleys, smashes, etc.), which are not used for tests and in the evaluation.

The main starting point for the tennis classification is that the accelerometer information alone does not have enough discriminative information for the tennis stroke classification task. Therefore, we looked at the gyroscope readings and analyzed them for different tennis strokes. It happens that there is enough difference for simple bit successful implementation for the classification algorithm. The algorithm works in such a way that it first looks for minimum and maximum gyroscope values around the point of contact event (the ball touches the tennis racket strings), and it searches for the axes in which the extreme values occur. The observation interval for minimum and maximum searching is 50 ms before the point of contact event. The gyroscope values for all three axes are sampled and stored in a buffer for maximum and minimum search. When the stroke detection event occurs, the buffer with gyroscope readings is swept for extreme values. Based on the information for which axis and in which direction the extreme value was found, the decision on which stroke happened, is made. For example, if the maximum angular velocity during the swing happened along Y-axis, the stroke is classified as a backhand. If the maximum corresponds to the X-axis, and the minimum is found in the Z-axis, the stroke is classified as a serve. If the maximum and minimum gyroscope values correspond to the X and Y axes, an additional condition is checked for the minimum Z-axis angular rate. If the angular rate is lower than −1500 dps, the stroke is classified as a serve; otherwise, the stroke is classified as a forehand. This condition was added to the classification algorithm because some tennis players tend to rotate the hand differently during the execution of the serve. If none of the abovementioned combinations is true, the detected stroke is classified as unknown (UNKN). This was introduced because sometimes the players make the shots very close to the body or out of balance and are therefore difficult to categorize as one of the basic strokes. The algorithm described is for a right-hand player. For a left-hand player, the accelerations of Y-axis and angular velocities of X and Z axes must be inverted.

#### **3.2 Pulse rate and pulse rate variability**

To evaluate an athlete's physical and mental levels, pulse rate and pulse rate variability information is recorded during the athlete's activity. For monitoring the pulse rate, we selected the reflective photoplethysmography. The method is noninvasive, and it still gives a good result. Two different light sources with different light

**65**

**Figure 7.**

*illumination.*

*Smart Wearables for Tennis Game Performance Analysis DOI: http://dx.doi.org/10.5772/intechopen.89544*

depicted in **Figure 7**.

higher than 37°C.

**3.3 Temperature measurement**

**3.4 Tennis stroke consistency estimation**

wavelengths (RED and IR LED) were used for tissue illumination. The receiving photodiode detects the reflected light. The intensity of the reflection is modulated by the difference in the blood flow; therefore, minimal ripple is present from which the pulse rate can be evaluated. The signal is sampled with 100 Hz. Every heartbeat is represented with a so-called R wave and the distance between individual R waves is called the R-R interval. PR and PRV can be calculated by measuring this interval. Some PR and PRV experiments were performed in our previous work, and the results are presented in [26]. R-R intervals from RED and IR LED illumination are

The player's skin temperature was measured with a contactless thermopile sensor. For accurate temperature measurements, the local temperature of the cold-junction temperature reference is measured. This is necessary because this type of sensors can only sense the temperature difference, not absolute temperatures. **Figure 8** presents the skin and module temperature readings during a short practice. For high precision, the sensor must be calibrated because different surfaces have different emissivity (even different skin tones have influence). Plots in **Figure 8** show that the wearable module was slightly heating over time because of the LEDs for pulse rate measurement (they are close to the sensor and they generate heat). This could be the reason that the module achieved a temperature

Readings of the smart wearable module, if they are stored and properly analyzed, can be used also for the analysis of how consistent a player is when hitting a

*Graphical representation or R-R intervals obtained with the PPG method. The upper plot represents a signal obtained with red LED tissue illumination and the lower plot represents a signal obtained with IR LED tissue*  *Smart Wearables for Tennis Game Performance Analysis DOI: http://dx.doi.org/10.5772/intechopen.89544*

wavelengths (RED and IR LED) were used for tissue illumination. The receiving photodiode detects the reflected light. The intensity of the reflection is modulated by the difference in the blood flow; therefore, minimal ripple is present from which the pulse rate can be evaluated. The signal is sampled with 100 Hz. Every heartbeat is represented with a so-called R wave and the distance between individual R waves is called the R-R interval. PR and PRV can be calculated by measuring this interval. Some PR and PRV experiments were performed in our previous work, and the results are presented in [26]. R-R intervals from RED and IR LED illumination are depicted in **Figure 7**.

#### **3.3 Temperature measurement**

*Sports Science and Human Health - Different Approaches*

which are not used for tests and in the evaluation.

**3.2 Pulse rate and pulse rate variability**

We worked on the problem of tennis stroke classification in one of our previous works presented in [29], where we proposed a classification method which is especially suitable for use with small embedded systems with low processing power because it is very simple but effective. The tests were performed on the strokes gathered from several different tennis players. In Kos and Kramberger [28], we extended the database and slightly modified the algorithm for tennis stroke classification. For test and experiments, we used our tennis stroke database (TSD). The database is composed of tennis stroke recordings of seven different players with different levels of tennis knowledge. The recordings were performed on several different occasions and in different conditions (different court surfaces, different tennis balls, and rackets). The recordings are a mix of individual stroke sequences during warm-up and recordings made during competitive training. Overall, the database is composed of 446 strokes. For easier TSD annotation, for each tennis player, a video was recorded in parallel with the wearable embedded device recordings. Other types of tennis strokes are also included in the recordings (e.g., slices, volleys, smashes, etc.),

The main starting point for the tennis classification is that the accelerometer information alone does not have enough discriminative information for the tennis stroke classification task. Therefore, we looked at the gyroscope readings and analyzed them for different tennis strokes. It happens that there is enough difference for simple bit successful implementation for the classification algorithm. The algorithm works in such a way that it first looks for minimum and maximum gyroscope values around the point of contact event (the ball touches the tennis racket strings), and it searches for the axes in which the extreme values occur. The observation interval for minimum and maximum searching is 50 ms before the point of contact event. The gyroscope values for all three axes are sampled and stored in a buffer for maximum and minimum search. When the stroke detection event occurs, the buffer with gyroscope readings is swept for extreme values. Based on the information for which axis and in which direction the extreme value was found, the decision on which stroke happened, is made. For example, if the maximum angular velocity during the swing happened along Y-axis, the stroke is classified as a backhand. If the maximum corresponds to the X-axis, and the minimum is found in the Z-axis, the stroke is classified as a serve. If the maximum and minimum gyroscope values correspond to the X and Y axes, an additional condition is checked for the minimum Z-axis angular rate. If the angular rate is lower than −1500 dps, the stroke is classified as a serve; otherwise, the stroke is classified as a forehand. This condition was added to the classification algorithm because some tennis players tend to rotate the hand differently during the execution of the serve. If none of the abovementioned combinations is true, the detected stroke is classified as unknown (UNKN). This was introduced because sometimes the players make the shots very close to the body or out of balance and are therefore difficult to categorize as one of the basic strokes. The algorithm described is for a right-hand player. For a left-hand player, the accelerations of Y-axis and angular velocities of X and Z axes must be inverted.

To evaluate an athlete's physical and mental levels, pulse rate and pulse rate variability information is recorded during the athlete's activity. For monitoring the pulse rate, we selected the reflective photoplethysmography. The method is noninvasive, and it still gives a good result. Two different light sources with different light

*3.1.2 Tennis stroke classification*

**64**

The player's skin temperature was measured with a contactless thermopile sensor. For accurate temperature measurements, the local temperature of the cold-junction temperature reference is measured. This is necessary because this type of sensors can only sense the temperature difference, not absolute temperatures. **Figure 8** presents the skin and module temperature readings during a short practice. For high precision, the sensor must be calibrated because different surfaces have different emissivity (even different skin tones have influence). Plots in **Figure 8** show that the wearable module was slightly heating over time because of the LEDs for pulse rate measurement (they are close to the sensor and they generate heat). This could be the reason that the module achieved a temperature higher than 37°C.

#### **3.4 Tennis stroke consistency estimation**

Readings of the smart wearable module, if they are stored and properly analyzed, can be used also for the analysis of how consistent a player is when hitting a

#### **Figure 7.**

*Graphical representation or R-R intervals obtained with the PPG method. The upper plot represents a signal obtained with red LED tissue illumination and the lower plot represents a signal obtained with IR LED tissue illumination.*

**Figure 8.** *Temperature readings during a short (20 min) tennis practice. The upper graph represents the temperature of the skin, while the lower plot represents the sensor's internal cold-junction temperature readings.*

stroke. This kind of analysis can be very useful for tennis coaches and other experts on the evaluation of the tennis player's current shape and performance ability. If combined with the information of which stroke was a winner or a fault, even more valuable information can be extracted [30].

#### *3.4.1 Forehand stroke models*

For the task of tennis stroke consistency evaluation, we made a general forehand stroke model. A separate model was built for each individual player. The model was made by calculating an average of acceleration sample bins for every accelerometer axis separately. We paid special attention that the accelerometer readings were aligned fairly good with the stroke detection point. About 150 ms before and after, the point of contact was used for making the model. That interval corresponds to 248 sample bins in total. An individual player's forehand stroke model for one axis is determined by using the following expression:

$$FSM(i) = \frac{1}{N} \sum\_{j=1}^{N} fh\_{acc}[i] \left[ j \right], \ i = 1:248,\tag{2}$$

**67**

*Smart Wearables for Tennis Game Performance Analysis DOI: http://dx.doi.org/10.5772/intechopen.89544*

*3.4.2 Stroke consistency evaluation*

**Figure 9.**

calculated. The mathematical expression is:

100–150 strokes for a player were typically captured.

*dist*(*i*) = \_1

By observing the acceleration plots, we can notice that the trajectories are quite sparse. If the plots are closer together, then the ability of the player, to hit the strokes in a repeating manner, is very high. In this case, consistency is also very high. From a closer observation of the graphical plots of the individual axis, we can conclude, that the player, whose strokes are presented in **Figure 9**, is the most consistent via Y-axis, where the X-axis is the one with the most scattered plots. This estimation is made on observing the scatter thickness around the thick middle line, which represents the general axis stroke model. Plots show us also the three most obvious swing segments, where at the beginning of the plot from bin 1 to bin 120 is the swing segment. From the bins 120 till 140, the ball impact segment occurs. The last segment, called followthrough is from bins 140 till 248. The thick emphasized line plotted in the middle of the axis's acceleration curves is the graphical representation of a stroke model.

*General forehand stroke model for a tennis player. For each axis, a separate model is presented.*

To evaluate the tennis player's forehand stroke consistency, the general player's forehand model is compared to the players' recorded forehand strokes. To be able to derive the forehand stroke models, a database of forehand strokes was built. For estimation of the individual player's forehand consistency, an average distance between individual acceleration bins of stroke recordings and stroke model is

(*f hacc*[*i*][*j*] − *FSM*[*i*]), (3)

*<sup>N</sup>* <sup>∑</sup> *j*=1 *N*

representation of the forehand stroke consistency for players P1–P9.

where *dist(i)* is distance (for one axis) between the player's stroke and the stroke model, *FSM[i]* is the player's forehand stroke model, *fhacc[i][j]* is the array of player's forehand strokes, *N* is the number of different strokes, *i* is the individual stroke sample bin (*i* = 1:248), and *j* is the player's stroke record index. Around

After that, average value of distances for all the three axes is calculated to get the common distance between the model and the individual stroke recording. Some valuable information is lost by doing that, but the reason for doing it this way is that the sign of the bin differences gets preserved. This is a piece of valuable information which tells us if the player is making the swing "under" or "over" compared to the forehand model. If we would use some other distance metrics (like Euclidean distance) to calculate the distance between acceleration bins of the strokes and the model, the outcome would have an only positive sign and the information about the error direction would be lost. A box plot is used for results presentation. **Figure 10** shows the statistical

where *FSM(i)* corresponds to the axis bin of the forehand stroke model, *fhacc[i] [j]* is an array of accelerometer readings, *N* is the number of different stroke acc. recordings, *i* is the index of accelerometer sample bins, and *j* is the player's stroke record index. For a specific player, the general forehand models (separate for individual axes) are presented in **Figure 9**. The model is seen as the thick line in the middle of the curves.

*Smart Wearables for Tennis Game Performance Analysis DOI: http://dx.doi.org/10.5772/intechopen.89544*

**Figure 9.**

*Sports Science and Human Health - Different Approaches*

*Temperature readings during a short (20 min) tennis practice. The upper graph represents the temperature of* 

stroke. This kind of analysis can be very useful for tennis coaches and other experts on the evaluation of the tennis player's current shape and performance ability. If combined with the information of which stroke was a winner or a fault, even more

For the task of tennis stroke consistency evaluation, we made a general forehand stroke model. A separate model was built for each individual player. The model was made by calculating an average of acceleration sample bins for every accelerometer axis separately. We paid special attention that the accelerometer readings were aligned fairly good with the stroke detection point. About 150 ms before and after, the point of contact was used for making the model. That interval corresponds to 248 sample bins in total. An individual player's forehand stroke model for one axis is

where *FSM(i)* corresponds to the axis bin of the forehand stroke model, *fhacc[i] [j]* is an array of accelerometer readings, *N* is the number of different stroke acc. recordings, *i* is the index of accelerometer sample bins, and *j* is the player's stroke record index. For a specific player, the general forehand models (separate for individual axes) are presented in **Figure 9**. The model is seen as the thick line in the

*f hacc*[*i*][*j*], *i* = 1:248, (2)

*the skin, while the lower plot represents the sensor's internal cold-junction temperature readings.*

*<sup>N</sup>* <sup>∑</sup> *j*=1 *N*

valuable information can be extracted [30].

determined by using the following expression:

*FSM*(*i*) = \_1

*3.4.1 Forehand stroke models*

**66**

middle of the curves.

**Figure 8.**

*General forehand stroke model for a tennis player. For each axis, a separate model is presented.*

By observing the acceleration plots, we can notice that the trajectories are quite sparse. If the plots are closer together, then the ability of the player, to hit the strokes in a repeating manner, is very high. In this case, consistency is also very high. From a closer observation of the graphical plots of the individual axis, we can conclude, that the player, whose strokes are presented in **Figure 9**, is the most consistent via Y-axis, where the X-axis is the one with the most scattered plots. This estimation is made on observing the scatter thickness around the thick middle line, which represents the general axis stroke model. Plots show us also the three most obvious swing segments, where at the beginning of the plot from bin 1 to bin 120 is the swing segment. From the bins 120 till 140, the ball impact segment occurs. The last segment, called followthrough is from bins 140 till 248. The thick emphasized line plotted in the middle of the axis's acceleration curves is the graphical representation of a stroke model.

## *3.4.2 Stroke consistency evaluation*

To evaluate the tennis player's forehand stroke consistency, the general player's forehand model is compared to the players' recorded forehand strokes. To be able to derive the forehand stroke models, a database of forehand strokes was built. For estimation of the individual player's forehand consistency, an average distance between individual acceleration bins of stroke recordings and stroke model is calculated. The mathematical expression is:

$$dist(i) = \frac{1}{N} \sum\_{j=1}^{N} \left( f h\_{acc}[i] \left[ j \right] - FSM[i] \right),\tag{3}$$

where *dist(i)* is distance (for one axis) between the player's stroke and the stroke model, *FSM[i]* is the player's forehand stroke model, *fhacc[i][j]* is the array of player's forehand strokes, *N* is the number of different strokes, *i* is the individual stroke sample bin (*i* = 1:248), and *j* is the player's stroke record index. Around 100–150 strokes for a player were typically captured.

After that, average value of distances for all the three axes is calculated to get the common distance between the model and the individual stroke recording. Some valuable information is lost by doing that, but the reason for doing it this way is that the sign of the bin differences gets preserved. This is a piece of valuable information which tells us if the player is making the swing "under" or "over" compared to the forehand model. If we would use some other distance metrics (like Euclidean distance) to calculate the distance between acceleration bins of the strokes and the model, the outcome would have an only positive sign and the information about the error direction would be lost. A box plot is used for results presentation. **Figure 10** shows the statistical representation of the forehand stroke consistency for players P1–P9.

**Figure 10.**

*Box-plot representation of the tennis stroke consistency evaluation. Lower and upper lines of the boxes represent the 25th and 75th percentile of the deviation interval, respectively.*

A comment on the presented data is necessary to properly interpret the provided information. As mentioned, we used a box plot to represent the consistency analysis. A rectangle (box) is presenting each player. The red line in the box represents the average (median) value of the forehand stroke deviation from the model. Players P2 and P8 have near 0 deviation. The upper line of the box represents the 75th percentile of the deviation interval, and the lower line of the box represents the 25th percentile of the deviation interval. His distance (between lower and upper box border) is known also as the interquartile range. Each box is also extended by a line, called a whisker. Whisker is a dotted line that is drawn from the box border to the far border of the observation interval. They are determined beforehand, and in our case, they represent the border for the outlier values. In our case, they are set to 1.5 of the interquartile range. Values of the deviation that exceed this range are represented by red crosses and are called outliers. Box plots in **Figure 10** show that the players P2, P3, and P8 are the most consistent among the tested group because their box plots are the smallest. They have some outliers, but they can be a consequence of an off-balance/close-to-body forehand stroke made. Regarding stroke consistency estimation, the worst player is the player P7. It has the biggest box plot and the red line (average value) is also off center, which suggests that the stroke deviation distribution is somewhat skewed to the positive values.

A more detailed stroke consistency estimation can be made for individual players. In **Figure 11**, detailed segmental stroke analysis is presented, also using a box plot.

As we can conclude from **Figure 11**, detailed segmental stroke analyses for players P4 and P7 are presented. The analyses presented in **Figure 10** gave us the overall forehand swing consistency estimation. On the other hand, the segmental analysis presented in **Figure 11** gives us the insight in which part of the forehand stroke the players are the most or the least consistent. We can see that player P4 has the highest box plots at segments 12–14, which are the segments, where the racket contacts the tennis ball. This deviation in this segment is to be expected and is common because of the oscillations and vibrations due to the ball contact. But the player P7 has the

**69**

*Smart Wearables for Tennis Game Performance Analysis DOI: http://dx.doi.org/10.5772/intechopen.89544*

and performance of a tennis game.

*the swing phase of the tennis stroke.*

can be a great tool for sport performance improvements.

\*Address all correspondence to: marko.kos@um.si

provided the original work is properly cited.

**4. Conclusion**

**Author details**

Maribor, Slovenia

Marko Kos\* and Iztok Kramberger

**Figure 11.**

least inconsistent forehand around the segments 7–10, which is a swing stage of the tennis stroke. This information can be valuable for the player and the tennis coach. Based on such analyses, they can make a strategy on how to improve the training

*Segmental forehand swing consistency analysis presentation for players P4 and P7. Player P7 is inconsistent in* 

In this chapter, smart wearables in sport were presented, using a case of a system for tennis game analysis. A miniature wearable device for detecting and recording the movement and biometric data is presented in detail, along with the procedures and algorithms for tennis stroke detection and classification. The presented system also incorporates a cloud service for information visualization and possibly more sophisticated game/athlete's performance analysis. The performance of the proposed system was tested for tennis. The wearable device supports tennis stroke detection and classification of the three most basic strokes: forehand, backhand, and serve. It also supports pulse-rate measurements and skin temperature measurements. A principle of tennis stroke consistency evaluation was also presented. The smart wearable device with cloud processing support and presented stroke analyses can give an athlete or a coach a good insight into an athlete's skills and abilities and

Faculty of Electrical Engineering and Computer Science, University of Maribor,

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium,

*Smart Wearables for Tennis Game Performance Analysis DOI: http://dx.doi.org/10.5772/intechopen.89544*

#### **Figure 11.**

*Sports Science and Human Health - Different Approaches*

*Box-plot representation of the tennis stroke consistency evaluation. Lower and upper lines of the boxes* 

A comment on the presented data is necessary to properly interpret the provided information. As mentioned, we used a box plot to represent the consistency analysis. A rectangle (box) is presenting each player. The red line in the box represents the average (median) value of the forehand stroke deviation from the model. Players P2 and P8 have near 0 deviation. The upper line of the box represents the 75th percentile of the deviation interval, and the lower line of the box represents the 25th percentile of the deviation interval. His distance (between lower and upper box border) is known also as the interquartile range. Each box is also extended by a line, called a whisker. Whisker is a dotted line that is drawn from the box border to the far border of the observation interval. They are determined beforehand, and in our case, they represent the border for the outlier values. In our case, they are set to 1.5 of the interquartile range. Values of the deviation that exceed this range are represented by red crosses and are called outliers. Box plots in **Figure 10** show that the players P2, P3, and P8 are the most consistent among the tested group because their box plots are the smallest. They have some outliers, but they can be a consequence of an off-balance/close-to-body forehand stroke made. Regarding stroke consistency estimation, the worst player is the player P7. It has the biggest box plot and the red line (average value) is also off center, which suggests that the stroke

A more detailed stroke consistency estimation can be made for individual players. In **Figure 11**, detailed segmental stroke analysis is presented, also using a box plot. As we can conclude from **Figure 11**, detailed segmental stroke analyses for players P4 and P7 are presented. The analyses presented in **Figure 10** gave us the overall forehand swing consistency estimation. On the other hand, the segmental analysis presented in **Figure 11** gives us the insight in which part of the forehand stroke the players are the most or the least consistent. We can see that player P4 has the highest box plots at segments 12–14, which are the segments, where the racket contacts the tennis ball. This deviation in this segment is to be expected and is common because of the oscillations and vibrations due to the ball contact. But the player P7 has the

*represent the 25th and 75th percentile of the deviation interval, respectively.*

deviation distribution is somewhat skewed to the positive values.

**68**

**Figure 10.**

*Segmental forehand swing consistency analysis presentation for players P4 and P7. Player P7 is inconsistent in the swing phase of the tennis stroke.*

least inconsistent forehand around the segments 7–10, which is a swing stage of the tennis stroke. This information can be valuable for the player and the tennis coach. Based on such analyses, they can make a strategy on how to improve the training and performance of a tennis game.

### **4. Conclusion**

In this chapter, smart wearables in sport were presented, using a case of a system for tennis game analysis. A miniature wearable device for detecting and recording the movement and biometric data is presented in detail, along with the procedures and algorithms for tennis stroke detection and classification. The presented system also incorporates a cloud service for information visualization and possibly more sophisticated game/athlete's performance analysis. The performance of the proposed system was tested for tennis. The wearable device supports tennis stroke detection and classification of the three most basic strokes: forehand, backhand, and serve. It also supports pulse-rate measurements and skin temperature measurements. A principle of tennis stroke consistency evaluation was also presented. The smart wearable device with cloud processing support and presented stroke analyses can give an athlete or a coach a good insight into an athlete's skills and abilities and can be a great tool for sport performance improvements.

### **Author details**

Marko Kos\* and Iztok Kramberger Faculty of Electrical Engineering and Computer Science, University of Maribor, Maribor, Slovenia

\*Address all correspondence to: marko.kos@um.si

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
