A positioning method and system based on LoRa SX1280 channel multiplexing
By introducing the channel reuse mechanism and multilateral positioning algorithm into the LoRa SX1280 positioning system, the grouping and channel allocation of positioning nodes are realized, which solves the problem of insufficient channel reuse in the existing technology, improves the positioning efficiency and stability, and is suitable for multiple applications. Positioning requirements of various scenarios.
Patent Information
- Application Number
- CN202210265411.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-14
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-06-14
AI Technical Summary
The existing LoRa SX1280 positioning method cannot achieve channel multiplexing, resulting in low positioning capacity and usage efficiency, and cannot meet the needs of large-scale use scenarios.
Deploy heartbeat nodes, multiple positioning nodes and multiple positioning base stations in the target area. Through the channel multiplexing mechanism and multilateral positioning algorithm, terminal equipment and heartbeat nodes are used to search, detect and group positioning nodes to achieve channel allocation within the group and improve positioning. efficiency and stability.
Through the channel multiplexing and node scheduling mechanism, the efficiency and stability of the positioning system are improved, the channel utilization is enhanced, and it is suitable for indoor and outdoor low-power, large-range, and large-capacity positioning requirements.
Smart Images

Figure CN114827903B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of positioning technology, and in particular to a positioning method and system based on LoRa SX1280 channel multiplexing. Background Art
[0002] In the current market, the Global Positioning System (GPS), Beidou and other satellite positioning systems are the most common positioning monitoring solutions, but satellite positioning has inherent defects in indoor scenarios and cannot achieve indoor monitoring, so there is still a huge gap in the indoor positioning monitoring market to be filled. We found that in such satellite denial scenarios, using LoRa SX1280 to achieve positioning has many advantages.
[0003] LoRa is based on spread spectrum technology and is a solution for long-distance wireless communication. As an emerging positioning technology, the special feature of LoRa is that as long as the terminal node communicates with the network, the geographic location data can be obtained, with almost no impact on the bill of materials and power consumption. The positioning system based on LoRa can work outdoors and indoors, and the accuracy depends on the terrain and base station density. In addition to integrating many advantages of positioning methods such as Bluetooth, WI-FI, and ZigBee, LoRa positioning technology also has excellent characteristics such as lowest power consumption, lowest cost, smallest size, and lowest environmental impact.
[0004] As a newly launched LoRa positioning module, SX1280 is a low-power, long-distance 2.4GHz wireless transceiver chip. Its sensitivity far exceeds that of similar 2.4GHz RF chips, and its chip power consumption has reached the leading level of similar chips in the industry. SX1280 has LoRa communication mode and LoRa ranging engine. Its ranging distance is long and accurate, and it is easy to operate. In addition, SX1280 has a simple hardware system, few peripheral devices and low cost. In terms of chip performance, system cost and unique functions, SX1280 is very suitable for building a positioning system.
[0005] However, the current positioning method of SX1280 cannot achieve channel multiplexing. Each ranging measurement uses 40 channels, and the channel utilization rate is not high. When positioning multiple nodes, only time division multiplexing can be used. The positioning capacity is low and it is not suitable for large-scale usage scenarios.
[0006] Combined with the characteristics of LoRa point-to-point ranging, we found that applying the multi-lateration positioning algorithm to build a positioning system is a very feasible solution. The multi-lateration positioning algorithm is a simple positioning algorithm. The specific implementation content is as follows: draw circles with multiple positioning base stations with known positions as the center and the distance to the positioning node as the radius. The estimated intersection of each circle is the location of the positioning node.
[0007] In summary, it can be seen that the positioning system built using LoRa SX1280 and the multi-lateral positioning algorithm can well meet the application of satellite denial positioning scenarios. However, the current positioning method cannot achieve channel reuse, and the positioning capacity and efficiency need to be improved. To address this problem, it is urgent to improve the positioning capacity and build an efficient positioning method. Summary of the invention
[0008] In order to overcome the deficiencies of the prior art, the object of the present invention is to provide a positioning method and system based on LoRa SX1280 channel multiplexing.
[0009] To achieve the above object, the present invention provides the following solutions:
[0010] A positioning method based on LoRa SX1280 channel multiplexing, comprising:
[0011] Deploy a heartbeat node, multiple positioning nodes and multiple positioning base stations in the target area; the heartbeat node and the positioning node work in the LoRa communication mode; the positioning base station works in the LoRa ranging engine slave mode;
[0012] Based on the first channel and the second channel, using the terminal device and the heartbeat node to search and detect the positioning nodes in the target area, and grouping the positioning nodes detected by the search to obtain multiple node groups;
[0013] Positioning the first node group to obtain a positioning position of the first group;
[0014] The second node group to the last node group are positioned in sequence to obtain the positioning position of each node group; after the last node group is positioned, the first node group is repositioned; after the first node group is positioned 5 times, the heartbeat node sends a search frame to search and detect the number of the positioning nodes in the target area, and if the number or ID of the positioning nodes changes, the positioning nodes are regrouped.
[0015] Preferably, based on the first channel and the second channel, the terminal device and the heartbeat node are used to search and detect the positioning nodes in the target area, and the positioning nodes detected by the search are grouped to obtain multiple node groups, including:
[0016] Sending a start instruction through the terminal device; the start instruction is transmitted to the heartbeat node through a data link;
[0017] When the heartbeat node matches the ID of the heartbeat node in the start instruction, the heartbeat node sends a search frame through the first channel to search for the positioning node existing in the target area;
[0018] After each positioning node receives the search frame, the positioning node sends a response frame to the heartbeat node through the second channel; the response frame includes the ID of the heartbeat node;
[0019] After a preset detection time, the heartbeat node groups the detected heartbeat nodes to obtain a plurality of the node groups; the number of the heartbeat nodes in the node group is less than or equal to 4.
[0020] Preferably, the positioning of the first node group specifically includes:
[0021] Based on the first channel, using the heartbeat node to send a broadcast frame to each node of the first node group;
[0022] Polling and ranging the positioning base station according to each node of the first node group; each node of the node group uses different channels to handshake and measure the distance of the positioning base station;
[0023] After each node completes the ranging, each node of the node group enters the LoRa communication mode; each node of each node group sends a reply frame to the heartbeat node through its own channel;
[0024] Based on the heartbeat node, determine a ranging result according to the reply frame, and send the ranging result to the terminal device;
[0025] Based on the terminal device, the ranging result is processed according to a multilateral positioning algorithm to obtain the positioning position of the first group.
[0026] Preferably, the sending of the broadcast frame to each node of the first node group by using the heartbeat node based on the first channel includes:
[0027] The heartbeat node sends the broadcast frame through the first channel; the broadcast frame includes ranging instructions of the first node, the second node, the third node and the fourth node in the node group.
[0028] Preferably, the polling and ranging of the positioning base station according to each node of the first node group includes:
[0029] The first positioning node receives a preset data packet and parses it according to the frame format. If the first positioning node matches the ID of the first positioning node in the ranging instruction, the first positioning node is instructed to perform the LoRa ranging engine host mode; the preset data packet includes the heartbeat node ID, the matching positioning node ID and the positioning base station ID matched by the positioning;
[0030] Using the third channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, using the fourth channel to perform distance measurement on each of the positioning base stations;
[0031] The second positioning node receives a preset data packet and parses it according to a frame format. If the second positioning node matches the ID of the second positioning node in the ranging instruction, the second positioning node is instructed to perform a LoRa ranging engine host mode.
[0032] Using the fifth channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, using the sixth channel to perform distance measurement on each of the positioning base stations;
[0033] The third positioning node receives a preset data packet and parses it according to a frame format. If the third positioning node matches the ID of the third positioning node in the ranging instruction, the third positioning node is instructed to perform a LoRa ranging engine host mode;
[0034] Using the seventh channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, using the eighth channel to perform distance measurement on each of the positioning base stations;
[0035] The fourth positioning node receives a preset data packet and parses it according to a frame format. If the fourth positioning node matches the ID of the fourth positioning node in the ranging instruction, the fourth positioning node is instructed to perform a LoRa ranging engine host mode;
[0036] The ninth channel is used to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, the tenth channel is used to perform distance measurement on each of the positioning base stations.
[0037] A positioning system based on LoRa SX1280 channel multiplexing, comprising:
[0038] A deployment module is used to deploy a heartbeat node, multiple positioning nodes and multiple positioning base stations in a target area; the heartbeat node and the positioning node work in a LoRa communication mode; the positioning base station works in a LoRa ranging engine slave mode;
[0039] A grouping module, configured to search and detect positioning nodes in the target area using a terminal device and the heartbeat node based on the first channel and the second channel, and group the positioning nodes detected by the search to obtain a plurality of node groups;
[0040] A first positioning module, used to locate the first node group to obtain the positioning position of the first group;
[0041] A circular positioning module is used to locate the second node group to the last node group in sequence to obtain the positioning position of each node group; after the last node group is located, the first node group is relocated; after the first node group is located 5 times, the heartbeat node sends a search frame to search and detect the number of the positioning nodes in the target area, and if the number or ID of the positioning nodes changes, the positioning nodes are regrouped.
[0042] Preferably, the grouping module specifically includes:
[0043] A starting unit, used for sending a starting instruction through the terminal device; the starting instruction is transmitted to the heartbeat node through a data link;
[0044] A first search unit, configured to, when the heartbeat node matches the ID of the heartbeat node in the start instruction, cause the heartbeat node to send a search frame through the first channel to search for the positioning node existing in the target area;
[0045] a second search unit, configured to cause each positioning node to send a response frame to the heartbeat node through the second channel after receiving the search frame; the response frame includes an ID of the heartbeat node;
[0046] The grouping unit is used to group the detected heartbeat nodes by the heartbeat node after a preset detection time to obtain a plurality of the node groups; the number of the heartbeat nodes in the node group is less than or equal to 4.
[0047] Preferably, the first positioning module specifically includes:
[0048] A broadcast unit, configured to send a broadcast frame to each node of the first node group by using the heartbeat node based on the first channel;
[0049] A ranging unit, configured to perform polling ranging on the positioning base station according to each node of the first node group; each node of the node group performs handshake and ranging on the positioning base station using different channels;
[0050] A reply unit, configured to put each node of the node group into the LoRa communication mode after each node completes ranging; each node of each node group sends a reply frame to the heartbeat node through its own channel;
[0051] A determining unit, configured to determine a ranging result according to the reply frame based on the heartbeat node, and send the ranging result to the terminal device;
[0052] A processing unit is used to process the ranging result based on the terminal device according to a multilateral positioning algorithm to obtain the positioning position of the first group.
[0053] Preferably, the broadcast unit specifically includes:
[0054] The broadcast subunit is used for the heartbeat node to send the broadcast frame through the first channel; the broadcast frame includes ranging instructions of the first node, the second node, the third node and the fourth node in the node group.
[0055] Preferably, the distance measuring unit specifically includes:
[0056] A first parsing subunit is configured to receive a preset data packet by the first positioning node and parse it according to a frame format, and if the first positioning node matches the ID of the first positioning node in the ranging instruction, the first positioning node is instructed to perform a LoRa ranging engine host mode; the preset data packet includes a heartbeat node ID, a matching positioning node ID, and a positioning base station ID matched by the positioning;
[0057] A first ranging subunit is used to use the third channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the fourth channel to perform ranging with each of the positioning base stations;
[0058] A second parsing subunit is configured to receive a preset data packet by the second positioning node and parse it according to a frame format, and if the second positioning node matches the ID of the second positioning node in the ranging instruction, instruct the second positioning node to perform a LoRa ranging engine host mode;
[0059] A second ranging subunit is used to use the fifth channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the sixth channel to perform ranging with each of the positioning base stations;
[0060] A third parsing subunit is configured to receive a preset data packet by the third positioning node and parse it according to a frame format, and if the third positioning node matches the ID of the third positioning node in the ranging instruction, instruct the third positioning node to perform a LoRa ranging engine host mode;
[0061] A third ranging subunit is used to use the seventh channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the eighth channel to perform ranging with each of the positioning base stations;
[0062] A fourth parsing subunit is configured to receive a preset data packet by the fourth positioning node and parse it according to a frame format, and if the fourth positioning node matches the ID of the fourth positioning node in the ranging instruction, instruct the fourth positioning node to perform a LoRa ranging engine host mode;
[0063] The fourth ranging subunit is used to use the ninth channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the tenth channel to perform ranging with each of the positioning base stations.
[0064] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0065] The present invention provides a positioning method and system based on LoRa SX1280 channel multiplexing. The method comprises: deploying a heartbeat node, a plurality of positioning nodes and a plurality of positioning base stations in a target area; the heartbeat node and the positioning node operate in a LoRa communication mode; the positioning base station operates in a LoRa ranging engine slave mode; based on a first channel and a second channel, searching and detecting positioning nodes in the target area by using a terminal device and the heartbeat node, and grouping the positioning nodes detected by the search to obtain a plurality of node groups; positioning the first node group to obtain the positioning position of the first group; positioning the second node group to the last node group in sequence to obtain the positioning position of each node group; after the last node group is positioned, re-positioning the first node group; after the first node group is positioned 5 times, the heartbeat node sends a search frame to search and detect the number of the positioning nodes in the target area, and if the number or ID of the positioning nodes changes, the positioning nodes are re-grouped. The present invention groups nodes and performs positioning and ranging in groups, and realizes channel reuse by allocating channels within the group, thereby improving the efficiency and stability of positioning. In a specific embodiment, channels with strong anti-interference capabilities are functionally classified and allocated to each node for use, thereby realizing channel reuse and greatly improving channel utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0067] Figure 1 A flowchart of a positioning method in an embodiment of the present invention;
[0068] Figure 2 A schematic diagram of the structure of an embodiment provided by the present invention;
[0069] Figure 3 A schematic diagram of a start instruction in an embodiment of the present invention;
[0070] Figure 4 A schematic diagram of a search frame in an embodiment of the present invention;
[0071] Figure 5 A schematic diagram of a response frame in an embodiment of the present invention;
[0072] Figure 6 A schematic diagram of a broadcast frame in an embodiment of the present invention;
[0073] Figure 7 A schematic diagram of a reply frame in an embodiment provided by the present invention;
[0074] Figure 8 A schematic diagram of a grouping process in an embodiment of the present invention;
[0075] Fig. 9 This is a timing diagram of ranging in an embodiment of the present invention. DETAILED DESCRIPTION
[0076] 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 only 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.
[0077] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0078] The terms "first", "second", "third" and "fourth" in the specification and claims of the present application and the drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a series of steps, processes, methods, etc. are not limited to the listed steps, but may optionally include steps that are not listed, or may optionally include other step elements inherent to these processes, methods, products or devices.
[0079] The purpose of the present invention is to provide a positioning method and system based on LoRa SX1280 channel multiplexing, which can improve the efficiency and stability of positioning.
[0080] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0081] Figure 1 Flow chart of the positioning method in the embodiment provided by the present invention, such as Figure 1 As shown, the present invention provides a positioning method based on LoRa SX1280 channel multiplexing, including:
[0082] Step 100: deploying a heartbeat node, multiple positioning nodes and multiple positioning base stations in a target area; the heartbeat node and the positioning node operate in a LoRa communication mode; the positioning base station operates in a LoRa ranging engine slave mode;
[0083] Step 200: Based on the first channel and the second channel, the terminal device and the heartbeat node are used to search and detect the positioning nodes in the target area, and the positioning nodes detected by the search are grouped to obtain multiple node groups;
[0084] Step 300: Position the first node group to obtain the positioning position of the first group;
[0085] Step 400: Locate the second node group to the last node group in sequence to obtain the location of each node group; after the last node group is located, relocate the first node group; after the first node group is located 5 times, the heartbeat node sends a search frame to search and detect the number of the positioning nodes in the target area. If the number or ID of the positioning nodes changes, the positioning nodes are regrouped.
[0086] Figure 2 The schematic diagram of the structure in the embodiment provided by the present invention is as follows: Figure 2As shown, in this embodiment, the heartbeat node H, the positioning base station B, the positioning node P, the data link D, and the terminal device T are composed, which are specifically:
[0087] (1) The nodes and base stations used for positioning are made of LoRa SX1280 modules. They include heartbeat node H, positioning base station B, and positioning node P. Positioning base station B is a ranging slave node, positioning node P is a ranging master node, and heartbeat node H is used to schedule channel multiplexing and transmit positioning data.
[0088] (2) The data link D used for transmission consists of the HC-12 wireless communication module.
[0089] (3) The terminal device T used to process data and display positioning status is composed of a mobile terminal.
[0090] The algorithm in this embodiment mainly includes a channel multiplexing mechanism, a scheduling mechanism and a multilateral positioning algorithm.
[0091] Specifically, the specific channel allocation in this embodiment is shown in Table 1:
[0092] Table 1
[0093]
[0094]
[0095] Furthermore, the scheduling mechanism in this embodiment is to make the heartbeat node act as a scheduling center, detect the status of positioning nodes in the area (node grouping will be performed), transmit scheduling commands to the positioning nodes through the LoRa communication mode, set the channel for serial ranging between the positioning nodes and the positioning base stations, schedule each positioning node to perform ranging on each base station, and the positioning node transmits the data obtained by ranging to the heartbeat node, and the heartbeat node transmits the ranging information to the terminal device through the data link.
[0096] Note: Before positioning begins, the heartbeat node will detect the positioning nodes in the area and group the nodes. The specific grouping rules are as follows:
[0097] According to the order in which the positioning nodes reply to the response frames, they are sorted and grouped (divided into group 1, group 2, etc.). The number of nodes in each group is at most 4, and the nodes in the group are divided into P1, P2, P3, and P4. Each group takes turns to measure the distance in sequence.
[0098] Specifically, the multilateration algorithm in this implementation is to use the four known positioning base stations B1, B2, B3, and B4 as the center of the circle, and the distances d1, d2, d3, and d4 from the positioning node to the positioning base station as the radius to draw a circle, and estimate the intersection of the four circles as C through the least squares method, and the position of the intersection C is the position of the positioning node. This embodiment processes the information obtained by ranging through the multilateration algorithm, calculates and displays the position of the positioning node.
[0099] Preferably, the step 200 includes:
[0100] Sending a start instruction through the terminal device; the start instruction is transmitted to the heartbeat node through a data link;
[0101] When the heartbeat node matches the ID of the heartbeat node in the start instruction, the heartbeat node sends a search frame through the first channel to search for the positioning node existing in the target area;
[0102] After each positioning node receives the search frame, the positioning node sends a response frame to the heartbeat node through the second channel; the response frame includes the ID of the heartbeat node;
[0103] After a preset detection time, the heartbeat node groups the detected heartbeat nodes to obtain a plurality of the node groups; the number of the heartbeat nodes in the node group is less than or equal to 4.
[0104] Preferably, the positioning of the first node group specifically includes:
[0105] Based on the first channel, using the heartbeat node to send a broadcast frame to each node of the first node group;
[0106] Polling and ranging the positioning base station according to each node of the first node group; each node of the node group uses different channels to handshake and measure the distance of the positioning base station;
[0107] After each node completes the ranging, each node of the node group enters the LoRa communication mode; each node of each node group sends a reply frame to the heartbeat node through its own channel;
[0108] Based on the heartbeat node, determine a ranging result according to the reply frame, and send the ranging result to the terminal device;
[0109] Based on the terminal device, the ranging result is processed according to a multilateral positioning algorithm to obtain the positioning position of the first group.
[0110] Preferably, the sending of the broadcast frame to each node of the first node group by using the heartbeat node based on the first channel includes:
[0111] The heartbeat node sends the broadcast frame through the first channel; the broadcast frame includes ranging instructions of the first node, the second node, the third node and the fourth node in the node group.
[0112] Preferably, the polling and ranging of the positioning base station according to each node of the first node group includes:
[0113] The first positioning node receives a preset data packet and parses it according to the frame format. If the first positioning node matches the ID of the first positioning node in the ranging instruction, the first positioning node is instructed to perform the LoRa ranging engine host mode; the preset data packet includes the heartbeat node ID, the matching positioning node ID and the positioning base station ID matched by the positioning;
[0114] Using the third channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, using the fourth channel to perform distance measurement on each of the positioning base stations;
[0115] The second positioning node receives a preset data packet and parses it according to a frame format. If the second positioning node matches the ID of the second positioning node in the ranging instruction, the second positioning node is instructed to perform a LoRa ranging engine host mode.
[0116] Using the fifth channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, using the sixth channel to perform distance measurement on each of the positioning base stations;
[0117] The third positioning node receives a preset data packet and parses it according to a frame format. If the third positioning node matches the ID of the third positioning node in the ranging instruction, the third positioning node is instructed to perform a LoRa ranging engine host mode;
[0118] Using the seventh channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, using the eighth channel to perform distance measurement on each of the positioning base stations;
[0119] The fourth positioning node receives a preset data packet and parses it according to a frame format. If the fourth positioning node matches the ID of the fourth positioning node in the ranging instruction, the fourth positioning node is instructed to perform a LoRa ranging engine host mode;
[0120] The ninth channel is used to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, the tenth channel is used to perform distance measurement on each of the positioning base stations.
[0121] As an optional implementation, the entire process of the positioning method in this embodiment is as follows:
[0122] (1) First, deploy a heartbeat node H, N positioning nodes P, and M positioning base stations B in the area (see Figure 2 ). H, P1, P2, P3, and P4 initially work in LoRa communication mode, and B1, B2, B3, and B4 work in LoRa ranging engine slave mode.
[0123] (2) T uses the data link to transmit the start command to H. The start command is as follows: Figure 3 shown.
[0124] (3) After H matches its own ID in the start command, it starts the positioning process. H sends a search frame through channel 1 to search for P in the area. The search frame is as follows: Figure 4 shown.
[0125] (4) After receiving the search frame, each P sends a response frame to transmit its own node ID back to H through channel 2. The response frame is as follows: Figure 5 shown.
[0126] (5) After 30ms of detection, H groups the detected P nodes into groups, with each group of nodes being divided into P1, P2, P3, and P4. (See the grouping process for details.) Figure 8 )
[0127] (6) First, group 1 is located. H sends a broadcast frame through channel 1. The broadcast frame contains the ranging instructions of P1, P2, P3, and P4 in group 1. The broadcast frame is as follows: Figure 6 shown.
[0128] (7) P1 receives the data packet and parses it according to the frame format. If its own ID is matched in the corresponding field, it enters the LoRa ranging engine host mode. The data packet contains the heartbeat node ID, the matching positioning node ID, and the positioning base station ID matched by the positioning. According to the content of the data packet, it uses channel 3 to handshake with positioning base station 1. After the handshake is successful, it uses channel 4 to measure the distance to B1. After the ranging is completed, the ranging of B2, B3, and B4 is carried out in the same process. P2, P3, and P4 start ranging at an interval of 5ms. The specific ranging process is the same as P1. P2 uses channel 5 for handshake and channel 6 for ranging; P3 uses channel 7 for handshake and channel 8 for ranging; P4 uses channel 9 for handshake and channel 10 for ranging (see Fig. 9 ).
[0129] (8) After each P completes the polling and ranging, it enters the LoRa communication mode and sends a reply frame to H through its own communication channel. H parses the frame format and receives the data packet if it matches its own ID in the corresponding field. The data packet contains the positioning node ID, heartbeat node ID, and ranging results. The reply frame is as follows: Figure 7 shown.
[0130] (9) H sends the ranging results of P1, P2, P3, and P4 to T via the data link.
[0131] (10) After receiving the ranging result, T uses the multilateral positioning algorithm to process it and displays the positioning position in the APP.
[0132] (11) After the above positioning process is completed, the next group P will be measured. If there is no next group P or all groups have been polled, the distance measurement will start from group 1 (see Figure 3 ).
[0133] After 5 ranging cycles, H sends out a search frame again to detect the number of nodes in the system. If the number of nodes changes, the nodes are regrouped (see Figure 3 ).
[0134] In this embodiment, in view of the limitations of the existing positioning process of LoRa SX1280, a new channel reuse mechanism and a scheduling mechanism are created, and a set of efficient positioning processes are designed. The whole system is scheduled and controlled through the heartbeat node to achieve the expansion and efficient operation of the positioning system (see the timing diagram Fig. 9 ).
[0135] The improvements of this embodiment on channel multiplexing are as follows:
[0136] Channels with strong anti-interference capabilities are classified by function and allocated to each node for use, thus achieving channel multiplexing and greatly improving channel utilization.
[0137] The improvements of the scheduling mechanism in this embodiment are as follows:
[0138] (1) The heartbeat node collects positioning nodes in the area through search frames, groups the nodes into groups, and performs positioning and ranging in groups. Channel multiplexing is achieved by allocating channels within the group, which improves the efficiency and stability of positioning.
[0139] (2) The heartbeat node controls the positioning nodes in the group to measure the distance to the positioning base station in turn through broadcast frames, which reduces the idle time of the positioning base station and makes efficient use of channels and base stations.
[0140] This embodiment also provides a positioning system based on LoRa SX1280 channel multiplexing, including:
[0141] A deployment module is used to deploy a heartbeat node, multiple positioning nodes and multiple positioning base stations in a target area; the heartbeat node and the positioning node work in a LoRa communication mode; the positioning base station works in a LoRa ranging engine slave mode;
[0142] A grouping module, configured to search and detect positioning nodes in the target area using a terminal device and the heartbeat node based on the first channel and the second channel, and group the positioning nodes detected by the search to obtain a plurality of node groups;
[0143] A first positioning module, used to locate the first node group to obtain the positioning position of the first group;
[0144] A circular positioning module is used to locate the second node group to the last node group in sequence to obtain the positioning position of each node group; after the last node group is located, the first node group is relocated; after the first node group is located 5 times, the heartbeat node sends a search frame to search and detect the number of the positioning nodes in the target area, and if the number or ID of the positioning nodes changes, the positioning nodes are regrouped.
[0145] Preferably, the grouping module specifically includes:
[0146] A starting unit, used for sending a starting instruction through the terminal device; the starting instruction is transmitted to the heartbeat node through a data link;
[0147] A first search unit, configured to, when the heartbeat node matches the ID of the heartbeat node in the start instruction, cause the heartbeat node to send a search frame through the first channel to search for the positioning node existing in the target area;
[0148] a second search unit, configured to cause each positioning node to send a response frame to the heartbeat node through the second channel after receiving the search frame; the response frame includes an ID of the heartbeat node;
[0149] The grouping unit is used to group the detected heartbeat nodes by the heartbeat node after a preset detection time to obtain a plurality of the node groups; the number of the heartbeat nodes in the node group is less than or equal to 4.
[0150] Preferably, the first positioning module specifically includes:
[0151] A broadcast unit, configured to send a broadcast frame to each node of the first node group by using the heartbeat node based on the first channel;
[0152] A ranging unit, configured to perform polling ranging on the positioning base station according to each node of the first node group; each node of the node group performs handshake and ranging on the positioning base station using different channels;
[0153] A reply unit, configured to put each node of the node group into the LoRa communication mode after each node completes ranging; each node of each node group sends a reply frame to the heartbeat node through its own channel;
[0154] A determining unit, configured to determine a ranging result according to the reply frame based on the heartbeat node, and send the ranging result to the terminal device;
[0155] A processing unit is used to process the ranging result based on the terminal device according to a multilateral positioning algorithm to obtain the positioning position of the first group.
[0156] Preferably, the broadcast unit specifically includes:
[0157] The broadcast subunit is used for the heartbeat node to send the broadcast frame through the first channel; the broadcast frame includes ranging instructions of the first node, the second node, the third node and the fourth node in the node group.
[0158] Preferably, the distance measuring unit specifically includes:
[0159] A first parsing subunit is configured to receive a preset data packet by the first positioning node and parse it according to a frame format, and if the first positioning node matches the ID of the first positioning node in the ranging instruction, the first positioning node is instructed to perform a LoRa ranging engine host mode; the preset data packet includes a heartbeat node ID, a matching positioning node ID, and a positioning base station ID matched by the positioning;
[0160] A first ranging subunit is used to use the third channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the fourth channel to perform ranging with each of the positioning base stations;
[0161] A second parsing subunit is configured to receive a preset data packet by the second positioning node and parse it according to a frame format, and if the second positioning node matches the ID of the second positioning node in the ranging instruction, instruct the second positioning node to perform a LoRa ranging engine host mode;
[0162] A second ranging subunit is used to use the fifth channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the sixth channel to perform ranging with each of the positioning base stations;
[0163] A third parsing subunit is configured to receive a preset data packet by the third positioning node and parse it according to a frame format, and if the third positioning node matches the ID of the third positioning node in the ranging instruction, instruct the third positioning node to perform a LoRa ranging engine host mode;
[0164] A third ranging subunit is used to use the seventh channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the eighth channel to perform ranging with each of the positioning base stations;
[0165] A fourth parsing subunit is configured to receive a preset data packet by the fourth positioning node and parse it according to a frame format, and if the fourth positioning node matches the ID of the fourth positioning node in the ranging instruction, instruct the fourth positioning node to perform a LoRa ranging engine host mode;
[0166] The fourth ranging subunit is used to use the ninth channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the tenth channel to perform ranging with each of the positioning base stations.
[0167] The beneficial effects of the present invention are as follows:
[0168] The present invention improves the system positioning speed and channel utilization by setting up channel multiplexing and node scheduling mechanisms, can meet the positioning requirements of low power consumption, large range and large capacity for indoor and outdoor positioning, and can be well applied in indoor use scenarios such as nursing homes.
[0169] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0170] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A positioning method based on LoRa SX1280 channel multiplexing, characterized in that: include: Deploy heartbeat nodes, multiple positioning nodes, and multiple positioning base stations in the target area; The heartbeat node and the positioning node operate in LoRa communication mode; The positioning base station operates in the LoRa ranging engine slave mode; Based on the first channel and the second channel, using the terminal device and the heartbeat node to search and detect the positioning nodes in the target area, and grouping the positioning nodes detected by the search to obtain multiple node groups; Positioning the first node group to obtain a positioning position of the first group; Positioning the second node group to the last node group in sequence to obtain the positioning position of each node group; after the last node group is positioned, repositioning the first node group; after positioning the first node group 5 times, the heartbeat node sends a search frame to search and detect the number of the positioning nodes in the target area, and if the number or ID of the positioning nodes changes, the positioning nodes are regrouped; The positioning of the first node group specifically includes: Based on the first channel, using the heartbeat node to send a broadcast frame to each node of the first node group; Polling and ranging the positioning base station according to each node of the first node group; each node of the node group uses different channels to handshake and measure the distance of the positioning base station; each node of the node group starts ranging at an interval of 5ms; After each node completes the ranging, each node of the node group enters the LoRa communication mode; each node of each node group sends a reply frame to the heartbeat node through its own channel; Based on the heartbeat node, determine a ranging result according to the reply frame, and send the ranging result to the terminal device; Based on the terminal device, processing the ranging result according to a multilateration algorithm to obtain the positioning position of the first group; The sending of a broadcast frame to each node of the first node group by using the heartbeat node based on the first channel includes: The heartbeat node sends the broadcast frame through the first channel; the broadcast frame includes ranging instructions of the first positioning node, the second positioning node, the third positioning node and the fourth positioning node in the node group; The polling and ranging of the positioning base station according to each node of the first node group includes: The first positioning node receives a preset data packet and parses it according to the frame format. If the first positioning node matches the ID of the first positioning node in the ranging instruction, the first positioning node is instructed to perform the LoRa ranging engine host mode; the preset data packet includes the heartbeat node ID, the matching positioning node ID and the positioning base station ID matched by the positioning; Using the third channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, using the fourth channel to perform distance measurement on each of the positioning base stations; The second positioning node receives a preset data packet and parses it according to a frame format. If the second positioning node matches the ID of the second positioning node in the ranging instruction, the second positioning node is instructed to perform a LoRa ranging engine host mode. Using the fifth channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, using the sixth channel to perform distance measurement on each of the positioning base stations; The third positioning node receives a preset data packet and parses it according to a frame format. If the third positioning node matches the ID of the third positioning node in the ranging instruction, the third positioning node is instructed to perform a LoRa ranging engine host mode; Using the seventh channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, using the eighth channel to perform distance measurement on each of the positioning base stations; The fourth positioning node receives a preset data packet and parses it according to a frame format. If the fourth positioning node matches the ID of the fourth positioning node in the ranging instruction, the fourth positioning node is instructed to perform a LoRa ranging engine host mode; The ninth channel is used to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, the tenth channel is used to perform distance measurement on each of the positioning base stations.
2. The positioning method based on LoRa SX1280 channel multiplexing according to claim 1, characterized in that: The method of searching and detecting positioning nodes in the target area by using the terminal device and the heartbeat node based on the first channel and the second channel, and grouping the positioning nodes detected by the search to obtain a plurality of node groups includes: Sending a start instruction through the terminal device; the start instruction is transmitted to the heartbeat node through a data link; When the heartbeat node matches the ID of the heartbeat node in the start instruction, the heartbeat node sends a search frame through the first channel to search for the positioning node existing in the target area; After each positioning node receives the search frame, the positioning node sends a response frame to the heartbeat node through the second channel; the response frame includes the ID of the heartbeat node; After a preset detection time, the heartbeat node groups the detected heartbeat nodes to obtain a plurality of the node groups; the number of the heartbeat nodes in the node group is less than or equal to 4.
3. A positioning system based on LoRa SX1280 channel multiplexing, characterized in that: include: A deployment module, used to deploy a heartbeat node, multiple positioning nodes and multiple positioning base stations in a target area; The heartbeat node and the positioning node operate in LoRa communication mode; The positioning base station operates in the LoRa ranging engine slave mode; A grouping module, configured to search and detect positioning nodes in the target area using a terminal device and the heartbeat node based on the first channel and the second channel, and group the positioning nodes detected by the search to obtain a plurality of node groups; A first positioning module, used to locate the first node group to obtain the positioning position of the first group; A circular positioning module is used to position the second node group to the last node group in sequence to obtain the positioning position of each node group; after the last node group is positioned, the first node group is re-positioned; after the first node group is positioned 5 times, the heartbeat node sends a search frame to search and detect the number of the positioning nodes in the target area, and if the number or ID of the positioning nodes changes, the positioning nodes are re-grouped; The first positioning module specifically includes: A broadcast unit, configured to send a broadcast frame to each node of the first node group by using the heartbeat node based on the first channel; The ranging unit is used to perform polling ranging on the positioning base station according to each node of the first node group; each node of the node group uses a different channel to perform handshake and ranging on the positioning base station; each node of the node group starts ranging at an interval of 5ms; A reply unit, configured to put each node of the node group into the LoRa communication mode after each node completes ranging; each node of each node group sends a reply frame to the heartbeat node through its own channel; A determining unit, configured to determine a ranging result according to the reply frame based on the heartbeat node, and send the ranging result to the terminal device; A processing unit, configured to process the ranging result according to a multilateration algorithm based on the terminal device to obtain a positioning position of the first group; The broadcast unit specifically includes: A broadcast subunit, configured to send the broadcast frame through the first channel by the heartbeat node; the broadcast frame includes ranging instructions of the first positioning node, the second positioning node, the third positioning node and the fourth positioning node in the node group; The distance measuring unit specifically comprises: A first parsing subunit is configured to receive a preset data packet by the first positioning node and parse it according to a frame format, and if the first positioning node matches the ID of the first positioning node in the ranging instruction, the first positioning node is instructed to perform a LoRa ranging engine host mode; the preset data packet includes a heartbeat node ID, a matching positioning node ID, and a positioning base station ID matched by the positioning; A first ranging subunit is used to use the third channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the fourth channel to perform ranging with each of the positioning base stations; A second parsing subunit is configured to receive a preset data packet by the second positioning node and parse it according to a frame format, and if the second positioning node matches the ID of the second positioning node in the ranging instruction, instruct the second positioning node to perform a LoRa ranging engine host mode; A second ranging subunit is used to use the fifth channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the sixth channel to perform ranging with each of the positioning base stations; A third parsing subunit is configured to receive a preset data packet by the third positioning node and parse it according to a frame format, and if the third positioning node matches the ID of the third positioning node in the ranging instruction, instruct the third positioning node to perform a LoRa ranging engine host mode; A third ranging subunit is used to use the seventh channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the eighth channel to perform ranging with each of the positioning base stations; A fourth parsing subunit is configured to receive a preset data packet by the fourth positioning node and parse it according to a frame format, and if the fourth positioning node matches the ID of the fourth positioning node in the ranging instruction, instruct the fourth positioning node to perform a LoRa ranging engine host mode; The fourth ranging subunit is used to use the ninth channel to perform handshakes with each of the positioning base stations in turn, and when the handshake is successful, use the tenth channel to perform ranging with each of the positioning base stations.
4. The positioning system based on LoRa SX1280 channel multiplexing according to claim 3, characterized in that: The grouping module specifically includes: A starting unit, used for sending a starting instruction through the terminal device; the starting instruction is transmitted to the heartbeat node through a data link; A first search unit, configured to, when the heartbeat node matches the ID of the heartbeat node in the start instruction, cause the heartbeat node to send a search frame through the first channel to search for the positioning node existing in the target area; a second search unit, configured to cause each positioning node to send a response frame to the heartbeat node through the second channel after receiving the search frame; the response frame includes an ID of the heartbeat node; The grouping unit is used to group the detected heartbeat nodes by the heartbeat node after a preset detection time to obtain a plurality of the node groups; the number of the heartbeat nodes in the node group is less than or equal to 4.
Citation Information
Patent Citations
3D interactive method and 3D interactive system
CN103838376A
Indoor positioning system compatible with sensor node
CN107659910A
Tower base station-based aircraft measurement and control system and method
CN107942743A
Wide-area Internet of things node positioning method based on SX1280 and a system thereof
CN109257701A
Low-power remote positioning method and system based on LoRa
CN109474886A
