sensors Article

Implementation and Analysis of a Wireless Sensor Network-Based Pet Location Monitoring System for Domestic Scenarios Erik Aguirre 1 , Peio Lopez-Iturri 1 , Leyre Azpilicueta 2 , José Javier Astrain 3 , Jesús Villadangos 3 , Daniel Santesteban 1 and Francisco Falcone 1, * 1 2 3

*

Electrical and Electronic Engineering Department, Public University of Navarre, 31006 Pamplona, Spain; [email protected] (E.A.); [email protected] (P.L.-I.); [email protected] (D.S.) School of Engineering and Sciences, Tecnologico de Monterrey, 64849 Monterrey, Mexico; [email protected] Mathematical Engineering and Computer Science Department, Institute of Smart Cities, Public University of Navarre, 31006 Pamplona, Spain; [email protected] (J.J.A.); [email protected] (J.V.) Correspondence: [email protected]; Tel.: +34-948-169-741

Academic Editor: Stefano Mariani Received: 31 March 2016; Accepted: 15 August 2016; Published: 30 August 2016

Abstract: The flexibility of new age wireless networks and the variety of sensors to measure a high number of variables, lead to new scenarios where anything can be monitored by small electronic devices, thereby implementing Wireless Sensor Networks (WSN). Thanks to ZigBee, RFID or WiFi networks the precise location of humans or animals as well as some biological parameters can be known in real-time. However, since wireless sensors must be attached to biological tissues and they are highly dispersive, propagation of electromagnetic waves must be studied to deploy an efficient and well-working network. The main goal of this work is to study the influence of wireless channel limitations in the operation of a specific pet monitoring system, validated at physical channel as well as at functional level. In this sense, radio wave propagation produced by ZigBee devices operating at the ISM 2.4 GHz band is studied through an in-house developed 3D Ray Launching simulation tool, in order to analyze coverage/capacity relations for the optimal system selection as well as deployment strategy in terms of number of transceivers and location. Furthermore, a simplified dog model is developed for simulation code, considering not only its morphology but also its dielectric properties. Relevant wireless channel information such as power distribution, power delay profile and delay spread graphs are obtained providing an extensive wireless channel analysis. A functional dog monitoring system is presented, operating over the implemented ZigBee network and providing real time information to Android based devices. The proposed system can be scaled in order to consider different types of domestic pets as well as new user based functionalities. Keywords: dog monitoring; WSN; IoT; 3D ray launching; ZigBee

1. Introduction Nowadays, monitoring of objects as well as of living beings can be easily carried out thanks to a wide variety of transceivers working together with increasingly compact devices and the use of different wireless communication standards. These systems fall within the scope of the Internet of Things (IoT), where devices are connected to the internet and the information is sent without the interaction of human beings. Thus, a high variety of variables can be monitored in real time and in the case of living beings, their physiological parameters or location can be accurately measured.

Sensors 2016, 16, 1384; doi:10.3390/s16091384

www.mdpi.com/journal/sensors

Sensors 2016, 16, 1384

2 of 20

In this sense, a high variety of person-oriented systems are being developed within the framework of e-health systems and therefore, most of these technologies are being extrapolated to farming and pet wellness applications. Monitoring of physiological parameters as ECG [1], pulse [2] or blood pressure [3], for patients, elderly people or athletes as well as their location [4], are the most common data obtained in this kind of systems. In relation to animal tracking and wellness, numerous identification systems have been developed over the years, specially for wildlife tracking and analysis, attaching radio transmitters to animals to monitor their location, behavior or migratory habits [5,6]. For farm animals or pets some identification systems have also been developed and deployed, although these systems are not based on wireless networks and therefore owners must extract the information indirectly. Nevertheless, novel farm animal monitoring systems based on WSN have been studied in recent years, in [7] a WSN is proposed for animal monitoring, in [8] the location of cows is monitored thanks to GPS location system and GSM telephony and in [9] a ZigBee-Based health monitoring system is presented, which takes data through rumination, heart rate, temperature and humidity sensors. Going one step further, in [10] a Livestock Monitoring System (LMS) is presented, where thanks to an integrated system for animal monitoring of their environment, production, growth and health, the production efficiency in farming is improved. When WSN are developed for pet-oriented applications, the main purpose of these systems is animal wellness and security. Thus, veterinary systems where photophethysmogram (PPG) and electrocardiogram (ECG) information are recorded wirelessly are presented in [11,12], a remote feeding system is developed in [13] and a system capable to recognize dog behavior thanks to an accelerometer attached to the canine is shown in [14]. Dogs also play a useful role in rescue operations and therefore some devices are attached to a canine in [15] to obtain not only useful information about dog health (ECG, PPG), but also environmental information about location or the presence of gas. Table 1 presents a comparison of different wireless animal monitoring systems. It is worth noting that no specific application or system has been identified for pet location and monitoring applications within domestic indoor scenarios. The proposed system therefore provides a pet location and monitoring system, which provides an interactive context in order to retrieve parameters such as pet location, biomedical signal retrieval or behavior patterns, among others. Table 1. Animal monitoring system comparison. System

Architecture

Communication System

Functionalities

Detected Variables

Reference

Cow activity monitoring system

Operator based

GSM, Bluetooth

Monitoring walking and milking activity

GPS, camera images

[8]

Animal Monitoring System (AHM)

Off-line

ZigBee

Monitoring physiological and environmental parameters

Humidity, Temperature, Heart Rate, Acceleration

[9]

Livestock Monitoring System (LMS)

Off-Line

Unknown

Monitoring all farm beasts transactions and products

GPS, Product tracking

[10]

Canine health monitoring system

Off-Line

Unknown cBAN (canine Body Area Network) system

Monitoring vital signs of dogs

ECG, PPG, GPS

[11]

Veterinary electrocardiographic monitoring system

Off-Line

Bluetooth

Monitoring vital signs in veterinary medicine

ECG

[12]

Solid dosing system for feeding dogs

Operator based

GSM

Feeding dogs with remote communication module

Food quantity

[13]

Pet Buddy

Off-Line

Bluetooth

Canine behavior recognition

Inertia

[14]

Cyber-Enhanced Working Dog (CEWD)

Off-Line

Wi-Fi

Integrated system for search and rescue

ECG, PPG, Gas, GPS, Inertia

[15]

Sensors 2016, 16, 1384

3 of 20

Notwithstanding, these kind of systems must be deployed after an extensive radio-planning study to implement a robust and efficient Wireless Sensor Network (WSN), especially when the number of animals is high, they are in wide areas or they are inside complex places from the electromagnetic point of view. In this work an indoor canine location and monitoring system for home environments is presented. An in-house 3D Ray Launching method is used to study indoor wireless channel performance inside a home when the Zigbee WSN is deployed and a receiver is attached to a dog. The main goal is the analysis of the influence of wireless propagation limitations in the implementation of a specific pet monitoring system, which has been implemented and tested. For this purpose, a simplified dog model has been developed which is compatible with the simulation tool accounting for its morphology and dielectric properties, considering that the wireless transceiver is inevitably attached to biological tissues and they are highly absorptive and dispersive. Radio planning analysis is performed, based on deterministic 3D Ray Launching code in order to analyze coverage/capacity relations, aiding in system election as well as on the number of required transceivers and their potential location within the scenario under analysis. Validation measurements have been carried out by attaching a Xbee device to a real dog to calibrate the simulation tool and compare obtained data with theoretical results. An android-based location application operating within the scenario is presented and tested in order to provide an interactive indoor pet location and monitoring system. 2. Simulation Scenario and Simplified Dog Model As previously mentioned, an in-house developed 3D Ray Launching (3D RL) code has been employed in order to perform radioplanning analysis and coverage/capacity estimations in order to provide system wireless connectivity, previously tested in a wide range of application [16]. Moreover, the biological tissues can be considered, by means of a specific simplified human body model implemented for use within the 3D RL code [17,18]. The 3D RL technique has been selected provided an adequate trade-off between accuracy and computational cost. Simulation techniques can be divided in two main groups, empirical and deterministic methods. Empirical methods [19,20] are site-specifi, measurement based and therefore, their results are strongly related to the framework scenario and original conditions. Thereofre, such techniques are time efficient but inaccurate when compared to deterministic techniques as FDTD, MOM, Ray Launching or Ray Tracing [21,22]. On the other hand, deterministic techniques are based on numerical approaches to the resolution of Maxwell’s equations and therefore, their computational complexity is high. However, Geometrical Optics based techniques (Ray tracing) show a good balance between both: computation time and accuracy. The algorithm has been implemented in Matlab and is based on Geometrical Optics (GO) and Geometrical Theory of Diffraction (GTD). In order to enhance GO theory, the uniform extension of the GTD (UTD) is used with the diffracted rays, which are introduced to remove field discontinuities and to give proper field corrections, especially in the zero-field regions predicted by GO. The input parameters in the algorithm are the angular and spatial resolution, which determine the accuracy of the model. A bundle of rays are considered in a finite sample of the possible directions of the propagation from the transmitter, and a ray is launched for each direction. When a ray impacts on an object, a reflecting ray is generated, and when a ray impacts an edge, a new family of diffracted rays is generated. Rays are launched at an elevation angle θ and with an azimuth angle Φ, as defined in the usual Cartesian coordinate system. It is worth noting that a grid is defined in the simulation space, and all the parameters of the propagating rays are stored in each cuboid in the space. After that, with this stored parameters, simulation results such as received power or power delay profiles for each spatial point in the three dimensional scenario can be obtained. Antenna patterns are taken into account in the algorithm to include the effects of antenna beamwidth in both azimuth and elevation. The material properties for all the elements within the

