An Investigation of Real-Time Robotic Polishing Motion Planning Using a Dynamical System

: When addressing the technical challenges of achieving precise force tracking during the local polishing process of polishing robots, controlling the contact state between the robot and the workpiece surface is essential. To this end, a contact motion-planning strategy based on dynamic systems is designed to generate trajectory routes during local polishing. The trajectory simulation of the local modulation dynamic system is achieved through the employment of the support vector regression (SVR) algorithm with a Gaussian kernel, facilitating the learning process. The feasibility and stability of planning local paths are validated using the local modulation dynamic system. To maintain a constant contact force between the end-effector polishing robot and the workpiece, an integral adaptive impedance control strategy is utilized, enabling the robot’s compliant control. Subsequently, an experimental system for the polishing robot is constructed in order to verify the effectiveness of the motion-planning system. The experimental results demonstrate that the proposed motion-planning approach is applicable in practical polishing processes, ensuring smooth contact and maintaining the desired contact force when scanning nonlinear surfaces, and thus showcasing stability and practicality.


Introduction
With the advancement of modern industry, the shapes of workpieces to be polished, such as automotive parts and hardware, are becoming increasingly unique, and are often produced in small batches [1].The use of polishing robots to address the demand for small-batch, customized production significantly enhances efficiency and precision.However, as the complexity of workpiece surfaces increases, higher demands are being placed on the polishing quality and applicability of polishing robots [2,3].Sometimes, it is necessary to polish specific areas of a workpiece, such as automotive parts.The force control and trajectory planning of the polishing robot are the key factors determining the quality of polishing [4].Thus, there is a need to develop more precise motion control strategies to pneumatic constant-force systems, from the cylinder input to the force output at the device end, significantly affect the system's force control precision [7].In comparison, admittance control offers advantages in force tracking.Admittance controllers can filter force errors, generating adjustable position signals [8], and control the contact force during polishing by adjusting the coefficients of the admittance controller.Moreover, it has structural advantages, enabling existing position-controlled robots to perform force control without modifying the robot's internal structure [9].
In addition, passive losses generated during the tracking process are a problem for any controller driven by a time-indexed reference trajectory [10,11].Mirrazavi et al. [12] used a dynamic system approach and time-invariant control to achieve quick responsiveness and the dynamic re-planning of trajectories.Historically, dynamic systems have been used for controlling trajectories in free space, but an increasing amount of research indicates their applicability in controlling contact states with objects [13][14][15].
This paper proposes a localized-modulation motion-planning strategy based on the original autonomous dynamic-system (DS) control framework for performing contact tasks on complex workpieces.It also introduces an integral adaptive admittance control law to ensure constant contact force during the polishing process.Experiments are designed to validate the feasibility and practicality of the localized-modulation motion-planning strategy.

Locally Modulated Dynamic Systems
Dynamic systems (DS) typically take state variables as inputs and return the rate of change of those variables.If a DS is not an explicit function of time, it is referred to as a primitive autonomous dynamic system:  ( ): f x   is a function that maps the current Cartesian position of the robot system to Cartesian velocity.The primitive autonomous dynamic system can be seen as a velocity vector field, which describes the expected behavior at any given position in space.
Locally modulated dynamic systems (LMDS) reshape the primitive autonomous dynamic system model locally, offering the advantage of preserving the stability of the original model.When reshaping the original autonomous dynamic system ( ) f x via modula- tion field ( ) M x , the form of the LM dynamic system is as follows:  is a continuous matrix-valued modulation function that modulates the primitive autonomous dynamic system ( ) f x , enabling the desired behavior and re- shaping the system as a result.When modulated locally with a full rank, the reshaped dynamic system inherits certain properties of the original autonomous dynamic system.The boundedness and stability of LMDS have been extensively demonstrated [16].
Because rotation matrices are always full-rank and act locally, this paper adopts the rotation matrix modulation of the original autonomous dynamic system.To increase flexibility, velocities in the original autonomous dynamic system can be scaled by multiplying the rotation matrix by a scalar.Let  , the original velocity remains unchanged.Then, a modulation function is constructed to locally rotate and accelerate or decelerate the original autonomous dynamic system, as shown below: The following function is used to control the influence of modulation, determining which regions of the state space are affected by the original autonomous dynamic system.
where ( ) x represents the distance from any position in space to the surface, and  represents the rotation speed coefficient controlling the rate of decay of the rotation matrix.
Let ( ) ( ) w h   x x denote the state-dependent rotation, which smooths the rotation of the original autonomous dynamic system, rotating it fully by an angle of  only at The modulation function is defined as the state-dependent rotation matrix: where K is the cross-product matrix, only with ( ) wx rotated.
Assuming the non-penetrability of the contact surface, the LMDS should satisfy the following relationship for all points in space:

