Gear Tooth Profile Reconstruction via Geometrically Compensated Laser Triangulation Measurements

Precision modeling of the hydraulic gear pump pressure dynamics depends on the accurate prediction of volumetric displacement in the inter-tooth spaces of the gear. By accurate reconstruction of the gear profile, detailed transient volumetric information can be determined. Therefore, this paper reports a non-contact gear measurement device using two opposing laser triangulation sensors, and the key geometrical models to reconstruct the profile with geometrical error compensation. An optimization-based key parameter calculation method is also proposed to find the unknown orientation of the sensor. Finally, an experimental setup is established, the performance of the device is tested and the geometric model is validated. Initial results showed that the method is able to reconstruct the target tooth profile and compensated results can reduce the geometrical error by up to 98% compared to the uncalibrated ones.


Background
Gears are not only widely used in transmission of mechanical power, but are key mechanical elements found in the hydraulic gear pumps, where the meshing gear and pinon pairs carry the hydraulic oil in the fixed-size inter-tooth space, delivering the pressurized oil. For a gear pump or any positive displacement fluid power unit, the dynamic pressure within the component is determined by the transient volumetric and leakage properties of the control volume [1]. In contrast to traditional models of a gear pump or motor, which are based on the ideal involute or cycloidal gear profiles, the state-of-the-art ones often take the detailed tooth profile into account, resulting in more accurate prediction of volumetric variation or leakage of fluid within the inter-tooth space [2][3][4][5][6]. Thus, accurate reconstruction of gear tooth profile functions in three-dimensional (3D) space rather than obtaining key summarizing parameters can lead to better prediction of friction and leakage characteristics of a hydraulic gear pump or motor.
Traditional gear tooth profile measurement methods can be classified into the contact or noncontact approaches based on whether the measuring device is applying force to the target gear. Contact methods employ a stylus or shaped probe as the displacement sensing gauge, driven by a coordinate measuring machine (CMM) [7,8]. By thresholding the contact force on the surface of the gear tooth at a number of discrete locations, the geometric error and key gear properties can be obtained via curve fitting techniques [7][8][9][10][11]. Normally the measurement targets are the power transmitting gears in heavy machineries, and the 3D CAD files for the target gears are required in advance [8,10]. One challenge in contact measuring is the compensation of the pseudo tooth profile deviations induced by the contact stress and the compliance of the stylus based on elastic theory [12]. Another is the accurate interpolation of the discrete probed points of a complex feature based on novel algorithm or numerical optimization [13,14]. In contrast, the gears in mobile hydraulic machineries are comparatively small (e.g., the pitch diameter is on the order of a few centimeters) in size due to the compactness of fluid power component. Some off-the-shelf models would even have extensive modifications to the gear geometry that no prior CAD files or standards are available, rendering measurement of the complete tooth profile with the contact approach a challenge. Especially, the stylus diameter cannot infinitely reduce until the structural compliance becomes too great to be predicted with linear elastic theories, and the tight opening could also pose a mechanical obstacle for the probing devices. Noncontact methods use a laser triangulation sensor (LTS) or digital camera(s) to perform the measurement directly [15][16][17][18]. Without a physical probe, the contact stress, structural deformation, and friction problems are automatically resolved. It is theoretically possible for the noncontact method to profile the gear tooth continuously and quickly without the need for precision contact stress control. But the challenges are still present in the design of the scanning device, calibration, and the postprocessing of data [19]. Therefore, the motivation of this work is to develop a method to reconstruct the profiles for the gear elements found in fluid power systems in particular. The goal is to design and analyze a new noncontact gear tooth profile measurement apparatus, capable of measuring unknown gear profile through a single pass of scan, with the primary focus on the sensor and target placement error compensation.

Principle of Gear Profile Measurement Apparatus
A schematic diagram of the proposed gear profile measurement apparatus is shown in Figure 1. There are three key modules: (1) the mechanical system to mount the target gear, (2) the LTS and the supporting stage, and (3) the motion control and signal processing unit. The working principle is described as follows. The target gear is mounted on a shouldered shaft, supported by a pair of precision journal bearings. In this way, the only degree of freedom permitted is the revolution about the gear rotational axis. The surface displacement of the gear tooth is measured using two LTS's facing each other towards the gear axis. Each of the LTS is mounted on a micro motion stage, where the two prismatic sliding joints permit translation along the x or y axes and the working envelop is similar to that of a Cartesian robot. The twin LTS setup allows the one sensor to cover the other's blind spot, enabling single pass measurement of the complete gear tooth profile without the need to reorient the sensor direction contrast to [15], despite the additional requirement of combining the two sensors' data. The apparatus also includes gear shaft rotational drive, and angular displacement measuring sensors, as well as data acquisition and control. In the test, the micro stages carry the two LTS's to move in the y axis in synchronization, and the controlled rotation of the gear shaft allows complete measurement of the tooth profile. Another is the accurate interpolation of the discrete probed points of a complex feature based on novel algorithm or numerical optimization [13,14]. In contrast, the gears in mobile hydraulic machineries are comparatively small (e.g., the pitch diameter is on the order of a few centimeters) in size due to the compactness of fluid power component. Some off-the-shelf models would even have extensive modifications to the gear geometry that no prior CAD files or standards are available, rendering measurement of the complete tooth profile with the contact approach a challenge. Especially, the stylus diameter cannot infinitely reduce until the structural compliance becomes too great to be predicted with linear elastic theories, and the tight opening could also pose a mechanical obstacle for the probing devices. Noncontact methods use a laser triangulation sensor (LTS) or digital camera(s) to perform the measurement directly [15][16][17][18]. Without a physical probe, the contact stress, structural deformation, and friction problems are automatically resolved. It is theoretically possible for the noncontact method to profile the gear tooth continuously and quickly without the need for precision contact stress control. But the challenges are still present in the design of the scanning device, calibration, and the postprocessing of data [19]. Therefore, the motivation of this work is to develop a method to reconstruct the profiles for the gear elements found in fluid power systems in particular. The goal is to design and analyze a new noncontact gear tooth profile measurement apparatus, capable of measuring unknown gear profile through a single pass of scan, with the primary focus on the sensor and target placement error compensation.

