A method for time synchronization of ship-based layered power line communication

By employing multi-CCO pseudo-synchronization, CCO-multi-STA master-slave synchronization protocol, channel frequency response and group delay estimation, and adaptive Kalman filtering, the problems of low synchronization accuracy and poor stability in ship power line networks are solved, achieving high-precision and high-reliability time synchronization.

CN122137492APending Publication Date: 2026-06-02ZHONGBEI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGBEI UNIV
Filing Date
2026-03-04
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing time synchronization technologies suffer from low synchronization accuracy and poor stability in shipboard power line networks due to strong interference, time-varying environments, and topological complexity, making it difficult to achieve high-precision and high-reliability time synchronization.

Method used

By employing a multi-CCO pseudo-synchronization mechanism, a CCO-multi-STA master-slave synchronization protocol, an asymmetric delay correction method for channel frequency response and group delay estimation, as well as a STA cooperative assisted synchronization mechanism and an adaptive Kalman filter algorithm, combined with a hierarchical power line communication network structure, high-precision and high-reliability time synchronization is achieved.

Benefits of technology

It significantly improves the synchronization accuracy and stability in ship power line communication networks, reduces systematic synchronization deviation, enhances synchronization coverage and anti-interference capabilities, and achieves high-precision time synchronization at the microsecond level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137492A_ABST
    Figure CN122137492A_ABST
Patent Text Reader

Abstract

This invention discloses a hierarchical power line communication time synchronization method for ships, relating to the field of power distribution network technology. The method includes the following steps: triggering a time synchronization process via a host computer; performing primary synchronization using a multi-CCO pseudo-synchronization mechanism; performing secondary synchronization using a CCO-multi-STA master-slave synchronization protocol; detecting the STA synchronization status; if synchronization is complete, network-wide time synchronization is achieved; otherwise, a STA collaborative auxiliary synchronization mechanism is used for network-wide time synchronization. The hierarchical synchronization mechanism effectively improves synchronization accuracy and network scalability. Through delay scheduling, time-varying asymmetric delay modeling, and adaptive Kalman filtering, it suppresses delay jitter, asymmetric interference, and noise in the ship's power line channel, achieving microsecond-level high-precision synchronization. The introduction of STA collaborative auxiliary synchronization allows synchronization to be maintained through neighboring nodes even during momentary link interruptions, improving synchronization coverage and system robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power distribution network technology, and in particular to a method for time synchronization of ship-based hierarchical power line communication. Background Technology

[0002] Time synchronization of shipboard layered power line communication is crucial for ensuring the collaborative operation of complex shipboard systems in environments with strong interference and time variations.

[0003] In existing technologies, time synchronization techniques mainly employ improved IEEE 1588 protocols or zero-crossing point detection schemes.

[0004] However, existing methods face significant limitations in shipboard power line networks: while the improved PTP protocol is widely used, it is still susceptible to high latency, jitter, and message loss in the unique tree-like hybrid topology of ships, the strong time-varying nature caused by high-power load switching, and the asymmetric link environment, making it difficult to guarantee synchronization accuracy and stability; while non-PTP schemes, such as zero-crossing point detection, are severely affected by harmonic interference, making it difficult to achieve microsecond-level accuracy, and existing research is mostly aimed at quasi-static environments such as civil power grids, lacking sufficient adaptation and verification for the complex scenarios of ships.

[0005] Therefore, a method for time synchronization of ship-based layered power line communication is provided to solve the above problems. Summary of the Invention

[0006] The purpose of this invention is to provide a time synchronization method for ship hierarchical power line communication, which solves the problems of low synchronization accuracy, poor stability and insufficient coverage caused by strong interference, time-varying environment and topology complexity in ship power line communication networks, so as to achieve high-precision and high-reliability time synchronization of the entire network.

[0007] To achieve the above objectives, the present invention provides a method for time synchronization of ship-based layered power line communication, comprising the following steps: S1: Trigger the time synchronization process via the host computer; S2: Perform primary synchronization, which uses a multi-CCO pseudo-synchronization mechanism; S3: Perform secondary synchronization, which uses the CCO-multi-STA master-slave synchronization protocol; S4: Check the STA synchronization status. If synchronization is complete, the time synchronization of the entire network is complete. Otherwise, use the STA collaborative auxiliary synchronization mechanism to perform time synchronization of the entire network.

