Design of the Automated Calibration Process for an Experimental Laser Inspection Stand

This paper deals with the concept of the automated calibration design for inspection systems using laser sensors. The conceptual solution is based on using a laser sensor and its ability to scan 3D surfaces of inspected objects in order to create a representative point cloud. Problems of scanning are briefly discussed. The automated calibration procedure for solving problems of errors due to non-precise adjustment of the mechanical arrangement, possible tolerances in assembly, and their following elimination is proposed. The main goal is to develop a system able to measure and quantify the quality of produced objects in the environment of Industry 4.0. Laboratory measurements on the experimental stand, including the principal software solution for automated calibration of laser sensors suitable for gear wheel inspection systems are presented. There is described design of compensation eccentricity by Fourier transform and sinusoidal fitting to identify and suppress the first harmonic component in the data with high precision measuring.


Introduction
Gear wheels are the principal components of many mechanical devices for transmission and reduction of mechanical energy. Considering the implementation of Industry 4.0, the mass production of gear wheels poses high demands for inspection and quality evaluation of products. The specific form of wheels containing the involute geometry of teeth imposes serious problems for inspection tasks of these form-complex objects. Several inspection methods have been developed recently. The optical inspection with camera vision [1] detects the internal hole and number of teeth. The vision-based inspection [2] with deep learning image processing enables the detection of surface defects. The survey of approaches based on the camera sensing and processing data by Deep learning methods is discussed in [3]. The measuring system for sensing flexural motions of compliant mechanism based on the distance laser sensor and the camera vision is presented in [4]. Basic calibration processes use camera vision for object recognition implementing an IRVision (FANUC company) system based on a two-dimensional dot grid with the definition of the calibration points described in [5]. This method is a commercial system dedicated to camera vision in industrial robotic applications. In [6], a calibration method of triangulation scanner is described, which is used to map the 3D surfaces of blades. These are very specific according to their shape. In distances of 250 to 650 mm, an accuracy of 1 mm is declared. Specific measuring systems and calibration methods are used in the aeronautics and astronautics industry. This work describes using a laser distance sensor mounted on a CMM measurement machine to scan the metallic sphere mounted on the rotary platform with the measuring error declared to be 0.05 mm [7]. The calibration process for the robotic arm used

Problem Analysis and Concept
As an object of inspection, a gear wheel is used ( Figure 1) that represents the number of mechanical elements of mass production. The aim of this paper is to collect and process data to generate the point cloud corresponding to the real geometry of the gear wheel. The final goal is preparing necessary data for evaluation of the production quality and further automation of the system towards to zero-defect production process [24]. As illustrated in Figure 1, there are many different shapes of gear wheels in industry. For every type of gear wheel, a unique setting of the inspection stand is necessary for obtaining appropriate data.
Sensors 2022, 22, x FOR PEER REVIEW 3 of 15 system. Therefore, automation of highly complex processes such as calibration would remarkably reduce pre-manufacture times for more intelligent systems that would continue being developed in the new areas of Industry 4.0.

Problem Analysis and Concept
As an object of inspection, a gear wheel is used ( Figure 1) that represents the number of mechanical elements of mass production. The aim of this paper is to collect and process data to generate the point cloud corresponding to the real geometry of the gear wheel. The final goal is preparing necessary data for evaluation of the production quality and further automation of the system towards to zero-defect production process [24]. As illustrated in Figure 1, there are many different shapes of gear wheels in industry. For every type of gear wheel, a unique setting of the inspection stand is necessary for obtaining appropriate data. Following previous studies and work [10], laser sensing was chosen as the most suitable measuring principle for the inspection. For basic laboratory experiments, an experimental inspection stand was set up, illustrated in Figure 2, which was built upon a universal rotation table with angle position control. In this stand, a shaft and laser sensor were used. Parameters of the mentioned sensor are in Table 1 [19]. Table 1. Parameters of a laser sensor.

