An Adaptive Neuro-Fuzzy Propagation Model for LoRaWAN

: This article proposes an adaptive-network-based fuzzy inference system (ANFIS) model for accurate estimation of signal propagation using LoRaWAN. By using ANFIS, the basic knowledge of propagation is embedded into the proposed model. This reduces the training complexity of artiﬁcial neural network (ANN)-based models. Therefore, the size of the training dataset is reduced by 70% compared to an ANN model. The proposed model consists of an efﬁcient clustering method to identify the optimum number of the fuzzy nodes to avoid overﬁtting, and a hybrid training algorithm to train and optimize the ANFIS parameters. Finally, the proposed model is benchmarked with extensive practical data, where superior accuracy is achieved compared to deterministic models, and better generalization is attained compared to ANN models. The proposed model outperforms the nondeterministic models in terms of accuracy, has the ﬂexibility to account for new modeling parameters, is easier to use as it does not require a model for propagation environment, is resistant to data collection inaccuracies and uncertain environmental information, has excellent generalization capability, and features a knowledge-based implementation that alleviates the training process. This work will facilitate network planning and propagation prediction in complex scenarios.


Introduction
In recent years, the exponentially increasing number of wireless devices has made the maintenance and efficient planning of wireless networks crucial.Therefore, it is essential to gain a better understanding of propagation and be able to readily predict it in various scenarios.The area of radio propagation has been studied over many decades, during which the physics of the electromagnetic wave and its propagation has been unchanged.Hence, the same free space path loss (FSPL) formula holds to this date.However, telecommunication devices, network requirements and the propagation environment have undergone many developments.Perhaps, adapting to these rapid changes and lack of efficiency and generalization in current models has been the main research incentive in this field.It is clear that establishing an adaptive, efficient and accurate modeling of modern wireless technologies, that is, LoRaWAN, is of great importance.The main contributions of this paper are: (a) A novel method of propagation modeling is proposed by using an adaptive-network-based fuzzy inference system (ANFIS).This knowledge-based system enables an adaptive model that is capable of incorporating new modeling parameters, depending on the wireless technology, propagation environment and an expert's knowledge.
(b) A robust method of determining the network size is used to avoid overfitting.(c) Results from the models are critically analyzed with real-world measurements using a relatively new wireless technology.
This novel implementation has several advantages, however, for the purpose of comparison, firstly, a brief review of current models would be required.The rest of the paper is organized as follows: Section 2 provides a critical review of the conventional propagation models.Section 3 explains the implementation details and advantages of the proposed model.In Section 4, the results of the practical and comparative analysis are demonstrated, and Section 5 provides the findings of this research along with final conclusions.

Brief Review of Common Models
There are numerous practical propagation reports and models for various scenarios, such as indoor, outdoor, urban, sea, foliage, undergrounds and even tunnels.Reviewing all of these models would be out of the scope of this research.Instead, only some of the most influential and well-established models, based on the appearance in published literatures, are reviewed.A more comprehensive review of the propagation models is provided in [1].

Okumura and Hata Models
Okumura's signal propagation investigation has been a cornerstone in this field.Okumura's model [2] was built upon a practical data collection in Tokyo, Japan, within the frequency range of 150-2000 MHz.In his model, the path loss estimation depends on the FSPL, antenna gain factor, propagation gains due to mobile/base-station antennae heights and collective correction gain.The latter, collective correction gain, is to compensate for the type of environment, average slope of terrain and finally land/sea parameters.This model is somewhat a more comprehensive version of the log-distance model.Like other nondeterministic methods, Okumura's model lacks the higher accuracy of deterministic models.In addition, independent parameters of this model, such as frequency, and mobile and base station antenna heights, were limited in their range.Okumura's findings then became the basis of the Hata model [3], also known as the Okumura-Hata model.This model introduces many more independent parameters, such as reflection, diffraction and scattering factors.It suggests new correction factors for suburban and rural environments, and extends the range of the parameters of Okumura's model, such as mobile and base station antenna heights.The International Telecommunication Union (ITU) model [4] was inspired by Okumura's and Hata's models.