[0008] Preferably, step S2 specifically includes the following steps: S21: Issue a clock synchronization command to multiple CCOs via the host computer; multiple CCOs are set to... ; S22: Return timestamps, select unsent devices based on all returned timestamps, reissue clock synchronization commands, and repeat steps S21-S22 until there are no unsent devices. S23: The host computer selects the smallest timestamp from all the returned timestamps and sets the smallest timestamp as the base time, and calculates the offset based on the remaining timestamps and the smallest timestamp.

[0009] Preferably, step S3 specifically includes the following steps: S31: Each CCO periodically sends Sync and Follow_Up messages to all STA nodes within its corresponding subnet, carrying the CCO's current standard timestamp. ; S32: After receiving the Follow_Up message, the STA uses the unique number assigned to the STA node. Calculate transmission delay And within the corresponding time window, Delay_Req messages are sent sequentially, with a delay. Specifically set as follows: ; in, Indicates the basic minimum safe delay. Indicates the delay step size between adjacent numbered nodes; S33: Perform time delay response feedback and time-varying asymmetric delay correction; S34: Local clock correction based on Kalman filtering; S35: After clock correction is completed, each STA node sends a synchronization completion confirmation message back to the CCO, and the CCO refreshes the synchronization status list.

[0010] Preferably, step S33 specifically includes the following steps: Step 1: The CCO receives the Delay_Req message, verifies that the link is idle, and replies with a Delay_Resp message. The STA obtains the timestamp. , , , The STA node calculates the total round-trip time and local offset of the link with the CCO; Step 2: Calculate the channel frequency response Channel frequency response Specifically set as follows: ; in, The phase factor represents a complex exponential form, specifically the phase rotation of the signal. Represents the imaginary unit. This represents the phase response, specifically the phase shift of the signal after it passes through the channel. Step 3: Define group delay Group delay Specifically set as follows: ; in, Indicates the angular frequency of the signal. Indicates the frequency of the signal; Step 4: In the downlink, the STA receives CCO messages and combines them with the subcarrier signal-to-noise ratio. A weighted average is performed, and the equivalent group delay is estimated at the PHY layer to obtain the downlink group delay. ; Step 5: In the uplink, the CCO receives the Delay_Req message from the STA, performs estimation at the PHY layer, and obtains the uplink equivalent group delay. ; Step 6: The CCO includes the uplink equivalent group delay in the corresponding STA message. As an extended field, it is unicasted back to the STA, defining the uplink and downlink asymmetric equivalent delay offset term. Uplink and downlink asymmetric equivalent delay bias term Specifically set as follows: ; Step 7: STA based on timestamp , , , and uplink / downlink asymmetric equivalent delay bias term Calculate clock offset Clock offset Specifically set as follows: .

[0011] Preferably, in step 4, the downlink equivalent group delay Specifically set as follows: ; in, Indicates subcarrier index, This represents the total number of valid subcarriers involved in the calculation. Indicates the first Signal-to-noise ratio of each subcarrier Indicates the first Group delay of each subcarrier, Indicates the first The frequencies corresponding to each subcarrier; In step 5, the uplink equivalent group delay Specifically set as follows: .

[0012] Preferably, step S34 specifically includes the following steps: Step 1: Model the local clock state of the STA as a two-dimensional vector Two-dimensional vector Specifically set as follows: ; in, express Phase shift at time, express Frequency shift at time; Step 2: Predict the state variables at the current time using the Kalman filter algorithm. Covariance State variable estimation Covariance Set them to: ; ; ; in, This represents the estimate of the state variables at the previous moment. This represents the covariance at the previous time step. Represents the state transition matrix. This represents the transpose of the state transition matrix. Represents the process noise covariance matrix. Indicates the synchronization period; Step 3: Based on Time offset prediction The state is updated using the Kalman filter algorithm, and the offset prediction is... Specifically set as follows: ; in, This represents the offset prediction amount at time.

[0013] Preferably, step three specifically includes the following steps: Step I: Let Measurement noise covariance at time for: ; in, Indicates the baseline noise level. This represents the adjustment coefficient. express Link quality metrics at any given time. This indicates a small quantity to prevent the denominator from being zero; Step II: Calculate the Kalman gain Kalman gain Specifically set as follows: ; in, Represents the observation matrix. Represents the observation matrix The transpose of the matrix; Step 3: Obtain the updated state variables Updated state variables Specifically set as follows: .