Learning about Locally Modulated Dynamic Systems
The surface can be described as the set of all  (8) where  w  represents the weight vector, which is the normal vector of the hyperplane and determines the direction of the hyperplane; b is the intercept, determining the position of the hyperplane.
The prediction of the  -SVR for a given surface-point training set is as follows: where i .This method of controlling permissible deviation through the tolerance error is referred to as the  insensitive loss function [17].
To reduce computational costs, SVR is used to perform inner-product operations in a high-dimensional feature space by introducing a kernel function.This paper assumes the mapping of  from the sample space  to a Hilbert space  , and if there exists a kernel function such that x x , then this kernel function can implic- itly determine the nonlinear mapping  .The mapping  defined by the kernel func- tion transforms a 3D surface into a hyperplane in the high-dimensional Hilbert space  .Among all kernel functions, the Gaussian kernel function is the most commonly used.This paper's  -SVR employs the following Gaussian kernel function: x x (10) After introducing the Gaussian kernel function, the surface model can be written as follows: The training data of this paper include both surface training sets and additional training sets [18].Additional training points are generated by moving given surface points i x along their surface normal at a distance i y .i y is distributed on both sides of the sur- face, with negative values below the surface and positive values above the surface.Therefore, SVR learns a hyperplane in the Hilbert space  through data training, which is used to estimate the distance ( ) x from any position x in space to the surface.The normal vector ( ) nx is obtained by calculating the gradient of the surface model ( ) h x , i.e., by taking the first-order partial derivative of ( )

Integral Adaptive Admittance Control
This section employs adaptive impedance control to achieve force tracking in the presence of uncertainties in the environmental information [19].Currently, there are two main methods of adaptive impedance control: position compensation and velocity compensation adaptive impedance.
The single-degree-of-freedom control formula used for position-compensation adaptive impedance is as follows: The compensation term is defined as follows: where  represents the sampling rate;  denotes the update rate; and 0   .
The single-degree-of-freedom control formula used for velocity compensation adaptive impedance is as follows: The compensation term is defined as follows: Equations ( 14) and ( 16) contain discrete compensation terms, making theoretical analysis difficult and requiring iterative solutions, which may lead to significant errors.Taking position-compensation adaptive impedance control as an example, assuming an infinitesimally small sampling period, position compensation is derived based on differential theory: Substituting Equation ( 17) into Equation ( 13) yields the control law for a single degree of freedom: Based on the above derivation, extending the single degree of freedom to six degrees of freedom, we obtain the new control law: where i K is the integral coefficient of force error, and c X is the modified robot motion control target.
Since the new control law includes an integral term, Equation ( 19) is referred to as the integral adaptive impedance control law.The soft controller, designed based on the integral adaptive impedance control law, is shown in Figure 1.
In the soft controller, the integral term in the integral adaptive impedance control law is mainly used to compensate for system errors and external disturbances, improving the robustness and tracking performance of the control system.As the integral parameter i K increases, the overshoot will significantly increase.For convenient application in robot control, Equation ( 19) can be converted into a discrete format: where T is the cycle period of the integral adaptive impedance control.

