Prediction of Residual Strains Due to In-Plane Fibre Waviness in Defective Carbon-Fibre Reinforced Polymers Using Ultrasound Data

Residual strains affect the properties and performance of composite components, therefore measuring and predicting them are important. The prediction of residual strains from a model can be achieved by two steps: the generation of a geometric ply map and the modelling based on that to predict 3D residual strains. A novel method for identifying the most effective algorithm for characterising fibre orientation for the geometric ply map using ultrasound C-scan data has been developed. Finite element models were generated based on the fibre-orientation data from three different algorithms: the Radon transform, 2D fast Fourier transform, and Sobel filter. The models were used to predict residual strains due to three different severities of in-plane fibre waviness induced in a set of 18 specimens. Stratified leave-one-out cross validation was applied to obtain optimum parameters for the three characterisation algorithms and to update the values of the coefficient of thermal expansion for the material. Residual strains on the surface of the specimens were obtained from calculations based on the out-of-plane displacements measured using a digital image correlation system. The predicted and measured residual strain maps were decomposed into feature vectors using orthogonal polynomials to reduce data dimensionality and make quantitative comparisons. The measured residual strains and the predictions based on models using optimised parameters showed good agreement. The differences in performance were quantified based on the accuracy of the predicted residual strains, which showed that the Radon transform performed best.


Introduction
Composite materials have been used extensively in the automobile and aerospace industries due to their relatively high specific strength compared with metallic materials. In addition to good mechanical properties, they can also have good corrosion resistance and electrical and thermal insulation properties. To satisfy industrial demands, appropriate designs of carbon fibre reinforced polymer (CFRP) structures need to be carefully considered. However, it is commonly found in industry that even after the correct design has been selected and applied, properties of the manufactured CFRP components are often lower than desired. Defects such as: voids [1], disbonds [2], delaminations [3] and cracks [4] introduced during the manufacturing process are often the cause. Apart from the aforementioned defects, there is a growing awareness that the misalignment of fibres, often referred to as fibre waviness, can also lead to significant reductions in strength. Therefore, methods for the characterisation of fibres waviness and investigating its effect on mechanical properties are required when inspecting CFRP components to ensure their safety and performance. Fibre waviness can appear in arbitrary locations and forms, and are commonly classified into in-plane and out-of-plane waviness [5]. In-plane waviness is when the misalignment of fibres occur within a layer whereas out-of-plane waviness consists of waves formed through the thickness direction in a laminate. Numerous studies have found that fibre waviness affects the mechanical performance of fibre reinforced composites materials [6][7][8]. Some found that residual strains, which are deformations resulting from unbalanced extensions or contractions within the material after being cured and as it cools, correlate strongly with the ultimate failure load of specimens containing fibre waviness [9]. Therefore, the measurement of residual strains is crucial for estimating the performance of composites. Residual strains in composites with asymmetrical lay-ups can be calculated by measuring out-of-plane deformations [10] using, for example, digital image correlation. Digital image correlation is a non-contact and non-destructive technique that has been widely used for measurement of displacement fields from which surface strains can be calculated [9]. Hence, digital image correlation was used in this study to obtain the surface residual strains. Some studies have reported that fibre waviness, based on a non-destructive characterisation of fibre orientation, can be included in 3D finite element models to predict the performance of composite structures [11], which indicates a route to also predicting residual strains in two steps: the generation of geometric ply information and simulations of the cooling process through which the residual strains are induced. However, to the authors' knowledge, no prior studies have attempted to model residual strains in composite specimens that contain fibre waviness.
It is important when investigating the effect of fibre waviness in a laboratory to be able to reproduce defined levels of in-plane waviness. One technique is to stack prepreg over a glass rod to create out-of-plane waviness, and then roll the uncured laminates on a flat surface to produce in-plane fibre waviness [12]. Another method involves a two-step forming process [13]: first, a V-shape is created in the central region of a laminate by compression moulding; and second, the laminate is flattened in a hot press. In-plane fibre waviness can also be created by laying up prepreg on aluminium formers with various arc shapes, and then flattening them manually before curing [9]. This last method was adopted in this study because the waviness created was close to engineering reality and the severity of fibre waviness can be quantitively controlled.
Various approaches to characterising fibre orientation in composites have been developed, from destructive to nondestructive techniques. Optical microscopy, as one of the destructive methods, can be used to capture 2D images of composites for characterisation. A micrograph of an inclined section plane through a composite specimen can result in each fibre having the appearance of an ellipse, the fibre orientation can be calculated by measuring the major and minor axes of the ellipses [14]. The drawback of techniques based on optical microscopy is that they require well-prepared specimens, normally grinding and polishing of the surface of the specimens are necessary for good quality images, thus making it a cumbersome method unsuitable for processing large quantities of specimens or complex components. X-ray computed tomography, eddy-current testing, and ultrasonic testing are three widely used non-destructive methods for characterising fibre orientation. X-ray computed tomography can provide images of the 3D microstructure of a specimen from which waviness can be measured [15]. However, it is difficult to distinguish some fibres, such as carbon fibres, from the resin matrix as the fibres and the matrix often have similar radiodensities [16]. Eddy-current testing can be utilized to characterise the fibre orientations based on the directional electrical conductivity of CFRP material [17], and both in-plane and out-of-plane fibre waviness can be detected by the technique [18]. However, eddy current testing has two significant limitations: the measured signal is difficult to interpret, and the lift-off effect needs to be considered [19]. Ultrasound C-scans can also be used to measure the fibre orientation and ply stacking sequence [20]. The feasibility and easier applicability of ultrasonic testing make it a favoured method in industry to characterise fibre orientation.
There are multiple algorithms for measuring fibreorientation in image data. The most commonly applied algorithms are the Radon transform (RT) [11] and 2D fast Fourier transform (FFT) [21]. These algorithms have been successfully applied to characterising fibre orientation in: optical micrographs [22], electron microscopy images [22], eddy-current testing images [23], and ultrasound images [20]. Comparisons of the two algorithms were made by Hughes et al. [23], who concluded that the RT outperformed the FFT. The reasons for this finding were that RT can generate sharper orientation peaks and had a higher computational efficiency in image processing than FFT. Schaub et al. [24] also compared the two algorithms, and found RT was a more stable function for analysing fibre alignment as it had less noise and could assess smaller changes in fibre alignment than FFT. When applying RT and FFT for image processing, facet size is an important parameter that controls spatial resolution, but analysis of an appropriate facet size for characterisation of fibre orientation has not been considered by any of the prior research. In [25], the potential of using RT to characterise in-plane fibre waviness was discussed, but the technique was only applied to a single specimen and thus its sensitivity to different severities of waviness was not explored. Gabor filters have also been used to obtain fibre orientation maps from ultrasound data, and have been found to be more noise resistant than RT [26]. However, due to the large number of filters required to form a Gabor filter bank, the computation time is high.
This study introduces a method of generating finite element models for predicting residual strains in defective carbon fibre composites based on fibre orientation data measured using ultrasound. Three algorithms: RT, FFT and Sobel filters, were used to process the ultrasound images to reveal fibre orientation data. A novel technique based on stratified leave-one-out cross validation was used for quantifying the performance of the models, which was calculated as the Euclidean distance between feature vectors representing the predictions and measurements. The identification of the optimal parameter values for the models was also investigated by finding the minimum Euclidean distance. This study demonstrates that stratified leave-one-out cross validation is effective for comparing the performance of algorithms and thus identifying the best algorithm for generating finite element models.
The paper is organised as follows: In Sect. 2, the methodology used for manufacturing specimens containing fibre waviness is described. The measurement of residual strains using digital image correlation (DIC) and ultrasound inspection of the specimens are also described. In Sect. 3, the three characterisation algorithms for fibre orientation are described. Finite element analysis of residual strains is also introduced. Section 4 presents the results and Sect. 5 discusses their significance. Finally, Sect. 6 contains the conclusions of the study.

