A method, device and medium for UWB multi-base station synchronous ranging
Patent Information
- Application Number
- CN202610934313.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-10-20
AI Technical Summary
[0004]本申请实施例提供了一种基于UWB多基站同步测距的方法、装置、设备和介质,用于解决现有的测距方案精度低、实时性差和多目标同时实施可靠性不强的技术问题
[0040]在本申请实施例中,采用了一种基于UWB多基站同步测距的方法,通过在定位卡和基站之间建立创新的通信协议、时隙调度与同步机制,实现定位卡与防护设备周围的多个基站进行高效、无冲突的同步测距,从而实现对人员接近行为的精准、实时预警。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of UWB positioning technology, and in particular to a method, apparatus, equipment and medium for synchronous ranging based on UWB multi-base station. Background Technology
[0002] With the advancement of intelligent and unmanned mining in my country's coal mining industry, higher requirements have been placed on the safety protection of underground personnel. Achieving real-time and precise proximity protection between personnel and large mobile equipment (such as coal mining machines, tunneling machines, hydraulic supports, etc.) is a key link in ensuring safe production and avoiding mechanical injury accidents.
[0003] Existing simple proximity protection technologies based on Zigbee and UWB suffer from a lack of balance in terms of accuracy, real-time performance, multi-target reliability, and system cost, limiting their effective application in high-standard safety protection scenarios. Therefore, there is an urgent need for a method that can achieve high-precision, high-real-time, and high-reliability multi-target ranging in complex downhole environments. Summary of the Invention
[0004] This application provides a method, apparatus, device, and medium for synchronous ranging based on UWB multi-base station, which solves the technical problems of low accuracy, poor real-time performance, and low reliability of simultaneous multi-target ranging in existing ranging schemes.
[0005] Technical solution
[0006] According to one aspect of this application, a method for synchronous ranging based on UWB multi-base stations is provided, applied to a positioning card, the method comprising:
[0007] In the first working state, a type of polling frame is sent according to a first preset time interval;
[0008] The base station receives a type of response frame in response to the type of polling frame, wherein the type of response frame includes at least the type information of the base station;
[0009] If the type information is identified as a target base station, and the target base station group information in the first type of response frame is identified, the first working state is switched to the second working state; wherein, the target base station group information includes the information of each target base station in the target base station group to which the target base station is located, as well as the response order of each target base station, and each target base station in the target base station group is set around the same designated target area;
[0010] In the second working state, two types of polling frames are sent according to a second preset time interval, wherein the second preset time interval is less than the first preset time interval, and the two types of polling frames include the target base station group information;
[0011] Receive the second type of response frame from the target base station in response to the second type of polling frame, wherein the second type of response frame is sent one by one by each target base station in the target base station group in the response order;
[0012] After receiving the Type II response frames from all target base stations in the target base station group, the final frame is sent.
[0013] The polling cycles of multiple different positioning cards are distributed in different time slots within the ranging cycle, and the positioning card sends the first type of polling frame or the second type of polling frame within its allocated time slot.
[0014] Preferably, after sending the second type of polling frame, the positioning card configures a receiving time window for each target base station in the order of the responses, and listens for the second type of response frame replied by the corresponding target base station within each receiving time window.
[0015] Preferably, when the positioning card is in the second working state and does not receive a Type II response frame from any of the target base stations in the target base station group within a predetermined time, the ranging process is terminated and the Type II polling frame is resent.
[0016] Preferably, when the positioning card fails to receive all Type II response frames from all target base stations in the target base station group multiple times in the second working state, the second working state is switched to the first working state.
[0017] Preferably, the time slot position and length allocated to each of the positioning cards within the ranging period are configured by the system host through the base station.
[0018] A second aspect of this application provides a method for synchronous ranging based on multiple UWB base stations, applied to a target base station, the method comprising:
[0019] The positioning card receives a type of polling frames sent at a first preset time interval in the first working state;
[0020] In response to the polling frame, a response frame is sent to the positioning card to switch the positioning card from a first working state to a second working state. The response frame includes the type information of the target base station and the target base station group information to which the target base station belongs. The target base station group information includes the information of each target base station in the target base station group and the response order of each target base station. The target base stations in the target base station group are set around the same specified target area.
[0021] The positioning card receives two types of polling frames sent at a second preset time interval after switching to the second working state, wherein the second preset time interval is less than the first preset time interval, and the two types of polling frames include the target base station group information;
[0022] Based on the target base station group information in the second type of polling frame, the second type of response frame is sent to the positioning card in a preset response order;
[0023] The final frame sent by the positioning card after receiving the Type II response frames fed back by all target base stations in the target base station group;
[0024] The polling periods of multiple different positioning cards are distributed in different time slots within the ranging period, and the positioning card sends the first type of polling frame or the second type of polling frame within the allocated time slot.
[0025] Preferably, after the target base station receives the second type of polling frame, it includes:
[0026] Analyze the target base station group information carried in the second type of polling frames;
[0027] Determine its own position number in the response sequence, calculate the response delay time based on the position number, and send the second type of response frame after the response delay time has elapsed.
[0028] Preferably, the method further includes:
[0029] By monitoring the Type II response frames sent by other target base stations within the target base station group, the sending timestamps of the other target base stations when sending Type II response frames are obtained;
[0030] Using the sending timestamp and the local receiving timestamp of receiving the second type of response frame, calculate the clock offset between itself and the other target base stations;
[0031] The local clock is corrected according to the clock offset to achieve synchronization with the ranging cycle of the other target base stations.
[0032] Preferably, after the target base station receives the final frame, it further includes:
[0033] Extract the set of timestamps of the received response frames of the two types of response frames received from each target base station, as recorded by the positioning card, from the final frame;
[0034] Obtain the local sending timestamp of sending the second type of response frame and the local receiving timestamp of receiving the second type of polling frame, which are recorded by the unit itself.
[0035] Based on the received timestamp set, the local transmission timestamp, and the local reception timestamp, a two-sided bidirectional ranging algorithm is used to calculate the distance between itself and the positioning card;
[0036] Preferably, each target base station reports its measured distance to the system host, and the host calculates the coordinates of the positioning card using a multilateral positioning algorithm.
[0037] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the method described in either the first aspect or the second aspect of this application.
[0038] A fourth aspect of this application provides a computer-readable storage medium for storing a computer program that, when run on a computer, causes the electronic device to implement the method described in either the first or second aspect of this application.
[0039] Beneficial effects
[0040] In this embodiment, a UWB-based multi-base station synchronous ranging method is adopted. By establishing an innovative communication protocol, time slot scheduling and synchronization mechanism between the positioning card and the base station, the positioning card and multiple base stations around the protective equipment can perform efficient and conflict-free synchronous ranging, thereby achieving accurate and real-time early warning of personnel approach behavior. Attached Figure Description
[0041] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0042] Figure 1 This is a ranging timing diagram of a system based on UWB multi-base station synchronous ranging according to an embodiment of this application.
[0043] Figure 2 This is a flowchart illustrating a system for synchronous ranging based on UWB multiple base stations according to an embodiment of this application.
[0044] Figure 3 This is a flowchart of a method for synchronous ranging based on multiple UWB base stations performed by a positioning card according to an embodiment of this application.
[0045] Figure 4 This is a flowchart illustrating a method for synchronous ranging based on multiple UWB base stations performed by a base station according to an embodiment of this application.
[0046] Figure 5 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0047] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0048] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0049] This invention provides a UWB-based multi-base station synchronous ranging system for timely alarming when personnel approach a designated target area in a tunnel. The system includes a positioning card, base stations, and a system host. The base stations are of two types: target base stations and ordinary base stations. Multiple target base stations are arranged around the same designated target area (e.g., a tunneling machine or coal mining machine), typically deployed in the four directions (front, back, left, and right) of the equipment, with a maximum of four base stations (R1, R2, R3, and R4). The physical positions of each target base station are relatively fixed, and the distances between them are known and remain constant, forming a target base station group, which constitutes a ranging unit. Ordinary base stations are placed in areas of the tunnel that do not require special protection. The positioning card is attached to the moving target, such as being carried by a worker in the tunnel. When the positioning card enters the coverage area of a base station (typically tens of meters), the positioning card communicates with the base station via UWB wireless signals for ranging interaction. The system host is deployed in an underground chamber or a surface monitoring center, connected to each target base station via a wired network (e.g., Ethernet, RS485). The entire system forms a three-layer physical architecture of "host + base station + positioning card".
[0050] The following is combined Figure 1 The distance measurement timing diagram shown below provides a detailed explanation of this embodiment in chronological order.
[0051] Pre-planning
[0052] Before the system can start working normally, the following preset configurations are required:
[0053] Step P1: The system host allocates time slots to each positioning card.
[0054] Specifically, the system host divides each ranging cycle into multiple fixed time slots based on the number of positioning cards in the underground area, such as... Figure 1In the illustrated embodiment, each time slot is 8ms, and a dedicated time slot is allocated to each positioning card. The time slot position and length allocated to each positioning card within the ranging period are configured by the system host through the base station. In this embodiment, the system host can send the time slot configuration information to each target base station, and after receiving a polling frame from the positioning card, the target base station informs the positioning card by sending a response frame or a separate management frame.
[0055] Step P2: The system host configures the adjacent base station numbers and response order for each target base station.
[0056] The system host configures four target base stations surrounding the same target area into a base station group, and assigns adjacent base station numbers to each base station, ensuring that the target base station IDs are adjacent to each other. Simultaneously, the response order of these base stations is agreed upon, for example, R1→R2→R3→R4 in this embodiment. This configuration information is sent to each target base station for use when replying to a type of response frame.
[0057] In some alternative embodiments, the response order is not required to be strictly consistent with the numbering order of the target base stations, and can also be dynamically adjusted by the system host according to the physical location of each base station to optimize ranging efficiency.
[0058] After the above preparatory work is completed, formal ranging can be carried out. This process mainly involves two different communication methods depending on the location of the positioning card and the target base station, combined with... Figure 2 The process shown is described in detail below.
[0059] Normal positioning mode before the positioning card enters the protected area
[0060] Step S101: In the first working state, the positioning card sends a type of polling frame at a first preset time interval.
[0061] At this time, the positioning card operates in normal positioning mode, i.e., the first working state. It broadcasts a type of polling frame to the surrounding area at a relatively slow frequency, for example, once every 200ms. The frame structure of this type of polling frame contains the positioning card's own identification information and the current working mode identifier. In this embodiment, the first preset time interval can be dynamically configured by the system host according to global positioning requirements and sent to the positioning card through the base station.
[0062] Step S102: The target base station receives a type of polling frame sent by the positioning card at a first preset time interval in the first working state. After receiving the type of polling frame within its coverage area, the target base station enters response preparation. Theoretically, when the positioning card enters the overlapping area of the communication range of each target base station in the target base station group, it will receive the type of polling frame. However, there is usually a certain distance difference between the positioning card and each target base station. Therefore, there is usually a receiving order.
[0063] Step S103: In response to the polling frame, the target base station sends a response frame to the positioning card to switch the positioning card from the first working state to the second working state.
[0064] The response frame includes type information of the target base station and information about the target base station group to which the target base station belongs. The target base station group information includes information about each target base station within the target base station group and the response order of each target base station. The target base stations in the target base station group are positioned around the same designated target area.
[0065] In this embodiment, taking target base station R1 as an example, after receiving a polling frame, it reads the configuration information stored locally and fills in its own type information, such as a specific type field value to identify that the base station belongs to the proximity protection device, and the aforementioned target base station group information into a response frame. The target base station group information specifically includes the IDs of four base stations and the response order R1→R2→R3→R4, and then replies to the positioning card. To ensure that the positioning card can receive the response in a timely manner, R1 can send this type of response frame at an earlier time than ordinary positioning base stations.
[0066] The aforementioned polling frame may be received by any one or more target base stations in the target base station group, but as long as at least one target receives and sends a feedback frame to the positioning card, the working mode switch of the positioning card can be triggered.
[0067] Step S104: After sending a type of polling frame, the positioning card opens a receiving window and waits for a response from the base station.
[0068] Step S105: If the positioning card identifies the type information as a target base station and identifies the target base station group information in the first type of response frame, then the first working state is switched to the second working state.
[0069] When multiple Type I response frames are returned, the first Type I response frame received by the positioning card switches its working mode.
[0070] Specifically, the positioning card extracts the base station type field from the received response frame and compares it with a locally preset target base station threshold. If a match is found, it determines that the card has entered an area requiring key protection (e.g., near a tunneling machine). Simultaneously, the positioning card parses the target base station group information from the response frame, including the IDs of the four base stations and their agreed-upon response order. The positioning card then automatically switches its operating mode from normal positioning mode to proximity protection ranging mode, which is the second operating state. The ranging period is shortened from a first preset time interval to a second preset time interval, such as 20ms, to meet the real-time requirements of rapid approach scenarios.
[0071] Proximity protection ranging mode after the positioning card enters the protected area
[0072] Step S106: The positioning card sends two types of polling frames according to the second preset time interval in the second working state.
[0073] After the handover is complete, the positioning card initiates a new round of ranging at a faster second preset time interval (e.g., 20ms). Before sending the Type II polling frame, the positioning card fills the Type II polling frame with the target base station group information obtained from the Type I response frame, arranged in the response order. In addition, the Type II polling frame also carries a ranging mode field, which is now modified to proximity protection ranging mode.
[0074] It is important to note that in underground environments, multiple different positioning cards often operate simultaneously. These positioning cards are pre-set to work collaboratively within the same ranging cycle, meaning each positioning card's ranging cycle starts at the same time. However, to avoid simultaneous signal transmission between the positioning cards, the specific time slot within that ranging cycle varies. Each positioning card sends either the first type of polling frame or the second type of polling frame within its allocated time slot. In other words, the second type of polling frame in this step is sent within a dedicated time slot pre-allocated by the system host for that positioning card, thus avoiding communication conflicts with other positioning cards.
[0075] Regardless of whether the target base station is the first base station to receive the Type 1 polling frame, as long as the positioning card is within the communication range of the target base station when transmitting the Type 2 polling frame, the target base station will normally receive the Type 2 polling frame.
[0076] Step S107: The target base station receives the second type of polling frames sent by the positioning card at a second preset time interval after the positioning card switches to the second working state.
[0077] Wherein, the second preset time interval is less than the first preset time interval, and the second type of polling frame includes the target base station group information.
[0078] Step S108: The target base station sends a second type of response frame to the positioning card according to the target base station group information in the second type of polling frame and in a preset response order.
[0079] This step specifically includes:
[0080] S1081. After receiving the second type of polling frame, the target base station parses the target base station group information carried in the second type of polling frame.
[0081] After receiving a Type II polling frame, each target base station extracts the target base station group information from the frame's payload. This information includes the IDs of each base station and their response order.
[0082] S1082. Determine its own position number in the response sequence, calculate the response delay time based on the position number, and send the second type of response frame after the response delay time ends.
[0083] For example, if the response order is R1→R2→R3→R4, R1 will find itself to be the first after parsing, and its response delay will be the shortest (e.g., 100μs). R2 will find itself to be the second, and will need to wait for a fixed interval (e.g., 50μs) after R1 has finished replying before sending its response; and so on. Each base station will carry its own local transmission timestamp in the frame when sending the Type II response frame, for use by other base stations or positioning cards.
[0084] In some optional embodiments, the response delay time is not a fixed interval, but is dynamically allocated by the system host according to the processing capacity of each base station and sent to each base station in a preset stage.
[0085] Step S109: The positioning card receives the second type of response frame from the target base station in response to the second type of polling frame.
[0086] Specifically, after sending the second type of polling frame, the positioning card configures a receiving time window for each target base station according to the response order, and listens for the second type of response frame replied by the corresponding target base station within each receiving time window. This method can effectively reduce power consumption and reduce false reception.
[0087] Step S110: After the positioning card receives the Type II response frames from all the target base stations in the target base station group, it sends the final frame.
[0088] After successfully receiving response frames from four base stations, the positioning card records the timestamp of each response frame, forming a timestamp set. Then, the positioning card constructs a final frame, or Final packet, fills it with the timestamp set, and broadcasts it.
[0089] In some preferred embodiments, the final frame also carries a complete timestamp sequence of the positioning card sending Poll packets (i.e., Type II polling frames) and receiving Response packets (i.e., Type II feedback frames) so that the target base station can perform DS-TWR calculation.
[0090] Step S111: The target base station receives the final frame sent by the positioning card after receiving the Type II response frames fed back by all target base stations in the target base station group.
[0091] When the positioning card is located in the overlapping area of the communication range of each target base station in the target base station group, each target base station will receive the final frame.
[0092] like Figure 1 As shown, after receiving the Type II response frames from four base stations, the final frame is sent after a delay of 500µs.
[0093] Step S112: After the target base station receives the final frame, it extracts the set of timestamps of the two types of response frames received from each target base station, which are recorded by the positioning card.
[0094] Each target base station parses the final frame to obtain the received timestamps of each Response packet recorded on the positioning card side.
[0095] Step S113: The target base station obtains its own recorded local transmission timestamp for sending the second type of response frame and local reception timestamp for receiving the second type of polling frame.
[0096] Each target base station maintains a local timestamp for this ranging process: the time of receiving the Poll packet (denoted as T_poll_rx) and the time of sending the Response packet (T_resp_tx).
[0097] Step S114: The target base station calculates the distance between itself and the positioning card using a bilateral bidirectional ranging algorithm based on the received timestamp set, the local transmission timestamp, and the local reception timestamp.
[0098] Taking target base station R1 as an example, it obtains the T_poll_tx (time to send Poll), T_resp_rx (time to receive R1's Response), and T_final_tx (time to send Final) recorded by the positioning card from the final frame. Combining this with its own recorded T_poll_rx and T_resp_tx, it calculates the signal flight time using the DS-TWR formula, and then multiplies it by the speed of light to obtain the distance value. This algorithm effectively eliminates errors caused by clock drift, achieving centimeter-level ranging accuracy.
[0099] Step S115: Each target base station reports the distance it has measured to the system host.
[0100] Each target base station will send the calculated distance value to the protection system host via wired or wireless means.
[0101] Step S116: The system host receives distance values reported by multiple target base stations, and the host calculates the coordinates of the positioning card using a multilateral positioning algorithm.
[0102] After the system host collects at least three distance values, it calculates the two-dimensional coordinates of the positioning card using trilateration or least squares method. In this embodiment, since there are four base stations, redundant measurement values can be obtained, further improving positioning accuracy.
[0103] Step S117: The system host compares the calculated coordinates with the preset equipment geometric model to determine the distance between personnel and equipment, and triggers hierarchical alarms or equipment linkage control according to the preset threshold.
[0104] For example, a Level 1 warning (audio-visual alert) is triggered when the distance is less than 10 meters, and a Level 2 alarm (equipment deceleration or shutdown) is triggered when the distance is less than 5 meters. The alarm thresholds can be flexibly configured by the system host according to the actual operating conditions.
[0105] In some optional embodiments, the positioning card will also perform the following exception handling in proximity protection ranging mode:
[0106] When the positioning card, in its second operating state, does not receive a Type II response frame from any of the target base stations in the target base station group within a predetermined time, it terminates the current ranging process and retransmits the Type II polling frame. For example, if the positioning card opens the receiving window of R1 after sending Poll, but does not receive a Response from R1 within a timeout, the current ranging process terminates directly and waits for the next time slot to restart.
[0107] When the positioning card fails to receive Type II response frames from all target base stations in the target base station group multiple times in the second operating state, it switches from the second operating state to the first operating state. For example, if it fails to receive responses from all four base stations in three consecutive ranging measurements, the positioning card assumes that it may have left the protected area or encountered severe interference, and therefore automatically reverts to the normal positioning mode to save power and restart area detection.
[0108] The method described in the above embodiments employs DS-TWR technology, combined with multi-base station positioning, to achieve centimeter-level accuracy; the synchronous ranging protocol compresses the single ranging cycle to the millisecond level. The time slot allocation mechanism resolves multi-card conflicts, and the list scheduling mechanism resolves multi-base station response conflicts, resulting in extremely robust system performance. The positioning card features intelligent mode switching, balancing wide-area coverage with key protection. Alarm thresholds can be flexibly configured via the host to adapt to different devices and operating conditions. Time synchronization is achieved using service messages, eliminating the need for additional hardware synchronization links. The distributed computing architecture reduces the performance requirements of the central node.
[0109] like Figure 3 The diagram illustrates a UWB-based multi-base station synchronous ranging method of the present invention, applied to a positioning card, consisting of... Figure 3 It is understood that the method for synchronous ranging based on multiple UWB base stations includes:
[0110] Step S201: In the first working state, send a type of polling frame according to the first preset time interval.
[0111] After powering on, the positioning card enters the normal positioning mode (first working state) by default, broadcasting a type of polling frame to the surroundings at a relatively slow frequency (e.g., 200ms). This polling frame contains the positioning card's unique identifier and the current working mode field.
[0112] Step S202: Receive a response frame from the base station to the polling frame, wherein the response frame includes at least the type information of the base station.
[0113] After sending a polling frame, the positioning card opens a brief receiving window to wait for a response from a nearby base station. If a response frame is received, the base station type field is extracted from it.
[0114] Step S203: If the type information is identified as a target base station, and the target base station group information in the first type of response frame is identified, switch the first working state to the second working state; wherein, the target base station group information includes the information of each target base station in the target base station group to which the target base station is located, and the response order of each target base station, and each target base station in the target base station group is set around the same designated target area.
[0115] Specifically, the positioning card compares the received base station type with a locally preset target base station threshold. If a match is found, and the response frame also carries target base station group information (e.g., a set of base station IDs and their response order), it is determined that an area requiring key protection has been entered. At this time, the positioning card switches its operating mode from normal positioning mode to proximity protection ranging mode (second operating state). The switching operation includes: adjusting the ranging period from a first preset time interval (e.g., 200ms) to a second preset time interval (e.g., 20ms), and updating the locally stored target base station group information to the content parsed from the response frame.
[0116] Step S204: In the second working state, send two types of polling frames according to a second preset time interval, wherein the second preset time interval is less than the first preset time interval, and the two types of polling frames include the target base station group information.
[0117] In proximity protection ranging mode, the positioning card sends Type II polling frames at a faster cycle. When constructing a Type II polling frame, previously obtained target base station group information (including each target base station ID and response order) is sequentially filled into the frame's payload. It should be noted that the polling cycles of multiple different positioning cards are distributed across different time slots within the ranging cycle. The positioning card sends either Type I or Type II polling frames within its allocated time slot. The positioning card only initiates transmission within its dedicated time slot allocated by the system host to avoid air collisions.
[0118] Step S205: Receive the second type of response frame from the target base station in response to the second type of polling frame. The second type of response frame is sent one by one by each target base station in the target base station group in the response order.
[0119] After sending the Type II polling frame, the positioning card needs to receive response frames from multiple base stations in sequence. Specifically, the time slot position and length allocated to each positioning card within the ranging period are configured by the system host through the base station. After configuration, after sending the Type II polling frame, the positioning card opens a receiving time window for each target base station in the order of responses, and listens for the Type II response frames from the corresponding target base station within each receiving time window. For example, if the response order is R1, R2, R3, R4, the positioning card will first configure a receiving window for R1, close the window after receiving the response from R1, and then configure the next window for R2, and so on.
[0120] In some optional embodiments, the positioning card determines the total time window for waiting to receive all Type II response frames based on the number of target base stations in the target base station group information, and continuously receives them within the total window.
[0121] Step S206: After receiving the Type II response frames from all target base stations in the target base station group, send the final frame.
[0122] After successfully receiving response frames from all base stations, the positioning card records the timestamp of each response frame, forming a timestamp set. It then constructs a final frame, fills it with this timestamp set, and broadcasts it. This final frame will be received by all target base stations for distance calculation.
[0123] In some preferred embodiments, when the positioning card, in the second operating state, does not receive a Type II response frame from any of the target base stations in the target base station group within a predetermined time, the ranging process is terminated and the Type II polling frame is retransmitted. For example, if the receiving window configured for R1 times out and no signal is received, the ranging process is abandoned, and the poll packet is retransmitted in the next time slot.
[0124] In some preferred embodiments, when the positioning card fails to receive all Type II response frames from all target base stations in the target base station group multiple times consecutively in the second operating state, it switches the second operating state back to the first operating state. For example, if it fails to receive all responses in three consecutive ranging measurements, the positioning card assumes it may have left the protected area or encountered severe interference, and automatically switches back to normal positioning mode to save power and restart area detection.
[0125] like Figure 4 As shown, this is an embodiment of the present invention providing a method for synchronous ranging based on multiple UWB base stations, applied to a target base station, by... Figure 4 It can be seen that the method includes:
[0126] Step S301: Receive a type of polling frame sent by the positioning card at a first preset time interval in the first working state. Specifically, the target base station continuously monitors the UWB channel after powering on. When the positioning card is in normal positioning mode, the type of polling frame it sends will be received by nearby base stations.
[0127] Step S302: In response to the polling frame, send a response frame to the positioning card to switch the positioning card from a first working state to a second working state. The response frame includes the type information of the target base station and the target base station group information to which the target base station belongs. The target base station group information includes the information of each target base station in the target base station group and the response order of each target base station. The target base stations in the target base station group are set around the same specified target area.
[0128] After receiving a polling frame, the target base station reads its own type information (e.g., a specific type field value to identify that the base station belongs to a proximity protection device) and the group information of the group it belongs to (including the IDs of all base stations in the group and the agreed response order). Then, the target base station fills this information into a response frame and sends it to the positioning card. To ensure that the positioning card can receive and identify the frame promptly, the base station can use an earlier response time than ordinary positioning base stations.
[0129] In some preferred embodiments, the neighboring base station numbers of a base station are pre-configured by the protection system host and distributed via the network. The base station fills in the identification information of all base stations with which it is adjacent, configured by the host, as target base station group information into a type of response frame.
[0130] Step S303: Receive the second type of polling frame sent by the positioning card at a second preset time interval after switching to the second working state, wherein the second preset time interval is less than the first preset time interval, and the second type of polling frame includes the target base station group information.
[0131] After the positioning card completes the mode switch, it will send Type II polling frames at a faster interval. These polling frames carry the target base station group information previously provided by the base station. Base stations within its communication range will receive these Type II polling frames.
[0132] In the above process, the polling periods of multiple different positioning cards are distributed in different time slots within the ranging period. The positioning card sends either the first type of polling frame or the second type of polling frame within the allocated time slot. Therefore, when the base station receives the second type of polling frame, it is actually receiving polling from different positioning cards in different time slots, and they will not overlap.
[0133] Step S304: Based on the target base station group information in the second type of polling frame, send the second type of response frame to the positioning card in a preset response order.
[0134] This step further includes:
[0135] S3041. After receiving the second type of polling frame, the target base station parses the target base station group information carried in the second type of polling frame. This information includes the ID of each base station and its response order.
[0136] S3042. Determine its own position number in the response sequence, calculate the response delay time based on the position number, and send the second type of response frame after the response delay time ends.
[0137] For example, if the response order is R1, R2, R3, R4, and base station R1 finds itself in the first position, it will send the response after a minimum delay (e.g., 100μs); if R2 finds itself in the second position, it will need to wait a fixed interval (e.g., 50μs) after R1 finishes sending before sending its response; and so on. Each base station carries its own local transmission timestamp in the frame when sending the Type II response frame, for use by other base stations or positioning cards.
[0138] Step S305: Receive the final frame sent by the positioning card after receiving the Type II response frames fed back by all target base stations in the target base station group.
[0139] After receiving responses from all base stations, the positioning card broadcasts a final frame. This final frame carries a set of timestamps from each response packet received by the positioning card. The target base station receives this final frame for subsequent distance calculations.
[0140] In some preferred embodiments, during the above process, the base station also listens to the Type II response frames sent by other base stations in the target base station group for time synchronization.
[0141] Specifically, by monitoring the Type II response frames sent by other target base stations within the target base station group, the transmission timestamps of the other target base stations when sending the Type II response frames are obtained; using the transmission timestamps and the local reception timestamps of the Type II response frames received by the target base station itself, the clock offset between the target base station and the other target base stations is calculated; and the target base station's local clock is corrected according to the clock offset to achieve synchronization of the ranging period with the other target base stations.
[0142] For example, before sending its own response, base station R2 listens to the response sent by R1. R2 extracts R1's sending timestamp (denoted as T1_tx) from R1's response and records its local time of receiving the response (denoted as T2_rx). Since the propagation delay of the speed of light is extremely short (nanosecond level) and can be ignored, the difference between T2_rx and T1_tx mainly reflects the clock offset between the two base stations. After calculating the offset, R2 adjusts its local clock counter to keep it synchronized with R1. Similarly, R3 can listen to R2, and so on, thereby achieving fine-grained time synchronization of all base stations within the entire base station group.
[0143] In some alternative embodiments, the base station may also directly listen to the Poll or Final packets sent by the positioning card for synchronization, but it is more accurate to use the Response packets of other base stations in the group for synchronization because the physical distance between these base stations is fixed and very close, and the propagation delay can be accurately compensated.
[0144] Following step S305, the following is also included:
[0145] Step S306: After receiving the final frame, the target base station extracts the set of receiving timestamps of the two types of response frames received from each target base station recorded by the positioning card from the final frame; obtains the local sending timestamp of sending the two types of response frames and the local receiving timestamp of receiving the two types of polling frames recorded by itself; and calculates the distance between itself and the positioning card using a bilateral bidirectional ranging algorithm based on the set of receiving timestamps, the local sending timestamps and the local receiving timestamps.
[0146] Step S307: Each target base station reports the distance it has measured to the system host, which then calculates the coordinates of the positioning card using a multilateral positioning algorithm. The specific algorithm is existing technology and will not be described in detail here.
[0147] After each base station completes its calculations, it sends the distance value to the protection system host via wired or wireless means. The host collects at least three distance values, calculates the two-dimensional coordinates of the positioning card, and uses this information in conjunction with the device's geometric model to determine proximity alarms.
[0148] When an alarm is triggered, the configurable distance threshold (e.g., 10 meters for Level 1 warning and 5 meters for Level 2 alarm) will trigger the corresponding audible and visual alarm or device linkage control.
[0149] Based on the same inventive concept as the above method embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it enables the electronic device to implement the control method described in the above embodiments.
[0150] In one embodiment, the electronic device may be a server, and in this embodiment, the structure of the electronic device may be as follows: Figure 5 As shown, it includes a memory 2001, a communication module 2003, and one or more processors 2002.
[0151] The memory 2001 is used to store computer programs executed by the processor 2002. The memory 2001 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0152] Memory 2001 may be volatile memory, such as random access memory (RAM); memory 2001 may also be nonvolatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 2001 may be any other medium capable of carrying or storing a desired computer program having the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 2001 may be a combination of the above-mentioned memories.
[0153] Processor 2002 may include one or more central processing units (CPUs) or digital processing units, etc. Processor 2002 is used to implement the above-mentioned audio data processing method when calling computer programs stored in memory 2001.
[0154] The communication module 2003 is used to communicate with terminal devices and other servers.
[0155] This application embodiment does not limit the specific connection medium between the memory 2001, communication module 2003, and processor 2002. This application embodiment... Figure 5 The memory 2001 and the processor 2002 are connected via a bus 2004, which is in... Figure 5 The connections between other components are illustrated with arrows and are for illustrative purposes only, not as limiting information. The Bus 2004 can be divided into address bus, data bus, control bus, etc. For ease of description, Figure 5 The text uses only one arrow to describe it, but does not indicate that there is only one bus or one type of bus.
[0156] Based on the same inventive concept as the above-described method embodiments, embodiments of the present invention also provide a computer-readable storage medium for storing a computer program. When the computer program is run on a computer, it enables the electronic device to implement the control method described in the above embodiments. The computer-readable storage medium can be a readable signal medium or a readable storage medium. A readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CDROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0157] Based on the same inventive concept as the above-described method embodiments, embodiments of the present invention also provide a computer program product, which includes a computer program that, when run on an electronic device, causes the electronic device to perform the steps of the control methods described above according to various exemplary embodiments of this application. The program product may take the form of any combination of one or more readable media. These computer program commands can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the commands executed by the processor of the computer or other programmable data processing device generate a process for implementing... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0158] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
Claims
1. A method for synchronous ranging based on multiple UWB base stations, applied to a positioning card, characterized in that, include: In the first working state, a type of polling frame is sent according to a first preset time interval; The base station receives a type of response frame in response to the type of polling frame, wherein the type of response frame includes at least the type information of the base station; If the type information is identified as a target base station, and the target base station group information in the first type of response frame is identified, the first working state is switched to the second working state; wherein, the target base station group information includes the information of each target base station in the target base station group to which the target base station is located, as well as the response order of each target base station, and each target base station in the target base station group is set around the same designated target area; In the second working state, two types of polling frames are sent according to a second preset time interval, wherein the second preset time interval is less than the first preset time interval, and the two types of polling frames include the target base station group information; Receive the second type of response frame from the target base station in response to the second type of polling frame, wherein the second type of response frame is sent one by one by each target base station in the target base station group in the response order; After receiving the Type II response frames from all target base stations in the target base station group, the final frame is sent. The polling cycles of multiple different positioning cards are distributed in different time slots within the ranging cycle, and the positioning card sends the first type of polling frame or the second type of polling frame within its allocated time slot.
2. The method according to claim 1, characterized in that, After sending the second type of polling frame, the positioning card configures a receiving time window for each target base station in the order of the responses, and listens for the second type of response frame replied by the corresponding target base station within each receiving time window.
3. The method according to claim 1, characterized in that, When the positioning card is in the second working state and does not receive a Type II response frame from any of the target base stations in the target base station group within a predetermined time, the ranging process is terminated and the Type II polling frame is resent. Preferably, when the positioning card fails to receive all Type II response frames from all target base stations in the target base station group multiple times in the second working state, the second working state is switched to the first working state.
4. The method according to claim 1, characterized in that, The time slot position and length allocated to each of the positioning cards within the ranging period are configured by the system host through the base station.
5. A method for synchronous ranging based on multiple UWB base stations, applied to a target base station, characterized in that, include: The positioning card receives a type of polling frames sent at a first preset time interval in the first working state; In response to the polling frame, a response frame is sent to the positioning card to switch the positioning card from a first working state to a second working state. The response frame includes the type information of the target base station and the target base station group information to which the target base station belongs. The target base station group information includes the information of each target base station in the target base station group and the response order of each target base station. The target base stations in the target base station group are set around the same specified target area. The positioning card receives two types of polling frames sent at a second preset time interval after switching to the second working state, wherein the second preset time interval is less than the first preset time interval, and the two types of polling frames include the target base station group information; Based on the target base station group information in the second type of polling frame, the second type of response frame is sent to the positioning card in a preset response order; The final frame sent by the positioning card after receiving the Type II response frames fed back by all target base stations in the target base station group; The polling periods of multiple different positioning cards are distributed in different time slots within the ranging period, and the positioning card sends the first type of polling frame or the second type of polling frame within the allocated time slot.
6. The method according to claim 5, characterized in that, After the target base station receives the second type of polling frame, it includes: Analyze the target base station group information carried in the second type of polling frames; Determine its own position number in the response sequence, calculate the response delay time based on the position number, and send the second type of response frame after the response delay time has elapsed.
7. The method according to claim 5, characterized in that, The method further includes: By monitoring the Type II response frames sent by other target base stations within the target base station group, the sending timestamps of the other target base stations when sending Type II response frames are obtained; Using the sending timestamp and the local receiving timestamp of receiving the second type of response frame, calculate the clock offset between itself and the other target base stations; The local clock is corrected according to the clock offset to achieve synchronization with the ranging cycle of the other target base stations.
8. The method according to claim 5, characterized in that, After the target base station receives the final frame, it also includes: Extract the set of timestamps of the received response frames of the two types of response frames received from each target base station, as recorded by the positioning card, from the final frame; Obtain the local sending timestamp of sending the second type of response frame and the local receiving timestamp of receiving the second type of polling frame, which are recorded by the unit itself. Based on the received timestamp set, the local transmission timestamp, and the local reception timestamp, a two-sided bidirectional ranging algorithm is used to calculate the distance between itself and the positioning card; Preferably, each target base station reports its measured distance to the system host, and the host calculates the coordinates of the positioning card using a multilateral positioning algorithm.
9. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it causes the electronic device to perform the method described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when run on a computer, causes the electronic device to implement the method described in any one of claims 1-8.