Next Article in Journal
A Tensor-Based Structural Damage Identification and Severity Assessment
Next Article in Special Issue
Application of Near Infrared Reflectance Spectroscopy for Rapid and Non-Destructive Discrimination of Hulled Barley, Naked Barley, and Wheat Contaminated with Fusarium
Previous Article in Journal
Highly Integrated MEMS-ASIC Sensing System for Intracorporeal Physiological Condition Monitoring
Previous Article in Special Issue
A Compound Sensor for Simultaneous Measurement of Packing Density and Moisture Content of Silage
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:

Combination of Multi-Agent Systems and Wireless Sensor Networks for the Monitoring of Cattle

Faculty of Science, University of Salamanca, Plaza de la Merced s/n, 37002 Salamanca, Spain
Department of Artificial Intelligence, Polytechnic University of Madrid, Campus Montegancedo s/n, Boadilla del Monte, 28660 Madrid, Spain
Author to whom correspondence should be addressed.
Sensors 2018, 18(1), 108;
Received: 7 November 2017 / Revised: 21 December 2017 / Accepted: 28 December 2017 / Published: 2 January 2018
(This article belongs to the Special Issue Sensors in Agriculture)


Precision breeding techniques have been widely used to optimize expenses and increase livestock yields. Notwithstanding, the joint use of heterogeneous sensors and artificial intelligence techniques for the simultaneous analysis or detection of different problems that cattle may present has not been addressed. This study arises from the necessity to obtain a technological tool that faces this state of the art limitation. As novelty, this work presents a multi-agent architecture based on virtual organizations which allows to deploy a new embedded agent model in computationally limited autonomous sensors, making use of the Platform for Automatic coNstruction of orGanizations of intElligent Agents (PANGEA). To validate the proposed platform, different studies have been performed, where parameters specific to each animal are studied, such as physical activity, temperature, estrus cycle state and the moment in which the animal goes into labor. In addition, a set of applications that allow farmers to remotely monitor the livestock have been developed.

1. Introduction

The last decade saw a breakthrough in the field of Ambient Intelligence (AmI), resulting in an improvement in the quality of people’s lives. The main objective of AmI is to adapt technology to the needs of the people in a way that allows users to interact in a natural and effortless manner with the different systems that make up the environment. Technology must act in a transparent way by adapting to the individuals and their context; simplifying the accomplishment of daily tasks and the communication between them and the environment. To achieve this goal, it is necessary to develop new technological models that allow users to interact with multiple devices simultaneously. The devices must collaborate in the accomplishment of daily tasks without the individuals being aware of it. Due to the miniaturization of sensors and the reduction of costs in manufacturing processes, AmI can now provide new solutions to daily problems that were unthinkable just a few years ago. One field to which AmI can be applied to is that of livestock and natural resources management.
Currently in Spain, there are more than 23 million head of swine and more than 18 million of sheep, representing 15% of the total of the European Union [1]. The continuous growth that the farms are experiencing and the increasing demand for farm produce, make technology an essential instrument of continuous improvement in the development of farms. Requirements are also becoming increasingly strict for both the breeders and the livestock, so the study of factors such as food, physical activity or the animal’s health is necessary. On large farms, it is difficult to devote time to observing the behavior of each animal. Technology must provide solutions that simplify farmers’ work, especially in repetitive and difficult tasks, such as those that entail the study of the factors mentioned above. The research and development of systems that detect anomalies in animals at early stages, is vitally important. Numerous research groups are working on the use of electronic systems in livestock with the aim of improving productivity and reducing operating costs. AmI allows farmers to remotely access up to date information on the animals and obtain their complete traceability. The joint use of information technology and electronic devices, allows to monitor and study parameters as well as the consumption of energy on the farm, the level of food in the feeders, the lighting, climatology, the state of animals’ health, their physical activity, etc. Smart-farming or precision farming consists in applying information and communication technologies to livestock and agriculture. Its main objective is to increase the efficiency and quality of production through rapid decision making in cases where some type of problem arises on the farm.
This work presents a low cost wireless network sensor (WSN) interconnected through a multi-agent architecture based on virtual organizations. This system offers remote farm monitoring and traceability service. The aim pursued in this work is to save the farmer from unnecessary movement from place to place and to increase the productivity of the farm, reduce costs and risky situations. A WSN allows to obtain information on the environment and act upon it. The infrastructure of WSNs is capable of distributing communications in dynamic environments, increasing mobility and efficiency, regardless of the location. It is important to inquire into mechanisms that allow constructing computing agent platforms and communication agents that are portable to light devices.
The presence of heterogeneous protocols makes the integration of sensors difficult, since it makes it necessary to incorporate new communication systems between the different elements. When necessary, the proposed system will permit the sending of alerts to the mobiles of users, who will be able to visualize problems of each animal in real time.
By using sensors, it will be possible to detect situations such as the beginning of labor or the estrus cycle, rumination problems, excess body temperature, the distance travelled, events and information of interest to the farmer. The novelty of the system is the implementation of a dashboard which allows people with little technological knowledge to visualize the state of the farm, using a TV.
The article is structured as follows: Section 2 reviews the state of the art and related projects; Section 3 describes the proposed architecture; and outlines the case study that has been conducted to evaluate the system; and finally the results obtained and the conclusions drawn from the work are presented in Section 4. In addition, Appendix A has been included with the hardware design schemes used in this work.

2. Background

