# PIR Sensors Deployment with the Accessible Priority in Smart Home Using Genetic Algorithm

Authors: Dan  Yang; Kaiyou Rao; Bin Xu; Weihua Sheng
Journal: International Journal of Distributed Sensor Networks
 (2015)

---

## Abstract

In smart home, location estimation based on PIR sensors is very popular. Existing methods by various sensors technologies and intelligent algorithms are used to achieve a high accuracy. In fact, how to deploy the PIR sensor is directly related to the accuracy. In this paper, we present an approach to deploying the PIR sensor based on the accessible priority by genetic algorithm. This paper presents a genetic algorithm that searches for an optimal or near optimal solution to the PIR sensor deployment for smart home. The fitness function of GA is based on the accessible priority of indoor areas. The accessible priority value of different area is set according to the indoor environment and daily accessible habits. The performance of the genetic algorithm was evaluated using several metrics, and the simulation results demonstrated that the proposed algorithm can optimize the network coverage in terms of accessible frequency.


---

## Body

## 1. Introduction

According to the United Nations online database [1], currently the percentage of elderly population is 7.6% that is projected to rise by 16.2% in 2050. Issues such as increased healthcare expenditure, burden to caregivers, and insufficient and inefficient care are more likely to occur as the health of older persons normally deteriorates with increasing age, resulting in more demand for long-term care. Therefore, it becomes urgent to find a compromise between the need for constant care (at home or in institutions) and the need to lighten the load on caregivers. Also, it is highly important to ensure that the ministered care is personalized and efficient. In this regard, the smart home concept is an adequate solution. It can be especially useful for the elderly or the disabled who wish to live independently.In smart home, the occupant’s location is probably one of the most important data items needed to monitor the occupant’s activities [2]. Some home devices, such as lighting, heating, or home electronic devices, should be also adjusted automatically according to occupant’s indoor position. So, it is necessary to localize people in smart home by sensor technologies and some intelligent methods. When the sensors are used for indoor localization, some techniques and constraints need to be considered, such as the occupant’s privacy [3], hardware installment cost [4], and technologies’ unobtrusiveness [5]. For PIRs are costly, have no privacy problem, and also have very low power consumption, they are very useful to track targets in indoor environment. In Gopinathan et al.’s paper, four PIR detectors are used to develop a system able to detect the path of a single person moving in an area [6], while in Shankar et al.’s paper a low cost sensor cluster is used to extract velocity as well as the path of a single person [7]. Also an array of PIR is used to detect the number of people moving through a gate [8]. In order to improve the tracking accuracy, some efforts are placed on position calculation by data fusion algorithms. Kim et al. developed a Bayesian classifier to enhance the accuracy of PIR-based indoor location-aware system [9]. Seifzadeh et al. proposed a Soft-Data-Constrained Multimodel Particle Filtering method, where the inherently vague (subjective) soft data provided by human agents are modeled using a fuzzy inference system [10]. These mentioned Bayesian methods offer a formal way to update existing knowledge from new evidence. Slightly finer localization can be obtained by exploiting the deployment of neighboring sensors. However, there are a limited number of studies that focus on coverage efficiency of PIR sensors. In this paper, we propose an implementation of GA-based approach for the PIR sensors deployment based on the priority of zones by accessible frequency in a smart home. We split the indoor environment in 2D view into small grids, and we assign a value to every grid that indicates the priority (accessible frequency) of the zone specified by that grid. For example, in a smart home there are many areas with different accessible frequencies. We can distinguish these areas based on obstacles (walls), furniture, the unoccupied free place, accessible daily habits, and so forth. The performance of a given PIR sensor layout by genetic algorithm was evaluated according to the area accessibility as the standard. Some simulation experiments have been implemented to evaluate the performance of our method for PIR deployments.The rest of the paper is organized as follows: Section2 will review related sensor deployment works. Section 3 will provide the description of the genetic algorithm with steps. Section 4 will discuss the experimental results and some simulation regarding the algorithm. Finally, Section 5 concludes this paper.


## 2. Related Works

This paper focused on the optimal PIR sensor placement with the accessible priority using GA-based approach for indoor localization. Therefore, the review of the related work consists of two parts: PIR sensor placement for indoor localization and GA for sensor placement.


### 2.1. PIR Sensor Placement for Indoor Localization

Generally, the PIR sensor placement is classified into two categories: (1) the deployment of PIR sensors: selecting the optimal coordinate for the PIR sensors and (2) the modulation of FOVs: modulating the optimal FOVs. In [11], the authors have mentioned that the deployment strategy of directional sensor nodes is critical to improve target detection and tracking accuracy. They presented the PIR sensor deployment in WSNs based on computational geometry. Byunghun and his workmates also show how the PIR sensors are deployed, which is very important for localizing an object using region-based tracking algorithm [12]. They discussed the PIR deployment that would divide the monitored room into different regions and how to deploy them determined the localization error. The work reported in [13] addresses the problem of target detection and classification using seismic and PIR sensors and makes use of wavelet-based feature extraction method to resolve this problem. The advantages and disadvantages of seismic and PIR sensors are also discussed. For example, the deployment of sensors largely depends on the intent of use and environment. PIR sensor deployment could be very expensive, because the detection range of PIR sensors has a short range of detection. Therefore, it is recommended that seismic and PIR sensor should be used together. In [14], PIR sensor nodes are deployed linearly and the sensing area is divided into cells through the four sensing regions of each PIR sensor node. In another study [15], five PIR sensors are attached to a service robot to make a circular sensing region. According to the experimental results stated in these studies, the usage of PIR sensors can improve the accuracy of target detection and tracking. Unlike real sensor nodes, most of the researches assume that sensor nodes have a 360° Angle of View (AoV). For example, a node deployment strategy that assumes PIR sensor nodes have 360° AoV is proposed in [7]. The performance of the proposed deployment algorithm is evaluated by comparing the coverage at the initial and final locations of sensor nodes.


### 2.2. GA for Sensor Placement

Sensor placement for indoor localization is an optimization problem that is nondeterministic and polynomial-time hard [16]. Genetic algorithms (GAs) are a type of evolutionary, optimization algorithm, which can be used to solve optimization problems with NP-hard complexity. Some previously developed algorithms have used GAs to obtain optimum deployment of sensor networks. The study in [17] presents a multiobjective genetic algorithm (MOGA) for optimal deployment of N static sensors in a 2D flat RoI, with two competing deployment objectives: maximizing the area coverage and maximizing lifetime. Each deployment layout was ranked according to its area coverage and lifetime. Different optimum layouts are obtained with respect to different sensing-to-communication range ratios. Reference [18] proposes a dynamic sensor nodes selection strategy, which uses the GA to implement global searching space of GA and ensure the validity of each chromosome. The two objectives of their fitness function are to maximize the coverage and minimize the area covered by more than one sensor. Liang et al. [19] have performed the optimization work for wireless sensor networks in 3D environments. In this work, a force driven genetic algorithm was introduced to decide the location of the sensors in order to obtain an optimized accessible space and also consider sensor coverage. Feng et al. propose an implementation of GA-based design approach for the deployment of the sensors and angles for the modulation of FOVs [20].