[0014] Preferably, step S4 specifically includes the following steps: S41: The CCO sends a specific request message to the unsynchronized STA node. If the returned local timestamp is within the synchronized time range, the CCO updates the STA node to a synchronized state. Otherwise, it does not return a timestamp and triggers the STA collaborative auxiliary synchronization mechanism. S42: Select an optimal synchronization source STA_S from the reachable neighboring healthy nodes and calculate the synchronization reliability. Synchronization reliability Specifically set as follows: ; in, The weighting coefficient representing the number of hops. Indicates the number of synchronization jumps. The confidence weight represents a decrease exponentially with the number of synchronization hops. This represents the hop count decay factor. Weighting coefficients representing clock stability This represents the normalized local clock variance. Weighting coefficients representing link quality. Indicates a normalized link quality indicator; S43: Perform loop avoidance. The out-of-sync node STA_Lost checks the synchronization path vector broadcast by each candidate source. If it already contains its own ID, the candidate source is immediately discarded. S44: Optimal selection based on credibility. After loop avoidance filtering, the out-of-sync node STA_Lost selects synchronization credibility from all qualified candidate sources. The highest-ranking STA node is set as the optimal synchronization source STA_S; S45: The out-of-synchronization node STA_Lost uses the optimal synchronization source STA_S as a temporary reference node, initiates a point-to-point peer-to-peer timestamp exchange process, and obtains the timestamp. , , , Calculate clock offset It then calls the Kalman filter algorithm to smooth the local clock.

[0015] Therefore, the present invention employs the above-mentioned ship-based layered power line communication time synchronization method, which has the following beneficial effects: (1) This scheme introduces a two-level collaborative mechanism of multi-CCO pseudo-synchronization and CCO-multi-STA master-slave synchronization, which effectively solves the problem of unified synchronization starting point of multiple nodes and high-precision synchronization within the subnet under the complex topology of ship power lines; (2) Based on the asymmetric delay correction method of channel frequency response and group delay estimation, this scheme significantly reduces the systematic synchronization deviation caused by the difference in uplink and downlink delays on the ship's power line; (3) This scheme combines the STA collaborative auxiliary synchronization mechanism with the adaptive Kalman filter algorithm, and can still maintain high synchronization coverage and clock correction stability under strong interference and instantaneous link interruption environment.

[0016] The method of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0017] Figure 1 This is a flowchart of a ship-based layered power line communication time synchronization method according to the present invention; Figure 2 This is a flowchart of the multi-CCO pseudo-synchronization mechanism of the present invention; Figure 3 This is a flowchart of the CCO-multi-STA master-slave synchronization protocol of the present invention; Figure 4 This is a flowchart of the STA collaborative auxiliary synchronization mechanism of the present invention; Figure 5 This is a structural diagram of a ship-based layered power line carrier communication system according to an embodiment of the present invention; Figure 6 This is a graph showing the maximum value of the synchronization error in the comparative test of an embodiment of the present invention; Figure 7 This is a graph showing the minimum synchronization error in a comparative test according to an embodiment of the present invention. Figure 8 This is a graph showing the maximum difference in synchronization error compared to the embodiments of the present invention. Figure 9 This is a schematic diagram illustrating the number of synchronous coverage links coexisting in an embodiment of the present invention; Figure 10 This is a comparison curve of clock correction residuals in an embodiment of the present invention. Detailed Implementation

[0018] The method of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0019] Unless otherwise defined, the methodological or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0020] The terms "comprising" or "including" as used in this invention mean that the element preceding the term encompasses the element listed after the term, and do not exclude the possibility of encompassing other elements. Terms such as "inner," "outer," "upper," and "lower" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. In this invention, unless otherwise explicitly specified and limited, the term "attached" and similar terms should be interpreted broadly. For example, it can refer to a fixed connection, a detachable connection, or an integral part; it can refer to a direct connection or an indirect connection through an intermediate medium; it can refer to the internal communication of two elements or the interaction relationship between two elements. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0021] Example like Figure 5 As shown, the deployment environment of ship PLC networks is complex and the number of nodes is large. In order to improve the scalability and management efficiency of the system, the network usually adopts a hierarchical aggregation topology structure of "host computer-CCO-STA". This hierarchical architecture is not only conducive to communication scheduling, but also provides a basis for the design of multi-level synchronization mechanism. Time synchronization in this ship PLC network needs to deal with problems such as multiple CCO distribution, complex links and heterogeneous nodes.