Specimen Preparation
Quasi-isotropic carbon fibre reinforced laminates, with a stacking sequence of [0 2 /90 2 /45 2 /-45 2 ] s , were manufactured using RP507UT210 prepreg (PRF, UK). Specimens were made using a set of aluminium formers with various shapes to induce fibre waviness, and one of the formers is shown in Fig. 1. The central arc radius of the former and the thickness of the uncured specimen affect the waviness severity and this is discussed in detail in [9]. Each ply was laid on top of an aluminium former in a predetermined stacking sequence to create a laminate. The arc-shaped laminate was then removed from the former and flattened by hand. The fibres of the top ply buckled to compensate for the length difference between the top ply and the bottom ply after the laminate had been flattened, creating localised in-plane waviness defects at the centre of each specimen in the top 0°ply. Only small levels of out-of-plane waviness were observed after the creation of the in-plane waviness, and after sectioning a similar specimen in a previous study [9] no in-plane waviness was observed beneath the top 0°ply. Therefore, compared with the severity of the in-plane fibre waviness, the out-of-plane waviness was assumed to be insignificant. The severity of the in-plane fibre waviness, referred to as nominal waviness, was quantified based on the thickness of the laminates before curing, t u , and the central arc radius, r , using, Given that the thickness of the uncured laminates for a given stacking sequence did not change significantly, the nominal waviness can thus be varied by changing the central arc radius of the former, r . Three levels of nominal fibre waviness were induced in a set of specimens: 17.5%, 20% and 25%, with six specimens having each level of waviness giving 18 specimens in total. The formers for creating the three levels of nominal fibre waviness had central arc radii of 17.2 mm, 14.6 mm, and 11.0 mm respectively.
The laminates were cured in a hot press (APV-2525, Meyer, Germany), according to the manufacturer's instructions. Specifically, they were heated up to 130°C from room temperature (23°C), with a heating rate of 10°C/min. After heating, they were held at 130°C for 45 min. The hotpress pressure was set to 2.5 bar during heating, curing and cooling. Once the laminates were cured, the hot press was left to cool to room temperature. The laminates were cooled naturally while the press was in the closed position, and the cooling rate was approximately 10°C/h. After removal from the hot press, each specimen was cut by a wet diamond saw (Versatile 103,450, Vitrex, USA) into a size of 220 mm by 40 mm, with the 0°fibres orientated parallel to the x-direction, as shown in Fig. 2. The average thickness of all specimens was 2.96 mm.

