Keywords

1 Introduction

In current industrial production, the normal direction plays a practical significance. In the process of drillings and specific millings, an accurate normal vector needs to be obtained in order to realize higher machining precision. Moreover, in the measurement of thickness of parts by the ultrasonic, the right normal ensures the accuracy and stability of thickness data.

Current computing methods about random normal of curved surface are generally divided into Cross Product method, Quadric Surface Fitting, NURBS curve method, Triangulation Algorithm, etc. [1]. The cross product could be easily calculated by getting points coordinates of measuring curved surface but it has a low accuracy; the surface fitting is complex and has low applicability of more curved surface though it is a high-precision method; curve and triangulation have to collect a large amount of data which is hard to apply to the real-time measurement.

Moreover, in aviation industrials, normal measurement and error compensation is applied to drilling and riveting fields and it is divided into three main types, off-line programming without adjustment, off-line programming in site adjustment and online programming in site adjustment.

The first sets an example that a normal off-time calibration of the drilling hole which has a poor accuracy [2]; the second has an application on automatic riveting that off-time method realizes normal compensation but cannot match workpieces with complex deformation [3]. Within the limit of application background, most companies and researchers have conducted a series of research of normal error compensation more from this aspect. For example, Lin Minqing proposed The Surface-Normal Measurement Method and Micro-Adjustment Mechanism [4] in his article that used Gauss equations of several points to solve the current normal vector of every drilling hole and make a micro-adjustment at the same position. Similar applications has existed in Yuan’s paper [5] where related articles mainly selected many points on the large curved surface as objects of studies and obtained off-line coordinates of all points so as to reach the fixed position and realize the independent adjustment without interference; the last can realize an online normal measurement but real-time continuous motion compensation has not been completed such as robotic drilling of Electroimpact Inc. (EI) company [6] and mirror milling equipment for aircraft skin of M.torres in Spain.

However, most large aerospace thin-walled workpieces like skins and aircraft panels easily give rise to random deformation in clamping and machining processes, which leads to changeable surface curvature and unknown difficulties of off-line programming. On one hand, the reason lies in the processing error of stocks preparation, on the other hand, it derives from stress release in the milling. What’s more, in the surface processing of large aerospace thin-walled workpieces, instead of simple points positions, traditional normal error compensation methods are unable to satisfy rapid milling of these parts. Thus, a simpler and quicker method of normal adjustment and compensation is required.

This paper proposes a new normal method which realize a combination of online measurement and real-time compensation. It is able to acquire real-time normal direction with complex surface by reading points information in the continuous motion of tools and implement an adaptive adjustment of errors with the NC numerical control system. The final aim lies in real-time machining processing of complex curved surface to further improve processing efficiency and machining precision and solve a series of industrial problems caused by normal.

2 Real-Time Normal Measurement and Error Compensation

2.1 Real-Time of Numerical Control System

Compared with traditional fixed-point measurement and off-line programming, the real-time normal error compensation is able to be completed within a period of point position, which experiences a process of sensors scanning to implementation movement of tools. The finally result is to realize follow-up processes and dynamic online compensation. Detailed data flow chart is shown as Fig. 1.

Fig. 1.
figure 1

Sequence flow chart of measurement system

From above, it is easily noted that an entire cycle of normal error compensation needs only about 10 ms on account of a series of parallel structures from data processing and transmission to actuator implementation, in which machine tools can finish all actions of measurement and compensation. Assume that feed speed of tools is 2000 mm/min and the machine motion just has a movement about 0.333 mm within a cycle of normal error compensation. It is so tiny that the deviation is negligible and the real-time measurement and compensation of normal direction is accurate and efficient in the processing of parts. From above, to completely achieve the real-time of fast compensation, computation time deriving from algorithm complexity and response mechanism will decide the efficiency of real-time dynamic compensation of each point position. Thus, a new strategy is shown as follows.

2.2 Measurement and Compensation Strategy

To acquire random deformation of large and complex curved aircraft parts, the online normal error compensation with an online measurement needs to adjust all axes of a five-axis machine tool to reach the target normal direction of thickness-measurement device. At the same time relative coordinate of the tool tip remains unchanged, as shown in Fig. 1.

