Method for controlling table tennis robot to hit rotating ball
By constructing aerodynamic formulas of table tennis and optimizing spin parameters, predicting flight trajectory, the accuracy problem of table tennis robots when controlling high-speed rotating balls is solved, and precise control of racket movement is achieved to ensure that the ball flies as expected.
Patent Information
- Application Number
- CN202411160077.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-22
AI Technical Summary
When controlling the precise movement of the high-speed rotating ball, it is difficult to take into account the incident position, straight line, rotation speed and cross-net height of the ball, resulting in a decrease in control accuracy. Existing research has failed to effectively consider these factors, resulting in whether the ball is returned. Flight as expected cannot be guaranteed.
Construct the aerodynamic formula of the table tennis ball, estimate and optimize the spin parameters of the ball, predict the flight trajectory, calculate the raft waving trajectory, capture the ball's flight trajectory through the visual system, optimize the spin parameters using the Nelder Mead algorithm, and iteratively solve the aerodynamic formula. Determine the rattle swing speed and direction to ensure the ball is flying at the expected value.
By estimating the drag coefficient and spin speed in real time and accurately predicting the trajectory, the accuracy and efficiency of racket movement are achieved, ensuring that the ball flies as expected, and the optimization program minimizes the errors in landing point and crossing the net height, improving control accuracy.
Smart Images

