Achievement of Accurate Robotic Arm-based Bike Frame Quality Check Using 3D Geometry Mathematical Model

: Currently, the bike frame quality check (QC) mostly relies on human operation in industry. However, some drawbacks such as it being time-consuming, having low accuracy and involving non-computerized processes are still unavoidable. Apart from these problems, measured data are di ﬃ cult to systematically analyze for tracking sources of product defects in the production process. For this reason, this paper aims to develop a 3D geometry mathematical model suitable for bicycle frames QC using robotic arm-based measurement. Unlike the traditional way to ﬁnd coe ﬃ cients of a space sphere, the proposed model requires only three check point coordinates to achieve the sphere axis coordinate and its radius. In the practical work, the contact sensor combined with the robotic arm is used to realize the compliance items measurement in shaft length, internal diameter, verticality, parallelism, etc. The proposed model is validated based on both mathematic veriﬁcation and actual bike frame check.


Introduction
In recent years, bike riding has become a popular leisure sport around the world. For this reason, analysts forecast that the global high-end bicycle market will grow with a compound annual growth rate (CAGR) of 4.82% during the period 2017-2021 according to the report from Research and Markets Ltd. It is known that high-end bikes demand a high quality of bike frame [1][2][3][4][5][6][7]. Unfortunately, frame QC still relies on the Vernier caliper, the plug gauge, the cylindrical gauge, and the thread gauge, etc. It normally takes a long time to complete the process. Consequently, the automation measurement process for the QC of the bike frame is essential in industry [8][9][10][11][12].
The coordinate-measuring-machine (CMM) is now being widely applied as part of workpiece inspection in the production line [13][14][15][16][17]. It can be used to measure the geometry of physical objects by sensing the discrete points on the object surface with a probe, including mechanical, optical, laser, and white light. Basically, it has two major advantages: (1) high precision up to 0.001 mm and (2) high reliability in both hardware and software. However, the CMM inspection planning session has been a challenging issue because of its time-consuming nature using traditional methods, e.g., expert experiences and technical documents data mining. Additionally, it may suffer from some following disadvantages: (1) Its operation speed is limited. (2) It is sensitive to the environment temperature and humidity. (3) It is not applicable to irregular shape object measurements. (4) It has a high cost. Obviously, CMM is not suitable for the bike frame measurement due to the restriction of the operation range. Alternatively, robotic arms are typically used for multiple industrial applications such as used for multiple industrial applications such as material handling, welding, thermal spraying, assembly, palletizing, drilling, and painting, etc. [18][19][20][21]. For instance, a platform based on a robotic arm using three degrees of freedom (DoF) principle was proposed to estimate the calibration parameters of microelectromechanical systems (MEMS) [22]. It can be placed indifferent positions for collecting a dataset of points evenly distributed. This case implies that the measurement technique using robotic arms may provide a good solution for the bike frame QC process.

System Structure
The proposed system structure of bike frame quality check is shown in Figure 1a, consisting of subsystems such as robotic arm, graphical user interface (GUI), programmable logic controller (PLC), contact sensor, mathematical model, database, and workbench. Each subsystem is responsible to carry out a specific task, described as follows. (1) Robotic arm can carry the contact sensor and move it to the check points. Therefore, the coordinates of check points can be found based on the robotic arm coordinate system. (2) The contact sensor can feedback a digital signal to the robotic arm immediately once it touches the surface of the check points. (3) PLC is to control the rotating disk to rotate the bike frame °90 for the robotic arm to reach every check point. (4) Graphical user interface (GUI) provides a friendly user interface for users to input data and display a real-time measurement outcome. (5)Mathematical model presents a geometryalgorithm that can effectively integrate the sphere formula with the inner product of normal vector to find four parameters in the sphere formula using only three measured points. Accordingly, the center coordinate of check point and its diameter can be calculated accurately and simply. (6)A database using MySQL is used to store the measured data and export measurement data report. (7) The workbench shown in Figure  1b is designed to sustain all hardware devices. It contains: (1) afixing frame, (2)A rotating disk, (3)a work platform, and (4) asensor pedestal. Moreover, the XAML and C# package are used to build up the system software such as the robotic arm simulation object, the window object, the control object, and the 3D-geometry mathematical model. Through Transmission Control Protocol (TCP) and Internet Protocol (IP) (TCP/IP), the contact sensor and robotic arm can communicate with each other between different objects.
(a) In this study, we mainly focused on the development of mathematical model required for the bike frame quality check using a robotic arm. Based on the proposed mathematical model, the robotic arm is combined with the contact sensor to implement the bike frame quality check in shaft length, internal diameter, verticality, and parallelism, etc. The major devices used in the proposed system are listed as follows: (1) Robotic arm: YASKAWA-GP7 (2) Contact sensor: Compact module changing touch-trigger probe (Renishaw TP20) (3) PLC: DELTA DVP -PM1000M (4) Database: MySQL