## 2.1. PIR Sensor Placement for Indoor Localization

Generally, the PIR sensor placement is classified into two categories: (1) the deployment of PIR sensors: selecting the optimal coordinate for the PIR sensors and (2) the modulation of FOVs: modulating the optimal FOVs. In [11], the authors have mentioned that the deployment strategy of directional sensor nodes is critical to improve target detection and tracking accuracy. They presented the PIR sensor deployment in WSNs based on computational geometry. Byunghun and his workmates also show how the PIR sensors are deployed, which is very important for localizing an object using region-based tracking algorithm [12]. They discussed the PIR deployment that would divide the monitored room into different regions and how to deploy them determined the localization error. The work reported in [13] addresses the problem of target detection and classification using seismic and PIR sensors and makes use of wavelet-based feature extraction method to resolve this problem. The advantages and disadvantages of seismic and PIR sensors are also discussed. For example, the deployment of sensors largely depends on the intent of use and environment. PIR sensor deployment could be very expensive, because the detection range of PIR sensors has a short range of detection. Therefore, it is recommended that seismic and PIR sensor should be used together. In [14], PIR sensor nodes are deployed linearly and the sensing area is divided into cells through the four sensing regions of each PIR sensor node. In another study [15], five PIR sensors are attached to a service robot to make a circular sensing region. According to the experimental results stated in these studies, the usage of PIR sensors can improve the accuracy of target detection and tracking. Unlike real sensor nodes, most of the researches assume that sensor nodes have a 360° Angle of View (AoV). For example, a node deployment strategy that assumes PIR sensor nodes have 360° AoV is proposed in [7]. The performance of the proposed deployment algorithm is evaluated by comparing the coverage at the initial and final locations of sensor nodes.


## 2.2. GA for Sensor Placement

Sensor placement for indoor localization is an optimization problem that is nondeterministic and polynomial-time hard [16]. Genetic algorithms (GAs) are a type of evolutionary, optimization algorithm, which can be used to solve optimization problems with NP-hard complexity. Some previously developed algorithms have used GAs to obtain optimum deployment of sensor networks. The study in [17] presents a multiobjective genetic algorithm (MOGA) for optimal deployment of N static sensors in a 2D flat RoI, with two competing deployment objectives: maximizing the area coverage and maximizing lifetime. Each deployment layout was ranked according to its area coverage and lifetime. Different optimum layouts are obtained with respect to different sensing-to-communication range ratios. Reference [18] proposes a dynamic sensor nodes selection strategy, which uses the GA to implement global searching space of GA and ensure the validity of each chromosome. The two objectives of their fitness function are to maximize the coverage and minimize the area covered by more than one sensor. Liang et al. [19] have performed the optimization work for wireless sensor networks in 3D environments. In this work, a force driven genetic algorithm was introduced to decide the location of the sensors in order to obtain an optimized accessible space and also consider sensor coverage. Feng et al. propose an implementation of GA-based design approach for the deployment of the sensors and angles for the modulation of FOVs [20].


## 3. An Approach for Deploying PIR Sensor Using Genetic Algorithm

This section describes the approach that we propose to deal with the deployment issue of PIR-based positioning system. Two subsections are included in this part. Section3.1 describes how the proposed approach is used to build the accessible map based on the human visiting habits. And Section 3.2 illustrates how our approach is used to optimally deploy the PIR sensors with the accessible priority of each area in indoor environment.


### 3.1. Building Accessible Map by Human Daily Habits

Given a mock apartment for deploying, our approach for building an accessible map is executed by human daily habits by performing the following steps, as illustrated in Figure1.Figure 1
The flow chart of building the accessible map.Step 1.
The full description of space topography of the smart home to be monitored is provided, shown as in Figure1(a). This includes shape and size of the room layout, location of walls and furniture, and size of the areas in which the indoor environment is partitioned.Step 2.
The graphical characterization of the space topography is transformed into an accessible map, which can be used to resolve the accessible priority of each area in the smart home.Step 3.
The accessible map is provided as input of the GA so as to find as output the accessible priority in each area of the smart home. The image of the accessible map is resolved as follows.Step
3.1. The space topography is fixed for a given indoor environment. If some places are occupied by the walls or furniture such as beds, chairs, or refrigerators, people do not or rarely visit these positions. So the areas of the accessible map occupied by walls or furniture are set as “0.” For other areas without the furniture and other obstacles, the initial value of the accessible map is set as “0.5.” The results are shown as in Figure 1(b).Step
3.2. For the accessible areas in the smart home, not all positions have the same opportunities to be visited. We use another source of information, that is, the daily visiting habits of human subject when he interacts with the environment. Generally, the human subject visits more frequently around certain furniture. The mock apartment we designed has some key furniture: bedroom bed, living room couch, dining room chair, living room table, kitchen basin, and bathroom sink. The areas around the furniture have more visiting frequencies than other inner areas in the indoor environment.Step
3.3. Each two pieces of furniture can generate arbitrary route. Some daily routes are trained by A∗ algorithm [21]. The starting and ending landmarks can be (p1) entrance to kitchen, (p2) kitchen to living room table, (p3) major bedroom to guest room, (p4) living room sofa to bathroom, and (p5) guest room to balcony, shown as in Figure 1(c). Tests with different trajectories were processed. The areas in these trajectories have more accessible frequencies than other areas of the apartment. These values can be obtained by observation.Step
3.4. The last consideration is for transitions between the accessible areas and their surrounding areas. The accessible map value can be computed by convolution of the accessibility with a Gaussian kernel in two dimensions. The mean of the Gaussian kernel is the related wall’s position minus/plus 0.2 m, and the variance of the Gaussian kernel is 0.2 m. The equation can be described by(1)A_mapx,y=∑k=x-20x+20∑l=y+20y+20hx-k,y-l·A_mapk,l.Step 4.
Based on the prior knowledge, the accessible map can be represented in Figure1(d). The accessible map is discredited by the assumed occupant visits respective grid points. Each grid size is Δx×Δy, and Δx=Δy=0.2 m. The digital binary grey image of the heat “map” is shown as in Figure 1(d), denoted by the matrix B. Each element B(xi,yi) denotes the “heat” score of the ith grid point for deployed space if(2)Bxi,yi>0.That means theith grid point can be accessible. Then we generate the array Code to save the coordinate(3)Codei=xi,yi,where i∈[1,N_code], in which N_code is denoted by the accessible number of the deployed space. These array values will be used in the formulation of the optimization problem.


### 3.2. PIR Sensors Optimal Deployment Based GA-Based Algorithm

Genetic algorithm (GA) is a stochastic search technique that mimics the natural evolution proposed by Charles Darwin in 1858 [22]. GA has been successfully applied to a wide range of combination problems. It is modeled largely on the principles of the evolution via natural selection [23], employing a population of individuals that carry on the selection procedure in terms of variation-inducing operators such as mutation and recombination (crossover). A fitness function is used to evaluate individuals, and reproductive success varies with fitness. The main objective of employing the GA in our approach is to enhance the performance of the indoor location after initial deployment of the stationary nodes. The details are described as follows.