Laser Sensor
Parameter Start of measuring range 70 mm End of measuring range 120 mm Resolution (Z-axis) 4 μm Scanning points 640 Numerous experimental measurements on several conventional objects have been performed. Obviously, measurement accuracy strongly depends on the precise positional adjustment of sensors concerning the object. To achieve precise measurement, a calibration procedure is required to eliminate errors in the fixation of sensors, tolerances of parts dimensions, backlashes, or possible misalignments. For this purpose, the software calibration procedure is proposed and described in Section 2.2. (Methodology of calibration procedures) and in Section 2.3. (Data preparation). Thus, the measuring stand can easily adapt to real objects or situations.
Due to the number of different types of gears produced, it is necessary for each type to define the specific position and orientation of the laser sensor in relation to a particular scanned gear. Based on the initial analysis and experiments with a possible inspection system, the main areas requiring to be addressed have been identified: Following previous studies and work [10], laser sensing was chosen as the most suitable measuring principle for the inspection. For basic laboratory experiments, an experimental inspection stand was set up, illustrated in Figure 2, which was built upon a universal rotation table with angle position control. In this stand, a shaft and laser sensor were used. Parameters of the mentioned sensor are in Table 1 [19]. The main fundamental is to design a cognitive solution for transforming data from the coordinate system of the laser sensor, specifically located in space, to the coordinate system of the shaft as the first step of calibration. 2. The second calibration step is to solve the accuracy of the measurements by suppressing the eccentricity of the shaft position. - The method used is based on applying the Fourier transform in the first step, followed by developing a precise fitting of the harmonic component.

Methodology of Calibration Procedures
The goal of the calibration procedure is to find the exact positions of the rotary shaft with respect to a particular sensor and the actual configuration of the measuring system. The positional errors due to non-precise fixation of sensors, inaccuracies of manufacturing of pieces, assembly errors of the stand, or eccentricity in a rotation table with a fixation shaft, result in measurement errors and deteriorate the accuracy of inspection apparatus. For calibration, we state two rectangular reference coordinate systems, as shown in Figure  3: -S(x,y,z) the sensor reference system in which measured values/data are given; -C(x,y,z) is the system related to the fixation shaft as the reference for the position of an object (gear wheel).  Numerous experimental measurements on several conventional objects have been performed. Obviously, measurement accuracy strongly depends on the precise positional adjustment of sensors concerning the object. To achieve precise measurement, a calibration procedure is required to eliminate errors in the fixation of sensors, tolerances of parts dimensions, backlashes, or possible misalignments. For this purpose, the software calibration procedure is proposed and described in Section 2.2. (Methodology of calibration procedures) and in Section 2.3. (Data preparation). Thus, the measuring stand can easily adapt to real objects or situations.
Due to the number of different types of gears produced, it is necessary for each type to define the specific position and orientation of the laser sensor in relation to a particular scanned gear. Based on the initial analysis and experiments with a possible inspection system, the main areas requiring to be addressed have been identified:

1.
Adapting the position of the laser sensor according to the gear wheel regarding the specifics of the scanned object and its functional surfaces to be inspected. - The main fundamental is to design a cognitive solution for transforming data from the coordinate system of the laser sensor, specifically located in space, to the coordinate system of the shaft as the first step of calibration.

2.
The second calibration step is to solve the accuracy of the measurements by suppressing the eccentricity of the shaft position. - The method used is based on applying the Fourier transform in the first step, followed by developing a precise fitting of the harmonic component.

Methodology of Calibration Procedures
The goal of the calibration procedure is to find the exact positions of the rotary shaft with respect to a particular sensor and the actual configuration of the measuring system. The positional errors due to non-precise fixation of sensors, inaccuracies of manufacturing of pieces, assembly errors of the stand, or eccentricity in a rotation table with a fixation shaft, result in measurement errors and deteriorate the accuracy of inspection apparatus. For calibration, we state two rectangular reference coordinate systems, as shown in Figure 3: -S(x,y,z) the sensor reference system in which measured values/data are given; -C(x,y,z) is the system related to the fixation shaft as the reference for the position of an object (gear wheel). 1. Adapting the position of the laser sensor according to the gear wheel regarding the specifics of the scanned object and its functional surfaces to be inspected. - The main fundamental is to design a cognitive solution for transforming data from the coordinate system of the laser sensor, specifically located in space, to the coordinate system of the shaft as the first step of calibration. 2. The second calibration step is to solve the accuracy of the measurements by suppressing the eccentricity of the shaft position. - The method used is based on applying the Fourier transform in the first step, followed by developing a precise fitting of the harmonic component.

