# The Realization of Pig Intelligent Feeding Equipment and Network Service Platform

Weihong Ma, Jinwei Fan, Chunjiang Zhao, Huarui Wu

► To cite this version:

Weihong Ma, Jinwei Fan, Chunjiang Zhao, Huarui Wu. The Realization of Pig Intelligent Feeding Equipment and Network Service Platform. 11th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Aug 2017, Jilin, China. pp.473-484, 10.1007/978-3-030-06179-1_47. hal-02111547

HAL Id: hal-02111547

https://inria.hal.science/hal-02111547

Submitted on 26 Apr 2019

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# The Realization of Pig Intelligent Feeding Equipment and Network Service Platform

Ma Weihong<sup>1,2,3,4(✉)</sup>, Fan Jinwei<sup>1</sup>, Zhao Chunjiang<sup>2,3,4</sup>, Wu Huarui<sup>2,3,4</sup>

(1. College of Mechanical Engineering and Applied Electronics Technology, Beijing University of Technology, Beijing 100124, China; 2. National Engineering Research Center for Information Technology in Agriculture, Beijing 100097, China; 3. Key Laboratory of Agri-informatics, Ministry of Agriculture, Beijing 100097, China; 4. Beijing Engineering Research Center of Agriculture Internet of Things, Beijing 100097, China)

**Abstract:** Proper feeding of pigs can increase the litter size and improve the disease resistance level. In recent years, intelligent and automatic equipment, which can collect feeding times, feed intake, feed time and growth conditions, have been applied to the pig feeding. Most equipment can feed both manually and automatically. Not enough attention has been paid to one pig's health condition, living environment, and dietary status, which should be considered together in order to make an accurate decision on the feed intake of each pig. At the same time, there are not many network service platforms in China which can effectively manage the intelligent and automatic equipment remotely and simultaneously. To improve pigs' productivity and enhance the intelligent management of pigs, wireless sensor network, intelligent sensors, network service platform, and reasoning and decision-making technology have been utilized in the management of pigs in multiple areas throughout China. Single feed intake, living environment information, fitness, and weight for pigs throughout China with different conditions were collected in the network service platform by using the intelligent feed equipment which had several different sensors. Meanwhile, the network service platform could recognize the identity of each pig and provide accurate feed remotely. The network service platform would send a text message or an audible and visual alarm to inform the pig keeper whether the pig's feed intake was proper. According to the reasoning and decision-making model we built in the network service platform, we can remotely obtain through the platform more accurate information within seconds as to each pig's feeding status. Moreover, the experiment showed that the feeding container was the key factor that influenced the precision of feeding, and the measured value was closely approximate to the target value with error correction.

**Key words:** Management of pigs, Internet of Things, Monitoring and Warning, Reasoning and Decision-making, Network Service Platform

## 0 Introduction

Proper feeding is an important way to improve pig productivity, which increases litter size and improves disease resistance [1]. The feeding status of pigs is a very important index of health monitoring. Abnormal feeding
behavior can be a sign of epidemic disease[2].

Considering the disadvantages of traditional livestock farms, such as being time-consuming, laborious and having low accuracy[3], Zhong Fangkui et al used RFID, GPRS and embedded technology to collect and analyze each pig's feeding times, feed intake, and growth status in large-scale pig farms. They proposed a new method based on RFID and ARM embedded technology to monitor pigs' daily behavior. Although this method can be used to collect each pig's feeding times, food intake, and growth state, there is no monitoring of a pig's health information and living environment information, no comprehensive analysis and reasoning with health information, no living environment information and feed intake, and no network service platform which could provide an effective way of managing pigs from multiple areas. Hence, this method cannot remotely provide accurate feeding information. Moreover, the multiple intelligent feeders from multiple areas cannot be centrally monitored and managed. We used Wireless Sensor Network, intelligent sensors, network service platform technology, and remote reasoning and decision-making [4] to achieve accurate feeding and precision management of pigs from multiple areas, which improved their productivity level.

# 1 System Composition

The system we built comprised two parts which were (a) the pig intelligent feeding equipment and (b) the pig health monitoring and management network service platform. The network management of the pig feeding equipment and the remote monitoring and managing of useful information, such as living environment, health information and daily feeding amount of pigs from multiple areas, was realized by using the Internet of things technology [5,6]. Through cameras installed in pig farms in multiple areas, users could have a remote view of the pig farm and were able to remotely control the pig feeding equipment through the network service platform via mobile phone and PC [7].