Principle of Gear Profile Measurement Apparatus
A schematic diagram of the proposed gear profile measurement apparatus is shown in Figure 1. There are three key modules: (1) the mechanical system to mount the target gear, (2) the LTS and the supporting stage, and (3) the motion control and signal processing unit. The working principle is described as follows. The target gear is mounted on a shouldered shaft, supported by a pair of precision journal bearings. In this way, the only degree of freedom permitted is the revolution about the gear rotational axis. The surface displacement of the gear tooth is measured using two LTS's facing each other towards the gear axis. Each of the LTS is mounted on a micro motion stage, where the two prismatic sliding joints permit translation along the x or y axes and the working envelop is similar to that of a Cartesian robot. The twin LTS setup allows the one sensor to cover the other's blind spot, enabling single pass measurement of the complete gear tooth profile without the need to reorient the sensor direction contrast to [15], despite the additional requirement of combining the two sensors' data. The apparatus also includes gear shaft rotational drive, and angular displacement measuring sensors, as well as data acquisition and control. In the test, the micro stages carry the two LTS's to move in the y axis in synchronization, and the controlled rotation of the gear shaft allows complete measurement of the tooth profile.   To implement the proposed gear profile measurement apparatus, two challenges need to be overcome. First, the gear profile needs to be reconstructed from the sensor data based on the geometrical models in 3D space. Second, the geometrical errors, including the mounting error of the gear shaft and the LTS sensor, need to be compensated and calibrated. Thus, the paper is organized as follows. Section 2 focuses on the derivation of the key geometrical models to reconstruct the profile. An optimization-based key parameter calculation method is proposed to find the correct orientations of the LTS's. A low-cost prototype experimental testbed is setup and the test procedures discussed in Section 3. Finally, 3D reconstruction of a single tooth profile is presented, the measurement error regarding the geometrical disturbances are discussed in Sections 4 and 5. Initial results demonstrate the validity of the apparatus, and based on the proposed optimization and compensation models, the calibrated profile can reduce the measurement error by up to 98% compared to the uncalibrated ones.

Geometrical Models
During the tooth profile measurement, the relative position between the LTS and the gear constantly updates as the laser beam is scanning the cross-sections of the gear while the gear is in revolution. Ideally, the LTS's beam should be positioned normal to the gear's rotational axis, and the mounting surface of the sensor should be parallel to the rotational axis. However, due to installation error of the LTS's and the combined geometrical tolerance of both the platforms and the gear shaft support, the actual orientation of the LTS may differ from that of the ideal. It is therefore necessary to first establish a geometrical model to fully describe the mathematical relationship between the measured gear profile and the spatial deviations.

The Vector Relationship between LTS and Tooth Profile
In the measurement of the tooth profile, the goal is to express the tooth profile functions (i.e., radius and angle) in the gear reference frame that the rotational axis of the gear is coincident with one of the reference frames' axes. To facilitate the analysis, three reference frames are constructed in Figure 2, a cartesian coordinate system is given as o 0 x 0 y 0 z 0 , defined as the global reference frame, and the two local reference frames o 1 x 1 y 1 z 1 and o 2 x 2 y 2 z 2 , representing the gear and LTS reference frames, which origins are designated at the rotational center of the gear and the contact point of the measuring beam on the surface of the gear, respectively. To implement the proposed gear profile measurement apparatus, two challenges need to be overcome. First, the gear profile needs to be reconstructed from the sensor data based on the geometrical models in 3D space. Second, the geometrical errors, including the mounting error of the gear shaft and the LTS sensor, need to be compensated and calibrated. Thus, the paper is organized as follows. Section 2 focuses on the derivation of the key geometrical models to reconstruct the profile. An optimization-based key parameter calculation method is proposed to find the correct orientations of the LTS's. A low-cost prototype experimental testbed is setup and the test procedures discussed in Section 3. Finally, 3D reconstruction of a single tooth profile is presented, the measurement error regarding the geometrical disturbances are discussed in Sections 4 and 5. Initial results demonstrate the validity of the apparatus, and based on the proposed optimization and compensation models, the calibrated profile can reduce the measurement error by up to 98% compared to the uncalibrated ones.

