A method and system for clock synchronization of heterogeneous nodes in digital-realistic fusion testing

By constructing a full physical field model and deep reinforcement learning algorithm, the clock synchronization process is dynamically adjusted, which solves the accuracy and stability problems of clock synchronization in digital-physical fusion testing and achieves high-precision clock synchronization effect.

CN119602904BActive Publication Date: 2025-10-03BEIHANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411753877.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-10-03
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

In existing digital-physical fusion tests, clock synchronization methods are difficult to achieve high-precision and stable synchronization in complex dynamic environments. Especially in digital-physical communication networks, clock synchronization errors are easily affected by network load and environmental disturbances, resulting in unstable communication.

Method used

A deep reinforcement learning algorithm is combined with a full physical field model to build a digital-physical fusion test synchronization network. Through the synchronization error compensation model of deep reinforcement learning, the clock synchronization process is dynamically adjusted to achieve high-precision and stable clock synchronization.

Benefits of technology

In a complex dynamic environment, high-precision clock synchronization of the digital-physical communication network is achieved, which improves the stability and efficiency of synchronization and adapts to the complex scenarios of digital-physical fusion testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119602904B_ABST
    Figure CN119602904B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for clock synchronization of heterogeneous nodes in digital-physical fusion testing, comprising: a digital-physical fusion testing synchronization network, specifically comprising physical communication nodes composed of FPGAs, digital communication nodes based on a clock jump mechanism model, and corresponding communication protocols and clock synchronization protocols; a full physical field digital test environment, specifically comprising a coupling mechanism model of multiple environmental factors affecting clock synchronization, and then constructing a full physical field environment based on the model in a digital test system; a clock synchronization error compensation model based on deep reinforcement learning, specifically comprising a deep reinforcement learning algorithm model, an intelligent agent training strategy, and a reward mechanism. The present invention can achieve high-precision clock synchronization in a digital-physical communication network and effectively support the efficient operation of digital-physical fusion testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of electronic engineering and computer science, and specifically relates to a method and system for clock synchronization of heterogeneous nodes in digital-physical fusion testing. Background Art

[0002] Equipment research and development is a comprehensive project involving multiple disciplines and fields. From design and manufacturing to testing and deployment, each link requires precise calculations and rigorous testing to ensure the performance and safety of the equipment. With the increasing application of digital and intelligent technologies, the integration of digital testing and physical testing has become a major development trend. Digital-physical fusion testing further emphasizes the integration of physical testing and digital testing based on semi-physical simulation. While fully considering the influence of environmental factors, it constructs a full physical field test environment and a multi-dimensional precise scene-object model. During the testing process, it focuses on the fusion analysis of physical test data and digital test data to further improve test accuracy and reliability.

[0003] Digital-physical convergence testing requires data communication between the digital and physical domains. The interconnection between digital and physical communication nodes creates a digital-physical communication network. This presupposes high consistency between the digital and physical domains, and clock synchronization is a crucial foundation for ensuring this consistency. Clock synchronization of digital and physical nodes involves synchronizing the clocks of digital and physical nodes to facilitate data transmission and synchronous processing. The primary parameter for evaluating clock synchronization in network nodes is clock synchronization accuracy, i.e., the deviation between the clocks of different nodes in the network. This can affect network functions such as data transmission and event triggering. Therefore, reducing or compensating for network clock synchronization errors is a key issue in improving network node synchronization performance. Currently, most network clock synchronization methods can be broadly categorized as hardware-based or software-based. Hardware-based methods achieve synchronization by installing dedicated synchronization equipment or using high-precision clock sources in the network, but these methods are costly and lack scalability. Software-based methods improve clock synchronization accuracy by running synchronization protocols in the network. Typical examples include IEEE 1588, AS6802, and IEEE802.1AS. The basic idea behind these clock synchronization protocols is to calculate or select one node as the master clock and the other nodes as slave clocks. By transmitting synchronization frames carrying the clocks, the slave clock values ​​are corrected to the master clock value, thereby achieving master-slave clock synchronization. This method is currently widely used in aerospace, automotive, and industrial fields.

[0004] The clock synchronization protocol first counts the clock error values ​​between nodes, and then generates corresponding compensation values ​​to synchronize the master and slave clocks. One-time clock compensation is usually called "hard synchronization", which is prone to clock jumps, which can lead to information leakage or retransmission. The corresponding clock compensation is dispersed over multiple periods and is called "soft synchronization". It can achieve clock synchronization to a certain extent while avoiding clock jumps and maintaining communication stability. Digital-physical fusion testing usually causes a large network load, and "soft synchronization" requires frequent clock calibration. The synchronization efficiency will decrease as the network load increases. In addition, since the scenarios of digital-physical fusion testing are often in a changing process, the dynamic test environment and uncontrollable environmental disturbances will have a significant impact on clock synchronization. Therefore, it is necessary to find a high-precision clock synchronization method that can effectively cope with complex dynamic test environments. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method and system for clock synchronization of heterogeneous nodes in digital-physical fusion testing, which can achieve high-precision clock synchronization of digital-physical communication networks in digital-physical fusion testing.

