Methods, devices, media, controllers, and products for identifying the load mass of robots.
By obtaining the relationship between the load mass and current of the SCARA robot, the load mass was identified and corrected, thus solving the problem of abnormal robot operation caused by incorrect gravity load commands, ensuring reasonable parameters and avoiding safety hazards.
Patent Information
- Application Number
- CN202411143093.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-08-20
AI Technical Summary
When the load changes, SCARA robots may experience excessive inertia deviation due to incorrect gravity load command settings, which can cause control loop oscillations, abnormal motor noises, and inconsistent operating parameters, and may even lead to safety accidents.
By obtaining the correspondence or functional relationship between the load mass and current of the SCARA robot, the initial mass of the load is identified, and the mass set by the gravity load command is compared in position mode. Prompt information is issued or corrections are made to ensure that the command is reasonable.
It effectively prevents excessive discrepancies between robot servo parameters and actual working conditions, avoids operational anomalies, simplifies algorithm implementation, has strong applicability, and eliminates the need to establish a dynamic model.
Smart Images

Figure CN119036443B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of control, and more particularly to a method, apparatus, medium, controller, and product for identifying the load mass of a robot. Specifically, it relates to a method, apparatus, computer-readable storage medium, robot controller, and computer program product for identifying the load mass of a SCARA robot. Background Technology
[0002] SCARA robots often require load grippers to be installed at the end of three axes during operation. When a load is added using the gripper, the robot's load inertia changes. At this time, it is generally necessary to use gravity load commands to fill in parameters such as the mass and center of mass of the load to calculate the actual inertia of each axis. This ensures that the robot operates normally and avoids problems such as low-frequency jitter or loop oscillation, acceleration and speed that do not match its own operating conditions caused by excessive inertia deviation.
[0003] When a user enters incorrect gravity load command parameters, such as entering a command corresponding to a full gravity load when the robot is unloaded, the center of gravity and mass deviation will be too large. In this case, the robot controller will also cause the control loop to oscillate due to the incorrect inertia calculation, and the robot's motor will produce abnormal noise. Secondly, incorrect parameters will also affect the robot's operating speed, acceleration and other parameters, which will cause the robot's operating conditions to be inconsistent with reality, have a destructive impact on the structure, and even cause serious safety accidents. Summary of the Invention
[0004] The main objective of this invention is to overcome the deficiencies of the aforementioned related technologies and provide a method, device, medium, controller, and product for identifying the load mass of a robot, so as to solve the problem that malfunctions in the gravity load command settings of SCARA robots can lead to abnormal operation.
[0005] This invention provides a method for identifying the load mass of a SCARA robot, comprising:
[0006] Obtain the pre-tested correspondence between the load mass and current of the SCARA robot, or the pre-fitted functional relationship between the load mass and current of the SCARA robot; the current is the third axis current of the robot; when the SCARA robot is in position mode, with the enable flag valid and the position command 0, identify the initial load mass of the SCARA robot based on the correspondence between the load mass and current, or the functional relationship between the load mass and current; when the SCARA robot is in position mode, with the enable flag valid and the position command not 0, compare the identified initial mass with the mass set by the gravity load command to determine whether the gravity load command setting is reasonable; if it is determined that the gravity load command setting is unreasonable, issue a corresponding prompt message.
[0007] Optionally, the functional relationship between load mass and current is obtained by function fitting based on the pre-tested correspondence between load mass and current of the SCARA robot, and the functional relationship between load mass and current is expressed as:
[0008]
[0009] Where F is the load mass, Iq is the quadrature-axis current, Kt is the torque coefficient, and a is the conversion coefficient between load mass and current; based on the correspondence between load mass and current, the conversion coefficient between load mass and current in the functional relationship is obtained.
[0010] Optionally, comparing the identified initial mass with the mass set by the gravity load command to determine whether the gravity load command setting is reasonable includes: determining whether the absolute value of the difference between the initial mass and the mass set by the gravity load command is less than a first preset difference; if the absolute value of the difference is less than the first preset difference, then the mass setting of the gravity load command is determined to be reasonable; if the absolute value of the difference is not less than the first preset difference, then the mass setting of the gravity load command is determined to be unreasonable.
[0011] Optionally, the initial mass of the load of the SCARA robot is identified based on the correspondence between the load mass and the current or the functional relationship between the load mass and the current, including: sampling the current of the SCARA robot every n execution cycles to obtain m sampled currents, and calculating the average value of the m sampled currents, denoted as the first average current value; and calculating the initial mass of the load of the SCARA robot based on the first average current value using the correspondence between the load mass and the current or the functional relationship between the load mass and the current.
[0012] Optionally, the method further includes: obtaining a pre-configured correspondence between the load mass of the SCARA robot and the current difference caused by the friction force and gravity of the SCARA robot during its vertical movement; determining the current difference caused by the friction force and gravity of the SCARA robot during its vertical movement when it is unloaded, based on the correspondence and the first average current value, and recording it as the first current difference; sampling the current of the SCARA robot every n execution cycles to obtain m sampled currents, and calculating the average value of the m sampled currents, recording it as the second average current value; determining whether the absolute value of the difference between the first average current value and the second average current value is greater than the absolute value of the first current difference; if the absolute value of the difference between the first average current value and the second average current value is greater than the absolute value of the first current difference, then correcting the load mass of the SCARA robot.
[0013] Optionally, the load mass of the SCARA robot is corrected by: based on the second average current value, using the correspondence between the load mass and the current or the relationship function between the load mass and the current, identifying the load mass of the robot as the first mass; the corrected load mass of the robot is equal to the average of the initial mass and the first mass.
[0014] Optionally, after correcting the load mass of the SCARA robot, it is determined whether the absolute value of the difference between the corrected load mass and the mass set by the gravity load command is less than a second preset difference; if the absolute value of the difference is less than the second preset difference, the load mass identification will no longer be performed in the enabled state of the SCARA robot until the motor enable of the SCARA robot is 0.
[0015] Another aspect of the present invention provides a load mass identification device for a SCARA robot, comprising: a first acquisition unit, configured to acquire a pre-tested correspondence between the load mass and current of the SCARA robot or a pre-fitted functional relationship between the load mass and current of the SCARA robot; wherein the current is the third axis current of the robot; a first identification unit, configured to, when the SCARA robot is in position mode, and the enable flag is valid and the position command is 0, identify the initial load mass of the SCARA robot based on the correspondence between the load mass and current or the functional relationship between the load mass and current; a first determination unit, configured to, when the SCARA robot is in position mode, and the enable flag is valid and the position command is not 0, compare the identified initial mass with the mass set by the gravity load command to determine whether the setting of the gravity load command is reasonable; and a prompting unit, configured to, if the determination unit determines that the setting of the gravity load command is unreasonable, issue a corresponding prompt message.
[0016] Optionally, the functional relationship between load mass and current is obtained by function fitting based on the pre-tested correspondence between load mass and current of the SCARA robot, and the functional relationship between load mass and current is expressed as:
[0017]
[0018] Where F is the load mass, Iq is the quadrature axis current, Kt is the torque coefficient, and a is the conversion coefficient between load mass and current;
[0019] Based on the relationship between load mass and current, the conversion coefficients between load mass and current in the functional relationship are determined.
[0020] Optionally, the first determining unit compares the identified initial mass with the mass set by the gravity load command to determine whether the gravity load command setting is reasonable, including: determining whether the absolute value of the difference between the initial mass and the mass set by the gravity load command is less than a first preset difference; if the absolute value of the difference is less than the first preset difference, then the mass setting of the gravity load command is determined to be reasonable; if the absolute value of the difference is not less than the first preset difference, then the mass setting of the gravity load command is determined to be unreasonable.
[0021] Optionally, the first identification unit identifies the initial mass of the load of the SCARA robot based on the correspondence between the load mass and the current or the functional relationship between the load mass and the current, including: sampling the current of the SCARA robot every n execution cycles to obtain m sampled currents, and calculating the average value of the m sampled currents, denoted as the first current average value; and calculating the initial mass of the load of the SCARA robot based on the first current average value using the correspondence between the load mass and the current or the functional relationship between the load mass and the current.
[0022] Optionally, it further includes: a second acquisition unit, configured to acquire a pre-configured correspondence between the load mass of the SCARA robot and the current difference caused by the friction force and gravity of the SCARA robot during its up-and-down movement; a second determination unit, configured to determine, based on the correspondence and the first average current value, the current difference caused by the friction force and gravity of the SCARA robot during its up-and-down movement when unloaded, and denoted as the first current difference; a calculation unit, configured to sample the current of the SCARA robot every n execution cycles to obtain m sampled currents, and calculate the average value of the m sampled currents, denoted as the second average current value; a first judgment unit, configured to determine whether the absolute value of the difference between the first average current value and the second average current value is greater than the absolute value of the first current difference; and a correction unit, configured to correct the load mass of the SCARA robot if the absolute value of the difference between the first average current value and the second average current value is greater than the absolute value of the first current difference.
[0023] Optionally, the correction unit corrects the load mass of the SCARA robot by: identifying the load mass of the robot based on the second average current value using the correspondence between the load mass and the current or the relationship function between the load mass and the current, and recording it as the first mass; the corrected load mass of the robot is equal to the average of the initial mass and the first mass.
[0024] Optionally, it further includes: a second judgment unit, used to determine whether the absolute value of the difference between the corrected load mass and the mass set by the gravity load command is less than a second preset difference after the load mass of the SCARA robot is corrected; if the absolute value of the difference is less than the second preset difference, then the load mass identification will no longer be performed in the enabled state of the SCARA robot until the motor enable of the SCARA robot is 0.
[0025] In another aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0026] In another aspect, the present invention provides a robot controller, including a processor, a memory, and a computer program stored in the memory that can run on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.
[0027] In another aspect, the present invention provides a robot controller, including the load mass identification device for any of the aforementioned SCARA robots.
[0028] In another aspect, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the methods described above.
[0029] According to the technical solution of the present invention, by collecting the motor current of the three axes of the SCARA robot and performing initial mass identification through the correspondence or function relationship between current and mass, when the gravity load command setting of the SCARA robot is incorrect, the identified load mass can be compared with the mass set by the command to prevent abnormal operation caused by excessive difference between the robot servo parameters and motion control parameters and the actual working conditions.
[0030] According to the technical solution of the present invention, the mass change during operation is identified based on the different currents generated when the three axes run up and down, and the initial value of the load mass is continuously corrected to obtain the final mass. The algorithm is simple to implement, does not require the establishment of a dynamic model, and has strong universality. Attached Figure Description
[0031] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0032] Figure 1 This is a schematic diagram of an embodiment of the load mass identification method for SCARA robots provided by the present invention;
[0033] Figure 2 The curves showing the relationship between different load qualities and conversion factors are illustrated.
[0034] Figure 3 A flowchart illustrating a specific implementation of the steps for identifying the initial mass of the load of the SCARA robot based on the correspondence between the load mass and the current or the functional relationship between the load mass and the current;
[0035] Figure 4The curve showing the relationship between load quality and current according to the present invention is illustrated.
[0036] Figure 5 This is a schematic diagram of another embodiment of the load mass identification method for SCARA robots provided by the present invention;
[0037] Figure 6 The curve showing the relationship between the load mass of the SCARA robot and the current difference caused by the friction force and its own weight during the vertical movement of the third axis of the SCARA robot is illustrated.
[0038] Figure 7 This is a flowchart of a specific embodiment of the load mass identification method for SCARA robots provided by the present invention;
[0039] Figure 8 This is a structural block diagram of an embodiment of the load mass identification device for SCARA robots provided by the present invention;
[0040] Figure 9 This is a structural block diagram of another embodiment of the load mass identification device for SCARA robots provided by the present invention. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0042] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0043] This invention provides a method for identifying the load mass of a SCARA robot.
[0044] Figure 1This is a schematic diagram of an embodiment of the load mass identification method for SCARA robots provided by the present invention.
[0045] like Figure 1 As shown, according to an embodiment of the present invention, the load quality identification method includes at least steps S110, S120, S130 and S140.
[0046] Step S110: Obtain the pre-tested correspondence between the load mass and current of the SCARA robot or the pre-fitted functional relationship between the load mass and current of the SCARA robot.
[0047] Specifically, the current is the third-axis current of the SCARA robot. Under different load conditions, the magnitude of the robot's third-axis current is collected to obtain the correspondence between load mass and current magnitude. The current can specifically be a quadrature-axis current. This correspondence can be plotted as a table of load mass versus current or fitted as a curve representing the relationship between load mass and current.
[0048] The functional relationship between load mass and current is obtained by function fitting based on the pre-tested correspondence between load mass and current of the SCARA robot.
[0049] In one specific implementation, the functional relationship between load mass and current is expressed as:
[0050]
[0051] Torque = Force * Lever arm, Torque = Quadrature axis current Iq * Torque coefficient Kt, so the conversion coefficient a can be understood as the size of the lever arm. a is approximately equal to the lever arm but not equal to the lever arm. Therefore, theoretically a is a constant value and can be regarded as a coefficient.
[0052] Where F is the load mass (unit: kg), Iq is the collected quadrature-axis current, Kt is the torque coefficient (taking a 6kg SCARA robot as an example, three-axis Kt=0.331N·m / Arms), and a is the conversion coefficient between load mass and current. Therefore, the conversion coefficient between load mass and current can be obtained as follows:
[0053]
[0054] Therefore, the conversion coefficient between load mass and current in the functional relationship can be determined based on the correspondence between load mass and current. For example, the conversion coefficient 'a' between load mass and current can be calculated based on a pre-tested table of the correspondence between load mass and current for a SCARA robot.
[0055] Since the smaller the load mass, the greater the impact of friction, the less accurate the conversion factor 'a' becomes with lower load masses. Figure 2 The curves showing the relationship between different load masses and the conversion factor are illustrated. The horizontal axis represents load mass, and the vertical axis represents the conversion factor between load mass and current. Figure 2 It can be seen that the conversion coefficient 'a' tends to be more stable as the load mass increases, so the conversion coefficient 'a' is averaged.
[0056]
[0057] Where i is the load mass, I q(i) Let I be the quadrature-axis current when the load mass is i, k be the maximum load mass, and j be the initial load mass. Starting from j, the quadrature-axis current I is collected every time the load increases by 1 kg. q(i) The formula continues until i = k. Therefore, the numerator is the sum of the conversion coefficient a with j as the starting load mass and k as the ending load mass, and the denominator is k - j + 1. For example, for a 6kg SCARA robot, in order to reduce the impact of friction, j = 3 and k = 6, resulting in a = 0.03448.
[0058] The functional relationship between load mass and current can be obtained as follows:
[0059]
[0060] According to the above formula, the load mass can be calculated by collecting the quadrature axis current of the robot's motor. The more accurate the table is and the more refined the load level classification is, the more accurate the conversion coefficient 'a' will be, and the more accurate the identification will be.
[0061] Step S120: When the SCARA robot is in position mode, when the enable flag is valid and the position command is 0, the initial mass of the load of the SCARA robot is identified according to the correspondence between the load mass and the current or the functional relationship between the load mass and the current.
[0062] Specifically, when the robot is in position mode (i.e., control mode where the input command is a position command), when the enable flag is valid and the position command is 0, the initial mass m0 of the robot load is identified and calculated.
[0063] Figure 3 A flowchart illustrating a specific implementation of the steps for identifying the initial mass of the load of the SCARA robot based on the correspondence between the load mass and the current, or the functional relationship between the load mass and the current. Figure 3 As shown, in one specific embodiment, step S120 includes steps S121 and S122.
[0064] Step S121: Sample the current of the SCARA robot every n execution cycles to obtain m sampled currents, and calculate the average value of the m sampled currents, which is denoted as the first average current value.
[0065] Specifically, the current can be a quadrature-axis current. The current is sampled every n execution cycles, for a total of m samples. These m current values are then accumulated, and the average value of the accumulated current samples over n cycles is calculated and denoted as the first average current value. This reduces the error caused by noise in the current data. The average current value is then obtained, i.e.:
[0066]
[0067] in, Trq is the average current value from m samples, i.e., the first average current value; T is the execution period; i The current is collected every n execution cycles, and the instantaneous current value is given.
[0068] Step S122: Based on the first average current value, the initial mass of the SACRA robot load is calculated using the correspondence between the load mass and the current or the functional relationship between the load mass and the current.
[0069] After obtaining the first average current value, the initial mass of the SACRA robot load corresponding to the first average current value is found using the correspondence between load mass and current; alternatively, the initial mass of the SACRA robot load is calculated based on the first average current value using the functional relationship between load mass and current. For example, Figure 4 An example of the correspondence between load mass and current according to the present invention is shown. The horizontal axis represents load mass, and the vertical axis represents current magnitude. Figure 4 The relationship between load mass and current is shown. Find the corresponding initial mass m0, or calculate the initial mass m0 based on the functional relationship between load mass and current.
[0070] Step S130: When the SCARA robot is in position mode, if the enable flag is valid and the position command is not 0, the identified initial mass is compared with the mass set by the gravity load command to determine whether the gravity load command setting is reasonable.
[0071] Specifically, when the robot is in position mode, if the enable flag is valid and the position command is not 0, the robot is considered to have started running. At this time, the identified initial mass is compared with the mass set by the gravity load command to determine whether the gravity load command setting is reasonable.
[0072] In one specific implementation, it is determined whether the absolute value of the difference between the initial mass and the mass set by the gravity load command is less than a first preset difference; if the absolute value of the difference is less than the first preset difference, it is determined that the mass setting of the gravity load command is reasonable; if the absolute value of the difference is not less than the first preset difference, it is determined that the mass setting of the gravity load command is unreasonable.
[0073] The gravity load command is a command manually set by the user based on the load at the load end. The command includes the load mass, and may also include eccentricity and load inertia. Specifically, m0 is compared with the mass m2 set by the gravity load command. If the difference between the two is within the range of a first preset difference Δm (the allowable range of difference between the actual mass and the mass set by the gravity load command), i.e., |m0-m2|<Δm, then the load mass setting is considered reasonable, and the gravity load parameters are effective. If the difference between the two is outside the range of the first preset difference Δm, then the load mass setting is considered unreasonable.
[0074] In step S140, if it is determined that the setting of the gravity load command is unreasonable, a corresponding prompt message is issued.
[0075] Specifically, if the gravity load command is set improperly, a corresponding prompt message will be issued to remind the user that the set quality does not match the actual quality.
[0076] Figure 5 This is a schematic diagram of another embodiment of the load mass identification method for SCARA robots provided by the present invention.
[0077] like Figure 5 As shown, according to another embodiment of the present invention, the load quality identification method further includes steps S150, S160, S170, S180 and S190.
[0078] Step S150: Obtain the pre-configured correspondence between the load mass of the SCARA robot and the current difference caused by the friction force and gravity of the SCARA robot during its up-and-down movement.
[0079] Step S160: Based on the correspondence and the first average current value, determine the current difference fErr caused by the friction force and gravity of the robot when it is running up and down without load, and record it as the first current difference.
[0080] Specifically, the relationship between the load mass of the SCARA robot and the difference in current caused by the friction force during the vertical movement of the SCARA robot's third axis and its own weight is obtained through prior testing. For example, Figure 6The diagram shows the correlation curve between the load mass of a SCARA robot and the current difference caused by the friction force and its own weight during the vertical movement of the SCARA robot's third axis. Specifically, it illustrates the different current differences caused by the friction force and its own weight during the vertical movement of the SCARA robot's third axis with different load masses. The horizontal axis represents the load mass, and the vertical axis represents the current difference. Based on the above correlation curve and the first average current value, the current difference caused by the friction force and its own weight during the vertical movement of the SCARA robot when it is unloaded can be obtained, i.e., the first current difference value.
[0081] Step S170: Sample the current of the robot every n execution cycles to obtain m sampled currents, and calculate the average value of the m sampled currents, which is denoted as the second current average value.
[0082] Step S180: Determine whether the absolute value of the difference between the first average current and the second average current, |IqErr|, is greater than the absolute value of the first current difference, |fErr|.
[0083] Step S190: If the absolute value of the difference between the first average current value and the second average current value is greater than the absolute value of the first current difference, then the load mass of the SCARA robot is corrected.
[0084] Specifically, using the same method as the initial mass identification described above, the robot's current is sampled every n execution cycles to obtain m sampled currents. Then, the average value of the current sampled when identifying the initial mass m0 (the first average current value) is compared with the average value of the currently sampled current (the second average current value) to obtain the magnitude of the current difference IqErr. When |IqErr|>|fErr|, it is considered that the torque change of the third axis is caused by the change in the load added to the third axis, and the load mass of the SCARA robot is corrected.
[0085] In one specific implementation, based on the second average current value, the load mass of the robot is identified using the correspondence between the load mass and the current, or the relationship function between the load mass and the current, and is denoted as the first mass; the corrected load mass of the robot is equal to the average of the initial mass and the first mass. For example, the load mass can be corrected using the following formula:
[0086]
[0087] m0' is the corrected quality value, m0 is the initial identification quality, and m1 is the quality identified under the quality correction state; the above formula can be understood as the confidence level of m0 and m1 is 1 / 2.
[0088] Furthermore, after correcting the load mass of the SCARA robot, it is determined whether the absolute value of the difference between the corrected load mass and the mass set by the gravity load command is less than a second preset difference. If the absolute value of the difference is less than the second preset difference Δm1, then load mass identification will no longer be performed in the enabled state of the SCARA robot until the motor enable of the SCARA robot is 0.
[0089] Specifically, after calculating m0', the mass is updated. When the error between the identified mass m0' and the mass m2 set by the gravity load command is within Δm1 (the mass error judgment threshold when mass identification stops), i.e. |m0'-m2|<Δm1, the mass identification will no longer continue in the enabled state until the robot motor enable is 0 and then the identification will start again.
[0090] To clearly illustrate the technical solution of the present invention, the execution flow of the load mass identification method for SCARA robots provided by the present invention will be described below with a specific embodiment.
[0091] Figure 7 This is a flowchart of a specific embodiment of the load mass identification method for SCARA robots provided by the present invention.
[0092] like Figure 7 As shown, when the robot is in position mode and the function switch is active, when the third-axis servo enable flag is active and the position command is 0, the gravity recognition function identifies and calculates the initial mass m0, samples the current, and collects the third-axis current every n cycles, for m times. Then, the m current values are summed, and the final current data is the average of the current collected every n cycles. Based on the average current, the initial mass m0 is identified according to a pre-configured correspondence between current and load mass or a pre-fitted correspondence function between current and load mass. The cumulative count is cleared, the current accumulation value is cleared, and the identified initial mass m0 is saved. The initial identification completion flag is set to 1, and the robot enters state 0, where the position command is not 0. When the three-axis servo enable is 0, the cumulative count is cleared, the current accumulation value is cleared, m0 is restored to its default value, and the robot jumps to the initial mass m0 measurement state.
[0093] When the robot is in position mode, if the enable flag is valid and the position command is not 0, the robot is considered to have started running. It compares m0 with the mass m2 set by the gravity load command. If the absolute value of the difference is outside the range of Δm, a user error message indicating an unreasonable setting and a mismatch between the parameter and the actual value is generated, and the process ends. If the absolute value of the difference is within the range of Δm (i.e., |m0-m2|<Δm), the mass setting is considered reasonable, and the gravity load command parameter is effective. The initial flag is set to 1, and the robot enters state 1, which is the load mass correction stage.
[0094] Once the initial mass m0 is identified, the initial identification completion flag is set to 1. The current difference fErr caused by the friction force of the three axes running up and down when the robot is unloaded and the gravity of the three axes is obtained. The current is collected, and then the current used when identifying the initial mass m0 is compared with the current collected in the mass correction stage to obtain the magnitude of the current deviation IqErr. When |IqErr|>|fErr| is satisfied, it is considered that the torque change of the three axes is caused by the change of the load added to the three axes, and the mass m0 is corrected. If |IqErr|>|fErr| is not satisfied, there is no need to correct the mass m0.
[0095] After calculating m0', the mass is updated. When the error between the identified mass m0' and the mass m2 set by the gravity load command is within Δm1 (the mass error judgment threshold when mass identification stops) (|m0'-m2|<Δm1), the mass identification will stop in the enabled state until the robot motor enable is 0 and then the identification will start again.
[0096] The present invention also provides a load mass identification device for a SCARA robot.
[0097] Figure 8 This is a structural block diagram of an embodiment of the load mass identification device for SCARA robots provided by the present invention. Figure 8 As shown, the load quality identification device 100 includes: a first acquisition unit 110, a first identification unit 120, a first determination unit 130, and a prompting unit 140.
[0098] The first acquisition unit 110 is used to acquire the correspondence between the load mass and current of the SCARA robot obtained through pre-testing or the functional relationship between the load mass and current of the robot obtained through pre-fitting; the current is the third axis current of the robot.
[0099] Specifically, the current is the third-axis current of the SCARA robot. Under different load conditions, the magnitude of the robot's third-axis current is collected to obtain the correspondence between load mass and current magnitude. The current can specifically be a quadrature-axis current. This correspondence can be plotted as a table of load mass versus current or fitted as a curve representing the relationship between load mass and current.
[0100] The functional relationship between load mass and current is obtained by function fitting based on the pre-tested correspondence between load mass and current of the SCARA robot.
[0101] In one specific implementation, the functional relationship between load mass and current is expressed as:
[0102]
[0103] Torque = Force * Lever arm, Torque = Quadrature axis current Iq * Torque coefficient Kt, so the conversion coefficient a can be understood as the size of the lever arm. a is approximately equal to the lever arm but not equal to the lever arm. Therefore, theoretically a is a constant value and can be regarded as a coefficient.
[0104] Where F is the load mass (unit: kg), Iq is the collected quadrature-axis current, Kt is the torque coefficient (taking a 6kg SCARA robot as an example, three-axis Kt=0.331N·m / Arms), and a is the conversion coefficient between load mass and current. Therefore, the conversion coefficient between load mass and current can be obtained as follows:
[0105]
[0106] Therefore, the conversion coefficient between load mass and current in the functional relationship can be determined based on the correspondence between load mass and current. For example, the conversion coefficient 'a' between load mass and current can be calculated based on a pre-tested table of the correspondence between load mass and current for a SCARA robot.
[0107] Since the smaller the load mass, the greater the impact of friction, the less accurate the conversion factor 'a' becomes with lower load masses. Figure 2 The curves showing the relationship between different load masses and the conversion factor are illustrated. The horizontal axis represents load mass, and the vertical axis represents the conversion factor between load mass and current. Figure 2 It can be seen that the conversion coefficient 'a' tends to be more stable as the load mass increases, so the conversion coefficient 'a' is averaged.
[0108]
[0109] Where i is the load mass, I q(i)Let I be the quadrature-axis current when the load mass is i, k be the maximum load mass, and j be the initial load mass. Starting from j, the quadrature-axis current I is collected every time the load increases by 1 kg. q(i) The formula continues until i = k. Therefore, the numerator is the sum of the conversion coefficient a with j as the starting load mass and k as the ending load mass, and the denominator is k - j + 1. For example, for a 6kg SCARA robot, in order to reduce the impact of friction, j = 3 and k = 6, resulting in a = 0.03448.
[0110] The functional relationship between load mass and current can be obtained as follows:
[0111]
[0112] According to the above formula, the load mass can be calculated by collecting the quadrature axis current of the robot's motor. The more accurate the table is and the more refined the load level classification is, the more accurate the conversion coefficient 'a' will be, and the more accurate the identification will be.
[0113] The first identification unit 120 is used to identify the initial mass of the load of the SCARA robot when the SCARA robot is in position mode, and when the enable flag is valid and the position command is 0, based on the correspondence between the load mass and the current or the functional relationship between the load mass and the current.
[0114] Specifically, when the robot is in position mode (i.e., control mode where the input command is a position command), when the enable flag is valid and the position command is 0, the initial mass m0 of the robot load is identified and calculated.
[0115] In one specific embodiment, the first identification unit identifies the initial mass of the load of the SCARA robot based on the correspondence between the load mass and the current or the functional relationship between the load mass and the current, including: sampling the current of the SCARA robot every n execution cycles to obtain m sampled currents, and calculating the average value of the m sampled currents, denoted as the first current average value; and calculating the initial mass of the load of the SCARA robot based on the first current average value using the correspondence between the load mass and the current or the functional relationship between the load mass and the current.
[0116] Specifically, the current is sampled, with current data sampled once every n execution cycles, for a total of m samples. The m current values are then accumulated, and the average value of the accumulated current samples over n cycles is calculated and denoted as the first average current value. This reduces the error caused by noise in the current data. The average current value is then calculated as follows:
[0117]
[0118] in, Trq is the average current value from m samples, i.e., the first average current value; T is the execution period; i The current is collected every n execution cycles, and the instantaneous current value is given.
[0119] After obtaining the first average current value, the initial mass of the SACRA robot load corresponding to the first average current value is found using the correspondence between load mass and current; alternatively, the initial mass of the SACRA robot load is calculated based on the first average current value using the functional relationship between load mass and current. For example, Figure 4 An example of the correspondence between load mass and current according to the present invention is shown. The horizontal axis represents load mass, and the vertical axis represents current magnitude. Figure 4 The relationship between load mass and current is shown. Find the corresponding initial mass m0, or calculate the initial mass m0 based on the functional relationship between load mass and current.
[0120] The first determining unit 130 is used to compare the identified initial mass with the mass set by the gravity load command when the SCARA robot is in position mode, and when the enable flag is valid and the position command is not 0, to determine whether the setting of the gravity load command is reasonable; the prompting unit 140 is used to issue a corresponding prompt message if the determining unit determines that the setting of the gravity load command is unreasonable.
[0121] Specifically, when the robot is in position mode, if the enable flag is valid and the position command is not 0, the robot is considered to have started running. At this time, the identified initial mass is compared with the mass set by the gravity load command to determine whether the gravity load command setting is reasonable.
[0122] In one specific embodiment, the first determining unit 120 compares the identified initial mass with the mass set by the gravity load command to determine whether the setting of the gravity load command is reasonable, including: determining whether the absolute value of the difference between the initial mass and the mass set by the gravity load command is less than a first preset difference; if the absolute value of the difference is less than the first preset difference, then the mass setting of the gravity load command is determined to be reasonable; if the absolute value of the difference is not less than the first preset difference, then the mass setting of the gravity load command is determined to be unreasonable.
[0123] The gravity load command is a user-defined command based on the load at the load end. The command includes the load mass, and may also include eccentricity and load inertia. Specifically, m0 is compared with the mass m2 set by the gravity load command. If the difference between the two is within a first preset difference Δm (the allowable range of difference between the actual mass and the mass set by the gravity load command), i.e., |m0-m2|<Δm, then the load mass setting is considered reasonable, and the gravity load parameters are effective. If the difference is outside the range of the first preset difference Δm, then the load mass setting is considered unreasonable. If the gravity load command setting is unreasonable, a corresponding prompt message is issued to inform the user that the set mass does not match the actual mass.
[0124] Figure 9 This is a structural block diagram of another embodiment of the load mass identification device for SCARA robots provided by the present invention. Figure 9 As shown, the load quality identification device 100 further includes: a second acquisition unit 150, a second determination unit 160, a calculation unit 170, a first judgment unit 180, and a correction unit 190.
[0125] The second acquisition unit 150 is used to acquire the pre-configured correspondence between the load mass of the SCARA robot and the current difference caused by the friction force and its own gravity during the up-and-down movement of the SCARA robot.
[0126] The second determining unit 160 is used to determine the current difference caused by the friction force and its own gravity when the SCARA robot is running up and down without load, based on the correspondence and the first current average value, and denoted as the first current difference value.
[0127] Specifically, the relationship between the load mass of the SCARA robot and the current difference caused by the friction force during the vertical movement of the SCARA robot's third axis and its own weight is obtained in advance through testing. The second acquisition unit 150 acquires this relationship. For example, Figure 6 The diagram shows the correlation curve between the load mass of the SCARA robot and the current difference caused by the friction force and its own weight during the vertical movement of the SCARA robot's third axis. Specifically, it shows the different current differences caused by the friction force and its own weight during the vertical movement of the SCARA robot's third axis with different load masses. The second determining unit 160, based on the above correlation curve and the first average current value, can obtain the current difference caused by the friction force and its own weight during the vertical movement of the SCARA robot when it is unloaded, i.e., the first current difference value.
[0128] The calculation unit 170 is used to sample the current of the SCARA robot every n execution cycles to obtain the current of m samples, and calculate the average value of the current of the m samples, which is denoted as the second current average value.
[0129] The first judgment unit 180 is used to determine whether the absolute value of the difference between the first average current value and the second average current value is greater than the absolute value of the first current difference.
[0130] The correction unit 190 is used to correct the load mass of the SCARA robot if it is determined that the absolute value of the difference between the first average current value and the second average current value is greater than the absolute value of the first current difference.
[0131] Specifically, the calculation unit 170 uses the same method as the initial mass identification described above to sample the current of the robot every n execution cycles to obtain m sampled currents. Then, using the average value of the sampled currents when identifying the initial mass m0 (first average current value), the first judgment unit 180 compares the first average current value with the average value of the currently sampled currents (second average current value) to obtain the magnitude of the current difference IqErr (first current difference). When |IqErr|>|fErr|, it is considered that the torque change of the third axis is caused by the change of the load added to the third axis, and the correction unit 190 corrects the load mass of the SCARA robot.
[0132] In one specific embodiment, the correction unit 190 corrects the load mass of the SCARA robot by: identifying the load mass of the robot based on the second average current value using the correspondence between the load mass and the current or the relationship function between the load mass and the current, and recording it as the first mass; the corrected load mass of the robot is equal to the average of the initial mass and the first mass.
[0133] For example, the load mass can be corrected using the following formula:
[0134]
[0135] m0' is the corrected quality value, m0 is the initial identification quality, and m1 is the quality identified under the quality correction state; the above formula can be understood as the confidence level of m0 and m1 is 1 / 2.
[0136] Furthermore, the device 100 also includes a second judgment unit.
[0137] The second judgment unit is used to determine, after correcting the load mass of the SCARA robot, whether the absolute value of the difference between the corrected load mass and the mass set by the gravity load command is less than a second preset difference; if the absolute value of the difference is less than the second preset difference, then the load mass identification will no longer be performed in the enabled state of the SCARA robot until the motor enable of the SCARA robot is 0.
[0138] Specifically, after calculating m0', the mass is updated. When the error between the identified mass m0' and the mass m2 set by the gravity load command is within Δm1 (the mass error judgment threshold when mass identification stops), i.e. |m0'-m2|<Δm1, the mass identification will no longer continue in the enabled state until the robot motor enable is 0 and then the identification will start again.
[0139] The present invention also provides a storage medium corresponding to the load mass identification method of the SCARA robot, wherein a computer program is stored thereon, and the computer program, when executed by a processor, implements the steps of any of the aforementioned methods.
[0140] The present invention also provides a robot controller corresponding to the load mass identification method of the SCARA robot, including a processor, a memory, and a computer program stored in the memory that can run on the processor, wherein the processor executes the computer program to implement the steps of any of the aforementioned methods.
[0141] The present invention also provides a robot controller corresponding to the load mass identification device of the SCARA robot, including any of the aforementioned load mass identification devices.
[0142] The present invention also provides a computer program product corresponding to the load mass identification method of the SCARA robot, including a computer program that, when executed by a processor, implements the steps of any of the aforementioned methods.
[0143] Accordingly, the solution provided by the present invention, based on the technical solution of the present invention, collects the motor current of the three axes of the SCARA robot, and performs initial mass identification by the correspondence or functional relationship between current and mass. When the gravity load command setting of the SCARA robot is incorrect, the identified load mass can be compared with the mass set by the command, so as to prevent abnormal operation caused by excessive difference between the robot servo parameters and motion control parameters and the actual working conditions.
[0144] According to the technical solution of the present invention, the mass change during operation is identified based on the different currents generated when the three axes run up and down, and the initial value of the load mass is continuously corrected to obtain the final mass. The algorithm is simple to implement, does not require the establishment of a dynamic model, and has strong universality.
[0145] The functions described herein can be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions can be stored as one or more instructions or codes on or transmitted via a computer-readable medium. Other examples and embodiments are within the scope and spirit of this invention and the appended claims. For example, due to the nature of software, the functions described above can be implemented using software executed by a processor, hardware, firmware, hardwired, or any combination thereof. Furthermore, the functional units can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit.
[0146] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0147] The units described as separate components may or may not be physically separate. Similarly, the components of the control device may or may not be physical units; they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0148] If the integrated unit is implemented as 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 related technologies, or all or part of the 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 to cause a computer device (which may be a personal computer, server, or 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 capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0149] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of the claims of the present invention.
Claims
1. A load mass identification method of a SCARA robot, characterized by, The method comprises the following steps: obtaining a corresponding relationship between a load mass and a current of the SCARA robot obtained through prior testing or a function relationship between the load mass and the current of the SCARA robot obtained through prior fitting, wherein the current is a third-axis current of the robot; when the SCARA robot is in a position mode, and an enable flag is valid and a position instruction is 0, identifying an initial mass of a load of the SCARA robot according to the corresponding relationship between the load mass and the current or the function relationship between the load mass and the current; when the SCARA robot is in the position mode, the enable flag is valid, and the position instruction is not 0, comparing the identified initial mass with a mass set by a gravity load instruction to determine whether the setting of the gravity load instruction is reasonable; if it is determined that the setting of the gravity load instruction is unreasonable, issuing a corresponding prompt information; obtaining a corresponding relationship between a load mass of the SCARA robot and a current difference caused by a friction force and a gravity of the SCARA robot when the SCARA robot runs upward and downward; sampling the current of the SCARA robot every n execution cycles to obtain m times of sampled currents, and calculating an average value of the m times of sampled currents, denoted as a first current average value; determining a current difference caused by the friction force and the gravity of the SCARA robot when the SCARA robot runs upward and downward in an empty state according to the corresponding relationship and the first current average value, denoted as a first current difference value; sampling the current of the SCARA robot every n execution cycles to obtain m times of sampled currents, and calculating an average value of the m times of sampled currents, denoted as a second current average value; judging whether an absolute value of a difference between the first current average value and the second current average value is greater than an absolute value of the first current difference value; if it is judged that the absolute value of the difference between the first current average value and the second current average value is greater than the absolute value of the first current difference value, correcting the load mass of the SCARA robot.
2. The method of claim 1, wherein, The function relationship between the load mass and the current is obtained through function fitting based on the corresponding relationship between the load mass and the current of the SCARA robot obtained through prior testing, and the function relationship between the load mass and the current is represented as: wherein F is the load mass, Iq is the cross-axis current, Kt is a torque coefficient, and a is a conversion coefficient of the load mass and the current; the conversion coefficient of the load mass and the current in the function relationship is obtained based on the corresponding relationship between the load mass and the current.
3. The method of claim 1, wherein, The comparison of the identified initial mass with the mass set by the gravity load instruction to determine whether the setting of the gravity load instruction is reasonable comprises the following steps: judging whether an absolute value of a difference between the initial mass and the mass set by the gravity load instruction is less than a first preset difference value; if it is judged that the absolute value of the difference is less than the first preset difference value, it is determined that the mass setting of the gravity load instruction is reasonable; and if it is judged that the absolute value of the difference is not less than the first preset difference value, it is determined that the mass setting of the gravity load instruction is unreasonable.
4. The method according to any one of claims 1 to 3, characterized in that, According to the correspondence between the load mass and the current or the function relationship between the load mass and the current, an initial mass of the load of the SCARA robot is identified, comprising: The current of the SCARA robot is sampled every n execution cycles to obtain m sampled currents, and an average of the m sampled currents is calculated and recorded as a first current average; According to the first current average, the initial mass of the load of the SCARA robot is calculated by using the correspondence between the load mass and the current or the function relationship between the load mass and the current.
5. The method of claim 1, wherein, The load mass of the SCARA robot is corrected, comprising: According to the second current average, the mass of the load of the robot is identified by using the correspondence between the load mass and the current or the function relationship between the load mass and the current, and recorded as a first mass; The corrected load mass of the robot is equal to the average of the initial mass and the first mass.
6. The method of claim 1 or 5, wherein, After the load mass of the SCARA robot is corrected, it is judged whether the absolute value of the difference between the corrected load mass and the mass set by the gravity load instruction is less than a second preset difference value; If it is judged that the absolute value of the difference is less than the second preset difference value, the load mass identification is no longer continued in the enabled state of the SCARA robot until the motor of the SCARA robot is enabled to 0.
7. A load mass identification device of an SCARA robot, characterized by, Comprising: The first acquisition unit is configured to acquire the correspondence between the load mass of the SCARA robot and the current obtained by prior testing or the function relationship between the load mass of the robot and the current obtained by prior fitting; the current is the third axis current of the robot; The first identification unit is configured to, when the SCARA robot is in a position mode and the enable flag is valid and the position instruction is 0, identify an initial mass of the load of the SCARA robot according to the correspondence between the load mass and the current or the function relationship between the load mass and the current; The first determination unit is configured to, when the SCARA robot is in a position mode and the enable flag is valid and the position instruction is not 0, compare the identified initial mass with the mass set by the gravity load instruction to determine whether the setting of the gravity load instruction is reasonable; The prompting unit is configured to issue corresponding prompt information if the determination unit determines that the setting of the gravity load instruction is unreasonable; The second acquisition unit is configured to acquire the correspondence between the load mass of the SCARA robot and the current difference caused by the friction force and the gravity of the SCARA robot when the SCARA robot runs up and down, which is pre-configured; The first identification unit is configured to sample the current of the SCARA robot every n execution cycles to obtain m sampled currents, and calculate an average of the m sampled currents and record it as a first current average; A second determining unit is configured to determine a current difference caused by friction force and gravity of the SCARA robot when the SCARA robot is running up and down in an empty state according to the correspondence relationship and the first current average value, and the current difference is recorded as a first current difference; A calculating unit is configured to sample the current of the SCARA robot every n execution periods, obtain m times of sampled currents, and calculate an average value of the m times of sampled currents, and the average value is recorded as a second current average value; A first judging unit is configured to judge whether an absolute value of a difference between the first current average value and the second current average value is greater than an absolute value of the first current difference; A correcting unit is configured to correct the load mass of the SCARA robot if the absolute value of the difference between the first current average value and the second current average value is greater than the absolute value of the first current difference.
8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer readable medium, and the program is executed by the processor to implement the steps of the method according to any one of claims 1-6.
9. A robot controller characterized by A load mass identification device comprises a processor, a memory, and a computer program stored on the memory and executable on the processor, and the processor executes the program to implement the steps of the method according to any one of claims 1-6, or the load mass identification device according to claim 7.
10. A computer program product, characterised in that, A computer program is stored on the computer readable medium, and the program is executed by the processor to implement the steps of the method according to any one of claims 1-6.
Citation Information
Patent Citations
Load parameter detection method and device, storage medium and collaborative robot
CN117444957A
Loading weight of articulated robot and automatic calculation method for position of gravity center of loading weight
JP2004025387A