# Path Planning and Setup Orientation for Automated Dimensional Inspection Using Coordinate Measuring Machines

Authors: Osama Abdulhameed; Abdulrahman Al-Ahmari; Syed Hammad Mian; Mohamed K. Aboudaif
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

Inspection planning is considered an essential practice in the manufacturing industries because it ensures enhanced product quality and productivity. A reasonable inspection plan, which can reduce inspection costs and achieve high customer satisfaction, is therefore very important in the production industry. Considerations such as preparations for part inspection, measuring machines, and their setups as well as the measurement path are described in an inspection plan which is subsequently translated into part inspection machine language. Therefore, the measurement of any component using a coordinate measuring machine (CMM) is the final step preceded by several other procedures, such as the preparation of the part setup and the generation of the probe path. Effective measurement of components using CMM can only be done if the preceding steps are properly optimized to automate the whole inspection process. This paper has proposed a method based on artificial intelligence techniques, namely, artificial neural network (ANN) and genetic algorithm (GA), for fine-tuning output from the different steps to achieve an efficient inspection plan. A case study to check and validate the suggested approach for producing effective inspection plans for CMMs is presented. A decrease of nearly 50% was observed in the travel path of the probe, whereas the CMM measurement time was reduced by almost 25% during the actual component measurement. The proposed method yielded the optimum part setup and the most appropriate measuring sequence for the part considered.


---

## Body

## 1. Introduction

The inspection process has to be well defined and planned in order to address evolving consumer needs and increased production output. According to Moroni and Petro [1], an efficient and effective inspection system is always characterized by higher accuracy and lower cost. The reliability of an inspection process is a significant factor in maintaining the quality of production processes [2]. Although the measurement process is considered as an expensive exercise rather than a value-adding activity [2], it is still imperative to achieve the desired performance in the manufacturing system. Consequently, the requirements of stringent quality, as well as efficient inspection, emphasize the importance of new measurement methods and strategies. As a result, the establishment and development of proper techniques and optimized metrology procedures become critical for quality manufacturing.A significant emphasis has been placed on inspection methods, since its results are utilized for the control of production and design systems. Indeed, significant progress has been made to enhance the performance of inspection methods. For instance, the inspection planning strategy proposed by Cho and Kim [3] significantly reduced the inspection time and measurement errors for sculptured surfaces. These authors introduced various techniques, such as mean curvature analysis, to determine the locations of measurement points and a region selection ratio to optimize their distribution. Similarly, Li et al. [4] applied two algorithms, namely, the minimum orientation algorithm and the shortest path algorithm, to devise an inspection plan. A path planning model was also established by Han et al. [5] to minimize inspection time by estimating the detection direction of the probe. The ability of coordinate measuring machines (CMMs) to measure any part in a minimal amount of time is highly dependent on the development of an efficient inspection plan [6]. Therefore, an inspection plan that can limit the number of component setups and probe orientations, as well as the length of the inspection path, should be adopted for measurements using CMM. To achieve these objectives, Lu et al. [7] applied a genetic algorithm- (GA-) based technique and generated a collision-free measurement route for component inspection using CMM. According to Nasr et al. [8], setup planning is an impactful step in the effective implementation of an inspection plan. To demonstrate the importance of optimal setup procedures and minimize setup time, they introduced techniques based on graphical analysis and artificial neural networks (ANNs). Their proposed methods significantly reduced inspection time by minimizing the overall cycle time required for setup and probe changes. Similarly, Hwang et al. [6] developed a viable inspection strategy. In their research, they adopted a greedy heuristic approach and minimized the part setups and probe adjustments. They also employed a Hopfield neural network to identify the optimal inspection feature sequence. Chang and Lin [9] developed a methodology for the assessment of complex turbine blades. This technique focused on the generation of collision-free measurement paths for the five-axis CMM. Certainly, the primary objective of any inspection plan should be the minimization of inspection costs. The inspection costs may be associated with any of the following three factors: inspection time, effort, and precision. According to Moroni and Petro [10], any measurement can be associated with cost, where inspection costs are proportional to the time that is required to measure any given part.Typically, conventional inspection processes are frequently dominated by human factors in contrast to automated or intelligent systems. As a result of human intervention, the conventional measurement methods are error-prone and time-consuming and may involve unnecessary efforts that ultimately contribute to higher inspection costs. Therefore, the automation of the inspection planning process offers an excellent alternative to overcome the limitations of conventional measurements. In the case of a large number of similar components, the automation of the inspection plan can significantly reduce the inspection time [11]. The development of an automated inspection plan is based on three basic modules: a feature extraction module, a computer-aided inspection planning (CAIP) module, and a CMM module. The automated generation of an inspection plan requires the translation of all information, such as setup procedures, probe directions, and the measurement path, to an inspection plan table, which is subsequently converted into machine language for the final inspection operation. Concerning the automation of inspection planning to ensure both reduced inspection time and error-free measurements, a considerable amount of notable research has been performed. For example, Yang and Marefat [12] developed an object-oriented approach to integrating inspection methodology with the design and process planning of the manufacturing system. They determined the inspection entities using computer-aided design (CAD) information and applied a graph-based approach to decide the sensor settings. A breadth-first search and simulated annealing algorithms were proposed to optimize the inspection plan. Similarly, Lin and Murugappan [13] automated the processes of design, manufacturing, and inspection via the integration of CMM with CAD/computer-aided manufacturing (CAM). In this process, a CAD database was established to perform feature-based inspection planning. The authors generated a collision-free measurement path using the ray-tracing technique and the Dimensional Measurement Interface Standard (DMIS) for inspection on CMM. Cho and Seo [14] developed an inspection planning methodology by integrating CAD/CAM data into the computer-aided inspection (CAI) process. A strategy based on the determination of optimal measurement point locations and the minimization of probe movement distance was introduced to achieve the automation of the inspection process. Another illustration of the benefits of automated inspection planning was provided in a study by Sathi and Rao [15]. This effort, which integrated design and inspection, was comprised of three basic modules. The complete methodology commenced with the identification of surface features using geometric and product information that was related to the parts. Subsequently, setup planning, probe selection, and probe path planning were performed to generate the inspection plan. The cited studies demonstrate that the information regarding feature accessibility, probe selection, part setup [16–18], and measurement paths [19] is important for addressing issues associated with the generation of the automated and intelligent inspection plan. Furthermore, the CAIP trend has evolved significantly in the last few years due to the emergence of Industry 4.0. Although the ultimate goal of CAIP research remains the same, the scope and focus of the research have undergone significant amendments over time. A range of unique CAIP solutions has reportedly been established. Nonetheless, there are indeed unresolved issues in realizing an automated or intelligent inspection strategy. CMM inspection planning is a time-consuming operation, even for skilled engineers, and the absence of sufficient information inhibits the automation of the task. The deficiency of adequately structured methodology for the generation of intelligent inspection plan is a challenge. The intelligent planning for evaluation of components with intricate geometry utilizing CMM remains a key obstacle in the current fourth industrial revolution.An automated and intelligent system that seeks to integrate various stages of the inspection process and achieve efficient measurement using artificial intelligence (AI) techniques has been presented. This work has focused on the minimization of part and probe reorientation as well as optimization of the inspection path to generate CMM part programs. The appropriate geometric data are extracted from the Standard for the Exchange of Product Data (STEP) file and consolidated with the prescribed tolerance data. The automation of the collection, analysis, and processing of input data is not the priority of the present work. Rather, part setup and inspection path planning are the main goal of this research. The AI tools can have a meaningful effect on the enactment of CAIP systems in the era of Industry 4.0. The exploitation of AI techniques in the generation of CAIP includes not only a knowledge base and expert systems but also metaheuristics and neural techniques. The application of CMMs in the manufacturing industry is extensive and ubiquitous. Despite this, inspection planning for a CMM, particularly by using AI techniques, is not well documented. This work has demonstrated an intelligent method for component setup and probe path planning for inspection of parts on a CMM. A systematic methodology is implemented for the optimization of inspection planning leveraging AI approaches. This procedure would reduce the measurement time and increase flexibility and control through minimal human intervention in the mechanism of building up analysis and inspection planning. Henceforth, the execution of AI tools based on ANN and GA to carry out the inspection planning is presented and discussed. This research is based on the novel methodology of defining probe accessibility directions (PADs) and obtains the optimal part setup using ANN. The application of ANN in the context of component setups is still in the preliminary phase. This study offers a valuable insight into the application of ANN methodology for part setup in inspection planning of CMM. The GA is also used in addition to ANN to create an optimal inspection path. The GA is preferred to optimize the path between features as well as the inspection points within the features. The capability of GAs resides in the collaborative usage of various genetic operators (selection, crossover, and mutation). The advantage of AI techniques in CAIP is that they provide the self-learning functionality to the inspection path planning.


