Association between Udder and Quarter Level Indicators and Milk Somatic Cell Count in Automatic Milking Systems

Simple Summary In dairy cattle herds milked by automatic systems, the absence of a human milker originates the need for control systems to monitor the milking process and cow conditions. Modern milking robots are equipped with a lot of sensors that, at each milking (2.5–3 times a day), record data on milk yield and quality, milking efficiency, cow welfare, and health with particular focus to udder conditions. Mastitis is one of the most frequent and serious diseases of dairy cow that negatively affects milk quality and yield, reduces animal welfare, and often implies the use of antimicrobial drugs. At the moment, the alerting systems for mastitis risk is generally based on monitoring milk electrical conductivity, color, and/or temperature, but these indicators have limited reliability. Other information gathered by automatic sensors, already implemented in commercial robots, could be useful to early detect mastitis. Using a multivariate approach, our study showed that the deviations over time of milk electrical conductivity, milk yield, and milk flow of single quarters in comparison with the whole udder are potential indicators, alone or in combination, for altered udder conditions. The results could be useful for the development of new algorithms more effective in the early detection of mastitis. Abstract Automatic Milking Systems (AMS) record a lot of information, at udder and quarter level, which can be useful for improving the early detection of altered udder health conditions. A total of 752,000 records from 1003 lactating cows milked with two types of AMS in four farms were processed with the aim of identifying new indicators, starting from the variables provided by the AMS, useful to predict the risk of high milk somatic cell count (SCC). Considering the temporal pattern, the quarter vs. udder percentage difference in milk electrical conductivity showed an increase in the fourteen days preceding an official milk control higher than 300,000 SCC/mL. Similarly, deviations over time in quarter vs. udder milk yield, average milk flow, and milking time emerged as potential indicators for high SCC. The Logistic Analysis showed that Milk Production Rate (kg/h) and the within-cow within-milking percentage variations of single quarter vs. udder milk electrical conductivity, milk yield, and average milk flow are all risk factors for high milk SCC. The result suggests that these variables, alone or in combination, and their progression over time could be used to improve the early prediction of risk situations for udder health in AMS milked herds.


Introduction
Automated Milking Systems (AMS) are spreading rapidly in dairy cattle farms; at the beginning of the 2000s there were about 1250 milking robots around the world [1], but in 2017, a total of about 38,000 AMS units installed globally was reported [2].
The spread of AMS and the parallel reduction in human presence have generated the need to incorporate into the system automatic sensors for monitoring milk production, milking efficiency, and animal conditions. AMS is integrated with a variety of sensing sawdust. Cows were fed a partial mixed ration integrated by concentrate in the AMS stall. In Table 1, the main characteristics of the farms are reported (Table 1). From Table 1, it can be noted that between 2016 and 2019 three out of four farms increased milk yield per cows by approximately 10 to 16% and all the farms improved cow fertility reducing days open by 5 to 21%.
The two types of AMSs slightly differed for the data recorded and made available. In particular, B AMS registered a lot of variables on milking efficiency such as number of daily refusals, failures, and downtimes. Moreover, B AMS captured indicators of udder milk composition (fat, protein, and lactose) and somatic cell count by sensors, based on NIR spectroscopy and viscosity, respectively. On the contrary, A AMS made available a lot of information per quarter such as milk yield and milk flow. Both systems measured milk electrical conductivity per quarter, but in the case of B AMS, conductivity was expressed as a score out of 100, instead of mS/cm. Consequently, variables studied were partly different for the two AMSs. Table 2 reports the variables analysed, their units and acronym. In addition to the information obtained by the AMSs, milk production and quality data from individual monthly official milk controls performed by the National Breeders' Association were included in the dataset. Milk samples were analysed for fat and protein contents (MilkoScan FT6000; Foss Analytical A/S, Hillerod, Denmark) and milk somatic cell count (Fossomatic). Somatic cell count was log-transformed as Linear Score (LS), using the equation suggested by Wiggans and Shook [11]: LS = log 2 ((somatic cell count/mL)/12,500).
Each individual cow record was classified as a function of somatic cell count obtained from official controls as LOW (≤300,000 cell/mL) or HIGH (>300,000 cell/mL). Moreover, cows with more than 80% of the official milk analyses characterized by LSc ≤ 5 (SCCc ≤ 100,000 cells/mL) were classified as low SCC (LSCC); cows with more than 80% of the official milk analyses characterized by LSc > 5 (SCCc > 100,000 cells/mL) were classified as high SCC (HSCC); in all the other cases cows were classified as fluctuating SCCc (FSCC).
A number of new additional variables were calculated starting from the data recorded by the AMSs: for all the herds milk production rate at udder level, as rate of milk secretion per hour (MPR = YM/MI; kg/h); for the herds milked with A AMS, the within-cow withinmilking percentage differences between individual quarters and the average of the four quarters of the minimum milk yield (∆Yq, %; ∆Yq = (minYq − meanYq)/meanYq * 100), the minimum average milk flow (∆AMFq, %), the maximum milk electrical conductivity (∆ECq, %); for the herds milked with B AMS, the within-cow within-milking percentage differences between the individual quarters and the average of the four quarters of the minimum milking times (∆Tq, %); and the maximum milk conductivity score (∆ECSq, %).