Geometrical Models
During the tooth profile measurement, the relative position between the LTS and the gear constantly updates as the laser beam is scanning the cross-sections of the gear while the gear is in revolution. Ideally, the LTS's beam should be positioned normal to the gear's rotational axis, and the mounting surface of the sensor should be parallel to the rotational axis. However, due to installation error of the LTS's and the combined geometrical tolerance of both the platforms and the gear shaft support, the actual orientation of the LTS may differ from that of the ideal. It is therefore necessary to first establish a geometrical model to fully describe the mathematical relationship between the measured gear profile and the spatial deviations.

The Vector Relationship between LTS and Tooth Profile
In the measurement of the tooth profile, the goal is to express the tooth profile functions (i.e., radius and angle) in the gear reference frame that the rotational axis of the gear is coincident with one of the reference frames' axes. To facilitate the analysis, three reference frames are constructed in Figure 2, a cartesian coordinate system is given as o0x0y0z0, defined as the global reference frame, and the two local reference frames o1x1y1z1 and o2x2y2z2, representing the gear and LTS reference frames, which origins are designated at the rotational center of the gear and the contact point of the measuring beam on the surface of the gear, respectively. Each of the LTS in the proposed system measures the distance between the contact point on the gear tooth and the sensor, which can be represented by a vector pointing from the contact point to Each of the LTS in the proposed system measures the distance between the contact point on the gear tooth and the sensor, which can be represented by a vector pointing from the contact point to the sensor reception window in the sensor reference frame o 2 x 2 y 2 z 2 . Under ideal condition, the direction of the laser beam is coincident with the y 2 axis, resulting in the vector p O 2 B ; while the actual orientation of the laser beam could be a pitch about the x 2 axis through an angle of α and a yaw of γ about the z 2 axis, resulting in p O 2 A . The roll angle about y 2 axis, however, does not incur variation to the vector, since the rotation of a vector about its axis stays identical. At a given instance of time, the following vector's identity can be found from the two spatial triangles ∆O 0 O 2 A and ∆O 0 O 1 O 2 : where p ∈ R 3 represents a vector in 3D space, which subscripts denote the origin and destination. The vector p O 0 O 1 denotes the offset between the two origins in the global and gear reference frames, Particularly, in the coordinate systems defined in Figure 2, the coordinate of point A in p O 0 A can be found as j represent the measured distances from the measuring center of the LTS to the origin of the global reference frame at the j-th LTS, the superscript of the coordinate denotes its reference frame.
Finally, under free vector assumption, the following rotational relationship is found in (3): where the magnitude of p O 2 B is obtained experimentally from the readings of the LTS, and the rotation matrix R t is defined in the Sections 2.2 and 2.3.

Rotation Matrix R t
In proposed apparatus, the orientation of the installed LTS could deviate from the ideal one, requiring compensation. To tackle the issue, the rotation of the vector from the ideal orientation to the actual one can be determined by a series of rotations. The order of rotation is specified as follows, first a pitch about the x 2 axis through an angle α, then a roll about the y 2 axis through β, and a yaw about the z 2 axis through γ. The rotation matrix for the new LTS orientation is then The details of the matrix formulation can be found in Appendix A. Particularly, if the LTS orientation is ideal, i.e., the dot product of the respective unit vectors in the frames are unity ( e 0 1 · e 1 1 = 1, e 0 2 · e 1 2 = 1, and e 0 3 · e 1 4 = 1), one can simply find R t = I 3×3 .