Introduction of Bike Frame
Generally, the bike frame consists of: (1)a B.B rotating shaft,(2)a S/T rotating shaft,(3) a S/T groove,(4)a T/T rotating shaft,(5)a shock absorber, (6)and H/T, where they are required for quality check, as shown in Figure 2. In this study, we mainly focused on the development of mathematical model required for the bike frame quality check using a robotic arm. Based on the proposed mathematical model, the robotic arm is combined with the contact sensor to implement the bike frame quality check in shaft length, internal diameter, verticality, and parallelism, etc. The major devices used in the proposed system are listed as follows: (1) Robotic arm: YASKAWA-GP7 (2) Contact sensor: Compact module changing touch-trigger probe (Renishaw TP20) (3) PLC: DELTA DVP -PM1000M (4) Database: MySQL

Introduction of Bike Frame
Generally, the bike frame consists of: (1) a B.B rotating shaft, (2) a S/T rotating shaft, (3) a S/T groove, (4) a T/T rotating shaft, (5) a shock absorber, (6) and H/T, where they are required for quality check, as shown in Figure 2.

Mathematical model
The check items of bike frame for quality evaluation mainly include the shaft length, internal diameter, verticality, and parallelism located in different shafts. The proposed mathematical model provides the solutions for checked point coordinate calculation. It is described as follows.

Mathematical Model
The check items of bike frame for quality evaluation mainly include the shaft length, internal diameter, verticality, and parallelism located in different shafts. The proposed mathematical model provides the solutions for checked point coordinate calculation. It is described as follows.

Generation of Bike Frame Center Plane
Initially, the center plane of a bike frame should be generated from the B.B rotating shaft, as shown in Figure 3, which is used as the base of the coordinate system. The coordinate of the center point aa3(aa3 x , aa3 y , aa3 z ), as shown in Figure 3, can be determined from aa1(aa1 x , aa1 y , aa1 z ) and aa2(aa2 x , aa2 y , aa2 z ) as:

Mathematical model
The check items of bike frame for quality evaluation mainly include the shaft length, internal diameter, verticality, and parallelism located in different shafts. The proposed mathematical model provides the solutions for checked point coordinate calculation. It is described as follows.

Generation of Bike Frame Center Plane
Initially, the center plane of a bike frame should be generated from the B.B rotating shaft, as shown in Figure 3,which is used as the base of the coordinate system. The coordinate of the center point

Center Plane Offset
The center plane offset is used to check if there is a shift at the center plane. For this purpose, the y-axis aa3 y taken from the center point aa3(aa3 x , aa3 y , aa3 z ) is regarded as the center standard plane.
In Figure 4, two check points, i.e., cc1 and cc22, coordinates at the S/T rotating shaft are expressed as: cc is defined as the center point between cc1 and cc22 as: (1) is defined as the center plane offset at the S/T rotating shaft, and it is the distance between the y axis coordinate of the cc point and the center plane. (1) is defined as the center plane offset at the S/T rotating shaft, and it is the distance between the y axis coordinate of the cc point and the center plane.

H/T Rotating Shaft Length
The H/T rotating shaft length can be determined by taking eight check points, as shown in Figure 5.

H/T Rotating Shaft Length
The H/T rotating shaft length can be determined by taking eight check points, as shown in Figure 5. w1 shown in Equation (1) is defined as the center plane offset at the S/T rotating shaft, and it is the distance between the y axis coordinate of the cc point and the center plane.