During a compensation cycle, the main flow chart of normal measurement and error compensation is shown as Fig. 2. The displacement deviation obtained from different eddy current sensors works out the compensated deflection between deformative curved normal and practical normal to further figure out the compensated angles of rotation axes by the kinematic transformation of a five-axis machine tool. The target cutter orientation is finally converted into new coordinates by a series of post-processing of tools in order to keep the relative coordinate of tool tip unchanged.

Fig. 2.
figure 2

The deformation of curved surface and comparison of original and target normal

2.3 Modeling of Normal Measurement and Compensation

For a five-axis machine tool, the combined action of linear axis X, Y, Z and rotation axis like A-C or A-B determines the relative position of the measuring head in tools. On certain large curved randomly surface, data of real-time displacement is measured from four eddy current displacement sensors and it is supposed to be exactly right normal direction of this point when all four readings are the same. If there are deviations in any two sensors especially for diagonal ones, these deviations have to be converted into the compensation of all axes, as shown in Fig. 3. In the cutter coordinate system, four sensors are distributed on a circle with a radius of R, in which sensor 1 and 3 are located on the XT axis while sensor 2 and 4 are located on the YT axis. Their measured values are respectively l1, l2, l3, l4. On account of the tiny range of sensors (about 4 mm) in view of their distribution radius, the angle of rotation by the deviation, α, β can be calculated approximately as follows,

Fig. 3.
figure 3

Online normal error compensation with normal measurement

$$ \alpha \approx \,\sin \,\alpha = \frac{{l_{1} - l_{3} }}{{\sqrt {(l_{1} - l_{3} )^{2} + 4R^{2} } }} $$
(1)
$$ \beta \approx \,\sin \,\beta = \frac{{l_{2} - l_{4} }}{{\sqrt {(l_{2} - l_{4} )^{2} + 4R^{2} } }} $$
(2)

With the combination of original plane composed of displacement sensors and target plane of measuring points, as shown in Fig. 4, the normal vector of original plane \( \overrightarrow {N} = \overrightarrow {V}_{T} \) is firstly rotated α angle around XT axis and then β angle around YT axis to form a new normal vector \( \overrightarrow {{N^{{\prime }} }} = \overrightarrow {{V^{{\prime }} }}_{T} \). This target vector has nothing to do with the order of the axis of rotation selected because of the tiny compensation angle.

Fig. 4.
figure 4

Normal deviation compensation modeling

Fig. 5.
figure 5

Compensation angle of the normal vector

The current original normal vector in the cutter coordinate system, \( O_{T} X_{T} Y_{T} Z_{T} \), \( \overrightarrow {{V_{T} }} = \left[ {\begin{array}{*{20}c} 0& 0& 1\\ \end{array} } \right]^{T} \), is presumptively converted into the target normal vector in this coordinate system by two rotation. The target vector \( \overrightarrow {{V_{T}^{{\prime }} }} \) is as follows,

$$ V_{T}^{{\prime }} = \left[ {\begin{array}{*{20}c} {R(X,\beta )} & 0 \\ 0 & 1 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {R(Y,\alpha )} & 0 \\ 0 & 1 \\ \end{array} } \right]V_{T} $$
(3)

In the kinematic transformation, it is known that \( R(Y,\alpha ) \) and \( R(X,\beta ) \) is respectively regarded as a rotational transfer matrix which is rotated α and β around Y axis and X axis,

$$ \left[ {\begin{array}{*{20}c} {R(Y,\alpha )} & 0 \\ 0 & 1 \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\cos \alpha } & 0 & {\sin \alpha } & 0 \\ 0 & 1 & 0 & 0 \\ { - \sin \alpha } & 0 & {\cos \alpha } & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} } \right],\quad \left[ {\begin{array}{*{20}c} {R(X,\beta )} & 0 \\ 0 & 1 \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} 1 & 0 & 0 & 0 \\ 0 & {\cos \beta } & { - \sin \beta } & 0 \\ 0 & {\sin \beta } & {\cos \beta } & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} } \right] $$