[0022] like Figure 1-4 As shown, the present invention provides a method for time synchronization of ship-based layered power line communication, comprising the following steps: S1: Trigger the time synchronization process via the host computer; S2: Perform first-level synchronization. First-level synchronization adopts a multi-CCO pseudo-synchronization mechanism, which efficiently establishes a unified time starting point for the entire network with minimal communication overhead. Step S2 specifically includes the following steps: S21: Issue a clock synchronization command to multiple CCOs via the host computer; multiple CCOs are set to... ; S22: Return timestamps, select unsent devices based on all returned timestamps, reissue clock synchronization commands, and repeat steps S21-S22 until there are no unsent devices. S23: The host computer selects the smallest timestamp from all the returned timestamps and sets the smallest timestamp as the base time, and calculates the offset based on the remaining timestamps and the smallest timestamp.

[0023] S3: Perform secondary synchronization, which uses the CCO-multi-STA master-slave synchronization protocol; After completing the CCO pseudo-synchronization, it is necessary to further ensure the precise synchronization between each STA node and its CCO. Both the CCO and STA devices maintain a 32-bit timer with a frequency of 25MHz. When the CCO and STA receive the corresponding message, they can accurately record the current timer value at the moment the message arrives, thereby achieving high-precision time stamping. This scheme is based on the improved IEEE1588 protocol and designs a master-slave synchronization scheme that adapts to the characteristics of PLC links. Step S3 specifically includes the following steps: S31: Each CCO periodically sends Sync and Follow_Up messages to all STA nodes within its corresponding subnet, carrying the CCO's current standard timestamp. ; S32: After receiving the synchronization message, the STA node records the arrival time and sends a Delay_Req message to the CCO. Since multiple STA nodes may send Delay_Req messages to the CCO node at the same time, it may cause link conflicts and message loss. This solution proposes an automatic delay algorithm based on numbering to optimize this. After receiving the Follow_Up message, the STA uses the unique number assigned to the STA node. Calculate transmission delay And within the corresponding time window, Delay_Req messages are sent sequentially, thereby effectively avoiding concurrent conflicts and reducing transmission delay. Specifically set as follows: ; in, This represents the minimum safe delay, used to ensure the link remains idle. This represents the delay step between adjacent numbered nodes, which is dynamically set based on the network link propagation characteristics and the maximum tolerable collision time. S33: Perform time delay response feedback and time-varying asymmetric delay correction; Step S33 specifically includes the following steps: Step 1: The CCO receives the Delay_Req message, verifies that the link is idle, and replies with a Delay_Resp message. The STA obtains the timestamp. , , , The STA node calculates the total round-trip time and local offset of the link with the CCO; In the standard IEEE 1588 protocol, nodes assume by default that the round-trip delay of the master-slave link is symmetrical. However, the uplink and downlink paths of the PLC channel often exhibit asymmetry. If the propagation delay is directly assumed to be symmetrical, it will lead to a systematic deviation in clock correction. This proposal puts forward an asymmetric correction method based on group delay estimation. Step 2: Calculate the channel frequency response Channel frequency response Specifically set as follows: ; in, The phase factor represents a complex exponential form, specifically the phase rotation of the signal. Represents the imaginary unit. This represents the phase response, specifically the phase shift of the signal after it passes through the channel. Step 3: Define group delay Group delay Specifically set as follows: ; in, Indicates the angular frequency of the signal. Indicates the frequency of the signal; Step 4: In the downlink, the STA receives CCO messages and combines them with the subcarrier signal-to-noise ratio. A weighted average is performed, and the equivalent group delay is estimated at the PHY layer to obtain the downlink group delay. ; In step 4, downlink equivalent group delay Specifically set as follows: ; in, Indicates subcarrier index, This represents the total number of valid subcarriers involved in the calculation. Indicates the first Signal-to-noise ratio of each subcarrier Indicates the first Group delay of each subcarrier, Indicates the first The frequencies corresponding to each subcarrier; In step 5, the uplink equivalent group delay Specifically set as follows: .