The decision-making model[8] was used in the pig health monitoring and managing network service platform to obtain the precise feed amount. Then, the platform sent instructions to the feeding equipment to control the pig feeding motor to feed the precise amount. The intelligent feeding equipment from multiple areas was centrally managed through the pig health monitoring and managing network service platform via the wireless transmission network, as shown in Fig 1. Meanwhile, users were able to access the platform service through mobile phone and PC at any time and from anywhere.
<figure><img src="image_2.png" /><figcaption>Fig.1 The whole system structure</figcaption></figure>

## 2 Pig Intelligent Feeding Equipment

### 2.1 Hardware of pig intelligent feeding equipment

The hardware of the feeding management equipment was composed of the core processing unit, environmental monitoring unit, process monitoring unit, health monitoring unit, execution unit, and the wireless transmission unit. The core processing unit was composed of the core processor and its peripheral circuit. The main function of the core processing unit was to manage the equipment's other units. The sensors in the environmental monitoring unit were an ambient temperature sensor, humidity sensor, ammonia sensor[9], carbon dioxide sensor, and hydrogen sulfide sensor[10], all monitoring the gas concentration of the pigs' living environment.

There was an entrance and exit detection in the process monitoring unit with infrared sensors which used infrared detection to determine whether a pig had passed. The RFID identifier was used to identify the identity of each pig in order to make the intelligent feeding equipment feed accurately. The RFID identifier sent the radio frequency modulation signal to the label through the antenna. At the same time, it received the RF signal which contained information from the label through the antenna[11]. Then, the RF signal was processed to be transmitted to the core processor.
The sensors in the health monitoring unit were a material level monitoring sensor, electronic scale sensor, non-contact infrared temperature measuring sensor [12], and animal ultrasonic thickness sensor[13]. The material level monitoring sensor was used to monitor the actual amount of the hopper in order to obtain the pig's effective feeding intake. The electronic scale was used to measure the pig's weight before feeding. Hence, the electronic scale enabled the equipment to record pig weight daily. The non-contact infrared temperature sensor was used to monitor the pig's body temperature before eating. In addition, the temperature and humidity compensation algorithm was used to make the pig's body temperature measurement more accurate[14]. The ultrasonic thickness sensor, which uses ultrasound to measure the thickness of mammals, was applied in our experiment.

The execution unit comprised of the hopper feed motor, entrance door motor, and exit door motor whose function was feeding, opening and closing the door of the equipment. The main function of the wireless transmission unit was to transmit the real-time data of the intelligent feeding equipment to the network service platform[15] and at the same time accept the instructions from the network service platform to collect data, feed, open and close the door, etc. The equipment hardware is shown in Fig. 2.

<figure><img src="image_3.png" /><figcaption>Fig.2 The hardware of pig intelligent feeding equipment</figcaption></figure>

## 2.2 Software process of pig intelligent feeding equipment

The intelligent feeding equipment first initialized and then opened the entrance door to allow the pigs to enter one by one. The equipment used the entrance door sensor to detect whether a pig had entered the entrance door.
When the pig entered, the core processor activated the RFID identifier to identify the electronic earmark of the pig.
As the distance of the identification of the electronic earmark was relatively close, when the RFID recognized the
pig ear, it meant that the pig had entered the dietary channel. At the same time, the equipment closed the entrance
door to prevent other pigs from entering into the dietary channel. If other pigs were able to enter the dietary
channel, then the equipment would not be able to tell which electronic ear tag belonged to the pig. When the core
processor received the electronic ear tag information, then the electronic scales, non-contact infrared temperature,
and fat thickness sensors began to collect data. Sensor data and environmental information together with the
identity information of the RFID and the current time were then transmitted to the server through the wireless
transmission module [16].

After the server received the sensor data and the other information, it then obtained the result from the
forward inference [17,18] of the server platform to determine the feeding amount of the recognized pig. The network
service platform [19] sent the feeding amount instruction to the core processor module of the feeding device
through the wireless module. After replying to the instruction, the core processor operated the material level motor
to feed according to the amount of the instruction. During the pig's feeding time, the core processor worked with
the material level sensor to monitor whether there was residual feed. If the monitoring result was still surplus, the
material level sensor would continue to monitor whether the material level was still reducing 10 minutes later. If
the material level was still reducing, it indicated that the pig was still feeding. Then the material level sensor
would keep monitoring the material level until the material level was no longer reduced, which meant that the pig
had finished feeding this time. The actual feed intake would be uploaded to the platform server. Finally, the
equipment would open the exit door. When the exit door sensor detected that the pig had left the exit door, the
equipment would close the exit door and open the entrance door, waiting for the next pig to enter to feed. The
software flow chart of the intelligent feeding equipment is shown in Fig. 3.
<figure><img src="image_4.png" /><figcaption>Fig.3 The Software flow chart of intelligent feeding equipment</figcaption></figure>
# 3 Pig Network Service Platform

## 3.1 Network service platform structure

The function of the network service platform was to monitor and manage pig health, which included basic information management, environmental information monitoring, reasoning and decision-making, and user management, as shown in Fig. 4.

<figure><img src="image_5.png" /><figcaption>Fig.4 Network service platform structure</figcaption></figure>

Users from multiple areas viewed the network service platform installed in the remote server either through mobile phone or PC. The network service platform was developed by using the Eclipse 8.0 development platform [20]. The foreground page and background program were written using Java language [21,22]. The management of the relational database was realized by MySQL[23,24], which has the most comprehensive set of advanced features, management tools, and technical support to achieve the levels of MySQL scalability, security, reliability, and uptime.

## 3.2 Reasoning and Decision-making

Considering that the control targets, living environment, and growth data of individual pigs were different, it was not a simple process to determine the feed intake of individual pigs. Previous feeding methods did not consider the multiple control targets taken into account by our team. They also did not refer to expert opinion and historical data to determine the correct feed intake of a typical pig. The intelligent feeding system based on the expert system reasoning machine [25,26] linked together the living environment, growth status, growth parameters,
and growth stage by case matching, fuzzy reasoning, and decision-making to derive the pigs' best diet condition, so as to effectively apply expert opinion and historical parameters to control the pigs' diet.

Reasoning and decision-making were made by the inference engine[27,28], which used certain reasoning methods and strategies in the dynamic database[29] for working memory. According to the current content of the dynamic database, the corresponding reasoning control strategy was used by the inference engine to decide how to use the knowledge in the knowledge base.

At the same time, the rules in the rule base were controlled to match the data and facts in the dynamic database. When the match was a success, the corresponding rules were triggered to modify the dynamic database. Using the decision-making model, the final result was obtained. Expert system inference engine[30,31] was used in this paper, as shown in Fig. 5.

<figure><img src="image_6.png" /><figcaption>Fig.5 Expert system inference engine</figcaption></figure>
# 4 Experiment

## 4.1 Feeding Accuracy Experiment for Pig Feeding Equipment

Experiment equipment: Pig intelligent feeding equipment, high-precision electronic scale.

Measured material: Powder concentrated feed.

Experimental purpose: To detect the feeding accuracy of pig intelligent feeding equipment

Considering the intake amount of a pig is about 2kg-4kg per day, we set the feed target values as 2kg, 3kg and 4 kg, which were each measured 5 times using a high-precision electronic scale whose precision is 0.2g and range 10Kg. The target value was the theoretical value computed according to the relationship between design volume and pulse equivalent. There was some error of drop feeder assembly and pulse equivalent, which is inevitable. After correcting the error by the averaging algorithm, the actual value and target value were as follows:

<table><caption>Table 1 target value 、 measured value and average value</caption><thead><tr><th>Target (Kg)</th><th>value</th><th>a (Kg)</th><th>b (Kg)</th><th>c (Kg)</th><th>d (Kg)</th><th>e (Kg)</th><th>Average value(Kg)</th></tr></thead><tbody><tr><td>2</td><td>1.98</td><td>1.90</td><td>1.97</td><td>2.03</td><td>2.05</td><td>1.97</td><td></td></tr><tr><td>3</td><td>2.90</td><td>2.91</td><td>2.98</td><td>3.03</td><td>3.05</td><td>2.97</td><td></td></tr><tr><td>4</td><td>4.09</td><td>4.05</td><td>3.96</td><td>3.92</td><td>4.03</td><td>4.01</td><td></td></tr></tbody></table>