Optimization-Based LTS Orientation Identification
According to Equation (4), there are two unknowns in the displacement measurements using the LTS's, namely, the pitch angle α, and the yaw angle γ. Since only one parameter can be obtained using the LTS, that is, the displacement from the gear, one cannot directly obtain the pitch and yaw angles. To tackle this issue, an optimization is designed to permutate through a range of pitch and yaw angles until the desired values are acquired for the two LTS's. The objective function is to find α k and γ m that satisfies the optimization where f jkm represents the calibrated j-th segment of the measured profile at a given cross section with yaw and pitch angles adjusted by γ m and α k , f j , is the ideal involute profile with parameters found via a designed optical experiment, obtained based on photogrammetry of the target gear in Section 4.1, constructed based on the methods of drawing involute profiles described in [6,20], and N i is the total number of sampled points along the rotational axis of the gear using the i-th LTS. An illustration of the grid search process [21] to find α k and γ m is demonstrated in Figure 3. Before the optimization, an ideal gear tooth profile is generated based on the optical measurement of the one end of the gear. Since the general orientation of the LTS's to the gear rotation axis before the experiment has been adjusted to near ideal, the deviations of the pitch and yaw angles can be assumed to be small. In this case, the lower and upper bounds for α k and γ m are defined as (−10,10) degrees. During the optimization, first a trial involute profile (half of a profile, as shown in Figure 3, due to a single LTS only measures half of the tooth) is constructed by solving the Equations (1) through (4) using the LTS data based on a pair of pitch (α k ) and yaw (γ m ) angle values within their bounds. Then, the absolute deviation of the trial profile from the ideal is obtained using Equation (4). A subroutine records the absolute deviation at the given pitch and yaw angles. Finally, by iterating through the bounds of α k and γ m , the deviation between a trial profile and the ideal can be calculated, and the minimum deviation is deemed as the optimized results. where represents the calibrated j-th segment of the measured profile at a given cross section with yaw and pitch angles adjusted by and , , is the ideal involute profile with parameters found via a designed optical experiment, obtained based on photogrammetry of the target gear in Section 4.1, constructed based on the methods of drawing involute profiles described in [6,20], and is the total number of sampled points along the rotational axis of the gear using the i-th LTS. An illustration of the grid search process [21] to find and is demonstrated in Figure 3. Before the optimization, an ideal gear tooth profile is generated based on the optical measurement of the one end of the gear. Since the general orientation of the LTS's to the gear rotation axis before the experiment has been adjusted to near ideal, the deviations of the pitch and yaw angles can be assumed to be small. In this case, the lower and upper bounds for and are defined as (−10,10) degrees. During the optimization, first a trial involute profile (half of a profile, as shown in Figure 3, due to a single LTS only measures half of the tooth) is constructed by solving the Equations (1) through (4) using the LTS data based on a pair of pitch ( ) and yaw ( ) angle values within their bounds. Then, the absolute deviation of the trial profile from the ideal is obtained using Equation (4). A subroutine records the absolute deviation at the given pitch and yaw angles. Finally, by iterating through the bounds of and , the deviation between a trial profile and the ideal can be calculated, and the minimum deviation is deemed as the optimized results.

Homogeneous Transformation
The gear axis distortion due to mounting error also needs to be calibrated to correctly represent the target point (i.e., ) on the gear surface. The following homogeneous transformation is performed to represent the desired vector ( ⃑ ) in the o1x1y1z1 reference frame: where ⃑ = [ ⃑ , 1] is the homogeneous representation of the vector ⃑, and is the homogeneous transformation matrix transforming a vector from o0x0y0z0 to o1x1y1z1 reference frame, and is defined as where ∈ ℝ × is the rotation matrix, ⃑ ∈ ℝ × is the translation vector from o0x0y0z0 to o1x1y1z1 reference frame. Since and ⃑ are dependent upon the location where the LTS stops along the  The gear axis distortion due to mounting error also needs to be calibrated to correctly represent the target point (i.e., p 1 O 1 O 2 ) on the gear surface. The following homogeneous transformation is performed to represent the desired vector ( p O 1 O 2 ) in the o 1 x 1 y 1 z 1 reference frame: where P = p T , 1 T is the homogeneous representation of the vector p , and H 1 0 is the homogeneous transformation matrix transforming a vector from o 0 x 0 y 0 z 0 to o 1 x 1 y 1 z 1 reference frame, and is defined as where R 1 0 ∈ R 3×3 is the rotation matrix, d 1 0 ∈ R 3×1 is the translation vector from o 0 x 0 y 0 z 0 to o 1 x 1 y 1 z 1 reference frame. Since R 1 0 and d 1 0 are dependent upon the location where the LTS stops along the gear's rotational axis, they are determined experimentally, the design of the experiment is demonstrated in Section 3.2.
According to the proposed measurement setup in Figure 2, the x 1 axis is coincident with the rotational axis of the gear, thus only the rotation about y 1 axis and z 1 axis are considered: where γ 1 and β 1 are the yaw and roll angle from o 0 x 0 y 0 z 0 to o 1 x 1 y 1 z 1 reference frame, and the translation vector from the measurement reference frame to the gear reference frame can be obtained as

Optical Measurement Testbed
A low-cost prototype testbed for noncontact tooth profile measurement is fabricated in lab and assembled with off-the-shelf components as shown in Figure 4. The key geometry parameters are measured and recorded in Table 1. The target gear is disassembled from a working external gear pump, then mounted onto a shaft, which is supported by a pair of tightly toleranced journal bearings installed on both shoulders. One end of the shaft is connected to a rotary encoder (2400 pulses per revolution) and the other to a stepper motor. Both connections are made via flexible shaft couplers. Two opposing laser triangulation sensors are mounted on top of two micro motion stages via 3D printed L-brackets. The micro motion stage is capable of translational movement in both the x and y directions in a cartesian coordinate system, driven manually with a pair of micrometer screw gauge. The displacement precision is 1 µm. The z direction or the altitude of the sensor can be adjusted by a pair of screws on the L-brackets. The stepper motor is controlled using a micro controller unit (MCU, model: Arduino UNO, Arduino AG, Italy), and the analogue voltage signals of the LTS's and the rotary encoder are acquired by a data acquisition system (DAQ, model: NI USB6002, National Instruments, Austin, TX, USA). directions in a cartesian coordinate system, driven manually with a pair of micrometer screw gauge. The displacement precision is 1 μm. The z direction or the altitude of the sensor can be adjusted by a pair of screws on the L-brackets. The stepper motor is controlled using a micro controller unit (MCU, model: Arduino UNO, Arduino AG, Italy), and the analogue voltage signals of the LTS's and the rotary encoder are acquired by a data acquisition system (DAQ, model: NI USB6002, National Instruments, Austin, TX, USA).