Figure CN119057772A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of table tennis robots, and in particular to a control method for a table tennis robot to hit a spinning ball. Background Art
[0002] One of the biggest challenges that prevents table tennis robots from playing like professional players is the precise motion control of the ball, which depends on various factors, such as the position, straight line, and rotation speed of the incoming ball. This is because the control accuracy decreases rapidly when the flight speed and rotation speed of the ball increase. When the racket hits the ball, the rotation of the incoming ball affects the direction of the racket. Since the spin of the outgoing ball is determined by the spin of the incoming ball and its linear velocity, it cannot be completely regarded as a free variable and cannot be ignored. However, only a few studies have considered the spin of the outgoing ball. For the expected value of the shot, current studies mostly target the landing point of the out-of-bounds ball. However, the landing point alone cannot uniquely determine the trajectory of a ball. At the same time, when flying over the net at different heights, all trajectories end at the same point on the table (the expected landing point). Therefore, another expected value (e.g., the expected height over the net) must be considered to ensure that the ball can pass the net. However, no literature has taken the above four factors into consideration for the return of a high-speed flying ball, so it cannot be guaranteed whether the outgoing ball flies as expected. Moreover, the more factors considered, the more complicated the operation and the lower the efficiency. How to balance accuracy and efficiency is one of the defining challenges of racket sports. Summary of the invention
[0003] The present invention discloses a control method for a table tennis robot to hit a spinning ball, and the specific method is as follows:
[0004] Constructing a table tennis aerodynamics formula, which includes table tennis spin parameters and constants;
[0005] Estimate the table tennis ball spin parameter in the table tennis ball aerodynamic formula based on the flight trajectory of the table tennis ball from the start of flight to the time before reaching the first distance threshold;
[0006] According to the flight trajectory of the table tennis ball from the first distance threshold to the second distance threshold, the spin parameter is optimized by rolling;
[0007] Predicting the flight trajectory of the table tennis ball after the second distance threshold using the table tennis aerodynamic formula;
[0008] According to the flight trajectory of the table tennis ball after the second distance threshold and the expected landing point, the racket swing trajectory of the table tennis robot is calculated.
[0009] Furthermore, the table tennis aerodynamic formula is constructed as follows:
[0010] Define the world coordinate system, with the origin at the center of the table tennis table, the y-axis parallel to the table, perpendicular to the net, pointing away from the table tennis robot, the direction of the x-axis determined by the right-hand rule, and the z-axis upward and perpendicular to the table;
[0011] The aerodynamic formula for table tennis is as follows:
[0012]
[0013] Where T s is the sampling period, s(k) represents the state of the ball at the kth sampling moment, s(k) = [x(k), y(k), z(k), v x (k), v y (k), v z (k)] T , where [x(k), y(k), z(k)] represents the position of the flying ball, V(k) = [v x (k), v y (k), v z (k)] T represents the linear velocity of the flying ball; ω(k)=[ω x (k),ω y (k),ω z (k)] T represents the ball's spin speed, which is a constant in the entire time window (kT s , (k+1)T s ), Among them C d (k), C m Represents the drag coefficient and Magnus force coefficient respectively; A, r, m b , and g represent the cross-sectional area of the sphere, the radius of the sphere, the mass of the sphere, the air density, and the acceleration due to gravity, respectively;
[0014] Simplified to the following formula:
[0015] s(k+1)=h(s(k),k d (k),ω(k)).
[0016] Furthermore, the table tennis ball spin parameter in the table tennis ball aerodynamic formula is estimated as follows:
[0017] When the ping-pong ball flies towards the ping-pong robot, the flight trajectory of the ping-pong ball is captured by the visual system and recorded as P(k) = [x(k), y(k), z(k)] T , stored in buffer B, so that B = [P(1), ···, P(k)];
[0018] Set the first distance threshold as Δ1. When the ball passes through the vertical plane y = Δ1, extract the data of buffer B, denoted as [P f (1), P f (2), …, P f (k)] = f(P(1), P(2), …, P(k));
[0019] Find the first derivative as the velocity at the sampling instant:
[0020]
[0021] where f(·) represents the function that maps the original position P(m) to the fitted position Pf(m) (m ∈ {1, 2, …, k}), and C d ∈(0, 1]. By setting C d = 1 as Initialize k d (0), k d (0) is the constant in the table tennis aerodynamic formula;
[0022] Calculate the spin parameter according to the position and velocity of the table tennis ball during sampling
[0023] Thus, the spin parameter and constant in the table tennis aerodynamic formula before flying to reaching the first distance threshold are calculated, that is, the initial formula state is initialized
[0024] Furthermore, roll - optimize the spin parameter, and the specific method is as follows:
[0025] Assume that at t = kT s , the last column of B satisfies y(k) ∈ [Δ2, Δ1];
[0026] Define three variables, namely the external estimation counter m e , the internal optimization counter m i and the prediction range N p , where i represents the calculation counter;
[0027] m e represents the number of parameter estimations triggered by the event y(k) > Δ1, and m i to m e are used to judge whether m i +N p <col(B) holds, where col(B) represents the column number of B;
[0028] i is initialized to m i ,
[0029] The cost function is defined as
[0030] Where:||·|| Q represents the norm - Q; P p (m i )=(x p (m i +j),y p (m i +j),z p (m i +j):j∈{1,…,N p}] and P f (m i )=(x f (m i +j),y f (m i +j),z f (m i +j):j∈{1,…,N p}] represent all predicted positions and actual positions within the prediction range respectively;
[0031] The cost function represents the difference between the predicted position and the actual position within the horizon, and is solved using the Nelder Mead algorithm;
[0032] The prediction range is reduced, that is, m i Increase by 1 and repeat the new update until m i +N p >col(B);
[0033] Will Assign to Complete the parameter estimation of the current B;
[0034] When B sends to the host again, m e Increase by 1 to start estimation; when the ball passes through the plane y=Δ2, parameter estimation ends.
[0035] Further, the flight trajectory of the table tennis ball after the second distance threshold Δ2 is predicted using the table tennis aerodynamic formula, including the landing point prediction and the hitting point prediction;
[0036] In the short distance from plane y = Δ2 to plane z = r, u remains unchanged (denoted as ), r is the landing plane of the ball radius;
[0037] Landing point prediction: Assumptions k=0,x(k)=x f (i), y(k) = y f (i), z(k)=z f (i), v x(k) = v x (i), v y (k) = v y (i), v z (k) = v z (i) Using the table tennis aerodynamics formula, we can predict the landing point, current linear velocity and spin speed, i.e., v it =[v itx ,v ity ,v itz ] and ω it =[ω itx ,ω ity ,ω itz ];
[0038] Hitting point prediction: The linear velocity and spin speed of the ping-pong ball rebounding from the table are expressed as [v et ω et ] T =R RRM (α,β)[v it ω it ] T
[0039] Among them, v et ,ω et They represent the linear velocity and spin speed of the ball rebounding from the table, α and β are the yaw and pitch angles of the racket;
[0040]
[0041] Where R R ,A vv ,A wv There are the following expressions
[0042]
[0043] A vv =diag(1-k v ,1-k v ,-e r )
[0044] A ww =diag(1-k w r 2 ,1-k w r 2 ,1)
[0045] A vw =k v r c
[0046] A wv =-k w rc
[0047] In the formula, r is the radius of the sphere, k is v is the tangential restitution coefficient of the racket, e r is the normal restitution coefficient of the racket, k w is the racket rotation conversion coefficient, S c Expressed as
[0048]
[0049] Assume that the hit point is located on plane y = Δ3, and u from plane z = r to plane y = Δ3 is a constant;
[0050] The landing point prediction is obtained by iterative calculation until y(k)<Δ3.
[0051] Furthermore, the trajectory of the table tennis robot’s racket swing is calculated using the expected net height H dpn Hit the ping-pong ball back to the desired landing point P dl =[x dl ,y dl ,r], it is necessary to determine the swing trajectory of the racket including the swing speed v pad and swing direction N pad ; The specific method is as follows:
[0052] At a given x dl ,y dl , H dpn and the ball rotation speed ω ep In the case of ep ;
[0053] Given ω ep and v ep , derive v pad and N pad .
[0054] Furthermore, the linear velocity v of the ball hit by the racket is derived ep , as follows:
[0055] Ignoring the Magnus force and resistance, the ball moves along a parabola, with a given impact point P hit , P dl and H dpn , click P p1 Represents a point on the network, which can be expressed as
[0056] The equation of motion for a table tennis ball is
[0057]
[0058] [Phlxy1 ,P hlz1 ] is expressed as Coordinates relative to Oxz;
[0059] v epxy1 and v epz1 They represent the horizontal speed and vertical speed in the coordinate system Oxz, t1 and t2 represent the time taken by the ball from hitting the ball to passing the net and landing point, respectively. Solving for v epxy1 、v epz1 , t1, t2;
[0060] Vertical speed and horizontal speed, that is, K θ The ratio is initialized to K θini =v epz1 / v epxy1 .
[0061] Furthermore, the linear velocity v of the ball hit by the racket is derived ep , as follows:
[0062] Assuming that the ball flies with resistance without considering the Magnus force, the linear velocity v ep2 =[v epx2 ,v epy2 ,v epz2 ]for
[0063]
[0064] v epz2 =K θ v epxy2
[0065] In the formula, e dlhx =x dl -x hit ,e dlhy =y dl -y hit , where τ represents the flight time of the ball, which can be obtained by solving the following equation:
[0066] A1τ 4 +B1τ 2 +C1=0
[0067] In the formula, A1, B1, C1 are three coefficients defined as:
[0068]
[0069] where 0.1175 and 0.47 are known coefficients for the aerodynamics of a flying ping pong ball.
[0070] Furthermore, the linear velocity v of the ball hit by the racket is derived ep, as follows:
[0071] Taking into account the spin of the ball, the spin of the ball is determined in advance by ω ep Given, according to P hit ,v ep2 ,ω ep ;
[0072] Iterative calculation to obtain the predicted landing point [x pl ,y pl ,r] and predicted network height H ppn ;
[0073] In order to make [x pl ,y pl ,H ppn ] and [x dl ,y dl ,H dpn ] is the smallest, and the following optimization is performed:
[0074]
[0075] in is the composite error e lh The smallest optimal K θ , defined as
[0076]
[0077] Among them, w1 and w2 represent the weights of the landing point error and the network height error respectively, e lx =x pl -x dl ,e ly =y pl -y dl ,e h =H dpn -H ppn They are the landing error horizontal coordinate, landing error vertical coordinate and net passing height error respectively.
[0078] Further, we deduce v pad and N pad The specific method is as follows:
[0079] When the ball's linear velocity v is obtained ep and the spin speed ω ep hour
[0080]
[0081] A wv (IA vv ) -1 A vw +A ww =I
[0082] N pad There are the following expressions
[0083]
[0084] in
[0085]
[0086] After solving the quadratic equation about the sine function to obtain the value of α, β, and the racket linear velocity v pad Can be calculated.
[0087] Due to the adoption of the above technical solution, the present invention has the following technical effects:
[0088] 1. The drag coefficient and spin speed are estimated in real time through the rolling optimization method to solve the accuracy problem of spin estimation.
[0089] 2. Predict the trajectory by iteratively solving the aerodynamics of the ball to determine where the robot will hit the ball.
[0090] 3. Using precise spin information, a stroke method based on single parameter optimization is proposed, which ensures both the accuracy and efficiency of the robot.
[0091] 4. The motion of the racket is determined by an optimization procedure that minimizes the difference between the landing point and the height over the net and its expected value. In terms of accuracy, this method achieves the best performance compared to other spin estimation algorithms.
[0092] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] The accompanying drawings of the present invention are as follows.
[0094] Figure 1 Schematic diagram of the table tennis motion parameter estimation process.
[0095] Figure 2 Determine the process diagram for racket motion.
[0096] Figure 3 Schematic diagram of the embodiment process.
[0097] Figure 4 This is a real-life demonstration of the table tennis robot. DETAILED DESCRIPTION
[0098] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0099] A control method for a table tennis robot to hit a spinning ball, the table tennis robot is Figure 4 The specific steps are as shown in Figure 3 As shown:
[0100] S1. Construct the aerodynamic formula of table tennis.
[0101] In step S1, a world coordinate system is defined. The origin is in the center of the table tennis table. The y-axis is parallel to the table, perpendicular to the net, and points away from the robot, while the z-axis is perpendicular to the table. The direction of the x-axis is determined by the right-hand rule. Discrete spherical aerodynamics can be expressed as:
[0102]
[0103] Where T s is the sampling period, s(k) represents the state of the ball at the kth sampling moment, s(k) = [x(k), y(k), z(k), v x (k), v y (k), v z (k)] T , where [x(k), y(k), z(k)] represents the position of the flying ball, V(k) = [v x (k), v y (k), v z (k)] T represents the linear velocity of the flying ball; ω(k)=[ω x (k),ω y (k),ω z (k)] T represents the ball's spin speed, which is a constant in the entire time window (kT s , (k+1)T s ), Among them C d (k), C m Represents the drag coefficient and Magnus force coefficient respectively; A, r, m b , and g represent the cross-sectional area of the ball, the radius of the ball, the mass of the ball, the air density and the gravitational acceleration, respectively. For simplicity, (1) is rewritten as:
[0104] s(k+1)=h(s(k),k d (k),ω(k)). (2)
[0105] S2. Estimate the table tennis ball spin parameter in the table tennis ball aerodynamic formula based on the flight trajectory of the table tennis ball from the start of flight to the time when the table tennis ball reaches the first distance threshold.
[0106] In step S2, let represents the parameter to be estimated. It is worth noting that the product k m ω x ,k m ω y and k m ω z k appears in formula (1) m ω, so in order to correctly identify ω, k m Therefore, the following assumptions are made.
[0107] Assumption 1: Parameter k m is a known constant derived from the properties of air.
[0108] In order to estimate the parameters, it is necessary to calculate the initial value, i.e. u(0). When the ping-pong ball flies towards the robot, its center is captured by the visual system and its position P(k) = [x(k), y(k), z(k)] T 1 / T s The frequencies of Hz are stored in buffer B, so that B = [P(1), ···, P(k)]. To trigger the initialization, a threshold Δ1 is set so that when the ball passes through the vertical plane y = Δ1, B is used for initialization. Otherwise, the ball position extraction process is repeated to put into buffer B. Once the initialization starts, the positions of a series of balls in B are represented as the nth order Chebyshev polynomial fit of
[0109] [P f (1),P f (2),…,P f (k)]=f(P(1),P(2),…,P(k)) (3)
[0110] Therefore, the velocity at each sampling instant can be estimated by the first-order derivative of (3):
[0111]
[0112] In (3) and (4), f(·) represents the mapping of the original position P(m) to the fitted position P f (m)(m∈{1,2,…,k}).
[0113] In theory, C d ∈(0,1]. Therefore, by setting C d =1 is To initialize Then, calculate based on the positions and velocities of the ball in the first and second sampling periods So far, it has been determined that Then update it using the iterative optimization method
[0114] S3. Optimize the spin parameters by rolling with the flight trajectory of the table tennis ball between the first distance threshold and the second distance threshold
[0115] In step S3, assume that at t = kT s when the last column of B satisfies y(k) ∈ [Δ2, Δ1], rolling optimization is triggered, as Figure 1 shown
[0116] Define three variables: m e i.e., the external estimation counter, m i i.e., the internal optimization counter and N p i.e., the prediction range, where i represents the calculation counter. m e represents the number of parameter estimations after being triggered by the event y(k) > Δ1. Initialize m e to 1, m i to m e is used to determine whether m i + N p <col(B) holds, where col(B) represents the column number of B. If it holds, it means that all data in B have been used to estimate u, and the parameter estimation of the current B can be terminated. Otherwise, the parameters are yet to be estimated as follows:
[0117] First, initialize i to m i . Given that is known and the ball state prediction horizon is at the i-th prediction step, that is, s p (i) = (x p (i), y p (i), z p (i), v xp (i), v yp (i), v zp (i)] T is also x p (i) = x f (i), y p (i) = y f (i), z p (i) = z f (i), v xp (i) = v xf (i), v yp (i) = v yf (i), v zp (i) = v zf(i), and the predicted state of the ball at t = (m i +1)T s To T=(m i +N p )T s Can be derived:
[0118]
[0119] In order to obtain new estimated parameters, the cost function is defined as:
[0120]
[0121] Where:||·|| Q represents the norm - Q; P p (m i )=(x p (m i +j),y p (m i +j),z p (m i +j):j∈{1,…,N p}] and P f (m i )=(x f (m i +j),y f (m i +j),z f (m i +j):j∈{1,…,Np}] represent all predicted positions and actual positions within the prediction range. In (6), the cost function represents the difference between the predicted position and the actual position within the horizon. Formula (6) is solved by the Nelder Mead algorithm. Then, the prediction range is narrowed, that is, m i Increase by 1 and repeat the new update until m i +N p >col(B). Finally, Assign to At this point, the parameter estimation of the current B is completed. When B is sent to the host again, m e Increase by 1 to start the estimation. As time goes by, when the ball passes through the plane y = Δ2, the parameter estimation ends.
[0122] Figure 1 Medium, m e =3 means that after the ball passes y = Δ1, B has been sent to do parameter estimation three times so far, that is, area a. In area b, m i =3 means P p (m i ) by P f (3) Derived from.p =3 means P p (m i )There are 3*N p elements. Similarly, in region c, m i =7 means P p (m i ) by P f (7) Derived from this, N p =3 means P p (m i )There are 3*N p After the ball passes through y = Δ1, B is updated each time the visual system detects the ball.
[0123] S4. Predicting the flight trajectory of the table tennis ball after the second distance threshold using a table tennis aerodynamic formula.
[0124] In step S4, after estimating the motion parameters, it is necessary to predict the future trajectory after plane y = Δ2 to determine the landing point and impact point. Since it is impossible to directly detect the position from plane y = Δ2 to plane z = r, for example, the landing plane with r as the radius of the ball), assumption 2:, within the short distance from plane y = Δ2 to plane z = r, u remains unchanged (denoted as ).
[0125] Landing point prediction: Assumptions k=0,x(k)=x f (i), y(k) = y f (i), z(k)=z f (i), v x (k) = v x (i), v y (k) = v y (i), v z (k) = v z (i) Using (1) and Assumption 2, we can directly predict the landing point and the current linear velocity and spin velocity (i.e., v it =[v itx ,v ity ,v itz ] and ω it =[ω itx ,ω ity ,ω itz ]).
[0126] Hitting point prediction: The linear velocity and spin speed of the ball rebounding from the table are given by
[0127] [v et ω et ] T =R RRM (α,β)[v itω it ] T
[0128] Among them, v et ,ω et They represent the linear velocity and spin speed of the ball rebounding from the table, respectively. α and β are the roll angle and pitch angle of the racket.
[0129]
[0130] Where R R ,A vv ,A wv There are the following expressions
[0131]
[0132] In the formula, r is the radius of the sphere, k is v is the tangential restitution coefficient of the racket, e r is the normal restitution coefficient of the racket, k w is the racket rotation conversion coefficient, S c Expressed as
[0133]
[0134] In order to determine where the racket should meet the ball and hit it back to the desired location, the following assumptions need to be made:
[0135] Assumption 3: The hit point is located on plane y = Δ3
[0136] Assumption 4: u from plane z = r to plane y = Δ3 is a constant
[0137] Therefore, similar to the landing point prediction process, the landing point prediction can also be obtained by iteratively calculating (1) until y(k)<Δ3. Based on the proposed method, the impact point (P hit =[x hit ,y hit ,z hit ]) and the ball speed required when hitting the ball (v ip ) can be uniquely determined.
[0138] S5. Calculate the racket swing trajectory of the table tennis robot according to the flight trajectory of the table tennis ball after the second distance threshold and the expected landing point.
[0139] In step S5, in order to use the desired ball net height H dpn Hit the ball back to the desired landing point P dl =[x dl ,y dl ,r], the racket needs to be at a specific speed v pad In a specific direction Npad Arrived at the hitting point. pad is the normal direction of the racket, such as Figure 2 To this end, we derive v pad and N pad The racket motion determination of the solution is divided into the following two stages:
[0140] Stage 1: Given x dl ,y dl , H dpn and ω ep , that is, the ball rotation speed, the linear velocity of the ball hit by the racket is derived as v ep .
[0141] Stage 2: Given ω ep and v ep , derive v pad and N pad .
[0142] Phase 1 From (1), it can be seen that the aerodynamics of the ball is highly nonlinear and it is difficult to obtain an analytical solution. Therefore, the linear velocity of the ball is determined by analyzing three cases: pure parabola, motion with resistance, and motion with Magnus and resistance.
[0143] For the first case, assuming that Magnus force and resistance are not considered, the ball moves along a parabola, such as Figure 2 As shown in Traj1 in . In the virtual plane of the ball's motion, a two-dimensional coordinate Oxz is defined. The z-axis points upward, while the x-axis points from the point of impact to the desired landing point. Therefore, given the impact point P hit , P dl and H dpn , click P p1 Representing points on the network can be expressed as:
[0144]
[0145] The equation of motion for the ball is:
[0146]
[0147] In formula (9), [P hlxy1 ,P hlz1 ] is expressed as Coordinates relative to Oxz. v epxy1 and v epz1 denote the horizontal velocity and vertical velocity in the coordinate system Oxz, respectively. t1 and t2 denote the time taken for the ball to pass the net and land, respectively. Therefore, by solving equation (13), we can get v epxy1 、v epz1 , t1, t2. Vertical speed and horizontal speed (i.e. Kθ ) is initialized as follows:
[0148] K θini =v epz1 / v epxy1 (14)
[0149] For the second case, assume that the ball flies with resistance without considering the Magnus force, such as Figure 2 As shown in Traj2 in the figure, the linear velocity v ep2 =[v epx2 ,v epy2 ,v epz2 ]for:
[0150]
[0151] v epz2 =K θ v epxy2 (16)
[0152] In the formula, e dlhx =x dl -x hit ,e dlhy =y dl -y hit , where τ represents the flight time of the ball, which can be obtained by solving the following equation:
[0153] A1τ 4 +B1τ 2 +C1=0 (17)
[0154] In formula (17), A1, B1, C1 are three coefficients defined as
[0155]
[0156]
[0157] where 0.1175 and 0.47 are typical known coefficients for the aerodynamics of a flying ping pong ball.
[0158] For the third case, the spin of the ball is taken into account, which makes the trajectory of the ball deviate from the virtual plane established for the first and second cases, as shown in Figure 2 As shown in Traj3 in . The spin of the ball is determined in advance by ω ep Given. According to P hit ,v ep2 ,ω ep , the predicted landing point [x pl ,y pl ,r] and predicted network height H ppn . In order to make [xpl ,y pl ,H ppn ] and [x dl ,y dl ,H dpn ] have the smallest difference, and can be optimized as follows:
[0159]
[0160] in is the composite error e lh The smallest optimal K θ , defined as:
[0161]
[0162] In formula (22), w1 and w2 represent the weights of the landing point error and the network height error respectively. lx =x pl -x dl ,e ly =y pl -y dl ,e h =H dpn -H ppn They are the landing error horizontal coordinate, landing error vertical coordinate and net passing height error respectively.
[0163] (21) is solved by the Nelder Mead algorithm in this study. When , v derived from equations (15) and (16) is ep2 is the linear velocity of the ball to be generated, let v ep v ep2 .
[0164] The second stage: In this stage, when the linear velocity v of the ball is obtained ep and the spin speed ω ep hour
[0165]
[0166] Derived from constraints
[0167] A wv (IA vv ) -1 A vw +A ww =I (24)
[0168] N pad There are the following expressions:
[0169]
[0170] in
[0171]
[0172] After solving the quadratic equation about the sine function to obtain the value of α, β, and the racket linear velocity v pad It can be further calculated according to formula (14). In summary, once the linear velocity and rotation speed of the incoming ball are obtained, the action of the racket can be determined according to the expected landing position and the position of the ball when it passes the net.
[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A control method for a table tennis robot to hit a spinning ball, characterized in that: The specific method is as follows: Constructing a table tennis aerodynamics formula, which includes table tennis spin parameters and constants; Estimate the table tennis ball spin parameter in the table tennis ball aerodynamic formula based on the flight trajectory of the table tennis ball from the start of flight to the time before reaching the first distance threshold; According to the flight trajectory of the table tennis ball from the first distance threshold to the second distance threshold, the spin parameter is optimized by rolling; Predicting the flight trajectory of the table tennis ball after the second distance threshold using the table tennis aerodynamic formula; According to the flight trajectory of the table tennis ball after the second distance threshold and the expected landing point, the racket swing trajectory of the table tennis robot is calculated.
2. The control method for a table tennis robot to hit a spinning ball as claimed in claim 1, characterized in that: Construct the aerodynamic formula of table tennis as follows: Define the world coordinate system, with the origin at the center of the table tennis table, the y-axis parallel to the table, perpendicular to the net, pointing away from the table tennis robot, the direction of the x-axis determined by the right-hand rule, and the z-axis upward and perpendicular to the table; The aerodynamic formula for table tennis is as follows: Where T s is the sampling period, s(k) represents the state of the ball at the kth sampling moment, s(k) = [x(k), y(k), z(k), v x (k), v y (k), v z (k)] T , where [x(k), y(k), z(k)] represents the position of the flying ball, V(k) = [v x (k), v y (k), v z (k)] T represents the linear velocity of the flying ball; ω(k)=[ω x (k),ω y (k),ω z (k)] T represents the ball's spin speed, which is a constant in the entire time window (kT s , (k+1)T s ), Among them C d (k), C m Represent the drag coefficient and Magnus force coefficient respectively; A, r, m b , ρ and g represent the cross-sectional area of the ball, the radius of the ball, the mass of the ball, the air density and the acceleration due to gravity respectively; Simplified to the following formula: s(k+1)=h(s(k),k d (k),ω(k)).
3. The control method for a table tennis robot to hit a spinning ball as claimed in claim 2, characterized in that: Estimate the table tennis ball spin parameter in the table tennis aerodynamic formula as follows: When the ping-pong ball flies towards the ping-pong robot, the flight trajectory of the ping-pong ball is captured by the visual system and recorded as P(k) = [x(k), y(k), z(k)] T , stored in buffer B, so that B = [P(1), ···, P(k)]; Set the first distance threshold to Δ1. When the ball passes through the vertical plane y=Δ1, extract the buffer B data, expressed as [P f (1),P f (2),…,P f (k)]=f(P(1),P(2),…,P(k)); Find the first-order derivative as the sampling instant velocity: Where f(·) represents the function that maps the original position P(m) to the fitted position Pf(m) (m∈{1,2,…,k}), C d ∈(0,1], by setting C d =1 is Initialize k d (0), k d (0) is a constant in the aerodynamic formula of table tennis; Calculate the spin parameters based on the position and velocity of the ping-pong ball at the time of sampling Thus, the table tennis aerodynamic formula spin parameters and constants are calculated from the start of flight to the first distance threshold, that is, the initialization formula state 4. The control method for a table tennis robot to hit a spinning ball as claimed in claim 3, characterized in that: Rolling optimizes the spin parameters. The specific method is as follows: Assume that at t = kT s When , the last column of B satisfies y(k)∈[Δ2,Δ1]; Define three variables, namely, external estimation counter m e , internal optimization counter m i and the prediction horizon N p , where i represents the calculation counter; m e represents the number of parameter estimations after being triggered by the event y(k)>Δ1, m i to m e is used to judge m i +N p whether <col(B) holds, where col(B) represents the column number of B; i is initialized to m i , The cost function is defined as Where:||·|| Q represents the norm - Q; P p (m i )=(x p (m i +j),y p (m i +j),z p (m i +j):j∈{1,…,N p }] and P f (m i )=(x f (m i +j),y f (m i +j),z f (m i +j):j∈{1,…,N p }] represent all predicted positions and actual positions within the prediction range respectively; The cost function represents the difference between the predicted position and the actual position within the horizon, and is solved using the Nelder Mead algorithm; The prediction range is reduced, that is, m i Increase by 1 and repeat the new update until m i +N p >col(B); Will Assign to Complete the parameter estimation of the current B; When B sends to the host again, m e Increase by 1 to start estimation; when the ball passes through the plane y=Δ2, parameter estimation ends.
5. The control method for a table tennis robot to hit a spinning ball as claimed in claim 4, characterized in that: Predicting the flight trajectory of the table tennis ball after the second distance threshold Δ2 using the table tennis aerodynamic formula, including the prediction of the landing point and the hitting point; In the short distance from plane y = Δ2 to plane z = r, u remains unchanged (denoted as ), r is the landing plane of the ball radius; Landing point prediction: Assumptions k=0,x(k)=x f (i), y(k) = y f (i), z(k)=z f (i), v x (k) = v x (i), v y (k) = v y (i), v z (k) = v z (i) Using the table tennis aerodynamics formula, we can predict the landing point, current linear velocity and spin speed, i.e., v it =[v itx ,v ity ,v itz ] and ω it =[ω itx ,ω ity ,ω itz ]; Hitting point prediction: The linear velocity and spin speed of the ping-pong ball rebounding from the table are expressed as [v et ω et ] T =R RRM (α, β)[v it ω it ] T Among them, v et ,ω et They represent the linear velocity and spin speed of the ball rebounding from the table, α and β are the roll angle and pitch angle of the racket; Where R R ,A vv ,A wv There are the following expressions A vv =diag(1-k v ,1-k v ,-is r ) A ww =diag(1-k w r 2 ,1-k w r 2 ,1) A vw =k v rS c A wv =-k w rS c In the formula, r is the radius of the sphere, k is v is the tangential restitution coefficient of the racket, e r is the normal restitution coefficient of the racket, k w is the racket rotation conversion coefficient, S c Expressed as Assume that the hit point is located on plane y = Δ3, and u from plane z = r to plane y = Δ3 is a constant; The landing point prediction is obtained by iterative calculation until y(k)<Δ3.
6. The control method for a table tennis robot to hit a spinning ball as claimed in claim 5, characterized in that: Calculate the trajectory of the table tennis robot's racket swing, using the expected passing net height H dpn Hit the ping-pong ball back to the desired landing point P dl =[x dl ,y dl ,r], it is necessary to determine the swing trajectory of the racket including the swing speed v pad and swing direction N pad ; The specific method is as follows: At a given x dl ,y dl , H dpn and the ball rotation speed ω ep In the case of ep ; Given ω ep and v ep , derive v pad and N pad .
7. The control method for a table tennis robot to hit a spinning ball as claimed in claim 6, characterized in that: Derive the linear velocity v of the ball hit by the racket ep , as follows: Ignoring the Magnus force and resistance, the ball moves along a parabola, with a given impact point P hit , P dl and H dpn , click P p1 Represents a point on the network, which can be expressed as The equation of motion for a table tennis ball is [P hlxy1 ,P hlz1 ] is expressed as Coordinates relative to Oxz; v epxy1 and v epz1 denote the horizontal speed and vertical speed in the coordinate system Oxz, t1 and t2 denote the time taken for the ball to pass the net and land, respectively. Solving for v epxy1 、v epz1 , t1, t2; Vertical speed and horizontal speed, that is, K θ The ratio is initialized to K θini =v epz1 / v epxy1 .
8. The control method for a table tennis robot to hit a spinning ball as claimed in claim 6, characterized in that: Derive the linear velocity v of the ball hit by the racket ep , as follows: Assuming that the ball flies with resistance without considering the Magnus force, the linear velocity v ep2 =[v epx2 ,v epy2 ,v epz2 ]for v epz2 =K θ v epxy2 In the formula, e dlhx =x dl -x hit ,e dlhy =y dl -y hit , where τ represents the flight time of the ball, which can be obtained by solving the following equation: A1t 4 +B1τ 2 +C1=0 In the formula, A1, B1, C1 are three coefficients defined as: where 0.1175 and 0.47 are known coefficients for the aerodynamics of a flying ping pong ball.
9. The control method for a table tennis robot to hit a spinning ball as claimed in claim 6, characterized in that: Derive the linear velocity v of the ball hit by the racket ep , as follows: Taking into account the spin of the ball, the spin of the ball is determined in advance by ω ep Given, according to P hit ,v ep2 ,ω ep ; Iterative calculation to obtain the predicted landing point [x pl ,y pl ,r] and predicted network height H ppn ; In order to make [x pl ,y pl ,H ppn ] and [x dl ,y dl ,H dpn ] is the smallest, and the following optimization is performed: in is the composite error e lh The smallest optimal K θ , defined as Among them, w1 and w2 represent the weights of the landing point error and the network height error respectively, e lx =x pl -x dl ,e ly =y pl -y dl ,e h =H dpn -H ppn They are the landing error horizontal coordinate, landing error vertical coordinate and net passing height error respectively.
10. The control method for a table tennis robot to hit a spinning ball as claimed in claim 9, characterized in that: Derivation v pad and N pad The specific method is as follows: When the linear velocity v of the ball is obtained ep and the spin speed ω ep hour A wv (I-A vv ) -1 A vw +A ww =I N pad There are the following expressions in After solving the quadratic equation about the sine function to obtain the value of α, β, and the racket linear velocity v pad Obtained by calculation.
Citation Information
Patent Citations
Method for predicting ping-pong spin angle velocity of ping-pong robot
CN103364579A
Method and system for predicting return way of table tennis training partner robot on basis of electromyographic signals
CN106669125A
Automatic tracking and sorting robot for table tennis balls
CN115253227A
Control method for table tennis serving robot
CN116088314A
Working method of table tennis ball picking robot
CN117398663A
