Physics & Motion
How Does a Disc Fly?
As illustrated in Figure 1, there are two important factors to keeping a disc airborne- lift and stability. The lift is generated from the curved top of the frisbee as it flies through the air, according to Bernoulli's Principle. However, in order for the disc to remain right side up as it flies, it uses the Gyroscopic Effect . Since the disc is spinning rapidly, it will resist forces trying to turn it over, and will remain relatively stable in flight. This allows a disc to maintain lift throughout its flight and so stay in the air longer.
What Can an IMU Do?
An IMU (inertial measurement unit) contains several useful sensors to track the motion of a disc. The main one we will be using is the accelerometer, which determines the acceleration of the unit along 3 axes. By placing the accelerometer off-center on the X axis, angular acceleration can be measured. The force that accelerates the disc at the start of a throw is the player's hand, and this is powerful enough that the acceleration is too large for the IMU and it maxes out. While this may seem like a problem, it is actually helpful in determining the start of a throw. As the disc is released, it no longer has the player's arm to accelerate it. Now the throw is determined by two other forces: gravity and drag.
How can Motion be Interpreted?
The key to mapping the motion of the disc is the two forces that act on it while in flight. Drag will act against the trajectory of the disc, while gravity is guaranteed to act downward . The readings of the accelerometer axes will correspond to how much of each of these forces are along each axis. Drag will primarily be exerted on the X and Y axes. As the disc spins (shown in Figure 3), the X and Y axes of the accelerometer will oscillate between directions parallel and perpendicular to the force of drag. This means that the X and Y accelerations will oscillate as a function of time, creating a frequency on the X and Y accelerometers that represents rotational frequency of the disc. We don't know what this frequency will be but we expect it to be between 1 Hz and 30 Hz based on throwing a disc.
In addition, we can use the Z-axis acceleration to determine wobble. Wobble occurs when the axis of rotation is not perpendicular to the disc . This means that the frequency of oscillation in the Z-axis acceleration will allow us to determine the frequency and magnitude of wobble in a throw.
Impact on Data Collection
Because of the importance of aerodynamics in disc flight, the sensor used to collect data needs to be small and lightweight. For this reason we cannot use a phone and need a specialized logging device. The sensor also needs to be situated at the center of gravity. Because our sensor was offset from the center of the disc, we counterbalanced with the battery. In addition, because the range of expected spin speed is quite wide, data should be collected separately for different throws, which can then be compared to each other. Data should also be collected for a known sequence of different types of throws, which can be used to ensure that our classification algorithm is interpreting the data correctly and works in a more realistic situation.
The OpenLog Artemis
Proof of Concept
The OpenLog Artemis
At the core of our system sits the Sparkfun OpenLog Artemis datalogger. Lightweight, tiny, and capable of logging full IMU (accelerometer, gyro, and magnetometer) data at up to 250 Hz, it is perfect for fitting to a disc. Powered by a 1s 250mAh lipo battery and fitting a 32gb SD card allows it to record data for a long time.
The datalogger and battery were attached to the disc with tape and data was collected by playing some ultimate. We collected sets of data for each type of throw we wanted to detect (backhand, flick, hammer) as well as noting whether the disc was caught or landed on the ground. We also collected a set that contained mixed throws to use as a test for our identification algorithm. The equipment made no noticeable difference to how the disc flew in the air, indicating that it was light enough and aerodynamic. More than 50 throws were logged and analyzed.
We focused primarily on the simple ultimate throws, but there are many more that could potentially be analyzed. We also collected the data by throwing the disc around, but in a real ultimate game, there would be other data to collect such as fake throws from defensive stall counts, and intercepts. It would also be useful to users to have an interface that would automatically process and convert the data to a useable form (useful graphs and metrics).
The first step in analyzing our data was to develop a way of identifying when a throw occurred. This would be helpful for further analysis as each throw could be classified without manually picking out each throw.
This was achieved by analyzing the Z axis gyro data (which measures angular velocity about the Z axis). Noise in the data was reduced using a 3 point average filter, and then segments where the gyroscope readings were above or below a certain value could be identified as 'throws' - the spin was above a certain value.
The first step in classifying throws was to determine if the z-axis acceleration was positive or negative. If it was negative, it meant the disc was upside down, which indicates a hammer throw. Otherwise, we referenced the z-axis gyroscope data, which told us the angular velocity of the disc. A positive velocity meant a counterclockwise rotation, indicating a flick throw, while a negative velocity meant a clockwise rotation, indicating a backhand throw. (Note that this assumes the person throwing is right-handed. If they were left-handed, the signs for the backhand and flick velocities would be flipped.)
One statistic that is generally indicative of a good, stable throw is a high rate of spin. Based on the effect that drag has on a spinning disc, we can use the X axis accelerometer data to determine how frequently the disc completes a revolution. This indicates the spin frequency of the disc. We expect this to be between 4 and 10 Hz.
To calculate the spin frequency, we first added a bandpass filter to the x-axis accelerometer data to remove high frequency vibrations and low frequency changes in disc flight path. Then we took the Fast Fourier Transform of the x-axis accelerometer and extracted the primary frequencies. The frequency with the largest magnitude in the Fourier Transform would be the frequency of the spin.
Another useful metric to classify throw quality is amount of wobble on the disc during the flight. Wobble can be expressed as any spin that is not directly aligned with the Z-axis of the disc (and by extension the Z-axis of the accelerometer) and so can be detected by variations in the Z-axis accelerometer (Figure 8).
Richard Feynman discovered that for a spinning disc, wobble occurs at a frequency around twice the spin frequency . We used this fact to establish what frequencies determined wobble, and took the Fast Fourier Transform of the Z-axis acceleration (Figure 9) to determine the magnitude of the wobble frequencies. Note that that frequency of wobble in the figure (17.2 Hz) is approximately twice the frequency of spin (7.2 Hz) for the same throw as shown in Figure 7, above. We then used this to determine how much wobble was present. A lower magnitude at the wobble frequency indicates a more stable throw.
Throw Identification Accuracy
44 out of 45 throws were identified successfully with 1 instance of a false positive throw (a throw was identified where no throw had been made).
Out of all throws that were correctly identified, we succeeded in classifying 18 backhands, 18 flicks, and 8 hammers for a 100% accuracy
Throw Classification Accuracy
Average spin rate of the disc during flight
By taking the Fast Fourier Transform of the X-axis acceleration, the average primary frequency was between 6 and 8 Hz