Digital Image Correlation Characterisation
Digital Image Correlation (DIC) was used to measure the out-of-plane deformation of laminates after cooling from which the surface strains were calculated. The calculated surface strains were used as benchmarks for validating the finite element models. The specimens were prepared for DIC measurements by applying a speckle pattern to an 80 mm by 40 mm area on the face of the specimen opposite to the side with induced waviness. The specimens were first sprayed white (Matt White, PlastiKote, USA) before black speckles (Pro Paint Acrylic Black Matt, CRC, USA) were sprayed on top. This resulted in a pattern typified by the one shown in Fig. 2, where the nominal diameter of the black speckles was 0.25 mm. A Q-400 DIC system (Dantec Dynamics, Germany) was used to capture images, this consisted of two digital cameras (Stingray F-125, Allied Vision, Germany). The distance between the two cameras was 140 mm, and the angle formed between the cameras was 52°. Illumination was provided by a light emitting diode lamp (Dantec Dynamics, Germany). The images were processed by the Istra software (Dantec Dynamics, Germany) using a facet size of 23 pixels and grid spacing of 15 pixels. The residual strains were calculated from the shape data measured using the DIC system as [27], where x, res is the residual strain in the x-direction, t c is the cured thickness of the specimens, and w is the out-of-plane displacement from a flat plane. Equation (2) was applied to shape data obtained from both the DIC measurements and the predictions from finite element models. A central difference method was used to estimate the second partial derivative of the out-of-plane displacement as, using a step size, h, of 9 mm. The measurement uncertainty of the DIC system was obtained by calculating the root mean square of the surface strains of a quasi-flat surface from a block specimen made of rolled steel. For a flat surface, the measured residual strains should be zero, while the root mean square of the measured strain for the quasi-flat steel was calculated to be 66.6 με. Therefore, the measurement uncertainty was taken as 66.6 με. DIC can only provide information about the surface shape and deformation of the laminate and cannot be used to characterise the fibre waviness; hence, this was performed using ultrasound.

Ultrasonic Inspection
Pulse-echo ultrasonic C-scans were used to characterise the fibre waviness in the specimens. Each ply in a laminate has a thin resin-rich layer that separates it from the neighbouring plies. This resin-rich layer reflects the ultrasound and the amplitude of the reflection is approximately proportional to the thickness of the layer; hence, an amplitude C-scan corresponds to a map of resin-layer thickness. The thickness of the resin layer contains an imprint of the fibre tows in the plies above and below the layer. Ultrasound cannot resolve individual fibres because they are very thin (5-50 μm), so only fibre tows, which consist of bundles of fibres, can be resolved. The width of the fibre tows was approximately 0.6 mm. In this study, a focused 10 MHz probe attached to a flaw detector (Epoch 4+, Olympus, Japan), was used to record the variation in amplitudes of the reflections received from the specimens. The choice of frequency is important because resolution and focal sharpness increases with frequency, but penetration power decreases [28]. For the defective specimens in this study, the in-plane fibre waviness was only significant in the top 0°ply with a thickness of approximately 0.37 mm, thus penetration depth can be easily satisfied and permitted the use of a high frequency probe. Each specimen was immersed in a water tank with the wavy side faced up, and the probe was placed vertically above the specimen with no tilt angle. The probe crystal diameter was 10 mm and the focal length was 50 mm. The probe was moved along a raster pattern by a multi-axis scanner (Midas-NDT, UK). The system was set to record the instantaneous amplitude from a 0.1 mm thick portion of the specimen at a depth of 0.37 mm, which is approximately equal to the depth of the first ply interface. This resulted in images showing the tows in the defective ply of the specimen. The amplitude was recorded at 0.1 mm increments along lines with a spacing of 0.2 mm. The images had a lateral spatial resolution of 10 pixels/mm.