[0024] Step 6: The CCO includes the uplink equivalent group delay in the corresponding STA message. As an extended field, it is unicasted back to the STA, defining the uplink and downlink asymmetric equivalent delay offset term. Uplink and downlink asymmetric equivalent delay bias term Specifically set as follows: ; Step 7: STA based on timestamp , , , and uplink / downlink asymmetric equivalent delay bias term Calculate clock offset Clock offset Specifically set as follows: .

[0025] S34: Local clock correction based on Kalman filtering; The STA node completes local clock correction based on the measured offset and link delay. Directly performing a large correction at once will cause frequent jitter of the local clock or even sawtooth fluctuations. In order to suppress the impact of link jitter and measurement noise on synchronization correction, the frequency drift of the clock itself is compensated. This scheme introduces a smooth correction algorithm based on Kalman filtering in the offset correction process. Step S34 specifically includes the following steps: Step 1: Model the local clock state of the STA as a two-dimensional vector Two-dimensional vector Specifically set as follows: ; in, express Phase shift at time, express Frequency shift at time; Step 2: Predict the state variables at the current time using the Kalman filter algorithm. Covariance State variable estimation Covariance Set them to: ; ; ; in, This represents the estimate of the state variables at the previous moment. This represents the covariance at the previous time step. Represents the state transition matrix. This represents the transpose of the state transition matrix. The process noise covariance matrix represents the instability of the local clock itself. Indicates the synchronization period; In shipboard power line communication channels, due to the presence of strong non-Gaussian impulse noise and sudden interference, fixed... Traditional methods struggle to maintain stability; therefore, this embodiment proposes a robust adaptive mechanism within the Kalman filtering framework, adjusting in real-time based on channel link quality. This allows for a dynamic balance between prediction and observation weights; Step 3: Based on Time offset prediction The state is updated using the Kalman filter algorithm, and the offset prediction is... Specifically set as follows: ; in, This represents the offset prediction amount at time.

[0026] Step three specifically includes the following steps: Step I: Let Measurement noise covariance at time for: ; in, Indicates the baseline noise level. This represents the adjustment coefficient. express Link quality metrics at any given time. This indicates a small quantity to prevent the denominator from being zero; Step II: Calculate the Kalman gain Kalman gain Specifically set as follows: ; in, Represents the observation matrix. Represents the observation matrix The transpose of the matrix; Step 3: Obtain the updated state variables Updated state variables Specifically set as follows: .

[0027] S35: After clock correction is completed, each STA node sends a synchronization completion confirmation message back to the CCO, and the CCO refreshes the synchronization status list.

[0028] S4: Check the STA synchronization status. If synchronization is complete, the time synchronization of the entire network is complete. Otherwise, use the STA collaborative auxiliary synchronization mechanism to perform time synchronization of the entire network.

[0029] In actual shipboard power line communication networks, although STA nodes can communicate directly with CCO in the topology design, strong transient electromagnetic interference may still cause some STAs to be temporarily unable to receive synchronization messages from CCO during a certain synchronization cycle. To deal with this "transient disconnection" situation, this solution designs a reliable STA cooperative auxiliary synchronization mechanism. The collaborative synchronization function is not always enabled, but is activated on demand under the unified command of the CCO. When the CCO detects that a node has lost connection, it commands the healthy nodes in the network to enter the "collaborative source" mode to provide a temporary, high-precision synchronization benchmark for the lost node, thereby helping it to quickly restore synchronization. This mechanism decomposes the collaborative synchronization process into two core stages: "synchronization source discovery and optimal selection" and "bidirectional peer-to-peer synchronization". Step S4 specifically includes the following steps: S41: The CCO sends a specific request message to the unsynchronized STA node. If the returned local timestamp is within the synchronized time range, the CCO updates the STA node to a synchronized state. Otherwise, it does not return a timestamp and triggers the STA collaborative auxiliary synchronization mechanism. S42: Select an optimal synchronization source STA_S from the reachable neighboring healthy nodes and calculate the synchronization reliability. Synchronization reliability Specifically set as follows: ; in, The weighting coefficient representing the number of hops. Indicates the number of synchronization jumps. The confidence weight represents a decrease exponentially with the number of synchronization hops. This represents the hop count decay factor, which controls the impact of synchronization distance on reliability. It is derived precisely and automatically by accumulating hop-by-hop in the network through the synchronization path mechanism. Weighting coefficients representing clock stability The normalized local clock variance is calculated by the STA node based on its most recent 20 master-slave synchronizations. The statistical variance of the values ​​is normalized. Weighting coefficients representing link quality. The normalized link quality indicator, derived from the link quality indicator reported by the physical layer of the power line carrier communication chip, is an objective quantitative evaluation of the uplink channel quality. S43: Perform loop avoidance. The out-of-sync node STA_Lost checks the synchronization path vector broadcast by each candidate source. If it already contains its own ID, the candidate source is immediately discarded to fundamentally eliminate synchronization loops. S44: Optimal selection based on credibility. After loop avoidance filtering, the out-of-sync node STA_Lost selects synchronization credibility from all qualified candidate sources. The highest-ranking STA node is set as the optimal synchronization source STA_S; S45: The out-of-sync node STA_Lost uses the optimal synchronization source STA_S as a temporary reference node and initiates a point-to-point peer-to-peer timestamp exchange process. This process no longer relies excessively on the Central Coordinator (CCO) and the numbered delay request scheduling algorithm, but instead adopts a lightweight time synchronization mechanism based on the symmetric delay assumption. This process replicates the core idea of ​​the high-precision PTP protocol to obtain timestamps. , , , Calculate clock offset It then calls the Kalman filter algorithm to smooth the local clock.

