A time-sensitive network-oriented chip hardware-assisted clock synchronization method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHANGZHOU LINGDONG XINGUANG TECH CO LTD
- Filing Date
- 2026-07-13
- Publication Date
- 2026-08-07
AI Technical Summary
当网络负载发生波动时,业务帧在节点缓存队列中产生排队等待,导致链路传输时延发生抖动,常规卡尔曼滤波模型依赖固定的过程噪声参数运行,其输出的相位补偿指令仅能跟随已发生的时延偏差进行滞后调整
[0016]1. This method dynamically binds the clock synchronization period with the time-division multiplexing (TDD) time slot scheduling period. By using time slot boundaries as constraints in nonlinear model predictive control and combining the graph topology spatial correlation features extracted by graph convolutional networks to transform them into explicit inequality constraints, the probability of time slot overlap between synchronization frames and high-priority service frames is limited. An adaptive unscented Kalman filter model is used to jointly estimate delay jitter and crystal frequency drift. The generated predictive control sequence is then computed in parallel as a phase compensation command and sent to the digitally controllable oscillator, reducing the response delay of the hardware compensation logic. This allows the transmission of clock synchronization frames to adapt to time slot boundary constraints, avoiding transmission conflicts between synchronization frames and service frames.
Smart Images

Figure CN122533693A_ABST
Abstract
Description
Technical Field
[0001] This invention discloses a chip hardware-assisted clock synchronization method for time-sensitive networks, which relates to the field of time-sensitive network chip design technology. Background Technology
[0002] Existing chip-based hardware-assisted clock synchronization methods in time-sensitive networks (TSNs) record frame transmission and reception times by setting up hardware timestamp latch units at the physical layer interface. The latched data is then input into a conventional Kalman filter model to estimate the link delay and crystal oscillator frequency deviation. Based on the estimation results, a phase compensation command is generated and sent to a digitally controlled oscillator (DCO). At the time-division multiplexing (TDM) layer, network nodes use fixed-period time slot scheduling, with the transmission period of synchronization frames independent of the time slot scheduling period, and static guard intervals set between frames. When network load fluctuates, service frames queue in the node buffer queue, causing jitter in link transmission delay. The conventional Kalman filter model relies on fixed process noise parameters, and its output phase compensation command can only adjust lagively according to the already occurred delay deviation.
[0003] In the above conventional scheme, the clock synchronization mechanism and the time-division multiplexing time slot scheduling are decoupled. When network load fluctuations cause sudden jitter in link delay, the clock compensation command based on fixed parameters has a response lag, causing the transmission time of the synchronization frame to deviate from the preset time slot boundary, resulting in transmission conflicts between the synchronization frame and the service frame on the time-division multiplexing link, leading to clock synchronization interruption. Summary of the Invention
[0004] The purpose of this invention is to provide a solution that can effectively address the problems described in the background section.
[0005] To achieve the above objectives, the technical solution adopted by this invention is as follows: a chip hardware-assisted clock synchronization method for time-sensitive networks, comprising: performing hardware timestamp latching of frame transmission and reception times at the physical layer interface of the time-sensitive network node; inputting the latched data into an adaptive unscented Kalman filter model to perform joint state estimation of link transmission delay jitter and crystal oscillator frequency drift; inputting the state parameters into a nonlinear model predictive control model, using the time slot boundary of time division multiplexing as a constraint condition, generating a predictive control sequence for crystal oscillator phase compensation, and dynamically binding the clock synchronization period with the time slot scheduling period of time division multiplexing; parallel computing of the predictive control sequence to generate phase compensation instructions, and sending them to a digitally controllable oscillator; and dynamically adjusting the guard interval and time slot allocation weight of the time division multiplexing frame according to the synchronization accuracy state.
[0006] Preferably, before completing the joint state estimation, the method further includes: constructing a Markov decision process to characterize the network state transition; using the process noise covariance matrix and measurement noise covariance matrix of the adaptive unscented Kalman filter model as the action space; using the minimization of the mean square error of the state estimation residual as the reward function; and using a deep deterministic policy gradient method to interact with the adaptive unscented Kalman filter model to output the optimal noise covariance matrix configuration parameters under the current network load environment, thereby completing the online dynamic adjustment of the parameters of the adaptive unscented Kalman filter model.
[0007] Preferably, the time slot boundary of time-division multiplexing is used as a constraint condition, including: constructing a graph topology structure containing time-sensitive network nodes and service flow links, taking the node buffer queue length and link historical delay jitter as node features and edge features, and extracting spatial correlation features in the graph topology structure through a graph convolutional network; inputting the spatial correlation features into a nonlinear model predictive control model, transforming them into explicit inequality constraints in time slot scheduling, so as to limit the probability of time slot overlap between synchronous frames and high-priority service frames during the predictive control sequence generation process.
[0008] Preferably, the joint state estimation of link transmission delay jitter and crystal oscillator frequency drift includes: introducing a network calculus deterministic queuing model to establish the arrival curve and service curve of the link buffer traffic, and calculating the maximum queuing delay analytical bound caused by burst traffic; incorporating the maximum queuing delay analytical bound as prior knowledge into the state update equation of the adaptive unscented Kalman filter model, and performing analytical correction on the delay jitter state components in the state transition matrix.
[0009] Preferably, generating the predictive control sequence for crystal oscillator phase compensation includes: collecting multiple sets of crystal oscillator frequency drift data at different ambient temperatures to construct a source domain dataset, and extracting online drift data at the current operating temperature to construct a target domain dataset; aligning the source domain dataset and the target domain dataset using the maximum mean difference method, and training the crystal oscillator drift prediction model in a common feature space; using the output of the crystal oscillator drift prediction model as a feedforward compensation term for the nonlinear model predictive control model to correct the phase deviation of the predictive control sequence under dynamic temperature changes.
[0010] Preferably, the online dynamic adjustment of the adaptive unscented Kalman filter model parameters includes: pre-training the deep deterministic policy gradient method using a model-independent meta-learning method, performing policy gradient updates under various historical typical network load distributions, and obtaining the initial policy network parameters; in the online dynamic adjustment stage, based on a small number of interaction samples under the current load environment, performing a one-step gradient descent on the initial policy network parameters, and quickly outputting the noise covariance matrix configuration parameters corresponding to the current scenario.
[0011] Preferably, the spatial correlation features in the graph topology are extracted, including: embedding a spatiotemporal multi-head attention mechanism in the graph convolutional network, assigning adaptive weights to the spatial dependencies of different nodes in the graph topology, and performing sequential aggregation of the spatial correlation features at multiple historical moments along the time dimension; using the aggregated spatiotemporal feature vector as the dynamic penalty weight of the time slot boundary constraints in the nonlinear model prediction control model, and adjusting the strictness of the time slot boundary constraints of different nodes according to the spatiotemporal feature vector.
[0012] Preferably, the predictive control sequence for generating crystal oscillator phase compensation further includes: constructing a Lyapunov energy function for clock synchronization error based on the analytically corrected time delay jitter state components; during the rolling optimization solution of the nonlinear model predictive control model, using the derivative of the Lyapunov energy function being less than zero as an additional inequality constraint, and performing feasibility trimming on the solved predictive control sequence to eliminate control quantities that cause clock synchronization error divergence.
[0013] Preferably, correcting the phase deviation of the predictive control sequence under dynamic temperature change scenarios includes: mapping the feedforward compensated phase residual sequence to a high-dimensional regenerating kernel Hilbert space; performing nonlinear regression prediction on the phase residual sequence in the high-dimensional regenerating kernel Hilbert space using the kernel minimum mean square error method; and superimposing the residual change trend obtained from the nonlinear regression prediction as a feedback correction amount onto the feedforward compensation term to perform secondary calibration on the predictive control sequence output by the nonlinear model predictive control model.
[0014] Preferably, dynamically adjusting the guard interval and time slot allocation weights of time-division multiplexed frames includes: constructing a multi-objective optimization model with the dual optimization objectives of maximizing clock synchronization accuracy and maximizing end-to-end throughput of service frames, and with time slot boundaries limited by dynamic penalty weights as constraints; solving the multi-objective optimization model using a non-dominated sorting genetic algorithm to obtain the Pareto optimal solution set of guard interval and time slot allocation weights; and selecting the corresponding combination of guard interval and time slot allocation weights from the Pareto optimal solution set for distribution based on the current traffic scheduling requirements of the time-sensitive network.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0016] 1. This method dynamically binds the clock synchronization period with the time-division multiplexing (TDD) time slot scheduling period. By using time slot boundaries as constraints in nonlinear model predictive control and combining the graph topology spatial correlation features extracted by graph convolutional networks to transform them into explicit inequality constraints, the probability of time slot overlap between synchronization frames and high-priority service frames is limited. An adaptive unscented Kalman filter model is used to jointly estimate delay jitter and crystal frequency drift. The generated predictive control sequence is then computed in parallel as a phase compensation command and sent to the digitally controllable oscillator, reducing the response delay of the hardware compensation logic. This allows the transmission of clock synchronization frames to adapt to time slot boundary constraints, avoiding transmission conflicts between synchronization frames and service frames.
[0017] 2. Under non-stationary network load conditions, a Markov decision process is constructed, and the noise covariance matrix parameters of the adaptive unscented Kalman filter model are adjusted online using a deep deterministic policy gradient method. Combined with model-independent element learning, this accelerates the convergence of the policy network and shortens the convergence time of state estimation under burst traffic. A network calculus queuing model is introduced to obtain the maximum queuing delay analytical bound and correct the state update equation, suppressing disturbances from non-Gaussian burst traffic. In temperature-changing scenarios, the maximum mean difference is used to align the source and target domain distributions to obtain feedforward compensation terms. A kernel minimum mean square error method in a high-dimensional regenerative kernel Hilbert space is then used for residual secondary calibration, improving the adaptability of the crystal oscillator phase compensation sequence to environmental changes. Lyapunov energy function-constrained rolling optimization ensures the asymptotic stability of the control sequence. A non-dominated sorting genetic algorithm is used to solve the bi-objective optimization model, enabling the guard interval and time slot allocation weights to adapt to the dynamic requirements of clock synchronization accuracy and service throughput. Attached Figure Description
[0018] Figure 1 This is the main flowchart of the hardware timestamp latch and AUKF joint state estimation of the present invention.
[0019] Figure 2 This is a diagram showing the adaptive adjustment of AUKF noise parameters using DDPG and MAML according to the present invention.
[0020] Figure 3 This invention uses graph convolution and spatiotemporal attention to extract topological feature maps.
[0021] Figure 4 This invention uses network calculus and Lyapunov constraint NMPC diagrams.
[0022] Figure 5 This is a diagram showing the temperature-adaptive crystal oscillator drift feedforward and feedback compensation of the present invention.
[0023] Figure 6 This is a diagram showing the dual-objective optimized time slots and protection intervals of the NSGA-II invention. Detailed Implementation
[0024] Example 1: Refer to Appendix Figure 1 When a synchronization frame is transmitted and received through the physical layer interface, the hardware timestamp latching unit performs hardware timestamp latching for the frame transmission and reception times. Specifically, when the preamble and Start Frame Delimiter (SFD) of a PTP synchronization frame conforming to the IEEE 802.1AS standard pass through the reception path of the physical layer interface, the hardware timestamp latching unit immediately latches the current count value of the node chip's local clock counter at the moment it detects the rising edge of the last bit of the SFD, using it as the hardware timestamp for the reception time of the synchronization frame. When the SFD of the synchronization frame passes through the transmission path of the physical layer interface, the hardware timestamp latch unit latches the current count value of the local clock counter at the moment it detects the rising edge of the last bit of the SFD, and uses it as the hardware timestamp of the transmission time of the synchronization frame. The hardware timestamp has a bit width of 64 bits, with the high 32 bits representing seconds and the low 32 bits representing nanoseconds. The latch trigger delay is less than 1ns, eliminating software timestamp jitter caused by the media access control layer and protocol stack processing.
[0025] The latched hardware timestamp data is input into the Adaptive Unscented Kalman Filter (AUKF) model to complete the joint state estimation of link transmission delay jitter and crystal oscillator frequency drift. First, the system joint state vector at time k in the discrete time domain is constructed:
[0026]
[0027] in, The phase deviation of the local clock relative to the master clock at time k is expressed in seconds. The frequency drift of the local crystal oscillator relative to the master clock at time k is expressed in seconds (s / s). The nominal one-way delay of the link transmission at time k is expressed in seconds. Let be the jitter of the link transmission delay at time k, expressed in seconds.
[0028] Construct the discrete state transition equations of the system:
[0029]
[0030] Wherein, the state transition matrix It is a 4×4 matrix, specifically in the form of:
[0031]
[0032] The sampling period for clock synchronization is the time interval between two consecutive transmissions and receptions of synchronization frames, measured in seconds. Let be the process noise vector, with a mean of 0 and a covariance matrix of... Gaussian distribution, It is a 4×4 process noise covariance matrix.
[0033] The measurement vector and measurement equation are constructed based on the latched hardware timestamp, and the measured value is... for:
[0034]
[0035] in, Let be the forwarding processing delay from the slave node to the master node at time k-1, which is a known fixed hardware processing delay in seconds. The measurement equation is:
[0036]
[0037] Among them, the measurement matrix It is a 1×4 row vector. ; To measure the noise, it follows a mean of 0 and a covariance matrix of... Gaussian distribution, It is a 1×1 measurement noise covariance matrix.
[0038] The AUKF model performs sigma point sampling, time updates, and measurement updates through unscented transformation, and outputs the joint posterior state estimate at time k. This completes the joint state estimation of link transmission delay jitter and crystal oscillator frequency drift.
[0039] The state parameters obtained from the joint state estimation are input into the Nonlinear Model Predictive Control (NMPC) model. Using the time slot boundaries of the Time Divider (TDM) as constraints, a predictive control sequence for crystal oscillator phase compensation is generated, and the clock synchronization period is dynamically bound to the TDM time slot scheduling period. The specific implementation of this dynamic binding is as follows: the TDM time slot scheduling period is... , synchronize clock cycle Set as Integer multiples of, i.e. , where N is a positive integer. The value of N is dynamically adjusted according to the service cycle requirements of TDM time slot scheduling to ensure that the transmission time of the synchronization frame is always within the preset synchronization time slot of the TDM scheduling cycle.
[0040] The prediction time domain of the NMPC model is Control time domain is ,and Define control variables This represents the frequency adjustment amount issued to the DCO, in Hz. A nonlinear prediction model for the clock phase is constructed, based on the output of the joint state estimation. Predicting the future The state at each moment:
[0041]
[0042] in, The control input matrix is a 4×1 vector. ; This is the control quantity predicted at time k+i-1 from time k.
[0043] Construct the optimization objective function for NMPC:
[0044]
[0045] in, As the reference state vector, , This is the nominal value of the link's nominal delay; The state weight matrix is a 4×4 diagonal matrix, with the diagonal elements corresponding to the weights of phase, frequency drift, nominal delay, and delay jitter. The control increment weight matrix is a 1×1 matrix; This is to control the increment of the quantity.
[0046] Using the TDM time slot boundaries as constraints, an explicit inequality constraint is constructed: the transmission time of the synchronization frame must be within the upper and lower boundaries of the TDM synchronization time slot, i.e.:
[0047]
[0048] in, This is the start time of the synchronization time slot. This is the end time of the synchronization time slot. This is the guard interval for the TDM frame. This constraint is then transformed into an explicit inequality constraint on the phase offset:
[0049]
[0050] in, and The upper and lower limits of the phase deviation are calculated from the TDM time slot boundary and are used to limit the probability of time slot overlap between the synchronization frame and the high-priority service frame during the predictive control sequence generation process.
[0051] By solving the constrained quadratic programming problem using rolling optimization, the predictive control sequence in the control time domain is obtained. .
[0052] The hardware-accelerated computing core utilizes a parallel instruction generation unit to perform parallel computation of the predictive control sequence to generate phase compensation instructions, which are then sent to the DCO. The parallel instruction generation unit employs multi-channel parallel computing logic to process each control variable in the predictive control sequence. An independent computing channel is allocated to perform parallel computation of the corresponding DCO phase compensation instructions, with a computation delay of less than one local clock cycle. The mapping relationship between the DCO frequency adjustment word and the control quantity is as follows:
[0053]
[0054] in, This is the digital control code corresponding to the nominal frequency of the DCO. This represents the frequency adjustment sensitivity of the DCO, measured in Hz / code, and is a pre-calibrated hardware parameter.
[0055] The phase compensation instruction of the first control cycle is immediately sent to the control register of the DCO, and subsequent instructions are stored in the on-chip FIFO cache and automatically loaded when the corresponding control cycle arrives.
[0056] The guard interval and time slot allocation weights of TDM frames are dynamically adjusted based on the synchronization accuracy status. The synchronization accuracy status is characterized by the root mean square (RMS) of the phase estimation error. .when When the synchronization accuracy decreases, increase the guard interval of the TDM frame. At the same time, it increases the slot allocation weight of the synchronization slot within the TDM scheduling cycle; when When reducing speed and improving synchronization accuracy, reduce the protection interval. At the same time, the allocation weight of synchronization time slots is reduced, and more time slot resources are allocated to service frames.
[0057] The formula for adjusting the protection interval is:
[0058]
[0059] in, The nominal protection interval, To adjust the coefficient, This is the synchronization accuracy threshold.
[0060] Time slot allocation weight The adjustment formula is:
[0061]
[0062] in, The minimum weight for the synchronization time slot. This represents the maximum weight of the synchronization time slot.
[0063] The adjusted protection interval and time slot allocation weights are sent to the TDM time slot scheduling module to update the time slot configuration for the next scheduling cycle.
[0064] As a preferred embodiment, refer to the appendix. Figure 2 First, a Markov Decision Process (MDP) is constructed to represent the network state transitions. The quintuple of the MDP is: ,in:
[0065] state space : This is the set of the current network state and the filter state, specifically:
[0066]
[0067] in The standard deviation of the phase estimation error. The standard deviation of the frequency drift estimation error. Let be the standard deviation of the delay jitter estimation error. To estimate the residuals for the state, , This represents the bandwidth utilization of the current network link, used to characterize the network load.
[0068] Action space : is the process noise covariance matrix of the AUKF model. and measurement noise covariance matrix The configurable parameters are as follows: ,in for The diagonal elements, for The only element is 0, and all off-diagonal elements are set to 0, which satisfies the assumption that the noise is uncorrelated.
[0069] State transition probability The state transition probability, which characterizes changes in network load and updates in the filter state, is determined by the non-stationary nature of network traffic.
[0070] reward function The objective is to minimize the mean square error of the state estimation residuals, specifically defined as:
[0071]
[0072] in, This is a weighting coefficient for the smoothness of movement, used to avoid abrupt changes in movement;
[0073] Discount factor The range of values is It is used to weigh the immediate rewards against the future rewards.
[0074] The Deep Deterministic Policy Gradient (DDPG) method interacts with the AUKF model to output the optimal noise covariance matrix configuration parameters under the current network load environment. The DDPG method includes a policy network. And Q Network The policy network is used to determine the current state. Output deterministic actions The Q-network is used to evaluate the Q-value of the current state-action pair. The specific interaction process is as follows:
[0075] Offline pre-training phase: Collect synchronization frame timestamp data and filter state data under various typical network load scenarios to construct a training dataset, pre-train the DDPG policy network and Q network, and update the network parameters. and This maximizes the cumulative reward.
[0076] Online interaction phase: In each synchronization cycle k, the current state is... Input is fed into a pre-trained policy network, and the output is an action. ,Right now and The diagonal elements are then incorporated into the AUKF model, and joint state estimation is performed to obtain the estimated residuals. Calculate instant rewards ,Will The data is stored in the experience replay pool. Samples are taken from the experience replay pool to fine-tune the policy network and Q network online, update the network parameters, and complete the online dynamic adjustment of the AUKF model parameters.
[0077] In this embodiment, the DDPG method is pre-trained using the Model-Agnostic Meta-Learning (MAML) method to shorten the convergence time of the AUKF model in non-stationary network states. The specific process is as follows:
[0078] Task set construction: Defining different network load distributions as different meta-tasks The load scenarios include light load, medium load, heavy load, and burst traffic scenarios. Each meta-task contains a support set and a query set. The support set consists of a small number of interaction samples under the load scenario, and the query set consists of test samples under the scenario.
[0079] Meta-training phase: In each meta-training iteration, a batch of meta-tasks is randomly sampled. For each meta-task... Based on the support set samples, the initialization parameters of the policy network are... Perform a gradient descent update to obtain parameters suitable for the task. :
[0080]
[0081] in, For the inner loop learning rate, For meta-task The loss function is a negative cumulative reward;
[0082] Meta-update phase: Based on the query set samples of all sampled meta-tasks, calculate the adapted parameters. The loss function, for initial parameters Perform gradient updates:
[0083]
[0084] in, The learning rate for the outer loop;
[0085] Repeat the meta-training iterations until the loss function converges, thus obtaining the initial parameters of the policy network. The initialization parameters have the ability to quickly adapt to different network load scenarios;
[0086] During the online dynamic adjustment phase, based on a small number of interaction samples under the current load environment, the initialization parameters are adjusted. Perform one step of gradient descent to quickly output the noise covariance matrix configuration parameters corresponding to the current scene.
[0087] As a preferred embodiment, refer to the appendix. Figure 3 First, a directed graph topology containing TSN nodes and service flow links is constructed. , where the set of nodes M represents the number of TSN nodes in the network, and each node Corresponding to a TSN terminal node or switch node; edge set node With nodes There are business flow links between them. For the node To the node The directed edge.
[0088] Define node features and edge features:
[0089] Node features : for nodes The cache queue length vector, ,in For nodes The current queue length of the p-th priority transmission queue, in bytes, where P is the number of service priorities of the TSN, conforming to the IEEE 802.1Qbv standard;
[0090] Edge features : for link Historical latency jitter vector, ,in Link at time kt The estimated time delay jitter value, where L is the length of the historical time window.
[0091] Spatial correlation features in the graph topology are extracted using a graph convolutional network. This graph convolutional network employs two graph convolutional layers, with the graph convolution of each layer calculated as follows:
[0092]
[0093] in, Let l be the node feature matrix of the l-th layer. The normalized adjacency matrix, , Let be the adjacency matrix of the graph. It is the identity matrix. For degree matrix, Let L be the trainable weight matrix of the l-th layer. It is the ReLU nonlinear activation function.
[0094] A spatiotemporal multi-head attention mechanism is embedded in the graph convolutional network to assign adaptive weights to the spatial dependencies of different nodes in the graph topology, and to perform sequence aggregation of spatial correlation features from multiple historical time steps along the time dimension. The specific process is as follows:
[0095] Spatial multi-head attention mechanism: for each node Calculate its relationship with adjacent nodes. attention weights :
[0096]
[0097] in, and For the projection matrix of the query and key, The projected feature dimensions, For nodes The graph convolution output features, Adjacent nodes The graph convolution output features are obtained. H attention heads are used, each independently calculating attention weights. The output features of multiple heads are concatenated to obtain spatial attention features. ;
[0098] Time series aggregation: Spatial attention feature sequences over L historical time points The sequence aggregation is performed along the time dimension using a gated recurrent unit (GRU). The update formula for the GRU is:
[0099] in, To update the door, To reset the door, , , For trainable weight matrix, The final output is the Hadamard product. That is, the aggregated spatiotemporal feature vector .
[0100] The aggregated spatiotemporal feature vectors are input into the NMPC model, transforming them into explicit inequality constraints in time slot scheduling. Specifically, the spatiotemporal feature vectors... Mapped to dynamic penalty weights in the NMPC optimization problem :
[0101]
[0102] in, and These are trainable mapping parameters.
[0103] Dynamic penalty weights The dynamic adjustment coefficients, which serve as time slot boundary constraints, are transformed into explicit inequality constraints:
[0104]
[0105] When the length of a node's buffer queue is larger and the link latency jitter is more severe, The closer the value is to 1, the stricter the time slot boundary constraints, limiting the probability of time slot overlap between synchronization frames and high-priority service frames; when the node load is light and the link status is stable, To improve the utilization rate of time slot resources, constraints are appropriately reduced and relaxed. Simultaneously, the aggregated spatiotemporal feature vector is used as the dynamic penalty weight for time slot boundary constraints in the NMPC model, adjusting the strictness of time slot boundary constraints for different nodes based on the spatiotemporal feature vector.
[0106] As a preferred embodiment, refer to Figure 4 A network calculus-based deterministic queuing model is introduced to establish arrival and service curves for link buffer traffic. For the output port buffer queue of a TSN node, the arrival curve of traffic is... The leaky bucket model constraint is defined as follows:
[0107]
[0108] in, The average arrival rate of the traffic, in bits per second; This refers to the burst size of the traffic, measured in bits, and is determined by the maximum frame length of the service flow and the number of burst frames.
[0109] Service curve of the link The rate-latency service model is adopted and defined as follows:
[0110]
[0111] in, This represents the physical bandwidth of the link, measured in bits per second. This represents the fixed transmission delay of the link, measured in seconds (s).
[0112] Based on the least-addition algebra theory of network calculus, the analytical bound for the maximum queuing delay caused by burst traffic is... The maximum horizontal distance between the arrival curve and the service curve, i.e.:
[0113]
[0114] Substituting the arrival curve and service curve into the calculation, we obtain:
[0115]
[0116] Analyze the maximum queuing delay boundary As prior knowledge, this is incorporated into the state update equation of the AUKF model to analytically correct the time delay jitter state components in the state transition matrix. Specifically, in the measurement update step of AUKF, the time delay jitter state components are... The estimated value is revised as follows:
[0117]
[0118] in, To measure the prior estimate of delay jitter before the update, This is the corrected posterior estimate. Simultaneously, the Kalman gain of the time delay jitter component in the state update equation is adjusted synchronously. Exceed At that time, it was forcibly truncated into This suppresses the divergence of delay jitter estimates caused by non-Gaussian burst traffic.
[0119] Based on the analytically corrected delay jitter state components, a Lyapunov energy function for clock synchronization error is constructed. During the rolling optimization solution of the NMPC model, the predictive control sequence is pruned for feasibility. First, the clock synchronization error vector is defined. ,in Construct the Lyapunov energy function using the reference state vector:
[0120]
[0121] in, It is a 4×4 symmetric positive definite matrix, a Lyapunov matrix, obtained by solving the discrete-time Lyapunov equations:
[0122]
[0123] in, It is a 4×4 symmetric positive definite weight matrix.
[0124] The necessary and sufficient condition for the Lyapunov stability of a discrete-time system is that the difference in the Lyapunov energy function is less than 0, i.e.:
[0125]
[0126] Will Substituting into the above equation, we get:
[0127]
[0128] This inequality is used as an additional constraint in the NMPC rolling optimization process to perform feasibility pruning on the obtained predictive control sequences. Specifically, after solving the quadratic programming problem of NMPC, for each predictive control variable... We verify whether it satisfies the Lyapunov inequality constraint. If it does not, we remove the control variable and resolve the optimization problem until we obtain a predictive control sequence that satisfies the stability constraint, thus ensuring the asymptotic stability of the clock synchronization error under residual queuing delay disturbance.
[0129] As a preferred embodiment, refer to Figure 5 Source domain datasets were constructed by collecting multiple sets of crystal oscillator frequency drift data under different ambient temperatures. The source domain dataset covers an industrial-grade temperature range of -40℃ to 85℃, and at each temperature point, at least 1000 sets of crystal oscillator frequency drift and corresponding temperature data are collected. ,in For source domain temperature samples, For the corresponding frequency drift sample, The number of samples in the source domain. Online drift data at the current operating temperature is extracted to construct the target domain dataset. , ,in For online sample collection at the current temperature, For the corresponding frequency drift sample, The number of samples in the target domain, and .
[0130] The Maximum Mean Discrepancy (MMD) method is used to align the distributions of the source and target domain datasets, and a crystal oscillator drift prediction model is trained in the common feature space. A feature mapping function is defined. The original temperature-drift data is mapped to the Reproducing Kernel Hilbert Space (RKHS). The maximum mean difference between the source and target domain data in the RKHS is:
[0131]
[0132] in, For the regenerating kernel Hilbert space, a Gaussian kernel is used as the kernel function, which is defined as follows:
[0133]
[0134] in, This represents the bandwidth parameter of the Gaussian kernel.
[0135] The crystal oscillator drift prediction model is trained by minimizing the joint loss function of MMD loss and prediction loss. The joint loss function is:
[0136]
[0137] in, To predict the loss, mean squared error loss is used. , The crystal oscillator drift prediction model is implemented using a fully connected neural network. These are the weighting coefficients for the MMD loss.
[0138] The output of the crystal oscillator drift prediction model The predicted crystal oscillator frequency drift at the current temperature is used as a feedforward compensation term in the NMPC model to correct the predictive control sequence. By incorporating the feedforward compensation term into the NMPC prediction model, the corrected state prediction equation is:
[0139]
[0140] in, The input matrix for feedforward compensation is a 4×1 vector. ; The predicted temperature value at time k+i-1 is obtained by linear prediction using historical data from the temperature sensor.
[0141] The feedforward-compensated phase residual sequence is mapped to a high-dimensional reproducing kernel Hilbert space. In this high-dimensional space, the kernel least mean square error (KLMS) method is used to perform nonlinear regression prediction on the phase residual sequence. First, the feedforward-compensated phase residual sequence is obtained. ,in This is the phase prediction value after feedforward compensation.
[0142] The iterative update formula for KLMS is:
[0143]
[0144] in, For weight vectors in high-dimensional space, For learning rate, This is the Gaussian kernel mapping function. The corresponding residual prediction value is:
[0145]
[0146] in, For the coefficients of the iterative update, This is the Gaussian kernel function.
[0147] The trend of residual changes obtained from nonlinear regression prediction As a feedback correction, it is added to the feedforward compensation term to perform a secondary calibration on the predictive control sequence output by the NMPC model. The calibrated control quantity is:
[0148]
[0149] in, The residual feedback gain is obtained through pre-calibration.
[0150] As a preferred embodiment, refer to Figure 6 Construct a dual-objective optimization model, transforming the optimization objective into a minimization problem:
[0151] First optimization objective Minimize the root mean square of the clock synchronization phase deviation to maximize clock synchronization accuracy. ;
[0152] Second optimization objective Minimize the end-to-end transmission latency of service frames to maximize the end-to-end throughput of service frames. ,in Let M be the end-to-end average transmission delay of the j-th service flow, and M be the number of service flows.
[0153] The optimization variable is the guard interval of the TDM frame. and the weight vector allocated to each time slot ,in Assigning weights to synchronization time slots, Weights are assigned to time slots with different priorities to satisfy... ,and , , , This represents the minimum weight for the corresponding service time slot.
[0154] The constraints of the multi-objective optimization model include:
[0155] Time slot boundary constraints: dynamic penalty weights The defined time slot boundary is a constraint, i.e. ;
[0156] Protection interval constraints: ,in The minimum protection interval is determined by the hardware transmission delay. The maximum protection interval is determined by the maximum allocatable duration of the TDM scheduling cycle;
[0157] Weight constraints: , , ;
[0158] Synchronization accuracy constraints: ,in This represents the maximum permissible phase deviation.
[0159] The non-dominated sorting genetic algorithm (NSGA-II) was used to solve the multi-objective optimization model to obtain the Pareto optimal solution set for the protection interval and time slot allocation weights. The specific solution process is as follows:
[0160] Population initialization: Randomly generate an initial population with a population size of [missing value]. Each individual is a set of optimization variables. The constraints are satisfied.
[0161] Non-dominated sorting: Sort the individuals in the population in a non-dominated order and divide them into different Pareto levels. Individuals of level 1 are the non-dominated solutions of the current population.
[0162] Crowding calculation: Crowding is calculated for individuals of the same Pareto level to measure the distribution density among individuals and maintain population diversity;
[0163] Selection operation: A tournament selection method is used to select superior individuals based on Pareto level and crowding degree to serve as the parent population;
[0164] Crossover and mutation operations: Simulate binary crossover and polynomial mutation on the parent population to generate the offspring population. The crossover probability is... The mutation probability is ;
[0165] Merging populations: This involves merging the parent population with the offspring population to form a population of [size missing]. Merged populations;
[0166] Environmental selection: Non-dominated ranking and crowding calculation are performed on the merged populations, and selection is based on these factors. A select few individuals form the next generation of the species;
[0167] Termination check: Repeat steps 2-7 until the maximum number of iterations is reached. The output of the non-dominated solutions in the final population is the Pareto optimal solution set.
[0168] Based on the current traffic scheduling requirements of the time-sensitive network, a corresponding combination of guard intervals and time slot allocation weights is selected from the Pareto optimal solution set for distribution. When the current network requirement is high synchronization accuracy, the Pareto optimal solution set is selected. The parameter combination corresponding to the smallest individual; when the current network demand is high traffic throughput, select... The parameter combination corresponding to the smallest individual; when the network requirement is a balance between synchronization accuracy and throughput, the individual with the smallest Euclidean distance from the Pareto optimal solution set to the ideal point is selected, where the ideal point is... ,in To solve the set The minimum value, To solve the set The minimum value is selected. The selected parameter combination is then sent to the TDM time slot scheduling module to update the protection interval and time slot allocation configuration for the next scheduling cycle.
Claims
1. A chip hardware-assisted clock synchronization method for time-sensitive networks, characterized in that, include: Hardware timestamp latching for frame transmission and reception is performed at the physical layer interface of time-sensitive network nodes. The latched data is input into the adaptive unscented Kalman filter model to complete the joint state estimation of link transmission delay jitter and crystal oscillator frequency drift; The state parameters are input into the nonlinear model predictive control model, and the time slot boundary of time division multiplexing is used as the constraint condition to generate the predictive control sequence for crystal oscillator phase compensation. The clock synchronization period is dynamically bound to the time slot scheduling period of time division multiplexing. Parallel computation of predictive control sequences is used to generate phase compensation instructions, which are then sent to the digitally controlled oscillator. The guard interval and time slot allocation weight of the time division multiplexed frame are dynamically adjusted based on the synchronization accuracy status.
2. The method according to claim 1, characterized in that, Before completing the joint state estimation, the process also includes: constructing a Markov decision process to characterize the network state transition; using the process noise covariance matrix and measurement noise covariance matrix of the adaptive unscented Kalman filter model as the action space; using the minimization of the mean square error of the state estimation residual as the reward function; and using the deep deterministic policy gradient method to interact with the adaptive unscented Kalman filter model to output the optimal noise covariance matrix configuration parameters under the current network load environment, thus completing the online dynamic adjustment of the parameters of the adaptive unscented Kalman filter model.
3. The method according to claim 1, characterized in that, Using the time slot boundaries of time-division multiplexing as constraints, the process includes: constructing a graph topology containing time-sensitive network nodes and service flow links; using the node buffer queue length and link historical latency jitter as node and edge features, respectively; extracting spatial correlation features from the graph topology through a graph convolutional network; and inputting the spatial correlation features into a nonlinear predictive control model, transforming them into explicit inequality constraints in time slot scheduling to limit the probability of time slot overlap between synchronous frames and high-priority service frames during the predictive control sequence generation process.
4. The method according to claim 1, characterized in that, The joint state estimation of link transmission delay jitter and crystal oscillator frequency drift is completed, including: introducing a network calculus deterministic queuing model to establish the arrival and service curves of the link buffer traffic, and calculating the maximum queuing delay analytical bound caused by burst traffic; incorporating the maximum queuing delay analytical bound as prior knowledge into the state update equation of the adaptive unscented Kalman filter model, and performing analytical correction on the delay jitter state components in the state transition matrix.
5. The method according to claim 1, characterized in that, The process of generating a predictive control sequence for crystal oscillator phase compensation includes: collecting multiple sets of crystal oscillator frequency drift data at different ambient temperatures to construct a source domain dataset, and extracting online drift data at the current operating temperature to construct a target domain dataset; aligning the source domain dataset and the target domain dataset using the maximum mean difference method, and training a crystal oscillator drift prediction model in a common feature space; and using the output of the crystal oscillator drift prediction model as a feedforward compensation term for the nonlinear model predictive control model to correct the phase deviation of the predictive control sequence under dynamic temperature changes.
6. The method according to claim 2, characterized in that, The online dynamic adjustment of the parameters of the adaptive unscented Kalman filter model is completed, including: pre-training the deep deterministic policy gradient method using the model-independent meta-learning method, performing policy gradient updates under various historical typical network load distributions, and obtaining the initial policy network parameters; in the online dynamic adjustment stage, based on a small number of interaction samples under the current load environment, performing a one-step gradient descent on the initial policy network parameters, and quickly outputting the noise covariance matrix configuration parameters corresponding to the current scene.
7. The method according to claim 3, characterized in that, Extracting spatial correlation features from graph topology includes: embedding a spatiotemporal multi-head attention mechanism in the graph convolutional network, assigning adaptive weights to the spatial dependencies of different nodes in the graph topology, and performing sequential aggregation of spatial correlation features from multiple historical time points along the time dimension; using the aggregated spatiotemporal feature vector as the dynamic penalty weight for time slot boundary constraints in the nonlinear model prediction control model, and adjusting the strictness of time slot boundary constraints for different nodes based on the spatiotemporal feature vector.
8. The method according to claim 4, characterized in that, The generation of the predictive control sequence for crystal oscillator phase compensation also includes: constructing the Lyapunov energy function of clock synchronization error based on the analytically corrected time delay jitter state components; in the rolling optimization solution of the nonlinear model predictive control model, the derivative of the Lyapunov energy function being less than zero is used as an additional inequality constraint to perform feasibility pruning on the obtained predictive control sequence and eliminate control quantities that cause clock synchronization error divergence.
9. The method according to claim 5, characterized in that, Correcting the phase deviation of the predictive control sequence under dynamic temperature changes involves: mapping the feedforward compensated phase residual sequence to a high-dimensional regenerating kernel Hilbert space; performing nonlinear regression prediction on the phase residual sequence in the high-dimensional regenerating kernel Hilbert space using the kernel minimum mean square error method; and superimposing the residual change trend obtained from the nonlinear regression prediction as a feedback correction amount onto the feedforward compensation term to perform secondary calibration on the predictive control sequence output by the nonlinear model predictive control model.
10. The method according to claim 7, characterized in that, The dynamic adjustment of the guard interval and time slot allocation weights of time-division multiplexed frames includes: constructing a multi-objective optimization model with the dual optimization objectives of maximizing clock synchronization accuracy and maximizing end-to-end throughput of service frames, and with time slot boundaries limited by dynamic penalty weights as constraints; solving the multi-objective optimization model using a non-dominated sorting genetic algorithm to obtain the Pareto optimal solution set of guard interval and time slot allocation weights; and selecting the corresponding combination of guard interval and time slot allocation weights from the Pareto optimal solution set for distribution based on the current traffic scheduling requirements of the time-sensitive network.