Control and detection device for table tennis training device and table tennis training system
By designing a processor and multiple detection modules in the table tennis trainer, precise control of frequency and position is achieved, which solves the problems of single performance and lack of intelligence of existing table tennis trainers, and improves training efficiency and effectiveness.
Patent Information
- Application Number
- CN202211678302.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-12-26
AI Technical Summary
The existing table tennis trainers have single performance, lack logical control and detection, cannot achieve intelligence, and cannot effectively improve training efficiency and effects.
A control and detection device including a processor, frequency control module, stepper motor position control module, hit detection module and stall detection module is designed. The movement speed and acceleration are calculated through discrete triangle planning, and the movement status is determined by combining the angle sensor. , achieve precise control of frequency and position, and provide hit and stall detection functions.
It achieves precise frequency control of the table tennis training device, improves the standardization and professionalism of training, improves the training experience through hit detection feedback, multiple speed and frequency settings help improve technology, and stall detection improves the safety of the equipment.
Smart Images

Figure CN115999130B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of table tennis training device control, and specifically relates to a control and detection device for a table tennis training device and a table tennis training system. Background Art
[0002] Table tennis is widely loved by people as the national sport. In order to improve their skills, people need to practice table tennis frequently. In table tennis training, people generally need the cooperation of a sparring partner or use a simple table tennis training device. However, these training methods are very inconvenient. In addition, the existing table tennis training devices have a single performance, which can only make the motor swing at a fixed frequency, lack logical control and detection, and cannot highlight intelligence. Summary of the invention
[0003] In order to overcome the problems existing in the related art at least to a certain extent, the present application provides a control and detection device for a table tennis trainer and a table tennis training system.
[0004] According to a first aspect of an embodiment of the present application, the present application provides a control and detection device for a table tennis trainer, which includes a processor and a frequency control module, a stepper motor position control module, a striking detection module, and a stall detection module connected to the processor;
[0005] After the table tennis trainer is turned on, the frequency control module starts the stepper motor in the table tennis trainer according to the frequency set by the user. After starting, the stepper motor position control module first calculates the movement speed and movement error of the stepper motor through discrete triangle planning, and then controls the movement of the stepper motor through acceleration displacement, acceleration time and acceleration; when the stepper motor starts to work, the hitting detection module and the stall detection module judge the movement status of the stepper motor according to the change trend of the angle sensor in the table tennis trainer to obtain the information of whether it is hit and stalled.
[0006] In the above control and detection device for table tennis training device, the control process of the frequency control module is:
[0007] The table tennis trainer refreshes the current execution time every time it is started;
[0008] The processor determines whether each table tennis training device is running online, and if so, determines whether the current execution time is greater than or equal to the current set period;
[0009] If each table tennis training device is running online, it is determined whether the current execution time is greater than or equal to the current set period. If so, the processor controls the motor to rotate forward according to the received motor setting parameters, and further determines whether the table tennis ball in the table tennis training device reaches the position to be hit;
[0010] If the ping-pong ball in the ping-pong trainer reaches the position to be hit, it is further determined whether the difference between the frequency period of the current ping-pong trainer and the execution time of the current ping-pong trainer is less than or equal to the time it takes for the ping-pong ball to return to the initial position; if so, the processor controls the motor to reverse according to the preset motor parameters.
[0011] Furthermore, the control process of the stepper motor position control module includes a process of using discrete triangles to control the motion of the stepper motor and a process of motion compensation of the stepper motor.
[0012] Furthermore, the process of using discrete triangles to control the motion of the stepper motor is as follows:
[0013] According to the total movement time and total movement distance of the stepper motor, the acceleration of the stepper motor is calculated using discrete triangle programming;
[0014] When the stepper motor works within the set working time, the planned time is accumulated;
[0015] When the planned time does not reach the acceleration end time, the planned displacement of the current cycle is updated, and a PWM wave is sent according to the planned displacement of the current cycle to control the movement speed of the stepper motor;
[0016] When the planned time reaches the acceleration end time, the planned error value of the acceleration displacement is calculated, and the planned error value of the acceleration displacement is unit compensated for the planned displacement in the deceleration time period after the acceleration end time; after the acceleration end time, the PWM wave of the corresponding frequency is continuously obtained according to the planned displacement after unit compensation to control the movement speed of the stepper motor.
[0017] Furthermore, the acceleration of the stepper motor calculated by discrete triangle programming according to the total movement time and total movement distance of the stepper motor includes the acceleration of the acceleration stage and the acceleration of the deceleration stage; wherein the acceleration of the acceleration stage is:
[0018]
[0019] In the formula, S represents the total rotation angle of the motor, T c Indicates the control cycle, n = TT c , n means the total motor motion time T includes the control cycle T c The number of
[0020] The acceleration of the deceleration stage is: -a.
[0021] Furthermore, the process of stepper motor motion compensation is:
[0022] When the stepper motor enters the deceleration stage, the angle sensor obtains the actual angle value S a , and further obtain the actual angle error value E of the current cycle a =S p -S a ;
[0023] When the actual angle error value E a ≥ΔS nr When f pwm =ΔS nr / T c , trigger compensation control, the number of cycles used for planning is suspended, the planning is stopped, the planning distance and S p Pause accumulation; otherwise, accumulate the number of cycles used for planning, and execute the plan, fpwm = ΔS (n+1)r / T c , planning angle and S p Accumulation.
[0024] In the above control and detection device for table tennis training device, the specific detection process of the hitting detection module when the motor rotates forward is:
[0025] Set the parameters of the latest angle sensor angle value New_Val, the maximum angle sensor angle value Max_Val, the hitting possibility Hit_count and the hitting standard Hit_cycle;
[0026] Determine whether New_Val is greater than Max_Val. If so, use New_Val to refresh Max_Val and clear Hit_count; otherwise, add 1 to Hit_count.
[0027] Determine whether the current hitting possibility Hit_count is greater than or equal to the hitting standard Hit_cycle. If so, it is considered as a hit; otherwise, re-determine the motor state.
[0028] Furthermore, the specific detection process of the hitting detection module when the table tennis ball is stationary at the position to be hit is:
[0029] Set the parameters of the latest angle sensor angle value New_Val, the maximum angle sensor angle value Max_Val, the hitting possibility Hit_count, the hitting standard Hit_cycle, and the angle fluctuation range TMR of the angle sensor when it is stationary;
[0030] Determine whether New_Val is greater than the difference between Max_Val and TMR. If so, use New_Val to refresh Max_Val and clear Hit_count; otherwise, add 1 to Hit_count.
[0031] Determine whether the current hitting possibility Hit_count is greater than or equal to the hitting standard Hit_cycle. If so, it is considered as a hit; otherwise, re-determine the motor state.
[0032] Furthermore, the specific detection process of the impact detection module when the motor is reversed is:
[0033] Set the parameters of the latest angle sensor angle value New_Val, the angle sensor test angle value Test_Val, the reversed time back_time, the speed Vel and the standard speed Standard_Vel;
[0034] Determine whether New_Val is less than Test_Val. If so, calculate the speed Vel using New_Val, Max_Val and back_time, Vel = (Test_Val-New_Val) / back_time;
[0035] Determine whether the velocity Vel is greater than the standard velocity Standard_Vel. If so, it is considered a hit.
[0036] In the above control and detection device for table tennis training device, the specific detection process of the stall detection module is as follows:
[0037] Determine whether the difference between the current time and the last detection time is greater than the detection cycle. If so, determine whether the motor is in operation; otherwise, re-determine whether the difference between the current time and the last detection time is greater than the detection cycle.
[0038] If the motor is in the running state, the detection times are increased by 1; otherwise, it is re-determined whether the difference between the current time and the last detection time is greater than the detection cycle.
[0039] Determine whether the number of detections modulo 2 is 1, if yes, read the first value Val_1 of the angle sensor; otherwise, read the second value Val_2 of the angle sensor; wherein the first value Val_1 and the second value Val_2 are values read after a preset time interval;
[0040] Determine whether the absolute value of the difference between the second value Val_2 of the angle sensor and the first value Val_1 of the angle sensor is less than a specified offset value, if yes, the stall possibility is increased by 1, otherwise, the stall possibility is cleared to zero;
[0041] Determine whether the jam possibility is greater than or equal to the jam specified value. If so, it is considered a jam. Otherwise, re-determine whether the difference between the current time and the last detection time is greater than the detection cycle.
[0042] According to a second aspect of the embodiment of the present application, the present application further provides a table tennis training system, which includes a table tennis training device, a control and detection device for a table tennis training device as described in any one of the above items, and a smart terminal; the control and detection device for a table tennis training device controls and detects the table tennis training device, and realizes rhythm exercises in table tennis training through frequency and position control;
[0043] The control and detection device for the table tennis trainer sends the hitting information to the smart terminal, and the smart terminal displays a comprehensive score according to the hitting force and angle.
[0044] According to the above-mentioned specific implementation methods of the present application, it can be known that at least the following beneficial effects are achieved: the control and detection device for a table tennis trainer provided by the present application can help users to practice more standardizedly through precise control of frequency; through the feedback of hitting detection and the collection of hitting information, it can help users to see their training situation more intuitively and enhance the experience during training; through the setting of multiple speeds and frequencies, it is helpful to coordinate the table tennis movement speed and the swing frequency, and the frequency setting also helps users to achieve technical improvements brought about by the step-by-step difficulty upgrade; through precise control of position, the table tennis ball on the device can move according to the planned trajectory, thereby improving the professionalism of training; through stall detection, the safety of the equipment is improved, and the motor driver chip, the motor and the user can be protected.
[0045] It should be understood that the above general description and the following specific embodiments are only exemplary and illustrative and do not limit the scope of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The attached drawings below are part of the specification of the present application, which illustrate embodiments of the present application. The attached drawings together with the description of the specification are used to explain the principles of the present application.
[0047] Figure 1 A schematic structural diagram of a table tennis training device provided for a specific implementation of the present application.
[0048] Figure 2 A working flow chart of a control and detection device for a table tennis trainer provided for a specific implementation manner of the present application.
[0049] Figure 3 A flowchart of a frequency control module in a control and detection device for a table tennis trainer provided in a specific implementation manner of the present application.
[0050] Figure 4A workflow diagram of stepper motor motion control in a stepper motor position control module in a control and detection device of a table tennis trainer provided in a specific implementation manner of the present application.
[0051] Figure 5 A workflow diagram of stepper motor motion compensation in a stepper motor position control module in a control and detection device of a table tennis trainer provided in a specific implementation manner of the present application.
[0052] Figure 6 A workflow diagram of a striking detection module in a stepper motor position control module in a control and detection device for a table tennis trainer provided in a specific implementation manner of the present application.
[0053] Figure 7 A flowchart of a stall detection module in a stepper motor position control module in a control and detection device for a table tennis trainer provided in a specific implementation manner of the present application.
[0054] Notes on the attached drawings:
[0055] 1. Stepper motor; 2. Power transmission shaft; 3. Angle sensor; 4. Rocker arm; 5. Table tennis ball; 6. First gear; 7. Second gear. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clearly understood, the spirit of the contents disclosed in the present application will be clearly explained with the accompanying drawings and detailed descriptions below. After understanding the embodiments of the contents of the present application, any technician in the relevant technical field can change and modify them according to the techniques taught by the contents of the present application without departing from the spirit and scope of the contents of the present application.
[0057] The exemplary embodiments and descriptions of the present application are used to explain the present application, but are not intended to limit the present application. In addition, elements / components with the same or similar reference numerals used in the drawings and embodiments are used to represent the same or similar parts.
[0058] The terms “first”, “second”, etc. used in this document do not particularly refer to an order or sequence, nor are they used to limit this application. They are only used to distinguish elements or operations described with the same technical terms.
[0059] The words “include,” “including,” “have,” “contain,” etc. used in this document are open-ended terms, meaning including but not limited to.
[0060] As used herein, "and / or" includes any or all combinations of the items described.
[0061] As used herein, “plurality” includes “two” and “more than two”; as used herein, “plurality groups” includes “two groups” and “more than two groups”.
[0062] Certain terms used to describe the present application are discussed below or elsewhere in this specification to provide additional guidance to those skilled in the art regarding the description of the present application.
[0063] like Figure 1 As shown, the table tennis training device includes a stepper motor 1, a power transmission shaft 2, an angle sensor 3 and a swing rod 4, wherein the output shaft of the stepper motor 1 is fixedly connected to one end of the power transmission shaft 2, the other end of the power transmission shaft 2 is fixedly connected to the swing rod 4, and a table tennis ball 5 is connected to the swing rod 4. A first gear 6 is fixedly connected to the power transmission shaft 2, a second gear 7 is provided on one side of the first gear 6, and the first gear 6 is meshed with the second gear 7. The second gear 7 is connected to the angle sensor 3, and the angle sensor 3 is used to detect the rotation angle of the swing rod 4.
[0064] When the motor rotates, the power transmission shaft 2 drives the swing rod 4 to swing, and the swing rod 4 swings with the table tennis ball 5. The power transmission shaft 2 is fixedly connected to the first gear 6, and the power transmission shaft 2 drives the second gear 7 to rotate through the first gear 6, and then rotates the angle sensor 3, so that the swing rod 4 and the angle sensor 3 swing synchronously.
[0065] After the ping-pong ball 5 is hit, it will drive the swing arm 4 to swing in the direction opposite to the hitting direction. The swing arm 4 will drive the second gear 7 to rotate through the power transmission shaft 2 and the first gear 6 in turn. The angle sensor 3 connected to the second gear 7 will detect the rotation angle of the swing arm 4 after the ping-pong ball 5 is hit.
[0066] The control and detection device for a table tennis trainer provided in an embodiment of the present application includes a processor and a frequency control module, a stepper motor position control module, a striking detection module and a stall detection module connected to the processor.
[0067] like Figure 2 As shown, when the table tennis trainer is in standby mode, the control and detection device for the table tennis trainer provided in the embodiment of the present application is in dormant mode. When the table tennis trainer is turned on, the frequency control module starts the stepper motor according to the frequency set by the user. After starting, the stepper motor position control module first calculates the motion speed and motion error of the stepper motor through discrete triangle planning, and then controls the motion of the stepper motor through parameters such as acceleration displacement, acceleration time and acceleration. When the stepper motor starts working, the striking detection module and the stall detection module judge the motion status of the stepper motor according to the change trend of the angle sensor, and obtain information on whether it is struck and stalled.
[0068] Specifically, Figure 3As shown, the control process of the frequency control module is:
[0069] The table tennis trainer refreshes the current execution time every time it is started.
[0070] The processor determines whether each table tennis training device is running online. If so, it determines whether the current execution time is greater than or equal to the current set period; otherwise, it further determines whether the table tennis training device reaches the position to be hit.
[0071] If each table tennis trainer is running online, it is determined whether the current execution time is greater than or equal to the current set period. If so, the processor controls the motor to rotate forward according to the received motor setting parameters, and further determines whether the table tennis ball in the table tennis trainer has reached the position to be hit; otherwise, it is further determined whether the table tennis ball in the table tennis trainer has reached the position to be hit.
[0072] If the ping-pong ball in the table tennis trainer reaches the position to be hit, it is further determined whether the difference between the frequency cycle of the current table tennis trainer and the execution time of the current table tennis trainer is less than or equal to the time it takes for the table tennis ball to return to the initial position; if so, the processor controls the motor to reverse according to preset motor parameters; otherwise, it continues to determine whether the difference between the frequency cycle of the current table tennis trainer and the execution time of the current table tennis trainer is less than or equal to the time it takes for the table tennis ball to return to the initial position.
[0073] The purpose of frequency control is achieved through the above control process.
[0074] Specifically, the control process of the stepper motor position control module includes a process of using discrete triangles to control the motion of the stepper motor and a process of motion compensation of the stepper motor.
[0075] Among them, Figure 4 As shown in the figure, the process of using discrete triangles to control the motion of a stepper motor is as follows:
[0076] According to the total movement time and total movement distance of the stepper motor, the acceleration of the stepper motor is calculated using discrete triangle programming. The specific process is:
[0077] According to the total motor rotation angle S, the total motor movement time T and the control cycle T c The acceleration in the acceleration phase is obtained as:
[0078]
[0079] In formula (1), n = TT c , n means the total motor motion time T includes the control cycle T c The number of .
[0080] According to the symmetry relationship, the acceleration in the deceleration phase is -a.
[0081] Specifically, the derivation process of the acceleration in the acceleration phase is:
[0082] The current time t is: t = i * T c ; Where i represents the current i-th cycle, i∈[1,n];
[0083] The current speed v is: v = at = a*i*T c ;
[0084] The angle ΔS required for the i-th cycle i =ΔS i =v*T c =a*i*T c 2 ;
[0085] The rotation angle during the acceleration phase is:
[0086] S / 2=ΔS1+ΔS2+ΔS3+……ΔS i +……+ΔS n =(1+n)*n / 2*a*T c 2 (2)
[0087] According to formula (2), the expression of acceleration in the acceleration phase can be obtained.
[0088] When the stepper motor works within the set working time, the planned time is accumulated.
[0089] When the planned time does not reach the acceleration end time, the planned displacement of the current cycle is updated, and a PWM wave is sent according to the planned displacement of the current cycle to control the movement speed of the stepper motor.
[0090] When the planned time reaches the acceleration end time, the planned error value of the acceleration displacement is calculated, and the planned error value of the acceleration displacement is unit compensated for the planned displacement in the deceleration time period after the acceleration end time. After the acceleration end time, the PWM wave of the corresponding frequency is continuously obtained according to the planned displacement after unit compensation to control the movement speed of the stepper motor.
[0091] Since the stepper motor rotates at integer angles, it is necessary to i Round off to get ΔS ir .
[0092] In the acceleration phase, the frequency f of the stepper motor PWM control is directly obtained pwm =ΔS ir / T c, and calculate the distance and motion of each cycle in the acceleration phase:
[0093] S p =ΔS 1r +ΔS 2r +ΔS 3r +……ΔS ir +……+ΔS nr (3)
[0094] At the end of the acceleration phase, calculate the acceleration phase planning angle distance error value:
[0095] E p0 =S / 2-S p (4)
[0096] After entering the deceleration stage, the frequency f of the stepper motor PWM control pwm =(ΔS ir +Sign(E pi )) / T c , and calculate the angle distance error value of the deceleration phase planning: E p(i+1) =E pi -Sign(E pi ), until E p(i+1) =0, thereby completing the compensation of the planning system error during the deceleration phase.
[0097] Among them, Sign() represents the sign function,
[0098]
[0099] Considering that stepper motors are prone to losing steps due to insufficient driving torque, the present application uses the actual angle value of the stepper motor obtained by the angle sensor to compensate for the lost steps, thereby achieving more accurate position control.
[0100] like Figure 5 As shown in the figure, the process of stepper motor motion compensation is as follows:
[0101] Considering that the speed of the stepper motor in the acceleration stage is getting faster and faster, in order to compensate more effectively, the present application does not perform compensation in the acceleration stage, and the accumulated error is compensated in the initial deceleration stage with a higher speed.
[0102] When the stepper motor enters the deceleration stage, the angle sensor obtains the actual angle value S a , and further obtain the actual angle error value E of the current cycle a =S p -S a .
[0103] When the actual angle error value E a ≥ΔS nr When fpwm =ΔS nr / T c , trigger compensation control, the number of cycles used for planning is suspended, the planning is stopped, the planning distance and S p Pause accumulation; otherwise, accumulate the number of cycles used for planning, and execute the plan, fpwm = ΔS (n+1)r / T c , planning angle and S p Accumulation.
[0104] Specifically, the detection process of the hit detection module is as follows:
[0105] The detection process of the striking detection module corresponds to the three states of the motor: forward rotation, stationary at the position to be struck, and reverse rotation.
[0106] When the motor rotates forward, the value of the angle sensor will increase. At this time, each time the angle sensor value is obtained, a maximum value will be refreshed in real time. If the new angle sensor value is less than this maximum value within a period of time, it will be regarded as a hit.
[0107] like Figure 6 As shown in the figure, the specific detection process of the striking detection module when the motor rotates forward is as follows:
[0108] Set the parameters as follows: the latest angle value New_Val of the angle sensor, the maximum angle value Max_Val of the angle sensor, the hitting possibility Hit_count, and the hitting standard Hit_cycle.
[0109] Determine whether New_Val is greater than Max_Val. If so, use New_Val to refresh Max_Val and clear Hit_count; otherwise, add 1 to Hit_count.
[0110] Determine whether the current hitting possibility Hit_count is greater than or equal to the hitting standard Hit_cycle. If so, it is considered as a hit; otherwise, re-determine the motor state.
[0111] When the table tennis ball is stationary at the position to be hit, it will retain a maximum value due to the positive rotation. And the angle sensor itself will have a certain fluctuation, so within a period of time, when the new angle sensor value is less than the maximum value minus the fluctuation value of the angle sensor itself, it is considered a hit.
[0112] like Figure 6 As shown, the specific detection process of the hitting detection module when the table tennis ball is stationary at the position to be hit is:
[0113] Set the parameters including the latest angle value New_Val of the angle sensor, the maximum angle value Max_Val of the angle sensor, the hitting possibility Hit_count, the hitting standard Hit_cycle, and the angle fluctuation range TMR of the angle sensor when stationary.
[0114] Determine whether New_Val is greater than the difference between Max_Val and TMR. If so, use New_Val to refresh Max_Val and clear Hit_count; otherwise, add 1 to Hit_count.
[0115] Determine whether the current hitting possibility Hit_count is greater than or equal to the hitting standard Hit_cycle. If so, it is considered as a hit; otherwise, re-determine the motor state.
[0116] The impact detection of the motor reversal state adopts speed detection. When the motor reverses to the preset angle, the speed of this section of reversal will be calculated. When the speed is greater than the motor's own speed, it will be regarded as a hit.
[0117] like Figure 6 As shown in the figure, the specific detection process of the striking detection module when the motor is reversed is as follows:
[0118] Set the parameters of the latest angle sensor angle value New_Val, the angle sensor test angle value Test_Val, the reversed time back_time, the speed Vel and the standard speed Standard_Vel.
[0119] Determine whether New_Val is less than Test_Val. If so, calculate the speed Vel using New_Val, Max_Val and back_time, Vel = (Test_Val-New_Val) / back_time; otherwise, end.
[0120] Determine whether the speed Vel is greater than the standard speed Standard_Vel. If so, it is considered as a hit; otherwise, end.
[0121] Specifically, the detection process of the stall detection module is as follows:
[0122] The detection is performed according to the detection cycle. When the motor is in working state, the detection times are increased by 1. The angle sensor value obtained when the detection times are even is subtracted from the angle sensor value obtained when the detection times are odd. When this difference is less than the preset offset value, the possibility of stalling is increased. If it is greater, the possibility of stalling is cleared. When the possibility of stalling is greater than or equal to the specified value of the possibility of stalling, it is considered as stalling.
[0123] like Figure 7 As shown in the figure, the specific detection process of the stall detection module is as follows:
[0124] Determine whether the difference between the current time and the last detection time is greater than the detection cycle. If so, determine whether the motor is in operation; otherwise, re-determine whether the difference between the current time and the last detection time is greater than the detection cycle.
[0125] If the motor is in the running state, the detection times are increased by 1; otherwise, it is re-determined whether the difference between the current time and the last detection time is greater than the detection cycle.
[0126] Determine whether the detection times modulo 2 is 1, if yes, read the first value Val_1 of the angle sensor; otherwise, read the second value Val_2 of the angle sensor. The first value Val_1 and the second value Val_2 are values read after a preset time interval. For example, the second value Val_2 is read 5ms after the first value Val_1 is read.
[0127] It is determined whether the absolute value of the difference between the second value Val_2 of the angle sensor and the first value Val_1 of the angle sensor is less than a specified offset value. If so, the stall possibility is increased by 1; otherwise, the stall possibility is cleared.
[0128] Determine whether the jam possibility is greater than or equal to the jam specified value. If so, it is considered a jam. Otherwise, re-determine whether the difference between the current time and the last detection time is greater than the detection cycle.
[0129] Based on the control and detection device for table tennis training provided by the present application, the present application also provides a table tennis training system, which includes a table tennis training device, a control and detection device for the table tennis training device, and an intelligent terminal. Among them, the control and detection device for the table tennis training device controls and detects the table tennis training device; the rhythm exercises in table tennis training can be well realized through effective frequency and position control, the user's reaction ability can be effectively trained by setting a random mode, and the effective feedback of the hitting position, strength and timing can provide good help to the user, making it convenient for the user to correct the action. At the same time, effective frequency position control and feedback information combined with music can construct rhythm games to improve the entertainment of sports.
[0130] The control and detection device for the table tennis trainer sends the hitting information to the smart terminal through wireless communication, and the smart terminal displays a comprehensive score based on the hitting force and angle.
[0131] This application adds logic control and intelligent detection. In terms of control, the table tennis trainer can swing according to people's settings. On this basis, a random mode is added to make the function more complete. Due to the addition of the master-slave mechanism, the frequency is divided into stand-alone and online, and the frequency control is more abundant. In terms of detection, the table tennis trainer adds an angle sensor, which can detect parameters such as hitting force and angle, making the table tennis trainer more intelligent.
[0132] The above-mentioned embodiments of the present application can be implemented in various hardware, software coding or a combination of the two. For example, the embodiments of the present application can also be a program code for executing the above method in a data signal processor. The present application can also relate to the various functions performed by a computer processor, a digital signal processor, a microprocessor or a field programmable gate array. The above-mentioned processor can be configured according to the present application to perform specific tasks, which are completed by executing a machine-readable software code or firmware code that defines the specific method disclosed by the present application. The software code or firmware code can be developed into different program languages and different formats or forms. It is also possible to compile software codes for different target platforms. However, the different code styles, types and languages of the software code for performing tasks according to the present application and other types of configuration codes do not depart from the spirit and scope of the present application.
[0133] The above description is only an illustrative specific implementation manner of the present application. Without departing from the concept and principle of the present application, any equivalent changes and modifications made by any technician in the field should fall within the scope of protection of the present application.
Claims
1. A control and detection device for a table tennis training device, It is characterized in that It includes a processor and a frequency control module, a stepper motor position control module, a striking detection module and a stall detection module connected to the processor; After the table tennis training device is turned on, the frequency control module starts the stepper motor in the table tennis training device according to the frequency set by the user. After starting, the stepper motor position control module first calculates the motion speed and motion error of the stepper motor through discrete triangle programming, and then controls the motion of the stepper motor through acceleration displacement, acceleration time and acceleration; when the stepper motor starts to work, the hitting detection module and the stall detection module judge the motion status of the stepper motor according to the change trend of the angle sensor in the table tennis training device, and obtain information on whether it is hit and stalled; The control process of the frequency control module is: The table tennis trainer refreshes the current execution time every time it is started; The processor determines whether each table tennis training device is running online, and if so, determines whether the current execution time is greater than or equal to the current set period; If each table tennis training device is running online, it is determined whether the current execution time is greater than or equal to the current set period. If so, the processor controls the motor to rotate forward according to the received motor setting parameters, and further determines whether the table tennis ball in the table tennis training device reaches the position to be hit; If the table tennis ball in the table tennis training device reaches the position to be hit, it is further determined whether the difference between the frequency cycle of the current table tennis training device and the execution time of the current table tennis training device is less than or equal to the time for the table tennis ball to return to the initial position; if so, the processor controls the motor to reverse according to the preset motor parameters; The control process of the stepper motor position control module includes a process of using discrete triangles to control the motion of the stepper motor and a process of stepper motor motion compensation; The process of using discrete triangles to control the motion of a stepper motor is as follows: According to the total movement time and total movement distance of the stepper motor, the acceleration of the stepper motor is calculated using discrete triangle programming; When the stepper motor works within the set working time, the planned time is accumulated; When the planned time does not reach the acceleration end time, the planned displacement of the current cycle is updated, and a PWM wave is sent according to the planned displacement of the current cycle to control the movement speed of the stepper motor; When the planned time reaches the acceleration end time, the planned error value of the acceleration displacement is calculated, and the planned error value of the acceleration displacement is unit compensated for the planned displacement in the deceleration time period after the acceleration end time; after the acceleration end time, the PWM wave of the corresponding frequency is continuously obtained according to the planned displacement after unit compensation to control the movement speed of the stepper motor; The process of stepper motor motion compensation is: When the stepper motor enters the deceleration stage, the angle sensor obtains the actual angle value S a , and further obtain the actual angle error value of the current cycle E a = S p - S a ; When the actual angle error E a ≥ ΔS nr hour, f pwm = ΔS nr / T c , trigger compensation control, the number of cycles used for planning is suspended, the planning is stopped, and the planning distance and S p Pause accumulation; otherwise , the number of cycles used in planning is accumulated, and planning is executed, f pwm =Δ S (n+1)r / T c , planning perspective and S p Accumulation; in, T c Indicates the control period.
2. The control and detection device for table tennis training device according to claim 1, It is characterized in that According to the total movement time and total movement distance of the stepper motor, the acceleration of the stepper motor is calculated by discrete triangle programming, including the acceleration of the acceleration stage and the acceleration of the deceleration stage; wherein the acceleration of the acceleration stage is: , In the formula, S Indicates the total rotation angle of the motor. , n Indicates the total motor motion time T The control cycle is included T c The number of The acceleration during the deceleration phase is: a .
3. The control and detection device for table tennis training device according to claim 1, It is characterized in that The specific detection process of the impact detection module when the motor rotates forward is as follows: Set the parameters of the latest angle sensor angle value New_Val, the maximum angle sensor angle value Max_Val, the hitting possibility Hit_count and the hitting standard Hit_cycle; Determine whether New_Val is greater than Max_Val. If so, use New_Val to refresh Max_Val and clear Hit_count; otherwise, add 1 to Hit_count. Determine whether the current hitting possibility Hit_count is greater than or equal to the hitting standard Hit_cycle. If so, it is considered as a hit; otherwise, re-determine the motor state.
4. The control and detection device for table tennis training device according to claim 3, It is characterized in that The specific detection process of the hitting detection module when the table tennis ball is stationary at the position to be hit is as follows: Set the parameters of the latest angle sensor angle value New_Val, the maximum angle sensor angle value Max_Val, the hitting possibility Hit_count, the hitting standard Hit_cycle, and the angle fluctuation range TMR of the angle sensor when it is stationary; Determine whether New_Val is greater than the difference between Max_Val and TMR. If so, use New_Val to refresh Max_Val and clear Hit_count; otherwise, add 1 to Hit_count. Determine whether the current hitting possibility Hit_count is greater than or equal to the hitting standard Hit_cycle. If so, it is considered as a hit; otherwise, re-determine the motor state.
5. The control and detection device for table tennis training device according to claim 4, It is characterized in that The specific detection process of the impact detection module when the motor is reversed is as follows: Set the parameters of the latest angle sensor angle value New_Val, the angle sensor test angle value Test_Val, the reversed time back_time, the speed Vel and the standard speed Standard_Vel; Determine whether New_Val is less than Test_Val. If so, use New_Val, Max_Val and back_time to calculate the speed Vel, Vel=(Test_Val-New_Val) / back_time; Determine whether the velocity Vel is greater than the standard velocity Standard_Vel. If so, it is considered a hit.
6. The control and detection device for table tennis training device according to claim 1, It is characterized in that The specific detection process of the stall detection module is as follows: Determine whether the difference between the current time and the last detection time is greater than the detection cycle. If so, determine whether the motor is in operation; otherwise, re-determine whether the difference between the current time and the last detection time is greater than the detection cycle. If the motor is in operation, the detection times will be increased by 1; Otherwise, re-determine whether the difference between the current time and the last detection time is greater than the detection period; Determine whether the number of detections modulo 2 is 1, if yes, read the first value Val_1 of the angle sensor; otherwise, read the second value Val_2 of the angle sensor; wherein the first value Val_1 and the second value Val_2 are values read after a preset time interval; Determine whether the absolute value of the difference between the second value Val_2 of the angle sensor and the first value Val_1 of the angle sensor is less than a specified offset value, if yes, the stall possibility is increased by 1, otherwise, the stall possibility is cleared to zero; Determine whether the jam possibility is greater than or equal to the jam specified value. If so, it is considered a jam. Otherwise, re-determine whether the difference between the current time and the last detection time is greater than the detection cycle.
7. A table tennis training system, It is characterized in that The invention comprises a table tennis training device, a control and detection device for a table tennis training device as claimed in any one of claims 1 to 6, and an intelligent terminal; the control and detection device for a table tennis training device controls and detects the table tennis training device, and realizes rhythm exercises in table tennis training through frequency and position control; The control and detection device for the table tennis trainer sends the hitting information to the smart terminal, and the smart terminal displays a comprehensive score according to the hitting force and angle.
