Signal phase precision measuring method and system
By calculating the phase adjustment amount and actual frequency of the local clock signal, combining the theoretical frequency and periodic value, the signal phase deviation is calculated, and the oscilloscope dependence problem in the prior art is solved, and high-precision and low-cost signal phase measurement is realized, and the expansion of the signal phase is achieved. Use scenarios.
Patent Information
- Application Number
- CN202411110669.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, signal phase accuracy measurement relies on high-end oscilloscopes, the equipment is huge and expensive, and the use scenarios are limited.
By calculating the phase adjustment amount of the local clock signal during the PPS signal period generated by the target device, the actual frequency of the two PPS signals is obtained, the phase deviation is calculated based on the theoretical frequency and period value, and the PTP protocol, Kalman filtering algorithm and least squares method are used to calculate the Perform calculations and avoid using an oscilloscope.
It reduces the cost of signal phase accuracy measurement, expands the use scenarios of measurement, and has high measurement accuracy, flexible use, lower cost, and up to 1ns.
Smart Images

Figure CN119172026A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method and system for measuring signal phase accuracy. Background Art
[0002] In the field of Precision Time Protocol (PTP) clock synchronization, the master device (MasterDevice) periodically sends synchronization messages (Sync Messages) and records the precise sending timestamp when sending; after receiving the synchronization message, the slave device (Slave Device) records the receiving timestamp.
[0003] Among them, phase accuracy and frequency accuracy are two important indicators for evaluating clock quality. In the existing technology, a wire needs to be connected from the slave device to a high-end oscilloscope, which can be used to measure the phase accuracy of the local clock signal. However, the existing measurement method must rely on a high-end oscilloscope, which is bulky, expensive, and inconvenient to use in many scenarios. Summary of the invention
[0004] The present invention provides a signal phase accuracy measurement method and system, the main purpose of which is to reduce the cost of the signal phase accuracy measurement method and expand the application scenarios of the measurement method.
[0005] In a first aspect, an embodiment of the present invention provides a method for measuring signal phase accuracy, comprising:
[0006] For any period of the PPS signal generated by the target device, calculate the phase adjustment amount of the local clock signal generated by the target device;
[0007] If the phase adjustment amount is less than the period value of the PPS signal, then obtaining the two PPS signals associated with any one period, and obtaining the first actual frequency and the second actual frequency of the local clock signal respectively corresponding to the two PPS signals;
[0008] The phase deviation of the local clock signal is calculated according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal.
[0009] Furthermore, the two PPS signals are respectively a first PPS signal and a second PPS signal, and the obtaining of the two PPS signals associated with any one cycle and obtaining a first actual frequency and a second actual frequency of local clock signals respectively corresponding to the two PPS signals include:
[0010] Acquire a first time corresponding to the first PPS signal and a first actual frequency corresponding to the local clock signal at the first time;
[0011] A second time corresponding to the second PPS signal and a second actual frequency corresponding to the local clock signal at the second time are obtained.
[0012] Further, calculating the phase deviation of the local clock signal according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal includes:
[0013] Calculating an actual frequency deviation according to the first actual frequency and the second actual frequency;
[0014] Calculating an actual frequency deviation rate according to the actual frequency deviation and the theoretical frequency;
[0015] The phase deviation is calculated according to the actual frequency deviation rate.
[0016] Further, the phase deviation of the local clock signal is calculated according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal, and is obtained by the following formula:
[0017] δ = ((f2-f1) / f)*T;
[0018] Wherein, δ represents the phase deviation, f1 represents the first actual frequency, f2 represents the second actual frequency, f represents the theoretical frequency, and T represents the period value.
[0019] Further, the calculating the phase adjustment amount of the local clock signal generated by the target device includes:
[0020] Receive a time synchronization message periodically sent by a master device, and record a first timestamp of receiving the time synchronization message;
[0021] The phase adjustment amount is calculated according to a preset algorithm based on the first timestamp and a second timestamp when the master device sends the time synchronization message.
[0022] Furthermore, the preset algorithm includes PTP protocol, Kalman filter algorithm and least squares method.
[0023] Furthermore, the first actual frequency and the second actual frequency are obtained by measuring with a frequency meter.
[0024] In a second aspect, an embodiment of the present invention provides a signal phase accuracy measurement system, including:
[0025] An adjustment module, configured to calculate a phase adjustment amount of a local clock signal generated by the target device for any period of a PPS signal generated by the target device;
[0026] A measuring module, configured to obtain the two PPS signals associated with any one period if the phase adjustment amount is less than the period value of the PPS signal, and obtain a first actual frequency and a second actual frequency of the local clock signal respectively corresponding to the two PPS signals;
[0027] A calculation module is used to calculate the phase deviation of the local clock signal according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal.
[0028] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned signal phase accuracy measurement method when executing the computer program.
[0029] In a fourth aspect, an embodiment of the present invention provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned signal phase accuracy measurement method are implemented.
[0030] The present invention proposes a method and system for measuring signal phase accuracy. In a PPS signal generated by a target device, if in a certain PPS signal period, the phase adjustment amount of a local clock signal is less than the period value of the PPS signal, in this case, two PPS signals associated with the period are obtained, and the first actual frequency and the second actual frequency of the local clock signal respectively corresponding to the two PPS signals are obtained; then, according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal, the phase deviation of the local clock signal is calculated. The signal phase accuracy measurement method provided by an embodiment of the present invention only needs to measure the first actual frequency and the second actual frequency of the local clock signal, and does not require an oscilloscope, so the use cost is lower; in addition, the measurement scenario is more flexible and the measurement accuracy is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A flow chart of a method for measuring signal phase accuracy provided by an embodiment of the present invention;
[0032] Figure 2 A schematic diagram of a local clock signal and a PPS signal provided by an embodiment of the present invention;
[0033] Figure 3A schematic diagram of the structure of a signal phase accuracy measurement system provided by an embodiment of the present invention.
[0034] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0035] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0036] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0037] In the embodiments of the present application, at least one refers to one or more; multiple refers to two or more. In the description of the present application, words such as "first", "second", "third", etc. are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0038] References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include a particular feature, structure or characteristic described in conjunction with the embodiment. Thus, in this specification, the terms "include", "comprises", "has" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0039] It should be noted that in the embodiments of the present application, "connection" can be understood as electrical connection, and the connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be either a direct connection between A and B or an indirect connection between A and B through one or more other electrical components.
[0040] Figure 1 A flow chart of a method for measuring signal phase accuracy provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:
[0041] An embodiment of the present invention provides a method for measuring signal phase accuracy. The method involves a hardware basis of a master device and a slave device. When the master device and the slave device perform clock synchronization, the master device periodically sends a message to the slave device and records an accurate sending timestamp when sending; after the slave device receives the message, it records a receiving timestamp, and the slave device calculates the phase deviation based on the sending timestamp and the receiving timestamp, as well as a predetermined phase accuracy calculation method.
[0042] In the embodiment of the present invention, the target device can be a slave device or a master device, which can be determined according to actual conditions, and the embodiment of the present invention does not specifically limit this. In the embodiment of the present invention, the target device is described as a slave device.
[0043] It should be noted that the target device generates a clock signal and a PPS (Pulse Per Second) signal. The clock signal is also called a local clock signal, which can be understood as a clock signal generated inside the target device, such as a clock signal generated by a crystal oscillator, or a clock signal output after processing the clock signal generated by a crystal oscillator; the theoretical frequency of the local clock signal is pre-set. The PPS signal is a precise time signal, and the period of the PPS signal can be determined according to actual conditions, such as 1S, 2S, 3S, etc. Usually, the period value is 1S, that is, a PPS signal is generated per second.
[0044] S110, for any period of the PPS signal generated by the target device, calculating a phase adjustment amount of a local clock signal generated by the target device;
[0045] During the clock synchronization process between the target device and the master device, in any cycle of the PPS signal generated by the target device, the target device calculates the phase adjustment amount of the local clock signal of the target device according to the timestamp.
[0046] S120, if the phase adjustment amount is less than the period value of the PPS signal, obtaining two PPS signals associated with any one period, and obtaining a first actual frequency and a second actual frequency of local clock signals respectively corresponding to the two PPS signals;
[0047] In the embodiment of the present invention, after the phase adjustment amount is calculated, the phase adjustment amount is compared with the period value of the PPS signal, and the period value is preset. If the phase adjustment amount is smaller than the period value of the PPS signal, it means that the phase adjustment amount is small, and the phase adjustment amount is ignored. It can be considered that only the frequency of the local clock signal is adjusted during the clock synchronization process within the period.
[0048] When the condition is met, two PPS signals associated with the period of the PPS signal are acquired, and then a first actual frequency and a second actual frequency of the local clock signal respectively corresponding to the two PPS signals are acquired.
[0049] S130: Calculate a phase deviation of the local clock signal according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal.
[0050] Then, the phase deviation of the local clock signal is calculated according to the first actual frequency, the second actual frequency and the theoretical frequency of the local clock signal, combined with the period value of the PPS signal.
[0051] The present invention proposes a method for measuring signal phase accuracy. In a PPS signal generated by a target device, if in a certain PPS signal period, the phase adjustment amount of a local clock signal is less than the period value of the PPS signal, in this case, two PPS signals associated with the period are obtained, and the first actual frequency and the second actual frequency of the local clock signal respectively corresponding to the two PPS signals are obtained; then, according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal, the phase deviation of the local clock signal is calculated. The signal phase accuracy measurement method provided by an embodiment of the present invention only needs to measure the first actual frequency and the second actual frequency of the local clock signal, does not need to use an oscilloscope, and has a lower cost of use; in addition, the measurement scenario is more flexible and the measurement accuracy is high.
[0052] As an implementation manner, the two PPS signals are respectively a first PPS signal and a second PPS signal, and the obtaining of the two PPS signals associated with any one cycle, and obtaining a first actual frequency and a second actual frequency of a local clock signal respectively corresponding to the two PPS signals, includes:
[0053] Acquire a first time corresponding to the first PPS signal and a first actual frequency corresponding to the local clock signal at the first time;
[0054] A second time corresponding to the second PPS signal and a second actual frequency corresponding to the local clock signal at the second time are obtained.
[0055] Figure 2 A schematic diagram of a local clock signal and a PPS signal provided by an embodiment of the present invention, such as Figure 2 As shown, any period is the T period in the figure, and the two adjacent PPS signals associated with any period are the first PPS signal and the second PPS signal. The one earlier in time is called the first PPS signal, and the one later in time is called the second PPS signal. The time of the second PPS signal minus the time of the first PPS signal is the period value.
[0056] First, obtain the first time corresponding to the first PPS signal, and based on the first time, obtain the first actual frequency of the local clock signal at this time; then obtain the second time corresponding to the second PPS signal, and based on the second time, obtain the second actual frequency of the local clock signal at this time.
[0057] The first actual frequency and the second actual frequency can be measured by a frequency meter.
[0058] In the figure, the first actual frequency is denoted by f1, and the second actual frequency is denoted by f2.
[0059] As an example, calculating the phase deviation of the local clock signal according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal includes:
[0060] Calculating an actual frequency deviation according to the first actual frequency and the second actual frequency;
[0061] Calculating an actual frequency deviation rate according to the actual frequency deviation and the theoretical frequency;
[0062] The phase deviation is calculated according to the actual frequency deviation rate.
[0063] Assuming that the frequency offset of the local clock is Δf within the cycle time, the period value of the PPS signal is T, the theoretical frequency of the local clock signal is f, and the phase adjustment value of the local clock signal is ΔT, then:
[0064] Δf / f=ΔT / T; (1)
[0065] Translating the formula yields:
[0066] ΔT=(Δf / f)*T; (2)
[0067] Assuming that when the PPS is triggered by the previous pulse, the first actual frequency of the local clock signal is f1, and when the PPS is triggered by the next pulse, the second actual frequency of the local clock signal is f2, then formula (2) can be converted to:
[0068] ΔT=(Δf / f)*T=((f2–f1) / f)*T; (3)
[0069] Among them, f2-f1 is the actual frequency deviation, and (f2–f1) / f is the actual frequency deviation rate.
[0070] That is, the phase deviation of the local clock signal:
[0071] δ=ΔT=((f2–f1) / f)*T. (4)
[0072] As an implementation manner, the calculating the phase adjustment amount of the local clock signal generated by the target device includes:
[0073] Receive a time synchronization message periodically sent by a master device, and record a first timestamp of receiving the time synchronization message;
[0074] The phase adjustment amount is calculated according to a preset algorithm based on the first timestamp and a second timestamp when the master device sends the time synchronization message.
[0075] In an embodiment of the present invention, a master device periodically sends a time synchronization message to a slave device and records a first timestamp of the time synchronization message; the slave device receives the time synchronization message and the first timestamp, and the slave device also records a second timestamp of receiving the time synchronization message, and calculates a phase adjustment amount of a local clock signal based on the first timestamp, the second timestamp, and a preset algorithm.
[0076] For example, in the embodiment of the present invention, the master device and the target device comply with the IEEE 1588v2 protocol. The IEEE 1588v2 protocol defines a precision time protocol (PTP), which is also used for clock synchronization. In the 1588 master-slave synchronization system, the processing process of the time synchronization message is roughly as follows:
[0077] (1) The master device sends a "sync" message to the slave device and records the sending time t1 into the register. t1 is the second timestamp.
[0078] (2) The slave device receives the "sync" message and records the receiving time t2, which is the first timestamp. The "sync" message is the time synchronization message.
[0079] (3) The master device sends a "follow_up" message to the slave device, and embeds the time t1 into the "follow_up" message.
[0080] (4) The slave device sends a "delay_req" message to the master device and embeds the timestamp t3.
[0081] (5) The master device receives the "delay_req" message and remembers the time t4.
[0082] (6) The master device embeds t4 into the "delay_resp" message and sends it to the slave device.
[0083] The slave device receives the t1 and t3 timestamps carried in the sync message and delay_req message sent by the master device, and calculates the phase adjustment amount in combination with the locally recorded t2 and t4 timestamps and a preset algorithm. In the embodiment of the present invention, the target device can calculate the delay and time offset between the slave device and the master device based on these four timestamps, thereby correcting the local clock signal of the slave device to achieve synchronization.
[0084] By way of example, the preset algorithms include PTP protocol, Kalman filter algorithm and least squares method.
[0085] In the embodiment of the present invention, the first timestamp and the second timestamp are acquired, and then the phase adjustment amount of the PPS signal is calculated according to any one of the PTP protocol, Kalman filtering and the least square method.
[0086] Among them, the PTP protocol: by exchanging time synchronization messages between the master and slave devices and recording the time when the time synchronization messages are sent, the network transmission delay and the deviation of the clocks between the master and slave devices are calculated. The master device periodically sends sync messages, and then sends follow_up messages to record the actual sending time; after receiving the sync message, the slave clock records the time and sends a delay_req message. After receiving the message, the master clock records the time and then sends a delay_resp message. The slave clock adjusts the local clock according to the measurement results of the network round-trip delay and clock deviation.
[0087] Kalman filter algorithm: In clock synchronization, the phase deviation or frequency deviation of the clock can be used to estimate the system state. By performing Kalman filtering on the measured time difference data, the phase adjustment amount can be estimated more accurately while taking into account the measurement noise and the dynamic characteristics of the system.
[0088] Least squares method: can be used to fit data to find the best linear relationship. In clock synchronization, the least squares method can be used to fit the phase relationship between the master and slave clocks based on multiple timestamp measurements, thereby calculating the phase adjustment.
[0089] The signal phase accuracy measurement method provided in the embodiment of the present invention only needs to measure the first actual frequency and the second actual frequency of the local clock signal, and does not require an oscilloscope, so the cost of use is lower; in addition, the measurement scenario is more flexible, the maximum accuracy can reach 1ns, and the measurement accuracy is high.
[0090] Figure 3 A schematic diagram of the structure of a signal phase accuracy measurement system provided by an embodiment of the present invention, such as Figure 3 As shown, the system includes:
[0091] The adjustment module 310 is used to calculate the phase adjustment amount of the local clock signal generated by the target device for any period of the PPS signal generated by the target device;
[0092] The measuring module 320 is used for obtaining the two PPS signals associated with any one period if the phase adjustment amount is less than the period value of the PPS signal, and obtaining the first actual frequency and the second actual frequency of the local clock signal respectively corresponding to the two PPS signals;
[0093] The calculation module 330 is used to calculate the phase deviation of the local clock signal according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal.
[0094] This embodiment is a system embodiment corresponding to the above method embodiment, and its implementation process is the same as that of the above method embodiment. For details, please refer to the above method embodiment, and this system embodiment does not make specific limitations on this.
[0095] Each module in the above-mentioned signal phase accuracy measurement system can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0096] A structural schematic diagram of a computer device provided in an embodiment of the present invention, the computer device may be a server, and the computer device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a computer storage medium and an internal memory. The computer storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the computer storage medium. The database of the computer device is used to store data generated or obtained during the execution of a method for measuring signal phase accuracy. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for measuring signal phase accuracy is implemented.
[0097] In one embodiment, a computer storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of a signal phase accuracy measurement method in the above embodiment are implemented. Alternatively, when the computer program is executed by a processor, the functions of each module / unit in the above embodiment of a signal phase accuracy measurement system are implemented.
[0098] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0099] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0100] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for measuring signal phase accuracy, characterized in that: include: For any period of the PPS signal generated by the target device, calculate the phase adjustment amount of the local clock signal generated by the target device; If the phase adjustment amount is less than the period value of the PPS signal, then obtaining the two PPS signals associated with any one period, and obtaining the first actual frequency and the second actual frequency of the local clock signal respectively corresponding to the two PPS signals; The phase deviation of the local clock signal is calculated according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal.
2. The method for measuring signal phase accuracy according to claim 1, characterized in that: The two PPS signals are respectively a first PPS signal and a second PPS signal, and the obtaining of the two PPS signals associated with any one cycle and obtaining a first actual frequency and a second actual frequency of local clock signals respectively corresponding to the two PPS signals include: Acquire a first time corresponding to the first PPS signal and a first actual frequency corresponding to the local clock signal at the first time; A second time corresponding to the second PPS signal and a second actual frequency corresponding to the local clock signal at the second time are obtained.
3. The method for measuring signal phase accuracy according to claim 1, characterized in that: The calculating the phase deviation of the local clock signal according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal includes: Calculating an actual frequency deviation according to the first actual frequency and the second actual frequency; Calculating an actual frequency deviation rate according to the actual frequency deviation and the theoretical frequency; The phase deviation is calculated according to the actual frequency deviation rate.
4. The method for measuring signal phase accuracy according to claim 3, characterized in that: The phase deviation of the local clock signal is calculated according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal, and is obtained by the following formula: δ = ((f2-f1) / f)*T; Wherein, δ represents the phase deviation, f1 represents the first actual frequency, f2 represents the second actual frequency, f represents the theoretical frequency, and T represents the period value.
5. The method for measuring signal phase accuracy according to claim 1, characterized in that: The calculating the phase adjustment amount of the local clock signal generated by the target device includes: Receive a time synchronization message periodically sent by a master device, and record a first timestamp of receiving the time synchronization message; The phase adjustment amount is calculated according to a preset algorithm based on the first timestamp and a second timestamp when the master device sends the time synchronization message.
6. The method for measuring signal phase accuracy according to claim 5, characterized in that: The preset algorithms include PTP protocol, Kalman filter algorithm and least squares method.
7. The method for measuring signal phase accuracy according to claim 1, characterized in that: The first actual frequency and the second actual frequency are measured by a frequency meter.
8. A signal phase accuracy measurement system, characterized in that: include: An adjustment module, configured to calculate a phase adjustment amount of a local clock signal generated by the target device for any period of a PPS signal generated by the target device; A measuring module, configured to obtain the two PPS signals associated with any one period if the phase adjustment amount is less than the period value of the PPS signal, and obtain a first actual frequency and a second actual frequency of the local clock signal respectively corresponding to the two PPS signals; A calculation module is used to calculate the phase deviation of the local clock signal according to the first actual frequency, the second actual frequency, the theoretical frequency of the local clock signal, and the period value of the PPS signal.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the processor implements the steps of the method for measuring signal phase accuracy according to any one of claims 1 to 7.
10. A computer storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for measuring signal phase accuracy according to any one of claims 1 to 7 are implemented.
