Status: Draft (2026-10-18), Measured. The numbers are simulation values calculated directly using Python 3.9.6 and numpy 2.0.2 on a laptop (Apple M1 Max, macOS 26.5). Raw data and code: Working directory
measure/robot-arm-basics/'scommon.py,m06_flight.py,m06b_constants.py,out/m06_flight.json,out/m06b_constants.json. Since the "true trajectory" is also generated using the same model, the difference between the model and the real ball is not included in the numbers in this post (comparison with real ball trajectories has not been measured). The initial ball state is from the DeepMind dataset (CC-BY 4.0). References were accessed on 2026-10-18. Writing rules: Measured data is the default, unmeasurable values are marked as "Unmeasured", and unverified items are marked as "Unverified".
Table of Contents
- 1. Intuition: A Light and Fast-Spinning Ball
- 2. Equations of Motion
- 3. Euler and RK4
- 4. What Spin and Bounce Change
- 5. How Much Do Uncertainties in Constants Shake Predictions?
- 6. Kalman Filter: Extracting State from Noisy Observations
- 7. Limitations
- 8. Conclusion
- References
1. Intuition: A Light and Fast-Spinning Ball
A table tennis ball weighs 2.7 g and has a diameter of 40 mm (ITTF Statutes 2026, 2.3.1 and 2.3.2). Being much lighter than a steel ball of the same size, the pushing force of the air is large relative to its weight. When flying at 5 m/s, the drag is about one-third of the ball's weight, and at 10 m/s, it exceeds the weight. Moreover, a player's ball spins at tens of revolutions per second. A spinning ball drags air more on one side and receives a sideways deflecting force. This is the Magnus effect, and it is why topspin balls drop sharply and backspin balls float.
Therefore, a parabolic trajectory in a vacuum is insufficient for a table tennis robot predictor. However, the more complex the model, the more constants (drag coefficient, Magnus coefficient, restitution, and friction) and states (spin) need to be known. This post looks at that trade-off in numbers.
2. Equations of Motion
m · dv/dt = m g − ½ ρ C_D A |v| v + ½ ρ A r C_M (ω × v)
dp/dt = v
m = 2.7 g, r = 0.02 m, A = π r², ρ = 1.225 kg/m³
- The second term is the drag. It is proportional to the square of the speed and in the opposite direction of the velocity.
- The third term is the Magnus force. It is in the direction of the cross product of the spin vector ω and the velocity v, causing the ball to curve sideways. For a ball coming toward the robot (−y), ω_x > 0 is topspin, and ω × v points downward, pulling the ball down.
- We assume that the spin does not decrease during flight (common assumption from Part 1).
Table Bounceis modeled as an instantaneous impulse. The normal velocity is inverted by the coefficient of restitution e, and the sliding velocity at the contact point is reduced by Coulomb friction μ, stopping when rolling is reached (contact point velocity of 0). For a thin-shell sphere (I = ⅔ m r²), eliminating two-fifths of the sliding velocity results in rolling.
def bounce(v, w, e=0.876, mu=0.25):
ux, uy = v[0] - R*w[1], v[1] + R*w[0] # 접점(공 아래쪽)의 미끄럼 속도
us = hypot(ux, uy)
jn = (1 + e) * abs(v[2]) # 질량당 법선 충격량
dv = min(mu * jn, 0.4 * us) # 마찰은 굴림에 닿으면 멈춤
jx, jy = -dv*ux/us, -dv*uy/us
k = M / I_BALL # = 1.5 / R²
return (v[0]+jx, v[1]+jy, -e*v[2]), (w[0] + k*R*jy, w[1] - k*R*jx, w[2])
2.1 Where Do Constants Come From?
| Constant | This series | Values and conditions verified in literature |
|---|---|---|
| Drag coefficient C_D | 0.47 | Sony AI 2026 Table I: 0.55 at 2.5 m/s, 0.37–0.51 at 17.5 m/s depending on spin ratio. PyBullet setting in Google 2023 is 0.47. Converting the lumped constant 0.141 1/m from Koç et al. 2018 Table A.3 using an air density of 1.2 gives about 0.50 (our calculation) |
| Magnus (per mass) | 3.4×10⁻³ | Lift constant 1.0×10⁻³ 1/rad from Koç et al. 2018 Table A.3. Effective value 7.6×10⁻³ measured in the MuJoCo simulator of the same project (DeepMind coefficients). The three values differ by more than 7 times |
| Table restitution e | 0.876 | ITTF 2.1.3 (30 cm → approx. 23 cm) converted without air. Measured 0.93 by Nakashima et al. 2010, estimated 0.883 by Koç et al. 2018 |
| Table friction μ | 0.25 | Kinetic friction measured as 0.25 by Nakashima et al. 2010 (Sony AI 2026 uses the same value). Estimated 0.102 by Koç et al. 2018 |
The reason Magnus coefficients vary widely across literature is due to differences in definitions (what is lumped and called a constant) and measurement conditions (speed, spin ratio). Sony AI 2026 tuned C_M to change linearly or quadratically depending on the spin ratio. Section 5 of this post directly measures how much this uncertainty shakes predictions.
3. Euler and RK4
To solve differential equations on a computer, time is divided into small steps to advance step by step. The simplest Euler method moves straight by dt using the current slope. RK4 (Fourth-order Runge-Kutta) measures the slope four times within a single step and takes a weighted average.
오일러: v ← v + a(v)·dt, p ← p + v·dt (걸음당 기울기 1번, 오차 ∝ dt)
RK4: k1 = f(x), k2 = f(x + k1·dt/2), k3 = f(x + k2·dt/2), k4 = f(x + k3·dt)
x ← x + (k1 + 2k2 + 2k3 + k4)·dt/6 (걸음당 4번, 오차 ∝ dt⁴)
3.1 Measurement: Position Error after 0.4 Seconds
A ball starting at position (0, 1.2, 0.25) m, velocity (0.3, −7.0, 1.2) m/s (speed 7.1 m/s), and topspin 80 rad/s was flown for 0.4 seconds without bouncing. The reference is RK4 with dt = 0.01 ms.
| Method | dt | Error after 0.4 s | Time per trajectory calculation |
|---|---|---|---|
| Euler | 0.5 ms | 0.96 mm | 808 µs |
| Euler | 1 ms | 1.92 mm | 406 µs |
| Euler | 10 ms | 19.3 mm | 42 µs |
| Semi-implicit Euler | 1 ms | 2.81 mm | 430 µs |
| RK4 | 1 ms | 9.4×10⁻¹¹ mm | 3,296 µs |
| RK4 | 5 ms | 5.7×10⁻⁸ mm | 658 µs |
| RK4 | 10 ms | 9.1×10⁻⁷ mm | 339 µs |
- In Euler, halving dt halves the error (1st order). In RK4, it is 1/16th (4th order).
- RK4 with 10 ms was faster than Euler with 0.5 ms and 1 million times more accurate. Since the flight of a table tennis ball is a smooth differential equation, higher-order methods have an overwhelming advantage.
- Semi-implicit Euler (updating velocity first and then moving position with the new velocity) performed slightly worse for this problem. Since it is a method used for energy-conserving oscillation problems, it offers no advantage for a ball with drag.
- However, events with discontinuities like bounces and racket impactsmiss the timing at large dt. This series integrates flight with collision detection at 1 ms, and reduces non-collision intervals to 5 ms (Part 7).
4. What Spin and Bounce Change
4.1 Spin Shifts the Bounce Point
We compared the points where a ball starting from the opponent's side at (0, 1.2, 0.25) m with velocity (0, −6, 1) m/s first hits the robot's side of the table, varying only the spin.
| Spin | 50 rad/s | 100 rad/s | 150 rad/s |
|---|---|---|---|
| Topspin: Bounce shifts toward the net | +10.3 cm | +19.4 cm | +27.3 cm |
| Backspin: Bounce shifts toward the end line | −11.8 cm | −25.7 cm | −41.7 cm |
Without spin, it lands at y = −0.62 m in 0.344 seconds. Since the median spin immediately after a shot in the dataset of Part 1 was 49 rad/s and the 95th percentile was 100 rad/s, spin shifts the bounce point by 10 to 25 cm even for an average amateur ball.
4.2 Bounce Check: ITTF Drop Test
The bottom of the ball was dropped from a 30 cm height, and the rebound height was measured. If e = 0.876, it should be 23 cm without air resistance, but in our model with drag, it was 21.5 cm . This is because drag robs energy during the fall and rise. To match 23 cm while including drag, e = 0.907 was required (bisection method). This value lies between the measured 0.93 by Nakashima et al. 2010 and 0.883 by Koç et al. 2018. Even a single coefficient of restitution varies by 3% depending on "what was ignored when matching".
4.3 Friction Coefficient and Spin
Assuming the same ball is received at a plane 23 cm behind the end line (y = −1.6 m), changing the table friction μ altered the passing height (above the table) as follows.
| Spin | μ = 0.10 | μ = 0.25 | μ = 0.40 |
|---|---|---|---|
| Backspin 100 rad/s | 0.19 m | 0.18 m | 0.15 m |
| No spin | 0.17 m | 0.12 m | 0.02 m |
| Topspin 100 rad/s | 0.10 m | 0.005 m | 0.005 m |
For topspin balls, μ = 0.25 and 0.40 yield the same result. This is because the contact point reaches a rolling state during the bounce, and friction no longer does work. Balls without spin were most sensitive to friction. Spin and friction cannot be tuned separately; they must be tuned together.
5. How Much Do Uncertainties in Constants Shake Predictions?
We measured the difference in passing position and time at the racket surface (y = −1.6 m) between running 1,000 dataset balls with default constants and running them with a single constant changed (m06b_constants.py).
| Changed constant | Position difference median / 90% | Time difference median | Balls not reaching the racket surface |
|---|---|---|---|
| C_D 0.47 → 0.40 | 3.1 / 12.4 cm | 30 ms | 21 |
| C_D 0.47 → 0.55 | 3.9 / 14.8 cm | 35 ms | 35 |
| Magnus → Koç value (1.0×10⁻³) | 5.4 / 11.5 cm | 6.7 ms | 43 |
| Magnus → MuJoCo effective value (7.6×10⁻³) | 10.4 / 22.3 cm | 11.3 ms | 53 |
| No Magnus | 7.4 / 15.5 cm | 9.6 ms | 72 |
The drag coefficient changes timemore significantly than position. A difference of 0.07 created a 30 ms shift, which corresponds to four camera frames in the time budget of Part 1. The Magnus coefficient significantly changes position. Simply shifting between literature values caused the racket surface position to vary by 5 to 10 cm. These constants must be re-tuned for our balls and table after building the robot. Sony AI 2026 reports that re-tuning coefficients using about 58,000 trajectories gathered from 9 cameras reduced the landing point median error from 0.37 m to 0.15 m.
6. Kalman Filter: Extracting State from Noisy Observations
Cameras only provide positions, and those positions also contain noise. Velocity requires differentiating position, but differentiation amplifies noise. The Kalman filter blends the "state predicted by the model" and "new observations" according to their respective uncertainties to estimate position and velocity together. If the model is non-linear (drag), it becomes the Extended Kalman Filter (EKF), which linearizes the model at every step.
sp = f_state(s, dt) # 예측: RK4 로 한 프레임 앞으로
F = finite_difference_jacobian(f_state, s, dt) # 선형화
P = F @ P @ F.T + Q # 불확실성도 함께 전파
K = P @ H.T @ inv(H @ P @ H.T + R) # 칼만 이득: 모델과 관측의 신뢰 비율
s = sp + K @ (z - H @ sp) # 갱신: 관측 z(위치 3개)로 고침
P = (I - K @ H) @ P
6.1 Measurement: What Improves Prediction?
We selected 200 actual ball trajectories leading up to the striking surface from the dataset to create the true trajectories (drag + actual spin + bounce). Camera observations were simulated at 60, 120, and 240 fps with per-axis Gaussian noise sigma of 3 and 10 mm. After observing for 0.1, 0.2, and 0.3 seconds immediately after impact, the filter state predicted the crossing position at the striking surface y = −1.6 m. There are three filter models.
- A Gravity only: Linear Kalman filter. Prediction is vacuum parabola + bounce.
- B Gravity + drag: EKF. Spin is assumed to be 0.
- C Gravity + drag + true spin: EKF assuming spin is known accurately. This is the lower bound when spin estimation is perfect.
Results for 120 fps, sigma = 3 mm (median of 200 balls).
| Observation time | A Position error | B Position error | C Position error | B Time error | C Time error |
|---|---|---|---|---|---|
| 0.1 s | 15.3 cm | 7.0 cm | 1.3 cm | 14 ms | 2.9 ms |
| 0.2 s | 13.3 cm | 5.6 cm | 0.5 cm | 13 ms | 1.3 ms |
| 0.3 s | 10.5 cm | 4.8 cm | 0.5 cm | 10 ms | 1.2 ms |
Results varying frame rate and noise (0.2 s observation, median position error).
| Condition | B (Unknown spin) | C (Known spin) |
|---|---|---|
| 60 fps, sigma 3 mm | 5.9 cm | 0.77 cm |
| 120 fps, sigma 3 mm | 5.6 cm | 0.51 cm |
| 240 fps, sigma 3 mm | 5.9 cm | 0.39 cm |
| 60 fps, sigma 10 mm | 6.2 cm | 2.0 cm |
| 240 fps, sigma 10 mm | 6.0 cm | 1.2 cm |
- For the model with unknown spin (B), the error did not drop below 5 cm no matter how long or how frequently it observed. This is because most of the error stems from model mismatch rather than noise.
- When spin is known (C), the error is reduced to one-tenth, and from then on, frame rate and noise matter. When noise was high, 240 fps reduced the error by 40% compared to 60 fps.
- The vacuum model (A) failed to predict the striking surface crossing altogether in 28 to 62 out of 200 balls (mislocating the bounce position).
- Processing time was 126 µs per frame for the Python EKF, and 11 ms for a single striking surface prediction.
Mülling et al. (2013) used four 60 Hz cameras and an EKF, but omitted spin from the EKF model because spin is difficult to observe (Section 3.1). Koç et al. (2018) also used four 60 Hz cameras and an EKF, including a lift term in the flight model, but did not verify how the filter handles spin (unverified). This actual measurement shows that the cost of that choice is several centimeters. Since the racket face radius is around 7 to 8 cm, it is manageable, but as seen in Part 7, it directly impacts landing point accuracy.
7. Limitations
- The true trajectory and the filter use the same equations (differing only in constants). Real balls have out-of-model effects such as spin decay, varying centers of mass per ball, and wind, which would likely result in larger errors (unmeasured).
- Observation noise was injected as independent Gaussian per axis. Actual triangulation noise is elongated along the camera line of sight, and there are also ball detection failures and latency (unmeasured).
- The case where spin is "known" (C) is merely a lower bound. Methods to estimate spin from trajectory curvature or measure it via ball surface patterns were not covered.
- The original paper on table tennis-specific wind tunnel experiments could not be accessed (unverified). The C_D range is based on flight trajectory fitting results from Sony AI 2026.
8. Conclusion
- Table tennis ball flight is well explained by three forces—gravity, drag, and Magnus—along with restitution and friction bounces. Using RK4 for integration is sufficient even at 5 to 10 ms intervals.
- A spin of 100 rad/s shifts the bounce location by over 20 cm, and a difference of 0.07 in the drag coefficient changes the arrival time by 30 ms.
- To reduce prediction error, the model (especially spin) matters more than the frame rate. Without knowing spin, the error was 5 cm; with it, it was 0.5 cm.
- Therefore, when choosing hardware, the question following "How many fps is the camera?" should be "How will we determine the spin?"
TT Takeaway. Even if you upgrade to a camera four times faster, if you don't know the spin, the ball will arrive about 5 cm off. Figuring out how the ball is spinning comes first!
References
All materials were accessed on 2026-10-18.
- ITTF, Statutes 2026, 2.1.3·2.3.1·2.3.2.
- Conti et al. (Sony AI), Physics Models for Sim-to-Real Transfer in Professional-Level Robot Table Tennis, arXiv:2606.28805, Sections III-B and III-C, Table I.
- Koç, Maeda, Peters, Online optimal trajectory generation for robot table tennis, RAS 105 (2018), Author's preprint, Equations 9–16, Table A.3, Appendix B.
- Nakashima et al., Modeling of Rebound Phenomenon of a Rigid Ball with Friction and Elastic Effects, ACC 2010, Institutional repository, Section IV.
- Mülling, Kober, Kroemer, Peters, Learning to select and generalize striking movements in robot table tennis, IJRR 32(3) (2013), Author's preprint, Section 3.1.
- D'Ambrosio et al., arXiv:2309.03315, Appendix D (Simulator setup).
- Google DeepMind, competitive_robot_table_tennis, CC-BY 4.0.