It was obvious that the average value was approximate to the target value, concluding that the feeding container was the key factor that influenced the precision of the intelligent feeding equipment.

## 4.2 Reasoning and Decision-making test

The experiment was carried out by pig intelligent feeding equipment on one pig. The decision-making was obtained through the network service platform. The server received a pig's electronic ear tag information, DBZRSQU3041. After comparing the ear tag information to the database on the server, the equipment derived the following information: the large white variety, pregnancy status, and gestational age of 20 days. The data collected by the sensors were: body weight, 95kg; body temperature, 38.7°C; and fat thickness, 16 mm. The living environment parameters were: temperature, 30°C; humidity, 25%; ammonia concentration, 25ppm; CO2 concentration, 356ppm; and hydrogen sulfide concentration, 3ppm. According to the information on pig varieties and breeding stages of pigs, the network service server obtained the knowledge base of the ideal physical parameters: body weight, 90kg-100kg; body temperature, 38.3-39.1 °C; and fat thickness, 15.0-21.0mm. The ideal living environment parameters were: temperature, 25 degrees; humidity 50%-60%; ammonia concentration, 0-30ppm; carbon dioxide concentration in the air, 300-450ppm; and hydrogen sulfide concentration, less than 10ppm. After comparing the physical parameters and preset parameters, the reasoning and decision-making model concluded that weight, body temperature, fat thickness, and physical condition were normal. After comparing the collected environmental parameters to the ideal environmental parameters, the reasoning and decision-making
model concluded that the temperature was high, humidity was low, and gas concentration was normal. Hence, the
environment parameters were not suitable for this pig. Thus, when the forward reasoning and the contrast of the
knowledge base model were finished, the forward reasoning machine model in the network service platform made
a decision that the current recommended intake was 2.8kg.

5 Conclusion

Proper feeding is an important condition for the growth of pigs. The difference in the growth period, health
status, and environmental parameters make the daily intake of feed of each pig different. Proper feeding can
effectively avoid the waste of feed and maintain pigs' health condition. At present, there is a lack of an effective
health monitoring network service platform for large-scale and multiple areas pigs' precision feeding. Previous
research did not do an effective reasoning and analysis based on pigs' living environment and physical status.
Previous research also did not use an effective reasoning and decision-making model that considered pigs' living
environment and physical status. We combined with the Internet of things technology, network service platform
technology, sensor technology, and reasoning and decision making to make an intelligent feeding equipment and
network service platform which can provide a convenient and intelligent feeding method as well as multiple areas
pig management. The average value of the equipment was approximate to the target value, which meant that the
accuracy of the equipment was high, and the feeding container was the key factor that influenced the precision of
the intelligent feeding equipment. Decision-making was obtained through the network service platform which was
able to monitor and manage the health status of pigs. In the future, on the basis of the accumulation of data, we
can use machine learning to analyze big data to enrich and improve the reasoning and decision-making model and
forecast the future of pigs' feeding status.

Acknowledgment

This work is partially funded by the National Natural Science Foundation of China, (project number
F010407). We thank Dr. Tina Giannoukos for her English-language editing.

References

1. Hall, A. D., Hill, W. G., Bampton, P. R., & Webb, A. J. (2016). Genetic and phenotypic parameter estimates for feeding pattern and performance test traits in pigs. Animal Science, 68(1), 43-48.

2. Maselyne, J., Saeys, W., & Nuffel, A. V. (2015). Review: quantifying animal feeding behaviour with a focus on pigs. Physiology & Behavior, 138, 37-51.
3. Latruffe, L., Balcombe, K., Davidova, S., & Zawalinska, K. (2015). Technical and scale efficiency of crop and livestock farms in Poland: does specialization matter? Agricultural Economics, 32(3), 281-296.

4. Pomar, J., & Pomar, C. (2005). A knowledge-based decision support system to improve sow farm productivity. Expert Systems with Applications, 29(1), 33-40.

5. Botta, A., Donato, W. D., & Persico, V. (2016). Integration of cloud computing and internet of things. Future Generation Computer Systems, 56(C), 684-700.

6. Li, S., Xu, L. D., & Zhao, S. (2015). The internet of things: a survey. Information Systems Frontiers, 17(2), 243-259.