According to formula (2), the target vector can be obtained as follows,

$$ \overrightarrow {{V_{T}^{{\prime }} }}\,{ = }\,\left[ {\begin{array}{*{20}c} {\sin \,\alpha } & {{ - }\cos \,\alpha \,\sin \,\beta } & {\cos \alpha \,\cos \,\beta } \\ \end{array} } \right]^{T} $$
(4)

3 Application of Real-Time Normal Measurement and Compensation

3.1 Acquiring Target Normal Direction

The Kinematic Transformation of A-C Five-Axis Machine Tool

As shown in Fig. 6, to describe the movement of A-C dual-table machine tool like Fig. 5, a series of coordinate systems are established [3]. After a homogenous coordinate transformation, the cutter location point is respectively mapped to machine coordinate system (MCS) \( O_{M} X_{M} Y_{M} Z_{M} \) [7] from tool coordinate system (TCS) \( O_{T} X_{T} Y_{T} Z_{T} \) and workpiece coordinate system (WCS) \( O_{W} X_{W} Y_{W} Z_{W} \).

Fig. 6.
figure 6

A-C Dual-table machine tool

According to relevant kinematic transformation of A-C five-axis machine tool, there are two transformation matrix equations as follows,

$$ \begin{aligned} {}^{M}P & = {}_{T}^{M} T{}^{T}P \\ {}^{M}P & = {}_{A}^{M} T{}_{C}^{A} T{}_{W}^{C} T{}^{W}P \\ \end{aligned} $$
(5)

Furthermore, \( {}_{X}^{Y} T \) shows a transformation from X coordinate system to Y coordinate system and 20 pose variables are included as follows (Table 1),

Table 1. Pose variables of all axes

Consequently, the cutter location in WCS can be expressed as follows,

$$ \begin{aligned} {}^{W}P & = \left( {x,y,z} \right)^{T} = {}_{W}^{C} T^{ - 1} {}_{C}^{A} T^{ - 1} {}_{A}^{M} T^{ - 1} {}_{T}^{M} T{}^{T}P = {}^{W}T_{T} \left[ {\begin{array}{*{20}c} 0 & 0 & 0 & 1 \\ \end{array} } \right]^{T} \\ {}^{W}V & = \left( {i,j,k} \right)^{T} = {}_{W}^{C} T^{ - 1} {}_{C}^{A} T^{ - 1} {}_{A}^{M} T^{ - 1} {}_{T}^{M} T{}^{T}V = {}^{W}T_{T} \left[ {\begin{array}{*{20}c} 0 & 0 & 1 & 0 \\ \end{array} } \right]^{T} \\ \end{aligned} $$
(6)

Similarly, an integrated kinematic transformation of A-C five-axis machine tool is shown,

