Changes in electrical conductivity, milk production rate and milk flow rate prior to clinical mastitis confirmation

Abstract Because a human observer is typically not present during milking process when automatic milking systems (AMS) are used, human observation is replaced by mastitis detection systems consisting of sensors and algorithms that create alerts. Several authors suggest that sensing systems to detect clinical mastitis (CM) are in need of improvement. The aim of this retrospective study was to observe trends over time of potential indicators of CM, thus identifying promising CM indicators and analysis methods. Data from a Northeastern USA commercial dairy farm with 1280 Holstein Friesian cows using 20 AMS units were used for the analysis. Over a one-year time period, there were 117 confirmed cases of CM in this herd. Thirty milking sessions prior to CM confirmation were used for this analysis (n = 3134). Of the 117 confirmed CM cases, 12% were in primiparous cows (L1), 24% in second lactation cows (L2) and 64% in third or greater lactation cows (L3+). Differences between group average CM-confirmed and non-CM quarters were observed prior to CM confirmation for quarter-level electrical conductivity (ECq), milk production rate (MPRq), average milk flow rate (AMFq) and peak milk flow rate (PMFq). Positive indications of CM were apparent well before confirmation of visual signs of CM for ECq and MPRq; however, positive indications for AMFq occurred only one day before CM confirmation. The combination of ECq, MPRq and AMFq is potentially useful for differentiating between an early (before visual signs of CM are manifested) detection and a false positive detection. Highlights Data from 1280 Holstein Friesian cows using 20 AMS units were used for the analysis The progression over time of changes in milk and milking characteristics was investigated in the period prior to clinical mastitis Changes in quarter electrical conductivity indicate it is possible to detect developing mastitis before clinical signs are manifested


Introduction
The development of automatic clinical mastitis (CM) detection systems has received much attention in the research literature over the past five decades. This interest is driven by the economic impact of CM that can range from $36 to $470 per cow per year (Huijps et al. 2008;Lam et al. 2013) and has been intensified by the implementation of automatic milking systems (AMS) where human observers must be replaced by an automated mastitis detection system. Clinical mastitis is the stage in the progression of a mastitis infection at which visual indications of inflammation and changes in the physical properties of milk become apparent.
A detection system consists of sensor(s) and algorithms that process sensor data to produce information or advice such as an alert that a cow has a high probability of mastitis. The aim of a CM detection scheme is to be able to reliably detect CM and also to improve classification of ambiguous CM incidences (Steeneveld et al. 2010;Mollenhorst et al. 2012). Kamphuis et al. (2010) demonstrated that increasing the length of the time window significantly improves the apparent sensitivity and specificity of mastitis detection systems.
Past research has focussed on the electrical conductivity (EC) of milk for detection of CM because it offered a relatively simple and inexpensive technique for in-line sensing (Mottram et al. 2007). The study by Khatun et al. (2017) suggests that sensing systems using EC alone were not likely to achieve the desired sensitivity and specificity targets and that improvements can be achieved by using multiple measurements thereby improving the utility of mastitis detection systems on farms. The study by Rutten et al. (2013) reported that electrical conductivity was the most common sensor technique for mastitis detection. Kamphuis et al. (2008) suggested that mastitis detection performance might be improved by combining different predictive variable types. Additional CM indicators include changes over time in milk yield, milk temperature, milk colour (Espada and Vijverberg 2002), cow activity (Chapinal et al. 2011;Saint-Dizier and Chastant-Maillard 2012), and various milk components (Hogeveen and Ouweltjes 2003;Reinemann and Helgren 2004). The study by Khatun et al. (2018) demonstrated that improved mastitis status prediction can be achieved by using multiple parameters. They also state that more accurate detection systems using multiple measurements will improve their utility on farms.
In a previous study of the effects of incomplete milking (Penry et al. 2017a), the authors observed difficulty of milk removal and changes in the distribution of quarter milk yield in cows that subsequently developed visual signs of CM. This motivated the question of whether monitoring of changes in milk flow rates and changes in relative quarter milk yield might improve the sensitivity and specificity of indicators of pending CM. Data were available from another previous study of quarter level milking characteristics for 117 confirmed CM cases in a herd of over 1000 cows (Penry et al. 2017b). Using these data, we tested our hypothesis that changes in milk removal characteristics would occur immediately prior to the manifestation of CM symptoms and further that comparing changes in EC, milk flow rate and milk production rate (MPR) to other quarters of the same cow would account for some of the variability in the data and thereby improve CM prediction. The aim of this retrospective study of milking characteristics prior to CM confirmation was to observe trends over time of potential indicators of CM, thus identifying promising CM indicators and analysis methods.