Methodology of Calibration Procedures
The goal of the calibration procedure is to find the exact positions of the rotary shaft with respect to a particular sensor and the actual configuration of the measuring system. The positional errors due to non-precise fixation of sensors, inaccuracies of manufacturing of pieces, assembly errors of the stand, or eccentricity in a rotation table with a fixation shaft, result in measurement errors and deteriorate the accuracy of inspection apparatus. For calibration, we state two rectangular reference coordinate systems, as shown in Figure  3: -S(x,y,z) the sensor reference system in which measured values/data are given; -C(x,y,z) is the system related to the fixation shaft as the reference for the position of an object (gear wheel). The S(x,y,z) reference rectangular system is a basic sensor coordinate system, where all scanned points (and their coordinates in X, Y, and Z) are defined in this reference system. Due to unifying data modified point cloud is necessary from the laser sensor and unifying scans to C(x,y,z) rectangular coordinate system, which is concatenated to the shaft. Let's state that point → P on the object surface captured by a sensor in the S reference system is denoted by the displacement vector → D and transform matrix O to C reference system.
The position of this point P expressed as the vector → P c in C-reference system is then using transformation (1): where O is (3 × 3) transformation matrix between particular reference systems. Once the configuration of an inspection stand, i.e., mechanics, with a dedicated object and sensory system arranged, the sources of errors emerge mainly in mechanics. To guarantee maximal sensing accuracy, it is necessary to find the exact transformation between the S and C reference systems. Thus, the principal problem of calibration is to reveal and identify errors that arise between references S and C and the transformation change between both systems. This naturally should be done for each sensing position of the table/wheel, concerning scans in rotation, as well. To eliminate these estimated errors, one can include error corrections in the form of a corrective matrix E. Then, any measurements of position revised → P ce in the C reference system can be calculated according to relation in (2):

Data Preparation
The calibration basis is the scanning of the rotating shaft around the axis and the expression of these points in the S-reference coordinate system. The dimensions of the sensing shaft are shown in Figure 4. This shaft consists of two basic parts. A basic cylindrical surface with a diameter of Ø25 mm and a bearing cylindrical surface with a nominal size of Ø13.94 mm, which are scanned by a laser sensor. The S(x,y,z) reference rectangular system is a basic sensor coordinate system, where all scanned points (and their coordinates in X, Y, and Z) are defined in this reference system. Due to unifying data modified point cloud is necessary from the laser sensor and unifying scans to C(x,y,z) rectangular coordinate system, which is concatenated to the shaft. Let's state that point ⃗ on the object surface captured by a sensor in the S reference system is denoted by the displacement vector ⃗ and transform matrix O to C reference system. The position of this point P expressed as the vector ⃗ in C-reference system is then using transformation (1): where O is (3 × 3) transformation matrix between particular reference systems. Once the configuration of an inspection stand, i.e., mechanics, with a dedicated object and sensory system arranged, the sources of errors emerge mainly in mechanics. To guarantee maximal sensing accuracy, it is necessary to find the exact transformation between the S and C reference systems. Thus, the principal problem of calibration is to reveal and identify errors that arise between references S and C and the transformation change between both systems. This naturally should be done for each sensing position of the table/wheel, concerning scans in rotation, as well. To eliminate these estimated errors, one can include error corrections in the form of a corrective matrix E. Then, any measurements of position revised ⃗ in the C reference system can be calculated according to relation in (2):