Test Procedures
The three goals of the experimental study are: (1) measurement of the displacement data from the gear tooth surface by LTS, (2) extraction of the target gear profile information based on photogrammetry as the ideal reference, and (3) identification of the spatial distortion of the rotational axis of the gear shaft. The measurement of the tooth displacement data is the basis for reconstruction of the tooth profile, comparable to the traditional way using a mechanical probe. During the experiment, the stepper motor would drive the gear shaft to rotate in constant angular velocity, the micro motion stages are manually adjusted to translate in a line parallel to the gear's rotational axis and stop at the 13 set sample intervals evenly spaced from 0 mm to 36 mm (total length of the gear). At one sample position, the data acquisition system records the LTS data containing two full revolutions, once finished, the LTS's are carried by the stage to the next set point. For comparison, the reference tooth profiles from the actual gear geometry are obtained using photogrammetry. An image of the side land of the spur gear is obtained when the focal plane of the camera is coincident with the side land of the gear. In later sections, image processing techniques are applied to the captured image for tooth profile identification. In the last experiment, to identify the relative deviation between the global (o 0 x 0 y 0 z 0 ) and the gear (o 1 x 1 y 1 z 1 ) reference frames (i.e., γ 1 and β 1 in R 1 0 , and the components of p O 0 O 1 ), one side of the L-bracket is adjusted such that the LTS is positioned in alignment with the z axis of the testbed right above the gear, which allows measurement of the vertical displacement of the gear. Then the gear shaft is locked to one angular position, while the two LTS scan along the set sample locations to obtain the horizontal and vertical deviation data.
In the experiment, synchronous real-time acquisition of gear cross section displacement data from both sides of the gear and the angular position of the gear shaft from the rotary encoder. The programming of the MCU allows the stepper motor to rotate at steady 30 rpm or stopped on demand based on the aforementioned test procedures. The acquisition starts after the system is warmed up for 10 minutes to avoid temperature drift. The sampling frequency is 10 kHz. The parameters of the LTS can be found in Table 2.

