1 Introduction

It has been becoming more and more popular to apply industrial robots to tasks which previously depend solely on human labor because robots can effectively do tedious jobs for long hours leading to better quality [1]. Because of limitations associated with onsite assembly, traditional multi-axis machining centers often cannot adapt to the manufacturing and machining requirements of complex structural parts [2]. The flexibility and low cost of industrial robots have led to their gradual use in industry, and robots are now widely used in mechanical engineering and manufacturing [3]. Material removal processes such as grinding, trimming, milling, and drilling are increasingly carried out by industrial robots as they combine dexterity, versatility, and cost-effectiveness. This kind of applications requires high accuracy in positioning and trajectory. Unfortunately, industrial robots are designed to perform repeatable tasks with high repeatability but low positioning accuracy. Due to the limitation of motion accuracy and structural stiffness, robot repeatability ranges typically from 0.03 to 0.1 mm, and the accuracy is often measured to be within several millimeters [4].

Many fields of investigation are proposed to improve the accuracy in positioning and trajectory of industrial robots such as robots calibration [5,6,7,8,9], process planning [10,11,12], and process control [13,14,15,16]. Robot calibration increases the accuracy of positioning by decreasing the deviation between the commanded pose and the real pose. The complete procedure of robot calibration basically includes four stages: modeling, measurement, identification, and compensation. A kinematic model of a robot is the mathematical description then a typical case on robotic machining is conducted to validate the calibration of its geometry and motion. The Denavit-Hartenberg convention is commonly used to build this model. Xu et al. [7] calibrates the tool frame and workpiece frame by holding the ruby probe as the main calibration tool, results of the robotic belt grinding system, the results showed that the mean error decreased from 0.5 to 0.2 mm by the sphere-to-sphere calibration method. Leali et al. [8] proposed an effective workcell calibration to reduce errors in robot manufacturing and enable robot machining applications, which is composed of two steps: first calibration of the workpiece-independent equipment in the workcell layout and final automated online calibration of workpiece-dependent equipment. The method is applied to a changeable robotic workcell for finishing aluminum cast housings, which proves the effectiveness in enhancing accuracy. But, it is difficult to define and seek the zero reference in the real robotic machining process and the specific calibration. Zha et al. [11] presented a unified approach to coordination planning and control for robot position and orientation trajectories in Cartesian space. The unified treatment of the end-effector positions and orientations is based on the robot pose ruled surface concept and used in trajectory interpolations. The accuracy in positioning for the robot end-effector is improved by generating and optimizing the pose ruled surface under the constraints of kinematics and dynamics performances. Kurt et al. [12] explores a means by which a construction robot can leverage its sensors and a building information model to perceive and model the actual geometry of its workpieces, adapt its work plan, and execute work in a construction environment, the robot was found capable of identifying the true position and orientation of the joint’s center with a mean norm positioning error of 0.11 mm and orientation error of 1.1°. Roesch et al. [13] present a method to increase the operational accuracy of milling with industrial robots by a model-based fuzzy control. The path-deviation is determined indirectly using a stiffness-model of the robot and transferred to the robot controller to correct the command values of the robot’s internal position control, which was implemented by detecting the vibration state of the robot based on the cutting forces. The experiments show that the force-induced deviation was reduced by 70%, and the contour error was halved. Domroes et al. [16] gives an insight into the development and evaluation of force controlled machining processes. They focused on a deburring and a grinding, representing the major applications in today’s robot machining. The deburring use-case implements a force dependent feed-rate control, and the grinding use-case implements an orthogonal force (pressure) control, which indicates that a force controlled robotic system can be successfully adapted to robotic machining. With the capabilities of robot force control, the demands in programming are rising and so does the number of parameters which determine the robots behavior and process quality. The achieved results are limited to the inspected application or even one kind of workpiece.