[0030] The proposed solution was compared and tested using an experimental platform consisting of a host computer, two convergence nodes (CCOs) and 30 slave nodes (STAs). All nodes are interconnected via 220V power lines to simulate the complex power line network environment of multiple compartments and barriers between ship cabins.

[0031] Each node uses an embedded hardware platform based on ARM architecture, runs a synchronization algorithm and records synchronization information. Synchronization control and command issuance are achieved through a gigabit Ethernet switch to realize a high-speed control link connection between the host computer and the CCO.

[0032] like Figures 6-8 As shown, synchronization error measures the degree of deviation of each STA node's local clock relative to the system reference time (i.e., the corresponding CCO reference clock) after time synchronization is completed. It is an important indicator reflecting the final synchronization accuracy of the nodes. To evaluate the synchronization performance of the proposed method under different power line communication environments, this paper conducted 50 sets of valid experiments. In each set of experiments, 30 STA nodes were selected simultaneously for synchronization accuracy testing. Indicates the final local time of the STA node. This indicates the reference time of the CCO corresponding to this STA node. The synchronization offset error is then defined as: .

[0033] Table 1: Comparison of Time Synchronization Performance of Different Synchronization Schemes

[0034] As shown in Table 1, in the conventional PTP bidirectional peer-to-peer time synchronization method, due to the significant time-varying characteristics and asymmetric uplink and downlink transmission delays of the power line link, the synchronization error of the STA node fluctuates significantly with changes in link status. Especially under conditions of frequent load switching or a large number of branches, the asymmetric cumulative effect of link delay directly amplifies the estimation deviation during timestamp exchange. The proposed method introduces link time-varying asymmetric delay modeling and combines it with adaptive Kalman filtering for dynamic estimation and correction of timestamps, effectively suppressing the impact of random noise and transient disturbances on the synchronization results. The maximum synchronization error is significantly reduced to 9.8 μs, and the average synchronization error is approximately 4.40 μs, resulting in a significant improvement in synchronization accuracy.

[0035] like Figure 9 As shown, synchronization coverage is used to characterize the proportion of nodes that meet the synchronization accuracy requirements within a given time window, reflecting the system's synchronization consistency capability. Let... This indicates the number of STA nodes that meet the synchronization accuracy requirements. Let represent the total number of STA nodes. Then, the formula for calculating synchronization coverage is: .

[0036] Each time, 30 STA nodes were deployed under various link conditions for the experiment. On average, only about 22 of the traditional CCO broadcast synchronization schemes were able to successfully complete clock synchronization, with a coverage rate of only about 76.3%. After adopting the STA collaborative assistance mechanism, the average synchronization coverage rate can be increased to over 98.3%.

[0037] Table 2: Comparison of Synchronization Success Rates of the Two Methods Under Different Environmental Conditions

[0038] As shown in Table 2, both synchronization methods can maintain a high success rate in a weak interference environment. However, when the interference intensity gradually increases, the performance of the traditional master-slave synchronization scheme deteriorates significantly. The traditional method relies heavily on the direct link between the CCO and each STA. Once the link quality deteriorates or a momentary interruption occurs, the node will be unable to obtain effective synchronization information, resulting in synchronization failure. This problem is particularly prominent in complex shipboard power networks where there are many branches and frequent dynamic changes in load.