## 2. Literature Review

The inspection of any mechanical part on CMM requires appropriate planning. It is because an effective inspection plan can significantly minimize cost in terms of both inspection time and effort. Nasr et al. [20] presented an efficient and systematic procedure for generating the necessary CMM measurement and inspection plans. They have also described the difficulties that can arise during the translation of design information into a set of inspection instructions. These problems can be addressed via the effective integration of CAD, CAIP, and CMM systems, which require appropriate decisions regarding the optimal part setup, probe orientations, and inspection sequences. An inspection plan comprises all decisions regarding probe features, probe selection and orientation, part setup, measurement sequences, and collision avoidance [17]. According to Kweon and Medeiros [21], the total process of inspection planning can be segregated into two stages: high-level inspection planning and low-level inspection planning. A high-level inspection scheme involves tasks such as the determination of optimal part setup as well as probe preference and orientation, whereas a low-level inspection strategy consists of determining the number of measurement points and their locations as well as the optimal measurement path. Since the inspection capabilities of CMM—including measurement time, cost, and accuracy—are strongly influenced by the inspection plan, proper inspection planning is critical for achieving effective and efficient measurement results [22]. An effective inspection plan ensures reduced inspection time as well as enhanced consistency and reliability of the measurement results.As shown in Figure1, many activities must be performed prior to inspection using CMM. Numerous studies have been conducted to investigate the various stages of inspection planning systems. For example, Kweon and Medeiros [21] employed the concept of visibility maps and proposed a methodology for setup planning using a CMM inspection. Similarly, Limaiem and El-Maraghy [23] integrated accessibility analysis, probe selection and orientation, and measurement point sequencing for automated inspection planning. In their approach, the ray-tracing algorithm was employed to achieve accessibility analysis as well as clustering and sequencing of measurement points. Qu et al. [24] observed that the measurement of turbine blades or other machine parts with curved surfaces was a time-consuming process resulting in low productivity. Therefore, they proposed a methodology based on GA to optimize the inspection path and demonstrated that optimized operations can reduce the total measurement time by almost one-third. The results concluded that every stage is important in the development of an appropriate inspection plan for a CMM. However, part setup and inspection path planning have been identified as critical factors that significantly affect both inspection time and CMM measurement accuracy.Figure 1
Inspection planning system [6, 21].Although these subjects have been discussed to a significant degree in previous studies, most of these analyses have focused on simple or standard parts. There is a scarcity of efforts which have reported setup planning, especially using ANN and the inspection path planning for the real mechanical parts. For instance, Yau and Menq [25] elaborated on the path planning strategies but did not consider the part setup planning which is also necessary for the generation of the automated inspection plan. Similarly, Mian and Al-Ahmari [26] addressed various metaheuristic algorithms to demonstrate their efficacy in reducing the inspection time through ideal path planning. However, they also did not consider setup planning and did not take into account the distance between inspection points within the feature. They defined the objective function only depending on the distance between features and overlooked the path planning in each feature. Park et al. [27] also devised an effective strategy for the automation of optical inspection machines. They determined the inspection clusters and the suitable measurement path but did not address the part setup planning. Similarly, Zhao et al. [28] and Mohib et al. [29] provided an excellent strategy to integrate sensors for automated dimensional inspection but did not report the strategy for part setup. Hence, this study focuses on the determination of an appropriate inspection path and an optimal part setup which are necessary for the generation of an automated inspection plan. Recently, Tsagaris and Mansour [30] developed a hybrid path-optimization algorithm based on ant colony optimization (ACO) and GA and reduced the inspection time by 50%, in comparison to the general GA procedure. Optimization algorithms derived from matrix relaxation technique and nearest neighbor approach were executed by Teodor et al. [31] for car body parts. They achieved a 10% improvement and 20% enhancement, respectively, in contrast to the routes acquired with commercial programs. The ACO algorithm implemented by Han et al. [32] along with the new space collision detection algorithm obtained the optimal path more efficiently than the standard ACO. Moreover, the adaptive-group-based differential evolution model by Lin and Lin [33] exhibited a satisfactory inspection path (29.9%) in contrast to the manual measuring route scheme under multiple workpiece inspection points.A significant work based on different algorithms for inspection path planning has been reported in the literature. They point at the significance of optimizing the inspection plan. The optimized inspection plan is the one that attains the minimum travel path as well as the part setup with probe accessibility to maximum features. Certainly, the optimization of the inspection plan has been a subject of intense research. Furthermore, the part setup and inspection path planning have been identified as critical factors that significantly affect both inspection time and CMM measurement accuracy. Although these topics have been explored to a considerable degree in earlier studies, the majority of these studies have focused on basic or generic components. There is a scarcity of efforts which have reported setup planning, especially using AI tools such as ANN. Interestingly, the previous studies did not consider setup planning extensively and did not take into account the distance between inspection points within the feature. Indeed, they defined the objective function only depending on the distance between features and underestimated the path planning within each feature. Therefore, this work has employed the combination of AI techniques, namely, ANN and GA, to achieve reliable and efficient inspection through appropriate setup planning and measurement path. This work seeks to acquire an intelligent and automated system that can integrate various stages of the inspection process and achieve efficient measurement.


