# Towards Machine Learning for Error Compensation in Additive Manufacturing
## 4 Error Compensation in Additive Manufacturing
Suppose corresponding points on \(\Omega\circ\) and \(\Omega^{\star}\) are denoted as \((x^{\circ},y^{\circ})\) and \((x^{\star},y^{\star})\) in the Cartesian coordinate system, this relationship is defined as Equation (1), in which \(M^{5},\ M^{R},M^{T}\) are homogeneous transformation matrices composed of scaling, rotation and translation parameters, respectively:  
\[\left(x^{\star},y^{\star},1\right)^{T}=M^{S}M^{R}M^{T}\left(x^{\circ},y^{\circ },1\right) \tag{1}\]  
resolving Equation (1) yields:  
\[\left(x^{\circ},y^{\circ}\right)=\left(h_{1}(x^{\star},\ y^{\star},\Psi),h_{2} (x^{\star},\ y^{\star},\Psi)\right) \tag{2}\]  
Transformation parameters can be applied to the overall shape where the parametric function can capture the global trend of an in-plane shape deviation. However, to characterize variations along a shape boundary that are location dependent which includes far more complex patterns, a learning capability should be incorporated in the deviation model to simultaneously learn deviation of data represented in different shapes. Here is where a multi-task Gaussian Process (GP) learning algorithm as discussed in previous chapter comes in for local variations modelling. In a study conducted, overlapping detection and removal algorithm to improve repositioned-fragments of the 3D bone model that significantly affect the assembled quality of 3D-printed bones was proposed in [114]. It focused on developing an overlapping finding and removal algorithm to improve the 3D bone model for supporting the assembly and disassembly of 3D printed bones. The study also shows that the averaged gap error between two 3D-printed fragments is less than 3 mm, a significant reduction compared to that of 3D printed bones before mesh overlapping was removed. Contours overlap in measurements utilisation is considered with the matching properties observed. Material extrusion or Fused Deposition Modelling (FDM) is the process of fabricating three-dimensional parts with deposition of layer-by-layer formation of liquefied thermoplastic filament. Acrylonitrile-co-butadiene-co-styrene (ABS) is the most used type of polymer in FDM. ABS possesses rigid and amorphous engineering thermoplastic copolymer meaning it has a list of useful properties for prototype build. Some of these traits include durability, toughness, and its relatively low cost [115]. Other polymer types have been tested to be used hand in hand in FDM such as Semi-crystalline polymers, they are often considered deformable, have high service temperatures relative to amorphous polymers [116; 117]. However, Semi-crystalline when used in FDM tends to deform under varying temperatures during part cooling. During the crystallization phase that occur during the cooling down phase of such material, polymer chains will be drawn very closely together which form a higher density area on the printed part. This will cause the lower layer of the bind to be prone to warps. In tackling this problem, researchers have proposed many solutions such as addition of fillers to improve the actual FDM on its building pro  
Figure 10: Variation of product’s geometrical shape in 2D form. cess itself where carbon fibre is introduced. This dramatically improved the stiffness of the final components being formed other than their perceived strength value. Moreover, the carbon fibre enhanced the coefficient of thermal expansion (CTE) of the polymer which leads to reduction of distortion, more apparent in large scale productions [118]. Relative to conventional injection moulding of PLA materials, FDM printed parts are tested with different strain rates with 45\({}^{\circ}\) raster angle (angle at which the materials are laid at every layers) [119], achieved higher ultimate tensile strength (UTS) of 61.42 MPa than injection moulding (49.45 MPa) with 24.2% UTS improvement at \(2.5\times 10^{-4}\)s\({}^{-1}\) strain rate. Nowadays, online model regression techniques are required by the manufacturers to assist in the increase of productivity and reduce quality defects by tracking the system variations promptly.