#### 3.2.1. PIR Sensor Parameters

The interested parameters of the PIR sensing model are represented with the use of a vectorp:(4)pi=xi,yi,zi,θiT,where the ith PIR sensor is placed on (xi,yi,zi) and the FOV of ith PIR sensor is denoted by θi. The PIR sensors are all fixed on the same ceiling and therefore omit the z-coordinate. If the z-coordinate is fixed, the FOV of the PIR sensor can be denoted by the radius R of sensing circle area. The PIR sensing area in our setup is modeled as a circle on the floor with a radius of 1 m. So the parameters of PIR deployment can be simply represented as (5)pi=xi,yiT.


#### 3.2.2. Chromosomes Modeling

Each chromosome, as a solution in the GA, represents a set of deployment locations of potential PIRs in the specific apartment. The gens of each chromosome are positive integer valuesgi that correspond to the location (xi,yi) of the ith PIR sensor on the x-y plane. For our specific mock apartment, we encode the grid points of the space in 2D view. The maximum of code is M. Each chromosome in our approach can be denoted by(6)C=g1,…,gi,…,gL,where L denotes the number of PIR sensors deployed and the gen gi denotes each PIR location code in the deployed plane, where 1≤gi≤M: (7)gi⟶xi,yi.For example, the grid of gi=11 represents PIR node mapped to the location (3, 3) in x-y plane; the corresponding chromosome is shown in Figure 2.Figure 2
The example of how to encode the gens of each chromosome.


#### 3.2.3. Fitness Function

The fitness function is used in order to choose the best fittest chromosomes for the purpose of reproduction of the next generated solutions by the GA. In our approach, the fitness function calculates the sum of “heat” scores for each grid point in thex-y plane of the specific space. The “heat” score hi equals the visiting frequency of each grid from the accessible map. Then the sum of all grids heat scores is calculated by decreasing plus strategy, which means the value of heat score is decreased by 1 if the coverage level increased and one limitation requirement is that the coverage level number is not greater than the hot rank of the position. Then this fitness function is given by(8)G=∑i=1N_heat∑jN_coveriH_rank⁡i+1-j2,N_coveri≤H_rank⁡i,where N_heat(i) denotes the number of the accessible grid points in the accessible map, N_cover(i) is the number of PIRs which covered the ith grid point, and H_rank⁡(i) denotes the heat score rank of the ith grid point.According to randomness and parallelism of evolution individual for PIR layouts, the overlapping probability of multiple PIRs sensing area is large. For this reason, the restriction condition for the numberNpnum(i) of overlapping PIR of the ith grid point is set. That means if Npnum(i) is greater than the maximum of threshold Npcmax, some punishments have been made. So the fitness function can be modified as(9)G=∑i=1N_heat∑j=1N_coveriH_rank⁡i+1-j2,N_coveri≤H_rank⁡i,N_coveri≤over,∑i=1N_heat∑j=1H_rank⁡iH_rank⁡i+1-j2-∑rank⁡i+1N_coverik·H_rank2i,H_rank⁡i≤over,N_coveri>H_rank⁡i,∑i=1N_heat∑j=1overH_rank⁡i+1-j2-∑over+1N_coverik·H_rank2i,H_rank⁡i>over,N_coveri>over.In this way, the problem of the optimal sensor deployment is formulated as(10)maximizeP⁡G.In order to avoid the prematurity of the population evolution phenomenon and keep the diversity of population, the fitness function is processed by the power function compression. Then the final expression of the fitness function is (11)f=finitialφ.φ denotes the compression scale(12)finitial=G,G>0,0.0001,G≤0.


#### 3.2.4. GA Selection

We use Roulette Wheel Selection (RMS) as the selection method, which gives to each individuali of the current population a probability of being selected [10], proportional to its fitness f(i):(13)pi=fi∑j=1nfi,where n denotes the population size in terms of the number of individuals. We used the fitness ratio calculated in (13) as a measure for ranking the chromosomes and then performing parent selection according to the ratio participated by each chromosome in the fitness function. The chromosomes with higher ranking have a higher probability to become parents and perform reproduction of new individuals than others with smaller ranking. This property must be maintained in order to increase the improvement ratio at each generation of the GA.


#### 3.2.5. GA Operator Operations

(a) Crossover. The crossover operator is a genetic operator that combines (mates) two chromosomes (parents) to produce a new chromosome (offspring). Arithmetic crossover (AC) operator is used for GA in our approach. Children are the weighted arithmetic mean of two parents. Children are feasible with respect to linear constraints and bounds. Alpha is random value in [0,1]. If parent 1 and parent 2 are the parents and parent 1 has better fitness value, the function returns the child and the formula is expressed in(14)gs=agi+1-agj,gd=1-agi+agj.Figure 3 shows the example of the arithmetic crossover operator by alpha = 0.3.Figure 3
The example of arithmetic crossover.Crossover occurs during evolution according to a user-definable crossover probabilitypc. pc is increased when the population tends to get stuck at a local optimum and decreased when the population is scattered in the solution space. Here pc is defined as follows:(15)pc=k1sin⁡π2·fmax-f′fmax-favg,f′>favg,k2,f′≤favg,where favg is an average fitness value of the population, fmax is maximum fitness value of the population, f′ is the largest of the fitness values of the solutions to be crossed, 0<k1, k2<1, and k2 is the default crossover probability. In order to make the optimal individual have higher crossover probability, pc is refined by (16)pc=pc2sin⁡π2·fmax-f′fmax-favg+pc1,f′>favg,pc2,f′≤favg.A threshold related with the current reproduction generation is(17)th=Mgen20·sin⁡π2·genMgen,where Mgen is the maximum value of reproduction generations, gen is the current value of reproduction generations, and Mgen/20 is an adaptive coefficient. We also define a variable repnum, which represents the holding time (reproduction generation) of the optimal individual of population. The last adaptive step for pc is (18)Pc=pc,repnum≤th,pc2,repnum>th.(b) Mutation. Mutation introduces random binary changes in a chromosome, which helps escape from local minima’s trap and maintains diversity in the population. For binary representation, a simple mutation can consist in inverting the value of each gene with a small probability. In this paper, an improved mechanism of mutation is introduced. Move the actual coordinates of randomly selected individuals representing a real gene; displacement amplitude is based on the individual fitness of scale. The larger the fitness of the individual chromosome is, the smaller the displacement amplitude would be. The probability of mutation is adjusted by using the following equation:(19)pm=pm1sin⁡π2·fmax-ffmax-fmin,where fmin is the minimum value of the chromosome fitness and pm1 is mutation probability constant. pm is only related to the displacement amplitude; the relationship is based on the following expression:(20)step=roundb·pm·l+1,where step denotes the displacement amplitude, b is random, and l represent displacement length: (21)Pm=pm,repnum≤th,pm1,repnum>th.