Due to the miniaturization of hardware, devices are gradually reaching out to all the levels of society [2]. This fact, combined with the lowering production costs of consumer electronics, has favored the rise of Ambient Intelligence (AmI) in different areas such as robotics [3], health [4], education [5] or the transport industry [6]. In short, we can see how the application of AmI techniques has spread to practically every field.
The field of agriculture and livestock is no stranger to the development of AmI projects. In recent years, the implementation of different technological solutions has been promoted in order to move towards intelligent agriculture. In the case of the European Union, such initiatives have been supported by the European Parliament, as evidenced by two reports, which are of great importance to The Alliance for Internet of Things Innovation (AIOTI) [7]: “Technological solutions for sustainable agriculture in the EU” [8] and “Enhancing innovation and economic development in future European farm management” [9].
Smart Farming is based on the use of information and communication technologies, combined with tools that support decision-making and improve the efficiency, productivity and profitability of companies in this sector [10]. The use of intelligent devices allows improving traditionally used tools, by providing them with context awareness and intelligence, as well as automating the accomplishment of different tasks or allowing them to be performed remotely [11]. To create a Smart Farm, a network infrastructure is required which allows to connect different low-cost sensors and wireless actuators, used in the monitoring and remote control of facilities and livestock. Data collected by sensors (such as odometry of agricultural machinery, soil moisture, temperature, soil conductivity, pH level, animal position, body temperature, etc.) are transmitted to a data storage station, where they can be observed and analyzed using artificial intelligence techniques. Thus, farmers can increase their agricultural production through the statistics, patterns or predictions obtained from these data. Moreover, the use of actuators favors the automation and remote operation of certain tasks, such as cattle feeding, the use of irrigation systems, or temperature control in closed facilities where the livestock is located [12].
Santana-Mancilla et al. outline in their work [13] a set of practical considerations that should be taken into account when using and designing Wireless Sensor Networks (WSNs) for livestock farms. Some of the challenges tackled that work are related to: (i) mobility: the sensors used in the monitoring of animal parameters are subject to continuous changes of position, so the topology of networks and the routing of paths must be adapted and respond to the movement of animals; (ii) interferences produced by the animals: in many cases, animals are in herds and their own bodies, especially in cattle, can cause a significant reduction in the radio signal; (iii) limitations in data storage: due to the nature of low cost sensors, their capacity for data storage is limited, so it must be compensated with the use of robust protocols that allow to transmit the information collected by the sensors to central nodes; and (iv) battery life: since replacing batteries in livestock is an expensive process, the optimization of battery life in sensors is crucial; thus, we must work on reducing the energy consumed by data transmission.
Within the scope of livestock, AmI techniques have been most popularly implemented in the beef cattle industry. Given the complexity of breeding beef, the use of AmI allows farmers to perform certain tasks or detect possible problems that their animals may present. In the state of the art work, some of the most relevant studies apply AmI to the following fields:
  • Monitoring the position of the animal and analysis of the behavior of the herd: By monitoring the position of livestock, it is possible to study the behavior of both individual animals and the herd as a whole. Since it may be argued that wearable technology annoys animals and alters their habitual behavior, studies that deny this theory have been carried out [14]. Wearable technology designed for animals usually takes the form of necklaces that make use of GPS, although there are also devices that make use of other technologies such as ZigBee [15]. Studies in which the position of cattle is monitored, vary in their objectives, some for example focus on assessing the animals’ periods of rest, ingestion and activity [16,17] and others on controlling grazing time in certain areas of the field [15]. In addition, the use of technology allows quickly locating cattle on extensive farms, which is normally a difficult task.
  • Intake control/feeding monitoring: Ingestion, rumination and rest are the main activities of ruminant cattle. Thanks to their monitoring, breeders are able to take better decisions in relation to pasture management, as well as the diet supplements that the livestock may require [18]. There are several state of the art works that follow this line of research. For example, in [19], a system is proposed for the monitoring of feed intake in cattle; it is based on the combined use of scales located in self-locking feeders and proximity sensors worn by each animal. With this system, it is possible to identify the amount of food ingested by each animal. Although this is an effective system that accurately measures the ingested quantities, it is only suitable for intensive livestock farming. Other types of systems are required to measure feed intake on extensive farms. In the current state of the art works, the most common trend is the use of microphones to detect acoustic signals and classify them into different events, usually chewing, chewing-biting and biting. The works of Chelotti et al. [20], Clapham et al. [21] and Tani [22] are some of the works that follow this line of research.
  • Estrus detection: One of the most influential factors in the productivity of livestock farms is the reproduction of livestock. In recent years, artificial insemination has become more frequent, since it has a higher reproductive efficiency [23]. Therefore, it is crucial to detect the moments in which the animals’ fertility levels are high. It is estimated that the duration of estrus is between 11 and 21 h; at the end of this period, ovulation occurs, which normally lasts 12 h. It is generally recommended to carry out artificial insemination for 6 to 24 h before ovulation [24]. Studies that apply AmI to detect estrus are mainly focused on: (i) detection of heat events—period of time before ovulation in which cows are sexually receptive; for example, in the work of Shahriar et al. [25], heat events were identified through the use of accelerometers and unsupervised learning; or (ii) the monitoring of body temperature—there are several studies which determine a relationship between the body temperature of cattle and estrus, in particular, with a mean increase of 0.9 °C in the vaginal temperature during estrus [26]. Numerous studies have been carried out in this regard, all of them employ sensors to measure the cows’ vaginal temperature; in some cases intravaginal sensors are used [27], while in others less intrusive sensors are used, such as in the work of Miura et al. [28], where vaginal temperature is measured by a sensor placed in the outer zone, at the base of the tail.
  • Calving detection: Cows frequently experience calving difficulties; to prevent calf loss, human intervention is necessary in many cases. Thanks to calving prediction, cattle breeders are able to assist the parturient, this increases the chances of healthy calves being born and assures cows recover rapidly after calving (of vital importance in animals dedicated to milk production) [29]. In this regard, it is not only important to determine the time of delivery, but also to know the location of the parturient—especially on extensive farms. In some cases, sutured sensors are placed in the parturient vulva [30] to detect labor and a variety of other sensors is used to measure a number of factors; such as body temperature or parturient activity level [31]. The use of collars with integrated GPS systems [32] is the most widespread technique in the detection of animal position.
  • Syndromic monitoring systems: Syndromic monitoring systems measure non-specific data that may be related to animal health [33]. The data collected by different sensors help to identify specific pathologies that are related to the appearance of diseases in cattle. In many lines of research, this type of systems is used. There are several studies in the literature, such as the work developed by Park et al. [34], where a complete set of sensors is used to create an animal health monitoring system, or in the work of Frese et al. [35], where electrodes are used to detect symptoms of gastrointestinal diseases related to arrhythmias.
Table 1 shows a collection of different wearables for cattle that can be found in the market today.
As stated above, different ambient and artificial intelligence techniques have been applied in this field of study. Thanks to the great advance of technology, a new point of view arises in the investigation of artificial intelligence [43]: Distributed Artificial Intelligence. It is dedicated to the study and definition of semi-autonomous computer systems that attempt to solve problems in which a collective behavior is more efficient than an individual one [44]. Within this area, we can talk about multi-agent systems (MAS), which deal with the intelligent coordination of a set of autonomous agents, including their knowledge, goals, properties and plans for solving problems or making decisions [43]. MAS have been successfully used in different domains thanks to their capabilities of solving computationally difficult (or spatially distributed) problems and their aptitude to develop social behaviors [45]. Currently, the idea of modeling systems through the iterations that occur between their agents is opening the way to a new trend: modeling the behavior of the system from an organizational point of view. There are different platforms that facilitate the design and implementation of MAS (e.g., Java Agent Development Framework (JADE) [46] and Mason [47]), but few that support virtual organizations. PANGEA [48], created by the BISITE research group, is an alternative which does support virtual organizations and offers inter-compatibility with multi-agent platforms using the FIPA-Agent Communication Language (FIPA-ACL). PANGEA employs methods that allow to reorganize and balance the load according to the computational needs of the system, using organizational concepts. It allows for case study modeling to be done using debugging tools, with a set of libraries for all types of IoT controllers and devices. Moreover, it offers a series of tools that facilitate platform creation and management in general. PANGEA provides the necessary elements to allow communication between agents in an easy and safe way. In this way, it favors the distribution of resources and facilitates the control of the nodes where the agents are deployed.
After a detailed review of the state of the art, we found that there was a research gap in a multi-agent architecture that would combine a variety of final services with the aim of improving livestock farm management. This is because all the works published so far have focused on detecting or resolving specific problems. The main objective of this work is to design a platform which makes use of technology that allows for the intelligent and remote management of a livestock farm. It was necessary to implement a MAS in the designed architecture due to the use of sensors with computationally limited hardware as well as the need for together with the need for the efficient use of the battery. These needs can be satisfied by a MAS which has lightweight and fast connection protocols. One of the benefits of multi-agent systems is their scalability, since they are inherently modular. This feature makes it possible to incorporate new features and capabilities much more easily than in a traditional system [49]. The use of a multi-agent architecture allows for the integration of any sensor, independently of its manufacturer; this makes it much simpler to conduct case studies. The multi-agent system PANGEA was chosen for this case study in particular due to its communication protocols, which can be adapted to the design and deployment of agents embedded in ATMega microcontrollers. The main novelties of this work are: (a) the deployment of computationally limited sensors using PANGEA; (b) the ability of the platform to predict estrus, calving, as well as the monitoring of cows’ feed intake; and (c) the design of a platform that allows monitoring and controlling a livestock farm remotely using low cost hardware as well as software that can be used easily by people who have limited knowledge of IT.

3. Proposal

This section details the architecture designed for the remote monitoring of a beef cattle farm. The following monitoring system detects heat and calving time and measures the levels of feed in the feeders. In addition, several applications are developed which allow to monitor and visualize the farm remotely, from a TV, computer or mobile phone.
The proposal is organized into several subsections to reduce its complexity. Section 3.1 addresses the topic of the MAS platform design and outlines the different virtual organizations that constitute the proposal. Section 3.2 deals with the deployed data connectivity. Section 3.3 describes the sensors used. Section 3.4 describes the employed sensing techniques. Finally, Section 3.5 outlines the applications developed for end users.

3.1. Multi-Agent Architecture