Data Preparation
The calibration basis is the scanning of the rotating shaft around the axis and the expression of these points in the S-reference coordinate system. The dimensions of the sensing shaft are shown in Figure 4. This shaft consists of two basic parts. A basic cylindrical surface with a diameter of Ø25 mm and a bearing cylindrical surface with a nominal size of Ø13.94 mm, which are scanned by a laser sensor. Based on the system shown in Figures 2 and 4, the points captured by the laser sensor and representing the surface of the sensed shaft in the coordinate system S are generated. The result is the unfolded area of the sensed shaft shown in Figure 5A. The whole image consists of a sequence of scanned profiles in the X and Z axes (XZ plane) in time, which is expressed by the Y axis. All scanned profiles captured by the sensor in the XZ scanning plane are shown in Figure 5B. This makes it possible to express each scanned point by the Based on the system shown in Figures 2 and 4, the points captured by the laser sensor and representing the surface of the sensed shaft in the coordinate system S are generated. The result is the unfolded area of the sensed shaft shown in Figure 5A. The whole image consists of a sequence of scanned profiles in the X and Z axes (XZ plane) in time, which is expressed by the Y axis. All scanned profiles captured by the sensor in the XZ scanning plane are shown in Figure 5B. This makes it possible to express each scanned point by the vector → P s as The basic parameters of shaft sensing are given in Table 2. The scanned shaft data were stored in a .CSV file under a name consisting of k-calibration and scan number, i.e., "k1".

