The effectiveness of a virtual fencing technology to allocate pasture and herd cows to the milking

Virtual fencing technology provides an opportunity to rethink the management of intensive grazing systems in general, yet most studies have used products developed and applied to more extensive livestock systems. This research aimed to assess the application of a virtual fencing technology developed for the intensive pastoral dairy industry. The Halter system uses 2 primary cues, sound and vibration, and one aversive secondary cue, a low energy electrical pulse, to confine cows to a pasture allocation and remotely herd cows. Two groups of 40 mid-lactation multiparous dairy cows were studied (Bos taurus, predominantly Friesian and Friesian × Jersey, parity 1–8). Cows were milked twice per day and provided 9 kg pasture DM/day in a 24-h allocation, supplemented with 7 kg silage and 6 kg grain DM/ day. Training to the Halter system occurred over 10 d after which cows were managed with the technology for a further 28 d. The type and time of cues delivered was recorded by each collar and communicated via a base-station to cloud data storage. Cows took less than a day to start responding to the sound cues delivered while held on a pasture allocation and were moving to the milking parlor without human intervention by d 4 of training. On training d 1, at least 60% of sound cues resulted in an electrical pulse. Across training d 2–10, 6.4% of sound cues resulted in a pulse. After the 10-d training period, 2.6% of sound cues resulted in a pulse. During the management period, 90% of cows spent ≤1.7 min/d beyond the virtual fence, received ≤ 0.71 pulse/d in the paddock and received ≤ 1 pulse/d during virtual herding to the parlor. By the final week of the management period, 50% of cows received zero pulses/ week in the paddock and 35% received zero pulses/week during virtual herding. The number of pulses delivered per day and the pulse: sound cue ratio was lower in this study than that previously reported using other virtual fencing technologies. We conclude that the Halter technology is successful at containing lactating dairy cows in an intensive grazing system as well as at remotely herding animals to the milking parlor.


INTRODUCTION
Virtual fencing (VF) technology was developed to aid the management of grazing livestock through their flexible containment at pasture without the need for increased physical infrastructure or labor.A typical VF system requires animals to wear a neck collar that delivers a benign sound cue when they approach a predetermined boundary that has been set using a global positioning system (GPS).The neck collar then delivers an electric pulse if the animal ignores the sound cue and continues to walk through the boundary.No pulse is delivered if the animal stops walking or turns around following the sound cue.It takes 3-5 sound cues followed by a pulse for the animal to begin associating the sound with the pulse, and increasingly they start responding to the sound alone (Campbell et al., 2019, Langworthy et al., 2021, Verdon et al., 2021a).A pulse is received in approximately 20-30% of interactions once associative learning is complete (28.5% observed over a 4 week study by Campbell et al., 2019; 22% observed over a 10 d study by Langworthy et al., 2021).
The first VF protoypes were developed in the 1970s (Anderson, 2007), but it is only in the last decade that the technology has become a commercial reality.There are currently several products available on the market (Goliński et al., 2022).The eShepherd from Australia and NoFence from Norway feature most prominently in the published research, with 97% of available research using one of these 2 products (e.g., Campbell et al., 2021;Lomax et al., 2019;Staahltoft et al., 2023;Aaser et al., 2022).Virtual fencing technology was initially designed with large extensive grazing systems in mind (e.g., Umstatter et al., 2015).Consequently, most available research applies to large rangeland systems rather than more intensive grazing systems like those used in pastoral dairy production.However, the pastoral dairy industry could also benefit from VF technology.For example, VF could help address challenges relating to recruitment and retention of labor, better optimize pasture-based cow nutrition, and provide a cost-effective alternative to the exclusion of cattle from sensitive environmental areas such as waterways.
Only one study is available in the published literature on the use of VF to manage lactating dairy cows (detailed in Langworthy et al., 2021 andVerdon et al., 2021b).The study showed that the VF prototype used was successful in creating a boundary which prevented cows from accessing fresh pasture.However, there were indications of increasing milk cortisol concentrations during the first week of management with the VF for some animals in the study, which could be indicative of stress.Unfortunately, the study's duration was limited due to the cows developing skin abrasions on their jaws, likely caused by the design of the prototype studied in combination with differences in the morphology, grazing behavior, and management of cattle in intensive dairy compared with extensive beef systems (Langworthy et al., 2021, Verdon et al., 2021b).The aforementioned research contrasts with previous findings that VF has no effect on the fecal cortisol metabolite concentrations or skin abrasions of beef cattle (Campbell et al., 2019).Verdon et al. (2021b) hypothesized that frequent pasture allocations mean that dairy cows must rediscover the location of the virtual boundary each day, and this could reduce perceptions of environmental predictability and controllability regardless of successful learning of the association between sound and pulse cues.Thus, advice relating to the use of VF in grazing dairy systems needs to be based on research conducted on dairy cattle in intensive pastoral systems specifically, rather than to rely on data from beef breed cattle and more extensive grazing systems.
New Zealand based agri-tech company Halter have manufactured the first and currently only VF technology marketed for intensive pastoral dairy production.A significant feature of the Halter's technology is its ability to virtually herd cows to the parlor for milking as well as virtually fence them in the paddock.This technology is accessible for commercial use but is yet to undergo independent scientific evaluation.The present research studied the application of Halter technology to manage groups of mid-lactation dairy cows at pasture and to herd the cows to the parlor.We aimed to determine the time taken for cows to adjust to the Halter technology over a 10-d training period, and to characterize the effectiveness of the technology over a 4-week management period once learning had been completed.To the best of our knowledge, this timeframe represents the longest study of VF technology for the management of dairy cattle and intensive grazing systems, and the first study on technology used for virtual herding.This paper focuses on the effectiveness of the Halter system when used for virtual fencing and herding of dairy cows.Cow welfare under Halter management will be reported in a subsequent publication.
We hypothesize that the number of pulses delivered to cows during virtual fencing would decline over the 10-d training period, and that cows will be moving to the parlor during virtual herding by the end of the training period.