Preprocess
According to the procedures discussed in Section 3.2, before the reconstruction of the gear tooth profile, an ideal profile of the gear needs to be obtained as the first preprocess task. The target spur gear is disassembled from an external gear pump with involute gear profile but parameters unknown. Theoretically, a well-calibrated CMM can provide the reference profile needed. However, dimension of the target gear in this work is too small (in this case, the outer diameter is less than 40 mm) for common CMM, and the convex features between teeth interfere with the probe during the measurement of the key dimensions near the fillet. Due to these limitations, photogrammetry is used instead. Though measurement of the feature dimension from a photograph is limited by the accuracy of the optical device and the image processing techniques. However, this work exploited the fact that in gear making industry, the involute profile gears are made to standard sizes, i.e., the pitch number and the number of teeth can only be from a discrete set of values due to the standardization of tooling [20]. Thus, as long as the photogrammetry can distinguish the difference between the two closest dimensioned gears, this method is capable of retrieving the target gear dimensions.
The image processing technique applied to identify the target gear profile is described as follows. First, a series of morphological processing techniques (i.e., binarizing of the pixel values, closing of holes, and boundary tracing, for details one can refer to [6]) are applied to the original image to locate the rotational center from the dedendum circle (i.e., the dark circular region in Figure 5a with center position identified and marked with a cross). Then the pitch diameter is estimated to be 32 mm based on the distance between the middle point of the tooth height to the center of gear by pixel counting. Using the diametral pitch definition, p d = N d , and substituting in the number of teeth (N = 12), the feasible diametral pitch range is found between 9 in −1 and 10 in −1 . The standard values satisfying the range are 9 in −1 , 9.5 in −1 , or 10 in −1 [22], resulting the pitch diameters to be 33.7 mm, 32.1 mm, or 30.5 mm. The gear profiles based on these diametral pitch values are constructed in Figure 5b. Since the minimum difference is more than 1.6 mm, the resolution of the photo is accurate enough for the determination of the diametral pitch, which is 9.5 in −1 in this work. Then in turn, the found diameter info can be used to calibrate the figure dimension, and a 103 pixel/mm conversion coefficient from pixel number to length is found. Comparing to the American Gear Manufacturers Association (AGMA) standard [20], the target gear has shown signs of modification to the standard parameters, which are the rounded corner, addendum and dedendum circle radii. The detailed gear parameters are shown in Table 3. And the optically acquired profile from the flank of the gear is used as the ideal profile (at x 1 = 0 mm) in the following sections. Another task is to determine the relative deviation between the global (o 0 x 0 y 0 z 0 ) and the gear (o 1 x 1 y 1 z 1 ) reference frames. The averaged gear axis displacement values in the y 0 and z 0 axes at set  Figure 6. The measured rotational axis of the gear contains the geometrical tolerance information, i.e., a sum of both the positional error from the micro motion stage and the error from installation of the gear. From Figure 6b, the angular difference between the z 1 and the z 0 axis is found to be 0.3 • . In Figure 6c, the vertical displacement plot shows that the majority of the data is parallel to the x axis, suggesting the vertical deviation is caused by mounting error near the two extreme positions along the gear axis. Another potential cause due to the gear manufacturing error has been ruled out, since the typical hydrodynamic clearance and the modern manufacturing tolerances for gears are on the order of micro meters in hydraulic systems. The deviation in Figure 6 is one magnitude higher than that of the typical value, which would render the gear pump defective. Yet the gear is disassembled from a working pump, indicating the dominating cause of the rotational axis distortion due to mounting error.
between the two closest dimensioned gears, this method is capable of retrieving the target gear dimensions.
The image processing technique applied to identify the target gear profile is described as follows. First, a series of morphological processing techniques (i.e., binarizing of the pixel values, closing of holes, and boundary tracing, for details one can refer to [6]) are applied to the original image to locate the rotational center from the dedendum circle (i.e., the dark circular region in Figure 5a with center position identified and marked with a cross). Then the pitch diameter is estimated to be 32 mm based on the distance between the middle point of the tooth height to the center of gear by pixel counting. Using the diametral pitch definition, = , and substituting in the number of teeth (N = 12), the feasible diametral pitch range is found between 9 in −1 and 10 in −1 . The standard values satisfying the range are 9 in −1 , 9.5 in −1 , or 10 in −1 [22], resulting the pitch diameters to be 33.7 mm, 32.1 mm, or 30.5 mm. The gear profiles based on these diametral pitch values are constructed in Figure 5b. Since the minimum difference is more than 1.6 mm, the resolution of the photo is accurate enough for the determination of the diametral pitch, which is 9.5 in −1 in this work. Then in turn, the found diameter info can be used to calibrate the figure dimension, and a 103 pixel/mm conversion coefficient from pixel number to length is found. Comparing to the American Gear Manufacturers Association (AGMA) standard [20], the target gear has shown signs of modification to the standard parameters, which are the rounded corner, addendum and dedendum circle radii. The detailed gear parameters are shown in Table 3. And the optically acquired profile from the flank of the gear is used as the ideal profile (at = 0 mm) in the following sections.   Another task is to determine the relative deviation between the global (o0x0y0z0) and the gear (o1x1y1z1) reference frames. The averaged gear axis displacement values in the y0 and z0 axes at set positions along the x0 axis are shown in Figure 6. The measured rotational axis of the gear contains the geometrical tolerance information, i.e., a sum of both the positional error from the micro motion stage and the error from installation of the gear. From Figure 6b, the angular difference between the z1 and the z0 axis is found to be 0.3°. In Figure 6c, the vertical displacement plot shows that the majority of the data is parallel to the x axis, suggesting the vertical deviation is caused by mounting error near the two extreme positions along the gear axis. Another potential cause due to the gear manufacturing error has been ruled out, since the typical hydrodynamic clearance and the modern manufacturing tolerances for gears are on the order of micro meters in hydraulic systems. The deviation in Figure 6 is one magnitude higher than that of the typical value, which would render the gear pump defective. Yet the gear is disassembled from a working pump, indicating the dominating cause of the rotational axis distortion due to mounting error.

Optimization-Based Tooth Profile Calibration
The solution surfaces of the optimization to identify the pitch and yaw angles for both LTS's are shown in Figure 7. Each vertex in the mesh denotes one trial of the reconstructed profile based on the given pitch and yaw angles. The orientations of the two LTS are different due to individual installation of each on a different micro motion stage supported by an adjustable L-bracket, resulting

Optimization-Based Tooth Profile Calibration
The solution surfaces of the optimization to identify the pitch and yaw angles for both LTS's are shown in Figure 7. Each vertex in the mesh denotes one trial of the reconstructed profile based on the given pitch and yaw angles. The orientations of the two LTS are different due to individual installation of each on a different micro motion stage supported by an adjustable L-bracket, resulting discrepancies between the two solution spaces in Figure 7a,b. However, the general shapes of the two are similar. For instance, both figures show signs of symmetry about the pitch angle axis when the yaw angle is at 0 degree. This feature suggests that only the magnitude of the yaw angle is important to the sum of the absolute error between the reconstructed and the ideal gear tooth profiles. The optimal LTS pitch and yaw angles for the left and right halves of the test system are (γ = ±5.9, α = −0.17) degrees and (γ = ±9.2, α = −1.53) degrees, respectively.