[0039] In contrast, the STA collaborative assisted synchronization mechanism proposed in this scheme can maintain the continuity of the synchronization process by indirectly transmitting time information through nearby STA nodes that have completed synchronization when some CCO links fail. Even in high-noise environments such as multi-load power strips, it can still achieve a synchronization success rate of 97.6%.

[0040] like Figure 10As shown, in order to further evaluate the impact of different local clock correction algorithms on synchronization performance, this scheme selects a typical STA node and records the change of the correction residual of the local clock relative to the reference clock over time after applying different correction methods. The results show that the correction residual of the unfiltered method fluctuates greatly and is difficult to converge stably. The first-order filter can suppress the instantaneous disturbance caused by noise to a certain extent, but there is still obvious residual jitter.

[0041] In contrast, the Kalman filter correction method achieves optimal recursive estimation of the system state by jointly modeling clock drift and observation noise and dynamically adjusting the estimation weights during the filtering process. Its correction residual curve not only converges faster but also exhibits significantly reduced steady-state fluctuations, demonstrating clear advantages in both stability and accuracy.

[0042] Therefore, the present invention adopts the above-mentioned ship hierarchical power line communication time synchronization method, which achieves high-precision and high-reliability microsecond-level time synchronization in complex ship power environments through hierarchical coordination, time delay asymmetry correction and adaptive filtering, significantly improving synchronization coverage and anti-interference capability.

[0043] Finally, it should be noted that the above embodiments are only used to illustrate the method of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the method of the present invention, and these modifications or equivalent substitutions should not cause the modified method to deviate from the spirit and scope of the method of the present invention.

Claims

1. A method for time synchronization of layered power line communication on ships, characterized in that, Includes the following steps: S1: Trigger the time synchronization process via the host computer; S2: Perform primary synchronization, which uses a multi-CCO pseudo-synchronization mechanism; S3: Perform secondary synchronization, which uses the CCO-multi-STA master-slave synchronization protocol; S4: Check the STA synchronization status. If synchronization is complete, the time synchronization of the entire network is complete. Otherwise, use the STA collaborative auxiliary synchronization mechanism to perform time synchronization of the entire network.

2. The ship layered power line communication time synchronization method according to claim 1, characterized in that, Step S2 specifically includes the following steps: S21: Issue a clock synchronization command to multiple CCOs via the host computer; multiple CCOs are set to... ; S22: Return timestamps, select unsent devices based on all returned timestamps, reissue clock synchronization commands, and repeat steps S21-S22 until there are no unsent devices. S23: The host computer selects the smallest timestamp from all the returned timestamps and sets the smallest timestamp as the base time, and calculates the offset based on the remaining timestamps and the smallest timestamp.

3. The ship-based layered power line communication time synchronization method according to claim 2, characterized in that, Step S3 specifically includes the following steps: S31: Each CCO periodically sends Sync and Follow_Up messages to all STA nodes within its corresponding subnet, carrying the CCO's current standard timestamp. ; S32: After receiving the Follow_Up message, the STA uses the unique number assigned to the STA node. Calculate transmission delay And within the corresponding time window, Delay_Req messages are sent sequentially, with a delay. Specifically set as follows: ; in, Indicates the basic minimum safe delay. Indicates the delay step size between adjacent numbered nodes; S33: Perform time delay response feedback and time-varying asymmetric delay correction; S34: Local clock correction based on Kalman filtering; S35: After clock correction is completed, each STA node sends a synchronization completion confirmation message back to the CCO, and the CCO refreshes the synchronization status list.