## 3.1. Building Accessible Map by Human Daily Habits

Given a mock apartment for deploying, our approach for building an accessible map is executed by human daily habits by performing the following steps, as illustrated in Figure1.Figure 1
The flow chart of building the accessible map.Step 1.
The full description of space topography of the smart home to be monitored is provided, shown as in Figure1(a). This includes shape and size of the room layout, location of walls and furniture, and size of the areas in which the indoor environment is partitioned.Step 2.
The graphical characterization of the space topography is transformed into an accessible map, which can be used to resolve the accessible priority of each area in the smart home.Step 3.
The accessible map is provided as input of the GA so as to find as output the accessible priority in each area of the smart home. The image of the accessible map is resolved as follows.Step
3.1. The space topography is fixed for a given indoor environment. If some places are occupied by the walls or furniture such as beds, chairs, or refrigerators, people do not or rarely visit these positions. So the areas of the accessible map occupied by walls or furniture are set as “0.” For other areas without the furniture and other obstacles, the initial value of the accessible map is set as “0.5.” The results are shown as in Figure 1(b).Step
3.2. For the accessible areas in the smart home, not all positions have the same opportunities to be visited. We use another source of information, that is, the daily visiting habits of human subject when he interacts with the environment. Generally, the human subject visits more frequently around certain furniture. The mock apartment we designed has some key furniture: bedroom bed, living room couch, dining room chair, living room table, kitchen basin, and bathroom sink. The areas around the furniture have more visiting frequencies than other inner areas in the indoor environment.Step
3.3. Each two pieces of furniture can generate arbitrary route. Some daily routes are trained by A∗ algorithm [21]. The starting and ending landmarks can be (p1) entrance to kitchen, (p2) kitchen to living room table, (p3) major bedroom to guest room, (p4) living room sofa to bathroom, and (p5) guest room to balcony, shown as in Figure 1(c). Tests with different trajectories were processed. The areas in these trajectories have more accessible frequencies than other areas of the apartment. These values can be obtained by observation.Step
3.4. The last consideration is for transitions between the accessible areas and their surrounding areas. The accessible map value can be computed by convolution of the accessibility with a Gaussian kernel in two dimensions. The mean of the Gaussian kernel is the related wall’s position minus/plus 0.2 m, and the variance of the Gaussian kernel is 0.2 m. The equation can be described by(1)A_mapx,y=∑k=x-20x+20∑l=y+20y+20hx-k,y-l·A_mapk,l.Step 4.
Based on the prior knowledge, the accessible map can be represented in Figure1(d). The accessible map is discredited by the assumed occupant visits respective grid points. Each grid size is Δx×Δy, and Δx=Δy=0.2 m. The digital binary grey image of the heat “map” is shown as in Figure 1(d), denoted by the matrix B. Each element B(xi,yi) denotes the “heat” score of the ith grid point for deployed space if(2)Bxi,yi>0.That means theith grid point can be accessible. Then we generate the array Code to save the coordinate(3)Codei=xi,yi,where i∈[1,N_code], in which N_code is denoted by the accessible number of the deployed space. These array values will be used in the formulation of the optimization problem.


## 3.2. PIR Sensors Optimal Deployment Based GA-Based Algorithm

Genetic algorithm (GA) is a stochastic search technique that mimics the natural evolution proposed by Charles Darwin in 1858 [22]. GA has been successfully applied to a wide range of combination problems. It is modeled largely on the principles of the evolution via natural selection [23], employing a population of individuals that carry on the selection procedure in terms of variation-inducing operators such as mutation and recombination (crossover). A fitness function is used to evaluate individuals, and reproductive success varies with fitness. The main objective of employing the GA in our approach is to enhance the performance of the indoor location after initial deployment of the stationary nodes. The details are described as follows.


### 3.2.1. PIR Sensor Parameters

The interested parameters of the PIR sensing model are represented with the use of a vectorp:(4)pi=xi,yi,zi,θiT,where the ith PIR sensor is placed on (xi,yi,zi) and the FOV of ith PIR sensor is denoted by θi. The PIR sensors are all fixed on the same ceiling and therefore omit the z-coordinate. If the z-coordinate is fixed, the FOV of the PIR sensor can be denoted by the radius R of sensing circle area. The PIR sensing area in our setup is modeled as a circle on the floor with a radius of 1 m. So the parameters of PIR deployment can be simply represented as (5)pi=xi,yiT.


### 3.2.2. Chromosomes Modeling

Each chromosome, as a solution in the GA, represents a set of deployment locations of potential PIRs in the specific apartment. The gens of each chromosome are positive integer valuesgi that correspond to the location (xi,yi) of the ith PIR sensor on the x-y plane. For our specific mock apartment, we encode the grid points of the space in 2D view. The maximum of code is M. Each chromosome in our approach can be denoted by(6)C=g1,…,gi,…,gL,where L denotes the number of PIR sensors deployed and the gen gi denotes each PIR location code in the deployed plane, where 1≤gi≤M: (7)gi⟶xi,yi.For example, the grid of gi=11 represents PIR node mapped to the location (3, 3) in x-y plane; the corresponding chromosome is shown in Figure 2.Figure 2
The example of how to encode the gens of each chromosome.


### 3.2.3. Fitness Function

The fitness function is used in order to choose the best fittest chromosomes for the purpose of reproduction of the next generated solutions by the GA. In our approach, the fitness function calculates the sum of “heat” scores for each grid point in thex-y plane of the specific space. The “heat” score hi equals the visiting frequency of each grid from the accessible map. Then the sum of all grids heat scores is calculated by decreasing plus strategy, which means the value of heat score is decreased by 1 if the coverage level increased and one limitation requirement is that the coverage level number is not greater than the hot rank of the position. Then this fitness function is given by(8)G=∑i=1N_heat∑jN_coveriH_rank⁡i+1-j2,N_coveri≤H_rank⁡i,where N_heat(i) denotes the number of the accessible grid points in the accessible map, N_cover(i) is the number of PIRs which covered the ith grid point, and H_rank⁡(i) denotes the heat score rank of the ith grid point.According to randomness and parallelism of evolution individual for PIR layouts, the overlapping probability of multiple PIRs sensing area is large. For this reason, the restriction condition for the numberNpnum(i) of overlapping PIR of the ith grid point is set. That means if Npnum(i) is greater than the maximum of threshold Npcmax, some punishments have been made. So the fitness function can be modified as(9)G=∑i=1N_heat∑j=1N_coveriH_rank⁡i+1-j2,N_coveri≤H_rank⁡i,N_coveri≤over,∑i=1N_heat∑j=1H_rank⁡iH_rank⁡i+1-j2-∑rank⁡i+1N_coverik·H_rank2i,H_rank⁡i≤over,N_coveri>H_rank⁡i,∑i=1N_heat∑j=1overH_rank⁡i+1-j2-∑over+1N_coverik·H_rank2i,H_rank⁡i>over,N_coveri>over.In this way, the problem of the optimal sensor deployment is formulated as(10)maximizeP⁡G.In order to avoid the prematurity of the population evolution phenomenon and keep the diversity of population, the fitness function is processed by the power function compression. Then the final expression of the fitness function is (11)f=finitialφ.φ denotes the compression scale(12)finitial=G,G>0,0.0001,G≤0.