H/T Rotating Shaft Length
The H/T rotating shaft length can be determined by taking eight check points, as shown in Figure 5. The coordinates of the eight check points are shown as follows: The length f f 1gg1 between two check points ( f f 1 and gg1) is: Similarly, the lengths f f 2gg2, f f 3gg3, and f f 4gg4 can be formulated according to Equation (2), where the number one changes to numbers two to four, respectively.
Average length (L) between two check points ( f f 2 and gg2) is:

T/T Rotating Shaft Internal Diameter
The three check points at the T/T rotating shaft can be used to calculate the internal diameter, as shown in Figure 6.

T/T Rotating Shaft Internal Diameter
The three check points at the T/T rotating shaft can be used to calculate the internal diameter, as shown in Figure 6. The coordinates of the three check points are expressed as: The use cross product for the vectors  The coordinates of the three check points are expressed as: The vectors The use cross product for the vectors and their normal vector → n can be obtained as: where The spherical general shown in Equation (7) is used to find the axis point coordinate and axial bore radius in Figure 6: where the spherical axis point coordinate (d4) in Figure 6 is The vectors n are perpendicular to each other so that their inner product is zero.
The parameters values (d, e, f, g) can be thus be found by solving the simultaneous equations from Equations (10)- (13).
can be obtained, and the axial bore radius of T/T rotating shaft can be calculated as:

Verticality
In Figure 8, the verticality angel between B.B. and H/T rotating shafts can be calculated as follows.
Using the inner product formula, the parallelism angel θ between 1 2a a

Verticality
In Figure 8, the verticality angel between B.B. and H/T rotating shafts can be calculated as follows.

Model Verification Using the Real Data
The proposed mathematical model is verified using the real data taken from the SOLIDWORKS drawing of the bike frame.

The Center Plane
From Figure 3, the two check points are: Accordingly, the center plane is located at aa3 y = −333.5mm.

Bike Center Plane Offset
From Figure 4, it is known that: As above, it is confirmed that the theoretical value matches the computational result.

The H/T Rotating ShaftLength
In Figure 5, the coordinates of eight check points are shown as follows. The average length (L) is obtained as: As above, the calculated value is confirmed equal to the theoretical value.

T/T Rotating Shaft Internal Diameter
In Figure 6, the coordinates of three check points (d1, d2, d3) are shown as follows: According to Equation (7), the axis point coordinate is d4 n are perpendicular to each other so that: Substitute the coordinates of d1, d2 and d3 into Equation (10) The radius between the axis and check point is: Accordingly, the internal diameter of T/T rotating shaft is: As above, the calculated value is confirmed equal to the theoretical value.

Parallelism Between T/T and B.B Rotating Shafts Axes
In Figure 8, the coordinates of two check points (d1, d11) are:

Practical Verification
The process of real bike frame quality check is carried out based on the proposed 3D geometry mathematical model. The real system profile is shown in Figure 9.

Practical Verification
The process of real bike frame quality check is carried out based on the proposed 3D geometry mathematical model. The real system profile is shown in Figure 9.

Results with GUI
The quality check results are displayed online using GUI, as shown from Figures 10-15.

Bike Frame Plane
The GUI of the bike frame plane is shown in Figure 10. The performance result is -333.5 mm and that matches the theoretical value.

Results with GUI
The quality check results are displayed online using GUI, as shown from Figures 10-15.

Bike Frame Plane
The GUI of the bike frame plane is shown in Figure 10. The performance result is -333.5 mm and that matches the theoretical value.

Results with GUI
The quality check results are displayed online using GUI, as shown from Figures 10-15.

Bike Frame Plane
The GUI of the bike frame plane is shown in Figure 10. The performance result is -333.5 mm and that matches the theoretical value.

Bike Center Plane Offset
The GUI of bike center plane offset is shown in Figure 11. The performance result is 17 mm and that matches the theoretical value.
Appl. Sci. 2019, 9,5355 13 of 17 The GUI of bike center plane offset is shown in Figure 11. The performance result is 17 mm and that matches the theoretical value.

H/T Rotating Shaft Length
The GUI of H/T rotating shaft length is shown in Figure 12. The performance result is 110 mm and that matches the theoretical value.

T/T rotating shaft internal diameter
The GUI of T/T rotating shaft internal diameter is shown in Figure 13. The performance result is 15 mm and that matches the theoretical value.