4. The ship-based layered power line communication time synchronization method according to claim 3, characterized in that, Step S33 specifically includes the following steps: Step 1: The CCO receives the Delay_Req message, verifies that the link is idle, and replies with a Delay_Resp message. The STA obtains the timestamp. , , , The STA node calculates the total round-trip time and local offset of the link with the CCO; Step 2: Calculate the channel frequency response Channel frequency response Specifically set as follows: ; in, The phase factor represents a complex exponential form, specifically the phase rotation of the signal. Represents the imaginary unit. This represents the phase response, specifically the phase shift of the signal after it passes through the channel. Step 3: Define group delay Group delay Specifically set as follows: ; in, Indicates the angular frequency of the signal. Indicates the frequency of the signal; Step 4: In the downlink, the STA receives CCO messages and combines them with the subcarrier signal-to-noise ratio. A weighted average is performed, and the equivalent group delay is estimated at the PHY layer to obtain the downlink group delay. ; Step 5: In the uplink, the CCO receives the Delay_Req message from the STA, performs estimation at the PHY layer, and obtains the uplink equivalent group delay. ; Step 6: The CCO includes the uplink equivalent group delay in the corresponding STA message. As an extended field, it is unicasted back to the STA, defining the uplink and downlink asymmetric equivalent delay offset term. Uplink and downlink asymmetric equivalent delay bias term Specifically set as follows: ; Step 7: STA based on timestamp , , , and uplink / downlink asymmetric equivalent delay bias term Calculate clock offset Clock offset Specifically set as follows: 。 5. A method for time synchronization of ship-based layered power line communication according to claim 4, characterized in that, In step 4, downlink equivalent group delay Specifically set as follows: ; in, Indicates subcarrier index, This represents the total number of valid subcarriers involved in the calculation. Indicates the first Signal-to-noise ratio of each subcarrier Indicates the first Group delay of each subcarrier, Indicates the first The frequencies corresponding to each subcarrier; In step 5, the uplink equivalent group delay Specifically set as follows: 。 6. The ship-based layered power line communication time synchronization method according to claim 5, characterized in that, Step S34 specifically includes the following steps: Step 1: Model the local clock state of the STA as a two-dimensional vector Two-dimensional vector Specifically set as follows: ; in, express Phase shift at time, express Frequency shift at time; Step 2: Predict the state variables at the current time using the Kalman filter algorithm. Covariance State variable estimation Covariance Set them to: ; ; ; in, This represents the estimate of the state variables at the previous moment. This represents the covariance at the previous moment. Represents the state transition matrix. This represents the transpose of the state transition matrix. Represents the process noise covariance matrix. Indicates the synchronization period; Step 3: Based on Time offset prediction The state is updated using the Kalman filter algorithm, and the offset prediction is... Specifically set as follows: ; in, This represents the offset prediction amount at time.

7. A method for time synchronization of layered power line communication on ships according to claim 6, characterized in that, Step three specifically includes the following steps: Step I: Let Measurement noise covariance at time for: ; in, Indicates the baseline noise level. This represents the adjustment coefficient. express Link quality metrics at any given time. This indicates a small quantity to prevent the denominator from being zero; Step II: Calculate the Kalman gain Kalman gain Specifically set as follows: ; in, Represents the observation matrix. Represents the observation matrix The transpose of the matrix; Step 3: Obtain the updated state variables Updated state variables Specifically set as follows: 。 8. A method for time synchronization of layered power line communication on ships according to claim 7, characterized in that, Step S4 specifically includes the following steps: S41: The CCO sends a specific request message to the unsynchronized STA node. If the returned local timestamp is within the synchronized time range, the CCO updates the STA node to a synchronized state. Otherwise, it does not return a timestamp and triggers the STA collaborative auxiliary synchronization mechanism. S42: Select an optimal synchronization source STA_S from the reachable neighboring healthy nodes and calculate the synchronization reliability. Synchronization reliability Specifically set as follows: ; in, The weighting coefficient representing the number of hops. Indicates the number of synchronization jumps. The confidence weight represents a decrease exponentially with the number of synchronization hops. This represents the hop count decay factor. Weighting coefficients representing clock stability This represents the normalized local clock variance. Weighting coefficients representing link quality. Indicates a normalized link quality indicator; S43: Perform loop avoidance. The out-of-sync node STA_Lost checks the synchronization path vector broadcast by each candidate source. If it already contains its own ID, the candidate source is immediately discarded. S44: Optimal selection based on credibility. After loop avoidance filtering, the out-of-sync node STA_Lost selects synchronization credibility from all qualified candidate sources. The highest-ranking STA node is set as the optimal synchronization source STA_S; S45: The out-of-synchronization node STA_Lost uses the optimal synchronization source STA_S as a temporary reference node, initiates a point-to-point peer-to-peer timestamp exchange process, and obtains the timestamp. , , , Calculate clock offset It then calls the Kalman filter algorithm to smooth the local clock.