Materials and methods
The study is based on data from a Northeastern USA commercial dairy farm with 1280 Holstein Friesian cows using 20 AMS units (VMS, DeLaval, Tumba, Sweden) as described by Penry et al. (2017b). Cows are housed year-round and fed using a partial mixed ration system with concentrate feeding in the AMS stall. Each AMS services 1 pen of about 55 cows. Cows in the study herd had average daily milk yield of 34.6 kg and an average milking interval of 9.7 h. During the study period, the bulk milk somatic cell count averaged 175,000 cells/mL. Dataset used for the study included 3134 milking sessions. The data obtained from the AMS management system included cow ID, days in milk (DIM), lactation number, milking interval (MI, time since last successful milking, h) and milking data from DeLaval MM25 milk metres for quarter milk yield per milking (MY q, kg), milking duration (MD q , min) quarter peak milk flow rate (PMF q, maximum 1-minute average milk flow rate, kg/min), quarter average milk flow rate (AMF q, kg/min) and quarter electrical conductivity (EC q, mS/cm) for each milking session. Several additional variables were calculated from these data: udder milk production per milking (MY u , kg) as sum of quarter milk production, udder milking duration (MD u , min) as maximum value of quarter milking duration, udder peak milk flow (PMF u , kg/min) as sum of PMF q and average milk flow (AMF u , kg/min) as ratio between MY u /MD u , udder electrical conductivity (EC u , mS/cm) as the MY q weighted average of individual EC q , and udder and quarter milk production rates (MPR u The original data set included 117 confirmed cases of CM, from 110 cows. Of the confirmed CM cases, 14 (12%) were of first lactation cows (L1), 30 (24%) were of second lactation cows (L2) and 73 (64%) were third or more lactation cows (L3þ). Seven of the cows had two confirmed CM cases during the one-year observation period. These seven repeated cases were given a new cow number so that each case was treated as an independent occurrence. We do not have data on cases that occurred before our observation time period, and thus some additional number of cases may be repeat occurrences within the same cow. Confirmation of CM was made by a trained technician using visual assessment of the gland and milk characteristics. The farm relied heavily on identification of cows by the AMS mastitis detection algorithm as having a high probability of CM, although we do not know with certainty if all confirmed CM cases were identified by the AMS detection algorithm. In all of the 117 cases used in our study; mastitis, was confirmed by a human observation. Furthermore, in all of these cases, only one-quarter was confirmed as having CM. Examination of the data set revealed that in three of the 117 cases of CM, there may have been a second quarter infected within the same udder. In two additional cases, the infected quarter within udder may have been misidentified. The time base used for our analysis was the number of milking sessions prior to human confirmation of CM. Because of the variability of milking interval, 30 milking sessions represented a variable time window ranging from 177 to 341 h (7.4 to 14 days) before CM confirmation. On this farm, some cows began lactation while being milked in a conventional milking system and were subsequently moved to a pen served by an AMS. As a result, some cows moved into an AMS pen less than 30 milkings prior to CM confirmation did not have 30 milking sessions recorded prior to CM confirmation.

Statistical analysis
An initial analysis was performed to compare CM-confirmed quarters to non-CM quarters at each of the 30 milking sessions prior to CM confirmation. Descriptive statistics (mean and standard error of the mean) were calculated for the following outcome variables: EC q, MPR q , MY q, MD q , AMF q and PMF q for CM quarters and non-CM quarters for each milking session prior to CM confirmation. The within-cow differences between the CM quarter and the average of non-CM quarters for each pre-CM milking session were tested for significance using a SAS MIXED model (SAS, 2012, Version 9.4) with a Tukey's adjustment for multiple comparisons. Cow was declared as a random variable with observations repeated over time (pre-CM milking number). The model was run for each lactation class separately: first lactation cows (L1), second lactation cows (L2) and third or more lactation cows (L3þ).

Results and discussion
The normality of the differences between CM and non-CM quarters was examined for all outcome variables. These revealed that the data were reasonably normally distributed. Descriptive statistics are reported in Table 1. The daily udder milk yield was comparable to that reported by Siewert et al. (2018) in a study including 33 US farms using AMS. Quarter milk yield was higher in rear quarters (3.77 ± 1.75 kg/milking) than front quarters (3.06 ± 1.32 kg/milking) in agreement with previous results (Weiss et al. 2004, Penry et al. 2018). Electrical conductivity was not different between quarters. The coefficient of variation (standard deviation/mean) for MPR q (42%) was somewhat lower than for MY q (47%) as expected because MPR q accounts for variability introduced by uneven milking intervals. The coefficient of variation for MPR q was greater (42%) than MPR u (30%) probably because some aspects of the regulation of milk production occur at the quarter level and the magnitude of change is diluted in udder level averages (e.g. a 40% change in one-quarter results in about a 10% change at the udder level).
All of the quarter response variables tested (EC q , MPR q , MY q , MD q , AMF q and PMF q ) showed a difference between healthy and CM quarters at the time of CM confirmation (p < .001). An association between poor quarter health, milking duration and peak milk flow was found also by Tan cin et al. (2007). The pre-CM milking number at which CM quarters deviated from healthy quarters depended on the variable as well as lactation class.
There was no apparent trend in EC q for non-CM quarters, while the EC q of CM-confirmed quarters was consistently greater than for non-CM quarters 5 milking sessions prior to CM confirmation for L1 cases 6 milking session prior to CM confirmation for L2 cases and 12 milking sessions prior to CM confirmation for L3þ cases, (p < .05) (Figure 1). The earlier significance of EC q differences in L3þ cases suggests the higher odds that these older cows may have experienced previous mastitis events that compromised the quarter, modifying inter-mammary epithelial cell tight junctions and causing chronic milk electrical conductivity changes (Sheldrake et al. 1983). It is also possible that the immune response of these cows results in a longer subclinical phase of the mastitis infection. The udder level EC trends were much smaller and occurred nearer to CM confirmation than did the CM quarters.
The MPR response trends were similar at the udder and quarter levels ( Figure 2) with all showing a downward trend prior to CM. The CM-confirmed quarters had consistently lower MPR q than non-CM quarters for three milking sessions prior to CM confirmation for L3þ cases (p < .0018) (Figure 2). The reduction in MPR u over time is probably an indicator of both the direct effect of disease in the infected quarter, as well as a systemic effect resulting in MPR q reduction in healthy quarters of the same udder. Siivonen et al. (2011) reported decreased lying, ruminating and drinking time, and lower feed intake for cows with CM which would produce reduced MPR in all quarters. The AMF response trends were similar for the quarter and udder (Figure 3) with all showing a downward trend prior to CM confirmation. The CM-confirmed quarters had consistently lower AMF q than non-CM quarters three milking sessions prior to CM confirmation for L2 cases (p < .01) (Figure 3). It is unclear why differences in AMF q between CM and non-CM quarters were more pronounced for L2 cases. The PMF response patterns were similar to AMF but with smaller percentage differences between CM and non-CM quarters and differences becoming significant nearer to CM confirmation; for L2 cases, the CM-confirmed quarters had consistently lower PMF q than non-CM quarters two milking sessions prior to CM confirmation (p < .01).
The time sequence of detectable differences in the most consistent indicators was: EC q (5 to 12 milking sessions) followed (but not for all lactation categories) by MPR q , MY q and AMF q (3 milking sessions) and then PMF q (2 milking sessions). The initial analysis showed that both EC q and MPR q changed (over time and relative to other quarters of the same udder) from 3 to 12 milking sessions (or 1 to 4 days) before CM was confirmed. A similar time history of increase in somatic cell count prior to the gold standard culture positive confirmation subclinical mastitis and veterinary diagnosis of CM was reported by Dalen et al. (2019). Our hypothesis that a change in MPR and EC might provide a specific indicator immediately before CM confirmation was confirmed by our analyses, whereas our hypothesis regarding AMF was not confirmed. The maximum case-positive rate for AMF (56%) was considerably lower than the case-positive rates for EC and MPR.
The recommendations of Kamphuis et al. (2016) to extend the time window from four to five milkings for timely alerts of CM and setting a maximum number of 10 milkings for the time window to detect a CM episode appear reasonable based on our results.
Mastitis infection follows a natural course from initial invasion by the pathogen to the battle within the quarter between the multiplying pathogens and the development of the cow's immune response, potentially leading finally to the onset of clinical symptoms. Detection of the developing disease by monitoring of milk composition, secretion rate, and milk flow rate can at best detect infection only after it has progressed to significant proliferation of the invasive Figure 2. Least square means values of milk production rate at the quarter (MPR q ) and udder level (MPR u ) prior to clinical mastitis (CM) confirmation by lactation class (L1, L2, L3). Orange lines represent CM-confirmed quarters of 117 cows. Blue lines represent the non-CM quarters of the same cows. Black lines are data aggregated at the udder-level. A star on the orange line indicates a difference (Tukey's corrected p < .05) between CM-confirmed quarters and non-CM quarters.
pathogens or to a systemically expressed inflammatory response of the cow. The implied hope of the work presented here is that as clinical signs develop, the time-course of their development and differences between infected and unaffected quarters might allow detection of a developing infection earlier in its progression, or with more certainty at the time that clinical signs become apparent. We saw clear benefits of the use of quarter level data, which can now be obtained with AMS and perhaps other quarter milking technologies. Where practical, earlier treatment (presumed to be more effective than later treatment), or earlier isolation of the offending cow and removal of her milk from the supply to be shipped, would improve both the economic results of the dairy and the quality of milk shipped. Our goal was not to develop a complete multivariate CM detection algorithm, but rather to suggest variables that if presented to such algorithms, might improve their accuracy.