Characterisation of Fibre Orientation and Finite Element Analysis
A time gate was applied to only detect the reflected amplitude at the interface of the front ply, which resulted in C-scan images of the ply with a depth of 0.37 mm. A C-scan ultrasound image, f (x, y), can be represented in greyscale so that the fibre tows can be observed in the texture of the image, as shown in Fig. 3a. To measure the fibre orientations, the ultrasound image was first split into several overlapping square facets, and then each facet was processed using one of the three algorithms: the Radon transformation (RT), 2D Fast Fourier transformation (FFT), and Sobel filters (SF). A 2D fibre orientation map was obtained by combining the orientation data of every facet. To determine the optimal facet size for characterising the ultrasound images, nine facet sizes were explored for the three algorithms where the length dimension of the facets was varied from 5 pixels (0.5 mm) to 85 pixels (8.5 mm) and was optimised using an algorithm described later in this section. The grid spacing of the facets was kept constant at 1 mm.

Radon Transformation-Based Algorithm
The Radon transformation (RT) was applied to the ultrasound facets of all the specimens to reveal fibre orientation. The basis of the RT is an integral transform of f (x, y) along lines defined by θ and r , where θ is the angle between the lines from the centre of f (x, y) and the x-direction, and r is the distance from the facet centre. The Radon transform is defined as, where δ is the Dirac delta function, which allows the summation of f (x, y) along the θ direction, and θ ranges from 0°t o 180°. The dominant fibre orientation corresponded to the projection angle where the variations in image intensity were a maximum. The absolute first derivative along every angle, G(r , θ ), was calculated using an equation derived based on the method described in [23,24], The angular distributions, a(θ ), were then obtained by calculating a sum along each projection divided by the total for every projection, where N is the number of points for each projection.

2D Fast Fourier Transformation-Based Algorithm
The 2D fast Fourier transformation (FFT) was used to characterise the fibre orientations for all the specimens. The ultrasound facets in the spatial domain, f (x, y), were transformed using the 2D fast Fourier transform into the frequency domain, F(u, v). Before performing the FFT, a radial Hahn window was applied to reduce the spectral leakage and give a broad peak at the centre of the frequency spectrum [9]. An angular distribution was then calculated by radially summing the pixel intensities from the centre of the FFT transformed image F(u, v), based on the Eqs. [21], where D is the facet length, r is the distance from the centre and θ is the angle between the radius and the x-direction, and θ ranges from 0°to 180°.

Sobel Filter-Based Algorithm
Sobel filters (SF) were used to process ultrasound facets for all the specimens to give fibre orientations. SF is an edge detecting algorithm which is widely used in image processing and computer vision. The principle is to calculate the gradients in an image by convolving the image with two Sobel filters [29]. These filters were respectively used to calculate the gradients along the x-direction and y -direction: S x (x, y) and S y (x, y), and then the fibre orientation was calculated using the equation, The round function was used to round off the resulting orientations into 180 integers from 1°to 180°. After convolving an ultrasound facet with Sobel filters, the facet was transformed into a map of fibre orientations. An angular distribution a(θ ) thus can be obtained by computing the histogram of θ(x, y). The facet size affects the spatial resolution of the orientation map. A smaller facet size resulted in a high spatial resolution orientation map, but also produced more noise, while a larger facet size led to less noise, but a lower spatial resolution.