Sensors 2016, 16, 1384

4 of 20

simulation results such as received power or power delay profiles for each spatial point in the three dimensional scenario can be obtained. patterns are taken into account in the algorithm to include the effects of antenna SensorsAntenna 2016, 16, 1384 4 of 20 beamwidth in both azimuth and elevation. The material properties for all the elements within the scenario are also taken into account, given the dielectric constant and permittivity at the frequency scenario are also taken into account, given the dielectric constant and permittivity at the frequency range of operation of the system under analysis. rangeInofthis operation of the system under analysis. case a one story home (Figure 1) has been simulated, including furniture (chairs, tables, In this case a one home (Figure 1) has been including furniture (chairs,but tables, mirrors, beds, etc.) andstory taking under consideration notsimulated, only the morphology of the scenario also 2 mirrors, beds, etc.) and taking under consideration not only the morphology of the scenario but also the dielectric properties of all the objects inside it. The scenario surface is 65 m , divided in eight 2 , divided in eight the dielectric propertieshave of all theplaced objectswithin insidethe it. scenario: The scenario surface is 65 of mliving rooms. Three antennas been one in the ceiling room, one in rooms. Three antennas haveinbeen placed within the in the ceiling of is living room, one in the main bedroom and one the guest bedroom. In scenario: addition, one another transceiver placed simplified the main bedroom and one in the guest bedroom. In addition, another transceiver is placed simplified dog model. This configuration is chosen since the indoor canine tracking system requires at least dog This configuration chosen since the process. indoor canine tracking system requires at least threemodel. transmitters to carry outisthe triangulation Moreover, typical wireless motes can three transmitters carryby out the triangulation process. Moreover, typical motes can provide provide coverage to levels, means of experimental validation, in the orderwireless to 20–40 m2, as a function 2 , as a function of object coverage by means experimental in the to 20–40 m of object levels, density. In thisofway, coveragevalidation, conditions canorder be fulfilled, whilst enabling location density. In this way, coverage conditions can be fulfilled, whilst enabling location capabilities. capabilities.

Figure 1. 3D view of the simulated measured scenario. Figure 1. 3D view of the simulated measured scenario.

Table 1 shows the employed simulation parameter, following conventional Xbee mote Table 1 shows employed parameter, following conventional validations. Xbee mote specifications (802.15,the ZigBee device),simulation the ones which will be used in measurement specifications (802.15, ZigBee device), the ones which will be used in measurement validations. ZigBee has been chosen as the base of the presented system considering its low energy consumption ZigBee has been chosen as the base of the presented system considering its low energy consumption characteristics. The device attached to the dog must be as small as possible to provide high comfort characteristics. The device attached dog must be as small possible to provide comfort levels and therefore the system musttobethe energetically efficient toas allow the use of small high batteries. On levels and therefore the system must be energetically efficient to allow the use of small batteries. the the other hand, the ZigBee data rate is lower than, for example, 802.11 system based devices, On which other the ZigBee rate is lower than, for example, 802.11 system based devices, which is not is nothand, relevant in thedata proposed system, since the required transmitted information volume is relevant in the proposed system, since the required transmitted information volume is potentially low. potentially low. It is also worth noting that the final system design, after prototyping stage, can be It is also worth noting that the chip final or system design, after prototyping more ergonomic, by including conformal antennas if required.stage, can be more ergonomic, by including chip or conformal antennas if required. The implemented dog model is depicted in Figure 2. This model is compatible with the 3D RL The implemented dog model is depicted Figure 2. This model is compatible 3D simulation technique and includes the dielectricincharacteristics and proportions of a realwith dog,the which RL simulation technique and includes the dielectric characteristics and proportions of a real dog, have been extrapolated from measurement results related with cattle as well as characterization of which beenwith extrapolated measurement related as well as humanhave bodies, dielectricfrom constant values of results the outer skin with layercattle (in principle thecharacterization most relevant) of human bodies, with dielectric constant values of the outer skin layer (in principle the most relevant) in order of εr ≈ 4 for the frequency of operation of the employed wireless communication system. in order of εrthese ≈ 4 for the frequency ofconsidering the employed communication system. Maintaining proportions is notofa operation trivial task, thatwireless every breed of dog has its own Maintaining these proportions is not a trivial task, considering that every breed of dog has its characteristics. However, most dogs can be classified in five different groups and therefore, the own characteristics. However, most dogs can be classified in five different groups and therefore, developed simplified canine model has been programmed to allow the generation of dogs of different the developed simplified canine model has been programmed to Bernards. allow the generation of dogs of proportions, from mini-dogs like Chihuahuas to giant-dogs like St. different proportions, from mini-dogs like Chihuahuas to giant-dogs Bernards. Once the kind of dog has been chosen in the simulation code,like itsSt. height is defined and the Once the kind of dog has been chosen in the simulation code, its height is defined and dimensions of all elements of the dog are automatically calculated. In Figure 2 proportions andthe its dimensions allheight elements of the are automatically calculated. In Figure relation withofthe of the dogdog are depicted for a medium size canine breed.2 proportions and its relation with the height of the dog are depicted for a medium size canine breed.

Sensors 2016, 16, 1384 Sensors 2016, 16, 1384 Sensors 2016, 16, 1384

5 of 20 5 of 20 5 of 20

Figure Proportionsofofsimplified simplifieddog dog model model according according with size dog. Figure 2. 2. Proportions withchosen chosenheight heightfor formedium medium size dog. Figure 2. Proportions of simplified dog model according with chosen height for medium size dog.

The implemented simplified dog model is programmed to allow the consideration of not only The implemented simplified dog model is programmed to allow the consideration of not only The dog model the consideration of potential not only different implemented sizes but alsosimplified different positions to is beprogrammed as adaptableto asallow possible, considering the different sizes but also different positions to be as adaptable as possible, considering the potential different but also different to be in as Figure adaptable as dog possible, impact insizes propagation losses. Aspositions an example, 3 the modelconsidering is depictedthe in potential different impact ininpropagation losses. example, in Figure Figure33the the dog model is depicted in different impact propagation losses. As As an an example, in positions which can be considered within the simulation code. dog model is depicted in different positions which can be considered within the simulation code. positions which can be considered within the simulation code.

Figure 3. Example of the simplified dog model in different position and with different sizes. Figure Exampleof ofthe thesimplified simplified dog dog model different sizes. Figure 3.3.Example model in indifferent differentposition positionand andwith with different sizes.

Since the communication system employed is a ZigBee Wireless Personal Area Network Sincetransceiver the communication employed is a real ZigBee Wireless Personalcorresponding Area Network (WPAN), simulation system parameters match with device characteristics, to Since the communication system employed is awith ZigBee Personal Areacorresponding Network (WPAN), (WPAN), transceiver simulation parameters match realWireless device to Xbee devices which have been used for validation measurements. Incharacteristics, Table 2 these parameters as well transceiver simulation parameters match with real device characteristics, corresponding Xbee Xbee devices which been for validation measurements. In Table 2 these parameters astois well as resolution valueshave used in used simulation runs are shown. In any case, transceiver selection in devices which have been used for validation measurements. In Table 2 these parameters as well as resolution values used in simulation runs are shown. In any case, transceiver selection is in principle flexible, allowing if required other solutions based on 802.15 systems or even combined as principle resolution values used in simulation runs are shown. In any case, transceiver selection is flexible, allowing if required other solutions based on 802.15 systems or even combined with 802.11 systems. The election of ZigBee in this case is based initially on the flexibility to in principle flexible, allowing if election required other solutions based on 802.15 or combined with with 802.11 systems. The of ZigBee in this case isbe based initially oneven thegateway flexibility to implement low-cost and largely scalable networks, which can easilysystems connected via to an 802.11 systems. The election of ZigBee innetworks, this casecan is based initially on thecommunication flexibility to implement implement low-cost and largely scalable which be easily connected via gateway to an external application server. The solution however be can adapted to other systems external application server. The solution however can be adapted to other communication systems low-cost scalable networks, which canfor beexample easily connected via gateway to an external or evenand intolargely a multi-system solution (combining ZigBee with WLAN connectivity to or even into a multi-system solution (combining for example ZigBee with WLAN connectivity to application server. Thebetween solutionmobile however can be adapted other the communication systems or even provide interaction devices and motes to within wireless sensor networks), provide interaction between(combining mobile devices and motes within wireless sensor networks), into a multi-system solution for example ZigBee withthe WLAN connectivity to provide depending on the functionalities to be developed in the future. depending on the functionalities be developed in the interaction between mobile devicestoand motes within thefuture. wireless sensor networks), depending on the functionalities to be developed in the future.

