A grinding method for a robot grinding system based on teaching trajectory optimization and correction
By combining neural network models and sensors, the robot's grinding trajectory is optimized and corrected, solving the problem of difficult one-time teaching and correction of the trajectory during the robot grinding process, and achieving efficient and safe grinding operations.
Patent Information
- Application Number
- CN202211609736.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-12-14
AI Technical Summary
In the existing technology, it is difficult to teach a high-quality grinding trajectory in one go during the robot grinding process, and the teaching trajectory correction method is interfered by force noise, resulting in high production costs and low efficiency.
By collecting and processing training data, a neural network model is constructed. Combined with a six-dimensional force/torque sensor and an electromyographic bracelet, online trajectory optimization and correction are achieved. The posture admittance and force control algorithms are used to optimize the robot's posture and normal force, and the perpendicularity of the grinding head and the workpiece surface is automatically adjusted.
It improves the flexibility and robustness of robot grinding, reduces teaching time, reduces the difficulty of correction, and improves teaching efficiency and safety.
Smart Images

Figure CN116533227B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotics technology, and in particular to a grinding method of a robotic grinding system based on teaching trajectory optimization and correction. Background Art
[0002] With the rapid development of robotics technology, more and more industrial robots are being used in grinding operations to replace manual grinding in order to reduce labor costs and improve production efficiency.
[0003] At present, offline programming methods that are highly dependent on the workpiece model are generally not used. Instead, teaching programming methods are used to teach the robot the grinding trajectory, such as drag teaching.
[0004] However, due to the inherent characteristics of grinding, such as the uncertainty of the workpiece surface shape and continuous contact with the workpiece surface, it is necessary to teach the robot the grinding posture trajectory and the normal force trajectory at the same time to achieve the robot's stability and flexibility in tasks such as grinding that are constrained by the environment. In addition, to meet the high-precision requirements, the robot needs to control the direction of the grinding head to be perpendicular to the workpiece surface during the grinding process, and grind the workpiece with an appropriate normal force. Otherwise, problems such as over-grinding are likely to occur. This makes it difficult to teach a high-quality grinding trajectory in one go. Once an error occurs during the teaching process, such as teaching the wrong posture or an inappropriate normal force trajectory, the entire trajectory often needs to be re-taught, which consumes a lot of extra time and increases production costs. Therefore, the taught trajectory needs to be optimized and corrected.
[0005] In the existing technology, the most intuitive method of teaching trajectory correction is to use a six-dimensional force / torque sensor to measure the arm force and correct the trajectory through the admittance control algorithm. However, during the grinding process, the grinding head and the workpiece come into violent contact, generating a large amount of force noise on the cutting plane, making it difficult to separate the arm force from the measurement value of the six-dimensional force / torque sensor. Summary of the Invention
[0006] In response to the shortcomings of the existing technology, the present invention provides a grinding method for a robot grinding system based on teaching trajectory optimization and correction. The present invention realizes one-time teaching through training data collection and processing, neural network design and training, trajectory teaching and modeling, and trajectory online optimization and correction, shortens the robot's teaching time, improves the teaching efficiency and robustness, enhances the robot's flexible grinding operation capability, and is safer and more friendly to operators.
[0007] The technical solution of the present invention is: a robot polishing system based on teaching trajectory optimization and correction, comprising a robot, a six-dimensional force / torque sensor, a polishing head, an electromyographic wristband and an industrial computer, wherein the robot is a six-axis robotic arm with position control function;
[0008] The six-dimensional force / torque sensor is installed at the end of the robot to measure the external force applied to the end of the robot by the environment or the operator during the grinding process. The grinding head is installed at the other end of the six-dimensional force / torque sensor and is in direct contact with the workpiece for grinding. The myoelectric bracelet is worn on the right forearm of the operator to collect the myoelectric signals of the arm. The industrial computer is electrically connected to the robot and the six-dimensional force / torque sensor, and is connected to the myoelectric bracelet via Bluetooth. Control instructions are sent to the robot based on the external force obtained by the six-dimensional force / torque sensor and the myoelectric signals obtained by the myoelectric bracelet to control the robot to drive the grinding head to move on the surface of the workpiece to complete the grinding operation.
[0009] The present invention also provides a robot polishing method based on teaching trajectory optimization and correction, comprising the following steps:
[0010] S1) Training data collection and processing: the operator drags the end of the robot by hand to move periodically along the x-axis, y-axis and z-axis respectively. At the same time, the industrial computer reads the eight-channel original electromyographic signal of the arm measured by the electromyographic bracelet. And the force signal measured by the six-dimensional force / torque sensor The two sets of signals are time-stamped and synchronized, and the EMG signal u(k) is pre-processed to obtain the expanded EMG signal matrix
[0011] S2) Construct a neural network model and use the extended electromyographic signal matrix U corresponding to the timestamp processed in step S1) * (k) and the three-dimensional force signal F * (k) Composition data pairs The neural network is trained using the back propagation algorithm. The trained neural network model represents the mapping relationship between the arm electromyographic signal and the predicted arm force on the end of the robot:
[0012] In the formula, Γ(U * ) represents the neural network mapping function;
[0013] S3) trajectory teaching and modeling: in the drag teaching mode, the robot is taught the posture trajectory β for grinding on the workpiece surface. s (t) and the normal force trajectory f perpendicular to the workpiece surface zs (t), the industrial computer records the teaching posture and normal force trajectory, and uses dynamic motion primitives to model the robot trajectory from the forward and reverse directions to obtain the posture model and force model;
[0014] S4) Online optimization, using force control algorithm and attitude admittance control algorithm to optimize the robot's posture trajectory online,
[0015] The robot's posture is optimized through the attitude admittance control algorithm, and the robot end automatically adjusts its posture according to the external torque of the environment, so that the direction of the grinding head is perpendicular to the workpiece surface during the grinding process;
[0016] S5) Online correction: Use the neural network model to predict the force exerted by the arm on the end of the robot, adjust the posture and force model execution speed, and use the position admittance control. The industrial computer sends control instructions to the robot to correct the optimized robot position and force trajectory online;
[0017] S6) and loop through steps S4) and S5) until the online optimization and correction of the teaching trajectory are completed.
[0018] Preferably, in step S1), the electromyographic signal u(k) is preprocessed as follows:
[0019] S11), rectify and filter the original electromyographic signal u(k) to obtain the electromyographic signal envelope u env (k), calculated as:
[0020]
[0021] Where k represents the current timestamp and m represents the pre-designed filtering parameters;
[0022] S12), EMG signal envelope u env (k) Perform standardization processing to obtain the standardized electromyographic signal u * (k), calculated as follows:
[0023]
[0024] Where, Represents the EMG signal envelope u env The average value of (k), σ(u env ) represents the EMG signal envelope u env (k) standard deviation;
[0025] S13), use the sliding window to intercept the standardized electromyographic signal u * (k), get the expanded EMG signal matrix Specifically:
[0026] U * (k)=[u * (kw),u * (k-w+1),…,u * (k)];
[0027] Where u *(k) is the normalized EMG signal, and w represents the sliding window length.
[0028] Preferably, in step S2), the neural network model includes an input layer, four convolution modules and an output layer, and the neural network model is based on the expanded electromyographic signal matrix U * (k) as input to predict the 3D force signal as output.
[0029] Preferably, in step S2), each convolution module includes a 2D convolution layer, a batch normalization layer BN and a 20% dropout layer, and is activated by a rectified linear unit ReLU. The number of convolution kernels in the convolution layer is designed to be 4, 8, 16 and 32 respectively, and the size of the convolution kernel is designed to be 2x2. The output layer is designed as two fully connected layers with 6 and 3 units respectively, and ReLU is used for activation of each fully connected layer.
[0030] As a preference, in step S2), the neural network is trained using a back propagation algorithm, and the optimal weight θ obtained by training is * Satisfy the minimization loss function L:
[0031]
[0032] Among them, θ * represents the optimal weight obtained through training, N represents the number of training set data, and F * (k) represents the three-dimensional force signal, Represents the predicted three-dimensional force signal.
[0033] Preferably, in step S3), the posture trajectory is:
[0034] β s (t) = [β xs (t), β ys (t), β zs (t), β ss (t), β ps (t), β ys (t)];
[0035] Among them, β xs (t), β ys (t), β zs (t) represents the end position of the robot, β rs (t), β ps (t), β ys (t) represents the robot end posture, given in the form of RPY rotation angle.
[0036] Preferably, in step S3), the dynamic motion primitive is used to model the robot end position trajectory from the time axis forward and reverse to obtain a position model:
[0037]
[0038]
[0039]
[0040]
[0041] φ i =exp(-d i (sc i ) 2 );
[0042] Where a and b represent the stiffness coefficient and damping coefficient of the pose model, respectively; g and β0 represent the target value and initial value of the pose trajectory, respectively; τ represents the time scaling coefficient of the model; β1 = [β 1x , β 1y , β 1z , β 1r , β 1p , β 1y ] and β2=[β 2x , β 2y , β 2z , β 2r , β 2p , β 2y ] represent the robot’s terminal position and velocity respectively; ω i , d i , c i Represents the i-th Gaussian basis function φ i The weight, width and center of ; M represents the number of selected Gaussian basis functions, s represents the model phase variable, and α represents the preset positive parameter;
[0043] represents the acceleration of the robot end, represents the robot terminal speed, f(s;ω) represents the model nonlinear term, represents the first derivative of the model phase variable;
[0044] Preferably, in step S3), the normal force trajectory of the robot's z-axis is modeled in the forward and reverse directions of the time axis using dynamic motion primitives to obtain a force model:
[0045]
[0046]
[0047]
[0048] Where τ is the time scaling coefficient of the model, c and d are the stiffness coefficient and damping coefficient of the force model respectively, and f g and f0 represent the target value and initial value of the force trajectory, respectively, f1=f 1z and f2 = f 2z They represent the z-axis force and the derivative of the force at the end of the robot, γ i represents the i-th Gaussian basis function φ i The weight of ; the posture and force models are driven by the same phase variable s to achieve synchronization on the time axis;
[0049] Represents the second derivative of the z-axis force at the end of the robot, Represents the first derivative of the z-axis force at the end of the robot.
[0050] Preferably, in step S4), the attitude admittance control algorithm is:
[0051] Define R = H (r, p, y) as the transformation from the RPY rotation angle to the corresponding rotation matrix, r = G (R) as the transformation from the rotation matrix to the corresponding rotation vector, H -1 and G -1 is the corresponding inverse transformation, then the attitude offset r represented by the rotation vector e for:
[0052]
[0053] r e (t) = G(R e (t));
[0054] Among them, R d Represents the desired posture, R0 represents the rotation matrix corresponding to the posture output by the posture model, R e represents the attitude offset expressed as a rotation matrix;
[0055] Iteratively calculate the robot's expected posture β rd , β pd and β yd , expressed in the form of RPY rotation angle:
[0056]
[0057]
[0058] ΔR e (t+1)=G -1 (Δr e (t+1));
[0059] Rd (t+1)=ΔR e (t+1)R e (t)R0(t+1);
[0060] [β rd (t+1), β pd (t+1), β yd (t+1)]=H -1 (R d (t+1));
[0061] Where Δ(·) represents the increment from the current time step t to the next time step t+1, D r and K r denote the damping and stiffness parameters of attitude admittance control, represents the angular velocity of the robot end, n * (t)=[n x (t), n y (t), 0] is the external torque at the end of the constructed robot, n x and n y They represent the x-axis and y-axis torques measured by the six-dimensional force / torque sensor, respectively, and T represents the control period;
[0062] The robot's posture is optimized through the attitude admittance control algorithm, and the robot end will automatically adjust its posture according to the external torque of the environment, so that the direction of the grinding head is perpendicular to the workpiece surface during the grinding process.
[0063] Preferably, in step S4), in order to meet the requirement of grinding the workpiece with an appropriate normal force, the output of the force model is used as the expected grinding normal force, and the expected position is adjusted according to the expected grinding normal force. 1z , speed β 2z and acceleration Based on this, the force control algorithm is used to iteratively calculate the robot's z-axis to optimize the expected acceleration. speed and position β zd1 :
[0064]
[0065]
[0066]
[0067] Where t represents the current time step, T represents the control period, and m z1 and d z1 Respectively represent the inertia and damping parameters for adjusting the force control performance, β zd1 , and The initial values of the pose model output position β 1z , speed β 2z and acceleration The initial value of f is the same, 1z represents the expected grinding normal force and the output of the force model, f z Indicates the z-axis grinding normal force measured by the six-dimensional force / torque sensor.
[0068] As a preferred embodiment, in step S5), the myoelectric bracelet measures the original myoelectric signals of the eight channels of the arm in real time, and after rectification, filtering and standardization, the myoelectric signal stream is intercepted using a sliding window to obtain the expanded myoelectric signal matrix U * (t) is used as the input of the neural network model, according to Real-time prediction of the arm's forces on the x-, y-, and z-axes at the end of the robot
[0069] represents the human intention to correct the trajectory, where and Indicates the human intention to correct the position trajectory, Represents the human intention to correct the normal force trajectory.
[0070] Preferably, in step S5), the execution speed of the posture model and the force model is adjusted by changing the model time scaling coefficient τ according to the directional relationship between the force exerted by the arm on the robot end and the robot speed;
[0071] When τ(t)>0, the forward posture and force model is run, that is, the posture and force model is iterated forward along the time axis;
[0072] When τ(t) = 0, the model stops iterating;
[0073] When τ(t)<0, the reverse posture and force model is run, that is, the posture and force model is iterated in the reverse direction along the time axis. |τ(t)| is positively correlated with the model execution speed:
[0074]
[0075] Among them, τ max Indicates the maximum value of the model time scaling factor, represents the arm force vector predicted by the neural network on the robot's xy plane, β 2xy =[β 2x , β 2y ] represents the velocity vector output by the pose model, P m Indicates a preset positive parameter.
[0076] Preferably, in step S5), the position admittance control algorithm is used to correct the position trajectory on the x-axis and y-axis of the robot, and the stiffness term in the design algorithm is not 0, so that the corrected position trajectory can gradually converge to the teaching trajectory;
[0077] Output position β of the pose model 1xy =[β 1x , β 1y ] and speed β 2xy =[β 2x , β 2y ], calculate the expected speed after correction along the x-axis and y-axis of the robot and position β xyd =[β xd , β yd ];
[0078]
[0079]
[0080] Among them, D xy and K xy are the damping and stiffness parameters of position admittance control, β xyd and The initial value and the output position β of the pose model 1xy and speed β 2xy Same, T represents the control period, represents the predicted arm force vector on the robot's xy plane.
[0081] Preferably, in step S5), the position admittance control algorithm is used on the z-axis of the robot, and the algorithm stiffness term is set to 0, so that the operator can directly drag the end of the robot to perform normal force correction, and optimize the desired position β zd1 ,speed and acceleration Based on this, calculate the expected acceleration along the robot's z-axis after correction speed and position β zd :
[0082]
[0083]
[0084]
[0085] Among them, m z2 and d z2 denote the inertia and damping parameters for the modified normal force behavior, position β zd,speed and expected acceleration The initial values of are respectively related to the z-axis optimized expected trajectory position β zd1 ,speed and acceleration The initial value of is the same.
[0086] As a preferred embodiment, in step S5), the industrial computer updates the desired posture control instruction β d (t+1)=[β xd (t+1), β yd (t+1), β zd (t+1), β rd (t+1), β pd (t+1), β yd (t+1)] is sent to the robot to control the robot to follow the desired posture, and the real-time posture β and external force f of the robot end are saved at the same time.
[0087] The beneficial effects of the present invention are:
[0088] 1. The present invention automatically optimizes the unreasonable posture and normal force in the teaching trajectory during the grinding process, thereby improving the robustness of the teaching and enhancing the flexible grinding operation capability of the robot;
[0089] 2. The present invention uses a neural network to predict the force exerted by the arm on the robot end, avoiding the interference of the cutting plane force noise during grinding on the measurement of the arm force. The intention to correct the trajectory is intuitively conveyed to the robot through physical contact, reducing the difficulty of trajectory correction.
[0090] 3. The present invention realizes one-time teaching through online optimization and correction of the teaching trajectory, avoids repeated teaching, improves the teaching efficiency, and is safer and more friendly to the operator. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 It is a structural schematic diagram of the robot polishing system of the present invention;
[0092] Figure 2 is a flow chart of the steps of the method of the present invention;
[0093] Figure 3 It is a structural diagram of the neural network model of the present invention;
[0094] Figure 4 It is a control block diagram of online optimization and correction of the present invention;
[0095] Figure 5 Schematic diagram of the online correction position trajectory of the robot of the present invention;
[0096] Figure 6Schematic diagram of the robot's online correction of normal force trajectory;
[0097] Among them, 1-robot, 2-six-dimensional force / torque sensor, 3-grinding head, 4-myoelectric bracelet, 5-industrial computer, 6-area that does not require polishing, 7-rough area. DETAILED DESCRIPTION
[0098] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings:
[0099] Example 1
[0100] like Figure 1 As shown, this embodiment provides a robot polishing system based on teaching trajectory optimization and correction, including a robot 1, a six-dimensional force / torque sensor 2, a polishing head 3, an electromyographic bracelet 4, and an industrial computer 5. The robot 1 is a six-axis robotic arm with position control function. The six-dimensional force / torque sensor 2 is installed at the end of the robot 1 and is used to measure the external force applied to the end of the robot 1 by the environment or the operator during the polishing process. The polishing head 3 is installed at the other end of the six-dimensional force / torque sensor 2 and is in direct contact with the workpiece for polishing. The myoelectric bracelet 4 is worn on the right forearm of the operator and is used to collect electromyographic signals from the arm. The industrial computer 5 is electrically connected to the robot 1 and the six-dimensional force / torque sensor 2, and is connected to the myoelectric bracelet 4 via Bluetooth. Based on the acquired external force and electromyographic signals, it sends control instructions to the robot 1, controlling the robot 1 to drive the polishing head 3 to move on the surface of the workpiece to complete the polishing operation.
[0101] Example 2
[0102] like Figure 2 As shown, this embodiment provides a robot polishing method based on teaching trajectory optimization and correction, comprising the following steps:
[0103] S1) Training data collection and processing: The operator drags the end of the robot 1 by hand to move periodically along the x-axis, y-axis and z-axis for 10 minutes. At the same time, the industrial computer 5 reads the eight-channel original electromyographic signal of the arm measured by the electromyographic bracelet 4. And the force signal measured by the six-dimensional force / torque sensor The two sets of signals are time-stamped and synchronized, and the EMG signal u(k) is pre-processed to obtain the expanded EMG signal matrix
[0104] The electromyographic signal u(k) is preprocessed as follows:
[0105] S11) In order to filter out the high-frequency noise of the original electromyographic signal and correct its amplitude, the original electromyographic signal u(k) is rectified and filtered to obtain the electromyographic signal envelope u env(k), calculated as:
[0106]
[0107] Where k represents the current timestamp and m represents the pre-designed filtering parameters;
[0108] S12) In order to reduce the difference in the value range of training data and make the neural network model training more effective, the myoelectric signal envelope u env (k) Perform standardization processing to obtain the standardized electromyographic signal u * (k), calculated as follows:
[0109]
[0110] Where, Represents the EMG signal envelope u env The average value of (k), σ(u env ) represents the EMG signal envelope u env (k) standard deviation;
[0111] S13), use the sliding window to intercept the standardized electromyographic signal u * (k), get the expanded EMG signal matrix Specifically:
[0112] U * (k)=[u * (kw),u * (k-w+1),…,u * (k)];
[0113] Where u * (k) is the normalized EMG signal, and w represents the sliding window length.
[0114] S2) Construct a neural network model and use the extended electromyographic signal matrix U corresponding to the timestamp processed in step S1) * (k) and the three-dimensional force signal F * (k) Composition data pairs The neural network is trained using the back propagation algorithm, and the optimal weight θ obtained by training is * Satisfy the minimization loss function L:
[0115]
[0116] Among them, θ * represents the optimal weight obtained through training, N represents the number of training set data, and F * (k) represents the three-dimensional force signal, Represents the predicted three-dimensional force signal.
[0117] The trained neural network model represents the mapping relationship between the arm electromyographic signal and the predicted arm force on the end of the robot: Among them, Γ(U * ) represents the neural network mapping function;
[0118] like Figure 3 As shown, the neural network model described in this embodiment includes an input layer, four convolution modules and an output layer. The neural network model is based on the expanded electromyographic signal matrix U * (k) as input to predict the 3D force signal As the output. Each convolution module consists of a 2D convolution layer, a batch normalization layer (BN), and a 20% dropout layer, and is activated by a rectified linear unit (ReLU). The number of convolution kernels in the convolution layer is designed to be 4, 8, 16, and 32, respectively, and the convolution kernel size is designed to be 2x2. The output layer is designed as two fully connected layers with 6 and 3 units respectively, and each fully connected layer is activated by ReLU.
[0119] S3) trajectory teaching and modeling: in the drag teaching mode, the robot is taught the posture trajectory β for grinding on the workpiece surface. s (t) and the normal force trajectory f perpendicular to the workpiece surface zs (t), the industrial computer records the teaching posture and normal force trajectory, where β s (t) = [β xs (t), β ys (t), β zs (t), β rs (t), β ps (t), β ys (t)];
[0120] Among them, β xs (t), β ys (t), β zs (t) represents the end position of the robot, β rs (t), β ps (t), β ys (t) represents the robot end posture, given in the form of RPY rotation angle.
[0121] Use dynamic motion primitives to model the robot end pose trajectory from the forward and reverse time axis to obtain the pose model:
[0122]
[0123]
[0124]
[0125]
[0126] φ i =exp(-d i (sc i ) 2 );
[0127] Where a and b represent the stiffness coefficient and damping coefficient of the pose model, respectively; g and β0 represent the target value and initial value of the pose trajectory, respectively; τ represents the time scaling coefficient of the model; β1 = [β 1x , β 1y , β 1z , β 1r , β 1p , β 1y ] and β2=[β 2x , β 2y , β 2z , β 2r , β 2p , β 2y ] represent the robot’s terminal position and velocity respectively; ω i , d i , c i Represents the i-th Gaussian basis function φ i The weight, width and center of ; M represents the number of selected Gaussian basis functions, s represents the model phase variable, and α represents the preset positive parameter;
[0128] represents the acceleration of the robot end, represents the robot terminal speed, f(s;ω) represents the model nonlinear term, represents the first derivative of the model phase variable;
[0129] Use dynamic motion primitives to model the normal force trajectory of the robot's z-axis from the forward and reverse directions of the time axis to obtain the force model:
[0130]
[0131]
[0132]
[0133] Where τ is the time scaling coefficient of the model, c and d are the stiffness coefficient and damping coefficient of the force model respectively, and f g and f0 represent the target value and initial value of the force trajectory, respectively, f1=f 1z and f2 = f 2z They represent the z-axis force and the derivative of the force at the end of the robot, γ i represents the i-th Gaussian basis function φ iThe weight of ; the posture and force models are driven by the same phase variable s to achieve synchronization on the time axis; Represents the second derivative of the z-axis force at the end of the robot, Represents the first derivative of the z-axis force at the end of the robot.
[0134] S4) Online optimization: Use force control algorithm and attitude admittance control algorithm to optimize the robot's posture trajectory online. After the attitude admittance control algorithm optimizes the robot's posture, the robot end will automatically adjust its posture according to the external torque of the environment, so that the direction of the grinding head is perpendicular to the workpiece surface during the grinding process;
[0135] like Figure 4 As shown, in order to meet the requirement that the direction of the grinding head 3 is perpendicular to the workpiece surface during the grinding process, the attitude admittance control algorithm is:
[0136] Define R = H (r, p, y) as the transformation from the RPY rotation angle to the corresponding rotation matrix, r = G (R) as the transformation from the rotation matrix to the corresponding rotation vector, H -1 and G -1 is the corresponding inverse transformation, then the attitude offset r represented by the rotation vector e for:
[0137] R0(t)=H(β 1r (t), β 1p (t), β 1y (t));
[0138]
[0139] r e (t) = G(R e (t));
[0140] Among them, R d Represents the desired posture, R0 represents the rotation matrix corresponding to the posture output by the posture model, R e represents the attitude offset expressed as a rotation matrix;
[0141] Taking advantage of the fact that the rotation of the end of robot 1 around the z-axis is unrestricted during the grinding operation, the external torque on the end of robot 1 is constructed as n * (t)=[n x (t), n y (t), 0], where n x and n y Respectively represent the x-axis and y-axis torques measured by the six-dimensional force / torque sensor 2. The desired posture β of the robot is iteratively calculated using the attitude admittance control algorithm. sd , β pd and β yd, given as the RPY rotation angle:
[0142]
[0143]
[0144] ΔR e (t+1)=G -1 (Δr e (t+1));
[0145] R d (t+1)=ΔR e (t+1)R e (t)R0(t+1);
[0146] [β rd (t+1), β pd (t+1), β yd (t+1)]=H -1 (R d (t+1));
[0147] Where Δ(·) represents the increment from the current time step t to the next time step t+1, D r and K r denote the damping and stiffness parameters of attitude admittance control, represents the angular velocity of the end of the robot 1, and T represents the control period;
[0148] The robot's posture is optimized through the attitude admittance control algorithm, and the robot end will automatically adjust its posture according to the external torque of the environment, so that the direction of the grinding head is perpendicular to the workpiece surface during the grinding process.
[0149] In order to meet the requirement of grinding the workpiece with appropriate normal force, the output of the force model is used as the expected grinding normal force, and the expected position is adjusted according to the expected grinding normal force. 1z , speed β 2z and acceleration Based on this, the force control algorithm is used to iteratively calculate the robot's z-axis to optimize the expected acceleration. speed and position β zd1 :
[0150]
[0151]
[0152]
[0153] Where t represents the current time step, T represents the control period, and mz1 and d z1 Respectively represent the inertia and damping parameters for adjusting the force control performance, β zd1 , and The initial values of the pose model output position β 1z , speed β 2z and acceleration The initial value of f is the same, 1z represents the expected grinding normal force and the output of the force model, f z Indicates the z-axis grinding normal force measured by the six-dimensional force / torque sensor.
[0154] S5) Online correction: Use the neural network model to predict the force exerted by the arm on the end of the robot, adjust the posture and force model execution speed, and use the position admittance control. The industrial computer sends control instructions to the robot to correct the optimized robot position and force trajectory online;
[0155] like Figure 4 As shown in the figure, the myoelectric bracelet measures the original eight-channel myoelectric signals of the arm in real time. After rectification, filtering and standardization, the myoelectric signal stream is intercepted using a sliding window to obtain the expanded myoelectric signal matrix U * (t) is used as the input of the neural network model, according to Real-time prediction of the arm's forces on the x-, y-, and z-axes at the end of the robot
[0156] represents the human intention to correct the trajectory, where and Indicates the human intention to correct the position trajectory, Represents the human intention to correct the normal force trajectory.
[0157] According to the directional relationship between the force exerted by the arm on the robot end and the robot speed, the execution speed of the posture model and force model is adjusted by changing the model time scaling coefficient τ;
[0158] When τ(t)>0, the forward posture and force model is run, that is, the posture and force model is iterated forward along the time axis;
[0159] When τ(t) = 0, the model stops iterating;
[0160] When τ(t)<0, the reverse posture and force model is run, that is, the posture and force model is iterated in the reverse direction along the time axis. |τ(t)| is positively correlated with the model execution speed:
[0161]
[0162] Among them, τ maxIndicates the maximum value of the model time scaling factor, represents the arm force vector predicted by the neural network on the robot's xy plane, β 2xy =[β 2x , β 2y ] represents the velocity vector output by the pose model, P m Indicates a preset positive parameter.
[0163] The position admittance control algorithm is used to correct the position trajectory on the robot's x-axis and y-axis. The stiffness term in the design algorithm is not zero, so that the corrected position trajectory can gradually converge to the taught trajectory.
[0164] Output position β of the pose model 1xy =[β 1x , β 1y ] and speed β 2xy =[β 2x , β 2y ], calculate the expected speed after correction along the x-axis and y-axis of the robot and position β xyd =[β xd , β yd ];
[0165]
[0166]
[0167] Among them, D xy and K xy are the damping and stiffness parameters of position admittance control, β xyd and The initial value and the output position β of the pose model 1xy and speed β 2xy Same, T represents the control period, represents the predicted arm force vector on the robot's xy plane.
[0168] Use the position admittance control algorithm on the robot's z-axis and set the algorithm stiffness term to 0, so that the operator can directly drag the robot end to perform normal force correction, and optimize the desired position β zd1 ,speed and acceleration Based on this, calculate the expected acceleration along the robot's z-axis after correction speed and position β zd :
[0169]
[0170]
[0171]
[0172] Among them, m z2 and d z2 denote the inertia and damping parameters for the modified normal force behavior, position β zd ,speed and expected acceleration The initial values of are respectively related to the z-axis optimized expected trajectory position β zd1 ,speed and acceleration The initial value of is the same.
[0173] The industrial computer will update the desired posture control instruction β d (t+1)=[β xd (t+1), β yd (t+1), β zd (t+1), β rd (t+1), β pd (t+1), β yd (t+1)] is sent to the robot to control the robot to follow the desired posture, and the real-time posture β and external force f of the robot end are saved at the same time.
[0174] like Figure 5 As shown, the operator corrects the position trajectory. The solid line represents the teaching position trajectory, and the dotted line represents the corrected position trajectory. The correction process can be divided into four stages (5-1), (5-2), (5-3) and (5-4).
[0175] in:
[0176] The stage (5-1) is to run the forward model, and the robot 1 starts from the starting point and performs normal grinding along the taught trajectory;
[0177] The stage (5-2) is when the robot 1 is about to enter the area 6 that does not require grinding, the arm applies an appropriate force to the end of the robot 1 Make the end of robot 1 deviate from the current trajectory and decelerate to avoid the area 6 that does not need to be polished. At this time, τ(t)>0 and
[0178] The stage (5-3) is when the end of the robot 1 passes the area 6 that does not need to be polished, and the arm is released. At this time, τ(t) = τ max , the end of robot 1 quickly converges to the taught position trajectory;
[0179] The stage (5-4) is that the end of the robot 1 converges back to the taught trajectory and continues the normal grinding operation.
[0180] like Figure 6 As shown, the operator corrects the normal force trajectory, and the correction process can be divided into four stages (6-1), (6-2), (6-3) and (6-4).
[0181] The stage (6-1) is to run the forward model, and the robot 1 starts from the starting point and performs normal grinding operations along the taught trajectory.
[0182] The stage (6-2) is when the normal force trajectory of the robot 1 during teaching grinding is too small and it passes through a rough area 7 on the workpiece but cannot achieve a good grinding effect. The arm applies an appropriate force to the end of the robot 1. Make τ(t) < 0, run the reverse model, and robot 1 performs trajectory backtracking.
[0183] The stage (6-3) is that when the end of the robot 1 returns to the rough area 7, the arm only applies force to the end of the robot 1 in the z-axis direction, increasing the grinding normal force, so that the robot 1 achieves a better grinding effect on the rough area 7.
[0184] The stage (6-4) is when the robot 1 finishes grinding the rough area 7 and releases the arm. At this time, τ(t)=τ max , running the forward model, the end of robot 1 continues the normal grinding operation along the taught trajectory.
[0185] During the correction process, the online optimization part ensures that the end of the robot 1 drives the grinding head 3 to always be perpendicular to the workpiece surface, and at the same time contacts the workpiece surface with an appropriate grinding normal force, which greatly reduces the difficulty of trajectory correction. The industrial computer 5 saves the latest trajectory of online optimization and correction in real time, providing the expected trajectory of posture and force for the next grinding operation.
[0186] The above embodiments and descriptions are only for explaining the principles and best embodiments of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, which shall fall within the scope of the invention to be protected.
Claims
1. A grinding method for a robot grinding system based on teaching trajectory optimization and correction, the grinding system comprising a robot (1), a six-dimensional force / torque sensor (2), a grinding head (3), an electromyographic wristband (4) and an industrial control computer (5), wherein the robot (1) is a six-axis robotic arm with a position control function; the six-dimensional force / torque sensor (2) is installed at the end of the robot (1) for measuring the external force applied to the end of the robot (1) by the environment or the operator during the grinding process; the grinding head (3) is installed at the six-dimensional force / torque sensor (2 ) is directly in contact with the workpiece for grinding, the myoelectric wristband (4) is worn on the right forearm of the operator and is used to collect eight-channel myoelectric signals of the arm, the industrial control computer (5) is electrically connected to the robot (1) and the six-dimensional force / torque sensor (2), and is connected to the myoelectric wristband (4) via Bluetooth, and sends control instructions to the robot (1) based on the external force obtained by the six-dimensional force / torque sensor (2) and the myoelectric signals obtained by the myoelectric wristband (4), so as to control the robot (1) to drive the grinding head (3) to move on the surface of the workpiece to complete the grinding operation; It is characterized by: The polishing method comprises the following steps: S1) Training data collection and processing: the operator drags the end of the robot (1) by hand to perform periodic movements along the x-axis, y-axis and z-axis respectively. At the same time, the industrial computer (5) reads the eight-channel original electromyographic signals of the arm measured by the electromyographic bracelet (4). and the force signal measured by the six-dimensional force / torque sensor (2) , synchronize the timestamps of these two sets of signals, and preprocess the EMG signal u(k) to obtain the expanded EMG signal matrix ; S2) Model construction and training: construct a neural network model and use the extended electromyographic signal matrix of the corresponding timestamp processed in step S1) and three-dimensional force signals Composition data pair , where k represents the current timestamp. The neural network is trained using the back propagation algorithm, and the optimal weight obtained by training is Satisfy the minimization loss function L: in, represents the optimal weight obtained through training, N represents the number of training set data, represents the three-dimensional force signal, Represents the predicted three-dimensional force signal; The trained neural network model represents the mapping relationship between the arm electromyographic signal and the predicted arm force at the end of the robot (1) as follows: Where, Represents the neural network mapping function; S3) trajectory teaching and modeling, in the drag teaching mode, the robot (1) is taught the posture trajectory for grinding on the workpiece surface and the normal force trajectory perpendicular to the workpiece surface , the industrial control computer (5) records the teaching posture and normal force trajectory, and uses dynamic motion primitives to model the robot (1) trajectory from the forward and reverse directions to obtain a posture model and a force model; Among them, the posture trajectory is: in, represents the end position of the robot (1), represents the end posture of the robot (1), given in the form of RPY rotation angle; S4), online optimization, using a force control algorithm and an attitude admittance control algorithm to online optimize the posture trajectory of the robot (1), and the attitude of the robot (1) is optimized by the attitude admittance control algorithm. The end of the robot (1) automatically adjusts its attitude according to the external torque of the environment, thereby achieving a direction of the grinding head (3) perpendicular to the workpiece surface during the grinding process; S5), online correction, using a neural network model to predict the force exerted by the arm on the end of the robot (1), adjusting the posture and force model execution speed, through position admittance control, the industrial computer (5) sends a control instruction to the robot (1), and online corrects the optimized position and force trajectory of the robot (1); S6) and loop through steps S4) and S5) until the online optimization and correction of the teaching trajectory are completed.
2. The polishing method of a robot polishing system based on teaching trajectory optimization and correction according to claim 1, characterized in that: In step S1), the electromyographic signal u(k) is preprocessed as follows: S11), rectify and filter the original electromyographic signal u(k) to obtain the electromyographic signal envelope , the calculation formula is: Where k represents the current timestamp and m represents the pre-designed filtering parameters; S12), EMG signal envelope Perform standardization processing to obtain standardized electromyographic signals , the calculation formula is as follows: Where, Represents the EMG signal envelope The average value of Represents the EMG signal envelope The standard deviation of S13) Use sliding window to intercept the standardized EMG signal , get the expanded electromyographic signal matrix , specifically: Where, To normalize the EMG signal, w represents the sliding window length.
3. The grinding method of a robot grinding system based on teaching trajectory optimization and correction according to claim 1, characterized in that: In step S2), the neural network model includes an input layer, four convolution modules and an output layer. The neural network model is based on the expanded electromyographic signal matrix. As input, to predict the three-dimensional force signal As output; Each convolution module includes a 2D convolution layer, a batch normalization layer BN and a 20% dropout layer, and is activated by the rectified linear unit ReLU. The number of convolution kernels in the convolution layer is designed to be 4, 8, 16 and 32 respectively, and the size of the convolution kernel is designed to be 2x2. The output layer is designed as two fully connected layers with 6 and 3 units respectively, and ReLU is used for activation in each fully connected layer.
4. The grinding method of a robot grinding system based on teaching trajectory optimization and correction according to claim 1, characterized in that: In step S3), the dynamic motion primitive is used to model the end position trajectory of the robot (1) in the forward and reverse directions of the time axis to obtain the position model: Where a and b represent the stiffness coefficient and damping coefficient of the pose model, respectively, and g and They represent the target value and initial value of the pose trajectory respectively; τ represents the model time scaling coefficient; and They represent the end position and velocity of the robot (1) respectively; Represent the weight, width and center of the i-th Gaussian basis function φi respectively; M represents the number of selected Gaussian basis functions, s represents the model phase variable, represents the preset positive parameter; represents the acceleration of the robot end, represents the robot terminal speed, f(s;ω) represents the model nonlinear term, represents the first derivative of the model phase variable; The normal force trajectory of the robot (1) z-axis is modeled in the forward and reverse directions along the time axis using dynamic motion primitives to obtain the force model: Where τ is the time scaling coefficient of the model, c and d are the stiffness coefficient and damping coefficient of the force model respectively, and represent the target value and initial value of the force trajectory, respectively, and They represent the z-axis force and the derivative of the force at the end of the robot (1), Represents the weight of the i-th Gaussian basis function φi; the posture and force models are driven by the same phase variable s to achieve synchronization on the time axis; Represents the second derivative of the z-axis force at the end of the robot, Represents the first derivative of the z-axis force at the end of the robot.
5. The grinding method of a robot grinding system based on teaching trajectory optimization and correction according to claim 1, characterized in that: In step S4), the attitude admittance control algorithm is: Define R = H (r, p, y) as the transformation from the RPY rotation angle to the corresponding rotation matrix, and r = G (R) as the transformation from the rotation matrix to the corresponding rotation vector. and is the corresponding inverse transformation, then the attitude offset represented by the rotation vector for: in, Expressing expectation, Represents the rotation matrix corresponding to the output posture of the pose model, represents the attitude offset expressed as a rotation matrix; Iterative calculation of the robot's (1) desired posture , and , expressed in the form of RPY rotation angle: Where Δ(·) represents the increment from the current time step t to the next time step t+1, Dr and Kr represent the damping and stiffness parameters of attitude admittance control, respectively. represents the angular velocity of the end of the robot (1), To construct the external torque at the end of the robot (1), nx and ny represent the x-axis and y-axis torques measured by the six-dimensional force / torque sensor (2), respectively, and T represents the control period; The posture of the robot (1) is optimized by the posture admittance control algorithm, and the end of the robot (1) automatically adjusts its posture according to the external torque of the environment, so that the direction of the grinding head (3) is perpendicular to the surface of the workpiece during the grinding process; In order to meet the requirement of grinding the workpiece with appropriate normal force, the output of the force model is used as the expected grinding normal force, and the expected position is adjusted according to the expected grinding normal force. ,speed and acceleration Based on this, the force control algorithm is used to iteratively calculate the z-axis optimized expected acceleration of the robot (1) ,speed and location : Where t represents the current time step, T represents the control period, and are the inertia and damping parameters for adjusting the force control performance, , and The initial values are respectively related to the output position of the pose model ,speed and acceleration The initial value of is the same, Indicates the expected grinding normal force and the output of the force model. It represents the z-axis grinding normal force measured by the six-dimensional force / torque sensor (2).
6. A grinding method for a robot (1) grinding system based on teaching trajectory optimization and correction according to claim 1, characterized in that: In step S5), the myoelectric bracelet (4) measures the original myoelectric signals of the eight channels of the arm in real time, and after rectification, filtering and standardization, the myoelectric signal stream is intercepted using a sliding window to obtain an expanded myoelectric signal matrix. As the input of the neural network model, according to Real-time prediction of the forces exerted by the arm on the x-axis, y-axis and z-axis at the end of the robot (1) represents the human intention to correct the trajectory, where and Indicates the human intention to correct the position trajectory, Represents the human intention to correct the normal force trajectory.
7. The grinding method of a robot grinding system based on teaching trajectory optimization and correction according to claim 6, characterized in that: In step S5), according to the directional relationship between the force exerted by the arm on the end of the robot (1) and the speed of the robot (1), the execution speed of the posture model and the force model is adjusted by changing the model time scaling coefficient τ; When τ(t)>0, the forward posture and force model is run, that is, the posture and force model is iterated forward along the time axis; When τ(t) = 0, the model stops iterating; When τ(t)<0, the reverse posture and force model is run, that is, the posture and force model is iterated in the reverse direction along the time axis. |τ(t)| is positively correlated with the model execution speed: in, Indicates the maximum value of the model time scaling factor, represents the arm force vector predicted by the neural network on the xy plane of the robot (1), Represents the velocity vector output by the pose model, and Pm represents the preset positive parameter.
8. The grinding method of a robot grinding system based on teaching trajectory optimization and correction according to claim 7, characterized in that: In step S5), a position admittance control algorithm is used on the x-axis and y-axis of the robot (1) to correct the position trajectory, and the stiffness term in the design algorithm is not 0 so that the corrected position trajectory can gradually converge to the teaching trajectory; Output position of the pose model and speed Based on this, the expected speed along the x-axis and y-axis of the robot (1) is calculated after correction. and location ; in, and denote the damping and stiffness parameters of position admittance control, and The initial value and the output position of the pose model and speed Same, T represents the control period, Represents the predicted arm force vector on the xy plane of the robot (1).
9. The grinding method of a robot grinding system based on teaching trajectory optimization and correction according to claim 8, characterized in that: In step S5), the position admittance control algorithm is used on the z-axis of the robot (1), and the algorithm stiffness term is set to 0, so that the operator can directly drag the end of the robot (1) to perform normal force correction, and optimize the desired position. ,speed and acceleration Based on this, calculate the expected acceleration along the z-axis of the robot (1) after correction ,speed and location : in, and denote the inertia and damping parameters for the modified normal force behavior, respectively, and the position ,speed and expected acceleration The initial values are respectively related to the z-axis optimized desired trajectory position ,speed and acceleration The initial value of is the same.
10. The grinding method of a robot grinding system based on teaching trajectory optimization and correction according to claim 9, characterized in that: In step S5), the industrial computer (5) updates the desired posture control instruction It is sent to the robot (1) to control the robot (1) to follow the desired posture, and at the same time save the real-time posture β and external force f of the end of the robot (1).
11. The grinding method of a robot grinding system based on teaching trajectory optimization and correction according to claim 10, characterized in that: The operator corrects the position trajectory in four stages, including: (5-1), running the forward model, the robot (1) starts from the starting point and performs normal grinding along the taught trajectory; (5-2) When the robot (1) is about to enter the area (6) that does not require grinding, the arm applies appropriate force to the end of the robot (1) , so that the end of the robot (1) deviates from the current trajectory and decelerates to avoid the area (6) that does not need to be polished. and ; (5-3) When the end of the robot (1) passes the area (6) that does not need to be polished, release the arm. , the end of the robot (1) quickly converges to the taught position trajectory; (5-4) The end of the robot (1) converges back to the taught trajectory and continues the normal grinding operation.
12. The grinding method of a robot grinding system based on teaching trajectory optimization and correction according to claim 11, characterized in that: The operator corrects the normal force trajectory. The correction process is divided into four stages: (6-1), running the forward model, the robot (1) starts from the starting point and performs normal grinding along the taught trajectory; (6-2) When the normal force trajectory of the robot (1) during teaching grinding is too small and it passes through a rough area (7) on the workpiece but cannot achieve a good grinding effect, the arm applies an appropriate force to the end of the robot (1) Make , running the reverse model, the robot (1) performs trajectory backtracking; (6-3) When the end of the robot (1) returns to the rough area (7), the arm only applies force to the end of the robot (1) in the z-axis direction, increasing the grinding normal force, so that the robot (1) achieves a better grinding effect on the rough area (7); (6-4) When the robot (1) finishes grinding the rough area (7) and releases its arm, , running the forward model, the end of the robot (1) continues the normal grinding operation along the taught trajectory.
Citation Information
Patent Citations
Track profiling flaw detection method based on mechanical arm
CN114839264A
Lower extremity exoskeleton for gait retraining
WO2013049658A1