### 3.2.4. GA Selection

We use Roulette Wheel Selection (RMS) as the selection method, which gives to each individuali of the current population a probability of being selected [10], proportional to its fitness f(i):(13)pi=fi∑j=1nfi,where n denotes the population size in terms of the number of individuals. We used the fitness ratio calculated in (13) as a measure for ranking the chromosomes and then performing parent selection according to the ratio participated by each chromosome in the fitness function. The chromosomes with higher ranking have a higher probability to become parents and perform reproduction of new individuals than others with smaller ranking. This property must be maintained in order to increase the improvement ratio at each generation of the GA.


### 3.2.5. GA Operator Operations

(a) Crossover. The crossover operator is a genetic operator that combines (mates) two chromosomes (parents) to produce a new chromosome (offspring). Arithmetic crossover (AC) operator is used for GA in our approach. Children are the weighted arithmetic mean of two parents. Children are feasible with respect to linear constraints and bounds. Alpha is random value in [0,1]. If parent 1 and parent 2 are the parents and parent 1 has better fitness value, the function returns the child and the formula is expressed in(14)gs=agi+1-agj,gd=1-agi+agj.Figure 3 shows the example of the arithmetic crossover operator by alpha = 0.3.Figure 3
The example of arithmetic crossover.Crossover occurs during evolution according to a user-definable crossover probabilitypc. pc is increased when the population tends to get stuck at a local optimum and decreased when the population is scattered in the solution space. Here pc is defined as follows:(15)pc=k1sin⁡π2·fmax-f′fmax-favg,f′>favg,k2,f′≤favg,where favg is an average fitness value of the population, fmax is maximum fitness value of the population, f′ is the largest of the fitness values of the solutions to be crossed, 0<k1, k2<1, and k2 is the default crossover probability. In order to make the optimal individual have higher crossover probability, pc is refined by (16)pc=pc2sin⁡π2·fmax-f′fmax-favg+pc1,f′>favg,pc2,f′≤favg.A threshold related with the current reproduction generation is(17)th=Mgen20·sin⁡π2·genMgen,where Mgen is the maximum value of reproduction generations, gen is the current value of reproduction generations, and Mgen/20 is an adaptive coefficient. We also define a variable repnum, which represents the holding time (reproduction generation) of the optimal individual of population. The last adaptive step for pc is (18)Pc=pc,repnum≤th,pc2,repnum>th.(b) Mutation. Mutation introduces random binary changes in a chromosome, which helps escape from local minima’s trap and maintains diversity in the population. For binary representation, a simple mutation can consist in inverting the value of each gene with a small probability. In this paper, an improved mechanism of mutation is introduced. Move the actual coordinates of randomly selected individuals representing a real gene; displacement amplitude is based on the individual fitness of scale. The larger the fitness of the individual chromosome is, the smaller the displacement amplitude would be. The probability of mutation is adjusted by using the following equation:(19)pm=pm1sin⁡π2·fmax-ffmax-fmin,where fmin is the minimum value of the chromosome fitness and pm1 is mutation probability constant. pm is only related to the displacement amplitude; the relationship is based on the following expression:(20)step=roundb·pm·l+1,where step denotes the displacement amplitude, b is random, and l represent displacement length: (21)Pm=pm,repnum≤th,pm1,repnum>th.


## 3.2.1. PIR Sensor Parameters

The interested parameters of the PIR sensing model are represented with the use of a vectorp:(4)pi=xi,yi,zi,θiT,where the ith PIR sensor is placed on (xi,yi,zi) and the FOV of ith PIR sensor is denoted by θi. The PIR sensors are all fixed on the same ceiling and therefore omit the z-coordinate. If the z-coordinate is fixed, the FOV of the PIR sensor can be denoted by the radius R of sensing circle area. The PIR sensing area in our setup is modeled as a circle on the floor with a radius of 1 m. So the parameters of PIR deployment can be simply represented as (5)pi=xi,yiT.


## 3.2.2. Chromosomes Modeling

Each chromosome, as a solution in the GA, represents a set of deployment locations of potential PIRs in the specific apartment. The gens of each chromosome are positive integer valuesgi that correspond to the location (xi,yi) of the ith PIR sensor on the x-y plane. For our specific mock apartment, we encode the grid points of the space in 2D view. The maximum of code is M. Each chromosome in our approach can be denoted by(6)C=g1,…,gi,…,gL,where L denotes the number of PIR sensors deployed and the gen gi denotes each PIR location code in the deployed plane, where 1≤gi≤M: (7)gi⟶xi,yi.For example, the grid of gi=11 represents PIR node mapped to the location (3, 3) in x-y plane; the corresponding chromosome is shown in Figure 2.Figure 2
The example of how to encode the gens of each chromosome.


## 3.2.3. Fitness Function

The fitness function is used in order to choose the best fittest chromosomes for the purpose of reproduction of the next generated solutions by the GA. In our approach, the fitness function calculates the sum of “heat” scores for each grid point in thex-y plane of the specific space. The “heat” score hi equals the visiting frequency of each grid from the accessible map. Then the sum of all grids heat scores is calculated by decreasing plus strategy, which means the value of heat score is decreased by 1 if the coverage level increased and one limitation requirement is that the coverage level number is not greater than the hot rank of the position. Then this fitness function is given by(8)G=∑i=1N_heat∑jN_coveriH_rank⁡i+1-j2,N_coveri≤H_rank⁡i,where N_heat(i) denotes the number of the accessible grid points in the accessible map, N_cover(i) is the number of PIRs which covered the ith grid point, and H_rank⁡(i) denotes the heat score rank of the ith grid point.According to randomness and parallelism of evolution individual for PIR layouts, the overlapping probability of multiple PIRs sensing area is large. For this reason, the restriction condition for the numberNpnum(i) of overlapping PIR of the ith grid point is set. That means if Npnum(i) is greater than the maximum of threshold Npcmax, some punishments have been made. So the fitness function can be modified as(9)G=∑i=1N_heat∑j=1N_coveriH_rank⁡i+1-j2,N_coveri≤H_rank⁡i,N_coveri≤over,∑i=1N_heat∑j=1H_rank⁡iH_rank⁡i+1-j2-∑rank⁡i+1N_coverik·H_rank2i,H_rank⁡i≤over,N_coveri>H_rank⁡i,∑i=1N_heat∑j=1overH_rank⁡i+1-j2-∑over+1N_coverik·H_rank2i,H_rank⁡i>over,N_coveri>over.In this way, the problem of the optimal sensor deployment is formulated as(10)maximizeP⁡G.In order to avoid the prematurity of the population evolution phenomenon and keep the diversity of population, the fitness function is processed by the power function compression. Then the final expression of the fitness function is (11)f=finitialφ.φ denotes the compression scale(12)finitial=G,G>0,0.0001,G≤0.


