技术领域technical field
本发明涉及超宽带无线通信领域,尤其涉及一种基于超宽带无线通信的自适应组网的时间同步系统及方法。The invention relates to the field of ultra-wideband wireless communication, in particular to a time synchronization system and method based on adaptive networking of ultra-wideband wireless communication.
背景技术Background technique
随着通信技术的不断发展,通信的准确可靠性要求越来越高。在通信网络中,节点间需要时间同步,若时间同步处理不恰当,导致节点间传递的成功率较低或直接断线,满足不了超宽带的业务需求。With the continuous development of communication technology, the requirements for accurate and reliable communication are getting higher and higher. In a communication network, time synchronization is required between nodes. If the time synchronization is not handled properly, the success rate of transmission between nodes will be low or the connection will be disconnected directly, which cannot meet the business requirements of ultra-broadband.
在目前技术中,如图1所示,为了提高时间同步的可靠性,节点间通常采用有线同步,利用同步控制器通过有线通信的方式,将时间信息传输到每一个节点,使得每个节点处于同一时间体系,以实现多个节点时间同步的高可靠性。In the current technology, as shown in Figure 1, in order to improve the reliability of time synchronization, wired synchronization is usually used between nodes, and the synchronization controller is used to transmit time information to each node through wired communication, so that each node is in the The same time system to achieve high reliability of time synchronization of multiple nodes.
但是超宽带具有传输速率高、通信距离短等特点,不适合长距离高速无线通信;另外通过有线连接的节点通信,每个节点都需要通过有线的方式连接到同步控制器,线路规划变得复杂,存在部署成本高、可扩展性差、灵活性差等缺陷。因此,亟需一种安全可信、成本可控、灵活性高、长距离传输的基于超宽带无线通信的时间同步技术手段来解决以上问题。However, ultra-broadband has the characteristics of high transmission rate and short communication distance, which is not suitable for long-distance high-speed wireless communication; in addition, through the node communication of wired connection, each node needs to be connected to the synchronization controller by cable, and the line planning becomes complicated. , there are defects such as high deployment cost, poor scalability, and poor flexibility. Therefore, there is an urgent need for a safe, reliable, cost-controllable, high-flexibility, and long-distance transmission time synchronization technology based on ultra-wideband wireless communication to solve the above problems.
发明内容Contents of the invention
针对现有技术的不足,本发明提供一种基于超宽带无线通信的自适应组网的时间同步系统及方法,在双向通信的基础上,通过节点间自适应分级处理的方式为未同步的节点进行时间同步的系统及方法。本发明采用以下技术方案:Aiming at the deficiencies of the prior art, the present invention provides a time synchronization system and method for adaptive networking based on ultra-wideband wireless communication. On the basis of two-way communication, the non-synchronized nodes are A system and method for time synchronization. The present invention adopts following technical scheme:
本发明第一方面提供了一种基于超宽带无线通信的自适应组网的时间同步系统,包括:不同节点等级的多个节点设备,所述节点设备包括至少一个主节点和至少一个从节点,不同主节点之间通过有线连接,主节点与从节点和/或从节点与从节点之间通过超宽带无线通信连接;所述从节点包含完成时间同步的从节点和没有完成时间同步的从节点,所述没有完成时间同步的从节点接收周围所有节点的广播信息,根据优选机制,从当前接收到的广播信息中的选取出至少1个节点,向所优选的至少1个节点发起时间同步,同时可以向不大于本节点等级的多个从节点提供时间同步。The first aspect of the present invention provides a time synchronization system based on adaptive networking of ultra-wideband wireless communication, including: multiple node devices at different node levels, the node devices include at least one master node and at least one slave node, Different master nodes are connected through wired connections, and master nodes and slave nodes and/or slave nodes and slave nodes are connected through ultra-wideband wireless communication; the slave nodes include slave nodes that have completed time synchronization and slave nodes that have not completed time synchronization , the slave node that has not completed time synchronization receives the broadcast information of all surrounding nodes, selects at least one node from the currently received broadcast information according to the preferred mechanism, and initiates time synchronization to the selected at least one node, At the same time, it can provide time synchronization to multiple slave nodes not higher than the level of this node.
进一步地,所述主节点包含基准发射模块、基准接收模块、基准处理模块和基准时间单元;所述的基准发射模块以本地时钟为基准进行周期广播基准帧信息;所述的基准接收模块接收主节点周围所有节点的广播信息;所述的基准处理模块,对接收广播信息进行处理,解析出从节点的时间信息,计算出从节点与主节点的时间偏差和距离值;所述的基准时间单元以本地时钟为基准时钟。Further, the master node includes a reference transmitting module, a reference receiving module, a reference processing module and a reference time unit; the reference transmitting module periodically broadcasts reference frame information based on the local clock; the reference receiving module receives the master The broadcast information of all nodes around the node; the reference processing module processes the received broadcast information, parses out the time information of the slave node, and calculates the time deviation and distance value between the slave node and the master node; the reference time unit The local clock is used as the reference clock.
进一步地,所述的从节点包含同步发射模块、同步接收模块、同步处理模块和同步时间单元;所述的同步发射模块以从节点发射机制广播同步帧信息;所述的同步接收模块接收该节点周围所有节点的广播信息;所述的广播信息包含主节点的基准帧信息和/或从节点的同步帧信息;所述的同步处理模块,对接收的广播信息进行处理,解析出主节点和/或从节点的时间信息,计算出从节点与主节点的时间差信息,更新下一个发射时刻的同步帧信息;所述的同步时间单元以当前节点与主节点的时间差信息对本地时钟进行驯服,完成与主节点的时间同步。Further, the slave node includes a synchronous transmitting module, a synchronous receiving module, a synchronous processing module and a synchronous time unit; the synchronous transmitting module broadcasts synchronous frame information with a slave node transmitting mechanism; the synchronous receiving module receives the node The broadcast information of all surrounding nodes; the broadcast information includes the reference frame information of the master node and/or the synchronization frame information of the slave node; the synchronization processing module processes the received broadcast information and parses out the master node and/or Or from the time information of the node, calculate the time difference information between the slave node and the master node, and update the synchronization frame information at the next transmission moment; the synchronization time unit tames the local clock with the time difference information between the current node and the master node, and completes Synchronize with the time of the master node.
进一步地,所述的从节点发射机制为从节点在主节点一个发射周期内,以主节点的发射时刻为起点,延时当前从节点编号与单个节点发射间隔的乘积的时间后,广播当前节点的同步帧信息。Further, the transmission mechanism of the slave node is that the slave node broadcasts the current node after delaying the time of the product of the current slave node number and the transmission interval of a single node within one transmission cycle of the master node, starting from the time of transmission of the master node Synchronization frame information.
进一步地,所述的优选机制按照同时满足节点等级原则、可靠性原则和距离原则进行筛选;所述的节点等级原则为优先节点等级最高的节点;所述的可靠性原则为优选接收节点信息成功率需满足预设阀值的节点;所述的距离原则为在多个相同的节点等级的节点中优选距离最近的节点。Further, the optimization mechanism is screened according to simultaneously satisfying the node level principle, the reliability principle and the distance principle; the node level principle is the node with the highest priority node level; the reliability principle is that the preferred receiving node information is successful The node whose rate needs to meet the preset threshold; the distance principle is to choose the node with the closest distance among multiple nodes of the same node level.
本发明还提供一种基于超宽带无线通信的自适应组网的时间同步方法,主节点和从节点交互时间同步信息,获取于基准节点的时钟信息,所述时间同步信息通过超宽带无线信道传输,其中所述主节点和从节点交互时间同步信息,获取于基准节点的时钟信息,具体包括:The present invention also provides a time synchronization method for adaptive networking based on ultra-wideband wireless communication. The master node and the slave node exchange time synchronization information and obtain clock information from the reference node. The time synchronization information is transmitted through the ultra-wideband wireless channel , wherein the master node and the slave node exchange time synchronization information, which is obtained from the clock information of the reference node, specifically including:
S1:主节点将当次广播的发射时间t1通过超宽带无线信道广播出去;S1: The master node broadcasts the transmission time t1 of the current broadcast through the ultra-wideband wireless channel;
S2:从节点接收到主节点的广播信息,获取广播信息中t1,记录当次广播信息的接收时间为t2;S2: The slave node receives the broadcast information of the master node, obtains t1 in the broadcast information, and records the receiving time of the current broadcast information as t2;
S3:从节点将当次广播的发射时间t3、以及所述的t1和t2通过超宽带无线信道广播出去;S3: The slave node broadcasts the transmission time t3 of the current broadcast, and the t1 and t2 through the ultra-wideband wireless channel;
S4:主节点接收从节点的广播信息,获取广播信息中t1、t2和t3,记录当次广播信息的接收时间为t4,根据t1、t2、t3和t4计算时间偏移量和距离值;S4: The master node receives the broadcast information from the slave node, obtains t1, t2 and t3 in the broadcast information, records the receiving time of the current broadcast information as t4, and calculates the time offset and distance value according to t1, t2, t3 and t4;
S5:主节点将本节点当次广播发射时间t5、以及所述的时间偏移量和距离值通过超宽带无线信道广播出去;S5: The master node broadcasts the current broadcast transmission time t5 of this node, as well as the time offset and distance value through the ultra-wideband wireless channel;
S6:从节点接收到主节点的广播信息,获取广播信息中t5、时间偏移量和距离值,记录当次广播信息的接收时间为t6,从节点根据t1、t2、t5和t6计算得到时间变化偏移量,用于本地时钟驯服。S6: The slave node receives the broadcast information of the master node, obtains t5, time offset and distance value in the broadcast information, and records the receiving time of the current broadcast information as t6, and the slave node calculates the time according to t1, t2, t5 and t6 Variation offset, for local clock taming.
进一步地,所述主节点可以和多个从节点交互时间同步信息。Further, the master node can exchange time synchronization information with multiple slave nodes.
进一步地,所述主节点可以是同步后的从节点。Further, the master node may be a synchronized slave node.
进一步地,所述从节点可以和至少1个主节点交互时间同步信息。Further, the slave node can exchange time synchronization information with at least one master node.
进一步地,所述从节点包含同步后的从节点或未同步的从节点。Further, the slave nodes include synchronized slave nodes or unsynchronized slave nodes.
现有系统及方法相比,本发明的优点在于:Compared with existing systems and methods, the present invention has the advantages of:
1、通过本发明提出的基于超宽带无线通信的自适应组网的时间同步系统及方法,经过逐步向下同步,能实现远距离的节点时间同步。1. Through the time synchronization system and method based on the self-adaptive networking of ultra-broadband wireless communication proposed by the present invention, long-distance node time synchronization can be realized through gradual downward synchronization.
2、通过本发明提出的基于超宽带无线通信的自适应组网的时间同步系统及方法,安装方便、组网灵活、可扩展性好、部署成本低。2. The time synchronization system and method based on the self-adaptive networking of ultra-broadband wireless communication proposed by the present invention has the advantages of convenient installation, flexible networking, good scalability, and low deployment cost.
附图说明Description of drawings
图1为现有技术提供的一种时间同步方案网络示意图;FIG. 1 is a schematic diagram of a time synchronization solution network provided by the prior art;
图2为本发明一种实施例所示的系统示意图;Fig. 2 is a system schematic diagram shown in an embodiment of the present invention;
图3为本发明一种实施例所示的系统示意图;Fig. 3 is a schematic diagram of the system shown in an embodiment of the present invention;
图4为本发明一种实施例所示的时间同步方法流程图;FIG. 4 is a flowchart of a time synchronization method shown in an embodiment of the present invention;
图5为本发明一种实施例所示的主节点处理单元组成图;5 is a composition diagram of a master node processing unit shown in an embodiment of the present invention;
图6为本发明一种实施例所示的时间同步方法流程图;FIG. 6 is a flow chart of a time synchronization method shown in an embodiment of the present invention;
图7为本发明一种实施例所示的两节点同步处理时的交互时间流程图。Fig. 7 is a flow chart of interaction time when two nodes perform synchronous processing according to an embodiment of the present invention.
具体实施方式Detailed ways
本发明实施例提供一种基于超宽带无线通信的自适应组网的时间同步系统及方法。Embodiments of the present invention provide a time synchronization system and method based on adaptive networking of ultra-wideband wireless communication.
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.
以下将结合说明书附图和具体实施例对本发明做进一步详细说明。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
本发明实施例中,提供的一种基于超宽带无线通信的自适应组网的时间同步系统,如图2所示,包括不同节点等级的多个节点设备,所述节点设备包括至少一个主节点和至少一个从节点,不同主节点之间通过有线连接,主节点与从节点和/或从节点与从节点之间通过超宽带无线通信连接;所述从节点包含完成时间同步的从节点和没有完成时间同步的从节点,所述没有完成时间同步的从节点接收周围所有节点的广播信息,根据优选机制,从当前接收到的广播信息中的选取出至少1个节点,向所优选的至少1个节点发起时间同步,同时可以向不大于本节点等级的多个从节点提供时间同步。不同节点等级的多个节点设备,所述的多个节点设备包括两个主节点和多个从节点;如主节点的节点等级最高,编号为0;为了防止主节点失效,导致系统崩溃,采用两个主节点向从节点发送同步信息,为了保证主节点间的时间同频同步,通过有线30连接;主节点广播基准帧信息,为周围的从节点提供时间同步信息,受超宽带传输距离的限制,主节点1可以为距离较近的从节点1和从节点2提供时间同步信息;从节点1接收周围所有节点的信息,向主节点1和主节点2发起时间同步,根据优选机制将主节点1作为主校准节点,将主节点2作为备份校准节点,从节点1根据主校准节点的时间信息对本节点时钟进行驯服,完成与主节点1的时间同步,对备份校准节点的时间信息不做处理,当主校准节点出现异常时,才使用备份校准节点的时间信息进行本节点时钟驯服,完成与主节点2的时间同步。同步后的从节点1节点等级为1,可以向从节点2和从节点3提供时间同步;从节点2根据优选机制将主节点1作为主校准节点,将从节点1作为备份校准节点,同步后的从节点2的节点等级为1,可以向从节点3和从节点4提供时间同步信息;以此类推,直到所有的从节点完成时间同步和节点等级分配。设不同节点等级为主节点的节点等级最高,为等级0,没有完成时间同步的从节点的节点等级最低,为x,接收主节点信息后完成与主节点时间同步的从节点的节点等级在主节点的节点等级的基础上加1,为等级1,接收节点等级1从节点的信息后完成时间同步的从节点的节点等级在节点等级1的基础上加1,为等级2,直到所有的从节点n完成节点等级分配。关于等级的设定,不限于0、x,可以定用户选择设置或定制为其他的数值或代码。该系统包括至少一个主节点和至少一个从节点,其中,以主节点发送时间为基础,为了预防各节点发射时间的冲突,其它从节点的发送时间以本地标识为准;其它从节点将会根据在系统中的等级原则、可靠性原则和距离原则,自适应地选择与已同步的节点进行时间同步处理,该从节点与已同步节点时间同步完成后,将会对相邻的节点发送同步信息,直到所有的节点同步完成。In an embodiment of the present invention, a time synchronization system based on adaptive networking of ultra-wideband wireless communication is provided, as shown in FIG. 2 , including multiple node devices of different node levels, and the node devices include at least one master node and at least one slave node, through wired connections between different master nodes, and between master nodes and slave nodes and/or slave nodes and slave nodes through ultra-wideband wireless communication connections; the slave nodes include slave nodes that complete time synchronization and no The slave node that has completed time synchronization, the slave node that has not completed time synchronization receives the broadcast information of all surrounding nodes, according to the optimal mechanism, selects at least 1 node from the currently received broadcast information, and sends to the preferred at least 1 node A node initiates time synchronization, and at the same time, it can provide time synchronization to multiple slave nodes no higher than the level of this node. Multiple node devices of different node levels, the multiple node devices include two master nodes and multiple slave nodes; if the master node has the highest node level, the number is 0; in order to prevent the failure of the master node and cause the system to crash, use The two master nodes send synchronization information to the slave nodes. In order to ensure the time and frequency synchronization between the master nodes, they are connected through a cable 30; the master node broadcasts the reference frame information to provide time synchronization information for the surrounding slave nodes, which is limited by the UWB transmission distance Limitation, master node 1 can provide time synchronization information for slave node 1 and slave node 2 which are closer to each other; slave node 1 receives information from all surrounding nodes, initiates time synchronization to master node 1 and master node 2, and sends master node 1 and master node 2 according to the preferred mechanism Node 1 is the primary calibration node, and primary node 2 is the backup calibration node. Slave node 1 tames the clock of this node according to the time information of the primary calibration node, and completes the time synchronization with the primary node 1. The time information of the backup calibration node is not Processing, when the main calibration node is abnormal, the time information of the backup calibration node is used to tame the clock of this node, and the time synchronization with the main node 2 is completed. The node level of the synchronized slave node 1 is 1, which can provide time synchronization to slave node 2 and slave node 3; slave node 2 uses master node 1 as the master calibration node and slave node 1 as the backup calibration node according to the optimal mechanism. After synchronization The node level of slave node 2 is 1, and can provide time synchronization information to slave nodes 3 and 4; and so on, until all slave nodes complete time synchronization and node level distribution. Assuming different node levels, the node level of the master node is the highest, which is level 0, and the node level of the slave node that has not completed time synchronization is the lowest, which is x. After receiving the master node information, the node level of the slave node that completes time synchronization with the master node is at the master Add 1 to the node level of the node, which is level 1. After receiving the information of the node level 1 slave node, the node level of the slave node that completes time synchronization is added 1 to the node level 1, which is level 2, until all slave nodes Node n completes the node rank assignment. Regarding the setting of the level, it is not limited to 0 and x, and can be set or customized as other numerical values or codes by the user. The system includes at least one master node and at least one slave node, wherein, based on the sending time of the master node, in order to prevent the conflict of the sending time of each node, the sending time of other slave nodes is based on the local identification; other slave nodes will be based on Based on the hierarchical principle, reliability principle and distance principle in the system, it adaptively chooses to perform time synchronization with the synchronized node. After the time synchronization between the slave node and the synchronized node is completed, it will send synchronization information to the adjacent nodes. , until all nodes are synchronized.
为保证串行内节点的时间同步,同步的节点与未同步的从节点进行同步处理主要分如下两个方面:In order to ensure the time synchronization of the nodes in the series, the synchronization between the synchronized node and the unsynchronized slave node is mainly divided into the following two aspects:
1)主校准节点和从节点通过超宽带无线通信10进行数据交互;1) The master calibration node and the slave node perform data interaction through ultra-wideband wireless communication 10;
2)备份校准节点和从节点通过超宽带无线通信20进行数据交互。2) The backup calibration node and the slave node perform data interaction through ultra-wideband wireless communication 20 .
这种串行的网络拓扑结构适用于隧道等狭长环境。This serial network topology is suitable for long and narrow environments such as tunnels.
本发明另一实施例中,如图3所示,包括不同节点等级的多个节点设备,所述的多个节点设备包括2个主节点和多个按网状排列的从节点;所述的不同节点等级为主节点的节点等级最高,编号为0,向相邻的从节点发射同步信息;所述的从节点接收到的信息主要来自于主校准节点、备份校准节点,根据不同的环境进行自适应分级,完成时间同步;为保证主节点间的时间同频同步,主节点间通过有线30连接,2个主节点的设计可以有效防止当一个主节点出现异常时对整个系统造成灾难性的影响;主节点广播基准帧信息,为周围的从节点提供时间同步信息,受超宽带传输距离的限制,主节点1可以为距离较近的从节点1、从节点7和从节点10提供时间同步信息;从节点7接收周围所有节点的信息,向主节点1和主节点2发起时间同步,根据优选机制将主节点1作为主校准节点,将主节点2作为备份校准节点,从节点7根据主校准节点的时间信息对本节点时钟进行驯服,完成与主节点1的时间同步,对备份校准节点的时间信息不做处理,当主校准节点出现异常时,才使用备份校准节点的时间信息进行本节点时钟驯服,完成与主节点2的时间同步。同步后的从节点7节点等级为1,可以向从节点8和从节点11提供时间同步;从节点8根据优选机制将从节点7作为主校准节点,将从节点10作为备份校准节点,同步后的从节点8的节点等级为2,可以向从节点9和从节点12提供时间同步信息;从节点12和从节点11之间被障碍物40阻碍,超宽带无线信号不能穿透,通过自适应分级处理,从节点12根据优选机制,将从节点8作为主校准节点,将从节点9作为备份校准节点,从节点12根据主校准节点的时间信息对本节点时钟进行驯服,完成与从节点8的时间同步,对备份校准节点的时间信息不做处理,当主校准节点出现异常时,才使用备份校准节点的时间信息进行本节点时钟驯服,完成与从节点9的时间同步。当从节点12完成时间同步后,从节点12的节点等级为3;当从节点12无法接受到从节点8的信息时,从节点12的主校准节点切换为从节点9,节点等级变为4,同步后的从节点12可以向从节点16提供时间同步信息;以此类推,直到所有的从节点完成时间同步和节点等级分配。In another embodiment of the present invention, as shown in FIG. 3 , multiple node devices of different node levels are included, and the multiple node devices include two master nodes and multiple slave nodes arranged in a grid; the described The node level of the master node of different node levels is the highest, the number is 0, and the synchronization information is sent to the adjacent slave nodes; the information received by the slave nodes mainly comes from the master calibration node and the backup calibration node, and is carried out according to different environments. Self-adaptive grading to complete time synchronization; in order to ensure time and frequency synchronization between master nodes, the master nodes are connected through wired 30, and the design of two master nodes can effectively prevent catastrophic damage to the entire system when one master node is abnormal Impact: The master node broadcasts the reference frame information to provide time synchronization information for the surrounding slave nodes. Due to the limitation of ultra-wideband transmission distance, the master node 1 can provide time synchronization for the closer slave nodes 1, 7 and 10. information; the slave node 7 receives the information of all surrounding nodes, initiates time synchronization to the master node 1 and the master node 2, and uses the master node 1 as the master calibration node and the master node 2 as the backup calibration node according to the optimal mechanism, and the slave node 7 according to the master node The time information of the calibration node tames the clock of this node and completes the time synchronization with the master node 1. The time information of the backup calibration node is not processed. When the master calibration node is abnormal, the time information of the backup calibration node is used to update the clock of the node. Taming, complete time synchronization with master node 2. The synchronized slave node 7 has a node level of 1 and can provide time synchronization to slave node 8 and slave node 11; slave node 8 uses slave node 7 as the master calibration node and slave node 10 as the backup calibration node according to the preferred mechanism. After synchronization The node level of the slave node 8 is 2, which can provide time synchronization information to the slave node 9 and the slave node 12; the slave node 12 and the slave node 11 are blocked by an obstacle 40, and the ultra-wideband wireless signal cannot penetrate through the self-adaptive Hierarchical processing, the slave node 12 uses the slave node 8 as the main calibration node according to the preferred mechanism, and the slave node 9 as the backup calibration node. For time synchronization, the time information of the backup calibration node is not processed. When the master calibration node is abnormal, the time information of the backup calibration node is used to tame the clock of this node, and the time synchronization with the slave node 9 is completed. After the slave node 12 completes the time synchronization, the node level of the slave node 12 is 3; when the slave node 12 cannot receive the information of the slave node 8, the master calibration node of the slave node 12 is switched to the slave node 9, and the node level becomes 4 , the synchronized slave node 12 can provide time synchronization information to the slave node 16; and so on until all slave nodes complete time synchronization and node level assignment.
为保证网状内节点的时间同步,同步的节点与未同步的从节点进行同步处理主要分如下两个方面:In order to ensure the time synchronization of the nodes in the mesh, the synchronization between the synchronized nodes and the unsynchronized slave nodes is mainly divided into the following two aspects:
1)主校准节点和从节点通过超宽带无线10进行数据交互;1) The master calibration node and the slave node perform data interaction through the ultra-wideband wireless 10;
2)备份校准节点和从节点通过超宽带无线20进行数据交互。2) The backup calibration node and the slave node perform data interaction through the ultra-wideband wireless 20 .
这种网状排列结构适用于地下停车场、商场等复杂环境。This mesh arrangement structure is suitable for complex environments such as underground parking lots and shopping malls.
从节点接收到基准帧信息时,从节点的节点等级为1;从节点同步完成时,从节点的节点等级等于接收到的同步帧数据中的节点等级编号加1。成功接收到主节点基准帧信息或完成同步的从节点的同步帧信息后,开始向接收信息中节点等级最高的两个节点发起时钟同步,同步的从节点接收周围所有节点的广播信息,根据优选机制,从当前接收到的信息中的选取出最优的两个节点,并向这两个节点发起时间同步,两个节点中一个为主校准节点,另一个为备份校准节点。所述选取最优节点的优选机制按照同时满足节点等级原则、可靠性原则和距离原则进行帅选,其中,节点等级原则为优先节点等级最高的节点;可靠性原则取决于接收成功率与预设阈值的比较,接收成功率需要经过一个短时间的观测期,统计接收到次数和未接收到的次数,最终计算得到,当接收成功率大于或等于预设阈值时,认定该节点可靠,赋值为1,可以发起时间同步请求,反之为不可靠,赋值为0,不可以发起时间同步请求;距离原则表示为在存在多个相同节点等级的节点时,优选两节点之间的距离最近的节点。When the slave node receives the reference frame information, the node level of the slave node is 1; when the slave node synchronization is completed, the node level of the slave node is equal to the node level number in the received synchronization frame data plus 1. After successfully receiving the reference frame information of the master node or the synchronization frame information of the slave node that has completed synchronization, it starts to initiate clock synchronization to the two nodes with the highest node levels in the received information, and the synchronized slave node receives the broadcast information of all surrounding nodes. The mechanism selects two optimal nodes from the currently received information, and initiates time synchronization to these two nodes. One of the two nodes is the main calibration node and the other is the backup calibration node. The optimization mechanism for selecting the optimal node is selected according to the node level principle, the reliability principle and the distance principle at the same time, wherein the node level principle is the node with the highest priority node level; Threshold comparison, the success rate of reception needs to go through a short observation period, count the number of times received and the number of times it has not been received, and finally calculate it. When the success rate of reception is greater than or equal to the preset threshold, the node is considered reliable and assigned as 1. A time synchronization request can be initiated, otherwise it is unreliable, the value assigned is 0, and a time synchronization request cannot be initiated; the distance principle expresses that when there are multiple nodes of the same node level, the node with the closest distance between two nodes is preferred.
根据优选机制的判别条件,决定节点信息是否需要交换,所述的优选机制的具体方案如表1所示,其中A1、A2分别表示主校准和备份校准的节点等级编号;B1、B2分别表示主校准和备份校准可靠性标志,当可靠性等于1时则代表可靠,否则不可靠;C1、C2分别表示校准和备份校准与同步基站的距离。According to the discrimination conditions of the optimal mechanism, it is determined whether node information needs to be exchanged. The specific scheme of the optimal mechanism is shown in Table 1, where A1 and A2 represent the node level numbers of the primary calibration and backup calibration respectively; B1 and B2 represent the primary and secondary calibration respectively. Calibration and backup calibration reliability flags, when the reliability is equal to 1, it means reliable, otherwise it is unreliable; C1, C2 respectively indicate the distance between the calibration and backup calibration and the synchronization base station.
表1Table 1
从节点通过分级处理,逐级进行时间同步处理,扩展网络节点时间同步处理的距离;选取最优的两个完成时间同步的节点进行时间同步处理,提高了时间同步的精度。Through hierarchical processing, the slave nodes perform time synchronization processing step by step to expand the distance of time synchronization processing of network nodes; select the optimal two nodes that complete time synchronization for time synchronization processing, and improve the accuracy of time synchronization.
以下介绍本发明实施提供的一种主节点的一实施例,图4示出了该实施例的示意图,所述的主节点包括:基准发射模块、基准接收模块、基准处理模块和基准时间单元;The following introduces an embodiment of a master node provided by the implementation of the present invention. FIG. 4 shows a schematic diagram of the embodiment. The master node includes: a reference transmitting module, a reference receiving module, a reference processing module and a reference time unit;
所述的基准发射模块以本地时钟为基准进行周期广播基准帧信息;The reference transmitting module periodically broadcasts reference frame information based on the local clock;
所述的基准接收模块接收主节点周围所有节点的广播信息;The reference receiving module receives the broadcast information of all nodes around the master node;
所述的基准处理模块,对接收广播信息进行处理,解析出从节点的时间信息,计算出从节点与主节点的时间差,更新下一个发射时刻的基准帧信息;The reference processing module processes the received broadcast information, analyzes the time information of the slave node, calculates the time difference between the slave node and the master node, and updates the reference frame information at the next transmission moment;
所述的基准时间单元以本地时钟为基准时钟。The reference time unit uses the local clock as the reference clock.
以下介绍本发明实施提供的一种从节点的一实施例,图5示出了该实施例的示意图,所述的从节点包括:同步发射模块、同步接收模块、同步处理模块和同步时间单元;The following introduces an embodiment of a slave node provided by the implementation of the present invention. FIG. 5 shows a schematic diagram of the embodiment. The slave node includes: a synchronous transmitting module, a synchronous receiving module, a synchronous processing module and a synchronous time unit;
所述的同步发射模块以从节点发射机制广播同步帧信息;The synchronous transmission module broadcasts synchronous frame information with a slave node transmission mechanism;
所述的同步接收模块接收该节点周围所有节点的广播信息;The synchronous receiving module receives the broadcast information of all nodes around the node;
所述的广播信息包含主节点的基准帧信息和/或从节点的同步帧信息;The broadcast information includes reference frame information of the master node and/or synchronization frame information of the slave node;
所述的同步处理模块,对接收的广播信息进行处理,解析出主节点和/或从节点的时间信息,计算出从节点与主节点的时间差信息,更新下一个发射时刻的同步帧信息;The synchronization processing module processes the received broadcast information, analyzes the time information of the master node and/or the slave node, calculates the time difference information between the slave node and the master node, and updates the synchronization frame information at the next transmission moment;
所述的同步时间单元以当前节点与主节点的时间差信息对本地时钟进行驯服,完成与主节点时间同步。The synchronization time unit uses the time difference information between the current node and the master node to tame the local clock to complete the time synchronization with the master node.
以下介绍本发明实施例提供的一种基于超宽带无线通信的自适应组网的时间同步方法的一方法实施例,图6示出了该实施例的流程图,包括:The following introduces a method embodiment of a time synchronization method based on an adaptive networking of ultra-wideband wireless communication provided by an embodiment of the present invention. FIG. 6 shows a flow chart of this embodiment, including:
S1:主节点将当次广播的发射时间t1通过超宽带无线信道广播出去;S1: The master node broadcasts the transmission time t1 of the current broadcast through the ultra-wideband wireless channel;
S2:从节点接收到主节点的广播信息,获取广播信息中t1,记录当次广播信息的接收时间为t2;S2: The slave node receives the broadcast information of the master node, obtains t1 in the broadcast information, and records the receiving time of the current broadcast information as t2;
S3:从节点将当次广播的发射时间t3、以及所述的t1和t2通过超宽带无线信道广播出去;S3: The slave node broadcasts the transmission time t3 of the current broadcast, and the t1 and t2 through the ultra-wideband wireless channel;
S4:主节点接收从节点的广播信息,获取广播信息中t1、t2和t3,记录当次广播信息的接收时间为t4,根据t1、t2、t3和t4计算时间偏移量和距离值,其中时间偏移量计算公式为距离值计算公式为/>c为光速;S4: The master node receives the broadcast information from the slave node, obtains t1, t2 and t3 in the broadcast information, records the receiving time of the current broadcast information as t4, and calculates the time offset and distance value according to t1, t2, t3 and t4, where The formula for calculating the time offset is The distance value calculation formula is /> c is the speed of light;
S5:主节点将本节点当次广播发射时间t5、以及所述的时间偏移量和距离值通过超宽带无线信道广播出去;S5: The master node broadcasts the current broadcast transmission time t5 of this node, as well as the time offset and distance value through the ultra-wideband wireless channel;
S6:从节点接收到主节点的广播信息,获取广播信息中t5、时间偏移量和距离值,记录当次广播信息的接收时间为t6,从节点根据t1、t2、t5和t6计算得到时间变化偏移量,用于本地时钟驯服。S6: The slave node receives the broadcast information of the master node, obtains t5, time offset and distance value in the broadcast information, and records the receiving time of the current broadcast information as t6, and the slave node calculates the time according to t1, t2, t5 and t6 Variation offset, for local clock taming.
在本实施例中,所述主节点可以和多个从节点交互时间同步信息,这样一个主节点可以为多个从节点提供时间同步,可以有效地减少整个系统的级联层级,提高整个系统的时间同步精度。In this embodiment, the master node can exchange time synchronization information with multiple slave nodes, so that one master node can provide time synchronization for multiple slave nodes, which can effectively reduce the cascade level of the entire system and improve the efficiency of the entire system. Time synchronization accuracy.
在本实施例中,所述主节点可以是同步后的从节点。同步后的从节点可以当主节点使用,同步其他从节点。In this embodiment, the master node may be a synchronized slave node. The synchronized slave node can be used as the master node to synchronize other slave nodes.
在本实施例中,从节点可以同时与2个以上的主节点交互时间同步信息,实现同步备份,增加了系统布置的灵活性;In this embodiment, the slave node can exchange time synchronization information with more than two master nodes at the same time to realize synchronous backup and increase the flexibility of system layout;
图5示出了整个时间同步方法中主节点和从节点交互时间同步信息,其中t1、t4和t5是主节点的时钟进行记录的时间值,t2、t3和t6是从节点的时钟进行记录的时间值。Figure 5 shows the time synchronization information exchanged between the master node and the slave node in the entire time synchronization method, where t1, t4 and t5 are the time values recorded by the clock of the master node, and t2, t3 and t6 are recorded by the clock of the slave node time value.
在本实施例中,在步骤S4中,两节点间的距离值可用于从节点选择两个最优节点发起时间同步的判断条件。In this embodiment, in step S4, the distance value between two nodes may be used as a judgment condition for the slave node to select two optimal nodes to initiate time synchronization.
在本实施例中,在步骤S6中,主节点的时间变化量为t1-t5,从节点的时间变化量为t2-t6,则两节点交互的时间变化偏移量为((t1-t5)-(t2-t6)),将该偏移量用于本地时钟驯服,通过不断地主节点和从节点的双向通信,更新得到时间变化偏移量,用于从节点时间调整,使从节点的时间与主节点的时间同步。In this embodiment, in step S6, the time variation of the master node is t1 -t5 , and the time variation of the slave node is t2 -t6 , then the time variation offset of the interaction between the two nodes is (( t1 -t5 )-(t2 -t6 )), the offset is used for local clock taming, through continuous two-way communication between the master node and the slave node, the time change offset is updated and used for the slave node Time adjustment, so that the time of the slave node is synchronized with the time of the master node.
在另一实施例中,所述从节点包含同步后的从节点或未同步的从节点,例如图3所示,从节点7可以与主节点1交互时间同步信息,还可以与从节点8,从节点9等从节点进行交互时间同步信息,同步后的从节点7节点等级为1,可以向从节点8和从节点11提供时间同步;从节点8根据优选机制将从节点7作为主校准节点,将从节点10作为备份校准节点,同步后的从节点8的节点等级为2,可以向从节点9和从节点12提供时间同步信息;从节点12和从节点11之间被障碍物40阻碍,超宽带无线信号不能穿透,通过自适应分级处理,从节点12根据优选机制,将从节点8作为主校准节点,将从节点9作为备份校准节点,从节点12根据主校准节点的时间信息对本节点时钟进行驯服,完成与从节点8的时间同步,对备份校准节点的时间信息不做处理,当主校准节点出现异常时,才使用备份校准节点的时间信息进行本节点时钟驯服,完成与从节点9的时间同步。当从节点12完成时间同步后,从节点12的节点等级为3;当从节点12无法接受到从节点8的信息时,从节点12的主校准节点切换为从节点9,节点等级变为4,同步后的从节点12可以向从节点16提供时间同步信息;以此类推,直到所有的从节点完成时间同步和节点等级分配。进而提高从节点布置灵活性。In another embodiment, the slave node includes a synchronized slave node or an unsynchronized slave node. For example, as shown in FIG. Slave node 9 and other slave nodes exchange time synchronization information, and the synchronized slave node 7 has a node level of 1, which can provide time synchronization to slave node 8 and slave node 11; slave node 8 uses slave node 7 as the master calibration node according to the preferred mechanism , the slave node 10 is used as a backup calibration node, and the node level of the synchronized slave node 8 is 2, which can provide time synchronization information to the slave node 9 and the slave node 12; the slave node 12 and the slave node 11 are blocked by obstacles 40 , UWB wireless signals cannot penetrate, through adaptive hierarchical processing, slave node 12 uses slave node 8 as the master calibration node, slave node 9 as the backup calibration node, and slave node 12 according to the time information of the master calibration node Taming the clock of this node, complete the time synchronization with the slave node 8, do not process the time information of the backup calibration node, when the master calibration node is abnormal, use the time information of the backup calibration node to tame the clock of this node, and complete the synchronization with the slave node The time of node 9 is synchronized. After the slave node 12 completes the time synchronization, the node level of the slave node 12 is 3; when the slave node 12 cannot receive the information of the slave node 8, the master calibration node of the slave node 12 is switched to the slave node 9, and the node level becomes 4 , the synchronized slave node 12 can provide time synchronization information to the slave node 16; and so on until all slave nodes complete time synchronization and node level assignment. In turn, the flexibility of slave node arrangement is improved.
综上,通过本发明提出的基于超宽带无线通信的自适应组网的时间同步系统,打破了有线连接的节点通信系统的局限性,可以随意安置节点的位置,提高了节点布置的灵活性和方便性,提高了时间同步的精度,能应用于多个场景,如隧道、停下停车场和商场等。To sum up, the time synchronization system based on the self-adaptive networking of ultra-broadband wireless communication proposed by the present invention breaks the limitation of the node communication system with wired connection, and the position of nodes can be arranged at will, which improves the flexibility and flexibility of node arrangement. Convenience improves the accuracy of time synchronization and can be applied to multiple scenarios, such as tunnels, parking lots, and shopping malls.
虽然本发明已以较佳实施例揭示如上,然而并非用以限定本发明。任何熟悉本领域的技术人员,在不脱离本发明技术方案范围的情况下,都可利用上述揭示的技术内容对本发明技术方案做出许多可能的变动和修饰,或修改为等同变化的等效实施例。因此,凡是未脱离本发明技术方案的内容,依据本发明技术实质对以上实施例所做的任何简单修改、等同变化及修饰,均应落在本发明技术方案保护的范围内。Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person familiar with the art, without departing from the scope of the technical solution of the present invention, can use the technical content disclosed above to make many possible changes and modifications to the technical solution of the present invention, or modify it into an equivalent implementation of equivalent changes example. Therefore, any simple modifications, equivalent changes and modifications made to the above embodiments according to the technical essence of the present invention shall fall within the protection scope of the technical solution of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911021781.1ACN111107622B (en) | 2019-10-25 | 2019-10-25 | A time synchronization system and method for adaptive networking based on ultra-wideband wireless communication |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911021781.1ACN111107622B (en) | 2019-10-25 | 2019-10-25 | A time synchronization system and method for adaptive networking based on ultra-wideband wireless communication |
| Publication Number | Publication Date |
|---|---|
| CN111107622A CN111107622A (en) | 2020-05-05 |
| CN111107622Btrue CN111107622B (en) | 2023-08-11 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911021781.1AActiveCN111107622B (en) | 2019-10-25 | 2019-10-25 | A time synchronization system and method for adaptive networking based on ultra-wideband wireless communication |
| Country | Link |
|---|---|
| CN (1) | CN111107622B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112969231B (en) | 2019-12-12 | 2025-05-30 | 中磊电子(苏州)有限公司 | Ultra-wideband positioning system, base station, tag and operation method thereof |
| CN112255589B (en) | 2020-09-18 | 2024-01-26 | 中磊电子(苏州)有限公司 | Positioning tag operation method and positioning system operation method |
| CN115580853A (en)* | 2021-02-02 | 2023-01-06 | 华为技术有限公司 | A short distance communication method and device |
| CN114598569B (en)* | 2022-02-25 | 2023-10-03 | 中铁第四勘察设计院集团有限公司 | Network architecture |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104079364A (en)* | 2014-06-19 | 2014-10-01 | 北京航空航天大学 | Distributed real-time test system clock synchronization method |
| CN106162856A (en)* | 2015-03-10 | 2016-11-23 | 邵贵阳 | A kind of node synchronization method in wireless Ad Hoc network |
| CN106455036A (en)* | 2016-09-30 | 2017-02-22 | 南京航空航天大学 | A master-slave synchronization method for wireless network based on directional beam |
| CN108599888A (en)* | 2018-05-09 | 2018-09-28 | 西安电子科技大学 | A kind of distributed network clock synchronizing system |
| CN109819396A (en)* | 2019-01-30 | 2019-05-28 | 北京布科思科技有限公司 | A kind of wireless location method and system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| BR112019009055A2 (en)* | 2016-11-10 | 2019-07-16 | Sony Corp | wireless device, wireless device processing method, and, program. |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104079364A (en)* | 2014-06-19 | 2014-10-01 | 北京航空航天大学 | Distributed real-time test system clock synchronization method |
| CN106162856A (en)* | 2015-03-10 | 2016-11-23 | 邵贵阳 | A kind of node synchronization method in wireless Ad Hoc network |
| CN106455036A (en)* | 2016-09-30 | 2017-02-22 | 南京航空航天大学 | A master-slave synchronization method for wireless network based on directional beam |
| CN108599888A (en)* | 2018-05-09 | 2018-09-28 | 西安电子科技大学 | A kind of distributed network clock synchronizing system |
| CN109819396A (en)* | 2019-01-30 | 2019-05-28 | 北京布科思科技有限公司 | A kind of wireless location method and system |
| Publication number | Publication date |
|---|---|
| CN111107622A (en) | 2020-05-05 |
| Publication | Publication Date | Title |
|---|---|---|
| CN111107622B (en) | A time synchronization system and method for adaptive networking based on ultra-wideband wireless communication | |
| JP6312497B2 (en) | How to cluster nodes in a network | |
| CN108093469B (en) | Distributed access method of wireless transmission system based on TDMA | |
| CN110248416A (en) | A kind of Distributed Dynamic Slot distribution method in remote TDMA mobile ad-hoc network | |
| CN101507200A (en) | TDMA channel access scheduling with neighbor indirect acknowledgment algorithm (nbia) for ad-hoc networks | |
| CN111885694A (en) | Air Ad Hoc Network Time Synchronization System | |
| US10334602B2 (en) | Communications between connected devices | |
| CN108347263B (en) | Frequency hopping communication method based on self-adaptive channel | |
| CN103138828B (en) | Network node clock synchronization and clock synchronous network | |
| US8228845B2 (en) | Sensor node of low power for monitoring application in mesh sensor network using time division access scheme, and routing method thereof | |
| CN109314975A (en) | Method of operation of a communication node in a wireless communication network, associated communication node, communication system and storage system | |
| CN112566237A (en) | Time synchronization method based on multi-node networking | |
| CN101321027A (en) | A Synchronization Method for Wireless Mesh Network | |
| CN105959977A (en) | Hybrid synchronous method in D2D Mesh network including support nodes in scene without honeycomb covering | |
| US9432957B2 (en) | Method and a system for hierarchical time synchronization in an ad-hoc network | |
| CA2859291A1 (en) | Method for transmitting data in a communications network | |
| CN105072586A (en) | Management method for forwarding of broadcast message in embedded wireless ad hoc network | |
| CN114070448B (en) | A Master Clock Selection Method Based on Multiple Attribute Decision Making | |
| CN107995668A (en) | A kind of optimization network-building method of wireless ad hoc network | |
| CN103716106B (en) | Clock synchronization method, system and device | |
| KR101319553B1 (en) | System for relaying data using single channel communications and method thereof | |
| CN101335609A (en) | Method for network clock tracking, network device and network system | |
| CN115278771B (en) | Multi-hop underwater acoustic communication network conflict avoidance time slot allocation method | |
| CN105099646A (en) | Synchronization link determination method and apparatus | |
| CN113678520B (en) | Signaling method for D2D synchronization |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| TA01 | Transfer of patent application right | Effective date of registration:20211119 Address after:410000 4th floor, building 16, phase I, headquarters building, Changsha Zhongdian Software Park, No. 39, Jianshan Road, high tech Development Zone, Changsha City, Hunan Province Applicant after:CHANGSHA TECHNOLOGY RESEARCH INSTITUTE OF BEIDOU INDUSTRY SAFETY Co.,Ltd. Address before:410000 Room 302, 16 Building, Changsha Zhongdian Software Park Phase I, 39 Jianshan Road, Changsha High-tech Development Zone, Hunan Province Applicant before:HUNAN GUOKE DEFENSE ELECTRONIC TECHNOLOGY Co.,Ltd. Applicant before:CHANGSHA TECHNOLOGY RESEARCH INSTITUTE OF BEIDOU INDUSTRY SAFETY Co.,Ltd. | |
| TA01 | Transfer of patent application right | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information | Address after:410000 4th floor, building 16, phase I, headquarters building, Changsha Zhongdian Software Park, No. 39, Jianshan Road, high tech Development Zone, Changsha City, Hunan Province Applicant after:Changsha Beidou Industrial Safety Technology Research Institute Co.,Ltd. Address before:410000 4th floor, building 16, phase I, headquarters building, Changsha Zhongdian Software Park, No. 39, Jianshan Road, high tech Development Zone, Changsha City, Hunan Province Applicant before:CHANGSHA TECHNOLOGY RESEARCH INSTITUTE OF BEIDOU INDUSTRY SAFETY Co.,Ltd. | |
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right | Effective date of registration:20241011 Address after:410205 building 16, phase I, Changsha Zhongdian Software Park, No. 39 Jianshan Road, high tech Development Zone, Changsha, Hunan Province Patentee after:HUNAN MATRIX ELECTRONIC TECHNOLOGY Co.,Ltd. Country or region after:China Patentee after:Changsha Beidou Industrial Safety Technology Research Institute Co.,Ltd. Address before:410000 4th floor, building 16, phase I, headquarters building, Changsha Zhongdian Software Park, No. 39, Jianshan Road, high tech Development Zone, Changsha City, Hunan Province Patentee before:Changsha Beidou Industrial Safety Technology Research Institute Co.,Ltd. Country or region before:China | |
| TR01 | Transfer of patent right | ||
| CP03 | Change of name, title or address | Address after:410205 building 16, phase I, Changsha Zhongdian Software Park, No. 39 Jianshan Road, high tech Development Zone, Changsha, Hunan Province Patentee after:HUNAN MATRIX ELECTRONIC TECHNOLOGY Co.,Ltd. Country or region after:China Patentee after:Changsha Beidou Industry Security Technology Research Institute Group Co.,Ltd. Address before:410205 building 16, phase I, Changsha Zhongdian Software Park, No. 39 Jianshan Road, high tech Development Zone, Changsha, Hunan Province Patentee before:HUNAN MATRIX ELECTRONIC TECHNOLOGY Co.,Ltd. Country or region before:China Patentee before:Changsha Beidou Industrial Safety Technology Research Institute Co.,Ltd. | |
| CP03 | Change of name, title or address |