Plannar Reconstruction of the Gear Tooth Profile
Before the spatial reconstruction of the profile, the tooth profile at each sampled cross section is processed, and the effects of the proposed calibration on the profile reconstruction accuracy are analyzed in Figure 8. The uncalibrated profile based on Equation (1), the LTS orientation compensated one using Equation (3), and the ideal profiles are compared in a polar coordinate system at = 0 mm. Each LTS measures half the profile of a tooth, i.e., from the bottom land through the involute profile to the top land. Applying Equations (1) to (4) to the measured sensor data from one LTS results in half of a tooth profile, whereas by inserting the measurement from the other LTS, the other half can be obtained. Since an overlap exists at the top land of the gear along the addendum between the two calculated profiles, to combine the two halves, a "stitch point" can be selected anywhere from the overlapped region. In this work, the stitch point is consistently selected to be on the intersection point between the right involute and the addendum circle from the left, as shown in Figure 8a. At the origin of the o1x1y1z1 frame, the axis of the gear has not yet deviated from the x0 direction of the o0x0y0z0 frame, in this case = ∈ ℝ × (the identity matrix) and ⃑ = ∈ ℝ × . So the homogeneous transform matrix becomes = [ 0; 0]. Thus, only the optimized pitch and yaw angles are required for the calibration using Equation (3). From Figure 8a, the calibrated experimental profiles based on the yaw and pitch correction show better alignment with the ideal profile compared to the uncalibrated case. By comparing the profile error in Figure 8b, the calibrated one is also superior in both the variation of the error and the error magnitude. The maximum absolute variation of the calibrated profile error is within 0.1 mm.

Plannar Reconstruction of the Gear Tooth Profile
Before the spatial reconstruction of the profile, the tooth profile at each sampled cross section is processed, and the effects of the proposed calibration on the profile reconstruction accuracy are analyzed in Figure 8. The uncalibrated profile based on Equation (1), the LTS orientation compensated one using Equation (3), and the ideal profiles are compared in a polar coordinate system at x 1 = 0 mm. Each LTS measures half the profile of a tooth, i.e., from the bottom land through the involute profile to the top land. Applying Equations (1) to (4) to the measured sensor data from one LTS results in half of a tooth profile, whereas by inserting the measurement from the other LTS, the other half can be obtained. Since an overlap exists at the top land of the gear along the addendum between the two calculated profiles, to combine the two halves, a "stitch point" can be selected anywhere from the overlapped region. In this work, the stitch point is consistently selected to be on the intersection point between the right involute and the addendum circle from the left, as shown in Figure 8a Effects of the gear axis distortion compensation at the far end of the gear ( = 35 mm) are studied in Figure 9. At the opposite end of the gear in the o1x1y1z1 frame, the axis of the gear has shown significant deviation from the ideal in the x0 direction of the o0x0y0z0 frame according to Figure 6b. Based on the measured displacement and rotational angle, the homogeneous transform matrix can be updated at the current axial displacement using Equation (7), in addition to the optimized pitch and yaw angles. In the comparison of the profiles in Figure 9a, the fully compensated profile shows the best alignment with the ideal. Figure 9b confirmed the finding. For the case with the optimized pitch and yaw angle but without axis distortion compensation, the error is over twice that of the fully calibrated one, the magnitude is over 0.2 mm. And the error for the fully compensated profiles is under 0.1 mm, demonstrating the effect of the combined compensation of the axis distortion and the orientation of the LTS.  Effects of the gear axis distortion compensation at the far end of the gear (x 1 = 35 mm) are studied in Figure 9. At the opposite end of the gear in the o 1 x 1 y 1 z 1 frame, the axis of the gear has shown significant deviation from the ideal in the x 0 direction of the o 0 x 0 y 0 z 0 frame according to Figure 6b. Based on the measured displacement and rotational angle, the homogeneous transform matrix can be updated at the current axial displacement using Equation (7), in addition to the optimized pitch and yaw angles. In the comparison of the profiles in Figure 9a, the fully compensated profile shows the best alignment with the ideal. Figure 9b confirmed the finding. For the case with the optimized pitch and yaw angle but without axis distortion compensation, the error is over twice that of the fully calibrated one, the magnitude is over 0.2 mm. And the error for the fully compensated profiles is under 0.1 mm, demonstrating the effect of the combined compensation of the axis distortion and the orientation of the LTS. Effects of the gear axis distortion compensation at the far end of the gear ( = 35 mm) are studied in Figure 9. At the opposite end of the gear in the o1x1y1z1 frame, the axis of the gear has shown significant deviation from the ideal in the x0 direction of the o0x0y0z0 frame according to Figure 6b. Based on the measured displacement and rotational angle, the homogeneous transform matrix can be updated at the current axial displacement using Equation (7), in addition to the optimized pitch and yaw angles. In the comparison of the profiles in Figure 9a, the fully compensated profile shows the best alignment with the ideal. Figure 9b confirmed the finding. For the case with the optimized pitch and yaw angle but without axis distortion compensation, the error is over twice that of the fully calibrated one, the magnitude is over 0.2 mm. And the error for the fully compensated profiles is under 0.1 mm, demonstrating the effect of the combined compensation of the axis distortion and the orientation of the LTS.

Spatial Reconstruction of the Gear Tooth Profile
The measured tooth displacement data sets along the gear axis is assembled in 3D with and without geometric compensation by the LTS orientation (Equation (3)) and gear axis distortion (Equation (7)) as shown in Figure 10. It is seen that the calibration of the measurement has significant effect on shape of the spatial gear profile. Also, as the x 1 displacement is increasing, an expected trend is noticed that the uncalibrated profile deviates more with respect to the calibrated one as the sampled location is moved from 0 mm towards the 35 mm in the x 1 axis, supporting the observations in Figure 6b,c. This trend is also seen in the average profile error trend plot along the gear rotational axis under difference compensation settings when compared to the ideal profile optically acquired, as in Figure 11. The profile error of the fully compensated experimental results compared to ideal one is between 3.7 µm and 59 µm, which limiting factor is the accuracy of the LTS. An average of experimental profile error reduction by the compensation of the gear axis distortion, the LTS orientation and the previous two combined are 11%, 87%, and 98%, respectively. The proposed method has shown effectiveness in reducing the geometrical error inherited from the mounting and installation errors.