[0006] The present invention solves the technical problem by adopting the following technical solution: a method for clock synchronization of heterogeneous nodes in digital-real fusion testing, comprising the following steps:

[0007] Step 1: Build a digital-physical fusion test synchronization network for data exchange between digital nodes and physical nodes. The digital-physical fusion test synchronization network consists of digital nodes, physical nodes, and corresponding communication protocols and clock synchronization protocols.

[0008] Step 2: Build a full-physics digital test environment, including a coupling mechanism model of multiple environmental factors that affect clock synchronization. This model is then used to build a full-physics digital test environment. This environment is used to simulate the actual operating environment of the equipment with high fidelity and provide a training environment for deep reinforcement learning.

[0009] Step 3: Deploy a synchronization error compensation model based on deep reinforcement learning, including a deep reinforcement learning algorithm model, an agent training strategy, and a reward mechanism; this is used to further compensate for clock deviations caused by the environment, thereby achieving high-precision clock synchronization.

[0010] The present invention also provides a clock synchronization system for heterogeneous nodes in a digital-physical fusion test, comprising:

[0011] Construct a digital-physical fusion test synchronization network for data exchange between digital nodes and physical nodes. The digital-physical fusion test synchronization network consists of digital nodes, physical nodes, and corresponding communication protocols and clock synchronization protocols.

[0012] A full-physics digital test environment, including a coupling mechanism model of multiple environmental factors affecting clock synchronization, is constructed based on this model. This environment is used to simulate the actual operating environment of high-fidelity equipment and provides a training environment for deep reinforcement learning.

[0013] The synchronization error compensation model, including the deep reinforcement learning algorithm model, the agent's training strategy and reward mechanism, is used to further compensate for the clock deviation caused by the environment, thereby achieving high-precision clock synchronization.

[0014] The advantages of the present invention compared with the prior art are:

[0015] (1) By modeling the digital communication nodes in the digital-physical fusion test and integrating the full physical field influence mechanism, a composite calculation model for the communication node clock value is proposed.

[0016] (2) A clock synchronization error compensation method considering network load is proposed. The synchronization period and transmission period are dynamically divided according to the load situation to ensure the normal transmission of data during the synchronization process.

[0017] (3) A clock synchronization method based on deep reinforcement learning is proposed to achieve high-precision synchronization between digital nodes and physical nodes. In addition, this method has strong stability in complex dynamic environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a flowchart of a method for clock synchronization of heterogeneous nodes in a digital-real fusion test according to the present invention. DETAILED DESCRIPTION

[0019] In order to make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other. To achieve the above-mentioned objectives, the present invention adopts the following technical solutions.

[0020] The present invention will be described in further detail below with reference to the accompanying drawings.

[0021] The present invention relates to a method for clock synchronization of heterogeneous nodes in digital-physical fusion testing. The method is implemented using an FPGA chip and Unity software, and includes constructing a digital-physical fusion testing synchronization network, constructing a full-physical field digital test scenario, and deploying a synchronization error compensation model based on deep reinforcement learning. The present invention is capable of improving the accuracy of clock synchronization and stability in complex dynamic environments for digital-physical communication network clock synchronization in digital-physical fusion testing of complex equipment in various fields. This method can achieve high-precision clock synchronization of digital-physical communication networks in digital-physical fusion testing of complex equipment in complex dynamic environments.

[0022] The structural diagram of the present invention is as follows Figure 1 As shown, the specific implementation is as follows: A method for clock synchronization of heterogeneous nodes in digital-realistic fusion testing, comprising:

[0023] Step 1: Build a data-real integration test synchronization network. The specific contents are as follows:

[0024] The digital-physical fusion test synchronization network consists of digital nodes, physical nodes, and corresponding communication protocols and clock synchronization protocols. The physical nodes are FPGA-based communication nodes that can perform TCP / UDP communication. The digital nodes are virtual communication nodes built in Unity software. These nodes have communication functions and clock transition simulation functions. The clock transition model format for the digital nodes is as follows:

[0025] ,

