An Open Source Software For Post-Match Spatio Temporal Performance Analysis Of Soccer Players
by a Tokyo Techies student
Research Adviser: Head of robotics technologies division at Tokyo Techies
An Open Source, post-match analysis software that recreates player and soccer ball movements as two dimensional trajectories as seen from a bird’s eye view is implemented. This allows for spatio-temporal analyses of player movements in relation to the soccer ball to be made. Each player is outfitted with a Global Positioning System (GPS) device that collects high frequency data from geostationary satellites at a constant interval of less than one second. The collected player and soccer ball position data are visualized using animation-type plots developed using Qt Creator. For each player, the following metrics are determined: total distance covered, instantaneous velocity, possession percentage, and total touches. The former two analytics are calculated using the Haversine formulation for straight line distance calculations between two points lying on a curved surface. Inspection of the metrics gives an insight into the general performance of each player and team as a whole. The developed software is under trial by the varsity soccer team at The American School in Japan (ASIJ) and is released as an Open Source software under the GNU General Public License.
spatio-temporal analyses ; Haversine formulation ; geostationary satellites; Global Positioning System (GPS)
We would like to thank the Tokyo Academics staff, and Students who assisted in this project.
In modern day sports, major teams and leagues are increasing their competitiveness every season. As a result, technology has started to play a major role in the accuracy and effectiveness of the different aspects of decision-making, as well as to improve player performance. This includes the implementation of technologies such as GPS devices and motion sensor technologies in various sports ranging but not limited to tennis, basketball, and soccer. For example, in the Association of Tennis Professionals (ATP), Hawk-Eye  has been implemented in every game, allowing for players to challenge a call made regarding whether the ball has been hit in or out of bounds. Specifically, in the game of tennis, a ball is considered in bounds as long as any part of the ball is in contact with the boundary lines. Human error is inevitable, and the naked eye cannot accurately make a correct call every single time. Thus, although most calls are made by the officials, controversial calls are accurately made by Hawk-Eye. Similarly, in the National Basketball Association (NBA), STATS SportVU  is used to create statistics based on metrics such as speed, distance, player separation, and ball possession. This software utilizes a six-camera system which is installed in the arena, which tracks real-time position at a rate of 25 frames per second. This allows for the most sophisticated data stream of game statistics to be available. In Basketball, Instant Replay  is used to determine significant moments in-game, such as to determine if the ball was released by the player before the clock ran out on a buzzer beater play. With the use of similar technology, Replay Review  has been implemented into the game of baseball. In addition to this, both sports use video replay technology not only so that referees and umpires can go back to review a play, but also to determine statistics post-game, such as points, assists, and steals for basketball, and hits, RBI’s, and outs for baseball. Both of the technology in those two, totally different sports accomplish the same task. The forms of technology in both tennis and basketball are isomorphic to the software and gadgets implemented in official soccer games worldwide. These gadgets in soccer include the miCoach Smart Soccer Ball  created by Adidas, where a GPS device is embedded in the ball and tracks metrics such as velocity, rotation, and power, as well as FIFA Goal-Line Technology  which uses sensors in both the goal and ball to determine if the ball has crossed the goal line. Another example is the Video Assistant Referee , where cameras are set up around the field, so when a controversial play is made in-game, the referee can stop play and review the play on a screen.The software created in this work attempts to improve player performance along the same guidelines – through a GPS tracking device that visualizes spatio-temporal movements between the players and ball through a bird’s eye view post game.
At The American School in Japan, commercial solutions mentioned above are not relevant for several reasons: 1) they are often too expensive to be implemented at a high school soccer game and 2) the school’s pitch is not located in a stadium but instead outdoors, which results in various difficulties. These include the installations of cameras around the field at an elevated height, adjusting the lenses based on the weather, and constant calibrations to be made based on other environmental factors. Therefore, games are filmed from the sidelines via video cameras with no tracking devices or sensors utilized. Although this allows for simple post-game analyses to be made, these are only limited to visual aspects of the game, lacking the statistical side of the game and resulting in manual rather than automated analyses to be made. Thus, the motivation behind the development of this product is for more in-depth analyses of high school soccer games to be made, where post-game, coaches as well as players’ themselves can improve performance based on the automated analyses made, which contains both visual and numerical statistics.The rest of the paper is organized as follows: Section 2 discusses the hardware specifications. In Section 3, the software application as well as performance metrics are described. Experimental results obtained from trialing out the software are given in Section 4. The conclusion, based on the effectiveness and accuracy of the software, is provided in Section 5. The developed software is freely download-able at: https://github.com/tyler-cross/Soccer-Player-Performance-Analysis.
2.1 Selected DeviceThe device selected was the Columbus V-900 Multifunctional GPS Data Logger , as shown in Figure 1. Powered by a MediaTek ARM super single chip, this device receives signals from satellites, which then collects the coordinate points of the current location the device is at. This is completed at a reacquisition time of 1 second, which is sufficiently fast enough for the speed at which soccer is played. This judgment is based on the fastest recorded top speed a professional soccer player has attained, which is 37 kmph attained over a duration of approximately 4 seconds. Thus in this particular situation, the device is capable of collecting four points in those four seconds. Additionally, the device provides an accuracy of 3 meters per circular error probable of 50%, which is sufficient to discern the general two dimensional movement of a soccer player on the pitch. Moreover, the V-900 has an acceleration limit of 4G, and a jerk limit of 20 mps, allowing for collection of data even while withstanding shock during player collisions or falls. The device, weighing in at 55 g, is a 43 x 74 x 9.9 mm prism, which allows for it to easily be transported or attached to a player during the game. This device also can collect up to 25,000,000 points, resulting in a very dense data set which can be stored and retrieved from a SD Card with a maximum capacity of two gigabytes. The format of the collected data is displayed via date, time, latitude, longitude, speed and heading. The full list of specifications is shown in Table 1. Each device retails for approximately USD $85. The device is strapped on to part of body.
Figure 1. Selected DeviceTable 1. Columbus V900 Specifications.
Specification Value Size (43 x 74 x 9.9) mm Weight Date, Time, Latitude, Longitude, Speed, Heading Data Format 12,5 Memory SD Card (2GB) Waypoints Amount 504,000 points Sensitivity > -165 dBm Reacquisition Time < 1 sec Accuracy 2.0 m/CEP Acceleration Limit 4G Jerk Limit 20 m/sec
2.2 Device Evaluation
In the early stages, data points of a person’s current location was collected while walking a city block using the compass application on the iPhone. These data points were displayed in the form of degrees, minutes, and seconds. Post collection, the data points were converted to decimal format and copied into the GNUPlot application on Terminal to display an exact image of the block. Through the same iPhone application, a similar process was conducted where data points of a soccer field – where exact location and size are known – were collected. These points were again converted into decimal form where the distances between points was then calculated using the Haversine Formula (explained in subsequent section). The distances were then verified with the original dimensions of the soccer pitch.
Figure 2 shows the exact block walked in the initial stages of data collection and the resulting plot of the collected points created using GNUPlot. As it can be seen, the GPS data points collected can accurately be used in reconstructing the original path taken.
Figure 2. City block walked
2.3 Soccer Ball
The selection of the ball for this project is currently under consideration. The first option would be to use a soccer ball similar to the Adidas miCoach Smart Soccer Ball . This ball is a Size 5 regulation soccer ball implemented with a Bluetooth chip inside. Instead of a sensor chip however, we would implement a GPS device inside the ball, which would allow for up-to-date tracking of the soccer ball’s movements. The other option would be to set up cameras around the field and use a normal Size 5 regulation soccer ball. Instead of using a GPS chip to track the ball, the cameras will visually monitor the position of the ball on the field.
- Software Design
3.1 ToolsThe tool selected for the software development was Qt Creator (version 5.7.0), an open source, cross-platform compatible integrated development environment. Qt Creator has two main components, one for coding and one for the user interface. All code in Qt is written in C++ language, and the visual result of the software can be developed through the code. On the other hand, the user interface refers to the visual aspect of the software, which is the aspect of the software that will be seen in the final product. The user interface utilizes widgets and visual drag-and-drop over hands-on coding. The combination of both coding and user interface allows for rapid prototyping to be completed.Using Qt Creator, the original process explained previously (see Device Evaluation) can be replicated and further enhanced. If the collected points are copied into the code on Qt Creator, they will be displayed in chronological order on a scatter plot. This display is run through the user interface. The major difference between Qt Creator and GNUPlot is that Qt Plot can not only plot multiple different sets of points – which is needed when tracking both players and ball – but the data displayed is constantly moving rather than stationary, as it is in GNUPlot.3.2 Metrics3.2.1 Total Distance CoveredTotal distance ran represents the sum of distances covered by each player throughout the game. Let the raw GPS satellite data collected by each player be denoted by
where λ and Φ represent latitude and longitude respectively, and n represents the total number of data points collected by each player. The total distance, Td, ran by each player is then the accumulated Haversine distance, Hdi, between each pair of points for all points in D. This is given by the following formula:
and R is the radius of the Earth. The unit of Hdi depends on the specified unit of R. The above formula is used since the points are present on Earth’s surface, which is curved, rather than flat (see Figure 3).
Figure 3. Curvature of straight line two points due to Earth’s curvature
3.2.2 Instantaneous Velocity
Instantaneous velocity describes the velocity of each player attained at each instant of time. It is favored over average velocity because it gives a better insight of player activity, since average velocity will only give one value represented by the averages of the instantaneous velocity collected overtime. This is given by
where ts is the sampling rate at which the GPS collects data.
3.2.3 Percent Possession
Percent possession has several different definitions including “a ratio as a percent where the two numbers added will always equal 100” and “how much time each side held the ball, excluding when the ball is not held by either team”. In this case, percent possession is defined by the number of times the ball enters a radius of a certain distance around each player. The radius is set at 2 meters, a reasonable distance for a ball to be considered in a player’s possession. The percent possession is represented by the formula
where β represents each individual player’s possession of the ball and represents the team’s total possession.
3.2.4 Total Touches
Total touches is the collective number of touches made by an individual player throughout the entire game. A touch is defined as contact between ball and foot, therefore a radius separate from the one used for percent possession is set. This radius is set at 50 centimeters, for the diameter of a size 5 soccer ball is roughly 22 centimeters , and the average shoe size of player’s on the soccer team in the American School in Japan is 28 centimeters. The sum of the two values adds up to be 50 centimeters.
- Experimental Results
4.1 Location of ExperimentThe trial runs for this experiment are being conducted at the main soccer field in the campus of the American School in Japan (ASIJ), located in Tokyo, Japan. The GPS coordinates of the four corners of the soccer field are as follows:(35.682840, 139.522260)(35.682692, 139.522989)(35.681821, 139.522720)(35.681968, 139.521988)The Google Maps location is shown in Figure 4.
Figure 4. Location of experimental place4.2 ExperimentsIn the following experiments, the four metrics given in Section 3.2 are tested individually using the V-900 Multifunctional GPS Data Logger. The trials were conducted using two participants. Participant 1 acts as the player and Participant 2 manually records results for experiments that require a second source, which establishes a ground truth to be used for comparisons. Additionally, each experiment is conducted three times in order to account for any possible human error.4.2.1 Total Distance CoveredIn this experiment, the player with the GPS attached runs a fixed distance of 100 yards (91.44 m), which becomes the ground truth. This allows the results calculated using our software to be compared to this truth. The method in which the GPS will calculate this distance is through the Haversine Formula of Section 3.2.1, where the distance between the first point collected and the last point collected will be determined. The results are displayed in the table below. The total distance ran was 88.964 m. This leads to a percent error of 2.71% due to the GPS logger’s tracking speed of 1 point per second, allowing us to assume that the distance of 100 yards was achieved less than one second after the last point.
Latitude Longitude Total Distance (m) 35.682766 139.522451 0.000 35.682736 139.522459 1.697 35.682688 139.522465 5.359 35.682636 139.522465 10.449 35.682575 139.522448 16.388 35.682505 139.522433 23.313 35.682428 139.522421 31.072 35.682358 139.522408 40.085 35.682293 139.522395 47.721 35.682233 139.522376 55.062 35.682168 139.522358 62.387 35.682114 139.522338 69.729 35.682080 139.522321 75.825 35.682050 139.522296 79.884 35.682013 139.522266 84.256 35.682008 139.522251 88.964
4.2.2 Instantaneous Velocity
In this experiment, the player with the GPS attached runs an arbitrary distance. This distance is again calculated using the Haversine Formula (Section 3.2.1), and then is divided by the sampling time of the GPS. This value will be compared to a velocity value displayed by an inertial measurement unit (IMU). Our calculator’s results and the GPS logger’s results display similar trends based on the player’s velocity. However, the absolute values are different, and we are currently investigating the reasons for this discrepancy.
Latitude Longitude Instantaneous Velocity (m/sec) GPS Velocity (m/sec) 35.682521 139.522260 0.000 0 35.682505 139.522301 4.469 6 35.682485 139.522339 3.752 9 35.682455 139.522369 4.372 12 35.682415 139.522391 4.460 13 35.682363 139.522398 6.096 17 35.682305 139.522403 6.363 18 35.682255 139.522421 5.684 18 35.682238 139.522468 4.469 16 35.682198 139.522491 5.419 15 35.682158 139.522510 4.460 14 35.682100 139.522505 6.787 17 35.682045 139.522473 6.547 21
4.2.3 Percent Possession
For this metric, the intended experiment will be conducted in which the assisting player will pass the GPS-equipped ball to the player with the GPS attached a certain and known number of times. Since the GPS has a range of 3 meters per circular error probable of 50%, the device will only be able locate the ball when it has entered the GPS’s radius. The number of times the device locates the ball will be compared to the number of times the assisting player passes the ball in order to test the accuracy of the GPS.
4.2.4 Total Touches
In this metric, the intended experiment will be conducted in which the player with the GPS will make contact with the ball a certain number of times. Due to the average size of a player’s foot on ASIJ’s soccer team being 28 cm, and the diameter of a soccer ball being 22 cm, the distance at which the soccer ball is deemed to be in contact with the soccer player will be set to 50 cm – the sum of the two values. The results will then be compared to the number of times the assisting player counts the contact between the ball and the other player.
It is anticipated that the four experiments above will prove that the developed software can visually represent a simplified version of the results attained.
Figure 5 displays a screenshot of the current version of the application. In the top right corner, an image of the player is displayed to show which player is being evaluated. Underneath is a drop-down box that allows the user to navigate through all eleven players. The box is followed by the four metrics described in Section 3.2. The metrics are displayed as single values that change dynamically every time the position of either the ball or player is shifted. The majority of the screen is taken up by a visual representation of the soccer player (green dot) and the ball (red dot) in relation to the soccer pitch. Below that is a slider that allows for the speed at which the positions are displayed to be changed. The two buttons at the bottom allow for the user to plot, as well as clear the visuals.
Figure 5. Final developed application
The main goal of this project was to create an application that both visualizes soccer player movements, calculates and presents in-game statistics for coaches, players, and other audiences. Multiple steps were taken to create this application, all starting from researching modern day technology in sports and brainstorming a low-budget alternative that could be used at a high school. Thus, GPS technology was determined as the best option, whereby soccer plays would be outfitted with GPS devices in order to collect data. Post-game, the data is retrieved and fed into the app which displays the collected coordinates and the calculated metrics. The software is currently being trialed, but initial experiments show promising use. Improvements have also been identified and ongoing works are in progress.
- Tennis. Hawk-Eye Innovations Official Website. https://www.hawkeyeinnovations.com/sports/tennis
- Basketball Data Feed – Basketball Player Tracking – SportVU. STATS https://www.stats.com/sportvu-basketball-media/
- NBA Official Instant Replay Guidelines. NBA.com, NBA Media Ventures (2016) www.nba.com/official/instant-replay-guidelines.html.
- Major League Baseball Replay Review Regulations. Major League Baseball, MLB Advanced Media (2017) m.mlb.com/official_rules/replay_review
- com. Adidas Smart Soccer Ball Teardown. TechInsights www.techinsights.com/about-techinsights/overview/blog/adidas-smart-soccer-ball-teardown/
- What Technologies Exist? What Technologies Exist? – FIFA Quality Programme https://football-technology.fifa.com/en/media-tiles/goal-line-technology-implementation/
- Webb: Video Assistant Referee Meant to Fix ‘clear and Obvious’ Mistakes. FourFourTwo https://www.fourfourtwo.com/us/features/howard-webb-video-assistant-referee-fix-clear-obvious-mistakes-interview-mls
- Columbus V-900 Multifunctional GPS Data Logger Specifications http://cbgps.com/v900/v900\_spec\_en.htm
- FIFA, Laws of The Game https://www.fifa.com/mm/document/footballdevelopment/refereeing/02/79/92/44/laws.of.the.game.2016.2017neutral.pdf