$$ \begin{aligned} \left[ {\begin{array}{*{20}c} {^{W} V} & {^{W} P} \\ \end{array} } \right] & = F_{TW} (X,Y,Z,A,C)\left[ {\begin{array}{*{20}c} {^{T} V} & {^{T} P} \\ \end{array} } \right] \\ & = \left[ {\begin{array}{*{20}c} {\cos \,C} & { - \cos \,A\,\sin \,C} & {\sin \,A\,\sin \,C} & {M_{x} } \\ {\sin \,C} & {\cos \,A\,\cos \,C} & { - \sin \,A\,\cos \,C} & {M_{y} } \\ 0 & {\sin \,A} & {\cos \,A} & {M_{z} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {^{T} V} & {^{T} P} \\ \end{array} } \right] \\ \end{aligned} $$
(7)
$$ \begin{aligned} M_{x} = &\,(X + L_{acx} + L_{cwx} )\cos \,C - (Y + L_{acy} + L_{cwy} )\cos \,A\,\sin \,C + (Z + L_{acz} + L_{cwz} )\sin \,A\,\sin \,C \\ & - L_{acx} \cos \,C + L_{acy} \sin \,C - L_{cwx} \\ M_{y} = &\,(X + L_{acx} + L_{cwx} )\sin \,C + (Y + L_{acy} + L_{cwy} )\cos \,A\,\cos \,C - (Z + L_{acz} + L_{cwz} )\sin \,A\,\cos \,C \\ & - L_{acx} \sin \,C - L_{acy} \cos \,C - L_{cwy} \\ M_{z} = &\,(Y + L_{acy} + L_{cwy} )\sin \,A + (Z + L_{acz} + L_{cwz} )\cos \,A - L_{acz} - L_{cwz} \\ \end{aligned} $$

In general, the transformation formula from MCS to WCS is expressed as follows,

$$ \left[ \begin{aligned} i \hfill \\ j \hfill \\ k \hfill \\ 0 \hfill \\ \end{aligned} \right] = \left[ {\begin{array}{*{20}c} {\sin \,A\,\sin \,C} \\ { - \sin \,A\,\cos \,C} \\ {\cos \,A} \\ 0 \\ \end{array} } \right] $$
(8)
$$ \left[ {\begin{array}{*{20}c} x \\ y \\ z \\ 1 \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\left( {\begin{array}{*{20}c} {(X + L_{acx} + L_{cwx} )\cos \,C - (Y + L_{acy} + L_{cwy} )\cos \,A\,\sin C} \\ { + (Z + L_{acz} + L_{cwz} )\sin \,A\,\sin C - L_{acx} \cos \,C + L_{acy} \sin \,C - L_{cwx} } \\ \end{array} } \right)} \\ {\left( {\begin{array}{*{20}c} {(X + L_{acx} + L_{cwx} )\sin \,C + (Y + L_{acy} + L_{cwy} )\cos \,A\,\cos \,C} \\ { - (Z + L_{acz} + L_{cwz} )\sin \,A\,\cos C - L_{acx} \sin \,C - L_{acy} \cos \,C - L_{cwy} } \\ \end{array} } \right)} \\ {(Y + L_{acy} + L_{cwy} )\sin \,A + (Z + L_{acz} + L_{cwz} )\cos \,A - L_{acz} - L_{cwz} } \\ 1 \\ \end{array} } \right] $$
(9)

Target Normal Vector of WCS

The assumed target normal vector in TCS is replaced with \( \overrightarrow {{V_{T}^{{\prime }} }} \) in Eq. 4 from \( \overrightarrow {{V_{T} }} = \left[ {\begin{array}{*{20}c} 0& 0& 1\\ \end{array} } \right]^{T} \)

$$ \overrightarrow {{V_{T}^{{\prime }} }} = {}^{T}\overrightarrow {{V^{{\prime }} }} { = }\left[ {\begin{array}{*{20}c} {\sin \,\alpha } & { - \cos \,\alpha \,\sin \,\beta } & {\cos \,\alpha \,\cos \,\beta } \\ \end{array} } \right]^{T} $$

According to Eq. 7, the target normal vector in WCS is shown as follows,

$$ \begin{aligned} {}^{W}\overrightarrow {V} & = \left[ {l,m,n} \right]^{T} \\ l & = \sin (C)\sin (A)\cos (\alpha )\cos (\beta ){ + }\sin (C)\sin (\beta )\cos (A)\cos (\alpha ){ + }\sin (\alpha )\cos (C) \\ m & = - \cos (C)\sin (A)\cos (\alpha )\cos (\beta ){ - }\cos (C)\sin (\beta )\cos (A)\cos (\alpha ){ + }\sin (C)\sin (\alpha ) \\ n & = ({ - }\sin (A)\sin (\beta ) + \cos (A)\cos (\beta ))\cos (\alpha ) \\ \end{aligned} $$
(10)

Finally, \( {}^{W}\overrightarrow {V} \) is unitized as follows,

$$ \overrightarrow {\xi } = (\frac{l}{{\sqrt {l^{2} + m^{2} + n^{2} } }},\frac{m}{{\sqrt {l^{2} + m^{2} + n^{2} } }},\frac{n}{{\sqrt {l^{2} + m^{2} + n^{2} } }})^{T} = \left( {i,j,k} \right)^{T} $$
(11)

3.2 Post-processing and Compensation Strategy

