 1. Introduction
 2. Experimental
 3. Statistical evaluation of errors in a WAXD curve recording
 4. Methods of fitting a theoretical curve to the experimental WAXD curve
 5. Measures and statistical tests for evaluation of the fitting methods
 6. Results of investigations and evaluation of the methods
 7. Summary
 References
 1. Introduction
 2. Experimental
 3. Statistical evaluation of errors in a WAXD curve recording
 4. Methods of fitting a theoretical curve to the experimental WAXD curve
 5. Measures and statistical tests for evaluation of the fitting methods
 6. Results of investigations and evaluation of the methods
 7. Summary
 References
research papers
The role of an objective function in the mathematical modelling of wideangle Xray diffraction curves of semicrystalline polymers
^{a}Faculty of Materials, Civil and Environmental Engineering, University of BielskoBiala, Willowa 2, BielskoBiała, 43309, Poland
^{*}Correspondence email: stanislaw.rabiej@ath.bielsko.pl
To decompose a wideangle Xray diffraction (WAXD) curve of a semicrystalline polymer into crystalline peaks and amorphous halos, a theoretical bestfitted curve, i.e. a mathematical model, is constructed. In fitting the theoretical curve to the experimental one, various functions can be used to quantify and minimize the deviations between the curves. The analyses and calculations performed in this work have proved that the quality of the model, its parameters and consequently the information on the structure of the investigated polymer are considerably dependent on the shape of an objective function. It is shown that the best models are obtained employing the leastsquares method in which the sum of squared absolute errors is minimized. On the other hand, the methods in which the objective functions are based on the relative errors do not give a good fit and should not be used. The comparison and evaluation were performed using WAXD curves of seven polymers: isotactic polypropylene, polyvinylidene fluoride, cellulose I, cellulose II, polyethylene, polyethylene terephthalate and polyamide 6. The methods were compared and evaluated using statistical tests and measures of the quality of fitting.
Keywords: polymers; diffraction curves; absolute error; relative error; objective function; mathematical modelling.
1. Introduction
The wideangle Xray diffraction (WAXD) curve of a semicrystalline polymer gives important and unique information on its internal structure. By analysing such a curve we can determine the unitcell parameters, the
the size of crystallites, the degree of orientation, the weight fractions of polymorphic phases. Moreover we can investigate the influence of different factors on all these data.To perform these investigations and analyses, the intensity contributions arising from crystalline and amorphous regions of the polymer have to be isolated and separated from each other. It means that we have to decompose the WAXD curve into individual constituents. To this aim a theoretical curve is constructed which is a bestfitted mathematical model of the experimental one (Russell et al., 1993, 1997; Hu & Hsieh, 1996; Chen & Yokochi, 2000; Sajkiewicz et al., 2005). The theoretical curve is described by a function which is a sum of component functions related to individual crystalline peaks, amorphous halos and background scattering. Each component function related to a crystalline peak or amorphous halo has four parameters at least: angular position, height, width at halfheight and socalled shape coefficient (Hindeleh & Johnson, 1974, 1978). The number of peaks, their shape and size depend on the polymer type, its crystalline structure and crystallization conditions.
Because of the large number of unknowns, the multidimensional space of solutions and the diversified shape of the functions which describe the crystalline and amorphous components, the fitting procedure and determination of all parameters is one of the most difficult nonlinear optimization tasks. As has already been shown (Rabiej, 2003, 2014; Rabiej & Rabiej, 2005) the solution of this task can be made much more unambiguous and reliable when we employ a bicriterial optimization procedure. It involves not only the best fitting of the theoretical curve to the experimental curve, i.e. minimization of the deviations between the curves, but also simultaneous maximization of the area of amorphous component. The latter criterion results from observations of the early stages of crystallization of polymers in dynamic synchrotron investigations (Bark et al., 1992; Wang et al., 2000). This criterion ensures a from the WAXD curves of a molten polymer to the curves in which first traces of crystalline peaks start to be visible. The two criteria of the optimization procedure have different roles. The best fitting of the curves is the superior, dominating and final condition. The second criterion has a steering role and gives a direction in which the space of solutions has to be searched. Therefore the shares of the two criteria must be represented by suitable weights (Rabiej, 2017b). Experimental practice has shown that the classical optimization methods are not effective in performing bicriterial optimization. This is why new methods employing artificial intelligence have been elaborated; they are much more effective, faster to converge and lead to globally best solution procedures (Rabiej, 2013, 2014). Recently, a procedure based on the particle swarm optimization (PSO) method (Kennedy & Eberhart, 1995) has been proposed (Rabiej, 2017a).
In this work it is shown that the quality of the mathematical model of an experimental WAXD curve is clearly dependent on the shape of objective function which is minimized in the fitting procedure. To this end we have compared the models of the WAXD curves obtained using two methods in which the absolute errors are minimized (the leastsquares method and the least absolute deviations method), and four methods where the relative errors are minimized (leastsquared relative deviations method, least absolute relative deviations method, least relative squares method and weighted leastsquares method). The comparison and evaluation were performed using WAXD curves of popular polymers. The methods were compared and evaluated using statistical tests and measures of the quality of fitting.
2. Experimental
To compare and evaluate the methods of fitting mentioned above, the WAXD curves of seven polymers were recorded. The WAXD curves of the chosen polymers have clearly different shapes: isotactic polypropylene (iPP), polyethylene (PE) and polyvinylidene fluoride (PVDF) with several high and narrow crystalline peaks, cellulose II (CeII) and polyamide 6 (PA6) with broad and not very high peaks, and finally cellulose I (CeI) and polyethylene terephthalate (PET) with both sharp and broad crystalline peaks.
The investigations were performed by means of a URD6 Seifert (Germany) diffractometer using a symmetrical reflection mode and a copper target Xray tube (λ = 1.54 Å) operated at 40 kV and 30 mA. The Cu Kα radiation was monochromatized with a graphite monochromator. For each polymer the WAXD curves were recorded in the same 2θ range 5–60° with a step size of 0.1° and the same registration time: 20 s step^{−1}. The isotropic samples were prepared using fibres made of the investigated polymers which were powdered by means of a microtome and pressed into a sample holder. The obtained samples had the shape of circular pills with a diameter of 2 cm and thickness of 1 mm.
Before the main calculations a linear background scattering composed of the incoherent Compton scattering, air scattering, thermal diffuse scattering and radiation from external sources was subtracted from the curves and all curves were normalized in such a way that the total area under each curve was equal to unity.
The curves were decomposed into crystalline peaks and amorphous components using a bicriterial PSO method (Kennedy & Eberhart, 1995). The PSO algorithm is an artificial intelligence method. Its action imitates the behaviour of a bird flock or a fish school. Instead of using one starting set of parameters, this algorithm creates several tens of such sets by a draw. In this way some population of solutions is created. The population of candidate solutions is considered as a swarm and individual solutions are called particles. In the successive steps, particles move to new places, simulating adaptation of a swarm to the environment. As the population is created by a draw, the probability that the globally best solution will be found is much higher than in the classical optimization methods. Because the size and direction of the search step are dependent on the best solution found at a given stage of action, the algorithm is much less dependent on the starting parameters. In the system used in this work a few modifications have been introduced to the original PSO method (Rabiej, 2017a). As a result, it is better adapted for decomposing the WAXD curves.
Starting values of the angular positions of crystalline peaks were determined based on the respective unitcell parameters of the investigated polymers. The crystalline peaks and amorphous maxima were approximated by a linear combination of Gauss and Cauchy profiles.
Each curve of a given polymer was decomposed employing five tested methods (M1, M2, M3, M4 and M6) described in Section 4, implemented in the program WAXSFIT. To employ and evaluate the weighted leastsquares method (M5), the diffraction curves of four polymers (iPP, PVDF, CeI and CeII) were recorded five times using the same experimental conditions.
Each decomposition procedure using a given method resulted in one mathematical model of the curve. The quality of models (i.e. the quality of fitting) was evaluated using the measures and tests described in Section 5, implemented in the WAXSFIT program as well. For a given curve and a given method, the decomposition procedure was repeated ten times using different starting parameters. Based on ten results of decomposition, the average value and standard deviation for each parameter of a theoretical curve were calculated.
Furthermore, the final values of the information criteria and statistical tests used for evaluation of the employed methods of fitting were calculated by averaging the results obtained in those ten runs.
All obtained data were elaborated using the computer program WAXSFIT (Rabiej, 2017a).
3. Statistical evaluation of errors in a WAXD curve recording
When a diffraction curve is recorded, the number of impulses representing a local intensity y_{i} of Xrays scattered at a given diffraction angle t_{i} (2θ) is counted. The angle is changed with a constant step in some arbitrarily assumed range. As a result we obtain a set of values (y_{1}, …, y_{n}) related to the subsequent diffraction angles (t_{1}, …, t_{n}). Each individual result y_{i} can be considered as one possible value of a random variable Y_{i}. This result is characterized by some measurement uncertainty (random error) and should be treated as an approximation of the real value, represented by the mathematical expectation E(Y_{i}) of the random variable Y_{i}. Later on, the mathematical expectation, i.e. the theoretical value of a model, will be denoted as in this paper.
The absolute error and relative error are defined by equations (1) and (2), respectively:
Generally, the uncertainty of measurements results from the equipment limitations and measurement conditions. The intensity recorded at a given angle is the sum of a component related to the structure of the investigated sample and the background scattering. The latter component comprises incoherent Compton scattering, air scattering etc. and must be subtracted from the experimental curve before the mathematical model of the curve is constructed. Usually the diffraction curve for a given sample is recorded once. So, the mathematical expectations are not known and consequently neither absolute nor relative errors can be calculated. A single measurement says nothing about the random value Y_{i} distributions, their standard deviations σ_{i} and mathematical expectations .
When the number of counts is small, the probability that the result of a single measurement amounts to y_{i} can be described by the (Goldanski et al., 1963)
where k = y_{i} and λ is the mathematical expectation λ = E(Y_{i}) = .
The deviation of a random value from its mathematical expectation is described by its variance and standard deviation, i.e. the square root of the variance. In the the variance σ^{2} is equal to the mathematical expectation λ, thus
This means that the standard deviation of each result of a single measurement y_{i} is equal to the square root of the mathematical expectation :
As the mathematical expectation is not known can be substituted by its estimator, standard error SE_{i}:
Consequently, the bigger the number of counts y_{i}, the smaller is the relative uncertainty of the measurement:
According to the central limit theorem (Ash & DoleansDade, 2000), when the number of counts increases (k → ∞) the transforms smoothly into the Gauss distribution N(m, σ), with the mathematical expectation m and standard deviation σ. So, if the Gauss distribution approximates the equations (6) and (7) are still valid.
The mathematical expectations (, , …, ) of the number of impulses representing local intensities at subsequent diffraction angles (t_{1}, …, t_{n}) can be determined in two ways. The first method consists of sequential recording of diffraction curves for a given sample. The second method consists of the creation of a mathematical model of the curve.
3.1. First method
In this case, to obtain a credible estimation of the mathematical expectations , a diffraction curve of a sample has to be recorded several times (N) at exactly the same experimental conditions. Next, the average number of counts [equation (8)] and rootmeansquare error s_{i} [equation (9)] for each diffraction angle t_{i} (i = 1, …, n) have to be calculated:
According to the law of large numbers (classical Kolmogorov's SLLN) (Dekking, 2010), the obtained values are estimators of the mathematical expectations and standard deviations , respectively.
3.2. Second method
The mathematical model of a diffraction curve should ensure that the differences between the experimental y_{i} and theoretical values of intensity at the subsequent diffraction angles (t_{1}, …, t_{n}) (i.e. the residuals) are as small as possible.
At the first stage of modelling, the functions describing crystalline peaks and amorphous halos are chosen, and the number of optimized parameters is established. Next, the optimization method is chosen. In all optimization methods the objective function is defined which quantifies the differences between the experimental and theoretical values of intensity. Moreover, the set of starting values of optimized parameters and the criterion of accomplishment of the procedure must be provided.
In the successive steps (iterations) of an optimization procedure, the values of parameters are changed in such a way that the value of the objective function becomes lower and lower. The optimization procedure is finished when such a set of parameters is found for which the objective function reaches its minimum.
Let us analyse the influence of absolute and relative errors on the value of objective functions in an optimization procedure.
Figs. 1(a)–1(d) show the average intensity values , rootmeansquare errors s_{i} [equation (5)] and standard errors SE_{i} [equation (6)], for iPP, PVDF, CeI and CeII samples, calculated based on five diffraction curves recorded for each polymer. As one can see, the values of the rootmeansquare error s_{i} are more or less proportional to the average intensities , and they are clearly lower than those of the standard error SE_{i}. Only at a few points, where the intensity is very high, is the s_{i} bigger than SE_{i}.
Figs. 2(a)–2(d) show the relative errors, i.e. the ratios of the rootmeansquare error s_{i} and standard error SE_{i} to the average intensity . It is seen that the relative errors in the range of the diffraction angle where high peaks are localized (t_{i} ≃ 15–25°) are much smaller than those in the range where no peaks are present (t_{i} ≃ 10–15°and 30–50°). Of course, this is compatible with equation (7), according to which the higher the intensity, the lower the relative error.
The presented figures indicate that when the objective function is created based on the absolute errors, its value is mostly dependent on the points from such ranges of WAXD curves where the crystalline peaks are located. In contrast, when the relative errors are taken into account, the biggest influence on the objective function is from ranges where no peaks are present.
Thus, in order to obtain the highest quality of fitting in the ranges comprising the crystalline peaks we should choose the first solution. On the other hand, if we assume that the quality of fitting is most precisely described by the relative errors, the second possibility should be chosen. In this paper the models obtained with these two types of objective functions are compared and evaluated.
4. Methods of fitting a theoretical curve to the experimental WAXD curve
In the bicriterial optimization procedure the first requirement for optimal fitting of a theoretical curve to the experimental WAXD curve is the superior one. It can be reached by means of different methods of fitting using different objective functions F which are minimized to obtain the best quality of fitting. The methods analysed and compared in this work are listed below.
M1. Leastsquares method. The method of least squares is one of the fundamental tools in scientific investigation (Nielsen, 2000, 2001). It consists of minimization of the sum F1 of squared deviations between experimental intensities y_{i} and theoretical ones resulting from a mathematical model of the WAXD curve,
where n is the number of experimental points (diffraction angles) and is a random error.
This method assumes that the experimental measurements are free of systematic errors and are performed with a random, normally distributed error with the same variance at each diffraction angle. The leastsquares method is very sensitive to the local outliers, i.e. single atypical intensity values, considerably different from the remaining ones, which are caused by various random factors.
M2. Least absolute deviations method. This method is less sensitive to the negative influence of outliers on the obtained parameters of the model. It consists of minimization of the sum F2 of absolute deviations between experimental and theoretical intensities,
M3. Least relative squares method. This method takes into account that the biggest standard deviations of intensity values in WAXD curves are frequently observed in such ranges of diffraction angle where strong crystalline peaks are located. This is why the squared deviations between experimental and theoretical intensities at a given diffraction angle are divided by the local variance. In this way a lower weight is attributed to the less accurate measurements and a higher weight to the more precise ones (Strutz, 2016).
As the variance is not known, it is substituted by its estimator – standard error . Thus, the minimized objective function F3 has the shape of equation (12):
M4. Least absolute relative deviations. The method is similar to the previous one but this time the absolute deviations between experimental and theoretical intensities at a given diffraction angle are divided by the local experimental intensity. The minimized objective function F4 is given by
M5. Weighted leastsquares method. Similar to the method M3, this one also takes into account that the variance of intensity is not the same at all diffraction angles. For this reason, the squared differences between experimental and theoretical intensities at a given diffraction angle are divided by the local variance .
To employ this method the diffraction curve of each polymer was recorded five times at the same experimental conditions. Based on these data, the average intensity [equation (8)] and rootmeansquare error s_{i} [equation (9)] for each diffraction angle were calculated. Next s_{i}^{2} was used as an estimator of the local variance .
The minimized objective function F5 is given by
M6. Leastsquared relative deviations method. In this method the minimized objective function F6 is calculated as the sum of squared deviations between experimental and theoretical intensities divided by the squared experimental intensity at a given diffraction angle. In other words, it is the sum of squared relative deviations,
5. Measures and statistical tests for evaluation of the fitting methods
A comparison and evaluation of the methods of fitting described above and obtained mathematical models of an experimental WAXD curve should encompass three aspects.
(i) First of all we have to check if positions of crystalline peaks determined with a given method agree with those resulting from the unitcell parameters of the investigated polymer.
(ii) Next we should check if residuals, i.e. the final values of differences between the experimental and theoretical bestfitted curve, fulfil all conditions required by the methods. To assess credibly the statistical correctness of a model we should check if the residuals fulfil a set of conditions listed below. The residuals should be:
(a) Unbiased, i.e. the expected value of residuals is zero.
(b) Symmetric, i.e. the numbers of positive and negative residuals are the same.
(c) Random, i.e. the experimental points must be randomly dispersed along the theoretical curve.
(d) Uncorrelated, i.e. a lack of autocorrelation of the residuals – there are no hidden trends in their course.
(e) Homoscedastic, i.e. the variance of the residuals should be constant.
Moreover, method M1 demands the residuals to be normally distributed.
When the residuals do not fulfil the required conditions, it means that the mathematical model of the curve is wrong and should be rejected.
In this work the first four conditions were checked by the following statistical tests: unbiasedness of residuals test (Schwefel, 1981; Conover, 1999), symmetry of residuals test, Wald–Wolfowitz series test (Wald & Wolfowitz, 1940), Durbin–Watson test (Durbin & Watson, 1951; Hill & Flack, 1987). To verify the fifth condition, the whole range of diffraction angles in which the WAXD curves were recorded was divided into subranges and the average values of residuals in the subranges were compared with each other, respectively. The normality of residuals in method M1 was tested by means of the chisquared test (Greenwood & Nikulin, 1996).
(iii) Finally, we should assess the quality of fitting, i.e. the quality of the obtained model of the curve.
In the literature we found various measures of similarity, socalled information criteria, used for the statistical assessment of the quality of models and for their comparison. Comparing several models, the information criteria help to estimate which one of them is most suitable for a given set of experimental data. In this work two information criteria were employed:
Integral similarity index (Hofmann & Kuleshova, 2005) S_{s}:
Normalized index (Hofmann & Kuleshova, 2005) R:
By means of these parameters different models of the same diffraction curve can be compared. More precisely, they allow one to compare an experimental curve with different models of this curve.
The best model is that one for which the information criteria reach the smallest values. Both R and S_{s} are equal to zero when the quality of fitting is the best, i.e. the theoretical and experimental curves are identical. It is easy to notice that the integral similarity index S_{s} is calculated as the average value of the absolute differences between the normalized integral theoretical and experimental intensities. In turn, according to equation (17), the normalized R index is the arithmetic average of the normalized absolute differences between the experimental and theoretical curve.
Presenting in one plot the normalized theoretical integral intensity
and normalized experimental integral intensity
as functions of the diffraction angle, we obtain socalled integral curves which allow for visual evaluation of the quality of fitting. The better the quality of fitting, the closer the theoretical and experimental integral curves are to each other. It is a very sensitive tool for the quality of fitting evaluation (Hofmann & Kuleshova, 2005).
6. Results of investigations and evaluation of the methods
The WAXD curves of all investigated polymers were decomposed by means of the PSO optimization procedure employing the six tested methods M1–M6. Each decomposition procedure by means of a given method resulted in one model of the curve.
According to Section 5, the evaluation of employed methods was a threestep process. In the first step, the correctness of the angular positions of crystalline peaks determined with the methods was verified. Next, the statistical tests checking if the residuals met the necessary conditions listed in Section 5 were performed and, finally, the quality of the models was assessed.
Before the evaluation procedure the X) of the investigated polymers was calculated based on parameters found by means of the compared methods. It was calculated as the ratio of the integral intensity contained in crystalline peaks to the total intensity scattered by a sample. Table 1 shows the ranges of X values obtained with each method in ten runs of calculations performed for the investigated polymers.
(

The table shows that, depending on the method employed, the results obtained for a given polymer may differ even by several %. As one can see, apart from PET the differences between the crystallinity values determined for a given polymer with a given method amount to several % but the crystallinities obtained with different methods may differ by more then a dozen % from one another, which means that the differences are significant. In the case of PET, the differences are even bigger. This fact clearly confirms that the objective function used in an optimization procedure influences considerably the shape of the theoretical curve and its parameters. This is why the choice of the most credible method is an important task.
6.1. Verification of the positions of crystalline peaks
As concerns cellulose I, cellulose II and PA6 the angular positions of most of the crystalline peaks determined with all six methods agree well with those resulting from the respective unitcell parameters. Only in the case of small, broad peaks localized at large diffraction angles are the discrepancies slightly higher. The same is true of the curves of iPP, PVDF and PE. Of course, when comparing the angular position of crystalline peaks one should remember that, even in the case of the same polymer but crystallized at different conditions, the positions of peaks may differ slightly. In contrast, in the case of PET, the positions of peaks determined with methods M4 and M6 do not agree with those resulting from the unitcell parameters.
The examples of decomposed WAXD curves are shown in Figs. 3–9 and determined positions of crystalline peaks are collected in Tables 2–7.





Isotactic polypropylene (iPP). The WAXD curve of iPP contains 12 crystalline peaks and two amorphous maxima (Fig. 3). The total number of unknown parameters determined with the PSO optimization procedures was 56.
Polyvinylidene fluoride (PVDF). The WAXD curve of PVDF contains 14 crystalline peaks and two amorphous maxima (Fig. 4). The total number of unknown parameters determined with the PSO optimization procedures was 64.
Cellulose I (CeI). The WAXD curve of cellulose I contains ten crystalline peaks and two amorphous maxima (Fig. 5). The total number of unknown parameters determined with the PSO optimization procedures was 48.
Cellulose II (CeII). The WAXD curve of cellulose II contains five crystalline peaks and two amorphous maxima (Fig. 6). The total number of unknown parameters determined with the PSO optimization procedures was 28.
Polyethylene (PE). In the case of the WAXD curves of PE the two strongest peaks (110) and (200) (Fig. 7) are slightly asymmetric. This means that the models in which these peaks are approximated by a linear combination of Gauss and Cauchy profiles do not give a good fit to the experimental curve. For this reason, the approach of Baker & Windle (2001) has been employed in this work.
According to these authors, the peaks (110) and (200) seem to be asymmetric because two smaller and broader peaks are localized on their left, lowangle side. Baker and Windle have proposed that these additional peaks [denoted here as (110)* and (200)*] are related to a third, partly ordered phase, the density of which is intermediate between those of crystalline and amorphous phases. Because the third phase is much less ordered than the crystalline one, it does not contribute to the remaining crystalline peaks located at higher angles (Baker & Windle, 2001). The hypothesis of Baker and Windle on the existence of the third, partly ordered phase in PE is fully consistent with the results presented by other authors (Wang et al., 1991; Kitamaru et al., 1996; Suzuki et al., 1985; Popli et al., 1984, etc.). Thus, the WAXD curve of PE was decomposed into 16 crystalline peaks, two peaks (110)* and (200)* arising from the partly ordered phase and two amorphous maxima. The total number of unknown parameters was 76.
The angular positions of crystalline peaks of PE determined by means of the PSO optimization procedure were identical for all five tested methods and identical to those resulting from the unitcell parameters of PE. This is why a respective table comparing the experimental and literature data is not presented. Literature data were calculated based on the unitcell parameters of PE given by Swan (1962).
Polyethylene terephthalate (PET). The WAXD curve of PET and bestfitted theoretical curve are shown in Fig. 10. The curve contains 12 crystalline peaks and two amorphous maxima. The total number of unknown parameters determined with the PSO optimization procedures was 64. The angular positions determined with the PSO algorithm are listed in Table 6. For the methods M1, M2 and M3 they agree well with the literature data calculated based on the unitcell parameters of PET (Daubeny et al., 1954). However, in the case of methods M4 and M6 big discrepancies between experimental and literature data are observed.
Polyamide 6 (PA6). The WAXD curve of PA6 and bestfitted theoretical curve are shown in Fig. 11. The curve contains five crystalline peaks and two amorphous maxima. Their angular positions determined with the PSO algorithm agree well with the literature data calculated based on the PA6 unitcell parameters given by Holmes et al. (1955).
6.2. Analysing and testing of the residuals
Figs. 10(a)–10(d) present a comparison of the errors SE_{i} and s_{i} with the absolute values of residuals obtained in the tested methods for iPP in the 2θ ranges with high intensities [(a) for the methods M1, M3 and M5 and (b) for the methods M1, M2, M4 and M6] and in the 2θ ranges with low intensities [(c) for the methods M1, M3 and M5 and (d) for the methods M1, M2, M4 and M6]. A similar comparison related to CeI is presented in Figs. 11(a)–11(d).
The figures testify that both in the 2θ ranges with high (crystalline peaks) and low values of intensity the residuals are much smaller than the standard errors SE_{i}. No correlation, trends or interdependencies between the errors SE_{i} and s_{i} can be noticed.
In the case of the models obtained for the WAXD curve of iPP the residuals are also smaller than the rootmeansquare errors s_{i} calculated based on five independently recorded curves. In the case of PVDF, CeI and CeII, the residuals are very close to the respective errors s_{i}. One can notice that the highest residuals are obtained using the methods M4 and M6. The residuals obtained in the methods M1, M3 and M5 are nearly the same – the respective plots nearly overlap each other. Similar results were also obtained for PVDF and CeII.
6.3. Statistical tests
To check if the residuals obtained in a given method met the necessary conditions listed in Section 5, we performed suitable statistical tests. The hypotheses that the conditions were fulfilled were verified with the significance level of 0.05 which meant that the probability of rejection of a true hypothesis was 0.05.
The results of the performed tests are shown graphically in Fig. 12. As each decomposition procedure with a given method (M1–M6) was run ten times, the presented values are the fractions of positive results of a given test, i.e. the number of positive results of a test divided by ten. Obviously, the higher this value, the better fulfilled is the tested condition.
The plots testify that only in the case of method M1 are all conditions related to the residuals met for all polymers. The residuals in method M2 are most frequently correlated. In methods M3 and M5 they are asymmetric and biased. Moreover, the residuals in method M5 are correlated. In the case of methods M4 and M6 only the randomness of the residuals is fulfilled.
6.4. Testing of the homoscedasticity of residuals
The homoscedasticity of residuals means that they are of the same order of magnitude in all subranges of the whole recording range. They cannot systematically increase or decrease with increasing diffraction angle. To verify if residuals are homoscedastic, the whole range of diffraction angles (5–60°) in which the WAXD curves were recorded was divided into four subranges. For a given polymer the subranges were chosen in such a way that one of them comprised points with the highest values of intensity (crystalline peaks) and another one included points with the lowest intensities (peripheral region). For each range the average value of residuals obtained in each method was calculated. According to the condition of homoscedasticity, the averages of residuals in all subranges should not differ significantly from each other and should be close to zero.
The averages of residuals (their absolute values) in the subranges with the highest and the lowest intensities, calculated for all methods and polymers, are shown in Figs. 13 and 14, respectively. Fig. 15 shows the averages of residuals (their absolute values) in the whole recording range. As we see, only for the residuals obtained with method M1 is the condition of homoscedasticity met for all polymers. Method M2 gives small residuals in the subranges with low intensity values and big ones in the subranges of high intensity, while the inverse is true for method M3. In the case of methods M4 and M6 the residuals are big in the whole recording range and different for different polymers.
Fig. 16 may serve as a good illustration of the homoscedasticity of residuals in method M1. In this figure we can compare the WAXD curve of iPP and residuals obtained with this method. The residuals are very small and nearly the same in the whole 2θ range.
6.5. Quality of mathematical models of WAXD curves
To evaluate the quality of mathematical models of WAXD curves obtained by means of the tested methods M1–M6, the integral similarity index S_{S} and normalized R index were calculated for all models and compared with each other. A graphical presentation of the obtained results is given in Figs. 17 and 18. The presented values of both indices were calculated by averaging the results obtained in ten runs of the decomposition procedure. It should be emphasized that the lower the values of S_{S} and R, the better is the model, i.e. the better quality of fitting of the theoretical curve to the experimental one. It is clearly seen in the figures that for all polymers the lower values of analysed indices, and thereby the highest quality of fitting, is reached by method M1.
As has already been mentioned in Section 5, the quality of fitting offered by a given model can also be visually evaluated by comparing the socalled theoretical integral intensity curve related to the model with the experimental integral intensity curve Y(2θ) related to the experimental WAXD curve. The integral intensities can be calculated using formulas (18), (19) and plotted in one figure. The shapes of the integral intensity curves of various polymers differ clearly from each other, being characteristic for a given polymer.
Fig. 19 shows the experimental integral intensity curve determined for iPP superimposed onto the original WAXD curve.
Fig. 20 presents the experimental integral intensity curve of iPP and theoretical integral intensity curves obtained with methods M1–M6. We see that all theoretical intensity curves are very close both to each other and to the experimental integral intensity curve. However, a magnified picture in the inset shows clear shifts between the curves. A careful inspection of such plots, performed in the whole range of the diffraction angle 2θ, showed that generally for all polymers the smallest differences between theoretical and experimental integral intensity curves are observed in the case of the models obtained with method M1.
7. Summary
The analyses presented in this work clearly show that the objective function which is minimized in the fitting of a theoretical curve to the experimental one influences considerably the shape of the theoretical curve and its parameters. In comparing and evaluating the six methods of fitting of a theoretical curve to the experimental one, it was assumed that the best method should not only give the crystalline peak positions compatible with the crystalline structure of the investigated polymer but also it should be marked by the lowest values of the informational criteria S_{S} and R, and the smallest differences between experimental and theoretical integral curves. Moreover, the residuals obtained with this method should fulfil the conditions described in Section 5.
The performed analysis shows that all these requirements were fulfilled in the best way by method M1 (leastsquares method). Moreover, it was shown that for all tested polymers the scatter of crystallinity values obtained with this method is the smallest (Table 1). It means that in order to obtain the most credible mathematical model of an experimental curve, useful for determination of the structural parameters of the investigated polymer, we should employ this method.
The least absolute deviations method (M2) treats the tops of sharp reflections as outliers and for this reason it should not be used for polymers, the WAXD curves of which contain narrow crystalline peaks (e.g. iPP or PVDF). Employing this method we obtained higher values of S_{S} and R and bigger differences between the integral curves. Furthermore, the residuals were not always normally distributed and uncorrelated.
Yet higher values of S_{s} and R and bigger differences between the integral curves were obtained for all polymers when the weighted methods M3 (least relative squares), M4 (least absolute relative deviations), M5 (weighted least squares) and M6 (leastsquared relative deviations) were used. Additionally, the residuals obtained with these methods did not meet the required conditions and usually they were biased, asymmetric and interrelated. The obtained results showed that method M6 was the worst of all compared methods.
The investigations presented in this work show that it is difficult to find rational reasons which could justify application of the objective functions based on relative errors in mathematical modelling of the WAXD curves.
References
Ash, R. B. & DoleansDade, C. A. (2000). Probability and Measure Theory, 2nd ed. San Diego: Elsevier Science Publishing Co. Inc. Google Scholar
Baker, A. M. E. & Windle, A. H. (2001). Polymer, 42, 667–680. Web of Science CrossRef CAS Google Scholar
Bark, M., Zachmann, H. G., Alamo, R. & Mandelkern, L. (1992). Makromol. Chem. 193, 2363–2377. CrossRef CAS Google Scholar
Chen, H. & Yokochi, A. (2000). J. Appl. Polym. Sci. 76, 1466–1471. CrossRef CAS Google Scholar
Conover, W. J. (1999). Practical Nonparametric Statistics, 3rd ed. New York: Wiley. Google Scholar
Daubeny R. de P., Bunn, C. W. & Brown, C. J. (1954). Proc. R. Soc. London A, 226, 531–542. Google Scholar
Dekking, F. M. (2010). A Modern Introduction to Probability and Statistics. London: Springer. Google Scholar
Durbin, J. & Watson, G. S. (1951). Biometrika, 38, 159–178. CrossRef PubMed CAS Web of Science Google Scholar
Ellefsen O. (1960). Norelco Reporter, 7, 104. Google Scholar
Goldanski, W. I., Kucenko, A. W. & Podgorecki, M. I. (1963). Statystyka pomiarów przy rejestracji promieniowania jądrowego. Warszawa: PWN. Google Scholar
Greenwood, P. E. & Nikulin, M. S. (1996). A Guide to Chisquared Testing. New York: Wiley. Google Scholar
Hill, R. J. & Flack, H. D. (1987). J. Appl. Cryst. 20, 356–361. CrossRef CAS Web of Science IUCr Journals Google Scholar
Hindeleh, A. M. & Johnson, D. J. (1974). Polymer, 15, 697–705. CrossRef CAS Web of Science Google Scholar
Hindeleh, A. M. & Johnson, D. J. (1978). Polymer, 19, 27–32. CrossRef CAS Web of Science Google Scholar
Hofmann, D. W. M. & Kuleshova, L. (2005). J. Appl. Cryst. 38, 861–866. Web of Science CrossRef CAS IUCr Journals Google Scholar
Holmes, D. R., Bunn, C. W. & Smith, D. J. (1955). J. Polym. Sci. 17, 159–177. CSD CrossRef CAS Web of Science Google Scholar
Hu, X. & Hsieh, Y. (1996). J. Polym. Sci. B Polym. Phys. 34, 1451–1459. CrossRef CAS Google Scholar
Kennedy, J. & Eberhart, R. (1995). Particle Swarm Optimization, Proceedings of ICNN'95 – International Conference on Neural Networks, Vol. 4, pp. 1942–1948. Perth. Google Scholar
Kitamaru, R., Nakaoki, T., Alamo, R. G. & Mandelkern, L. (1996). Macromolecules, 29, 6847–6852. CrossRef CAS Web of Science Google Scholar
Lovinger, A. J. (1982). Developments in Crystalline Polymers – 1, edited by D. C. Bassett. London and New Jersey: Applied Science Publishers. Google Scholar
Mencik, Z. (1960). Chem. Prumysl. 10, 377. Google Scholar
Nielsen, L. (2000). Evaluation of Measurement Intercomparisons by the Method of Least Squares. Technical report DFM99R39. Danish Institute of Fundamental Metrology, Denmark Google Scholar
Nielsen, L. (2001). Evaluation of Measurements by the Method of Least Squares. ADP013728. Algorithms For Approximation IV. Proceedings of the 2001 International Symposium, University of Huddersfield. Google Scholar
Paralikar, K. M. & Batrabet, S. M. (1981). J. Polym. Sci. B Polym. Lett. Ed. 19, 555–560. CrossRef CAS Web of Science Google Scholar
Popli, R., Glotin, M., Mandelkern, L. & Benson, R. S. (1984). J. Polym. Sci. Polym. Phys. Ed. 22, 407–448. CrossRef CAS Web of Science Google Scholar
Rabiej, M. (2003). Polimery, 48, 288–295. Web of Science CrossRef CAS Google Scholar
Rabiej, M. (2013). J. Appl. Cryst. 46, 1136–1144. Web of Science CrossRef CAS IUCr Journals Google Scholar
Rabiej, M. (2014). J. Appl. Cryst. 47, 1502–1511. Web of Science CrossRef CAS IUCr Journals Google Scholar
Rabiej, M. (2017a). J. Appl. Cryst. 50, 221–230. Web of Science CrossRef CAS IUCr Journals Google Scholar
Rabiej, M. (2017b). Polimery, 62, 11–12. Web of Science CrossRef Google Scholar
Rabiej, M. & Rabiej, S. (2005). Fibres Textiles in Eastern Europe, 13, 75–78. CAS Google Scholar
Russell, K. E., Hunter, B. K. & Heyding, R. D. (1993). Eur. Polym. J. 29, 211–217. CrossRef CAS Web of Science Google Scholar
Russell, K. E., Hunter, B. K. & Heyding, R. D. (1997). Polymer, 38, 1409–1414. CrossRef CAS Web of Science Google Scholar
Sajkiewicz, P., Hashimoto, T., Saijo, K. & Gradys, A. (2005). Polymer, 46, 285. Web of Science CrossRef Google Scholar
Schwefel, H. P. (1981). Numerical Optimization of Computer Models. New York: John Wiley & Sons. Google Scholar
Strutz, T. (2016). Data Fitting and Uncertainty (a Practical Introduction to Weighted Least Squares and Beyond), 2nd ed. Wiesbaden: Springer Vieweg. Google Scholar
Suzuki, H., Grebowicz, J. & Wunderlich, B. (1985). Makromol. Chem. 186, 1109–1119. CrossRef CAS Google Scholar
Swan, P. R. (1962). J. Polym. Sci. 56, 409–416. CrossRef CAS Web of Science Google Scholar
Wald, A. & Wolfowitz, J. (1940). Ann. Math. Stat. 11, 147–162. CrossRef Google Scholar
Wang, L. H., Porter, R. S., Stidham, H. D. & Hsu, S. L. (1991). Macromolecules, 24, 5535–5538. CrossRef CAS Web of Science Google Scholar
Wang, Z. G., Hsiao, B. S., Sirota, E. B. & Srinivas, S. (2000). Polymer, 41, 8825–8832. Web of Science CrossRef CAS Google Scholar
This is an openaccess article distributed under the terms of the Creative Commons Attribution (CCBY) Licence, which permits unrestricted use, distribution, and reproduction in any medium, provided the original authors and source are cited.