Walfisch, Ikegami and Ray Tracing Models
Walfisch and Bertoni [5] proposed a semi-deterministic model that added new modeling parameters into Okumura's model.These parameters were added to account for the multiple-screen diffraction, caused by the buildings and structures.Ikegami et al. [6] took a new approach by using a simplified ray-tracing method.They assumed multiple-reflected/diffracted waves were highly attenuated and, therefore, only accounted for first-reflected/diffracted rays.The other compromise of this deterministic model was perhaps due to the limited computational power, since the reflection/diffraction losses were approximated with constant values.There are several 2D and 3D ray-tracing algorithms, based on the geometrical optics, uniform theory of diffraction and geometrical theory of diffraction.These models have complemented Ikegami's efforts.For instance, it is possible to consider two-and three-fold reflections/diffraction, and reflection/diffraction factors depend on the angle of incidence and permittivity of materials.Further detailed summaries of these models with their implementations are provided in [7][8][9][10].Nevertheless, there are the following drawbacks to these deterministic models: (a) Having precise building data is a prerequisite, meaning that, ideally, a 3D topographical model of the environment and structures is required [6,11].However, such a database may not be readily available, especially for outdoor environments.(b) Computational complexity of the ray tracing is extremely cumbersome even in a relatively small indoor environment and the accuracy of the model depends on the accuracy of the structural model [12].Therefore, it is not really a practical solution for outdoor large-scale modeling.(c) Finally, ray tracing incorporates the "small-scale" fading which varies with the order of wavelength [13], and small-scale fading is not predictable for ranges beyond half-wavelengths [14].
These drawbacks are even more aggravated when the radio frequency is increased.

COST Action 231 Model
The European Cooperation in Science and Technology (COST) Action 231 [15] proposed a new propagation model, plus an extension to the previous Hata model.The COST-Hata PCS Extension simply extended the original Hata model to be applicable to frequencies up to 2 GHz.The COST-Walfisch-Ikegami (COST W.I.) model, however, provided a revised version of the Walfisch and Ikegami models, except that it does not require a 2/3D model of the environment.Eliminating this requirement is perhaps the main advantage of COST W.I., making it the most commonly used outdoor model.COST W.I. has been recommended by ITU and the European Telecommunication Standards Institute (ETSI) [16].The model still requires the height of the buildings, width of the streets and some other environmental information, and therefore, it is not a fully deterministic model [17].Although COST W.I. (or models similar to it) may seem to be an acceptable compromise between accuracy and computational complexity, it is rather a granulated set of formulas which has the following disadvantages: (a) Some of the model parameters lack clear physical or practical interpretation.For instance, the angle of arrival of the beam relative to the axis of the road (φ) and road width (w s ) are vague at a crossroad, junction, riverside or a wide highway with partial line of sight (LoS), and undefined where there is no road.These conditions and many others that may occur are not considered in the COST W.I. formulas.(b) The constant factors that control the loss due to intensity of multiscreen diffraction are discontinuous, resulting in abrupt changes in the result.For instance, scatter loss L rts (φ) has sharp transitions as it has been approximated with only three piecewise linear functions.Therefore, a small variation in φ can affect the estimation drastically.(c) There are several different permutations and possibilities to calculate the total path loss.
The model first differentiates between LoS and NLoS (non-line of sight) conditions.Next, there are two ways of deriving the path loss depending on the d LoS .The NLoS has been further subdivided to scatter and diffraction losses.Next, there are three different conditional statements to calculate the scatter loss depending on the φ.Finally, there are another 11 further subdivisions (depending on BS and MS heights and environment type) to calculate the multiscreen diffraction loss.However, in reality, even differentiating between LoS and NLoS is difficult, resulting in the creation of near-LoS or partial-LoS conditions [18].

