# Towards Machine Learning for Error Compensation in Additive Manufacturing
## 5 Deep Learning for Error Compensation in Additive Manufacturing
### Wear Prediction for Component Production  
In FDM characteristics such as surface roughness, mechanical strength and dimensional accuracy are found to influence the wear strength of components manufactured via FDM. The wear strength of the FDM fabricated prototypes is measured based on five input variables as demonstrated in [128]. The variables are:  
1. Thickness.
2. Orientation.
3. Raster angle.
4. Raster width
5. Air gap.  
Wear strength is a crucial attribute for the durability of part and little work has been done to better understand the wear characteristic of the rapid prototyping processed part.  
For each of the input process variables, values at varied levels are considered as per guidelines of machine manufacturer and industrial application. Wear volume is determined by the difference in height by multiplying it to the cross-sectional area, while sliding distance is obtained by multiplying time with speed of rotation. For the wear testing, pin on disk apparatus is used. The proposed method using Improved approach of Multi-gene Genetic Programming (Im-MGGP) is compared to that of the other three potential models; standardised MGGP, SVR and ANN [129].  
To understand the concepts of MGGP method, the basics of Genetic Programming (GP) is discussed in brief. GP generates models automatically based on the given data using [PERSON]'s principle of survival of the fittest [130]. The same working principle applies in GP with Genetic Algorithm (GA) but the only difference between them is that, GA evolves solutions represented by strings (binary or real number) of fixed length, however GP generates solutions represented by tree structures of varying sizes. GP algorithm initiates by randomly generating models. The number of models generated is represented by the population size. The models are formed by combining the elements randomly from the functional and terminal set. A function set which usually comprises elements such as basic arithmetic operations, Boolean operators or other operators predefined by the user. The terminal set comprises elements such as numerical constants and input decision variables of the process. Dissimilar to GP, the evolutionary phase of the MGGP algorithm evolves models, where every model is formed by the combination of trees or genes.  
It is validated that the robustness of the model by unveiling dominant input parameters and hidden non-linear relationships. It was found that the wear strength decreases with an increase in layer thickness, raster width but strength increases with increase in air gap. The high generalisation ability of the Im-MGGP model is highly beneficial for rapid prototyping process, where it requires contingency that involves high-fidelity models that can predict wear strength in ambiguous input process conditions. The model provides an explicit functional relationship between wear strength and the input process parameters, and thus can be further extended for offline prediction.  
Table 5 summarises the three error compensation approaches incorporating different deep learning algorithms and the major findings.