Ethical statement
All animal procedures were conducted with prior institutional animal ethics approval (University of Tasmania Animal Ethics Committee A0028563) under the requirement of the Tasmanian Animal Welfare Act (1993)

Animals and Experimental Design
This experiment was conducted over 44 d during autumn 2023 at the Tasmanian Institute of Agriculture's Dairy Research Facility (TDRF) in Elliott, north-west Tasmania, Australia.The daily ambient air temperature (°C), wind speed (km/h), relative humidity (%), solar radiation (W/m 2 ) and total daily rainfall (mm) were recorded over the study duration by the TDRF 's Environdata Weather Station Pty Ltd. (v1.7.1).
Eighty mid-lactation dairy cows were studied (55 Holstein-Friesian, 1 Jersey, 1 Swedish Red and 23 Friesian × Jersey; parity 1-8).Cows were selected from the TDRF herd of 349 cows on the basis that they were naïve to VF technology and had not received treatment for lameness, mastitis, or metritis in the preceding 3 mo.The selected cows were allocated to one of 2 groups of 40 animals each, ensuring groups were balanced for cow age (means ± SD; 4.5 ± 2.1 years), days in milk (193 ± 22.0 d), milk production (19.9 ± 2.6 L/d), body weight (586 ± 45.1 kg) and body condition score (4.3 ± 0.4, 8-point scale).An a priori sample size calculation was not conducted for this observational study.Rather a group size of 40 was chosen to replicate normal grazing pressure and behavior of cows in pastoral settings.
Cows were milked twice daily (~0730 h and ~1600 h local time) and moved to a new perennial ryegrass (Lolium perenne L.; ≥ 80%)-based pasture allocation after each morning milking (i.e., every 24 h).A total of 16 paddocks were grazed in this experiment.Paddocks were randomly distributed across the TDRF milking platform and averaged a walking distance of 527 m from the milking parlor (range 24 to 872 m).Groups of cows grazed 8-9 paddocks each (average paddock size 1.4 ha, range 0.5 -3.2 ha) with an average of 5.2 d spent grazing each paddock (range 1-10 d).One paddock was grazed twice with a 34 d interval between grazing events.The perimeter of each paddock was defined by electric-fencing with a mean voltage of 3.5 kV.A front-fence was used to allocate pasture by separating the paddock into an inclusion zone that contained the animals (i.e., the area where animals could move freely) and an exclusion zone that contained fresh pasture and no animals (i.e., the area where animals were being prevented from accessing).Water was provided ad libitum via water troughs within the inclusion zone.
Groups of cows were trained and then managed using the Halter VF technology.A single virtual front-fence was used to confine these groups of cows to their daily pasture allocation and the technology herded the cows to the parlor for each milking.A stockperson on a utility task vehicle (UTV) returned cows back to their paddock after milking.The same stockpeople (n = 3) were responsible for cow management throughout the experiment.
The experiment was divided into 3 time periods of interest.( 1

The Halter technology
The Halter collars incorporate a solar powered device that sits on either side of the cow's neck (488 g) and a counterweight (912 g).The technology was fitted to all cows by trained and experienced staff 8 d before the start of the experiment.The fit was assessed 3 times during the experiment and, if necessary, adjustments made.The Halter collars used GPS and inertial measurement unit to continually monitor cow position, direction and movement.Date, time, and GPS location of each cow were logged by the Halter device twice per second and communicated to a base station via a wireless radiofrequency link.This enabled real-time observation of individual cow location through the Halter app.Several base-stations were set up around the TDRF milking platform providing full coverage of the farm.
The functions of the Halter system were to virtuallyfence as well as virtually-herd dairy cows to the milking parlor.The details of these 2 operationally distinct functions are provided below.

Holding cows in zone (i.e., virtual fencing).
A Halter drone mapped the TDRF before the commencement of the experiment.Mapping included the location of physical fencing, laneways, water troughs and paddock gates.These features were loaded onto a cloud-based web interface, accessed via the Halter app.The GPS location and activation status of virtual fences was then controlled through the app and communicated via a base-station to the collar devices.Once activated, the Halter devices used GPS fixes to determine the cow's proximity to the virtual fence.If a cow crossed the virtual fence (called 'leaving the zone'), the device emitted a distinctive but non-aversive single continuous sound tone (from here on called "sound").The sound ceased and no further stimuli were applied if the animal stopped walking or turned back into zone.If the animal continued moving out of zone, the sound increased in intensity to a crescendo of 2700 Hz followed by an electrical stimulus of up to 0.18 J of electrical pulses delivered over 20 µs.The duration of the sound before application of the electrical stimulus and the strength of the electric pulse were variable, depending on factors such as the animal's individual reactivity.Delivery of the sound was bi-directional.That is, the sound was delivered by the left-or right-hand side of the device depending on whether the animal needed to move to her left or right to re-enter the zone.The sequence of a sound followed by the electrical pulse was repeated if the cow continued to walk further out of zone.No stimuli were applied if the cow turned around to re-enter the zone.
Transitions to the milking parlor (i.e., virtual/ remote herding).Transitions of cows from the paddock to the parlor were also managed through the Halter app.Some principles of virtual fencing applied to the virtual herding function.The bi-directional sound cue continued to guide the animal in the correct direction, with delivery of an electric pulse if the sound was ignored.The virtual herding function, however, included a third vibration stimulus.The vibration stimulus had 3 primary roles.First, a longer vibration alerted the animal to pending change in conditions, such as a transition to the parlor or to a new pasture allocation (the latter function was not used in this study).Second, when cows were being guided by the sound cue, a short vibration let them know that they had moved enough to be heading in the correct direction (e.g., the direction needed to move back behind the virtual fence or toward a paddock exit during virtual herding).Third, it encouraged consistent cow movement to the parlor.The cow's heading and speed was derived from artificial intelligence (AI) models that use the collar Inertial Measurement Unit (IMU) as input.The collar device began to vibrate when a cow stopped walking forward during a transition.If the cow re-commenced walking the vibration would cease.If she stayed stationary the intensity of the vibration gradually increased over a 30s period, followed by the electric pulse.Importantly, the roles of the 3 sensory cues did not overlap i.e., different cues were never given at the same time.The sound cue's role was to guide cows to the correct direction.Once in the correct direction, the vibration kept them moving forward.The electrical stimulus was only ever used if an animal ignored a sound or vibration cue.
Device safeguards.The following applies to both virtual fencing and virtual herding conditions.Stimuli were not applied if cow movement occurred above a specific velocity (i.e., the animal was trotting/running), if the cow hadn't moved significantly for a period, or if the cow received more cues than expected.For the latter, the system included a maximum number of consecutive pulses an animal could receive before the device would 'lock-out', during which no stimuli were delivered.The exact conditions triggering a lock-out are commercial and confidential.The lock-out remained until specific criteria were met, which depended on the cause of the lock-out (e.g., a specific amount of time had passed or until the animal had proven she was fit and able to move by walking at least 30 m).
Training to the Halter system.Two experienced Halter staff managed the training period for this experiment, supported by the lead researcher.Training occurred in situ.For the first 3 d of training cows continued to be managed as they were during the adjustment period.That is, stockpeople moved cows to the milking parlor and an electrified tape was put up 5 m beyond the GPS location of the virtual fence.The cows' dependence on cues from the collars was slowly increased over the next 2-3 d of training as stockpeople slowly took a less active role in their movement.During this period the electric fence was also gradually moved further from the location of the virtual fence.Stockpeople remained present in the last days of training but only intervened if required (e.g., when learning the location of a gateway in a new paddock).Once training was complete the animals were herded remotely i.e., no stockpeople were present at the paddock and the electric fence was no longer used.

Ration and pasture allocations
Available pasture was allocated at 9 kg of DM/cow per day and supplemented with 7 kg of pasture silage DM/cow per day which was provided in the paddock after the morning milking, and with 6 kg DM/cow per day of grain-based concentrate in the milking parlor, evenly split between the morning and afternoon milkings.The average nutritional composition of the pasture, silage and pellets provided is detailed in Table 1.
Pasture biomass was estimated before each allocation by averaging ~100 measurements of compressed pasture height taken with an electronic rising plate meter while walking over the allocation in a zigzag transect (Ag Hub F200, Farmworks Ltd.).Measurements of compressed pasture height were converted into pasture biomass (kg of DM/ha) using the following 'best fit' equation (Dairy NZ, 2023): e ed pasture height cm .
( )+ 500 The estimated biomass was then imported into the Halter app which was used to allocate pasture at an estimated 9 kg DM/cow.The app issued a warning if allocations included sharp angles (i.e., < 45°) or high stocking densities (m 2 /cow) and each allocation had to include a water trough to be activated.The mean pasture biomass at entry to the paddock was 3537 ± 654 kg DM/ha.This biomass is typical for dairy cows grazing autumn irrigated pastures in the North-West of Tasmania.Fresh pasture was allocated in an average of 0.1 ± 0.02 ha of land (range 0.07-0.2ha), equating to 26.3 m 2 of fresh pasture/cow per 24 h allocation (range 17.8 -42.9 m 2 /cow).Previously grazed allocations were not back-fenced in this experiment so the total space available to cows increased with days in a paddock.

Measures recorded
Cues delivered.The Halter devices recorded details on the cues delivered to each cow while in the paddock with an active virtual fence (called an 'active zone') and during herding to the milking parlor (called a 'transition').A zone became inactive when cows were removed from the paddock, for example when they left for milking, and a new zone activated when they returned to the paddock.Consequently there were 2 active zones per 24-h pasture allocation in this experiment, one for after each milking, but the location of the virtual fence was the same for each of these active zones.Transitions to the parlor were reported in stages i.e., 'exit the paddock' and 'navigating to the parlor' were described separately.The 44 d that the technology was active for were categorized into 6 time-periods.These were: Training Period Day 1 (TD1 -the first day the technology was activated), Training Period Days 2-10 (TD2-10 -the remaining of the 10-d training period) and Management Period Weeks 1-4 (Week 1-4 -corresponding to the 4 weeks following completion of the 10-d training period).
The following data were collated for each active zone: the date and time that zones were activated (i.e., when cows returned to the paddock) and ended (when cows left the paddock), the number of times the cow breached the virtual fence, the duration and average distance out of zone, the number of sound and pulse activations over the full duration of the zone, the duration that the sound was active, and the number of safety lockouts over the zone's full duration.Data for active zones 1 and 2 per 24 h allocation were summed to calculate the number of cues delivered per day.The daily data for each cow were then averaged per day, for each of the 6 time-periods.
Data recorded during transitions to the parlor include: the date and time at the start and end of the transition, the distance walked, the time taken to complete the transition, the number of sound and pulse activations over the transition, the number of seconds the sound and vibration cues were active over the transition, and the total number of safety lockout events triggered during the transition.Daily transition data relating to paddock exit and race navigation were summed for each cow and for the AM and PM milkings.These data were then used to calculate the number of cues delivered to each cow during transition per day.Daily data for each cow were then averaged per day for each of the 6 time-periods.
Finally, daily stimulus data from when cows were held in a zone were summed with that from when cows were completing a transition to create a third data set relating to the total number of cues delivered by each device per day.The ratio of pulse to sound events were then calculated.Daily cue data for each cow were also averaged per day for each time-period.

Statistical analysis
All analyses were conducted using R (ver.4.1.1,R Core Team 2021).The significance level α was set at P ≤ 0.05.The individual animal nested within group was used as the experimental unit.Percentiles were used to describe the distribution of data from when cows were held in zone in a paddock and while transitioning to the parlor, during training and in each week of the management period.
The probability of avoiding a pulse was assessed using generalized linear mixed logistic models.Separate models were fitted to data relating to when cows were held in the paddock and relating to transitions to the parlor.Each model included "time period" as a fixed effect (i.e., training d 1, training d 2-10, management wk 1, 2, 3 or 4) and "cow" as a random effect.The models were conditional in the sense that data were restricted to when a cow had received a sound cue within the time-period, but no cows avoided sound completely for any time-period.No cows avoided a pulse on training d 1, so this day was excluded from the models.In the models, one cow was randomly selected to avoid a pulse during transitions to the parlor during training d 2-10 and management wk 1.This was done to avoid technical issues associated with the prediction of a zero probability during the modeling of transition data.
Linear mixed model regressions were developed to predict the number of pulses per sound cue when cows were in the paddock and during transitions.All pulse and sound data were transformed to the power of 1/4 so that residuals from the estimated models were normally distributed (supplementary Figure 1, available at https: / / hdl .handle.net/102 .100.100/608846).Models were conditional in the sense that data were restricted to cows that received at least one pulse in a given period.The models used the fixed-effects of "time period" (categorical), "group" (categorical) and the number of sound activations (numeric).The 2-way interactions between period and sound, and period and group were also included as was the random effect of "cow."Residuals errors were assumed to have different variances in each period.
There were 3 events in this experiment resulting in device safety lockouts (described in the results).To account for this, daily data associated with these events were removed from the transition data set and the average cue data per time-period recalculated.The generalized linear mixed logistic models and the linear mixed regression model described above were also fitted to this new transition data set that excluded the lockout events.

Safety lockouts and data retention
There were 3 events in this experiment resulting in device safety lockouts (d 18 -group 1, d 26 -group 1, and d 31 -group 2).All 3 involved human error resulting in a gate or temporary electric fence not being opened in time for a transition to the parlor.The protocol of the present experiment was modified after each error.
Four cows were removed from the experiment after developing mastitis (2 cows from group 1 at d 20 and 23, 1 cow from group 2 at d 12) or becoming lame (1 cow from group 1 at d 44).Some data were missing due to technical errors with unknown cause, but data can be dropped when the collar runs out of memory or communication links are too busy.Cues were delivered to cattle in these cases but were not logged by the technology and/or transferred to the cloud storage.A total of 97.3% of data were retained from when cattle were held in zone, and 91.9% of data from when cows were transitioning to the parlor.Transition data were missing for both groups at d 1 of training.

The training period
Holding cows in zone.The median pulse: sound ratio of cows in group 1 was 0.61 ± 0.25 during the morning allocation of d 1 and 0.16 ± 0.24 during the evening allocation.A similar reduction was observed for cows in group 2 (0.75 ± 0.18 pulse: sound ratio in the morning allocation compared with 0.39 ± 0.35 in the evening allocation).These data suggest that cows quickly learned to respond to the sound cues while be-ing held in zone, and that most of this learning occurred within the first day of training.This is supported by the reduction in the time cows spent out of zone, the number of sound cues delivered, the duration of sound cue activation, the number of pulses delivered and the pulse: sound ratio on training d 1 compared with training d 2-10 (Table 2).
Transitioning to the milking parlor.A technical malfunction meant that no sound and pulse data were recorded for the first day of training to transition to the parlor.By d 4 of training both groups of cows were exiting the paddock and navigating the laneway to the parlor unassisted.This is with the exception of d 8 and 9 for groups 2 and 1, respectively.Groups were moved into a fresh paddock on these days and assistance provided as they learned to respond to the cues when locating the exit of a new paddock.
Details on the cues delivered during transitions to the parlor are presented in Table 3.The vibration function was active for a median of 5 min/cow.dayduring the training period (42% of this time was during paddock exit and 58% during race navigation).The median cow received 20.5 sound cues/day during transition training, with a median total sound duration of 52.5 s (average sound duration 2.6 s).Vibration was active for a larger proportion of the total transition time than sound (16 vs. 2.8%).During d 2-10 of the transition training period 50% of cows received ≤1.4 pulses/day (0.7 pulses/transition), and cows rarely received more than 2 pulses/day (90th percentile 2.2 pulses/day).Sixty-four percent of sound and 81% of pulses were delivered while cows were exiting the paddock.
Total stimuli delivered per day.The total number of sound and pulse stimuli delivered per cow.day in each time period is presented in Table 4.The data shows that 50% of cows received ≤32 sound and ≤2 pulse cues/day in the training period, with a pulse: sound ratio of 0.064 (6.4 pulses per 100 sound cues).Cows in the training period rarely received more than 3.2 pulses/d or had a pulse: sound ratio exceeding 0.14 (i.e., 14 pulses per 100 sound; 90th percentiles).

The management period
Holding cows in zone.Over the 28 d of the management period, 90% of cows spent ≤1.7 min/day out of zone corresponding to ≤0.15% of daily paddock time out of zone (Table 2).When cows did leave the zone, they moved on average 27 cm into the exclusion area (range 0.0 -20.3 m, median 16 cm).The number of times cows left the zone was almost identical to the number of sound cues they received (1.05 sound/crossing out of zone).A median sound duration of 11.8 s/cow.dayand of 5 sound activations/cow.daysuggests that the  typical sound activation lasted for approximately 2.4 s (Table 2).Cows interacted with the virtual boundary at least once per day (10th percentile for interactions 1.14/d), but seldom received more than 1 pulse/d (90th percentile 0.71 pulses/d).Most cows received ≤1 pulse per 100 sound cues when held in zone (57th percentile, pulse: sound ratio 0.01) and few exceeded 7-8 pulses per 100 sound cues (90th percentile).
Transitioning cows to the milking parlor.Cows walked faster and received fewer vibration, sound and pulse cues during the management compared with the training period (Table 3).The median duration of the vibration function during management was 51.8 s/cow.day and for sound 22.7 s (4.4 and 1.9% of transition time, respectively).Half the cows received ≤10 sound and ≤0.43 pulse cues/day during transitions to the parlor.With 2 transitions to the milking parlor each day, this equates to <1 pulse every 4 transitions.Ninety percent of cows received ≤16.7 sound and ≤1 pulse/ day during transitions.More sound and pulse cues were delivered while cows were exiting the paddock rather than when navigating the laneway (67 and 62%, respectively), but vibration duration was split 50/50 between the 2 periods.
The percentage of cows impacted by the temporary raceway obstructions were 72% and 53% of group 1 cows at d 18 and 26, and 82% of group 2 cows at d 31.The number of stimuli delivered and the ratio of pulse: sound cues were higher on these days than on the previous and following days (Table 5).The median and ranges for cue data averaged per time period following the removal of these events are presented in supplementary Table 1 (available at https: / / hdl .handle.net/102 .100.100/608846).
Total stimuli delivered per day.In the 28 d after the training period, 50% of cows received ≤15.7 sound and ≤0.67 pulse cues/day (Table 4).The median pulse: sound cue ratio in the management period was 0.026, suggesting most animals received ≤3 pulses per 100 sound cues (Table 4).

Probability of avoiding a pulse
A summary of the stimuli delivered during each timeperiod is presented in Figure 1.The number of animals avoiding a pulse following a sound while being held in zone increased over time, as indicated by the increasing number of data points on the 0 value of the y-axis.This interpretation is supported by the logistic regression model depicted in Figure 2A.No cows avoided a pulse on training d 1.The probability of zero pulses increased from ~5% of cows during training d 2-10 to ~30% during wk 1 of the management period.The proportion of animals receiving zero pulses/week continued to increase over time, with ~50% of cows receiving no pulses/week by management wk 4.
The probability of avoiding a pulse following a sound during transitions to the parlor was comparable between d 2-10 of the training period and wk 1 of the management period; all cows received at least 1 pulse/ week in these periods (Figure 2B).The model predicted that ~10% of cows received zero pulses/week during transitions in wk 2 and 3, and ~37% of cows in wk 4 (Figure 2B).This is also demonstrated by the growing number of points with zero on the y-axis in wk 2-4 of Figure 1.Removing transition data from the days of the raceway obstructions increased the proportion of cows avoiding a pulse in wk 1, 2 and 3 from 0 to 8%, 10 to 22% and 10 to 27% zero pulses/week, respectively (Figure 2C).

Changes in the pulse: sound ratio over time
When cows were held in zone in the paddock, the predicted number of pulses per sound cue declined over time (Figure 3A).The positive coefficient for sound frequency in the model output shows that at d 1 of training the more times a cow interacted with the virtual fence, the more pulses she received (Table 6).A linear relationship between sound and pulses at training d 1 is also clear in Figure 1.Negative coefficients for the interaction between sound cue and time period (highlighted in Table 6) show a decoupling of the linear relationship between sound and pulse over time, as cows increasingly respond to the sound cue alone.In Figure 1 this change is demonstrated by the flattening of the linear relationship between sound and pulse cues over time.
There was an effect of group on the number of pulses received in the paddock at training d 1 (Table 6).Cows in groups 1 and 2 crossed the virtual boundary a comparable number of times on the first day of training.Cows in group 2, however, moved further out of zone, spent more time out zone, received more sound and pulse cues, and had a higher pulse: sound cue ratio on the first day of training than cows in group 1 (Table 2, Figure 3A).
A linear relationship between sound and pulse during transitions is not evident from the data in Figure 1, nor is a change in this relationship over time.The number of sound and pulse cues declined over weeks (Table 7, Figure 3B).For cows that received a pulse however, the number of pulses received per sound cue was relatively consistent (Table 7).When the raceway obstructions were removed from the transition data, the number of pulses received by the median cow declined from ~1.5 per day during the training period to ~0.5 per day in wk 1 of the management period, and

DISCUSSION
This is the first study to report on the application of a technology to virtually-fence and virtually-herd dairy cattle.To the best of our knowledge, it is the largest and longest study of VF in an intensive grazing system in general.Cows in this study learned to respond to the sound cues delivered while held on a pasture allocation in the paddock in less than a day and were transitioning unassisted to the milking parlor by d 4. The number of pulses delivered per day declined over time with cows receiving less than 2 pulses per 100 sound cues from the second week post-training.
Table 5.The impact of raceway obstructions on stimuli delivered per cow during transition.The day that the error occurred is shaded, with the day previous and the day following the error also presented for context The published research on VF for dairy cattle describe simple grazing regimens (i.e., a single virtual front-fence) studied over a short duration (i.e., ≤ 12 d) (Lomax et al., 2019, Langworthy et al., 2021, Verdon et al., 2021b, Hamidi et al., 2022).The design and duration of these studies make the period when cows were held in zone during the 10 d of training the best comparison to the present research.During d 2-10 of training, cows in this study received fewer pulses per day and fewer pulses per interaction with the virtual fence than that previously reported for dairy cows.For example, Langworthy et al. (2021) trained 30 midlactation dairy cows over 3 d in a single paddock and studied their response to the technology when managed for 10 d with a virtual-front fence.The authors found that cows received an average of 2 pulses/d over the 10-d observation period, with an average pulse: sound ratio of 0.18.Other research reports an average pulse: sound ratio of 0.13 from d 2-6 of training in groups of dry dairy cows (Lomax et al., 2019) and 0.11 from d 2-12 in small groups of Flekvieh heifers at pasture for 5 h/day (Hamidi et al., 2022).These ratios are more than double that observed in the present research while cows were held in zone.Predictions for transition data following removal of days where there were raceway obstructions are also presented (2C).In each chart, the x-axis is time period and the y-axis is the predicted probability of a cow avoiding a pulse, given it has a sound within that period.Shaded regions are 95% confidence intervals, based on the fixed-effect for the period variable.The cow-level data used to estimate the models is conditional on a sound occurring within a period.Likelihood ratio tests on nested models suggest that "group" is not relevant (P > 0.01 for both paddock and transition models), so only one line is needed to summarize each model.No cows avoided pulses in the first period of paddock data (TD1), so this period was excluded from the models (and transition data was missing for TD1).
Figure 3. Linear mixed model regression predictions for paddock data (3A) and transition data (3B).Predictions for transition data following removal of days where there were raceway obstructions are also presented (3C).All pulse and sound data (daily average per cow, per period) were transformed to the power of 1/4 (predictions and confidence intervals are backtransformed).In each chart, the x-axis is time period and the y-axis is the predicted number of pulses for a cow that activates the median number of sounds in that period.The dashed lines are at one pulse.The number of cows in each period that receive at least one pulse is given as "n = " and the median number of sounds per cow (for cows receiving at least one pulse in that period) is given as "p = ."The rows of "p" and "n" values are for Group 1 (first row) and Group 2 (second row), respectively.Shaded regions are 95% confidence intervals, based on the fixed-effects.No prediction is made in training d 1 (TD1) for the transition model due to missing data.A likelihood ratio test based on nested models produced evidence that "group" interacts with "period" (P < 0.001), so different lines are drawn for Group 1 and Group 2 for each model.
Differences in design and function between technologies likely contribute to the lower pulse: sound cue ratio observed in this study compared with other research.For example, the technology studied in the present research uses a bi-directional sound cue to guide cattle movement and delivers a vibration to reinforce when they were heading in the correct direction.The maximum energy delivered by the pulse in the Halter system is comparable to other technologies (0.18 J of energy in 0.20 ms e.g., NoFence, Hamidi et al., 2022), although not all manufacturers report these values (e.g., eShepherd, Langworthy et al., 2021).The technology studied in this research, however, uses machine learning to modify the level of electrical stimulus delivered to cows based on individual responsiveness.The energy of the pulse delivered by the technology is lowest at the start of training and increases thereafter as the system determines the lowest energy threshold required to produce an aversive response for the individual animal.Variability in how cattle interact with and respond to the cues   Campbell et al., 2019;Lomax et al., 2019;Langworthy et al., 2021;Verdon et al., 2021a;Verdon et al., 2021b).Individualized cue delivery, like that used by the Halter technology, may have reduced variability in the response of cattle to VF leading to overall improved effectiveness of the technology.For example, in the study by Langworthy et al. (2021) 90% of cows spent 12 min or less per day beyond the virtual boundary, compared with 90% of cows in the present research spending 1.7 min or less per day beyond the virtual boundary.

