\documentclass[10pt]{article}

\usepackage{fullpage}
\usepackage{setspace}
\usepackage{parskip}
\usepackage{titlesec}
\usepackage[section]{placeins}
\usepackage{xcolor}
\usepackage{breakcites}
\usepackage{lineno}
\usepackage{hyphenat}





\PassOptionsToPackage{hyphens}{url}
\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@combinedblfloats{\box\@outputbox}{\unvbox\@outputbox}{}{%
  \errmessage{\noexpand\@combinedblfloats could not be patched}%
}%
\makeatother


\usepackage[round]{natbib}
\let\cite\citep




\renewenvironment{abstract}
  {{\bfseries\noindent{\abstractname}\par\nobreak}\footnotesize}
  {\bigskip}

\titlespacing{\section}{0pt}{*3}{*1}
\titlespacing{\subsection}{0pt}{*2}{*0.5}
\titlespacing{\subsubsection}{0pt}{*1.5}{0pt}


\usepackage{authblk}


\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\providecommand\citet{\cite}
\providecommand\citep{\cite}
\providecommand\citealt{\cite}
% You can conditionalize code for latexml or normal latex using this.
\newif\iflatexml\latexmlfalse
\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}%

\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}

\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[polish,english]{babel}










\begin{document}

\title{Engineering a Table Tennis Smart Racket for Game Analysis and Coaching}



\author[1]{Sean Flanagan}%
\affil[1]{Affiliation not available}%


\vspace{-1em}



  
  \date{May 05, 2024}


\begingroup
\let\center\flushleft
\let\endcenter\endflushleft
\maketitle
\endgroup








\sloppy


\par\null

{Sean Flanagan}

\par\null

\section*{Abstract}

\par\null

Consistency is a major factor in the performance of table tennis
players. The integration of sensors into athletic equipment has been
shown to elevate athletic performance and consistency. The goal of this
project was to integrate a system of sensors into a table tennis racket
and reliably transmit data to a mobile app for the purposes of game
analysis and coaching. A shot classification algorithm was developed
using data from a gyroscope placed inside the handle of the racket
connected to an Arduino Pro Mini. Also, a 4 x 4 grid of piezoelectric
sensors was placed under the face of the racket to detect the impact
location of each shot. The data for each shot were transmitted via
Bluetooth to an Android Tablet for real-time viewing. The prototype was
able to able to identify, classify, and relay location data over 90\% of
the time during a session. These results suggest that the device will
provide consistent and accurate feedback that could be immediately
implemented to aid table tennis players of all ages and skill levels in
the development of their game.

\par\null

\section*{Introduction}

{\label{450926}}

\textbf{}

To compete on a high level, professional table tennis players must have
rigorous physical and mental training. Table tennis athletes only have
0.2 to 0.4 seconds to react to an approaching ball (Kondri\selectlanguage{polish}č, \selectlanguage{english}Zagatto, \&
Sekuli\selectlanguage{polish}ć, \selectlanguage{english}2013), and after a long match, players can begin to tire. Table
tennis players must train and condition their bodies for the
physiological demands of the game to maintain their peak performance
(Kondri\selectlanguage{polish}č, \selectlanguage{english}Zagatto, \& Sekuli\selectlanguage{polish}ć, \selectlanguage{english}2013).

Tennis, which is very similar to table tennis, has many sensors
developed for user improvement. Zepp, Babolat, and Sony are three
companies that have all successfully developed marketable tennis sensors
that record data relevant to a user's gameplay and provide suggestions
for improvement. Rafael Nadal, a prominent tennis player, uses a Babolat
smart racket that allows his coach to make any necessary tweaks to his
training plans. Nadal and his coach are effectively able to utilize the
data provided by his racket and improve the pro tennis player's
performance. This technology is very useful to professionals and novice
tennis players. However, there is currently no app-based feedback system
available for the sport of table tennis (Tracy 2016).

