The use of integrated data collection system to evaluate milking performance, microclimatic condition and cows’ behaviour

Abstract Optimal milking management leads to an increase in production efficiency while respecting animal welfare and health. Not all farms can equip themselves with high level technological systems for economic, generational and structural reasons. The aim of the study was to assess milking performances, cow behaviour and microclimatic condition in farm areas using an integrated data collection system based on surveys and low-cost sensors. The use of video recordings and mobile electronic flowmeters highlighted significant differences between farms that milked two and three times a day. Milking efficiency parameters (cow/hour; cows/stall per hour; milk/hour; milk/stall per hour) were calculated. In particular, the milk/stall per hour parameter emerged as the most interesting. Animal stay time, defined as the time running from when cows are moved from the housing to the beginning of the milking, was calculated and the highest value (76.3 minutes) was observed in farms with more than 10 stalls/row. Hobo pendant sensors were used in order to evaluate cows lying behaviour: no differences were observed between farms that milked two and three times a day (11.3 vs 11.0 h/d of lying). Microclimatic conditions were influenced by both the season (p < .001) and farm areas (p < .05) (holding area, milking parlour, housing area). Light intensity in milking parlour emerged as a critical point; further research is needed to understand the relation with udder hygiene and health. The integration of manual measurements with the use of low-cost sensors allowed to monitor the efficiency of the process and microclimatic condition in farm areas. HIGHLIGHTS The integration of manual measurements and low-cost sensors was tested Different parameters can be used to monitor milking efficiency Light intensity in milking parlour emerged as a critical point


