The accuracy of NIRS in predicting chemical composition and fibre digestibility of hay-based total mixed rations

Abstract The aim of this study was to develop near-infrared spectroscopy (NIRS) prediction models for the estimation of chemical components and the fibre undegradable fractions (uNDF) of hay-based total mixed rations (TMR). A total of 205 TMR samples were used for the study. All the chemical components were measured using standard AOAC reference methods and expressed as percentages of dry matter (DM). Prediction models were developed using both cross- and independent validation and different mathematical treatments applied on spectral data. The best spectral treatment was chosen based on the method which simultaneously achieved the lowest root mean square error and the highest explained variance in cross-validation. The coefficient of determination in external validation (R2 P) was the greatest for starch prediction model (R2 P = 0.84), followed by acid detergent fibre (ADF; R2 P = 0.79), and amylase-treated ash-corrected NDF with addition of sodium sulphite (aNDFom) and crude protein prediction models (CP; R2 P = 0.73). The concordance correlation coefficient (CCC) in validation ranged from 0.66 (ash prediction model) to 0.92 (starch prediction model), indicating substantial to accurate models’ predictive ability. This study indicated that NIRS can be a screening method for the prediction of CP, Starch, aNDFom, ADF, acid detergent lignin (ADL), uNDF and Ash. The use of TMR utilised in various herds provided high variability for the NIRS calibration dataset, implying that the developed NIRS pre-diction models could be applicable to TMR collected from herds located in the Parmigiano Reggiano cheese production area. Highlights NIRS can be successfully employed to determine quickly and at cost-effective different compositional and digestibility traits in hay-based TMR. TMR analysis predicted by NIRS can support nutritionists in the formulation of diets containing a proper nutrient profile to sustain physiological, metabolic, and immunological processes. The use of NIR technology for TMR analysis can allow frequent monitoring of rations and increasingly timely corrections, maximising cows’ diet utilisation and conversion of the ingested feed.

independent validation and different mathematical treatments applied on spectral data. The best spectral treatment was chosen based on the method which simultaneously achieved the lowest root mean square error and the highest explained variance in cross-validation. The coefficient of determination in external validation (R 2 P ) was the greatest for starch prediction model (R 2 P ¼ 0.84), followed by acid detergent fibre (ADF; R 2 P ¼ 0.79), and amylase-treated ash-corrected NDF with addition of sodium sulphite (aNDFom) and crude protein prediction models (CP; R 2 P ¼ 0.73). The concordance correlation coefficient (CCC) in validation ranged from 0.66 (ash prediction model) to 0.92 (starch prediction model), indicating substantial to accurate models' predictive ability. This study indicated that NIRS can be a screening method for the prediction of CP, Starch, aNDFom, ADF, acid detergent lignin (ADL), uNDF and Ash. The use of TMR utilised in various herds provided high variability for the NIRS calibration dataset, implying that the developed NIRS pre-diction models could be applicable to TMR collected from herds located in the Parmigiano Reggiano cheese production area.

HIGHLIGHTS
NIRS can be successfully employed to determine quickly and at cost-effective different compositional and digestibility traits in hay-based TMR. TMR analysis predicted by NIRS can support nutritionists in the formulation of diets containing a proper nutrient profile to sustain physiological, metabolic, and immunological processes. The use of NIR technology for TMR analysis can allow frequent monitoring of rations and increasingly timely corrections, maximising cows' diet utilisation and conversion of the ingested feed.

