Position compensation method, device and computer readable storage medium
By adjusting the speed through calculation of delay duration and compensation cycle, the error problem caused by the time deviation between the command position and the feedback position in the dispensing equipment is solved, achieving precise compensation of the dispensing position and improving the accuracy of the dispensing equipment.
Patent Information
- Application Number
- CN202210590733.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-27
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-05-27
AI Technical Summary
In the prior art, dispensing equipment based on motion controller position planning suffers from dispensing position errors due to a time deviation between the command position time and the actual time the dispensing equipment arrives at the command position, which affects the dispensing effect.
By calculating the delay duration, the target compensation segment is determined based on the preset command position and feedback time. Within the target compensation segment, the speed is adjusted according to the preset compensation cycle to reduce dispensing position error.
It effectively reduces the error in dispensing position and improves the accuracy and precision of dispensing.
Smart Images

Figure CN114995283B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to, but are not limited to, the technical field of error compensation, and particularly relate to a position compensation method, device and computer readable storage medium. BACKGROUND
[0002] In the related art, the dispensing strategy of a dispensing device based on motion controller position planning is often triggered according to the planned position, that is, according to the instruction position output by the motion controller. However, there is a certain time deviation between the output instruction position time and the time when the dispensing device actually reaches the instruction position, thereby causing errors in the dispensing position. SUMMARY
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] Embodiments of the present application provide a position compensation method, device and computer readable storage medium, which can compensate the target position to reduce the error of the dispensing position.
[0005] In a first aspect, embodiments of the present application provide a position compensation method, comprising:
[0006] calculating a delay duration according to the issuing time of a preset instruction position and the feedback time of reaching the preset instruction position;
[0007] determining a target compensation segment according to the delay duration and a preset motion speed curve corresponding to the target position, wherein the target compensation segment corresponds to a non-uniform speed segment of the motion speed curve;
[0008] adjusting the speed according to a preset compensation period in the target compensation segment to compensate the target position, wherein the speed corresponding to the end time of the target compensation segment is the preset speed at the end of the non-uniform speed segment.
[0009] In some embodiments, the delay duration is calculated according to the issuing time of a preset instruction position and the feedback time of reaching the preset instruction position, comprising:
[0010] calculating the time difference between the issuing time of a plurality of preset instruction positions and the corresponding feedback time of reaching the preset instruction position to obtain a time sequence set;
[0011] averaging the time sequence set to obtain the delay duration.
[0012] In some embodiments, the compensation period is obtained by the following steps:
[0013] obtaining a preset compensation acceleration and a set acceleration;
[0014] The compensation period is calculated according to the compensation acceleration and the set acceleration, wherein a ratio of the compensation acceleration to the set acceleration is greater than or equal to a preset value.
[0015] In some embodiments, the speed adjustment is performed in the target compensation section according to the preset compensation period to perform position compensation on the target position, including:
[0016] The target compensation section is divided according to the compensation period to obtain a plurality of set sections and compensation sections, wherein the compensation sections and the set sections are alternately connected;
[0017] The compensation data is calculated in the to-be-adjusted compensation section according to a preset instruction period based on the compensation acceleration and a previous set section of the to-be-adjusted compensation section, to obtain compensation position data and compensation speed data corresponding to the to-be-adjusted compensation section;
[0018] The set data is calculated in the to-be-adjusted set section according to the instruction period based on the set acceleration and a previous compensation section of the to-be-adjusted set section, to obtain set position data and set speed data corresponding to the to-be-adjusted set section;
[0019] The compensation period is an integer multiple of the instruction period, and the compensation position data, the compensation speed data, the set position data and the set speed data are all used for position adjustment in the target compensation section to perform position compensation on the target position.
[0020] In some embodiments, the starting section of the target compensation section is a first compensation section, and the first compensation section is one of the plurality of compensation sections.
[0021] In some embodiments, the target compensation section is determined according to the delay duration and a preset motion speed curve corresponding to the target position, including:
[0022] An acceleration time section and a deceleration time section are determined according to the delay duration and the preset motion speed curve corresponding to the target position.
[0023] The acceleration time section and the deceleration time section are respectively taken as the target compensation section.
[0024] In some embodiments, the acceleration time section and the deceleration time section are determined according to the delay duration and the preset motion speed curve corresponding to the target position, including:
[0025] According to the time delay duration and the preset target position corresponding motion speed curve, an acceleration time period, a uniform speed time period and a deceleration time period are determined, wherein the end moment of the acceleration time period corresponds to the initial moment of the uniform speed time period, the end moment of the uniform speed time period corresponds to the initial moment of the deceleration time period, and the speed corresponding to the end moment of the deceleration time period is the preset speed.
[0026] In a second aspect, the embodiments of the present application further provide a dispensing equipment for executing the position compensation method in the first aspect.
[0027] In a third aspect, the embodiments of the present application further provide a position compensation equipment, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to realize the position compensation method in the first aspect.
[0028] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium storing computer executable instructions for executing the position compensation method in the first aspect.
[0029] The embodiments of the present application comprise: calculating a time delay duration according to the feedback time of reaching the preset instruction position and the time of issuing the preset instruction position; determining a target compensation section according to the time delay duration and the preset target position corresponding motion speed curve, wherein the target compensation section corresponds to the non-uniform speed section of the motion speed curve; and adjusting the speed according to the preset compensation period in the target compensation section, so as to compensate the target position and reduce the error of the dispensing position.
[0030] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be achieved and obtained by the structure particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0031] The accompanying drawings are used to provide a further understanding of the technical solutions of the present application, and constitute a part of the specification, and are used to explain the technical solutions of the present application together with the embodiments of the present application, and do not constitute a limitation to the technical solutions of the present application.
[0032] Figure 1 is a flowchart of the position compensation method provided by an embodiment of the present application;
[0033] Figure 2 is a flowchart of the time delay duration provided by an embodiment of the present application;
[0034] Figure 3is a schematic diagram of changes in the preset command position and the feedback position before compensation provided by an embodiment of the present application;
[0035] Figure 4 is a schematic diagram of changes in the preset command position and the feedback position before compensation provided by an embodiment of the present application;
[0036] Figure 5 is a schematic diagram of changes in the preset command position and the feedback position before compensation provided by an embodiment of the present application;
[0037] Figure 6 is a schematic diagram of changes in the preset command position and the feedback position before compensation provided by an embodiment of the present application;
[0038] Figure 7 is a schematic diagram of changes in the preset command position and the feedback position before compensation provided by an embodiment of the present application;
[0039] Figure 8 is a schematic diagram of a compensation cycle provided by an embodiment of the present application;
[0040] Figure 9 is a schematic diagram of a compensation cycle provided by an embodiment of the present application;
[0041] Figure 10 is a schematic diagram of a compensation cycle provided by an embodiment of the present application;
[0042] Figure 11 is a schematic diagram of a compensation cycle provided by an embodiment of the present application;
[0043] Figure 12 is a schematic diagram of changes in the preset command position and the feedback position before compensation provided by an embodiment of the present application;
[0044] Figure 13 is a schematic diagram of changes in the preset command position and the feedback position before compensation provided by an embodiment of the present application;
[0045] Figure 14 is a schematic diagram of a compensation cycle provided by an embodiment of the present application; DETAILED DESCRIPTION
[0046] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0047] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a manner different from the module division in the device or the order in the flowchart. The terms "first", "second", and the like in the description and claims and the above drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0048] Dispensing equipment, also known as glue filling machine, is a device specially used for controlling fluid and applying fluid on the surface or inside of a product, and is widely used in various fields of intelligent manufacturing. The dispensing equipment is mainly used for: positioning the dispensing target, planning the dispensing trajectory, and performing intermittent dispensing operation according to the pre-set dispensing trajectory.
[0049] In the related art, the dispensing strategy of the dispensing equipment based on the position planning of the motion controller is usually triggered according to the planned position, that is, according to the instruction position output by the motion controller. However, there is a certain time deviation between the output instruction position time and the feedback time of the dispensing equipment actually reaching the instruction position, which further causes the error of the dispensing position and affects the dispensing effect.
[0050] Based on this, the embodiments of the present application provide a position compensation method, equipment and computer readable storage medium, which can reduce the error between the issuing time of the preset instruction position and the feedback time of reaching the preset instruction position, and improve the dispensing accuracy.
[0051] The embodiments of the present application will be further described below with reference to the accompanying drawings.
[0052] The first aspect of the present application specifically provides a position compensation method, as shown in Figure 1 Figure 1 is a flowchart of the position compensation method provided by an embodiment of the present application.
[0053] The position compensation method of the embodiments of the present application includes but is not limited to the following steps:
[0054] Step S100, calculating a delay duration according to the issuing time of the preset instruction position and the feedback time of reaching the preset instruction position;
[0055] Step S200, determining a target compensation segment according to the delay duration and the preset motion speed curve corresponding to the target position, wherein the target compensation segment corresponds to a non-uniform speed segment of the motion speed curve;
[0056] Step S300, adjusting the speed according to the preset compensation period in the target compensation segment to compensate the position of the target position, wherein the speed corresponding to the end moment of the target compensation segment is the preset speed at the end of the non-uniform speed segment.
[0057] It should be noted that, according to the issuing time of the preset instruction position and the feedback time of reaching the preset instruction position, the delay duration is calculated; according to the delay duration, the preset target position corresponding motion speed curve, the target compensation segment is determined, wherein the target compensation segment corresponds to the non-uniform speed segment of the motion speed curve, and the preset instruction position corresponds to the preset target position; and the speed adjustment is performed in the target compensation segment according to the preset compensation period, so that the position compensation of the target position is performed to reduce the error of the dispensing position.
[0058] It should be noted that, since there is a certain time deviation between the instruction position time output by the dispensing equipment and the actual time of reaching the instruction position, the delay duration is calculated according to the issuing time of the preset instruction position and the feedback time of reaching the preset instruction position. The obtained delay duration can be used for position compensation of the subsequent target position.
[0059] In practice, the feedback time of reaching the preset instruction position has deviation, so the feedback position corresponding to the feedback time needs to be compensated in the present application to obtain the target position, thereby reducing the error of the dispensing position. Specifically, the speed adjustment is performed in the target compensation segment according to the preset compensation period, until the speed corresponding to the end time of the target compensation segment is the preset speed at the end of the non-uniform speed segment. It should be noted that the speed corresponding to the end time of the target compensation segment is the preset speed at the end of the non-uniform speed segment, and the preset speed can be the speed corresponding to the arrival at the target position after the position compensation.
[0060] In the present application, the target compensation segment corresponds to the non-uniform speed segment of the motion speed curve. For the uniform speed time segment, since the position and speed adjustment have been realized in the target compensation segment, no position and speed adjustment is needed when entering the uniform speed time segment after passing through the target compensation segment.
[0061] Exemplarily, the preset target position is the dispensing position.
[0062] Referring to Figure 2 It can be understood that, according to the issuing time of the preset instruction position and the feedback time of reaching the preset instruction position, the delay duration is calculated, including but not limited to the following steps:
[0063] Step S101, calculating the time difference between the issuing time of a plurality of preset instruction positions and the corresponding feedback time of reaching the preset instruction position, to obtain a time sequence set;
[0064] Step S102, performing average value calculation on the time sequence set to obtain the delay duration.
[0065] Specifically, the present application can be applied to the compensator of the dispensing equipment, the motion controller communicates with the compensator, and the motion controller issues the preset instruction position to the compensator.
[0066] Through the compensator, the length L of the fixed trajectory straight line segment corresponding to the expected speed V, the expected acceleration A and other front information are obtained from the upper computer. set set
[0067] Based on the trajectory straight line segment, the time difference Δt' between the time of issuing a plurality of preset instruction positions and the feedback time of reaching the preset instruction positions is calculated, and a time sequence set {Δt1, Δt2,..., Δt n} is obtained.
[0068] The average value of the time sequence set is calculated to obtain the time delay duration T delay .
[0069] It should be noted that the time delay duration T delay characterizes the average value of the sequence elements in the time sequence set. The calculation formula is:
[0070]
[0071] Wherein, T delay represents the time delay duration corresponding to the target position (as shown in Figure 3 ), n represents the number of sequence elements in the time sequence set, and i = 1, 2, 3,..., n.
[0072] It should be noted that for the instruction period T of the motion controller, T delay is a positive integer multiple of T, that is, T delay ∈N * T.
[0073] Referring to Figure 3 , Figure 4 , it can be seen that there is a certain time deviation between the output instruction position time and the actual time of the feedback point glue equipment reaching the instruction position. Specifically, the instruction speed of the motion controller before compensation deviates greatly from the feedback speed, which further leads to a large difference between the preset instruction position before compensation and the feedback position obtained according to the feedback time of the preset instruction position.
[0074] Comparing with Figure 5 , Figure 6 , Figure 7 , it can be seen that the position compensation method of the embodiment of the application can effectively reduce the time deviation between the output instruction position and the feedback position. Specifically, by continuously adjusting the speed of the target compensation segment, the time deviation between the output instruction position and the feedback position is reduced, and the feedback position is closer to the target position. Figure 5 The compensation before and after the change of the command speed is shown. It can be understood that the command speed after compensation of the embodiments of the present application is basically coincided with the feedback speed, and the preset command position after compensation is basically coincided with the feedback position, i.e. the target position. The target position is obtained after multiple speed adjustments in the target compensation segment according to the preset compensation period. Through multiple position compensation, the preset command position and the target position are basically consistent, and the glue dispensing accuracy is improved.
[0075] Referring to Figure 8 It can be understood that the compensation period is obtained by the following steps:
[0076] In step S201, a preset compensation acceleration and a set acceleration are obtained.
[0077] In step S202, a compensation period is calculated according to the compensation acceleration and the set acceleration, wherein the ratio of the compensation acceleration and the set acceleration is greater than or equal to a preset value.
[0078] It should be noted that the set acceleration is A1, and the compensation acceleration during pre-compensation is A2.
[0079] Referring to Figure 9 Since the feedback speed lags behind the command speed, and the lag time is the delay time T delay , after compensation of the feedback speed, the feedback speed can track the command speed after the compensation period Δt. Therefore, it can be known that:
[0080] Set acceleration:
[0081] Compensation acceleration:
[0082] Wherein, Δv represents the speed difference between the command speed and the speed corresponding to the motion speed curve at the time of issuing the command speed; Δt represents the compensation period.
[0083] Then the compensation period is obtained:
[0084]
[0085] It should be noted that Δt is an integer multiple of the command period T, and the ratio of the compensation acceleration A2 and the set acceleration A1 is greater than or equal to a preset value, for example, And That is, in some embodiments, the preset value is 2, and the compensation acceleration A2 is an integer multiple of the set acceleration A1.
[0086] Referring to Figure 10 It can be understood that the target compensation segment is determined according to the delay time, the motion speed curve corresponding to the preset target position, including but not limited to the following steps:
[0087] In step S210, the acceleration time period and the deceleration time period are determined according to the time delay duration and the preset motion speed curve corresponding to the target position.
[0088] In step S220, the acceleration time period and the deceleration time period are taken as the target compensation period respectively.
[0089] It should be noted that the preset motion speed curve corresponding to the target position can be a T-curve velocity profile. The T-curve velocity profile is a time-optimal curve. In general, the processes of the acceleration time period and the deceleration time period are symmetrical. Assuming that the upper limit of the speed is v max , and the upper limit of the acceleration is a max , the trajectory generated under these conditions is time-optimal when the controlled object moves from the point x to the point y.
[0090] The motion speed curve can also be a speed curve containing multiple acceleration time periods or multiple deceleration time periods. Taking the T-curve velocity profile as an example:
[0091] Suppose that the starting time of the target compensation period is taken as a compensation period Δt, that is, in the embodiment of the present application, the acceleration time period and the deceleration time period are determined according to the time delay duration T delay , and the preset motion speed curve, that is, the T-curve velocity profile. delay The acceleration time period is [0, t1-Δt-T delay ], and the deceleration time period is [t1+t2, t1+t2+t3-2T ]. The acceleration time period and the deceleration time period of the embodiment of the present application are both target compensation periods.
[0092] The calculation formulas of t1, t2, and t3 are as follows:
[0093]
[0094] , t2 represents the uniform speed time of the T-curve velocity profile, t3 represents the deceleration time of the T-curve velocity profile, V set represents the expected speed at the end of the acceleration time period in the T-curve velocity profile, A set represents the expected acceleration, s0 represents the initial position, and s' represents the target position.
[0095] It can be understood that the acceleration time period and the deceleration time period are determined according to the time delay duration and the preset motion speed curve corresponding to the target position, including: the acceleration time period, the uniform speed time period, and the deceleration time period are determined according to the time delay duration and the preset motion speed curve corresponding to the target position.
[0096] It should be noted that the preset target position corresponding to the motion speed curve of the embodiment of the present application can be a T-shaped speed curve planning. In the state of overall system high-speed starting and braking, the performance of the overall system can be improved. For example, every time the dispensing device completes a dispensing action, a total of three processes, uniform acceleration, uniform speed, and uniform deceleration, are included. Specifically, according to the delay time length and the preset target position corresponding to the motion speed curve, the acceleration time period, the uniform speed time period, and the deceleration time period can be determined.
[0097] Specifically, the end time of the acceleration time period corresponds to the initial time of the uniform speed time period, the end time of the uniform speed time period corresponds to the initial time of the deceleration time period, and the end time of the deceleration time period corresponds to the preset speed.
[0098] Since position compensation has been performed multiple times based on the target compensation segment, i.e., the acceleration time period, in the compensated trajectory, there is no need to adjust the position and speed, i.e., the trajectory tracking error in the uniform speed time period is 0. By such a setting, the error of the dispensing position can be effectively reduced.
[0099] Reference Figure 11 It can be understood that the speed is adjusted in the target compensation segment according to the preset compensation period to compensate the position of the target position, including but not limited to the following steps:
[0100] Step S301, the target compensation segment is divided according to the compensation period to obtain a plurality of set segments and compensation segments, wherein the compensation segments and the set segments are alternately connected;
[0101] Step S302, based on the compensation acceleration and the previous set segment of the compensation segment to be adjusted, compensation data is calculated in the compensation segment to be adjusted according to the preset instruction period to obtain compensation position data and compensation speed data corresponding to the compensation segment to be adjusted;
[0102] Step S303, based on the set acceleration and the previous compensation segment of the set segment to be adjusted, set data is calculated in the set segment to be adjusted according to the instruction period to obtain set position data and set speed data corresponding to the set segment to be adjusted; wherein the compensation period is an integer multiple of the instruction period, and the compensation position data, the compensation speed data, the set position data, and the set speed data are all used for position adjustment in the target compensation segment to compensate the position of the target position.
[0103] Specifically, the embodiment of the present application adjusts the speed multiple times in the target compensation segment according to the preset instruction period to compensate the position of the target position. Through multiple adjustments, a more accurate target position can be obtained, for example Figure 7 as shown.
[0104] It should be noted that for the preset target position corresponding motion speed curve, since there is a certain time deviation between the output instruction position time and the feedback point gluing device actually reaching the instruction position time, it is necessary to adjust the speed in the target compensation segment. Specifically, according to the compensation period, the target compensation segment is divided to obtain a plurality of set segments and compensation segments. The compensation segment represents the stage of speed adjustment according to the compensation acceleration, and the set segment represents the stage of speed adjustment according to the set acceleration.
[0105] The compensation segment and the set segment of the embodiment of the application are alternately connected to realize multiple correction. By compensating acceleration and set position data and set speed data of the previous set segment of the compensation segment to be adjusted, compensation data is calculated in the compensation segment to be adjusted according to the preset instruction period, and compensation position data and compensation speed data corresponding to the compensation segment to be adjusted are obtained. Based on the set acceleration and the compensation position data and the compensation speed data of the previous compensation segment of the set segment to be adjusted, set data is calculated in the set segment to be adjusted according to the instruction period, and set position data and set speed data corresponding to the set segment to be adjusted are obtained. The set speed data corresponding to the last set segment or the compensation speed data corresponding to the last compensation segment is the speed corresponding to the end time of the target compensation segment, that is, the preset speed at the end of the non-uniform speed segment. Thus, by multiple speed adjustments, the position of the target position is compensated, and the error is effectively reduced.
[0106] Exemplarily, the preset target position corresponding motion speed curve of the embodiment of the application can be a T-shaped speed curve planning. Therefore, according to the delay time length and the preset target position corresponding motion speed curve, the acceleration time period, the uniform speed time period and the deceleration time period can be determined. Specifically, in the embodiment of the application, the target compensation segment includes the acceleration time period and the deceleration time period, and the starting segment of the acceleration time period is the first compensation segment.
[0107] It can be understood that the starting segment of the target compensation segment is the first compensation segment, and the first compensation segment is one of the plurality of compensation segments. Specifically, based on the compensation acceleration and the initial speed, compensation data is calculated in the first compensation segment according to the instruction period, and compensation position data and compensation speed data corresponding to the first compensation segment are obtained. Setting the starting segment of the target compensation segment as the first compensation segment makes the embodiment of the application start position compensation from the starting position, so as to effectively reduce the time deviation caused in the trajectory motion process.
[0108] Specifically, the acceleration time period is [0, t1-Δt-T delay],in the acceleration time period, the acceleration time period is divided into a first set period and two compensation periods according to a compensation period Δt, wherein the first set period is connected between the two compensation periods. The two compensation periods are defined as a first compensation period (i.e. the starting period of the acceleration time period) and a second compensation period, and the first compensation period, the first set period and the second compensation period are connected in sequence.
[0109] For the first compensation period, compensation data is calculated in the first compensation period according to the instruction period based on the compensation acceleration A2 and the initial speed v0, to obtain compensation position data and compensation speed data corresponding to the first compensation period.
[0110] For the first compensation period, i.e. when the time is [0, Δt],
[0111]
[0112] Since the initial speed v0=0 when t=0, B=0, wherein the B variable represents the initial speed;
[0113] When t=Δt, v1=A2Δt;
[0114] Wherein Δt represents the compensation period, t variable represents the compensation time data corresponding to the first compensation period, a represents the acceleration corresponding to the first compensation period, i.e. the compensation acceleration A2, v represents the compensation speed data corresponding to the first compensation period, s represents the compensation position data corresponding to the first compensation period, s0 represents the initial position, i.e. the position corresponding to the dispensing, v1 represents the compensation speed data corresponding to the first compensation period when t=Δt, s1 represents the compensation position data corresponding to the first compensation period when t=Δt;
[0115] Based on the set acceleration A1 and the previous compensation period of the first set period to be adjusted, i.e. the first compensation period, set data is calculated in the first set period according to the instruction period, to obtain set position data and set speed data corresponding to the first set period;
[0116] For the first set period, i.e. when the time is [Δt, t1-2Δt-T delay ],
[0117]
[0118] Since v2=v1 when t=Δt, B1=0, wherein the B1 variable represents the initial speed;
[0119] When t=t1-T delay -2Δt, v2=A1(t1-3Δt-T delay )+v1;
[0120] Wherein, Δt represents the compensation period, t variable represents the set time data corresponding to the first set section, a represents the acceleration corresponding to the first set section, that is, the set acceleration A1, v represents the set speed data corresponding to the first set section, s represents the set position data corresponding to the first set section, v2 represents the set speed data corresponding to the first set section when t=t1-T delay -2Δt, s2 represents the set position data corresponding to the first set section when t=t1-T delay -2Δt.
[0121] Then, based on the compensation acceleration A2 and the previous set section of the second compensation section to be adjusted, that is, the first set section, the compensation data in the second compensation section is calculated according to the preset instruction period, and the compensation position data and the compensation speed data corresponding to the second compensation section are obtained.
[0122] For the second compensation section, that is, when the time is [t1-2Δt-T delay ,t1-Δt-T delay ],
[0123]
[0124] According to the first set section, B2=0 can be obtained, wherein the B2 variable represents the initial speed.
[0125] When t=t1-T delay -Δt, v3=A2Δt+v2=V set .
[0126] Wherein, Δt represents the compensation period, t variable represents the set time data corresponding to the first set section, a represents the acceleration corresponding to the first set section, that is, the set acceleration A1, v represents the set speed data corresponding to the first set section, s represents the set position data corresponding to the first set section, v2 represents the set speed data corresponding to the first set section when t=t1-T delay -2Δt, s2 represents the set position data corresponding to the first set section when t=t1-T delay -2Δt.
[0127] For the uniform speed time section, it is [t1-Δt-T delay ,t1+t2], that is, the initial time of the uniform speed time section corresponds to the end time of the acceleration time section, the end time of the uniform speed time section corresponds to the initial time of the deceleration time section, and the speed corresponding to the end time of the deceleration time section is the preset speed.
[0128] For the uniform speed time section, that is, when the time is [t1-Δt-T delay ,t1+t2],
[0129]
[0130] s4 = v3 (t2 + Δt + T delay ) + s3, v4 = v3 = V set ;
[0131] wherein, Δt represents the compensation period, t variable represents the uniform speed time data corresponding to the uniform speed time period, a represents the acceleration corresponding to the uniform speed time period, i.e. 0, v represents the uniform speed data corresponding to the uniform speed time period, s represents the uniform position data corresponding to the uniform speed time period, v4 represents the uniform speed data corresponding to the uniform speed time period when t = t1 + t2, at this time, v4 = v3 = V set , V set represents the expected speed at the end of the corresponding acceleration time period in the T-shaped speed curve planning, and s4 represents the uniform position data corresponding to the uniform speed time period when t = t1 + t2.
[0132] It should be noted that the deceleration time period is [t1 + t2, t1 + t2 + t3 - 2T delay ], and in the deceleration time period, the deceleration time period is divided into a second set section and two compensation sections according to the compensation period Δt, wherein the second set section is connected between the two compensation sections. The two compensation sections are defined as a third compensation section and a fourth compensation section (i.e. the speed at the end of the deceleration time period is the preset speed at the end of the non-uniform speed section), and the third compensation section, the second set section and the fourth compensation section are connected in sequence.
[0133] Then, based on the compensation acceleration and the uniform speed time period, compensation data is calculated in the third compensation section to be adjusted according to the preset instruction period, to obtain compensation position data and compensation speed data corresponding to the third compensation section to be adjusted;
[0134] For the third compensation section, i.e. when the time is [t1 + t2, t1 + t2 + Δt],
[0135]
[0136] when t = t1 + t2 + Δt, v5 = v4 - A2Δt;
[0137] wherein, Δt represents the compensation period, t variable represents the compensation time data corresponding to the third compensation section, a represents the acceleration corresponding to the third compensation section, i.e. the compensation acceleration -A2, v represents the compensation speed data corresponding to the third compensation section, s represents the compensation position data corresponding to the third compensation section, v5 represents the compensation speed data corresponding to the third compensation section when t = t1 + t2 + Δt, and s5 represents the compensation position data corresponding to the third compensation section when t = t1 + t2 + Δt.
[0138] Based on the set acceleration and a previous compensation segment, i.e. a third compensation segment, of the second set segment to be adjusted, set data is calculated in the second set segment according to the instruction period, and set position data and set speed data corresponding to the second set segment are obtained;
[0139] For the second set segment, i.e. when the time is [t1+t2+Δt, t1+t2+t3-2T delay -Δt],
[0140]
[0141] When t=t1+t2+t3-Δt-2T delay ,
[0142] v6=v5-A1(t3-2Δt-2T delay );
[0143] Wherein, Δt represents a compensation period, t variable represents set time data corresponding to the second set segment, a represents acceleration corresponding to the second set segment, i.e. set acceleration-A1, v represents set speed data corresponding to the second set segment, s represents set position data corresponding to the second set segment, v6 represents set speed data corresponding to the second set segment when t=t1+t2+t3-Δt-2T delay , s6 represents set position data corresponding to the second set segment when t=t1+t2+t3-Δt-2T delay ;
[0144] Then, based on the compensation acceleration and a previous set segment, i.e. the second set segment, of the fourth compensation segment to be adjusted, compensation data is calculated in the fourth compensation segment according to a preset instruction period, and compensation position data and compensation speed data corresponding to the fourth compensation segment are obtained;
[0145] For the fourth compensation segment, i.e. when the time is [t1+t2+t3-2T delay -Δt, t1+t2+t3-2T delay ],
[0146]
[0147] When t=t1+t2+t3-2T delay ,
[0148]
[0149] Wherein, At represents the compensation period, t variable represents the compensation time data corresponding to the fourth compensation segment, a represents the acceleration corresponding to the fourth compensation segment, that is, the compensation acceleration -A2, v represents the compensation speed data corresponding to the fourth compensation segment, s represents the compensation position data corresponding to the fourth compensation segment, v7 represents the compensation speed data corresponding to the fourth compensation segment when t=t1+t2+t3-2T delay s7 represents the compensation position data corresponding to the fourth compensation segment when t=t1+t2+t3-2T delay s7 represents the compensation position data corresponding to the fourth compensation segment when t=t1+t2+t3-2T
[0150] It should be noted that s7 represents the preset target position obtained after multiple speed adjustments in the acceleration time period and the deceleration time period according to the preset compensation period; v7 represents the speed corresponding to the end time of the fourth compensation segment, that is, the preset speed at the end of the non-uniform speed segment. At this time, the target position has been compensated multiple times, that is, the dispensing position corresponding to the preset instruction position is obtained. Through such setting, the error can be effectively reduced, and the dispensing accuracy can be improved.
[0151] In some embodiments, the preset instruction position issued by the motion controller is position compensated by the compensator, and then the target position after position compensation is sent to the driver, so as to complete the position compensation.
[0152] It should be noted that the embodiments of the present application propose a position compensation method for the trajectory tracking error problem existing in the trajectory planning process of the dispensing equipment, which can realize online real-time compensation to solve the error problem in time dimension between the instruction position output by the motion controller, that is, the trajectory instruction value, and the trajectory feedback value reaching the instruction position.
[0153] Referring to Figure 12 , Figure 13 , the feedback position before and after compensation in data simulation is compared with the preset instruction position issued by the motion controller, and Table 1 is obtained:
[0154] Table 1: Comparison of tracking errors before and after compensation in each planning stage
[0155] Phase of motion velocity profile Tracking error before compensation Tracking error after compensation Acceleration time period 0→25000 0→813→0 Constant velocity time period 25000 0 Deceleration time period 25000→0 0→-813→0
[0156] It should be noted that according to Table 1, the maximum trajectory tracking error of the acceleration time period and the deceleration time period before compensation is 25000 length units, and the maximum trajectory tracking error of the acceleration time period and the deceleration time period after compensation is 813 length units, that is, the trajectory tracking error in the acceleration and deceleration time period after compensation is reduced by 25000 / 813=30.75 times. The uniform speed time period occupies the largest part of the trajectory of the motion speed curve, that is, the T-shaped speed curve planning. The trajectory tracking error of the entire uniform speed time period before compensation always remains at 25000 length units, and the trajectory tracking error of the entire uniform speed time period in the trajectory after compensation always remains at 0.
[0157] Therefore, the embodiment of the present application solves the tracking error problem caused by the preset instruction position of the motion controller and the feedback position after the execution of the driver to some extent. For the working scene using the instruction position trigger signal in the application process, the time deviation between the output instruction position and the actual arrival instruction position is reduced, and the product precision and reliability are effectively improved.
[0158] The embodiment of the present application also provides a dispensing equipment for executing the position compensation method of the first aspect.
[0159] Reference Figure 14 It can be understood that the dispensing equipment of the embodiment of the present application comprises a motion controller, a compensator and a driver.
[0160] The motion controller is used to send a preset instruction position to the compensator;
[0161] The compensator is used to execute the position compensation method of the first aspect and send the set position data or the compensation position data corresponding to the preset speed, i.e., the target position, to the driver;
[0162] The driver is used to receive the set position data or the compensation position data to execute the dispensing operation on the target position after the position compensation.
[0163] The embodiment of the present application can effectively reduce the trajectory tracking error by compensating the preset instruction position of the motion controller and then sending it to the driver for execution. Through the above method, the equipment precision can be improved, the development difficulty can be reduced, and the time cost can be saved without changing the position instruction corresponding to the preset instruction position output by the motion controller.
[0164] Meanwhile, the embodiment of the present application is aimed at the closed and unmodifiable motion controller, and the compensator is set to receive the position compensation after the standard T-shaped acceleration and deceleration of the motion controller, so as to compensate the trajectory and more flexibly compensate the position of various closed-loop controllers.
[0165] In addition, the third aspect of the embodiment of the present application also provides a position compensation equipment, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor.
[0166] The processor and the memory can be connected through a bus or other means.
[0167] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0168] The non-transient software program and instructions required to implement the position compensation method of the first aspect embodiment described above are stored in memory. When executed by a processor, the position compensation method described above is executed, for example, the method described above is executed. Figure 1 Method steps S100 to S300 in the text Figure 2 Method steps S101 to S102 in the text Figure 8 Method steps S201 to S202, Figure 10 Method steps S210 to S220, Figure 11 Method steps S301 to S303.
[0169] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0170] Furthermore, one embodiment of this application also provides a computer-readable storage medium storing computer-executable instructions that are executed by a processor or controller, for example, by a processor in the above-described device embodiment, causing the processor to perform the position compensation method described above, for example, performing the above-described... Figure 1 Method steps S100 to S300 in the text Figure 2 Method steps S101 to S102 in the text Figure 8 Method steps S201 to S202, Figure 10 Method steps S210 to S220, Figure 11 Method steps S301 to S303.
[0171] As will be appreciated by one of ordinary skill in the art, all or some of the steps, systems, etc. in the methods disclosed above can be embodied in software, firmware, hardware, and / or suitable combinations thereof. Some or all of the physical components can be implemented with software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or can be implemented as hardware, or as an integrated circuit, such as an application- specific integrated circuit. Such software can be distributed on computer readable media, which can comprise computer storage media (or non-transitory media), and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Further, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and includes any information delivery media.
[0172] The above description is that of the preferred embodiments of the present application. Various equivalents substitutions of the techniques described herein can be implemented, both currently known or later developed, without departing from the spirit and scope of the application. Such equivalents substitutions are included within the scope of the claims.
Claims
1. A method of position compensation, characterized by, The method comprises the following steps: According to the preset instruction position issuing time and the feedback time of reaching the preset instruction position, the delay duration is calculated; According to the delay duration and the preset target position corresponding motion speed curve, the target compensation section is determined, wherein the target compensation section corresponds to the non-uniform speed section of the motion speed curve; In the target compensation section, the speed is adjusted according to the preset compensation period to compensate the position of the target position, wherein the speed corresponding to the end time of the target compensation section is the preset speed corresponding to the end time of the non-uniform speed section; The compensation period is obtained by the following steps: The preset compensation acceleration and the set acceleration are obtained; According to the compensation acceleration and the set acceleration, the compensation period is calculated, wherein the ratio of the compensation acceleration to the set acceleration is greater than or equal to a preset value; In the target compensation section, the speed is adjusted according to the preset compensation period to compensate the position of the target position, comprising: According to the compensation period, the target compensation section is divided to obtain a plurality of set sections and compensation sections, wherein the compensation sections and the set sections are alternately connected; Based on the compensation acceleration and the previous set section of the compensation section to be adjusted, the compensation data is calculated in the compensation section to be adjusted according to the preset instruction period, to obtain the compensation position data and the compensation speed data corresponding to the compensation section to be adjusted; Based on the set acceleration and the previous compensation section of the set section to be adjusted, the set data is calculated in the set section to be adjusted according to the instruction period, to obtain the set position data and the set speed data corresponding to the set section to be adjusted; Wherein, the compensation period is an integer multiple of the instruction period, and the compensation position data, the compensation speed data, the set position data and the set speed data are all used for position adjustment in the target compensation section to compensate the position of the target position.
2. The position compensation method according to claim 1, characterized in that, According to the preset instruction position issuing time and the feedback time of reaching the preset instruction position, the delay duration is calculated, comprising: The time difference between the issuing time of a plurality of preset instruction positions and the corresponding feedback time of reaching the preset instruction position is calculated to obtain a time sequence set; The average value of the time sequence set is calculated to obtain the delay duration.
3. The position compensation method of claim 1, wherein, The starting section of the target compensation section is a first compensation section, and the first compensation section is one of a plurality of compensation sections.
4. The position compensation method according to claim 1 or 2, characterized by, According to the delay duration and the preset target position corresponding motion speed curve, the target compensation section is determined, comprising: According to the delay duration and the preset target position corresponding motion speed curve, the acceleration time section and the deceleration time section are determined; The acceleration time section and the deceleration time section are respectively taken as the target compensation section.
5. The position compensation method according to claim 4, characterized in that, According to the delay duration and the preset target position corresponding motion speed curve, the acceleration time section and the deceleration time section are determined, comprising: According to the time delay length, the preset target position corresponding motion speed curve, determine acceleration time period, uniform velocity time period and deceleration time period, wherein, the end time of the acceleration time period corresponds to the initial time of the uniform velocity time period, the end time of the uniform velocity time period corresponds to the initial time of the deceleration time period, the end time of the deceleration time period corresponds to the speed of the preset speed.
6. A dispensing apparatus, comprising: A position compensation method for performing any one of claims 1 to 5.
7. A position compensating apparatus characterized by comprising: Comprise: Memory, processor and storage on the memory and can run on the processor of the computer program, the processor executes the computer program when realizing the position compensation method in any one of claims 1 to 5.
8. A computer readable storage medium, storing computer executable instructions, the computer executable instructions are used for executing the position compensation method in any one of claims 1 to 5.
Citation Information
Patent Citations
Industrial robot vibration suppression method
CN109799701A
External compensation method of numerical control machine tool position related error based on position prediction
CN110045681A