Note that a new normal vector \( \left( {i,j,k} \right)^{T} \) presents the ideal position. By inversely calculating the \( \left( {x,y,z,i,j,k} \right) \) by Eqs. 8 and 9 in Sect. 3.1, the compensation of all axes is respectively computed. As a result, a new position of rotation axes A and C can be calculated by Eq. 8 at the first. Moreover, other new liner axes positions can also be worked out.

Nevertheless, according to the Eq. 8, the inverse value of \( {\text{A}}^{{\prime }} \) or \( {\text{C}}^{{\prime }} \) is possible to exist in multiple solution. To allow for all condition, a special discussion of multiple solution in five-axis machine tool is expressed as follows:

Firstly, the value of k should be considered as follows,

  1. 1.

    When \( k = 1 \),

    $$ \begin{aligned} A^{{\prime }} & = 0 \\ C^{{\prime }} & = C \\ \end{aligned} $$
    (12)
  2. 2.

    When \( k \ne 1 \),

    $$ \left\{ {\begin{array}{*{20}c} {A_{1} = \arccos (k)} \\ {C_{1} = a\,\tan \,2(\frac{i}{\sin \,A},\frac{j}{ - \sin \,A})} \\ \end{array} } \right. $$
    (13)

    Or

    $$ \left\{ {\begin{array}{*{20}c} {A_{2} = - \arccos (k)} \\ {C_{2} = a\,\tan \,2(\frac{i}{\sin \,A},\frac{j}{ - \sin \,A})} \\ \end{array} } \right. $$
    (14)

Then, \( a\,\tan \,2\left( {y,x} \right) \) represents the azimuth between the origin and point \( \left( {x,y} \right) \) which the range is defined with \( ( - \pi ,\pi ] \). And it not only depends on the value of \( \arctan (\frac{y}{x}) \), but also is determined where the point \( \left( {x,y} \right) \) is located.

Consequently, there are four kinds of solutions in \( (C - 2\pi ,C + 2\pi ] \). To get specific and unique solutions of \( {\text{A}}^{{\prime }} \) and \( {\text{C}}^{{\prime }} \), a minimal path of rotation [6, 7] is applied as follows,

  1. (1)

    Current rotation position \( (A,C) \);

  2. (2)

    Possible target position \( (A_{1} ,C_{1} ) \), \( (A_{2} ,C_{2} ) \), \( (A_{3} ,C_{3} ) \), \( (A_{4} ,C_{4} ) \);

  3. (3)

    Each \( A_{1} \), \( A_{2} \), \( A_{3} \), \( A_{4} \) is respectively compared with original \( A \) and the minimal deviation of one or several is reserved, which is the target \( A^{{\prime }} \);

  4. (4)

    Retain the unique one of minimal deviation with original \( C \) in step 3). That is the target \( C^{{\prime }} \).

Furthermore, a reverse post-processing in Eq. 9 completed and new target line axis shows as follows,

$$ \begin{aligned} X^{{\prime }} = & \, (x + L_{cwx} )\cos C^{{\prime }} + (y + L_{cwy} )\sin C^{'} - L_{cwx} \\ Y^{{\prime }} = & \, - (x + L_{cwx} )\cos A^{{\prime }} \sin C^{{\prime }} + (y + L_{cwy} )\cos A^{{\prime }} \cos C^{{\prime }} + (z + L_{acz} + L_{cwz)} \sin A^{{\prime }} \\ & + L_{acy} \cos A^{{\prime }} - L_{acy} - L_{cwy} \\ Z^{{\prime }} = & \, (x + L_{cwx} )\sin A^{{\prime }} \sin C^{{\prime }} - (y + L_{cwy} )\sin A^{{\prime }} \cos C^{{\prime }} + (z + L_{acz} + L_{cwz} )\cos A^{{\prime }} \\ & - L_{acy} \sin A^{{\prime }} - L_{acz} - L_{cwz} \\ \end{aligned} $$
(15)

In the end, within a compensation cycle, a new group of NC code \( X^{{\prime }} ,Y^{{\prime }} ,Z^{{\prime }} ,A^{{\prime }} ,C^{{\prime }} \) is worked out and the machine tool is able to realize a dynamic real-time compensation

$$ \Delta X = X^{{\prime }} - X ,\quad \Delta Y = Y^{{\prime }} - Y ,\quad \Delta Z = Z^{{\prime }} - Z ,\quad \Delta A = A^{{\prime }} - A ,\quad \Delta C = C^{{\prime }} - C $$

4 Case Study

4.1 Experiment Setup

To verify the feasibility and effectiveness of real-time normal measurement and compensation, an experiment is carried out on a 5-axis of A-C dual-table machine tool. An aerospace thin-walled curved plate (Φ2250) is used as a model to realize online normal error compensation when four displacement sensors display the same values within a margin of error. The experiment platform is established in Fig. 7. A high-precision MICRO-EPSILON eddy current displacement sensor with a precision of 0.1% is chosen.

Fig. 7.
figure 7

Coordinate system chains of A-C dual-table machine tool

The model of curved plate and motion is displayed in Fig. 8. The measurement equipment starts from No. 0 position and experiences a series of point position No. 1, No. 2 and so on. A rectilinear motion is completed between two point positions and the motion span is set as 100 mm with a feed rate of 1000 mm/min. At the moment, it is seen from Fig. 9 that the series of original cutter normal vector \( N_{1}^{{\prime }} \), \( N_{2}^{{\prime }} \) have a deviation with the real normal vector \( N_{2} \), \( N_{3} \). Record values of four sensors before and after compensation and so Table 2 is shown as follows,

Fig. 8.
figure 8

Experiment platform of normal compensation verification

Fig. 9.
figure 9

Experiment planning path

Table 2. Experimental data of all point positions

Table 3 is shown as a comparison between real normal direction of the plate and compensated normal vector by error compensation above.

Table 3. Compensated normal vector of each point and deviation with real normal vector

4.2 Error Analysis

The result of compensation efficiency is listed in Table 2 and the deviation of sensors 1, 3 and sensors 2, 4 readings in each point position is shown in Fig. 9.

What is more, after the real-time normal measurement and compensation algorithm, proportional displacement errors of sensors has declined from 11.19% and 12.10% to 0.88% and 1.02% in these selected points. In this case, it is able to be regraded that normal error compensation is successful. What’s more, the deviation angles in Table 3 are least that this method is effective to realize online normal measurement and real-time error compensation (Fig 10).

Fig. 10.
figure 10

Error proportion of displacement sensors before and after compensation

5 Conclusion

To acquire real-time normal direction of large aerospace thin-walled surface and reach the right position in time, this paper proposes an efficient method for automatic normal measurement and error compensation of cutter bit to adapt any curved surface with a random deformation. Moreover, the integrated design skillfully turns the deviation of displacement value from sensors into angles in order to realize rapid response and improve the manufacturing efficiency. After an experimental verification, this compensation method is valid and the adjusted normal error is less than 0.01°. And this method simplifies the measurement and compensation processing and is exactly efficient to let the cutter bit reach the right normal with a micron class accuracy. The contributions of this paper are listed as follows:

  1. 1.

    The algorithm in the paper converts skillfully the normal error into the feedbacks of eddy sensors values so as to avoid complicated solution processes of real normal vector. In fact, the axis motion of tools just needs a series of increment value instead of coordinates while the new normal vector in Table 3 is measured by current eddy sensors values in the case study. Meanwhile, the method greatly improves computational speed of the CNC system, timeliness and validity of machine tools in order to provide favorable conditions to achieve real-time compensation.

  2. 2.

    During the dynamic measurement process, the algorithm in the paper is real and effective where displacement measurements of each measurement point are compensated in place, that is, each point reaches real normal direction. By constantly changing the machine feed rate, the compensation effect is the same effect and effective so that the real-time requirement of dynamic compensation is achieved. The real-time dynamic compensation of normal error fills the blank of the dynamic monitoring for the process of large aerospace thin-walled workpieces. At the same time, it lays the foundation of obtaining real-time parts thickness data and other lots of related technologies and opens up a new application field.