Training cows to transition to the milking parlor
Cows were transitioning to the parlor without human intervention by the fourth day of training.Transitions require cattle to be guided to a specific location using sensory cues, which is a more complex task than learning to avoid an area while being held in zone.This explains why 70% of all cues delivered during the training period occurred during transitions, mostly while cows were exiting the paddock.Despite the complexity of the task, the pulse: sound cue ratio during training to transition was lower in this study than when cows were held behind a virtual front-fence in previous research (Lomax et al., 2019, Langworthy et al., 2021, Hamidi et al., 2022).Cattle are capable of learning complex tasks.For example, Neave et al. (2023) trained dairy cows to discriminate between 2 colors, Bailey et al. (2000) trained heifers to follow an informed conspecific to locate a feed source in an 8-arm maze, and Kilgour (1981) showed cows outperformed smaller mammals in their ability to solve increasingly difficult detour problems in a maze test.These studies, as well as the findings of the present research, show that cows possess the cognitive abilities to quickly learn the complex task of being guided by cues delivered through VF technology, given they are provided with sufficient space, time, and support in the training period.
The support provided to cows during training include the presence of familiar stockpeople conducting familiar routine handling practices, an extended sound cue duration, and a wide heading angle guiding the direction of cow movement.The cows were moved as per normal commercial practice for the first few days of training, with the stockperson gradually removing pressure and allowing the cows to rely on the technology.This training regimen was developed and refined through commercial experience gained from training hundreds of thousands of cattle to virtual herding and aligns with the published research on how cattle learn.For example, Hirata et al. (2016) found cows were able to navigate a complex maze only if they were provided with step-by-step learning opportunities.We used the emergence of a cow leader while exiting the paddock during transition as a key indicator that human support could be reduced during training.Albright and Arave (1997) defined cattle leadership as 'the ability of an individual animal to influence the movement pattern of the group'.Spontaneous group movements decline by 40% when a herd leader is removed (Della-Rossa et al., 2013).Many studies have demonstrated a social element to how livestock learn and respond to VF technology (Colusso et al., 2020, Keshavarzi et al., 2020, Verdon et al., 2021a, Aaser et al., 2022).It is through social facilitation of behavior that herd leaders can have a beneficial or detrimental effect on the function of VF technology.For example, a study of angus heifers managed with virtual fences in an intensive grazing system observed one animal to repeatedly challenge the virtual-boundary, over time recruiting others to also breach the boundary (Verdon et al., 2021a).The authors concluded that the successful application of VF technology needs to accommodate the natural behaviors of cattle.The present research provides a positive example of how this can be done.Thus, human support of cattle during transition training should be provided until a herd leader has demonstrated they are able to interpret the cues delivered by the technology, particularly while exiting the paddock.It is important that this is observed in several paddocks to ensure cows are responding to the directional cues and not memory of the location of the paddock gate.The time required to reach this phase of training will be variable, depending on factors such as the social stability, the strength of the leadership, and the complexity of the paddock design, but this requires further assessment.
There is little published research on herding of livestock using technologies.Campbell et al. (2021) found a moving back-fence that prevented angus cattle from turning was more successful at herding than a front and a back-fence.The researchers noted that the speed of the transition was highly dependent on the animal's own pace of movement.This meant it took around 1 h to complete the transition (range 40 min -1.5 h; pace of 0.1 m/s) during which cattle received an average of 8.4 sound and 3.0 electrical cues.The variability in herding time reported by Campbell et al. (2021) would not be practical in a dairy setting.The vibration cue used in this study alerted cows to a pending transition and encouraged them to continue moving forward, resulting in more consistent transition speed (approximately 0.8 m/s).Thus, the vibration cue appears to be a key feature to successful herding of cattle.