Statistical Analyses
The whole dataset was analysed using SAS software (Version 9.4, SAS Institute, Inc., Cary, NC, USA, 2012) always separately for the two types of AMS. Descriptive statistics and Pearson's correlation analyses were obtained using Proc MEANS, Proc FREQ and Proc CORR. Differences between front and rear quarters and between right and left ones were evaluated using a GLM procedures.
A GLM analysis was performed to test the differences among the three SCC cow classes in terms of ∆ECq, ∆Yq, ∆AMFq for the A AMS herds and in terms of ∆ECSq and ∆Tq for the B AMS herds. Number of lactation, stage of lactation, and farm effects were included in the models.
Two types of multivariate analyses were performed: a Principal Component Analysis (PROC PRINCOMP), and a Logistic Analysis (PROC LOGISTIC).
Through the Principal Component Analyses, the relationships among data from official controls, data recorded by the AMSs, and the additional variables calculated were studied for each AMS type.
In the Logistic Analyses, variables or combinations of variables (interaction terms) were excluded through a stepwise backward multiple regression method based on a 0.2 significance level. The results of the analyses built, for each AMS type, a final model including variables (risk factors) that were significantly associated with SCC > 300,000/mL. The final models were described in terms of odds ratios and 95% confidence intervals.

Descriptive Statistics
The general descriptive statistics of the herds milked with the two AMS (A and B) are reported in Table 3. The main characteristics of the two couples of herds were similar in terms of herd traits, milk production, and composition. In the A AMS milked herds, LS was higher than in the herds milked with B AMS, suggesting slightly poorer udder health conditions. Herds milked using A AMS showed lower milking efficiency with lower number of milkings per day, longer interval between milkings and slightly lower milk production rate, MPR. The low average value of daily milkings of the A AMS herds is probably related to farm management problems and to the production disciplinary of the Protection Consortium Grana Padano PDO that, until the end of 2019, imposed a maximum number of daily milkings per cow not exceeding two. The A AMS provides a lot of information on milk ejection at a quarter level. In particular average milk flow (1.13 ± 0.32 kg/min), peak milk flow (1.61 ± 0.38 kg/min), milk yield per milking (3.63 ± 1.22 kg/milking), and milk electrical conductivity (4.12 ± 0.35 mS/cm). According to Juozaitienė et al. [12], the average milk electrical conductivity (EC) of healthy cows milked with AM systems ranges from 4.6 to 5.8 mS/cm. Norberg [13] reported that the maximum milk electrical conductivity of healthy quarters within cow and within milking was 4.87 mS/cm, whereas subclinically and clinically infected quarters had maximum values of 5.37 mS/cm and 6.44 mS/cm, respectively. As pointed out by Penry et al. [14] and Kathun et al. [4], cisternal milk has a higher EC compared with alveolar milk. Once alveolar milk ejection starts, EC decreases as a consequence of mixing alveolar and cisternal milk. This is a confounding factor that influences milk EC recorded by automatic sensors and makes it impossible to fix a threshold value as an early signal of altered quarter health.
The B AMSs, in addition to some information at a quarter level, provide a lot of information on milking efficiency and indications about milk components and somatic cell count at udder level from the AMS sensors. The most important variables registered at quarter level were milking time (2.70 ± 1.17 min) and milk electrical conductivity expressed as score (69.2 ± 3.61). At udder level, average milk flow was 3.57 ± 1.10 kg/min and indications of whole udder milk components from sensors were 3.9 ± 0.83%, 3.4 ± 0.21%, and 5.00 ± 0.11% for milk fat, protein, and lactose, respectively. Milk somatic cell count from AMS sensors was 225,695 ± 451,540 cell/mL and the milk temperature was on average 39.1 ± 0.64 • C.
For the herds milked with A AMS, the average % difference within-cow and withinmilking of milk yield of the least productive individual quarters compared to the mean of the four quarters (∆Yq) was −24.2 ± 15.6%; the average % difference in average quarter milk flow (∆AMFq) was −16.9 ± 10.7%; and the average % difference in quarter milk conductivity (∆ECq) was 3.73 ± 4.24%.
For the herds milked with B AMS, the average % difference in milking time of individual quarters compared to the average of the four quarters (∆MTq) was −25.1 ± 16.4%, and the average difference in electrical conductivity score (∆ECSq) was 2.22 ± 3.14%.