Sensors 2016, 16, 1384

Sensors 2016, 16, 1384

6 of 20

Table 2. Simulation parameters used in the 3D Ray Launching code.

6 of 20

Parameter used in the 3D Ray Launching Value Table 2. Simulation parameters code. Frequency 2.41 GHz Parameter Value Transmitted Power Level 0 dBm Frequency 2.41 GHz Antenna gain 5 dBi ◦ Transmitted Power Level ∆θ 0 1dBm Vertical plane angle resolution ◦ gainresolution ∆φ 51dBi Horizontal Antenna plane angle Vertical plane angle resolution θ 1° Reflections 5 Horizontal plane angle resolution φ 1° Reflections 5

In Figure 4 power distribution results for the home floor when the living room is empty and when aIndog is within thedistribution living room are presented. In floor this case has been placed Figure 4 power results for the home whenthe theantenna living room is empty and in a lower thethe glass table which placed inInthe of the livinghas room. both in cases, when height, a dog isover within living room are is presented. thiscenter case the antenna been In placed a lower over the glass table is placed in the thetable livingthe room. In both when when theheight, transceiver is attached towhich the dog and when it center is overofthe height is 0.3cases, m, although the transceiver attached the dog for andthe when it is over the table the height is the 0.3 m, although is simulation resultsishave beentoobtained complete scenario volume. Since transmitter simulation have of been the complete volume. power Since the transmitter is in placed in this results room, most theobtained energy isforconfined in thisscenario area. However, levels obtained placed in this room, most of the energy is confined in this area. However, power levels obtained in the rest of the scenario are compatible with usual Xbee receiver sensitivity thresholds in the range of the dBm. rest ofThe the difference scenario arebetween compatible usual Xbee receiver sensitivity in the range of −100 bothwith situations is also noticeable, sincethresholds more power is distributed −100the dBm. Theisdifference between both situations also noticeable, sincethe more power isbetween distributed when room empty and it is not absorbed by is the dog. In any case, difference both when the room is empty and it is not absorbed by the dog. In any case, the difference between both images is more visible given that the transmitter is inside the same room as the dog and the presented images is more visible given that the transmitter is inside the same room as the dog and the presented power planes are at the dog height. As it can be seen from the estimation of received power levels power planes are at the dog height. As it can be seen from the estimation of received power levels within the scenario, an optimal configuration would require 2 transceivers within the scenario to within the scenario, an optimal configuration would require 2 transceivers within the scenario to satisfy coverage conditions for the domestic pet-static infrastructure links, implying an approximate satisfy coverage conditions for the domestic pet-static infrastructure links, implying an approximate node density of (1 node/30–40 m22). These values are dependent on the specific configuration of the node density of (1 node/30–40 m ). These values are dependent on the specific configuration of the scenario, although the node density, for the case of large complexity (i.e., relevant number of walls scenario, although the node density, for the case of large complexity (i.e., relevant number of walls and furniture elements), toperform performinitial initialnetwork network deployment. and furniture elements),provides providesaaradioplanning radioplanning estimate estimate to deployment. This node density is is one process,providing providing initial This node density oneofofthe therelevant relevantoutcomes outcomes of of the the radioplanning radioplanning process, anan initial network deployment estimation, which requires fine tuning as a function of site-specific details. network deployment estimation, which requires fine tuning as a function of site-specific details.

Figure 4. Power distribution in the scenario when transmitter is placed in the living room for an empty Figure 4. Power distribution in the scenario when transmitter is placed in the living room for an empty living room (a) and when the dog is inside the lounge (b). living room (a) and when the dog is inside the lounge (b).

In order to consider a more general case, the scenario has also been simulated introducing four In order to models consider a more case, the scenario has are alsoplaced been simulated introducing human body inside the general home (Figure 5). Two of them in the living room next four to the dog model andinside otherthe twohome are distributed different of the Figure thethe human body models (Figure 5). in Two of themstances are placed in scenario. the livingIn room next6 to between simulation results when only thestances dog is of inside the homeIn and when6 humans are dogdifference model and other two are distributed in different the scenario. Figure the difference introduced is depicted. The largest difference is inside shown the in the furthest room humans of the home, reaching between simulation results when only the dog is home and when are introduced 30 dB values. This behavior is the consequence of introducing human bodies between transmitter is depicted. The largest difference is shown in the furthest room of the home, reaching 30 dB values. area and this room, due to the that human bodies have absorbed and reflected the this energy This behavior is the consequence of fact introducing human bodies between transmitter area and room, partially. due to the fact that human bodies have absorbed and reflected the energy partially.

Sensors 2016, 16, 1384 Sensors 2016, 16, 1384 Sensors 2016, 16, 1384

7 of 20 7 of 20 7 of 20

Figure 5. 5. Simulated Simulated scenario scenario when when four four human human bodies bodies models models are are introduced in different locations. Figure Figure 5. Simulated scenario when four human bodies models are introduced in different locations.

Figure 6. Comparison of receiver power when human body models are introduced in the home. Figure Figure 6. 6. Comparison Comparison of of receiver receiver power power when when human human body body models models are are introduced introduced in in the the home. home.

In any case the influence of human bodies is low considering that the transmitter is not attached In any case the influence of human bodies is low considering that the transmitter is not attached In humanwhich bodiesusually is low considering that the transmitter not attached to themany andcase thatthe theinfluence number of people can be found inside this kind ofisscenario is not to them and that the number of people which usually can be found inside this kind of scenario is not to them and that the number of people which usually can be found inside this kind of scenario is not large enough. Therefore, if a human monitoring system or an area of high human presence density large enough. Therefore, if a human monitoring system or an area of high human presence density large Therefore, if a of human monitoring systembodies or an area of high human presence density were enough. considered, the study the presence of human would be essential to determine the were considered, the study of the presence of human bodies would be essential to determine the were considered, the study of the presence of human bodies would be essential to determine the adequate performance of the communication system. adequate performance of the communication system. adequate performance of the network communication system. When a wireless sensor is deployed the accuracy of data transmission must be assured When a wireless sensor network is deployed the accuracy of data transmission must be assured When the a wireless sensor user network is deployed the accuracy of data must beFor assured to to achieve best possible experience, provided by bit erro ratetransmission (BER) estimations. the case to achieve the best possible user experience, provided by bit erro rate (BER) estimations. For the case achieve the best possible user experience, provided by bit erro rate (BER) estimations. For the case of of Quaternary Phase Shift Keying (QPSK) modulation (a typical modulation scheme employed in of Quaternary Phase Shift Keying (QPSK) modulation (a typical modulation scheme employed in Quaternary Phase Keying (QPSK) modulation typical modulation scheme in ZigBee ZigBee as well as Shift in 802.15 and 8021.11 systems), (a the approximate value of bitemployed error probability is ZigBee as well as in 802.15 and 8021.11 systems), the approximate value of bit error probability is as well as in 802.15 and 8021.11 systems), the approximate value of bit error probability is given by: given by: given by: s 2Eb 2E (1) = (Q(√2Ebb)) Pb PP=b = Q (1) (1) Q(√NN0 0 ) b N0

Sensors 2016, 16, 1384

8 of 20