As shown in Fig. 1, blades of complex integral impeller have three surfaces: pressure surface, suction surface, and flange surface. The intersection curve (green curve) between pressure surface and flange surface is flange curve on pressure surface, and the intersection curve (blue curve) between suction surface and flange surface is flange curve on suction surface. The red curve is the central axis of flange surface. Two welding grooves locate respectively between flange surface and pressure surface, suction surface. According the design requirements, the width of flange surface is 4.75 ± 0.25 mm, and the central curve is the central axis after the machining on the welding grooves of each blade, which means that equal machining allowance is needed on both sides. The angle between the welded groove surface and the flange surface is 45 ± 2°. Nowadays, this processing mainly relies on the manual grinding operation of skilled workers, which leads to the low production efficiency, the unstable machining quality, and the process is harmful to human health.

Fig. 1
figure 1

Workpiece drawing and local magnification of impeller

In this paper, a strategy of robotic automatic machining on welding groove of complex integral impeller is introduced. This strategy takes advantage of the low positioning accuracy and high repetitive positioning accuracy of the robot. A method of machining trajectory compensation and correction based on in situ measurement of force/position feedback control is proposed to improve the processing trajectory accuracy and complete the machining on welding groove of blade. The processing characteristic curves of the blade are extracted and discretized, such as flange curves, cover tray curves and central axis according to the impeller 3D model, and the theoretical machining trajectory of the robot is generated. The coordinate unification of the platform system and the load tool gravity compensation are carried out, and the measurement of the contact force is realized. Along the cutting depth direction of the welding groove (normal direction of the groove surface), the close contact between the cutting tool and the machining area is performed by the force/position feedback control. Meanwhile, the actual coordinates of the discrete points of the robot trajectory are obtained, and the deviation between the actual coordinates and the theoretical trajectory points is calculated. By compensating and modifying the theoretical trajectory with the deviation, the accurate machining trajectory (the actual trajectory) is obtained. In the subsequent processing, the actual trajectory of the flange curve is used as the reference for each deep cutting feed, which improves the motion positioning accuracy of the robot by controlling the repetitive positioning accuracy, and achieves the removal of the variable cutting depth. In the actual processing of welding groove of complex integral impeller, the processing platform system and processing method are verified, and the test results meet the design requirements.

2 Platform system setup

As shown in Figs. 2 and 3, a robotic automatic machining platform system for welding groove of complex integral impeller was built. The system mainly consists of industrial robot, computer, robot controller, machining tool (pneumatic motor, rotary file, quick change chuck, connectors, etc.), six dimensional force/torque sensor, tools changer and workbench, etc. According to the impeller processing model, the theoretical machining trajectory generated by the computer is input into the robot controller. The controller instructs the robot trajectory, drives the machining tool installed on the end effector of robot to locate correctly with the impeller, and removes the welding groove of the blade. The force/torque sensor is installed between the end effector and the machine tool. During the processing, the sensor can measure the contact force online and real-time. Then the measured signals are filtered, denoised, amplified, extracted, and transmitted to the computer to form a close loop control of force/position feedback mode. The computer mainly completes the process such as (1) the extraction and discretization of flange curves, central axis and cover tray curves, and the generation of theoretical machining trajectory; (2) before the actual machining, the robot drives the cutting tool movement according to the theoretical trajectory of flange curve. The force/position feedback control method is used to compensate and correct the trajectory, which keeps the cutting tool in close contact with the flange curve. The robot controller obtain the actual position (accurate position) of each discrete point position along the cutting depth direction of the machining and transmits them to the computer; (3) the deviations are obtained by comparing the actual with the theoretical trajectory points, and transmitted to the robot controller to compensate the theoretical machining trajectory for the close contact between the cutting tool and the machining position along the whole curve. Machining tools mainly include pneumatic motor, cylindrical rotary file and quick change joint, etc. Pneumatic motor drives the rotary file to rotate to complete cutting. The worktable is used for the installation of impeller, and has the function of rotating along Z-axis and X-axis. Tools changer is used to store machining tools, which can equip and provide the transformation of robotic cutting tools.

Fig. 2
figure 2

Robotic automatic machining platform system composition

Fig. 3
figure 3

Components of machining tools

3 Processing characteristic curves extraction and discretization