Conclusions
This retrospective study of milking characteristics prior to CM confirmation provides some insight into trends over time of potential indicators of CM. Quarter-level indicators had a higher case-positive rate than did udder level indicators for EC , MPR and AMF. Withinudder comparison of quarters resulted in a further improvement in the case-positive rate for EC and had similar results for MPR and AMF than did following Figure 3. Least square means values of average production rate at the quarter (AMF q ) and udder level (AMF u ) prior to clinical mastitis (CM) confirmation by lactation class (L1, L2, L3þ). Orange lines represent CM-confirmed quarters of 117 cows. Blue lines represent the non-CM quarters of the same cows. Black lines are data aggregated at the udder-level. A star on the orange line indicates a difference (Tukey's corrected p < .05) between CM-confirmed quarters and non-CM quarters.
individual quarters over time. Comparison of milk composition and milking characteristics within udders is made possible with AMS and other quarter milking technologies, thus improving their potential for CM detection accuracy as compared to cluster or udder level milking technologies.
Positive indications of CM were apparent well before confirmation of visual signs of CM for EC and MPR. Changes in AMF occurred much nearer the time to CM confirmation. The combination of EC, MPR and AMF may therefore be useful in differentiating between an early (before visual signs of CM are manifested) detection and a false positive detection.
The gold standard for CM confirmation is visual assessment of the quarter and its milk by a human observer. This CM diagnosis is used to make decisions such as further testing (bacterial culture and/or Somatic Cell Count), antibiotic treatment and withholding milk from the bulk tank.
The indicators assessed in this study have potential to improve the algorithms use to support these decisions.