## Figures

## Abstract

Table tennis is important and challenging project for robotics research, and table tennis robotics receives a lot of attention from academics. Trajectory tracking and prediction of table tennis is an important technology for table tennis robots, and its estimation accuracy is also disturbed by non-Gaussian noise. In this paper, a novel Kalman filter, called minimum error entropy unscented Kalman filter (MEEUKF), is employed to estimate the motion trajectory of physical model of a table tennis. The simulation results show that the MEEUKF algorithm shows outstanding performance in tracking and predicting the trajectory of table tennis compared to some existing algorithms.

**Citation: **Luo S, Niu J, Zheng P, Jing Z (2022) Application of minimum error entropy unscented Kalman filter in table tennis trajectory prediction. PLoS ONE 17(9):
e0269257.
https://doi.org/10.1371/journal.pone.0269257

**Editor: **Qichun Zhang,
University of Bradford, UNITED KINGDOM

**Received: **February 25, 2022; **Accepted: **May 17, 2022; **Published: ** September 30, 2022

**Copyright: ** © 2022 Luo et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability: **All data files are available from the Baidu Netdisk database, and and the corresponding link is provided (https://pan.baidu.com/s/1ZmD9uyrHIDTXL7gVpb50Jw?pwd=qpaf).

**Funding: **The author(s) received no specific funding for this work.

**Competing interests: ** The authors have declared that no competing interests exist.

## Introduction

Table tennis is a interesting game for humans to master [1, 2], and it is also an indispensable part of human life. It is also an important and challenging project for robotics research. Accurate estimation of the trajectory of a table tennis is fundamental to the sport for robots. This paper focuses on the estimation and prediction of the trajectory of table tennis.

Accurate trajectory estimation is essential for hitting the table tennis and winning the game for robotic table tennis. The physical model of table tennis is very important for the trajectory and prediction of its trajectory. A algorithm [3] based on the forces applied approximate physical model for predicting the trajectory of a table tennis is proposed. A physical flight models that does not take into account the spin of a table tennis [4, 5]. In order to obtain more accurate tracking, the application of more accurate models in table tennis trajectory tracking studies is extremely necessary. A physical model [6, 7] that takes into account the rotation of a table tennis is applied to a table tennis robot. Some vision system [8, 9] that can predict the trajectory of spinning table tennis has been developed. The physical model of table tennis is non-linear and the observations are often disturbed by impulse noise, which poses difficulties for the trajectory of the ball.

In recent years, information theoretic learning (ITL) is widely used in the context of state estimation problem [10–15] for deterministic models. Minimum error entropy (MEE) criterion [16], in ITL, is a powerful tool in processing original data mixed with non-Gaussian noise. Moreover, the criterion is widely used in adaptive filter [17] and Kalman filter. To cope with the problem of state estimation of nonlinear system, the minimum error entropy unscented Kalman filter (MEEUKF) [12] and cubature information filter to be based on minimum error entropy (MEE-CIF) [18] are derived. These algorithms based on the MEE criterion are able to achieve outstanding performance in estimating the state of a non-linear non-Gaussian model. In this study, a physical model that takes into account the spin of table tennis is used, and we use MEEUKF to estimate this non-linear model in the presence of non-Gaussian noise. The simulation results show that the MEEUKF algorithm shows outstanding performance in tracking and predicting the trajectory of table tennis compared to some existing algorithms.

## Model

The state of the table tennis is represented by using the vector *x*_{k} with the following form
(1)
where *p*, *v*, and *w* denote the position, linear velocity, and angular velocity of the table tennis, respectively. [⋅]^{T} represents the transpose operation of a matrix.

Assuming that only the position of the table tennis can be observed, and the observation vector can be represented as
(2)
where *z*_{k} represents observation vector. Under ideal conditions, it is considered that the value of the angular velocity tends to be stable over a short period of time. The equation of motion for a table tennis can then be constructed as
(3)
where [*p*_{x,k}, *p*_{y,k}, *p*_{z,k}, *v*_{x,k}, *v*_{y,k}, *v*_{z,k}, *w*_{x,k}, *w*_{y,k}, *w*_{z,k}]^{T} denotes the state of the table tennis at moment *k*. Δ*t* denotes time interval, and *u*_{k} = [*u*_{1,k}, *u*_{2,k}, *u*_{3,k}, *u*_{4,k}, *u*_{5,k}, *u*_{6,k}, *u*_{7,k}, *u*_{8,k}, *u*_{9,k}] is the process noise with zero mean. *k*_{1} = −*C*_{D} *ρA*/2*m* represents air resistance factor (*C*_{D} is related to the roughness of the ball surface, and *C*_{D} = 0.45 [19]; *ρ* = 1.205*kg*/*m*^{3} indicates air density; *A* is the maximum cross-sectional area of a table tennis),*k*_{2} represents the Magnus force factor [20] (*C*_{L} = 1.23 the lift factor; *D* = 0.04*m* the diameter of the table tennis; *m* = 0.0027*kg* the mass of the table tennis), ‖*V*‖ indicates the magnitude of the speed of the table tennis.

The observation equation can be set as (4)

Here, *r*_{k} indicates observation noise, and observed noise is not correlated with process noise.

## UKF

According to [21], the process equation and measurement equation of non-linear system can be written as following form
(5)
where stands for the system state at instant *k*, reoresents the measurement vector. f_{k}(⋅) and h_{k}(⋅) are the process and measurement function at instant *k*, , , , and present the process and measurement Gaussian noise with covariances *Q*_{k−1} and *R*_{k} respectively. And *Q*_{k−1} and *R*_{k} are both zero means.

- a) The update sigma points
*X*_{i,k−1|k−1}are evaluated by the following formulas (6) where denotes the predict state at time*k*− 1. is the*i*th column vector of the square root matrix of (*n*+ λ)*P*_{k−1|k−1}, λ presents a composite scaling factor, which is defined as λ =*α*^{2}(*p*+*o*) −*p*. Here,*α*decides the range of the sigma points, which is set as a small positive value, and parameter*o*is always set to 3 −*p*for*p*< 3 and 0 for*p*≥ 0 - b) The propagated process sigma points
*X*_{i,k|k−1}are computed by (7) - c) The updated state of system can be obtained by (8) where can be obtained by (9)
- d) The error covariance
*P*_{k|k−1}is estimated by (10) where can be obtained by (11) the parameter*β*is concerned with the prior knowledge of the distribution of . For Gaussian distribution, its value is set to 2. - e) The measurement sigma points
*X*_{i,k|k−1}and the propagated measurement sigma points*Z*_{i,k|k−1}are estimated by (12) - f) Calculate the predicted measurement (13)
- g) The innovation covariance matrix
*P*_{zz,k|k−1}can be obtained by (14) - h) Estimate the cross-covariance matrix (15) (16)
- i) The Kalman gain
*K*_{k}can be evaluated by (17)

j) Get the updated state becomes (18)

## MEEUKF

We apply a statistical linearization and use measurement slope matrix to solve the nonlinear estimation problem. After state prediction, we obtain the predicted state vector and the covariance *P*_{k|k−1} of predict error . By getting and *ξ*_{k}, we can linearise the nonlinear equation
(19)
where *ς*_{k} is the statistical linearization error and its covariance can be written as . We can get the batch mode regression form as follow:
(20)
which we set , with
(21)

Both sides of (20) are left multiplied by , and one can obtain (22) with

Now we introduce the MEE based cost function:
(24)
where G_{σ}(*x*) = exp(−*x*^{2}/2*σ*^{2}) is Gaussian kernel function.

As part 2.2 mentioned, to minimize the error entropy, we should maximize the cost function. Calculate the derivation of *J*(*x*_{k}).
(25)

Setting ∇*J*(*x*_{k}) = 0, we can get the maximum state *x*_{k}.
(26)

To express *x*_{k} by *B*_{pk} and *B*_{rk} instead of *W*_{k}, we denote:
(27)
where , , , .

With a few simple derivations [11], one can obtain the state vector of system (28)

Here, the estimation ends as and the updated sate , *γ* is the accuracy we want the filter can achieve. The final covariance *P*_{k|k} is calculated as:
(30)

**Algorithm 1:** MEEUKF

**Input:** The model of system,observation data *z*_{k}

**Output:** Estimation of the state of system

**1 Parameters setting**: set proper kernel bandwidth *σ*; initial value () of the system, and an initial covariance matrix *P*_{0|0}.

**2 for** *i* ← 1 to *N* **do**

**3** Prediction of the state of the system using (6), (7), (8), and (9);

**4** Prediction of the covariance of the system using (10) and (11);

**5** Calculate matrix , , , and using (29);

**6** Calculate Kalman gain and update state of system utilizing (28)

**7** Update covariance *P*_{k|k} using (30)

**8 end**

## Simulation

In this part, the MEEUKF is applied to a table tennis motion model to verify the performance of the algorithm, and the effect of the parameters on the performance of the algorithm was also investigated. In the following simulations, the initial value of the table tennis state is set to [0, 0, 0, 3, 5, 5, −56, −53, 47]. All simulation results, in this paper, are averaged over 100 independent Monte Carlo runs, and in one run, 100 samples are utilised to measure the MSD that is used to measure the performance of MEEUKF algorithm. (31)

We consider the situation where the state transition noise is Gaussian distribution and the observation noise is mixed-Gaussian and Rayleigh distribution, and these distributions of these noises are shown below: (32)

Here, *N*(⋅, ⋅) denotes Gaussian distribution. Moreover, probability density function of the Rayleigh distribution is expressed as:
(33)

The noise that obeys the Rayleigh distribution is defined as *v* ∼ *R*(*σ*).

First, the performance of MEEUKF applied to the table tennis motion model is compared with some existing algorithms such as UKF, MCCUKF with the presence of mixed Gaussian noise and Rayleigh noise. A table tennis motion model in the section named Model is used to test the performance of these algorithms, and the trajectory of the table tennis is shown in Fig 1. The convergence curves and parameters of these algorithms are shown in Fig 2 with the assurance that the initial convergence rate of these algorithms is almost identical. It is obvious that MEEUKF performs best when tracking table tennis in the presence of mixed Gaussian and Rayleigh noises.

The picture shows the trajectory of a table tennis.

The figure depicts the performance of the algorithm compared with UKF and MCCUKF in the presence of Mixed Gaussian and Rayleigh noises. (a) Mixed Gaussian noise. (b) Rayleigh noise.

Second, the effect of kernel width *σ* on algorithm performance is investigated. We set different kernel width *σ* = 0.1, 0.5, 5.0, 10.0, 100.0 separately to explore its impact on the performance of the algorithm, and the other parameters of the algorithm and noise are the same as in the previous simulations. The steady-state MSD and convergence curves of the algorithm are shown in Fig 3 and Table 1 respectively. One can obtain that the value of *σ* is too large or too small to achieve the best performance, and the tracking performance of the MEEUKF algorithm for table tennis when *σ* = 0.5.

## Conclusion

For non-linear and non-Gaussian model of table tennis, the MEEUKF algorithm is used to to estimate and predict the trajectory of this model. This algorithm is able to suppress non-Gaussian noise very well. Simulations show MEEUKF performs well in predicting table tennis trajectories compared with some existing algorithms.

## References

- 1. Koç O., Maeda G., Peters J., Online optimal trajectory generation for robot table tennis, Robotics and Autonomous Systems 105 (2018) 121–137.
- 2. Ferrandez C., Marsan T., Poulet Y., Rouch P., Thoreux P., Sauret C., Physiology, biomechanics and injuries in table tennis: A systematic review, Science & Sports 36 (2) (2021) 95–104.
- 3.
Z. Zhang, D. Xu, J. Yu, Research and latest development of ping-pong robot player, in: 2008 7th World Congress on Intelligent Control and Automation, 2008, pp. 4881–4886.
- 4. Matsushima M., Hashimoto T., Takeuchi M., Miyazaki F., A learning approach to robotic table tennis, IEEE Transactions on Robotics 21 (4) (2005) 767–771.
- 5.
K. Mülling, J. Kober, J. Peters, A biomimetic approach to robot table tennis, in: 2010 IEEE/RSJ International Conference on Intelligent Robots and Systems, 2010, pp. 1921–1926.
- 6.
A. Nakashima, Y. Ogawa, Y. Kobayashi, Y. Hayakawa, Modeling of rebound phenomenon of a rigid ball with friction and elastic effects, in: Proceedings of the 2010 American Control Conference, 2010, pp. 1410–1415.
- 7.
Y. Huang, D. Xu, M. Tan, H. Su, Trajectory prediction of spinning ball for ping-pong player robot, in: 2011 IEEE/RSJ International Conference on Intelligent Robots and Systems, 2011, pp. 3434–3439.
- 8. Zhang Y., Xiong R., Zhao Y., Wang J., Real-time spin estimation of ping-pong ball using its natural brand, IEEE Transactions on Instrumentation and Measurement 64 (8) (2015) 2280–2290.
- 9.
J. Glover, L. P. Kaelbling, Tracking the spin on a ping pong ball with the quaternion bingham filter, in: 2014 IEEE International Conference on Robotics and Automation (ICRA), 2014, pp. 4133–4140.
- 10. Ma W., Qiu J., Liu X., Xiao G., Duan J., Chen B., Unscented kalman filter with generalized correntropy loss for robust power system forecasting-aided state estimation, IEEE Transactions on Industrial Informatics 15 (11) (2019) 6091–6100.
- 11. Dang L., Chen B., Wang S., Ma W., Ren P., Robust power system state estimation with minimum error entropy unscented kalman filter, IEEE Transactions on Instrumentation and Measurement 69 (11) (2020) 8797–8808.
- 12. Chen B., Dang L., Gu Y., Zheng N., Príncipe J. C., Minimum error entropy kalman filter, IEEE Transactions on Systems, Man, and Cybernetics: Systems 51 (9) (2021) 5819–5829.
- 13. Yin X., Zhang Q., Wang H., Ding Z., Rbfnn-based minimum entropy filtering for a class of stochastic nonlinear systems, IEEE Transactions on Automatic Control 65 (1) (2020) 376–381.
- 14. Zhang Q., Performance enhanced kalman filter design for non-gaussian stochastic systems with data-based minimum entropy optimisation, AIMS Electronics and Electrical Engineering 3 (4) (2019) 382–396.
- 15. Yin X., Zhang Q., Backstepping-based state estimation for a class of stochastic nonlinear systems, Complex Engineering Systems 2 (1) (2022) 1.
- 16. Zhang Y., Chen B., Liu X., Yuan Z., Principe J. C., Convergence of a fixed-point minimum error entropy algorithm, Entropy 17 (8) (2015) 5549–5560.
- 17. He J., Wang G., Peng B., Sun Q., Feng Z., Zhang K., Mixture quantized error entropy for recursive least squares adaptive filtering, Journal of the Franklin Institute 359 (3) (2022) 1362–1381.
- 18. Li M., Jing Z., Leung H., Robust minimum error entropy based cubature information filter with non-gaussian measurement noise, IEEE Signal Processing Letters 28 (2021) 349–353.
- 19. Zhang Z., Xu D., Tan M., Visual measurement and prediction of ball trajectory for table tennis robot, IEEE Transactions on Instrumentation and Measurement 59 (12) (2010) 3195–3205.
- 20.
Halliday D., Resnick R., Walker J., Fundamentals of physics, John Wiley & Sons, 2013.
- 21. Chang L., Hu B., Chang G., Li A., Huber-based novel robust unscented kalman filter, IET Science, Measurement & Technology 6 (6) (2012) 502–509.