Indoor and outdoor seamless positioning engine system based on LoRa base station
Through the LoRa base station-free indoor and outdoor seamless positioning engine system, the point-to-point ranging and adaptive time slot allocation technology of the LoRa positioning module, combined with the hybrid algorithm of the server positioning engine, the limitations of indoor and outdoor seamless connection in the existing technology are solved, and the high-precision and low-cost seamless positioning effect is achieved.
Patent Information
- Application Number
- CN202411932567.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The existing seamless positioning technology has limitations in seamless connection indoor and outdoor, such as the need for base station installation and fingerprint library establishment, affected by inertial device accuracy and ambient light, and poor UWB signal penetration ability.
Using a LoRa base station-free indoor and outdoor seamless positioning engine system, a fully connected distance measurement network is formed through the point-to-point ranging and adaptive time slot allocation technology of the LoRa positioning module, and the relative and absolute coordinates are solved by combining the mixed algorithm of the server positioning engine.
It realizes adaptive ranging and communication of base station-free LoRa network, improves the accuracy and flexibility of seamless indoor and outdoor positioning, reduces costs, and expands system capacity and positioning number.
Smart Images

Figure CN119355638B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology, and in particular relates to an indoor and outdoor seamless positioning engine system based on LoRa without a base station. Background Art
[0002] When responding to natural disasters, industrial accidents, fires and other emergencies, quickly and accurately locating rescuers and trapped people is the key to improving rescue efficiency and reducing casualties. Personnel positioning technology mainly relies on wireless communication technology (such as GPS, Beidou satellite navigation system, Wi-Fi, Bluetooth, RFID, Zigbee, LoRa, UWB, etc.) and image processing and recognition technology (such as face recognition, infrared thermal imaging). Among them, GPS and Beidou systems are suitable for large-scale outdoor positioning, while indoors or in complex environments, they rely more on short-range wireless communication technology combined with sensor networks to achieve high-precision positioning.
[0003] Seamless positioning technology refers to the ability to combine different positioning technologies to achieve seamless coverage of various positioning applications within the scope of human activities above ground, underground and outer space, while ensuring smooth transition and seamless connection of positioning technologies, positioning algorithms, positioning accuracy and coverage in various scenarios. For example, the Chinese invention patent application with the publication number CN116086448A-patent application name is a multi-scenario seamless positioning method for unmanned equipment based on UWB, IMU, and GNSS fusion, the Chinese invention patent application with the publication number CN115523920A-patent application name is a seamless positioning method based on tight coupling of visual inertial GNSS, and the Chinese invention patent application with the publication number CN113899370A-patent application name is a multi-sensor combination indoor and outdoor seamless positioning method based on GNSS_UWB, etc. GNSS positioning is usually used outdoors, and UWB base station positioning is used indoors. In order to achieve seamless connection from outdoor to indoor, micro-inertial navigation technology is often used for dead reckoning, or the distance is determined by using the strength of wireless signals such as Zigbee RSSI. However, the above seamless positioning technologies have certain limitations. For example, using base station positioning requires building base stations in advance, using RSSI positioning requires building a fingerprint library in advance, using dead reckoning is affected by the accuracy and calibration of inertial devices, and using visual positioning is affected by ambient light or smoke. Although UWB technology can achieve centimeter-level positioning indoors, its signal penetration ability is too poor to achieve seamless connection between indoors and outdoors. Summary of the invention
[0004] In view of the above problems, the present invention provides an indoor and outdoor seamless positioning engine system based on LoRa base station-free. Through the flexible deployment method of the indoor and outdoor seamless positioning engine, there is no need to set up and calibrate the base station, so that the system capacity, number of people to be positioned, indoor and outdoor areas, and cross-floor positioning can be expanded, thereby improving practical efficiency.
[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0006] A LoRa-based indoor and outdoor seamless positioning engine system without a base station includes a server positioning engine and several LoRa positioning modules, wherein a part of the LoRa positioning modules are carried by individual soldiers or integrated into smart helmets and brought into indoor environments, and another part of the LoRa positioning modules are placed in outdoor environments, and the server positioning engine is deployed in an outdoor command post; each of the LoRa positioning modules includes an MCU main control chip, a LoRa positioning chip, a Beidou positioning chip, a Bluetooth communication chip, an altimeter chip, and a power management circuit; the server positioning engine includes a LoRa data communication module, a data analysis module, a hybrid algorithm relative coordinate solution module, an absolute coordinate solution module, and a map display module; each of the LoRa positioning modules is used as a positioning and communication network node, and the MCU main control chip is used to control the LoRa positioning chip through software The Ranging ranging protocol is implemented to realize point-to-point ranging of LoRa network nodes, and the ranging results are processed with high precision to obtain high-precision point-to-point distance values; the adaptive time slot allocation technology under asynchronous clock conditions is further implemented through the MCU main control chip, and the role of each LoRa positioning module is defined by time slot allocation and software to realize base station-free adaptive LoRa ranging and communication, forming a fully connected ranging network; the communication function of the LoRa positioning module is used to form a self-organizing network communication that does not rely on the public network, and the LoRa data communication module of the server positioning engine gathers the information of the network nodes, and uses the positioning server engine hybrid algorithm to solve the relative coordinates of the network nodes, and uses the Beidou positioning information of some nodes in the outdoor environment combined with the relative coordinates to deduce the Beidou positioning absolute coordinates of the entire network node, and display them on the map.
[0007] In a possible implementation, the Ranging protocol is designed as follows: a LoRa positioning module is the Ranging Master, the requester of the ranging, and a LoRa positioning module is the Ranging Slave, the responder of the ranging. The ranging process is as follows: after the handshake is successful, a first time timer is started, and a frequency hopping ranging operation is performed every first time. If each frequency hopping ranging communication is normal, a ranging flight time RangingResult is obtained by reading the corresponding register (0x961~0x963), and the ranging flight time is converted into the distance Distance in meters using the following formula:
[0008] Distence = RangingResult / BW * 36621.09375 (1)
[0009] Where BW is the bandwidth in MHz, which is 1.625 here; in the formula, 36621.09375=(c / (2^12)) / 2, c is the speed of light 300000000 m / s;
[0010] The number of frequency hopping ranging is set to 40 times, and 40 frequency hopping tests are performed. If the number of valid Distences obtained is greater than the set threshold, the Distance array is optimized; the Distance array is sorted, the head and tail are cut off to get the average value AverageDistence; then, the influence of frequency offset FEI and the influence of bandwidth are eliminated to obtain the corrected ranging result; finally, Kalman filtering is performed to remove ranging noise and obtain a high-precision point-to-point distance value.
[0011] In a possible implementation, the design of the adaptive time slot allocation technology under asynchronous clock conditions includes: Assume that there are N LoRa positioning modules in the LoRa network, and the ranging method between nodes uses Ranging ranging. Each LoRa positioning module has two roles. When it is in its own ranging time slot, it is the ranging requester role Ranging Master, and actively conducts ranging polls to other positioning modules in the network; when it is not in its own ranging time slot, it is the ranging responder role Ranging Slave, and passively replies information to the Ranging Master. Let the time for a point-to-point ranging be T1 milliseconds, and the time for each positioning module to occupy the time slot as a ranging requester be T2 milliseconds, T2 = (N - 1) * T1; then the time taken for N positioning modules to complete mutual ranging is N * T2 milliseconds; each of the LoRa positioning modules uses the timer of its respective MCU as the time reference, so the LoRa network is an asynchronous clock network; based on the device ID number defined by the LoRa positioning module, adaptive time slot allocation is performed. For example, after the LoRa positioning module with ID m is powered on, it first performs LoRa reception listening for T3 milliseconds, T3 > N * T2, and determines whether a ranging handshake signal sent by other LoRa positioning modules is received within T3 milliseconds. If a handshake signal from other LoRa positioning modules is received, assume the ID is k. The LoRa module with ID m immediately uses portGetTickCnt() to obtain the high-precision timer value of the MCU main control chip, let this value be Tnow, in units of ms, and then compare the positioning module ID values. If m > k, calculate the time slot start point T_Requester of the LoRa positioning module with ID m as the ranging requester, T_Requester = Tnow + (m - k) * T2; if m < k, calculate the time slot start point T_Requester of the LoRa positioning module with ID m as the ranging requester, T_Requester = Tnow + (N + m - k) * T2; if the LoRa module with ID m does not receive a handshake signal from other LoRa positioning modules within T3 milliseconds after power-on, then the LoRa module with ID m initiates ranging as the ranging requester, and obtains and records the current time Tnow, and calculates the time slot start point T_Requester of the LoRa module with ID m as the ranging requester next time, T_Requester = Tnow + N * T2.
[0012] In a possible implementation, the relative coordinates of network nodes are calculated by the positioning server engine using a hybrid algorithm based on MDS and the intersection of three circles, and the relative coordinates are obtained by MDS using the distance matrix.
[0013] In a possible implementation, the hybrid algorithm based on MDS and three-circle intersection, using the distance matrix to solve the relative coordinates through MDS specifically includes:
[0014] The first step is to build a fully connected distance matrix. After receiving the LoRa ranging information of the network node, the server positioning engine fills the distance matrix. Assuming that there are N positioning nodes in the network, fill the N×N two-dimensional distance matrix. The matrix elements are the point-to-point measurement distances. If it is a non-connected relationship, the measurement distance is set to 0. The network nodes are sorted according to the number of connections in one hop. The node with the largest number of connections in one hop is used as the cluster head. The fully connected sub-network is selected according to the sorting results. , i.e. the first fully connected subnetwork net1, the number of fully connected positioning nodes is n;
[0015] The second step is to centralize the distance matrix. The fully connected subnetwork is centralized so that the data points are symmetrical with respect to the origin. The calculation method is:
[0016] (2)
[0017] in is the identity matrix, is the number of fully connected nodes in net1, It is a full 1 dimensional vector, is the transpose of this vector;
[0018] The third step is to calculate the inner product matrix by centralizing the distance matrix , calculate the inner product matrix , the inner product matrix represents the inner product relationship between data points and is used to further analyze the structure of the data. Through the centralization matrix and the distance matrix The square form of is calculated to be:
[0019] (3)
[0020] The fourth step is to obtain the inner product matrix After that, calculate its eigenvalue and eigenvector. The eigenvalue indicates the main direction of change of the data, and the eigenvector indicates the size in the corresponding direction. Apply the singular value decomposition of the matrix to find The eigenvalues and eigenvectors of are selected, and the two largest eigenvalues and their corresponding eigenvectors are selected as the basis of the 2D space after dimensionality reduction;
[0021] The fifth step is to calculate the relative coordinates. The original data is projected onto the selected 2-dimensional basis to obtain the coordinates after dimensionality reduction. The calculation method is: relative coordinates Eigenvector matrix Square root of the eigenvalue matrix;
[0022] The sixth step is to use the relative coordinate results obtained by MDS to inversely calculate the distance matrix through the distance formula, and then solve the distance between each node. , Representation Node With direct interconnection nodes The sum of the inverse distances; LoRa ranging with each node For comparison, Representation Node With direct interconnection nodes The sum of the LoRa measurement distances is solved to obtain ( ) and sort the nodes i in ascending order of the absolute value;
[0023] The seventh step is to select ) The three nodes with the smallest absolute value are used as the three centers of the three-circle intersection method. The three-circle intersection method is used for optimization. The nodes that exceed the threshold are optimized and the relative coordinates of these nodes are recalculated using the three-circle intersection method;
[0024] Step 8: Return to step 1, extract the second fully connected subnetwork net2, and repeat steps 1 to 7 to obtain the relative coordinates of the second fully connected subnetwork.
[0025] In the ninth step, the coordinates of the two sub-networks, net1 and net2, are spliced. The three nodes shared by the two sub-networks are taken. Through the first to eighth steps, the coordinates of the three shared nodes in the net1 and net2 coordinate systems have been solved. The two coordinate systems are marked with net1 and net2 respectively. The conversion relationship between the two coordinate systems is determined by constructing a mathematical model. The mathematical model is as follows:
[0026] (4)
[0027] in, is the scale parameter, is the rotation matrix, is the translation vector, net1 and net2 are used to identify the coordinate system where the coordinates (X, Y, Z) are located;
[0028] The tenth step is to determine whether there is a fully connected subnetwork. If so, extract the next fully connected subnetwork, repeat the first step to the ninth step, obtain the relative coordinates of the next fully connected subnetwork, and perform coordinate splicing until all fully connected subnetwork coordinates are calculated and spliced;
[0029] The eleventh step is to determine whether there are any scattered points that have not been located. Scattered points are nodes that do not belong to any fully connected subnetwork. If so, the relative coordinates of the scattered points are solved using the one-hop connection relationship of the scattered points and the three-circle intersection method.
[0030] The present invention has the following beneficial effects:
[0031] (1) The mutual distance measurement of LoRa network nodes without base stations is realized, and the distance measurement information is sent to the positioning server for calculation by the positioning engine. In the process of implementing the Ranging ranging protocol, the point-to-point handshake protocol is completed first; then 40 frequency hopping ranging measurements are performed (the center frequency range of each frequency point is from 2402MHz to 2480MHz, with an interval of 2MHz, a total of 40 frequency points). The advantages of using this frequency hopping technology mainly include improving the reliability and stability of communication, enhancing anti-interference ability, and adapting to dynamically changing communication environments.
[0032] (2) Based on the realization of Ranging point-to-point ranging, an adaptive time slot allocation technology under asynchronous clock conditions is further proposed. Each LoRa positioning module occupies a time slot as a ranging requester (RangingRequester), and other LoRa positioning modules in the network serve as ranging responders (Ranging Responder). In this time slot, the Ranging Requester needs to poll each Ranging Responder, so accurate time slot allocation is required to avoid timing conflicts during polling. Each LoRa positioning module therefore has two identity conversions (Ranging Requester / Ranging Responder). By adding the LoRa positioning module ID to the handshake protocol before frequency hopping ranging and using the high-precision timer of the MCU main control chip, the anti-collision mechanism of the asynchronous clock network of the LoRa positioning module is realized. This technology does not limit the number of LoRa positioning modules in the network or the start-up time, and adaptively adjusts the working time slot. Through algorithm innovation, base station-free LoRa ranging positioning is realized without increasing costs, and has the advantages of low cost and easy use.
[0033] (3) After receiving the LoRa ranging information from the network node, the server positioning engine needs to calculate the relative coordinates and absolute coordinates of the network node and display them on the map. The traditional method for solving relative coordinates is the three-circle intersection method (or three-point positioning method). However, due to the error in the ranging information, it is possible that the three circles intersect into one area or the three circles do not intersect, and it is impossible to calculate the accurate coordinates. This method requires high measurement accuracy, and any small error in distance measurement may lead to inaccurate positioning results. The three-circle intersection method only uses three points in the node connectivity relationship, but does not use all the connection relationships. The relative coordinates of the nodes are not optimized in the network. In the process of solving the relative coordinates of the network nodes, the node coordinates solved by the three-circle intersection method may further play the role of the center coordinates of the circle, so that the positioning error will be further propagated and amplified in the network. The present invention proposes a hybrid algorithm based on MDS and three-circle intersection, using the distance matrix to solve the relative coordinates through MDS. This method uses all the connection relationships of the nodes, rather than the partial connection relationships of the three-circle intersection method, so it ensures that the relative coordinates of the nodes conform to the distance matrix relationship as much as possible. In order to further improve the relative coordinate accuracy of the nodes, the present invention uses the coordinates solved by MDS to inversely calculate the distance matrix, then compares the errors of the inverse matrix and the measurement matrix, and selects the three nodes with the highest accuracy as the three centers of the three-circle intersection method by sorting to correct the nodes with poor accuracy. The advantage of the present invention is that it takes advantage of the global advantages of MDS and the local advantages of the three-circle intersection method, and improves the accuracy of the relative coordinates.
[0034] (4) The system of the present invention mainly includes a LoRa positioning module and a server positioning engine. The entire deployment process is that the LoRa positioning module is carried by personnel or flexibly placed indoors or outdoors, and the server positioning engine is deployed in an outdoor command post. The LoRa positioning module has the characteristics of small size, light weight, explosion-proof, dustproof, waterproof, and high temperature resistance. The LoRa positioning module of the present invention does not need to physically distinguish the roles of base stations and tags, so there is no need to set up base stations and calibrate base stations. In addition, the system capacity, the number of people to be positioned, the indoor and outdoor areas, and the number of floors can be expanded, which improves practical efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a principle block diagram of a LoRa-based indoor and outdoor seamless positioning engine system without a base station according to an embodiment of the present invention;
[0036] Figure 2 A schematic diagram of the structure of a LoRa positioning module in a LoRa-based indoor and outdoor seamless positioning engine system without a base station according to an embodiment of the present invention;
[0037] Figure 3A principle block diagram of a server positioning engine in a LoRa-based base station-free indoor and outdoor seamless positioning engine system according to an embodiment of the present invention;
[0038] Figure 4 This is a schematic diagram of the LoRa point-to-point ranging process in a specific application example;
[0039] Figure 5 It is a schematic diagram of the Ranging distance measurement process in a specific application example;
[0040] Figure 6 This is a timing diagram of network node polling ranging using LoRa positioning module 1 as an example in a specific application example;
[0041] Figure 7 A schematic diagram of a flow chart of time slot allocation in a specific application example;
[0042] Figure 8 The figure is a flowchart of a hybrid algorithm based on MDS and three-circle intersection in a specific application example. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] See also Figure 1 , shows an indoor and outdoor seamless positioning engine system based on LoRa without base station according to an embodiment of the present invention, including a server positioning engine and several LoRa positioning modules, wherein a part of the LoRa positioning modules are carried by individual soldiers or integrated into smart helmets and brought into indoor environments, and another part of the LoRa positioning modules are placed in outdoor environments, and the server positioning engine is deployed in an outdoor command post. Figure 2 Each LoRa positioning module includes an MCU main control chip, a LoRa positioning chip, a Beidou positioning chip, a Bluetooth communication chip, an altimeter chip, and a power management circuit. Figure 3,The server positioning engine includes LoRa data communication module, data parsing module, hybrid algorithm ,relative coordinate solving module, absolute coordinate solving module and map display module. The above-mentioned indoor and outdoor seamless positioning engine system based on LoRa without base station, each LoRa positioning module as a positioning and communication network node, the MCU main control chip is used to control the LoRa positioning chip, the Ranging ranging protocol is implemented through software, the point-to-point ranging of the LoRa network nodes is realized, and the ranging results are processed with high precision to obtain high-precision point-to-point distance values; the adaptive time slot allocation technology under asynchronous clock conditions is further implemented through the MCU main control chip, and the role of each LoRa positioning module is defined through time slot allocation and software to realize base station-free adaptive LoRa ranging and communication, forming a fully connected ranging network; the communication function of the LoRa positioning module is used to form a self-organizing network communication that does not rely on the public network, the LoRa data communication module of the server positioning engine gathers the information of the network nodes, and the positioning server engine hybrid algorithm is used to solve the relative coordinates of the network nodes, and the Beidou positioning information of some LoRa positioning module nodes in the outdoor environment is combined with the relative coordinates to calculate the Beidou positioning absolute coordinates of the entire network node, and display them on the map.
[0045] In the scenarios of specific application implementation, such as emergency rescue scenarios, the deployment method is required to be simple, fast, and without too many artificial settings or constraints. Taking the firefighting scenario as an example, each firefighter carries a LoRa positioning module, and 5 people form a group. After two groups of firefighters enter the inner field, they are distributed on two floors, such as one group on the 3rd floor and the second group on the 4th floor. There are 10 people in the inner field and 10 LoRa positioning modules. Three LoRa positioning modules and one positioning engine server are flexibly placed at the temporary charging position in the outer field (or on the fire truck). The LoRa positioning module has the characteristics of small size, light weight, explosion-proof, dustproof, waterproof, and high temperature resistance, which can ensure that LoRa communication is kept unobstructed in various harsh environments. The LoRa positioning module of the present invention does not need to physically distinguish the roles of base stations and tags, so there is no need to set up and calibrate base stations. In addition, the system capacity, the number of people to be positioned, the indoor and outdoor areas, and the number of floors across the floors can be expanded, which improves practical efficiency.
[0046] In a specific application example, Figure 4The figure shows the point-to-point ranging process of the LoRa positioning module. The design of the Ranging ranging protocol is as follows: a LoRa positioning module is the Ranging Master, the requester of the ranging, and a LoRa positioning module is the Ranging Slave, the responder of the ranging. The ranging process is as follows: after the handshake is successful, a timer for the first time is started, and the frequency hopping ranging operation is performed every first time. If the frequency hopping ranging communication is normal each time, a ranging flight time RangingResult is obtained by reading the corresponding register (0x961~0x963). The ranging flight time is converted into the distance Distance in meters using the following formula:
[0047] Distence = RangingResult / BW * 36621.09375 (1)
[0048] Where BW is the bandwidth in MHz, which is 1.625 here; in the formula, 36621.09375=(c / (2^12)) / 2, c is the speed of light 300000000 m / s;
[0049] The number of frequency hopping ranging settings is set to 40 times, and 40 frequency hopping tests are performed. If the number of valid Distences obtained is greater than the set threshold, the Distance array is optimized; the Distance array is sorted, and the head and tail are cut off to get the average (for example, the largest 3 values and the smallest 3 values are removed, and the remaining values are summed and averaged) to obtain the distance average value AverageDistence; then, the influence of frequency offset FEI and the influence of bandwidth are eliminated to obtain the corrected ranging result; finally, Kalman filtering is performed to remove ranging noise to obtain a high-precision point-to-point distance value.
[0050] In the specific application example, STM32F103 is used as the MCU main control chip MCU, and the LoRa positioning module can use the Ranging ranging of the SX1280 chip. Its ranging accuracy can reach the meter level, the error is better than 5 meters, and the ranging range is up to 1000 meters.
[0051] For a specific application example, see Figure 5 The point-to-point handshake protocol and 40 frequency modulation ranging are the Ranging ranging process. The frequency points of CH1~CH40 in the Ranging ranging process are shown in Table 1. After the handshake is successful, a 3.4ms timer is started and the frequency hopping ranging operation is performed every 3.4ms.
[0052] Table 1 The center frequency of frequency hopping during Ranging
[0053] In a specific application example, the design of the adaptive time slot allocation technology under asynchronous clock conditions includes: assuming that there are N LoRa positioning modules in the LoRa network, the ranging method between nodes uses Ranging ranging. Each LoRa positioning module has two roles. When it is in its own ranging time slot, it is the ranging requester role Ranging Master and actively polls other positioning modules in the network for ranging; when it is not in its own ranging time slot, it is the ranging responder role Ranging Slave and passively replies to the Ranging Master with information. Let the time for a point-to-point ranging be T1 milliseconds, and the time for each positioning module to occupy the time slot as a ranging requester be T2 milliseconds, where T2 = (N - 1) * T1. Then the time taken for N positioning modules to complete mutual ranging is N * T2 milliseconds. Each of the LoRa positioning modules uses the timer of its respective MCU as the time reference, so the LoRa network is an asynchronous clock network. Based on the device ID number defined by the LoRa positioning module, adaptive time slot allocation is performed. For example, after the LoRa positioning module with ID m is powered on, it first performs LoRa receive listening for T3 milliseconds, where T3 > N * T2. It judges whether it has received the ranging handshake signal sent by other LoRa positioning modules within T3 milliseconds. If it has received the handshake signal from another LoRa positioning module, assuming the ID is k, the LoRa module with ID m immediately uses portGetTickCnt() to obtain the high-precision timer value of the MCU main control chip, let this value be Tnow, with the unit of ms, and then compares the positioning module ID values. If m > k, calculate the time slot start point T_Requester of the LoRa positioning module with ID m as the ranging requester, where T_Requester = Tnow + (m - k) * T2; if m < k, calculate the time slot start point T_Requester of the LoRa positioning module with ID m as the ranging requester, where T_Requester = Tnow + (N + m - k) * T2; if the LoRa module with ID m does not receive the handshake signal sent by other LoRa positioning modules within T3 milliseconds after power-on, then the LoRa module with ID m initiates ranging as the ranging requester, obtains and records the current time Tnow, and calculates the time slot start point T_Requester of the LoRa module with ID m as the ranging requester next time, where T_Requester = Tnow + N * T2.
[0054] Further, referring to Figure 6, taking the LoRa positioning module 1 as an example, it is the network node polling ranging timing diagram, which is implemented by using MCU embedded software. The LoRa positioning module 1 acts as the Master (the requester for ranging), and other LoRa positioning modules act as Slaves (the responders for ranging). For example, in the ranging process of Ranging between the LoRa positioning module 1 and the LoRa positioning module 2, the ranging time slot is 100 ms, and the redundant time slot is 20 ms. Therefore, the ranging time slot for each point-to-point ranging is 120 ms. If there are N LoRa positioning modules in the LoRa network, the time slot length Ts for each LoRa positioning module as the requester is (N - 1) * 120 ms. Each LoRa positioning module has two roles. One is when it is in its own ranging time slot, it acts as the Master role (the requester role for ranging), and actively polls other positioning modules in the network for ranging. The other is when it is not in its own ranging time slot, it acts as the Slave role (the responder role for ranging), and passively replies to the Master with information.
[0055] Further, referring to Figure 7 , taking 11 LoRa positioning modules as an example, each positioning module occupies a time slot of 1200 milliseconds as the ranging requester. The 11 positioning modules (when all are online) altogether occupy a time of 13200 milliseconds. After the LoRa positioning module (such as ID m) is powered on, it first performs LoRa reception and listening for 15000 milliseconds to determine whether it has received the ranging handshake signal sent by other LoRa positioning modules within 15000 milliseconds. If it receives the handshake signal from other LoRa positioning modules (such as ID k), it immediately uses portGetTickCnt() to obtain the high-precision timer value of the main control chip, and set this value as T1, with the unit of ms. Compare the positioning module IDs. If m > k, calculate the time slot start point T_Requester of the LoRa positioning module (ID m) to be the ranging requester, T_Requester = T1 + (m - k) * 1200. If m < n, calculate the time slot start point T_Requester of the LoRa positioning module (ID m) to be the ranging requester, T_Requester = T1 + (11 + m - k) * 1200. If it does not receive the handshake signal sent by other LoRa positioning modules within 1 minute after power-on, then the LoRa positioning module initiates ranging as the ranging requester, and obtains and records the current moment T1, and calculates the time slot start point T_Requester of the LoRa positioning module (ID m) to be the ranging requester next time, T_Requester = T1 + 13200.
[0056] In a specific application example, the relative coordinates of the network nodes are calculated using the positioning server engine using a hybrid algorithm based on MDS and three-circle intersection, and the relative coordinates are calculated using the distance matrix through MDS, see FIG8 , specifically including:
[0057] The first step is to build a fully connected distance matrix. After receiving the LoRa ranging information of the network node, the server positioning engine fills the distance matrix. Assuming that there are N positioning nodes in the network, fill the N×N two-dimensional distance matrix. The matrix elements are the point-to-point measurement distances. If it is a non-connected relationship, the measurement distance is set to 0. The network nodes are sorted according to the number of connections in one hop. The node with the largest number of connections in one hop is used as the cluster head. The fully connected sub-network is selected according to the sorting results. , that is, the first fully connected subnetwork net1, the number of fully connected positioning nodes is n;
[0058] The second step is to centralize the distance matrix. The fully connected subnetwork is centralized so that the data points are symmetrical with respect to the origin. The calculation method is:
[0059] (2)
[0060] in is the identity matrix, is the number of fully connected nodes in net1, It is a full 1 dimensional vector, is the transpose of this vector;
[0061] The third step is to calculate the inner product matrix by centralizing the distance matrix , calculate the inner product matrix , the inner product matrix represents the inner product relationship between data points and is used to further analyze the structure of the data. Through the centralization matrix and the distance matrix The square form of is calculated to be:
[0062] (3)
[0063] The fourth step is to obtain the inner product matrix After that, calculate its eigenvalue and eigenvector. The eigenvalue indicates the main direction of change of the data, and the eigenvector indicates the size in the corresponding direction. Apply the singular value decomposition of the matrix to find The eigenvalues and eigenvectors of are selected, and the two largest eigenvalues and their corresponding eigenvectors are selected as the basis of the 2D space after dimensionality reduction;
[0064] The fifth step is to calculate the relative coordinates. The original data is projected onto the selected 2-dimensional basis to obtain the coordinates after dimensionality reduction. The calculation method is: relative coordinates Eigenvector matrix Square root of the eigenvalue matrix;
[0065] The sixth step is to use the relative coordinate results obtained by MDS to inversely calculate the distance matrix through the distance formula, and then solve the distance between each node. , Representation Node With direct interconnection nodes The sum of the inverse distances; LoRa ranging with each node For comparison, Representation Node With direct interconnection nodes The sum of the LoRa measurement distances is solved to obtain ( ) and sort the nodes i in ascending order of the absolute value;
[0066] The seventh step is to select ) The three nodes with the smallest absolute value are used as the three centers of the three-circle intersection method. The three-circle intersection method is used for optimization. The nodes that exceed the threshold are optimized and the relative coordinates of these nodes are recalculated using the three-circle intersection method;
[0067] Step 8: Return to step 1, extract the second fully connected subnetwork net2, and repeat steps 1 to 7 to obtain the relative coordinates of the second fully connected subnetwork.
[0068] In the ninth step, the coordinates of the two sub-networks, net1 and net2, are spliced. The three nodes shared by the two sub-networks are taken. Through the first to eighth steps, the coordinates of the three shared nodes in the net1 and net2 coordinate systems have been solved. The two coordinate systems are marked with net1 and net2 respectively. The conversion relationship between the two coordinate systems is determined by constructing a mathematical model. The mathematical model is as follows:
[0069] (4)
[0070] in, is the scale parameter, is the rotation matrix, is the translation vector, net1 and net2 are used to identify the coordinate system where the coordinates (X, Y, Z) are located;
[0071] The tenth step is to determine whether there is a fully connected subnetwork. If so, extract the next fully connected subnetwork, repeat the first step to the ninth step, obtain the relative coordinates of the next fully connected subnetwork, and perform coordinate splicing until all fully connected subnetwork coordinates are calculated and spliced;
[0072] Step 11: Determine whether there are any scattered points that have not been located. Scattered points are nodes that do not belong to any fully connected subnetwork. If so, use the one-hop connection relationship of the scattered points and the three-circle intersection method to solve the relative coordinates of the scattered points.
[0073] In summary, the embodiment of the present invention proposes a LoRa-based indoor and outdoor seamless positioning engine system without a base station. It uses a base station-free adaptive LoRa ranging and communication method to achieve mutual ranging of LoRa positioning module network nodes, and overcomes the problem of seamless connection between indoor and outdoor positioning. It proposes a hybrid algorithm based on MDS and the intersection of three circles, which realizes the relative coordinate solution of the LoRa base station-free network and improves the accuracy of relative coordinate solution. It does not increase the hardware cost; the positioning module does not need to distinguish the roles of base stations and tags, does not require the installation and calibration of base stations, does not limit the scene, does not limit the number of nodes in the network and the start-up time, and adaptively allocates time slots under asynchronous clock conditions, which is practical and convenient; in addition, the system capacity, the number of people positioned, the indoor and outdoor areas, and the number of floors can be expanded. Therefore, it has the advantages of high precision, low cost, practicality, convenience, and flexible expansion, and the algorithm and method can be transplanted to other wireless radio frequency positioning fields.
[0074] It should be understood that the exemplary embodiments described herein are illustrative rather than restrictive. Although one or more embodiments of the present invention have been described in conjunction with the accompanying drawings, it should be understood by those skilled in the art that various changes in form and detail may be made without departing from the spirit and scope of the present invention as defined by the appended claims.
Claims
1. A LoRa-based indoor and outdoor seamless positioning engine system without base station, characterized in that: It includes a server positioning engine and several LoRa positioning modules, some of which are carried by individual soldiers or integrated into smart helmets and brought into indoor environments, and the other part of the LoRa positioning modules are placed in outdoor environments. The server positioning engine is deployed in an outdoor command post; each of the LoRa positioning modules includes an MCU main control chip, a LoRa positioning chip, a Beidou positioning chip, a Bluetooth communication chip, an altimeter chip, and a power management circuit; the server positioning engine includes a LoRa data communication module, a data analysis module, a hybrid algorithm for solving relative coordinates module, a module for solving absolute coordinates, and a map display module; each of the LoRa positioning modules serves as a positioning and communication network node, uses the MCU main control chip to control the LoRa positioning chip, and implements Ranging distance measurement coordination through software The invention relates to a method for realizing point-to-point distance measurement of LoRa network nodes, and performing high-precision processing of the distance measurement results to obtain high-precision point-to-point distance values; further realizing adaptive time slot allocation technology under asynchronous clock conditions through the MCU main control chip, and realizing base station-free adaptive LoRa ranging and communication through time slot allocation and software definition of the role of each LoRa positioning module, and forming a fully connected ranging network; utilizing the communication function of the LoRa positioning module to form a self-organizing network communication that does not rely on the public network, the LoRa data communication module of the server positioning engine gathers the information of the network nodes, and uses the hybrid algorithm of the positioning server engine to solve the relative coordinates of the network nodes, and uses the Beidou positioning information of some nodes in the outdoor environment combined with the relative coordinates to deduce the Beidou positioning absolute coordinates of the entire network node, and display them on the map; The design of the adaptive time slot allocation technology under asynchronous clock conditions includes: There are N LoRa positioning modules in the LoRa network. The ranging method between nodes uses Ranging ranging. Each LoRa positioning module has two roles. When it is in its own ranging time slot, it is the ranging requester role Ranging Master and actively polls other positioning modules in the network for ranging; when it is not in its own ranging time slot, it is the ranging responder role Ranging Slave and passively replies to the Ranging Master for information. The time for a point-to-point ranging is T1 milliseconds, and each positioning module occupies a time slot of T2 milliseconds as a ranging requester, where T2 = (N - 1) * T1. Then the time taken for N positioning modules to complete mutual ranging is N * T2 milliseconds. Each of the LoRa positioning modules uses the timer of its respective MCU as the time reference, so the LoRa network is an asynchronous clock network. Based on the device ID number defined by the LoRa positioning module, adaptive time slot allocation is performed. After the LoRa positioning module with ID m powers on, it first performs LoRa reception listening for T3 milliseconds, where T3 > N * T2, and determines whether a ranging handshake signal sent by other LoRa positioning modules is received within T3 milliseconds. If a handshake signal from another LoRa positioning module with ID k is received, the LoRa module with ID m immediately uses portGetTickCnt() to obtain the high-precision timer value of the MCU main control chip, which is Tnow in milliseconds. Then, compare the positioning module ID values. If m > k, calculate the time slot start point T_Requester of the LoRa positioning module with ID m as a ranging requester, where T_Requester = Tnow + (m - k) * T2; if m < k, calculate the time slot start point T_Requester of the LoRa positioning module with ID m as a ranging requester, where T_Requester = Tnow + (N + m - k) * T2; if the LoRa module with ID m does not receive a handshake signal from other LoRa positioning modules within T3 milliseconds after power-on, then the LoRa module with ID m initiates ranging as a ranging requester, obtains and records the current time Tnow, and calculates the time slot start point T_Requester of the LoRa module with ID m as a ranging requester next time, where T_Requester = Tnow + N * T2; The relative coordinates of the network nodes are calculated by using the positioning server engine based on a hybrid algorithm of MDS and three-circle intersection, and the relative coordinates are obtained by using MDS for the distance matrix; The specific steps of the hybrid algorithm of MDS and three-circle intersection for obtaining the relative coordinates by using the distance matrix through MDS include: The first step is to build a fully connected distance matrix. After receiving the LoRa ranging information of the network node, the server positioning engine fills the distance matrix. There are N positioning nodes in the network, and the N×N two-dimensional distance matrix is filled. The matrix elements are the point-to-point measurement distances. If it is a non-connected relationship, the measurement distance is set to 0. The network nodes are sorted according to the number of connections in one hop. The node with the largest number of connections in one hop is used as the cluster head, and the fully connected sub-network is selected according to the sorting results. , that is, the first fully connected subnetwork net1, the number of fully connected positioning nodes is n; The second step is to centralize the distance matrix and perform centralization processing for the fully connected sub-network so that the data points are relative to Origin symmetric, centered matrix The calculation method is: (2) in is the identity matrix, is the number of fully connected nodes in net1, It is a full 1 dimensional vector, is the transpose of this vector; The third step is to calculate the inner product matrix by centralizing the distance matrix , calculate the inner product matrix , the inner product matrix represents the inner product relationship between data points and is used to further analyze the structure of the data. The inner product matrix is calculated by the square form of the centering matrix and the distance matrix: (3) The fourth step is to obtain the inner product matrix After that, calculate its eigenvalue and eigenvector. The eigenvalue indicates the main direction of change of the data, and the eigenvector indicates the size in the corresponding direction. Apply the singular value decomposition of the matrix to find The eigenvalues and eigenvectors of are selected, and the two largest eigenvalues and their corresponding eigenvectors are selected as the basis of the 2D space after dimensionality reduction; The fifth step is to calculate the relative coordinates. The original data is projected onto the selected 2-dimensional basis to obtain the coordinates after dimensionality reduction. The calculation method is: relative coordinates Eigenvector matrix Square root of the eigenvalue matrix; The sixth step is to use the relative coordinate results obtained by MDS to inversely calculate the distance matrix through the distance formula, and then solve the distance between each node. , Representation Node With direct interconnection nodes The sum of the inverse distances; LoRa ranging with each node For comparison, Representation Node With direct interconnection nodes The sum of the LoRa measurement distances is solved to obtain ( ) and sort the nodes i in ascending order of the absolute value; The seventh step is to select ) The three nodes with the smallest absolute value are used as the three centers of the three-circle intersection method. The three-circle intersection method is used for optimization. The nodes that exceed the threshold are optimized and the relative coordinates of these nodes are recalculated using the three-circle intersection method; Step 8: Return to step 1, extract the second fully connected subnetwork net2, and repeat steps 1 to 7 to obtain the relative coordinates of the second fully connected subnetwork. In the ninth step, the coordinates of the two sub-networks, net1 and net2, are spliced. The three nodes shared by the two sub-networks are taken. Through the first to eighth steps, the coordinates of the three shared nodes in the net1 and net2 coordinate systems have been solved. The two coordinate systems are marked with net1 and net2 respectively. The conversion relationship between the two coordinate systems is determined by constructing a mathematical model. The mathematical model is as follows: (4) in, is the scale parameter, is the rotation matrix, is the translation vector, net1 and net2 are used to identify the coordinate system where the coordinates (X, Y, Z) are located; The tenth step is to determine whether there is a fully connected subnetwork. If so, extract the next fully connected subnetwork, repeat the first step to the ninth step, obtain the relative coordinates of the next fully connected subnetwork, and perform coordinate splicing until all fully connected subnetwork coordinates are calculated and spliced; The eleventh step is to determine whether there are any scattered points that have not been located. Scattered points are nodes that do not belong to any fully connected subnetwork. If so, the relative coordinates of the scattered points are solved using the one-hop connection relationship of the scattered points and the three-circle intersection method.
2. The indoor and outdoor seamless positioning engine system based on LoRa without base station as claimed in claim 1, characterized in that: The design of the Ranging protocol is as follows: a LoRa positioning module is the Ranging Master, the requester of the ranging, and a LoRa positioning module is the Ranging Slave, the responder of the ranging. The ranging process is as follows: after the handshake is successful, a timer for the first time is started, and the frequency hopping ranging operation is performed every first time. If the frequency hopping ranging communication is normal each time, a ranging flight time RangingResult is obtained by reading the corresponding register (0x961~0x963), and the ranging flight time is converted into the distance Distance in meters using the following formula: Distence = RangingResult / BW * 36621.09375 (1) Where BW is the bandwidth in MHz, which is 1.625 here; in the formula, 36621.09375=(c / (2^12)) / 2, c is the speed of light 300000000 m / s; The number of frequency hopping distance measurement settings is set to 40 times, and 40 frequency hopping tests are performed. If the number of valid Distences obtained is greater than the set threshold, the Distance array is optimized; Sort the Distance array, remove the head and tail to get the average, and get the average distance AverageDistence; Then, the influence of frequency offset FEI and bandwidth is eliminated to obtain the corrected ranging result; finally, Kalman filtering is performed to remove ranging noise and obtain a high-precision point-to-point distance value.
Citation Information
Patent Citations
Multi-sensor combination indoor and outdoor seamless positioning method based on GNSS UWB
CN113899370A
Seamless positioning method based on visual inertia GNSS tight coupling
CN115523920A
Unmanned equipment multi-scene seamless positioning method based on UWB, IMU and GNSS fusion
CN116086448A
UWB base-station-free emergency positioning system applied to urban complex building
CN118234017A