Scanning Parameter Value
Angular velocity [rad·s −1 ] 1 10 Scanned frequency [Hz] 200 Number of profiles in one scan 11,000 Based on Equation (3), it is necessary to define parameters for performing the transformation of points from the coordinate system S to the coordinate system C and to correctly generate values for the vector ⃗ and for the matrix O: The displacement vector can be expressed as a correction of the point values in the X and Z axes, being basic scanning axes of each profile. The goal is to get the scanned points to the starting position and to ensure the unification of the shaft axis with the Z axis in the C coordinate system. Three-dimensional matrix K consists of three two-dimensional matrices for each axis X, Y, and Z, as given in Equation (5). The two-dimensional matrix in size i, j for each axis is in the dimension 640 × 11,000, which corresponds to the sensing based on the possibility of the sensor used. So, 640 corresponds to the maximum number of scanned points in one profile (Table 1-Scanning points) and the number of scanned profiles in one scan, which in this case is 11,000 profiles, according to Table 2.
The displacement vector is expressed as the displacement of the points in the X and Z axes, the displacement value for the Z axis corresponding to the lowest value in the Z matrix of the K-matrix (scan). The dot is shown as a red dot in Figure 6B-D.
The second process is to perform a transformation of points around the zero point of the C coordinate system. The basis is to use the transformation matrix given in (4). The angle φ is expressed as the angle between the X axis of the coordinate system and the axis  Based on Equation (3), it is necessary to define parameters for performing the transformation of points from the coordinate system S to the coordinate system C and to correctly generate values for the vector → D and for the matrix O: The displacement vector can be expressed as a correction of the point values in the X and Z axes, being basic scanning axes of each profile. The goal is to get the scanned points to the starting position and to ensure the unification of the shaft axis with the Z axis in the C coordinate system. Three-dimensional matrix K consists of three two-dimensional matrices for each axis X, Y, and Z, as given in Equation (5). The two-dimensional matrix in size i, j for each axis is in the dimension 640 × 11,000, which corresponds to the sensing based on the possibility of the sensor used. So, 640 corresponds to the maximum number of scanned points in one profile (Table 1-Scanning points) and the number of scanned profiles in one scan, which in this case is 11,000 profiles, according to Table 2.
The displacement vector is expressed as the displacement of the points in the X and Z axes, the displacement value for the Z axis corresponding to the lowest value in the Z matrix of the K-matrix (scan). The dot is shown as a red dot in Figure 6B-D. → D = X i,j 1 min(Z)) (6) measurement error, namely the eccentricity of the location of the rotating shaft that is sensed and the rotating table. Ideally, the axis of the shaft should be in line with the axis of the rotating table, which is not the case and manifests itself as the first harmonic component in the measurement:  The second process is to perform a transformation of points around the zero point of the C coordinate system. The basis is to use the transformation matrix given in (4). The angle ϕ is expressed as the angle between the X axis of the coordinate system and the axis of the shaft, respectively, of a cylindrical surface with a parallel axis of symmetry. There are two cylindrical surfaces in the scanned shaft. The larger cylindrical surface is the Base shaft surface shown in green, where the coordinates of the endpoints of this surface are also shown in Figure 6B. The points from the Base shaft surface are used in the form of a one-dimensional matrix in the polynomial regression shown in Equation (7) and displayed in cyan color in Figure 6C. Subsequently, the angle is calculated according to Equation (8) as the arc tangent of the parameter k (gradient) from the directional expression of the line according to Equation (7) in two-dimensional space. The numerical expression of the angle between the line and the Z axis is expressed in Figure 6D Figure 7A. The projection of all points into the XZ plane is shown in Figure 7B. The sinusoidal character of the recorded points can be seen in these illustrations. This is due to the so-called measurement error, namely the eccentricity of the location of the rotating shaft that is sensed and the rotating table. Ideally, the axis of the shaft should be in line with the axis of the rotating table, which is not the case and manifests itself as the first harmonic component in the measurement:  The most common solution for removing the first harmonic component from th measurements can be performed using the general discrete Fourier transform suitable fo the point cloud given in (9), where N declares the number of samples-in this case, 11,00 (according to Table 1)  Although the Fourier transform is a universal and reliable method, the output from The most common solution for removing the first harmonic component from the measurements can be performed using the general discrete Fourier transform suitable for the point cloud given in (9), where N declares the number of samples-in this case, 11,000 (according to Table 1), n means evaluation, k-frequency, and X(k) mean k th frequency. The graphical output of the Fourier transform is shown in Figure 8. In the upper part of the figure, the course of the sinusoidal character relation between the points according to time (Y axis) and the amplitude of the points (X axis) is displayed in blue. The resulting harmonic frequencies with amplitudes are shown at the bottom of Figure 8, where the first harmonic component was expressed as the real part for a particular harmonic frequency. The subsequent phase shift ϕ is expressed as the value of the imaginary component from the Fourier transform at a particular harmonic component. A comparison of the real points and the calculated first harmonic component is shown in Figure 8 above (red sine wave). The most common solution for removing the first harmonic component from th measurements can be performed using the general discrete Fourier transform suitable fo the point cloud given in (9), where N declares the number of samples-in this case, 11,00 (according to Table 1)  Although the Fourier transform is a universal and reliable method, the output from this method does not generate sufficiently accurate values. For this reason, the firs Although the Fourier transform is a universal and reliable method, the output from this method does not generate sufficiently accurate values. For this reason, the first harmonic component is defined according to the angular velocity sensing parameter given in Table 2. The justification for the use of the Fourier transform is to obtain the phase shift of the first harmonic component. This is considered the first step in the calibration to remove the eccentricity that occurs in the data. The second step is the exact location of the simulated or calculated sinusoids to the actual recorded data. An example is shown in Figure 9. The scanned points are displayed in blue, and the first harmonic component is displayed in red, defined on the left vertical axis. The fitting of sinusoidal waves can be expressed as the average shift in the phase shifts of the individual points of the respective sinusoid (measured points and the first harmonic component). The phase shifts are calculated as the arc sine of each point. The offset of the measured points is shown in Figure 9 in light blue, and the displacement of the red sinusoid dots is shown by the orange dots. The difference between these shifts is shown by a black curve, which is averaged and shown in cyan color, i.e., by a phase shift of 0.26π of the first harmonic component of the Fourier transform from the real measured points.  Table 2. The justification for the use of the Fourier transform is to obtain the phase shift of the first harmonic component. This is considered the first step in the calibration to remove the eccentricity that occurs in the data. The second step is the exact location of the simulated or calculated sinusoids to the actual recorded data. An example is shown in Figure 9. The scanned points are displayed in blue, and the first harmonic component is displayed in red, defined on the left vertical axis. The fitting of sinusoidal waves can be expressed as the average shift in the phase shifts of the individual points of the respective sinusoid (measured points and the first harmonic component). The phase shifts are calculated as the arc sine of each point. The offset of the measured points is shown in Figure 9 in light blue, and the displacement of the red sinusoid dots is shown by the orange dots. The difference between these shifts is shown by a black curve, which is averaged and shown in cyan color, i.e., by a phase shift of 0.26π of the first harmonic component of the Fourier transform from the real measured points. A summary of the results from previous calculations is shown in Figure 10. The original sinusoid of the first harmonic component of the Fourier transform is shown in orange. A fitted sine wave with a phase shift of 0.26π is shown in red. The eccentricitysuppressing compensation wave with a phase shift of π in radians is shown in green color in Figure 10. The application of the compensation wave to the data is shown in Figure 11. The base area of the shaft shown in green is cleaned of eccentricity. Subsequently, the eccentricity is manifested in the upper part of the shaft surface parallel to the plane XY. A comparison of uncompensated and compensated data is shown in Figure 12. The data ( ) is transformed by the transformation matrix given in Equation (10), wherein the input data A summary of the results from previous calculations is shown in Figure 10. The original sinusoid of the first harmonic component of the Fourier transform is shown in orange. A fitted sine wave with a phase shift of 0.26π is shown in red. The eccentricitysuppressing compensation wave with a phase shift of π in radians is shown in green color in Figure 10.  Table 2. The justification for the use of the Fourier transform is to obtain the phase shift of the first harmonic component. This is considered the first step in the calibration to remove the eccentricity that occurs in the data. The second step is the exact location of the simulated or calculated sinusoids to the actual recorded data. An example is shown in Figure 9. The scanned points are displayed in blue, and the first harmonic component is displayed in red, defined on the left vertical axis. The fitting of sinusoidal waves can be expressed as the average shift in the phase shifts of the individual points of the respective sinusoid (measured points and the first harmonic component). The phase shifts are calculated as the arc sine of each point. The offset of the measured points is shown in Figure 9 in light blue, and the displacement of the red sinusoid dots is shown by the orange dots. The difference between these shifts is shown by a black curve, which is averaged and shown in cyan color, i.e., by a phase shift of 0.26π of the first harmonic component of the Fourier transform from the real measured points. A summary of the results from previous calculations is shown in Figure 10. The original sinusoid of the first harmonic component of the Fourier transform is shown in orange. A fitted sine wave with a phase shift of 0.26π is shown in red. The eccentricitysuppressing compensation wave with a phase shift of π in radians is shown in green color in Figure 10. The application of the compensation wave to the data is shown in Figure 11. The base area of the shaft shown in green is cleaned of eccentricity. Subsequently, the eccentricity is manifested in the upper part of the shaft surface parallel to the plane XY. A comparison of uncompensated and compensated data is shown in Figure 12. The data ( ) is transformed by the transformation matrix given in Equation (10), wherein the input data The application of the compensation wave to the data is shown in Figure 11. The base area of the shaft shown in green is cleaned of eccentricity. Subsequently, the eccentricity is manifested in the upper part of the shaft surface parallel to the plane XY. A comparison of uncompensated and compensated data is shown in Figure 12. The data (D r ) is transformed by the transformation matrix given in Equation (10), wherein the input data is in the form of a 3-dimensional matrix K defined in Equation (5) and a number n expressing the number of rotations recorded in radians. The value of y max is the maximum value occurring in the matrix Y. In the case of uncompensated data, the eccentricity is visible through the outer reference circle. In the compensated data, the unification of the shaft base surface with the outer reference circle is visible.
Sensors 2022, 22, x FOR PEER REVIEW 10 of 15 is in the form of a 3-dimensional matrix K defined in Equation (5) and a number n expressing the number of rotations recorded in radians. The value of is the maximum value occurring in the matrix Y. In the case of uncompensated data, the eccentricity is visible through the outer reference circle. In the compensated data, the unification of the shaft base surface with the outer reference circle is visible.