To conduct the case study, we decided to develop a MAS based on virtual organizations. The use of a MAS that allows to develop virtual organizations of agents (VO) provides the system with flexibility and dynamism; it equips the platform with new adaptability, reorganization and learning capabilities. The agents that orchestrate the system belong to different organizations, depending on the nature of the functionality that they perform. VO group agents with similar roles in one organization, with the aim of retrieving, merging and processing the information in an automatic way. This makes the proposed system extensible, favoring a high adaptability to the real demands of the environment. Since the proposal is oriented towards the modeling of MAS as a virtual organization of agents, we must be able to define structure, roles and hierarchies, as well as a series of rules that regulate interaction and communication between agents. PANGEA is perfectly suited to the needs of the environment in which we work, where it will use agents embedded in different wireless sensors. PANGEA also allows for the quick and simple deployment of agents embedded in computationally limited devices.
As can be seen in Figure 1, the general architecture of the system is made up of two large blocks: the lower part shows the agents corresponding to the PANGEA platform, while the upper part shows the virtual organizations of the agents in the proposed system, which are: WSN Organization, Prediction Organization and Application Interface Organization. The main tasks of each of the organizations within the system are listed below:
  • WSN Organization: It is responsible for adapting the information of the different hardware sensors that are used in the case study, to a protocol or common language that can be read by all the elements of the platform. The main function is to adapt or translate the raw data into a JSON-type format. This organization is made up of Accelerometer, GPS, Thermometer and Food agents. Each of these agents has the functionality that it needs to be able to obtain the information of each of the sensors. Each of the agents mentioned above, communicate only with a central agent who is responsible for the organization. The main capability of this agent is to establish a bidirectional communication with entities that do not belong to the same virtual organization. These entities may consist of agents that access databases, or other virtual organizations of agents that interpret or analyze the data.
  • Prediction Organization: It is responsible for retrieving the data obtained by the WSN organization and processing them. The objective of each agent will be to detect or anticipate specific events that are crucial for the farm’s productive processes of the cattle yield and to send an alarm. The agents within this organization analyze events associated with animal feeding, calving or estrus (AlarmFood, predictHeat, and predictLabor agents). When an event is detected by any of these agents, it is communicated to the central agent who is in charge of notifying this event to the rest of the agents in other organizations.
  • Application Interface Organization: For the end user to be able to view the information that has been collected and analyzed, it has to be represented by a software application. The central agent of this organization is responsible for obtaining the heterogeneous information from other organizations to adapt it to the standards used in the different applications, where the agents responsible for collecting this information are placed for later viewing: Mobile App, Web App, and TV App are the agents responsible for the visualization layer of the applications for mobile, web and Smart TV respectively.
Furthermore, the proposed system makes use of a set of agents that are part of the PANGEA MAS [48], which has been used as a base line for this work. These agents are described below.
  • Manager agent: It is responsible for supervising tasks, ensuring that the system works correctly, checking that there are no overloads in the different functionalities of the system or that errors of communication between agents do not occur.
  • Information agent: When a new agent becomes part of the organization, the agent notifies the information agent of the services it offers. In this way, the information agent is aware of all the services available in the organization, thus being able to serve as a directory which the other agents can consult to know of the services that they can access.
  • Service agent: This agent is responsible for recording and controlling the operation of the services offered by agents. In addition, it works as a gateway, as it is in charge of the distribution of the services that offered by the agents through web services, so that they are accessible from outside the organization.
  • Normative agent: This agent ensures compliance with all rules defined in the organization, always ensuring that agents use those services for which they have permission, warranting the security of communications made within the system.
  • Database agent: This agent in charge of accessing the PANGEA database to obtain the pertinent information. This database agent is responsible for representing and storing the contextual information of the system: what organizations and sub-organizations of agents it contains, what type of topology they form, what roles the different agents fulfill, what services they offer, etc.
  • Organization agent: This is the agent in charge of managing organizations and sub-organizations. It is responsible for verifying the entry and exit of the agents to the system, as well as assigning a role to each of the agents in the organization.
One of the greatest advantages of the use of PANGEA is that it allows for the use of different communication protocols, such as HTTP or Message Queue Telemetry Transport (MQTT) among others. MQTT is a messaging protocol specially designed for communication between embedded devices with few computational resources, with low bandwidth and in high latency networks. Due to these characteristics, this protocol has been widely used in the field of Internet of Things (IoT). To verify that the use of this type of protocols provides greater advantages when used in machine-to-machine communication, than the advantages it offers when used with traditional systems based on HTTP protocols with service-oriented architectures, a comparison has been made between both paradigms.
This comparison is shown in Figure 2, the illustrated results have been obtained after sending identical messages from an agent embedded in the feeder devices under the following conditions: MQTT over 3G, MQTT over WiFi, HTTP over 3G, and HTTP over Wi-Fi. Figure 2A shows the percentage of battery consumed by the device during one hour and Figure 2B shows the number of messages sent in one hour for the four conditions indicated above. In either case, it can be seen that the choice of MQTT vs. HTTP is properly justified, not only for efficiency in sending messages (which is outstanding in the case of 3G networks) but mainly for the battery saving rates it offers. This aspect is very important in a system like the one proposed in this work, since the replacement of batteries is an expensive process for the cattle ranchers, so the battery saving in the different sensors, also supposes a greater efficiency in productive processes. The flexibility offered by PANGEA enables the use of the most suitable protocol for each use case where, in the case of sensors communication, MQTT has been proven being appropriate.
The general operation of the processes occurring in the platform can be seen in Figure 3. In the first place, the agents embedded in the sensors carry out a data acquisition process. These agents send the collected raw information to the WSN Central agent. This agent is in charge of storing the received information in a standardized way, as well as sharing this information with the other organizations, restricting their access only to the services that require it. To do a data analysis or prediction (such as labor or heat detection), the WSN Central Agent will be responsible for providing information from the different sources to the Prediction Central Agent, which will in turn send it to the corresponding Analyzer Agent. These agents present reactive behavior defined by rules, and are responsible for performing the data analysis. After establishing this information, the analyzer agent will send it to the Prediction Central Agent, who is responsible for storing it so that, if an agent needs it, it is sent on demand (or in other cases, information can be spread from this agent to others automatically, as in the case of estrus detection). When a user makes use of a certain application (mobile application, web application or Smart TV application) and wants to view some kind of information, the software agent which is part of the application will make a request for the desired information to the Prediction Central Agent, which will be returned if available. The communications are controlled (although it is not represented in the figure in order to make it simpler to understand) through the PANGEA layer, which already includes rules that define communications between agents. The Normative Agent ensures that agents in the platform only use those services for which they have permission.

3.2. Farm Connectivity

To provide a tele-monitoring service on the farm, data connectivity is required. To deploy a data network and offer an internet connection on the farm, several possibilities were studied. One of the alternatives was the hiring of a satellite line based on WiMAX technology. The necessary equipment had a high cost and the monthly quota of the data line was exorbitant, reason why this option had to be discarded. An alternative idea was to hire a conventional ADSL line. However, no service provider had coverage in the area where the farm is situated (40.796575, −6.241120). Finally, we thought of making a radio link. The farm where the connection was to be established is located near a town called La Fuente de San Esteban, Salamanca (40.8013959, −6.2624964). This core had a pre-installed broadband connection in the City Hall. To be able to share a data connection in a legal and free way with the inhabitants and farmers of the area, a collaboration agreement was signed with the Regional Government of Salamanca, Junta of Castile and León. This agreement required that, to share the Town Hall connection with the rest of the inhabitants and workers in the area, each connection should be limited to a 512 Kbit/s downstream speed. The farm did not have direct view with the Town Hall that it needed to connect, since it is located in the center of the village and is surrounded by houses, thus an intermediate point was chosen to act as a gateway. The highest point of the municipality was the Silo (40.795884, −6.251096) with a height of 50 m above ground level, and had electrical connection. In the upper part of the roof of the Silo and in each geographical orientation N, S, E, W an Ubiquiti brand antenna of type Ti AM-V5 G-Ti (5 GHz), was installed with a sectorial opening configuration of 120 degrees and a resulting gain of 15 dBi. Figure 4 shows the behavior of the signal in the antennas used with an aperture of 60°, 90° and 120° [50].
Once the place where the connection could be made was determined, different point-to-point connections were made with nearby urban nucleus that did not have any kind of broadband connection. The radio link between the silo and the Town Hall was made using a 5 GHz equipment (PowerStation5 antennas [51]). Figure 5 shows the altimetry profile of the ground between the two points, where it can be verified that there is direct vision and that the quality of the link is correct, with a capacity of 175.51 Mbps.
The modulation of the antennas in the link is 64 QAM using a polling policy based on Time Division Multiple Access (AIRMAX) that prioritizes the most active systems through a technique of intelligent surveys, achieving a greater use of the medium. Figure 6 illustrates the network architecture, the distances between each place and actual photos of the antennas.
From the image, we can see that the data connection that already existed in the municipality is distributed and is redirected to the highest point in the town to be able to share that connection with another urban nucleus that did not have a basic Internet connection. Nodes that want to connect to the Internet, such as laptops or smartphones that are approximately 300 m away from the town hall or silo do not require additional hardware to use the connection. Since the case study contemplates the possibility of monitoring the field by video streaming, we decided to use a NanoStation LOCO M5 5 GHz from the Ubiquiti brand, configured in client mode with a throughput of 150 Mbps.
Thanks to the network infrastructure described above, it was possible to deploy the proposed platform on the farm and to conduct the case study that proves the system’s feasibility.