3.1 Extraction, sequencing, and discretization of two flange curves

In the workpiece coordinate system, the blade flange surface, flange curves of pressure surface and suction surface are extracted according to impeller 3D model. If there are more than one flange curve, the curves need to be sorted according to the sequence of the beginning and the end. According to the change of curvature of flange curve and the requirement of machining accuracy, the same number of discrete points is used to separately discretize two flange curves starting from the tip of blade. A series of discrete point pair and between on the pressure surface A(i) and the suction surface B(i) with the same position ranking index order i (natural number) from the tip of the blade are formed, and the distance between a pair of discrete points on the flange surface is the width H(i), which is a variable along the cover tray curve, as shown in Fig. 4.

Fig. 4
figure 4

Extraction and discretization of flange curves

3.2 Generation and extraction of central axis

A pair of discrete points is selected orderly, and the two points are connected as one side of a triangle. The blade flange surface is discretized into a series of triangular mesh surfaces. The triangular mesh index of the two points and the value of the barycentric coordinate system in the triangle are calculated respectively. The triangular index and the coordinate system of gravity center are taken as input, and the triangular mesh discrete geodesic solution algorithm is applied to obtain the triangular mesh discrete geodesic line. The midpoint coordinate of the geodesic line is the central axis point corresponding to the point pair of the flange curve on the flange surface. To all discrete point pairs of two flange corves, the same operations can be performed to obtain the central axis points and the curve fitting the central axis points of all pairs to form the central axis of blade flange surface, as illustrated in Fig. 5.

Fig. 5
figure 5

Generation and extraction of central axis

3.3 Generation and discretization of cover tray curves

The distance between the discrete point and the center axis point on the flange surface is calculated as H(i)/2 according to the corresponding discrete point pair and the obtained central axis point. If the residual width of the flange surface is D after machining, the point with offset distance D/2 of the central axis on the flange surface is the point on cover tray curve. The distance from this point to the corresponding point on the flange curve is the machining allowance, whose value is H(i)/2-D/2. Using the same method, the corresponding points of the two curves are formed by centering the discrete points on the central axis in turn. In the workpiece coordinate system (the base coordinate system), the position and posture of each discrete point on the cover tray curves are generated, which are the theoretical machining points. The robot performs the machining operation by following the sequential list of these discrete points, known as a trajectory, generated by computer-aided manufacturing (CAM) software. Connecting these points to form a cover tray curve, the distance between the cover tray curve and the flange curve is the size of the total machining allowance. The machining allowance between the cover tray curve and flange curve is not same. It varies with the change of machining position, that is, H(i)/2-D/2 is variable, as presented in Fig. 6.

Fig. 6
figure 6

Generation of cover tray curves

4 Establishment and unification of coordinates

4.1 Establishment of the tool coordinate system (coordinate system T)

The tool coordinate system is established by using the function of the robot itself. The tool coordinate system is specified as follows: the coordinate origin is the suitable point on the edge of the cylindrical rotary file, and the X-axis is the speed direction when the coordinate origin rotates. The Y-axis is parallel to the axis of the rotary file and points to the end effector of the robot. The Z-axis is determined according to the right manipulation.

4.2 Establishment of the workpiece coordinate system, namely the base coordinate system (coordinate system B)

Four-point indirect method of robot is used to establish workpiece coordinate system. Firstly, four feature points are selected in the 3D impeller model, and the coordinate values in the design coordinate system are recorded. Then, the four feature points on the workpiece are measured by the robot’s cusp in turn, and the coordinates are input into the robot teaching system. After completing the above operation, the robot automatically calculates the transformation relationship between the workpiece coordinate system and the robot coordinate system, thus completing the calibration of the workpiece coordinate system, as illustrated in Fig. 7.

Fig. 7
figure 7

Setup of base coordinate system

The transformation of coordinate system is unified. It is to transform tool coordinate system T, workpiece coordinate system B, sensor coordinate system (coordinate system S) into a unified coordinate system with robot coordinate system as reference.

4.3 Setting and adjusting of local frame