Finite Element Analysis
Fibre waviness was firstly characterised by the C-scans, then the resultant images were analysed by the three algorithms to obtain the fibre orientations which were transferred into finite element models. The finite element models were created using Abaqus 6.14 (Dassault Systèmes, France), and employed to simulate the deformation of the specimens after cooling from the curing temperature to room temperature. Each specimen was simulated using 70,400 C3D8R elements. These elements were initially given the transversely isotropic material properties shown in Table 1 [30]. The temperatures for the initial and final conditions were set to 130°C and 23°C for the whole specimen. Specifically, the defect was simulated by creating a discrete field at the centre of the top 0°ply, and the number of elements of this discrete field was the same as the number of data points in the orientation map. Then the measured local fibre orientation was assigned to each element in the discrete field. Stratified leave-one-out cross validation (SLOOCV) was used to identify the optimal facet size for the fibre measurement algorithms and the coefficient of thermal expansion required for the finite element models. The method was also used to evaluate the performance of the calibrated models.
As described in [31], the formation of residual stresses in composites is caused by the difference in the coefficients of thermal expansion in the transverse and longitudinal directions for different plies at the macro-mechanical level. Therefore, in the present research, the major focus of optimising the finite element model was to calibrate the coefficients of thermal expansion. The coefficients for the unidirectional plies to be calibrated were in the fibre longitudinal direction, α 1 ; the transverse direction, α 2 ; and along the thickness direction, α 3 . As the unidirectional plies can be considered transversely isotropic, α 2 was set to be equal to α 3 . The coefficient of thermal expansion for carbon fibres is very small compared with the epoxy matrix, resulting in α 1 of a unidirectional ply being more than one order of magnitude smaller than α 2 and α 3 [32]. This causes α 1 to have a negligible effect on the residual strains and thus is often not considered when calculating residual strains [10]. Therefore, when optimising the models, only one parameter, α 2 (equal to α 3 ) was calibrated.
The procedure for calibrating and evaluating the finite element models is shown in the flow chart in Fig. 4. Ultrasound C-scan data from the 18 specimens were processed using the RT, FFT, and the SF algorithms to generate finite element models to predict residual strains, and DIC measurements from the 18 specimens were used to determine residual strains on the surface. The ultrasound and DIC data were firstly divided into three classes according to their nominal waviness levels, and then were split into six data sets, with each set having one specimen selected randomly from each class. Five sets were then used to calibrate the models and one set was used to evaluate the performance of the models. Both calibration and evaluation of the models were performed using the comparisons between the measured residual strains and simulated residual strains. Residual strain calculations were performed using Eq. (2) and were based on the surface displacements measured by DIC. The simulated strains obtained from the FE model were calibrated with the measured strains from the DIC. The calibration and evaluation were conducted for two parameters. The first parameter was the facet size used for the fibre orientation algorithms, which was varied from 5 pixels to 85 pixels with a step size of 10 pixels. The second parameter that was calibrated was the coefficient of thermal expansion along the transverse direction. This was performed by varying α 2 across a predefined range: 1 × 10 − 6°C−1 to 10 × 10 − 6°C−1 , with a step size of 0.1 × 10 − 6°C−1 . The range was defined because the transverse coefficient of thermal expansion for a unidirectional ply is of the order of 10 − 6°C−1 [33], and a sensitivity study on the coefficient showed that outside this range the differences between the measured and predicted fields of residual strain either monotonically increased or decreased. The differences between the measured and predicted fields of residual strain were quantified by representing each field using a feature vector, S E andS M respectively and calculating the Euclidean distance d(S E , S M ) between the vectors, where · is the vector norm, which is the square root of the sum of the squared elements [34]. The Euclidean distance is the minimum distance between two vectors in multi-dimensional space [34], and was used as a measure of concordance between S E andS M . This indicates the extent to which the predictions were representative of the measurements. The feature vectors were obtained using the image decomposition method described in [35]. Based on prior experience, Chebyshev polynomials of order ten were used to decompose the maps of measured and predicted residual strains. The appropriateness of using polynomials of this order was checked by evaluating the accuracy of the reconstructed images. This was quantified by calculating the root mean squared difference between the original maps and the reconstructed maps, and was deemed acceptable when the difference was less than the measurement uncertainty. The Euclidean distance between the feature vectors S E and S M for every specimen in the five calibration sets, for facet sizes from 5 pixels to 85 pixels and α 2 values from 1 × 10 6°C−1 to 10 × 10 6°C1 , was calculated. The average Euclidean distance of the specimens in the calibration sets for every one of the nine facet sizes was calculated. The optimum facet size and value of the coefficient of thermal expansion after calibration were identified, which corresponded to the minimum of the average Euclidean distance achieved for the five calibration sets. The quality of the combined fibre-orientation algorithm and model was then quantified by comparing the feature vectors from the measured and predicted residual strain maps for the validation set using the optimised facet size and value of the coefficient of thermal expansion found for the calibration sets. After one calibration and validation iteration, the validation set was switched with one of five of the calibration sets and the calibration and validation processes were repeated. Therefore, after six iterations, each data set had been used to calibrate the model five times and to validate the model once. The entire process was automated by using Abaqus to perform the finite element analysis, using Python to perform the post data processing on the finite element results, and using MATLAB to perform the image processing including image decomposition.