Introduction
The use of technology is of great importance in large dairy cattle farms (Abeni et al. 2019), as it provides an individual or 'per animal' management approach (Halachmi and Guarino 2016). The expected increase in the number of dairy cows will require an efficient management of the milking process (O'Brien et al. 2012).
Different kind of technologies can be used to monitor and improve milking efficiency. Milking efficiency can be considered as a combination of different factors, such as proficiency of the milker, operation of the milking equipment and cow factors (that include udder shape, temperament and physiological traits) (Ginsberg, 2011). An efficient milking process is one in which the milking unit number allows a correct working routine and cow milk production level, in order to minimise over-milking and operator idle time (O'Brien et al. 2012). There are different parameters for the assessment of milking parlour performances such as cows milked/hour, milk yield/hour, milk yield/stall, or milk yield/stall per hour. Among these parameters, the latter seems to be the most important one; several studies showed that it neutralises the effects of the size of the milking parlour and of the number of milkers. Reid and Stewart (2007) observed that farms with herds milked three times a day reached an overall parlour performance of 55 kg milk/stall per hour. Smith et al. (2005) observed that applying minimal or full milking routine procedures (forestripping, pre-dipping, wiping and attaching the milking unit) can have an impact on milking efficiency. In particular, the number of cows milked per stall per hour decreased (from 5.8 to 5.3) when full milking routine procedures (predip, strip and wipe, units attach) were adopted compared to the minimum ones (strip or wipe and units attach).
The use of technology can help to increase production efficiency while respecting animal welfare and health requirements (Hartung et al. 2017); in this context it is useful to monitor the lying behaviour. This behaviour has proved to be an important animal based parameter for evaluating health status, wellbeing and productive potential of dairy cattle bred in intensive systems (Bewley et al. 2010;Mattachini et al. 2013;Vasseur et al. 2012). Several studies showed differences in the resting behaviour of cows milked two and three times a day. € Osterman and Redbo (2001) argued that more frequent milking (n ¼ 3) causes an increase in resting time in the hours before milking, probably due to lower udder pressure in comparison to cows milked twice a day. However, if a time span of 24 hours is considered, the differences between the two milking frequencies are zeroed. This may be due to the fact that cows milked twice a day compensated for the lower rest at other times of the day, although it is still unclear whether cows housed and fed indoors are able to adjust their resting pattern to compensate for the extra time required for milking (Hart et al. 2013). Resting behaviour depends on a variety of factors such as quality of stalls (Ito et al. 2009), stall size and configuration (Tucker et al. 2004), climate conditions (Allen et al. 2015) and the floor cleaning (Chen et al. 2017).
Milking management choices can also influence the time spent by cows in different areas of the farms (holding area, milking parlour, housing area), where microclimatic conditions can be different and promote or relieve heat stress for cows. THI (Temperature Humidity Index) is one of the most used indicators for the evaluation of the microclimatic conditions in dairy cattle farms. This parameter is a bioclimatic index that combines temperature and humidity in a unique value, allowing to assess whether environmental conditions meet the thermoneutrality thresholds of dairy cows (Bohmanova et al. 2007).
In order to guarantee health and well-being of dairy cows, also the housing environment lighting intensity and duration play an important role (Penev et al. 2014). As highlighted by Cockcroft (2015), cows should be exposed to a light intensity of 200 lux per 16-18 hours in order to benefit from the positive effects of long-day photoperiod on milk production.
It must be considered that not all farms can equip themselves with high level technology for Precision Livestock Farming (PLF) systems for several reasons: economic, generational, structural. Therefore, the integration of manual surveys with the use of low-cost sensors could provide a solution to monitor the production process and highlight critical issues.
The aim of the study was to assess milking performances, cows' behaviour and microclimatic condition in farm areas, using an integrated data collection system, based on surveys and low-cost sensors. This evaluation was performed in order to underline the most critical points of milking efficiency, milking management and microclimatic conditions that can compromise farmer profitability and animal health and welfare.

Housing and milking management
This field study involved eight commercial dairy farms in northern Italy during 2 different seasons (summer and winter). In this geographical area the type of farming is intensive and characterised by a high number of heads that do not have access to summer grazing (Table 1). The average herd size was 150 ± 71.7 lactating cows, housed in freestall barn with individual cubicles covered with a straw or coconut fibre bedding or rubber mattresses. All the farms were equipped with fans: in particular, 6 farms had fans in all barn areas (housing area, holding area and milking parlour), 2 farms had fans only in the housing area. Cows were milked with a conventional system in milking parlours; the majority of the farms (n ¼ 6) had a herringbone milking parlour with on average 17.6 stalls, whereas the remaining farms (n ¼ 2) had a H ¼ herringbone; P ¼ parallel parallel milking parlour, with an average number of stalls of 18. Milking frequency was different: three farms milked three times a day with an average number of milkers of 1.41, the remaining five milked twice daily, with on average 1.2 milkers. The holding area was on average 79.1 ± 24.3 m 2 . Milking groups ranged from 2 to 4, with different grouping criteria (stage of lactation, parity, health status).

Data collection
Evaluation of milking task timing Mobile electronic flowmeters (Lactocorder) were used in order to evaluate (25.1 ± 6.23% of the total milking cows) the duration of udder preparation before the cluster attachment (TS500), total milking time, milk flow phases and bimodality of the milk flow curves as reported by Tamburini et al. (2010). The stimulation time of the mammary gland corresponds to the time between the first teat touch by the milker and the cluster attachment.
Video recordings of two morning/afternoon milking sessions were performed in all farms through a fixed camera unit (Earthtree, TC800) positioned in the milking parlour. From the video recordings it was possible to calculate the duration of the different milking routine task phases: udder preparation or teat stimulation including forestripping, pre-dipping, drying, cluster attachment, and post-dipping. The preparation time per row was also calculated.
Movement and waiting times of 1218 lactating cows were monitored, adapting a milking task timing evaluation form developed by University of Winsconsin-Madison, Milking Research and Instruction Lab (2003). This method requires the measurement of the duration of different operations (opening exit gate, beginning first cow udder preparation, last milking unit attached and detached, first and last cow post dipped) performed during the milking process with a stopwatch only at one side of the milking parlour. The time assessment was performed for each milking group. Entry time was calculated as the time interval between opening exit gate and beginning first cow udder preparation of the following side. The stay time, defined as the time that starts when cows are moved from the housing to the beginning of the milking, was recorded for each milking group (G1-G2-G3); it gives a measure of the waiting time of the animals before milking.

Evaluation of cow resting behaviour
The resting behaviour of 36 cows (9 cows from 4 farms) was investigated using an electronic data logger (Hobo pendant G Acceleration Data Logger, Onset Computer Corporation, Pocasset, MA) between May and June 2019. The data logger is a 3-axis accelerometer with ±3 g measurement range. It was attached to the lateral side of the hind leg of each cow for 8 days and positioned with the x-axis perpendicular to the ground and pointing towards the back of the cow (dorsal direction). When milking parlour was parallel, the device was allocated on the right leg, while in the herringbone parlour the device was installed on the left/right leg depending on the cow entrance side. The logger recorded the g-force on the x, y and z-axes at 1 min intervals (Ito et al. 2009). Using the HOBOware software, the g-force readings were converted in degrees of tilt and exported into Microsoft Excel (Microsoft Corporation, Redmond, WA, USA). According to Ito et al. (2009) the cow lying position was determined evaluating the degree of vertical tilt (y-axis). In particular, readings <60 were associated with the cow in standing position, while readings !60 indicated the cow lying down. The total resting time, expressed as a percentage on the total daily time and in minutes, was calculated for each milking group, as a function of the number of daily milkings and for different times of the day (1 hour before each milking, during milking and during the rest of the day). While processing the data, the feed administration was taken into account as a disturbing factor (the feed was administered twice daily in two farms and once a day in the other two).

Assessment of environmental conditions
Environmental conditions were measured in three different areas (holding area, milking parlour and housing area) for each of the 8 farms, by using a HOBO data logger, during Summer and Winter. This device recorded temperature in a range from À20 to 70 C, relative humidity, from 5 to 95% and light intensity, from 1 to 4500 footcandles/lumens. These parameters were recorded for one week at 5 minutes intervals, and the Temperature-Humidity Index (THI) was calculated as follows (Segnalini et al. 2013): where:

Statistical analysis
The whole datasetincluding farm characteristics, milking management, milk flow parameters, animal behaviour and environmental conditionwas analysed using SAS software (Version 9.4, 2012). Proc GLM were used in order to describe the data and to evaluate their relationship with the number of milkings (2 vs 3) and milking parlour size (<10 stalls/side vs > 10 stalls/side). The model used included the effects of the number of milkings and milking parlour size. GLM procedure was also used to test the differences among seasons and between farm areas (holding area, milking parlour, housing area) of environmental conditions. The model used was the following:

Milking performances evaluation
Video recordings during milking sessions were performed in each farm. Based on video recordings the duration of milking procedures was measured, as reported in Table 2. Video recordings can be helpful because they do not require the presence of an external operator: milking routine can be therefore observed as milkers normally practice it. Milking routine was different between farms, both in terms of duration and the kind of operations performed.
Milking time, including preparation routine and milk emission time, was 7.72 ± 1.03 min. Forestripping procedurewhich is essential to check milk status, as indicator of udder health, and to remove milk with the highest bacterial content and somatic cell count (Harmon 1994)was not performed by all farms involved in the study (farms performing forestripping n ¼ 6), probably because it is considered as a timeconsuming and expensive practice. Drying procedure, which is useful to remove pre-dipping detergent and to avoid milk contamination through bacteria presence on the teat surface, resulted to be the most time consuming operation (6.27 ± 2.83 s). Total preparation time per cow was determined by the sum of different factors such as the number of operations performed, and how fast and scrupulous the workers are (Smith et al. 2005); a complete udder preparation (pre-dipping, washing, forestripping, postdipping) can improve hygienic milk quality, as reported by Bava et al. (2017). Total stimulation time, as the time from the first touch of the teat till the attach of the cluster, is a function of total preparation time per cow and the moving time of the milker. Total stimulation time can easily be measured using Lactocorder, with the presence of an operator, considering the TS500 parameter, even if that parameter includes also the time to reach a milk flow of 500 g/min. The time between the end of the stimulation and the attachment is crucial: as reported by Sandrucci et al. (2007) it has to be longer than 60 seconds. On the other hand, a delayed attachment causes a transient reduction of oxytocin concentration in the first minutes of milking (Bruckmaier 2001). An excessive delay between the activation of milk ejection reflex and milk evacuation from the udder can negatively affect milk removal resulting in milk reflux to the ductal and alveolar compartments (Caja et al. 2004). If the delay is longer than 180 seconds, milk production can be reduced and residual milk can be increased. As reported in Table 2, the total stimulation time (TS500), measured over the eight farms involved in our study was, on average 2.66 ± 0.63 minutes, quite close to the upper suggested limit. Considering separately farms performing 2 vs 3 milkings, some differences in milking procedures duration was observed (Table 2). In particular, all 3-milking farms performed forestripping and more time was used for this procedure (p < .05). Total preparation time per cow was much higher in 3-milkings farms than in the others (þ20%, p < .05) but, at the same time, total stimulation time increased only by 4.6% (P ¼ NS); this is the result of a scrupulous milking routine with a good work organisation in the parlour, with reduced time waste. The number of animals prepared at each side was lower in farms that performed 3 milkings than in the others. Bimodality of the milk flow curves was also lower (p < .001), as a sign of a correct routine both in terms of completeness and timing.
Increasing milking parlour size allows to milk more animals at the same time, but these two parameters have to be considered in relation to the number of milkers simultaneously working at milking. The ideal milking routine has to achieve two main objectives: the first is to clean the teat and control the milk to prevent udder health problems and avoid milk contamination; the second is to induce a correct milk ejection starting through tactile stimulation. Regarding the latter aspect, the risk of building a big parlour is to increase too much total stimulation time, decreasing effectiveness of oxitocine hormone for milk let down. In the present study total stimulation time was included in the range among 60-180 seconds, which can be considered correct, but bimodality resulted statistical different (p < .001) among farms with different parlour size (28.0% vs. 42.0%, respectively for farms with < 10 and ! 10 stalls per side), suggesting a reduced milk ejection effectiveness in larger milking parlours.
Total daily milking duration was very high in particular for 3 milkings/day farms where milking lasts about 11.4 hours/day, while in the others it lasts about 3.56 hours/day. This does not mean that cows are involved in milking all the time, but the milking machine is working for a long period, and this results in a faster ageing of milking machine components and higher energy consumption. Following the studies of different authors (Reid and Stewart, 2007;Ginsberg, 2011;Greenham and Humphries 2018), new parameters were calculated in order to compare different situations and understand where there was a need to improve (Table 3). As suggested by Greenham and Humphries (2018) the cows/hour parameter is a poor comparator of herds with different mean yields. In the present study it was ranging from 35 to 117 cows/ hour. On the other hand, the milk/hour parameter could be more useful as an indicator of milking efficiency because it is more related to farmer income. In the present study the milk/hour parameter resulted lower than reported by other authors (Greenham and Humphries 2018), probably due to the long duration of milking. In order to benchmark farms of different sizes and different milking parlour types against each other the milk/stall per hour parameter can be used. The target is 55 kg of milk/stall per hour (Greenham and Humphries 2018) which is similar to the average value found in the present study although, as expected, great differences were found between farms with different parlour size.
Using an opportunely adapted version of the milking task time evaluation form developed by University of Winsconsin-Madison, Milking Research and Instruction Lab (2003) the stay time for each group of cows in the holding area (Table 4) could be measured. The highest stay time was measured for farms with more than 10 stalls/row, registering a maximum of 76.3 minutes. The holding area has to be well designed in order to be comfortable for cows. Both microclimatic condition and crowding can be stressful for cows. A stressful event immediately before milking can compromise milk ejection, interfering with oxytocin action.
The resting behaviour and consequently the lying behaviour can be detected with visual observations or through automatic monitoring systems. Visual observations can have deficiencies such as the time needed Table 3. Milking efficiency parameters (least square means LSM) in farms with different milking frequency (2 vs 3 milkings/day) or different milking parlour size (<10 vs !10 stalls/side). for recording and the operator's reliability. On the contrary automatic monitoring systems are less demanding in terms of time, less affected by the subjectivity of the evaluators, more practical under field conditions than visual evaluations and also allow the simultaneous evaluation of several animals without observer's disturbance. The use of electronic data loggers is considered as a validated method to measure lying behaviour and in particular the total lying time, the number of lying bouts, the duration of each bout for individual cow and the laterality of their lying behaviour (Ito et al. 2009;O'Driscoll et al. 2008).
Measuring lying and standing time during the whole day allows investigating animal behaviour in relation to milking management, in particular to the number of milkings performed per day. As reported in Table 5 there were no differences in terms of standing and lying time among farms with 2 or 3 milkings per day. This result suggests that even there is a higher standing time for 3 milkings/day farms, considering the total day budget, the cows can rest and lying the right number of hours. In this study, cows spent 11.3 h/d lying down in farms that milked twice a day and 11.0 h/d in farms that milked three times a day; these value are similar to those suggested by Cook et al. (2005) and Ito et al. (2009). These farms probably have a well-designed barn, comfortable for the animals that can rest adequately.
Climatic and lighting conditions in the holding area, milking parlour and housing area As expected, season significantly affected climatic parameters in particular for THI and relative humidity (p < .001).
Microclimatic conditions resulted significantly different also among areas (p < .05). During summer, instead, relative humidity in the holding area and milking parlour did not result different. Microclimatic parameters, as temperature and THI, were characterised by bigger variations (higher differences between minimum and maximum values) in the housing area than in the milking parlour and the holding area. Milking parlour was the area with the highest average value of THI and the lowest light intensity in both seasons (interaction season and area effects p < .005) as reported in Table 6. This result indicates that the milking parlour is not a comfortable place for animals and humans.
The housing area is the place where farmers invest more on cooling systems (all farms had a fan in the housing area, 6 farms had a fan also in the holding area and milking parlour). For this reason, the housing area was characterised by a lower level of THI in both seasons. All the fans were activated through a THI based sensor.
As showed in Figure 1, in Summer THI exceeded the threshold of 68 for many hours of the day in all the monitored areas. As highlighted by Zimbelman et al. (2009) THI threshold for high producing animals (> 35 kg milk/day) is equal to 68.
These farm areas resulted to be under climatic stressful conditions for 22.3 and 19.9 hours/day, in the milking parlour and in the housing area respectively, with potential negative effects on the animals in terms of milk production, health and welfare. Cows' heat stress can also compromise pregnancy period and influence milk production of future generations (Tao and Dahl 2013).
In every farm all the areas (housing area, holding area and milking parlour) had artificial lighting. Seasonal differences in terms of light intensity were also found, as reported in Table 6, but the differences Table 4. Stay times (Least Square Means LSM) for milking groups (G1-G2-G3) in farms with different milking frequency (2 vs 3 milkings/day) or different milking parlour size (<10 vs >10 stalls/row).  were specific for each area. In particular, the housing area resulted more enlightened in Winter thanks to artificial lighting, while in the holding area a better light intensity was found in Summer ( Figure 2). Milking parlour emerged as the area with the worst light intensity during all day in both seasons and in all the farms analysed. This result is worrying, because a bad illumination in the milking area can compromise the efficiency of the milking routine, the chance to check udder status and the well-being and health of the workers.
In barns for dairy cows, the required illuminance is 50 lux in the area of animal movements and 100 lux in the feeding spot. The optimum light intensity is   probably between 40 and 120 lux (Phillips et al. 2000). Good lighting conditions are necessary for technological operations and to ensure hygiene and security of work. Illumination levels for dairy farms recommended by the Italian National Unification Body (UNI) are 50 and 200 lux, for animal barn and milking parlour, respectively (UNI EN 12464-1:2011). Light intensity emerged as a critical aspect in particular in the milking parlour.

Conclusions
Many sensors and data collection systems are available for evaluating milking performance, microclimatic condition and cow behaviour. Each of them has different characteristics, advantages and disadvantages. The choice of a particular method or technology has to be made on the basis of the farm situation, disposable income and time for monitoring. In the present study an integrated data collection system was presented. Some milking parameters (cow/hour; cows/stall per hour; milk/hour; milk/stall per hour) can give a good prediction of milking labour efficiency and timing. Number of milkers resulted a lacking point for the studied farms. The integration of manual measurements with the use of low-cost sensors has made it possible to monitor the efficiency of the process and the environmental conditions in the three areas that characterise a dairy cattle farm. Hence the possibility of better managing the production process by acting proactively on it. Future research needs to address the relation between animal hygiene, udder health and light intensity in the milking parlour, in order to set light intensity limits for performing a good milking job.

Disclosure statement
No potential conflict of interest was reported by the author(s).