The local frame between workpiece coordinate system and tool coordinate system is set and adjusted. The normal vector of each discrete point is calculated according to the normal evaluation direction of the discrete point of blade cover tray curve on the flange surface. The vector is taken as the Z-axis direction of the discrete point local frame. According to the tangential evaluation method of the discrete points on the cover tray curve, the tangential vectors of the discrete points are calculated, and the direction of the vectors is taken as the X-axis direction of the local frame. According to the right hand rule, the Y-axis direction of the local frame of each discrete point is determined. Then the Z-axis rotates 45 degrees along the X-axis, which is the vertical direction of the welded groove surface after machining, as shown in Fig. 8. The trajectory coordinates of discrete points of blade flange curve generated in workpiece coordinate system are all transformed into trajectory coordinates of the local frame.

Fig. 8
figure 8

Setting and adjusting of local frame

5 Gravity compensation

The force/torque sensor is installed between the end effector and the quick change chuck for in situ measurement of force/position feedback control. Under static conditions, the force and torque data measured by the sensor consist of three parts: (1) the systematic error of the sensor itself; (2) the gravity of the load tool (including the machining tool and the quick change chuck); and (3) the external contact force of the machining. In the process of force/position feedback control, it is necessary to calibrate and calculate the sensor by considering the factors of load tool gravity, sensor zero, and robot installation inclination because force is the simple normal contact force at the machining position, so as to the influence of sensor system error and load tool gravity on force perception is eliminated by obtaining the parameters of sensor zero, robot installation inclination, load tool gravity, and load tool center of gravity. For the slow motion of the load tool, the inertia force is very small and can be neglected. After installing the load tool, the way and degree of tightening between the load tool and the sensor will also affect the zero of sensor. Therefore, the zero of sensor cannot be accurately obtained when the sensor is not loaded. The determination of the zero must be carried out under the condition of load tool installation. During blade welding groove processing, the load tool posture changes accordingly along with the flange curve, but the direction of load tool gravity is always vertical and downward. Therefore, the influence of load tool gravity on the data of sensor varies continuously, and the elimination of the influence of load tool gravity needs to be achieved. According to the method of Ref. [17], the data of sensor zero, robot installation inclination, load tool weight, and center of gravity can be obtained by measuring the five positions illustrated in Fig. 9. According to the measured data, the effect of load tool gravity can be eliminated, and the actual machining contact force can be obtained for each moving position and posture by using the method Ref. [18] to compensate the load tool gravity.

Fig. 9
figure 9

Five robot postures of gravity compensation

6 In situ force/position feedback control and trajectory correction

Because of the low motion accuracy of the robot itself and the existence of such factors as robot installation error, workpiece processing error and clamping error, the positioning accuracy of cutting tool and workpiece is low, especially for the complex surface workpiece such as blade. According to the theoretical machining trajectory, the rotary file driven by the robot cannot be close contact continuously with the blade flange curve. The motion process instructed by the theoretical trajectory is shown in Fig. 10. It can be found that the rotary file cannot be close contact with the blade, and the distance between the blade and the actual flange curve is getting bigger and bigger from the beginning to the end. The maximum distance measured in this experiment can reach about 5 mm. Therefore, the normal cutting removal cannot be achieved by relying solely on the kinematic positioning accuracy of the robot itself.

Fig. 10
figure 10

Contact situations without force/position control

The existing force/position control strategy is the main way to achieve constant contact force and equal cutting depth removal by using contact force as feedback to control contact position. Before machining, the in situ force/position control mode is adopted to set a smaller contact force so that the cutter always closely contacts with the wheel flange curve of the impeller along the feed motion. The robot obtains the Z-axis coordinates of the discrete points on the theoretical trajectory in real time, and compares with the Z-axis coordinates of the theoretical trajectory to compensate and correct the theoretical trajectory. In the subsequent processing, the actual Z-axis coordinate values are taken as the reference values for the robot to move, which is equivalent to controlling the motion and positioning by controlling the repeated positioning motion of the robot, the flowchart is presented as Fig. 11. By using the in situ force/position control method, the high precision of repetitive positioning can be developed, and the low precision of motion positioning can be avoided.