where Pb is the bit error probability, N0 is the overall interference power spectral density (given by internal interference, external interference and thermal noise) in the scenario and Eb is the energy per bit, given by: P Eb = Rx (2) Rb where PRx is the received power and Rb is the transmission bit rate. Hence, BER strongly depends on the transmission speed, noise level in the scenario and received power. In Figure 7 BER results are depicted for different conditions when the transmitter is placed in the living room. Not only noise levels have been modified, but also bit rates and the presence of the dog have been taken under consideration. As expected, in any condition when noise level or transmission rate is reduced, low BER area is larger and therefore, longer range communication links can be established. Since one of the variables which determines BER is the received transmission power, energy lost by obstacles and multipath behavior of electromagnetic wave imply chenges in BER values all over the scenario. The presence of the dog decreases the overall power in the living room and low BER area is reduced when it is considered. The results depicted consider very high interference levels, which are not the usual case within a domestic environment. The usual practical case exhibits noise power spectral densities in the order of −120 dBm/Hz to −100 dBm/Hz. In this case, the main condition of operation is provided by coverage thresholds, which are a function of the requested bit rate and the sensititivy threshold. Taking into account the results for coverage level depicted in Figure 4, each one of the employed ZigBee transceivers provides coverage levels in an approximate area of 40 m2 , as a function of the elements within the scenario. Therefore, in the domestic scenario under analysis, a network deployment of 1–3 transceivers per floor will satisfy initial coverage needs in order to enable bi-directional real time communication between the static transceivers and the wearable device located on the pet. Therefore, not only received power level thresholds are satisfied, but also requirements in terms of BER, leading to coverage/capacity relations that hold for the scenario under analysis, with a node density of (1 node/30–40 m2 ) in order to satisfy both conditions for Xbee motes operating al 0 dBm transmission power levels. As in the previously derived node density values, these results provide relevant information related with the node radioplanning estimations. 3. Experimental Results and Implemented Application Once the 3D Ray Launching simulation technique has been introduced, experimental validation results as well as the implementation of an dog indoor tracking application is presented. The goal is to validate the proposed simulation model of the pet (in this case, a parametrizable dog model), prior to testing the proposed monitoring application. Experimental results are obtained by attaching to a dog a Xbee device working over an implemented Arduino software platform (Figure 8b). In this case dog has been placed in the living room and simulation and measurement results have been obtained all over the home under analysis. Measurement results have been obtained with the aid of an Agilent FieldFox N9912A portable spectrum analyzer. In order to validate the results obtained from the deterministic 3D RL code, measurements have been performed with the aid of a portable spectrum analyzer, which is necessary due to the fact that measurement error is very small (in the order of 0.1 dB) with adequate bandwidth settings. Received power levels can also be obtained (by means of Received Signal Strength Indication signals, RSSI) with the internal circuits of the ZigBee mote transceiver, but in this case, measurement errors are relatively high, within the order of 5 dB–8 dB. Therefore, wireless planning requires calibration in terms of precise spectral measurements and real operation can be estimated by considering a constant degradation off-set corresponding the RSSI detection circuits [23]. Five measurement points are defined in different rooms of the home, which are depicted in Figure 8a. In addition, 14 measurements have been carried out placing the antenna in the living room, without the presence of the dog (Figure 8c).

Sensors 2016, 16, 1384

Sensors 2016, 16, 1384

9 of 20

9 of 20

Figure 7. BER results considering different bit rates and noise levels for the antenna placed in the Figure 7. BER results considering different bit rates and noise levels for the antenna placed in the living room. living room.

Sensors 2016, 16, 1384

10 of 20

Sensors 2016, 16, 1384

Sensors 2016, 16, 1384

10 of 20

10 of 20

Figure 8. (a) Measurement points distributed around the home and the location of the dog; (b) Xbee Figure 8. (a) Measurement points distributed around the home and the location of the dog; (b) Xbee device attached to the dog for measurements; (c) Measurement points distributed around the home device attached to the dog for measurements; (c) Measurement points distributed around the home when the dog is not considered. when the dog 8.is(a) notMeasurement considered.points distributed around the home and the location of the dog; (b) Xbee Figure device attached to the dog for measurements; (c) Measurement points distributed around the home

In Figure 9 both, measurement and simulation results are compared for the first case, concluding when the dog is not considered. In the Figure 9 both, tool measurement andthe simulation results are compared for the first case, concluding that simulation coupled with simplified canine model, provides accurate results with a that the simulation coupled the simplified model, provides accurate results maximum 5both, dB, a mean with errorand of simulation 2.52 dB and acanine standard deviation 0.48 dB.concluding In any case,with it Inerror Figureof9tool measurement results are compared for theof first case, that theerror simulation tool coupled with theof simplified provides accurate results can be seen that the power value is 2.52 far away frommodel, sensitivity threshold andwith therefore, a maximum of 5derived dB, a mean error dBcanine and a the standard deviation of 0.48 dB.a In any errorthat of the 5 dB, aderived meansystem error ofcan 2.52be dBexpected, andisa far standard ofconsideration 0.48 dB. In anythreshold case, good performance of ZigBee with the initial of 1–3it static case, it maximum can be seen the power value awaydeviation from the sensitivity and can be seen that the derived power value is farof away from the sensitivity threshold and therefore, transceivers per household floor, as a function the specific propagation losses of the considered therefore, good performance of the ZigBee system can be expected, with the initial consideration good performance of the ZigBee system can be expected, with the initial consideration of 1–3 static scenario. of 1–3 static transceivers per household floor, as a function of the specific propagation losses of the transceivers per household floor, as a function of the specific propagation losses of the considered considered scenario. scenario.

Figure 9. Measurement vs simulationresults results when when the is attached to the dog within Figure 9. Measurement simulation theXbee Xbeeprototype prototype within Figure 9. Measurement vsvssimulation results when the Xbee prototypeisisattached attachedtotothe thedog dog within the scenario under analysis. the scenario under analysis. the scenario under analysis.

Sensors 2016, 16, 1384

Sensors 2016, 16, 1384

11 of 20

11 of 20