## 3. Methodology

Although an inspection planning system comprises many modules, this work focuses only on the part setup planning and determination of the optimal measurement sequence. The suggested approach as shown in Figure2 is demonstrated using a real mechanical part. The part in this investigation was the car gearbox (with four-speed and reverse transaxle) shown in Figure 3.Figure 2
Steps of the suggested approach.Figure 3
Clustering of features.For the measurement of a given part, all the features having the identical PADs were clustered as the features of the left cluster, front cluster, and top cluster (refer to Figure3). This clustering resulted in the simultaneous measurement of all features without the need for any change in the part setup or probe. For the efficient measurement of each cluster, an appropriate inspection path must be determined. Certainly, intelligent setup planning and probe accessibility analysis can guarantee an optimal setup, which minimizes the time that is required for setup and probe orientation.A contact probe (diameter: 3 mm) loaded on the bridge type CMM (courtesy: Zeiss) shown in Figure4 was employed to inspect the test part. The precision of medium-size CMM utilized in this research is 1.6 + L/333 μm, which is DIN EN ISO 10360-2:2001 compliant. Besides, this device can handle workpieces ranging up to 1200 mm × 900 mm × 700 mm.Figure 4
CMM setup used in the investigation.


### 3.1. Part Setup Planning

Changes and reorientation of the probe, as well as related recalibration and configuration, are costly operations [23]. AI techniques, such as ANN, have rarely been employed in comparison to other techniques for setup planning. Only a few studies can be listed out in the literature which have used ANN for setup planning in CMM measurements. In this study, an ANN based on the backpropagation algorithm was applied to establish the relationship between input parameters—such as PADs and part features—and the optimal part setup. In this study, the setup in which the bottom surface served as the base face was referred to as the bottom setup. The setup in which the left surface served as the base face was defined as the left setup, and so on, as shown in Figure 5.Figure 5
Different setups for the gearbox.ANN assists in predicting the optimal setups for high feature accessibility. In an ANN, output and input layers are generated to produce network outputs depending on various input combinations. The hidden layers that connect the input layers to the output layers are expanded to carry the optimum number of nodes; each of these nodes consists of neurons. A neural network is trained on a set of training data; this network is validated using validation data. Once training is complete, the neural network can be employed to estimate the output values for the specified input values based on testing data. For the problem described in this paper, the set of inputs was classified as follows:(i)
Geometric extraction entities: entities derived from extraction and recognition files included the numbers of vertices, line edges, circular edges, internal loops, external loops, concave faces, and convex faces.(ii)
PADs of features for various setups [18]: features that had the same PADs in different setups were used as another input. The total number of features that were accessible from a given probe direction in all possible setups was calculated using the k × n matrix depicted in Figure 6.Figure 6
PAD matrix.K denotes rows count in the PAD matrix (equal to the number of setups, i.e., right, left, front, rear, top, and bottom).N denotes number of columns (equal to the number of PADs, i.e., +x, −x, +y, −y, +z, and −z).Fsj denotes number of features that were accessible from a given PAD for a given setup (e.g., FR1 represents the count of features that can be accessed from the +x direction when the part is in the right setup).The +z direction cannot be accessed when the part is fixed on the CMM. Therefore, all +z direction values were set to zero, which yielded the final PAD matrix shown in Figure 7.Figure 7
Final PAD matrix.In the final matrix (refer to Figure7), the summation of each PADj column provided the total number of features that could be accessed in various setups Si using the same PADj. These PAD values represented one of the inputs to the ANN. The PAD inputs represented the total count of features that could be accessed from the +x direction, the −x direction, the +y direction, the −y direction, and the −z direction. The output layer contained six nodes, including the bottom setup, the top setup, the front setup, the rear setup, the left setup, and the right setup.


### 3.2. Probe Path Generation

