{'fraction_non_alphanumeric': 0.026189715745768127, 'fraction_numerical': 0.010499840306611306, 'mean_word_length': 4.856675239653963, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
WOAIP: Wireless Optimization Algorithm for Indoor Placement Based on Binary Particle Swarm Optimization (BPSO)

Optimizing the Access Point (AP) deployment has a great role in wireless applications due to the need for providing an efficient communication with low deployment costs. Quality of Service (QoS), is a major significant parameter and objective to be considered along with AP placement as well the overall deployment cost. This study proposes and investigates a multi-level optimization algorithm called Wireless Optimization Algorithm for Indoor Placement (WOAIP) based on Binary Particle Swarm Optimization (BPSO). WOAIP aims to obtain the optimum AP multi-floor placement with effective coverage that makes it more capable of supporting QoS and cost-effectiveness. Five pairs (coverage, AP deployment) of weights, signal thresholds and received signal strength (RSS) measurements simulated using Wireless InSite (WI) software were considered in the test case study by comparing the results collected from WI with the present wireless simulated physical AP deployment of the targeted building Computer Science Department at University of Baghdad. The performance evaluation of WOAIP shows an increase in terms of AP placement and optimization distinguished in order to increase the wireless coverage ratio to 92.93% compared to 58.5% of present AP coverage (or 24.5% coverage enhancement on average).


Introduction:
During the past few years, wireless communication has been widely developed and has gained more attention to study the propagation characteristics of wireless signals in indoor and outdoor environments 1,2 . As a result, the evolution of wireless technology has bought several advantages such as cost effectiveness, flexibility, speed, and accessibility 3 . Hence, several types of wireless technologies have been used in the indoor environment in order to achieve communication purposes that can provide a vast range of applications for user mobility, easy to setup, and terminal reconfiguration 4 .
The implementation of proper planning for the deployment of the network has a great role in improving different network features. These features include better coverage, high-security, low latency, a higher bandwidth, and reducing energy consumption 5 . The most important factor of proper planning was the access point placement optimization devices, where it has a significant impact on the coverage optimization, operation, and management of the networks more than the development of characteristics behavior of wireless networks 6 . It is worth mentioning that the location of the AP device in Wireless Local Area Network (WLAN) has improved a wide range of purposes such as locating the non-functional AP devices and estimating the propagation characteristics of the wireless signal 7 .
Indoor based communication scenario suffers from many challenges due to the complexity of these indoor environments. These challenges can be summarized in the serious effects of different building materials including the wall thickness on signal penetration inside the building. Moreover, the effects of various sources of interference caused by improper AP and channel configuration 7 . Additionally, the Multipath Propagation (MP) describes the process of receiving several copies of the original signal distributed over varying time delays and attenuation caused by the reflection, diffraction and diffusion of these signals 8 . The ongoing signal from multiple paths can be easily interrupted by different moving objects, obstacles, furniture, and the body of the device holder 9 . Therefore, the need for efficient optimization techniques suggested to optimize the AP position and to cover the entire target area with a minimum number of AP devices in order to control the cost and interferences besides the reduction of the dead zones.
This study implements an optimization algorithm using binary particle swarm optimization (BPSO) based on a multi-objective function, where two parameters called RSS and an initial number of candidate APs are considered in the design of our proposed algorithm.
The current work aims to propose an optimization algorithm for AP deployment with respect to its locations and coverage for indoor targeted building. The rest of the paper is organized as follows: first, the related work withdrawn with the most dedicated works proposed by authors within the same research field. Then, the methodology is demonstrated along with the requirement analysis, case study, and the analysis of the proposed WOAIP algorithm. After that, the discussion and validation of results are clarified. Finally, this study ends with conclusions.

Related Work:
Many comprehensive studies have been carried out by many researchers to obtain the optimum deployment of AP devices by using various optimization methods. For example, the researchers in 10 presented a methodology for the validation of a wireless propagation model based on the use of the Ray-Tracing (RT) approach by using Wireless InSite (WI) software. The results that have obtained are compared to the results of a statistical model that show an accuracy increase in Radio Frequency (RF) prediction for the propagation in indoor environment.
The researchers in 11 investigated a method for the deployment of AP in WLAN based on RT approach. Their work deployed a genetic algorithm (GA) as an optimization method to estimate the best AP locations concerning a specific cost function. Their objective was to increase the coverage area in a 2-dimensional environment but they excluded the Non-Line-of-Sight (NLoS) environment where the investigation targeted a flat area with only Line-of-Sight (LoS) environment. As a result, GA has achieved substantial work, however a drawback of using this algorithm has been stated by several researchers as it increases the computational complexities and mostly requires extra overhead as processing and implementation resources.
In the same context, the researchers in 12 compared the simulation results that obtained from WI software with the measurement results of the same investigation of indoor environment. A comparison is carried out based on the parameters of Power Delay Profile (PDP) and Delay Spread (DS). The measurement scenario and the claimed improvement included the setting of AP devices at four fixed locations that measures the desired parameters from three different positions at each location.
In the same way, authors in 13 presented an algorithm by using a Greedy algorithm and a Vertex approach to optimize AP placement in an indoor environment that only consists of drywall and concrete walls. The algorithm has designed in order to minimize the number of utilized AP devices and to optimize the allocation of the frequency band, which is in turn be expected to reduce the interferences, but the presented work could not consider the effects of walls and materials.
Recently, other researchers in 14 used Particle Swarm Optimization (PSO) based on the Adaptive Neural Fuzzy Inference System (ANFIS) to predict the Wi-Fi signal strength in a corridor. Distance and other parameters tested in the presented optimization method. The obtained results show an accurate signal propagation behavior where PSO trained using ANFIS. But, neither the effects of building materials nor the computational process has been considered in their study.
For the past two years, valuable efforts have been conducted by many researchers as in 15 , where the researcher has performed an algorithm for optimum AP location among four preselected locations in the corners. Their simulation results that represent the targeted optimum AP location have been compared and confirmed based on real measurement results. However, the researcher's study was limited to obtaining only one AP between the four distributed APs by using a single objective RSS-based measurement function.
The same rear authors in 16 have presented an optimization method by using BPSO algorithm based on the use of a multi-objective function. In their study, a small part of the target area used to identify and suggest AP deployment locations based on two different objectives. However, this study does not consider the effects of different sources of interference and co-channel interference.
In line with the above-mentioned contributions, this paper proposes a multi-objective function of coverage and AP deployment with a novel formula for AP deployment function based on BPSO algorithm. The results obtained from the radio wave propagation simulator by using WI software will be considered as input to our proposed WOAIP algorithm. It is worth to mention that the effects of different building material have been considered in this study by measuring two related parameters per material, as will be explained

The Proposed Framework Including WOAIP
This section displays the parameters and the tools that have used to fulfill the optimized AP placement of the proposed algorithm (WOAIP), finally this section discusses the results besides the performance evaluation.
Modeling and Scenario Parameters:  Wireless InSite (WI) software Wireless InSite (WI) software is a 3-Dimension (3D) ray-tracing simulator containing a suite of ray-tracing models and high-fidelity electromagnetic (EM) technologies for the study of site-specific radio wave propagation and wireless communication networks 17 . The WI propagation software provides efficient and accurate predictions of EM propagation and the characteristics of communication channel for complex urban, indoor, rural, and mixed path environments. In addition, WI provides RF engineers with tools to construct wireless connections, optimize antenna coverage, and evaluate main channel and signal characteristics for RF in addition to millimeter-wave frequency bands 18 . As a result, WI software has been used to designing and modeling our scenario, and obtaining the necessary measurements for our simulation scenario.

 Received Signal Strength (RSS)
Signal strength represents a measure value of power, which transmitted from AP at a certain time and received by a wireless device placed at different location. In recent studies, RSS has been considered as one of the most significant aspects, as it works with the noise power to represent the Signal to Noise Ratio (SNR) value of the signals. As reported in Shannon's low 19 , SNR indicates to the valuable capacity of the communication system. The significance of RSS measurement increases rapidly since most of the wireless network provides direct access to RSS values as stated in 19 . RSS calculated and obtained from WI software based on equation (1) Where and represent the received and transmitted powers respectively, R is the distance between the transmitter and receiver, is the wavelength, β denotes the overlap of the frequency spectrum, ( , ) symbolize the direction in which ray leaves the transmitter, ( , ) denote the direction in which the ray arrives at the receiver. Finally, and represent the direction of arrival for both transmitter and receiver respectively.

 Relative Permittivity (ε) and Conductivity (σ)
Improving the accuracy of indoor propagation and the estimation of accurate RSS measurement, the parameters of the dielectric medium for each material within the indoor environment used in our study. There are several methods used to represent the parameters of the dielectric medium. Two general representations used in WI software that known as the relative permittivity (ε) and conductivity (σ). Relative permittivity represents the reflection of material and how to influence on the electrical field, which is highly depended on the selected frequency 21 . The permittivity of material measured based on equation (2) 22 .
(2) Where η` and jη`` represent the real and imaginary parts of the relative permittivity. For the conductivity, it describes the imaginary part of the relative permittivity. The conversion between them formulated in equation (3) Where ω is the angular frequency of the transmission carrier in radian per second.
The values of σ and η` would be obtained for our case study based on the frequency of material as properties, where the two equations (4) and (5) are recommended by the International Telecommunication Union (ITU) for the estimation of these parameters respectively 22 . In our simulation scenario, these two values (η`, σ) measured for the materials by using equations (4) and (5) and are listed in Table 1.
`= (4) = (5) Where a, b, c, and d denote constants that characterized the material, f represents the utilized wireless frequency as 2.4 GHz.

 Binary Particle Swarm Optimization (BPSO) Based Optimization
The coverage ratio differs inside the building due to a difference in the location of the AP that is influenced by the structure, objects and obstacles of the building. Hence, many optimization algorithms have been exploited by the researchers to solve the problem of APs coverage. Among these algorithms is the one that inspired by swarm intelligent like BPSO that characterized by accuracy and less time consuming making it more flexible for various problem domains 23 .
BPSO changes the particle velocity and position to guide all particles towards the best position. This process accomplished by comparing the best position of each particle with the best position of the whole swarm 14 . The BPSO algorithm has been widely and successfully used in many applications such as the optimization of effective parameters during the wireless network planning process, besides the effective parameters during its operation. Furthermore, it used in other applications such as the determination of optimal features subset for speech and speaker recognition, optimization of Power System, and training the neural networks 24 . In this study, a framework is developed based on BPSO to achieve an optimized APs placement.
The utilization of PSO over GA for example, was due to several advantages that have been carried out. For instant, PSO only requires some parameters to be adjusted and with easier implementation. However, GA requires a lot of generic based operations such as crossover, mutation and selection. Furthermore, the cost of computational was another significant factor considered in PSO choice. In addition to that, GA would only check single present fitness function and without memory to store fitness value. Meanwhile, PSO would involve the check of both the local and global functions and along with memory to store the fitness function 25 . It is worth to mention that, the PSO variables can take any values based on their current position in the particle and velocity. Resulted in handling the complexity in more effective manner as compared to GA 26

Case Study:
The investigated building and wireless parameters with supported tools are discussed in the following sub-sections.
 The Targeted Department (Department of Computer Science) for the evaluation of WOAIP The building of the Department of Computer Science Fig. 1 in the main campus at University of Baghdad is modeled as a case study environment inside InSite simulator. It covers an area of (95.5*27) m 2 and a total number of 64 rooms. The rooms sizes are (3*6), (6*6), or (9*6) m 2 . It is a two-story building that serves Department of Computer Science. Our new wireless studies focuses on the right side of the two-story CS building.
 Wireless InSite Simulator WI software has been used to design, model and simulate CS department building with real measurements for internal rooms and laboratories Fig. 2. In the case of AP devices, a total of 78 APs were initially distributed over two floors, where 9 APs were placed at a height of 4m other than 31 APs with 2.5m distributed in the 1st floor. Furthermore, 38 APs were distributed in the 2nd floor. The model specifications are listed in Table  2. Meanwhile, for the Test Points (TPs) they distributed as grid of TPs with a total number of 330 and 321 in the 1st and 2nd floors respectively, each TP fixed at 1m height.   Figure 3 shows the distribution of APs (the light green dots). While the distribution of TPs within the two floors depicted in Fig. 4 as off-white squares. It is worth mentioning that the (651) TP has distributed to represent two types of coverage as LOS and NLOS by using (312 and 339) TPs. The selected antenna properties of APs and TPs are listed in Table 3. In this work, the effect of different building materials has been considered besides the sensitivity of frequency-per material depending on the parameters of the relative permittivity (ε) and conductivity (σ). Also, five cases of RSS threshold are considered to evaluate the optimization deployment of AP devices. These RSS cases are (-40, -45, -50, -55 and -60) that most probably affect the coverage and consequently the overall QoS. Furthermore, in each of mentioned cases there are five different weights as sub cases will be discussed.  In this work, WOAIP-BPSO implemented using two stages; the 1st stage deals with the modeling of building inside InSite simulator to collect the initial semi real parameters of wireless environment. The initial values of these parameters have been transferred to the second stage for the purpose of integrating and optimizing WOAIP by using MATLAB. The RSS data obtained from WI software collected to form an AP-TP Matrix to be used by WOAIP as illustrated in Fig. 5.

Figure 6. The AP-TP Matrix of RSS
Step2-Initialization of WOAIP parameters: Table 4. shows the description and initialization of WOAIP parameters based on the BPSO requirements. Step3-Initialization the AP-Matrix randomly: WOAIP has been designed as a multi-objective algorithm to solve the problem of minimizing the number of APs as well as to optimize wireless coverage by using the necessary fitness function. To accomplish that, an initial AP-Matrix with random binary value is generated for each iteration, Fig. 7. If AP(i) is equal to (0) then the corresponding index in the AP-TP Matrix set to -100 (as initial RSS) in order to guarantee that such AP would be OFF , otherwise would be considered as ON. Meanwhile, this condition ∑AP i ≥ AP min specify the solution validation for each iteration based on the number of APs which should be at least equal to AP min . For invalid solution, the current fitness would be set to 100 (neglected situation). Step4-Counting and checking the maximum RSS for each TP and the number of APs for all TPs: TP is counted as active if RSS max is received and passes the RP th at that TP. Thus, RSS max count = RSS max count + 1 if RSSmax ≥ RP th . For example, if RP th is equal to -50 then RSS max count incremented by 1 if current TP receives >= -50 as RSS. Another condition used to count the number of active APs that passes the RP th at each TP based on the condition: if no. of active APs per TPi ≥ RP th , at current iteration, the total AP deployment would be calculated using equation (6).
Step5-: Applying multi objective fitness function to maximize the coverage area with minimum number of APs: WOAIP is considered two sub functions called coverage fitness and AP placement fitness as expressed in equations (7 and 8). In addition, WOAIP may operate five times or cases, one time for each W1 and W2 pair values, as mentioned in Table 5. The materialization of coverage in equation (7) depends on the number of covered TPs (RSS max count). Finally, AP deployment fitness obtains the optimized deployment the algorithm from our WOAIP algorithm as explained in equation (9).
Step6-: BPSO evaluates the initial solution of AP deployment fitness function: Our utilization of BPSO for AP deployment determines both AP Pbest and AP Gbest . If AP deployment fitness is less than AP Pbest then AP Pbest is equal to AP deployment fitness. Otherwise, AP Pbest would equal to current AP Pbest . Also, AP Gbest considered for global minimum of particles. The parameters of AP velocity and AP position are updated per particle based on equations (10) and (11) respectively. ( Where AP velocity(i) is the velocity of ith particle, is the initial position of the ith particle, AP Pbest acts as best position for the ith particle, AP Gbest denotes the global best position for all particle, w parameter applied as weight to initialize the AP velocity and t indicates the round number for which this AP velocity applied.
In BPSO, the population has a set of particles where each particle represents a binary decision evaluated to either (True=1) or (False=0) that corresponds to AP. The AP position of all particles is initialized as a random integer value; 0 or 1. The AP velocity is restricted within the random range between (0-1). The AP position vector equations for each particle would be mapped in the range of [0-1] using equations (12) and (13) respectively.
Where r denotes a random number selected from a uniform distribution (0-1). Applying the sigmoid function to get binary results suitable for the On/Off property of AP. AP position(i) (t) set to 1 if the random number is less than AP velocity sigmoid function value at the current iteration else it will be set to 0. The AP velocity and AP position of all particles are accumulatively updated until it achieves the best fitness solution depending on the total number of iterations.

Results and Discussion:
The results of the WOAIP algorithm are discussed in this section by analyzing the overall wireless network performance based on five different RSS thresholds. To obtain accurate results, w1 and w2 are used to represent priority (weight) values for coverage and AP placement respectively.
The number of APs, the number of TPs covered, coverage ratio, coverage fitness and AP placement fitness have been listed in Table 5 for each case. It can be noticed that there is a direct correlation between the RSS signal threshold and the number of required AP devices. For example, when the case of (0.5, 0.5) activated with RSS threshold of (-40, -45, -50, -55 and -60) dBm, it results (11, 10, 10, 9 and 7) required APs respectively.
In addition, optimized AP deployment has been achieved by using the AP placement function of 100,000 iterations per case in terms of minimum APs and best wireless coverage.   Figure 8 shows the results of the five cases (weights) as a relation between the number of iterations and fitness function values per RSS threshold value. Selecting the (100000) number of iterations affected the results in all curves making them seem linear to achieve the best solution. But the calculation of the min-max fitness values in each case shows that there is some non-linear behavior of fitness along the iterations. Figure 9 shows the cumulative distribution function (CDF) or F(x) of the maximum received power was obtained by each TP for the five pair weights cases. It depicts the behavior of the fitness function till reaching the stable state as a solution by using 100000 iterations. Furthermore, the figure shows the behavior relationship between the probability (or CDF) that the obtained received power (or RSS) takes a value less than or equal to the power threshold. The selection of suitable cases would be based on the customer's requirements in both the coverage area and the number of AP's as well as the type of frequently required applications such as video/HD/voice streaming.
Finally, the adopted WOAIP solution recommends five distinct solutions for the five cases as shown in Figs. 10 and 11 for the two investigated floors respectively. For example, Fig.  10(e) and 11(e) show the AP deployment that compared between the simulated current and proposed solutions based on the poor RSS threshold (-60) with the weights of (0.5, 0.5). It confirms the reliability of WOAIP algorithm.  Figure 12 illustrates the enhancement of coverage in wireless coverage achieved by WOAIP by using 100 TPs (out of 651) that are selected randomly as a result of a comparison between the RSS obtained from WOAIP algorithm and the present deployment.

Conclusion:
This study has proposed the WOAIP algorithm for the optimization of AP placement inside the targeted computer science building based on the deployed BPSO for AP placement. Five signal thresholds and weights cases have been selected for the study in order to achieve the proper AP deployment. Two fitness functions (coverage and AP placement) have used based on the change of weights. The algorithm for two-floor deployment has been proposed by using 3D ray-tracing WI software. The results obtained from the case of (0.5,0.5) in -60 dBm threshold showed that WOAIP outperforms the present AP deployment by up to 24.5% coverage on average inside the building TPs. As a result, the selection of the suitable cases would be based on the customer's requirements in both the coverage area and the number of APs. Consequently, it is expected to reduce the wireless coverage gaps. Finally, our future study is planned to consider further study parameters in the optimization of AP deployment by using real and simulated environments.