Virtual Fence
In Arizona and other western states, ranchers and land managers rely on thousands of miles of permanent wire fencing to manage livestock on extensive rangelands (Hayter 1939; Netz 2004). This type of fencing has improved rangeland conditions in many places by aiding in the application of grazing systems (Holecheck et al. 2011). However, wire fencing can fragment landscape connectivity, pose a risk to wildlife, and is a major financial investment. Moreover, it offers limited flexibility in adjusting pasture size, actively manipulating grazing distribution, or avoiding high-use areas or sensitive habitats within a pasture (Jakes et al. 2018). As a result, there are constraints on the use of permanent fences as a tool for managing riparian health, post-fire vegetation recovery, or improving livestock distribution. Virtual fencing is an emerging precision livestock management technology used to address these limitations and increase management flexibility and adaptive capacity to respond to changing environmental conditions as part of a larger grazing management system (di Virgilio et al. 2018; Lima et al. 2018; Trotter 2010). As a management tool, a virtual fence (VF) system uses invisible barriers, established by Global Positioning System (GPS) coordinates, that influence livestock movement with a combination of auditory and electrical cues (Ehlert et al. 2024; Antaya et al. 2024). Primary elements are shown in Figure 1 and include: (1) a software interface to draw virtual fence lines and the boundary zone on a digital map, which defines the grazing area and exclusion zone; (2) a GPS-enabled collar fitted around the circumference of an animal’s neck or other wearable device that contains technology to track livestock movement and deliver auditory and electrical cues to influence livestock distribution; and (3) base stations and/or cellular towers to transmit and receive communication between the software and collars (for more information please see Rangelands Gateway:https://rangelandsgateway.org/virtual-fence). A VFsystem relies on livestock successfully recognizing anassociation between two cues – an auditory cue (beepingsound) and an electrical cue (electrical pulse) – originating from the GPS enabled collars when the animal enters a boundary zone. Recognition of these cues is learned
through training with classical conditioning and negative reinforcement. After training, livestock should respond to the auditory cue by changing direction away from the exclusion zone (Figure 1). If the association between cues is continuous, predictable, and controllable, a collar can influence livestock movement. Understanding how livestock recognize and interpret this association can limit potential risks for animal health and welfare. This factsheet provides an overview of the underlying learning methods (i.e., classical conditioning and negative reinforcement) used to train livestock.

Figure 1: Conceptual model of VF components (VF software, base station and/or cellular tower, and GPS-enabled collars), which are used to define the grazing area, boundary zone, and exclusion zone. Livestock learn to associate two cues originating from collars when the animal enters a boundary zone: an auditory cue (beeping sound) and an electrical cue (electrical pulse). After training, livestock should respond to the auditory cue by changing direction away from the exclusion zone.
Glossary
Virtual fencing: a precision livestock management tool that uses invisible barriers, established by Global Positioning System (GPS) coordinates, to influence livestock movement with a combination of auditory and electrical cues
Virtual fence (VF): a line drawn on a digital map that can include a boundary zone
Boundary zone: a defined amount of space that extends from where the virtual fence is drawn on the map and acts as a buffer to alert livestock when they are approaching a virtual fence
Grazing area: the area enclosed by the virtual fence available for livestock grazing
Exclusion zone: the area outside the virtual fence line where animals should not enter
Collar: a wearable device fitted around an animal’s neck that contains the technology for tracking locations and delivering auditory and electrical cues
Auditory cue: beeping sound originating from the collars when livestock enter a boundary zone
Electrical cue: electrical pulse originating from collars when livestock approach a virtual fence
Classical conditioning: an involuntary learning process where a novel stimulus is paired with a naturally occurring response and, over time, the novel stimulus can independently trigger the response
Negative reinforcement: a learning process where an unpleasant stimulus is removed to increase the likelihood of a desired behavior
Training with Classical Conditioning
A VF system is designed to influence livestock movement with a combination of auditory and electrical cues. This influence starts by building an association between cues using classical conditioning. Classical conditioning is an involuntary learning process where a novel stimulus is paired with a naturally occurring response and, over time, the novel stimulus can independently trigger the response (Domjan 2014). For example, in Pavlov’s dog training, a novel stimulus (ringing bell) was introduced with food, which naturally caused the dog to salivate, and, with repeated exposure, the dog involuntarily salivated to the ringing bell alone (Figure 2a). In VF classical conditioning, when an animal enters the boundary zone, the unfamiliar auditory cue (beeping sound) is introduced prior to the electrical cue (electrical pulse), resulting in the animal naturally moving away from the location where the electrical cue was received (Figure 2b). With repeated exposure to this combination, livestock will involuntarily change direction and avoid the boundary zone in response to the auditory cue alone. After training, the association between auditory and electrical cues is predictable to livestock. Training with classical conditioning allows livestock to develop strategies to avoid and control whether they receive an electrical cue. The learned association can be used to influence livestock movement and is the cornerstone of virtual fencing.

Figure 2: Classical conditioning in (a) Pavlov’s dog experiment and (b) a VF system..
Modifications and Maintenance with Negative Reinforcement
Classical conditioning informs livestock that an electrical cue is imminent after an auditory cue is heard, triggering an avoidance response. Once this relationship is established, a VF system primarily uses negative reinforcement to maintain and modify this response. Negative reinforcement aids learning by removing an unpleasant stimulus when a desired behavior occurs, which ultimately increases the likelihood of a desired behavior in the future (Domjan 2014). For example, a horse learns to turn towards the direction that reins are pulled to relieve the pressure from the bit created by the reins. In a VF system, the removal of the unpleasant auditory cue and its associated electrical cue, indicates to the livestock that they have successfully performed the desired avoidance behavior and returned to the grazing area (Figure 3). During training, every interaction with the active VF should result in the desired behavior (returning to the grazing area). For this reason, during training, VFs are ideally placed along physical fence lines. Introducing VFs with physical fences limits an animal’s ability to move through the boundary zone after receiving an auditory cue. Repeated exposure to negative reinforcement helps livestock learn the desired avoidance behavior in response to sound alone. Training with physical fences establishes a foundation for the desired behavior, which enhances VF compliance and improves the effectiveness of animal containment within the grazing area once the physical barriers are removed.

Figure 3: Conceptual model of negative reinforcement in a VF system where (a) the auditory cue, associated with electrical cue, is heard in the boundary zone triggering livestock to change directions and (b) the removal of auditory cue indicates a successful avoidance behavior.
Animal Welfare Considerations
Classical conditioning and negative reinforcement shape how livestock recognize a VF line, respond, and move across a landscape. After successful training, the auditory cue is the only information that livestock can identify to avoid an electrical cue. Predictability between cues is vital for livestock to maintain the auditory cue as a reliable indicator of an impending electrical cue. In some situations, the electrical cue can be disabled manually or as part of a safety protocol. If disabled for an extended period, predictability is reduced because animals do not encounter electrical cues when they otherwise would have expected to, based on conditioning. Livestock may fail to anticipate the electrical cue if the sequence of cues is unpredictable, potentially leading them to disregard the auditory cue altogether. In this situation, the system is not able to control livestock movement.
When the association between cues and behavior is predictable and continuous, livestock can control or influence the results of their actions (i.e., controllability). An animal may understand the association between auditory cue and the impending electrical cue, but without the ability to locate the grazing area and escape the boundary zone, the animal has no control over its response. Without this perceived control, livestock may struggle to locate the grazing area and are more likely to attempt unpredictable movements to escape the boundary zone (e.g., enter the exclusion zone). Animals could also endure the electrical cue rather than escaping it. If this occurs over an extended period, animals may develop ‘learned helplessness,’ a condition where an animal perceives no relationship between their behavior and receiving an electrical cue (Moberg 1985; Domjan 2014). Learned helplessness is more likely to occur when VFs are complex (e.g., sharp angles/corners or overlapping fences). With complex fence designs, livestock struggle to avoid or escape auditory or electrical cues in the boundary zone (Figure 4). Virtual fences should be designed with wider angles (>90°) to lessen the likelihood of repeated cues, which may cause chronic stress and have long term consequences for production and animal welfare.
The electrical cue has been the major concern for animal welfare (Campbell et al. 2019). However, it is likely that this is only an acute livestock stressor, or short-term stress response. Short-term stress is common (e.g., minor injuries, interactions with unfamiliar animals or people) and has limited long term consequences as animals are able to cope or return to normal levels of stress on their own (Lee et al. 2018). The greatest hazard in a VF system may be related to possible chronic stress, which could occur when an animal is unable to successfully navigate a boundary zone. Stress responses are more likely to occur if the association between the auditory and electrical cues breaks down or if fences are overly complex. Chronic stress occurs when an animal is unable to cope with the new stress load and cannot return to their normal stress level (Seyle 1976; Moberg 1985). Chronic stress affects livestock operations by negatively impacting livestock health1, weight gain2, and reproduction3 (Moberg 19851; Chen et al. 20151; Brown and Vosloo 20171; Cooke 20142; Fernandez-Novo et al. 20202; Dobson and Smith 20003, Dobson et al. 20013; Von Borell et al. 20073; Café et al. 20113; Kumar et al. 20123; Fernandez-Novo et al. 20203). Predictability and controllability limit both chronic and acute stress in livestock (Lee et al. 2018). In a VF system, ensuring livestock are properly trained and the association is predictable, controllable, and consistent is important to limit the animal welfare consequences due to chronic stress.

Figure 4: Conceptual model of a complex VF design where animals may have difficulty avoiding or escaping cues.
Conclusion
Virtual fencing relies on a combination of auditory and electrical cues to influence livestock movement. Classical conditioning and negative reinforcement are vital to build and maintain the association between cues. Classical conditioning is the process where livestock associate an auditory cue with an impending electrical cue. Through repeated experience, animals respond to the auditory cue alone and should be able to avoid an electrical cue. Negative reinforcement strengthens the avoidance behavior (Bishop-Hurley et al. 2007; Lee et al. 2009; Umstatter 2011; Umstatter et al. 2015). When an animal performs the desired avoidance behavior, it experiences positive outcomes (e.g., removal of cues). This enhances the learning process and encourages future compliance.
Using a physical fence during training provides opportunities for animals to successfully interact with the boundary zone. This successful rehearsal improves the association between the cues, which results in the desired avoidance behavior. It also limits the possibility of livestock correlating the electrical cue with other aspects of the landscape or ranching infrastructure, rather than a VF line. Successful training can lower initial stress levels in animals, facilitate coping, and enhance their overall welfare. After training, a collar can influence livestock movement if the association between the cues is continuous, predictable, and controllable. When the association breaks down, livestock cannot predict and/or control their ability to avoid a cue. This has repercussions for animal welfare and VF effectiveness. While VF research has successfully controlled livestock 99% of the time in small pasture systems (Langworthy et al. 2021; Verdon et al. 2021), more VF research is needed on animal welfare on extensive and complex rangelands. Understanding the animal’s ability to recognize potential hazards and respond to cues is vital to applying a landscape-scale VF system. Building and strengthening the association with training increases the probability of successful VF use while maintaining livestock welfare.
Disclaimer
There are several companies that manufacture hardware and software including Corral Technologies™, Gallagher™, Halter™, Nofence™, and Vence™. Virtual fencing components from different manufacturers are generally not interoperable or interchangeable. Specific components, GIS data needs, software protocol, software training, frequency and duration of the cues, GPS error, livestock collaring, and livestock training protocols may vary depending on the manufacturer. Follow the manufacturer’s recommendations and guidelines. The University of Arizona does not endorse a specific product.
Acknowledgements
This material is based upon work that is supported by the National Institute of Food and Agriculture, U.S. Department of Agriculture, under award number 2021-38640-34695 through the Western Sustainable Agriculture Research and Education program under project number WPDP22-016. USDA is an equal opportunity employer and service provider. Any opinions, findings, conclusions, or recommendations expressed in this publication are those of the author(s) and do not necessarily reflect the view of the U.S. Department of Agriculture.
This work is supported by the AFRI Foundational and Applied Science Program: Inter- Disciplinary Engagement in Animal Systems (IDEAS) [Award no. 2022-10726] from the USDA National Institute of Food and Agriculture.
Additional funding for the University of Arizona’s Virtual Fence program was provided by Arizona Experiment Station, the Marley Endowment for Sustainable Rangeland Stewardship, and Arizona Cooperative Extension.
For additional information about virtual fencing, visit: https://rangelandsgateway.org/virtual-fence
References
Antaya, A.M., Dalke, A., Mayer, B., Noelle, S., Beard, J., Blum, B., Ruyle, G., Lien, A., 2024. What is virtual fence? Basics of a virtual fencing system (No. az2079). University of Arizona Extension Publication az2079, Tucson, Arizona, USA. https://extension.arizona.edu/sites/extension.arizona.edu/files/pubs/az2079-2024.pdf.
Bishop-Hurley, G.J., Swain, D.L., Anderson, D.M., Sikka, P., Crossman, C., Corke, P., 2007. Virtual fencing applications: Implementing and testing an automated cattle control system. Computers and Electronics in Agriculture 56, 14–22. https://doi.org/10.1016/j.compag.2006.12.003
Brown, E.J., Vosloo, A., 2017. The involvement of the hypothalamopituitary-adrenocortical axis in stress physiology and its significance in the assessment of animal welfare in cattle. Onderstepoort Journal of Veterinary Research 84, 9. https://doi.org/10.4102/ojvr.v84i1.1398
Cafe, L.M., Robinson, D.L., Ferguson, D.M., McIntyre, B.L., Geesink, G.H., Greenwood, P.L., 2011. Cattle temperament: Persistence of assessments and associations with productivity, efficiency, carcass and meat quality traits. Journal of Animal Science 89, 1452–1465. https://doi.org/10.2527/jas.2010-3304
Campbell, D.L.M., Lea, J.M., Keshavarzi, H., Lee, C., 2019. Virtual Fencing Is Comparable to Electric Tape Fencing for Cattle Behavior and Welfare. Frontiers in Veterinary Science 6.
Chen, Y., Arsenault, R., Napper, S., Griebel, P., 2015. Models and methods to investigate acute stress responses in cattle. Animals 5, 1268–1295.
Cooke, R.F., 2014. Bill E. Kunkle Interdisciplinary Beef Symposium: Temperament and acclimation to human handling influence growth, health, and reproductive responses in Bos taurus and Bos indicus cattle. Journal of Animal Science 92, 5325–5333. https://doi.org/10.2527/jas.2014-8017
di Virgilio, A., Morales, J.M., Lambertucci, S.A., Shepard, E.L., Wilson, R.P., 2018. Multi-dimensional Precision Livestock Farming: A potential toolbox for sustainable rangeland management. PeerJ 6, e4867.
Dobson, H., Smith, R.F., 2000. What is stress, and how does it affect reproduction? Animal reproduction science 60, 743–752.
Dobson, H., Tebble, J.E., Smith, R.F., Ward, W.R., 2001. Is stress really all that important? Theriogenology 55, 65–73.
Domjan, M.P., 2014. The principles of learning and behavior. Cengage Learning.
Ehlert, K.A., Brennan, J., Beard, J., Reuter, R., Menendez, H., Vandermark, L., Stephenson, M., Hoag, D., Meiman, P., O'Connor, R.C. and Noelle, S., 2024. What's in a Name? Standardizing Terminology for the Enhancement of Research, Extension, and Industry Applications of Virtual Fence Use on Grazing Livestock. Rangeland Ecology & Management, 94, pp.199-206.
Fernandez-Novo, A., Pérez-Garnelo, S.S., Villagrá, A., Pérez-Villalobos, N., Astiz, S., 2020. The effect of stress on reproduction and reproductive technologies in beef cattle—A review. Animals 10, 2096.
Hayter, E.W., 1939. Barbed Wire Fencing: A Prairie Invention: Its Rise and Influence in the Western States. Agricultural History 13, 189–207.
Holechek, J., Pieper, R.D., Herbel, C.H., 2011. Range management: principles and practices. Prentice Hall,.
Jakes, A.F., Jones, P.F., Paige, L.C., Seidler, R.G., Huijser, M.P., 2018. A fence runs through it: A call for greater attention to the influence of fences on wildlife and ecosystems. Biological Conservation 227, 310–318. https://doi.org/10.1016/j.biocon.2018.09.026
Kumar, B., Manuja, A., Aich, P., 2012. Stress and its impact on farm animals. FBE 4, 1759–1767. https://doi.org/10.2741/e496
Langworthy, A.D., Verdon, M., Freeman, M.J., Corkrey, R., Hills, J.L., Rawnsley, R.P., 2021. Virtual fencing technology to intensively graze lactating dairy cattle. I: Technology efficacy and pasture utilization. Journal of Dairy Science 104, 7071–7083. https://doi.org/10.3168/jds.2020-19796
Lee, C., Colditz, I.G., Campbell, D.L.M., 2018. A Framework to Assess the Impact of New Animal Management Technologies on Welfare: A Case Study of Virtual Fencing. Frontiers in Veterinary Science 5.
Lee, C., Henshall, J.M., Wark, T.J., Crossman, C.C., Reed, M.T., Brewer, H.G., O’Grady, J., Fisher, A.D., 2009. Associative learning by cattle to enable effective and ethical virtual fences. Applied Animal Behaviour Science 119, 15–22. https://doi.org/10.1016/j.applanim.2009.03.010
Lima, E., Hopkins, T., Gurney, E., Shortall, O., Lovatt, F., Davies, P., Williamson, G., Kaler, J., 2018. Drivers for precision livestock technology adoption: A study of factors associated with adoption of electronic identification technology by commercial sheep farmers in England and Wales. PloS one 13, e0190489.
Moberg, G.P., 1985. Influence of Stress on Reproduction: Measure of Well-being, in: Moberg, G.P. (Ed.), Animal Stress. Springer, New York, NY, pp. 245–267. https://doi.org/10.1007/978-1-4614-7544-6_14
Netz, R., 2004. Barbed wire: An ecology of modernity. Wesleyan University Press.
Ray, E., Schamel, W., 1997. Glidden’s Patent Application for Barbed Wire. Social Education 61, 53–56.
Selye, H., 1976. Stress without Distress, in: Serban, G. (Ed.), Psychopathology of Human Adaptation. Springer US, Boston, MA, pp. 137–146. https://doi.org/10.1007/978-1-4684-2238-2_9
Trotter, M., 2010. Precision agriculture for pasture, rangeland and livestock systems, in: Food Security from Sustainable Agriculture 15th Australian Agronomy Conference, Lincoln, New Zealand.
Umstatter, C., 2011. The evolution of virtual fences: A review. Computers and Electronics in Agriculture 75, 10–22. https://doi.org/10.1016/j.compag.2010.10.005
Umstatter, C., Morgan-Davies, J., Waterhouse, T., 2015. Cattle Responses to a Type of Virtual Fence. Rangeland Ecology & Management 68, 100–107. https://doi.org/10.1016/j.rama.2014.12.004
Verdon, M., Langworthy, A., Rawnsley, R., 2021. Virtual fencing technology to intensively graze lactating dairy cattle. II: Effects on cow welfare and behavior. Journal of Dairy Science 104, 7084–7094. https://doi.org/10.3168/jds.2020-19797
von Borell, E., Dobson, H., Prunier, A., 2007. Stress, behaviour and reproductive performance in female cattle and pigs. Hormones and Behavior, Reproductive Behavior in Farm and Laboratory Animals 52, 130–138. https://doi.org/10.1016/j.yhbeh.2007.03.014