The proposed GA for inspection path planning commenced with the generation of random solutions (also known as chromosomes). As seen in Figure8, the contact points (or measurement points) were defined based on the objective function to guarantee the smallest route between the measured features.Figure 8
Probe path planning depending on the objective function.Step 1.
Random solutions (chromosomes)The measured features were initially clustered depending on the generated random solution (chromosome). Subsequently, the contact point coordinates (input) were restructured to attain the smallest path between the features. It is possible to define the objective function as(1)Mini=1nMinj=1mxi−xj2+yi−yj2+zi−zj2,wherei is first contact point of the first sequenced feature, j is first contact point of the next sequenced feature, n is count of contact point coordinates of the last sequenced feature, and m is count of contact point coordinates of the next sequenced feature.Step 2.
Estimation of the fitness function for each chromosomeThe fitness function can be expressed as the overall shortest path among two sequenced features. The objective function can be established as(2)∑k=1PMini=RRMinj=1m=1xR−xj2+yR−yj2+zR−zj2,wherei is first contact point of the first sequenced feature, j is first contact point of the next sequenced feature, n is count of contact points coordinates of the last sequenced feature, m is count of contact point coordinates of the next sequenced feature, and P is contact of sequenced features.Examples are provided as follows:First chromosome sequenceFitness function of chromosome = 857.79.Second chromosome sequenceFitness function of chromosome = 771.38.Third chromosome sequenceFitness function of chromosome = 873.10.The values 8, 10, 4, and so on represent measurement features.Step 3.
Crossover and mutationThe crossover and mutation operators can be explained as follows:1-2 and 2-1 crossover sequences.1st chromosome.2nd chromosome.1-2 crossover sequence.Fitness function of chromosome = 908.98.2-1 crossover sequence.Fitness function of chromosome = 835.98.3-4 and 4-3 crossover sequences.3rd chromosome sequence.4th chromosome sequence.3-4 crossover sequence.Fitness function of chromosome = 881.48.4-3 crossover sequence.Fitness function of chromosome = 774.59.Mutation operator.Initial chromosome sequence.After mutation operation.Step 4.
Stopping criterion
The maximum number of iterations was the stopping criterion adopted in this investigation. This stopping criterion was embraced as it allowed monitoring the processing time as well as suppressing any biases. Various values for the maximum number of iterations were tested as the stopping criteria: 50, 100, 500, 1000, 2000, and 5000 (refer to Figure9). The maximum number of iterations can be increased to achieve the desired balance between the processor run time and the accuracy of the solution.
In this research, the GA was embraced for path planning because it manifests inherent parallelism and is a good technique to solve complex problems of optimization. The GA can be easily adjusted and adapted to various problems. Compared with other heuristics, the likelihood of exploration of the search window in GA is very high. It explores massive search space; that is, it can search in diverse and vast solution space. Likewise, ANN also has many benefits; for example, it has the potential to learn on its own and generate output that is not confined to the input it acquires. The input is located in its networks instead of a database; thus, the loss of information does not impact its functioning. When a similar occurrence happens, these networks will learn from instances, thus causing ANN to work through real-time events. In parallel architectures, ANN can perform several tasks without compromising the performance of the system. This dramatically decreases the processing time compared to other algorithms.Figure 9
Performance of GA at different maximum numbers of iterations.
(a)(b)(c)(d)(e)(f)


## 3.1. Part Setup Planning

Changes and reorientation of the probe, as well as related recalibration and configuration, are costly operations [23]. AI techniques, such as ANN, have rarely been employed in comparison to other techniques for setup planning. Only a few studies can be listed out in the literature which have used ANN for setup planning in CMM measurements. In this study, an ANN based on the backpropagation algorithm was applied to establish the relationship between input parameters—such as PADs and part features—and the optimal part setup. In this study, the setup in which the bottom surface served as the base face was referred to as the bottom setup. The setup in which the left surface served as the base face was defined as the left setup, and so on, as shown in Figure 5.Figure 5
Different setups for the gearbox.ANN assists in predicting the optimal setups for high feature accessibility. In an ANN, output and input layers are generated to produce network outputs depending on various input combinations. The hidden layers that connect the input layers to the output layers are expanded to carry the optimum number of nodes; each of these nodes consists of neurons. A neural network is trained on a set of training data; this network is validated using validation data. Once training is complete, the neural network can be employed to estimate the output values for the specified input values based on testing data. For the problem described in this paper, the set of inputs was classified as follows:(i)
Geometric extraction entities: entities derived from extraction and recognition files included the numbers of vertices, line edges, circular edges, internal loops, external loops, concave faces, and convex faces.(ii)
PADs of features for various setups [18]: features that had the same PADs in different setups were used as another input. The total number of features that were accessible from a given probe direction in all possible setups was calculated using the k × n matrix depicted in Figure 6.Figure 6
PAD matrix.K denotes rows count in the PAD matrix (equal to the number of setups, i.e., right, left, front, rear, top, and bottom).N denotes number of columns (equal to the number of PADs, i.e., +x, −x, +y, −y, +z, and −z).Fsj denotes number of features that were accessible from a given PAD for a given setup (e.g., FR1 represents the count of features that can be accessed from the +x direction when the part is in the right setup).The +z direction cannot be accessed when the part is fixed on the CMM. Therefore, all +z direction values were set to zero, which yielded the final PAD matrix shown in Figure 7.Figure 7
Final PAD matrix.In the final matrix (refer to Figure7), the summation of each PADj column provided the total number of features that could be accessed in various setups Si using the same PADj. These PAD values represented one of the inputs to the ANN. The PAD inputs represented the total count of features that could be accessed from the +x direction, the −x direction, the +y direction, the −y direction, and the −z direction. The output layer contained six nodes, including the bottom setup, the top setup, the front setup, the rear setup, the left setup, and the right setup.


## 3.2. Probe Path Generation