Stability and Convergence Analysis
Integral adaptive impedance control (IAIC) is essentially a proportional-integral control of force error, where the integral term is utilized to eliminate steady-state errors.In contrast to adaptive impedance control algorithms, it does not include discrete compensation terms, thereby allowing for the use of traditional frequency domain analysis methods to analyze its steady-state and dynamic performance.For the sake of facilitating frequency domain analysis, the following assumptions are made: Based on these assumptions, the outer loop of the integral adaptive impedance control can be regarded as an independent control system, where the desired force d F serves as the input, the actual contact force e F acts as the output, and the difference between the desired position and the environment position N serves as the disturbance.Since the six degrees of freedom at the end of the robot are independent of each other, for simplicity, this paper focuses on the one-dimensional interaction force in the subsequent analysis.After system simplification, the block diagram of the single-degree-of-freedom integral adaptive impedance control outer-loop control system is illustrated in Figure 2.
When considering only the relationship between disturbance and output force, applying the superposition principle and setting ( ) 0 R s  , the transfer function from the disturbance input ( ) N s to the output signal ( ) C s can be obtained: When both the input signal ( ) R s and the disturbance ( ) N s act simultaneously, the system's output is given by the following equation: It can be seen from Equation (24) that the simplified system is a third-order linear system, and its stability can be analyzed using the Routh criterion.Since the admittance parameters of the integral adaptive impedance control system are all diagonal matrices, only one degree of freedom of the system needs to be considered.The characteristic equation of the third-order linear system's closed-loop function is as follows: The Routh table constructed according to the Routh criterion is as follows: The first column of the Routh table should have exclusively positive elements to ensure the asymptotic stability of the third-order linear system.The admittance parameters m , b , and k , and environmental stiffness parameter, e k are nonnegative, and all coef- ficients that satisfy the characteristic equation are positive.To ensure that all elements in the first column of the Routh table are positive, it is necessary to satisfy the following equation: According to the above constraints, the constraint equation for the stability of the third-order linear system can be derived, i.e., the range of i k values is as follows: For a rigid environment where the environment stiffness e k is much larger than the admittance stiffness k , the following can be obtained: Equations ( 28) and (29) show that, by choosing an appropriate i k value, the asymp- totic stability of the integral adaptive impedance control system can be maintained.
When input and disturbance are applied, the error signal ( ) E s is used as the output of the integral adaptive impedance control system.Using the superposition principle, the error quantity of the system is obtained as follows: For an integral adaptive impedance control system that is asymptotically stable, the input step signal is When the disturbance , the steady-state error of the integral adaptive impedance control system for step input signal is zero.
To further validate the robustness of the integral adaptive impedance control algorithm, consider the case when d f is a dynamic force.Assuming the input signal is a sine function sin( ) t  , whose Laplace transform is , then the steady-state error of the integral adaptive impedance control system with a step disturbance of When the disturbance , the steady-state error of the integral adaptive impedance control system for sine input signal is zero.
This section analyzes the adaptability of the integral adaptive impedance control law to changes in input and disturbance and demonstrates that the algorithm has good adaptive performance.The algorithm can achieve precise robot force control and maintain stable control performance even in the face of disturbance changes.

Real-Time Motion-Planning Simulation
In the previous section, a motion planner was designed based on LMDS, and the SVR algorithm with a Gaussian kernel was employed to learn the vector and distance functions of LMDS.To validate the feasibility of using LMDS to plan local polishing paths for robots, MATLAB platform was employed for path-planning simulations, utilizing the Robotics System Toolbox to define the UR3 robot model in the simulation environment.
Before conducting the path-planning simulation, the surface model was learned using the SVR algorithm with a Gaussian kernel.During the simulation process, the motion planner continuously updated the LM dynamic system based on the actual end-effector position of the robot, which required the real-time computation of LMDS.The computation process of LMDS is illustrated in Algorithm 1, with the velocity scaling factor  set to 0.2 and the rotation speed factor  set to 20.

Algorithm 1 Calculate LMDS
)e x p ( ) x , along with the projection vector p of the direction vector on the sur- face.Then, the rotation vector μ is calculated using the normal vector n and the pro- jection vector p .This is followed by the determination of the rotation angle w that attenuates the rotation matrix.Finally, the rotation matrix of LMDS is computed using the Rodrigues formula, yielding the velocity vector x  at any position in Cartesian space.