Quarter Position
In A AMS herds, rear quarters showed significantly higher milk yield in comparison to front quarters (4.01 vs. 3.03 kg/milking; P < 0.0001; 57% vs. 43%), higher average milk flows (1.15 vs. 1.07 kg/min; P < 0.0001), and higher peak milk flows (1.63 vs. 1.52 kg/min; P < 0.0001) in agreement with previous studies [5,[15][16][17][18]. In B AMS herds, rear quarters showed significantly higher milking time than front ones (3.11 vs. 2.56 min; P < 0.0001). Milk electrical conductivity was significantly different between rear and front quarters in all the four herds but the differences were very small, inconsistent between the herds milked with the two AMS types, and not of biological relevance.
In comparison to the left quarters, right quarters produced significantly more milk (3.57 vs. 3.48 kg/milking; P < 0.0001) and had slightly higher average and peak milk flows in A AMS herds. In B AMS herds, right quarters showed significantly lower milking time (2.81 vs. 2.85 min; P < 0.0001). Differences in milk ejection among left and right quarters were noted also by Tancin et al. [19]; this could be a consequence of the teat cup attachment order and the different levels of circulating oxytocin; although, some authors have denied variations in the levels of oxytocin and alteration of milk ejection due to the attachment sequence and possible delays in AMS [20,21].

Pearson's Correlation Analyses
Pearson's correlation coefficients are shown in Tables 4 and 5. In the A AMS herds (Table 3) daily milk yield (from official controls, Yc) was positively correlated with MPR (r = 0.42) and negatively with milking interval (MI; r = −0.30). Milk electrical conductivity at quarter level (ECq) did not show any correlation with LSc at udder level (r = 0.03 ÷ 0.09 for the different quarters) but it was positively correlated with official daily milk yield (Yc; r = 0.20 ÷ 0.27 for the different quarters; data not shown in the table). Juozaitienė et al. [12] reported a polynomial relationship between udder milk electrical conductivity and milk yield: the best productivity was observed in the milk electrical conductivity class of 4.5-5.5 mS/cm. MPR showed a negative correlation with milking interval (MI; r = −0.39), in agreement with the findings of Penry et al. [16], who observed an MPR decrease of 2% per hour when increasing the MI for multiparous cows and 1.5% per hour for primiparous ones; although, in that case, MPR was determined at quarter level.
Lyons et al. [22] found a non-linear association between MPR and MI, with reduced MPR when the milking interval was more than 16 h. Average milk flow and peak milk flow at quarter level were highly positively correlated (r = 0.95 ÷ 0.96 for the different quarters; data not shown in the table) as observed by Penry et al. [23]. Although there was not any correlation between milk electrical conductivity of single quarters (ECq) and LSc, the % difference in electrical conductivity between quarter and udder (∆ECq) was positively correlated to LSc (r = 0.26). ∆ECq was also negatively related to the % difference between quarter and udder of milk yield (∆Yq; r = −0.39) and average milk flow (∆AMFq; r = −0.26).
In the B AMS herds (Table 5), similar to what has been observed in A AMS herds, daily milk yield (from official controls, Yc) was highly positively correlated with MPR (r = 0.85) and negatively correlated with the duration of MI (r = −0.41).  All correlation coefficients were statistically significant (P < 0.001); nLACT = number of lactation; DIM = days in milk; Yc = daily milk yield from official controls, Fc = milk fat percentage from official controls; Pc = milk protein percentage from official controls; LSc = Linear Score from Somatic cell count determined by official controls; YMams = milk yield per milking from AMS; nM = number of daily milkings; MI = milking interval; Yams = daily milk yield from AMS; MPR = milk production rate; AMFams = average udder milk flow from AMS; SCCams = SCC indication from AMS; Fams = milk fat percentage indication from AMS; Pams = milk protein percentage indication from AMS; Lams = milk lactose percentage indication from AMS.
Milk electrical conductivity score of each quarter (ECSq) was negatively correlated with lactose indication (Lams; r = −0.76 ÷ −0.77 for the different quarters), but similar to what has been observed in A AMS herds, it did not show any correlation with LSc (r = 0.04 ÷ 0.07 for the different quarters) and SCCams (r = 0.11 ÷ 0.14 for the different quarters; data not shown in the table). Number of daily milkings (nM) was positively correlated with MPR (r = 0.50) and negatively correlated with MI (r = −0.70). MPR showed a positive correlation with number of lactation (nL; r = 0.33) and a negative correlation with MI (r = −0.48), similar to what was seen in the A AMS and in agreement the findings of other authors [16,22].
Correlation coefficients between milk components from official controls and indications provided by the B AMS sensors were 0.45 and 0.41 for milk fat and milk protein percentages, respectively. Somatic cell count provided by the B AMS (SCCams) showed a positive correlation with LSc (r = 0.38). The r coefficient values for milk component and SCC show a medium degree of correlation between the results provided by the AMS and the lab. This may depend on a limit of the AMS sensors but also on the fact that the official control provides only monthly values that may not necessarily be representative of the trend.
Although there was not any correlation among milk electrical conductivity score of single quarters (ECSq) and both LSc and SCCams, the % difference in milk electrical conductivity score between single quarters and udder (∆ECSq) was positively correlated to LSc (r = 0.27) and SCCams (r = 0.44).

Principal Component Analyses
The results obtained from the PCA are plotted in Figure 1a,b AMS herds. The PCA on A AMS herds' data ( Figure 1a) confirmed the positive association among daily milk yield (from both AMS recordings, Yams, and official controls, Yc) and MPR: they are in the same quadrant and very close each other on the axis 1 that explains a good portion of the variance. Milk yield and MPR are in the opposite quadrant of milking interval (MI) in agreement with the findings of Penry et al. [16] and Lyons et al. [22]. As stated by Penry et al. [16], MPR can be considered a more appropriate way to measure milk yield in AMS where milking is voluntary and the MI is not uniform within or across days. On the other hand, milking interval (MI) is close to DIM on the axis 1. Penry et al. [16] reported a growth in MI with increasing lactation days: in multiparous cows, from 30 to 300 DIM, the average MI rose from approximately 8 to 10.2 h.
The analysis confirmed the positive association among LSc and % difference in milk conductivity (∆ECq) of single quarters vs. udder. These variables are in the opposite quadrant of the % difference in milk yield (∆Yq) and % difference in average milk flow (∆AMFq) of single quarters vs. the whole udder.
Similar results were obtained from the PCA on B AMS data (Figure 1b). Daily milk yield (both from AMS recordings, Yams, and from the official controls, Yc), number of daily milkings (nM) and MPR are in the same quadrant. They are close each other on the axis 1 that explains 29.7% of the variance. The analysis confirmed the positive association among LSc, SCCams and % difference in milk conductivity score (∆ECSq) of single quarters compared to the whole udder. These variables are in the opposite quadrant of % milking time difference (∆Tq).
The indication of somatic cell count from AMS (SCCams) and linear score from official controls are very close on axis 1. Similar closeness emerges for milk fat and protein indications from AMS and milk fat and protein from official controls. These results suggest that the sensors for milk quality currently installed on many AMSs could be considered reliable enough for these parameters.
The results from the PCA suggest that the distancing of a single quarter from the condition of the whole udder in terms of milk electrical conductivity (∆ECq or ∆ECSq), milk yield (∆Yq), average milk flow (∆AMFq), and milking time (∆Tq) is well related to SCC and LS and can be useful as indicators of udder health problems.

GLM Analyses
In the A AMS herds, % difference milk electrical conductivity of quarter vs. the whole udder (∆ECq) was significantly influenced (P < 0.001) by the SCC cow class (LSCC, FSCC, and HSCC, respectively), nLACT, DIM, and SCCc. Percentage difference in quarter vs. udder milk yield (∆Yq) was significantly affected (P < 0.001) by the SCC cow class (LSCC, FSCC, and HSCC, respectively), nLACT, DIM, and herd. Similarly, in the B AMS herds, % difference in quarter vs. udder milk conductivity score (∆MCSq) was significantly influenced (P < 0.001) by the SCC cow class, nLACT, DIM, herd, and SCCc. Figure 2 shows the trend of the % difference in milk electrical conductivity (∆ECq for A AMS herds and ∆ECSq for B AMS ones) in the 14 days before the official milk controls performed by the breeders' association. Cows characterized by different SCC level in their production history (LSCC, FSCC, and HSCC, respectively) showed different trends for the variables in approaching the official milk control. In particular, in A AMS herds ( Figure 2B), ∆ECq showed increasing values approaching the day of official milk control when the SCC at the control was higher than 300,000 cell/mL, either in cows characterized by constant high milk SCCc (HSCC) or in cows with fluctuating SCCc (FSCC). Similar findings were obtained in B AMS herds (Figure 3) for ∆ECSq; although, the trends were less clear.  This is in agreement with the results of the PCA where increasing ∆ECq, where associated to higher LS al the official control. This result suggests that the increase in difference between the milk EC of a single quarter and the mean values of the four quarters in the days before the official milk control could be a good indicator of the risk to have a result of high SCC and can be useful as an early predictor of altered mammary health.
In A AMS herds (Figure 4), % difference in quarter vs. udder milk yield also revealed decreasing trends approaching the day of milk control when the SCC value at the control was higher than 300,000 cells/mL, either in cows characterized by constant high milk SCC or in cows with fluctuating SCC.
Inzaghi et al. [5] noted that positive indications of clinical mastitis were apparent well before confirmation of visual signs both for quarter milk electrical conductivity and MPR: from 5 to 12 milking sessions prior to confirmation of clinical mastitis depending on the number of lactation. In the same study average milk flow (AMF) at quarter level showed a downward trend prior to clinical mastitis confirmation.

Logistic Analysis
Logistic analyses were performed to identify the main risk factors for having a somatic cell count at the official control (SCCc) higher than 300,000 cells/mL. Table 6 shows that in the A AMS herds, In addition to the influence of DIM and number of lactation, the most important factor for high SCC was the MPR class: if the MPR is <1.5 kg/h the risk to have high SCC (>300,000/mL) is 2.26 times higher than the case of MPR > 1.7 kg/h. This result suggests that when MPR is low, for reducing milk yield or increasing milking interval, an udder health problem may be present. Inzaghi et al. [5] reported that quarters affected by clinical mastitis had consistently lower MPR than uninfected quarters. The reduction in MPR at udder level is probably an indicator of both the direct effect of disease in the infected quarter, as well as a systemic effect resulting in MPR reduction in healthy quarters of the same udder due to decreased lying, ruminating, and drinking time, and lower feed intake for cows with clinical mastitis. The second most important factor is the % difference in quarter vs. udder milk electrical conductivity: when ∆ECq is ≤ 2.5% the risk to have high SCC (>300,000/mL) is more than halved (0.45) compared with the case of ∆ECq > 2.5%. This result confirms what emerged from the GLM: when the milk electrical conductivity of single quarter deviates excessively from the mean of the four quarters, udder health problems can be suspected. In a recent study, Kathun et al. [4] explored the ability of % variation of quarter milk electrical conductivity to predict the onset of clinical sign of mastitis, but they did not obtain satisfying levels of Sensitivity and Specificity. The logistic analysis showed also that when milk yield of the single quarter sensibly diverges from the mean value of the four quarters (∆Yq ≤ −24%) the risk of having high SCCc (>300,000/mL) at the milk control increases by 1.18 times in comparison with the case of ∆Yq > −24%. Lastly, a lower risk (0.80) of high SCCc is associated with % difference in quarter vs. udder average milk flow (∆AMFq) higher than −15%.
The relationship between the risk of mastitis or high somatic cells and average or peak milk flow is controversial. Grindal et al. [24] suggested that cows with greater quarter peak milk flows are more susceptible to mastitis. Average and peak milk flow give different information, but as reported before, they are highly correlated. In a study on conventional milked herds, peak milk conductivity and LS increased (P < 0.01) from the second (3 to 4 kg/min) to the third class (>4 kg/min) of peak milk flow rate [25] On the contrary, according to Tancin et al. [19], quarters with high SCC (>500 × 10 3 cells/mL) had lower peak flow rate compared with quarters with low SCC (<200 × 10 3 cells/mL). For AMS herds, Hammer et al. [26] reported an increased risk of clinical mastitis associated with low average peak milk flow at quarter level (<1.0 kg/min) occurring 7 to 14 d before occurrence of mastitis. However, analysis of quarter peak milk flow 0 to 7 d before onset of clinical signs indicated the risk of mastitis was associated with both low-and high-average quarter peak milk flow. As suggested by Inzaghi et al. [5], a wider teat canal favours bacterial entry and may slow down the refolding of the teat canal in the few minutes postmilking. On the contrary, the reduction in milk yield as a consequence of emerging mastitis can have the effect of reducing peak and average milk flow.
In the B AMS herds (Table 7), besides the effects of DIM and number of lactation, the most important factor for high SCCc was the indication for SCC from the sensors of AMS (SCCams): the risk of having high somatic cell count at the official milk control (SCCc) is about one-tenth when SCCams is ≤300,000 cell/mL than in the case of SCCams > 300,000 cell/mL. The second most important factor affecting the risk of SCCc higher than 300,000 cell/mL at the milk control is % difference in quarter vs. udder milk electrical conductivity score: if ∆ECSq is <2.2% the risk to have high SCCc (>300,000/mL) is about halved (0.56) in comparison with the case of ∆ECSq > 2.2%. Moreover, the analysis confirmed that when MPR is <1.5 kg/h the risk to have high SCCc (>300,000/mL) is higher (1.59 times) than the case of MPR > 1.7 kg/h. Lastly, lower protein indication from AMS sensors (Pams) is associated to lower risk of high SCC at the official control (SCCc). Table 7. Logistic analysis of risk factors associated to >300,000/mL somatic cell count in the lab milk monthly control for B AMS herds.

Effect
Odds

Conclusions
The big data generated by the multiple sensors implemented in the automatic milking systems can be statistically managed to develop algorithms for the real-time detection of changes that may be indicative of mastitis or impaired health and welfare conditions of dairy cows. The results of the study showed that some variables automatically recorded by the AMSs at a quarter level can be used as good indicators of high SCC risk, when the deviation among the single quarters and the average of the four quarters is considered. Looking at the temporal patterns, the quarter vs. udder percentage difference in milk electrical conductivity showed an increase in the fourteen days preceding an official milk control higher than 300,000 cells/mL. Similarly, deviations over time in quarter vs. udder milk yield, average milk flow, and milking time emerged as potential indicators for high somatic cell count. The Logistic Analysis showed that Milk Production Rate (kg/h) and the within-cow within-milking percentage variations of single quarter vs. udder milk electrical conductivity, milk yield, and average milk flow are all risk factors for high milk somatic cell count.
The result suggests that these variables, alone or in combination, and their progression over time, could be used to improve the early prediction of risk situations for udder health in AMS milked herds.