Managing trained dairy cows with virtual fencing and herding
This is the first technology marketed for the dual functions of virtual fencing and virtual herding.With the additional herding function of the present technology, one might expect the number of cues delivered to be higher than other technologies with only a virtual fencing functionality, but this wasn't the case.As an average over the 4-week management period, the cows in this research received 15.7 sound cues and 0.67 pulse cues per day with a pulse: sound cue ratio of 0.026 (i.e., 2.6 pulses per 100 sound).By comparison, Colusso et al. (2021) found trained dry cows received 28.2 sound cues and 3.7 pulse cue per day (pulse: sound ratio 0.13) and Langworthy et al. (2021) that trained lactating cows received 8 sound and 2 pulses/day (pulse: sound ratio of 0.18).
The timeline of VF studies needs to be considered when making comparisons between research findings.Colusso et al. (2021) and Langworthy et al. (2021) were studies of short duration (6 and 10 d respectively) and commenced immediately after a training period (6 and 3 d of training, respectively).Cows in these 2 studies were likely in stage 2 of learning the technology, which is characterized by adaptation to the new management system (see Lee and Campbell, 2021).By comparison, learning was complete by the management period of the present research, as evidenced by the increasing proportion of cows receiving zero pulses (stage 3 of learning, Lee and Campbell, 2021).Indeed, during the fourth week of management, 50% of cows received zero pulses/week while in the paddock and 35% received zero pulses/week during transitions.Of cows that received any pulse in wk 4 of the management period, 50% received less than one per day.
Other than the present study, however, there are no published data on the long-term response of cattle to VF in dairy systems.A study of similar duration to the present research but on angus cattle managed with a single stationary virtual fence found 28.5% of interactions included an electrical stimulus (Campbell et al., 2019).Other research on beef calves in a semiintensive grazing system suggests that the number of cues delivered reaches baseline levels 2 mo after the initial implementation of the technology (Staahltoft et al., 2023).In comparison to beef cattle, dairy cows are kept at high stocking densities, are frequently moved across the landscape and to the milking parlor and are more habituated to humans and technologies.Long-term studies on VF technologies in dairy systems are clearly needed.In the meantime, communications on VF technology must differentiate between (1) the response of cattle to the technology during learning/ adaptation compared with completed learning/application, and (2) dairy and other intensive grazing systems compared with more extensive beef systems.
Human error was the biggest risk to a high pulse: sound ratio in this study.Specifically, on 3 occasions a gate or temporary electric fence was not opened in time for cows transitioning to the milking parlor.This study was part of a larger research program where 5 groups of cattle were sharing laneways -4 groups involved in this large program were managed by research staff, and the commercial herd was managed by TDRF farm staff.Of these groups, 3 were managed with electric-fencing and 2 with VF.This added complexity to the management of cow movement along the laneways that is unlikely to be seen on a commercial facility.While far from ideal, the occurrence of these events does highlight 2 important considerations.First, any virtual herding technology needs to have safeguards built into the system that identify times where animals are failing to respond to the guidance cues and disables their delivery.Such a safeguard has since been implemented by Halter.Second, rare or one-off events that temporarily interfere with the cow's ability to control the receipt of a pulse do not appear to interfere with the cow's ability to predict and control the receipt of a pulse in the future.An assessment of cattle behavior and stress physiology is needed to fully elucidate the potential implications of these events for cow welfare and will be addressed in a future publication.

