LOCAL SYSTEM OF POSITIONING USING A WIFI NETWORK

The WiFi technology is widespread. To launch the WiFi network is very simply, thus, they meet so often. Knowledge of the location of the antennas Wi-fi is very important for internal localization (position fix of an object). System of positioning of Wi-fi (WPS) or WiPS/WFPS are used where GPS and GLONASS are unavailable because of different reasons including multipath and signal blocking indoors. Such systems include as well internal systems of positioning. Use of Wi-fi not for creation of a network, and (for example, positioning of devices on the WiFi network) is urgent for other purposes because there is a rapid growth at the beginning of the 21st century of wireless access points in urban areas. This article discusses practical application of a method of localization with use of WiFi of access points which is based on measurement of intensity of the received signal (indication of the received signal or RSSI). Here the device which executes the measurements necessary for system operation is described. Some formulas for computation of layout of the device are given. Results of system operation are considered with different layouts of access points in the given space and different environments.


Introduction
Nowadays WiFi networks are so widespread that with their help one can easily create a network consisting of a large number of devices which are unattached to a certain place and capable to change the position in space.At present almost any corporate client has WiFi coverage, therefore the infrastructure of this wireless network can be used for performing a number of tasks, in particular, for local positioning in the organization.Accuracy of such systems will depend on density of points of access tied to specific points in the plan of buildings, constructions and territories [1].
Positioning of objects in WiFi networks can be used for achieving a number of purposes: ─ automation of accounting and placement of objects; ─ control of personnel and clients of the organization; ─ ensuring technical safety; ─ navigation in the building; ─ data acquisition for information and analytical work.

Principle of operation
Positioning in wireless networks can be carried out in several ways: 1.The method of recognition of a template demanding a preliminary research of the network and control of the system.
2. The method of using the coordinates of the nearest access point which allows detecting the presence of the client.
3. The triangulation method involving determination of force of a WiFi signal and calculation of a possible arrangement concerning each visible point of access.
4. An angulation or positioning with definition of the angle of the incoming signal.
The method of a triangulation is rather simple and effective, and it doesn't demand high costs to apply it as well, therefore it is used in this system.
The system consists of several points of access, a WiFi-tag and a device for information collection and data management (see Figure 1).The system operates as follows: the device (tag) searches for the given points of access and measures the power of the accepted signal, then sends data to the device where the location is calculated with some accuracy in the set system of coordinates [2].Data on the control unit are transmitted "by air" through WiFi technology and can be easily intercepted.For their closing the known encryption methods in WiFi of network can be used (if it is necessary).
The coordinates were calculated by means of the algorithm Weighted centroid (the center of masses) which computes the agent's coordinate as a linear combination of coordinates of points of access taking into account the power of signals as the characteristic of weight [2].The way this method calculates the AP position determines the situations in which the method provides good location estimations: If there are measurements taken around the real AP position or the measurements are close to the AP [3].
To calculate the location the following formulae are used: where X0 and Y0 -required coordinates, Xi and Yi -coordinates of i-th point of access, Pi -the power of a signal of i-th point of access, Pj -the power of a signal of j-th point of access, μi-characteristic of weight, N -quantity of points.
The characteristic of weight of a signal μi from i-that access point is calculated by a formula (2).After each scanning it is necessary to calculate the characteristic of weight on a formula (2).After that tag coordinate on a formula (1) is calculated.
As a tag using the Wemos d1 mini microcontroller -a programmable board on the basis of the ESP8266EX microcontroller with WiFi support with an access to UART, SPI, I2C, GPIO interfaces (see Figure 2).In that this microcontroller has GPIO interface, connection to them of different sensors make the device is possible.Such sensors can serve for determination of falling, violation of integrity of an object, and also to collect object other information.Data transfer is carried out on the WiFi network.
The board is programmed so that at first to scan WiFi of a network, and then to transfer them to the server.After successful transmission the device starts over again scanning.
The accumulator of the small size and with a capacity of 1050 mAh which provides rather long operating time of the device is connected to the controller.Such operation mode in case of which the device will periodically work is possible.Then the accumulator will be enough for longer time frame As access points WiFi-routers, spot jotas on mobile devices and notebooks were used.All of them broadcast a WiFi-signal at a frequency of 2.4 GHz.

Testing results of the device
This device had many tests.Testing took place in different conditions and different places.Testing was carried out both in the open spaces and indoors where distribution of a signal is interfered by overlappings, furniture and other objects.
In (see Figure 3) the results of testing the device in the room measuring 12×7 meters are presented.In the corners of the room 3 points of access are placed.Dark lines display the location calculated by the computer.Light dashed lines display actual location of a tag on the card.Gray rectangles show furniture located in the room and influencing signal propagation.The error in such conditions comes to 5 meters, therefore the number of points of access (see Figure 4) has been increased.Figure 4 illustrates that the accuracy of positioning has significantly improved with an increase in the quantity of points of access.The error doesn't exceed 2.5 meters.
In (see Figure 5) the results of testing the device in the open space measuring 10×10 meters with the use of four points of access are presented.As can be seen from Figure 5 in the open space, where the propagation of the signal is not obstructed by foreign objects, the accuracy is much better.
The system also took tests in premises in which there was furniture and interroom partitions.As is well-known walls very strongly worsen WiFi signal, but even it hasn't strongly influenced operation of the device.The result was satisfactory.On (see Figure 6) results of testing of the device indoors 14×14 meters in size are presented.On corners of the room 4 points of access are placed.As can be seen in the Figure, the walls affected the accuracy of the device slightly.In some cases the deviation was strong.It can be because on the way of a signal furniture, and also people meets.
As a result of testing the device with the use of 6 points of access the error in calculating the location has decreased to 1.5 meters.Figure 7 shows the results of testing the device in two rooms whose size totals 17×12 meters.Testing of the device in the presence of 6 points of access has shown good result.However, in this case points of access settled down quite close to each other.Such arrangement of access points rarely meets.
In (see Figure 8) the results of testing the device in the open space measuring 18×18 meters are presented.In the open space with 6 access points the device showed a good result.The error in determining the location decreased to 1 meter.

Conclusion
The results of testing have led us to conclude that the calculated position of a tag doesn't go beyond the bounds of the Figure formed by access currents in the set system of coordinates.Accuracy of calculation depends on the quantity of points of access simultaneously available to a tag.Our test show, that you require an anchor every 10-30m to achieve good results indoors (open space).
The device works fine even if there are obstacles in the path of the WiFi signal.However, to achieve high accuracy, the signal attenuation level must be taken into account when calculating the location.
Such a system even at the current stage of development is suitable for performing a number of tasks.Further it is planned increases in accuracy of positioning thanks to more exact algorithms of calculation of coordinates.

Fig. 1 .
Fig. 1.The principle of operation of the local positioning in WiFi network.

Fig. 5 .
Fig. 5. Testing results with 4 points of access in the open space.

Fig. 8 .
Fig. 8. Testing results with 4 points of access in the open space.