CN110687773B - Method, device and system for measuring time service precision of time unification system - Google Patents

Method, device and system for measuring time service precision of time unification system Download PDF

Info

Publication number
CN110687773B
CN110687773B CN201910910969.5A CN201910910969A CN110687773B CN 110687773 B CN110687773 B CN 110687773B CN 201910910969 A CN201910910969 A CN 201910910969A CN 110687773 B CN110687773 B CN 110687773B
Authority
CN
China
Prior art keywords
signal
counter
time
level signal
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910910969.5A
Other languages
Chinese (zh)
Other versions
CN110687773A (en
Inventor
梁军
朱振宇
蔡保国
张渊
夏弋
林菡
景光波
孙振超
冉建华
李俊
易明超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
722th Research Institute of CSIC
Original Assignee
722th Research Institute of CSIC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 722th Research Institute of CSIC filed Critical 722th Research Institute of CSIC
Priority to CN201910910969.5A priority Critical patent/CN110687773B/en
Publication of CN110687773A publication Critical patent/CN110687773A/en
Application granted granted Critical
Publication of CN110687773B publication Critical patent/CN110687773B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04DAPPARATUS OR TOOLS SPECIALLY DESIGNED FOR MAKING OR MAINTAINING CLOCKS OR WATCHES
    • G04D7/00Measuring, counting, calibrating, testing or regulating apparatus
    • G04D7/002Electrical measuring and testing apparatus
    • G04D7/003Electrical measuring and testing apparatus for electric or electronic clocks
    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R20/00Setting the time according to the time information carried or implied by the radio signal
    • G04R20/02Setting the time according to the time information carried or implied by the radio signal the radio signal being sent by a satellite, e.g. GPS

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Measurement Of Unknown Time Intervals (AREA)

Abstract

The invention discloses a method, a device and a system for measuring time service precision of a time unification system, and belongs to the field of time interval measurement. The method comprises the following steps: receiving a reference signal and an output signal of a device; the output signal is a pulse per second signal generated by the equipment based on a time service signal provided by a time unified system, and the reference signal is a pulse per second signal generated by GPS receiving equipment; when the first signal changes from the first level signal to the second level signal, controlling the counter to start counting; the first signal is one of the output signal and the reference signal, and the first level signal and the second level signal are two different level signals of a high level signal and a low level signal; when the second signal changes from the first level signal to the second level signal, controlling the counter to stop counting; the second signal is one of the output signal and the reference signal except the first signal; the time interval between the output signal and the reference signal is determined according to the number of times counted by the counter. The invention can improve the accuracy.

Description

Method, device and system for measuring time service precision of time unification system
Technical Field
The invention relates to the field of time interval measurement, in particular to a method, a device and a system for measuring time service precision of a time unification system.
Background
The time Unified system (English: Unified time system) provides time service for each device of the measurement and control system in the fields of aerospace and the like through a wireless channel, and provides Unified standard time signals and standard frequency signals for each device. Each device is kept on time after acquiring the time, and outputs the pulse-per-second signal according to the standard frequency to provide a time reference for respective data processing processes such as measurement and control, so that the unification of the whole measurement and control system on time and frequency is realized, and the requirement of the data processing of the measurement and control system in the fields of aerospace and the like on time information is met.
In the aerospace field, the measurement and control system has various devices, large quantity and wide distribution, the performance of the time unification system directly influences the measurement precision of the measurement and control system, whether the measurement data and the measurement events obtained or recorded by each measurement device have use values and whether the control time of the key events is accurate, and if the unified time standard does not exist, the task cannot be completed at all. Therefore, after the time unification system gives time to each device, it is generally checked whether the time and frequency of each device have unity.
In the existing inspection method, a pulse-per-second signal output by a time unification system is used as a reference signal, and the time service precision of the time unification system is obtained by adopting the deviation of the pulse-per-second signal output by digital oscilloscope measurement equipment relative to the reference signal.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
a certain distance exists between the time unifying system and the equipment, and the time difference exists between the second pulse signal output by the time unifying system and the time when the second pulse signal output by the digital oscilloscope measuring equipment is transmitted to the digital oscilloscope, so that the signal deviation obtained by the digital oscilloscope measurement is problematic, and the time service precision of the time unifying system cannot be accurately measured. And the distances between each device and the time unification system are different, and the time difference between the pulse-per-second signal output by each device and the pulse-per-second signal output by the time unification system and transmitted to the digital oscilloscope is different, so that the judgment result of whether the time and the frequency of each device are unified is influenced.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a system for measuring time service precision of a time unification system, which can solve the problem that the time service precision of the time unification system in the prior art is inaccurate. The technical scheme is as follows:
in one aspect, an embodiment of the present invention provides a method for measuring time service precision of a time unification system, where the method includes:
receiving a reference signal and an output signal of a device; the output signal is a pulse per second signal generated by the equipment based on a time service signal provided by the time unified system, and the reference signal is a pulse per second signal generated by global positioning system receiving equipment;
when the first signal changes from the first level signal to the second level signal, the counter is controlled to start counting once every 1/M seconds, M is more than or equal to 106(ii) a The first signal is one of the output signal and the reference signal, and the first level signal and the second level signal are two different level signals of a high level signal and a low level signal;
when the second signal changes from the first level signal to the second level signal, controlling the counter to stop counting; the second signal is one of the output signal and the reference signal other than the first signal;
and determining the time interval between the output signal and the reference signal according to the number of times counted by the counter.
Optionally, the measurement method further comprises:
initializing the counter prior to said receiving the reference signal and the output signal of the device.
Further, the determining the time interval between the output signal and the reference signal according to the number of times counted by the counter includes:
calculating the time interval T between the output signal and the reference signal using the following formula0
T0=t×((N+C1)×n2+(n1+C2));
Wherein t is 1/M, N is the maximum count value of the counter, N1 is the current count value of the counter, N2 is the overflow number of the counter, C1 is the reaction time of the overflow of the counter, and C2 is the reaction time of the start and stop of the counting of the counter.
Still further, the measurement method further includes:
receiving a reference signal with a pulse width w1 before said receiving the reference signal and the output signal of the device;
when the reference signal with the pulse width of w1 changes from a first level signal to a second level signal, controlling the counter to count once every 1/M seconds for the first time;
when the reference signal with the pulse width of w1 changes from a second level signal to a first level signal, controlling the counter to stop counting for the first time;
receiving a reference signal with the pulse width of w 2;
when the reference signal with the pulse width of w2 changes from a first level signal to a second level signal, controlling the counter to count once every 1/M seconds for the second time;
when the reference signal with the pulse width of w2 changes from the second level signal to the first level signal, controlling the counter to stop counting for the second time;
and determining the reaction time C1 of the counter overflow and the reaction time C2 of the counter for starting and stopping counting according to the number of times of the first counting of the counter, the number of times of the second counting of the counter, the pulse width w1 of the reference signal and the pulse width w2 of the reference signal.
Further, the measurement method further includes:
after the first signal is changed from the first level signal to the second level signal, when the number of times of overflow of the counter reaches a set number of times and the second signal is not changed from the first level signal to the second level signal, the counter is initialized.
Optionally, the measurement method further comprises:
inverting the output signal when the pulse starting point of the output signal is changed from a second level signal to a first level signal;
and when the pulse starting point of the reference signal is changed from a second level signal to a first level signal, inverting the reference signal.
Optionally, the measurement method further comprises:
and determining the time service precision of the time unification system according to the time interval between the output signal of each device for providing the time service signal by the time unification system and the reference signal.
On the other hand, the embodiment of the present invention provides a measuring apparatus for time service precision of a time unification system, where the measuring apparatus includes:
the receiving module is used for receiving a reference signal and an output signal of the equipment; the output signal is a pulse per second signal generated by the equipment based on a time service signal provided by the time unified system, and the reference signal is a pulse per second signal generated by global positioning system receiving equipment;
a starting module for controlling the counter to start counting once every 1/M seconds when the first signal changes from the first level signal to the second level signal, wherein M is more than or equal to 106(ii) a The first signal is one of the output signal and the reference signal, and the first level signal and the second level signal are two different level signals of a high level signal and a low level signal;
the stopping module is used for controlling the counter to stop counting when the second signal is changed from the first level signal to the second level signal; the second signal is one of the output signal and the reference signal other than the first signal;
and the determining module is used for determining the time interval between the output signal and the reference signal according to the number of times counted by the counter.
In another aspect, an embodiment of the present invention provides a system for measuring time service precision of a time unification system, where the system includes:
the global positioning system receiving module is used for generating a pulse per second signal as a reference signal;
the crystal oscillator is used for providing a time reference for the processor;
the processor is used for receiving a reference signal input by the global positioning system module and an output signal of the equipment, wherein the output signal is a pulse per second signal generated by the equipment based on a time service signal provided by the time unified system; when the first signal changes from the first level signal to the second level signal, the counter is controlled to start counting once every 1/M seconds, M is more than or equal to 106(ii) a The first signal is one of the output signal and the reference signal, and the first level signal and the second level signal are two different level signals of a high level signal and a low level signal; when the second signal changes from the first level signal to the second level signal, controlling the counter to stop counting; the second signal is one of the output signal and the reference signal other than the first signal; and determining the time interval between the output signal and the reference signal according to the number of times counted by the counter.
Optionally, the measurement system further comprises:
a battery for powering the global positioning system module, the crystal oscillator, and the processor.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
the pulse-per-second signal generated by the global positioning system receiving equipment is used as the reference signal, the pulse-per-second signal generated by the global positioning system receiving equipment is synchronous with the time of the global positioning system, time delay caused by the existence of transmission distance is avoided, difference caused by different transmission distances is avoided, output signals of all equipment of the time unified system time service are compared with the same reference signal, and the accuracy of time service precision measurement is guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is an application scenario diagram of a method for measuring time service precision of a time unification system according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for measuring time service precision of a time unification system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a pulse-per-second signal provided by an embodiment of the present invention;
FIG. 4 is a flowchart of another method for measuring time service precision of a time unification system according to an embodiment of the present invention;
FIG. 5 is a flowchart of another method for measuring time service precision of a time unification system according to an embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram of a measurement apparatus for time service precision of a time unification system according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a measurement system for time service precision of a time unification system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The following briefly introduces an application scenario of the time service precision measurement method of the time unification system provided by the embodiment of the present invention. Fig. 1 is an application scenario diagram of a method for measuring time service precision of a time unification system according to an embodiment of the present invention. Referring to fig. 1, during flight of the aircraft 100, various devices of the measurement and control system measure and control the aircraft 100. For example, the first measurement device 210, the second measurement device 220, and the third measurement device 230 in the measurement and control system are used to measure the position, velocity, acceleration, and attitude of the aircraft 100, and the control device 240 in the measurement and control system is used to control the flight state of the aircraft 100. As shown in fig. 1, each device of the measurement and control system is respectively disposed in different areas on the ground, and the time unification system 300 provides unified standard time signals and standard frequency signals for the first measurement device 210, the second measurement device 220, the third measurement device 230, and the control device 240, respectively, when performing unified time service on each device of the measurement and control system, so that the entire measurement and control system is consistent in time and frequency, and meets the data processing requirements.
The embodiment of the invention provides a method for measuring time service precision of a time unified system. Fig. 2 is a flowchart of a method for measuring time service precision of a time unification system according to an embodiment of the present invention. Referring to fig. 2, the measuring method includes:
step 101: a reference signal and an output signal of the device are received.
In this embodiment, the output signal is a Pulse Per Second (PPS) signal generated by the device based on the time service signal provided by the time unification system. The equipment receives a standard time signal and a standard frequency signal provided by the time unifying system, and outputs a pulse per second signal by taking the standard frequency signal as a reference on the basis of the standard time signal. The pulse per second signal output by the equipment is used for time service precision detection and providing a time correction signal for other equipment or modules of the system.
The reference signal is a pulse per second signal generated by a Global Positioning System (GPS) receiving device. The pulse per second signal generated by the GPS receiving equipment is completely synchronous with the GPS time. And the standard time signal and the standard frequency signal provided by the time unifying system are generally derived from the time signal in the GPS, and are usually corrected by using the time signal in the GPS. Therefore, the precision deviation between the second pulse generated by the GPS receiving equipment and the reference second pulse provided by the time unifying system reaches microsecond level or even nanosecond level, so that the high-precision second pulse signal generated by the GPS receiving equipment can replace the reference second pulse signal provided by the time unifying system to measure the time service precision of the time unifying system. In addition, the GPS receiving equipment has small volume, light weight, convenient power supply and convenient integration.
Fig. 3 is a schematic diagram of a pulse-per-second signal according to an embodiment of the present invention. Referring to fig. 3, the pulse-per-second signal is a signal in which one pulse occurs every second. In general, in a one-second signal, the starting point a is a time at which the level changes in a specific manner, i.e., a start time of a pulse; the end point B is a time point at which the level changes again in a specific manner, i.e., a start point of the next second signal; the pulse width W is the duration of a level signal that varies in a particular manner in a one-second signal.
Taking fig. 3 as an example, in the one-second signal, the starting point may be the time when the signal changes from the low level signal to the high level signal, i.e. the pulse rising edge; the end point is the time when the signal changes from the low level signal to the high level signal again; the pulse width is the duration of a high level signal in a one second signal.
In practical applications, in the one-second signal, the starting point may also be a time when the signal changes from a high-level signal to a low-level signal, i.e., a pulse falling edge; the end point is the time when the signal changes from the high level signal to the low level signal again; the pulse width is the duration of the low level signal in the one second signal.
Step 102: when the first signal changes from the first level signal to the second level signal, the counter is controlled to start counting once every 1/M seconds, M is more than or equal to 106
In the present embodiment, the first signal is one of the output signal and the reference signal. When the output signal is changed from the first level signal to the second level signal, the first signal is the output signal; when the reference signal is changed from the first level signal to the second level signal, the first signal is the reference signal.
When the output signal and the reference signal are simultaneously changed from the first level signal to the second level signal, no operation is performed.
The first level signal and the second level signal are two different level signals of a high level signal and a low level signal. When the first level signal is a high level signal, the second level signal is a low level signal; when the first level signal is a low level signal, the second level signal is a high level signal.
In practical application, the interrupt response mode of the processor adopts edge triggering, such as changing from a first level signal to a second level signal, so that when the signal received by the interrupt response end of the processor changes from the first level signal to the second level signal, the processor can generate an interrupt response to control the action of the counter. For example, the reference signal may be coupled to an interrupt response port of the processor, such as INT 0; the output signal of the device is coupled to another interrupt-responsive terminal of the processor, such as INT 1. When the reference signal received by the INT0 or the output signal received by the INT1 is first changed from the first level signal to the second level signal, the counter is controlled to start counting.
As described above, the start of the one-second signal may be a pulse rising edge or a pulse falling edge, and the manner of edge triggering may be rising edge triggering or falling edge triggering. Accordingly, the measurement method may further include:
inverting the output signal when the pulse start point of the output signal is changed from the second level signal to the first level signal;
when the pulse start point of the reference signal is changed from the second level signal to the first level signal, the reference signal is inverted.
For example, the interrupt triggering mode of the processor is rising edge triggering, that is, the first level signal is a low level signal, and the second level signal is a high level signal. If the pulse starting point of the output signal is changed from a high-level signal to a low-level signal, inverting the output signal, and if the pulse starting point of the inverted signal is changed from the low-level signal to the high-level signal, just triggering the processor to interrupt; if the pulse starting point of the reference signal is changed from a high-level signal to a low-level signal, the reference signal is inverted, and the pulse starting point of the inverted signal is changed from the low-level signal to the high-level signal, so that the processor interrupt can be triggered.
For another example, the interrupt triggering mode of the processor is falling edge triggering, that is, the first level signal is a high level signal, and the second level signal is a low level signal. If the pulse starting point of the output signal is changed from a low-level signal to a high-level signal, inverting the output signal, and if the pulse starting point of the inverted signal is changed from the high-level signal to the low-level signal, just triggering the processor to interrupt; if the pulse starting point of the reference signal is changed from a low-level signal to a high-level signal, the reference signal is inverted, and the pulse starting point of the inverted signal is changed from the high-level signal to the low-level signal, so that the processor interrupt can be triggered.
In practical applications, the inversion can be implemented by using an inverter.
Accordingly, the interrupt triggering mode of the processor is rising edge triggering, that is, the first level signal is a low level signal, and the second level signal is a high level signal. If the pulse starting point of the output signal is changed from a low-level signal to a high-level signal, the output signal is not inverted, and the processor can be triggered to interrupt; if the start of the pulse of the reference signal is to change from a low level signal to a high level signal, the reference signal is not inverted and processor interrupts can be triggered.
The interrupt triggering mode of the processor is falling edge triggering, namely the first level signal is a high level signal, and the second level signal is a low level signal. If the pulse starting point of the output signal is changed from a high level signal to a low level signal, the output signal is not inverted, and the processor can be triggered to interrupt; if the start of the pulse of the reference signal is to change from a high level signal to a low level signal, the reference signal is not inverted and a processor interrupt can be triggered.
The counter is arranged in the processor, and a crystal oscillator arranged outside provides a clock signal, so that the counter can count once every 1/M seconds. For example, a crystal oscillator generates a frequency signal of 24MHz and inputs the frequency signal into a processor, each machine cycle of the processor includes 12 clock cycles, and since the instruction execution time of the processor is in units of machine cycles, the execution time t of a single instruction is 12/24MHz 0.5 μ s, that is, the time t taken by the processor for each counting is 0.5 μ s, and the measurement accuracy can reach 0.5 μ s theoretically.
Optionally, before step 101, the measurement method may further include:
a counter is initialized.
The counter is initialized, the current count value and the overflow frequency of the counter are reset, after the counter stops counting, the numerical value of the counter is the counted numerical value, the initial value of the counter does not need to be considered, and the processing is convenient.
In practical applications, the counter may also be initialized before step 102, that is, before the counting is started. Before step 101, the counter is initialized, step 101 is executed again, the reference signal and the output signal of the device are simultaneously accessed into the processor, the measurement can be carried out from the initial time of the reference signal and the initial time of the output signal, and the generation of errors is avoided as much as possible.
Step 103: and controlling the counter to stop counting when the second signal changes from the first level signal to the second level signal.
In the present embodiment, the second signal is one of the output signal and the reference signal other than the first signal. For example, when the first signal is the output signal, the second signal is the reference signal; when the first signal is the reference signal, the second signal is the output signal.
Optionally, after step 102, the measurement method may further include:
after the first signal is changed from the first level signal to the second level signal, when the number of times of the counter overflow reaches the set number of times and the second signal is not changed from the first level signal to the second level signal, the counter is initialized.
After the counter starts counting, if the second signal is not changed from the first level signal to the second level signal within the set time, it may be that the time intervals of the first signal and the second signal are just staggered, at this time, the counter is initialized, and the measurement is performed again, that is, step 101 is performed, so as to accurately measure the time intervals of the first signal and the second signal.
For example, the first signal lags the second signal by 10ms, but the measurement starts 5ms after the start of the pulse of the second signal, so that the counter starts counting when the start of the pulse of the first signal occurs and ends counting when the start of the pulse of the second signal again occurs, resulting in a second signal that lags the first signal by 990ms, unlike the commonly used representation. If the number of times of the counter overflow is limited, for example, 20 times, the measurement can be restarted when the pulse start point of the second signal is found to be absent 100ms after the pulse start point of the first signal is present, so that the above situation can be effectively avoided, and an accurate measurement result can be obtained.
Step 104: the time interval between the output signal and the reference signal is determined according to the number of times counted by the counter.
Optionally, this step 104 may include:
the time interval T between the output signal and the reference signal is calculated using the following formula0
T0=t×((N+C1)×n2+(n1+C2));
Where, t is 1/M, N is the maximum count value of the counter, N1 is the current count value of the counter, N2 is the overflow number of the counter, C1 is the reaction time of the overflow of the counter, and C2 is the reaction time of the start and stop of the counting of the counter.
And reducing the maximum count value of the counter by using the overflow times of the counter, and reducing the counting requirement of the counter. But also takes the reaction time of the overflow of the counter and the reaction time of the start and stop of the counting of the counter into consideration, thereby being beneficial to the accuracy of the measurement.
Optionally, before step 101, the measurement method may further include:
receiving a reference signal having a pulse width w1 prior to receiving the reference signal and the output signal of the device;
when the reference signal with the pulse width of w1 changes from the first level signal to the second level signal, controlling the counter to count once every 1/M seconds for the first time;
when the reference signal with the pulse width of w1 changes from the second level signal to the first level signal, controlling the counter to stop counting for the first time;
receiving a reference signal with the pulse width of w 2;
when the reference signal with the pulse width of w2 changes from the first level signal to the second level signal, controlling the counter to count once every 1/M seconds for the second time;
when the reference signal with the pulse width of w2 changes from the second level signal to the first level signal, controlling the counter to stop counting for the second time;
according to the number of times of the first counting of the counter, the number of times of the second counting of the counter, the pulse width w1 of the reference signal and the pulse width w2 of the reference signal, the reaction time C1 of the overflow of the counter and the reaction time C2 of the start and stop of the counting of the counter are determined.
The measurement is carried out for a plurality of times by changing the pulse width of the reference signal, and the reaction time of the overflow of the counter and the reaction time of the start and stop of the counting of the counter are obtained. It should be noted that the reaction time may be measured once, and then the result obtained by the previous measurement may be directly substituted into a formula for calculation.
In practical application, the pulse width of the reference signal can be set by software, and the setting range can be 20 ms-980 ms. After being set by software, the measurement confirmation can be performed by using a digital oscilloscope, and the actual measurement result is taken as the standard.
After the pulse setting of the reference signal, the reference signal and the inverted signal of the reference signal may be simultaneously input to two interrupt response terminals of the processor. For example, reference signal input INT0, inverted signal input INT1 of the reference signal; alternatively, the reference signal is input INT1 and the inverted signal of the reference signal is input INT 0. When the pulse starting point of the reference signal appears, the pulse starting point of the inverted signal of the reference signal appears simultaneously, one of the reference signal and the inverted signal of the reference signal meets the response condition of processor interrupt, and the counter is controlled to start counting; when the pulse end point of the reference signal appears, the pulse end point of the inverted signal of the reference signal appears simultaneously, the other of the reference signal and the inverted signal of the reference signal meets the response condition of processor interrupt, and the counter is controlled to finish counting. The pulse width of the reference signal is changed and the above process is performed again.
For example, when the pulse of the reference signal starts at a rising edge and ends at a falling edge, the pulse of the inverted signal of the reference signal starts at a falling edge and ends at a rising edge. If the interrupt response condition of the processor is a rising edge trigger, when the pulse of the reference signal and the pulse of the inverted signal of the reference signal occur simultaneously, the pulse starting point of the reference signal controls the counter to start counting, and the pulse end point of the inverted signal of the reference signal controls the counter to stop counting. If the interrupt response condition of the processor is a falling edge trigger, when the pulse of the reference signal and the pulse of the inverted signal of the reference signal occur simultaneously, the pulse starting point of the inverted signal of the reference signal controls the counter to start counting, and the pulse end point of the reference signal controls the counter to stop counting.
For another example, when the pulse of the reference signal starts at a falling edge and ends at a rising edge, the pulse of the inverted signal of the reference signal starts at a rising edge and ends at a falling edge. If the interrupt response condition of the processor is a rising edge trigger, when the pulse of the reference signal and the pulse of the inverted signal of the reference signal occur simultaneously, the pulse starting point of the inverted signal of the reference signal controls the counter to start counting, and the pulse end point of the reference signal controls the counter to stop counting. If the interrupt response condition of the processor is a falling edge trigger, when the pulse of the reference signal and the pulse of the inverted signal of the reference signal occur simultaneously, the pulse starting point of the reference signal controls the counter to start counting, and the pulse end point of the inverted signal of the reference signal controls the counter to stop counting.
Optionally, the measurement method may further include:
and determining the time service precision of the time unification system according to the time interval between the output signal of each device for providing the time service signal by the time unification system and the reference signal.
When the time intervals between the output signals of the devices which provide the time service signals by the time unification system and the reference signals are the same, the output signals of the devices which provide the time service signals by the time unification system have unity, and the time service precision of the time unification system is optimal.
In practical application, the time service precision of the time unification system can be evaluated by adopting the difference between the maximum value and the minimum value of the time interval between the output signal of each device for providing the time service signal by the time unification system and the reference signal; the time service accuracy of the time unification system may be evaluated by using a larger difference value of a difference between a maximum value and an average value of time intervals between the output signal of each device that provides the time service signal and the reference signal and a difference between the average value and the minimum value.
In addition, it is also possible to determine whether the output signal leads or lags the reference signal based on the first signal and the second signal.
For example, when the first signal is an output signal and the second signal is a reference signal, the output signal leads the reference signal; when the first signal is the reference signal and the second signal is the output signal, the output signal lags the reference signal.
For another example, when the third signal is the output signal and the second signal is the reference signal, the output signal leads the reference signal; when the third signal is the reference signal and the second signal is the output signal, the output signal lags the reference signal.
In practical application, the measurement result can be visually displayed on a display screen. In addition, the whole device can be powered by a battery, and is convenient to use and carry.
According to the embodiment of the invention, the pulse-per-second signal generated by the global positioning system receiving equipment is used as the reference signal, the pulse-per-second signal generated by the global positioning system receiving equipment is time-synchronized with the global positioning system, so that time delay caused by the existence of transmission distance and difference caused by different transmission distances do not exist, the output signals of all equipment in time service of the time unified system are compared with the same reference signal, and the accuracy of time service precision measurement is ensured. In addition, the level change of the two signals is used as interruption, the counter is controlled to start counting and stop counting respectively, the time interval between the two signals is obtained according to the counting times of the counter, a digital oscilloscope does not need to be carried to reach each device for measurement, the situation that the digital oscilloscope needs to be additionally provided with a power supply can be avoided, and the problem of power utilization difficulty is solved. And the whole process is automatically controlled by the processor, manual adjustment is not needed, and the requirements on operators can be greatly reduced.
The embodiment of the invention provides another method for measuring the time service precision of a time unified system, which is a specific implementation of the method for measuring the time service precision of the time unified system provided by the figure 2. Fig. 4 is a flowchart of a method for measuring time service precision of a time unification system according to an embodiment of the present invention. Referring to fig. 4, the measuring method includes:
step 201: a counter is initialized.
Step 202: a reference signal and an output signal of the device are received.
In this embodiment, step 202 may be the same as step 101, and will not be described in detail here.
Step 203: when the reference signal changes from the first level signal to the second level signal, the counter is controlled to start counting once every 1/M seconds, M is more than or equal to 106. When the number of times of the counter overflow does not reach the set number of times and the output signal is changed from the first level signal to the second level signal, executing step 204; when the number of times of the counter overflow reaches the set number of times and the output signal is not changed from the first level signal to the second level signal, step 201 is executed.
In this embodiment, step 203 may be the same as step 102, and will not be described in detail here.
Step 204: and controlling the counter to stop counting.
In this embodiment, step 204 may be the same as step 103, and will not be described in detail here.
Step 205: the time interval between the output signal and the reference signal is determined according to the number of times counted by the counter.
In this embodiment, step 205 may be the same as step 104, and is not described in detail here.
In practical applications, after step 201 to step 205 are executed in sequence, step 201 to step 205 may be executed again, and the measurement result of the time service precision is obtained in real time by cycling once per second.
The embodiment of the invention provides another method for measuring the time service precision of a time unified system, which is another specific implementation of the method for measuring the time service precision of the time unified system provided by fig. 2. Fig. 5 is a flowchart of a method for measuring time service precision of a time unification system according to an embodiment of the present invention. Referring to fig. 5, the measuring method includes:
step 301: a counter is initialized.
Step 302: a reference signal and an output signal of the device are received.
In this embodiment, step 302 may be the same as step 101, and will not be described in detail here.
Step 303: when the output signal changes from the first level signal to the second level signal, the counter is controlled to start counting once every 1/M seconds, M is more than or equal to 106. When the number of times of the counter overflow does not reach the set number of times and the reference signal is changed from the first level signal to the second level signal, executing step 304; when the number of times of the counter overflow reaches the set number of times and the reference signal is not changed from the first level signal to the second level signal, step 301 is performed.
In this embodiment, step 303 may be the same as step 102, and is not described in detail here.
Step 304: and controlling the counter to stop counting.
In this embodiment, step 304 may be the same as step 103, and will not be described in detail here.
Step 305: the time interval between the output signal and the reference signal is determined according to the number of times counted by the counter.
In this embodiment, step 305 may be the same as step 104, and is not described in detail here.
In practical applications, after the steps 301 to 305 are executed in sequence, the steps 301 to 305 may be executed again, and the measurement result of the time service precision is obtained in real time by performing a loop once per second.
The embodiment of the invention provides a device for measuring the time service precision of a time unified system, which is suitable for realizing a method for measuring the time service precision of the time unified system shown in at least one of figures 2, 4 and 5. Fig. 6 is a schematic structural diagram of a measurement apparatus for time service precision of a time unification system according to an embodiment of the present invention.
Referring to fig. 6, the measuring apparatus includes:
a receiving module 501, configured to receive a reference signal and an output signal of a device; the output signal is a pulse per second signal generated by the equipment based on a time service signal provided by a time unified system, and the reference signal is a pulse per second signal generated by the global positioning system receiving equipment;
a start module 502 for controlling the counter to start counting once every 1/M seconds when the first signal changes from the first level signal to the second level signal, M ≧ 106(ii) a The first signal is one of the output signal and the reference signal, and the first level signal and the second level signal are two different level signals of a high level signal and a low level signal;
a stopping module 503, configured to control the counter to stop counting when the second signal changes from the first level signal to the second level signal; the second signal is one of the output signal and the reference signal except the first signal;
a determining module 504, configured to determine a time interval between the output signal and the reference signal according to the number of times counted by the counter.
Optionally, the measuring device may further include:
an initialization module 505 for initializing the counter before receiving the reference signal and the output signal of the device.
Further, the determining module 504 may be configured to calculate the time interval T between the output signal and the reference signal using the following formula0
T0=t×((N+C1)×n2+(n1+C2));
Where, t is 1/M, N is the maximum count value of the counter, N1 is the current count value of the counter, N2 is the overflow number of the counter, C1 is the reaction time of the overflow of the counter, and C2 is the reaction time of the start and stop of the counting of the counter.
Optionally, the receiving module 501 may be further configured to receive a reference signal with a pulse width w1 before receiving the reference signal and the output signal of the apparatus;
the starting module 502 may be further configured to control the counter to start counting every 1/M seconds for the first time when the reference signal with the pulse width w1 changes from the first level signal to the second level signal;
the stopping module 503 may be further configured to control the counter to stop counting for the first time when the reference signal with the pulse width w1 changes from the second level signal to the first level signal;
the receiving module 501 may be further configured to receive a reference signal with a pulse width w 2;
the starting module 502 may be further configured to control the counter to start counting every 1/M seconds for the second time when the reference signal with the pulse width w2 changes from the first level signal to the second level signal;
the stopping module 503 may be further configured to control the counter to stop counting for a second time when the reference signal with the pulse width w2 changes from the second level signal to the first level signal;
the determination module 504 may be further configured to determine a reaction time C1 of the counter overflow and a reaction time C2 of the counter starting and stopping counting according to the number of times of the first counting by the counter, the number of times of the second counting by the counter, a pulse width w1 of the reference signal, and a pulse width w2 of the reference signal.
Further, the initialization module 505 may be further configured to initialize the counter when the number of times the counter overflows reaches a set number of times and the second signal does not change from the first level signal to the second level signal after the first signal changes from the first level signal to the second level signal.
Optionally, the measuring device may further include:
the phase inversion module is used for inverting the output signal when the pulse starting point of the output signal is changed from the second level signal to the first level signal; when the pulse start point of the reference signal is changed from the second level signal to the first level signal, the reference signal is inverted.
Optionally, the determining module 504 may be further configured to determine the time service precision of the time unification system according to a time interval between an output signal of each device that provides the time service signal by the time unification system and the reference signal.
The embodiment of the invention provides a time service precision measuring system of a time unified system, which is suitable for a hardware to realize the time service precision measuring method of the time unified system shown in figure 2, figure 4 or figure 5. Fig. 7 is a schematic structural diagram of a measurement system for time service precision of a time unification system according to an embodiment of the present invention. Referring to fig. 7, the measuring system includes:
a GPS receiving module 601, configured to generate a pulse-per-second signal as a reference signal;
a crystal oscillator 602 for providing a time reference for the processor;
the processor 603 is configured to receive a reference signal input by the gps module and an output signal of the device, where the output signal is a pulse per second signal generated by the device based on a time service signal provided by the time unification system; when the first signal changes from the first level signal to the second level signal, the counter is controlled to start counting once every 1/M seconds, M is more than or equal to 106(ii) a The first signal is one of the output signal and the reference signal, and the first level signal and the second level signal are two different level signals of a high level signal and a low level signal; when the second signal changes from the first level signal to the second level signal, controlling the counter to stop counting; the second signal is one of the output signal and the reference signal except the first signal; the time interval between the output signal and the reference signal is determined according to the number of times counted by the counter.
Optionally, the measurement system may further include:
a battery 604 for powering the global positioning system module, the crystal oscillator, and the processor.
Optionally, the measurement system may further include:
an inverter for inverting the output signal when a pulse start point of the output signal is changed from the second level signal to the first level signal; when the pulse start point of the reference signal is changed from the second level signal to the first level signal, the reference signal is inverted.
Optionally, the measurement system may further include:
a display 605 for outputting the time interval between the output signal and the reference signal.
In practical application, the INT0 port of the processor 603 is inputted with the reference signal, i.e. the GPS receiving module 601 is connected with the INT0 port of the processor 603; the output signal of the device 200 is input to the INT1 port of the processor 603, i.e. the device 200 is connected to the INT1 port of the processor 603; the inverter may be connected in series between the GPS receive module 601 and the INT0 port of the processor 603, or between the device 200 and the INT1 port of the processor 603. The crystal oscillator 602 is connected to a clock port of the processor 603, the display screen 605 is connected to an output port of the processor 603, and the battery 604 is connected to a power port of the processor 603, the GPS receiving module 601, and the display screen 605, respectively.
It should be noted that: the above described measuring device for time service precision of a time unified system is only illustrated by the above described division of the functional modules when measuring the time service precision of the time unified system, and in practical applications, the above described function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. In addition, the measurement device of the time service precision of the time unified system provided by the above embodiment and the measurement method embodiment of the time service precision of the time unified system belong to the same concept, and the specific implementation process thereof is detailed in the method embodiment and is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. A measuring method for time service precision of a time unification system is characterized by comprising the following steps:
receiving a reference signal and an output signal of a device; the output signal is a pulse per second signal generated by the equipment based on a time service signal provided by the time unified system, and the reference signal is a pulse per second signal generated by global positioning system receiving equipment;
when the first signal changes from the first level signal to the second level signal, the counter is controlled to start counting once every 1/M seconds, M is more than or equal to 106(ii) a The first signal is one of the output signal and the reference signal, and the first level signal and the second level signal are two different level signals of a high level signal and a low level signal;
when the second signal changes from the first level signal to the second level signal, controlling the counter to stop counting; the second signal is one of the output signal and the reference signal other than the first signal;
calculating the time interval T between the output signal and the reference signal using the following formula0
T0=t×((N+C1)×n2+(n1+C2));
Wherein t is 1/M, N is the maximum count value of the counter, N1 is the current count value of the counter, N2 is the overflow number of the counter, C1 is the reaction time of the overflow of the counter, and C2 is the reaction time of the start and stop of the counting of the counter.
2. The measurement method according to claim 1, characterized in that the measurement method further comprises:
initializing the counter prior to said receiving the reference signal and the output signal of the device.
3. The measurement method according to claim 1, characterized in that the measurement method further comprises:
receiving a reference signal with a pulse width w1 before said receiving the reference signal and the output signal of the device;
when the reference signal with the pulse width of w1 changes from a first level signal to a second level signal, controlling the counter to count once every 1/M seconds for the first time;
when the reference signal with the pulse width of w1 changes from a second level signal to a first level signal, controlling the counter to stop counting for the first time;
receiving a reference signal with the pulse width of w 2;
when the reference signal with the pulse width of w2 changes from a first level signal to a second level signal, controlling the counter to count once every 1/M seconds for the second time;
when the reference signal with the pulse width of w2 changes from the second level signal to the first level signal, controlling the counter to stop counting for the second time;
and determining the reaction time C1 of the counter overflow and the reaction time C2 of the counter for starting and stopping counting according to the number of times of the first counting of the counter, the number of times of the second counting of the counter, the pulse width w1 of the reference signal and the pulse width w2 of the reference signal.
4. The measurement method according to any one of claims 1 to 3, characterized by further comprising:
after the first signal is changed from the first level signal to the second level signal, when the number of times of overflow of the counter reaches a set number of times and the second signal is not changed from the first level signal to the second level signal, the counter is initialized.
5. The measurement method according to any one of claims 1 to 3, characterized by further comprising:
inverting the output signal when the pulse starting point of the output signal is changed from a second level signal to a first level signal;
and when the pulse starting point of the reference signal is changed from a second level signal to a first level signal, inverting the reference signal.
6. The measurement method according to any one of claims 1 to 3, characterized by further comprising:
and determining the time service precision of the time unification system according to the time interval between the output signal of each device for providing the time service signal by the time unification system and the reference signal.
7. A measuring device for time service precision of a time unification system is characterized by comprising:
the receiving module is used for receiving a reference signal and an output signal of the equipment; the output signal is a pulse per second signal generated by the equipment based on a time service signal provided by the time unified system, and the reference signal is a pulse per second signal generated by global positioning system receiving equipment;
a starting module for controlling the counter to start counting once every 1/M seconds when the first signal changes from the first level signal to the second level signal, wherein M is more than or equal to 106(ii) a The first signal is one of the output signal and the reference signal, and the first level signal and the second level signal are two different level signals of a high level signal and a low level signal;
the stopping module is used for controlling the counter to stop counting when the second signal is changed from the first level signal to the second level signal; the second signal is one of the output signal and the reference signal other than the first signal;
a determination module for calculating the time between the output signal and the reference signal using the following formulaInterval T0
T0=t×((N+C1)×n2+(n1+C2));
Wherein t is 1/M, N is the maximum count value of the counter, N1 is the current count value of the counter, N2 is the overflow number of the counter, C1 is the reaction time of the overflow of the counter, and C2 is the reaction time of the start and stop of the counting of the counter.
8. A measurement system for time service precision of a time unification system is characterized in that the measurement system comprises:
the global positioning system receiving module is used for generating a pulse per second signal as a reference signal;
the crystal oscillator is used for providing a time reference for the processor;
the processor is used for receiving a reference signal input by the global positioning system module and an output signal of the equipment, wherein the output signal is a pulse per second signal generated by the equipment based on a time service signal provided by the time unified system; when the first signal changes from the first level signal to the second level signal, the counter is controlled to start counting once every 1/M seconds, M is more than or equal to 106(ii) a The first signal is one of the output signal and the reference signal, and the first level signal and the second level signal are two different level signals of a high level signal and a low level signal; when the second signal changes from the first level signal to the second level signal, controlling the counter to stop counting; the second signal is one of the output signal and the reference signal other than the first signal; calculating the time interval T between the output signal and the reference signal by the following formula0
T0=t×((N+C1)×n2+(n1+C2));
Wherein t is 1/M, N is the maximum count value of the counter, N1 is the current count value of the counter, N2 is the overflow number of the counter, C1 is the reaction time of the overflow of the counter, and C2 is the reaction time of the start and stop of the counting of the counter.
9. The measurement system of claim 8, further comprising:
a battery for powering the global positioning system module, the crystal oscillator, and the processor.
CN201910910969.5A 2019-09-25 2019-09-25 Method, device and system for measuring time service precision of time unification system Active CN110687773B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910910969.5A CN110687773B (en) 2019-09-25 2019-09-25 Method, device and system for measuring time service precision of time unification system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910910969.5A CN110687773B (en) 2019-09-25 2019-09-25 Method, device and system for measuring time service precision of time unification system

Publications (2)

Publication Number Publication Date
CN110687773A CN110687773A (en) 2020-01-14
CN110687773B true CN110687773B (en) 2021-08-06

Family

ID=69110609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910910969.5A Active CN110687773B (en) 2019-09-25 2019-09-25 Method, device and system for measuring time service precision of time unification system

Country Status (1)

Country Link
CN (1) CN110687773B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112235899B (en) * 2020-09-16 2024-05-28 贵州省计量测试院 Second pulse generating device and method of digital clock, measuring system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199276A (en) * 2014-09-23 2014-12-10 李亚锋 FPGA-based (field programmable gate array based) signal time difference measurement method and FPGA-based time-to-digital converter
CN104485947A (en) * 2014-12-30 2015-04-01 中南民族大学 Digital phase discriminator used for GPS tame crystal oscillator
CN106093568A (en) * 2016-08-03 2016-11-09 安徽财经大学 A kind of novel low-cost high-precision digital frequency meter
CN109752738A (en) * 2018-12-26 2019-05-14 广州中海达卫星导航技术股份有限公司 Target IMU and GNSS data synchronous method when based on standard

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7158904B2 (en) * 2005-02-25 2007-01-02 Texas Instruments Incorporated System and method for correcting an inaccurate clock
CN100451666C (en) * 2006-11-23 2009-01-14 江汉大学 Improved method and apparatus for measuring stability of frequency of time domain signal
CN106814595B (en) * 2017-02-08 2022-03-18 中国科学院精密测量科学与技术创新研究院 High-precision TDC based on equivalent subdivision and equivalent measurement method thereof
CN207232254U (en) * 2017-06-09 2018-04-13 西安宏泰时频技术有限公司 A kind of high precision small frequency counter module

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199276A (en) * 2014-09-23 2014-12-10 李亚锋 FPGA-based (field programmable gate array based) signal time difference measurement method and FPGA-based time-to-digital converter
CN104485947A (en) * 2014-12-30 2015-04-01 中南民族大学 Digital phase discriminator used for GPS tame crystal oscillator
CN106093568A (en) * 2016-08-03 2016-11-09 安徽财经大学 A kind of novel low-cost high-precision digital frequency meter
CN109752738A (en) * 2018-12-26 2019-05-14 广州中海达卫星导航技术股份有限公司 Target IMU and GNSS data synchronous method when based on standard

Also Published As

Publication number Publication date
CN110687773A (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN102611516A (en) Method and device for generating high-precision synchronous clock
CN104156302A (en) Maintenance and timing system and method for satellite-borne computer real-time clock
CN111130510B (en) Method and device for outputting second pulse signal
JP2013024853A (en) Frequency counter
CN114636862B (en) High-precision pulse width measuring circuit and measuring method
TW201303315A (en) Method and system for measuring frequency
CN110687773B (en) Method, device and system for measuring time service precision of time unification system
US9600023B2 (en) Method and data processing unit for providing a timestamp
CN109581859A (en) A kind of automatic correcting time method and device
CN109752738A (en) Target IMU and GNSS data synchronous method when based on standard
CN104155664A (en) Satellite borne receiver timing functional test system and method
CN113377054B (en) Data synchronization method and device
JPWO2014118984A1 (en) Signal processing device
WO2022062670A1 (en) Timing method, visual navigational aid device control method, and related apparatus
JPWO2014155706A1 (en) Signal processing device
WO2022062671A1 (en) Timing synchronization method, visual navigation aid device control method, and related apparatuses
CN110928177B (en) Clock synchronization system and method
WO2024109696A1 (en) Multi-sensor trigger control method, apparatus and device, and storage medium
TW201303532A (en) Method and system for measuring time
CN108988832B (en) Method for detecting a delay associated with an electronic device and corresponding electronic device
CN103412474B (en) Range high-precision expanded circuit when TDC-GP2 based on FPGA surveys
CN104753497B (en) Method and device for correcting OSCPPS
CN105738695A (en) Clock frequency tracking measuring and error estimating method and module
TW201303533A (en) Method and system for measuring distance
CN105589328B (en) Time synchronization test method, measuring accuracy determine method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant