Robot control method, device and system and robot
By adding the new point data to the preset window and obtaining the average value, determining the robot target point and controlling it to reach the point, the problem of poor noise error processing in the prior art is solved, and the accuracy and control quality of the robot positioning are improved.
Patent Information
- Application Number
- CN202411679448.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art has poor effect when dealing with noise errors in robot positioning, and cannot effectively reduce the impact of noise on robot position and direction measurement.
By receiving the new point data and adding it to the preset window, the average value of the data in the window is obtained, the target point is determined based on the average value, and the robot is controlled to reach the target point.
Through average operation, this method reduces the impact of noise on robot positioning, improves control quality, and ensures the accuracy of robot position when noise occurs.
Smart Images

Figure CN119501936A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular, to a robot control method, device, system and robot. Background Art
[0002] The uncertainty in robot positioning, in addition to its own reasons, is that during operation, the measured values of its position and direction are usually affected by various noises, such as Gaussian white noise, which can cause errors in robot positioning.
[0003] However, the adjustment method of the prior art can only solve the errors caused by the robot itself, and the adjustment effect is poor for the errors caused by various noises. Summary of the invention
[0004] In order to overcome the deficiencies of the prior art, the present application provides a robot control method, device, system and robot to solve the problem that the adjustment method of the prior art can only solve the errors caused by the robot itself, and the adjustment effect is poor for the errors caused by various noises.
[0005] The technical solution adopted by this application to solve its technical problem is:
[0006] In a first aspect, a robot control method is provided, comprising:
[0007] Receive input new point data, and add the new point data to a preset window;
[0008] Calculate an average value based on the data in the window;
[0009] Determine a target point based on the average value;
[0010] Control the robot to reach the target point.
[0011] Further, obtaining an average value based on the data in the window includes:
[0012] Obtaining the execution time of the point data in the window;
[0013] The average value of N point data in the window is calculated based on the execution time, where N is a positive integer and N≥2.
[0014] Furthermore, the window size is N, and obtaining the average value of N point data in the window based on the execution time includes:
[0015] While adding the new point data to the preset window, deleting the point data with the earliest execution time in the window from the window;
[0016] Calculates the average of all data within the window.
[0017] Further, the calculating the average value based on the execution time includes:
[0018] Sorting the point data in the window from late to early according to the execution time;
[0019] Select the first N points of data in the sorting to calculate the average value.
[0020] Furthermore, it also includes:
[0021] Obtaining the movement speed of the robot;
[0022] The size of N is determined based on the movement speed. The larger the movement speed, the smaller N is.
[0023] Further, determining the target point based on the average value includes:
[0024] Obtaining target parameters, wherein the target parameters include any one of the following: the number of executed target points, the start time, and the run length;
[0025] When the target parameter is greater than a threshold, the average value is used as the target point; when the target parameter is less than or equal to the threshold, the new point data is used as the target point.
[0026] Further, determining the target point based on the average value includes:
[0027] The average value is taken as the target point.
[0028] In a second aspect, a robot control device is provided, comprising:
[0029] A point data receiving module, used for receiving input new point data and adding the new point data to a preset window;
[0030] An average value calculation module, used for calculating an average value based on the data in the window;
[0031] A target point determination module, used for determining the target point based on the average value;
[0032] The robot control module is used to control the robot to reach the target point.
[0033] In a third aspect, a robot control system is provided, comprising:
[0034] at least one processor and at least one memory;
[0035] The memory stores executable instructions of the processor;
[0036] The processor is configured to execute the above robot control method.
[0037] In a fourth aspect, a robot is provided, applying the above-mentioned robot control method.
[0038] Beneficial effects:
[0039] The technical solution of the present application provides a robot control method, device, system and robot. When receiving new point data, it does not execute directly, but adds the new point data to a preset window, calculates the average value according to the data in the window, and then determines the target point based on the average value, and finally controls the robot to reach the target point. The present application scheme reduces the impact of various noises by setting a window to calculate the average value, so that even if noise occurs at a certain moment, the noise will be averaged due to the averaging operation, which will not cause a certain point error to be too large, so that the subsequent point errors will not be too large, so the present application scheme can ensure that the control quality of the robot is also high when noise occurs. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, 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 creative work.
[0041] Figure 1 is a flow chart of a robot control method provided by an embodiment of the present application;
[0042] Figure 2 is a flow chart of a specific robot control method provided in an embodiment of the present application;
[0043] Figure 3 It is a schematic diagram of spatial position deviation of the prior art control method provided in the embodiment of the present application;
[0044] Figure 4 It is a schematic diagram of the spatial position deviation of the control method of the present application scheme provided in the embodiment of the present application;
[0045] Figure 5 is a schematic diagram of the structure of a robot control device provided in an embodiment of the present application;
[0046] Figure 6 It is a schematic diagram of the structure of a robot control system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme of the present application is described in detail below in conjunction with the accompanying drawings and embodiments. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other implementation methods obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0048] Noise is unavoidable in actual control. If the noise is large, the position of a certain step will deviate greatly from the actual position. Not only will the position error be large, but since each step of the robot is based on the position of the previous step, the error of each subsequent step will be too large, resulting in a large error in the subsequent position even if the noise no longer occurs. If the noise occurs again, the error will be even greater, affecting actual use.
[0049] To solve this problem, refer to Figure 1 , the embodiment of the present application provides a robot control method, comprising:
[0050] S11: receiving input new point data, and adding the new point data to a preset window; wherein the new point data may be a point directly input by a user, or a point automatically generated by the robot according to a task.
[0051] S12: Calculating an average value based on the data in the window;
[0052] As a preferred implementation method of the embodiment of the present application, obtaining an average value based on the data in the window includes:
[0053] Get the execution time of the point data in the window; if the new point data is a single point, that is, each new point data received is the point to be executed immediately, its execution time can be replaced by the receiving time. If there are multiple new point data, and they include points to be executed at different subsequent times, their execution time is used as the execution time.
[0054] The average value of N point data in the window is calculated based on the execution time, where N is a positive integer and N≥2.
[0055] In one embodiment, the window size is N, and obtaining the average value of N point data in the window based on the execution time includes:
[0056] While adding the new point data to the preset window, deleting the point data with the earliest execution time in the window from the window;
[0057] Calculate the average value of all data in the window. The average value can be calculated directly or by weighted average according to the requirements.
[0058] That is, the window can only include N point data. When adding a new point data, the earliest point data needs to be deleted.
[0059] In another embodiment, calculating the average value based on the execution time includes:
[0060] Sorting the point data in the window from late to early according to the execution time;
[0061] Select the first N points of data in the sorting to calculate the average value.
[0062] That is, the window can include multiple point data. When new point data is added, the previous point data does not need to be deleted, but it needs to be sorted according to the execution time, and the average value is calculated based on the first N point data in the sorting.
[0063] In practice, the larger N is, the higher the control accuracy is, and the corresponding delay is also higher. For the sake of balance, in one embodiment, the size of N is set according to actual needs, such as being set by the user according to experience and task type, and does not change during the control process.
[0064] In another embodiment, the movement speed of the robot is obtained; the movement speed can be known from speed planning. The size of N is determined based on the movement speed, and the larger the movement speed, the smaller N.
[0065] Among them, in this embodiment, the average speed or median of the whole process can be obtained, and the size of N can be determined according to the average speed or median. The size of N can also be changed in real time according to the movement speed, wherein the real-time change is also to divide the movement speed into different ranges, and each range corresponds to an N value, so that frequent changes in N can be avoided. Because the faster the movement speed, the faster the output of the target point is required. In order to ensure the timely output of the target point, if N is large, the computing power requirements for the robot are too high and the cost is high. Therefore, this application automatically changes the N value based on the movement speed. When the movement speed is slow, a larger N value can be set to improve the accuracy as much as possible, and when the movement speed is fast, a smaller N value can be set to ensure the timely output of the target point.
[0066] S13: Determine the target point based on the average value;
[0067] In one embodiment, the average value is directly used as the target point. However, since there is not enough data in the window for the first few points, some initial values or zero values need to be set. In order to ensure the accuracy of the initial points, either the initial values need to be accurately calculated, increasing the amount of calculation, or simply setting the zero value results in inaccurate initial points.
[0068] Therefore, in another embodiment, the embodiment of the present application obtains target parameters, and the target parameters include any one of the following: the number of executed target points, the start time, and the running length; the start time is the time when the robot starts running, and the running length is the cumulative length after the robot starts running from the origin.
[0069] When the target parameter is greater than a threshold, the average value is used as the target point; when the target parameter is less than or equal to the threshold, the new point data is used as the target point.
[0070] Take the number of points as an example:
[0071] Get the number of target points that the robot has executed;
[0072] When the number of points is greater than a threshold, the average value is used as the target point; when the number of points is less than or equal to a threshold, the new point data is used as the target point. The threshold may be N.
[0073] That is, in the embodiment of the present application, although the first few points are also added to the window, the output is directly output according to the input point, that is, the target point is the input new point data. This does not require an increase in the amount of calculation, and can also ensure the accuracy of the initial point. When the number of points is greater than the threshold, the average value of the window data is used as the target point, reducing the error caused by noise and ensuring the accuracy of control.
[0074] The starting time and running length are the same, and the principle will not be explained in detail here.
[0075] S14: Control the robot to reach the target point.
[0076] The robot control method provided in the embodiment of the present application does not directly execute when receiving new point data, but adds the new point data to a preset window, calculates the average value based on the data in the window, and then determines the target point based on the average value, and finally controls the robot to reach the target point. The present application scheme reduces the impact of various noises by setting a window to calculate the average value, so that even if noise occurs at a certain moment, the noise will be averaged due to the averaging operation, which will not cause a certain point error to be too large, so that the subsequent point errors will not be too large, so the present application scheme can ensure that the control quality of the robot is also high when noise occurs.
[0077] In order to more clearly illustrate the present application scheme, a specific implementation method is provided below. Figure 2 As shown:
[0078] Set the initial sliding window:
[0079] The window size is determined according to the robot's movement speed. In this way, the window size can be automatically adjusted to adapt to its movement speed. The faster the robot runs, the smaller the window. The window size (N) determines the degree of filtering. The larger the (N) value, the more obvious the filtering effect, but the greater the signal delay. When filtering, the robot can automatically select the window size according to the movement speed and select the most appropriate size.
[0080] Since there is less input data at the initial moment, some zero values or initial input values need to be pre-filled. Then, the values of all robot position points in the current window are summed and divided by the window size (N) to obtain the filtering result of the current point. To process the next data point, the window moves forward one position, that is, a new data point is added and the earliest data point is removed. Similarly, the sum of the point values in the current window is repeatedly divided by the window size to obtain the filtering result, and then the window is moved to process the next set of position point data.
[0081] Specific filtering steps:
[0082] Establish a data buffer: First, establish a fixed-length data buffer and window in the memory (RAM) to store the most recently received N data samples.
[0083] Data sampling and updating: Whenever a robot point data sample of the next position is received, the new data is added to the end of the buffer and the earliest collected data in the buffer is removed.
[0084] Calculate the average value: perform arithmetic averaging (or weighted averaging as required) on the N data samples in the buffer, and use the result as the output after filtering.
[0085] Feedback output: The calculated average value is fed back as the effective value of this sampling, and each point data after filtering is output and sent to the robot to move to the corresponding position. The sliding average filter provides the best random noise suppression effect in the time domain based on statistical laws. From the frequency domain perspective, the sliding average filter performs poorly in the frequency band separation task, but as the sliding window length increases, the passband bandwidth gradually narrows and the stopband suppression gradually increases.
[0086] Since in practice, the verification of each point requires tracking the position of each point, and the verification is relatively cumbersome, this application judges the control effect based on the accuracy of the robot's repositioning after an emergency stop. Because when the robot stops suddenly or loses power, it needs to return to the origin. If the error is large during control, the error when returning to the origin will also be large. Therefore, the control effect can be judged based on the error during the emergency stop. This verification method only needs to collect the robot position after the emergency stop, and there is no need to track each position during the movement.
[0087] The prior art control scheme and the scheme of the present application are selected for filtering respectively, and the following operations are performed: first, a laser tracker is used to record the position of a fixed point of the robot at the current origin in the enabled state as the initial data. The robot first runs automatically for a period of time at full speed and full load (the working conditions of full load and full speed are the worst and can better reflect the difference in position deviations of different filters. If it is not full load and full speed, the position deviation is very small and has no research significance. Automatic operation is a continuous movement to ensure that the robot continues to run stably for a period of time, and the collected data is more stable and accurate, eliminating occasional position deviations). An emergency stop is taken at any position, and then the robot returns to the origin in the enabled state. After waiting for 5 seconds to stabilize (wait 5 seconds, wait for the data to stabilize), the spatial position of the current fixed point is recorded; repeat the emergency stop 5 times to record the spatial data and calculate the deviation value.
[0088] The data of the initial position and 5 emergency stops of the prior art are shown in Table 1:
[0089] Table 1
[0090]
[0091] The data of the initial position and 5 emergency stops of this application are shown in Table 2:
[0092] Table 2
[0093]
[0094] The maximum deviation of the robot position in the prior art is 10mm, which is relatively large. The test data of the improved filtering method using the average filtering method is shown in Table 2. The maximum deviation is only 0.15mm, which is 66 times less than the position deviation of the prior art. Figure 3 , Figure 4 From the above, it can be seen that the waveform oscillation amplitude of the prior art filtering is large, the unstable position deviation is large, and the repositioning accuracy is low, which seriously affects the robot accuracy; the waveform filtered by the present application scheme is very flat and almost coincides with the x-axis, and the repositioning accuracy is improved.
[0095] Therefore, the specific control scheme provided in the embodiment of the present application can not only ensure a small error during the control process, but also enable the robot to return to the origin relatively accurately and move smoothly when encountering an emergency stop or power failure during operation. It can improve the position accuracy of the robot and reduce the position instruction deviation of the robot.
[0096] Based on the same inventive concept, Figure 5 As shown, the present application also provides a robot control device 50, comprising:
[0097] The point data receiving module 51 is used to receive input new point data and add the new point data to a preset window.
[0098] As a preferred implementation method of the embodiment of the present application, it also includes:
[0099] Obtaining the movement speed of the robot;
[0100] The size of N is determined based on the movement speed. The larger the movement speed, the smaller N is.
[0101] An average value obtaining module 52, used for obtaining an average value based on the data in the window;
[0102] As a preferred implementation method of the embodiment of the present application, obtaining an average value based on the data in the window includes:
[0103] Obtaining the execution time of the point data in the window;
[0104] The average value of N point data in the window is calculated based on the execution time, where N is a positive integer and N≥2.
[0105] In one embodiment, the window size is N, and obtaining the average value of N point data in the window based on the execution time includes:
[0106] While adding the new point data to the preset window, deleting the point data with the earliest execution time in the window from the window;
[0107] Calculates the average of all data within the window.
[0108] In another embodiment, calculating the average value based on the execution time includes:
[0109] Sorting the point data in the window from late to early according to the execution time;
[0110] Select the first N points of data in the sorting to calculate the average value.
[0111] A target point determination module 53, configured to determine the target point based on the average value;
[0112] In one embodiment, determining the target point based on the average value includes:
[0113] Obtaining target parameters, wherein the target parameters include any one of the following: the number of executed target points, the start time, and the run length;
[0114] When the target parameter is greater than a threshold, the average value is used as the target point; when the target parameter is less than or equal to the threshold, the new point data is used as the target point.
[0115] In another embodiment, determining the target point based on the average value includes:
[0116] The average value is taken as the target point.
[0117] The robot control module 54 is used to control the robot to reach the target point.
[0118] The robot control device provided in the embodiment of the present application does not directly execute when receiving new point data, but adds the new point data to a preset window, calculates the average value based on the data in the window, and then determines the target point based on the average value, and finally controls the robot to reach the target point. The present application scheme reduces the impact of various noises by setting a window to calculate the average value, so that even if noise occurs at a certain moment, the noise will be averaged due to the averaging operation, which will not cause a certain point error to be too large, so that the subsequent point errors will not be too large, so the present application scheme can ensure that the control quality of the robot is also high when noise occurs.
[0119] Based on the same inventive concept, Figure 6 As shown, the present application also provides a robot control system 60, comprising:
[0120] at least one processor 61 and at least one memory 62;
[0121] The memory stores executable instructions of the processor;
[0122] The processor is configured to execute the robot control method provided by the above embodiment.
[0123] The robot control system provided by the embodiment of the present application stores the executable instructions of the processor in the memory. When the executable instructions are executed, the processor can not directly execute the new point data when receiving it, but add the new point data to the preset window, find the average value according to the data in the window, and then determine the target point based on the average value, and finally control the robot to reach the target point. The present application scheme reduces the impact of various noises by setting the window to find the average value, so that even if noise occurs at a certain moment, the noise will be averaged due to the averaging operation, which will not cause a certain point error to be too large, so that the subsequent point errors will not be too large, so the present application scheme can ensure that the control quality of the robot is also high when noise occurs.
[0124] Based on the same inventive concept, the present application also provides a robot, which uses the robot control method provided in the above embodiment.
[0125] The robot provided by the embodiment of the present application, through the robot control method provided by the above embodiment, can, when receiving new point data, not directly execute, but add the new point data to a preset window, find the average value according to the data in the window, and then determine the target point based on the average value, and finally control the robot to reach the target point. The present application scheme reduces the impact of various noises by setting a window to find the average value, so that even if noise occurs at a certain moment, due to the averaging operation, the noise will also be averaged, which will not cause a certain point error to be too large, so that the subsequent point errors will not be too large, so the present application scheme can ensure that when noise occurs, the control quality of the robot is also high.
[0126] It should be noted that, in the description of this application, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" refers to at least two.
[0127] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
Claims
1. A robot control method, characterized in that: include: Receive input new point data, and add the new point data to a preset window; Calculate an average value based on the data in the window; Determine a target point based on the average value; Control the robot to reach the target point.
2. The method according to claim 1, characterized in that: The step of obtaining an average value based on the data in the window includes: Obtaining the execution time of the point data in the window; The average value of N point data in the window is calculated based on the execution time, where N is a positive integer and N≥2.
3. The method according to claim 2, characterized in that: The window size is N, and obtaining the average value of N point data in the window based on the execution time includes: While adding the new point data to the preset window, deleting the point data with the earliest execution time in the window from the window; Calculates the average of all data within the window.
4. The method according to claim 2, characterized in that: The calculating an average value based on the execution time includes: Sorting the point data in the window from late to early according to the execution time; Select the first N points of data in the sorting to calculate the average value.
5. The method according to claim 2, characterized in that: Also includes: Obtaining the movement speed of the robot; The size of N is determined based on the movement speed. The larger the movement speed, the smaller N is.
6. The method according to claim 1, characterized in that: Determining the target point based on the average value includes: Obtaining target parameters, wherein the target parameters include any one of the following: the number of executed target points, the start time, and the run length; When the target parameter is greater than a threshold, the average value is used as the target point; when the target parameter is less than or equal to the threshold, the new point data is used as the target point.
7. The method according to claim 1, characterized in that: Determining the target point based on the average value includes: The average value is taken as the target point.
8. A robot control device, characterized in that: include: A point data receiving module, used for receiving input new point data and adding the new point data to a preset window; An average value calculation module, used for calculating an average value based on the data in the window; A target point determination module, used for determining the target point based on the average value; The robot control module is used to control the robot to reach the target point.
9. A robot control system, characterized in that: include: at least one processor and at least one memory; The memory stores executable instructions of the processor; The processor is configured to execute the method according to any one of claims 1 to 7.
10. A robot, characterized in that: The method according to any one of claims 1 to 7 is used.
Citation Information
Patent Citations
Head dynamic positioning and tracking method and system
CN115471559A
Calculation method in flattening technique of instant sliding window in use for inertial mouse
CN1797293A
Robot with inertia shifting assembly providing spin control during flight
EP3431230A1
Direct neural interface system and method
WO2015063535A1
Echo signal checking method and system based on dynamic threshold value, and lidar
WO2024001224A1
Cited By
Electrical automatic control system and control method
CN119828577A