Introduction
Eighteen percent of the total Italian bovine milk production is intended for Parmigiano Reggiano cheese production. This cheese is a Protected Designation of Origin (PDO) product, and it is one of the most traded Italian dairy products (CLAL 2021). Parmigiano Reggiano is manufactured from the clotting of raw bovine milk, produced by cows fed with a total mixed ration (TMR) hay-based diet without the addition of any silage, and reared in some specific provinces of Northern Italy (Consorzio del Formaggio Parmigiano Reggiano 2011).
Accurate and real-time analysis of TMR provides fundamental information to meet the exact nutritional requirements on field conditions. An inappropriate formulation of the TMR can affect rumen functionality and, particularly in high-producing dairy cattle, it may increase the risks of developing some metabolic disorders such as subacute ruminal acidosis (SARA; Humer et al. 2018), abomasum displacement, fatty liver, laminitis, liver abscesses and downer cow syndrome (Plaizier et al. 2008;Zebeli and Metzler-Zebeli 2012). Moreover, poorly formulated TMR could impair cows' productivity and efficiency, with a detrimental effect on the sustainability of the dairy production sector (Connor 2015).
The management of high-yielding cows requires frequent monitoring of rations and increasingly timely corrections. The control of TMR composition not only requires a good mixer-wagon, but also constant monitoring of feed quality, particularly of forages, which are the feeds with the greatest variability (Palmonari et al. 2014;Palmonari et al. 2016). In recent decades, many laboratories have developed analytical techniques based on physical methods of analysis, including near-infrared spectroscopy (NIRS). The use of this technology for feedstuff analysis has increased in the last years (Mentink et al. 2006). NIRS is a rapid and costeffective tool for in-line control of the quality of feed offered to animals, allowing nutritionists to get instant feedback on the characteristics of feedstuffs. This technique can be employed to obtain a wide number of analytical parameters simultaneously just from a single spectrum. Furthermore, NIRS is a non-destructive technique, therefore the sample can be stored and eventually used for other purposes. The use of NIRS is a valuable strategy for selecting potential treatments that increase feed digestibility and for avoiding timeconsuming chemical analysis (Reeves 1994).
This technology has been successfully employed to measure the composition and the quality of single and mixed feedstuffs (Abrams et al. 1988;Hoffman et al. 1999;Belanche et al. 2013;Simoni et al. 2021). Mentink et al. (2006), has developed NIRS prediction models for basic nutrients in TMR such as CP, neutral detergent fibre (NDF), starch, non-fibre carbohydrate (NFC) and fat. Lundberg et al. (2004), concluded that NIRS can be effective in predicting the total digestible nutrients (TDN) and in vitro digestibility of organic matter. Moreover, a couple of studies (Righi et al. 2017;Brogna et al. 2018) demonstrated the effectiveness of NIRS to predict DM, CP, starch, ash, aNDFom, ADF, ADL and undigested NDF (uNDF 240 ) in animal faeces. The NIRS profile of the faeces is considered an excellent tool for predicting the composition and digestibility of the animal's diet and the amount of ingested dry matter (Johnson et al. 2017). To the authors' knowledge, there are no studies in the literature investigating the use of NIR to assess the quality of the TMR used for Parmigiano Reggiano ration. The main characteristics of this ration are the exclusion of all silage in the cows' ration and the use of hay as the main source of dry matter (at least 50% of the ration).
Therefore, the aim of the present study was to determine the effectiveness of NIRS to predict the chemical composition and the fibre undegradable fractions (uNDF) of TMR for Parmigiano Reggiano haybased rations. The practical results of the current research can support nutritionists in the formulation of diets containing a proper nutrient profile to sustain the functioning of physiological, metabolic, and immunological processes in the cattle, and to maximise cows' utilisation and conversion of the ingested feed.

Sample collection
Total mixed ration samples were randomly sampled from different trials (Bonfante et al. 2016;Fustini et al. 2017;Cavallini et al. 2018;Mammi et al. 2018;Buonaiuto et al. 2021;Cavallini, Mammi, Biagi, et al. 2021;Heinrichs et al. 2021) carried out in the experimental herd of the Department of Veterinary Medical Sciences (DIMEVET), University of Bologna, Italy (n ¼ 126). Moreover, a total of 79 TMR samples originated from six commercial dairy farms operating in the Parmigiano Reggiano cheese production area. All the samples (1 kg) were collected from three distinct positions of the manger (beginning, middle, end) immediately after the morning preparation (between 7 and 8 a.m.) of the TMR.
All the farms involved used a TMR feeding system typical of the Parmigiano Reggiano area, consisting of dry hay-based diets (mainly dried alfalfa and dried grass) without the presence of fermented forages (silage). The TMR mixture was prepared and distributed twice a day (every 12 h), in order to reduce the intensity of fermentation phenomena in the feed bunk (Mordenti et al. 2017). Diet formulation followed the specific limits of feed described by Parmigiano Reggiano Guidelines (Consorzio del Formaggio Parmigiano Reggiano 2011). Moreover, after TMR delivery the physical effectiveness factor of the diet was measured (PEF, Heinrichs 2013) and results from 47 to 52%. These data are comparable whit that reported from other commercial dairy farms .
All the samples were immediately frozen to be subsequently delivered to the laboratory of the Animal Production and Food Safety service of the DIMEVET of the University of Bologna, Italy.
After being delivered to the laboratory, all the samples were spread over an area of one square metre, mixed and divided into 4 squares of 250 g each, one of which was used for the analysis. All the samples were analysed with the following methods, after ovendrying at 65 C until constant weight to determine the DM and then ground in a Foss Tecator Cyclotec Sample Mill (model 1093; Foss Tecator, H€ ogan€ as, Sweden) to obtain a particle size of 1 mm.