## 3.2.4. GA Selection

We use Roulette Wheel Selection (RMS) as the selection method, which gives to each individuali of the current population a probability of being selected [10], proportional to its fitness f(i):(13)pi=fi∑j=1nfi,where n denotes the population size in terms of the number of individuals. We used the fitness ratio calculated in (13) as a measure for ranking the chromosomes and then performing parent selection according to the ratio participated by each chromosome in the fitness function. The chromosomes with higher ranking have a higher probability to become parents and perform reproduction of new individuals than others with smaller ranking. This property must be maintained in order to increase the improvement ratio at each generation of the GA.


## 3.2.5. GA Operator Operations

(a) Crossover. The crossover operator is a genetic operator that combines (mates) two chromosomes (parents) to produce a new chromosome (offspring). Arithmetic crossover (AC) operator is used for GA in our approach. Children are the weighted arithmetic mean of two parents. Children are feasible with respect to linear constraints and bounds. Alpha is random value in [0,1]. If parent 1 and parent 2 are the parents and parent 1 has better fitness value, the function returns the child and the formula is expressed in(14)gs=agi+1-agj,gd=1-agi+agj.Figure 3 shows the example of the arithmetic crossover operator by alpha = 0.3.Figure 3
The example of arithmetic crossover.Crossover occurs during evolution according to a user-definable crossover probabilitypc. pc is increased when the population tends to get stuck at a local optimum and decreased when the population is scattered in the solution space. Here pc is defined as follows:(15)pc=k1sin⁡π2·fmax-f′fmax-favg,f′>favg,k2,f′≤favg,where favg is an average fitness value of the population, fmax is maximum fitness value of the population, f′ is the largest of the fitness values of the solutions to be crossed, 0<k1, k2<1, and k2 is the default crossover probability. In order to make the optimal individual have higher crossover probability, pc is refined by (16)pc=pc2sin⁡π2·fmax-f′fmax-favg+pc1,f′>favg,pc2,f′≤favg.A threshold related with the current reproduction generation is(17)th=Mgen20·sin⁡π2·genMgen,where Mgen is the maximum value of reproduction generations, gen is the current value of reproduction generations, and Mgen/20 is an adaptive coefficient. We also define a variable repnum, which represents the holding time (reproduction generation) of the optimal individual of population. The last adaptive step for pc is (18)Pc=pc,repnum≤th,pc2,repnum>th.(b) Mutation. Mutation introduces random binary changes in a chromosome, which helps escape from local minima’s trap and maintains diversity in the population. For binary representation, a simple mutation can consist in inverting the value of each gene with a small probability. In this paper, an improved mechanism of mutation is introduced. Move the actual coordinates of randomly selected individuals representing a real gene; displacement amplitude is based on the individual fitness of scale. The larger the fitness of the individual chromosome is, the smaller the displacement amplitude would be. The probability of mutation is adjusted by using the following equation:(19)pm=pm1sin⁡π2·fmax-ffmax-fmin,where fmin is the minimum value of the chromosome fitness and pm1 is mutation probability constant. pm is only related to the displacement amplitude; the relationship is based on the following expression:(20)step=roundb·pm·l+1,where step denotes the displacement amplitude, b is random, and l represent displacement length: (21)Pm=pm,repnum≤th,pm1,repnum>th.


## 4. Simulation Results

The objective of this work is to have an optimal deployment for PIR-based indoor localization. We consider in the simulation 12 m× 7.2 m area. The thickness of wall is 0.2 m and the door of all the space, such as the kitchen and bathroom, is 0.2×1.0 m. By calculating exact size of various places, all the possible coverage area for PIR sensors is 75.12 m2. The PIR sensing area in this setup is a shape of circle on the floor with a radius of 1 m. Table 1 summarizes the parameters in the implementation of GA. These parameters were obtained empirically after several experiences.Table 1
Setting for GA parameters.
Population size
300 individuals
Generations
400
Individual chromosome length
2–10
Crossover probability
P
c
1 = 0.1  Pc2 = 0.9
Mutation probability
P
m
2 = 0.5
PIR sensor radius
1 meter
Overlapping penalty coefficient
k
=
7
Heat layered ranking
4
Coverage layer constraint
2In order to analyze the performance of our method, several simulation experiments were conducted for the performance evaluation. Hence, we compared the simulation running time and fitness function value when the deployed PIR sensors’ number is different for the special indoor environment first. Then we investigated how the accessible heatmap rank affects the PIR deployment in case of a given scenario. Next, we took a closer look at how to keep the tradeoff between the coverage and overlap of the PIR sensing area. And finally, we compared the performance of three deployment methods.


### 4.1. The Number of PIRs for Optimal Deployment

The first experiment analyzed the effect of PIR sensors’ number. As expected, the PIR sensors’ number increased the algorithm run time proportionally, listed as in Table2. In case of a given indoor environment, when the PIR sensors’ number is lower than 7, the increase in the number of deployed PIR sensors will not affect the deployment of PIR sensors. However, the number of PIR sensors is larger than 7 and the deployment of PIR sensor will vary with the PIR sensor numbers. In our lab, the PIR sensors’ number needs to be determined according to the fitness function.Table 2
PIR sensors’ deployment versus the PIR sensors’ number.
PIR number
PIR 1
PIR 2
PIR 3
PIR 4
PIR 5
PIR 6
PIR 7
PIR 8
PIR 9
PIR 10
Best fit
Running time
2
(15, 27)
(15, 36)
8.9111
3 min
3
(15, 27)
(15, 36)
(18, 11)
9.9193
4 min
4
(15, 27)
(15, 36)
(18, 11)
(20, 49)
10.6935
5 min
5
(15, 27)
(15, 36)
(18, 11)
(20, 49)
(30, 24)
11.3356
6 min
6
(15, 27)
(15, 36)
(18, 11)
(20, 49)
(30, 24)
(27, 37)
11.9006
7 min
7
(15, 27)
(17, 36)
(18, 11)
(20, 49)
(30, 24)
(27, 37)
(10, 36)
12.3653
8 min
8
(15, 27)
(17, 36)
(18, 11)
(20, 49)
(30, 24)
(27, 37)
(10, 36)
(30, 13)
12.7523
9 min
9
(14, 28)
(17, 37)
(18, 11)
(20, 49)
(30, 24)
(27, 37)
( 9, 36)
(30, 13)
(20, 26)
13.0892
10 min
10
(14, 28)
(17, 37)
(18, 11)
(21, 48)
(27, 37)
(30, 24)
(9, 36)
(19, 26)
(30, 13)
(15, 54)
13.3965
11 minIn Figure4, the fitness value changes for different population size and PIR sensors’ number. As is shown, a specific plot represents the fitness versus time under the fixed PIR sensor number. There are three sections in one curve. Section I shows the reproduction in region A, Section II shows the reproduction in region B, and Section III represents the results of mutation with region A and region B. The fitness increases as the PIR sensor number increases.Figure 4
Fitness curves of GA versus PIR number.