Hybrid and Artificial Neural Network-Based Models
The next generation of the propagation models relies on artificial neural networks (ANNs).These models are based on the training of an ANN with empirically collected data.Usually this involves training the ANN from scratch, where the ANN has to learn to derive the very basic mechanisms of radio propagation.For instance, the ANN even needs to learn the trivial fact that increasing the link distance has a negative impact on the signal strength.It is the ANN's responsibility to learn the FSPL from the distance and frequency of transmission or understand the attenuating impact of obstacles on the LoS.A review of the ANN-based models is provided in [19].The drawbacks of this approach include: (a) the time-consuming and exhaustive data collection process that is required for the training of ANNs.As an instance, in [20], authors collected 600,000 data samples in a relatively small indoor environment and trained the network for several hours.Not only is such data collection in a small environment tedious but it also defeats the purpose of estimation [19].(b) ANN requires considerable training time as it contains numerous neurons in each layer; furthermore, an overly complex ANN may lead to data overfitting and hence failing to reach a generalized solution [21,22].
To address these challenges, a hybrid model for a simple indoor environment was proposed [19].The model comprised an optimized multiwall model (MWM), whose estimations were monitored by an ANN.Therefore, the ANN only had to learn and compensate the deficiencies of the MWM.This strategy drastically reduced the required training data samples and improved the accuracy of the estimation.A relatively similar strategy was employed in [23,24] using the COST W.I. There are, however, two drawbacks of the latter implementations: (a) Selecting an appropriate and flexible model for a complicated outdoor environment where many propagation mechanisms are involved is challenging.In fact, Hosseinzadeh et al. [19] had to slightly adjust the MWM according to their requirement.(b) Conventional models are not tailored or flexible enough to represent the novel characteristics of communication devices.For instance, to the best of our knowledge, there is no propagation model that takes the spreading factor (s m ) of a chirp spread spectrum modulation (CSS) [25] into consideration.Theoretically, a higher s m provides a higher processing gain and, therefore, improves the range.Including such technology-dependent parameters not only increases the modeling accuracy and makes the models more compatible with new devices, but it also helps modeling the signal propagation of the whole system rather than estimation of the path loss only.

Proposed Model Description
To address the explained shortfalls and challenges, an adaptive neuro-fuzzy model is proposed.This allows the user to initiate the system with incorporated linguistic knowledge of propagation and then train the system further to achieve a higher accuracy.Next, the essential fuzzy/linguistic input-output parameters of a propagation model are identified.Furthermore, to avoid overfitting and achieve a better generalization, an efficient clustering method to determine the optimum size of the nodes is used.Finally, the system is trained with a hybrid algorithm that tunes the input and output parameters of the fuzzy system.This section explains the implementation details.

Adaptive Neuro-Fuzzy Inference System for Propagation Estimation
Fuzzy systems are universal approximators of nonlinear dynamic systems [26,27].The idea of fuzzy sets, fuzzy logics and consequently fuzzy inference systems was first proposed by Zadeh [28].As stated by Zadeh, fuzzy systems "provide an approximate and yet effective means of describing the behavior of systems which are too complex or too ill-defined to admit of precise mathematical analysis" [29].The humanistic nature of the fuzzy systems allows us to define a complex system with fuzzy/linguistic variables using a human-like reasoning instead of using conventional mathematical tools or precise quantitative analysis.Fuzzy systems provide some degree of resistance to handle vague, ambiguous, imprecise, noisy, missing and uncertain information [30][31][32][33].This should provide the level of flexibility required to deal with data that is hard or rather impossible to accurately infuse into the model, such as the φ and w s .This resistance also relaxes the inevitable inaccuracies in data collection.This is mainly due to the fuzzification of continuous variables.The fuzzification process transforms the crisp value of the inputs (x) to degrees of membership µ(x) using a membership function (µ).Next, these membership functions µ are tuned using the gradient-descent algorithm to optimize the output.Changes in the µ are therefore affecting the degrees of membership µ(x) of the inputs (x).
The proposed ANFIS architecture comprises first-order Tagaki-Sugeno (T-S)-type fuzzy systems [34], where the output membership functions are first-order polynomials.Therefore, a hybrid training allows a linear least-squares estimation to be used for the identification of the consequent parameters, and a gradient descent optimization is used to identify the premise parameters [30,35].Compared to most neural networks, ANFIS also has fewer parameters, many of which can be tuned with linear least-squares.These features give ANFIS the advantage of fast training and computational speed; furthermore, since there are fewer tunable parameters, the pitfall of overfitting the data would be avoided [36].
The T-S fuzzy implication (if-then rule) is analogous to that of defining a nonlinear input-output mapping.The process can be interpreted as the decomposition of a system into a finite number of subsystems and then approximating each subsystem.The output of the T-S is determined by the aggregation of the implications.Considering a number of implications R i , with antecedents (premise) A i and consequences y i , implication ith (i = 1, . . ., n) is of the format of Equation ( 1), where x is the input vector (premise variable), µ k contains the membership functions of the kth input, p k is the consequence parameters vector, and A i is the normalized firing strength, or truth value, of the implication R i .

Model Input
A relatively similar set of inputs that are defined in the COST231 model was considered, however, three additional inputs were added based on our knowledge of propagation and common sense.In addition, three of the COST231 inputs (base station height, mobile station height and their height difference) were combined into one.Many of these modeling inputs were acquired from Google maps to further facilitate the modeling.The only output of the system is the received signal strength indicator (RSSI).These inputs are explained as follows: (a) spreading factors (s m ) of LoRa's CSS modulation (7 ≤ s m ≤12); (b) height difference (∆h = h bs − h ms ) between the base station (h bs ) and mobile station (h ms ), where h ms is the altitude of earth at the location of measurement; (c) free space path loss (l f s = 20 log λ 4πd los ) to include the effect of frequency, λ is the wavelength of transmission and d los is the LoS distance (regardless of obstruction) between transceivers; (d) clutter ratio (c los ) in the LoS, total number of buildings and structures in LoS, regardless of their heights; (e) acute angle between the LoS and the axis of the road (φ); (f) relative width of the street (w s ); (g) d w defined as the length of LoS that is on the water divided by the d los ; where h bs , h ms , φ, w s and d w are acquired from Google map images and, therefore, may have some inaccuracies.For certain scenarios, some of these parameters may not be very important, or may not exist, and therefore, would not apply at all.

Model Identification
Various membership functions including triangular, trapezoidal and sigmoidal were examined for the fuzzification; however, a normalized Gaussian membership function, with the general form of Equation ( 2), yielded the best result, where σ is the standard deviation and determines the spread of µ, and τ is the mean, which determines the center of the µ.
Two approaches were considered for the identification of the premise structure.The first approach was to define fuzzy if-then rules using all the possible permutations of all or some of the fuzzified inputs.For instance, using common sense knowledge of propagation one could define the following implication: • "If d los is short and s m is high and c los is clear then RSSI is good." This states that "if the transmission was done over a short distance, with a high spreading factor, and the LoS was relatively clear of clutter, then reception should be good, regardless of other input parameters".However, this approach can be prone to combinatorial explosion of rules, especially for complex systems.Considering that there was a total of seven inputs, each with two membership functions, then the total number of rules is 2 7 .
The second approach was to use a clustering method [36].A subtractive clustering [37] was chosen for the identification of the rules, since subtractive clustering does not require an initial estimate of the center or the number of clusters [38].Other clustering algorithms could be used, where eventually, each cluster center forms a fuzzy rule.
A first-order T-S model was selected, as it provided a higher accuracy compared to zero-order T-S.Hence, output membership functions were of the form y in Equation (1), where the output linear functions (p k ) were identified by linear least-squares optimization.

Analysis and Results
About 5000 data samples were collected over a relatively large area (4.25 km × 2.7 km) in the commercial area of Glasgow, Scotland.Data was collected from three base stations at different locations, with 1931, 1820 and 1256 samples being collected from BS1, BS2 and BS3, respectively.Figure 1 shows the area of the investigation, where some of the measurement locations are pinpointed with markers, and gateways are labeled as BS1, BS2 and BS3.Base stations are equipped with the same antennae, mounted relatively at the same height from the ground.Data was analyzed to provide an insight of the performance of the proposed model.
To check the goodness of fit and benchmarking with other models, the most commonly used measures in the literature were reported, RMSE (root mean square error in dB), E σ (error standard deviation dB) and E m (mean error dB).Unfortunately, the first two measures depend on the range or scale of data and E m ignores the error sign.Therefore, to address these issues, the Nash-Sutcliffe efficiency (NSE) coefficient is used as a measure of the goodness of the fit.Having a universal measure of performance benchmarking is especially important, as various wireless technologies have different sensitivities.This difference impacts the dynamic range of measured data and, therefore, its RMSE scale; however, the NSE is less prone to the dynamic range.NSE ranges from −∞ to 1, where 1 would indicate a perfect match between the model predictions and measurements [39].
In addition, to investigate the model's generalization capability, instead of training with one BS at a time, data from all the three BSs was used to train and validate the model.For the purpose of comparison, an ANN model was also used to model the propagation.A feedforward ANN was chosen with three hidden layers of size seven, 14 and four neurons for each layer, respectively.The best ANN structure was chosen heuristically after trying ANNs with two to five hidden layers of various neuron sizes.Results in Table 1 demonstrate the average of a 10-fold cross-validation analysis; 90% of data was used for training.

Analysis and Results
About 5000 data samples were collected over a relatively large area (4.25 × 2.7 km) in the commercial area of Glasgow, Scotland.Data was collected from three base stations at different locations, with 1931, 1820 and 1256 samples being collected from BS1, BS2 and BS3, respectively.Figure 1 shows the area of the investigation, where some of the measurement locations are pinpointed with markers, and gateways are labeled as BS1, BS2 and BS3.Base stations are equipped with the same antennae, mounted relatively at the same height from the ground.Data was analyzed to provide an insight of the performance of the proposed model.To check the goodness of fit and benchmarking with other models, the most commonly used measures in the literature were reported, RMSE (root mean square error in dB),  (error standard deviation dB) and  (mean error dB).Unfortunately, the first two measures depend on the range or scale of data and  ignores the error sign.Therefore, to address these issues, the Nash-Sutcliffe efficiency (NSE) coefficient is used as a measure of the goodness of the fit.Having a universal measure of performance benchmarking is especially important, as various wireless technologies have different sensitivities.This difference impacts the dynamic range of measured data and, therefore, its RMSE scale; however, the NSE is less prone to the dynamic range.NSE ranges from −∞ to 1, where 1 would indicate a perfect match between the model predictions and measurements [39].
In addition, to investigate the model's generalization capability, instead of training with one BS at a time, data from all the three BSs was used to train and validate the model.For the purpose of  The results of the COST W.I. model are tabulated in Table 2 to make a comparison with other practical investigations conducted in [15].A series of models were benchmarked against similar practical measurements in COST Action 231 [15].In this comparison, 970, 335 and 1031 samples were collected from three different base stations in Munich, Germany.Propagation models were then used to estimate the signal strength only for each individual site.Since the examined models were either deterministic or semideterministic, 2D or 3D building layout and building height information were provided to the models in the study conducted by COST, whereas the COST231 in this article only used the collected environmental information that was explained earlier (Section 3.2).In Table 3, only the range of measures (maximum and minimum of  and  ) of COST performance analysis report are included.A detailed performance of each model can be found in Table 4.5.2 of COST Action 231 Chapter 4 [15].Unfortunately, other performance metrics such and RMSE, NSE and MAE are not stated in this report.Therefore, the RMSE in Table 3 is extracted for instances with  ≈ 0 (if  = 0 then RMSE =  ).Table 3 is provided as a measure of overall modelling accuracy that can be achieved given the availability of 2D or 3D environmental information.To further observe the generalization capability of the ANFSI model, only 20% of the data was used for training.These results are tabulated in Table 4.A series of models were benchmarked against similar practical measurements in COST Action 231 [15].In this comparison, 970, 335 and 1031 samples were collected from three different base stations in Munich, Germany.Propagation models were then used to estimate the signal strength only for each individual site.Since the examined models were either deterministic or semi-deterministic, 2D or 3D building layout and building height information were provided to the models in the study conducted by COST, whereas the COST231 in this article only used the collected environmental information that was explained earlier (Section 3.2).In Table 3, only the range of measures (maximum and minimum of E σ and E m ) of COST performance analysis report are included.A detailed performance of each model can be found in Table 4.5.2 of COST Action 231 Chapter 4 [15].Unfortunately, other performance metrics such and RMSE, NSE and MAE are not stated in this report.Therefore, the RMSE in Table 3 is extracted for instances with E m ≈ 0 (if E m = 0 then RMSE = E σ ).Table 3 is provided as a measure of overall modelling accuracy that can be achieved given the availability of 2D or 3D environmental information.To further observe the generalization capability of the ANFSI model, only 20% of the data was used for training.These results are tabulated in Table 4.

Discussion and Conclusions
The decomposition of a propagation system into smaller subsystems has been the ultimate goal of the Okumura, Hata and COST models.In fact, the suggestion of the breaking point-distance phenomenon in ITU recommendation P.1411 [40] follows the same idea.These attempts used crisp or Boolean logic to differentiate between a limited set of propagation conditions or scenarios.In contrast to sudden transitions, fuzzy logics make it possible to have smoother transitions, while mitigating the uncertainties within the data.ANFIS further allowed for the implementation of an expert's knowledge into the system, which addressed part of the challenges of the ANN models.
Comparison of the models used in this investigation indicated that the ANFIS and ANN models resulted in a remarkably better performance in terms of estimation, compared to the COST W.I. model.The ANFIS model resulted in a better performance compared to the ANN model.E σ and NSE were consistently improved by about 1 dB and 10%, respectively.ANFIS was found as a better generalization candidate.In this study, the performance of ANN in Table 1 was almost identical to the ANFIS results in Table 4.This is while the ANN was trained with 90% of the data, whereas ANFIS achieved the same results with only 20% of the data.
Furthermore, two new parameters were added into the model without having to formulate them.s m was required due to the wireless technology of choice, and d w was added due to the features of the propagation environment.Inclusion of these parameters in the modeling reduced the RMSE and NSE of the ANFIS model by 0.55 dB and 7%, respectively.These two parameters, however, did not make a significant change to the ANN model results.This might be due to the limited number of measurements (380 samples) that had d w .This is the most likely reason, given that ANFIS, with a better generalization, could benefit from this parameter.
In this investigation, the proposed ANFIS model was used for outdoor environments.However, it can be easily adopted for indoor propagation as well.This is as simple as providing the impacting propagation parameters for the system and roughly describing their effect using fuzzy linguistic reasoning.For instance, in an indoor environment, the effect of a higher number of walls, windows or doors on LoS can increase the loss.

Figure 2
Figure 2 compares the measurements and estimation for BS1, and Figure 3 compares the overall estimation of all base stations with measurements.

Table 1 .
ANFIS and ANN model performance with 10-fold cross-validation.

Table 2 .
COST W.I. model performance with optimization.