3.3. Sensors in Livestock Farming

Figure 7 shows the general structure of the proposed architecture in the case study. The central part of this system is a WSN, whose main objective is the collection of different data from sensors placed on the cattle that are part of the farm. Depending on the type of sensor, the collected data will be sent in different ways: radio frequency, GPRS or Wi-Fi. To support these types of communication, it was necessary to incorporate additional communication elements, such as radio frequency stations or the previously mentioned NanoStation LOCO antennas. In either case, the final destination of the data is the same: a central server in which these data are stored for later analysis and interpretation. With artificial intelligence techniques, it is possible to automatically detect different events, whose identification can be of great help to the farmer. Thanks to the use of different applications, the farmer can receive alerts which notify when these events occurred. Additionally, he is also able to check the data collected by the sensors in real time. The following sections detail the operation of each of the sensors and the analysis performed on the collected data.
In this organization we have GPS, movement, temperature and food sensors. The sensors that were used can be seen in Figure 8A–E.
The GPS sensor retrieves the GPS locations and the time stamps associated with each of them. This sensor has a SIM module that sends the location data to a server via GPRS. With the purpose of making this device energetically self-sufficient, a solar collar that charges its battery has been included. Additionally, a motion sensor is included, so the GPS is only activated when activity is recorded. This motion sensor is also used to detect the activity of the animal, since, as mentioned in the state of the art, a change in the activity of the animal is related to estrus.
As to the thermometer used, it is a vaginal thermometer that sends the data by radiofrequency to a base that subsequently sends them to a server, from which the information can later be extracted. The frequency of sending can be parameterizable, in this case study every 45 s. In the case the sensor cannot transmit the value to the RF base for some reason or because the distance between it and the sensor is too great, the sensor has an internal memory that temporarily stores the values, until the connection with the base RF is successfully reestablished.
The food sensor incorporates ultrasound sensors to measure the volume of feed. The sensor incorporates an Arduino-based controller to retrieve sensor information from the sensor and then send it remotely via WiFi technology to the remote server. In addition, the sensor includes a battery and a photovoltaic panel that makes the device autonomous; there is no need to connect it to electricity. To be more efficient energetically and thus have low consumption rates, sensor data are sent every 60 min. A low cost solar plate is used, with an operating voltage of 5 V, an output power of 1 W and a current of 0–200 MA.
As a summary, Table 2 shows which kind of data each sensor collects, and in which systems of analysis or prediction the data collected by the sensor are used. The detailed description of each of the analysis and prediction systems is shown in the next section.

3.4. Analysis and Prediction Systems

The agents are capable of predicting each of the problems posed in this case study. Some of the sensors require a system that is adaptive for each of the animals and that evolves with time. However, other sensors only require the definition of predefined rules, whose behavior as a result is reactive. In the next subsection, the functioning of sensors is described.

3.4.1. System for the Detection of Feed Levels in the Feeders

To implement this system, ultrasonic HC-SR04 sensors have been used. These sensors allow measuring distances in a range of 2–450 cm, with a 0.3 cm accuracy. To verify the correct functioning of the system, sensors have been installed on 4 feeders. Figure 9A shows one of the feeders where the sensors are installed. The sensors are placed at the base of the feeder’s roof. Since there are no electricity sockets close to the feeders, batteries have been chosen to supply power to the sensors. Moreover, photovoltaic plates have been used to charge the batteries and provide the system with complete autonomy. Figure 9B shows the sensor, battery and photovoltaic panel that were used in the case study.
To measure the level of feed, the sensor is installed at the base of the roof of the feeder and measures the distance to the base on which the food is placed. The distance from the roof to the base is 210 cm. On this farm, cattle are fed with bales of straw which measure 90 cm × 100 cm × 210 cm on average. A single bale is placed per feeder when feeding the cattle. It can therefore be extrapolated that a measurement of 210 cm recorded by the ultrasonic sensor corresponds to a level of feed of 0% (the height of the ceiling relative to the base), and that a measurement of 110 cm in the height between the ceiling and the bale), corresponds to a 100% feed level. In view of maximum and minimum values of feed in the feeders, the levels of feed can be calculated with the data collected by the sensor. There may be straw residues when new bales are being placed in the feeders, which will cause the feed height to exceed the upper limit that determines 100% of the feeder filling. In these cases, the level of feed will also be considered to be 100%.

3.4.2. System for the Monitoring of Ingestion

A fundamental aspect of livestock farms is the correct feeding of livestock, since it has a direct impact on production rates, whether meat or milk. Although cattle feed on forages, the incorporation of concentrated foods in their diet helps to improve production to a great extent. For this improvement to be effective, it will be necessary to elaborate optimal feed portions for different groups of animals (steers, heifers, bulls, gestating cows, dry cows or production cows). This, in addition to boosting farm production, will in many cases help reduce costs, since the unnecessary use of feed will be largely avoided. To be able to correctly plan animal feeding, a system that allows for the monitoring of the animals’ feed intake, has been incorporated in the platform.
To control the animals’ feed intake, we developed a system which establishes what kind of food an animal has been ingesting (and for how long). Two sensors placed of the animals’ collars have been used to collect the necessary data. These sensors consist of an accelerometer and a GPS module, in which the agents are embedded: the Accelerometer agent and the GPS Agent, both belong to the WSN Organization. The main function of these agents is to collect the information from the sensors and transmit it to the central agent of the organization, which is responsible for providing the information from the sensors’ different heterogeneous sources to other organizations, such as the Prediction Organization. In this organization, the Intake Analyzer agent is in charge of merging information with the data recorded by the Accelerometer agent and the GPS agent. On the one hand, thanks to the data variation analysis done by the accelerometer, we can determine when the animal was eating or performing another activity. Furthermore, when geofencing techniques (to delimit the geographical areas where the feeders are located) are applied to GPS data, it is possible to determine if the animal is in an enclosed or open area. Thus, with the combined use of both sources of information, it can be specified whether an animal was eating or not, whether it was in one zone or another and thus, we can infer what kind of food it ingested; pasture in the intensive area or concentrated food in an enclosed area.
To develop a system that differentiates the animal’s intake periods from the data recorded by the accelerometer, tests have been carried out with data obtained from 6 Charolais breed cattle during a three-week period. During this period, these animals wore a collar that incorporates a LIS3DH accelerometer, which allows acceleration measurement in three axes, with a dynamically configurable detection range of ±2 g/±4 g/±8 g/±16, and which offers a base consumption rate of 6 μA in low-power mode. The procedure to establish if grazing activity is occurring, is the one described by Rayas-Amor et al. in their work [52]. This procedure establishes a relationship between the acceleration and tilt that can be used to estimate the grazing time. On the one hand, the median acceleration readings in the x axis in a range between 0.175 and 0.95 m/s2 establish grazing activity. On the other hand, the degree of vertical tilt in the y axis can be used to establish grazing position in a range of readings between 0° and 61°.
The second component involved in the control of intake, aims to determine if the animal has been ingesting pasture or concentrated feed at a given time. There are two well differentiated areas within the farm where the study was carried out: the area where the feeders are located, and the extensive pasture area. As explained previously, it will be possible to determine whether an animal has been ingesting either grass or concentrated feed, based on the animal’s geographical location (by differentiating if it is in the zone of feeders or on extensive pasture). To develop this system, GPS sensors Neo-6 m, placed in the collars of the animals, have been used to continuously monitor the position of the animals. Thanks to the position provided by the GPS, and using geofencing techniques which allow to encircle a certain geographical area, it will be possible to determine if an animal is within one of these zones at any given time by means of a simple system of rules. Figure 10 shows the aerial view of the farm where the study was carried out. Two enclosures can be seen on the photograph, a yellow one and a red one, which correspond to the virtual fences. The yellow fence delimits the geographical space where the feeders are located and the red one delimits the geographical space of the whole farm. Thanks to the delimitation of these zones, we can establish if: (i) the animal is in the zone of the feeders; (ii) the animal is in the area of extensive pasture; or (iii) the animal is outside the farm area.

3.4.3. System for Estrus Detection