7. Yerunkar, M., Rangnekar, A., & Reshamwala, A. (2012). Implementing methodologies for achieving a communication channel between a mobile phone and a remote computer. (2).

8. Wang, Y. J. (2015). A fuzzy multi-criteria decision-making model based on simple additive weighting method and relative preference relation. Elsevier Science Publishers B. V.

9. Timmer, B., Olthuis, W., & Berg, A. V. D. (2005). Ammonia sensors and their applications—a review. Sensors & Actuators B Chemical, 107(2), 666-677.

10. Olson, K. R. (2015). Hydrogen sulfide as an oxygen sensor. Antioxidants & Redox Signaling, 22(5), 377-97.

11. De Souza, K. G., Woodward, S., Fare, J. W. D., & Schott, S. H. (2004). Check fraud detection process using checks having radio frequency identifier (RFID) tags and a system therefor. US, US20040000987.

12. Yoo, W. J., Dong, H. C., Jang, K. W., Sang, H. S., Seo, J. K., & Chung, S. C., et al. (2009). Infrared fiber-optic sensor for non-contact temperature measurements. International Conference on Sensing Technology (pp.500-503). IEEE.

13. Tong, A., Newman, J. A., Martin, A. H., & Fredeen, H. T. (1981). Live animal ultrasonic measurements of subcutaneous fat thickness as predictors of beef carcass composition. Canadian Veterinary Journal La Revue Veterinaire Canadienne, 61(2), 483-491.

14. Wang, Z. (1989). The influence of environmental temperature and humidity on the body temperature and water content of chorthippus dubius (zub). Acta Entomologica Sinica.

15. Puskala, T. (2002). System and method for transmission of predefined messages among wireless terminals accessing an on-line service, and a wireless terminal. US, US20020165024.

16. Liu, B., Zhang, X., & Ren, X. (2014). Wireless data transmission between iOS client and web server. International Conference on Computer Science & Education (pp.351-354). IEEE.

17. Heit, E. (2015). Brain imaging, forward inference, and theories of reasoning. Frontiers in Human Neuroscience, 8, 1056.
18. Penny, W. D., Zeidman, P., & Burgess, N. (2013). Forward and backward inference in spatial cognition. Plos Computational Biology, 9(12), e1003383.

19. Kato, Y., Narita, M., & Akiguchi, C. (2009). The Network Service Platform for Real-World Data. International Conference on Advanced Information NETWORKING and Applications Workshops (pp.55-60). IEEE Computer Society.

20. Norton, B. (2004). Eclipse as a development platform for semantic web services. Eclipse Technology Exchange.

21. Gosling, & James. (2006). The Java language specification =. China Machine Press.

22. Gosling, J., Joy, B., Steele, G., & Bracha, G. (2005). The java language specification, third edition. Java, 14(2-3), 133–158.

23. Linksvayer, T., & Mikheyev, A. (2015). Data tables from mysql database for gene expression analysis. Development, 130(25), 6221-31.

24. Bell, C., Kindahl, M., & Thalmann, L. (2010). MySQL High Availability: Tools for Building Robust Data Centers. O'Reilly Media, Inc.

25. Chen, X. Y. (2011). Study and realization of uncertain reasoning machine based on expert system. Manufacturing Automation.

26. Liu, H. M., & Chen, X. Y. (2010). The study and realization of an uncertain reasoning machine in the expert system platform. Journal of Nanyang Institute of Technology.

27. Zou, Y., Finin, T., & Chen, H. (2004). F-OWL: An Inference Engine for Semantic Web. International Conference on Formal Approaches To Agent-Based Systems (Vol.3228, pp.238-248). Springer-Verlag.

28. Su, H., Wen, Z., & Wu, Z. (2011). Study on an intelligent inference engine in early-warning system of dam health. Water Resources Management, 25(6), 1545-1563.

29. Zhang, S., Zhang, J., & Zhang, C. (2007). Edua: an efficient algorithm for dynamic database mining. Information Sciences, 177(13), 2756-2767.

30. Tzafestas, S., Palios, L., & Cholin, F. (1994). Diagnostic expert system inference engine based on the certainty factors model. Knowledge-Based Systems, 7(1), 17-26.

31. Tyler, I. (1990). Expert system inference engine. EP, US4912648.