The proposed GA for inspection path planning commenced with the generation of random solutions (also known as chromosomes). As seen in Figure8, the contact points (or measurement points) were defined based on the objective function to guarantee the smallest route between the measured features.Figure 8
Probe path planning depending on the objective function.Step 1.
Random solutions (chromosomes)The measured features were initially clustered depending on the generated random solution (chromosome). Subsequently, the contact point coordinates (input) were restructured to attain the smallest path between the features. It is possible to define the objective function as(1)Mini=1nMinj=1mxi−xj2+yi−yj2+zi−zj2,wherei is first contact point of the first sequenced feature, j is first contact point of the next sequenced feature, n is count of contact point coordinates of the last sequenced feature, and m is count of contact point coordinates of the next sequenced feature.Step 2.
Estimation of the fitness function for each chromosomeThe fitness function can be expressed as the overall shortest path among two sequenced features. The objective function can be established as(2)∑k=1PMini=RRMinj=1m=1xR−xj2+yR−yj2+zR−zj2,wherei is first contact point of the first sequenced feature, j is first contact point of the next sequenced feature, n is count of contact points coordinates of the last sequenced feature, m is count of contact point coordinates of the next sequenced feature, and P is contact of sequenced features.Examples are provided as follows:First chromosome sequenceFitness function of chromosome = 857.79.Second chromosome sequenceFitness function of chromosome = 771.38.Third chromosome sequenceFitness function of chromosome = 873.10.The values 8, 10, 4, and so on represent measurement features.Step 3.
Crossover and mutationThe crossover and mutation operators can be explained as follows:1-2 and 2-1 crossover sequences.1st chromosome.2nd chromosome.1-2 crossover sequence.Fitness function of chromosome = 908.98.2-1 crossover sequence.Fitness function of chromosome = 835.98.3-4 and 4-3 crossover sequences.3rd chromosome sequence.4th chromosome sequence.3-4 crossover sequence.Fitness function of chromosome = 881.48.4-3 crossover sequence.Fitness function of chromosome = 774.59.Mutation operator.Initial chromosome sequence.After mutation operation.Step 4.
Stopping criterion
The maximum number of iterations was the stopping criterion adopted in this investigation. This stopping criterion was embraced as it allowed monitoring the processing time as well as suppressing any biases. Various values for the maximum number of iterations were tested as the stopping criteria: 50, 100, 500, 1000, 2000, and 5000 (refer to Figure9). The maximum number of iterations can be increased to achieve the desired balance between the processor run time and the accuracy of the solution.
In this research, the GA was embraced for path planning because it manifests inherent parallelism and is a good technique to solve complex problems of optimization. The GA can be easily adjusted and adapted to various problems. Compared with other heuristics, the likelihood of exploration of the search window in GA is very high. It explores massive search space; that is, it can search in diverse and vast solution space. Likewise, ANN also has many benefits; for example, it has the potential to learn on its own and generate output that is not confined to the input it acquires. The input is located in its networks instead of a database; thus, the loss of information does not impact its functioning. When a similar occurrence happens, these networks will learn from instances, thus causing ANN to work through real-time events. In parallel architectures, ANN can perform several tasks without compromising the performance of the system. This dramatically decreases the processing time compared to other algorithms.Figure 9
Performance of GA at different maximum numbers of iterations.
(a)(b)(c)(d)(e)(f)


## 4. Results and Analysis

The results for the gearbox using the GA and ANN are discussed in this section. These algorithms were implemented using MATLAB software on a machine with Intel Core i7 2.66 GHz CPU and 8 GB RAM. Outputs were recorded in terms of part setup and distance estimation for inspection sequence.


### 4.1. Setup Planning for a Gearbox

There was one hidden layer in the network which contained different numbers of nodes depending on the type of problem. For the gearbox considered in this paper, this layer contained seven nodes. The output of any ANN model is profoundly affected by the network properties, namely, the number of hidden layers and the number of neurons in each hidden layer. Therefore, a trial-and-error method was applied to explore the possibilities for the count of the hidden layers and the count of neurons. In order to achieve the best practicable outcome, multiple training experiments were conducted with various numbers of hidden neurons, learning rates, and momentum values. 83% of the data set was chosen for training, whereas the residual 17% was selected for testing and confirmation of the network structure. The structure of the ANN that was utilized in setup planning is illustrated in Figure10, and the learning progress of this network for setup planning is detailed in Figure 11. The network with one hidden layer and seven neurons, an input layer with twelve neurons, and an output layer with six neurons provided the best performance. The learning graph indicates the number of the input nodes (12), hidden nodes (7), output nodes (6), and weights. The learning progress graph also demonstrates the maximum, average, and minimum training errors as well as the average validation error. A maximum number of 7600000 learning cycles can be viewed on this graph. The validation and scoring results are displayed when the count of validated examples is ten and the validation percentage is almost 80%.Figure 10
Topological structure of the backpropagation neural network for setup planning.Figure 11
Learning progress.The PAD matrix that was constructed for the gearbox is shown in Table1. This PAD matrix was employed as one of the inputs to the ANN and determined optimal setup for the gearbox inspection using CMM.Table 1
PAD matrix for the gearbox.
Setups/no. of featuresPAD matrixTotal in +xTotal in −xTotal in +yTotal in −yTotal in −zBottom17171000Top17170100Front1717000Rear1717000Left0010017Right000100Total6868202017The importance value of an input node is the aggregate of the absolute weights of the connections from this node to all nodes in the first hidden layer. In Figure12, the various inputs are arranged in decreasing order of importance, from the most significant input to the least significant input. The results concluded that the PAD that represented the −z direction was the most important input to the ANN for the considered part.Figure 12
Importance of various inputs.A sensitivity analysis was also performed to verify the extent to which an output varied as a result of changes in the input values. Each input was independently increased from its smallest value to its largest value in this process, while the remaining inputs were fixed to their median values.The variation in each output was estimated as each input was increased to determine the output’s sensitivity to changes in this input. After observing the ANN outputs (refer to Table2), the bottom setup was selected for the considered part. Therefore, the gearbox was fixed on the CMM table with its bottom surface as the base face for the final inspection. In this setup, the maximum number of features on the gearbox could be inspected without any change in the probe orientation, part positioning, or fixture design. Thus, significant time, effort, and cost were reduced via the application of ANN that determined the optimal setup for the gearbox inspection. However, when it is impossible to measure all features in a particular setup (or one setup), the following strategy can be adopted. Firstly, the maximum number of features that can be measured using a given probe orientation and part positioning are inspected. Subsequently, the ANN should be executed for the remaining features to attain a new part position or setup. This process of implementing ANN has to be repeated until all the features on the part are successfully measured. Moreover, this approach for setup planning involved only six PADs in this work. It is because, for the part considered in this investigation (gearbox), six PADs were sufficient to cover all the concerned features. Nonetheless, this procedure can be escalated to analyze a higher number of PADs. Indeed, the number of PADs to be used depends on several factors: part complexity, number of features on each face and their orientations, and so forth.Table 2
ANN inputs and corresponding outputs.
CasesInputsOutput setupsNo. of verticesNo. of line edgesNo. of circular edgesNo. of internal loopsNo. of external loopsNo. of concave facesNo. of convex facesTotal in +xTotal in -xTotal in +yTotal in -yTotal in -zBottomTopFrontRearLeftRightCase #1176224802928663030262628231925252424Case #2649600342682020242422221418181919Case #396112324544863737353539293430303030Case #480883284227152222343428212123232626Case #511213632105845133937323636272533323132::::::::::::::::::::::::::::::::::::::GEAR L-20031021494372732140211973986868202017585822491412