The motion sensor is used to predict estrus. Every hour, the motion sensor sends the information from the accelerometers to the central server, where the activity of the animal is estimated. The procedure that is followed to calculate activity is the one described by Yin et al. [53]. Basically, the algorithm for a time interval of 5 s takes the mean acceleration values for the x-axis, y-axis, and z-axis and then calculates the value difference for the x, y, z axis between two contiguous intervals. These three values are used together with the sum of their absolute values in order to calculate the activity of the animals (Equation (1)).
d i = { x , y , z , | x | + | y | + | z | }
From the values, three clusters are created by applying PAM, so that groups g1, g2, and g3 have one for high, medium and low activity (Equation (2)). In the original algorithm, k-means was used, but to avoid problems with atypical values, PAM is used.
G = { { g 1 , g 2 , g 3 } / g 1 g 2 g 3 =   d i , g 1 g 2 g 3 = }
To subsequently determine whether the cow is in heat or not, it is necessary to compare the number of elements in each group, with the elements from the groups obtained in previous days at the same hour. We used the indications provided in the work of Yin et al [53] to calculate the activity index of a cow for a particular time t.
a t = i = 1 3 # g i w i
where # g i is the number of elements in group i, and w i is the weight of group i, by default in this order: {0, 0.1, 0.9}.
To calculate the activity index, compare the number of the value of Equation (3) according to the three days prior to the same hour as well as with the previous hour.
v i = 3 a t ( a t 24 a t 48 a t 72 ) ( a t 24 a t 48 a t 72 ) + ( a t a t 1 ) a t 1
To consider aspects associated with the movement of livestock or situations in which cattle may be more active e.g., food, strangers on the premises, animals present, etc. The above formulas are modified to consider changes in the general activity of the control group of cows. These situations are established using Equation (5).
I t c = v t c | v ¯ t |
where v t c is the activity index, calculated from Equation (4) for the cow c in the particular time t, | v ¯ t | is the average activity index for all the cows in t. By applying Equation (5) it is possible to determine a variation in the activity index of the animals, in comparison to the cows that were previously used as a reference for this study. The selected animals for this study correspond to cows that are already pregnant and can be observed visually, or with cows which are already pregnant that are not observed visually, but the estrus has not been detected during three periods.
The estrus detection thresholds obtained by Equation (5) based on data are established manually at the beginning.

3.4.4. System for Calving Detection

In cattle farming, human assistance is often required during labor to ensure a birth without any complications, safeguarding the health of both the parturient and the calf. If the farm is large or if the calving takes place at night, the danger is even greater; the farmer must look for the cow in the whole field and loses critical time on which the health of livestock depends. Thus, it is crucial for the farmer to know exactly the time and the geolocation of the place where the birth will start.
To solve this problem, a sensor has been designed consisting of an accelerometer and a temperature sensor, which is introduced into the cow’s matrix. This sensor should be placed when the following symptoms are detected in the animal: presence of colostrum in the mammary glands, decrease in body temperature or repetitive tail lifting.
To detect labor, continuous monitoring of the animal’s temperature is performed. It is possible to detect calving in an early and approximate way when it is going to occur through the analysis of the cow’s body temperature. According to the studies conducted by Lammoglia et al. [54], the body temperature of the animal is significantly reduced in the 48 to 8 h prior to the labor. On the other hand, when the cow’s water breaks, the sensor is ejected out of the matrix, producing a variation in temperature, thus the exact moment at which labor begins, can be detected. The geolocation of the cow is obtained by using the GPS module that the cow carries on a collar and is described in detail in Section 3.4.2. The changes in temperature are determined empirically using the values collected by the temperature sensor. To implement this functionality, it is necessary to establish a temperature threshold that determines the beginning of labor. When the threshold is crossed, the farmer is alarmed that the cow is in labor. Figure 11 shows the steps that follow the procedure described above.

3.5. Developed Applications

It is very well known that the world population is getting older. The large number of elderly people in our society can be explained with improved health care and earlier retirement. Despite the internet boom, the older generation is still quite unfamiliar with the use of new technologies. Some are unaware of the benefits offered by technological devices while others, who are interested in using electronic applications and devices, find it too complex to manage them. The distance between technology and older people gets even greater when we look at its high cost. We must take into account that the majority of farm owners are elderly, and therefore the technological solutions offered for farms, should be economic and easy to use. The province of Salamanca has the largest number of cattle in Spain, a total of 6012, thus this work intends to provide a solution that will allow elderly farmers to correctly control and supervise their farms.
A monitoring prototype has been developed where farmers can view the data on their farm and their animals. They will be able to view these data from their own homes. We chose a low-cost platform design that allows to remotely interact with the farm. A human-machine interface (HMI) has been implemented so that people who have very little knowledge of technology can easily view data and receive notifications. An application for the television has been developed because elderly people are familiar with its use (unlike other electronic devices; computers, mobiles). Users manage the application with a remote control, whose colored buttons are associated with different actions or give access to the submenus of the application.
An alternative is offered to users who are familiar with new technologies; they can display all the data on a website. This website shows real-time information collected by sensors, including the location of animals, cameras, food sensors, water level sensors and alerts on heat, calving or feed levels.
Additionally, an Android application for mobile devices has been developed, where users can also view information and alerts on heat, calving and feeding. This application can be very useful to breeders, because when the system detects an important event, a notification is sent to the user’s mobile. This provides users with greater comfort and security since they do not have to be constantly checking the application in order to stay informed of the current state of the farm.

4. Results and Conclusions

