Motor calibration methods and apparatus, non-volatile storage media
By collecting the rate and amount of change of motor load values at different set speeds, motor calibration is achieved, solving the problem of inaccurate motor initialization control, improving control accuracy and reliability, and reducing costs.
Patent Information
- Application Number
- CN202410665341.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-05-27
AI Technical Summary
In the existing technology, the motor initialization control is inaccurate, which causes the equipment to fail to recognize that the moving parts have reached the limit position, thus affecting the control process.
By collecting the effective load value through multiple collisions at different set speeds, and using the determination of the internal load value change rate and change amount, abnormal vibrations are eliminated, and motor calibration is achieved.
It improves the reliability and control accuracy of motor calibration, eliminates abnormal vibration, reduces costs, and does not rely on external sensors and encoders.
Smart Images

Figure CN118473282B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automation control technology, and in particular to a motor calibration method, a motor calibration device, and a non-volatile storage medium. Background Technology
[0002] To meet the ever-increasing demands of modern healthcare, medical device testing equipment is becoming increasingly automated, with devices evolving towards smaller and more intelligent designs. In medical devices, motors are a common power component, used to achieve linear motion, rotation, and other actions. For stepper motors, initialization is achieved through various external sensors such as proximity switches, photoelectric sensors, or encoders and their combinations, ensuring precise positioning. However, external sensors generally occupy space and increase costs, which is inconsistent with current market trends.
[0003] In existing technologies, to achieve accurate equipment control, initialization is generally required before operation to reset moving parts to their origin positions. Whether the moving parts are in linear or rotary motion, an initial origin is set. Before operation, the motor typically drives the moving parts to move between extreme positions at an initialization speed to find the origin. By reading the power value change when the motor stalls, the changed power value is compared with a set threshold, and a position encoder is used to determine if the motor has reached its physical limit position. If a large change in power value is detected when the motor stalls, it indicates that the moving parts have stopped at the origin or other physical limit positions. However, when the motor receives the initialization command, if it is close to the limit position, the moving parts may encounter the limit position before reaching the initialization speed. This results in a large difference between the collected changed power value and the set threshold, which may prevent the equipment from recognizing that the moving parts have reached their limit position, affecting the control process. Summary of the Invention
[0004] To address the problem of inaccurate motor initialization control in existing technologies, the present invention aims to provide a motor calibration method and a motor calibration device. By using multiple speed collisions to collect the effective load value, the accuracy of the threshold is improved. The speed coverage is wide, which significantly improves reliability. At the same time, it eliminates abnormal phenomena such as abnormal jitter, further ensuring control accuracy.
[0005] In a first aspect, the present invention provides a motor calibration method applied to a motor drive system, the motor drive system including a motor and a load, the motor being capable of driving the load to a limit position, the limit position being provided with a limit component, the method comprising:
[0006] Obtain the effective load value of the motor driving the load collision at different set speeds;
[0007] The collision calibration process of the motor at different set speeds is executed sequentially.
[0008] During each collision calibration process, the rate of change of the load value of the motor is obtained based on the collision calibration process at the current set speed before and after the load collision, and a first determination is performed.
[0009] If the first determination result is yes, then based on the collision calibration process at the current set speed, the amount of change in the load value of the motor from the normal load value before the load collision to the effective load value during the load collision process is obtained;
[0010] If a collision calibration process at another set speed has been performed before the collision calibration, the second determination is performed; otherwise, the collision calibration process at the next set speed is performed.
[0011] If the second determination result at the current set speed is yes, then execute the collision calibration process at the next set speed.
[0012] When the collision calibration process at all set speeds is completed, control the motor to drive the load back to the origin position;
[0013] The collision calibration process includes: controlling the motor to drive the load to the limit position at a currently set speed and causing it to collide with the limit component;
[0014] The first determination is to determine whether the rate of change does not exceed a first preset value; the second determination is to determine whether the change at the current set speed is stable relative to the change at the previous set speed.
[0015] According to the method provided by the first aspect of the present invention, it has at least the following beneficial effects: The present invention utilizes a calibration method that performs collisions multiple times at different speeds. At each speed, it determines whether the rate of change of the motor load value before and after the collision to the effective load value is normal. If it is normal, it indicates that the load has collided at the limit position, and then the next determination is performed. The change in the motor load value from the normal load value to the effective load value at the corresponding speed during the load collision process is compared with the change at the previous speed. If it is stable, the phenomenon of abnormal motor vibration can be ruled out. Thus, the present invention determines whether the motor has collided by an internal judgment method at the corresponding speed, and performs calibration by collisions at different speeds. This can eliminate the collision calibration error generated by the motor during single-speed calibration and eliminate the phenomenon of unexpected vibration during calibration. The comparison of the change in the motor during the collision processes of two adjacent different speeds further ensures the control accuracy. At the same time, this calibration method does not require any external sensors or encoders. It only needs to track the change in the internal load value of the motor, which is more cost-effective.
[0016] In a first aspect, in a preferred embodiment of the present invention, obtaining the effective load value of the load collision driven by the motor at a set speed includes: executing a first process multiple times, the first process including controlling the motor to drive the load to the limit position at the set speed and causing it to collide with the limit component; recording the sudden load value of the motor after the collision with the load in each execution of the first process; forming a set of all the sudden load values and determining whether the set is valid; if the set is valid, calculating the effective load value based on all the sudden load values.
[0017] In a first aspect, in a preferred embodiment of the present invention, obtaining the effective load value of the load collision driven by the motor at a set speed further includes:
[0018] If the set is invalid, the first process is executed multiple times and all mutation load values in the first process are obtained until the set of all mutation load values is valid.
[0019] In a first aspect, in a preferred embodiment of the present invention, determining whether the set is valid includes:
[0020] Calculate the difference between the maximum and minimum values of the set, and determine whether the difference does not exceed a third preset value;
[0021] If so, then the set is valid;
[0022] If not, then the set is invalid.
[0023] In a first aspect, in a preferred embodiment of the present invention, the method further includes:
[0024] If the first determination or the second determination result is negative, the collision calibration process of the motor at the current set speed is repeated and the first determination and the second determination are executed until the next collision calibration process at the set speed can be performed or the calibration is completed.
[0025] In a first aspect, in a preferred embodiment of the present invention, the method further includes:
[0026] If the number of times the collision calibration process is executed by the motor at the current set speed exceeds the fourth preset value, the calibration will be stopped and an error will be reported.
[0027] In a first aspect, in a preferred embodiment of the present invention, determining whether the change at the current set speed is stable relative to the change at the previous set speed is to determine whether the change at the current set speed is less than a second preset value relative to the change at the previous set speed.
[0028] In a first aspect, in a preferred embodiment of the present invention, controlling the motor to drive the load to the limit position at a currently set speed and causing it to collide with the limit component includes:
[0029] During each collision calibration process, the motor drives the load to move at a currently set speed in a first direction at the limit position, and then arrives at the limit position and collides with the limit component.
[0030] In a first aspect, in a preferred embodiment of the present invention, the motor is further capable of driving the load to a starting position located in the first direction of the limiting position, and the method further includes:
[0031] If a collision calibration process at another set speed has been performed before this collision calibration process, then the motor is controlled to drive the load back to the starting position and then the collision calibration process at the current speed is started. Otherwise, the motor is controlled to perform the collision calibration process at the current speed with the current position of the load as the starting point.
[0032] In a first aspect, in a preferred embodiment of the present invention, the rate of change is calculated in the following manner:
[0033] The initial and final values of the motor's load value within the first time period are obtained, and the rate of change is the change in load value per unit time calculated based on the initial and final values.
[0034] In a first aspect, in a preferred embodiment of the present invention, the sequential execution of the collision calibration process of the motor at the different set speeds includes:
[0035] The collision calibration process of the motor is performed in the order of the set speed, corresponding to the set speed.
[0036] In a second aspect, the present invention provides a motor calibration device, including a motor drive system, the motor drive system including a motor and a load, the motor being capable of driving the load to a limit position, the limit position being provided with a limit component, the device further including:
[0037] An execution unit is used to control the motor to drive the load;
[0038] The monitoring unit is used to monitor the load value and changes on the motor;
[0039] The storage unit is used to store the effective load values of the motor at different set speeds;
[0040] Timing unit;
[0041] The calculation unit calculates the rate of change of the motor's load value within a first time period before and after the load collision, based on the timing unit and the monitoring unit, and calculates the amount of change of the motor's load value from the normal load value before the load collision to the effective load value during the load collision process;
[0042] The first determination unit determines whether the rate of change is greater than a first preset value based on the rate of change obtained by the acquisition unit during the collision calibration process performed by the execution unit.
[0043] The second determination unit, during the collision calibration process performed by the execution unit, determines whether the change in the change at the two set speeds before and after the acquisition unit is greater than a second preset value based on the change obtained by the acquisition unit.
[0044] The processing unit controls the execution unit to sequentially execute the collision calibration process at different set speeds, and determines whether the calibration is complete based on the determination results of the first determination unit and the second determination unit.
[0045] The collision calibration process involves controlling the motor to drive the load to the limit position at a set speed so that it collides with the limit component.
[0046] The motor calibration device provided according to the second aspect of the present invention has at least the following beneficial effects: the first determination unit determines whether the load value change in each calibration process is normal, and the second determination unit determines whether the load value change in the current calibration process is normal compared with the previous calibration process. Through the above two internal and adjacent calibration determinations, abnormal phenomena such as abnormal jitter can be effectively eliminated. The speed coverage is wide, which is more in line with the actual problem to be solved, improves reliability, and ensures control accuracy. No external sensors or encoders are required, resulting in lower cost.
[0047] Thirdly, the present invention also provides a non-volatile storage medium storing a program, wherein a device controls the non-volatile storage medium to execute the stepper motor calibration method provided in the first aspect embodiment of the present invention when the program is executed.
[0048] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures and / or processes particularly pointed out in the description, claims, and drawings. Attached Figure Description
[0049] Figure 1 This is a schematic diagram of the structure of a motor drive system provided in an embodiment of the present invention;
[0050] Figure 2 A flowchart illustrating a method for obtaining the effective load value of a motor driving a load collision at a set speed, as provided in an embodiment of the present invention.
[0051] Figure 3 for Figure 2 Supplementary flowchart of the acquisition method provided in the embodiment shown;
[0052] Figure 4 A flowchart illustrating a method for obtaining the effective load value of a motor driving a load collision at a set speed, as provided in an embodiment of the present invention.
[0053] Figure 5 A flowchart of a motor calibration method provided in an embodiment of the present invention;
[0054] Figure 6 for Figure 5 Supplementary flowchart of the acquisition method provided in the embodiment shown;
[0055] Figure 7 A flowchart illustrating a motor calibration method provided in an embodiment of the present invention;
[0056] Figure 8This is a schematic diagram of the structure of a motor calibration device provided in an embodiment of the present invention;
[0057] Figure 9 This is a schematic diagram of the structure of the computer device provided in an embodiment of the present invention.
[0058] Explanation of icon numbers:
[0059] 110 Motor, 120 Load, 130 Transmission Path, 131 First Position, 132 Second Position. Detailed Implementation
[0060] The following detailed description of the embodiments of the present invention, in conjunction with the accompanying drawings, will provide a thorough understanding of how the present invention uses technical means to solve technical problems and achieve technical effects, enabling its implementation. It should be noted that these specific descriptions are merely intended to facilitate a clearer understanding of the present invention by those skilled in the art, and are not intended to limit the scope of the invention. For example, the terms "first" and "second" mentioned in the embodiments of the present invention are not intended to limit the invention, but are merely used to indicate the sequence numbers of multiple identical or similar devices or mechanisms. Those skilled in the art can readjust these sequence numbers for ease of description or during the organization of technical solutions. Furthermore, alternative solutions are described for some mechanisms in different embodiments, and these alternatives can be applied to other identical or similar devices or mechanisms. As long as there is no conflict, the various embodiments and features in each embodiment of the present invention can be combined with each other, and the resulting technical solutions are all within the protection scope of the present invention. Additionally, the terms "multiple" and "several" mentioned in the present invention refer to two or more.
[0061] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0062] First, the motor drive system used in this invention will be described.
[0063] The motor drive system in this embodiment includes a motor and a load driven by the motor. The load can be a robotic arm or an execution component that performs actions such as suction or grasping. During the driving process, the motor can drive the load to perform linear motion on a predetermined guide rail, rotational motion on a predetermined trajectory, or flipping motion, etc., which are not limited here.
[0064] See Figure 1The motor 110 is connected to the load 120 via a transmission component. During the driving process, the load 120 reciprocates along the transmission path 130. The load value inside the motor 110 changes with the progress of the motion. For example, during acceleration to a set speed, the load value of the motor 110 increases, providing acceleration for the load 120. Once the load 120 reaches the set speed and moves at a constant speed, the load value of the motor 110 stabilizes at a certain value. However, if an obstacle is encountered or a limit position is reached, the load value inside the motor 110 will experience a significant fluctuation due to the collision, resulting in corresponding peak fluctuations in the load value. It should be noted that the load value inside the motor can be obtained through methods such as DC resistance method, AC resistance method, back electromotive force method, and no-load current method. Among them, the DC resistance method is a sensing method that uses the magnitude of the current passing through the rotor circuit when the motor is under load to reflect the load condition of the motor. During the inspection, the DC power supply load is connected to the AC terminal of the motor stator braking resistor, and the positive terminal is connected to the motor winding terminal. The DC power supply is turned on and the current output is observed. The AC resistance method is a motor inspection method that calculates the load condition from the actual output power by measuring the motor resistance, back electromotive force voltage and current. Other methods will not be elaborated here. Of course, other load value measurement methods that are not mentioned but have been applied can also be used without much limitation.
[0065] Furthermore, the transmission path 130 has a first position and a second position. The first position has a first limiting block 131, which restricts the load 120 from continuing to move along a first direction X. The second position has a second limiting block 132, which restricts the load 120 from continuing to move along a second direction, where the second direction is the opposite of the first direction X. In this embodiment, the transmission path 130 is a straight path, and the load 120 is limited to moving between the first and second positions. The transmission component includes a belt to receive the driving force from the motor 110 and drive the load 120 to rotate. Of course, the transmission component can also be a ball screw, coupling, or other components, and the transmission path 130 can also be a curved path or a rotating path.
[0066] Therefore, motor 110 calibration can be performed based on the aforementioned motor drive system. During motor 110 calibration, it is necessary to obtain the effective load value of the motor 110 driving the load 120 to collide at different set speeds. The process of obtaining the effective load value will be described below.
[0067] Further reading Figure 1When the motor 110 drives the load 120 to perform the collision process, it can drive the load 120 to collide with the second position in the first direction of the second position. At this time, the second position is the limit position where the collision occurs. Alternatively, the motor 110 can drive the load 120 to collide with the first position in the second direction of the first position. At this time, the first position is the limit position where the collision occurs. Regardless of whether the collision occurs at the first position or the second position, the position where the collision occurs in this process is called the limit position. The component that prevents the load 120 from continuing to move at the limit position (the first limit block 131 or the second limit block 132) is called the limit component.
[0068] Therefore, see Figure 2 The method for obtaining the effective load value of the motor driving the load collision at a set speed is as follows:
[0069] 101. The first process is executed multiple times. The first process includes controlling the motor to drive the load to the limit position at a set speed and causing it to collide with the limit component.
[0070] 102. Record the sudden load value of the motor after a load collision during each execution of the first process;
[0071] 103. All mutation load values are grouped into a set, and the validity of the set is determined.
[0072] 104. If the set is valid, calculate the effective load value based on all mutation load values.
[0073] This method utilizes a first process executed multiple times at a set speed—a collision process—to eliminate test errors while controlling the set speed variable. It records abrupt load values and determines their validity, then calculates the effective load value based on the set of load values. This provides a valid reference value for subsequent motor initialization calibration at the corresponding speed. It should be noted that the effective load value obtained in this process is the effective load value at the set speed. When obtaining effective load values at different speeds, the first process must be executed at the specified set speed.
[0074] In one embodiment, the process of obtaining the effective load value is described using a set speed Vx1 as an example.
[0075] Combination Figure 1Under power-off conditions, the load 120 is first moved to the right limit position, i.e., the first position. This power-off condition prevents the motor 110 from fixing the load 120 to facilitate direct movement of the load 120 under power-on conditions. At this time, the load 120 detection process is not executed, avoiding any impact on the load value detection curve. After power is applied, the initial speed of the motor 110 is set to Vx1, and the initial acceleration is set to Ax1. When the motor 110 starts working, the load 120 will accelerate to speed Vx1 with acceleration Ax1, and then move at a constant speed of Vx1 from the first position along the second direction to the second limit block 132 at the second position. When the load 120 reaches the second position, it will collide with the second limit block 132 at the set speed Vx1, thus completing the first process of obtaining the effective load value at the set speed Vx1.
[0076] During the execution of the first process described above, the control device on the equipment acquires the load value curve of the motor. This acquisition can be achieved by reading the load value from the driver chip on the motherboard. The driver chip controls the motor rotation and monitors current changes based on the control process, thereby obtaining the load value. In the load value change curve, when the motor collides with the second limit block, the load value curve will experience a sudden change. The sudden load value during this collision is recorded. The sudden load value can be selected as the highest peak value at the time of the collision, or it can be selected as the average sudden value excluding abnormal values within a short time frame during the collision process, such as 0.1ms. No specific limitation is imposed here.
[0077] Furthermore, the above process is repeated multiple times, so that the control device obtains a set of sudden load values Ma1, Ma2, Ma3...Man at a set speed Vx1. In this embodiment, the number of executions can be selected as 10 times, and the resulting set at the set speed Vx1 is Ma1, Ma2, Ma3...Ma10.
[0078] During repeated execution, if the load collides with the limit position at the second position, the limit position can be changed to the first position. That is, when the first process is executed again, the load can move from the current position towards the first position along the first direction and collide with the first limit block, recording the sudden load value. Of course, to strictly control variables, the load can be reset to the first position before continuing to execute the first process along the second direction. This can be reasonably set according to the actual situation. Therefore, regardless of how the direction and position are selected during each execution of the first process, it is within the scope of the present invention.
[0079] Regarding 103, when determining whether the set of mutation load values is valid, the following methods can be used for determination:
[0080] Calculate the difference between the maximum and minimum values of the set, and determine whether the difference does not exceed a third preset value;
[0081] If yes, the set is valid; otherwise, the set is invalid.
[0082] Taking the execution of the first process 10 times as an example, the maximum value Max1 and minimum value Min1 of the set of data Ma1, Ma2, Ma3...Ma10 are taken. It is then determined whether Max1-Min1>Mk, i.e., the difference between the maximum and minimum values, is greater than a third preset value Mk. If it is true, the data set is invalid, indicating that the data difference is too large and affects its validity. If Max1-Min1>Mk is not true, the range of the data set is within the allowable range, and step 400 can be further performed. Furthermore, the mutation load value can also be determined using variance, standard deviation, or other statistical or data processing methods to determine the validity of the set, which is also within the scope of this application.
[0083] For the validity of the above set of mutation load values, please refer to [link / reference]. Figure 3 Other methods of obtaining this information include:
[0084] 105. If the set is invalid, repeat the first process multiple times and obtain all mutation load values in the first process until the set of all mutation load values is valid.
[0085] That is, when the data set is determined to be invalid, all data in the previous set is discarded, the first process is re-executed for the corresponding number of times, and the set composed of the mutation load values in the first process is recorded. The validity of the set is then judged until the set meets the calculation conditions of the effective load value.
[0086] Regarding 104, the calculation method for the effective payload value based on all mutation payload values is as follows. Taking the dataset Ma1, Ma2, Ma3...Man as an example, the effective value Mx1 can be obtained by the formula (Ma1 + ... + Man - Max1 - Min1) / (n - 2). Therefore, in the 10 executions of the first process, the formula becomes (Ma1 + ... + Ma10 - Max1 - Min1) / 8. Of course, the effective value can also be the mean, mode, median, etc., and no further limitations are imposed here.
[0087] Therefore, when the set speed is different from Vx1 (Vx2, Vx3...Vxn), it is only necessary to change the initial set speed of the motor to the corresponding speed, and obtain the effective load value at the corresponding set speed according to the above-described method for obtaining the effective load value. For example, the changed motor speed Vx2 and acceleration Ax2 can be Vx1 / 2 and Ax1 / 2, respectively. By repeating steps 101-104, the effective load value of the motor at the set speed Vx2 can be obtained. Similarly, the next set speed can be set to Vx3 as Vx1 / 4 and acceleration Ax3 as Vx1 / 4, and steps 101-104 can be repeated to obtain the effective load value at the set speed Vx3. By taking three set speed values in a sequentially decreasing order, the load speed range from high to low speed can be covered in the subsequent motor calibration process. The more times the first process is executed at the corresponding set speed, the higher the accuracy of the effective load value obtained based on this data set.
[0088] It should be noted that in the motor calibration method in the subsequent embodiments, the selected effective load value can be obtained based on the above acquisition process and stored in the memory of the control device in advance, or the effective load value confirmed at the corresponding speed can be stored in the memory based on actual calibration experience and other methods. The present invention does not limit the acquisition method and acquisition process of the effective load value to the above effective load value acquisition method.
[0089] Based on the above method for obtaining the payload value, please refer to... Figure 4 The control device may include the following steps during execution:
[0090] S101, execute the first process, then proceed to S102;
[0091] S102, record the mutation load value in the first process, and proceed to S103;
[0092] S103: Increment the execution count by one, and check if the count is less than or equal to n. If yes, return to S103; otherwise, proceed to S104.
[0093] S104, obtain the set of mutation load values, proceed to S105;
[0094] S105, determine if the set is valid. If valid, proceed to S106; otherwise, proceed to S107.
[0095] S106, Calculate the effective load value;
[0096] S107, the number of attempts is reset to 0, return to S102.
[0097] In another aspect of the present invention, the provided motor calibration method will be described.
[0098] See Figure 5 Based on the motor drive system in the foregoing embodiments, this motor calibration method includes:
[0099] 100, obtain the effective load value of the motor driving the load collision at different set speeds;
[0100] 200, sequentially execute the collision calibration process of the motor at different set speeds;
[0101] 300. In each collision calibration process, the rate of change of the motor load value in the first time before and after the load collision is obtained based on the collision calibration process at the current set speed, and the first determination is performed.
[0102] 400. If the first determination result is yes, then based on the collision calibration process at the current set speed, the change in the load value of the motor from the normal load value before the load collision to the effective load value during the load collision process is obtained.
[0103] 500. If a collision calibration process at another set speed has been performed before the collision calibration, the second determination is performed; otherwise, the collision calibration process at the next set speed is performed.
[0104] 600, if the second determination result at the current speed is yes, execute the collision calibration process at the next set speed;
[0105] 700, when the collision calibration process at all set speeds is completed, control the motor to drive the load back to the origin position.
[0106] In step 100, the effective load value can be preset in the memory of the control device. The method for obtaining the effective load value has been described in the previous embodiments. The collision calibration process in step 200 includes controlling the motor to drive the load to a limit position at a currently set speed and causing a collision with the limit component. During the collision calibration process, the motor can drive the load to collide with the second position in a first direction from the second position, where the second position is the limit position where the collision occurs. Alternatively, the motor can drive the load to collide with the first position in a second direction from the first position, where the first position is the limit position where the collision occurs. In this embodiment, the above-mentioned collision calibration process can be achieved regardless of whether the collision occurs at the first or second position.
[0107] During the collision calibration process, the change in the normal load value of the motor before the collision in steps 300 and 400 can be collected internally by the control device, such as by reading the load value of the driver chip from the motherboard. The driver chip is used to control the rotation of the motor and monitor the current change based on the control process, thereby obtaining the load value curve. The time before and after the collision is determined from the load value curve, and the rate of change in the first time period is calculated, as well as the change in the load value from the normal load value before the collision to the effective load value.
[0108] The first determination involves checking whether the rate of change does not exceed a first preset value. If it does, the rate of change of the load value during the collision calibration process is abnormal; otherwise, the load value change is normal, and the next determination can proceed. The second determination involves checking whether the change at the current speed is stable relative to the change at the previous set speed. If the change is stable compared to the previous set speed, the motor calibration is normal, and calibration can continue at the next set speed until the collision calibration process for all set speeds is completed.
[0109] For example, in this embodiment, three set speeds Vx1, Vx2, and Vx3 are selected, and the motor calibration method includes the following steps:
[0110] During the first collision calibration, the load driven by the motor accelerates from its current position to Vx1 with an acceleration of Ax1, then moves along the second direction and collides with the limiting component at the limiting position (such as the second or first position). The speed at the time of collision is Vx1. During this process, the rate of change K1 of the motor's load value from the normal value M1 before the collision to the stored effective value Mx1 is recorded. If K1 is within the first preset value B1, it indicates that the recorded load value is normal. The amount La1 of the change in the motor's load value from the normal load value before the collision to the effective load value is also recorded, allowing the process to proceed to the next set speed. In this process, there may be instances where the load speed at the time of collision does not reach the set speed Vx1. Therefore, a rate of change is set to determine whether the load's collision process is normal.
[0111] In this embodiment, the recorded change in the motor's load value from the pre-collision normal load value to the effective load value refers to the number of motor steps taken when the load value changes from the normal load value to the effective load value. This number of motor steps is then used as a comparison value in subsequent collision calibration processes to achieve calibration with the next collision calibration process. Furthermore, the recorded change can also be calibration parameters that can be used in the collision calibration process, such as the rotation amount obtained directly or indirectly from detecting the motor; all of these are within the scope of this invention.
[0112] During the second collision calibration, the load, driven by the motor, accelerates from its current position (i.e., the position after the collision in the first collision calibration) to Vx1 with an acceleration of Ax1, then moves along the first direction and stops at the corresponding position. This corresponding position can be determined by calculating the number of motor steps. Combining the previous collision process with the number of steps the motor has driven the load in the transmission path, when the motor moves L1 steps, it indicates that the corresponding position has been reached. The number of motor steps L1 can be a preset number in memory, used to control the motor, which is located at the limit position after the collision, to reset to the corresponding position, such as moving from the second position to the first position. Subsequently, the motor continues to drive the load, which accelerates to Vx2 with an acceleration of Ax2, then moves along the second direction, so that the load's velocity when colliding with the limit component is Vx2. During this process, the control device records the rate of change K2 of the motor load value from the normal value M2 before the collision to the stored effective value Mx2. If the rate of change K2 is within the normal threshold B2, it indicates that the recorded load value is normal. The device also records the amount La2 of the change of the motor load value from the normal load value before the collision to the effective load value, and determines whether the amount La2 is stable compared to the amount La1. If it is stable, it indicates that the collision calibration process is normal and the process can proceed to the next set speed.
[0113] During the third collision calibration, the load, driven by the motor, accelerates from its current position (i.e., the position after the collision in the second collision calibration) to Vx1 with an acceleration of Ax1, then moves along the first direction and stops at the corresponding position. This corresponding position can be determined by calculating the number of motor steps. Combining this with the previous collision process, when the motor moves L1 steps, it indicates that the corresponding position has been reached. Subsequently, the motor continues to drive the load, which accelerates to Vx3 with an acceleration of Ax3, then moves along the second direction, ensuring that the load collides with the limiting component at a speed of Vx3. During this process, the control device records the rate of change K3 of the motor load value from the normal value M3 before the collision to the stored effective value Mx3. If the rate of change K3 is within the normal threshold B3, it indicates that the recorded load value is normal. The control device also records the amount of change La3 of the motor load value from the normal load value before the collision to the effective load value. It then determines whether the amount of change La3 is stable compared to the amount of change La2. If it is stable, it indicates that the collision calibration process is normal. At this point, the collision calibration process at all set speeds has been completed, and the process can proceed to step 500 and reset the motor to the origin position.
[0114] It should be noted that during different collision calibration processes, the first preset value can be set to the threshold corresponding to different set speeds, such as B1, B2, B3, or it can always be a constant threshold, which is not limited here.
[0115] In one embodiment of the present invention, the rate of change of the motor load value obtained during the first time before and after a load collision, based on the collision calibration process at the current set speed, can be calculated in the following way:
[0116] The initial and final values of the motor load value are obtained within the first time period, and the rate of change is the change in load value per unit time calculated based on the initial and final values.
[0117] That is, based on the load value curve recorded by the control device for the motor, a set time period t1 is selected within the horizontal axis range before and after the collision, i.e., the first time period t1, for example, 5 seconds. Then, the initial value M01 and the final value M02 of the data collected within this first time period are obtained. Based on the initial value and the final value, K=(M01-M02) / t1 is calculated to obtain the rate of change K. Of course, depending on the different starting times of the first time period, there can be multiple K1 values. Alternatively, the final rate of change K can be obtained by using the average, mode, or other data statistical methods to perform the first determination, within the scope of the present invention.
[0118] In one embodiment of the present invention, determining whether the change in speed at the current setting speed is stable relative to the change at the previous setting speed involves determining whether the change in speed at the current setting speed is less than a second preset value. For example, during the second collision calibration process, if the change at the current setting speed is La2 and the change at the previous setting speed is La1, then the absolute value of the difference between La2 and La1, L = |La1 - La2|, is calculated. If it is less than the second preset value Lk, then the change at the current setting speed is stable relative to the change at the previous setting speed; otherwise, it is unstable. Furthermore, determining stability can also be achieved through other methods that demonstrate stability, such as checking whether the ratio exceeds a threshold, which is also within the scope of the present invention and will not be listed here.
[0119] See also Figure 6 In another embodiment, the motor calibration method of the present invention further includes:
[0120] 800. If the result of the first or second determination is negative, the collision calibration process of the motor at the current set speed is repeated and the first and second determinations are executed until the collision calibration at the next set speed can be performed or the calibration is completed.
[0121] If either the first or second determination is negative, it does not meet the passing standard of this collision calibration process. In this case, the collision calibration process needs to be repeated until both the first and second determinations of this collision calibration process are passed.
[0122] Furthermore, the method also includes: if the number of times the collision calibration process is executed at the current set speed of the motor is greater than the fourth preset value, then the calibration is stopped and an error is reported.
[0123] In this step, if the collision calibration process at the currently set speed is repeated multiple times based on the aforementioned step 800, and the number of repetitions exceeds the fourth preset value m, it indicates that there may be a problem with the motor drive at that set speed, requiring a shutdown for inspection and repair. For example, if the fourth preset value m is 3, and the collision calibration process at the set speed Vx2 is executed 3 times during the second collision calibration process but still fails, then it indicates an abnormality in the motor calibration process.
[0124] Furthermore, in some embodiments of the present invention, controlling the motor to drive the load to the limit position at a currently set speed and causing it to collide with the limit component includes:
[0125] During each collision calibration process, the motor drives the load to move at the currently set speed in the first direction of the limit position, and then arrives at the limit position and collides with the limit component.
[0126] Combination Figure 1 When the limit position is the second position, the motor 110 drives the load 120 to move at a set speed in the first direction X of the second position until it reaches the second position and collides with the second limit component 132. This limits the direction and collision point in each collision calibration process, allowing for control of variables and making the collision calibration process more accurate.
[0127] Additionally, the motor can also drive the load value to the starting position in the first direction of the limit position, such as... Figure 1 The first position in the equation, then the motor collision calibration method also includes:
[0128] If a collision calibration process at another set speed has been performed before this collision calibration process is executed, the motor will be controlled to drive the load back to the starting position and then the collision calibration process at the current speed will begin. Otherwise, the motor will be controlled to execute the collision calibration process at the current speed, starting from the current position of the load.
[0129] In the first collision calibration process, the motor drives the load to move to the second position based on the current position of the load. In subsequent collision calibration processes, the load moves a preset distance (which can be calculated by the number of steps) to the corresponding position, such as the first position, based on the position after the collision, and then drives the load to move to the second position from the first position.
[0130] Furthermore, during each collision calibration process, the collision calibration process of the motor at different set speeds is executed sequentially, including executing the collision calibration process of the motor at the corresponding set speeds in order of magnitude. For example, the first set speed is Vx1, while the second and third set speeds are Vx1 / 2 and Vx1 / 4, respectively. This setting ensures the stability and accuracy of the second determination, while also covering a wider range of speed calibration processes and improving calibration accuracy.
[0131] Based on the motor calibration method provided in the embodiments of the present invention, in one embodiment, see [reference needed]. Figure 7 The control device may include the following steps during execution:
[0132] S1, n=1, i=0, enter S1;
[0133] S2, control the collision calibration process of the motor to execute speed Vn, then proceed to S3;
[0134] S3, record the rate of change Kn and the amount of change Ln, then proceed to S4;
[0135] S4. Determine whether Kn is less than or equal to the first preset value Bn. If yes, proceed to S5; otherwise, proceed to S6.
[0136] S5, determine if n is greater than 1. If yes, proceed to S6; otherwise, proceed to S8.
[0137] S6, Determine |L n - L n-1 If the value is less than the fourth preset value L, proceed to S8; otherwise, proceed to S7.
[0138] S7, i = i + 1, and determine whether i is less than or equal to m. If yes, return to S2; otherwise, proceed to S10.
[0139] S8, n=n+1, i=0, determine whether n is greater than the fifth preset value k. If yes, proceed to S9; otherwise, return to S2.
[0140] S9, the motor drives the load to reset to the initial position, then proceeds to S11;
[0141] S10 error message, proceed to S11;
[0142] S11, End.
[0143] Where n represents the collision calibration execution process at different set speeds, and i represents the number of collision calibration processes performed at the current set speed.
[0144] In another aspect of the present invention, see [reference needed]. Figure 8A motor calibration device 20 is provided, including the aforementioned motor drive system, specifically including:
[0145] Execution unit 21 is used to control the motor to drive the load;
[0146] The monitoring unit 22 is used to monitor the load value and changes on the motor to cooperate with the first and second determination processes;
[0147] Storage unit 23 is used to store the effective load value of the motor at different set speeds;
[0148] Timing unit 24;
[0149] The calculation unit 25 calculates the rate of change of the motor's load value in the first time before and after the load collision, and the amount of change of the motor's normal load value before the collision to the effective load value during the load collision process, based on the timing unit and the monitoring unit.
[0150] The first determination unit 26, during the collision calibration process performed by the execution unit, determines whether the rate of change is greater than a first preset value based on the rate of change obtained by the acquisition unit;
[0151] The second determination unit 27, during the collision calibration process performed by the execution unit, determines whether the change in the change at the two set speeds before and after the acquisition unit is greater than the second preset value based on the change obtained by the acquisition unit.
[0152] The processing unit 28 controls the execution unit to sequentially execute the collision calibration process at different set speeds, and determines whether the calibration is completed based on the judgment results of the first judgment unit and the second judgment unit.
[0153] In another aspect, this embodiment of the invention also provides a computer-readable storage medium, which includes a stored program, wherein the program controls the computer-readable storage medium to execute the motor calibration method of this embodiment of the invention when it is running.
[0154] Figure 9 This is a schematic diagram of a computer device provided in an embodiment of the present invention. Figure 9 As shown, the computer device 30 in this embodiment includes a processor 31, a memory 32, and a computer program 33 stored in the memory 32 and executable on the processor 31. When the computer program 33 is executed by the processor 31, it implements the motor calibration method in the embodiment. To avoid repetition, it will not be described in detail here. Alternatively, when the computer program is executed by the processor 31, it implements the functions of each model / unit of the detection device in the embodiment. To avoid repetition, it will not be described in detail here.
[0155] Computer device 30 includes, but is not limited to, processor 31 and memory 32. Those skilled in the art will understand that... Figure 9 This is merely an example of computer device 30 and does not constitute a limitation on computer device 30. It may include more or fewer components than shown, or combine certain components, or different components. For example, computer device 30 may also include input / output devices, network access devices, buses, etc.
[0156] The processor 31 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0157] The memory 32 can be an internal storage unit of the computer device 30, such as a hard disk or RAM of the computer device 30. The memory 32 can also be an external storage device of the computer device 30, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device 30. Furthermore, the memory 32 can include both internal and external storage units of the computer device 30. The memory 32 is used to store computer programs and other programs and data required by the computer device 30. The memory 32 can also be used to temporarily store data that has been output or will be output.
[0158] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state drives (SSDs)).
[0159] While specific embodiments of the invention have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. Those skilled in the art should understand that modifications can be made to the above embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.
[0160] Finally, it should be noted that the above description is merely the preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any person skilled in the art can make many possible variations and simple substitutions to the technical solutions of the present invention using the disclosed methods and techniques without departing from the scope of the present invention; all of these variations fall within the protection scope of the present invention.
Claims
1. A motor calibration method applied to a motor drive system, the motor drive system including a motor and a load, the motor being capable of driving the load to a limit position, the limit position being provided with a limit component, characterized in that, The method includes: Obtain the effective load value of the motor driving the load collision at different set speeds; The collision calibration process of the motor at different set speeds is executed sequentially. During each collision calibration process, the rate of change of the load value of the motor is obtained based on the collision calibration process at the current set speed before and after the load collision, and a first determination is performed. If the first determination result is yes, then based on the collision calibration process at the current set speed, the amount of change in the load value of the motor from the normal load value before the load collision to the effective load value during the load collision process is obtained; If a collision calibration process at another set speed has been performed before the collision calibration, the second determination is performed; otherwise, the collision calibration process at the next set speed is performed. If the second determination result at the current set speed is yes, then execute the collision calibration process at the next set speed. When the collision calibration process at all set speeds is completed, control the motor to drive the load back to the origin position; The collision calibration process includes: Control the motor to drive the load to the limit position at the currently set speed and cause it to collide with the limit component; Wherein, the first determination is to determine whether the rate of change does not exceed a first preset value; The second determination is to determine whether the change at the current set speed is stable relative to the change at the previous set speed.
2. The method according to claim 1, characterized in that, Obtaining the effective load value of the motor driving the load collision at a set speed includes: The first process is executed multiple times, the first process including controlling the motor to drive the load to the limit position at the set speed and to collide with the limit component; Record the sudden load value of the motor after the load collision occurs during each execution of the first process; All the mutation load values are grouped into a set, and it is determined whether the set is valid. If the set is valid, then the effective load value is calculated based on all the mutation load values.
3. The method according to claim 2, characterized in that, The method for obtaining the effective load value of the motor driving the load collision at a set speed further includes: If the set is invalid, the first process is executed multiple times and all mutation load values in the first process are obtained until the set of all mutation load values is valid.
4. The method according to claim 2, characterized in that, The determination of whether the set is valid includes: Calculate the difference between the maximum and minimum values of the set, and determine whether the difference does not exceed a third preset value; If so, then the set is valid; If not, then the set is invalid.
5. The method according to claim 1, characterized in that, The method further includes: If the first determination or the second determination result is negative, the collision calibration process of the motor at the current set speed is repeated and the first determination and the second determination are executed until the next collision calibration process at the set speed can be performed or the calibration is completed.
6. The method according to claim 5, characterized in that, The method further includes: If the number of times the collision calibration process is executed by the motor at the current set speed exceeds the fourth preset value, the calibration will be stopped and an error will be reported.
7. The method according to any one of claims 1 to 6, characterized in that, The step of determining whether the change at the current set speed is stable relative to the change at the previous set speed is to determine whether the change at the current set speed is less than a second preset value relative to the change at the previous set speed.
8. The method according to any one of claims 1 to 6, characterized in that, The step of controlling the motor to drive the load to the limit position at a currently set speed and causing it to collide with the limit component includes: During each collision calibration process, the motor drives the load to move at a currently set speed in a first direction at the limit position, and then arrives at the limit position and collides with the limit component.
9. The method according to claim 8, characterized in that, The motor can also drive the load to a starting position located in the first direction of the limiting position, and the method further includes: If a collision calibration process at another set speed has been performed before this collision calibration process, then the motor is controlled to drive the load back to the starting position and then the collision calibration process at the current speed is started. Otherwise, the motor is controlled to perform the collision calibration process at the current speed with the current position of the load as the starting point.
10. The method according to any one of claims 1 to 6, characterized in that, The rate of change is calculated in the following manner: The initial and final values of the motor's load value within the first time period are obtained, and the rate of change is the change in load value per unit time calculated based on the initial and final values.
11. The method according to any one of claims 1 to 6, characterized in that, The sequential execution of the collision calibration process for the motor at different set speeds includes: The collision calibration process of the motor is performed in the order of the set speed, corresponding to the set speed.
12. A motor calibration device, comprising a motor drive system, the motor drive system including a motor and a load, the motor being capable of driving the load to a limit position, the limit position being provided with a limit component, characterized in that, The device further includes: An execution unit is used to control the motor to drive the load; The monitoring unit is used to monitor the load value and changes on the motor; The storage unit is used to store the effective load values of the motor at different set speeds; Timing unit; The calculation unit calculates the rate of change of the motor's load value within a first time period before and after the load collision, based on the timing unit and the monitoring unit, and calculates the amount of change of the motor's load value from the normal load value before the load collision to the effective load value during the load collision process; The first determination unit determines whether the rate of change calculated by the calculation unit is greater than a first preset value during the collision calibration process performed by the execution unit. The second determination unit, during the collision calibration process performed by the execution unit, determines whether the change in the change amount under the two set speeds before and after is greater than a second preset value based on the change amount calculated by the calculation unit. The processing unit controls the execution unit to sequentially execute the collision calibration process at different set speeds, and determines whether the calibration is complete based on the determination results of the first determination unit and the second determination unit. The collision calibration process involves controlling the motor to drive the load to the limit position at a set speed so that it collides with the limit component.
13. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a program, and the device controls the non-volatile storage medium to execute the motor calibration method according to any one of claims 1 to 11 when the program is executed.
Citation Information
Patent Citations
Limit origin positioning method and device of motor, terminal device and storage medium
CN110244222A
Seat limit position calibration method based on current integration window
CN113787941A