Results
The primary goal of the process described in this article is to establish an automated calibration system focused on two primary tasks. The first is to convert points from the sensor coordinate system labeled S to the shaft coordinate system labeled C. The second is to record and remove the first harmonic component in the data, caused by the eccentricity between the shaft axis location and the rotary table axis. An eccentricity with an amplitude of 878.9 μm was recorded. The cleaned data are shown in Figure 13, where 90% of the data is in the range of ±100 μm. This image illustrates the second harmonic component corresponding to the cylindricality of a given part of the sensed shaft. Figure  14 shows a process based on shaft sensing and calibration automation. The correction parameters are generated and used in transforming the scanned gear point cloud to perform an inspection task of checking the correct geometric shape of the gear and finding

Results
The primary goal of the process described in this article is to establish an autom calibration system focused on two primary tasks. The first is to convert points from sensor coordinate system labeled S to the shaft coordinate system labeled C. The sec is to record and remove the first harmonic component in the data, caused by eccentricity between the shaft axis location and the rotary table axis. An eccentricity an amplitude of 878.9 μm was recorded. The cleaned data are shown in Figure 13, w 90% of the data is in the range of ±100 μm. This image illustrates the second harm component corresponding to the cylindricality of a given part of the sensed shaft. Fi 14 shows a process based on shaft sensing and calibration automation. The correc parameters are generated and used in transforming the scanned gear point clou perform an inspection task of checking the correct geometric shape of the gear and fin any defects on the surface of these gear wheels.