H/T Rotating Shaft Length
The GUI of H/T rotating shaft length is shown in Figure 12. The performance result is 110 mm and that matches the theoretical value.
Appl. Sci. 2019, 9,5355 13 of 17 The GUI of bike center plane offset is shown in Figure 11. The performance result is 17 mm and that matches the theoretical value.

H/T Rotating Shaft Length
The GUI of H/T rotating shaft length is shown in Figure 12. The performance result is 110 mm and that matches the theoretical value. The GUI of T/T rotating shaft internal diameter is shown in Figure 13. The performance result is 15 mm and that matches the theoretical value.

T/T Rotating Shaft Internal Diameter
The GUI of T/T rotating shaft internal diameter is shown in Figure 13. The performance result is 15 mm and that matches the theoretical value.

T/T rotating shaft internal diameter
The GUI of T/T rotating shaft internal diameter is shown in Figure 13. The performance result is 15 mm and that matches the theoretical value.

Parallelism
The parallelism between T/T and B.B rotating shafts axes using GUI is shown in Figure 14. The performance result is θ = 0 • that matches the theoretical value.
Appl. Sci. 2019, 9, 5355 14 of 17 The parallelism between T/T and B.B rotating shafts axes using GUI is shown in Figure 14. The performance result is °= 0 θ that matches the theoretical value.

Verticality
The verticality between H/T and B.B rotating shafts axes using GUI is shown in Figure 15. The performance result is θ = 90 • that matches the theoretical value. The verticality between H/T and B.B rotating shafts axes using GUI is shown in Figure 15. The performance result is °= 90 θ that matches the theoretical value.

Practical Results
The measurement results from 10-times average values using the real bike frame are concluded in Table 1. Based on the same bike frame, the error between the proposed model and the Vernier caliper is below 0.05 mm, and the repeatability is at the range of 0.1 mm. This verifies that the proposed model presents both robust and stable performance. Nevertheless, the measured data reveals that the tested frame has some defects occurred in the center plane offset, parallelism and verticality.

Practical Results
The measurement results from 10-times average values using the real bike frame are concluded in Table 1. Based on the same bike frame, the error between the proposed model and the Vernier caliper is below 0.05 mm, and the repeatability is at the range of 0.1 mm. This verifies that the proposed model presents both robust and stable performance. Nevertheless, the measured data reveals that the tested frame has some defects occurred in the center plane offset, parallelism and verticality. To clarify the uncertainty of the measurement, the estimated standard deviation for a series of n measurements is expressed mathematically as: where x i is the result of the ith measurement and x is the arithmetic mean of the n measurement results. When a set of several repeated readings has been taken, the mean, x, and estimated standard deviation, s, can be calculated. The measurement uncertainty, u, of the mean is therefore defined as: where n is the number of measurements in the set. The estimated standard deviation and measurement uncertainty based on 10 measurements for S/T rotating shaft, T/T rotating shaft, and H/T rotating shaft is shown in Tables 2-4, respectively. From the statistics, it is obvious that both standard deviation (s) and measurement uncertainty (u) for all shaft measurements present a very low value no more than 0.018. Thus, accuracy and robustness of the proposed model is thus confirmed.

Conclusions
Traditional methods for the QC of bike frame products usually use general jigs or Vernier calipers. However, this kind of measurement process may take tens of minutes to complete. Another disadvantage is that it is difficult to analyze the measured data due to lack of computerization. For these reasons, the proposed 3D geometry mathematical model has successfully developed an accurate bike frame measurement based on a robotic arm with a contact sensor. In this study, the proposed model requires only three simultaneous equations to find the axis coordinate and its radius instead of four equations in a space sphere. It verifies that the measured data obtained from the model performance is consistent with the SOLIDWORKS drawing, including H/T rotating shaft length, T/T rotating shaft internal diameter, parallelism, and verticality, etc. Accordingly, it is applicable for industrial QC applications in a variety of bike frames. Other than these advantages, the stylus probe used in this proposed model presents both simple and accurate performance. However, successful measurement depends on the activity range of robotic arm that the certain features of bike frames should be reached by the stylus probe. In the future work, the optical sensors used in CMM may provide an alternative solution, although more complex signal processing algorithm should be addressed. Funding: This work was supported by the Ministry of Science and Technology, Taiwan (grant number MOST 108-2637-E-167-001).