Spectra acquisition
Total Mixed ration spectra from 900 to 2500 nm were collected using a TANGO FT-NIR spectrometer (Bruker Optics GmbH, Ettlingen, Germany). Ground samples were distributed in a spinning cup holder for the spectra acquisition. The spectrometer resolution was set on 8 cm and spectra were recorded by OPUS software (version 7.5, Bruker, USA) and obtained by averaging 32 rotating scans with a 97-mm rotator supporter. The spectra were collected in reflectance (R) mode and then transformed into absorbance (log 10 1/R). The homogeneous distribution of the spectra population was checked by principal component analysis (PCA) and visualised using the Opus software by PCA spectra scores.

Statistical analysis
Descriptive statistics, including mean, standard deviation (SD), minimum and maximum were calculated for all the traits analysed. The chemometric analysis, including calibration and validation of NIRS prediction models for the previously described traits, was carried out using the software OPUS ver. 7.5 (Bruker, USA, version 7.5). Prior to chemometric analysis, references values were matched to their respective raw spectra. Subsequently, samples were randomly assigned to two different subsets: a calibration dataset (70% of the total observations for each trait), used to generate the NIRS prediction models, and a validation dataset (30% of the total observations for each trait), used as an independent dataset in which the prediction models were applied to quantify their predictive ability. Descriptive statistics, including mean and standard deviation, of the studied traits were similar in both calibration and validation subsets. Calibration models were developed according to Giaretta et al. (2019), using different methods, in order to explore the best way to predict TMR composition by NIRS. Briefly, prediction models were developed using partial least squares regression (PLSR; Shenk and Westerhaus 1996). Different mathematical pre-treatments on spectral data, such as vector normalisation (VN), multiplicative scatter correction (MSC), subtraction of a straight line (SLS), first derivative (1 D) and second derivative (2 D) were tested and combined using the 'Optimize' option of OPUS software, which finds the best mathematical treatment according to the lowest root mean square error of prediction (RMSE P ; Naes et al. 2002). The optimal number of PLSR factors was determined in the calibration subset using an internal leave-oneout cross-validation, and it was defined as the lowest number of factors to achieve the lowest RMSE P . The maximum allowed number of PLSR factors was set to 20. The goodness-of-fit statistics considered in the present study were the coefficient of determination in calibration and prediction sets (R 2 C and R 2 P , respectively), the root mean square error of cross-validation (RMSE CV ) and the RMSE P . Moreover, the ratio of prediction to deviation (RPD), which is a practical indicator of models' utility, was calculated as the ratio between the SD to the root mean square error in both cross-validation (RPD C ¼ SD/RMSE CV ) and prediction (RPD V ¼ SD/RMSE P ). Moreover, to evaluate the practical utility of the prediction models, the concordance correlation coefficient (CCC) was calculated using the following formula (Lin 1989): where COV (V P ; V R ) is the covariance between the reference (V R ) and predicted values (V P ), r 2 R is the variance of the reference values, r 2 P is the variance of the predicted values, and l P and l R represent the mean of the predicted and reference values, respectively. When CCC is between 0.21 and 0.40 indicates fair predictive ability, between 0.41 and 0.60 indicates moderate predictive ability, between 0.61 and 0.80 indicates substantial predictive ability, and between 0.81 and 1.00 indicates accurate predictive ability (Lin 1989;Visentin et al. 2015).

