A sorting process precision control optimization method
By combining the RANSAC algorithm and HSV color space with visual recognition technology, and mapping it to the impedance control of a flexible robotic arm, the problems of visual recognition misjudgment and fragile item grasping in environmentally friendly sorting are solved, and efficient and safe waste sorting is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGXI SHENGHE ENVIRONMENTAL TECH CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-06-09
AI Technical Summary
In environmentally friendly sorting scenarios, existing technologies lack robustness in visual recognition, are easily affected by changes in lighting and surface stains, leading to misjudgments, and lack adaptability in grasping control, making it easy to damage fragile items.
The RANSAC algorithm is used to calculate visual confidence, which is then mapped to the impedance control parameters of the robotic arm. Combined with the HSV color space and contact force impedance model, adaptive grasping of the flexible joint robotic arm is achieved. Precise control is achieved through the flexible joint robotic arm driven by vision sensors, torque sensors, and joint motors.
In complex environmentally friendly sorting scenarios, it effectively resists interference from surface stains, achieves high-precision target positioning and non-destructive gripping, and improves sorting efficiency and safety.
Smart Images

Figure CN122176040A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of environmentally friendly sorting technology, and in particular to a method for precise control and optimization of the sorting process. Background Technology
[0002] With increasing environmental awareness, waste recycling has become a crucial part of the circular economy, and automated sorting robots are gradually replacing manual labor as the mainstream operating method. However, in actual environmentally friendly sorting scenarios, the targets to be sorted (such as waste bottles and cans, electronic waste, etc.) often face extremely complex working conditions, and existing technologies mainly face two insurmountable bottlenecks:
[0003] On the one hand, visual recognition lacks robustness. Waste surfaces often have oil stains, dirt, or damaged labels, or reflective surfaces. Traditional visual recognition methods based on RGB color space or simple threshold segmentation are easily affected by changes in lighting and surface stains (noise), causing the recognition algorithm to misjudge stains as object features, thus calculating the wrong grasping center and causing grasping failure.
[0004] On the other hand, gripping control lacks adaptability. Existing sorting robotic arms mostly use rigid position control or fixed-parameter force control. When dealing with fragile materials (such as glass and light tubes) or objects whose material is unclear due to dirt, rigid gripping can easily lead to breakage of the object, causing secondary pollution such as mercury leakage; while fixed-parameter force control can only be passively adjusted after contact, lacking a "feedback" mechanism, and cannot pre-set compliance characteristics in cases of high contact uncertainty (such as unclear visual recognition), making it difficult to balance sorting efficiency and gripping safety.
[0005] Therefore, there is an urgent need for a sorting control optimization method that can simultaneously resist interference from surface stains and automatically adjust the gripping compliance based on the reliability of visual recognition. Summary of the Invention
[0006] This invention provides a method for precise control and optimization of the sorting process. By mapping the visual confidence calculated by the RANSAC algorithm to the impedance control parameters of the robotic arm, it achieves precise positioning and adaptive grasping under the interference of dirt on the surface of waste, and solves the technical problems of easy misjudgment in complex environmental sorting scenarios and easy damage to fragile items.
[0007] This invention provides a method for precise control and optimization of a sorting process, applied to a sorting system. The sorting system includes a vision sensor, a torque sensor, and a flexible articulated robotic arm driven by an articulated motor. The method includes:
[0008] S1. Use the vision sensor to acquire a real-time streaming image containing the target to be sorted, and convert the pixel data of the real-time streaming image from RGB color space to HSV color space to obtain a set of pixels to be processed.
[0009] S2. Establish a standard color feature model for the target to be sorted, and use the random sample consensus algorithm to iteratively process the pixel set. In each iteration, data is randomly extracted from the pixel set to construct a basic subset, and data points in the pixel set that conform to the standard color feature model are marked as interior points according to the basic subset. Calculate the probability value that all data points in the basic subset are interior points. After the iteration ends, select the set of interior points corresponding to the maximum probability value as the effective area of the target to be sorted, and calculate the geometric center coordinates of the effective area.
[0010] S3. Construct a contact force impedance model for a flexible joint robotic arm that includes inertial parameters, damping parameters, and stiffness parameters. Use the maximum probability value as the visual confidence level, establish a positive correlation mapping relationship between the visual confidence level and the stiffness parameters, and calculate the initial inertial parameters, initial stiffness parameters, and initial damping parameters based on the visual confidence level.
[0011] S4. Control the joint motor to drive the flexible joint robot arm to move towards the geometric center coordinate. During the contact with the target to be sorted, use a torque sensor to collect the actual contact force of the flexible joint robot arm in real time, and use a vibration sensor installed at the joint to collect the real-time vibration signal.
[0012] S5. Input the actual position, actual velocity, and actual acceleration of the end effector of the flexible joint robotic arm into the contact force impedance model with initial inertia parameters, initial stiffness parameters, and initial damping parameters to obtain the expected value of the contact force. Calculate the deviation between the expected value of the contact force and the actual contact force, and combine the real-time vibration signal to compensate the output torque of the joint motor in real time until the sorting and grasping are completed.
[0013] Furthermore, S1 specifically includes:
[0014] S101. Activate the vision sensor to acquire a video stream containing the conveyor belt and the target to be sorted, extract the current frame from the video stream as a real-time stream image, and set the region of interest covering the effective sorting area of the conveyor belt in the real-time stream image.
[0015] S102. Use a Gaussian filtering algorithm or a median filtering algorithm with 3×3 or 5×5 convolution kernels to perform noise reduction preprocessing on the image data in the region of interest to smooth high-frequency noise in the image.
[0016] S103. The image pixels in the region of interest after denoising are non-linearly converted from the RGB color space to separate the hue component, saturation component and luminance component to obtain HSV color space data.
[0017] S104. Traverse the transformed image pixels, remove background pixels using a preset background filtering threshold, and store the remaining image pixels and their HSV color space data into the pixel set to be processed.
[0018] Furthermore, in S103, the nonlinear transformation specifically includes:
[0019] Let R, G, and B be the red, green, and blue channel values normalized to the interval [0,1], respectively. ;
[0020] The formula for calculating the hue component H is:
[0021]
[0022] The formula for calculating the saturation component S is:
[0023]
[0024] The formula for calculating the luminance component V is:
[0025]
[0026] in, The modulo operation is represented by , max represents the maximum value function, and min represents the minimum value function.
[0027] Furthermore, S2 specifically includes:
[0028] S201. Obtain the standard mean vector and deviation threshold of the target to be sorted in the HSV color space, construct a standard color feature model, and initialize the maximum number of iterations, the current maximum probability value, and the optimal set of interior points.
[0029] S202. Enter the iteration loop. In the kth iteration, use a pseudo-random number generator to randomly select n pixels from the pixel set to construct a basic subset.
[0030] S203. Calculate the color Euclidean distance between each pixel in the pixel set and the standard color feature model. If the color Euclidean distance is less than a preset deviation threshold, mark the pixel as an interior point; otherwise, mark it as an exterior point, and count the set of interior points in the current iteration. Wherein, the color Euclidean distance... The calculation formula is:
[0031]
[0032] in, Let be the hue, saturation, and brightness values of the i-th pixel in the pixel set. The standard mean vector of the standard color feature model;
[0033] S204. Based on the distribution of interior points in the current interior point set, use a weighted function to calculate the probability that all data in the basic subset generated in this iteration are interior points. The calculation formula is:
[0034]
[0035] Where N is the total number of pixels in the pixel set. Let the set of interior points be the set of interior points in the current iteration. For pixels in the set of interior points, The color Euclidean distance corresponding to this pixel. The standard deviation parameter is preset.
[0036] S205. Compare the calculated probability value with the current maximum probability value. If the calculated probability value is greater than the current maximum probability value, update the current maximum probability value and update the current set of interior points to the optimal set of interior points. Repeat steps S202 to S205 until the maximum number of iterations is reached.
[0037] S206. After the iteration, the final set of optimal interior points is determined as the effective area of the target to be sorted, and the geometric center coordinates of the effective area are calculated using the principle of image moments. The calculation formula is:
[0038]
[0039]
[0040] in, For the optimal set of interior points, The total number of pixels in the optimal set of interior points. Let x and y be the x and y coordinates of the i-th pixel in the optimal set of interior points in the image coordinate system.
[0041] Furthermore, S3 specifically includes:
[0042] S301. In the Cartesian coordinate system, establish a second-order contact force-impedance model describing the interaction between the end effector of the flexible joint robotic arm and the target to be sorted; wherein, the second-order contact force-impedance model includes target inertial parameters, target damping parameters, and target stiffness parameters, and its formula is:
[0043]
[0044] in, These are the target inertial parameters, target damping parameters, and target stiffness parameters, respectively. These are the desired position, desired velocity, and desired acceleration of the robotic arm's end effector, respectively. These are the actual position, actual velocity, and actual acceleration of the robotic arm's end effector, respectively. This represents the actual contact force experienced at the end of the robotic arm.
[0045] S302. Define the maximum probability value obtained in step S2 as the visual confidence level, and preset the minimum safe stiffness and maximum working stiffness of the robotic arm stiffness parameters, as well as the minimum virtual mass and maximum virtual mass of the inertial parameters.
[0046] S303. Establish a positively correlated linear interpolation mapping function between the visual confidence level and the stiffness parameter and inertia parameter, and calculate the initial stiffness parameter and initial inertia parameter based on the visual confidence level;
[0047] S304. Introduce the critical damping condition. Based on the calculated initial stiffness parameters and initial inertia parameters, calculate the initial damping parameters that ensure no overshoot during the contact process.
[0048] Furthermore, in S303 and S304, the initial stiffness parameter Initial inertial parameters and initial damping parameters The calculation formulas are as follows:
[0049]
[0050]
[0051]
[0052] in, The visual confidence level, and ; These refer to the minimum safety stiffness and the maximum operational stiffness, respectively. These refer to the minimum virtual mass and the maximum virtual mass, respectively. The damping ratio is preset, and .
[0053] Furthermore, S4 specifically includes:
[0054] S401. Using the hand-eye calibration matrix, the geometric center coordinates in the image coordinate system calculated in step S2 are converted into three-dimensional spatial coordinates in the robot base coordinate system, and a smooth motion trajectory from the current position to the three-dimensional spatial coordinates is planned; wherein, the smooth motion trajectory is generated using the fifth-order polynomial interpolation method or the trapezoidal velocity curve planning method, and the calculation formula for coordinate transformation is:
[0055]
[0056] in, Let be the coordinate vector of the target to be sorted in the robot's coordinate system. For the pre-calibrated hand-eye calibration matrix, The coordinate vector of the target to be sorted in the image coordinate system after incorporating depth information;
[0057] S402. Before sending motion commands, write the initial inertia parameters, initial stiffness parameters and initial damping parameters calculated in step S3 into the controller's register to overwrite the default control parameters.
[0058] S403. Control the joint motor to drive the robotic arm to perform an approximation motion towards the target to be sorted according to the planned smooth motion trajectory, and maintain the impedance control mode when contact is detected.
[0059] S404. During the process of contacting the target to be sorted, the force sensing acquisition task and the micro-vibration acquisition task are started in parallel to acquire the actual contact force and the real-time vibration signal. The force sensing acquisition task uses a six-dimensional force / torque sensor installed at the end of the robotic arm to acquire the actual contact force and performs low-pass filtering on the acquired raw force signal. The micro-vibration acquisition task uses a MEMS accelerometer or piezoelectric ceramic sensor installed at the joint or end of the robotic arm to acquire high-frequency vibration signals.
[0060] Furthermore, S5 specifically includes:
[0061] S501. Obtain the current desired motion state and actual motion state of the flexible joint robotic arm, wherein the motion state includes position, velocity and acceleration;
[0062] S502. Substitute the desired motion state and the actual motion state into the contact force-resistance model with configured parameters, and calculate the expected contact force value required to maintain the preset impedance characteristics; wherein, the expected contact force value The calculation formula is:
[0063]
[0064] in, These are the initial inertial parameters, initial damping parameters, and initial stiffness parameters calculated in step S3, respectively. These are the desired position, desired velocity, and desired acceleration, respectively. These are the actual position, actual velocity, and actual acceleration, respectively.
[0065] S503. Calculate the deviation between the expected contact force and the actual contact force, and map the deviation to a basic compensation torque in joint space using the robot Jacobian matrix; wherein, the basic compensation torque The calculation formula is:
[0066]
[0067] in, Let be the transpose of the Jacobian matrix of the flexible joint robotic arm at the current joint angle q. The expected value of the contact force, The actual contact force collected in step S4;
[0068] S504. Perform time-domain analysis on the real-time vibration signal acquired in step S4. When the vibration energy exceeds a safety threshold, generate an active damping torque to suppress vibration; wherein, the active damping torque The generation includes:
[0069] Calculate the vibration energy amplitude of the real-time vibration signal. ;like ,but ;like ,but ; The preset safe vibration threshold, The preset high damping gain coefficient, The current joint angular velocity;
[0070] S505, combining the kinematic feedforward torque, the basic compensation torque, and the active damping torque, a final total command torque is synthesized and sent to the joint motor; wherein, the total command torque The calculation formula is:
[0071]
[0072] in, The kinematic feedforward torque is calculated based on the robotic arm's dynamics model. For the aforementioned basic compensation torque, The active damping torque is denoted as .
[0073] This invention also provides a sorting process precision control optimization device, based on the sorting process precision control optimization method described above, applied to a sorting system. The sorting system includes a vision sensor, a torque sensor, and a flexible articulated robotic arm driven by an articulated motor. The device includes:
[0074] The acquisition module is used to acquire a real-time streaming image containing the target to be sorted using the vision sensor, and convert the pixel data of the real-time streaming image from the RGB color space to the HSV color space to obtain a set of pixels to be processed.
[0075] The calculation module is used to establish a standard color feature model of the target to be sorted, and to iteratively process the pixel set using a random sample consensus algorithm. In each iteration, data is randomly extracted from the pixel set to construct a basic subset, and data points in the pixel set that conform to the standard color feature model are marked as interior points according to the basic subset. The probability value that all data points in the basic subset are interior points is calculated. After the iteration ends, the set of interior points corresponding to the maximum probability value is selected as the effective area of the target to be sorted, and the geometric center coordinates of the effective area are calculated.
[0076] The construction module is used to construct a contact force impedance model of a flexible joint manipulator that includes inertial parameters, damping parameters, and stiffness parameters. The maximum probability value is used as the visual confidence level, and a positive correlation mapping relationship between the visual confidence level and the stiffness parameters is established. The initial inertial parameters, initial stiffness parameters, and initial damping parameters are calculated based on the visual confidence level.
[0077] The acquisition module is used to control the joint motor to drive the flexible joint robot arm to move towards the geometric center coordinate. During the contact with the target to be sorted, the actual contact force of the flexible joint robot arm is acquired in real time using a torque sensor, and the real-time vibration signal is acquired using a vibration sensor installed at the joint.
[0078] The compensation module is used to input the actual position, actual velocity, and actual acceleration of the end effector of the flexible joint robotic arm into a contact force impedance model with initial inertia parameters, initial stiffness parameters, and initial damping parameters to obtain the expected value of the contact force, calculate the deviation between the expected value of the contact force and the actual contact force, and combine the real-time vibration signal to compensate the output torque of the joint motor in real time until the sorting and grasping are completed.
[0079] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0080] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
[0081] The beneficial effects of this invention are as follows:
[0082] This invention combines HSV color space analysis with the Random Sample Consistency (RANSAC) algorithm to effectively remove stains and reflective interference from the surface of waste materials, achieving high-precision target positioning even in noisy environments. It establishes a mapping relationship between visual confidence and the impedance parameters of the robotic arm, transforming the statistical probability of the algorithm during noise removal into a decision-making basis for physical control. Specifically, when visual recognition uncertainty is high (dirty or blurry), the initial stiffness and inertia of the robotic arm are automatically reduced, resulting in high compliance upon contact. This "vision-force" cross-modal feedforward control mechanism, combined with real-time feedback compensation based on contact force and micro-vibration signals, solves the industry pain points of "difficulty in identifying dirty items and fragility of brittle items" in traditional sorting, achieving non-destructive, accurate, and efficient sorting of complex waste materials. Attached Figure Description
[0083] Figure 1 This is a schematic diagram of a method flow according to an embodiment of the present invention.
[0084] Figure 2 This is a schematic diagram of the device structure according to an embodiment of the present invention.
[0085] Figure 3 This is a schematic diagram of the internal structure of a computer device according to an embodiment of the present invention.
[0086] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0087] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0088] like Figure 1 As shown, this invention provides a method for precise control and optimization of a sorting process, applied to a sorting system. The sorting system includes a vision sensor, a torque sensor, and a flexible articulated robotic arm driven by an articulated motor. The method includes:
[0089] S1. Use the vision sensor to acquire a real-time streaming image containing the target to be sorted, and convert the pixel data of the real-time streaming image from the RGB color space to the HSV color space to obtain a set of pixels to be processed.
[0090] In one specific embodiment of the present invention, step S1 is responsible for the initialization of environmental perception and the standardization processing of raw data, providing a high-quality data foundation for subsequent noise reduction algorithms. Given the common problems of uneven lighting and complex backgrounds in environmental sorting sites, simply using the RGB color space is insufficient to extract stable targets through simple threshold segmentation. Therefore, the present invention employs the HSV color space, which is robust to changes in lighting, for preprocessing. Specifically, step S1 includes the following sub-steps:
[0091] S101. Real-time image acquisition and region of interest setting
[0092] First, the vision sensor installed above the sorting line is activated. This vision sensor is preferably an industrial-grade CCD or CMOS camera, which acquires a video stream containing the conveyor belt and the targets to be sorted in real time at a preset frame rate (e.g., 30fps or 60fps). The current frame image is extracted from the video stream as the real-time streaming image. To reduce computational load and eliminate interference from irrelevant backgrounds such as conveyor belt edges, a Region of Interest (ROI) is defined in the real-time streaming image. This ROI typically covers the central effective sorting area of the conveyor belt, and only the image data within this area is processed subsequently. At this time, the acquired image data is in RGB (red, green, blue) three-channel format by default.
[0093] S102, Image Preprocessing and Denoising
[0094] Because the waste sorting environment is dusty and the camera may have electronic noise, directly converting the color space could introduce noise. Therefore, before color space conversion, the RGB image acquired by S101 is processed with Gaussian filtering or median filtering. Specifically, a 5×5 or 3×3 convolution kernel is used to perform convolution operations on the image to smooth high-frequency noise while preserving the edge information of the target to be sorted. This step effectively reduces misjudgments caused by isolated noise in subsequent steps.
[0095] Non-linear conversion from S103, RGB to HSV color space
[0096] The preprocessed RGB image pixel data is converted into the HSV (Hue, Saturation, Value) color space. The RGB model is based on the mixing of the three primary colors of light, and its R, G, and B components are highly correlated with light intensity. Changes in light intensity will simultaneously alter the values of these three components, leading to unstable recognition. The HSV model, however, separates the hue (H), saturation (S), and value (V) of a color. The conversion formula is as follows (assuming R, G, B have been normalized to the [0,1] interval):
[0097]
[0098] Hue (H) calculation:
[0099]
[0100] Saturation (S) calculation:
[0101]
[0102] Brightness (V) calculation:
[0103]
[0104] in, The modulo operation is represented by max, which represents the maximum value function, and min represents the minimum value function. Through the above transformation, the color features of the target to be sorted are mainly concentrated in the H channel, thereby greatly reducing the impact of changes in lighting and shadows in the sorting workshop on target recognition.
[0105] S104. Construct the set of pixels to be processed.
[0106] Traverse every pixel within the ROI region and store the transformed (H, S, V) 3D vector data to form a set of pixels to be processed. , where n is the total number of pixels. This represents the HSV value of the i-th pixel. To further improve the efficiency of the subsequent RANSAC algorithm (step S2), a broad background filtering threshold is set (e.g., removing pure black conveyor belt background pixels), retaining only pixels that may belong to the sorting target in set P. This set P will be used as input data in step S2 for model fitting and iterative filtering.
[0107] S2. Establish a standard color feature model for the target to be sorted, and use the random sample consensus algorithm to iteratively process the pixel set. In each iteration, data is randomly extracted from the pixel set to construct a basic subset, and data points in the pixel set that conform to the standard color feature model are marked as interior points according to the basic subset. Calculate the probability value that all data points in the basic subset are interior points. After the iteration ends, select the set of interior points corresponding to the maximum probability value as the effective area of the target to be sorted, and calculate the geometric center coordinates of the effective area.
[0108] In one specific embodiment of the present invention, step S2 utilizes the robustness of the Random Sample Consensus (RANSAC) algorithm to extract the "effective region" that best represents the target body to be sorted from noisy data containing stains, reflections, and damaged areas. Through iterative calculation, not only can the precise geometric center of the target be obtained, but also a "confidence level" measuring the recognition quality can be output, providing a decision-making basis for subsequent flexible control. Specifically, step S2 includes the following sub-steps:
[0109] S201. Establish a standard color feature model and initialize parameters.
[0110] First, the pre-stored standard color feature model of the targets to be sorted (such as plastic bottles or metal cans of a specific color) is invoked. This model is typically defined by the standard mean vector of the objective in the HSV space. and the allowable deviation threshold The algorithm is composed of several components. Simultaneously, the control parameters of the RANSAC algorithm are initialized, including the maximum number of iterations. (For example, set to 50-100 times), current maximum probability value Optimal set of interior points .
[0111] S202, Randomly select a basic subset (iteration begins)
[0112] Enter the iteration loop (kth iteration, From the set of pixels to be processed P output in step S1, n pixels are randomly selected using a pseudo-random number generator (n is usually a small value, such as 3 to 5 points) to construct the current basic subset. The purpose of this step is to assume that these n points fall within the target "clean" area, unaffected by stains or strong light.
[0113] S203, Interior Point Marking and Fit Metrics
[0114] Using the basic subset selected in this random sampling Verify the entire pixel set P. Calculate the value of each pixel in set P. Compared with standard color feature model Color Euclidean distance (or the temporary model generated based on the current subset) :
[0115]
[0116] like Then determine the pixel point If a pixel matches the model, it is marked as an inlier; otherwise, it is marked as an outlier, i.e., noise or background. All pixels marked as inliers in the current iteration are counted to form the current inlier set. .
[0117] S204. Calculate the probability values of interior points (confidence assessment)
[0118] Calculate the model quality generated in this iteration, which means calculating the probability that all data points in the basic subset are interior points. In this embodiment, the probability value is positively correlated with the number of elements in the current set of inliers (i.e., the proportion of inliers). Preferably, a Sampson weighting or Gaussian weighting method is introduced to calculate the probability value, so that inliers closer to the model center contribute more. The calculation formula is as follows:
[0119]
[0120] Where N is the total number of pixels in pixel set P. This is the standard deviation parameter. If a simplified implementation method is used, It can also be directly defined as the percentage of interior points, i.e. .Should The value physically represents the "purity" or "credibility" of the current identification result.
[0121] S205, Iterative Update and Optimal Solution Selection
[0122] Determine the probability value calculated in this instance. Is it greater than the current maximum probability value? :
[0123] like Then update the optimal solution: Let And save the current set of interior points. .
[0124] like If the original optimal solution remains unchanged, repeat steps S202 to S205 until the maximum number of iterations is reached. or The preset satisfaction threshold (e.g., 0.95) is reached.
[0125] S206, Output effective region and geometric center calculation
[0126] After the iteration is complete, select the final one. The corresponding set of interior points This area serves as the effective region for sorting. It effectively eliminates interference from stains (external points) that were originally attached to the surface of the waste. The geometric center coordinates of this effective region are calculated using the principle of image moments. :
[0127]
[0128]
[0129] in, The total number of pixels in the optimal set of interior points. Let be the coordinates of the i-th pixel in the set of interior points in the image coordinate system. Finally, output the coordinates of the geometric center. Use step S4 for motion control and output the maximum probability value. Step S3 is assigned as the visual confidence level.
[0130] S3. Construct a contact force impedance model for a flexible joint robotic arm that includes inertial parameters, damping parameters, and stiffness parameters. Use the maximum probability value as the visual confidence level, establish a positive correlation between the visual confidence level and the stiffness parameters, and calculate the initial inertial parameters, initial stiffness parameters, and initial damping parameters based on the visual confidence level.
[0131] In one specific embodiment of the present invention, step S3 constructs and initializes the force control "brain" of the flexible joint robotic arm. Traditional robotic arms typically use fixed PID gain or fixed impedance parameters, which cannot simultaneously achieve the efficiency of rigid grasping and the safety of flexible grasping. The present invention utilizes the visual confidence level obtained in step S2 (i.e., the maximum interior point probability of the RANSAC algorithm) to dynamically adjust the "rigidity" of the robotic arm. Specifically, step S3 includes the following sub-steps:
[0132] S301. Construct a second-order contact force-resistance model.
[0133] First, a dynamic model describing the interaction between the end effector of the flexible joint robotic arm and the external environment (waste to be sorted) is established in a Cartesian coordinate system. This model equates the dynamic characteristics of the robotic arm's end effector to a second-order linear system consisting of a mass block, springs, and dampers. Its mathematical expression (i.e., the contact force-resistance model) is defined as follows:
[0134]
[0135] in, This is the actual contact force (measured by a force sensor) experienced at the end of the robotic arm. These are the desired position, velocity, and acceleration (given by the motion trajectory planning); These are the actual position, velocity, and acceleration (feedback from the encoder and inertial measurement unit), respectively. These are the target inertial parameter matrix, target damping parameter matrix, and target stiffness parameter matrix of the model, respectively. The objective of step S301 is to determine the above... Initial values at the moment of contact.
[0136] S302, Define visual confidence and parameter boundaries
[0137] Read the maximum probability value output in step S2 Define it as the current visual confidence level. Simultaneously, based on the specific working conditions of the sorting task, the physical boundary values of the impedance parameters are preset, specifically including:
[0138] Stiffness boundary: Set minimum safe stiffness (Corresponds to ultra-soft mode, used for gripping fragile items or unidentified objects) and maximum working stiffness (Corresponds to rigid mode, used for quickly grasping objects with high determinism).
[0139] Inertial boundary: setting the minimum virtual mass and maximum virtual quality .
[0140] S303. Establish a positive correlation between visual confidence and stiffness / inertia.
[0141] To achieve the control effect of "the more blurred the recognition, the gentler the action; the clearer the recognition, the more decisive the action," visual confidence is established. With stiffness parameters and inertial parameters Positively correlated linear interpolation mapping function:
[0142] ① Initial stiffness parameters Calculation:
[0143]
[0144] When the RANSAC algorithm calculates the interior point probability A lower value indicates that the surface of the waste is severely dirty or its shape is severely distorted. Approaching The robotic arm exhibits low stiffness characteristics, similar to a "soft spring," and can generate large deformation at the moment of contact to buffer the impact force.
[0145] ② Initial inertial parameters Calculation:
[0146]
[0147] Smaller virtual quality It helps improve the robotic arm's compliance with contact collisions and reduces impact damage caused by excessive momentum.
[0148] S304. Calculation of initial damping parameters based on critical damping condition
[0149] After determining the initial stiffness and initial inertia Subsequently, to ensure the stability of the contact process and avoid oscillation (overshoot) or slow response at the end of the robotic arm when contacting the object surface, it is necessary to calculate the initial damping parameters based on the critical damping state in control theory. The damping ratio is usually chosen. (Or, depending on actual needs, take an overdamped / critically damped state of 0.7~1.0), then the initial damping parameters The calculation formula is:
[0150]
[0151] Calculated using this formula This ensures that the system maintains the required stiffness parameters. It maintains stable convergence characteristics without overshoot during dynamic changes. Finally, after processing by S301 to S304, it outputs three core control parameters specific to the current grasping target. This set of parameters is then loaded into the controller's register to prepare for the motion execution in step S4.
[0152] S4. Control the joint motor to drive the flexible joint robotic arm to move towards the geometric center coordinates. During the process of contacting the target to be sorted, use a torque sensor to collect the actual contact force of the flexible joint robotic arm in real time, and use a vibration sensor installed at the joint to collect the real-time vibration signal.
[0153] In a specific embodiment of the present invention, step S4 controls the flexible joint robotic arm to perform a specific grasping action and constructs a high-frequency force and tactile perception channel during dynamic contact. Step S4 implements parameter feedforward configuration, that is, before the robotic arm contacts the object, the control characteristics have been reconstructed based on the initial impedance parameters calculated in step S3, so that the robotic arm already possesses compliant characteristics adapted to the current waste material (level of dirt / fragility) at the moment of physical contact with the object. Specifically, step S4 includes the following sub-steps:
[0154] S401, Coordinate System Transformation and Motion Trajectory Planning
[0155] First, the system needs to convert the geometric center coordinates in the image coordinate system calculated in step S2. Convert to three-dimensional spatial coordinates in robot base coordinate system Using a pre-calibrated hand-eye calibration matrix Combine the depth information obtained from the vision sensor (if it is an RGB-D camera) or the fixed height plane information of the conveyor belt, and perform coordinate transformation:
[0156]
[0157] in, Let the target be the vector in the camera coordinate system. Let be the vector of the target in the base coordinate system. After determining the target's three-dimensional coordinates, the motion controller uses either fifth-order polynomial interpolation or trapezoidal velocity curve planning to plan the path from the robot arm's current position to the target position. The smooth motion trajectory yields a series of discrete time-position control points.
[0158] S402, Loading and configuring impedance model parameters
[0159] Before or simultaneously with sending motion commands, the controller reads the initial stiffness parameters calculated in step S3. Initial inertial parameters and initial damping parameters The controller writes these parameters into the registers of the flexible joint robotic arm's underlying servo driver or the host computer's control algorithm, overriding the default PID parameters or general impedance parameters. This achieves "soft before contact," and if the visual confidence level is low (S2 determination), then... The impact is relatively small, and the joint stiffness of the robotic arm is reduced by the software. Although the robotic arm has not yet made contact with the object, its "electronic muscles" are already in a relaxed state, ready to absorb the impact at any time.
[0160] S403, Perform approximation motion and contact detection
[0161] The control joint motor drives the robotic arm to move towards the target to be sorted according to the trajectory planned in S401. During the movement, the end effector of the robotic arm gradually approaches the surface of the waste. During this process, the system monitors the status of the end effector in real time. When the robotic arm changes from free space movement to contact with the environment (i.e., the contact phase), the system's control mode smoothly switches (or holds) from position control to impedance control mode.
[0162] S404, Real-time synchronous acquisition of multimodal sensing signals
[0163] Throughout the entire process of the robotic arm contacting the target to be sorted (from the moment of contact to the completion of grasping), two high-frequency data acquisition tasks are initiated in parallel:
[0164] ① Force Sensing Acquisition: Using a six-dimensional force / torque sensor installed at the end of the robotic arm (flange), the actual contact force between the end of the robotic arm and the waste is acquired in real time at a sampling frequency of not less than 1kHz. (Include (Force components and torques in three directions). To eliminate measurement noise, the acquired raw force signal is low-pass filtered (cutoff frequency set to, for example, 50Hz-100Hz).
[0165] ② Micro-vibration acquisition: Using highly sensitive vibration sensors (such as MEMS accelerometers or piezoelectric ceramic sensors) installed at key joints of the robotic arm or at the fingertips, real-time vibration signals during the contact process are acquired. This vibration signal is crucial for determining whether the grip is slipping or whether the object has micro-cracks (such as the high-frequency crisp vibration when gripping a glass bottle).
[0166] Through step S4, the robotic arm not only contacts the object with a predetermined degree of compliance, but also establishes a comprehensive sensing network that includes force (macroscopic contact) and vibration (microscopic contact), providing accurate input data for real-time deviation correction in step S5.
[0167] S5. Input the actual position, actual velocity, and actual acceleration of the end effector of the flexible joint robotic arm into the contact force impedance model with initial inertia parameters, initial stiffness parameters, and initial damping parameters to obtain the expected value of the contact force. Calculate the deviation between the expected value of the contact force and the actual contact force, and combine the real-time vibration signal to compensate the output torque of the joint motor in real time until the sorting and grasping are completed.
[0168] In one specific embodiment of the present invention, step S5 establishes a real-time control closed loop based on force / position hybrid feedback. When the end effector of the flexible joint robotic arm makes physical contact with the target to be sorted, the robotic arm no longer simply performs position servoing, but dynamically adjusts the joint torque according to a preset "hardness / softness" (determined by the initial impedance parameter) to adapt to the physical characteristics of the target. Specifically, step S5 includes the following sub-steps:
[0169] S501. Obtain the current full-dimensional motion state of the robotic arm.
[0170] Within each control cycle (e.g., 1ms), the controller reads the joint angle q from each joint encoder and calculates the actual position of the robotic arm's end effector using the forward kinematics equations. The actual speed is obtained by differentiating the position (or reading from the speed sensor). The actual acceleration is obtained through an inertial measurement unit (IMU) or second-order derivative. Simultaneously, the desired position at the current moment is obtained from the trajectory planning module in step S4. Expected speed and expected acceleration .
[0171] S502. Calculation of expected contact force based on impedance model
[0172] The motion state data acquired in step S501 is substituted into the second-order contact force-resistance model, which has been configured with initial parameters (calculated in step S3). Based on the current motion deviation, the expected contact force value that the robotic arm should exhibit in order to maintain the preset impedance characteristics is calculated. The calculation formula is as follows:
[0173]
[0174] This formula embodies the role of "visual feedforward." If step S2 identifies the object as blurry (low confidence), then... Very small. At this point, even with a large positional deviation... (For example, the robotic arm presses too deeply), the calculated It is still very small. This means that the controller "thinks" that there should not be too much reaction force at this time, thus achieving compliance at the algorithm level.
[0175] S503, Calculation of Force Deviation and Basic Torque Compensation
[0176] Read the actual contact force collected by the force sensor in step S4 Calculate its relationship with the expected value of the contact force. Deviation between :
[0177]
[0178] Using the transpose of the robot's Jacobian matrix The force deviation in Cartesian space Mapped to the basic compensation torque in joint space :
[0179]
[0180] Should Used to drive motor operation, correcting the actual contact force to make it tend towards the desired behavior set by the impedance model.
[0181] S504, Flutter Suppression Compensation Based on Micro-Vibration Signals
[0182] Read the real-time vibration signal acquired in step S4 Time-domain analysis was performed on the signal to calculate the vibration energy amplitude. Set a safe vibration threshold. (This threshold corresponds to the characteristic value when an object breaks or slips violently).
[0183] like Then the vibration compensation torque .
[0184] like (For example, if a high-frequency crisp vibration is detected on the glass surface), an active damping torque is immediately generated in the opposite direction to the current velocity. To suppress tremors:
[0185]
[0186] in, It is a high damping gain coefficient. This is equivalent to instantaneously increasing joint friction when a dangerous vibration is detected, "freezing" or slowing down the movement of the robotic arm to prevent further damage.
[0187] S505, synthesize the final output torque and execute closed-loop control.
[0188] kinematic feedforward torque (Gravity, Coriolis force, etc. calculated based on dynamic models), impedance foundation compensation torque and vibration compensation torque The total command torque is synthesized and sent to the joint motor. :
[0189]
[0190] The controller will The data is sent to the servo drive, and steps S501 to S505 are repeated until the end of the robotic arm is fully closed or the force sensor value reaches the preset threshold for completion of gripping, marking the completion of sorting and gripping.
[0191] like Figure 2 As shown, the present invention also provides a sorting process precision control optimization device, based on the sorting process precision control optimization method described above, applied to a sorting system. The sorting system includes a vision sensor, a torque sensor, and a flexible articulated robotic arm driven by an articulated motor. The device includes:
[0192] The acquisition module 1 is used to acquire a real-time streaming image containing the target to be sorted using the vision sensor, and convert the pixel data of the real-time streaming image from the RGB color space to the HSV color space to obtain a set of pixels to be processed.
[0193] Calculation module 2 is used to establish a standard color feature model of the target to be sorted, and to iteratively process the pixel set using a random sample consensus algorithm. In each iteration, data is randomly extracted from the pixel set to construct a basic subset, and data points in the pixel set that conform to the standard color feature model are marked as interior points according to the basic subset. The probability value that all data points in the basic subset are interior points is calculated. After the iteration ends, the set of interior points corresponding to the maximum probability value is selected as the effective area of the target to be sorted, and the geometric center coordinates of the effective area are calculated.
[0194] Module 3 is used to construct a contact force impedance model of a flexible joint manipulator that includes inertial parameters, damping parameters, and stiffness parameters. The maximum probability value is used as the visual confidence level, and a positive correlation mapping relationship between the visual confidence level and the stiffness parameters is established. The initial inertial parameters, initial stiffness parameters, and initial damping parameters are calculated based on the visual confidence level.
[0195] The acquisition module 4 is used to control the joint motor to drive the flexible joint robot arm to move towards the geometric center coordinate. During the process of contacting the target to be sorted, the actual contact force of the flexible joint robot arm is collected in real time using a torque sensor, and the real-time vibration signal is collected using a vibration sensor installed at the joint.
[0196] The compensation module 5 is used to input the actual position, actual velocity, and actual acceleration of the end of the flexible joint robotic arm into a contact force impedance model with initial inertia parameters, initial stiffness parameters, and initial damping parameters to obtain the expected value of the contact force, calculate the deviation between the expected value of the contact force and the actual contact force, and combine the real-time vibration signal to perform real-time compensation on the output torque of the joint motor until the sorting and grasping are completed.
[0197] Each of the above modules is used to perform the corresponding steps in the above-mentioned precise control and optimization method for the sorting process. The specific implementation method is as described in the above-mentioned method embodiment, and will not be repeated here.
[0198] like Figure 3 As shown, the present invention also provides a computer device, which may be a server, and its internal structure may be as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores all data required for the precise control and optimization method of the sorting process. The network interface is used for communication with external terminals via a network connection. The computer program is executed by the processor to implement the precise control and optimization method for the sorting process.
[0199] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment on which the present application is applied.
[0200] An embodiment of this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the above-described methods for precise control and optimization of the sorting process.
[0201] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by hardware related to computer program instructions. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. Any references to memory, storage, databases, or other media provided in this application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), such as dynamic RAM (used as main storage) or static RAM (commonly used as cache memory). By way of illustration and not limitation, RAM has various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), and Rambus DRAM (RDRAM).
[0202] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0203] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for precise control and optimization of a sorting process, characterized in that, The method, applied to a sorting system comprising a vision sensor, a torque sensor, and a flexible articulated robotic arm driven by an articulated motor, includes: S1. Use the vision sensor to acquire a real-time streaming image containing the target to be sorted, and convert the pixel data of the real-time streaming image from RGB color space to HSV color space to obtain a set of pixels to be processed. S2. Establish a standard color feature model for the target to be sorted, and use the random sample consensus algorithm to iteratively process the pixel set. In each iteration, data is randomly extracted from the pixel set to construct a basic subset, and data points in the pixel set that conform to the standard color feature model are marked as interior points according to the basic subset. Calculate the probability value that all data points in the basic subset are interior points. After the iteration ends, select the set of interior points corresponding to the maximum probability value as the effective area of the target to be sorted, and calculate the geometric center coordinates of the effective area. S3. Construct a contact force impedance model for a flexible joint robotic arm that includes inertial parameters, damping parameters, and stiffness parameters. Use the maximum probability value as the visual confidence level, establish a positive correlation mapping relationship between the visual confidence level and the stiffness parameters, and calculate the initial inertial parameters, initial stiffness parameters, and initial damping parameters based on the visual confidence level. S4. Control the joint motor to drive the flexible joint robot arm to move towards the geometric center coordinate. During the contact with the target to be sorted, use a torque sensor to collect the actual contact force of the flexible joint robot arm in real time, and use a vibration sensor installed at the joint to collect the real-time vibration signal. S5. Input the actual position, actual velocity, and actual acceleration of the end effector of the flexible joint robotic arm into the contact force impedance model with initial inertia parameters, initial stiffness parameters, and initial damping parameters to obtain the expected value of the contact force. Calculate the deviation between the expected value of the contact force and the actual contact force, and combine the real-time vibration signal to compensate the output torque of the joint motor in real time until the sorting and grasping are completed.
2. The method for precise control and optimization of the sorting process according to claim 1, characterized in that, S1 specifically includes: S101. Activate the vision sensor to acquire a video stream containing the conveyor belt and the target to be sorted, extract the current frame from the video stream as a real-time stream image, and set the region of interest covering the effective sorting area of the conveyor belt in the real-time stream image. S102. Use a Gaussian filtering algorithm or a median filtering algorithm with 3×3 or 5×5 convolution kernels to perform noise reduction preprocessing on the image data in the region of interest to smooth high-frequency noise in the image. S103. The image pixels in the region of interest after denoising are non-linearly converted from the RGB color space to separate the hue component, saturation component and luminance component to obtain HSV color space data. S104. Traverse the transformed image pixels, remove background pixels using a preset background filtering threshold, and store the remaining image pixels and their HSV color space data into the pixel set to be processed.
3. The method for precise control and optimization of the sorting process according to claim 2, characterized in that, In step S103, the nonlinear transformation specifically includes: Let R, G, and B be the red, green, and blue channel values normalized to the interval [0,1], respectively. ; The formula for calculating the hue component H is: The formula for calculating the saturation component S is: The formula for calculating the luminance component V is: in, The modulo operation is represented by , max represents the maximum value function, and min represents the minimum value function.
4. The method for precise control and optimization of the sorting process according to claim 1, characterized in that, S2 specifically includes: S201. Obtain the standard mean vector and deviation threshold of the target to be sorted in the HSV color space, construct a standard color feature model, and initialize the maximum number of iterations, the current maximum probability value, and the optimal set of interior points. S202. Enter the iteration loop. In the kth iteration, use a pseudo-random number generator to randomly select n pixels from the pixel set to construct a basic subset. S203. Calculate the color Euclidean distance between each pixel in the pixel set and the standard color feature model. If the color Euclidean distance is less than a preset deviation threshold, mark the pixel as an interior point; otherwise, mark it as an exterior point, and count the set of interior points in the current iteration. Wherein, the color Euclidean distance... The calculation formula is: in, Let be the hue, saturation, and brightness values of the i-th pixel in the pixel set. The standard mean vector of the standard color feature model; S204. Based on the distribution of interior points in the current interior point set, use a weighted function to calculate the probability that all data in the basic subset generated in this iteration are interior points. The calculation formula is: Where N is the total number of pixels in the pixel set. Let the set of interior points be the set of interior points in the current iteration. For pixels in the set of interior points, The color Euclidean distance corresponding to this pixel. The standard deviation parameter is preset. S205. Compare the calculated probability value with the current maximum probability value. If the calculated probability value is greater than the current maximum probability value, update the current maximum probability value and update the current set of interior points to the optimal set of interior points. Repeat steps S202 to S205 until the maximum number of iterations is reached. S206. After the iteration, the final set of optimal interior points is determined as the effective area of the target to be sorted, and the geometric center coordinates of the effective area are calculated using the principle of image moments. The calculation formula is: in, For the optimal set of interior points, The total number of pixels in the optimal set of interior points. Let x and y be the x and y coordinates of the i-th pixel in the optimal set of interior points in the image coordinate system.
5. The method for precise control and optimization of the sorting process according to claim 1, characterized in that, S3 specifically includes: S301. In the Cartesian coordinate system, establish a second-order contact force-impedance model describing the interaction between the end effector of the flexible joint robotic arm and the target to be sorted; wherein, the second-order contact force-impedance model includes target inertial parameters, target damping parameters, and target stiffness parameters, and its formula is: in, These are the target inertial parameters, target damping parameters, and target stiffness parameters, respectively. These are the desired position, desired velocity, and desired acceleration of the robotic arm's end effector, respectively. These are the actual position, actual velocity, and actual acceleration of the robotic arm's end effector, respectively. This represents the actual contact force experienced at the end of the robotic arm. S302. Define the maximum probability value obtained in step S2 as the visual confidence level, and preset the minimum safe stiffness and maximum working stiffness of the robotic arm stiffness parameters, as well as the minimum virtual mass and maximum virtual mass of the inertial parameters. S303. Establish a positively correlated linear interpolation mapping function between the visual confidence level and the stiffness parameter and inertia parameter, and calculate the initial stiffness parameter and initial inertia parameter based on the visual confidence level; S304. Introduce the critical damping condition. Based on the calculated initial stiffness parameters and initial inertia parameters, calculate the initial damping parameters that ensure no overshoot during the contact process.
6. The method for precise control and optimization of the sorting process according to claim 5, characterized in that, In S303 and S304, the initial stiffness parameters Initial inertial parameters and initial damping parameters The calculation formulas are as follows: in, The visual confidence level, and ; These refer to the minimum safety stiffness and the maximum operational stiffness, respectively. These refer to the minimum virtual mass and the maximum virtual mass, respectively. The damping ratio is preset, and .
7. The method for precise control and optimization of the sorting process according to claim 1, characterized in that, S4 specifically includes: S401. Using the hand-eye calibration matrix, the geometric center coordinates in the image coordinate system calculated in step S2 are converted into three-dimensional spatial coordinates in the robot base coordinate system, and a smooth motion trajectory from the current position to the three-dimensional spatial coordinates is planned; wherein, the smooth motion trajectory is generated using the fifth-order polynomial interpolation method or the trapezoidal velocity curve planning method, and the calculation formula for coordinate transformation is: in, Let be the coordinate vector of the target to be sorted in the robot's coordinate system. For the pre-calibrated hand-eye calibration matrix, The coordinate vector of the target to be sorted in the image coordinate system after incorporating depth information; S402. Before sending motion commands, write the initial inertia parameters, initial stiffness parameters and initial damping parameters calculated in step S3 into the controller's register to overwrite the default control parameters. S403. Control the joint motor to drive the robotic arm to perform an approximation motion towards the target to be sorted according to the planned smooth motion trajectory, and maintain the impedance control mode when contact is detected. S404. During the process of contacting the target to be sorted, the force sensing acquisition task and the micro-vibration acquisition task are started in parallel to acquire the actual contact force and the real-time vibration signal. The force sensing acquisition task uses a six-dimensional force / torque sensor installed at the end of the robotic arm to acquire the actual contact force and performs low-pass filtering on the acquired raw force signal. The micro-vibration acquisition task uses a MEMS accelerometer or piezoelectric ceramic sensor installed at the joint or end of the robotic arm to acquire high-frequency vibration signals.
8. The method for precise control and optimization of the sorting process according to claim 1, characterized in that, S5 specifically includes: S501. Obtain the current desired motion state and actual motion state of the flexible joint robotic arm, wherein the motion state includes position, velocity and acceleration; S502. Substitute the desired motion state and the actual motion state into the contact force-resistance model with configured parameters, and calculate the expected contact force value required to maintain the preset impedance characteristics; wherein, the expected contact force value The calculation formula is: in, These are the initial inertial parameters, initial damping parameters, and initial stiffness parameters calculated in step S3, respectively. These are the desired position, desired velocity, and desired acceleration, respectively. These are the actual position, actual velocity, and actual acceleration, respectively. S503. Calculate the deviation between the expected contact force and the actual contact force, and map the deviation to a basic compensation torque in joint space using the robot Jacobian matrix; wherein, the basic compensation torque The calculation formula is: in, Let be the transpose of the Jacobian matrix of the flexible joint robotic arm at the current joint angle q. The expected value of the contact force, The actual contact force collected in step S4; S504. Perform time-domain analysis on the real-time vibration signal acquired in step S4. When the vibration energy exceeds a safety threshold, generate an active damping torque to suppress vibration; wherein, the active damping torque The generation includes: Calculate the vibration energy amplitude of the real-time vibration signal. ;like ,but ;like ,but ; The preset safe vibration threshold, The preset high damping gain coefficient, The current joint angular velocity; S505, combining the kinematic feedforward torque, the basic compensation torque, and the active damping torque, a final total command torque is synthesized and sent to the joint motor; wherein, the total command torque The calculation formula is: in, The kinematic feedforward torque is calculated based on the robotic arm's dynamics model. For the aforementioned basic compensation torque, The active damping torque is denoted as .
9. A sorting process precision control and optimization device, based on the sorting process precision control and optimization method according to any one of claims 1-8, characterized in that, An application in a sorting system, the sorting system comprising a vision sensor, a torque sensor, and a flexible articulated robotic arm driven by an articulated motor, the device comprising: The acquisition module is used to acquire a real-time streaming image containing the target to be sorted using the vision sensor, and convert the pixel data of the real-time streaming image from the RGB color space to the HSV color space to obtain a set of pixels to be processed. The calculation module is used to establish a standard color feature model of the target to be sorted, and to iteratively process the pixel set using a random sample consensus algorithm. In each iteration, data is randomly extracted from the pixel set to construct a basic subset, and data points in the pixel set that conform to the standard color feature model are marked as interior points according to the basic subset. The probability value that all data points in the basic subset are interior points is calculated. After the iteration ends, the set of interior points corresponding to the maximum probability value is selected as the effective area of the target to be sorted, and the geometric center coordinates of the effective area are calculated. The construction module is used to construct a contact force impedance model of a flexible joint manipulator that includes inertial parameters, damping parameters, and stiffness parameters. The maximum probability value is used as the visual confidence level, and a positive correlation mapping relationship between the visual confidence level and the stiffness parameters is established. The initial inertial parameters, initial stiffness parameters, and initial damping parameters are calculated based on the visual confidence level. The acquisition module is used to control the joint motor to drive the flexible joint robot arm to move towards the geometric center coordinate. During the contact with the target to be sorted, the actual contact force of the flexible joint robot arm is acquired in real time using a torque sensor, and the real-time vibration signal is acquired using a vibration sensor installed at the joint. The compensation module is used to input the actual position, actual velocity, and actual acceleration of the end effector of the flexible joint robotic arm into a contact force impedance model with initial inertia parameters, initial stiffness parameters, and initial damping parameters to obtain the expected value of the contact force, calculate the deviation between the expected value of the contact force and the actual contact force, and combine the real-time vibration signal to compensate the output torque of the joint motor in real time until the sorting and grasping are completed.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.