Abstract
In this paper, we present a method for table tennis ball trajectory filtering and prediction. Our gray-box approach builds on a physical model. At the same time, we use data to learn parameters of the dynamics model, of an extended Kalman filter, and of a neural model that infers the ball's initial condition. We demonstrate superior prediction performance of our approach over two black-box approaches, which are not supplied with physical prior knowledge. We demonstrate that initializing the spin from parameters of the ball launcher using a neural network drastically improves long-time prediction performance over estimating the spin purely from measured ball positions. An accurate prediction of the ball trajectory is crucial for successful returns. We therefore evaluate the return performance with a pneumatic artificial muscular robot and achieve a return rate of 29/30 (97.7%).
Introduction: The Challenge of Spin
Predicting the flight of a table tennis ball is a significant challenge in robotics. Due to its low mass and high speed, the ball is highly susceptible to nonlinear forces, specifically air drag and the Magnus effect caused by spin. Furthermore, impacts with the table surface cause instantaneous changes in both velocity and rotation.
The primary hurdle is that spin is nearly invisible to standard camera systems. Without an accurate estimation of spin, a robot cannot predict the ball's position far enough in advance to plan a return. While some methods ignore spin or attempt to estimate it from noisy position data, this study explores a "gray-box" approach that integrates physical laws with machine learning.
Methodology: The Gray-Box Approach
The proposed gray-box model combines the reliability of classical physics with the flexibility of deep learning. The system consists of three main components:
- Physics-Based Filtering: An Extended Kalman Filter (EKF) is employed, utilizing ordinary differential equations (ODEs) that account for gravity, drag, and Magnus forces. Table impacts are modeled via a linear map.
- Neural Initialization: To overcome the difficulty of estimating spin from position alone, a neural network is used to initialize the EKF. This network maps the internal state of the ball launcher—specifically motor speeds and launch angles—to an initial spin estimate and its associated uncertainty.
- Differentiable Learning: The entire pipeline is trained by maximizing the marginal log-likelihood of the observed data, allowing the model to optimize parameters for drag, Magnus coefficients, and filter noise directly from real-world trajectories.
Experimental Setup and Datasets
The researchers utilized a sophisticated experimental platform consisting of an AIMY ball launcher and a four-camera tracking system.
The dataset included:
- Default Orientation: 334 trajectories for standard training and testing.
- Unseen Orientations: 150 trajectories from five different launcher positions to test generalization.
- Data Augmentation: Trajectories were mathematically rotated around the z-axis during training to simulate various launcher placements, improving the model's robustness.
The gray-box model was compared against two black-box baselines: a Recurrent State Space Model (RSSM) and a Trajectory Variational Auto-Encoder (TVAE).
Key Results and Insights
The gray-box EKF consistently outperformed the black-box models, particularly in generalization to unseen launcher configurations.
- Generalization: While pure AI models struggled when the launcher was moved, the physics-informed EKF maintained high accuracy because it respects the underlying geometry of flight.
- Prediction Accuracy: On unseen configurations, the EKF achieved a median prediction error of 10.3 cm for a one-second look-ahead.
- Robotic Performance: The model was integrated with a robotic arm powered by pneumatic artificial muscles. In real-world testing, the robot achieved a return rate of 29/30 (97.7%), proving the predictions are precise enough for high-speed interaction.
Conclusion
This research demonstrates that incorporating physical priors into a learning framework significantly enhances trajectory prediction for complex dynamical systems. By using launcher parameters to bridge the "spin gap," the gray-box model provides the necessary foresight for robotic intervention. Future work aims to infer spin from an opponent's racket movement, moving the system closer to human-level competitive play.
Summary updated