Spatial Reconstruction of the Gear Tooth Profile
The measured tooth displacement data sets along the gear axis is assembled in 3D with and without geometric compensation by the LTS orientation (Equation (3)) and gear axis distortion (Equation (7)) as shown in Figure 10. It is seen that the calibration of the measurement has significant effect on shape of the spatial gear profile. Also, as the x1 displacement is increasing, an expected trend is noticed that the uncalibrated profile deviates more with respect to the calibrated one as the sampled location is moved from 0 mm towards the 35 mm in the x1 axis, supporting the observations in Figure 6b,c. This trend is also seen in the average profile error trend plot along the gear rotational axis under difference compensation settings when compared to the ideal profile optically acquired, as in Figure 11. The profile error of the fully compensated experimental results compared to ideal one is between 3.7 μm and 59 μm, which limiting factor is the accuracy of the LTS. An average of experimental profile error reduction by the compensation of the gear axis distortion, the LTS orientation and the previous two combined are 11%, 87%, and 98%, respectively. The proposed method has shown effectiveness in reducing the geometrical error inherited from the mounting and installation errors. Figure 10. Reconstructed gear profile based on the proposed method. Note the uncalibrated profile is distorted and deformed from the calibrated one. Also, each vertex in the mesh represents one data point. The actual data set is two orders of magnitude denser than that in the plot, the sparsification of data is for clear illustration. Exp. profile fully compensated Exp. profile without calibration Exp. profile with axis distortion compensation Exp. profile with LTS compensation Figure 10. Reconstructed gear profile based on the proposed method. Note the uncalibrated profile is distorted and deformed from the calibrated one. Also, each vertex in the mesh represents one data point. The actual data set is two orders of magnitude denser than that in the plot, the sparsification of data is for clear illustration.

Spatial Reconstruction of the Gear Tooth Profile
The measured tooth displacement data sets along the gear axis is assembled in 3D with and without geometric compensation by the LTS orientation (Equation (3)) and gear axis distortion (Equation (7)) as shown in Figure 10. It is seen that the calibration of the measurement has significant effect on shape of the spatial gear profile. Also, as the x1 displacement is increasing, an expected trend is noticed that the uncalibrated profile deviates more with respect to the calibrated one as the sampled location is moved from 0 mm towards the 35 mm in the x1 axis, supporting the observations in Figure 6b,c. This trend is also seen in the average profile error trend plot along the gear rotational axis under difference compensation settings when compared to the ideal profile optically acquired, as in Figure 11. The profile error of the fully compensated experimental results compared to ideal one is between 3.7 μm and 59 μm, which limiting factor is the accuracy of the LTS. An average of experimental profile error reduction by the compensation of the gear axis distortion, the LTS orientation and the previous two combined are 11%, 87%, and 98%, respectively. The proposed method has shown effectiveness in reducing the geometrical error inherited from the mounting and installation errors. Figure 10. Reconstructed gear profile based on the proposed method. Note the uncalibrated profile is distorted and deformed from the calibrated one. Also, each vertex in the mesh represents one data point. The actual data set is two orders of magnitude denser than that in the plot, the sparsification of data is for clear illustration.

Conclusions
Measurement of gears in mobile fluid power systems requires specialized tools. In this work, the working principle of a gear profile measurement apparatus was proposed. The key geometrical models were derived. A testbed was designed and built to measure the gear profile and algorithm given to reconstruct the tooth profile in the 3D space. An optimization was performed to determine the orientation error of the two LTS's. In this way, the measured tooth profile can be calibrated by compensating the sensors' pitch and yaw angles. Preliminary results showed that the relative rotation matrix from the orientation of the LTS to the reference frame of the gear was found influenced by the installation precision and dimensional tolerance of both the gear shaft and the micro motion platform along the gear's rotational axis. The proposed apparatus is capable of measuring the tooth profile, and the geometrical model can well predict the mounting error and orientation disturbances. Compared to the uncalibrated tooth profile, the calibrated results can reduce the geometrical error by up to 98%. In the future, LTS with higher resolution will be implement for improved reconstruction accuracy.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Appendix A
A pure rotation about the fixed reference frame can be stepped by a series of rotations about one axis at a time [23]. Based on the reference frame defined in Section 2.1, the matrix describing the yaw, roll and pitch about the x, y and z axes is: Since the rolling of the LTS does not affect measurement (as long as the laser beam is not block in any way), the roll matrix is assumed to be identity. Through matrix multiplication, Equation (4) is arrived. Similarly, the rotation matrix from the global to the gear frame (R 1 0 ) can be found by matrix multiplication, where R x,α = I ∈ R 3×3 .