The experimentation and validation phase has been carried out on the Ángel Santiago García Martín cattle farm, located in the town of Fuente de San Esteban town, in the province of Salamanca. The use of PANGEA as the MAS architecture permitted us to design a complex case study where computationally limited device participate in a reduced period. By using the designed architecture, the cattleman ubiquitously tests the algorithms implemented in the platform, allowing for their continuous improvement. The farm where the platform was implanted, has 450 hectares in total, out of which, 300 hectares are dedicated to bovine cattle. The number of livestock on the holding is 200. For the verification tests, a sample of 24 specimens belonging to the Charolais breed have been used.
For the development and validation of the intake monitoring system, tests were carried out with six Charolais breed cattle during a three-week period. Regarding the system that allows establishing what the periods of grazing have been, the use of tri-axial accelerometers has been previously probed to be accurate to estimate grazing time per cow and per day [52], results that could be empirically tested by observing the animals. Regarding the second component involved in the control of the intake, which aims to determine if the animal has been ingesting pasture at a given time, the accuracy of this system is subject to the accuracy of the location obtained by the GPS sensor. During the validation of the system, empirical tests were performed to check the possible fluctuations of the collected values, reaching 3 m accuracy in the measurements. However, the area around the location of the feeders in this place is so frequented by animals, the grass does not for 3–4 m around it. Thus, the error derived from the measurements in this case is minimal, since there is no food other than the one in the feeders in this space. However, the accuracy of this system in a farm where these conditions are not met, will be subject to the accuracy of the GPS in that location. To deal with this possible problem, a viable alternative may be the use proximity sensors, whose application has been validated in other works [19].
To study the relationship between an increase of physical activity of cows with the onset of heat, a motion sensor was placed in a sample of 8 adult cows. As discussed in Section 3.4.3, an algorithm is applied to calculate the cows’ activity index. Figure 12 shows the calculated activity index for one of the cows that participated in the study. During the study, a pronounced increase in the activity index was discovered, as can be seen in the Figure 12, it coincides with the beginning of the animal’s zeal. This system has been tested in previous works reaching a 100% success rates [53]. In this case study, the relationship between the increase in the activity index and the beginning of zeal has been validated by a human expert: the head farmer. The number of the detected heat events has matched with the observed heat events in eight out of the eight studied cows.
To study the temperature variability prior to calving, we opted to monitor six cows on the farm. The objective was to study the temperature pattern to be able to adjust the sensitivity of the designed sensor and to study the variation of the cows’ temperature over these days. Table 3 shows the data obtained for six days prior to delivery and the evolution of the temperature variable at the time of delivery. Three of the cows studied were pregnant with a male offspring, while the other three were females.
Figure 13 shows the evolution of the average temperature of the offspring according to their gender. As it can be seen in the image, the temperature of the cows lowers 48 h before the calves were born and when the cow gives birth, the thermometer is expelled. Once it is expelled it measure the temperature of the environment, in this way it is easy to predict labor. In view of the obtained results, the system performance has been verified in all the cows of the control group. The accuracy of this method is subject to two factors: the correct functioning of the temperature sensor and the outside temperature. Assuming that the sensor works properly, the detection of delivery would only fail when the ambient temperature is exactly the same as the body temperature of the cow. Considering that the body temperature of these animals is around 40 °C, and that in these cattle farm the deliveries are scheduled for the months of November, January and February, there is no match possibility between both values.
One of the main results of this work is a monitoring platform that allows to check the state of the exploitation in real time, as well as to receive different alarms of the events detected by the system. As explained in previous sections, in this work, we opted to implement three different applications: one for TVs, one websites and one for smartphones.
The purpose of the farm remote monitoring is to allow the final users who participate in the case study to remotely view the data in an application. Most of the owners of agricultural holdings in the geographical area where the case study has been performed (La Fuente de San Esteban, Salamanca (40.8013959, −6.2624964)) are elderly people. Adults who live in rural zones are normally reluctant to the use of technology (and more specifically computers) as a central element to access data remotely. For this reason, it was proposed that the monitoring could be carried out from a television. Televisions are present in almost every household and can be operated in a simple way. This idea was provided by the local group Asociación de Mayores San Esteban. In this case of study, six individuals with ages between 40 and 64 years were offered for the development and validation of the monitoring prototype making use of TVs. In the development of the TV application, a Raspberry Pi with an IR sensor (model TSOP38238) has been used as hardware. The connection between the Raspberry Pi and the IR sensor is made using the GPIO pins, as shown in Figure 14.
Pulsations made in the control are used to operate the user’s television. This control interface allows users to access through the different options of the designed application. Users highlight the ease of use when accessing the data, since it is not necessary to install or operate a computer, simply plug in the TV and use the conventional control by pressing buttons. The software component designed to identify the buttons that act as an interface between the software and the hardware is based on LIRC (Linux Infrared Remote Control). It allows to associate the pressing of each button with a software event. The different buttons allow to view the different displays provided by the application as well as to move cameras that provide real-time images of the animals. Figure 15 shows the graphical user interface of the TV application. Users who tested and validated the TV prototype highlighted the simplicity of using it, as well as not having to do an initial investment in a computer.
The state of the livestock is also monitored through the web application. Figure 16A shows the information about the alerts that arrive to the system. In this image, you can see three alerts: the first of them indicates that the labor sensor has been activated (has begun to collect measures), the second indicates that there will be a labor in approximately 48 h and the third warns of the moment the labor begins. Figure 16B shows information about the food sensors, which includes the feed levels and the battery level of the sensor (although the devices are self-sufficient thanks to the use of solar panels that charge the batteries). In addition to the monitoring information, the website includes other information on livestock such as prizes, breeders, sales or cattle raising.
The mobile application provides access to the most important functionality such as alerts on estrus, labor and feeding. The mobile application also allows getting notifications every time a new alert arrives to the system, thus it is not necessary to be continuously looking at the state of livestock. Notifications arrive on the mobile device regardless of whether the application is open or not. They are sent by the agents from the prediction organization. Through the mobile application, you can see alert information in real time, the location of the animals and the cameras. Figure 17A shows the application menu, Figure 17B shows a heat alert for a particular animal; the animal’s name, id, date and description can be read in the alert. Figure 17C shows the location of the animals. This location is loaded on a map with the satellite view of google maps, the location of the animals is redrawn synchronously by using websockets, reducing the traffic and updating the location only when there are data. In addition, the different chambers located on the farm can also be viewed from the application.
Cattle farmers have used the system for 12 months, emphasizing the simplicity and the enormous utility of the platform. They were happy with the possibility of monitoring the farm from their television, since the commercial systems that they knew, were based on the sending of SMS to their mobiles, which charge money. From the different utilities offered by the system, the farmers highlighted the benefit of the labor detection system since it allowed them to go to the field and assist the cows whenever it was necessary. The farmer felt overwhelmed by the number of data viewed on the TV application and it had to be reduced to make its use easier. The system for the detection of feeding anomalies, provided greater comfort, since the farmer did not have to spend that much time observing the cattle. The possibility of knowing the state of the feeders and the position of the cows avoids unnecessary displacements. The GPS position of the animal allows to find the animal quickly, which is very important in extensive farming where the farmer must search the animal with a vehicle and would normally spend a lot of time at the task.


This work has been supported by project Máquina social para la gestión sostenible de ciudades inteligentes: movilidad urbana, datos abiertos, sensores móviles SA70U16. The project is co-financed with Junta Castilla y León funds. The research of Alberto L. Barriuso has been co-financed by the European Social Fund and Junta de Castilla y León (Operational Programme 2014–2020 for Castilla y León, EDU/128/2015 BOCYL). Álvaro Lozano is supported by the pre-doctoral fellowship from the University of Salamanca and Banco Santander.

Author Contributions

Alberto L. Barriuso, Gabriel Villarrubia and Juan F. De Paz have developed the system; they made the test and elaborate the review of the state of the art. Javier Bajo and Álvaro Lozano formalized the problem, the algorithms and reviewed the work. All the authors contributed in the redaction of the paper.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

Since other researchers may decide to use the hardware for their own experimentation, we decided to add electrical diagrams and the interconnection of the components designed for this case study, to this document.

Appendix A.1. Design of the Vaginal Thermometer

Figure A1 shows the 3D design of the vaginal thermometer used in the system for calving detection.
Figure A1. Design of the Vaginal Thermometer.
Figure A1. Design of the Vaginal Thermometer.
Sensors 18 00108 g0a1

Appendix A.2. Electric Collar Scheme (GPS + Accelerometer)