### 4.2. Effect of Rank of the Accessible Heatmap

The second experiment was performed to understand the effect of the accessible heatmap score rank. The heat scoreS is used to equally divide the original heat zones based on the different degrees of heat. With the heat range being fixed, the corresponding heat division would be accurate when S increases. This can effectively eliminate the multiple priority layouts. Because our rule is that only the low rate zones’ overlap should be punished, the relatively low rate heat range’s decrease will lead to the increase of the PIR overlap range. Therefore, the experiment was done to get an appropriate S. The number of PIR sensors is set as 10 in the following experiments. ri denotes the rank of “heat” score of the ith grid point, related to the accessible frequency of the areas. According to the “heat” score range of the accessible map, a set of values {r1,…,rS} is defined. S is the scale size of the “heat” score range. The value of ri increases as the “heat” score of the grid point is larger. Figure 5(a) shows the accessible map at rank S = 4, and Figure 5(b) describes the corresponding PIR sensor deployment.Figure 5
Quantization effect of the heatmap at different degree and corresponding PIR deployment.
(a)
Quantization effect of heatmap atS=4
(b)
PIR deployment atS=4
(c)
Quantization effect of heatmap atS=6
(d)
PIR deployment atS=6
(e)
Quantization effect of heatmap atS=8
(f)
PIR deployment atS=8Figure5 directly presents the features of the PIR layout when S is set as different numbers. When more accurate heat stratification is needed to eliminate the multiple priority, one method is to increase the rank S. Figures 5(c) and 5(e) show that the heat stratification is growing accurate with the increase of the rank S. However, increasing the rank will make the PIR layout tend to overlap. Compared to Figures 5(b) and 5(d), the appropriate overlap theory can enhance the localization accuracy. But this increasing to a certain degree, serious overlap would occur, shown as in Figure 5(f). At this point, it is the same as accuracy. After comparison, the heatmap rank degree is set as 6.


### 4.3. PIR Coverage and Overlap Rate by Different PIR Number

The third experiment examined the effect of the PIR sensors’ number against the sensing coverage and overlap. Three parameters are defined to evaluate the effect of PIR sensor number on the sensor coverage. They are listed as follows:(a)
Maximum coverage ratioRcov_max is the ratio of area that can be covered by all PIRs without overlap ACovered over the entire sensing field ATotal:(22)Rcov_max=ACoveredATotal.(b)
Actual coverage ratecact, which is defined as sum of PIRs sensing areas based on the solution deployment csp over the deployment area of the specific space s: (23)cact=csps.(c)
Overlap rateoc, which is defined as the sum of PIRs overlap areas ocp over sum of PIRs sensing areas based on the solution deployment csp:(24)oc=ocpcsp.The results can be seen in Table3. The value oc is not too large when the PIRs number is less than 8. The results show that the rule of increasing PIR coverage has more priority; the proposed algorithm improves the coverage of PIRs to enhance indoor localization. There is no change in overlap rate when the PIRs number is 8 to 10. However, if the number of PIRs is greater than 10, the oc will increase. So the optimal number of PIRs for our simulation experiment is 10.Table 3
Evaluation parameters for PIR coverage and overlap rate.
PIR number
2
3
4
5
6
7
8
9
10
11
c
max
⁡
0.0836
0.1255
0.1673
0.2091
0.2509
0.2927
0.3346
0.3764
0.4182
0.4600
c
act
0.0829
0.1247
0.1666
0.1960
0.2377
0.2795
0.3149
0.3567
0.3903
0.4151
o
c
0.0094
0.0063
0.0043
0.0667
0.0556
0.0473
0.0625
0.0552
0.0714
0.1083The data in Table3 indicate that the overlap rate is small and there occurs no overrated overlap if PIRs number is lower than 8. This shows that the overlap rate tends to be low if the PIRs number is small, which goes in line with the coverage priority principle. That is, the coverage needs to be more if there are fewer PIRs. The overlap rate and overrated overlap remain unchangeable when the PIRs number is 8, 9, or 10. At this point, the result would be superb if the PIRs number is 10 based on the actual coverage choice standard. The actual coverage does not increase much and the overrated overlap is high when the PIRs number increases to 11. Compared to the outcome of the PIRs number being 10, the localization accuracy has not much increased. Hence, we would believe the best PIRs number which is 10 would be the best layout.


### 4.4. Performance by Three Deployment Methods

In the last experiment, changes in the fitness by GA, greedy algorithm, and manual random deployment were observed. The performance curves by three various PIR deployment algorithms are presented in Figure6. The green curve is with the GA method and the red and blue curves are represented by greedy algorithm and random deployment, respectively. Our purpose is to find a common way to solve the PIR sensor layout problem from simple to complex. When people do not know how to make PIR sensor layout, the simplest way is to put them in an optional space by random deployment. Then, the possible method is to place the sensor according to the fitness value in order which is named greedy algorithm. After careful consideration of the previous method, it can be found that all the sensors are not placed at the same time, so it is likely to lead to a local optimal state. GA is a parallel algorithm which can solve this problem easily. Although the performance between GA and greedy algorithm is similar at the beginning, the gap is increasing with the increase of the number of PIR sensors. In fact, the gap has a greater impact on the accuracy of the location experiment when the sensor layout is determined. The results show the PIR sensors layout is not ideal by manual random deployment and also not stable. As the PIR sensors number increases, the performance by our proposed method is better than the other two.Figure 6
The fitness curves by GA, greedy algorithm, and manual random deployment.


## 4.1. The Number of PIRs for Optimal Deployment

The first experiment analyzed the effect of PIR sensors’ number. As expected, the PIR sensors’ number increased the algorithm run time proportionally, listed as in Table2. In case of a given indoor environment, when the PIR sensors’ number is lower than 7, the increase in the number of deployed PIR sensors will not affect the deployment of PIR sensors. However, the number of PIR sensors is larger than 7 and the deployment of PIR sensor will vary with the PIR sensor numbers. In our lab, the PIR sensors’ number needs to be determined according to the fitness function.Table 2
PIR sensors’ deployment versus the PIR sensors’ number.
PIR number
PIR 1
PIR 2
PIR 3
PIR 4
PIR 5
PIR 6
PIR 7
PIR 8
PIR 9
PIR 10
Best fit
Running time
2
(15, 27)
(15, 36)
8.9111
3 min
3
(15, 27)
(15, 36)
(18, 11)
9.9193
4 min
4
(15, 27)
(15, 36)
(18, 11)
(20, 49)
10.6935
5 min
5
(15, 27)
(15, 36)
(18, 11)
(20, 49)
(30, 24)
11.3356
6 min
6
(15, 27)
(15, 36)
(18, 11)
(20, 49)
(30, 24)
(27, 37)
11.9006
7 min
7
(15, 27)
(17, 36)
(18, 11)
(20, 49)
(30, 24)
(27, 37)
(10, 36)
12.3653
8 min
8
(15, 27)
(17, 36)
(18, 11)
(20, 49)
(30, 24)
(27, 37)
(10, 36)
(30, 13)
12.7523
9 min
9
(14, 28)
(17, 37)
(18, 11)
(20, 49)
(30, 24)
(27, 37)
( 9, 36)
(30, 13)
(20, 26)
13.0892
10 min
10
(14, 28)
(17, 37)
(18, 11)
(21, 48)
(27, 37)
(30, 24)
(9, 36)
(19, 26)
(30, 13)
(15, 54)
13.3965
11 minIn Figure4, the fitness value changes for different population size and PIR sensors’ number. As is shown, a specific plot represents the fitness versus time under the fixed PIR sensor number. There are three sections in one curve. Section I shows the reproduction in region A, Section II shows the reproduction in region B, and Section III represents the results of mutation with region A and region B. The fitness increases as the PIR sensor number increases.Figure 4
Fitness curves of GA versus PIR number.