Results
An example of an orientation map obtained using the FFT based algorithm is shown in Fig. 3b, which indicates that the fibre waviness region was successfully characterised resulting in a fibre orientation map. Figure 3c shows a sketch of fibre alignment in the front surface of the finite element model after importing the fibre orientation map into Abaqus. To evaluate the performance of the three algorithms for identifying fibre orientation from C-scan data, they were applied to a 100 × 100 pixel exemplar ultrasound facet, f (x, y), for which the orientation was created by rotating 30°anticlockwise the image of the top 0°ply of a non-wavy specimen, as shown in Fig. 5a. Figure 5b-d are images for each algorithm applied to Fig. 5a, and the angular distributions a(θ ) were calculated based on these images. For a better comparison of the angular distributions from the RT, FFT and SF algorithms, they were normalized by calculating, where z(θ ) is the normalized angular distribution from the RT, FFT and SF, a(θ ) is the original angular distribution from the RT, FFT and SF, μ and σ are the mean and standard deviation of a(θ ). These were then plotted in Fig. 5e. The three peak values in Fig. 5e achieved by the RT and FFT are both at 30°, and at 24°for the SF. Calibration results for the first iteration are shown in Fig. 6, illustrating the effects of facet size and the value of the coefficient of thermal expansion on the average Euclidean distances between the measured and predicted residual strains. The curves show the mean value of the Euclidean distances between the feature vectors representing the predicted and measured residual strains for each specimen in the five calibration sets at a specific facet size and value of the coefficient of thermal expansion. The relationship between the minimum coefficients of thermal expansion and facet size is shown in Fig. 7. The minimum of each curve in Fig. 6 was plotted in Fig. 8 as a function of facet size in order to identify the global minimum and hence optimum facet size. For RT, FFT and SF algorithms, the minimum Euclidean distances were achieved when length dimension of the facet was 45 pixels, 35 pixels and 15 pixels respectively.
Validation of the calibrated models was performed using the six validation sets and each set had three specimens with 17.5%, 20% and 25% fibre waviness, yielding 18 validations in total. The calibrated values of the coefficient of thermal expansion and the facet size were used to generate the models to be validated. Each validation included three comparisons of measured residual strains with predicted residual strains obtained from models using the RT, FFT and SF based algorithm respectively, using the protocol described by the CEN Workshop Agreement 16799:2014 [35]. One example of validation is shown in Fig. 9. Figure 9a shows the measured residual strains for a specimen with 25% nominal fibre waviness, and Fig. 9b-d show the predicted residual strains for the specimen based on models using the RT, FFT, and SF based algorithms. The residual strain maps were treated as images and decomposed using discrete Chebyshev polynomials of order 10, resulting in 66 coefficients collated into feature vectors. The image decomposition technique was applied for reducing data dimensionality, i.e. from 10 3 pixels to 10 1 coefficients, and to allow for a straightforward comparison using the feature vectors rather than comparing images pixel by pixel. The feature vectors were used to reconstruct the original images and assess the quality of the representation of the original images by calculating the    Fig. 9e. To determine if the simulation was an adequate representation of the experiment, the root mean squared residual and measurement uncertainty were used to define an acceptance band, which is graphically shown as the two dashed lines in diagrams shown in Fig. 9e. The acceptance band is defined as, where S M is the feature vector describing the predicted residual strains, S E is the feature vector representing the measured residual strains, u E is the root mean squared residual for the  (a-d). The inset shows an enlarged version of the boxed region on the main graph measured strains, and u meas is the measurement uncertainty. A perfect correlation between the measurements and a prediction would result in all of the points being located in the acceptance band and in a straight line. However, in Fig. 9e, there was one data point for each of the RT, FFT, and SF which fell outside the acceptance region. Three models used for predictions of residual strains generated results which were deemed unacceptable in the validation process, these were all associated with one specimen containing 25% nominal waviness. The validation diagram for these three models is shown in Fig. 9. The comparisons of residual strains between the predicted data and the measured data indicate that whilst the distribution in the high strain areas were similar, differences existed in the magnitude of strains. Each validation set contained three specimens with 17.5%, 20% and 25% nominal waviness, thus the averages and standard error of the Euclidean distances were investigated as a function of the nominal waviness, as shown in Fig. 10. The Euclidean distance between the predicted and measured strains increased with the increase in nominal waviness in the specimens. At lower values of nominal waviness: 17.5% and 20%, the Euclidean distances achieved by the RT, FFT, and SF were approximately the same, however, at the highest nominal waviness of 25%, the Euclidean For each specimen, three models were created using the RT, FFT, and SF algorithms. For each model, a Euclidean distance between the feature vectors representing the predicted and measured residual strains was calculated that quantified the similarity between the model and the experiment. The performance comparisons of the three algorithms could be made based on the prediction accuracy of residual strains. The best performing algorithm for predicting the residual strains was identified by finding the minimum of the three Euclidean distances. For 10 specimens the predicted residual strains were closest to the experiment when using the RT algorithm, this is the highest success rate in providing the best predictions for any algorithm, as shown in Fig. 11.

