Dispensing position error compensation method and device, electronic equipment and storage medium
By generating a compensation relationship model between dispensing position deviation and speed, the dispensing position is compensated in real time, and the problem of dispensing position deviation at different speeds in the prior art is solved, and the dispensing accuracy and stability are improved.
Patent Information
- Application Number
- CN202411163365.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-31
AI Technical Summary
The existing dispensing position compensation method has deviations at different dispensing speeds, resulting in errors in the dispensing position after compensation, and the compensation value that depends on manual experience is unstable.
By obtaining the actual dispensing position of the dispensing device under multiple sets of preset speeds, the dispensing position deviation is calculated, and a compensation relationship model between the dispensing position deviation and the speed is generated to compensate for the dispensing position in real time and improve the dispensing accuracy .
Accurate compensation based on real-time dispensing speed is achieved, dispensing accuracy is improved, dispensing position deviation is reduced at different speeds, and instability is avoided caused by artificial experience.
Smart Images

Figure CN119226686A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of dispensing technology, and in particular relates to a dispensing position error compensation method, device, electronic device and storage medium. Background Art
[0002] Glue dispensing is a process of applying, filling, or dripping electronic glue, oil, or other liquids onto products to make them stick, fill, insulate, fix, or smooth their surfaces. The glue dispensing process is widely used in industries such as electronics manufacturing and automobile manufacturing, and the accuracy of the glue dispensing position usually directly affects the quality and performance of the product.
[0003] However, due to the influence of various factors such as equipment mechanical errors and controller response delays, there is a deviation between the expected dispensing position and the actual dispensing position during the dispensing process.
[0004] At present, a fixed compensation value is usually used to compensate the dispensing position during the dispensing process so that the actual dispensing position coincides with the expected dispensing position. However, the deviations at different dispensing speeds are different. Therefore, the above compensation method has certain defects, so that the dispensing position after compensation still has deviations. Summary of the invention
[0005] The embodiments of the present application provide a method, device, electronic device and storage medium for compensating for dispensing position errors, which can solve the problem of certain defects in existing compensation methods, resulting in deviations in dispensing positions.
[0006] In a first aspect, an embodiment of the present application provides a method for compensating for dispensing position error, the method comprising:
[0007] For any set of preset speeds, obtaining the actual dispensing position of the dispensing device when dispensing at at least one preset position during each dispensing process at the preset speed;
[0008] Calculate the dispensing position deviation at the preset speed according to each preset position and the corresponding actual dispensing position;
[0009] Based on the dispensing position deviations under multiple sets of preset speeds, a compensation relationship model between the dispensing position deviation and the speed during the dispensing process is generated;
[0010] The dispensing position in the dispensing process is compensated based on the compensation relationship model.
[0011] In a second aspect, an embodiment of the present application provides a dispensing position error compensation device, the device comprising:
[0012] An acquisition module, for acquiring, for any set of preset speeds, an actual dispensing position of the dispensing device when dispensing at least one preset position during each dispensing process at the preset speed;
[0013] A calculation module, used for calculating the dispensing position deviation at a preset speed according to each preset position and the corresponding actual dispensing position;
[0014] A generation module, for generating a compensation relationship model between dispensing position deviation and speed during dispensing based on a plurality of sets of dispensing position deviations at preset speeds;
[0015] The compensation module is used to compensate the dispensing position during the dispensing process based on the compensation relationship model.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the first aspect described above when executing the computer program.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method of the first aspect described above is implemented.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method of the first aspect.
[0019] Compared with the prior art, the embodiments of the present application have the following beneficial effects: in order to compensate for the dispensing position of the dispensing device during the dispensing process at multiple speeds, the actual dispensing position of the dispensing device during each dispensing process at each preset speed and at least one preset position can be obtained. Then, for any set of preset speeds, the dispensing position deviation at the preset speed can be calculated based on each preset position and the corresponding actual dispensing position. Afterwards, based on the dispensing position deviation at multiple sets of preset speeds, a compensation relationship model between the dispensing position deviation and the speed during the dispensing process is generated. In this way, the dispensing position deviation that may be generated by the dispensing device at any dispensing speed during the dispensing process can be obtained. Furthermore, the dispensing position during the dispensing process can be compensated based on the compensation relationship model. Based on this, according to the established compensation relationship model between the dispensing position deviation and the speed, the dispensing device can compensate for the dispensing position according to the real-time dispensing speed to improve the dispensing accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 This is a flow chart of a method for compensating for dispensing position errors provided in one embodiment of the present application;
[0022] Figure 2 It is a schematic diagram of partial data collection of a preset position and an actual dispensing position in a dispensing position error compensation method provided in an embodiment of the present application;
[0023] Figure 3 It is a schematic diagram of partial data calculation of dispensing position deviation in a dispensing position error compensation method provided in an embodiment of the present application;
[0024] Figure 4 It is a schematic diagram of a compensation relationship model between speed and dispensing position deviation of a starting point in a dispensing position error compensation method provided in an embodiment of the present application;
[0025] Figure 5 It is a schematic diagram of a compensation relationship model between speed and dispensing position deviation of an end point in a dispensing position error compensation method provided in an embodiment of the present application;
[0026] Figure 6 It is a structural schematic diagram of a dispensing position error compensation device provided by an embodiment of the present application;
[0027] Figure 7 It is a structural schematic diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0028] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0029] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0030] It should be noted that the information collection process (such as face image collection process, fingerprint information collection process, etc.) / feature extraction process involved in this application is performed with the user's knowledge and permission, that is, the information collection process / feature extraction process complies with the requirements of laws and regulations and does not constitute an act that harms the public interest.
[0031] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0032] Glue dispensing is a process of applying, filling, or dripping electronic glue, oil, or other liquids onto products to make them stick, fill, insulate, fix, or smooth their surfaces. The glue dispensing process is widely used in industries such as electronics manufacturing and automobile manufacturing, and the accuracy of the glue dispensing position usually directly affects the quality and performance of the product.
[0033] However, due to the influence of various factors such as equipment mechanical errors and controller response delays, there is a deviation between the expected dispensing position and the actual dispensing position during the dispensing process.
[0034] At present, a fixed compensation value is usually used to compensate the dispensing position during the dispensing process so that the actual dispensing position coincides with the expected dispensing position. However, the deviations at different dispensing speeds are not the same. For example, the deviation generated when the dispensing speed is high is usually greater than the deviation generated when the dispensing speed is low. At this time, if a fixed compensation value is used to compensate the dispensing position at multiple dispensing speeds, the dispensing position after compensation will still have deviations.
[0035] Furthermore, if the compensation method is manually set for compensation, it mainly depends on human experience, and the compensation value is not stable. Therefore, the dispensing position will still have deviations.
[0036] Based on this, in order to reduce the dispensing position deviation under different dispensing speeds and improve the dispensing accuracy, the embodiment of the present application provides a dispensing position error compensation method, which can be applied to the controller in the dispensing device, or to electronic devices such as laptops and computers that have a communication control connection with the dispensing device. The embodiment of the present application does not impose any restrictions on the specific type of electronic device.
[0037] See also Figure 1 , Figure 1 The following is a flowchart of a method for compensating for dispensing position errors provided in an embodiment of the present application. The method comprises the following steps:
[0038] S101. For any set of preset speeds, obtain the actual dispensing position of the dispensing device when dispensing at at least one preset position during each dispensing process at the preset speed.
[0039] In one embodiment, the preset speed can be pre-set by a staff member, which is not limited. In addition, the preset speed can have multiple groups, and each group of preset speeds is different.
[0040] The plurality of sets of preset speeds may be regular speeds or randomly set speeds without any regularity, which is not limited. For example, the regularity may be a linear regularity such as an arithmetic progression or a geometric ratio. Also, the preset speeds may be set to 36 sets.
[0041] In this embodiment, a plurality of sets of preset speeds that are randomly set and do not have any regularity can be used. In this way, the electronic device can subsequently generate a compensation relationship model between the dispensing position deviation and the speed based on the dispensing position deviation under the plurality of sets of preset speeds that do not have a regularity. Among them, the compensation relationship model is generated based on the dispensing position deviation corresponding to the irregular preset speed, which can reduce the correlation between the independent variables (the plurality of sets of preset speeds). Furthermore, the coefficient estimation in the compensation relationship model generated subsequently can be made more accurate, thereby increasing the stability of the compensation relationship model.
[0042] In one embodiment, the dispensing device may perform one or more dispensing processes at a preset speed, which is not limited to the above. For example, the dispensing process may be performed 10 times.
[0043] The preset position may be any position in the dispensing process, which is a pre-set position where the dispensing is expected. Exemplarily, the preset position includes at least one of a starting point and an ending point in each dispensing process. In this embodiment, in order to facilitate compensation for each dispensing position in the dispensing process, two preset positions may be determined, namely, a starting point and an ending point.
[0044] Based on the above description, it can be known that when the dispensing device needs to perform 10 dispensing processes at each preset speed, since each preset speed corresponds to 10 dispensing processes, each preset speed will correspond to 10 preset positions. That is, one preset speed corresponds to 10 starting points and 10 ending points.
[0045] It should be noted that the starting point and the ending point in each dispensing process may be the same or different, and there is no limitation on this. In this embodiment, in order to prevent the dispensing device from repeatedly dispensing glue at a preset position, making it difficult to distinguish the actual dispensing position after multiple dispensing, the starting point and the ending point in each dispensing process may be set to be different. Exemplarily, the starting point and the ending point in the first dispensing process may be A1, B1. The starting point and the ending point in the second dispensing process may be A2, B2, and so on.
[0046] In one embodiment, the preset position is the position where the dispensing device needs to dispense glue, and the actual dispensing position is the position of the dispensing device when dispensing glue at the preset position. The actual dispensing position may coincide with the preset position, or there may be a deviation.
[0047] In one embodiment, the preset position and the actual dispensing position may be two-dimensional positions or three-dimensional positions, and this is not limited. In this embodiment, for ease of explanation, the following description is made by taking the preset position and the actual dispensing position as two-dimensional positions.
[0048] Among them, a visual sensor can be set in the dispensing device to determine the actual dispensing position corresponding to the preset position. Exemplarily, the dispensing device usually includes a dispensing work platform for placing the component to be dispensed. Afterwards, after the dispensing process is completed, the visual sensor can shoot the component to be dispensed to obtain the corresponding component image. Then, the electronic device can identify the component image, obtain the image position corresponding to the start point and the end point of the dispensing process, and convert the image position according to the conversion matrix between the device coordinate system of the dispensing device and the corresponding image coordinate system to obtain the actual dispensing position corresponding to the above-mentioned start point and the end point.
[0049] In another embodiment, the actual dispensing position may also be determined by a staff member and input into the electronic device. In this embodiment, the method for obtaining the actual dispensing position is not limited.
[0050] As an example, see Figure 2 , Figure 2 1 is a partial data collection diagram of a preset position and an actual dispensing position in a dispensing position error compensation method provided by an embodiment of the present application. Among them, start x, start y and start z respectively represent the three-dimensional coordinates of the preset position. Actual start x, actual start y and actual start z respectively represent the three-dimensional coordinates of the actual dispensing position.
[0051] S102, calculating the dispensing position deviation at a preset speed according to each preset position and the corresponding actual dispensing position.
[0052] In one embodiment, the above-mentioned dispensing position deviation can be the position deviation between the preset position and the corresponding actual dispensing position in each dispensing process, or it can be one or more of the maximum position deviation, minimum position deviation and average position deviation of the position deviation corresponding to multiple dispensing processes, and there is no limitation on this.
[0053] Specifically, the electronic device can calculate the position deviation between the preset position and the actual dispensing position during each dispensing process, and then determine the dispensing position deviation based on the multiple position deviations.
[0054] Exemplarily, the electronic device may determine an average position deviation of a plurality of position deviations, and then determine the average position deviation as the dispensing position deviation.
[0055] As an example, the preset speed V1, the number of dispensing processes is n times, and the preset positions are the starting point and the ending point of each dispensing process. In each dispensing process, the actual dispensing position of the starting point can be (Sxn, Syn), and the actual dispensing position of the ending point can be (Fxn, Fyn). And the preset position of the starting point in each dispensing process can be (S'xn, S'yn), and the preset position of the ending point can be (F'xn, F'yn).
[0056] Among them, Sx represents the actual horizontal coordinate of the starting point, Sy represents the actual vertical coordinate of the starting point, Sxn represents the actual horizontal coordinate of the starting point in the nth dispensing process, and Syn represents the actual vertical coordinate of the starting point in the nth dispensing process. F represents the end point, Fxn represents the actual horizontal coordinate of the end point in the nth dispensing process, and Fyn represents the actual vertical coordinate of the end point in the nth dispensing process. S'x represents the preset horizontal coordinate of the starting point, S'y represents the preset vertical coordinate of the starting point, S'xn represents the preset horizontal coordinate of the starting point in the nth dispensing process, and S'yn represents the preset vertical coordinate of the starting point in the nth dispensing process; F'xn represents the preset horizontal coordinate of the end point in the nth dispensing process, and F'yn represents the preset vertical coordinate of the end point in the nth dispensing process.
[0057] At this time, for the preset position and actual dispensing position corresponding to each of the above-mentioned dispensing processes, the obtained position deviation will include the position deviation of the starting point: (ΔSxn, ΔSyn) = (Sxn-S'xn, Syn-S'yn); the position deviation of the ending point: (ΔFxn, ΔFyn) = (Fxn-F'xn, Fyn-F'yn).
[0058] Then, after obtaining the position deviation of the starting point and the position deviation of the ending point n times under the preset speed V1, the average position deviation (ΔS1x_avg, ΔS1y_avg) of the starting point position deviation and the average position deviation (ΔF1x_avg, ΔF1y_avg) of the ending point position deviation can be calculated. Among them, ΔS1x_avg represents the average position deviation of the horizontal coordinate in the starting point corresponding to the preset speed V1, ΔS1y_avg represents the average position deviation of the vertical coordinate in the starting point corresponding to the preset speed V1, ΔF1x_avg represents the average position deviation of the horizontal coordinate in the ending point corresponding to the preset speed V1, and ΔF1y_avg represents the average position deviation of the vertical coordinate in the ending point corresponding to the preset speed V1.
[0059] However, in actual scenarios, when the dispensing device performs the dispensing process multiple times at a preset speed, there may be an abnormal position deviation due to an accidental failure. It is understandable that when the dispensing process is performed multiple times at a preset speed, since the preset speed remains unchanged, the position deviation obtained during each dispensing process is usually equal. At this time, if there is a larger or smaller position deviation, it can be considered that there may be an accidental failure in the dispensing device during this dispensing process.
[0060] Based on this, in order to obtain a more accurate average position deviation, the electronic device can calculate the initial average position deviation of multiple position deviations. Then, for any position deviation, the deviation ratio of the position deviation to the initial average position deviation is calculated, and when the deviation ratio is greater than the preset deviation ratio, the position deviation is deleted. And, when the deviation ratio is less than or equal to the preset deviation ratio, the position deviation is retained. Finally, the average value of the undeleted position deviations is determined as the average position deviation.
[0061] The preset deviation ratio can be set according to actual conditions and is not limited thereto. For example, the preset deviation ratio can be 5%. The deviation ratio can be calculated by subtracting the absolute value of the initial average position deviation from the position deviation, and then determining the ratio of the absolute value to the initial average position deviation as the deviation ratio.
[0062] It is understandable that when the deviation ratio is greater than the preset deviation ratio, it can be considered that the position deviation has a large deviation from the initial average position deviation. Therefore, it can be considered that the position deviation is abnormal. Based on this, by deleting the position deviation corresponding to the larger than the preset deviation ratio, the abnormal values caused by special circumstances or erroneous measurements can be avoided to a large extent, and the accuracy of the average position deviation can be improved.
[0063] In another embodiment, the electronic device may further determine a maximum position deviation and a minimum position deviation among the plurality of position deviations. Then, if the maximum position deviation is greater than a first preset value, the maximum position deviation is deleted; and if the minimum position deviation is less than a second preset value, the minimum position deviation is deleted. Finally, the average value of the position deviations that are not deleted is determined as the average position deviation.
[0064] The first preset value and the second preset value can be set according to actual conditions and are not limited thereto.
[0065] In another embodiment, since the smaller the minimum position deviation is, the higher the overlap between the actual dispensing position and the preset position can be characterized. That is, the dispensing accuracy is high. Usually, in this case, the minimum position deviation less than the second preset value will not be determined as abnormal. However, in order to accurately understand the distribution of the dispensing position deviation, in this embodiment, the minimum position deviation less than the second preset value is still deleted.
[0066] Among them, when the minimum position deviation is less than the second preset value, not only can it be considered that the minimum position deviation is at the extreme value among multiple dispensing position deviations, but also because it is less than the second preset value, it can be considered that the minimum position deviation is too small and may be more likely to be an abnormal value.
[0067] Based on this, deleting the maximum position deviation greater than the first preset value and deleting the minimum position deviation less than the second preset value can not only reduce the impact of extreme values on the data average, thereby more accurately reflecting the central trend or distribution of the data. In addition, it can largely avoid abnormal values caused by special circumstances or erroneous measurements, and improve the accuracy of the average position deviation.
[0068] As an example, taking the preset position as the starting point, the electronic device can determine the maximum position deviation (ΔSx_max, ΔSy_max) and the minimum position deviation (ΔSx_min, ΔSy_min) from the position deviations of multiple starting points. Then, when any coordinate (horizontal coordinate or coordinate) in the maximum position deviation is greater than the first preset value, the maximum position deviation is deleted. Otherwise, when any coordinate in the maximum position deviation is less than or equal to the first preset value, the maximum position deviation is retained. And, when any coordinate (horizontal coordinate or coordinate) in the minimum position deviation is less than the second preset value, the minimum position deviation is deleted. Otherwise, when any coordinate in the minimum position deviation is greater than or equal to the second preset value, the minimum position deviation is retained. Finally, the average value is calculated based on all the remaining position deviations to obtain the average position deviation of the starting point.
[0069] In another embodiment, when determining that there is an abnormal position deviation, it can also be determined based on the difference between the position deviations obtained twice in a row. Exemplarily, when the difference is greater than a third preset value, it is determined that the position deviation obtained last time between two consecutive times is abnormal. In this embodiment, the method for determining that there is an abnormal position deviation is not limited.
[0070] As an example, see Figure 3 , Figure 3 This is a schematic diagram of partial data calculation of dispensing position deviation in a dispensing position error compensation method provided in an embodiment of the present application. Figure 3 Including parameters such as speed, average start delay, average end delay, average start distance, average end distance, maximum start delay, and minimum start delay.
[0071] It is understandable that the product of speed and the starting average delay is equal to the starting average distance, and the product of speed and the ending average delay is equal to the ending average distance. Based on this, it can be considered that the product of speed and the starting maximum delay is equal to the starting maximum distance, and the product of speed and the starting minimum delay is equal to the starting minimum distance.
[0072] Among them, the above-mentioned starting average distance can be considered as the average position deviation corresponding to the starting point, the ending average distance can be considered as the average position deviation corresponding to the ending point, the starting maximum distance can be considered as the maximum position deviation corresponding to the starting point, and the starting minimum distance can be considered as the minimum position deviation corresponding to the starting point.
[0073] S103, based on the dispensing position deviations under multiple sets of preset speeds, generating a compensation relationship model between the dispensing position deviations and the speed during the dispensing process.
[0074] In one embodiment, the compensation relationship model may be a neural network model or a mathematical model such as a regression equation, which is not limited thereto.
[0075] In this embodiment, in order to better evaluate the dispensing position deviation according to the speed, a multiple regression model between various speeds and the dispensing position deviation can be established. Among them, the multiple regression model can show the relationship between the independent variable (speed) and the dependent variable (dispensing position deviation). Therefore, the obtained compensation relationship model can better evaluate the dispensing position deviation according to the speed.
[0076] Specifically, according to the description of step S102, the preset position includes a starting point and an ending point. Therefore, the dispensing position deviation also includes a dispensing position deviation corresponding to the starting point and a dispensing position deviation corresponding to the ending point.
[0077] Based on this, the electronic device can use the polynomial statistical regression method to establish a compensation relationship model between the speed and the starting point and the ending point. The details are as follows:
[0078] Compensation relationship model between speed and starting point:
[0079] ΔSox_avg=fo(v)=a0+a1v+a2v^2+...+anv^n.
[0080] ΔSoy_avg=go(v)=b0+b1v+b2v^2+...+bnv^n.
[0081] Wherein, ΔSox_avg represents the average position deviation of the horizontal coordinate in the starting point corresponding to the preset speed Vo, and ΔSoy_avg represents the average position deviation of the vertical coordinate in the starting point corresponding to the preset speed Vo.
[0082] Compensation relationship model between speed and end point:
[0083] ΔFox_avg=fo(v)=a0+a1v+a2v^2+...+anv^n.
[0084] ΔFoy_avg=go(v)=b0+b1v+b2v^2+...+bnv^n.
[0085] Wherein, ΔFox_avg represents the average position deviation of the horizontal coordinate in the end point corresponding to the preset speed Vo, and ΔFoy_avg represents the average position deviation of the vertical coordinate in the end point corresponding to the preset speed Vo.
[0086] In one embodiment, the value of n can be set according to actual conditions and is not limited thereto. For example, it can be 2 or 3.
[0087] However, randomly setting the coefficients of the compensation relationship model may make the compensation relationship model of the speed and the dispensing position deviation between the starting point or the end point have a low degree of fit and cannot more accurately describe the relationship between the speed and the dispensing position deviation.
[0088] Based on this, in order to obtain a compensation relationship model that accurately describes the speed and the dispensing position deviation, the above coefficient C can be set to multiple. For any compensation relationship model corresponding to the coefficient C, a regression analysis can be performed based on the above multiple sets of preset speeds and average position deviations to obtain the initial compensation relationship model corresponding to the coefficient, and generate a relationship line segment diagram between the speed and the average position deviation corresponding to the initial compensation relationship model. Then, for the dispensing position deviation under each set of preset speeds, determine the degree of fit between the dispensing position deviation and the relationship line segment diagram. Finally, the initial compensation relationship model with the highest degree of fit among all the initial compensation relationship models is used as the above final compensation relationship model.
[0089] Among them, the coefficient refers to the numerical factor multiplied by the variable in the algebraic expression. Therefore, in the above compensation relationship model, a0 can be considered as the value after multiplying with the variable v^0. Therefore, a0 can also be considered as the coefficient in the compensation relationship model.
[0090] Based on this, when C is 2, the corresponding initial compensation relationship model can be: ΔFox_avg = fo(v) = a0 + a1v. ΔFoy_avg = go(v) = b0 + b1v. And, when C is 3, the corresponding initial compensation relationship model can be: ΔFox_avg = fo(v) = a0 + a1v + a2v^2. ΔFoy_avg = go(v) = b0 + b1v + b2v^2.
[0091] Afterwards, a relationship line segment diagram corresponding to C=2 is generated, and the dispensing position deviation under each set of preset speeds is represented in the relationship line segment diagram to determine the fitting degree 1 of the dispensing position deviation and the relationship line segment diagram. The fitting degree 1 may be the sum of the fitting degree corresponding to the start point and the fitting degree corresponding to the end point under each set of preset speeds.
[0092] Correspondingly, a relationship line segment diagram corresponding to C=3 is generated, and the dispensing position deviation under each set of preset speeds is represented in the relationship line segment diagram to determine the fitting degree 2 of the dispensing position deviation and the relationship line segment diagram. Similarly, the fitting degree 2 can be the sum of the fitting degree corresponding to the starting point and the fitting degree corresponding to the end point under each set of preset speeds.
[0093] Finally, the electronic device may use the initial compensation relationship model corresponding to the highest degree of fit as the above-mentioned final compensation relationship model. For example, the initial compensation relationship model corresponding to the degree of fit 2 is used as the above-mentioned final compensation relationship model.
[0094] The degree of fit can be determined based on the R-squared that measures the percentage of the change in the dependent variable explained by the model, or based on the regression standard error, without limitation.
[0095] As an example, see Figure 4 and Figure 5 , Figure 4 It is a schematic diagram of a compensation relationship model between speed and dispensing position deviation of a starting point in a dispensing position error compensation method provided in an embodiment of the present application. Figure 5 : is a schematic diagram of a compensation relationship model between speed and end point dispensing position deviation in a dispensing position error compensation method provided in an embodiment of the present application. Figure 4 and Figure 5 The horizontal axis is speed, the unit can be millimeter per second, and the vertical axis is position deviation, the unit is millimeter. In addition, the arc represents the compensation relationship model, and the dot represents the actual position deviation corresponding to each preset speed.
[0096] S104, compensating the dispensing position during the dispensing process based on the compensation relationship model.
[0097] In one embodiment, after obtaining the compensation relationship model, the electronic device can determine the dispensing speed of the dispensing device during the dispensing process, and then determine the target dispensing position deviation that should be compensated for the dispensing process based on the dispensing speed. Finally, the dispensing position that needs to be dispensed during the dispensing process is compensated based on the target dispensing position deviation.
[0098] In one embodiment, the dispensing speed can be set in advance by the staff in the electronic device, or the electronic device can collect the dispensing device (e.g., dispensing needle) in the dispensing device, and the moving time required to move from the initial position to the starting point of this dispensing process. Then, the interval distance between the initial position and the starting point is calculated, and the ratio of the interval distance to the moving time is determined as the dispensing speed of this dispensing process. In this embodiment, the method of determining the dispensing speed is limited.
[0099] It should be noted that, based on the above steps S102-S103, the electronic device will obtain a compensation relationship model between the dispensing position deviation and the speed corresponding to the start point, and a compensation relationship model between the dispensing position deviation and the speed corresponding to the end point. In addition, in the actual dispensing scenario, the dispensing speed corresponding to the dispensing device and the dispensing position to be dispensed during each dispensing process need to be pre-written into the dispensing device.
[0100] Based on this, the electronic device can also first obtain the dispensing speed and dispensing position from the dispensing device, and then determine the target dispensing position deviation of the starting point and the target dispensing position deviation of the ending point in the dispensing process based on the dispensing speed and the above two compensation relationship models. Afterwards, the dispensing position of the starting point is compensated based on the target dispensing position deviation of the starting point to obtain the compensated dispensing position of the starting point, and the dispensing position of the ending point is compensated based on the target dispensing position deviation of the ending point to obtain the compensated dispensing position of the ending point. Finally, the compensated dispensing position of the starting point and the compensated dispensing position of the ending point are input into the dispensing device to control the dispensing device to dispense from the compensated dispensing position of the starting point to the compensated dispensing position of the ending point.
[0101] Based on this, using the above method, the electronic device only needs to compensate the dispensing positions of the starting point and the ending point of each dispensing process respectively, and obtain the compensated dispensing positions corresponding to the starting point and the ending point respectively. There is no need for the electronic device to calculate the dispensing position deviation and compensate for each dispensing position.
[0102] It should be noted that, in another embodiment, the electronic device can also calculate the compensation relationship model between the dispensing position deviation and the speed based only on the dispensing position deviation corresponding to a preset position under each set of preset speeds. Then, the dispensing position deviation in the dispensing process is determined based on the compensation relationship model. Finally, all dispensing positions in this dispensing process are compensated based on the dispensing position deviation.
[0103] However, although this method can compensate the dispensing position to a certain extent, in the actual dispensing process, the dispensing position deviations corresponding to different dispensing positions at the same dispensing speed may be different. At this time, generating a compensation relationship model based on the dispensing position deviation at a certain preset position still cannot further accurately compensate the dispensing position.
[0104] Based on this, in this embodiment, in order to improve the accuracy of each dispensing position after compensation during the dispensing process, the above-mentioned preset positions can be preferably used as the starting point and the ending point of each dispensing process. Furthermore, based on the dispensing position deviations corresponding to the starting point and the ending point of each dispensing process, the above-mentioned compensation relationship models are generated respectively, and the dispensing positions of the starting point and the ending point of each dispensing process are compensated, so that the remaining dispensing positions in this dispensing process can be accurately compensated at the same time.
[0105] It can be understood that the compensation relationship model corresponding to the starting point can describe the dispensing position deviation generated when the dispensing device dispenses at the corresponding dispensing speed at the beginning of each dispensing process; and the compensation relationship model corresponding to the end point can describe the dispensing position deviation generated at the end point due to various reasons when the dispensing device dispenses at the corresponding dispensing speed to the end point. Furthermore, based on the compensated dispensing position obtained after compensating the starting point and the end point respectively, the dispensing position deviation generated by the dispensing device during the dispensing process at the corresponding dispensing speed can be accurately corrected.
[0106] In this embodiment, in order to compensate for the dispensing position of the dispensing device during the dispensing process at multiple speeds, the actual dispensing position of the dispensing device during dispensing at at least one preset position at each preset speed in each dispensing process can be obtained first. Then, for any set of preset speeds, the dispensing position deviation at the preset speed can be calculated based on each preset position and the corresponding actual dispensing position. Afterwards, based on the dispensing position deviation at multiple sets of preset speeds, a compensation relationship model between the dispensing position deviation and the speed during the dispensing process is generated. In this way, the dispensing position deviation that may be generated by the dispensing device at any dispensing speed during the dispensing process can be obtained. Furthermore, the dispensing position during the dispensing process can be compensated based on the compensation relationship model. Based on this, according to the established compensation relationship model between the dispensing position deviation and the speed, the dispensing device can compensate for the dispensing position according to the real-time dispensing speed to improve the dispensing accuracy.
[0107] See also Figure 6 , Figure 6 : is a structural block diagram of a dispensing position error compensation device provided in an embodiment of the present application. The dispensing position error compensation device in this embodiment includes modules for executing Figure 1 For details, please refer to the steps in the corresponding embodiment. Figure 1 as well as Figure 1 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 6 The dispensing position error compensation device 600 may include: an acquisition module 610, a calculation module 620, a generation module 630 and a compensation module 640, wherein:
[0108] The acquisition module 610 is used to acquire, for any set of preset speeds, an actual dispensing position of the dispensing device when dispensing at at least one preset position during each dispensing process at the preset speed.
[0109] The calculation module 620 is used to calculate the dispensing position deviation at a preset speed according to each preset position and the corresponding actual dispensing position.
[0110] The generation module 630 is used to generate a compensation relationship model between the dispensing position deviation and the speed during the dispensing process based on a plurality of sets of dispensing position deviations at preset speeds.
[0111] The compensation module 640 is used to compensate the dispensing position during the dispensing process based on the compensation relationship model.
[0112] In one embodiment, the preset position includes at least one of a starting point and an ending point in each dispensing process.
[0113] In one embodiment, the calculation module 620 is further configured to:
[0114] The position deviation between the preset position and the actual dispensing position is calculated in each dispensing process; and the dispensing position deviation is determined based on the multiple position deviations.
[0115] In one embodiment, the calculation module 620 is further configured to:
[0116] An average position deviation of the plurality of position deviations is determined; and the average position deviation is determined as the dispensing position deviation.
[0117] In one embodiment, the calculation module 620 is further configured to:
[0118] Calculate the initial average position deviation of multiple position deviations; for any position deviation, calculate the deviation ratio between the position deviation and the initial average position deviation; if the deviation ratio is greater than a preset deviation ratio, delete the position deviation; and determine the average value of the position deviations that are not deleted as the average position deviation.
[0119] In one embodiment, the generating module 630 is further configured to:
[0120] Regression analysis is performed based on the dispensing position deviations under multiple sets of preset speeds to generate a compensation relationship model.
[0121] In one embodiment, the compensation module 640 is further configured to:
[0122] The dispensing speed of the dispensing device during the dispensing process is obtained; the dispensing speed is input into the compensation relationship model to obtain the dispensing position compensation value; and the dispensing position is compensated according to the dispensing position compensation value.
[0123] When it is understood that Figure 6In the structural block diagram of the dispensing position error compensation device shown in FIG. 1 , each module is used to perform Figure 1 The steps in the corresponding embodiments, and for Figure 1 Each step in the corresponding embodiment has been explained in detail in the above embodiment. Figure 1 as well as Figure 1 The relevant descriptions in the corresponding embodiments are not repeated here.
[0124] Figure 7 1 is a structural block diagram of an electronic device provided by an embodiment of the present application. Figure 7 As shown, the electronic device 700 of this embodiment includes: a processor 710, a memory 720, and a computer program 730 stored in the memory 720 and executable on the processor 710, such as a program for the dispensing position error compensation method. When the processor 710 executes the computer program 730, the steps in each embodiment of the dispensing position error compensation method described above are implemented, such as Figure 1 Alternatively, the processor 710 implements the above when executing the computer program 730 Figure 6 The functions of each module in the corresponding embodiment are, for example, Figure 6 For details on the functions of each module shown, please refer to Figure 6 Related description in the corresponding embodiment.
[0125] Exemplarily, the computer program 730 may be divided into one or more modules, one or more modules are stored in the memory 720, and are executed by the processor 710 to implement the dispensing position error compensation method provided in the embodiment of the present application. One or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 730 in the electronic device 700. For example, the computer program 730 may implement the dispensing position error compensation method provided in the embodiment of the present application.
[0126] The electronic device 700 may include, but is not limited to, a processor 710 and a memory 720. Those skilled in the art will appreciate that Figure 7 It is only an example of the electronic device 700 and does not constitute a limitation of the electronic device 700. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0127] The processor 710 may be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0128] The memory 720 may be an internal storage unit of the electronic device 700, such as a hard disk or memory of the electronic device 700. The memory 720 may also be an external storage device of the electronic device 700, such as a plug-in hard disk, a smart memory card, a flash memory card, etc. equipped on the electronic device 700. Furthermore, the memory 720 may also include both an internal storage unit of the electronic device 700 and an external storage device.
[0129] An embodiment of the present application provides a computer-readable storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a dispensing position error compensation method as described in the above-mentioned embodiments is implemented.
[0130] An embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the dispensing position error compensation method in each of the above embodiments.
[0131] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for compensating dispensing position error, characterized in that: The method comprises: For any set of preset speeds, obtaining an actual dispensing position of the dispensing device when dispensing at at least one preset position during each dispensing process at the preset speed; Calculating the dispensing position deviation at the preset speed according to each of the preset positions and the corresponding actual dispensing position; Based on the plurality of groups of dispensing position deviations at the preset speeds, generating a compensation relationship model between the dispensing position deviation and the speed during the dispensing process; The dispensing position in the dispensing process is compensated based on the compensation relationship model.
2. The method according to claim 1, characterized in that: The preset position includes at least one of a starting point and an ending point in each dispensing process.
3. The method according to claim 1, characterized in that The step of calculating the dispensing position deviation at the preset speed according to each of the preset positions and the corresponding actual dispensing position includes: Calculating the position deviation between the preset position and the actual dispensing position during each dispensing process; The dispensing position deviation is determined based on a plurality of the position deviations.
4. The method according to claim 3, characterized in that The step of determining the dispensing position deviation based on the plurality of position deviations comprises: determining an average position deviation of a plurality of said position deviations; The average position deviation is determined as the dispensing position deviation.
5. The method according to claim 4, characterized in that The determining an average position deviation of the plurality of position deviations comprises: Calculating an initial average position deviation of a plurality of said position deviations; For any of the position deviations, calculating a deviation ratio between the position deviation and the initial average position deviation; If the deviation ratio is greater than a preset deviation ratio, deleting the position deviation; An average value of the position deviations that are not deleted is determined as the average position deviation.
6. The method according to any one of claims 1 to 4, characterized in that: The method of generating a compensation relationship model between the dispensing position deviation and the speed during the dispensing process based on the plurality of groups of dispensing position deviations at the preset speeds includes: The compensation relationship model is generated by performing regression analysis based on the dispensing position deviations under multiple groups of preset speeds.
7. The method according to any one of claims 1 to 5, characterized in that: The compensating the dispensing position in the dispensing process based on the compensation relationship model includes: Obtaining a dispensing speed of the dispensing device during the dispensing process; Inputting the dispensing speed into the compensation relationship model to obtain a dispensing position compensation value; The dispensing position is compensated according to the dispensing position compensation value.
8. A dispensing position error compensation device, characterized in that: The device comprises: An acquisition module, for acquiring, for any set of preset speeds, an actual dispensing position of the dispensing device when dispensing at at least one preset position during each dispensing process at the preset speed; A calculation module, used for calculating the dispensing position deviation at the preset speed according to each of the preset positions and the corresponding actual dispensing position; A generating module, for generating a compensation relationship model between the dispensing position deviation and the speed during the dispensing process based on a plurality of groups of the dispensing position deviations at the preset speeds; A compensation module is used to compensate the dispensing position in the dispensing process based on the compensation relationship model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Dispensing defect identification method and system based on machine vision
CN120219755A
A dispensing defect recognition method and system based on machine vision
CN120219755B