[0026] in, is the clock value, is the instantaneous operating frequency of the crystal oscillator, is the initial operating frequency of the crystal oscillator, is the running time, is the initial phase difference, The instantaneous operating frequency of the crystal oscillator is It can be represented by the average value of the crystal oscillator frequency over a period of time. Physical nodes and digital nodes are interconnected to form a digital-physical communication network.

[0027] To achieve clock synchronization, a clock synchronization protocol must be implemented within the digital-physical communication network. The AS6802 clock synchronization protocol uses the physical clock as the master clock. When data frames carrying the physical clock value are transmitted to the digital clock, the digital clock parses and modifies its own local clock, thus achieving clock synchronization between digital-physical nodes and forming a synchronized network for digital-physical converged testing.

[0028] Step 2: Build a full physical field digital test environment. The specific process is as follows:

[0029] In addition to restoring the operating environment of the digital-realistic communication network, it is also necessary to construct various mechanism models that affect the operation of the crystal oscillator of the communication node, thereby forming a multi-dimensional physical simulation field and coupling the influencing mechanism models of the physical field. By coupling, three types of physical fields that affect the operation of the crystal oscillator are constructed: temperature field, electromagnetic field, and noise field. The influencing mechanisms of the three types of physical fields are analyzed, and a composite mechanism model of the crystal oscillator operating frequency is constructed as follows:

[0030] ,

[0031] in, is the average value of the clock frequency, for The clock deviation value caused by temperature, Clock frequency deviation caused by electromagnetic fields.

[0032] The correlation between clock frequency deviation and temperature can be expressed as a quadratic function:

[0033] ,

[0034] In the above formula for The clock deviation value generated under temperature, for Clock deviation value under temperature, for The temperature value of the network temperature field at the moment, is a constant that depends on the physical properties of the crystal, The typical range of is 25℃±5℃, and the typical value of k is about -0.04ppm / ℃. In form, k and With the following constraints:

[0035] ,

[0036] in, and yes The lower and upper bounds of .

[0037] In addition to the temperature field, the electromagnetic field generated by voltage changes in the communication network will also have a certain impact on the crystal oscillator frequency. This clock deviation can be fitted by linear regression to obtain the following function:

[0038] ,

[0039] In the above formula, and is the continuous voltage value within a certain period of time, is the voltage value at time t, and there exists , for Clock deviation value under voltage, and They are and The clock deviation value under voltage. In terms of noise interference, the noise interference can be treated as normal distribution.

[0040] The present invention further divides the compensation period and the operating period based on the synchronization cycle. The compensation period is used to perform "soft compensation" for the clock synchronization deviation of the logarithmic real nodes, and the operating period is used to transmit network data without clock synchronization. The length of the compensation period can be divided according to the degree of network load. When the network load is large, the compensation period is shortened to allow more time for data transmission and avoid data congestion. The load can be estimated as follows: before the current synchronization, The traffic load in one time period can be used to approximate the traffic load in the next time period. The traffic load in the near future can be estimated by taking a weighted average of the traffic loads in each interval, as shown in the following formula. Although the prediction is linear, it has been proven to be very effective in related studies and has high computational efficiency.

[0041] ,

[0042] in, Indicates the past The traffic load in a time interval, As a weight factor, according to experience, Assigning the largest weight 0.4, The second-largest weight is 0.2. All other factors share the remaining 0.4. The system divides the operating time periods into higher and lower proportions based on traffic load. The clock deviation for the next synchronization cycle is predicted in the previous synchronization cycle. This deviation is then soft-compensated during the compensation period of the next synchronization cycle, achieving higher clock synchronization accuracy.

[0043] Taking all the above mechanism models into consideration and integrating the above formulas, the clock calculation formula of the network clock model of the present invention can be obtained as follows:

[0044] , ,

[0045] , ,

[0046] In the above formula, is the clock value at the initial moment, is the noise value, is the number of current synchronization cycles, for The clock value predicted at the moment, for The clock value measured at the moment, is the length of the compensation period in the nth synchronization cycle and has the following relationship with the estimated network load The above mechanism model is constructed in the Unity environment, and the clock calculation formula is used as a composite mechanism model to further form a training environment for reinforcement learning.

[0047] Step 3: Deploy the synchronization error compensation model based on deep reinforcement learning. The process is as follows:

[0048] First, it is necessary to analyze the network status of the digital communication network, further configure the properties of the digital nodes, and combine the training environment and network clock model constructed in step 2 to train the reinforcement learning model of clock synchronization. This method uses the PPO algorithm in deep reinforcement learning to predict the clock synchronization value, uses the digital clock as the agent, and conducts deep reinforcement learning training in the constructed digital communication network operating environment. For the digital communication node, the state value that needs to be observed Digital node clock status , physical node clock status , the clock deviation value of the real node ,Right now , the state value The input is fed into the Critic network and the Actor network for training. The Critic network generates an evaluation value for updating the Actor network. The Actor network generates an action value and acts on the environment. For the digital-real communication network, each slave clock is an intelligent agent. The action value in each time slot t under the state value S is the compensation value of the synchronization error of each node. These actions can be expressed as The actions of multiple agents are defined as , thus forming an action space. The agent derives a reward value based on the effect of the compensation value combined with the reward mechanism, and further drives the training process of the AC network to learn in the direction of maximizing the reward value.

[0049] Designing an ideal reward policy is a key aspect of modeling reinforcement learning problems, as it directly impacts the agent's training success. The reward function evaluates the agent's decision-making ability; that is, it measures how well the chosen actions compensate for clock bias. Furthermore, the reward function is used to modify the policy to achieve the objective function. When the problem under study has a single objective, the reward formulation is simplified, and its formulation is similar to that of the objective function in typical optimization problems.

[0050] After executing a compensation value, the agent transitions to the next state , get instant rewards . In order to maximize the efficiency of the system, the first factor that needs to be considered in the reward mechanism during training is the synchronization error value after node compensation, that is, the synchronization error value after the agent compensates the node once. The second point is the compensation time, that is, the time required for the agent to complete a synchronization error compensation. The third point is the compensation rate. The present invention sets a time window during the training process, counts the number of effective compensations and the number of all compensation actions within the time window, and defines the ratio of the two as the compensation rate. The reward value is set to train the agent in the direction of smaller synchronization error value after compensation, shorter compensation time, and larger compensation rate. Then the reward of multiple agents is defined as Each agent can make decisions based on the network information and knowledge of the consensus process to determine the optimal strategy:

[0051] ,

[0052] ,

[0053] In the above formula is the reward value of algorithm training, t is the training time, is the clock deviation value, is the action at the current moment, Temperature The deviation of the clock frequency caused by is the deviation of the clock frequency caused by the electromagnetic field, is the frequency of the initial state, is the clock value at the initial moment, is the network noise value, is the clock synchronization period, The threshold range for clock synchronization accuracy is set. Based on the above configuration and the PPO algorithm, each network node is abstracted into an intelligent agent. During the pre-training phase, the agent interacts with the simulation environment through trial and error. The agent is continuously trained and optimized based on the decision results and rewards obtained. In the simulation environment, the agent randomly executes actions based on the probability distribution of the action space. The trained agent is then deployed into the system and used to guide multiple agents to complete synchronization error compensation. During each clock synchronization protocol, the synchronization difference is superimposed on the predicted clock deviation, thereby achieving high-precision clock synchronization.

[0054] In summary, the present invention discloses a method and system for clock synchronization of heterogeneous nodes in digital-physical fusion testing, including constructing a digital-physical fusion test synchronization network, building a full-physical field digital test environment, and deploying clock synchronization error compensation based on deep reinforcement learning. This method can improve the synchronization accuracy and stability of digital-physical communication networks in complex dynamic environments, effectively supporting the results of digital-physical fusion testing.

[0055] The contents not described in detail in the specification of the present invention belong to the prior art known to those skilled in the art.

[0056] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A method for clock synchronization of heterogeneous nodes in digital-realistic fusion testing, characterized in that: The following steps are involved: Step 1: Build a digital-physical fusion test synchronization network for data exchange between digital nodes and physical nodes. The digital-physical fusion test synchronization network consists of digital nodes, physical nodes, and corresponding communication protocols and clock synchronization protocols. Step 2: Build a full-physics digital test environment, including a coupling mechanism model of multiple environmental factors that affect clock synchronization. This model is then used to build a full-physics digital test environment. This environment is used to simulate the actual operating environment of the equipment with high fidelity and provide a training environment for deep reinforcement learning. Step 3: Deploy a synchronization error compensation model based on deep reinforcement learning, including a deep reinforcement learning algorithm model, an agent training strategy, and a reward mechanism; this is used to further compensate for clock deviations caused by the environment, thereby achieving high-precision clock synchronization.