4: Projection vector
In the simulation, the contact surface is non-penetrable.The results of LMDS path planning simulation are illustrated in Figure 3.The motion planner updates LMDS based on the actual end-effector position of the UR3 robot arm, outputting the next desired pose and the motion velocity of UR3 relative to the current state.LMDS drives UR3 to make contact with the surface and move along it from the initial position 0  In the figure, the contact surface is denoted by ( ) 0   x , and ( ) 0   x represents the space above the contact surface.During the process of robot path planning with LMDS, G represents the Cartesian velocity vector, and the gray curve represents the vector field of the Cartesian velocity (i.e., the collection of Cartesian velocities x  ).( ) nx repre- sents the normal vector at the path point, which determines the desired posture of the polishing tool of the robot.The simulation results of local robot path-planning demonstrate that LMDS ensures that the robot reaches the attractor (i.e., the target point), validating the feasibility and stability of the motion planner.

Local Polishing Experiment
The architecture of the polishing robot system is depicted in Figure 5, comprising a six-dimensional force sensor and a polishing tool at the robot's end effector.The control cabinet of the UR3 communicates with the PC host via a TCP/IP protocol, while the controller of the force sensor exchanges data with the PC host via USB.The PC host issues control commands to the polishing tool within the same local network via Wi-Fi, and it acquires depth image data of the workpiece from the Kinect V2 sensor via USB.The entire experimental setup is illustrated in Figure 6.The workpiece to be polished is a car rearview mirror, which is fixed onto the platform with a clamping plate.The purpose of this experiment is to verify the effectiveness of the proposed motionplanning algorithm.Before starting the local polishing experiment, the polishing tool is brought into contact with the surface of the car rearview mirror using the robot's teaching function.The collection of end-effector positions where the contact force is non-zero is performed to produce as a dataset for the surface to be polished.The LMDS of the car rearview mirror is learned from this dataset.Firstly, the polishing tool is brought into contact with the surface of the car rearview mirror, and the collection of end-effector positions where the contact force is non-zero produces the dataset for the surface to be polished.Then, the LMDS of the car rearview mirror is learned using the SVR algorithm with a Gaussian kernel.Finally, the LMDS drives the UR3 robot arm to make contact with the surface of the car rearview mirror and move from the initial position to the target point.
The polishing experiment process is illustrated in Figure 7. Before polishing, black marker pen traces were visible on the surface of the car rearview mirror, as shown in (a) of Figure 7.After polishing, the black marker pen traces were completely removed, as shown in (b) of Figure 7.During the local polishing experiment, the contact force in the Z direction of the polishing tool's coordinate system is collected using the six-dimensional force sensor, with a sampling period of 8 ms.The actual change in the contact force between the polishing tool and the car rearview mirror surface is shown in Figure 9.The gray solid line represents the contact force in the Z direction of the polishing tool's coordinate system, fluctuating around −10 ± 1.5 N. It can be observed from the figure that the integral adaptive impedance controller effectively suppresses the impact between the polishing tool and the car rearview mirror during contact and ensures a constant contact force between them.The criteria for evaluating polishing quality primarily relate to the geometric morphology, physical properties, and chemical properties of the polished surface.Surface roughness is one of the most direct and commonly used indicators of polishing quality; a lower surface roughness means a smoother surface.Therefore, two indicators, namely the average surface roughness (Ra) and the maximum profile height (Rz), are used to describe surface roughness and evaluate the polishing effect.The same position on the surface before and after polishing is scanned using the Keyence laser profiler LJ-X8020 to obtain surface information.Figure 10 shows the surface texture and profile of the same local position on a car rearview mirror surface before and after polishing.The original surface was only processed with a polishing cloth, with a roughness Ra of 0.27 µm and an Rz of 2.02 µm.After polishing, the surface roughness Ra decreased to 0.042 µm, and the Rz decreased to 0.25 µm.The effective reduction in the surface roughness of the car rearview mirror once again confirms the effectiveness and feasibility of the designed motion-planning method for use in the polishing robot system, and it is suitable for polishing freeform surfaces.