### 4.2. Inspection Path for the Gearbox

The maximum number of iterations of 500 produced the optimal result for the left cluster features. The length of the obtained probe path with this maximum number of iterations was 777.38 mm. As illustrated in Table3, the probe’s travel distance between two features dropped with the growing count of iterations. It was stabilized after 500 generations, and no further change in the distance was noticed with an increment in the count of iterations. Since the results acquired at 1000 and 2000 (number of generations) were the same as those of 500 (number of generations), the sequence obtained at a number of generations of 500 was selected as optimal. Moreover, if the number of generations was increased further to more than 2000, the optimal sequence would have remained the same.Table 3
Outcome of GA implementation for the left cluster features.
Case no.No. of generationsProbe travelling path (mm)Genetic algorithm sequencesCMM running time (minutes)CPU time (seconds)Before GAAfter GABefore GAAfter GAFeatures of left cluster501520.411152.5812-4-8-7-6-14-11-2-5-10-13-15-16-3-9-110.387.72203.76100869.289-13-5-2-7-6-4-8-10-11-14-3-15-16-1-12415.8200832.5712-4-6-7-2-5-8-10-13-11-16-14-3-15-9-1800.12500777.3812-4-8-6-7-2-5-10-13-11-16-15-3-14-9-12044.81000777.3812-4-8-6-7-2-5-10-13-11-16-15-3-14-9-140592000777.3812-4-8-6-7-2-5-10-13-11-16-15-3-14-9-17595.3Thus, the optimal sequence derived from the GA was (12-4-8-6-7-2-5-10-13-11-16-15-3-14-9-1), which contributed to the least probe travel distance of 777.38 mm amongst all features. At first, the probe moving distance was 1520.41 mm when the measurement route was arbitrarily chosen and the CMM operating time was 10 min 23 s. However, the probe travel path decreased by 48.87% from 1520.41 to 777.38 mm after the deployment of GA, while, the operating time of CMM was substantially reduced from 10 min 23 s to 7 min 43 s. A time decline of almost 25.69% was reported during the real measurement of the part on CMM. While the processor time also grew with a rise in the number of iterations, this rise was marginal in contrast to the decrease in the CMM operation time.A maximum number of iterations of 200 achieved the optimal outcome for the front cluster features. The length of the acquired probe path was 617.23 mm with this maximum number of iterations. As presented in Table4, the probe’s moving distance between the features declined with a surge in the number of iterations. It, however, stabilized after 200 iterations, and no more difference in the probe distance was noticed with a rise in the number of iterations. For example, when the GA was repeated at 500, 1000, and 2000 (number of generations), the outcome remained the same. The optimal sequence achieved from the GA for front cluster features was (5-6-3-7-10-1-9-8-2-4), which led to the least probe moving distance of 617.23 mm among all features. Likewise, in this instance, the traveling distance was 1007.3 mm and the CMM operating time was 6 min 32 s when the inspection path was specified randomly. After the implementation of GA, the probe path was minimized to 617.23 mm, and the CMM operation time was reduced to 4 min and 19 s. The GA application, therefore, reduced the probe travel path by 38.72% and accomplished a time reduction of approximately 33.92% during the actual inspection of the component. Note that the probe traveling sequences are different for numbers of generations of 200 and 500 in Table 4, although the distance is the same. The two sequences are only the reverse of each other; that is, the starting point is different. The sequence (5-6-3-7-10-1-9-8-2-4) is starting from feature 5 and ending at feature 4, while the sequence (4-2-8-9-1-10-7-3-6-5) is starting from feature 4 and ending at feature 5. Therefore, either of the two sequences could be selected for the minimum traveling path during the inspection of front cluster features.Table 4
Outcome of GA application for the front cluster features.
Case no.No. of generationsProbe travelling path (mm)Genetic algorithm sequencesCMM running time (minutes)CPU time (seconds)Before GAAfter GABefore GAAfter GAFeatures of front cluster501007.3745.425-6-3-2-8-9-1-10-7-46.534.32131.13100674.747-4-5-6-3-2-8-9-1-10262.09200617.235-6-3-7-10-1-9-8-2-4521.88500617.234-2-8-9-1-10-7-3-6-5863.141000617.235-6-3-7-10-1-9-8-2-41706.72000617.235-6-3-7-10-1-9-8-2-43641.7