2. A method for clock synchronization of heterogeneous nodes in a digital-realistic fusion test according to claim 1, characterized in that: The specific contents of step one are as follows: The physical node is an FPGA-based communication node that performs TCP / UDP communication. The digital node is a virtual communication node built in Unity software. This node has communication functions and clock transition simulation functions. The format of setting the clock transition model of the digital node is as follows: , in, is the clock value, is the instantaneous operating frequency of the crystal oscillator, is the initial operating frequency of the crystal oscillator, is the running time, is the initial phase difference, is noise interference, where the crystal oscillator operating frequency is It can be represented by the average value of the crystal oscillator frequency over a period of time; physical nodes and digital nodes are interconnected to form a digital-physical communication network; a clock synchronization protocol is run in the digital-physical communication network, and the AS6802 clock synchronization protocol is selected as the protocol, with the physical clock as the master clock. When the data frame with the physical clock value is transmitted to the digital clock, the digital clock parses and modifies its own local clock, thereby realizing the clock synchronization function of the digital-physical node, and then forming a digital-physical fusion test synchronization network.

3. A method for clock synchronization of heterogeneous nodes in a digital-realistic fusion test according to claim 2, characterized in that: The specific contents of step 2 are as follows: Various mechanism models that affect the operation of the communication node crystal oscillator are constructed to form a multi-dimensional physical simulation field. The influencing mechanism models of the physical fields are coupled with each other. Through coupling, three types of physical fields that affect the operation of the crystal oscillator are constructed: temperature field, electromagnetic field, and noise field. The influencing mechanisms of the three types of physical fields are analyzed, and a composite model of the temperature field on the crystal oscillator operating frequency is constructed as follows: , in, is the average value of the clock frequency, Temperature The clock frequency deviation caused by Clock frequency deviation caused by electromagnetic fields; The load estimation is done as follows: The traffic load in the previous time period is used to obtain the traffic load in the next time period. The traffic load of each interval is weighted averaged to estimate the recent traffic load: , in, Indicates the past The traffic load in a time interval, is a weight factor; Taking all the above mechanism models into consideration and integrating the above formulas, the clock calculation formula of the network clock model is as follows: , , , , In the above formula, is the clock value at the initial moment, is the noise value, is the number of current synchronization cycles, for The clock value predicted at the moment, for The clock value measured at the moment, is the length of the compensation period in the nth synchronization cycle, and has the following relationship with the estimated network load .

4. A method for clock synchronization of heterogeneous nodes in a digital-realistic fusion test according to claim 3, characterized in that: The specific contents of step three are as follows: The PPO algorithm in deep reinforcement learning is used to predict the clock synchronization value. The digital clock is used as the agent and deep reinforcement learning training is performed in the constructed digital-physical communication network operation environment. For the digital-physical communication node, the state values ​​that need to be observed are the digital node clock state, the physical node clock state, and the clock deviation value of the digital-physical node, that is, , the state space is input into the AC network for training, the Critic network generates the index evaluation value to update the Actor network, the Actor network generates the action value and acts on the environment. For the digital real communication network, each slave clock is an intelligent agent, and the action value in each time slot t under the state S is the compensation value of the synchronization error of each node. These actions are expressed as The actions of multiple agents are defined as , and then form an action space, and use the compensated deviation value as the observation vector to assign a reward value or a penalty value to the agent. This iteration is used to train the agent to predict the clock deviation value of the next synchronization cycle. Each time the clock synchronization protocol generates a synchronization difference, the predicted value of the clock deviation is superimposed, thereby achieving high-precision clock synchronization; The reward of the multi-agent is defined as , each agent can make decisions based on the network information and knowledge of the consensus process to determine the optimal strategy: , , In the above formula is the reward value of algorithm training, t is the training time, is the clock deviation value, is the action at the current moment, Temperature The deviation of the clock frequency caused by is the deviation of the clock frequency caused by the electromagnetic field, is the frequency of the initial state, is the clock value at the initial moment, is the network noise value, is the clock synchronization period, Set the clock synchronization accuracy threshold range.

5. A clock synchronization system for heterogeneous nodes in digital-realistic fusion testing, characterized in that: include: Construct a digital-physical fusion test synchronization network for data exchange between digital nodes and physical nodes. The digital-physical fusion test synchronization network consists of digital nodes, physical nodes, and corresponding communication protocols and clock synchronization protocols. A full-physics digital test environment, including a coupling mechanism model of multiple environmental factors affecting clock synchronization, is constructed based on this model. This environment is used to simulate the actual operating environment of high-fidelity equipment and provides a training environment for deep reinforcement learning. The synchronization error compensation model, including the deep reinforcement learning algorithm model, the agent's training strategy and reward mechanism, is used to further compensate for the clock deviation caused by the environment, thereby achieving high-precision clock synchronization.

Citation Information

Patent Citations

  • Multi-sample cross-stage collaborative operation method for data-real fusion test

    CN117993255A

  • Method for constructing tested object capability evaluation model in digital-real fusion test

    CN118035057A