Descriptive statistics
Descriptive statistics of TMR chemical composition are presented in Table 1. Crude protein ranged from 6.57 to 20.6% of DM with a CV of 14%, while aNDFom varied between 23.0 and 64.90% of DM with a CV of 19.4% in the TMR. Similarly, the uNDF 240 content of TMR ranged from 3.48 to 23.7% of NDF, indicating that a wide digestibility potential existed in the TMR dataset. The traits with the highest variability were starch (CV ¼ 26.30%), ADL (CV ¼ 27.80%) and uNDF 240 (CV ¼ 33.20%). Large and representative variability is a desired characteristic in a calibration dataset and could contribute to generate accurate and robust NIRS prediction models (De Marchi et al. 2014;De Marchi et al. 2018;Wiedemair et al. 2019). Table 2 depicts the best calibration model for the chemical composition obtained from TMR samples. Starch, aNDFom, CP, and ADF contents of TMR were predicted by NIRS with an optimal prediction accuracy (R 2 P > 0.70). Among all the various mathematical treatments applied for developing the prediction  models, taking the first derivate was the best spectral transformation to improve the models' predictive ability for CP, starch, ash, uNDF24, uNDF 30 and uNDF 240 . The second derivative maximised the explained variance in external calibration for aNDFom, ADF and uNDF 120 . Vector normalisation was the best mathematical treatment only for the model developed for ADL. The best prediction models were obtained for starch (R 2 P ¼ 0.83; RPD ¼ 2.53), ADF (R 2 P ¼ 0.79; RPD ¼ 2.20), CP (R 2 P ¼ 0.73; RPD ¼ 1.93) and aNDFom (R 2 P ¼0.73; RPD ¼ 1.94), whose accuracy indicates a good estimation of the reference values; the calibration model with the lowest accuracy was obtained for ash (R 2 P ¼0.47; RPD ¼ 1.37). According to Williams (2004), the value of R 2 obtained in the present study is usable for screening and most applications, including research. The CCC in validation observed for the prediction models ranged from 0.66 (for ash prediction model) to 0.92 (starch prediction model). According to that reported in Visentin et al. (2015) the CCC obtained for all the traits investigated in the present study indicate a substantial to accurate models' predictive ability The scatter plots of reference versus predicted TMR chemical composition and fibre digestibility are shown in Figures 1 and 2. The degree of dispersion observed for the ash content indicates that the current prediction models are characterised by moderate predictive ability, as confirmed by other indicators such as RPD and CCC. The utility of this technology to predict some nutrient concentration, such as CP, Starch and NDF, in forages or other feeds is well documented in the literature (Shenk and Westerhaus 1994;Barri ere et al. 2004;Mentink et al. 2006;Fredin et al. 2014), although these studies used samples collected in production systems different from that of Parmigiano Reggiano. Mentink et al. (2006), have analysed the nutrient content in TMR, obtaining similar models' accuracy, although greater compared to those obtained in the present study, for the prediction of CP (R 2 CV ¼ 0.87), NDF (R 2 CV ¼ 0.90) and starch (R 2 CV ¼0.89). This may be due to the different laboratory techniques employed by Mentink et al. (2006), particularly for the determination of starch content. Regarding uNDF prediction, all the time points were predicted with moderate accuracy (R 2 P > 0.60). The effectiveness of NIRS for the prediction of such parameters has also been investigated by Nousiainen et al. (2004), Brogna et al. (2018), although the latter developed NIRS calibration using spectra collected from animals' faeces (301 samples) collected from 4 feeding trials (Righi et al. 2017), and from commercial Finnish dairy farms (Nousiainen et al. 2004). Moreover, Simoni et al. (2021) developed a prediction model for TMR (164 samples) and faeces (172 samples) of beef cattle collecting data from 5 herds located in the Veneto region (Northern Italy). In particular, the R 2 CV reported in Brogna et al. (2018) were 0.93, 0.91, 0.91, 0.93, 0.66 and 0.92, for CP, aNDFom, ADF, ADL, starch and uNDF 240 , respectively. Faeces spectra were used also in the research by Righi et al. (2017), who developed NIRS prediction models for NDF, ADF, ADL and uNDF 240 using 130 faecal samples collected from lactating dairy cows randomly selected from different herds located in northern Italy fed with TMR hay-based ration. The R 2 CV reported in Simoni et al. (2021) for TMR were 0.80, 0.86, 0.53,0.82 and 0.66, for aNDF, ADF, ash, and uNDF 240 , respectively, while for the faeces prediction models R 2 CV was 0.75, 0.82, 0.04, 0.75, 0.45, for aNDF, ADF, ash, and uNDF 240 , respectively. The results from the present study for the prediction of such traits, although models were developed in TMR, are in strong agreement with Righi et al. (2017). The greatest differences in terms of R 2 in calibration were observed for NDF (0.11 points lower in the present study) and ADL (0.13 points lower in the present study).