Figure A2 shows the electric scheme of the collar that includes both GPS and motion sensors, used in the monitoring of ingestion, estrus detection and calving detection systems.
Figure A2. Electric Collar Scheme.
Figure A2. Electric Collar Scheme.
Sensors 18 00108 g0a2


  1. Instituto Nacional de Estadística. Censo Agrario, 2009. Available online: (accessed on 28 June 2017).
  2. Cook, D.J.; Augusto, J.C.; Jakkula, V.R. Ambient intelligence: Technologies, applications, and opportunities. Pervasive Mob. Comput. 2009, 5, 277–298. [Google Scholar] [CrossRef]
  3. Adjali, O.; Hina, M.D.; Dourlens, S.; Ramdane-Cherif, A. Multimodal Fusion, Fission and Virtual Reality Simulation for an Ambient Robotic Intelligence. Proc. Comput. Sci. 2015, 52, 218–225. [Google Scholar] [CrossRef]
  4. Roda, C.; Rodríguez, A.C.; López-Jaquero, V.; Navarro, E.; González, P. A Multi-Agent System for Acquired Brain Injury rehabilitation in Ambient Intelligence environments. Neurocomputing 2017, 231, 11–18. [Google Scholar] [CrossRef]
  5. Santana-Mancilla, P.C.; Echeverría, M.A.M.; Santos, J.C.R.; Castellanos, J.A.N.; Díaz, A.P.S. Towards Smart Education: Ambient Intelligence in the Mexican Classrooms. Proc. Soc. Behav. Sci. 2013, 106, 3141–3148. [Google Scholar] [CrossRef]
  6. Lambrou, M.A.; Fjørtoft, K.E.; Sykas, E.D.; Nikitakos, N. Ambient intelligence technologies in support of shipping markets’ operations. Telemat. Inform. 2008, 25, 72–83. [Google Scholar] [CrossRef]
  7. Smart Farming Receives the Backing of the European Parliament. Available online: (accessed on 28 June 2017).
  8. European Parliament. Report on Technological Solutions for Sustainable Agriculture in the EU—A8-0174/2016. Available online:–2016–0174+0+DOC+XML+V0//EN&language=en (accessed on 28 June 2017).
  9. European Parliament. Report on Enhancing Innovation and Economic Development in Future European Farm Management-A8-0163/2016. Available online:–2016–0163+0+DOC+XML+V0//EN&language=en (accessed on 28 June 2017).
  10. O’Grady, M.J.; O’Hare, G.M.P. Modelling the smart farm. Inf. Process. Agric. 2017, 4, 321–362. [Google Scholar] [CrossRef]
  11. Wolfert, S.; Ge, L.; Verdouw, C.; Bogaardt, M.J. Big Data in Smart Farming—A review. Agric. Syst. 2017, 153, 69–80. [Google Scholar] [CrossRef]
  12. Kanjilal, D.; Singh, D.; Reddy, R.; Mathew, J. Smart Farm: Extending Automation To The Farm Level. Int. J. Sci. Technol. Res. 2014, 3, 109–113. [Google Scholar]
  13. Kwong, K.H.; Wu, T.-T.; Goh, H.G.; Sasloglou, K.; Stephen, B.; Glover, I.; Shen, C.; Du, W.; Michie, C.; Andonovic, I. Practical considerations for wireless sensor networks in cattle monitoring applications. Comput. Electron. Agric. 2012, 81, 33–44. [Google Scholar] [CrossRef]
  14. Manning, J.K.; Cronin, G.M.; González, L.A.; Hall, E.J.S.; Merchant, A.; Ingram, L.J. The effects of global navigation satellite system (GNSS) collars on cattle (Bos taurus) behaviour. Appl. Anim. Behav. Sci. 2016, 187, 54–59. [Google Scholar] [CrossRef]
  15. Nadimi, E.S.; Søgaard, H.T.; Bak, T.; Oudshoorn, F.W. ZigBee-based wireless sensor networks for monitoring animal presence and pasture time in a strip of new grass. Comput. Electron. Agric. 2008, 61, 79–87. [Google Scholar] [CrossRef]
  16. Williams, M.L.; Parthaláin, N.M.; Brewer, P.; James, W.P.J.; Rose, M.T. A novel behavioral model of the pasture-based dairy cow from GPS data using data mining and machine learning techniques. J. Dairy Sci. 2016, 99, 2063–2075. [Google Scholar] [CrossRef] [PubMed]
  17. Mora-Delgado, J.; Nelson, N.; Fauchille, A. Application of GPS and GIS to study foraging behavior of dairy cattle. Agron. Costarric. 2016, 40, 81–88. [Google Scholar] [CrossRef]
  18. Deniz, N.N.; Chelotti, J.O.; Galli, J.R.; Planisich, A.M.; Larripa, M.J.; Rufiner, H.L.; Giovanini, L.L. Embedded system for real-time monitoring of foraging behavior of grazing cattle using acoustic signals. Comput. Electron. Agric. 2017, 138, 167–174. [Google Scholar] [CrossRef]
  19. Bach, A.; Iglesias, C.; Busto, I. Technical Note: A Computerized System for Monitoring Feeding Behavior and Individual Feed Intake of Dairy Cattle. J. Dairy Sci. 2004, 87, 4207–4209. [Google Scholar] [CrossRef]
  20. Chelotti, J.O.; Vanrell, S.R.; Milone, D.H.; Utsumi, S.A.; Galli, J.R.; Rufiner, H.L.; Giovanini, L.L. A real-time algorithm for acoustic monitoring of ingestive behavior of grazing cattle. Comput. Electron. Agric. 2016, 127, 64–75. [Google Scholar] [CrossRef]
  21. Clapham, W.M.; Fedders, J.M.; Beeman, K.; Neel, J.P.S. Acoustic monitoring system to quantify ingestive behavior of free-grazing cattle. Comput. Electron. Agric. 2011, 76, 96–104. [Google Scholar] [CrossRef]
  22. Tani, Y.; Yokota, Y.; Yayota, M.; Ohtani, S. Automatic recognition and classification of cattle chewing activity by an acoustic monitoring method with a single-axis acceleration sensor. Comput. Electron. Agric. 2013, 92, 54–65. [Google Scholar] [CrossRef]
  23. López-Gatius, F. Factors of a noninfectious nature affecting fertility after artificial insemination in lactating dairy cows. A review. Theriogenology 2012, 77, 1029–1041. [Google Scholar] [CrossRef] [PubMed]
  24. Nelson, S.T.; Haadem, C.S.; Nødtvedt, A.; Hessle, A.; Martin, A.D. Automated activity monitoring and visual observation of estrus in a herd of loose housed Hereford cattle: Diagnostic accuracy and time to ovulation. Theriogenology 2017, 87, 205–211. [Google Scholar] [CrossRef] [PubMed]
  25. Shahriar, M.S.; Smith, D.; Rahman, A.; Freeman, M.; Hills, J.; Rawnsley, R.; Henry, D.; Bishop-Hurley, G. Detecting heat events in dairy cows using accelerometers and unsupervised learning. Comput. Electron. Agric. 2016, 128, 20–26. [Google Scholar] [CrossRef]
  26. Kyle, B.; Kennedy, A.; Small, J. Measurement of vaginal temperature by radiotelemetry for the prediction of estrus in beef cows. Theriogenology 1998, 49, 1437–1449. [Google Scholar] [CrossRef]
  27. Hillman, P.E.; Gebremedhin, K.G.; Willard, S.T.; Lee, C.N.; Kennedy, A.D. Continuous Measurements of Vaginal Temperature of Female Cattle Using A Data Logger Encased in a Plastic Anchor. Appl. Eng. Agric. 2009, 25, 291–296. [Google Scholar] [CrossRef]
  28. Miura, R.; Yoshioka, K.; Miyamoto, T.; Nogami, H.; Okada, H.; Itoh, T. Estrous detection by monitoring ventral tail base surface temperature using a wearable wireless sensor in cattle. Anim. Reprod. Sci. 2017, 180, 50–57. [Google Scholar] [CrossRef] [PubMed]
  29. Mee, J.F. Managing the dairy cow at calving time. Vet. Clin. North Am. Food Anim. Pract. 2004, 20, 521–546. [Google Scholar] [CrossRef] [PubMed]
  30. Calcante, A.; Tangorra, F.M.; Marchesi, G.; Lazzari, M. A GPS/GSM based birth alarm system for grazing cows. Comput. Electron. Agric. 2014, 100, 123–130. [Google Scholar] [CrossRef]
  31. Rutten, C.J.; Kamphuis, C.; Hogeveen, H.; Huijps, K.; Nielen, M.; Steeneveld, W. Sensor data on cow activity, rumination, and ear temperature improve prediction of the start of calving in dairy cows. Comput. Electron. Agric. 2017, 132, 108–118. [Google Scholar] [CrossRef]
  32. Schoenbaum, I.; Kigel, J.; Ungar, E.D.; Dolev, A.; Henkin, Z. Spatial and temporal activity of cattle grazing in Mediterranean oak woodland. Appl. Anim. Behav. Sci. 2017, 187, 45–53. [Google Scholar] [CrossRef]
  33. Santman-Berends, I.M.G.A.; Brouwer-Middelesch, H.; van Wuijckhuise, L.; de Bont-Smolenaars, A.J.G.; van Schaik, G. Surveillance of cattle health in The Netherlands: Monitoring trends and developments using routinely collected cattle census data. Prev. Vet. Med. 2016, 134, 103–112. [Google Scholar] [CrossRef] [PubMed]
  34. Park, M.; Jung, H.; Kim, T.; Ha, O. Design of cattle health monitoring system using wireless bio-sensor networks. In Proceedings of the 4th International Conference on Electronics, Communications and Networks (CECNET IV), Shanghai, China, 12–15 December 2015; p. 325. [Google Scholar]
  35. Frese, D.A.; Thomason, J.D.; Reinhardt, C.; Bartle, S.; Rethorst, D.; Loneragan, G.H.; Thomson, D. Twenty-four hour Holter monitoring in finishing cattle housed outdoors. J. Vet. Cardiol. 2017, 19, 153–159. [Google Scholar] [CrossRef] [PubMed]
  36. Afimilk. Silent Herdsman Collar. Available online: (accessed on 28 June 2017).
  37. Afimilk. MPC Milk Meters. Available online: (accessed on 28 June 2017).
  38. Afimilk. AfiTag Pedometers. Available online: (accessed on 28 June 2017).
  39. KV. Solar GPS locator collar. Available online: (accessed on 28 June 2017).
  40. Cattle Tags. Matched Pair Tags. Available online: (accessed on 28 June 2017).
  41. Moocall. Calving Sensors. Available online: (accessed on 28 June 2017).
  42. TELENAX. Rumen implant. Available online: (accessed on 28 June 2017).
  43. Bond, A.H.; Gasser, L. Readings in Distributed Artificial Intelligence; Morgan Kaufmann: Burlington, MA, USA, 1988. [Google Scholar]
  44. Durfee, E.H.; Lesser, V.R.; Corkill, D.D. Trends in cooperative distributed problem solving. IEEE Trans. Knowl. Data Eng. 1989, 1, 63–83. [Google Scholar] [CrossRef]
  45. Di Bitonto, P.; Laterza, M.; Roselli, T.; Rossano, V. An evaluation method for multi-agent systems. In Agent and Multi-Agent Systems: Technologies and Applications: 5th KES; Springer: Berlin, Germany, 2010; pp. 32–41. [Google Scholar]
  46. Bellifemine, F.; Poggi, A.; Rimassa, G. JADE: A FIPA2000 compliant agent development environment. In Proceedings of the 5th International Conference on Autonomous Agents (AGENTS ’01), Montreal, QC, Canada, 28 May–1 June 2001; pp. 216–217. [Google Scholar]
  47. Luke, S.; Cioffi-Revilla, C.; Panait, L.; Sullivan, K. Mason: A new multi-agent simulation toolkit. In Proceedings of the 2004 Swarmfest Workshop; George Mason University: Fairfax, VA, USA, 2004; Volume 8, pp. 316–327. [Google Scholar]
  48. Zato, C.; Villarrubia, G.; Sánchez, A.; Barri, I.; Rubión, E.; Fernández, A. PANGEA–Platform for Automatic coNstruction of orGanizations of intElligent Agents. Distrib. Comput. Artif. Intell. 2012, 151, 229–239. [Google Scholar]
  49. Stone, P.; Veloso, M. Multiagent Systems: A Survey from a Machine Learning Perspective. Auton. Robot. 2000, 8, 345–383. [Google Scholar] [CrossRef]
  50. AirMAXTM Titanium Sector Antennas Datasheet. Available online: (accessed on 20 December 2017).
  51. Power Station 5 Datasheet. Available online: (accessed on 20 December 2017).
  52. Rayas-Amor, A.A.; Morales-Almaráz, E.; Licona-Velázquez, G.; Vieyra-Alberto, R.; García-Martínez, A.; Martínez-García, C.G.; Cruz-Monterrosa, R.G.; Miranda-de la Lama, G.C. Triaxial accelerometers for recording grazing and ruminating time in dairy cows: An alternative to visual observations. J. Vet. Behav. Clin. Appl. Res. 2017, 20, 102–108. [Google Scholar] [CrossRef]
  53. Yin, L.; Hong, T.; Liu, C. Estrus Detection in Dairy Cows from Acceleration Data using Self-learning Classification Models. JCP 2013, 8, 2590–2597. [Google Scholar] [CrossRef]
  54. Lammoglia, M.A.; Bellows, R.A.; Short, R.E.; Bellows, S.E.; Bighorn, E.G.; Stevenson, J.S.; Randel, R.D. Body temperature and endocrine interactions before and after calving in beef cows. J. Anim. Sci. 1997, 75, 2526–2534. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Virtual organization of agents overview.