Fig. 11
figure 11

Flowchart of in situ force/position feedback control and trajectory correction

According to the control method of Ref. [19], the force/position feedback control method is adopted to compensate and correct the machining trajectory of robot along the Z-axis direction. According to the desired contact force Fd, the machining tool will be a minimal away from the flange curve along the normal direction of welding groove surface when the actual contact force Fcg is greater than the desired value Fd. And when the actual contact force Fcg is smaller than the desired value Fd, the machining tool will be a minimal near to the flange curve along the normal direction of welding groove surface. These adjustments can remain the constant contact between the rotary file and the flange curve during the whole feed stroke. The close contact situations are shown in Fig. 12. It indicates that the cutter and flange curve are always in close contact during the whole feed stoke, which is ready for the robot to obtain the accurate values of the cutting direction of discrete point positions.

Fig. 12
figure 12

Contact situations with force/position control

6.1 Trajectory correction method of in situ measurement of force/position feedback control

The force/position feedback control method is adopted to set the contact force and control the position compensation of the rotary file when it moves along the theoretical trajectory, so that the rotary file is closely contacted with the flange curve. The robot controller reads the actual position coordinate za (i) of each discrete point position index in the Z-axis direction of the local frame and transmits it to the computer. Comparing this coordinate with the Z-axis coordinate of the corresponding discrete points on the theoretical trajectory generated by the impeller model, the deviation ΔK(i) between the actual position za and the theoretical trajectory position zp in the Z-axis direction is calculated. The discrete deviation values of index positions of each discrete point are fitted by quadratic curve to obtain a smooth deviation curve, which the deviation curve is corresponding to the theoretical trajectory and the actual trajectory of the workpiece. The deviation ΔK'(i) between the theoretical trajectory points and the fitted trajectory points is obtained at the position index of each discrete point. The deviation ΔK'(i) of the point is corrected by compensating the theoretical trajectory points of the corresponding position index of each discrete point. The actual trajectory za (i): za (i) = zp(i)- ΔK'(i), for machining is obtained, which is the accurate machining trajectory. The correct relative position relationship between the rotary file and the welding groove of the blade can be realized, and the vibration can also be reduced during the processing.

In Fig. 12, the contact force window shows the change of contact force during the in situ measurement. The desired contact force is preset as 5 N, the control error e(i) between the presented and the actual contact force is 0.5 N, the force feedback frequency is 5000 Hz, and the correction distance along Z-axis of local frame to each feedback is 0.01 mm. With the same trajectory and the real-time compensation control, the center value of measured contact force is about 5 N with the fluctuation range of 4~6 N; the amplitude of fluctuation is 1 N. It can be seen that the machining tool is real-timely controlled to adjust the position to ensure the constant contact between rotary file and flange curve. When the rotary file is separated from the workpiece, the measured contact force immediately drops to zero, which also shows the correct of the gravity compensation method. Corresponding to each measurement point, the deviations ΔK(i) along Z-axis direction are obtained such as − 4.155 mm in Fig. 13. In the trajectory correction value window, the blue curve is combination of deviations ΔK(i) to all discrete points along the flange curve, and the red curve (combination of deviations ΔK’(i)) is fitting curve according to the blue curve by least square method that can make the real trajectory become smooth.

Fig. 13
figure 13

Trajectory correction value measurement and fitting

6.2 The method of determining single cutting depth

The processing allowance of H(i)/2-D/2 at each discrete point on the flange curve is calculated and recorded as M(i) respectively. The maximum processing allowance is set to M(0) along the whole curve. When H(i)/2-D/2 is less than 0, this point does not need to be machined, and the processing allowance is set to 0. Presetting the cutting depth P of the selected rotary file at each time, the times of cutting on one side of the blade is M(0)/P. Rounding the cutting times is N, and the single-cutting depth at each discrete point is M(i)N/M(0). For the first time cutting, the location of Z-axis direction trajectory at each discrete point is W(i)-M(i)N/M(0); for the second time, the location of Z-axis direction trajectory at each discrete point is W(i)-2 M(i)N/M(0), and so on. For the whole blade, the cutting depth at different discrete points is different, which realizes the variable cutting depth. At the same discrete point, the cutting is conducted with equal depth each time until the processing is completed. It is like a robot doing repetitive motion and equivalent to control the positioning correction of the motion accuracy by utilizing the repetitive positioning accuracy, which improves the positioning accuracy of the robot. The process of cutting depth change is illustrated in Fig. 14.