~Since there is currently no feedback systems for the sport of table
tennis, this project focuses on initial integration of sensors and basic
app development. Additionally, the project seeks to provide information
on possible improvements and future implications of smart table tennis
systems.

\par\null

\section*{Methods}

{\label{254094}}\par\null

\textbf{Setup}

A 6 degrees of freedom (DOF) inertial measurement unit (IMU) MPU-6050
GY-521 Breakout Board Accelerometer/Gyroscope used and a program
obtained from \href{http://www.i2cdevlib.com}{www.i2cdevlib.com} was
then used to calibrate the MPU-6050. Using this program offsets were
calculated for each raw value that the MPU-6050 output (X Acceleration,
Y Acceleration, Z Acceleration, X Gyroscope, Y Gyroscope, and Z
Gyroscope). An inclinometer app on a Nexus 7 Android tablet was used to
create a flat surface (required by the program) on which the
accelerometer could rest and the program could be run. The calculated
offsets were then added to the program obtained from the library
developed by Jeff Rowberg for improved accuracy.

\textbf{Shot-Classification}

A simple shot classification algorithm was then developed to categorize
shots based off of the yaw, pitch, and roll values obtained from the
MPU-6050. After a slight change to the MotionApps C++ header file in the
MPU-6050 Library, the MPU-6050 recorded the values for yaw, pitch, and
roll on a -90 to 90 scale instead of the default 0 to 180. The MPU-6050
was then wired to an Arduino Uno and placed on the handle of the racket.
The racket was then tilted in the backhand orientation and the yaw and
pitch values were recorded to obtain viable ranges for both backhand
shots as well as individual topspin and backspin shots. The same
procedure was then followed to obtain values for the forehand
orientation. The MPU-6050 example sketch was then adapted using a series
of ``if else'' statements that would subsequently print out the
orientation. The sketch was then tested by rotating the racket into all
four orientations.

\textbf{Shot Detection}

The ground wires of 16 piezoelectric sensors were connected in series
and the data wired were then connected to a Sparkfun CD74HC4067
multiplexer. An Arduino Pro Mini and an HC-05 Bluetooth module were
connected to both the accelerometer and the piezoelectric array to
enable Bluetooth connectivity and a power supply. A coordinate grid was
overlaid onto the 4 x 4 array of piezoelectric sensors with coordinates
assigned to each single, pair, and group of four sensors. A series of
``if else'' statements were then added to the program with the
quadruples taking precedence and being checked first in order to avoid
multiple readings of the same impact.

\textbf{Final Prototype}

A Butterfly Timo Ball A500 shakehand table tennis racket was acquired
from Amazon.com and the red rubber siding of the racket was removed
using a combination of sanding and prying with a blade. Then the face of
the racket was coated in carpenter's glue and the 4 x 4 array was placed
on top. The glue was left for fifteen minutes to dry. After the racket
was sufficiently dry, a Yinhe Mercury II Medium rubber siding acquired
from Amazon.com was glued to the face of the racket about 89 N of force
were applied to allow the rubber to dry and stick. After 6 hours, the
force was removed. The voltage readings for each sensor was recorded
over a 15 second time period and the maximum value was used as an offset
for each sensor in the multiplexer sketch.

\textbf{Testing}

The HC-05 Bluetooth module was then connected to the Blue2Serial App
provided by MacroYau on Github.com. A nine volt battery was connected to
the Arduino Pro Mini and the breadboard setup was placed on the back of
the racket for testing purposes. The HC-05 was then connected to the
Blue2Serial app. Serves were completed 30 times in each of the four
orientations with the identification, correct classification, and
transmission of location data being relayed and recorded in Microsoft
Excel.

\par\null

\section*{Results and Analysis}

{\label{832370}}\par\null

\subsection*{\texorpdfstring{{Identification}}{Identification}}

\par\null

~~~~From the 120 trials conducted, 30 separate Backhand Backspin shots,
27 separate Backhand Topspin shots, 28 separate Forehand Backspin shots,
and 27 separate Forehand Topspin shots were identified by the system and
relayed to the mobile device. 27 of the Backhand Topspin shots were
correctly classified out of the 30 total Backhand Topspin shots
identified. Similarly, 30 of the Backhand Backspin shots were correctly
classified out of the 30 total Backhand Backspin shots identified. 27 of
the Forehand Topspin shots were correctly classified out of the 30 total
Forehand Topspin shots identified and 28 number of the Forehand Backspin
shots were correctly classified out of the 30 total Forehand Backspin
shots identified.

~~~~The impact location of each shot was also relayed 112 times out of
the 120 total number of shots identified. The number of shots identified
out of the total number of shots produced a success rate for accurate
identification of 93\% . Out of the 120 total trials for the 4 different
possible shot classifications, the sensor system correctly classified
and relayed shots producing an average 93\% success rate for the
classification of shots overall. The number of shots where location data
was successfully transferred out of the total number of shots produced a
success rate for accurate location transfer of 93\% .

\par\null

\subsection*{\texorpdfstring{{\textbf{Fisher's Exact
Testing}}}{Fisher's Exact Testing}}

{\label{864546}}\par\null

A Fisher's Exact test, typically used with categorical data, was
performed on each of the data sets (identification, classification, and
location transmission) to determine whether or not the deviation from
the null hypothesis was significant.

\emph{H0: The tested prototype should identify shots, classify shots,
and transfer location data equally as well in each of the four possible
orientations.}

The Fisher's Exact Test used to analyze the identification results for
all backhand shots yielded a statistical value of 0.118644 which is
greater than 0.1 and therefore not significant. Also, the Fisher's Exact
test used to analyze the results of the forehand shots yielded the same
statistical value of 0.118644 and again was not significant. The
Fisher's Exact Test used to analyze the classification results for all
backhand shots yielded a statistical value of 0.118644 which is greater
than 0.1 and therefore not significant. Again, the Fisher's Exact test
used to analyze the results of the forehand shots yielded a statistical
value of 0.676628 and again was not significant. The Fisher's Exact Test
used to analyze the location transfer results for all backhand shots
yielded a statistical value of 0.118644 which is greater than 0.1 and
therefore not significant. Also, the Fisher's Exact test used to analyze
the results of the forehand shots yielded a statistical value of
0.676628 and again was not significant. Since all of the statistical
values obtained from the Fisher's Exact tests were above 0.1, the
deviation from the null hypothesis was not significant and the null
hypothesis was accepted. All of the shot orientations were considered to
identify, classify, and transfer location data equally as well.

\par\null

\section*{Conclusions}

{\label{646569}}\par\null

The goal of engineering a system of sensors that could fit into the
handle of a racket and reliably transmit data to a user or coach was
achieved. The sensors all are of a small size where they could easily be
combined into a printed circuit board or some other smaller device and
fit into the handle of the racket. Battery power could also be optimized
using a lithium ion battery and fit into the handle. The software used
in this project would not be compromised and still would function on a
high level and provide accurate feedback to a user. With a success rate
in all orientations over 93\%, this system could easily be fine-tuned
and presented commercially for all table tennis players. The prototype
could be marginally improved. The hardware and breadboard on the back of
the racket could also be combined into a printed circuit board and
inserted into the handle of the racket to allow a player to use both
sides of the racket. A second piezoelectric array could be added to the
other side of the racket to create a fully functional racket and allow
players to use both forehand and backhand without using the same side
for both orientations. The app could also be improved. Currently, the
app only receives and displays the data from the sensors. This could be
improved to track the data and use in-app analysis to give the user more
information about their skills and improvement. The app could display
graphs of target angles, locations, and shot numbers to compare against
the user's data. Overall, both the app and the racket could be improved
to reflect more of a player's game.

\par\null

\selectlanguage{english}
\FloatBarrier
\end{document}

