Full text
A Low-power, Reachable, Wearable and Intelligent IoT Device for Animal Activity Monitoring L. Duran-Lopez, D. Gutierrez-Galan, J. P. Dominguez-Morales, A. Rios-Navarro, R. Tapiador-Morales, A. Jimenez-Fernandez, D. Cascado-Caballero and A. Linares-Barranco Robotics and Technology of Computers Lab., University of Seville, Seville 41012, Spain Keywords: Low-power, Wearable, Artificial Intelligence, IoT, Activity Monitoring. Abstract: Along with the proliferation of mobile devices and wireless signal coverage, IoT devices, such as smart wristbands for monitoring its owner’s activity or sleep patterns, get great popularity. Wearable technology in human life has become quite useful due to the information given (sleep hours, heart rate, etc). However, wearables for animals does not give information about behaviour directly: they collect raw data that is sent to a server where, after a post-processing step, the behaviour is known. In this work, we present a smart IoT device that classifies different animal behaviours from the information obtained from on-board sensors using an embedded neural network running in the device. This information is uploaded to a server through a wireless sensor network based on Zigbee communication. The architecture of the device allows an easy assembly in a reduced dimension wearable case. The firmware allows a modular functionality by activating or deactivating modules independently, which improve the power efficiency of the device. The power consumption has been analyzed, allowing the 1Ah battery to work the system during several days. A novel localization and distance estimation technique (for 802.15.4 networks) is presented to recover a lost device in Do˜ nana National Park with unidirectional antennas and log-normalization distance estimation over RSSI. 1 INTRODUCTION (IoT technologies for monitoring product availability in real-time and maintaining a precise stock inventory (Xu et al., 2014), (Lindsay and Reade, 2006)), Health-care (Patients carrying sensors that monitor parameters such as body temperature, blood pressure, breathing activity along with other wearable sensors (accelerometer or gyroscopes) (Rahmani et al., 2015; He and Zeadally, 2015)). The IoT solution presented in this paper is under the topic of environmental and wildlife monitoring. Although in the literature it can be found some applications for farm animals, this work presents a solution for wild and semi-wild animals living in an environment where there is not a Wide Area Network, e.g. LoRaWAN (Low Power Wide Area Network) (Adelantado et al., 2017). An intelligent and wearable collar to monitor the animal activity is presented, along with the communication infrastructure for setting up the Wireless Sensor Network (WSN) for animals monitoring. It consists of an embedded implementation of a neural network for microcontroller that classifies the animal patterns and uploads the information to a remote database that can be accessed from the Internet. SecThe tendency of ”Internet of Things” is to connect everything to the Internet, including people and animals. New wearable devices appeared for health care and activity monitoring. In recent years, the tendency is also to be able to get information from pets and animals which live in farms, as dairy cows (Nadimi et al., 2008a; Nadimi et al., 2008b; Nadimi et al., 2012). There are many application under the concept of IoT in different fields (Miorandi et al., 2012) that are currently hot topics, such as: Smart Buildings (focused on reducing the consumption of resources related to the building (Wei and Li, 2011) and improve the satisfaction of the human populating it), Smart Cities (create a cyberphisycal eco-system of interconnected elements that are able to optimize the usage of physical city infrastructures and the quality of life for its citizens (Zanella et al., 2014)), Environmental Monitoring (real-time and on device processing along with the interconnection of several devices for detecting and monitoring anomalies that can lead to endangering human and animal life (Bellini and Amaud, 2017; Memon et al., 2016)), Smart Business
tion 2 presents the collar as an IoT device, describing its features, its main hardware components and its functionality. Section 3 details the communication infrastructure topology. Section 4 describes the experiments carried out with horses in Do˜ nana National Park. Section 5 presents the results of the experiments. Finally, the conclusions of this work are presented in Section 6. 2 COLLAR AS AN IoT DEVICE The presented collar has been designed taking into account the main IoT devices requirements: lowpower consumption, small size and reconfigurability along with artificial intelligence (AI) integration. It represents a manufacturing oriented design from the previous prototype version (Gutierrez-Galan et al., 2017b). New features have been added to improve the prototype that directly affect how well the system works. The collar features, hardware functionalities and firmware are described below: 2.1 Features Main novelties over the most common ones in other IoT devices for monitoring are: •Ultra-low-power Consumption: if a conservative policy of data transmission is taken (collecting raw data, processing it into the collar, and sending only the results) the battery life of the device will be extended (Dominguez-Morales et al., 2016). •Modular: the user is able to activate/deactivate collar functionalities on-the-fly if they are needed or not. It can be done in real time sending basic commands from Internet to the communication infrastructure. So, the collar is user-customizable. •Configurable: parameters of firmware modules can also be updated in order to support different operating options (e.g. time between data transmissions, sleep mode parameters, etc). •Intelligence: raw data can be processed by the embedded Artificial Neural Network (ANN) that is implemented on the collar (Gutierrez-Galan et al., 2017b; Gutierrez-Galan et al., 2017a), before their transmission. Thus, thanks to configurable novelty, an user could change from one trained NN parameters to another one deployed in the collar on-the-fly. Therefore, valid processed information is transmitted, instead of raw data for a later processing step, what considerably decreases the power consumption. (a) Collar PCB & Antenna (b) Collar device during the experiments. Figure 1: (a) From left to right: 1) Antenova Asper 2.4G/GNSS Antenna, 2) PCB back view, showing the SD card slot. 2.2 Hardware Description The collar dimensions are 25.10 x 78.05mm. It is based on an ARM Cortex M0+ microcontroller unit (MCU), which belongs to an ultralow power consumption family. In particular, the STM32L072RZT6. This family allows to change the MCU running mode between full, low-power and ultra-low-power modes. This MCU has a power consumption of 0.86 µA and 0.29 µA in low-power mode, and in ultra-low-power mode, respectively. To transmit the information, a XBee PRO S2B module is included, since it is able to be configured either as a point-to-point network or as a mesh network to establish a WSN. Although this module is not a low-power module, power consumption can be reduced by sending a sleep request. A full inertial measurement unit (IMU)1with a 3-axis accelerometer, a 3-axis gyroscope, and 3-axis magnetometer is included and connected through I2C bus. This unit obtains the animal activity information (as behavioral patterns or physical activity) from raw data. Furthermore, to complement the movement data, a high performance, ultra-low-power GPS module (Quectel L70-RL) is used. Finally, a Hall-Effect current sensor is also included on the collar to have battery state information. As in every network, communication problems may occur if the device is out of range, missing information about collars. For this purpose, the device carries an SD card for storing data when the collar is either inside or outside of the network. Data can be read from the SD card and transmitted throw the network when the collar returns to the network coverage area. In case of collar loss, ie. the animal has lost the collar in the countryside, it can be recovered while the 1See MinIMU-9 v5 (LSM6DS33 and LIS3MDL)
period of time. The embedded version of the ANN implemented in the device is able to obtain a 90% of hit average using a simple three layers architecture (GutierrezGalan et al., 2017b). 3 IoT SYSTEM: NETWORK TOPOLOGY In some IoT based systems, there exist a central node or master, which coordinates the communications between slave devices and the Internet. And it also has the goal of creating the network that allows to get the collars distributed without data. In this work, we have used a complete infrastructure to deploy a WSN which is able to have a wide network that cover the land extension needed (Dominguez-Morales et al., 2016). Figure 2: Block diagram of network’s communication system. 3.1 Subsystems Description The described collar IoT device information is communicated to the Internet through a communication infrastructure composed of the following items: •Base Station: it serves as the WSN coordinator. It receives packets from collars through the mote network and upload them to a remote web server using WiFi or wired connection. It is also provided with a set on sensors for measuring the environmental conditions. It is composed of a BridgeBoard PCB (Gutierrez-Galan et al., 2017b); an Intel NUC as main host; a 60A battery; two antennas (wifi and zigbee) and a solar panel (1476 mm ×659 mm ×35 mm). All components, but the solar panel, are enclosed in a hermetic box. •802.15.4 Sniffer and Mobile Device: it allows to track animals using the GPS information from battery has power. The collar could detect that there is no animal attached and enter in a low power mode that allows radio coverage detection. Using the unidirectional designed XBee antenna attached to a laptop, the distance from the laptop to the lost collar can be estimated, together with the direction, in order to localize the device. The battery selected to power the collar is a LiPo of 1 Ah. It is connected to DC-DC regulator, which allows us to charge and also turn on/off the device. A magnetic on/off switch allow all the components (PCBs, SDcard, antenna, battery, ...) to be isolated into a special epoxy resin to make the collar robust enough to be used in semi-wild animals. 2.3 Firmware The intelligence of this device resides in the NN implemented in the microcontroller and its capability to be reconfigured. The low power consumption is achieved by using a timer, which throws a periodic interruption every 1,5 seconds (user-configurable). When an interruption occurs, a state machine is executed. This state machine has several states, and some of these states can be disabled if they are not needed to save power. There are mandatory states, such as INIT, for device initialization; or WAIT, where the system is waiting for GPS valid signal and to be joined to a WSN. But there are also optional states which establish how the device works: BEHAVIOR(1), CAPTURE(2), SEND(3), SLEEP(4), EMERGENCY(5) and RECOVERY(6) modes. In (1), data is collected from the IMU, processed by an NN every 1.5 seconds (user-configurable) and stored in the SD memory. Mode (2) is used when new raw data is required in order to train the NN, thus in this mode the NN is disabled. User only could select one of these two running modes. When the collar has behavioral information, mode (3) could be enabled to transmit the behavior pattern along with the time, or disabled to save battery in any special situation. After monitoring, the device goes to mode (4) to enter the MCU in ultra-low-power consumption state. Mode (5) is automatically activated when collar remains a specific number of days out of range, in order to try to be found by the mobile node using the distance estimator algorithm. In that mode, the collar transmits simple packets periodically during a specific time interval. Finally, (6) is used only when the collar must be recovered for extracting the information stored in the SD card, eg. the animal has lost the collar. This mode can be activated remotely or automatically if the collar is not detecting any activity for a configurable
collars or using the RSSI information obtained from a directional antenna. For this purpose, a 802.15.4 sniffer has been developed, which captures the data packets sent by all nodes of the network and is capable of analyze and obtain information about signal strength and location. The sniffer is a NesC implementation of a platformindependent IEEE 802.15.4 MAC protocol (University of California, 2009) called TKN15.4 running on a TelosB CM5000-SMA mote. It is connected to a portable device through an USB port, where a desktop application collects and processes the information. It serves as a deployment assistant, when is used to sense the information received from other stations and assessing the effective range of coverage of each fixed node and collar. •Mote Network: it is a set of XBee devices configured as routers, which are connected in a meshfashion and placed in specific spots of the park to increase the coverage area. It includes a Li-Po battery and a small solar cell. Its goal is to route the packets received from the collars to the base station. 4 CASE OF USE: DO ˜ NANA NATIONAL PARK The IoT system has been tested in Do˜ nana National Park. The area where the tests were performed is shown in Fig. 3, a wooded zone with a high density of vegetation. Base station and motes are signalized. Firstly, the base station was established in a WiFiaccessible area in order to be connected to the remote web server. Next, the mote network was deployed around the base station at specific spots to obtain the maximum coverage (Fig. 3), using the mobile device with a non-directional antenna (with a gain equals to the collar’s antenna). In this way, we can determine the range by observing the maximum distance at which packets (coming from one mote) are received from the sniffer (which is equivalent to the collar) with the signal strength above the sensitivity threshold of the collar. The maximum distance between two consecutive nodes was 127m, while the other two did not exceed more than 90m between them because of being in a high-density vegetation area. The collars were placed to horses from different breeds in order to test the robustness of the classifier. At the same time, the SD card on each collar was logging the sensors data. This data will be used to increase the size of the training dataset of the neural Figure 3: Satellite view of working area at Do˜ nana. Blue area (BS) represents the base-station range. Green zones represent motes range (M1-M3). network. Finally, we tested the capability of the mobile node to find an out of range collar. The mobile node uses a directional antenna, an emergency network coordinator (that works in a different frequency than the rest of the motes), and a software that is capable of painting the position of the collar in a map, depending on the GPS data, or the signal strength received from the collar, using a log-normal distance estimator (Ahmed et al., 2011). Besides, the software emits a beep whose pitch depends on the received signal strength. In order to realize this test, the network of motes and the GPS device of the collar were disabled. The collar was placed at maximum distance of 90m, in a unknown place to the user of the mobile node. Figure 4: Mobile app screenshot while searching a lost collar. The possible collar location is the red cross. At left side, the distance estimation, the relative orientation respect the mobile node and the estimated collar localization.
5 RESULTS AND DISCUSSION In the deployment of the network we observed connection issues between the motes M2 and M3 of Fig. 3 due to the closeness of trees and the high variability of the signal strength. The RSSI received at the distance between motes was 10dBi over the sensibility threshold of the motes, but considering the connection losses, this margin must be larger. Regarding the location testing, several tests were done in the area, being easy to find the collar with the mobile node in no more than 4 minutes. The acoustic clues and the distance estimation were enough to drive the mobile node towards the collar. The directionality of the antenna was good enough, as can be seen in Fig. 5. However, the distance estimation is very dependent on the signal conditions, which depends on the scenario (trees, grass, humidity, buildings) and for this reason, no precise information about location could be obtained. be adapted to the requirements of the scenario by activating/deactivating different software functionalities of the device. The whole network has been deployed and tested in Do˜ nana National Park, where the collar was placed on horses to monitor their activity and classify between different gait patterns. Other WSN implementations like LoRa requires each of the devices to be connected to the Internet (Adelantado et al., 2017), which would be difficult in Do˜ nana National Park and other environments with reduced WAN connection. Our system is also scalable and the coverage area could be expanded by adding more motes to the network. Each of the devices that are part of the WSN has been tested individually and in the setup where the experiments were done, showing the expected behavior. The information about the gaits that the collar detected from the horse movement patterns were correctly sent to the base station and uploaded to the database, showing an accuracy of 90%. ACKNOWLEDGEMENTS This work is supported by the excellence project from Andalusia Council MINERVA (P12-TIC-1300) and also by the Spanish government grant (with support from the European Regional Development Fund) COFNET (TEC2016-77785-P). The authors would like to thank R. Soriguer, F. Carro and the EBD-CSIC for their support in Do˜ nana National Park. L. Duran is supported by the Empleo Juvenil with support from EU. The work of J.P. Dominguez-Morales was supported by a Formaci´ on de Personal Universitario Scholarship from the Spanish Ministry of Education, Culture and Sport. REFERENCES Adelantado, F., Vilajosana, X., Tuset-Peiro, P., Martinez, B., Melia-Segui, J., and Watteyne, T. (2017). Understanding the limits of lorawan. IEEE Communications Magazine, 55(9):34–40. Ahmed, I., Orfali, S., Khattab, T., and Mohamed, A. (2011). Characterization of the indoor-outdoor radio propagation channel at 2.4 ghz. In 2011 IEEE GCC Conference and Exhibition (GCC), pages 605–608. Bellini, B. and Amaud, A. (2017). A 5µa wireless platform for cattle heat detection. In Circuits & Systems (LASCAS), 2017 IEEE 8th Latin American Symposium on, pages 1–4. IEEE. Dominguez-Morales, J. P., Rios-Navarro, A., DominguezMorales, M., Tapiador-Morales, R., Gutierrez-Galan, Figure 5: RSSI values received from a directional antenna, depending on the angle of orientation. 6 CONCLUSION In this paper, we have presented an intelligent, lowpower and reconfigurable device powered by a lowpower MCU that is capable of acquiring behavioral information from its owner by classifying the data obtained from several sensors using an embedded NN implementation. It sends this output to a coordinator (base station) which uploads this to a database that can be accessed through a web portal. The communication is done using XBee through a WSN where solar-powered motes route the information from collars to the base station, increasing the coverage area of the network. The collar is reconfigurable and can
D., Cascado-Caballero, D., Jimenez-Fernandez, A., and Linares-Barranco, A. (2016). Wireless sensor network for wildlife tracking and behavior classification of animals in do˜ nana. IEEE Communications Letters, 20(12):2534–2537. Gutierrez-Galan, D., Dominguez-Morales, J., MiroAmarante, L., Gomez-Rodriguez, F., DominguezMorales, M., Rivas-Perez, M., Jimenez-Fernandez, A., and Linares-Barranco, A. (2017a). Semi-wildlife gait patterns classification using statistical methods and artificial neural networks. In Neural Networks (IJCNN), 2017 International Joint Conference on, pages 4036–4043. IEEE. Gutierrez-Galan, D., Dominguez-Morales, J. P., CerezuelaEscudero, E., Rios-Navarro, A., Tapiador-Morales, R., Rivas-Perez, M., Dominguez-Morales, M., Jimenez-Fernandez, A., and Linares-Barranco, A. (2017b). Embedded neural network for real-time animal behavior classification. Neurocomputing. He, D. and Zeadally, S. (2015). An analysis of rfid authentication schemes for internet of things in healthcare environment using elliptic curve cryptography. IEEE Internet of Things Journal, 2(1):72–83. Lindsay, J. and Reade, W. (2006). Rfid system and method for tracking food freshness. US Patent 6,982,640. Memon, M. H., Kumar, W., Memon, A., Chowdhry, B. S., Aamir, M., and Kumar, P. (2016). Internet of things (iot) enabled smart animal farm. In Computing for Sustainable Global Development (INDIACom), 2016 3rd International Conference on, pages 2067–2072. IEEE. Miorandi, D., Sicari, S., Pellegrini, F. D., and Chlamtac, I. (2012). Internet of things: Vision, applications and research challenges. Ad Hoc Networks, 10(7):1497 – 1516. Nadimi, E. S., Jørgensen, R. N., Blanes-Vidal, V., and Christensen, S. (2012). Monitoring and classifying animal behavior using zigbee-based mobile ad hoc wireless sensor networks and artificial neural networks. Computers and Electronics in Agriculture, 82:44–54. Nadimi, E. S., Søgaard, H., Bak, T., and Oudshoorn, F. W. (2008a). Zigbee-based wireless sensor networks for monitoring animal presence and pasture time in a strip of new grass. Computers and electronics in agriculture, 61(2):79–87. Nadimi, E. S., Søgaard, H. T., and Bak, T. (2008b). Zigbeebased wireless sensor networks for classifying the behaviour of a herd of animals using classification trees. Biosystems engineering, 100(2):167–176. Rahmani, A. M., Thanigaivelan, N. K., Gia, T. N., Granados, J., Negash, B., Liljeberg, P., and Tenhunen, H. (2015). Smart e-health gateway: Bringing intelligence to internet-of-things based ubiquitous healthcare systems. In 2015 12th Annual IEEE Consumer Communications and Networking Conference (CCNC), pages 826–834. University of California, B. (2009). A packet sniffer that forwards 802.15.4 frames from wireless channel over serial to a pc. Wei, C. and Li, Y. (2011). Design of energy consumption monitoring and energy-saving management system of intelligent building based on the internet of things. In 2011 International Conference on Electronics, Communications and Control (ICECC), pages 3650–3652. Xu, L. D., He, W., and Li, S. (2014). Internet of things in industries: A survey. IEEE Transactions on Industrial Informatics, 10(4):2233–2243. Zanella, A., Bui, N., Castellani, A., Vangelista, L., and Zorzi, M. (2014). Internet of things for smart cities. IEEE Internet of Things Journal, 1(1):22–32.