Fig. 14
figure 14

Allowance change in machining process

7 Experiments verification

A variable cutting depth removal along two machining trajectories, one is on pressure surface, and the other is on suction surface with the same blade, are set to validate the effect of the control parameters strategy in this paper. The material of impeller is 17-4PH. The length of the blade is 301.86 mm, and 12 points of equal distance on the blade are selected to measure the blade width (the distance between the pressure surface and suction surface) before machining. The widths are between 6.86 and 11.48 mm, as shown in Fig. 15. The material of rotary file is cemented carbide with diameter of 16 mm and 25 cutting edges. The feed speed is 10 mm/s, the rotary file speed is 8000 r/min, and the maximum radial cutting depth (11.48–4.75)/(2 × 8) = 0.42 mm. The preset contact force is 5 N. The change of the actual contact force during in situ measurement is shown in the left contact force window of Fig. 13. The variation of deviation between actual and theoretical trajectory of pressure surface flange curve and the fitting deviation curve are shown in the right trajectory correction value window of Fig. 13. The widths after machining are measured at the same 12 measuring points, which are between 4.66 and 4.92 mm, as shown in Fig. 16. Width comparison before and after processing is descripted in Table 1. It can be seen that the width after processing is nearly same, and the removal amount on both sides is closely same, which meets the design requirements (the width of flange surface is 4.75 ± 0.25) and realizes the variable cutting depth machining of the blade welding groove.

Fig. 15
figure 15

Flange widths at different positions before machining

Fig. 16
figure 16

Flange widths at different positions after machining

Table 1 Width comparison before and after machining (mm)

8 Conclusions

According to manual machining with low machining efficiency, poor surface consistency and the high experience requirements, a new technology of the robotic automatic machining on welding groove of complex integral impeller is proposed. The proposed research process consists of machining platform system, extraction, and discretization of processing characteristic curves, measurement of contact force, trajectory correction based on in situ measurement of force/position feedback control and experimental verification. By identifying the characteristic process curve of the blade, the processing curves are extracted according to the calculation of the theoretical model, and the theoretical trajectory of automatic machining is generated. The trajectory is transformed into a theoretical trajectory for robotic automatic processing through coordinate change and unification, the establishment and adjustment of local frame, but it cannot be directly used for robotic automatic processing. By the load tool measurement of the five postures of robot, the load tool gravity compensation is carried out. The online measurement of a single contact force is realized, which provides force information for the accurate realization of force/position feedback control. By means of in situ position force/position feedback control, the cutting tool is in close contact with the machining position, and the deviation between the theoretical and the actual trajectory is obtained. By correcting the deviation, the theoretical trajectory is corrected to the actual trajectory. The actual trajectory has been used as the motion positioning datum in subsequent machining. The high accuracy of repeated positioning by robots and the same cutting depth at the same discrete point are used to cut, which improves the positioning accuracy and achieves accurate processing. By analyzing and calculating the actual trajectory and machining allowance, the variable cutting depth of each stroke is removed, and the processing method of equal residual width is realized. A complete automatic platform system is shown for application mainly on precision machining curved surfaces by correcting the theoretical machining trajectory based on in situ force/position control, especially on free-form surfaces such as impeller. The proposed strategy is well tested for the robot automatic machining on welding groove of complex integral impeller. The validation results show the effectiveness and feasibility of the model as well as its ability to achieve precision effect surfaces. The substitution of traditional manual processes can be done with robotics advantages in time, low costs, and with finishing grades similar to the manual processes.