Comparison of the RT, FFT and the SF Based Algorithms
Three algorithms were used to process an ultrasound facet with a known fibre orientation of 30°to assess their performance. The mechanisms of the three algorithms were different; however, all of the algorithms were able to characterise the fibre orientation of the same ultrasound facet by identifying the peak location, shown in Fig. 5e. Compared with the Radon transform (RT), the fast Fourier transform (FFT) based and Sobel filter (SF) based algorithms showed Fig. 11 Frequency of minimum Euclidean distance between feature vectors representing predicted and measured residual strain fields achieved for the three algorithms applied to the 18 specimens using the optimised values of ultrasound facet size and of the coefficient of thermal expansion. Higher frequency indicates the higher success rate of the algorithm in providing the best predictions more noise. The SF also shows a 6°deviation in peak values. This suggests that the RT algorithm was better at characterising ultrasound images for specimens with regularly aligned fibres, because it can give a more distinct peak at the correct fibre orientation with less noise. The assessment of the performance of the three algorithms on specimens with fibre waviness were more difficult, because imaging of the fibre tows at the defective zones had a random variability which render it difficult to define a criterion to directly evaluate the performance of the algorithms. However, the performance comparisons of the three algorithms could be made based on the prediction accuracy of residual strains. Algorithms based on the RT, FFT, and SF were applied to characterise the fibre orientations visible in ultrasound images of specimens containing fibre waviness. Finite element models of these specimens were created based on this orientation data and used to predict residual strains. The influence of facet size used when determining the fibreorientation was explored, and SLOOCV was used to estimate the prediction accuracy of models by calibrating the facet size and the coefficient of thermal expansion for each algorithm. The effect of facet size can be seen in Fig. 6, where the Euclidean distance between feature vectors representing the predicted and measured residual strains was used as an indicator for the quality of the result. Lower average Euclidean distances indicated a better fit of the model to reality for the given parameters. Both facet size and coefficient of thermal expansion contributed to the prediction accuracy and the relationship between them is shown in Fig. 7. The correlation between facet size and CTE is due to larger facets resulting in small features in the ultrasound images being unresolved.
This results in a tendency to underestimate the fibre orientations, as also reported in [26], and thus calibration yields higher estimates of CTE in order to achieve the same magnitude of residual strains. The models were validated with the calibrated facet size and value of the coefficient of thermal expansion. After the validation of the models, average Euclidean distances were calculated, as shown in Fig. 10. The average distance is an unbiased estimator of the predictive accuracy of the base model procedure [36]. Therefore, by identifying the predictions most similar to the experimental results, it can be determined which algorithm was the best option for charactering fibre orientations. The identification was achieved by finding the lowest average Euclidean distance between predictions and experimental results.
The comparison of the three algorithms was performed at two scales: fibre tows and specimen. There were 6 specimens at each of the three levels of nominal waviness, resulting in 18 specimens in total. At the fibre tow scale, the RT and FFT performed equally well, giving approximately equal average Euclidean distances at each nominal waviness, as shown in Fig. 10. For lower values of waviness: 17.5% and 20%, the Euclidean distances obtained using the SF were close to those using the RT and FFT, where the differences among the three algorithms were within 5%. However, at the highest value of nominal waviness, the Euclidean distance achieved by the SF based models was approximately 16% larger than that achieved by the RT and FFT, which indicated that the RT and FFT slightly outperformed the SF at the highest values of nominal waviness. The results implied that the fibre tow orientations given by the SF were less accurate when dealing with complex fibre arrangements. The optimum values of calibrated parameters were used to predict the residual strains in each specimen using each of the three algorithms and the predictions compared to the measured distributions of residual strain using the Euclidean distance between their feature vectors. The performance of the three algorithms was evaluated by identifying which yielded the minimum Euclidean distance for each specimen when using the optimised parameters. The frequency with which each algorithm yielded the minimum Euclidean distance for a specimen is shown in Fig. 11. At the scale of the specimens, it was found that for ten specimens the best predictions came from models based on orientation data determined using the RT algorithm, for six specimens the FFT algorithm provided the best orientation data, and only two using the SF algorithm, as shown in Fig. 11. This means the RT algorithm has overall the highest success rate in predicting residual strains. Therefore, based on this data it is possible to non-subjectively rank the effectiveness of the three different techniques for obtaining fibre orientation, with the RT as the best option to characterise fibre orientation. Similar findings were reported in [11], [23] and [24], which were based on the observations that more distinct peaks can be seen, or smaller changes in fibre alignment can be characterised, using the RT than the FFT. However, in this study, we draw this conclusion based on comparing the predictions for residual strains using the RT, FFT and SF, and by comparing the predictions with measurement data.