## 4.1. Setup Planning for a Gearbox

There was one hidden layer in the network which contained different numbers of nodes depending on the type of problem. For the gearbox considered in this paper, this layer contained seven nodes. The output of any ANN model is profoundly affected by the network properties, namely, the number of hidden layers and the number of neurons in each hidden layer. Therefore, a trial-and-error method was applied to explore the possibilities for the count of the hidden layers and the count of neurons. In order to achieve the best practicable outcome, multiple training experiments were conducted with various numbers of hidden neurons, learning rates, and momentum values. 83% of the data set was chosen for training, whereas the residual 17% was selected for testing and confirmation of the network structure. The structure of the ANN that was utilized in setup planning is illustrated in Figure10, and the learning progress of this network for setup planning is detailed in Figure 11. The network with one hidden layer and seven neurons, an input layer with twelve neurons, and an output layer with six neurons provided the best performance. The learning graph indicates the number of the input nodes (12), hidden nodes (7), output nodes (6), and weights. The learning progress graph also demonstrates the maximum, average, and minimum training errors as well as the average validation error. A maximum number of 7600000 learning cycles can be viewed on this graph. The validation and scoring results are displayed when the count of validated examples is ten and the validation percentage is almost 80%.Figure 10
Topological structure of the backpropagation neural network for setup planning.Figure 11
Learning progress.The PAD matrix that was constructed for the gearbox is shown in Table1. This PAD matrix was employed as one of the inputs to the ANN and determined optimal setup for the gearbox inspection using CMM.Table 1
PAD matrix for the gearbox.
Setups/no. of featuresPAD matrixTotal in +xTotal in −xTotal in +yTotal in −yTotal in −zBottom17171000Top17170100Front1717000Rear1717000Left0010017Right000100Total6868202017The importance value of an input node is the aggregate of the absolute weights of the connections from this node to all nodes in the first hidden layer. In Figure12, the various inputs are arranged in decreasing order of importance, from the most significant input to the least significant input. The results concluded that the PAD that represented the −z direction was the most important input to the ANN for the considered part.Figure 12
Importance of various inputs.A sensitivity analysis was also performed to verify the extent to which an output varied as a result of changes in the input values. Each input was independently increased from its smallest value to its largest value in this process, while the remaining inputs were fixed to their median values.The variation in each output was estimated as each input was increased to determine the output’s sensitivity to changes in this input. After observing the ANN outputs (refer to Table2), the bottom setup was selected for the considered part. Therefore, the gearbox was fixed on the CMM table with its bottom surface as the base face for the final inspection. In this setup, the maximum number of features on the gearbox could be inspected without any change in the probe orientation, part positioning, or fixture design. Thus, significant time, effort, and cost were reduced via the application of ANN that determined the optimal setup for the gearbox inspection. However, when it is impossible to measure all features in a particular setup (or one setup), the following strategy can be adopted. Firstly, the maximum number of features that can be measured using a given probe orientation and part positioning are inspected. Subsequently, the ANN should be executed for the remaining features to attain a new part position or setup. This process of implementing ANN has to be repeated until all the features on the part are successfully measured. Moreover, this approach for setup planning involved only six PADs in this work. It is because, for the part considered in this investigation (gearbox), six PADs were sufficient to cover all the concerned features. Nonetheless, this procedure can be escalated to analyze a higher number of PADs. Indeed, the number of PADs to be used depends on several factors: part complexity, number of features on each face and their orientations, and so forth.Table 2
ANN inputs and corresponding outputs.
CasesInputsOutput setupsNo. of verticesNo. of line edgesNo. of circular edgesNo. of internal loopsNo. of external loopsNo. of concave facesNo. of convex facesTotal in +xTotal in -xTotal in +yTotal in -yTotal in -zBottomTopFrontRearLeftRightCase #1176224802928663030262628231925252424Case #2649600342682020242422221418181919Case #396112324544863737353539293430303030Case #480883284227152222343428212123232626Case #511213632105845133937323636272533323132::::::::::::::::::::::::::::::::::::::GEAR L-20031021494372732140211973986868202017585822491412


## 4.2. Inspection Path for the Gearbox