Results
The primary goal of the process described in this article is to establish an automated calibration system focused on two primary tasks. The first is to convert points from the sensor coordinate system labeled S to the shaft coordinate system labeled C. The second is to record and remove the first harmonic component in the data, caused by the eccentricity between the shaft axis location and the rotary table axis. An eccentricity with an amplitude of 878.9 µm was recorded. The cleaned data are shown in Figure 13, where 90% of the data is in the range of ±100 µm. This image illustrates the second harmonic component corresponding to the cylindricality of a given part of the sensed shaft. Figure 14 shows a process based on shaft sensing and calibration automation. The correction parameters are generated and used in transforming the scanned gear point cloud to perform an inspection task of checking the correct geometric shape of the gear and finding any defects on the surface of these gear wheels.

SW Parts of the Inspection System
The inspection system includes operations, as shown in Figure 15. There are functional parts that precede the experimental work, as has been mentioned. The SW solution consists of three basic blocks performing calibration functions, motion control, and sensor data processing. Calibration is the most comprehensive part of the software solution. For this reason, the improvement of calibration techniques and their implementation in the inspection represents a major contribution to the automation of the inspection.

SW Parts of the Inspection System
The inspection system includes operations, as shown in Figure 15. There are functional parts that precede the experimental work, as has been mentioned. The SW solution consists of three basic blocks performing calibration functions, motion control, and sensor data processing. Calibration is the most comprehensive part of the software solution. For this reason, the improvement of calibration techniques and their implementation in the inspection represents a major contribution to the automation of the inspection.

SW Parts of the Inspection System
The inspection system includes operations, as shown in Figure 15. There are functional parts that precede the experimental work, as has been mentioned. The SW solution consists of three basic blocks performing calibration functions, motion control, and sensor data processing. Calibration is the most comprehensive part of the software solution. For this reason, the improvement of calibration techniques and their implementation in the inspection represents a major contribution to the automation of the inspection.

Discussion
The design of this system is aimed at implementing new methods based on the development of sensory technology capable of creating 3D images of scanned objects and based on their ability to design innovative solutions, shorten and minimize preparatory work and efforts to automate more sophisticated tasks in practice. For subsequen evaluation of the processed data of a specific inspection task or measurement analysis or finding defects, it is necessary to design new methods of deep learning due to the complexity of recorded data and variations of variables that reduce data quality. The result of the eccentricity removal in an automated manner is shown in Figure 16.
Another goal will be the design of automated positioning technology for 3D laser scanners and the possibility of unifying multiple images from different laser scanners to further streamline inspection procedures.
The actual state of work deals with the term of automated and non-automatic solutions due to complications in points defining the base shaft surface (Figure 17). Upon first view, it is a trivial issue, but as learned through solving many complex situations, i is very complicated to develop a resistant and full-cognitive solution. Suitable solutions should be in machine learning algorithms such as clustering methods, but it is necessary to explore this issue more deeply. The second limitation of this study is the suppression of the parallelism of the laser beam (line) with the shaft axis. It was suppressed by setting up the device before scanning and dealing with the fixation device, which will replace the adjustable arm.

