A control method, device and electronic device for a treadmill motor
By identifying the jump and landing status on the treadmill and calculating and applying the current increment compensation value, the problem that the treadmill motor control method cannot adapt to the sudden load change is solved, and the control effect and user experience are improved.
Patent Information
- Application Number
- CN202211060967.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-08-31
AI Technical Summary
The existing treadmill motor control methods cannot adapt to load regular sudden changes, resulting in poor control effects and user experience.
By determining the state where the target object takes off and lands on the treadmill, the current increment required for the motor to maintain a predetermined rotation speed is calculated, and it is used as a compensation value, and the current phase current of the motor is compensated based on the compensation value, and the motor is controlled to maintain a predetermined rotation speed.
Effectively adapt to load regular sudden changes, improve the control effect and user experience of treadmill motors, reduce the current increase during load sudden changes, and reduce hardware costs.
Smart Images

Figure CN115622476B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of treadmill control, and particularly to a control method, device and electronic device for a treadmill motor. Background Art
[0002] The control method of existing treadmills usually adopts a dual-PID loop control to achieve the target speed set by the user. Figure 1 FIG. is a schematic diagram of a dual-PID loop control of the prior art. As Figure 1 shown, the outer loop is the speed loop control, and the inner loop is the current loop control. The specific control logic is as follows: when the user sets a certain fixed speed, the speed loop calculates the speed error value and the integral value of the error (the integral interval is determined by the integral coefficient) according to the current speed and the target speed, and converts the calculation result into the current (Q-axis and D-axis) increment according to the existing rules. According to the current current reference, it is converted into the target current value, and the space vector pulse width modulation (SVPWM) is used to control the bridge circuit to drive the motor coil. By sampling the resistance, the three-phase current is detected, and the real current (Q-axis and D-axis) is obtained through coordinate transformation, and enters the next round of current loop control adjustment; at the same time, through the observer, the current is converted into the angle and angular velocity of the rotor, and the result is transmitted to the speed loop for the next round of speed loop adjustment.
[0003] Taking a dual-motor as an example, since PI control can ignore the mathematical model of the controlled object, it has strong versatility; there is no complex function calculation, and the operation amount is low; the control is simple, and by adjusting the parameters of KP and KI, the efficient operation of the motor can be achieved; the dual-loop control can achieve a fast response of the speed, and is particularly suitable for the case of a constant load. However, due to the particularity of the treadmill load, such as the load is periodically variable. When a person is running, at the moment of pushing off and landing, an additional pressure is generated on the treadmill belt, resulting in a transient change (increase) in the friction force of the treadmill belt, thereby causing a periodic load mutation of the treadmill motor, which in turn causes mutations in the speed and current. The above control logic of the dual-current loop has a long adjustment period, large speed fluctuations and may cause overcurrent protection or speed overshoot when dealing with such a mutant load. In terms of the user experience, it is manifested as poor body feeling, numb legs, abnormal shutdown, etc.
[0004] For the above problems, no effective solution has been proposed yet. Summary of the Invention
[0005] Embodiments of the present invention provide a control method, device and electronic device for a treadmill motor, so as to at least solve the technical problem that the control method of the treadmill motor in the related art cannot be applied to the scenario of regular load mutation, resulting in poor control effect and user experience.
[0006] According to one aspect of an embodiment of the present invention, a control method for a treadmill motor is provided, including: determining that a target object is in a first state, where the first state is that the target object jumps on the treadmill; calculating, when the target object is in the first state, a current increment required for the motor of the treadmill to maintain a predetermined speed, where the current increment is used as a compensation value for the target object in a second state, and the second state is that the target object lands on the treadmill; determining that the target object is in the second state; and compensating a current phase current of the motor according to the compensation value when the target object is in the second state, and controlling the motor to maintain the predetermined speed based on the compensated current phase current.
[0007] Optionally, determining that the target object is in the first state includes: obtaining a current phase current of the motor and a count number of a cache counter; and determining that the target object is in the first state according to the current phase current and the count number.
[0008] Optionally, determining that the target object is in the first state according to the current phase current and the count number includes: determining whether the current phase current is greater than a first predetermined current, where the first predetermined current is a product of an average phase current and a first predetermined multiple, and the average phase current is an average value of a plurality of current phase currents before the target object is in the first state; if the current phase current is greater than the first predetermined current, re-obtaining the current phase current and the count number, and determining that the target object is in the first state according to the current phase current and the count number; if the current phase current is less than or equal to the first predetermined current, determining whether the count number is greater than a first predetermined number; if the count number is greater than the first predetermined number, determining that the target object is in the first state; if the count number is less than or equal to the first predetermined number, incrementing the count number by 1, continuing to obtain the current phase current and the count number, and determining that the target object is in the first state according to the current phase current and the count number.
[0009] Optionally, calculating the current increment required for the motor of the treadmill to maintain a predetermined rotational speed includes: detecting the current phase current of the motor; determining whether the current phase current is greater than the phase current at the previous moment; in the case where the current phase current is greater than the phase current at the previous moment, using the current phase current as the phase current at the previous moment and continuing to detect the current phase current; in the case where the current phase current is less than or equal to the phase current at the previous moment, determining whether the count of the cache counter is greater than a second predetermined number; in the case where the count is greater than the second predetermined number, determining the current increment according to the phase current at the previous moment and the time corresponding to the phase current at the previous moment; in the case where the count is less than or equal to the second predetermined number, incrementing the count by 1 and continuing to perform the step of calculating the current increment required for the motor of the treadmill to maintain a predetermined rotational speed.
[0010] Optionally, determining the current increment according to the phase current at the previous moment and the time corresponding to the phase current at the previous moment includes: obtaining the phase current change amount according to the difference between the phase current at the previous moment and the average phase current, where the average phase current is the average of multiple current phase currents before the target object is in the first state; obtaining the time change amount according to the difference between the time corresponding to the phase current at the previous moment and the time corresponding to the target object being in the first state; calculating the current increment according to the phase current change amount and the time change amount.
[0011] Optionally, determining that the target object is in the second state includes: obtaining the current phase current of the motor and the count of the cache counter; determining that the target object is in the second state according to the current phase current and the count.
[0012] Optionally, determining that the target object is in the second state according to the current phase current and the number of counts includes: determining whether the current phase current is greater than a second predetermined current, where the second predetermined current is the product of the average phase current and a second predetermined multiple, and the average phase current is the average of multiple current phase currents before the target object is in the first state; in the case where the current phase current is greater than the second predetermined current, re-acquire the current phase current and the number of counts, and determine that the target object is in the second state according to the current phase current and the number of counts; in the case where the current phase current is less than or equal to the second predetermined current, determine whether the number of counts is greater than a third predetermined number; in the case where the number of counts is greater than the third predetermined number, determine that the target object is in the second state; in the case where the number of counts is less than or equal to the third predetermined number, increment the number of counts by 1, continue to acquire the current phase current and the number of counts, and determine that the target object is in the second state according to the current phase current and the number of counts.
[0013] Optionally, compensating the current phase current of the motor according to the compensation value, and controlling the motor to maintain the predetermined speed based on the compensated current phase current includes: turning off the current loop control and the speed loop control of the motor; inputting a target voltage to the motor based on space vector pulse width modulation to control the motor to maintain the predetermined speed, where the target voltage is determined according to the compensated current phase current; turning on the current loop control and the speed loop control of the motor.
[0014] According to another aspect of the embodiments of the present invention, there is also provided a control device for a treadmill motor, including: a first determination module, configured to determine that a target object is in a first state, where the first state is that the target object jumps on the treadmill; a calculation module, configured to calculate, when the target object is in the first state, a current increment required for the motor of the treadmill to maintain a predetermined speed, where the current increment is used as a compensation value for the target object in a second state, and the second state is that the target object lands on the treadmill; a second determination module, configured to determine that the target object is in the second state; and a control module, configured to, when the target object is in the second state, compensate the current phase current of the motor according to the compensation value, and control the motor to maintain the predetermined speed based on the compensated current phase current.
[0015] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a processor; and a memory for storing processor-executable instructions; where the processor is configured to execute the control method for the treadmill motor described in any one of the above.
[0016] According to another aspect of the embodiments of the present invention, there is also provided a storage medium, which includes a stored program. When the program runs, it controls the device where the storage medium is located to execute the control method of the treadmill motor described in any one of the above.
[0017] In the embodiments of the present invention, it is first determined that the target object is in a first state, where the first state is that the target object jumps on the treadmill. If the target object is in the first state, calculate the current increment required for the motor of the treadmill to maintain a predetermined speed. The current increment is used as a compensation value for the second state of the target object, and the second state is that the target object lands on the treadmill. Then it is determined that the target object is in the second state. If the target object is in the second state, compensate the current phase current of the motor according to the compensation value, and control the motor to maintain the predetermined speed based on the compensated current phase current. That is to say, the embodiments of the present invention utilize the current increment required for the motor of the treadmill to maintain a predetermined speed when the target object jumps on the treadmill, and add this current increment as a compensation value to the motor at the moment of landing, so that the motor maintains a predetermined speed, thereby solving the technical problem that the control method of the treadmill motor in the related art cannot adapt to the scenario of regular load mutation, resulting in poor control effect and body feeling, and achieving the technical effect of being able to adapt to the scenario of regular load mutation and greatly improving the control effect and body feeling of the treadmill. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present invention, and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0019] Figure 1 It is a schematic diagram of a dual-PID loop control in the prior art;
[0020] Figure 2 It is a flowchart of a control method for a treadmill motor provided by an embodiment of the present invention;
[0021] Figure 3 It is a schematic diagram of a Q-axis current change curve in the stage of pushing off and jumping provided by an embodiment of the present invention;
[0022] Figure 4 It is a schematic diagram of a Q-axis current change curve after landing provided by an embodiment of the present invention;
[0023] Figure 5 It is a flowchart of determining the entry into the jump provided by an embodiment of the present invention;
[0024] Figure 6 It is a flowchart of a jump processing provided by an embodiment of the present invention;
[0025] Figure 7 It is a flowchart of a floor compensation process provided by an embodiment of the present invention;
[0026] Figure 8 It is a schematic diagram of a control device for a treadmill motor provided by an embodiment of the present invention. Detailed implementation manners
[0027] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present invention are used to distinguish different objects, rather than to limit a specific order.
[0029] According to one aspect of the embodiments of the present invention, a control method for a treadmill motor is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0030] Figure 2 It is a flowchart of a control method for a treadmill motor provided by an embodiment of the present invention. As Figure 2 shown, the method includes the following steps:
[0031] Step S202, determining that the target object is in the first state, where the first state is that the target object jumps on the treadmill;
[0032] The above target object includes but is not limited to people, moving objects, etc.
[0033] Step S204, when the target object is in the first state, calculating the current increment required for the motor of the treadmill to maintain a predetermined speed, where the current increment is used as the compensation value for the target object in the second state, and the second state is that the target object lands on the treadmill;
[0034] The above treadmill uses a motor to drive the treadmill belt to run. Among them, when the target object is running, the phase current waveform can be obtained, and the characteristic points in the phase current waveform are used to determine the state of the target object, such as takeoff and landing. The above-mentioned predetermined speed, also known as the target speed, can enable the motor of the treadmill to run smoothly in the scenario where the load changes regularly. When the target object takes off or lands on the treadmill, it will cause a periodic load mutation of the motor of the treadmill. Using the compensation value can effectively avoid the periodic load mutation of the motor of the treadmill, so that the motor of the treadmill runs smoothly at a speed.
[0035] Step S206, determine that the target object is in the second state;
[0036] Step S208, when the target object is in the second state, compensate the current phase current of the motor according to the compensation value, and control the motor to maintain the predetermined speed based on the compensated current phase current.
[0037] In the embodiment of the present invention, it is first determined that the target object is in the first state, where the first state is that the target object takes off on the treadmill; if the target object is in the first state, calculate the current increment required for the motor of the treadmill to maintain the predetermined speed, where the current increment is used as the compensation value for the target object in the second state, and the second state is that the target object lands on the treadmill; then determine that the target object is in the second state; if the target object is in the second state, compensate the current phase current of the motor according to the compensation value, and control the motor to maintain the predetermined speed based on the compensated current phase current. That is to say, the embodiment of the present invention uses the current increment required for the motor of the treadmill to maintain the predetermined speed when the target object takes off on the treadmill, and adds this current increment as the compensation value to the motor at the moment of landing, so that the motor maintains the predetermined speed, thereby solving the technical problem that the control method of the treadmill motor in the related art cannot adapt to the scenario of regular load mutation, resulting in poor control effect and body feeling, and achieving the technical effect of being able to adapt to the scenario of regular load mutation and greatly improving the control effect and body feeling of the treadmill.
[0038] Furthermore, the above method of the present invention can achieve the following beneficial effects: First, the method can be suitable for occasions where the load changes regularly, and can greatly improve the control effect of the treadmill; Second, the feed-forward compensation value is measured during the low-speed operation of the motor and the user's takeoff phase, and has self-learning and self-calibration functions, and is suitable for users with different weights, different takeoff heights, and takeoff speeds, with strong adaptability; In addition, it can effectively reduce the current increment during the load mutation process, and then can reduce the rated current of the switching tube or intelligent power module (IPM), reducing the hardware cost.
[0039] It should be noted that according to the fact that the ground pushing force when a person jumps and the buffering force when landing are equal along the direction of the center of gravity, the additional frictional forces generated on the treadmill belt are equal. Calculate the current increments (△ID, △IQ) required to maintain the set rotational speed during takeoff, and use this increment as a compensation value to be added to the motor at the moment of landing. On this basis, perform fine-tuning of the PI loop. This can enable the motor to quickly approach the target rotational speed and target current (ID, IQ) when the load undergoes a sudden change, reduce the speed fluctuation and adjustment time during the rotational speed adjustment process, and enhance the physical sensation.
[0040] Among them, the calculation method of the compensation value and the specific implementation process of the implementation method are as follows:
[0041] 1. Calculation method:
[0042] Through actual testing, the ground pushing takeoff and landing of the user are in opposite time sequences and the acting forces along the center of gravity on the treadmill belt are equal. Also, according to the load (power) of the motor = u * Fn * V;
[0043] Among them, u is the friction coefficient of the belt, V is the rotational speed of the belt, and Fn is the acting force of the person on the belt along the direction of the center of gravity; during the takeoff and landing stages, Fn can be approximated as: Fn = G + ΔF, where G is the weight of the person and ΔF is the buffering force during ground pushing takeoff and landing;
[0044] Therefore, the load change amount ΔW of the motor in the two stages is equal, that is, ΔW = u * ΔF * V;
[0045] Figure 3 This is a schematic diagram of the Q-axis current change curve in the ground pushing takeoff stage provided by an embodiment of the present invention. As Figure 3 shown, when maintaining the rotational speed V unchanged and using the least squares method to fit the current change curve, it can be known that
[0046] ΔIF = a0 + a1t + a2t 2 + a3t 3 +...
[0047] Figure 4 This is a schematic diagram of the Q-axis current change curve after landing provided by an embodiment of the present invention. As Figure 4 shown, and according to the opposite time sequences of takeoff and landing and the equal acting forces, when maintaining the rotational speed unchanged, the Q-axis current change curve after landing can be inferred;
[0048] From the above analysis, Figure 4 is Figure 3 obtained by symmetrically shifting the left side of t = tend by tend along the symmetry. Therefore, Figure 4 the expression of is:
[0049] ΔIS = a0 + a1(tend - t) + a2(tend - t)2 +a3(tend - t) 3 +...
[0050] Thus, the current increment after landing, i.e., the compensation value, can be obtained.
[0051] 2. Implementation method
[0052] First, to simplify the calculation and improve the processing efficiency of the Microcontroller Unit (MCU), linear fitting is adopted, i.e., ΔIF = a0 + a1t. According to the fact that this function passes through (0, 0) and (tend, ΔImax), the expression of the curve can be obtained as follows:
[0053]
[0054]
[0055] Secondly,
[0056] ΔIF = INOW - IAVE
[0057] where INOW is the current phase current, which is averaged after multiple measurements, and IAVE is the average phase current, which is averaged after multiple values of the phase current before the load mutation.
[0058] In an alternative implementation, determining that the target object is in the first state includes: obtaining the current phase current of the motor and the count of the cache counter; determining that the target object is in the first state according to the current phase current and the count.
[0059] In an alternative implementation, determining that the target object is in the first state according to the current phase current and the count includes: determining whether the current phase current is greater than a first predetermined current, where the first predetermined current is the product of the average phase current and a first predetermined multiple, and the average phase current is the average of multiple current phase currents before the target object is in the first state; if the current phase current is greater than the first predetermined current, then re - obtain the current phase current and the count, and determine that the target object is in the first state according to the current phase current and the count; if the current phase current is less than or equal to the first predetermined current, then determine whether the count is greater than a first predetermined number; if the count is greater than the first predetermined number, then determine that the target object is in the first state; if the count is less than or equal to the first predetermined number, then increment the count by 1, continue to obtain the current phase current and the count, and determine that the target object is in the first state according to the current phase current and the count.
[0060] In the specific implementation process, the cache counter of the treadmill can be cleared, and the current timestamp can be recorded; the current phase current of the motor of the treadmill can be obtained, and the average phase current of the motor can be calculated; it can be determined whether the current phase current is greater than a first predetermined current, where the first predetermined current is the product of the average phase current and a first predetermined multiple; if the current phase current is greater than the first predetermined current, the cache counter can be cleared, and the current timestamp can be recorded again. At this time, it is necessary to obtain the current phase current and the number of counts again, and determine that the target object is in the first state according to the current phase current and the number of counts; if the current phase current is less than or equal to the first predetermined current, it can be determined whether the number of counts of the cache counter is greater than a first predetermined number; if the number of counts is greater than the first predetermined number, it can be determined that the target object is in the first state; if the number of counts is less than or equal to the first predetermined number, the number of counts is incremented by 1, and the current phase current and the number of counts are continuously obtained, and it is determined that the target object is in the first state according to the current phase current and the number of counts.
[0061] The above-mentioned clearing of the cache counter of the treadmill means that the number of counts of the cache counter is cleared to zero; the above-mentioned current timestamp is used to represent the time of the current moment.
[0062] In the above-mentioned embodiment of the present invention, by comparing the current phase current with the first predetermined current and the number of counts of the cache counter with the first predetermined number, other interference factors are removed, thereby avoiding misjudgment of the target object taking off on the treadmill and improving the accuracy of state discrimination.
[0063] It should be noted that in the embodiment of the present invention, a timestamp is set every predetermined time, where the predetermined time includes but is not limited to 10 microseconds, 25 microseconds, etc.; the above-mentioned first predetermined multiple includes but is not limited to 1.2, 1.3, 1.5, etc.; the above-mentioned first predetermined number includes but is not limited to 5, 10, 15, etc.; in the specific implementation process, the above-mentioned first predetermined multiple and the first predetermined number can be set according to the needs of the application scenario.
[0064] Figure 5 The following is a flowchart for determining entry into a takeoff provided by an embodiment of the present invention, as Figure 5 shown, the system clears the cache counter and records the current timestamp; by continuously taking the average of 5 times, the current phase current is obtained and compared with the average phase current: if the current phase current is greater than 1.2 times the average phase current for 5 consecutive times, it is determined that the takeoff process is entered, otherwise the cache counter is cleared, and this process is continued to be executed in a loop.
[0065] In an alternative embodiment, calculating the current increment required for the motor of the treadmill to maintain a predetermined rotational speed includes: detecting the current phase current of the motor; determining whether the current phase current is greater than the phase current at the previous moment; if the current phase current is greater than the phase current at the previous moment, then using the current phase current as the phase current at the previous moment and continuing to detect the current phase current; if the current phase current is less than or equal to the phase current at the previous moment, then determining whether the counting times of the cache counter is greater than a second predetermined number of times; if the counting times is greater than the second predetermined number of times, determining the current increment according to the phase current at the previous moment and the time corresponding to the phase current at the previous moment; if the counting times is less than or equal to the second predetermined number of times, then incrementing the counting times by 1 and continuing to execute the step of calculating the current increment required for the motor of the treadmill to maintain a predetermined rotational speed.
[0066] In the specific implementation process, it is necessary to clear the cache counter of the treadmill and record the current timestamp; detect the current phase current of the motor of the treadmill; determine whether the current phase current is greater than the phase current at the previous moment; if the current phase current is greater than the phase current at the previous moment, then using the current phase current as the phase current at the previous moment and continuing to detect the current phase current, and then executing the subsequent judgment steps; if the current phase current is less than or equal to the phase current at the previous moment, then determining whether the counting times of the cache counter is greater than a second predetermined number of times; if the counting times is greater than the second predetermined number of times, calculating the current increment; if the counting times is less than or equal to the second predetermined number of times, then incrementing the counting times by 1 and continuing to detect the current phase current.
[0067] In the above embodiment of the present invention, by detecting the current phase current of the motor of the treadmill and determining whether the current phase current is greater than the phase current at the previous moment, if the current phase current is greater than the phase current at the previous moment, then the current phase current can be used as the phase current at the previous moment and the current current value can be continuously detected; if the current phase current is less than or equal to the phase current at the previous moment, it is necessary to further determine whether the counting times of the cache counter is greater than a second predetermined number of times; if the counting times is greater than the second predetermined number of times, the compensation value in the second state of the target object can be calculated. Through this embodiment, the compensation value (current increment) can be accurately calculated after the target object jumps on the treadmill and before landing.
[0068] It should be noted that the above second predetermined number of times includes but is not limited to 5, 10, 15, etc.; in the specific implementation process, the above first predetermined number of times can be set according to the needs of the application scenario.
[0069] Figure 6 The flowchart of a takeoff processing provided by an embodiment of the present invention is as Figure 6As shown, clear the cache counter, record the current timestamp, and then detect the current phase current to determine whether the current phase current reaches the maximum. If the current phase current obtained continuously 5 times is less than the phase current at the previous moment, it means that the phase current has reached its peak. Then record the current phase current and timestamp, and calculate the ΔI for landing compensation; otherwise, repeat and detect the current phase current.
[0070] In an alternative embodiment, determining the current increment based on the phase current at the previous moment and the time corresponding to the phase current at the previous moment includes: obtaining the phase current change amount based on the difference between the phase current at the previous moment and the average phase current, where the average phase current is the average of multiple current phase currents before the target object is in the first state; obtaining the time change amount based on the difference between the time corresponding to the phase current at the previous moment and the time when the target object is in the first state; and calculating the current increment based on the phase current change amount and the time change amount.
[0071] In the specific implementation process, it is necessary to clear the cache counter and record the current timestamp, where the current timestamp is used as the last timestamp; calculate the phase current change amount and the time change amount, where the phase current change amount is the difference between the phase current at the previous moment and the average phase current, and the time change amount is the difference between the first timestamp and the last timestamp. The first timestamp can be the current timestamp recorded after clearing the cache counter of the treadmill and before detecting the current phase current of the motor of the treadmill; obtain the compensation value based on the phase current change amount and the time change amount.
[0072] In the above embodiment of the present invention, the compensation value when the target object is in the second state can be accurately calculated using the phase current change amount and the time change amount.
[0073] In an alternative embodiment, determining that the target object is in the second state includes: obtaining the current phase current of the motor and the counting times of the cache counter; and determining that the target object is in the second state based on the current phase current and the counting times.
[0074] In the above embodiment, using the current phase current and the counting times to determine that the target object is in the second state can eliminate other interference factors, thereby avoiding misjudgment of the target object's landing on the treadmill and improving the accuracy of state discrimination.
[0075] In an alternative embodiment, determining that the target object is in the second state according to the current phase current and the number of counting times includes: determining whether the current phase current is greater than a second predetermined current, where the second predetermined current is the product of the average phase current and a second predetermined multiple, and the average phase current is the average value of multiple current phase currents before the target object is in the first state; in the case where the current phase current is greater than the second predetermined current, re-acquire the current phase current and the number of counting times, and determine that the target object is in the second state according to the current phase current and the number of counting times; in the case where the current phase current is less than or equal to the second predetermined current, determine whether the number of counting times is greater than a third predetermined number; in the case where the number of counting times is greater than the third predetermined number, determine that the target object is in the second state; in the case where the number of counting times is less than or equal to the third predetermined number, increment the number of counting times by 1, continue to acquire the current phase current and the number of counting times, and determine that the target object is in the second state according to the current phase current and the number of counting times.
[0076] In the specific implementation process, it is necessary to clear the cache counter of the treadmill and record the current timestamp; detect the current phase current of the motor; determine whether the current phase current is greater than the second predetermined current. If the current phase current is less than or equal to the second predetermined current, continue to detect the current phase current, where the second predetermined current is the product of the average phase current and the second predetermined multiple; if the current phase current is greater than the second predetermined current, determine whether the number of counting times of the cache counter is greater than the third predetermined number. If the number of counting times is less than or equal to the third predetermined number, increment the number of counting times by 1 and continue to detect the current phase current, and repeat the above judgment steps; if the number of counting times is greater than the third predetermined number, determine that the target object is in the second state.
[0077] In an alternative embodiment, compensating the current phase current of the motor according to the compensation value and controlling the motor to maintain a predetermined speed based on the compensated current phase current includes: turning off the current loop control and speed loop control of the motor; inputting the target voltage to the motor based on space vector pulse width modulation to control the motor to maintain a predetermined speed, where the target voltage is determined according to the compensated current phase current; turning on the current loop control and speed loop control of the motor.
[0078] In the above embodiment of the present invention, the target voltage can be input to the motor based on space vector pulse width modulation to control the motor to maintain a predetermined speed, so that the motor can quickly approach the predetermined speed and target current when the load changes suddenly, reduce the speed fluctuation and adjustment time during the speed adjustment process, and improve the physical feeling.
[0079] In addition, before the above implementation process, it is necessary to turn off the current loop control and speed loop control of the motor, and after the above implementation process, turn on the current loop control and speed loop control of the motor, which can achieve loop fine-tuning and further improve the physical feeling.
[0080] It should be noted that the above-mentioned second predetermined multiple includes but is not limited to 1.2, 1.3, 1.5, etc.; the above-mentioned third predetermined number of times includes but is not limited to 5, 10, 15, etc.; in the specific implementation process, the above-mentioned second predetermined multiple and the third predetermined number of times can be set according to the needs of the application scenario.
[0081] Figure 7 The following is a flowchart of a floor compensation process provided by an embodiment of the present invention. As Figure 7 shown, first, turn off the current loop control and the speed loop control, and enable the feedforward compensation program. At this time, it is necessary to clear the buffer counter and record the current timestamp; detect the current phase current. If the phase current exceeds 1.2 times the average phase current continuously for 5 times, it is determined to enter the floor compensation process. Set the target current I = IAVE + ΔI, and drive the SVPWM, where IAVE is the average phase current and ΔI is the compensation value obtained in the takeoff program; when T = T0 + Δt, the floor treatment ends, and the current loop control and the speed loop control are restarted to perform loop fine-tuning.
[0082] According to another aspect of the embodiment of the present invention, a control device for a treadmill motor is also provided. Figure 8 The following is a schematic diagram of a control device for a treadmill motor provided by an embodiment of the present invention. As Figure 8 shown, the control device for the treadmill motor includes: a first determination module 82, a calculation module 84, a second determination module 86, and a control module 88. The control device for the treadmill motor will be described in detail below.
[0083] The first determination module 82 is used to determine that the target object is in a first state, where the first state is that the target object takes off on the treadmill.
[0084] The calculation module 84 is connected to the above-mentioned first determination module 82 and is used to calculate the current increment required for the motor of the treadmill to maintain a predetermined speed when the target object is in the first state. The current increment is used as the compensation value for the target object in the second state, and the second state is that the target object lands on the treadmill.
[0085] The second determination module 86 is connected to the above-mentioned calculation module 84 and is used to determine that the target object is in the second state.
[0086] The control module 88 is connected to the above-mentioned second determination module 86 and is used to compensate the current phase current of the motor according to the compensation value when the target object is in the second state, and control the motor to maintain a predetermined speed based on the compensated current phase current.
[0087] In an embodiment of the present invention, the control device of the treadmill motor first determines that the target object is in a first state, where the first state is that the target object jumps on the treadmill; if the target object is in the first state, calculate the current increment required for the treadmill motor to maintain a predetermined speed, where the current increment is used as the compensation value for the target object in the second state, and the second state is that the target object lands on the treadmill; then determine that the target object is in the second state; if the target object is in the second state, compensate the current phase current of the motor according to the compensation value, and control the motor to maintain the predetermined speed based on the compensated current phase current. That is to say, the embodiment of the present invention utilizes the current increment required for the treadmill motor to maintain a predetermined speed when the target object jumps on the treadmill, and adds this current increment as a compensation value to the motor at the moment of landing, so that the motor maintains a predetermined speed, thereby solving the technical problem that the control method of the treadmill motor in the related art cannot adapt to the scenario of regular load mutation, resulting in poor control effect and body feeling, and achieving the technical effect of being able to adapt to the scenario of regular load mutation and greatly improving the control effect and body feeling of the treadmill.
[0088] It should be noted here that the above first determination module 82, calculation module 84, second determination module 86 and control module 88 correspond to the steps S202 to S208 in the method embodiment. The examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in the above method embodiment.
[0089] According to another aspect of the embodiment of the present invention, there is also provided an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to execute the control method of the treadmill motor in any one of the above.
[0090] According to another aspect of the embodiment of the present invention, there is also provided a storage medium, where the storage medium includes a stored program, and when the program runs, it controls the device where the storage medium is located to execute the control method of the treadmill motor in any one of the above.
[0091] In the above embodiments of the present invention, the descriptions of each embodiment have their own focuses. For the parts not detailed in a certain embodiment, reference may be made to the related descriptions of other embodiments.
[0092] In addition, in each embodiment of the present invention, the functional units can be integrated into one processing unit, or each unit exists physically alone, or two or more units are integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0093] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs.
[0094] The above is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.
Claims
1. A control method for a treadmill motor, characterized in that, Including: Determine that the target object is in a first state, where the first state is that the target object jumps on the treadmill; When the target object is in the first state, calculate the current increment required for the motor of the treadmill to maintain a predetermined speed, where the current increment is used as a compensation value for the target object in a second state, and the second state is that the target object lands on the treadmill; calculating the current increment required for the motor of the treadmill to maintain a predetermined speed includes: detecting the current phase current of the motor; determining whether the current phase current is greater than the phase current at the previous moment; if the current phase current is greater than the phase current at the previous moment, then use the current phase current as the phase current at the previous moment and continue to detect the current phase current; if the current phase current is less than or equal to the phase current at the previous moment, then determine whether the counting times of the cache counter is greater than a second predetermined number of times; if the counting times is greater than the second predetermined number of times, determine the current increment according to the phase current at the previous moment and the time corresponding to the phase current at the previous moment; if the counting times is less than or equal to the second predetermined number of times, then increment the counting times by 1 and continue to execute the step of calculating the current increment required for the motor of the treadmill to maintain a predetermined speed; Determine that the target object is in the second state; When the target object is in the second state, compensate the current phase current of the motor according to the compensation value and control the motor to maintain the predetermined speed based on the compensated current phase current.
2. The method according to claim 1, wherein Determining that the target object is in the first state includes: Obtain the current phase current of the motor and the counting times of the cache counter; Determine that the target object is in the first state according to the current phase current and the counting times.
3. The method according to claim 2, wherein Determining that the target object is in the first state according to the current phase current and the counting times includes: Determine whether the current phase current is greater than a first predetermined current, where the first predetermined current is the product of the average phase current and a first predetermined multiple, and the average phase current is the average of multiple current phase currents before the target object is in the first state; If the current phase current is greater than the first predetermined current, then re-obtain the current phase current and the counting times, and determine that the target object is in the first state according to the current phase current and the counting times; If the current phase current is less than or equal to the first predetermined current, then determine whether the counting times is greater than a first predetermined number of times; If the counting times is greater than the first predetermined number of times, then determine that the target object is in the first state; If the counting times is less than or equal to the first predetermined number of times, then increment the counting times by 1, continue to obtain the current phase current and the counting times, and determine that the target object is in the first state according to the current phase current and the counting times.
4. The method according to claim 1, wherein Determining the current increment according to the phase current at the previous moment and the time corresponding to the phase current at the previous moment includes: Obtaining a phase current change amount according to the difference between the phase current at the previous moment and the average phase current, where the average phase current is the average of multiple current phase currents before the target object is in the first state; Obtaining a time change amount according to the difference between the time corresponding to the phase current at the previous moment and the time corresponding to the target object being in the first state; Calculating the current increment according to the phase current change amount and the time change amount.
5. The method according to claim 1, wherein Determining that the target object is in the second state includes: Obtaining the current phase current of the motor and the counting times of the buffer counter; Determining that the target object is in the second state according to the current phase current and the counting times.
6. The method according to claim 5, wherein Determining that the target object is in the second state according to the current phase current and the counting times includes: Judging whether the current phase current is greater than a second predetermined current, where the second predetermined current is the product of the average phase current and a second predetermined multiple, and the average phase current is the average of multiple current phase currents before the target object is in the first state; When the current phase current is greater than the second predetermined current, re-obtain the current phase current and the counting times, and determine that the target object is in the second state according to the current phase current and the counting times; When the current phase current is less than or equal to the second predetermined current, judge whether the counting times is greater than a third predetermined number of times; When the counting times is greater than the third predetermined number of times, determine that the target object is in the second state; When the counting times is less than or equal to the third predetermined number of times, increment the counting times by 1, continue to obtain the current phase current and the counting times, and determine that the target object is in the second state according to the current phase current and the counting times.
7. The method according to any one of claims 1 to 6, characterized in that, Compensating the current phase current of the motor according to the compensation value, and controlling the motor to maintain the predetermined speed based on the compensated current phase current includes: Closing the current loop control and speed loop control of the motor; Inputting a target voltage to the motor based on space vector pulse width modulation to control the motor to maintain the predetermined speed, where the target voltage is determined according to the compensated current phase current; Turning on the current loop control and speed loop control of the motor.
8. A control device for a treadmill motor, characterized in that, Including: A first determination module for determining that the target object is in a first state, where the first state is that the target object jumps on the treadmill; A calculation module, configured to calculate a current increment required for the motor of the treadmill to maintain a predetermined rotational speed when the target object is in the first state, wherein the current increment is used as a compensation value for the target object in the second state, and the second state is that the target object lands on the treadmill; calculating the current increment required for the motor of the treadmill to maintain a predetermined rotational speed includes: detecting a current phase current of the motor; determining whether the current phase current is greater than the phase current at the previous moment; if the current phase current is greater than the phase current at the previous moment, then using the current phase current as the phase current at the previous moment and continuing to detect the current phase current; if the current phase current is less than or equal to the phase current at the previous moment, then determining whether the counting times of a cache counter is greater than a second predetermined number of times; if the counting times is greater than the second predetermined number of times, determining the current increment according to the phase current at the previous moment and the time corresponding to the phase current at the previous moment; if the counting times is less than or equal to the second predetermined number of times, then incrementing the counting times by 1 and continuing to execute the step of calculating the current increment required for the motor of the treadmill to maintain a predetermined rotational speed; A second determination module, configured to determine that the target object is in the second state; A control module, configured to, when the target object is in the second state, compensate the current phase current of the motor according to the compensation value, and control the motor to maintain the predetermined rotational speed based on the compensated current phase current.
9. An electronic device, characterized in that, Comprising: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the control method for the treadmill motor according to any one of claims 1 to 7.
Citation Information
Patent Citations
Driving motor torque ripple active compensation method
CN108540021A
KR1019819690000B1