Goodness-of-fit statistics
The prediction models developed for the fibre digestibility indicated an R 2 P between 0.56 (for uNDF 30 prediction model) and 0.68 (for uNDF 240 prediction model); according to Williams (2004), this range of R 2 P suggests that developed models be used as a screening method. Even if the R 2 P values are not optimal, the CCC varied from 0.73 (for uNDF 30 prediction model) to 0.82 (for uNDF 240 prediction model). According to Visentin et al. (2015), this CCC interval indicates a substantial predictive ability of the developed models. The use of NIRS to investigate the feed and TMR fibre digestibility is a relatively recent topic. Brogna et al. (2018) indicated that the main problems in interpreting the NIRS technique, related to cell wall digestibility, are the high interference of residual water absorbance and the variable absorbance of C-H bonds in many spectral regions, which overlaps the absorbance of digestible components of aNDFom. In addition, Nousiainen et al. (2004) observed that the high presence of fibres might affect the relationship between spectra and reference values; this is because fibres are not composed of a single component but include multiple chemical components interacting with multiple spectral regions. Furthermore, as evidenced by Brogna et al. (2018), the laboratory reference analysis for the determination of the fibre fractions and their digestibility could have larger analytical errors compared to other nutrient's analytical methods, affecting the prediction model quality.
The use of NIRS in the analysis of compound or mixed feeds (such as TMR) becomes more problematic as some feeds may contain several different ingredients (White and Rouvinen-Watt 2004). Each raw material or ingredient has its own spectral pattern due to its chemical or physical properties and there is an infinite number of possible combinations, thus the spectra of compound feeds vary greatly (Givens et al. 1997). While preparing a NIRS calibration model, it is critical to obtain samples that are both relevant and representative of the mixed feed to which the models will be applied. It is critical to assure that all potential sources of variability, such as formulation aspects (e.g. concentration range of all components), physical properties (e.g. particle size) and other sources of variability resulting from the distribution operations (e.g. blending) are included in the calibration samples. During the preparation of calibration models, it is often difficult to obtain calibration samples that are both highly relevant and representative. Therefore, it is important to collect a large calibration set, maximising the variation in all parameters as well as ingredients to be incorporated. Another important issue is related to the physical properties of samples to be scanned by NIRS, which was heavily discussed in other papers (Berzaghi and Riovanto 2009;Karande et al. 2010). Also the presence of unground particles (e.g. flakes, pellets, tablets or whole forages) in the samples, affecting the variation of the spectral baseline. According to Brimmer and Hall (2001) the presence of unground particles can increase the difficulty of obtaining a representative sample, especially because these raw materials have a high heterogeneity. In order to improve the reproducibility of collected TMR samples, these authors recommend the use of a large amount of samples (1 kg or more).
The NIRS prediction models of TMR ash content developed in the present study were characterised by moderate accuracy (R 2 P < 0.70). These results are not surprising and are reported by other authors (Lundberg et al. 2004;Giaretta et al. 2019). The NIRS radiation, indeed, does not have a good interaction with minerals or inorganic compounds.  have obtained a NIRS prediction model to evaluate the fresh cheese mineral composition, obtaining an optimal prediction accuracy (R 2 CV > 0.75) for calcium (Ca), magnesium (Mg), sodium (Na), and phosphorous (P) content. Moreover, these authors ) observed that although minerals do not have a specific absorption band in the NIR region, some prediction models (e.g. Na) have been related to water absorption bands.
From a practical point of view, prediction models developed in the present study could be applicable as an in-line screening method to rapidly discriminate between feed samples with greater or lower nutrient content or digestibility capacity. However, the accuracy of NIRS prediction models could be improved by increasing the number of samples in the calibration dataset, and also by including samples which could contribute to augment its variability. As proposed by Visentin et al. (2019), one strategy could be to set up a quality control which identifies TMR spectral samples substantially deviating from the spectra included in the calibration dataset. This would be achievable in further improvements of models' accuracy, for example, by quantifying the Mahalanobis distance between these spectra and the centroid of the spectral cluster used to generate NIRS prediction models through a PCA. Subsequently, the samples with high Mahalanobis distance could be analysed with reference analyses and used to recalibrate NIRS models.

Conclusions
The increased nutritional requirements, which are needed for the management of high-yielding dairy cows, demand more timely and frequent monitoring and corrections of rations. This study indicated that NIRS can be used as a screening method for the prediction of CP, Starch, aNDFom, ADF, ADL, undigested NDF and Ash also in Parmigiano Reggiano dry rations. The use of TMR utilised in various herds provided high variability for the NIRS calibration dataset, implying that the developed NIRS models could be successfully applied to TMR collected from herds in the Parmigiano Reggiano area. The calibration equations performance was confirmed in the validation test predicting samples not included in the training data set. The integration of NIRS technology in dairy cows' precision feeding could provide a quick and simple method to transfer analytical data to the rationing software.