CONCLUSION
The VF technology studied in this research effectively contained dairy cows on a 24h pasture allocation, and guided cows to the parlor for milking twice per day.Cows quickly started responding to the sound cue alone when in the paddock, with most of this learning occurring within 1 d.Learning to transition took longer, but cows were moving from the paddock to the parlor unassisted by d 4.After training was complete, most cows received ≤ 1 pulse per 100 sound cues when confined to a pasture allocation and ≤ 3 pulse per 100 sound cues during transitions to the parlor (≤1 pulse every 4 transitions).These results are promising in terms of technology effectiveness, but a detailed assessment of cow welfare and productivity when managed with VF is recommended to elucidate the animal's experience of the technology and utility from the farmers perspective.
) The adjustment period (6 d): Groups were conventionally managed with electric-fencing and herding by stockpeople on UTVs while cows adjusted to the changed social and management conditions.(2) The training period (10 d): Training of groups to the Halter technology commenced at d 7 and continued for 10 d.Previous research using a different VF technology indicates that training is achieved after an average 3 pairings of the sound and electrical stimulus and within ~12h (Langworthy et al., 2021), but the time taken for dairy cows to train to a virtual herding function is unknown.(3) The management period (28 d): Cows continued to be managed by the Halter technology for a further 4 weeks following completion of the 10-d training period.
no transition data were recorded on training d 1 due to a technical error of unknown cause. 1 Raceway obstruction interrupted one transition on one day of this management week.The pulse: sound ratio after removal of data on these days were A 0.02 (0.0-0.15), B 0.02 (0.0-0.08) and C 0.01 (0.0-0.11).All other cue data after removal of the human error events are presented in supplementary files (available at https: / / hdl .handle.net/102 .100.100/608846).remainedbelow 0.05 pulses per day for the remaining weeks of the study (Figure3C, see supplementary files for model output, available at https: / / hdl .handle.net/102 .100.100/608846).
Verdon et al.:  Virtual fencing and herding with Halter technology Table4.Daily total number of stimuli delivered per cow per day.Median values (and range from the 5th to the 95th percentiles showing the distribution of the response of dairy cows housed in two different groups and managed with Halter.Daily data from when cows were held in zone were summed with data during twice daily transitions to the dairy.These daily data were then averaged per day.cow for each reported time period.A technical error meant transition data were not available at training d 1 so this d 1 is not included in the daily

Figure 1 .
Figure 1.Raw sounds and pulse cue data.Data for cues delivered while cows are in the paddock and during transitions are presented separately and the successive rows of charts are for different time periods.All data have been transformed to the power of 1/4.Each point in the figure represents a cow's average daily sound count (x-axis) versus average daily pulse count (y-axis) in the corresponding period: Training Day 1 (TD 1), Training Days 2 to 10 (TD 2-10) and Management Weeks 1, 2 3 and 4 (Wk 1, Wk 2, Wk 3 and Wk 4).Transition data for TD1 is missing.

Figure 2 .
Figure 2. Logistic regression model predictions for data when cows were in the paddock (2A) and during transitions to the dairy (2B).Predictions for transition data following removal of days where there were raceway obstructions are also presented (2C).In each chart, the x-axis is time period and the y-axis is the predicted probability of a cow avoiding a pulse, given it has a sound within that period.Shaded regions are 95% confidence intervals, based on the fixed-effect for the period variable.The cow-level data used to estimate the models is conditional on a sound occurring within a period.Likelihood ratio tests on nested models suggest that "group" is not relevant (P > 0.01 for both paddock and transition models), so only one line is needed to summarize each model.No cows avoided pulses in the first period of paddock data (TD1), so this period was excluded from the models (and transition data was missing for TD1).
Verdon et al.:  Virtual fencing and herding with Halter technology Table6.Holding cows in zone.Estimates of main and interactive fixed effects in a linear mixed regression model for the number of pulses received by cows while being held in zone (conditional on the receipt of at least one pulse).Interactions are denoted by coefficients with "":.The interaction estimates between sound activation and period is shaded.The "95% CI" columns are 95% confidence bounds and the p-value corresponds to an asymptotic Wald test on the individual significance of the coefficient.Sound frequency = the number of sound cues received, d 2-10 = training d 2-10 (training d 1 is the reference), Week 1-4 = management wk 1-4, Group = group 1 or 2 in accordance with the National Health and Medical Research Council/Commonwealth Scientific and Industrial Research Organisation/Australian Animal Commission Australian Code of Practice for the Care and Use of Animals for Scientific Purposes.
Verdon et al.: Virtual fencing and herding with Halter technology

Table 1 .
Mean nutritional composition of the pasture, silage and concentrate pellets provided to mid-lactation dairy cows.Cows were allocated 9 kg of pasture DM.cow.day,7 kg of pasture silage DM/cow.day and 6 kg grain-based concentrate DM/cow.day Verdon et al.: Virtual fencing and herding with Halter technology ADF, acid detergent fiber; ME, metabolisable energy; N/A, not analyzed; NDF, neutral detergent fiber; NSC, non-structural carbohydrates; TDN, total digestible nutrients; WSC, water soluble carbohydrates.
Verdon et al.: Virtual fencing and herding with Halter technology

Table 2 .
Verdon et al.: Virtual fencing and herding with Halter technology Holding cows in zone.Median values (and range from the 5th to the 95th percentiles) showing the distribution of the response of dairy cows housed in two different groups to the Halter virtual fencing system Variable

Table 3 .
Verdon et al.: Virtual fencing and herding with Halter technology Transitioning cows to the dairy.Median values (and range from the 5th to the 95th percentiles) showing the distribution of the response of dairy cows housed in two different groups to the Halter virtual herding system Variable

Table 7 .
Transitioning cows to the dairy.Estimates of main and interactive fixed effects in a linear mixed regression model for the number of pulses received by cows while transitioning to the dairy (conditional on the receipt of at least one pulse).Interactions are denoted by coefficients with "":.The interaction estimates between sound activation and period is shaded.The "95% CI" columns are 95% confidence bounds and the p-value corresponds to an asymptotic Wald test on the individual significance of the coefficient.