Sensors 2016, 10 16, 1384 11 of 20 In Figure measurement data compared with simulation results, when the transmitter is not attached In to Figure the dog, are depicted and in this case, the transmitter has been placed at a height of In Figure 10 10 measurement measurement data data compared compared with with simulation simulation results, results, when when the the transmitter transmitter is is not not 0.8 mattached High accuracy is observed, withinerror values of 1.37 dB andbeen a standardatdeviation of 2.55 dB. attached to to the the dog, dog, are are depicted depicted and and in this this case, case, the the transmitter transmitter has has been placed placed at aa height height of of 0.8 0.8 m m WhenHigh two measurement results are compared, the influence of the dog is noticeable considering that accuracy is observed, with error values of 1.37 dB and a standard deviation of 2.55 dB. When High accuracy is observed, with error values of 1.37 dB and a standard deviation of 2.55 dB. When two measurement are influence of is that received valuesresults are in general higherthe within the considered whenconsidering the home is empty. two power measurement results are compared, compared, the influence of the the dog dog stances is noticeable noticeable considering that received power values are in general higher within the considered stances when the home is empty. The influence of the values furniture observable if thethe stances next to the living are studied. received power are is in also general higher within considered stances whenroom the home is empty.As it The influence of is observable the stances next to living studied. As can be seen in Figure 10,furniture the received levelififof point 11 is lower than theroom two are points placed The influence of the the furniture is also alsopower observable the stances next to the the living room are studied. As next it can be seen in Figure 10, the received power level of point 11 is lower than the two points placed it can be seen in Figure 10, the received power level of point 11 is lower than the two points placed to it (10 and 12) as a consequence of the power reflected by the mirror located between transmitter next to 12) aa consequence of reflected by mirror located between next to itit (10 (10 and andpoint. 12) as asFor consequence of the the9 power power reflected by the the between and the measurement point 5 in Figure and points 1, 2 and 3 inmirror Figurelocated 10, received power transmitter and the measurement point. For point 5 in Figure 9 and points 1, 2 and 3 in Figure transmitter and the measurement point 5 in of Figure 9 and points 1, 2 andor3 absorbed in Figure 10, 10, is lower in comparison with further point. pointsFor since most the energy is reflected by the received received power power is is lower lower in in comparison comparison with with further further points points since since most most of of the the energy energy is is reflected reflected or or furniture disposed the middle wallin ofthe both stances. absorbed by thein furniture disposed middle wall of both stances.

absorbed by the furniture disposed in the middle wall of both stances.

Figure 10. Measurement vs simulation results when the dog is not located inside the room.

Figure 10. Measurement simulationresults results when when the located inside the the room. Figure 10. Measurement vsvs simulation thedog dogisisnot not located inside room.

As As aforementioned, aforementioned, the the dog dog location location system system works works triangulating triangulating the the received received power power of of three three

As aforementioned, dog (ZB) location systemin triangulating the received powerthree of three transmitter or Routers distributed different rooms home. Therefore, transmitter or Zigbee Zigbee the Routers (ZB) distributed inworks different rooms of of the the home. Therefore, three different simulations have been launched considering those antennas to show the influence transmitter or Zigbee Routers (ZB) distributed in different rooms of the home. Therefore, three different different simulations have been launched considering those antennas to show the influence of of furniture and the results these are depicted in simulations have launched topology. considering those antennas to show the influence of furniture andbeen the household household topology. Simulation Simulation results for for these configurations configurations arefurniture depictedand in the Figure 11. Figuretopology. 11. household Simulation results for these configurations are depicted in Figure 11.

Figure 11. Power distribution in the scenario when transmitters are placed in the ceiling of living

Figure 11. Power distribution in scenario the scenario when transmitters placed the ceilingofofliving livingroom Figure 11. Power distribution in the when transmitters areare placed inin the ceiling room (ZR1), guess (ZR2) and main (ZR3). (ZR1), guess bedroom bedroom (ZR2) and main bedroom bedroom (ZR1),room guess bedroom (ZR2) and main bedroom (ZR3).(ZR3).

These These results results can can be be used used to to calibrate calibrate the the location location system system since since power power distribution distribution values values within within

the are Besides, high of distribution and is These resultsscenario can be used to calibrate thethe location system since power distribution values within the complete complete scenario are obtained. obtained. Besides, the high influence influence of home home distribution and furniture furniture is noticeable. As an example, in main and guest rooms the influence of bed is evident considering that the complete scenario are obtained. high influence distribution and furniture noticeable. As an example, in mainBesides, and guestthe rooms the influenceof of home bed is evident considering that is noticeable. As an example, in main and guest rooms the influence of bed is evident considering that when the situation of the bed is analyzed, a decrease in received power level is shown. Finally,

Sensors 2016, 16,16, 1384 Sensors 2016, 1384

12 of 12 20 of 20

when the situation of the bed is analyzed, a decrease in received power level is shown. Finally, it can can be concluded in the the home the system will have enough power to carry triangulation beitconcluded that in that the home system will have enough power to carry outout thethe triangulation process, considering that power in the complete area is higher than − 100 dBm, above typical process, considering that power in the complete area is higher than −100 dBm, above thethe typical receiver sensitivity value ZigBee systems. receiver sensitivity value forfor ZigBee systems. order providepetpetmonitoring monitoringfunctionalities, functionalities, in-house dog monitoring system In In order to to provide anan in-house dog monitoring system is is developed for android devices based on the deployed ZigBee network. A screenshot of implemented developed for android devices based on the deployed ZigBee network. A screenshot of implemented application is shown in Figure 12, where the distance walked bydog the can dogbe can be easily known and application is shown in Figure 12, where the distance walked by the easily known and the the place where it is as well as the time that it has been in banned places can be monitored. The dog place where it is as well as the time that it has been in banned places can be monitored. The dog monitoring system consists a set wireless devices and a software component. The hardware monitoring system consists onon a set of of wireless devices and a software component. The hardware includes a ZigBee device charge data communication and RSS (received signal strength) includes a ZigBee device in in charge of of data communication and RSS (received signal strength) monitoring, a ZigBee sink in charge of data collection and command execution, an Android-based monitoring, a ZigBee sink in charge of data collection and command execution, an Android-based tablet charge data presentation, and a mini-PC, which includes the information system. tablet in in charge of of data presentation, and a mini-PC, which includes the information system. The dog carries harness Arduino device, which includes a ZigBee communication The dog carries in in itsits harness thethe Arduino device, which includes a ZigBee communication module. monitoring Received Signal Strength Indicator (RSSI) allows determine module. TheThe monitoring of of thethe Received Signal Strength Indicator (RSSI) allows to to determine thethe location dog. This value is obtained ZigBee transceiver each time a message is received. location of of thethe dog. This value is obtained by by thethe ZigBee transceiver each time a message is received. The message also includes the identifier of the ZigBee node. This information (ID + RSSI) sent The message also includes the identifier of the ZigBee node. This information (ID + RSSI) is is sent periodically demand sink node order provide dog location. The Arduino device periodically or or onon demand to to thethe sink node in in order to to provide thethe dog location. The Arduino device allows operation real-time connected mode even, unconnected mode. The first mode allows thethe operation onon real-time connected mode or or even, onon unconnected mode. The first mode is is used for real-time data transmission to the sink node, while the second-one is used for off-line dog used for real-time data transmission to the sink node, while the second-one is used for off-line dog tracking. The energy consumption is higher first mode, appropriate and limited tracking. The energy consumption is higher forfor thethe first mode, so so anan appropriate and limited useuse of of this operation mode is recommended. The Arduino device includes a ZigBee communication module this operation mode is recommended. The Arduino device includes a ZigBee communication module minimize energy consumption, since consumption lower than this WiFi. Figure to to minimize thethe energy consumption, since itsits consumption is is lower than this of of WiFi. Figure 8b8b illustrates devices used. illustrates thethe devices used.

Figure 12. Implemented android based application for the dog monitoring inside a home. Figure 12. Implemented android based application for the dog monitoring inside a home.

Sensors 2016, 16, 1384

13 of 20

The infrastructure includes the mini-PC and the ZigBee sink. In this case, we have chosen a MeeGoPad T04 Windows 10 based mini-PC. It includes a quadcore Intel X5-Z8300 Cherry Trail processor ZigBee sink Sensorsand 2016,216,GB 1384of RAM memory, WiFi b/g/n and two USB ports. We connect a 13 of 20 to its USB 2.0 port and then we can interact with the Arduino device located at the dog’s harness. The infrastructure the mini-PC andtothe ZigBeewith sink. the In this case, we have chosen a We have developed a smallincludes and simple protocol interact Arduino device. This protocol MeeGoPad T04 Windows 10 based mini-PC. It includes a quadcore Intel X5-Z8300 Cherry Trail includes functionalities as the selection of the operation modes: location, tracking, rest; the battery processor and 2 GB of RAM memory, WiFi b/g/n and two USB ports. We connect a ZigBee sink to its level monitoring thethen device; theinteract firmware the device devicelocated diagnosis; even more. mini-PC USB 2.0 portof and we can withupload; the Arduino at theand dog’s harness. WeThe have runs adeveloped small relational database management system SQLite which is a small and simple protocol to interact with thecalled Arduino device.(www.sqlite.org), This protocol includes embedded into the software. The C++ −based software is a middleware in charge functionalities as the selection of the operation modes:developed location, tracking, rest; the battery levelof data monitoring of the device; the firmware upload; the device and even more. The mini-PC location storing into the database, data presentation on thediagnosis; graphical user interface GUI, and device runs a small relational database management system called SQLite (www.sqlite.org), which is management. Figure 13 shows the hardware, while Figure 14 shows the software architecture. embedded into the software. The C++−based software developed is a middleware in charge of data The middleware (see Figure 14) includes at its lower layer the basic functionalities needed to location storing into the database, data presentation on the graphical user interface GUI, and device communicate the Arduino device with the mini-PC (ZigBee communication), collect the sensed data management. Figure 13 shows the hardware, while Figure 14 shows the software architecture. (Data garbage) and the remote update the firmware when needed (firmware update). Thetomiddle The middleware (see Figure 14) of includes at its lower layer the basic functionalities needed layer provides data storing into a relational database. In this case SQLite, that is absolutely embedded communicate the Arduino device with the mini-PC (ZigBee communication), collect the sensed data with the code in charge of data storing. upper layer of the middleware themiddle graphic user (Data garbage) and the remote updateThe of the firmware when needed (firmwareprovides update). The layer provides data storing into a relational database. In this case SQLite, that is absolutely embedded with interface (GUI) functionalities. The WiFi communication module allows the communication with thedevice code in(tablet), charge ofallowing data storing. upper layer of the middleware provides the graphic user and the Android theThe interaction with the GUI module. Finally, the location interface (GUI) functionalities. The WiFi communication module allows the communication with the tracking of the pet is performed by the Location and Data monitoring modules. The location module Android device (tablet), allowing the interaction with the GUI module. Finally, the location and appliestracking a set ofoffuzzy rules to the data collected by the Arduino device, and stored into the database, the pet is performed by the Location and Data monitoring modules. The location module and estimates location of the dog. Data monitoring includes the tracking thethe dog, and also the applies a the set of fuzzy rules to the data collected by the Arduino device, and storedofinto database, statistical behavior. and analysis estimates of theits location of the dog. Data monitoring includes the tracking of the dog, and also the statistical analysis ofcan its behavior. Data presentation be performed over the TV screen (the mini-PC has an HDMI connector) Data presentation can be performed over the an TVandroid-based screen (the mini-PC has via an HDMI connector) and a wireless keyboard/pointer device, or over tablet WiFi communication. and a wireless keyboard/pointer device, or over an android-based tablet via WiFi communication. The GUI has been developed on HTML 5, since that allows its use on different devices. Given the The GUI has been developed on HTML 5, since that allows its use on different devices. Given the simplicity of the GUI, and the low complexity of the functionalities required, HTML is a good choice simplicity of the GUI, and the low complexity of the functionalities required, HTML is a good choice for thisforapp. this app.

Figure 13. Infrastructure’s hardware, including XBee Pro ZigBee Motes and MeeGo Mini PC sink

Figuredevice. 13. Infrastructure’s hardware, including XBee Pro ZigBee Motes and MeeGo Mini PC sink device.

Sensors 2016, 16, 1384

14 of 20

Sensors 2016, 16, 1384

14 of 20

Sensors 2016, 16, 1384

14 of 20

Figure 14. Middleware architecture.

Figure 14. Middleware architecture. Figure 14. Middleware Figure 15 shows a heat map, which displays thearchitecture. location of the dog along the time period selected by the user. The user can monitor the movement of the the past weekselected to Figure 15 shows a heat map, which displays the location of dog the anywhere dog alongfrom the time period Figure 15 the shows a heattraveled, map, which displays the location of thenumber dog along the time period the past hour, distance as well as the specific time and of times the dog has by the user. The user can monitor the movement of the dog anywhere from the past week to the selected byforbidden the user. The monitor the movement of the dog anywhere from the past week to entered zone.user can past hour, theahour, distance traveled, as wellasaswell the as specific time and of times the dog hashas entered the past the distance traveled, the specific timenumber and number of times the dog a forbidden entered zone. a forbidden zone.

(a)

(b)

Figure 15. App functionalities: heat map (left), dog tracking (middle) and forbidden area intrusion (right).

(c) Figure 15. App functionalities: heat map (a), dog tracking (b) and forbidden area intrusion (c).

Sensors 2016, 16, 1384

15 of 20

The location estimation is performed thanks to the ZigBee coverage. The ZigBee module of the Arduino device (mote) placed at the harness allows the measure of the RSSI values and then estimate the localization of the dog. Fuzzy location using RSSI values is a rough but reliable method that can be easily adapted to a given scenario, as we have previously experimented in [24]. We have chosen a fuzzy-based location estimator in order to determine the location of the dog according to the RSSI values measured by the Arduino device. The estimator is based on measuring the intensity of the received signal, something that can be done continuously, on a regular basis or on demand. Although many indoorg RF-based user location and tracking system, as RADAR [25], have been widely considered, we consider more appropriated for the scenario here described the use of fuzzy logic. Fuzzy logic is used to handle the uncertainties that might be encountered and provide systems that do not require a specialized hardware or a great number of sensors or devices. As RSSI values can easily vary due to many reasons, for example due to the influence of the own body, we need to deal with inexact and uncertain information, so fuzzy methods [24,26,27] are suitable for the scenario here described. The device measures the RSSI obtained from each ZigBee node of the flat (see Figure 11) and transmits the values and the identifiers (IDs) of the nodes to the sink node, where the middleware located at the mini-PC stores the data collected into the database and estimates the location of the dog according to the signal strength map previously obtained. The comparison of the expected RSS values with those obtained allow to estimate the pet location. The radio propagation analysis presented in this paper allows obtaining the signal strength map in a simpler and less labor-intensive way than classical methods of signal measuring [25,28,29]. The main restrictions of this method are the requisites of creating maps based on floor plans of indoors, of choosing the effective location of the (ZigBee) nodes used as beacons inside the building, and choosing the effective positioning technology and algorithms. Signal variation recommends using fuzzy techniques, since they perform better than crisp ones. Furthermore, the knowledge of the precise location often does not contribute to a better behavior of the location based systems. Fuzzy locating [24] determines the similarity (or even distance) between the RSS values obtained by the dog and the a priori knowledge with the operational ambience (the signal strength map of the flat). Tracking motion over time with the aid of a fuzzy automaton allows to increase the accuracy of the location estimator. The location module has two main components, a set of fuzzy rules and a set of fuzzy automata. Rules are evaluated with the data collected and then location estimation is provided. An adaptive neuro-fuzzy inference system (ANFIS) has been used to obtain the rules. We have divided the flat in areas following a 8 × 10 mesh, and using the Matlab tool (fuzzy and neural network toolboxes) and the signal strength map previously obtained we have obtained a set of 63 rules as: S1 is High AND S2 is VeryLow AND S3 is High THEN location = Entry The obtention of the rules is simple, but the main problem is that the mechanism is totally dependent on the scenario considered. The cost of evaluation of fuzzy rules is very low since only a set of IF-THEN-ELSE sentences must be computed. Fuzzy automata require a bit more complicated calculus, since fuzzy operators are more complex, but not too much. That allows real-time operation. The fuzzy automata take advantage of the movement restriction, since the dog do not cross walls during its movement along the rooms of the flat. Thus, we define the potential travel routes that can be followed by the dog and we obtain a set of fuzzy automata. Each of the regions of the mesh previously defined is characterized as a symbol (character), and then a travel route is a string of symbols, where each symbol is the region where it has traveled. Tracking is performed by measuring the simuilarity between the string α representing the the path followed by the pet and the routes defined by the automata (ωi ). More information can be obtained in [30]. In order to validate the performance and accuracy of the system proposed by direct observation, we include a ground truth. We have fixed a forbidden area (see Figure 15a) and we have analyzed the behavior of the system during a day. Note the difficulty of the experimentation due to the limited cooperation of the dog. We have forced the dog to be placed in positions close to the forbidden room, but not entering it, either in front the door or the partitions. In the same way, we have forced the dog

Sensors 2016, 16, 1384

16 of 20

to enter the forbidden room and to sit and lie in different locations of this room. Results, depicted in Table 3, shows that the presence of the dog is incorrectly estimated 22.81% of the time, while it is Sensors 2016, 16, 1384 16 of 20 succesfully determined the 77.19%. We analyze the presence (or not) of the dog in the forbidden area, determining error/success rate of the estimations provided by the system. We the success succesfully the determined the 77.19%. We analyze the presence (or not) of the dog in thedefine forbidden area, rate as the ratio between the number of times that the system has estimated that the dog was of the determining the error/success rate of the estimations provided by the system. We define the out success room, was,between and thatthe thenumber dog was the room, when it was, the total number ofwas estimations rate when as the itratio ofin times that the system has and estimated that the dog out of (correct + incorrect estimations). In the same way, we define the error rate as the ratio between the the room, when it was, and that the dog was in the room, when it was, and the total number of number of incorrect (the system In hasthe estimated that dog the waserror in the room, estimations (correctestimations + incorrect estimations). same way, wethe define rate as thewhen ratio it was out, and the of dog was out of the room, was in) and that the total number between the that number incorrect estimations (the when systemithas estimated the dog was inof thepresence room, when it was out, and that the dog was to out of the when(the it was the totalthe number of estimations. Incorrect estimations are due both falseroom, positives dog in) hasand not entered forbidden presence estimations. Incorrect estimations are due to both false positives (the dog has not entered area, but the system so indicates) and false negatives (the dog has entered the forbidden area, but the the forbidden but the so indicates) and false as negatives (the dog enteredThe the forbidden system has not area, detected thesystem intrusion), also addressed type I and typehas II errors. number of area, but the system hasnegatives not detected the intrusion), as type I and typecan II errors. The false positives and false is quite similar, soalso anyaddressed assumptions about them be reached. number of false positives and false negatives is quite similar, so any assumptions about them can be As anticipated, the success rate obtained does not entirely satisfy the expected requirements, therefore reached. As anticipated, the success rate obtained does not entirely satisfy the expected requirements, we introduce the fuzzy automata. Fuzzy automata allow to discriminate impossible routes. Since the therefore weenter introduce the fuzzy automata. Fuzzy automata impossibletraces routes. dog can only the room through the door (when opened)allow and to thediscriminate system permanently the Since the dog can only enter the room through the door (when opened) and the system permanently location of the dog, the system corrects a great number of false positives and false negatives, resulting the location of the dog, the system corrects a great number of false positives and false negatives, in traces a significantly higher success rate (close to 94.71%). Figure 16 depicts the distribution grid used by resulting in a significantly higher success rate (close to 94.71%). Figure 16 depicts the distribution the fuzzy automata to track the movement of the dog and then discriminate type I and type II errors. grid used by the fuzzy automata to track the movement of the dog and then discriminate type I and The dog’s movement is modeled as a string of symbols, and the system builds a fuzzy automaton for type II errors. The dog’s movement is modeled as a string of symbols, and the system builds a fuzzy each one of the possible sequences. Note that failing to pass through the walls significantly reduces automaton for each one of the possible sequences. Note that failing to pass through the walls the number of possible sequences. The string obtained is the concatenation of the grids traversed significantly reduces the number of possible sequences. The string obtained is the concatenation of by the dog. Thus, the fuzzy automata compare the displacement followed by the dog with the set the grids traversed by the dog. Thus, the fuzzy automata compare the displacement followed by the of dog all possible routes theroutes flat and offers of similarity between them. The them. system with the set of allinside possible inside the the flat value and offers the value of similarity between selects the route that obtains a greater value of similarity allowing to correct many of the errors The system selects the route that obtains a greater value of similarity allowing to correct many of theof type I and the error rate not canceled and(2.37% 2.92%,and respectively). The estimation errors of II.However, type I and II.However, theiserror rate is not(2.37% canceled 2.92%, respectively). The errors concerning the door of the room are not discriminable. The automata are not able to determine estimation errors concerning the door of the room are not discriminable. The automata are not able whenever the door is opened or closed. to determine whenever the door is opened or closed.

Figure 16. Grid distribution of the flat. Figure 16. Grid distribution of the flat. Table 3. Performance evaluation of the Location system. Table 3. Performance evaluation of the Location system. Location Evaluation Location Evaluation Success Success Error Error False positive (type I) False positive (type I) False negative(type (typeII)II) False negative

Presence Presence 423

Tracking Tracking 519

423 125 125 57 57 68 68

29519 29 13 13 1616

When estimating the time the pet spends at each location, it should be noted that the system periodically calculates the location of the pet, and this is what determines the estimation accuracy. The measurement period determines the granularity of the time estimation. As the sampling period

Sensors 2016, 16, 1384

17 of 20

When estimating the time the pet spends at each location, it should be noted that the system periodically calculates the location of the pet, and this is what determines the estimation accuracy. The measurement period determines the granularity of the time estimation. As the sampling period is increased, the greater battery life of the ZigBee transceiver is achieved. Lengthening the sampling period involves a reduction on the accuracy of the estimation. If the dog moves between two consecutive observations, the system will not be aware of it. During the experimentation we have considered sampling periods of 5, 10, 30 and 60 s. Obviously, a sampling period of 5 s causes the transceiver battery runs out much earlier than in the case of considering a sample period of 60 s. A future work is to take advantage of the accelerometers located at motes to perform an intelligent choice of the sampling period. If the mote detects that our pet is not moving, it is not necessary to measure the RSSI level and this allows the ZigBee interface remains off longer, resulting in a lower battery consumption. Pet monitoring, including the localization, tracking and time at forbidden areas of the pet (a dog in this case) has many similarities with the multiple existing proposals concerning human location tracking but the main difference occurs at the radio level. As it can be observed, the height and volume of the pet, which are significantly lower than those of people, motivates the RSSI values obtained. On one hand, the height plane in which lies the transceiver (in this case the transceiver is located in the dog’s neck), and on the other hand, the way it affects the volume of the pet to the received signal. The ZigBee routers (ZR) are located on furniture that does not exceed one meter high, so that ZigBee signals bounce off many obstacles and penetrate a variety of close materials that cause varying effects. This is evidenced by a decrease in the value of RSSI observed. People tend to find above mentioned obstacles, and in general, the effect of these elements in the signal propagation is less relevant than in the case of pets. The custom that many pets have of spending long periods of time huddled in a position without moving too much is another matter to be considered. When pets are snuggled, they tend to tilt the neck to its body, which, depending on the orientation of the pet’s transceiver to the ZR may cause observable changes in the RSSI values obtained. These variations, up to 5 dB, may be due to the directivity of the transceiver antenna, the ground effect, or even to the own body ot the pet. When the dog is snuggled, we observe average variations of RSSI values of 2.4 dBm and a maximum deviation of 5.1 dBm. Experimental results obtained do not allow to conclude that the animal’s movement affects (impede or favor) its location. Something that seems reasonable, because the dimensions of the apartment do not allow the pet to run and achieve a significant speed. 4. Discussion In this work a novel indoor canine monitoring system based on WSN is presented. Thanks to this system, areas of the home that the dog has visited during the day can be easily known using any android based device, and furthermore, it can be monitored if the dog has entered into forbidden areas. Since the system works considering the received power to carry out triangulation calculus, the deployment of the WSN network must be adequate and at least three routers must be visible for the device in any part of the home. In this work a 3D Ray Launching simulation technique is proposed for the proper deployment of the network and to calibrate application, since the power level in the different parts of the home for the three antennas must be registered in the application database. Presented simulation tool can consider all parts of a complex scenario with the dielectric properties of all objects inside it and therefore, accurate results can be obtained if all parameters are correctly introduced. Besides, a canine simplified model compatible with the simulation code is developed for this work, which considering that the receiver is attached to the pet, is essential for the obtaining of accurate results. This model is flexible and allows the consideration of different kind of dogs and positions, taking under consideration all their properties. BER results are also extracted from the simulation tool. This kind of results can help to find problems in the network as a consequence of interferences, since low error probability areas can be defined. These areas depends on the noise, transmission bit rate and the received power which

Sensors 2016, 16, 1384

18 of 20

depends on the transmitter antenna and the characteristics of the scenario. The radio planning analysis both in terms of path loss calculation as well as in terms of BER requirements show that for the type of scenario under analysis, mote deployment can be achieved with a node density of (1node/30–40 m2 ), for the selected XBee transceivers. Other communication systems could be employed, as a function of future requirements such as required transmission speed or delay constraints derived by transmission of non-delay tolerant traffic. In any case, simulation results are compared in Figures 9 and 10 with a campaign of measurements carried out inside the scenario, validating the simulation tool as well as the simplified canine model. Those results allow using 3D ray launching simulation to design and develop pet indoor location systems minimizing the campaign of measurements carried out inside the scenario considered. The software development cycle is significantly reduced with the use of simulation data for the extraction of the location rules, and the definition of the fuzzy automata. The power distributions obtained from the 3D ray Launching model allow configuring the location module without requiring the use of expensive fingerprinting techniques. Since one of the main problems of indoor RF location systems is the need to rebuild the system whenever the working scenario changes, the simulation tool allows to recalculate the location system on a quick, easy and simple way. The location and monitoring system has been implemented and tested in order to validate location capabilities as well as connectivity of the system (and hence, interaction capabilities) for the scenario under analysis. 5. Conclusions In this work the viability of using a WSN network for dog monitoring is studied through a 3D Ray Launching simulation tool. In order to analyze the proposed system a simplified dog model has been developed considering different dog size proportions and dielectric properties of its biological tissues, in an automated way. A one-story home has been chosen as studied scenario considering its complete topology and characteristics. The main goal is the analysis of the influence of wireless propagation limitations in the implementation of a specific pet monitoring system, which has been implemented and tested. A simplified parameterized dog model is implemented within the deterministic 3D RL code and introduced within the scenario under analysis in order to validate simulation results, proving to be an adequate approach in order to perform radioplanning tasks within the specific pet monitoring application. The estimations provide assessment in terms of required node density as well as on potential transceiver location, in order to comply with coverage/capacity requirements. Different measurement points are chosen and compared obtaining a maximum error of 5 dB in terms of RSSI detection error offset, demonstrating the accuracy of the 3D RL simulation method ane enabling node location tasks without previous measurement campaigns. In order to implement the pet monitoring system, an Android based indoor dog monitoring application has been coded in order to operate with XBee motes and a MeeGo mini PC, providing pet monitoring capabilities within the domestic household including a pet location algorithm based on fuzzy logic estimation. The proposed solution can be scaled in order to provide interactive communication with different pets and in different types of scenarios, with low deployment cost. Acknowledgments: The authors wish to acknowledge the financial support of project TEC2013-45585-C2-1-R, funded by the Spanish Ministry of Economy and Competiveness. Author Contributions: Erik Aguirre, Peio Lopez-Iturri, Leyre Azpilicueta, Daniel Santesteban and Francisco Falcone have designed and performed the experiments and simulations for the wireless system analysis; José Javier Astrain and Jesús Villadangos have programmed the Arduino device and have developed the middleware, including the location and tracking functionalities, and the android-based application. Conflicts of Interest: The authors declare no conflict of interest.

Sensors 2016, 16, 1384

19 of 20

Abbreviations WSN ISM IoT PPG ECG GO GTD RFID WPAN RSS RSSI PC RAM USB ANFIS

Wireless Sensor Networks Industrial, Scientific and Medical Internet of Things Photophethysmogram Electrocardiogram Geometrical Optics Geometrical Theory of Diffraction Radio Frequency IDentification Wireless Personal Area Networks Received Signa Strength Received Signa Strength Indicator Personal Computer Random Access Memory Universal Serial Bus Adaptive Neuro-Fuzzy Inference System

References 1.

2.

3.

4.

5.

6.

7.

8.

9. 10.

11.

12.

Lopez, G.; Custodio, V.; Ignacio Moreno, J. Location-Aware System for Wearable Physiological Monitoring within Hospital Facilities. In Proceedings of the IEEE 21st International Symposium on Personal Indoor and Mobile Radio Communications, Istanbul, Turkey, 26–30 September 2010; pp. 2609–2614. Lee, Y.; Lee, B.; Lee, C.; Lee, M. Implementation of Wearable Sensor Glove using Pulse-wave Sensor, Conducting Fabric and Embedded System. In Proceedings of the 3rd IEEE/EMBS International Summer School on Medical Devices and Biosensors, Cambridge, MA, USA, 4–6 September 2006; pp. 94–97. Mustapha, B.; Hassan, M.Z.; Mohamad, Z.; Kamaruddin, I.; Yahya, R. PC based blood pressure meter for E-health application. In Proceedings of the International Conference on Artificial Intelligence with Applications in Engineering and Technology, Kota Kinabalu, Malaysia, 3–5 December 2014; pp. 319–324. Chu, C.H.; Wang, C.H.; Liang, C.K.; Ouyang, W.; Cai, J.H.; Chen, Y.H. High-accuracy indoor personnel tracking system with a ZigBee wireless sensor network. In Proceedings of the Seventh International Conference on Mobile Ad-hoc and Sensor Networks, Beijing, China, 16–18 December 2011; pp. 398–402. Hunter, J.; Brooking, C.; Brimblecombe, W.; Dwyer, R.G.; Campbell, H.A.; Watts, M.E.; Franklin, C.E. OzTrack–e-Infrastructure to support the Management, Analysis and Sharing of Animal Tracking Data. In Proceedings of the IEEE 9th International Conference on eScience (eScience), Beijing, China, 22–25 October 2013; pp. 140–147. Kim, S.H.; Kim, D.H.; Park, H.D. Animal situation tracking service using RFID, GPS, and sensors. In Proceedings of the Second International Conference on Computer and Network Technology, Bangkok, Thailand, 23–25 April 2010; pp. 153–156. Sasloglou, K.; Glover, I.A.; Kae-Hsiang, K.; Andonovic, I. Wireless sensor network for animal monitoring using both antenna and base-station diversity. In Proceedings of the 11th IEEE Singapore International Conference on Communication Systems, Guangzhou, China, 19–21 November 2008; pp. 27–33. Wietrzyk, B.; Radenkovic, M. Enabling large scale ad hoc animal welfare monitoring. In Proceedings of the Fifth International Conference on Wireless and Mobile Communications, Cannes, France, 23–29 August 2009; pp. 401–409. Kumar, A.; Hancke, G.P. A Zigbee-Based Animal Health Monitoring System. IEEE Sens. J. 2015, 15, 610–616. [CrossRef] Erden, H.; Kaya, I.A.; Çama¸sircioglu, ˘ E. Livestock monitoring system. In Proceedings of the Fourth International Conference on Agro-Geoinformatics (Agro-geoinformatics), Istanbul, Turkey, 20–24 July 2015; pp. 73–76. Brugarolas, R.; Dieffenderfer, J.; Walker, K.; Wagner, A.; Sherman, B.; Roberts, D.; Bozkurt, A. Wearable wireless biophotonic and biopotential sensors for canine health monitoring. In Proceedings of the IEEE Sensors, Valencia, Spain, 2–5 November 2014; pp. 2203–2206. Brložnik, M.; Avbelj, V. Wireless electrocardiographic monitoring in veterinary Medicine. In Proceedings of the 38th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 25–29 May 2015; pp. 356–359.

Sensors 2016, 16, 1384

13.

14.

15. 16.

17.

18.

19. 20. 21. 22. 23. 24.

25.

26.

27. 28.

29. 30.

20 of 20

Lancheros-Cuesta, D.J.; Suarez, D.R.; Gordo, L.H.C. Solid dosing system for feeding dogs with remote communication module. In Proceedings of the 10th Iberian Conference on Information Systems and Technologies (CISTI), Aveiro, Portugal, 17–20 June 2015; pp. 1–5. Ahn, J.; Kwon, J.; Nam, H.; Jang, H.K.; Kim, J.E. Pet Buddy: A wearable device for canine behavior recognition using a single IMU. In Proceedings of the International Conference on Big Data and Smart Computing (BigComp), Hong Kong, China, 18–20 January 2016; pp. 419–422. Bozkurt, A.; Roberts, D.L.; Sherman, B.L.; Brugarolas, R.; Mealin, S.; Majikes, J.; Yang, P.; Loftin, R. Toward Cyber-Enhanced Working Dogs for Search and Rescue. IEEE Intell. Syst. 2014, 29, 32–39. [CrossRef] Aguirre, E.; Lopez, P.; Azpilicueta, L.; Astrain, J.J.; Villadangos, J.; Falcone, F. Analysis of Wireless Sensor Network Topology and Estimation of Optimal Network Deployment by Deterministic Radio Channel Characterization. Sensors 2015, 15, 3766–3788. [CrossRef] [PubMed] Aguirre, E.; Arpón, J.; Azpilicueta, L.; de Miguel, S.; Ramos, V.; Falcone, F. Evaluation of electromagnetic dosimetry of wireless systems in complex indoor scenarios within body human interaction. Prog. Electromagn. Res. B 2013, 43, 189–209. [CrossRef] Baghdadi, H.; Aguirre, E.; López, P.; Azpilicueta, L.; Astrain, J.J.; Villadangos, J.; Falcone, F. Characterization of UHF Radio Channels for Wireless Sensor Systems Embedded in Surfboards. IEEE Antennas Wirel. Propag. Lett. 2015, 14, 1526–1529. [CrossRef] Hata, M. Empirical formula for propagation loss in land mobile radio services. IEEE Trans. Veh. Technol. 1980, 29, 317–325. [CrossRef] Ikegami, F.; Yoshida, S.; Takeuchi, T.; Umehira, M. Propagation factors controlling mean field strength on urban streets. IEEE Trans. Antennas Propag. 1984, 32, 822–829. [CrossRef] Lee, D.J.Y.; Lee, W.C.Y. Propagation prediction in and through buildings. IEEE Trans. Veh. Technol. 2000, 49, 1529–1533. [CrossRef] Prieto, J.B.; Toledo, R.L.; Reguero, P.F.; Abril, E.; Martínez, A.B.; Franco, S.M.; Bullido, D. A new metric to analyze propagation models. Prog. Electromagn. Res. 2009, 91, 101–121. [CrossRef] Aguirre, E.; Led, S.; Lopez-Iturri, P.; Azpilicueta, L.; Serrano, L.; Falcone, F. Implementation of Context Aware e-Health Environments Based on Social Sensor Networks. Sensors 2016, 16, 1–27. [CrossRef] [PubMed] Astrain, J.J.; Villadangos, J.; Garitagoitia, J.R.; González de Mendívil, J.R.; Cholvi, V. Fuzzy location and tracking on wireless networks. In Proceedings of the 4th ACM international workshop on Mobility management and wireless access (MobiWac ’06), Torremolinos, Spain, 2–6 October 2006; pp. 84–91. Bahl, P.; Padmanabhan, V.N. Radar: An in-building RF-based user location and tracking system. In Proceedings of the 19th Nineteenth Annual Joint Conference of the IEEE Computer and Communications Societies (INFOCOM), Tel Aviv, Israel, 26–30 March 2000; pp. 775–784. Garcia-Valverde, T.; Garcia-Sola, A.; Hagras, H.; Dooley, J.A.; Callaghan, V.; Botia, J.A. A fuzzy logic-based system for indoor localization using WiFi in ambient intelligent environments. IEEE Trans. Fuzzy Syst. 2013, 21, 702–718. [CrossRef] Herrero, D.; Martínez, H. Fuzzy Mobile-Robot Positioning in Intelligent Spaces Using Wireless Sensor Networks. Sensors 2011, 11, 10820–10839. [CrossRef] [PubMed] Youssef, M.; Agrawala, A. The horus WLAN location determination system. In Proceedings of the 3rd International Conference on Mobile Systems, Applications and Services, Seattle, WA, USA, 6–8 June 2005; pp. 205–218. Fang, S.-H.; Hsu, Y.-T.; Kuo, W.-H. Dynamic fingerprinting combination for improved mobile localization. IEEE Trans. Wirel. Commun. 2011, 10, 4018–4022. [CrossRef] Garitagoitia, J.R.; González de Mendivil, J.R.; Echanobe, J.; Astrain, J.J.; Farina, F. Deformed fuzzy automata for correcting imperfect strings of fuzzy symbols. IEEE Trans Fuzzy Syst. 2003, 11, 299–310. [CrossRef] © 2016 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).

Implementation and Analysis of a Wireless Sensor Network-Based Pet Location Monitoring System for Domestic Scenarios.

The flexibility of new age wireless networks and the variety of sensors to measure a high number of variables, lead to new scenarios where anything ca...
6MB Sizes 0 Downloads 8 Views