Discussion
Through path-planning simulations and polishing experiments, the feasibility and stability of motion planning are validated based on locally modulated dynamic systems for real-time path generation.This approach meets the requirements for precise force control, making it applicable in practical polishing tasks.
The integral adaptive admittance control algorithm proposed in this paper is implemented based on the position control of the robot, and the accuracy of force control depends on the repeatability of the robot's positioning.In practical production, high polishing efficiency is required, necessitating further improvement in the frequency of the integral adaptive admittance controller.For instance, reducing the control cycle to 1 ms or utilizing the velocity control loop of the robot to achieve force control could be explored.

Conclusions
The paper proposes a trajectory planning method based on dynamic systems for generating trajectories during polishing processes.It utilizes a six-dimensional force sensor to measure contact forces and torques, integrating them with integral adaptive impedance control to maintain constant contact forces.This strategy, rooted in the local modulation of dynamic systems, offers flexible and smooth motion and force generation, ensuring that the robot reaches the target surface and moves smoothly along it, an attribute which can be applied to real polishing work.
However, the polishing experiments performed in this study did not delve into specific polishing techniques.In future research, various polishing discs, abrasives, and contact pressures could be employed to polish automotive rearview mirrors, thereby establishing a comprehensive set of automotive rearview mirror-polishing techniques.Moreover, during the polishing process, the robotic polishing system solely relied on force information as determined using a six-axis force sensor.Subsequent studies could explore the utilization of a multi-sensor fusion approach to devise a robotic polishing system.For instance, researchers could integrate sensors such as vision and laser sensors for the realtime surface quality assessment of automotive rearview mirrors.Subsequently, based on the information obtained throudgh sensor fusion, an expert system could be employed to adjust polishing parameters, thereby enhancing the quality of the polishing process.

where 3 
x  is defined as the end-effector position in the Cartesian coordinates of the robot.
 R x  represent the state-dependent rotation matrix, and let  denote the velocity scaling factor.When 1


are Lagrange multipliers, with an upper bound of C .i SV   x x represents the support vectors of SVR, which are also part of the training samples, with the size of the support vector set being m .The resultant surface model ( ) h x generated after training is only related to the support vectors.The constant 0 C  is the penalty coefficient, which controls the balance between the flatness of ( ) f x and the permissible deviation, where the permissible deviation is less than or equal to the tolerance error 

Assumption 1 :Assumption 2 : 3 :
The robot can accurately track the given position, i.e., c  X X .The disturbance term is the difference between the desired position and the static position of the environment, i.e., The environment follows a linear spring model, where the actual contact force depends on the spring stiffness and the displacement of the environment, i.e.,

Figure 2 .
Figure 2. Structure diagram of integral adaptive admittance outer-loop control system.In the figure, ( ) Rs and ( ) N s represent external inputs to the system, ( ) Rs is the de- sired output contact force of the system d f , ( ) N s is the disturbance, ( ) Cs is the output

2 
To compute LMDS, the SVR algorithm with a Gaussian kernel ( ) is utilized to learn the surface model of the workpiece to be polished.The parameters generated after learning include the intercept b , the set of Lagrange multipliers i  and * i  , and the set of support vectors SV .Using the surface model, it is possible to obtain the normal vector ( ) nx at any position in space and the distance ( ) x from any position in space to the surface.Subsequently, the direction vector d v is computed from any position in space to the target point *

Figure 4 Figure 4 .
Figure4depicts LMDS during the motion-planning simulation, including the contour levels of the surface, i.e., the distance ( ) x from any position in space to the surface, and the vector field of ( ) g x .

Figure 7 .Figure 8 .
Figure 7. Polishing experiment process.(a) Surface condition before polishing; (b) Surface condition after polishing.The trajectory of the polishing tool's end effector during the local polishing experiment is shown in Figure8.The black dots represent the local surface dataset collected before polishing, and the gray curve represents the trajectory of the polishing tool's end effector generated by the LMDS.The robotic arm moves the polishing tool from the initial position 0 (0.356, 0.100,0.37) x to the target point * (0.356,0.040,0.315)x .Surface data collectionLMDS trajectory Initial PositionTarget point

Figure 9 .
Figure 9. Contact forces in local polishing experiments.

Figure 10 .
Figure 10.Surface roughness of the automobile rearview mirror.(a) Surface roughness before polishing; (b) Surface roughness after polishing.