Figure 1. Virtual organization of agents overview.
Sensors 18 00108 g001
Figure 2. (A) Battery percentage consumed per hour and (B) messages sent per hour (results grouped by protocols and networking technologies).
Figure 2. (A) Battery percentage consumed per hour and (B) messages sent per hour (results grouped by protocols and networking technologies).
Sensors 18 00108 g002
Figure 3. Interaction performed between agents.
Figure 3. Interaction performed between agents.
Sensors 18 00108 g003
Figure 4. Behavior of the used antennas signal: Ti AM-V5 G-Ti (5 GHz): (a) horizontal Azimuth and (b) vertical Azimuth.
Figure 4. Behavior of the used antennas signal: Ti AM-V5 G-Ti (5 GHz): (a) horizontal Azimuth and (b) vertical Azimuth.
Sensors 18 00108 g004
Figure 5. Altimetry and quality of the radio link.
Figure 5. Altimetry and quality of the radio link.
Sensors 18 00108 g005
Figure 6. Network architecture diagram.
Figure 6. Network architecture diagram.
Sensors 18 00108 g006
Figure 7. Infrastructure of the proposed system.
Figure 7. Infrastructure of the proposed system.
Sensors 18 00108 g007
Figure 8. (A) GPS sensor; (B) solar collar for GPS sensor; (C) food sensor (ultrasonic sensor and solar battery); (D) motion sensor; and (E) vaginal thermometer.
Figure 8. (A) GPS sensor; (B) solar collar for GPS sensor; (C) food sensor (ultrasonic sensor and solar battery); (D) motion sensor; and (E) vaginal thermometer.
Sensors 18 00108 g008
Figure 9. (A) Feeder; and (B) measuring system.
Figure 9. (A) Feeder; and (B) measuring system.
Sensors 18 00108 g009
Figure 10. Aerial view of the farm, virtual enclosures.
Figure 10. Aerial view of the farm, virtual enclosures.
Sensors 18 00108 g010
Figure 11. Steps in the detection of labor.
Figure 11. Steps in the detection of labor.
Sensors 18 00108 g011
Figure 12. Activity index of a cow.
Figure 12. Activity index of a cow.
Sensors 18 00108 g012
Figure 13. Cow average temperature, grouped by breeding gender.
Figure 13. Cow average temperature, grouped by breeding gender.
Sensors 18 00108 g013
Figure 14. Cow average temperature, grouped by breeding gender.
Figure 14. Cow average temperature, grouped by breeding gender.
Sensors 18 00108 g014
Figure 15. Television application interface.
Figure 15. Television application interface.
Sensors 18 00108 g015
Figure 16. Web application interface.
Figure 16. Web application interface.
Sensors 18 00108 g016
Figure 17. (A) The application menu; (B) a heat alert for a particular animal, in which you can see the animal’s name, id, the date and a description; and (C) the location of the animals.
Figure 17. (A) The application menu; (B) a heat alert for a particular animal, in which you can see the animal’s name, id, the date and a description; and (C) the location of the animals.
Sensors 18 00108 g017
Table 1. Cattle Wearables.
Table 1. Cattle Wearables.
NameType of DeviceUtilityTechnologiesReference
Collar Silent HerdsmanCollarRumination, intake, fertility, temperature-[36]
AfiMilk MPCMilk meterAmount of production, milking trends, conductivity measurement-[37]
AfiTag PedometerPedometerIdentification of animals, activity measurement, estrus detection-[38]
KV GPS systemCollarLocation of animals, (battery charge with photovoltaic system)GPS[39]
Allflex TagsEar tagIdentification of animalsHDX[40]
Moocall Calving SensorTail sensorPrediction of birthsGSM[41]
Telenax ImplantRumen implantTheft detectionRF[42]
Table 2. Relationship between the sensors and the analysis systems.
Table 2. Relationship between the sensors and the analysis systems.
SensorData CollectedAnalysis/Prediction System Where It Is Used
GPS SensorCattle GeolocationSystem for the monitoring of ingestion and system for calving detection
Motion SensorPhysical accelerationSystem for the monitoring of ingestion and system for estrus detection
Vaginal thermometerCorporal temperatureSystem for calving detection
Food sensorDistanceSystem for the detection of food levels in the feeders
Table 3. Cows body temperature prior to delivery.
Table 3. Cows body temperature prior to delivery.
Hours Before and After Calving (Hour 0 = Time of Calving)
Cow 1 Male39.9940.0039.9240.1639.9439.9940.0639.9740.0840.0340.0139.9840.0239.8039.6439.6539.3039.98-Cow Body C° Temperature
Cow 2 Female39.9939.5839.839.8239.8540.0139.8339.5739.8339.8440.0339.8340.0539.8339.6239.6239.3239.83-
Cow 3 Male40.1040.2040.1840.0640.3040.6040.0239.8540.5240.5740.1440.8540.4739.8239.8139.3839.3939.89-
Cow 4 Female39.2939.339.7939.1739.0539.339.0439.6939.4839.6939.339.9139.8839.7838.8639.1738.3339.47-
Cow 5 Male40.2340.2340.2440.0940.3040.4340.7840.0040.1040.4640.5240.4840.4840.7240.1640.2039.3440.10-
Cow 6 Female40.3140.240.2640.6839.9340.0140.5840.140.3340.3340.1140.0940.6740.140.1139.239.8839.96-

Share and Cite

MDPI and ACS Style

Barriuso, A.L.; Villarrubia González, G.; De Paz, J.F.; Lozano, Á.; Bajo, J. Combination of Multi-Agent Systems and Wireless Sensor Networks for the Monitoring of Cattle. Sensors 2018, 18, 108.

AMA Style

Barriuso AL, Villarrubia González G, De Paz JF, Lozano Á, Bajo J. Combination of Multi-Agent Systems and Wireless Sensor Networks for the Monitoring of Cattle. Sensors. 2018; 18(1):108.

Chicago/Turabian Style

Barriuso, Alberto L., Gabriel Villarrubia González, Juan F. De Paz, Álvaro Lozano, and Javier Bajo. 2018. "Combination of Multi-Agent Systems and Wireless Sensor Networks for the Monitoring of Cattle" Sensors 18, no. 1: 108.

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop