Wireless Network Indoor Positioning Method Using Nonmetric Multidimensional Scaling and RSSI in the Internet of Things Environment

Aiming at the problem that the indoor target location algorithm based on received signal strength (RSSI) in the IoTenvironment is susceptible to interference and large ﬂuctuations, an indoor localization algorithm combining RSSI and nonmetric multidimensional scaling (NMDS) is proposed (RSSI-NMDS). First, Gaussian ﬁltering is performed on the received plurality of sets of RSSI signals to eliminate abnormal ﬂuctuations of the RSSI. Then, based on the RSSI data, the dissimilarity matrix is constructed, and the relative coordinates of the nodes in the low-dimensional space are obtained by NMDS solution. Finally, according to the actual coordinates of the reference node, the coordinate transformation is performed by the planar four-parameter model, and the position of the node in the actual coordinate system is obtained. The simulation results show that the proposed method has strong anti-RSSI perturbation and high positioning accuracy.


Introduction
With the development of Internet of things and mobile Internet technology, smart home is gradually entering people's daily life. As an important information-processing technology in the field of smart home, indoor positioning technology is the key to improve the comfort, safety, and intelligence of home environment and build an efficient smart home system [1][2][3].
At present, the positioning algorithm can be divided into two categories: based on ranging positioning algorithm and no ranging positioning algorithm [4,5]. e ranging algorithm is commonly used based on received signal strength indicator (RSSI), based on time of arrival (TOA), time difference of arrival (TDA), and AOA based on the signal arrival angle (angle of arrival) positioning method [6][7][8]. No distance and angle information is needed without the ranging positioning algorithm, and the algorithm implements node positioning based on information such as network connectivity [9].
Due to the popularity and improvement of indoor wireless local area network (WLAN), ranging-based positioning usually uses an RSSI-based approach. Compared with the other wireless positioning technologies, the RSSIbased positioning technology performs position estimation according to the law that the received signal strength changes with the signal propagation distance, so no additional equipment for precise time synchronization and angle measurement is needed [10]. At the same time, the RSSIbased positioning technology has the characteristics of wireless low power consumption and strong adaptability to complex nonvisual indoor environments. It is also possible to make full use of the networking functions of existing wireless network facilities and expand the application range of the positioning system. erefore, the RSSI-based positioning technology is currently a research hotspot for indoor positioning [11,12]. In reference [13], based on the existing research, an improved location fingerprint location method based on RSSI was proposed from the aspects of offline fingerprint database construction, subregion division, and online position estimation. Reference [14] proposed a dynamic interval particle filter algorithm based on pedestrian dead reckoning (PDR) information and RSSI localization information. With PDR azimuth information, the algorithm can adaptively control the interval derivative particle number to enhance the filtering real time ability; meanwhile, the building map information, RSSI positioning information, and certainty factor are integrated into the particle weight calculation to improve the positioning accuracy. Aiming at the problem of the information jump in WIFI indoor location based on the RSSI, which influences the positioning accuracy, the authors in [15] proposed an improved adaptive weighted K-nearest neighbor (AWKNN) localization method based on the Kalman filter. Experiments show that these methods have achieved good results.
However, RSSI-based positioning methods are susceptible to insufficient indoor wireless signals, time differences in indoor signals, and multipath effects [16]. In order to solve the problem that RSSI ranging technology introduces large errors in complex and variable indoor environments, multidimensional scaling (MDS) is introduced [17]. e MDS technology in statistics has strong fault tolerance to the data sample, so the technology can be introduced into the indoor RSSI positioning, which will improve the antijamming ability of the positioning and obtain better positioning effect. In order to improve the positioning performance, this paper applies Gaussian filtering to RSSI signal and adopts nonmetric multidimensional scaling (NMDS) to enhance the resistance to RSSI perturbation and improve the positioning accuracy.

The Principle of RSSI Ranging
2.1. RSSI Ranging. In indoor environments, the strength of wireless signals is unpredictable due to multipath propagation and shadowing effects, and log-distance models are often used to represent signal propagation losses [18]. Let the distance between the receiving node and the transmitting node be d, then the loss caused by the signal during propagation can be expressed as where d is the distance between the transmitting node and the receiving node; n is the path loss index, indicating how fast the path loss increases with distance, and is related to the surrounding environment; X σ is the mean in decibels, and the standard deviation is σ the Gaussian distribution random variable; d 0 is the reference distance, usually 1 m; and P L (d 0 ) represents the path loss when the reference distance is d 0 . e signal strength received at the receiving end is where P represents the transmit power of the signal and P L (d) is the path loss after the distance d.
According to the above theoretical model, for a single wireless access node (AP), the size of the RSSI value read by the receiving end is closely related to the distance from the AP. However, as shown in Figure 1, for a single AP, the difference in signal strength between pairs of different locations does not effectively characterize the distance between them. For example, the distance between A and C in Figure 1 is much larger than the distance between A and B. However, according to the foregoing signal propagation theory, the difference in signal strength received at two points A and C is smaller than the difference in signal strength received at two points A and B. is problem still exists when the number of APs is small.
When the number of APs in the system increases, the consistency between the RSSI difference obtained between pairs of nodes at different locations and the actual physical distance is improved.
In other words, the farther the two locations are apart, the greater the RSSI difference obtained at these two locations, and vice versa. Next, we analyze the relationship between the signal strength distance between different pairs of locations and the actual physical distance in the case of multiple APs. Assume that each point in the area can receive signals from N APs, and the RSSI obtained at the A position can be expressed as where Ai is the distance from the A position to the i AP, and P ti and P Li (d 0 ) are the transmit power of the i AP and the near-ground reference point power, respectively.
Since the transmit power of each AP and the power of the near-ground reference point are unchanged, equation (3) can be expressed as where AP i � P ti − P Li (d 0 ). Similarly, we can write the RSSI read at the B and C positions. From equation (4), the Euclidean distance between the RSSIs read by A and B is where d Ai and d Bi are the distances from A and B to the i AP, respectively.  Mathematical Problems in Engineering

RSSI Filter Processing.
e RSSI value between nodes has a certain relationship with the distance. e overall trend is that the farther the distance between the two nodes is, the smaller the RSSI value is, and the closer the distance is, the larger the RSSI value is. However, since the RSSI value extracted during transmission is not stable, its volatility is large, and the RSSI value of the node near the distance is often smaller than the RSSI value of the node farther [19,20]. Since the RSSI value is easily affected by air or occlusion in the environment, the RSSI value received by the same unknown node will fluctuate to varying degrees when the distance is constant. erefore, in practical applications, the RSSI value is received multiple times for the same node for a period of time, and the RSSI values are processed to avoid the accuracy of the data in the case of individual abnormalities. Substituting the processed RSSI value into equation (5) yields a more accurate internode distance.
Commonly used filtering models include maximum likelihood filtering, mean filtering, least squares estimation filtering, and Gaussian filtering. It has been studied that most of the variables in the natural environment are subject to positive or similar distributions, so Gaussian functions are often used in the processing of some data variables. To this end, Gaussian filtering is used to process the extracted sets of data.
In this paper, Gaussian models are used to filter multiple RSSI values. Selecting the data information that occurs in the high probability region among a large amount of sampled data, eliminating the small probability event, thus avoiding the influence of the small probability zone data on the accuracy of the whole experiment, is essential for improving the accuracy of the entire laboratory data. In this paper, the RSSI value of the selected high probability data area is geometrically averaged, which reduces the influence of data volatility on experimental performance, makes the experimental data more representative and stable, and the positioning experiment results are more convincing. Usually, the probability density function of a Gaussian function can be expressed as where In practical system applications, according to engineering experience, the numerical range of event occurrence probability greater than 0.6 is defined as the high probability event data generation area. erefore, the Gaussian distribution function occurs in the interval 0.6 ≤ F(x) ≤ 1, which leads to erefore, it can be obtained from the Gaussian filter distribution function in the range of the above equation. e size of the sampled RSSI data value shall be [0.15σ + u, 3.09σ + u]; here, the relationship between the RSSI value and u, σ is e values of u and σ are substituted into the range of the RSSI value to obtain an accurate range of RSSI values. All the RSSI data sampled are filtered by the value range. Filter data are not in this range and save all sampled data within this range. Finally, the RSSI values occurring in the high probability occurrence area are geometrically averaged to obtain the RSSI values between the nodes in the communication process.

Multidimensional Scaling Technology
Robustness is one of the important indicators to evaluate the quality of a positioning algorithm. In the indoor environment, the RSSI is disturbed by many unfavorable factors such as multipath, diffraction, and obstacles, which may cause the signal strength value to deviate. erefore, the accuracy of the positioning algorithm is difficult to guarantee. e fluctuation of RSSI will cause a large error in the distance of the conversion, which leads to the fact that most RSSI-based positioning algorithms cannot obtain the positioning accuracy comparable to the simulation in the actual environment. However, it is worth mentioning that RSSI can indeed reflect the relationship between nodes. e closer the receiving point is to the transmitting point, the stronger the measured signal strength; the farther the receiving point is from the transmitting point, the weaker the measured signal strength. is monotonic relationship between the wireless signal strength RSSI and the distance satisfies the requirements for the dissimilarity data between objects in the multidimensional scaling. Considering this feature, it can be directly located by RSSI. e RSSI is used to construct the dissimilarity matrix in the multidimensional scaling method to calculate the relative coordinates of each node in lowdimensional space.
MDS is a data analysis technique commonly used for exploratory data analysis or information visualization, which was originally used for data analysis in psychometrics. At present, multidimensional scaling analysis has been used as a general data analysis technique, not only in the scope of psychology, but also widely used in various fields. Multidimensional scaling techniques use the dissimilarity between entities to construct a relative coordinate map of points on a multidimensional space, and make the construction points correspond to the individual entities in the multidimensional space. e distance between two points in a multidimensional space is closely related to the similarity of the Mathematical Problems in Engineering 3 entities it corresponds to.
e more similar entities, the closer they are in the multidimensional space.

Classic Multidimensional Scaling.
Classical multidimensional scaling (Classic MDS) is the simplest multidimensional scaling method, the data are quantitative, and the similarity between objects can be characterized by Euclidean distance. e goal of the multidimensional scaling method is to determine the relative position coordinates of the analysis object in the multidimensional space.
e Euclidean distance between the objects through some transformations (such as linear transformation) will be related to the similarity provided. Without considering the error, if the similarity data are measured in Euclidean space, the classical multidimensional scaling algorithm will accurately reproduce the positional distribution of the analysis object.
Assume that p ij represents the similarity measured between the analysis objects i and j (i, j � 1, . . . , N), and the Euclidean distances of the points X i � (x i1 , x i2 , . . . , x im ) and X j � (x j1 , x j2 , . . . , x jm ) in the multidimensional space are expressed as e goal of the classic multidimensional scaling technique is to minimize the stress strength coefficient, where the threat strength factor is e classical multidimensional scaling solution process is divided into the following three steps: (1) Square the individual elements of the dissimilarity matrix [p ij ], denoted as P 2 . (2) Double-centering P 2 , that is, both sides of P 2 are multiplied by the central matrix J at the same time, as defined below: where E is an n order identity matrix, and after double-centering, matrix B is obtained: (3) Perform singular value decomposition on B, and obtain the largest r eigenvalues λ 1 ∼ λ r and the corresponding eigenvectors e 1 ∼ e r to form the matrix A of the diagonal matrix V and n × r, respectively, to obtain the relative coordinates of the analysis object in the multidimensional space: e first r maximum eigenvalues and eigenvectors (r < m) are reserved, resulting in a solution in the low-dimensional space. is means that the k sums in equation (10) are run from 1 to r, not 1 to m. In the least squares sense, this is the optimal low rank approximation. For example, for a two-dimensional network, the first two largest eigenvalues and their eigenvectors are taken to construct an optimal two-dimensional approximation. For a three-dimensional network, the first three largest eigenvalues and their eigenvectors are taken to construct an optimal three-dimensional approximation.

Nonmetric Multidimensional Scaling.
e nonmetric multidimensional scaling is a kind of multidimensional scaling technique, and the requirement for constructing the object dissimilarity matrix is not as strict as the classical multidimensional scaling, as long as the monotonic relationship of the distance is satisfied. e nonmetric multidimensional scale reconstructs the coordinates and distances of things in a multidimensional space according to the dissimilarity between given things.
is is a process of iterative judgment. Assuming that the dissimilarity matrix between things is p ij , the specific process can be described as follows: (1) Arbitrarily generate the initialization coordinates X 0 of each thing and calculate the distance d 0 ij between them, and initialize the coordinate X 0 only to satisfy the different coordinates of each thing. ij , and determine whether the stress coefficient stress 1 meets the requirements. If stress 1 does not meet the requirements, repeat the second and third steps until stress 1 meets the requirements. Here, the stress strength coefficient stress1 is defined as

Construct Dissimilarity Matrix Based on RSSI.
e RSSI-NMDS algorithm proposed in this paper directly uses the RSSI value for positioning. Based on RSSI, the dissimilarity matrix P in the multidimensional scaling method is constructed, and the relative coordinates of each node in lowdimensional space are calculated. e multidimensional scaling method dissimilarity matrix P is a symmetric matrix. However, due to the nonuniformity of antenna transmission, in the actual environment, there is often RSSI ij ≠ RSSI ji . erefore, in order to obtain a symmetric matrix, the average value (RSSI ij + RSSI ji )/2 of the two may be taken, or one of them may be selected to construct the dissimilarity matrix. In practical applications, the difference between the two is small. To reduce communication overhead, usually choose one of these values. For example, the reference node is set to a number, and the N reference node is sent to all reference nodes whose number is less than N, and the mobile node sends a message to the reference node, and uses the oneway communication to obtain the RSSI value to construct a symmetric dissimilarity matrix P: where a denotes the dissimilarity correction index for correcting the rank order of the RSSI values. Taking 4 nodes as an example, directly construct the dissimilarity matrix P using RSSI: e dissimilarity matrix is constructed based on the RSSI value, and the relative coordinates of the nodes in the lowdimensional space are obtained by the multidimensional scaling method. In order to obtain the actual position of the mobile node, the coordinate transformation can be performed by using the planar four-parameter model according to the actual coordinates of the reference node, thereby obtaining the position of the mobile node in the actual coordinate system. e four-parameter coordinate transformation model is where [x 1 y 1 ] is the relative coordinate of the nodes in the two-dimensional space, [x 2 y 2 ] is the actual coordinate after the transformation, m, β, Δx, Δy are the four to be determined parameters. In order to reduce the error in the coordinate conversion process and ensure the accuracy of the actual coordinates of the moving node, the parameter should be selected to minimize the sum of the deviations of the coordinates of the k reference nodes after conversion and their true coordinates ([x r i y r i ], i � 1, . . . , k). e deviation performance function measures the appropriateness of the parameters of the coordinate transformation model: e smaller the deviation difference, the smaller the positioning error caused by the coordinate transformation. With the goal of minimizing equation (19), appropriate optimization algorithms must be used to select the appropriate parameters.  Figure 2 shows the coordinates of each node and the actual coordinates of the nodes estimated by the RSSI-NMDS algorithm. Among them, the red circle represents the true coordinate position of each unknown node, the blue triangle represents the coordinates estimated by RSSI-NMDS, and the coordinate line represents the distance error between the estimated position of the algorithm and the real position. Table 1 shows the actual coordinates of 15 nodes and the estimated coordinates calculated by the algorithm and the distance error.

Analysis of Positioning Results.
It can be seen from Figure 2 that the error lines of each node are different in length. is is because the fluctuation of the RSSI value is different, which results in different error sizes when performing position estimation. If the RSSI value fluctuates greatly, the estimated node coordinate error increases. It can be seen from Table 1 that the error of the indoor positioning of the unknown node by the RSSI-NMDS algorithm is relatively stable, and is basically maintained at about 1 m, and the minimum error can reach 0.7 m or less.

Comparison of Positioning Performance.
e RSSI-NMDS algorithm proposed in this paper is compared with the traditional RSSI-based positioning algorithm. Figure 3 shows the positioning results of 15 points. e circular and triangular identifiers are the same as in Figure 2. e black square indicates the node coordinates obtained by the RSSI ranging method, the solid line indicates the estimation error of the RSSI-NMDS algorithm, and the broken line indicates the estimation error of the RSSI ranging algorithm.
It can be seen from Figure 3 that the average error of the positioning result based on RSSI is significantly larger than that of the RSSI-NMDS algorithm.
is is because the minimum error based on the RSSI ranging algorithm can Mathematical Problems in Engineering only reach 2 m under relatively good conditions, and the error will increase significantly in a more complicated environment. In addition, after the actual distance between each communication node obtained in the RSSI ranging algorithm, an appropriate algorithm needs to be selected, and the position coordinates are estimated according to the distance. However, the positioning result is also different because the number of beacon nodes is different, and the position estimation algorithm is selected differently, thereby generating different positioning precisions. However, the positioning result of RSSI-NMDS algorithm is stable, and the positioning accuracy of the algorithm is not affected by the number of beacon nodes. e algorithm does not need to convert the RSSI value into distance and then coordinate estimation. It can directly obtain the node with the RSSI value. e relative position coordinates also avoid the effect of converting the RSSI value into a distance on the positioning accuracy. en, the RSSI-NMDS algorithm proposed in this paper is compared with the algorithm in reference [13], the algorithm in reference [14], and the algorithm in reference [15]. Figure 4 shows the location error distribution of several algorithms. According to Figure 4, the positioning error of RSSI-NMDS algorithm proposed in this paper is smaller than that of other three algorithms. According to the actual coordinates of the reference node, the proposed RSSI-NMDS algorithm uses the plane four-parameter model to transform the coordinates and get the position of the node in the actual coordinate system. e simulation results show that the method has strong anti-RSSI interference ability and high positioning accuracy.    Ref [13] Ref [14] Ref [15] RSSI-NMDS

Conclusions
In order to solve the problem that the RSSI-based positioning algorithm is easily affected by the complex environment of the interior and the actual positioning accuracy is low, this paper proposes the RSSI-NMDS algorithm. e nonmetric multidimensional scaling method is applied, and the RSSI value is directly used for positioning, thereby avoiding the calculation amount and error of the ranging. e simulation shows that the proposed algorithm can resist the disturbance of RSSI value and has high positioning accuracy. In the future research, we can study from the following perspectives: in addition to the classical multidimensional scaling method, there are many other derived algorithms in the multidimensional scaling method. In the process of indoor positioning, we can compare it with other multidimensional scaling methods as much as possible, and select the best method for indoor positioning. In the process of wireless sensor network node localization, the use of more regular node area, so in the irregular node area positioning is worth further discussion. Although complex algorithms can improve the positioning accuracy of sensor network nodes, the energy consumption in wireless sensor networks is also a problem, so the balance between energy consumption and positioning accuracy in the network is worth further discussion and research.
Data Availability e data included in this paper are available without any restriction.