Validation of the Models
Leave-one-out cross validation is a classical model-selection method in the machine learning field, used mainly for selecting the optimal values of calibrated parameters [37]. This method can be used to assess the reliability of model predictions by determining the model that provides the prediction which has the 'best-fit' with the data [38]. The term 'best-fit' in this work, can be referred to as the minimum Euclidean distance between the measurement and predictions after feeding the base finite element model with various values of the two parameters to be calibrated. Cross validation was used to eliminate the potential issue of over-fitting, which means that one model may learn too much information from the calibration sets, and after calibration cannot predict correctly during the validation process. In other words, a model can fit the calibration sets well, but its predictions for future specimens may be poor. In order to achieve identically distributed data sets, all the data were stratified into three classes based on their nominal waviness before partitioning them into five calibration sets and one validation set. Thus, the otherwise sampling imbalance that may result in an over-fitting issue were eliminated. For instance, considering an extreme case, if stratification had not been applied, the five calibration sets could have had data of six specimens with 17.5%, six specimens with 20%, and three specimens with 25% nominal waviness, leaving the validation set having data from three specimens all with 25% nominal waviness. This would have led to the calibrated models providing more reliable predictions for specimens with 17.5% and 20% nominal waviness but less reliable for specimens with 25% nominal waviness. Consequently, reliable and unbiased estimates of model performance were given by the SLOOCV. One drawback of SLOOCV is that for a large data set it can be a computationally expensive procedure to perform. This study used data from only 18 specimens and thus the heavy computational cost was not a concern. If there were more specimens, a related technique called stratified k-folds cross validation could be used instead to reduce the computational burden [37].
The level of the nominal waviness influenced the accuracy of the predicted residual strains. For specimens with the highest nominal waviness, the models had a chance of underestimating the magnitude of residual strains, this was observed for the one specimen whose three models gave unacceptable predictions in the validation process, as depicted in Fig. 9. In this case, the magnitudes of strain are lower than the experimental data; however, the distribution in the higher strain areas can still be predicted quite well by the models based on the three algorithms. The validation diagram, shown in Fig. 9e, shows a single point fell outside of the acceptance region for each of the three algorithms. These points corresponded to the first Chebyshev polynomial, which represented the mean value of the residual strain maps. These outliers fall in the bottom right region of the validation diagram, showing that the mean value of the experimental data is larger than that of the predicted data, thus the prediction of residual strains were underestimated. One possible cause of the underestimation by the models may be because the calibrated value of the coefficient of thermal expansion used for the 4th validation set was the lowest compared to the other sets. As the residual strains were predicted by simulating a cooling process, a lower coefficient of thermal expansion would result in less contraction of the specimen, and thus lower predicted residual strains. Another possible explanation is that as nominal waviness increased from 17.5 to 25%, the accuracy of residual strain predictions declined. In other words, the higher the fibre waviness, the more severe the defect is and thus it is more difficult for the algorithms to determine the fibre orientation accurately. As this orientation data is input into the models, this leads to lower accuracy predictions. Apart from the one specimen with models that generated unacceptable predictions, for the other 17 specimens, the magnitude and location of the residual strains were well predicted by their models based on the three fibre characterisation algorithms.
In this study, not only were three different severities of in-plane fibre waviness successfully characterised, but also the orientation data was incorporated into models to predict residual strains. The method of utilising non-destructive data to generate a model for predicting residual strains is not limited to the ultrasound technique, it could also be applied using data obtained from other techniques, such as eddy-current testing or X-ray computed tomography. These models could be further developed to not only predict residual strains, but also for predicting the failure of defective composite components under load. In the latter case, the focus would not be on only calibrating the facet size for the three algorithms, but also the mechanical properties such as elastic modulus, shear modulus and Poisson's ratio. Furthermore, as discussed in [9], residual strains could be incorporated into these models to help predict the ultimate failure of composite components. In this study, only the surface strains were measured and predicted, but it shows a clear route of utilising ultrasound data to generate effective 2D models. In the future, the technique developed in this study could be extended to 3D models, which would be more challenging as the characterisation of the inner plies of laminates is not easy.

Conclusion
A technique of utilising ultrasound data to generate finite element models has been developed. These models were used for predicting residual strains in defective CFRP specimens with fibre waviness. The quality of the models was assessed by comparing feature vectors describing predicted and measured residual strain maps. The technique is shown to be robust for calibrating models and evaluating their performance. Therefore, it could be used to identify the most effective way of creating models based on non-destructive test data.
Algorithms based on the Radon transform, fast Fourier transform, and Sobel filters were shown to be capable of processing ultrasound images to generate effective models for predicting residual strains for defective specimens. Previous studies have made qualitative comparisons between these techniques. For this study, quantitative comparisons of the three algorithms based on image decomposition using Chebyshev polynomials were made at the fibre and the specimen scale. Based on these comparisons, the Radon transform algorithm was shown to outperform the other two.
The models were calibrated using an innovative stratified leave-one-out-cross-validation procedure which was shown to be effective in identifying the optimum value of the coefficient of thermal expansion of the material and the appropriate facet size for use in the algorithms for characterising fibre orientations. These models could be further developed to not only predict residual strains, but also for predicting the failure of defective composite components under load.

Consent for Publication Not applicable.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/.