Discussion
The design of this system is aimed at implementing new methods based on the development of sensory technology capable of creating 3D images of scanned objects and, based on their ability to design innovative solutions, shorten and minimize preparatory work and efforts to automate more sophisticated tasks in practice. For subsequent evaluation of the processed data of a specific inspection task or measurement analysis or finding defects, it is necessary to design new methods of deep learning due to the complexity of recorded data and variations of variables that reduce data quality. The result of the eccentricity removal in an automated manner is shown in Figure 16.
Another goal will be the design of automated positioning technology for 3D laser scanners and the possibility of unifying multiple images from different laser scanners to further streamline inspection procedures.
The actual state of work deals with the term of automated and non-automatic solutions due to complications in points defining the base shaft surface (Figure 17). Upon first view, it is a trivial issue, but as learned through solving many complex situations, it is very complicated to develop a resistant and full-cognitive solution. Suitable solutions should be in machine learning algorithms such as clustering methods, but it is necessary to explore this issue more deeply. The second limitation of this study is the suppression of the parallelism of the laser beam (line) with the shaft axis. It was suppressed by setting up the device before scanning and dealing with the fixation device, which will replace the adjustable arm.

Conclusions
This paper provides a brief description of the gear inspection system and a d description of the automated calibration system solution. The basic pillar of the sy using laser sensors and their ability to 3D scan controlled surfaces with resolution i of micrometers, as shown in Table 1. The basic rationale is based on the diversity of and dimensions of gears and their functional surfaces, where unique hardware s are required to record functional surfaces or defined surfaces. Calibration is requi each change in the position of the laser sensor. This is due to the change in the m position of the S and C coordinate systems.
In the Introduction, the methods of solving sine wave fitting have been men This paper describes a sine fitting based on a method using a numpy library, wh well-paralleled computing method suitable for multicore CPUs.
A rotating shaft made of additive technology was used for calibration, wh tolerance bands are in the tenths of a millimeter, as seen in Figure 13. Due to the sc capabilities of the laser sensor used, it is more convenient to use a shaft made wit accuracy, as shown in Figure 17. It is due to the 2 nd harmonic component in the data repetitive patterns are visible in the visualization of differences between Figures 16B.

Conclusions
This paper provides a brief description of the gear inspection system and a detailed description of the automated calibration system solution. The basic pillar of the system is using laser sensors and their ability to 3D scan controlled surfaces with resolution in units of micrometers, as shown in Table 1. The basic rationale is based on the diversity of shapes and dimensions of gears and their functional surfaces, where unique hardware settings are required to record functional surfaces or defined surfaces. Calibration is required for each change in the position of the laser sensor. This is due to the change in the mutual position of the S and C coordinate systems.
In the Introduction, the methods of solving sine wave fitting have been mentioned. This paper describes a sine fitting based on a method using a numpy library, which is a well-paralleled computing method suitable for multicore CPUs.
A rotating shaft made of additive technology was used for calibration, where the tolerance bands are in the tenths of a millimeter, as seen in Figure 13. Due to the scanning capabilities of the laser sensor used, it is more convenient to use a shaft made with high accuracy, as shown in Figure 17. It is due to the 2 nd harmonic component in the data where repetitive patterns are visible in the visualization of differences between Figures 13 and  16B.

Conclusions
This paper provides a brief description of the gear inspection system and a detailed description of the automated calibration system solution. The basic pillar of the system is using laser sensors and their ability to 3D scan controlled surfaces with resolution in units of micrometers, as shown in Table 1. The basic rationale is based on the diversity of shapes and dimensions of gears and their functional surfaces, where unique hardware settings are required to record functional surfaces or defined surfaces. Calibration is required for each change in the position of the laser sensor. This is due to the change in the mutual position of the S and C coordinate systems.
In the Introduction, the methods of solving sine wave fitting have been mentioned. This paper describes a sine fitting based on a method using a numpy library, which is a well-paralleled computing method suitable for multicore CPUs.
A rotating shaft made of additive technology was used for calibration, where the tolerance bands are in the tenths of a millimeter, as seen in Figure 13. Due to the scanning capabilities of the laser sensor used, it is more convenient to use a shaft made with high accuracy, as shown in Figure 17

Data Availability Statement:
The data presented in this study are available upon request from the corresponding author.

Conflicts of Interest:
The authors declare no conflict of interest.