The maximum number of iterations of 500 produced the optimal result for the left cluster features. The length of the obtained probe path with this maximum number of iterations was 777.38 mm. As illustrated in Table3, the probe’s travel distance between two features dropped with the growing count of iterations. It was stabilized after 500 generations, and no further change in the distance was noticed with an increment in the count of iterations. Since the results acquired at 1000 and 2000 (number of generations) were the same as those of 500 (number of generations), the sequence obtained at a number of generations of 500 was selected as optimal. Moreover, if the number of generations was increased further to more than 2000, the optimal sequence would have remained the same.Table 3
Outcome of GA implementation for the left cluster features.
Case no.No. of generationsProbe travelling path (mm)Genetic algorithm sequencesCMM running time (minutes)CPU time (seconds)Before GAAfter GABefore GAAfter GAFeatures of left cluster501520.411152.5812-4-8-7-6-14-11-2-5-10-13-15-16-3-9-110.387.72203.76100869.289-13-5-2-7-6-4-8-10-11-14-3-15-16-1-12415.8200832.5712-4-6-7-2-5-8-10-13-11-16-14-3-15-9-1800.12500777.3812-4-8-6-7-2-5-10-13-11-16-15-3-14-9-12044.81000777.3812-4-8-6-7-2-5-10-13-11-16-15-3-14-9-140592000777.3812-4-8-6-7-2-5-10-13-11-16-15-3-14-9-17595.3Thus, the optimal sequence derived from the GA was (12-4-8-6-7-2-5-10-13-11-16-15-3-14-9-1), which contributed to the least probe travel distance of 777.38 mm amongst all features. At first, the probe moving distance was 1520.41 mm when the measurement route was arbitrarily chosen and the CMM operating time was 10 min 23 s. However, the probe travel path decreased by 48.87% from 1520.41 to 777.38 mm after the deployment of GA, while, the operating time of CMM was substantially reduced from 10 min 23 s to 7 min 43 s. A time decline of almost 25.69% was reported during the real measurement of the part on CMM. While the processor time also grew with a rise in the number of iterations, this rise was marginal in contrast to the decrease in the CMM operation time.A maximum number of iterations of 200 achieved the optimal outcome for the front cluster features. The length of the acquired probe path was 617.23 mm with this maximum number of iterations. As presented in Table4, the probe’s moving distance between the features declined with a surge in the number of iterations. It, however, stabilized after 200 iterations, and no more difference in the probe distance was noticed with a rise in the number of iterations. For example, when the GA was repeated at 500, 1000, and 2000 (number of generations), the outcome remained the same. The optimal sequence achieved from the GA for front cluster features was (5-6-3-7-10-1-9-8-2-4), which led to the least probe moving distance of 617.23 mm among all features. Likewise, in this instance, the traveling distance was 1007.3 mm and the CMM operating time was 6 min 32 s when the inspection path was specified randomly. After the implementation of GA, the probe path was minimized to 617.23 mm, and the CMM operation time was reduced to 4 min and 19 s. The GA application, therefore, reduced the probe travel path by 38.72% and accomplished a time reduction of approximately 33.92% during the actual inspection of the component. Note that the probe traveling sequences are different for numbers of generations of 200 and 500 in Table 4, although the distance is the same. The two sequences are only the reverse of each other; that is, the starting point is different. The sequence (5-6-3-7-10-1-9-8-2-4) is starting from feature 5 and ending at feature 4, while the sequence (4-2-8-9-1-10-7-3-6-5) is starting from feature 4 and ending at feature 5. Therefore, either of the two sequences could be selected for the minimum traveling path during the inspection of front cluster features.Table 4
Outcome of GA application for the front cluster features.
Case no.No. of generationsProbe travelling path (mm)Genetic algorithm sequencesCMM running time (minutes)CPU time (seconds)Before GAAfter GABefore GAAfter GAFeatures of front cluster501007.3745.425-6-3-2-8-9-1-10-7-46.534.32131.13100674.747-4-5-6-3-2-8-9-1-10262.09200617.235-6-3-7-10-1-9-8-2-4521.88500617.234-2-8-9-1-10-7-3-6-5863.141000617.235-6-3-7-10-1-9-8-2-41706.72000617.235-6-3-7-10-1-9-8-2-43641.7


## 5. Conclusion

An integrated CAD and CAIP system for the automation of inspection planning primarily consists of modules for probe accessibility analysis, setup planning, measurement sequence determination, and the generation of DMIS files. In this investigation, a methodology for determining the optimal part setup and the appropriate measurement sequence for CMM inspection has been proposed. The proposed method yielded the optimal part setup and the most suitable measurement sequence for the considered gearbox. These results enabled the minimization of the number of probe orientations, along with the distance traveled by the probe during the inspection. These time savings, which were achieved via suitable planning of the setup and measurement sequence, could reduce both cost and effort. The authors believe that this research can contribute useful information in the creation of an intelligent and automated inspection scheme for the CMM. For example, intelligent setup planning saves a considerable amount of time, including the time of fixture design for new setups and time for the reorientation of the probe and the part. In this investigation, using ANN, the bottom setup was determined to be optimal for measuring the majority of the features in this gearbox. Hence, the gearbox was fixed on the CMM table with its bottom surface as the base face to carry out the inspection. A significant reduction in time, effort, and cost was achieved due to the elimination of repetitive probe orientation, part positioning, or fixture design. Similarly, the GA was employed to determine the optimal inspection sequence. The best sequence obtained from the GA resulted in a probe travel distance of 777.38 mm and the measurement time of 7 min and 43 s for the left cluster features. Similarly, the best sequence for the front cluster features provided a minimum probe travel distance of 617.23 mm and the CMM operation time of 4 min and 19 s. Therefore, a decrease of almost 50% in the probe’s travel path was observed and the CMM measurement time reduced by nearly 25% during the actual measurement of the gearbox part.The proposed research has the positive aspects of minimizing inspection time and expense, thereby enhancing the efficacy of the entire inspection process. It is particularly useful in the early stages of product development and quality management operations. The inspection planning methodology implemented in this work can also be utilized by engineers and manufacturers in offline programming. Since measurement and inspection technologies assume a pivotal role as a control mechanism in the current production system, the automated and intelligent inspection planning methodology adopted in this work can contribute significantly towards the latest Industry 4.0 trend. Furthermore, the developed GA-ANN-based inspection planning system has a learning ability for developing new strategies of path generation and components orientation. The developed methodology is simple and straightforward and can minimize inspection time and cost. However, the determination of weights is most challenging in ANN. The GA implementation ascertained the exploration of the research space and variability among the population. Finally, this study will certainly contribute to the suitability of advanced AI techniques in CAIP systems. The implementation of STEP technology in this research will help the integration of the CAIP system with other processes in the computer integrated manufacturing environment. The developed system is intended to be an efficient concurrent engineering tool that closes the gap between design, manufacturing, and inspection. This study also has several pitfalls in addition to several upsides that will be discussed in future research. With a rising number of features, this approach will undoubtedly become computationally costlier. The GA can result in sluggish convergence speed, fewer generalizations efficiency, overfitting problems, and achieving locally optimal results in case that appropriate parameters are not selected. Since the effective execution of ANN needs far more data for training of the network, it cannot be promised that the data used in the study is comprehensive. A broader study with ever more varied data can therefore provide more reliable, systematic, and holistic findings in the future. A comprehensive analysis utilizing a wider data set may be the way for future studies in terms of enhancing the ability to generalize and robust performance. By integrating improved crossover and mutation operators, the efficiency of GA can be further strengthened. For a large sample size, the established approach is computationally costly and therefore relies greatly on the size of the data.



---

*Source: 9683074-2020-12-02.xml*