## 4.2. Effect of Rank of the Accessible Heatmap

The second experiment was performed to understand the effect of the accessible heatmap score rank. The heat scoreS is used to equally divide the original heat zones based on the different degrees of heat. With the heat range being fixed, the corresponding heat division would be accurate when S increases. This can effectively eliminate the multiple priority layouts. Because our rule is that only the low rate zones’ overlap should be punished, the relatively low rate heat range’s decrease will lead to the increase of the PIR overlap range. Therefore, the experiment was done to get an appropriate S. The number of PIR sensors is set as 10 in the following experiments. ri denotes the rank of “heat” score of the ith grid point, related to the accessible frequency of the areas. According to the “heat” score range of the accessible map, a set of values {r1,…,rS} is defined. S is the scale size of the “heat” score range. The value of ri increases as the “heat” score of the grid point is larger. Figure 5(a) shows the accessible map at rank S = 4, and Figure 5(b) describes the corresponding PIR sensor deployment.Figure 5
Quantization effect of the heatmap at different degree and corresponding PIR deployment.
(a)
Quantization effect of heatmap atS=4
(b)
PIR deployment atS=4
(c)
Quantization effect of heatmap atS=6
(d)
PIR deployment atS=6
(e)
Quantization effect of heatmap atS=8
(f)
PIR deployment atS=8Figure5 directly presents the features of the PIR layout when S is set as different numbers. When more accurate heat stratification is needed to eliminate the multiple priority, one method is to increase the rank S. Figures 5(c) and 5(e) show that the heat stratification is growing accurate with the increase of the rank S. However, increasing the rank will make the PIR layout tend to overlap. Compared to Figures 5(b) and 5(d), the appropriate overlap theory can enhance the localization accuracy. But this increasing to a certain degree, serious overlap would occur, shown as in Figure 5(f). At this point, it is the same as accuracy. After comparison, the heatmap rank degree is set as 6.


## 4.3. PIR Coverage and Overlap Rate by Different PIR Number

The third experiment examined the effect of the PIR sensors’ number against the sensing coverage and overlap. Three parameters are defined to evaluate the effect of PIR sensor number on the sensor coverage. They are listed as follows:(a)
Maximum coverage ratioRcov_max is the ratio of area that can be covered by all PIRs without overlap ACovered over the entire sensing field ATotal:(22)Rcov_max=ACoveredATotal.(b)
Actual coverage ratecact, which is defined as sum of PIRs sensing areas based on the solution deployment csp over the deployment area of the specific space s: (23)cact=csps.(c)
Overlap rateoc, which is defined as the sum of PIRs overlap areas ocp over sum of PIRs sensing areas based on the solution deployment csp:(24)oc=ocpcsp.The results can be seen in Table3. The value oc is not too large when the PIRs number is less than 8. The results show that the rule of increasing PIR coverage has more priority; the proposed algorithm improves the coverage of PIRs to enhance indoor localization. There is no change in overlap rate when the PIRs number is 8 to 10. However, if the number of PIRs is greater than 10, the oc will increase. So the optimal number of PIRs for our simulation experiment is 10.Table 3
Evaluation parameters for PIR coverage and overlap rate.
PIR number
2
3
4
5
6
7
8
9
10
11
c
max
⁡
0.0836
0.1255
0.1673
0.2091
0.2509
0.2927
0.3346
0.3764
0.4182
0.4600
c
act
0.0829
0.1247
0.1666
0.1960
0.2377
0.2795
0.3149
0.3567
0.3903
0.4151
o
c
0.0094
0.0063
0.0043
0.0667
0.0556
0.0473
0.0625
0.0552
0.0714
0.1083The data in Table3 indicate that the overlap rate is small and there occurs no overrated overlap if PIRs number is lower than 8. This shows that the overlap rate tends to be low if the PIRs number is small, which goes in line with the coverage priority principle. That is, the coverage needs to be more if there are fewer PIRs. The overlap rate and overrated overlap remain unchangeable when the PIRs number is 8, 9, or 10. At this point, the result would be superb if the PIRs number is 10 based on the actual coverage choice standard. The actual coverage does not increase much and the overrated overlap is high when the PIRs number increases to 11. Compared to the outcome of the PIRs number being 10, the localization accuracy has not much increased. Hence, we would believe the best PIRs number which is 10 would be the best layout.


## 4.4. Performance by Three Deployment Methods

In the last experiment, changes in the fitness by GA, greedy algorithm, and manual random deployment were observed. The performance curves by three various PIR deployment algorithms are presented in Figure6. The green curve is with the GA method and the red and blue curves are represented by greedy algorithm and random deployment, respectively. Our purpose is to find a common way to solve the PIR sensor layout problem from simple to complex. When people do not know how to make PIR sensor layout, the simplest way is to put them in an optional space by random deployment. Then, the possible method is to place the sensor according to the fitness value in order which is named greedy algorithm. After careful consideration of the previous method, it can be found that all the sensors are not placed at the same time, so it is likely to lead to a local optimal state. GA is a parallel algorithm which can solve this problem easily. Although the performance between GA and greedy algorithm is similar at the beginning, the gap is increasing with the increase of the number of PIR sensors. In fact, the gap has a greater impact on the accuracy of the location experiment when the sensor layout is determined. The results show the PIR sensors layout is not ideal by manual random deployment and also not stable. As the PIR sensors number increases, the performance by our proposed method is better than the other two.Figure 6
The fitness curves by GA, greedy algorithm, and manual random deployment.


## 5. Conclusion

The main contribution of this paper was to optimize the coverage in sensor networks considering area accessible frequency. The GA we proposed to solve the coverage problem defined in this study stands out with its novel fitness function, which is quickly calculable and based on area priority. Additionally, the proposed optimizations are novel approaches that we introduced in this study that allow for faster convergence of the solutions. The actual coverage rate is 39.03%, and overlap rate is 7.14% when the number of PIR sensors is 10. The running time of our method for PIR sensor layout is greater than 10 minutes. It will increase according to the number of PIR sensors. In the future, we tried to obtain the PIR sensors layout by the multiobject function and some considerations will be placed on the efficacy of the algorithm.



---

*Source: 146270-2015-11-26.xml*