Advances in wireless sensor and actuator networks (WSANs) can enable the spatial control of large herds of cattle through virtual fencing, to protect environmentally sensitive regions from damage. ur planet is at risk of significant and irreversible damage. Increasing population levels and rapid natural resource consumption place an immense strain on our environment. Given clear evidence of significant changes in global climate conditions affecting a wide range of ecosystems, 1 we must find ways to better manage our natural resources if we are to sustain our lifestyle. Our work focuses on protecting environmentally sensitive areas threatened by damage from cattle herds. Many areas exist in which installing conventional fencing is cost and labor prohibitive, such as along river banks, scattered riparian areas, or steep terrain regions. Such areas are either large areas inappropriate for grazing or sensitive areas where cattle can cause significant damage, such as erosion along river banks or the destruction of valuable plant species in riparian zones. With an estimated global population of more than 1.3 billion cattle covering grassland areas totaling 10 million square km, 2 the global impact of animal agriculture is enormous and poor livestock management can result in significant and widespread environmental degradation in sensitive areas. Wireless sensor networks (WSNs)-large networks of embedded devices, containing microcomputers, radios, and sensors-provide the platform for a low-cost, radically new instrument to measure and understand the natural world. Several recent studies have focused on building reliability into long-term, environmental sensor networks, 3 and others have focused on embedding mobile nodes with animals and tracking them. Our systems not only monitor herds and the surrounding environment but also can change animal behavior to assist environmental stewardship. We achieve this through virtual fencingkeeping cattle away from selected areas without a physical fence. This article addresses the problem of sustainable agriculture and presents our use of embedded-device networks to protect environmentally sensitive areas. Previously we developed a large-scale, outdoor pervasive computing system that measures the state of a complex agricultural system. 4 We designed the system to measure a wide range of variables to simultaneously try and understand the state of climate, soil, pasture, and animals. Virtual fencing extends our initial work so that actuation decisions are made in the network to support the stewardship of the surrounding environment. We focus on models for relating position, velocity, and inertial observaJanuary-march 2009 P ER VA SI V E computing 31 tions from animals to specific levels of an animal's state. In particular, we focus on two classes of state: an individual animal's behavior and an animal's relation to a virtual fence line bordering an environmentally sensitive area. This article primarily deals with the latter state. Our system comprises a network of mobile embedded devices (nodes) designed to observe the state of large cattle herds while monitoring the state of the surrounding natural environment. All mobile nodes can undertake actuation on the basis of observations made by the node or other network nodes. Figure 1 shows a high-level illustration of the path from observations to actuation. To obtain observations from the environment, we started by using staticnode networks that measure air temperature and soil moisture and in which measurements are multihopped back to base every few minutes. 4 By deploying nodes in grid-like patterns, roughly 150 meters apart, we clearly identified pasture regions that hold high and low amounts of water content. To increase our observations' spatial coverage, we investigated using small camera nodes that return compressed images of specific pasture areas. 4 Our current work investigates the level of correlation between soil moisture measurements and camera observations of grass condition. We use a hardware platform that's part of a family of devices known as Fleck, inspired by the original Berkeley mote (see Figure 2a) . These devices incorporate several key design features that make the platform ideal for a wide range of applications, including outdoor, long-term deployments 5 -our focus here. The platform uses a Nordic NRF905 transceiver with a theoretical maximum data rate of 100 kilobits per second. However, the realistic data rate is roughly half of this. You can easily expand the platform by adding additional sensor interface boards (daughterboards), in which the expansion connectors for interface boards carry power (switched by the node), Serial Peripheral Interface (SPI) inputs, serial and analog inputs, and digital inputs and outputs. Figure  2 shows our virtual fencing system, in which each mobile node contains GPS, audio, and electrical pulse boards. The animal collar (see Figures 2e-g ) consists of a head harness and an adjustable nylon collar. The collar holds three weatherproof boxes, one for the electronics at the top and two for the batteries underneath. Altogether, the two battery compartments can house 24 AA batteries, which provide 16,200 milliamperes per hour (mAh) of capacity. Speakers attached to the head harness play audio, and the box at the top houses the remaining electronics. Positioning the battery compartments at the base of neck acts as a counterweight to hold steady the electronics box on top of the neck. Figure 3a shows the architecture for the application software running on our mobile nodes. The system design lets us log all data locally for further postprocessing to a Secure Digital card, stream a compressed version of the trajectory data over environmental nodes when they're in range, and remotely monitor the experiments' status. The RX module also receives new fence positions sent out from the network gateway over the environmental network and onto cattle. The virtual fencing algorithm is the key module in the application layer. The WSN operating system community splits across two broad approaches-event-based and threadbased systems-with healthy debates about the relative merits of each. 6 We've developed our own operating system, FleckOS (FOS), which falls into the latter category. 7 FOS provides a priority-based, nonpreemptive (cooperative) threading environment with separate stacks for each thread, which allows for a simple concurrent programming model without semaphores. All application software on both mobile and static nodes ran on top of FOS. EnvironmEntal SuStainability virtual Fencing Protocol Virtual fencing seeks to extend the basic principle of the commonly used electric fence. Instead of controlling animal location using a physical fence, we use a combination of auditory and mild electrical stimuli applied by a position-aware device worn by the animal. Strict animal ethics requirements guide all such experiments to ensure animal welfare. The ethics behind this approach parallel the principle behind conventional electric fences in which animals have a visual association with the fence location. With the virtual fence, a quiet acoustic sound identifies the fence's location. When the animals cross this virtual fence, they receive a mild electrical stimuli. They quickly learn to associate this stimuli with the sound, which influences their future actions. Virtual fencing isn't a new conceptthe first papers 8 on the topic appeared in 1990 before commercial GPS was operational. In the late 1990s and early 2000s, researchers in the US studied small-scale experimentation with GPS positioning. 9 Recent work has investigated the application of a broader range of stimuli types and their effects on animals' abilities to learn fence locations. 10 We seek to expand recent experi- ments by solving the remaining issues with virtual fencing-the ability to manage commercial herd sizes in a wide range of natural environments over long time periods. To achieve this, we emphasized improved techniques for applying stimuli to animals based on estimates of their behavior relative to virtual fence lines. Assuming virtual fence lines are comprised of piecewise straight lines, we derive three main observations from the GPS measurements in Figure  3b in which v is the animal's velocity vector, n is the shortest distance to the virtual fence line, and  is the angle between the animal heading and the virtual fence line. These three observations act as inputs for a behavior-based state machine (see Figure 3c) , in which states are based on a finite set of known animal responses to virtual fence lines. Within each state, we've developed a different strategy for applying audio or electrical stimuli to get animals to leave the exclusion zone (EZ) in the most effective manner. We found the flight-response state particularly interesting. This is a rare case, in which animals run into the EZ rather than pausing or turning back. When this happens, the system will automatically deactivate the virtual fence until the desire to rejoin the herd prompts the animals to cross back into the non-EZ.
A wireless sensor and actuator based virtual fencing system based on acoustic signals and electric stimuli has been implemented in dairy farms as a replacement of physical barriers to regulate and control mobility of cows within a given boundary in REF .
Sensor and Actuator Networks: Protecting Environmentally Sensitive Areas
IEEE Pervasive Computing
IEEE Pervasive Computing
Computer Science