WO2014109255A1 - データ処理装置、データ処理方法、及び、プログラム - Google Patents

データ処理装置、データ処理方法、及び、プログラム Download PDF

Info

Publication number
WO2014109255A1
WO2014109255A1 PCT/JP2013/085040 JP2013085040W WO2014109255A1 WO 2014109255 A1 WO2014109255 A1 WO 2014109255A1 JP 2013085040 W JP2013085040 W JP 2013085040W WO 2014109255 A1 WO2014109255 A1 WO 2014109255A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
delay
time difference
unit
round
Prior art date
Application number
PCT/JP2013/085040
Other languages
English (en)
French (fr)
Inventor
木村 真
Original Assignee
ソニー株式会社
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 ソニー株式会社 filed Critical ソニー株式会社
Publication of WO2014109255A1 publication Critical patent/WO2014109255A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays

Definitions

  • the present technology relates to a data processing device, a data processing method, and a program, and in particular, for example, a data processing device, a data processing method, and a data processing device that can prevent a decrease in accuracy of synchronization of slave time with respect to master time. And related to the program.
  • NTP Network Time Protocol
  • the master device and the slave device exchange messages including time, so that the slave device matches (synchronizes) the time of the slave device with the time of the master device.
  • the master device is one of a plurality of devices connected to the network.
  • the time of the master device (hereinafter also referred to as master time) is the time reference.
  • Slave device is a device other than the master device among a plurality of devices connected to the network.
  • the time of the slave device (hereinafter also referred to as slave time) is corrected so as to match (synchronize) with the master time.
  • a value for correcting the slave time to the master time in the slave device that is, for example, a time difference that is a difference between the master time and the slave time is obtained as an error (time error) of the slave time.
  • the slave time is corrected so that the time error is zero.
  • the time difference is based on the assumption that the delay time delay_ms when sending a message from the master device to the slave device matches the delay time delay_sm when sending the message from the slave device to the master device. Desired.
  • delay times delay_ms and delay_sm often do not match.
  • the time difference obtained on the assumption that the delay times delay_ms and delay_sm match may not be accurate, and even if the slave time is corrected so that such time difference becomes 0,
  • the slave time after correction does not coincide with the master time, and the accuracy of synchronization of the slave time with respect to the master time may decrease.
  • the present technology has been made in view of such a situation, so that a highly accurate time error can be obtained, and further, the time error is used for correcting the slave time, thereby synchronizing the slave time. This makes it possible to prevent a decrease in accuracy.
  • the data processing device or the program according to the present technology includes a master output included in the message transmitted via a network from a master device that transmits a message including the master time, and a time output unit that outputs the slave time.
  • the noticed time difference of interest is the peripheral time including the noticed time difference.
  • a delay time series of communication with the master device which is obtained by using a smoothing unit that smoothes using a difference and outputs a smoothed time difference, and the master time and the slave time
  • the delay time with respect to the time difference of interest is the minimum value or the maximum value of the delay time with respect to the time difference used for smoothing the time difference of interest.
  • a correction amount calculating unit that obtains a correction amount for correcting the smoothing time difference using the attention time difference, and correcting the smoothing time difference using the correction amount, thereby correcting a smoothing time.
  • a data processing device including a smoothing time difference correction unit that outputs a difference, or a program for causing a computer to function as such a data processing device.
  • the data processing method of the present technology includes the master time included in the message transmitted via a network from a master device that transmits a message including the master time, and the slave output by a time output unit that outputs a slave time.
  • the attention time difference of interest is calculated using the surrounding time difference including the attention time difference.
  • the attention time difference is There are, obtain a correction amount for correcting the smoothing time difference, the smoothed time difference is corrected using the correction amount, the data processing method comprising the step of outputting the corrected smoothed time difference.
  • the master time included in the message transmitted via the network from the master device that transmits a message including the master time, and the slave time output by the time output unit that outputs the slave time are included.
  • the time difference series which is the difference between the master time and the slave time
  • obtained by using the attention time difference of interest is smoothed using the surrounding time difference including the attention time difference.
  • the smoothed time difference is output.
  • the delay time with respect to the attention time difference in the series of delay times of communication with the master device, which is obtained using the master time and the slave time is smoothed by the attention time difference.
  • the correction amount for correcting the smoothed time difference is obtained using the attention time difference. Then, the smoothing time difference is corrected using the correction amount, and a corrected smoothing time difference is output.
  • the data processing apparatus may be an independent apparatus or an internal block constituting one apparatus.
  • the program can be provided by being transmitted through a transmission medium or by being recorded on a recording medium.
  • FIG. 3 is a block diagram illustrating a configuration example of a clock unit 21.
  • FIG. It is a figure which shows an example of the time series of each of delay time delay_ms of going, and delay time delay_sm of return.
  • FIG. It is a block diagram which shows the other structural example of the timepiece part 21, ie, the structural example of the timepiece part 21 which suppresses the fluctuation
  • FIG. 3 is a block diagram illustrating a configuration example of a clock unit 61.
  • FIG. 6 is a flowchart for explaining an example of slave time control processing in a clock unit 61.
  • 3 is a block diagram illustrating a first configuration example of a correction unit 46.
  • FIG. It is a figure explaining the outline
  • FIG. FIG. 6 is a block diagram illustrating a configuration example of a smoothing unit 71 and a correction amount calculation unit 72.
  • 10 is a flowchart illustrating an example of a smoothing process performed by a smoothing unit 71 of a correction unit 46.
  • 10 is a flowchart illustrating an example of correction amount calculation processing performed by a correction amount calculation unit 72 of the correction unit 46.
  • 7 is a flowchart illustrating an example of output value control processing performed by an output value control unit 73 of a correction unit 46. It is a flowchart explaining the example of the process of the smoothing time difference correction
  • 6 is a block diagram illustrating a second configuration example of a correction unit 46.
  • FIG. 6 is a flowchart illustrating an example of median processing of a median processing unit 75. It is a figure which shows the relationship between correction
  • FIG. 10 is a block diagram illustrating a third configuration example of the correction unit 46.
  • FIG. 10 is a flowchart illustrating an example of a time difference correction process performed by a correction unit 46.
  • 3 is a block diagram illustrating a first configuration example of a high-accuracy correction amount calculation unit 102.
  • FIG. 10 is a flowchart for explaining an example of a maximum value (minimum value) detection process performed by a maximum value detection unit 111 of the high-accuracy correction amount calculation unit 102. It is a figure explaining the example of the statistical process which the statistical process part 112 of the high precision correction amount calculation part 102 performs.
  • 10 is a flowchart illustrating an example of threshold value setting processing performed by a threshold value setting unit 113 when a minimum round-trip delay time is detected as the maximum value in the maximum value detection unit 111.
  • 10 is a flowchart for explaining an example of high-accuracy time difference detection processing performed by the high-accuracy time difference detection unit 114 when the minimum round-trip delay time is detected as the maximum value in the maximum value detection unit 111.
  • 10 is a flowchart for explaining an example of correction amount calculation processing performed by the correction amount calculation unit 115 of the high-accuracy correction amount calculation unit 102 when the minimum round-trip delay time is detected as the maximum value in the maximum value detection unit 111.
  • . 6 is a flowchart illustrating an example of output control processing performed by a high-accuracy correction amount output control unit; 12 is a flowchart illustrating another example of output control processing performed by the high-accuracy correction amount output control unit 116. It is a flowchart explaining the example of the process of the maximum value (maximum value) detection which the maximum value detection part 111 performs.
  • 10 is a flowchart illustrating an example of threshold value setting processing performed by a threshold value setting unit 113 when a maximum round-trip delay time is detected as the maximum value in the maximum value detection unit 111.
  • 10 is a flowchart for explaining an example of processing of high-accuracy time difference detection performed by the high-accuracy time difference detection unit 114 when the maximum round-trip delay time is detected as the maximum value in the maximum value detection unit 111.
  • FIG. 6 is a block diagram illustrating a second configuration example of the high-accuracy correction amount calculation unit 102.
  • FIG. It is a flowchart explaining the example of the determination process which the determination part 131 performs.
  • 5 is a flowchart for explaining an example of processing for high-precision time difference detection performed by a high-precision time difference detection unit 132.
  • FIG. 18 is a block diagram illustrating a configuration example of an embodiment of a computer to which the present technology is applied.
  • this technology uses a time difference between the master time and the slave time, and a delay time of communication between the master device and the slave device. Any case where the delay can be obtained in some way can be applied.
  • FIG. 1 is a diagram for explaining a method of synchronizing the time (slave time) by matching the slave time with the master time by PTP.
  • the master device and slave device that are synchronized by PTP are connected via a network.
  • the master device measures the master time and the slave device measures the slave time.
  • the master device transmits a message called a sync message to the slave device and stores the master time Tm1 when the sync message is transmitted.
  • the slave device receives the sync message from the master device and stores the slave time Ts1 when the sync message is received.
  • the master device transmits a message called a follow-up message (FollowUp message) including the master time Tm1 when the sync message is transmitted to the slave device.
  • a follow-up message (FollowUp message) including the master time Tm1 when the sync message is transmitted to the slave device.
  • the slave device receives the follow-up message from the master device and stores the master time Tm1 included in the follow-up message.
  • the slave device After receiving the follow-up message from the master device, the slave device sends a message called a delay request message (DelayReq message) to the master device. Further, the slave device stores the slave time Ts2 when the delay request message is transmitted.
  • DelayReq message a message called a delay request message
  • the master device receives the delay request message from the slave device and stores the master time Tm2 when the delay request message is received.
  • the master device transmits a message called a delay response message (DelayResp message) including the master time Tm2 when the delay request message is received to the slave device.
  • DelayResp message a delay response message
  • the slave device receives the delay response message from the master device, and uses the master time Tm2 included in the delay response message, the master time Tm1 that is already stored, and the slave times Ts1 and Ts2. And find the time difference Tms between the slave time.
  • time difference Tms is a value obtained by subtracting the slave time Ts from the master time Tm (Tm-Ts).
  • the delay time when a message is transmitted from the master device to the slave device is expressed as delay time delay_ms, and is also referred to as a delay time delay_ms hereinafter.
  • delay time when a message is transmitted from the slave device to the master device is expressed as delay time delay_sm, and hereinafter also referred to as return delay time delay_sm.
  • a delay time that is a combination of the delay time delay_ms for the outbound route and the delay time delay_sm for the return route is expressed as a delay time delay, and is hereinafter also referred to as a round trip delay time delay.
  • the outbound delay time delay_ms can be obtained according to the equation (1)
  • the return delay time delay_sm can be obtained according to the equation (2).
  • the round trip delay time delay can be obtained according to the equation (3) using the equations (1) and (2).
  • time difference Tms can be obtained according to equation (4) by subtracting equation (2) from equation (1).
  • Tms 1/2 ⁇ ⁇ (Tm2 ⁇ Ts2) ⁇ (Ts1 ⁇ Tm1) + (delay_ms ⁇ delay_sm) ⁇ ... (4)
  • Tms 1/2 ⁇ ⁇ (Tm2-Ts2)-(Ts1-Tm1) ⁇ ... (5)
  • the slave device uses the master times Tm1 and Tm2 and the slave times Ts1 and Ts2 to obtain the time difference Tms according to the equation (5), and corrects the slave time Ts so that the time difference Tms becomes zero.
  • the slave time Ts is synchronized with the master time Tm.
  • the master device and the slave device repeat exchange of PTP messages, that is, sync messages, follow-up messages, delay request messages, and delay response messages regularly or irregularly.
  • PTP messages that is, sync messages, follow-up messages, delay request messages, and delay response messages regularly or irregularly.
  • the slave device uses the master times Tm1 and Tm2 obtained in time series by repeatedly exchanging PTP messages with the master device, and the slave times Ts1 and Ts2, and the time difference Tms according to the equation (5). Are obtained in time series, and each time the time difference Tms is obtained, the slave time Ts is corrected so that the time difference Tms becomes zero.
  • FIG. 2 is a diagram showing a configuration example of a network system that synchronizes time by PTP.
  • the network system is configured by connecting a master device 10 and a slave device 20 via a network 30 such as a LAN, for example.
  • the network system that synchronizes the time by PTP can be applied to a shooting system that takes a video with a plurality of video cameras.
  • the master device 10 corresponds to one video camera among a plurality of video cameras constituting the photographing system
  • the slave device 20 corresponds to another one video camera.
  • FIG. 2 (the same applies to FIG. 7 described later), only one slave device 20 is connected to the network 30 as a slave device in order to avoid complication of the drawing. Multiple slave devices can be connected.
  • FIG. 2 (the same applies to FIG. 7 described later), only the part related to time synchronization is shown as the configuration of the master device 10 and the slave device 20, and the other parts are not shown. It is.
  • the master device 10 includes a clock unit 11 and a message communication unit 12.
  • the clock unit 11 measures time and outputs the time as the master time.
  • the master time is supplied to the message communication unit 12.
  • the message communication unit 12 exchanges messages with the slave device 20 via the network 30.
  • the message communication unit 12 transmits a sync message, a follow-up message, and a delay response message to the slave device 20.
  • the message communication unit 12 receives a delay request message transmitted from the slave device 20.
  • the message communication unit 12 includes, in the follow-up message, the master time Tm1 when the sync message is transmitted among the master times Tm supplied from the clock unit 11. Further, the message communication unit 12 includes the master time Tm2 when the delay request message is received, among the master times Tm supplied from the clock unit 11, in the delay response message.
  • the slave device 20 has a clock unit 21 and a message communication unit 22.
  • the clock unit 21 measures time and outputs the time as slave time.
  • the clock unit 21 acquires the master times Tm1 and Tm2 from the follow-up message and the delay response message from the master device 10 supplied from the message communication unit 22.
  • the clock unit 21 monitors the message communication unit 22 and acquires the slave time Ts1 when the message communication unit 22 receives the sync message and the slave time Ts2 when the delay request message is transmitted. .
  • the clock unit 21 uses the master times Tm1 and Tm2 and the slave times Ts1 and Ts2 to obtain the time difference Tms according to the equation (5), and corrects the slave time so that the time difference Tms is zero. To do.
  • the message communication unit 22 exchanges messages with the master device 10 via the network 30.
  • the message communication unit 22 receives a sync message, a follow-up message, and a delay response message transmitted from the master device 10. In addition, the message communication unit 22 transmits a delay request message to the master device 10.
  • the message communication unit 22 supplies the clock unit 21 with the follow-up message including the master time and the delay response message among the sync message, the follow-up message, and the delay response message from the master device 10. To do.
  • PTP messages are repeatedly exchanged between the master device 10 and the slave device 20 as described with reference to FIG.
  • the message communication unit 12 transmits a sync message to the slave device 20, and acquires the master time Tm1 when the sync message is transmitted from the clock unit 11 and stores it.
  • the message communication unit 22 receives the sync message from the master device 10, and the clock unit 21 stores the slave time Ts1 when the sync message is received.
  • the message communication unit 12 transmits the follow-up message including the master time Tm1 to the slave device 20.
  • the message communication unit 22 receives the follow-up message from the master device 10 and supplies it to the clock unit 21.
  • the clock unit 21 acquires and stores the master time Tm1 included in the follow-up message from the message communication unit 22.
  • the message communication unit 22 transmits a delay request message to the master device 10. Further, in the slave device 20, the clock unit 21 stores the slave time Ts2 when the delay request message is transmitted.
  • the message communication unit 12 receives the delay request message from the slave device 20, acquires the master time Tm2 when the delay request message is received from the clock unit 11, and stores it.
  • the message communication unit 12 transmits the delay response message including the master time Tm2 to the slave device 20.
  • the message communication unit 22 receives the delay response message from the master device 10 and supplies it to the clock unit 21.
  • the clock unit 21 acquires the master time Tm2 included in the delay response message from the message communication unit 22.
  • the clock unit 21 uses the master times Tm1 and Tm2 and the slave times Ts1 and Ts2 to obtain the equation (5). ) To obtain the time difference Tms. Then, the clock unit 21 corrects the slave time so that the time difference Tms is zero.
  • PTP messages are repeatedly exchanged between the master device 10 and the slave device 20, and the slave devices 20 each time master times Tm1 and Tm2 and slave times Ts1 and Ts2 are obtained by exchanging PTP messages.
  • the time difference Tms is obtained in time series according to Equation (5).
  • the slave time Ts is corrected so that the time difference Tms becomes zero.
  • FIG. 3 is a block diagram illustrating a configuration example of the clock unit 21 of FIG.
  • the clock unit 21 includes a master time acquisition unit 41, a slave time acquisition unit 42, a time difference calculation unit 43, and a time output unit 50, and constitutes a (clock) servo system.
  • the master time acquisition unit 41 is supplied with a follow-up message and a delay response message from the master device 10 from the message communication unit 22.
  • the master time acquisition unit 41 acquires the master time Tm1 when the master device 10 transmits the sync message from the follow-up message from the master device 10, and supplies the master time Tm1 to the time difference calculation unit 43.
  • the master time acquisition unit 41 acquires the master time Tm2 when the master device 10 receives the delay request message from the delay response message from the master device 10, and supplies the master time Tm2 to the time difference calculation unit 43.
  • the slave time output from the time output unit 50 is supplied to the slave time acquisition unit 42.
  • the slave time acquisition unit 42 monitors the message communication unit 22, and determines the slave time Ts1 when the message communication unit 22 receives the sync message and the slave time Ts2 when the delay request message is transmitted as the time Obtained from the slave time Ts supplied from the output unit 50 and supplied to the time difference calculation unit 43.
  • the master time Tm1 and Tm2 are supplied from the master time acquisition unit 41 to the time difference calculation unit 43 every time a PTP message is exchanged between the master device 10 and the slave device 20.
  • slave times Ts1 and Ts2 are supplied from the slave time acquisition unit 42.
  • the time difference calculation unit 43 receives the master times Tm1 and Tm2, and Using the slave times Ts1 and Ts2, the time difference Tms is obtained according to the equation (5) and supplied to the time output unit 50 as the time error of the slave time.
  • the time output unit 50 includes a PID (Proportinal, Integral, Differential) control unit 51, a DAC (Digital Analog Converter) 52, a VCO (Voltage Controlled Oscillator) 53, and an RTC (Real Time Clock) 54. Then, the time is output as the slave time.
  • PID Proportinal, Integral, Differential
  • DAC Digital Analog Converter
  • VCO Voltage Controlled Oscillator
  • RTC Real Time Clock
  • the time output unit 50 corrects the slave time so that the time difference Tms from the time difference calculation unit 43 is the time error of the slave time and the time error is set to zero.
  • the PID control unit 51 generates PID control data for performing PID control so that the time difference Tms as a time error from the time difference calculation unit 43 is 0, and supplies the PID control data to the DAC 52.
  • the DAC 52 DA-converts the PID control data from the PID control unit 51 and supplies a PID control signal obtained as a result to the VCO 53.
  • the VCO 53 oscillates a clock signal according to the PID control signal from the DAC 52 and supplies it to the RTC 54.
  • the RTC 54 incorporates a counter (not shown), counts up the count value of the counter, for example, according to the clock signal from the VCO 53, and outputs the count value as the slave time.
  • the RTC 54 can correct the count value as the slave time so that the time error supplied to the time output unit 50 is zero.
  • the network 30 includes a network switch, and the master device 10 and the slave device 20 may be connected via one or more network switches.
  • each of the outbound delay time delay_ms and the return delay time delay_sm is ( The delay time delay_ms on the going side and the delay time delay_sm on the return side do not match (cannot be considered to match).
  • FIG. 4 is a diagram showing an example of a time series of each of the outbound delay time delay_ms and the return delay time delay_sm.
  • a in FIG. 4 shows the time series of the delay time delay_ms for the outbound route
  • B in FIG. 4 shows the time series of the return delay time delay_sm.
  • both the outgoing delay time delay_ms and the return delay time delay_sm vary greatly. Further, the outbound delay time delay_ms and the return delay time delay_sm often do not match.
  • the outbound delay time delay_ms and the return delay time delay_sm fluctuate, and the outbound delay time delay_ms and the outbound delay time delay_sm do not coincide with each other.
  • the slave time output by the time output unit 50 becomes unstable. It is necessary to apply some processing to the time difference Tms that fluctuates greatly to suppress the fluctuation of the time difference Tms.
  • FIG. 5 is a block diagram showing another configuration example of the clock unit 21 of FIG. 2, that is, a configuration example of the clock unit 21 that suppresses fluctuations in the time difference Tms.
  • the clock unit 21 is common to the case of FIG. 3 in that it includes a master time acquisition unit 41 or a time difference calculation unit 43, and a time output unit 50.
  • the clock unit 21 of FIG. 5 is different from the case of FIG. 3 in that a smoothing unit 44 is newly provided.
  • the time difference Tms is supplied from the time difference calculation unit 43 to the smoothing unit 44 in time series.
  • the smoothing unit 44 is an LPF (LowLPPass Filter) composed of a digital filter such as a FIR (Finite Impulse Response) filter, for example, smoothes the time difference Tms from the time difference calculation unit 43, and is obtained as a result.
  • the smoothed time difference is supplied to the time output unit 50.
  • the time output unit 50 corrects the slave time so that the smoothed time difference from the smoothing unit 44 is the time error of the slave time, and the time error is zero.
  • FIG. 6 is a diagram showing the relationship between the true value of the time difference Tms and the smoothing time error obtained by the smoothing unit 44.
  • the delay_ms ⁇ delay_sm on the right side of the equation (4) becomes 0, and the resulting equation ( According to 5), the time difference Tms is obtained.
  • the outgoing delay time delay_ms may not match the return delay time delay_sm.
  • Tms 1/2 x ⁇ (Tm2-Ts2)-(Ts1-Tm1) + offset ⁇ ... (6)
  • the smoothed time difference obtained by smoothing the time difference Tms in equation (5) is calculated from the true value of the time difference Tms (equation (6)), as shown in FIG. The value is shifted by the average value (expected value) of / 2.
  • the slave time after the correction is It does not coincide with the master time, and the synchronization accuracy of the slave time is lowered.
  • a highly accurate time error is obtained by correcting the smoothed time difference, and the slave time caused by the fact that the above-mentioned delay time delay_ms does not match the return delay time delay_sm. Prevents loss of synchronization accuracy.
  • FIG. 7 is a diagram illustrating a configuration example of an embodiment of a network system to which the present technology is applied.
  • the network system is common to the case of FIG. 2 in that it includes a master device 10, a slave device 20, and a network 30.
  • the network system of FIG. 7 is different from the case of FIG. 2 in that the slave device 20 has a clock unit 61 instead of the clock unit 21.
  • FIG. 8 is a block diagram showing a configuration example of the clock unit 61 of FIG.
  • the clock unit 61 is common to the case of FIG. 3 in that it includes a master time acquisition unit 41 to a time difference calculation unit 43 and a time output unit 50.
  • the clock unit 21 of FIG. 8 is different from the case of FIG. 3 in that a delay time calculation unit 45 and a correction unit 46 are newly provided.
  • the master time Tm1 and Tm2 are supplied from the master time acquisition unit 41 to the delay time calculation unit 45 every time a PTP message is exchanged between the master device 10 and the slave device 20, and the slave time From the acquisition unit 42, slave times Ts1 and Ts2 are supplied.
  • the delay time calculation unit 45 receives the master times Tm1 and Tm2, and Using the slave times Ts1 and Ts2, the round-trip delay time delay is obtained according to the equation (3) and supplied to the correction unit 46.
  • the correction unit 46 is supplied with the round trip delay time delay from the delay time calculator 45 and the time difference Tms from the time difference calculator 43.
  • the correction unit 46 used the master times Tm1 and Tm2 and the slave times Ts1 and Ts2 to obtain the round trip delay time delay obtained by the equation (3) and the round trip delay time delay.
  • the master time Tm1 and Tm2 and the time difference Tms obtained by the equation (5) using the slave times Ts1 and Ts2 are supplied as a pair (set).
  • the correction unit 46 Based on the round trip delay time delay from the delay time calculation unit 45, the correction unit 46 eliminates the deviation from the true value of the time difference Tms caused by the inbound delay time delay_ms and the return delay time delay_sm not matching. As described above, the time difference Tms from the time difference calculation unit 43 is corrected, and a value obtained by correcting the time difference Tms is supplied to the time output unit 50 as a time error of the slave time.
  • the time output unit 50 corrects the slave time so that the correction result of the time difference Tms in the correction unit 46 is the time error of the slave time, and the time error is zero.
  • FIG. 9 is a flowchart illustrating an example of slave time control (correction) processing in the clock unit 61 of FIG.
  • the clock unit 61 waits for the PTP message to be exchanged between the master device 10 and the slave device 20, and acquires the master times Tm1 and Tm2 and the slave times Ts1 and Ts2 in step S11.
  • step S11 the master time acquisition unit 41 acquires, from the follow-up message from the master device 10, the master time Tm1 when the master device 10 transmits the sync message, the time difference calculation unit 43, and the delay It supplies to the time calculation part 45.
  • the master time acquisition unit 41 acquires the master time Tm2 when the master device 10 receives the delay request message from the delay response message from the master device 10, and the time difference calculation unit 43 and the delay time calculation unit 45.
  • the slave time acquisition unit 42 also supplies the slave time Ts1 when the message communication unit 22 receives the sync message and the slave time Ts2 when the delay request message is transmitted from the time output unit 50. Obtained from the time Ts and supplied to the time difference calculation unit 43 and the delay time calculation unit 45.
  • step S11 the process proceeds from step S11 to step S12, and the time difference calculation unit 43 uses the master times Tm1 and Tm2 from the master time acquisition unit 41 and the slave times Ts1 and Ts2 from the slave time acquisition unit 42.
  • the time difference Tms is obtained according to equation (5) and supplied to the correction unit 46.
  • step S12 the delay time calculation unit 45 uses the master times Tm1 and Tm2 from the master time acquisition unit 41 and the slave times Ts1 and Ts2 from the slave time acquisition unit 42, and reciprocates according to equation (3). The delay time delay is obtained and supplied to the correction unit 46, and the process proceeds to step S13.
  • step S13 the correction unit 46 corrects the time difference Tms from the time difference calculation unit 43 based on the round trip delay time delay from the delay time calculation unit 45, and supplies the correction result to the time output unit 50. After performing the difference correction process, the process proceeds to step S14.
  • step S14 the time output unit 50 corrects (controls) the slave time so that the correction result of the time difference Tms from the correction unit 46 is the time error of the slave time and the time error is zero.
  • FIG. 10 is a block diagram showing a first configuration example of the correction unit 46 of FIG.
  • the correction unit 46 includes a smoothing unit 71, a correction amount calculation unit 72, an output value control unit 73, and a smoothing time difference correction unit 74.
  • the time difference Tms is supplied to the smoothing unit 71 from the time difference calculation unit 43 (FIG. 8) in time series.
  • the smoothing unit 71 is configured in the same manner as the smoothing unit 44 of FIG. 5, smoothes the time difference Tms from the time difference calculation unit 43, and converts the smoothed time difference Tav obtained as a result into a correction amount calculation unit. 72 and the smoothing time difference correction unit 74.
  • the smoothing unit 71 sequentially selects the time difference Tms (sample thereof) supplied in time series from the time difference calculation unit 43 (FIG. 8) as a noticed time difference. Then, the smoothing unit 71 smoothes the noticed time difference using a plurality of peripheral time differences including the noticed time difference (time differences before and after the noticed time difference), and calculates the smoothed time difference Tav. Output.
  • the smoothing unit 71 when the smoothing unit 71 is configured with, for example, a 2N + 1 tap FIR filter (N is an integer equal to or greater than 1), the smoothing unit 71 is temporally past from the attention time difference and the attention time difference.
  • the time difference of interest is smoothed to the smoothed time difference Tav using the time difference of N samples (pieces) adjacent to the side and the time difference of N samples adjacent to the future side in time from the time difference of interest. .
  • the correction amount calculation unit 72 is supplied with the smoothed time difference Tav from the smoothing unit 71, and also supplied with the time difference Tms from the time difference calculation unit 43 (FIG. 8) in time series, and the delay time calculation unit.
  • the round trip delay time delay is supplied from 45 (FIG. 8) in time series.
  • the correction amount calculation unit 72 has a round-trip delay time with respect to the noticed time difference (a noticed time difference and a paired round-trip delay time) of 2N + 1 pieces with respect to 2N + 1 time differences used for smoothing the noticed time difference.
  • the correction time C for correcting the smoothed time difference Tav is obtained using the noticed time difference and the smoothed time difference Tav with respect to the noticed time difference, This is supplied to the output value control unit 73.
  • the output value control unit 73 uses the correction amount C from the correction amount calculation unit 72 as an input value, so that the output value Cout is zero-order held at the input value or gradually approaches the input value. Controls the output value Cout.
  • the smoothing time difference correction unit 74 corrects the smoothing time difference Tav from the smoothing unit 71 using the output value Cout of the output value control unit 73 as a correction amount for correcting the smoothing time difference Tav.
  • the corrected smoothed time difference CT obtained as a result is supplied to the time output unit 50 (FIG. 8) as a time error of the slave time.
  • a smoothing unit 71, a correction amount calculation unit 72, an output value control unit 73, and a smoothing time difference correction unit 74 that constitute the correction unit 46 are input with a time difference Tms and a round trip delay time delay. Since the corrected smoothed time difference CT is output, it can be said that the corrected smoothed time difference generating unit for generating the corrected smoothed time difference CT is configured.
  • FIG. 11 is a diagram illustrating an outline of correction of the smoothing time difference Tav by the correction unit 46 of FIG.
  • FIG. 11 shows an outline of the distribution of the delay time delay_ms and the return delay time delay_sm measured using the network 30 including the network switch.
  • the x-axis (horizontal direction) represents the outbound delay time delay_ms
  • the y-axis (vertical direction) represents the return delay time delay_sm.
  • the round trip delay time delay is an addition value of the outbound delay time delay_ms and the return delay time delay_sm. Therefore, when a certain value A is obtained as the round trip delay time delay.
  • a minimum value and a maximum value of the round-trip delay time delay obtained by adding the return delay time delay_ms and the return delay time delay_sm measured using the network 30 including the network switch are set as the minimum round-trip delay time, The maximum round-trip delay time is assumed.
  • the minimum round-trip delay time corresponds to the lower left point of the square representing the distribution of the outbound delay time delay_ms and the return delay time delay_sm (dotted line square), and the maximum round-trip delay time is the outbound delay time delay_ms and the return delay time This corresponds to the upper right point of the square representing the distribution of the delay time delay_sm.
  • the outbound delay time delay_ms and the return delay time delay_sm can take only values around 1/2 of the round-trip delay time delay.
  • both the outbound delay time delay_ms and the return delay time delay_sm can only take values around 1/2 of the round-trip delay time delay.
  • the round-trip delay time delay is a value close to the minimum round-trip delay time or the minimum round-trip delay time, it is highly likely that the outbound delay time delay_ms and the return delay time delay_sm are (almost) equal.
  • the time difference Tms (minimum round trip delay time or minimum It can be said that the time difference Tms when the round-trip delay time delay having a value close to the round-trip delay time is obtained is an accurate time difference.
  • the correction unit 46 in FIG. 10 corrects the smoothed time difference Tav using such an accurate time difference.
  • the smoothing time difference Tav obtained by smoothing the time difference Tms by the smoothing unit 71 is equal to the time difference Tms as described in FIG. 6 and Expression (6). This is a value deviated from the true value of ⁇ ⁇ by an average value of 1 ⁇ 2 of the delay difference offset.
  • the smoothed time difference Tav T + ⁇ T.
  • the correction unit 46 corrects the smoothing time difference Tav using the deviation amount ⁇ T as the correction amount C so as to cancel the deviation amount ⁇ T as the correction amount C from the smoothing time difference Tav.
  • FIG. 12 is a block diagram illustrating a configuration example of the smoothing unit 71 and the correction amount calculating unit 72 of FIG.
  • the smoothing unit 71 is a 2N + 1 tap FIR filter, 2N delay circuits 81 1 , 81 2 ,..., 81 2N , 2N + 1 multipliers 82 1 , 82 2, ..., 82 2N + 1, and, 2N adders 83 1, 83 2, ..., has a 83 2N.
  • the delay circuit 81 n (one sample before) in the preceding stage of the delay circuit 81 n-1 latched time difference is supplied.
  • the delay circuit 81 n latches the time difference from the preceding delay circuit 81 n ⁇ 1 (delayed by a time corresponding to one sample), and supplies it to the multiplier 82 n + 1 .
  • the latest time difference (sample thereof) is supplied from the time difference calculation unit 43 to the delay circuit 81 1 . Then, the delay circuit 81 1 latches the latest time difference from the time difference calculation unit 43.
  • the multiplier 82 n multiplies the time difference supplied from the delay circuit 81 n-1 by the filter coefficient h n , and supplies the multiplication value obtained as a result to the adder 83 n-1 .
  • the latest time difference (sample thereof) is supplied from the time difference calculation unit 43 to the multiplier 82 1 .
  • the multiplier 82 1 multiplies the latest time difference from the time difference calculation unit 43 by the filter coefficient h 1 , and supplies the multiplication value obtained as a result to the adder 83 1 .
  • the adder 83 n adds the multiplication value supplied from the multiplier 82 n + 1 to the addition value supplied from the previous- stage adder 83 n ⁇ 1 , and uses the resulting addition value as the subsequent-stage adder. 83 n + 1 .
  • the adder 83 1 adds the multiplication value supplied from the multiplier 82 1 and the multiplication value supplied from the multiplier 82 2 , and sends the resulting addition value to the adder 83 2 in the subsequent stage. Supply.
  • the adder 83 2N adds an addition value obtained by adding the multiplication value supplied from the multiplier 82 2N + 1 to the addition value supplied from the previous - stage adder 83 2N-1, and calculates the difference in time of interest. Output as smoothed time difference (smoothed time difference obtained by smoothing noticed time difference) Tav.
  • the i-th time difference sample that is the latest sample (time difference sample) of the time difference Tms supplied from the time difference calculation unit 43 to the smoothing unit 71 (and the correction amount calculation unit 72) is denoted by x i .
  • the smoothing unit 71 uses the time difference sample x iN N samples (time) before the latest time difference sample x i as the time difference of interest.
  • the expression Tav h 1 x i + h 2 x i ⁇ 1 +... + H 2N + 1 According to x i ⁇ 2N , the smoothed time difference Tav of the noticed time difference x iN is obtained.
  • the smoothed time difference Tav of the noticed time difference x iN obtained by the smoothing unit 71 is supplied to the smoothed time difference correcting unit 74 (FIG. 10), and also to an arithmetic unit 96 described later of the correction amount calculating unit 72. Supplied.
  • the correction amount calculation unit 72 includes 2N delay circuits 91 1 , 91 2 ,..., 91 2N , 2N + 1 buffers 92 1 , 92 2 ,. 2N delay circuits 93 1 , 93 2 ,..., 93 2N , 2N + 1 buffers 94 1 , 94 2 ,..., 94 2N + 1 , correction time difference detector 95, and calculation A container 96.
  • the delay circuit 91 n (one sample before) in the preceding stage of the delay circuit 91 n-1 latched time difference is supplied.
  • the delay circuit 91 n latches the time difference from the preceding delay circuit 91 n ⁇ 1 and supplies it to the buffer 92 n + 1 .
  • the latest time difference (sample thereof) is supplied from the time difference calculation unit 43 to the delay circuit 91 1 . Then, the delay circuit 91 1 latches the latest time difference from the time difference calculation unit 43.
  • the buffer 92 n supplies the time difference supplied from the delay circuit 91 n-1 to the correction time difference detection unit 95.
  • the latest time difference (sample thereof) is supplied from the time difference calculation unit 43 to the buffer 92 1 . Then, the buffer 92 1 supplies the latest time difference from the time difference calculation unit 43 to the correction time difference detection unit 95.
  • the delay circuit 93 n is supplied with the round-trip delay time delay latched by the preceding delay circuit 93 n ⁇ 1 (one sample before).
  • the delay circuit 93 n latches the round trip delay time delay from the preceding delay circuit 93 n ⁇ 1 and supplies it to the buffer 92 n + 1 .
  • the latest round-trip delay time delay (sample thereof) is supplied to the delay circuit 93 1 from the delay time calculation unit 45 (FIG. 8). Then, the delay circuit 93 1 latches the latest round-trip delay time delay from the delay time calculation unit 45.
  • the buffer 92 n supplies the round trip delay time delay supplied from the delay circuit 93 n ⁇ 1 to the correction time difference detector 95.
  • the latest round-trip delay time delay (sample thereof) is supplied to the buffer 92 1 from the delay time calculation unit 45. Then, the buffer 92 1 supplies the latest round-trip delay time delay from the delay time calculator 45 to the correction time difference detector 95.
  • the latest time difference sample of the time difference Tms supplied from the time difference calculation unit 43 to the correction amount calculation unit 72 is expressed as x i and supplied from the delay time calculation unit 45 to the correction amount calculation unit 72.
  • the i-th delay time sample that is the latest sample (delay time sample) of the round-trip delay time delay is represented by y i .
  • the correction time difference detection unit 95 when the latest time difference sample x i and the delay time sample y i are supplied to the correction amount calculation unit 72, that is, the time difference sample x iN N samples before the latest time difference sample x i is when a target time difference, the correction time difference detection unit 95, and to the last 2N + 1 pieces of no time difference samples x i-2N, including the latest time difference samples x i x i, the most recent delay time samples y The past 2N + 1 delay time samples y i ⁇ 2N to y i including i are supplied.
  • the correction time difference detection unit 95 supplies 2N + 1 delay time samples y i ⁇ 2N or 2N + 1 when the time difference sample x iN N samples before the latest time difference sample x i is the time difference of interest.
  • attention time difference delay time for x iN sample (round trip time) y iN is noted time difference 2N + 1 with respect to x i 2N + 1 pieces of no time difference samples x i-2N used for smoothing the x iN If it is to number of delay no time samples y i-2N minimum value of the y i, i.e., as described in FIG.
  • the correction time difference detection unit 95 converts the noticed time difference x iN into a smoothed time difference obtained by smoothing the noticed time difference x iN (attention time difference). Is detected as a correction time difference Tc used for correcting Tav and supplied to the calculator 96.
  • the noticed time difference x iN is highly accurate (true) as in the case where the round trip delay time y iN is small. It is likely that the time difference is close to the value.
  • the correction for the time difference detector 95 a delay time samples y iN for the target time difference x iN found to 2N + 1 pieces of no time difference samples x i-2N used for smoothing of interest time difference x iN x i other, to the 2N + 1 pieces of delay samples without y i-2N is the maximum value of y i in the case to 2N + 1 pieces of delay time samples y i-2N not a minimum value of the y i against Even in this case, the attention time difference x iN can be detected as a correction time difference Tc used for correcting the smoothed time difference Tav with respect to the attention time difference x iN .
  • a delay time samples y iN for the target time difference x iN found to 2N + 1 pieces of no time difference samples x i-2N used for smoothing of interest time difference x iN x i for the case to 2N + 1 pieces of delay samples without y i-2N is the maximum value among the y i only, the attention time difference x iN, used for correcting the smoothing time difference Tav for the attention time difference x iN It can be detected as a correction time difference Tc.
  • the computing unit 96 uses the smoothing time difference Tav with respect to the attention time difference x iN supplied from the smoothing unit 71 and the correction time difference Tc supplied from the correction time difference detection unit 95, and uses the above-described deviation amount.
  • the correction for the time difference detection unit 95, attention time difference x iN is, if not detected as the correction time difference Tc, i.e., the delay time samples y iN for the target time difference x iN is, the attention time difference x not the minimum (and maximum) of 2N + 1 delay time samples y i-2N to y i for 2N + 1 time difference samples x i-2N to x i used for iN smoothing Therefore, when the noticed time difference x iN is not a highly accurate (close to true value) time difference, the computing unit 96 cannot obtain (cannot obtain) the correction amount C, and the output value control unit 73 The correction amount C is not supplied.
  • FIG. 13 is a flowchart illustrating an example of the smoothing process performed by the smoothing unit 71 of the correction unit 46 in FIG.
  • the smoothing process in FIG. 13 is performed as part of the time difference correction process in step S13 in FIG.
  • the smoothing process is started when, for example, the latest time difference sample x i of the time difference Tms is supplied from the time difference calculation unit 43 to the smoothing unit 71.
  • step S21 the smoothing unit 71 selects a time difference sample x iN N samples before the latest time difference sample x i as the time difference of interest, and the process proceeds to step S22.
  • step S22 the smoothing unit 71 uses the past 2N + 1 time difference samples x i ⁇ 2N to x i including the latest time difference sample x i for smoothing the target time difference x iN .
  • step S23 the smoothing unit 71 uses the result of the product-sum operation in step S22 using the smoothing time difference samples x i ⁇ 2N to x i as the smoothed time difference Tav obtained by smoothing the noticed time difference x iN.
  • the smoothing unit 71 uses the result of the product-sum operation in step S22 using the smoothing time difference samples x i ⁇ 2N to x i as the smoothed time difference Tav obtained by smoothing the noticed time difference x iN.
  • the smoothing unit 71 uses the result of the product-sum operation in step S22 using the smoothing time difference samples x i ⁇ 2N to x i as the smoothed time difference Tav obtained by smoothing the noticed time difference x iN.
  • FIG. 14 is a flowchart illustrating an example of correction amount calculation processing performed by the correction amount calculation unit 72 of the correction unit 46 in FIG.
  • the latest time difference sample x i of the time difference Tms is supplied from the time difference calculation unit 43 to the correction amount calculation unit 72, and the correction amount calculation unit 72 is supplied from the delay time calculation unit 45. Is started when the latest delay time sample y i of the round-trip delay time delay is supplied.
  • step S31 the correction amount calculation unit 72 determines that the round trip delay time y iN with respect to the noticed time difference x iN that is the time difference sample x iN N samples before the latest time difference sample x i is In the smoothing unit 71, 2N + 1 delay time samples y i-2N to y i for 2N + 1 smoothing time difference samples x i-2N to x i used for smoothing the time difference of interest. It is determined whether it is the minimum value in.
  • step S31 if the round trip time y iN for the target time difference x iN were determined 2N + 1 pieces of delay time to no sample y i-2N as the minimum value of the y i, processing, step S32
  • the correction amount calculation unit 72 detects the attention time difference x iN as the correction time difference Tc, and the process proceeds to step S33.
  • the amount calculation process ends.
  • step S31 when it is determined in step S31 that the round trip delay time y iN with respect to the time difference of interest x iN is not the minimum value among the 2N + 1 delay time samples y i ⁇ 2N to y i , S32 to S34 are skipped, and the correction amount calculation process for the time difference of interest x iN is terminated.
  • the correction amount C is not supplied to the output value control unit 73.
  • the correction amount calculation unit 72 when the round trip delay time y iN for the time difference of interest x iN is the minimum value among 2N + 1 delay time samples y i ⁇ 2N to y i. only, the attention time difference x iN, detected as correction time difference Tc, it is assumed that obtain the correction amount C, the correction amount calculation unit 72, the round trip time y iN for the target time difference x iN is, 2N Only when it is the maximum value among the +1 delay time samples y i ⁇ 2N to y i , the attention time difference x iN is detected as the correction time difference Tc, and the correction time difference Tc is used. A correction amount C can be obtained.
  • the round trip delay time y iN with respect to the noticed time difference x iN is the minimum value among the 2N + 1 delay time samples y i ⁇ 2N to y i , and the maximum value.
  • the attention time difference x iN can be detected as the correction time difference Tc, and the correction amount C using the correction time difference Tc can be obtained.
  • FIG. 15 is a flowchart illustrating an example of output value control processing performed by the output value control unit 73 of the correction unit 46 of FIG.
  • the output value control process in FIG. 15 is performed as part of the time difference correction process in step S13 in FIG.
  • the output value control process is started when, for example, the smoothed time difference Tav of the noticed time difference is supplied from the smoothing unit 71 to the smoothed time difference correcting unit 74.
  • the output value control unit 73 uses the correction amount C as an input value, and the output value gradually becomes the input value.
  • the output value is controlled to approach.
  • step S41 the output value control unit 73 determines whether or not the correction amount C is supplied from the correction amount calculation unit 72 as an input value.
  • step S41 If it is determined in step S41 that the correction amount C is supplied as the input value from the correction amount calculation unit 72, the process proceeds to step S42, and the output value control unit 73 sets the target value of the output value Cout.
  • the correction amount C as an input value is set in the variable target_delay_offset, and the process proceeds to step S44.
  • step S41 If it is determined in step S41 that the correction amount C is not supplied as an input value from the correction amount calculation unit 72, the process proceeds to step S43, and the output value control unit 73 is set to the variable target_delay_offset. The process proceeds to step S44.
  • step S44 the output value control unit 73 determines the magnitude relationship between the output value Cout and the variable target_delay_offset.
  • step S44 If it is determined in step S44 that the output value Cout is larger than the variable target_delay_offset, the process proceeds to step S45, and the output value control unit 73 subtracts the variable target_delay_offset from the output value Cout, Cout ⁇ target_delay_offset. Is larger than the unit change amount ⁇ s (> 0) when changing the output value Cout.
  • step S45 When it is determined in step S45 that the subtraction value Cout ⁇ target_delay_offset is larger than the unit change amount ⁇ s, that is, even if the output value Cout is decreased by the unit change amount ⁇ s, it does not fall below the variable target_delay_offset.
  • the process proceeds to step S46, and the output value control unit 73 decreases the output value Cout by the unit change amount ⁇ s, and ends the output value control process.
  • step S44 when it is determined in step S44 that the output value Cout is smaller than the variable target_delay_offset, the process proceeds to step S47, and the output value control unit 73 subtracts the output value Cout from the variable target_delay_offset. -Determine whether Cout is greater than the unit change ⁇ s.
  • step S47 When it is determined in step S47 that the subtraction value Cout ⁇ target_delay_offset is larger than the unit change amount ⁇ s, that is, even if the output value Cout is increased by the unit change amount ⁇ s, the variable target_delay_offset is not exceeded.
  • the process proceeds to step S48, and the output value control unit 73 increases the output value Cout by the unit change amount ⁇ s, and ends the output value control process.
  • step S44 If it is determined in step S44 that the output value Cout and the variable target_delay_offset are equal, if it is determined in step S45 that the subtraction value Cout ⁇ target_delay_offset is not greater than the unit change amount ⁇ s, If it is determined in S47 that the subtraction value Cout ⁇ target_delay_offset is not greater than the unit change amount ⁇ s, the process proceeds to step S49 in any case, and the output value control unit 73 sets the output value Cout. , The variable target_delay_offset is set, and the output value control process ends.
  • the correction value C is supplied from the correction value calculation unit 72 in the output value control unit 73
  • the correction value C is used as an input value
  • the output value Cout is The output value Cout is controlled so as to gradually approach the input value.
  • the output value control unit 73 converts the correction amount C into the input value when the correction amount C is supplied from the correction amount calculation unit 72.
  • the output value Cout can be controlled so that the output value Cout is zero-order held by the input value.
  • the output value control unit 73 controls the output value Cout so that the output value Cout is zero-order held at the input value
  • the output value Cout is The correction amount C is immediately set to the correction amount C from the correction amount calculation unit 72 and is maintained until the next correction amount C is supplied from the correction amount calculation unit 72.
  • FIG. 16 is a flowchart for explaining an example of smoothing time difference correction processing performed by the smoothing time difference correction unit 74 of the correction unit 46 of FIG.
  • the smoothing time difference correction process is started when, for example, the smoothing time difference Tav of the noticed time difference is supplied from the smoothing unit 71 to the smoothing time difference correcting unit 74.
  • step S51 the smoothing time difference correction unit 74 subtracts the output value Cout of the output value control unit 73 from the smoothing time difference Tav with respect to the noticed time difference from the smoothing unit 71.
  • the smoothed time difference Tav with respect to the noticed time difference is corrected so as to cancel the true value deviation amount ⁇ T of the noticed time difference included in the smoothed time difference Tav.
  • the smoothing time difference correction unit 74 supplies the corrected smoothing time difference CT obtained as a result of the correction as a time error of the slave time to the time output unit 50, and ends the smoothing time difference correction process. To do.
  • the smoothing unit 71 smoothes the noticed time difference using the surrounding time difference including the noticed time difference, and outputs the smoothed time difference Tav.
  • the correction amount calculation unit 72 when the round trip delay time with respect to the noticed time difference is the minimum value or the maximum value among the round trip delay times with respect to the time difference used for smoothing the noticed time difference, Is used to obtain a correction amount C for correcting the smoothing time difference Tav.
  • the smoothing time difference correction unit 74 corrects the smoothing time difference Tav using the correction amount (the output value of the output control unit 73 as) C, and outputs a corrected smoothing time difference CT. Then, the time output unit 50 controls the slave time using the corrected smoothed time difference CT as the time error of the slave time.
  • the time difference with respect to the round trip delay time delay is a highly accurate time difference. Only when a highly accurate time difference is obtained, the time difference is used as a time error, and the slave time is controlled (corrected) so that the time error is zero, thereby synchronizing the slave time. By taking the above, it is possible to prevent a decrease in the synchronization accuracy of the slave time.
  • the time difference is used as a time error, and the slave time is controlled so that the time error is zero. (Hereinafter, it is also referred to as a method using only the time difference with respect to the minimum round-trip delay time) If the round-trip delay time delay close to the minimum round-trip delay time cannot be obtained, the servo is not applied to the slave time (the slave time is not controlled). It will be.
  • a round-trip delay time delay close to the minimum round-trip delay time can be obtained. Since the frequency is low and the servo is not applied to the slave time, it may take time for the slave time to reach the master time, and the servo related to the slave time may become unstable.
  • the correction unit 46 in FIG. 10 uses each time difference as an attention time difference, smoothes the attention time difference into a smoothing time difference Tav, and corrects the smoothing time difference Tav. Since the difference CT is used as a time error and the servo is applied to the slave time, the servo related to the slave time is stable and the PTP message is communicated through any network switch. The slave time can be quickly reached the master time.
  • FIG. 17 is a block diagram showing a second configuration example of the correction unit 46 of FIG.
  • the correction unit 46 includes a smoothing unit 71, a correction amount calculation unit 72, an output value control unit 73, a smoothing time difference correction unit 74, and a median processing unit 75.
  • the correction unit 46 in FIG. 17 has a smoothing unit 71, a correction amount calculation unit 72, an output value control unit 73, and a smoothing time difference correction unit 74 in common with the case of FIG. This is different from the case of FIG. 10 in that a processing unit 75 is newly provided.
  • the correction amount C is supplied from the correction amount calculation unit 72 to the median processing unit 75.
  • the median processing unit 75 sets the past P correction amounts C including the new correction amount C as targets of median processing, and performs the median processing. Find the median of P correction amounts C of interest.
  • the median processing unit 75 sets the new correction amount C as the input value Cin and the output value control unit 73. To supply.
  • the correction amount supplied to the output value control unit 73 as the input value Cin last time is again used as the input value Cin. Is supplied to the output value control unit 73.
  • FIG. 18 is a flowchart for explaining an example of median processing of the median processing unit 75 in FIG.
  • the median process in FIG. 18 is performed as part of the time difference correction process in step S13 in FIG.
  • the median processing is started when a new correction amount C is supplied from the correction amount calculation unit 72 to the median processing unit 75, for example.
  • step S61 the median processing unit 75 sets the past P correction amounts C including the new correction amount C from the correction amount calculation unit 72 as the median processing targets, and the median processing target P.
  • the median (median value) of each correction amount C is obtained, and the process proceeds to step S62.
  • step S62 the median processing unit 75 determines whether or not the new correction amount C from the correction amount calculation unit 72 matches the median obtained in step S61.
  • step S62 If it is determined in step S62 that the new correction amount C matches the median, the process proceeds to step S63, and the median processing unit 75 sets the new correction amount C to the output value control unit 73.
  • the input value Cin is supplied to the output value control unit 73, and the median process is terminated.
  • step S62 If it is determined in step S62 that the new correction amount C does not match the median, the process proceeds to step S64, and the median processing unit 75 uses the previous input value Cin as it is as the output value.
  • the input value Cin of the control unit 73 is maintained and supplied to the output value control unit 73, and the median process is terminated.
  • the smoothing time difference Tav is corrected by using the correction amount C, and the greatly fluctuated result is obtained.
  • the corrected smoothed time difference CT as a time error and applying the servo to the slave time, it is possible to prevent the servo from becoming unstable.
  • FIG. 19 is a diagram showing the relationship between the corrected smoothing time difference CT and the true value of the time difference Tms.
  • the corrected smoothed time difference CT is obtained by correcting the smoothed time difference Tav obtained by smoothing the time difference Tms
  • the corrected smoothed time difference CT with respect to the time difference Tms is obtained after the time difference Tms is obtained. There is a time lag (delay) before it is made.
  • the smoothing unit 71 includes a 2N + 1 tap FIR filter
  • the time difference sample x iN N samples before the latest time difference sample x i
  • a smoothed time difference Tav for the noticed time difference is obtained, so a corrected smoothed time difference CT for the latest time difference (corrected smoothed time difference CT obtained for the latest time difference) Is obtained at least N samples (time) later than the latest time difference.
  • the corrected smoothing time difference CT for the latest time difference is obtained at least N samples after the latest time difference is obtained, so that the corrected smoothing for the latest time difference is performed.
  • the slave time servo using the time difference CT as the time error is delayed by at least N samples after the latest time difference is obtained.
  • the corrected smoothed time difference CT is immediately adjusted so that the corrected smoothed time difference CT becomes a highly accurate time difference.
  • the slave time can be matched with the master time with fine accuracy.
  • the time difference with respect to the round trip delay time delay is High accuracy. Therefore, in the present technology, the time difference with respect to the round trip delay time delay close to the minimum round trip delay time or the maximum round trip delay time is detected as a highly accurate time difference close to the true value.
  • FIG. 20 is a block diagram showing a third configuration example of the correction unit 46 of FIG.
  • the correction unit 46 includes a corrected smoothing time difference generation unit 101, a high-precision correction amount calculation unit 102, and a corrected smoothing time difference correction unit 103.
  • the time difference Tms is supplied from the time difference calculator 43 (FIG. 8) to the corrected smoothing time difference generator 101 in time series, and the round trip delay time delay is supplied from the delay time calculator 45 (FIG. 8) in time series. To be supplied.
  • the corrected smoothing time difference generation unit 101 is a correction smoothing time difference generation unit configured by the smoothing unit 71 to the smoothing time difference correction unit 74 in FIG. 10 or the smoothing unit 71 to the median processing unit in FIG.
  • the correction smoothing time difference generating unit configured by 75 is configured in the same manner.
  • the corrected smoothing time difference generation unit 101 receives the time difference Tms from the time difference calculation unit 43 and the round trip delay time delay from the delay time calculation unit 45 as input, as in FIG. 10 or FIG.
  • a corrected smoothing time difference CT for the time difference of interest is generated and supplied to the high-accuracy correction amount calculation unit 102 and the corrected smoothing time difference correction unit 103.
  • the high-accuracy correction amount calculation unit 102 is supplied with the correction smoothing time difference CT from the correction smoothing time difference generation unit 101, and is also supplied with the time difference Tms in time series from the time difference calculation unit 43 (FIG. 8). At the same time, the round trip delay time delay is supplied in time series from the delay time calculator 45 (FIG. 8).
  • the high-accuracy correction amount calculation unit 102 determines that the round-trip delay time (the target time difference and the round-trip delay time of a pair) delay with respect to the latest time difference from the time difference calculation unit 43 is the minimum or maximum value of the round-trip delay time. When the value is close to the value, the latest time difference is detected as a high-accuracy time difference close to the true value, and the high-accuracy time difference and the correction for the time difference of interest from the corrected smoothing time difference generation unit 101 are corrected.
  • a high-accuracy correction amount Cp for correcting the corrected smoothed time difference CT with respect to the noticed time difference to a highly accurate time error is obtained and supplied to the corrected smoothed time difference correcting unit 103.
  • the corrected smoothing time difference correction unit 103 corrects the corrected smoothing time difference CT from the corrected smoothing time difference generation unit 101 using the high accuracy correction amount Cp from the high accuracy correction amount calculation unit 102, and the result
  • the obtained twice corrected smoothed time difference CT2 is supplied to the time output unit 50 (FIG. 8) as a time error of the slave time.
  • FIG. 21 is a flowchart illustrating an example of the time difference correction process performed by the correction unit 46 in FIG. 20 in step S13 in FIG.
  • step S101 the corrected smoothing time difference generation unit 101 uses the time difference Tms from the time difference calculation unit 43 and the round trip delay time delay from the delay time calculation unit 45 to correct the correction smoothing time for the time difference of interest.
  • the difference CT is generated and supplied to the high-accuracy correction amount calculation unit 102 and the corrected smoothing time difference correction unit 103, and the process proceeds to step S102.
  • step S102 the high-accuracy correction amount calculation unit 102 determines the latest time difference when the round-trip delay time delay with respect to the latest time difference from the time difference calculation unit 43 is close to the maximum value of the round-trip delay time.
  • the high-accuracy correction that detects the high-accuracy time difference is detected using the high-accuracy time difference and the corrected smoothing time difference CT with respect to the time difference of interest from the corrected smoothing time-difference generating unit 101.
  • a quantity calculation process is performed.
  • the high accuracy correction amount calculation unit 102 supplies the high accuracy correction amount Cp to the correction smoothing time difference correction unit 103, and the process proceeds from step S102 to step S103.
  • the corrected smoothing time difference correcting unit 103 uses the corrected smoothing time difference CT from the corrected smoothing time difference generating unit 101 and the high accuracy correction amount Cp from the high accuracy correction amount calculating unit 102.
  • the corrected smoothing time difference CT is corrected to the twice corrected smoothing time difference CT2, and is supplied to the time output unit 50 (FIG. 8) as a time error of the slave time to perform the time difference correction process. finish.
  • FIG. 22 is a block diagram illustrating a first configuration example of the high-accuracy correction amount calculation unit 102 in FIG.
  • the high-precision correction amount calculation unit 102 includes a maximum value detection unit 111, a statistical processing unit 112, a threshold setting unit 113, a high-precision time difference detection unit 114, a correction amount calculation unit 115, and a high-precision correction amount output.
  • a control unit 116 is included.
  • the maximum value detection unit 111 is supplied with a round trip delay time delay from the delay time calculation unit 45 (FIG. 8).
  • the maximum value detection unit 111 calculates the maximum value (minimum round trip delay time as the minimum value or maximum round trip delay time as the maximum value) in the round trip delay time delay sequence supplied from the delay time calculation unit 45. Detected and supplied to the statistical processing unit 112 and the high-precision time difference detection unit 114.
  • the statistical processing unit 112 is supplied with the round trip delay time delay from the delay time calculation unit 45 (FIG. 8) in addition to being supplied with the round trip delay time from the maximum value detection unit 111.
  • the statistical processing unit 112 performs statistical processing for obtaining the frequency of the round-trip delay time having a value within a predetermined range based on the maximum value of the round-trip delay time, and sets the frequency of the round-trip delay time as a result of the statistical processing as a threshold value. This is supplied to the setting unit 113.
  • the threshold value setting unit 113 sets a detection threshold value that is a threshold value used for detection of the high-precision time difference based on the frequency of the round-trip delay time that is a result of the statistical processing from the statistical processing unit 112, and performs high-precision time difference detection. Supplied to the unit 114.
  • the high-precision time difference detection unit 114 is supplied with the maximum value of the round-trip delay time from the maximum value detection unit 111 and the detection threshold value from the threshold value setting unit 113, and the time difference calculation unit 43 (FIG. 8). Is supplied with a time difference Tms, and a round trip delay time delay is supplied from the delay time calculator 45 (FIG. 8).
  • the high-accuracy time difference detector 114 determines the latest round-trip delay time delay. , That is, the latest time difference Tms from the time difference calculation unit 43 is detected as a high-precision time difference and supplied to the correction amount calculation unit 115.
  • the correction amount calculation unit 115 is supplied with the high-precision time difference from the high-precision time difference detection unit 114, and also from the correction smoothing time difference generation unit 101 (FIG. 20), the corrected smoothing time difference CT with respect to the attention time difference. Is supplied.
  • the correction amount calculation unit 115 uses the high-accuracy time difference from the high-accuracy time difference detection unit 114 and the corrected smoothing time difference CT for the attention time difference from the corrected smoothing time difference generation unit 101 to perform high-accuracy correction.
  • the amount Cp is obtained and supplied to the high accuracy correction amount output control unit 116.
  • the high accuracy correction amount output control unit 116 controls the supply (output) of the high accuracy correction amount Cp from the correction amount calculation unit 115 to the correction smoothing time difference correction unit 103 (FIG. 20).
  • the high-accuracy time difference includes the time difference Tms for the round-trip delay time delay close to the minimum round-trip delay time (minimum round-trip delay time) and the round-trip delay time close to the maximum round-trip delay time (maximum round-trip delay time).
  • FIG. 23 is a flowchart illustrating an example of processing for detecting the maximum value (here, the minimum value) performed by the maximum value detecting unit 111 of the high-precision correction amount calculating unit 102 in FIG.
  • step S111 the maximum value detection unit 111 determines that the latest round-trip delay time delay from the delay time calculation unit 45 (FIG. 8) is the minimum value of the round-trip delay time currently obtained ( It is determined whether (minimum round trip delay time) is smaller than the set variable delay_min.
  • variable delay_min a value larger than the value expected to be obtained as the maximum value of the round-trip delay time, such as infinity, is employed.
  • step S111 If it is determined in step S111 that the latest round-trip delay time delay is smaller than the variable (minimum round-trip delay time) delay_min, that is, if the latest round-trip delay time delay is to be set to the variable delay_min, in step S112, the maximum value detecting unit 111 sets the index i of the array variable prev_delay_min [i] that temporarily holds the past minimum round-trip delay time delay_min to the variable J that is incremented in step S127 described later (initial The process proceeds to step S113.
  • the array variable prev_delay_min [i] is set to the round-trip delay time delay that is the minimum round-trip delay time delay_min before i + 1 times.
  • step S113 the maximum value detecting unit 111 updates the array variable prev_delay_min [i + 1] by setting the array variable prev_delay_min [i] to the array variable prev_delay_min [i + 1], and the processing is performed in step S114. Proceed to
  • step S114 the maximum value detecting unit 111 determines whether or not the index i is 0.
  • step S114 If it is determined in step S114 that the index i is not 0, the process proceeds to step S115, and the maximum value detecting unit 111 decrements the index i by 1. Thereafter, the process returns from step S115 to step S113, and the same process is repeated thereafter.
  • step S114 If it is determined in step S114 that the index i is 0, the process proceeds to step S116, and the maximum value detecting unit 111 sets the variable delay_min to the variable prev_delay_min [0], and then the variable delay_min. And set the latest round-trip delay time delay. Further, the maximum value detecting unit 111 initializes the variable J to 0, and the process proceeds to step S117.
  • step S111 determines whether the latest round-trip delay time delay is smaller than the variable delay_min. If it is determined in step S111 that the latest round-trip delay time delay is not smaller than the variable delay_min, the process skips steps S112 to S116 and proceeds to step S117, where the maximum value detection unit 111 Is determined to be equal to or smaller than an added value delay_min + TH obtained by adding a predetermined threshold TH (> 0) to the variable delay_min.
  • step S117 If it is determined in step S117 that the latest round-trip delay time delay is equal to or less than the added value delay_min + TH, that is, the latest round-trip delay time delay is within the range of the threshold TH from the current minimum round-trip delay time delay_min. If it is a value (when delay is a value in the range from delay_min to delay_min + TH), the process proceeds to step S118, and the maximum value detecting unit 111 determines that the latest round-trip delay time delay is the current minimum. A variable off_window_count that counts cases that are not values within the range of the threshold TH from the round-trip delay time delay_min is set (initialized) to 0, and the process proceeds to step S128.
  • step S128 the maximum value detection unit 111 outputs (supplies) the variable delay_min to the statistical processing unit 112 and the high-accuracy time difference detection unit 114 as the minimum value of the round-trip delay time (minimum round-trip delay time). The maximum value detection process is terminated.
  • step S117 If it is determined in step S117 that the latest round-trip delay time delay is not less than or equal to the added value delay_min + TH, that is, the latest round-trip delay time delay is within the range of the threshold TH from the current minimum round-trip delay time delay_min. If not, the process proceeds to step S119, the maximum value detecting unit 111 increments the variable off_window_count by 1, and the process proceeds to step S120.
  • step S120 the maximum value detecting unit 111 determines whether or not the variable off_window_count is larger than a predetermined threshold TH_time.
  • step S120 If it is determined in step S120 that the variable off_window_count is not greater than the threshold value TH_time, that is, that the round trip delay time delay is not a value within the range of the variable delay_min to the threshold value TH, the time corresponding to the threshold value TH_time (sample) When the number is not continuous, the process skips steps S121 to S127 and proceeds to step S128. As described above, the maximum value detection unit 111 sets the variable delay_min to the minimum value (minimum of the round trip delay time). (Round-trip delay time) is output (supplied) to the statistical processing unit 112 and the high-accuracy time difference detection unit 114, and the maximum value detection process ends.
  • step S120 when it is determined in step S120 that the variable off_window_count is greater than the threshold TH_time, that is, that the round-trip delay time delay is not a value within the range of the variable delay_min to the threshold TH, a time corresponding to the threshold TH_time ( If the number of samples continues, the process proceeds to step S121, the maximum value detecting unit 111 sets the variable off_window_count to 0, and the process proceeds to step S122.
  • step S122 the maximum value detecting unit 111 determines whether or not the variable J is equal to or greater than the maximum equivalent number J_max determined in advance as a value corresponding to the maximum value of the number of arrays of the array variable prev_delay_min [i].
  • step S122 If it is determined in step S122 that the variable J is equal to or greater than the maximum equivalent number J_max, the process proceeds to step S123, and the maximum value detection unit 111 sets the variable delay_min as the minimum round-trip delay time to be larger than before. The value is updated to, for example, delay_min + 2 ⁇ TH, and the process proceeds to step S128.
  • step S128 the maximum value detection unit 111 outputs the variable delay_min to the statistical processing unit 112 and the high-accuracy time difference detection unit 114 as the minimum round-trip delay time as described above, and performs the maximum value detection process. Exit.
  • step S122 If it is determined in step S122 that the variable J is not equal to or greater than the maximum equivalent number J_max, the process proceeds to step S124, and the maximum value detection unit 111 determines that the variable delay_min as the current minimum round-trip delay time is ( Array) It is determined whether or not it is greater than or equal to variable prev_delay_min [J].
  • step S124 when it is determined that the variable delay_min is equal to or greater than the variable prev_delay_min [J], that is, the current minimum round-trip delay time delay_min is a value that may have become the minimum round-trip delay time in the past (in the past, If the variable delay_min is equal to or greater than prev_delay_min [J], the process proceeds to step S125, and the maximum value detection unit 111 sets a value that has reached the minimum round-trip delay time in the past.
  • variable prev_delay_min [J] is set by adding a value obtained by adding the variable delay_min and the threshold TH to the variable prev_delay_min [J] so that the generated variable prev_delay_min [J] is larger than the current minimum round trip delay time delay_min. The process proceeds to step S126.
  • step S124 If it is determined in step S124 that the variable delay_min is not equal to or greater than the variable prev_delay_min [J], that is, the current minimum round-trip delay time delay_min is the value prev_delay_min [J].
  • step S124 If it is determined in step S124 that the variable delay_min is not equal to or greater than the variable prev_delay_min [J], that is, the current minimum round-trip delay time delay_min is the value prev_delay_min [J The process skips step S125 and proceeds to step S126, where the maximum value detection unit 111 updates the variable delay_min as the minimum round-trip delay time to the variable prev_delay_min [J]. The process proceeds to S127.
  • step S127 the maximum value detecting unit 111 increments the variable J by 1, and the process proceeds to step S128.
  • step S128 the maximum value detection unit 111 outputs the variable delay_min to the statistical processing unit 112 and the high-accuracy time difference detection unit 114 as the minimum round-trip delay time as described above, and performs the maximum value detection process. Exit.
  • variable delay_min as the minimum round trip delay time is set in steps S122 to S127.
  • the round-trip delay time which has been set as the minimum round-trip delay time in the past and is larger than the current minimum round-trip delay time, is updated (array variable prev_delay_min [J] set).
  • variable delay_min as the minimum round trip delay time is updated to a somewhat larger value.
  • the minimum round trip delay time delay_min is updated to the latest round trip delay time delay.
  • the round trip delay time greatly exceeding the current minimum round trip delay time delay_min that is, the round trip delay time exceeding delay_min + TH continues for the number of times exceeding the threshold TH_time
  • the minimum round trip delay time delay_min is the minimum round trip delay time delay_min. Updated to a larger value.
  • FIG. 24 is a diagram illustrating an example of statistical processing performed by the statistical processing unit 112 of the high-precision correction amount calculation unit 102 in FIG.
  • the statistical processing unit 112 targets the past M round-trip delay times (delay time samples) including the latest round-trip delay time delay from the delay time calculation unit 45 (FIG. 8) (M is an integer equal to or greater than 2). Process.
  • the statistical processing is performed when the latest round-trip delay time delay of the M round-trip delay times is obtained every M round-trip delay times. Can be performed on the past M round-trip delay times including.
  • the statistical processing can be performed for the past M round-trip delay times including the latest round-trip delay time delay every time the latest round-trip delay time delay is obtained.
  • the statistical processing is performed every M round-trip delay times, when the latest round-trip delay time delay of the M round-trip delay times is obtained, and the past M pieces including the latest round-trip delay time delay.
  • the round-trip delay time is used as a target, the result of the statistical processing performed immediately before is maintained until new statistical processing is performed.
  • the threshold setting unit 113 sets a detection threshold based on the statistical processing result of the statistical processing unit 112, but until the next statistical processing is performed.
  • the detection threshold set based on the result of the statistical processing performed immediately before is maintained.
  • FIG. 25 illustrates an example of statistical processing performed by the statistical processing unit 112 of the high-precision correction amount calculation unit 102 in FIG. 22 when the minimum round-trip delay time is detected as the maximum value in the maximum value detection unit 111. It is a flowchart.
  • the statistical processing in FIG. 25 is performed as part of the high-precision correction amount calculation processing in step S102 in FIG.
  • step S131 the statistical processing unit 112 sets all the array variables delay_min_count [0], delay_min_count [1], delay_min_count [2], and delay_min_count [3] that count the frequency of the round-trip delay time delay to 0. The process proceeds to step S132.
  • step S132 the statistical processing unit 112 acquires the latest minimum round-trip delay time (as a variable) delay_min from the maximum value detection unit 111, and the process proceeds to step S133.
  • step S133 the statistical processing unit 112 initializes a variable j for counting the number of round-trip delay times (delay time samples) to 0, and the process proceeds to step S134.
  • step S134 the statistical processing unit 112 determines that the round-trip delay time delay [ij] that is j samples earlier (past) before the latest round-trip delay time delay [i] from the delay time calculation unit 45 (FIG. 8) is the latest. It is determined whether or not an added value delay_min + TH0 or less obtained by adding the minimum round-trip delay time delay_min and a predetermined threshold TH0 (> 0).
  • step S134 If it is determined in step S134 that the round-trip delay time delay [ij] is equal to or less than the added value delay_min + TH0, the process proceeds to step S135, and the statistical processing unit 112 determines the threshold value from the latest minimum round-trip delay time delay_min.
  • the variable delay_min_count [0] that counts the number of round-trip delay times delay within a range of TH0 (a value within the range from delay_min to the added value delay_min + TH0) is incremented by 1, and the process proceeds to step S142. .
  • step S134 If it is determined in step S134 that the round trip delay time delay [ij] is not less than or equal to the added value delay_min + TH0, the process proceeds to step S136, and the statistical processing unit 112 receives the latest time from the delay time calculating unit 45.
  • the round-trip delay time delay [ij] which is j samples before the round-trip delay time delay [i] is the sum of the latest minimum round-trip delay time delay_min and a predetermined threshold TH1 greater than the threshold TH0. It is determined whether or not the value is delay_min + TH1 or less.
  • step S136 If it is determined in step S136 that the round-trip delay time delay [ij] is equal to or less than the addition value delay_min + TH1, the process proceeds to step S137, and the statistical processing unit 112 adds the addition value delay_min from the addition value delay_min + TH0.
  • the variable delay_min_count [1] which counts the number of round-trip delay times with values in the range up to + TH1, is incremented by 1, and the process proceeds to step S142.
  • step S136 If it is determined in step S136 that the round trip delay time delay [ij] is not less than or equal to the added value delay_min + TH1, the process proceeds to step S138, and the statistical processing unit 112 receives the latest time from the delay time calculating unit 45.
  • the round-trip delay time delay [ij] j samples before the round-trip delay time delay [i] is the sum of the latest minimum round-trip delay time delay_min and a predetermined threshold TH2 that is larger than the threshold TH1. It is determined whether or not the value is delay_min + TH2 or less.
  • step S138 If it is determined in step S138 that the round-trip delay time delay [ij] is equal to or less than the added value delay_min + TH2, the process proceeds to step S139, and the statistical processing unit 112 adds the added value delay_min + TH1 to the added value delay_min.
  • the variable delay_min_count [2] for counting the number of round-trip delay times with values in the range up to + TH2 is incremented by 1, and the process proceeds to step S142.
  • step S138 If it is determined in step S138 that the round trip delay time delay [ij] is not less than or equal to the added value delay_min + TH2, the process proceeds to step S140, and the statistical processing unit 112 receives the latest time from the delay time calculating unit 45.
  • the round-trip delay time delay [ij] which is j samples before the round-trip delay time delay [i] is the sum of the latest minimum round-trip delay time delay_min and a predetermined threshold TH3 that is greater than the threshold TH2. It is determined whether or not the value is delay_min + TH3 or less.
  • step S140 If it is determined in step S140 that the round-trip delay time delay [ij] is equal to or less than the addition value delay_min + TH3, the process proceeds to step S141, and the statistical processing unit 112 adds the addition value delay_min from the addition value delay_min + TH2.
  • step S140 If it is determined in step S140 that the round trip delay time delay [ij] is not less than or equal to the added value delay_min + TH3, the process proceeds to step S142, and the statistical processing unit 112 uses the variable j for statistical processing. It is determined whether or not it is equal to a subtraction value M ⁇ 1 obtained by subtracting 1 from the number M of samples of the round trip delay time delay.
  • step S142 If it is determined in step S142 that the variable j is not equal to the subtraction value M-1, the process proceeds to step S143, and the statistical processing unit 112 increments the variable j by 1. And a process returns to step S134 from step S143, and the same process is repeated hereafter.
  • step S142 If it is determined in step S142 that the variable j is equal to the subtraction value M-1, that is, the past M round-trip delay times delay [i-M + 1] including the latest round-trip delay time delay [i].
  • the frequency of delay time delay_delay_min_count [2] in the range from delay_min + TH1 to delay_min + TH2 and the frequency of delay_delay_min_count [3] in the range from delay_min + TH2 to delay_min + TH3 were obtained. If so, the statistical processing is terminated.
  • the frequency of the round-trip delay time delay was counted for four ranges (range based on the minimum round-trip delay time delay_min). However, in the statistical processing in the statistical processing unit 112, three or less, or five or more The frequency of the round-trip delay time delay can be counted in the range.
  • the threshold value TH used in the maximum value detection process of FIG. 23 for example, the maximum threshold value TH3 of the four threshold values TH0, TH1, TH2, and TH3 used in the statistical process of FIG. 25 is adopted. can do.
  • FIG. 26 illustrates an example of threshold setting processing performed by the threshold setting unit 113 of the high-accuracy correction amount calculation unit 102 in FIG. 22 when the minimum round-trip delay time is detected as the maximum value in the maximum value detection unit 111. It is a flowchart to explain.
  • the threshold setting process in FIG. 26 is performed as part of the high-accuracy correction amount calculation process in step S102 in FIG.
  • the round-trip delay time with a high frequency is detected from the minimum round-trip delay time as the maximum value.
  • the detection threshold DMIN is set so as to fall within the range of DMIN (range from delay_min to delay_min + DMIN).
  • the threshold setting unit 113 determines the frequency of the round-trip delay time delay obtained by the latest statistical processing in the statistical processing unit 112 delay_min_count [0], delay_min_count [1], delay_min_count [ 2] and delay_min_count [3], for example, the frequency delay_min_count [0] of the round trip delay time in the range of the first smallest (smallest) value and the round trip delay time delay in the range of the second smallest value It is determined whether or not the frequency delay_min_count [0] + delay_min_count [1] obtained by adding the frequency delay_min_count [1] is greater than the frequency delay_min_count [2] of the round trip delay time in the range of the third smallest value.
  • step S151 when it is determined that the frequency delay_min_count [0] + delay_min_count [1] is larger than the frequency delay_min_count [2], that is, the number of the round-trip delay time delay (delay_min_count [0] very close to the minimum round-trip delay time delay_min).
  • step S152 the threshold setting unit 113 sets the minimum
  • the detection threshold DMIN used when detecting the time difference Tms with respect to the round-trip delay time delay having a value close to the round-trip delay time delay_min as a high-precision time difference is set to, for example, a small-threshold value TH1, and a high-precision time difference detection unit 114, and the threshold setting process is terminated.
  • step S151 If it is determined in step S151 that the frequency delay_min_count [0] + delay_min_count [1] is not greater than the frequency delay_min_count [2], the process proceeds to step S153, and the threshold setting unit 113 sets the third smallest value. It is determined whether the frequency delay_min_count [2] of the round-trip delay time delay in the range is greater than the frequency delay_min_count [3] of the round-trip delay time delay in the range of the fourth smallest (largest) value.
  • step S153 If it is determined in step S153 that the frequency delay_min_count [2] is greater than the frequency delay_min_count [3], that is, the number of round-trip delay times delay (delay_min_count [2]) that is somewhat close to the minimum round-trip delay time delay_min is the minimum round-trip time.
  • the process proceeds to step S154, and the threshold setting unit 113 detects the detection threshold.
  • DMIN is set to a value greater than the threshold value TH1, for example, the threshold value TH2, and supplied to the high-accuracy time difference detection unit 114, and the threshold value setting process is terminated.
  • step S153 If it is determined in step S153 that the frequency delay_min_count [2] is not greater than the frequency delay_min_count [3], that is, the number of round trip delay times (delay_min_count [2]) that is somewhat close to the minimum round trip delay time delay_min is determined. If it is equal to or smaller than the number of round-trip delay times delay (delay_min_count [3]) not so far from the minimum round-trip delay time delay_min, the process proceeds to step S155, and the threshold setting unit 113 sets the detection threshold DMIN to be greater than the threshold TH2. For example, the threshold value TH3 is set and supplied to the high-accuracy time difference detection unit 114, and the threshold value setting process ends.
  • the detection threshold value DMIN is set to any one of the three threshold values TH1, TH2, and TH3. It can be set to no more than two values, or one of four or more values.
  • FIG. 27 shows the high-precision time difference performed by the high-precision time difference detection unit 114 of the high-precision correction amount calculation unit 102 in FIG. 22 when the minimum round-trip delay time is detected as the maximum value in the maximum value detection unit 111. It is a flowchart explaining the example of a process of a detection.
  • step S161 the high-precision time difference detection unit 114 acquires the latest minimum round-trip delay time (as a variable) delay_min from the maximum value detection unit 111 and the threshold setting unit 113. Thus, the latest detection threshold value DMIN is acquired, and the process proceeds to step S162.
  • step S162 the high-accuracy time difference detector 114 adds the latest round trip delay time delay from the delay time calculator 45 (FIG. 8) by adding the latest minimum round trip delay time delay_min and the latest detection threshold DMIN. Determine if value is less than delay_min + DMIN.
  • step S162 When it is determined in step S162 that the latest round-trip delay time delay is less than the added value delay_min + DMIN, that is, when the latest round-trip delay time delay is a value close to the latest minimum round-trip delay time delay_min.
  • the process proceeds to step S163, and the high-accuracy time difference detection unit 114 calculates the time difference Tms with respect to the latest round-trip delay time delay, that is, the latest time difference Tms from the time difference calculation unit 43 (FIG. 8) with high accuracy.
  • the time difference PT is detected and output (supplied) to the correction amount calculation unit 115, and the high-precision time difference detection process is terminated.
  • step S162 If it is determined in step S162 that the latest round-trip delay time delay is not less than the added value delay_min + DMIN, that is, if the latest round-trip delay time delay is not close to the latest minimum round-trip delay time delay_min, The high-precision time difference detection process is terminated.
  • the high-precision time difference detection unit 114 does not supply the high-precision time difference PT to the correction amount calculation unit 115.
  • FIG. 28 illustrates a correction amount calculation process performed by the correction amount calculation unit 115 of the high-precision correction amount calculation unit 102 in FIG. 22 when the minimum round-trip delay time is detected as the maximum value in the maximum value detection unit 111. It is a flowchart explaining an example.
  • the correction amount calculation process in FIG. 28 is performed as part of the high-accuracy correction amount calculation process in step S102 in FIG.
  • step S171 the correction amount calculation unit 115 determines whether or not the high accuracy time difference PT is supplied from the high accuracy time difference detection unit 114.
  • step S171 If it is determined in step S171 that the high-accuracy time difference detection unit 114 has supplied the high-accuracy time difference PT, the process proceeds to step S172, and the correction amount calculation unit 115 receives the correction from the high-accuracy time difference detection unit 114.
  • Correction smoothing with respect to the time difference of interest (the time difference N samples before the latest time difference) supplied from the corrected smoothing time difference generation unit 101 (FIG. 20) from the high-precision time difference (latest time difference) PT
  • step S171 If it is determined in step S171 that the high-accuracy time difference detection unit 114 has not supplied the high-accuracy time difference PT, the correction amount calculation process ends.
  • the correction amount calculation unit 115 does not obtain the high accuracy correction amount Cp and does not supply it to the high accuracy correction amount output control unit 116.
  • FIG. 29 is a flowchart illustrating an example of output control processing performed by the high accuracy correction amount output control unit 116 of the high accuracy correction amount calculation unit 102 of FIG.
  • the output control process in FIG. 29 is performed as part of the high-accuracy correction amount calculation process in step S102 in FIG.
  • the high accuracy correction amount supplied from the correction amount calculation unit 115 to the high accuracy correction amount output control unit 116 that is, the input value to the high accuracy correction amount output control unit 116 is represented as Cq
  • the high accuracy correction amount output from the high accuracy correction amount output control unit 116 (to the corrected smoothing time difference correction unit 103 (FIG. 20)), that is, the output value of the high accuracy correction amount output control unit 116 is expressed as Cp. .
  • FIG. 30 described later The same applies to FIG. 30 described later.
  • the high-accuracy correction amount output control unit 116 holds the high-accuracy correction amount Cq supplied from the correction amount calculation unit 115 in the zero order, and the corrected smoothing time difference correction unit 103 (FIG. 20).
  • step S181 the high-accuracy correction amount output control unit 116 determines whether or not the high-accuracy correction amount Cq is supplied as an input value from the correction amount calculation unit 115.
  • step S181 If it is determined in step S181 that the high-accuracy correction amount Cq is supplied as an input value from the correction amount calculation unit 115, the process proceeds to step S182, and the correction amount calculation unit 115 outputs the high-accuracy correction amount.
  • the input value Cq is output as the value Cp to the corrected smoothing time difference correction unit 103 (FIG. 20), and the output control process is terminated.
  • step S181 If it is determined in step S181 that the high accuracy correction amount Cq is not supplied as an input value from the correction amount calculation unit 115, the process proceeds to step S183, and the high accuracy correction amount output control unit 116 The output value Cp as the high-precision correction amount is maintained as it is and is output to the corrected smoothing time difference correction unit 103 (FIG. 20), and the output control process is terminated.
  • the high-accuracy correction amount from the correction amount calculation unit 115 is zero-order held and supplied to the correction smoothing time difference correction unit 103 (FIG. 20).
  • the high-accuracy time difference detection unit 114 detects the high-accuracy time difference PT
  • the high-accuracy time difference PT is immediately obtained using the high-accuracy time difference PT, and the corrected smoothing time difference correction unit 103.
  • the corrected smoothed time difference CT is calculated using the high-accuracy correction amount Cp obtained from the latest time difference that is the high-accuracy time difference PT.
  • the slave time is servoed.
  • the slave time can be matched with the master time with fine accuracy, and the synchronization accuracy of the slave time can be improved.
  • the corrected smoothed time difference generation unit 101 performs a round trip from the delay time calculation unit 45 (FIG. 8) for each time difference Tms from the time difference calculation unit 43 (FIG. 8).
  • a corrected smoothing time difference CT can be obtained, but as described in FIG. 19, the corrected smoothing time difference CT for each time difference is at least after the time difference is obtained. Therefore, the slave time servo using the corrected smoothed time difference CT for the latest time difference as the time error is delayed by at least N samples after the latest time difference is obtained. It can be applied.
  • the corrected smoothing time difference generation unit 101 can obtain the corrected smoothing time difference CT for each time difference Tms from the time difference calculation unit 43 (FIG. 8). In the servo at the slave time using the difference CT as the time error, a time lag due to the smoothing of the time difference Tms occurs.
  • the latest round-trip delay time delay is a value close to the minimum round-trip delay time delay_min in the high-accuracy correction amount calculation unit 102, the latest time with respect to the latest round-trip delay time delay.
  • the high-accuracy correction amount calculation unit 102 does not always detect the high-accuracy time difference PT for each time difference Tms from the time difference calculation unit 43 (FIG. 8), but is close to the minimum round-trip delay time delay_min. If the round-trip delay time delay is obtained, the time difference Tms with respect to the round-trip delay time delay is detected as the high-precision time difference PT, and is immediately corrected and smoothed by the high-precision correction amount Cp obtained from the high-precision time difference PT. Since the time difference CT is corrected, the time lag due to the smoothing of the time difference Tms does not occur unlike the slave time servo using the corrected smoothed time difference CT as the time error.
  • the corrected smoothing time difference CT obtained for each time difference Tms is not necessarily obtained for each time difference Tms.
  • the high-accuracy correction amount Cp calculated from the high-accuracy time difference PT with no time lag supplementing the amount Cp improves the synchronization accuracy of the slave time by supplementing the corrected smoothed time difference CT with time lag. be able to.
  • the slave time can be servoed, and the slave time can be made to coincide with the master time with fine accuracy.
  • the detection threshold value DMIN in the setting of the detection threshold value DMIN in the threshold value setting unit 113 of the high-accuracy correction amount calculation unit 102 in FIG. 22, when the frequency of small delays in the network 30 (FIG. 7) is high, the detection threshold value A small value TH1 is set as DMIN, and as a result, the time difference detected as the high-accuracy time difference by the high-accuracy time difference detection unit 114 becomes the time difference Tms with respect to the round-trip delay time delay very close to the minimum round-trip delay time delay_min. .
  • the minimum round-trip delay time delay_min becomes a small value, and the round trip is very close to the minimum round-trip delay time delay_min having such a small value. Since the time difference Tms with respect to the delay time delay has been described with reference to FIG. 11, it is a time difference with higher accuracy. It will be detected as a difference PT.
  • the high accuracy correction amount is set to the zero order. By holding, the output is immediately output to the corrected smoothing time difference correction unit 103 (FIG. 20).
  • the high accuracy correction amount output control unit 116 for example, from the correction amount calculation unit 115 to high accuracy
  • the high-accuracy correction amount can be output as it is, and then gradually approach 0.
  • FIG. 30 is a flowchart for explaining another example of the output control process performed by the high-precision correction amount output control unit 116 of the high-precision correction amount calculation unit 102 in FIG.
  • the high-accuracy correction amount output control unit 116 uses the high-accuracy correction amount as an output value as it is to perform correction smoothing.
  • the time difference is output to the time difference correction unit 103 (FIG. 20), and then the output value gradually approaches 0 from the high-accuracy correction amount from the correction amount calculation unit 115.
  • step S191 the high accuracy correction amount output control unit 116 determines whether or not the high accuracy correction amount Cq is supplied as an input value from the correction amount calculation unit 115.
  • step S191 If it is determined in step S191 that the high-accuracy correction amount Cq is supplied as an input value from the correction amount calculation unit 115, the process proceeds to step S192, and the correction amount calculation unit 115 outputs the high-precision correction amount.
  • the input value Cq is output as the value Cp to the corrected smoothing time difference correction unit 103 (FIG. 20), and the output control process is terminated.
  • step S191 If it is determined in step S191 that the high accuracy correction amount Cq is not supplied as an input value from the correction amount calculation unit 115, the process proceeds to step S193, and the high accuracy correction amount output control unit 116 The magnitude relationship between the output value Cp and 0 is determined.
  • step S193 If it is determined in step S193 that the output value Cp is less than 0 (negative), the process proceeds to step S194, and the high-precision correction amount output control unit 116 determines that the absolute value
  • step S194 If it is determined in step S194 that the absolute value
  • step S193 If it is determined in step S193 that the output value Cp is greater than 0 (positive), the process proceeds to step S196, and the high-precision correction amount output control unit 116 determines the absolute value
  • step S196 If it is determined in step S196 that the absolute value
  • step S193 if it is determined in step S193 that the output value Cp is 0, if it is determined in step S194 that the absolute value
  • FIG. 31 is a flowchart for explaining an example of the maximum value (here, maximum value) detection process performed by the maximum value detection unit 111 of the high-precision correction amount calculation unit 102 of FIG.
  • step S102 of FIG. 31 is performed as part of the high-accuracy correction amount calculation process in step S102 of FIG.
  • step S211 the maximum value detection unit 111 determines that the latest round-trip delay time delay from the delay time calculation unit 45 (FIG. 8) is the maximum value of the round-trip delay time currently obtained ( It is determined whether or not (maximum round trip delay time) is larger than the set variable delay_max.
  • variable delay_max a value smaller than the value expected to be obtained as the minimum value of the round-trip delay time, such as 0, is employed.
  • step S211 If it is determined in step S211 that the latest round-trip delay time delay is greater than the maximum round-trip delay time delay_max, that is, if the latest round-trip delay time delay is to be set to the variable delay_max, the process proceeds to step S212.
  • the maximum value detection unit 111 sets (initializes) the index i of the array variable prev_delay_max [i] that temporarily holds the past maximum round-trip delay time delay_max to the variable J that is incremented in step S227 described later. Then, the process proceeds to step S213.
  • the initial value of the variable J for example, 0, which is the minimum value of the index of the array variable prev_delay_max [i] is adopted. Further, in principle, the round trip delay time delay that is the maximum round trip delay time delay_max i + 1 times before is set in the array variable prev_delay_max [i].
  • step S213 the maximum value detecting unit 111 updates the array variable prev_delay_max [i + 1] by setting the array variable prev_delay_max [i] to the array variable prev_delay_max [i + 1], and the processing is performed in step S214. Proceed to
  • step S214 the maximum value detecting unit 111 determines whether or not the index i is 0.
  • step S214 If it is determined in step S214 that the index i is not 0, the process proceeds to step S215, and the maximum value detecting unit 111 decrements the index i by 1. Thereafter, the process returns from step S215 to step S213, and the same process is repeated thereafter.
  • step S214 If it is determined in step S214 that the index i is 0, the process proceeds to step S216, and the maximum value detecting unit 111 sets the variable delay_max in the variable prev_delay_max [0], and then the variable delay_max. And set the latest round-trip delay time delay. Further, the maximum value detecting unit 111 initializes the variable J to 0, and the process proceeds to step S217.
  • step S211 if it is determined in step S211 that the latest round-trip delay time delay is not greater than the variable delay_max, the process skips steps S212 to S216, proceeds to step S217, and the maximum value detection unit 111 Is determined to be equal to or larger than a subtraction value delay_max-TH obtained by subtracting a threshold value TH (> 0) from the variable delay_max.
  • step S217 If it is determined in step S217 that the latest round-trip delay time delay is equal to or greater than the subtraction value delay_max-TH, that is, the latest round-trip delay time delay is within the threshold TH from the current maximum round-trip delay time delay_max. If it is a value (when delay is a value within the range from delay_max-TH to delay_max), the process proceeds to step S218, and the maximum value detection unit 111 determines that the latest round-trip delay time delay is the current value. A variable off_window_count for counting cases that are not a value within the range of the threshold TH from the maximum round-trip delay time delay_max is set (initialized) to 0, and the process proceeds to step S228.
  • step S217 If it is determined in step S217 that the latest round-trip delay time delay is not equal to or greater than the subtraction value delay_max-TH, that is, the latest round-trip delay time delay is within the threshold TH from the current maximum round-trip delay time delay_max. If not, the process proceeds to step S219, the maximum value detection unit 111 increments the variable off_window_count by 1, and the process proceeds to step S220.
  • step S220 the maximum value detecting unit 111 determines whether or not the variable off_window_count is larger than the threshold value TH_time.
  • step S220 when it is determined that the variable off_window_count is not greater than the threshold value TH_time, that is, that the round trip delay time delay is not a value within the range of the variable delay_max to the threshold value TH, the time corresponding to the threshold value TH_time (sample) If the number is not continuous, the process skips steps S221 to S227 and proceeds to step S228.
  • the maximum value detection unit 111 sets the variable delay_max to the maximum value (maximum) of the round-trip delay time.
  • the round trip delay time is output to the statistical processing unit 112 and the high-precision time difference detection unit 114, and the maximum value detection process is terminated.
  • step S220 when it is determined in step S220 that the variable off_window_count is greater than the threshold TH_time, that is, that the round trip delay time delay is not a value within the range of the variable delay_max to the threshold TH, a time corresponding to the threshold TH_time ( If the number of samples continues, the process proceeds to step S221, the maximum value detecting unit 111 sets the variable off_window_count to 0, and the process proceeds to step S222.
  • step S222 the maximum value detecting unit 111 determines whether or not the variable J is equal to or greater than a maximum equivalent number J_max that is determined in advance as a value corresponding to the maximum value of the number of arrays of the array variable prev_delay_max [i].
  • step S222 If it is determined in step S222 that the variable J is greater than or equal to the maximum equivalent number J_max, the process proceeds to step S223, and the maximum value detection unit 111 sets the variable delay_max as the maximum round-trip delay time to be smaller than before. The value is updated to, for example, delay_max ⁇ 2 ⁇ TH, and the process proceeds to step S228.
  • step S228, the maximum value detection unit 111 outputs the variable delay_max as the maximum round-trip delay time to the statistical processing unit 112 and the high-precision time difference detection unit 114, as described above, and performs maximum value detection processing. Exit.
  • step S222 If it is determined in step S222 that the variable J is not greater than or equal to the maximum equivalent number J_max, the process proceeds to step S224, and the maximum value detection unit 111 determines that the variable delay_max as the current maximum round-trip delay time is ( Array) It is determined whether or not it is less than or equal to variable prev_delay_max [J].
  • step S224 when it is determined that the variable delay_max is equal to or less than the variable prev_delay_max [J], that is, the current maximum round-trip delay time delay_max is a value that may have become the maximum round-trip delay time in the past (in the past, If the variable delay_max is a value that has been set to prev_delay_max [J] or less, the process proceeds to step S225, and the maximum value detecting unit 111 sets a value that has reached the maximum round-trip delay time in the past.
  • variable prev_delay_max [J] is set by subtracting the threshold TH from the variable delay_max in the variable prev_delay_max [J] so that the generated variable prev_delay_max [J] is smaller than the current maximum round-trip delay time delay_max. After updating, the process proceeds to step S226.
  • step S224 If it is determined in step S224 that the variable delay_max is not less than or equal to the variable prev_delay_max [J], that is, the value prev_delay_max [J that the current maximum round-trip delay time delay_max has become the maximum round-trip delay time in the past. ], The process skips step S225 and proceeds to step S226, where the maximum value detecting unit 111 updates the variable delay_max as the maximum round-trip delay time to the variable prev_delay_max [J]. The process proceeds to S227.
  • step S227 the maximum value detecting unit 111 increments the variable J by 1, and the process proceeds to step S228.
  • step S228, the maximum value detection unit 111 outputs the variable delay_max as the maximum round-trip delay time to the statistical processing unit 112 and the high-precision time difference detection unit 114, as described above, and performs maximum value detection processing. Exit.
  • the maximum round trip is performed in steps S222 to S227.
  • the variable delay_max as the delay time is updated to a round-trip delay time or the like (which is set as an array variable prev_delay_max [J]) that is set to the maximum round-trip delay time in the past and is smaller than the current maximum round-trip delay time.
  • the variable delay_max as the maximum round-trip delay time is updated to a somewhat smaller value.
  • the maximum round trip delay time delay_max is updated to the latest round trip delay time delay.
  • the round-trip delay time greatly below the current maximum round-trip delay time delay_max that is, the round-trip delay time below delay_max-TH continues for the number of times exceeding the threshold TH_time
  • the maximum round-trip delay time delay_max is the maximum round-trip delay time delay_max. Updated to a smaller value.
  • FIG. 32 illustrates an example of statistical processing performed by the statistical processing unit 112 of the high-precision correction amount calculating unit 102 in FIG. 22 when the maximum round-trip delay time is detected as the maximum value in the maximum value detecting unit 111. It is a flowchart.
  • step S231 the statistical processing unit 112 sets all the array variables delay_max_count [0], delay_max_count [1], delay_max_count [2], and delay_max_count [3] that count the frequency of the round-trip delay time delay to 0. The process proceeds to step S232.
  • step S232 the statistical processing unit 112 acquires the latest maximum round-trip delay time (as a variable) delay_max from the maximum value detection unit 111, and the process proceeds to step S233.
  • step S233 the statistical processing unit 112 initializes a variable j for counting the number of round trip delay times (delay time samples) to 0, and the process proceeds to step S234.
  • step S234 the statistical processing unit 112 determines that the round-trip delay time delay [ij] that is j samples before (last) the latest round-trip delay time delay [i] from the delay time calculation unit 45 (FIG. 8) is the latest. It is determined whether or not a value obtained by subtracting a threshold TH0 (> 0) from the maximum round-trip delay time delay_max is equal to or greater than a subtraction value delay_max-TH0.
  • step S234 If it is determined in step S234 that the round-trip delay time delay [ij] is equal to or greater than the subtraction value delay_max-TH0, the process proceeds to step S235, and the statistical processing unit 112 determines the threshold value from the latest maximum round-trip delay time delay_max.
  • the variable delay_max_count [0] that counts the number of round-trip delay times delay within the range of TH0 (the value within the range from the subtraction value delay_max-TH0 to delay_max) is incremented by 1, and the process proceeds to step S242. .
  • step S234 If it is determined in step S234 that the round trip delay time delay [ij] is not equal to or greater than the subtraction value delay_max-TH0, the process proceeds to step S236, and the statistical processing unit 112 receives the latest value from the delay time calculation unit 45. Whether the round trip delay time delay [ij] j samples before the round trip delay time delay [i] is equal to or greater than the subtraction value delay_max-TH1 obtained by subtracting the threshold TH1 (> TH0) from the latest maximum round trip delay time delay_max Determine.
  • step S236 If it is determined in step S236 that the round trip delay time delay [ij] is equal to or greater than the subtraction value delay_max-TH1, the process proceeds to step S237, and the statistical processing unit 112 calculates the subtraction value delay_max from the subtraction value delay_max-TH1.
  • the variable delay_max_count [1] for counting the number of round-trip delay times with values in the range up to -TH0 is incremented by 1, and the process proceeds to step S242.
  • step S236 If it is determined in step S236 that the round trip delay time delay [ij] is not equal to or greater than the subtraction value delay_max-TH1, the process proceeds to step S238, and the statistical processing unit 112 receives the latest time from the delay time calculation unit 45. Whether the round-trip delay time delay [ij], which is j samples before the round-trip delay time delay [i], is equal to or greater than the subtraction value delay_max-TH2 obtained by subtracting the threshold TH2 (> TH1) from the latest maximum round-trip delay time delay_max Determine.
  • step S238 If it is determined in step S238 that the round trip delay time delay [ij] is equal to or greater than the subtraction value delay_max-TH2, the process proceeds to step S239, and the statistical processing unit 112 calculates the subtraction value delay_max from the subtraction value delay_max-TH2.
  • the variable delay_max_count [2] for counting the number of round-trip delay times with values in the range up to -TH1 is incremented by 1, and the process proceeds to step S242.
  • step S238 If it is determined in step S238 that the round trip delay time delay [ij] is not greater than or equal to the subtraction value delay_max-TH2, the process proceeds to step S240, and the statistical processing unit 112 receives the latest value from the delay time calculation unit 45. Whether round-trip delay time delay [ij] j samples before round-trip delay time delay [i] is equal to or larger than the subtraction value delay_max-TH3 obtained by subtracting threshold TH3 (> TH2) from the latest maximum round-trip delay time delay_max Determine.
  • step S240 If it is determined in step S240 that the round trip delay time delay [ij] is equal to or greater than the subtraction value delay_max-TH3, the process proceeds to step S241, and the statistical processing unit 112 calculates the subtraction value delay_max from the subtraction value delay_max-TH3.
  • the variable delay_max_count [3] that counts the number of round-trip delay times with values in the range up to -TH2 is incremented by 1, and the process proceeds to step S242.
  • step S240 If it is determined in step S240 that the round trip delay time delay [ij] is not greater than or equal to the subtraction value delay_max-TH3, the process proceeds to step S242, and the statistical processing unit 112 uses the variable j for statistical processing. It is determined whether or not it is equal to a subtraction value M ⁇ 1 obtained by subtracting 1 from the number M of samples of the round trip delay time delay.
  • step S242 If it is determined in step S242 that the variable j is not equal to the subtraction value M-1, the process proceeds to step S243, and the statistical processing unit 112 increments the variable j by 1. And a process returns to step S234 from step S243, and the same process is repeated hereafter.
  • step S242 If it is determined in step S242 that the variable j is equal to the subtraction value M-1, that is, the past M round-trip delay times delay [i-M + 1] including the latest round-trip delay time delay [i].
  • the frequency of the round-trip delay time delay ranging from delay_max-TH0 to delay_max delay_max_count [0] the frequency of the round-trip delay time delay ranging from delay_max-TH1 to delay_max-TH0 delay_max_count [1]
  • the frequency of delay_delay delay_delay_max_count [3] ranging from delay_max-TH3 to delay_max-TH2 were obtained. If so, the statistical processing is terminated.
  • a range from delay_max-TH0 to delay_max a range from delay_max-TH1 to delay_max-TH0, a range from delay_max-TH2 to delay_max-TH1, and from delay_max-TH3 to delay_max-TH2
  • the frequency of the round-trip delay time delay was counted for four ranges (range based on the maximum round-trip delay time delay_max). However, in the statistical processing in the statistical processing unit 112, three or less, or five or more The frequency of the round-trip delay time delay can be counted in the range.
  • FIG. 33 shows an example of threshold value setting processing performed by the threshold value setting unit 113 of the high accuracy correction amount calculation unit 102 in FIG. 22 when the maximum value detection unit 111 detects the maximum round-trip delay time as the maximum value. It is a flowchart to explain.
  • the threshold setting process in FIG. 33 is performed as part of the high-accuracy correction amount calculation process in step S102 in FIG.
  • the round-trip delay time having a high frequency is detected from the maximum round-trip delay time delay_max.
  • the detection threshold DMAX is set so as to fall within the range of the threshold DMAX (range from delay_max-DMAX to delay_max).
  • the threshold value setting unit 113 determines the frequency of the round-trip delay time delay obtained by the latest statistical processing in the statistical processing unit 112. delay_max_count [0], delay_max_count [1], delay_max_count [2] Of delay_max_count [3], for example, the frequency of the round-trip delay time delay in the range of the first largest (largest) value delay_max_count [0] and the frequency of the round-trip delay time delay in the range of the second largest value It is determined whether the frequency delay_max_count [0] + delay_max_count [1] obtained by adding delay_max_count [1] is greater than the frequency delay_max_count [2] of the round-trip delay time delay in the third largest value range.
  • step S251 when it is determined that the frequency delay_max_count [0] + delay_max_count [1] is larger than the frequency delay_max_count [2], that is, the number of delay times delay (delay_max_count [0] very close to the maximum round trip delay time delay_max).
  • step S252 the threshold setting unit 113 sets the maximum The detection threshold DMAX used when detecting the time difference Tms with respect to the round-trip delay time delay having a value close to the round-trip delay time delay_max as a high-precision time difference is set to, for example, a small threshold TH1 to provide a high-precision time difference detection unit. 114, and the threshold setting process is terminated.
  • step S251 If it is determined in step S251 that the frequency delay_max_count [0] + delay_max_count [1] is not greater than the frequency delay_max_count [2], the process proceeds to step S253, and the threshold setting unit 113 has the third largest value. It is determined whether the frequency delay_max_count [2] of the round-trip delay time delay in the range is larger than the frequency delay_max_count [3] of the round-trip delay time delay in the range of the fourth largest (smallest) value.
  • step S253 when it is determined that the frequency delay_max_count [2] is larger than the frequency delay_max_count [3], that is, the number of round trip delay times delay (delay_max_count [2]) close to the maximum round trip delay time delay_max to some extent. If there is more than the number of round-trip delay times delay (delay_max_count [3]) that is not so far from the delay time delay_max (somewhat far from “somewhat close”), the process proceeds to step S254, and the threshold setting unit 113 detects the detection threshold. DMAX is set to a value larger than the threshold value TH1, for example, the threshold value TH2, and is supplied to the high-accuracy time difference detection unit 114, and the threshold value setting process ends.
  • the threshold setting unit 113 detects the detection threshold. DMAX is set to a value larger than the threshold value TH1, for example, the threshold value TH2, and is supplied to the high-accuracy time difference detection unit 114, and the threshold value setting process ends.
  • step S253 when it is determined that the frequency delay_max_count [2] is not larger than the frequency delay_max_count [3], that is, the number of round-trip delay times delay (delay_max_count [2]) close to the maximum round-trip delay time delay_max to some extent. If it is equal to or smaller than the number of round-trip delay times delay (delay_max_count [3]) not far from the maximum round-trip delay time delay_max, the process proceeds to step S255, and the threshold setting unit 113 sets the detection threshold DMAX to be larger than the threshold TH2. For example, the threshold value TH3 is set and supplied to the high-accuracy time difference detection unit 114, and the threshold value setting process ends.
  • the detection threshold value DMAX is set to any one of the three threshold values TH1, TH2, and TH3. It can be set to no more than two values, or one of four or more values.
  • the high-accuracy time difference detection process in FIG. 34 is performed as part of the high-accuracy correction amount calculation process in step S102 in FIG.
  • step S261 the high-accuracy time difference detection unit 114 acquires the latest maximum round-trip delay time (as a variable) delay_max from the maximum value detection unit 111 and the threshold setting unit 113. Thus, the latest detection threshold value DMAX is acquired, and the process proceeds to step S262.
  • step S262 the high-accuracy time difference detector 114 determines that the latest round-trip delay time delay from the delay time calculator 45 is a subtraction value delay_max-DMAX obtained by subtracting the latest detection threshold DMAX from the latest maximum round-trip delay time delay_max. Determine if it is large.
  • step S262 If it is determined in step S262 that the latest round-trip delay time delay is greater than the subtraction value delay_max-DMAX, that is, the latest round-trip delay time delay is a value close to the latest maximum round-trip delay time delay_max. Then, the process proceeds to step S263, and the high-accuracy time difference detection unit 114 increases the time difference Tms with respect to the latest round-trip delay time delay, that is, the latest time difference Tms from the time difference calculation unit 43 (FIG. 8). This is detected as an accurate time difference and output (supplied) to the correction amount calculation unit 115, and the high-accuracy time difference detection process ends.
  • step S262 If it is determined in step S262 that the latest round-trip delay time delay is not greater than the subtraction value delay_max-DMAX, that is, the latest round-trip delay time delay is not a value close to the latest maximum round-trip delay time delay_max. Then, the high-precision time difference detection process is terminated.
  • the high-precision time difference is not supplied from the high-precision time difference detector 114 to the correction amount calculator 115.
  • the minimum round trip delay time is used as the maximum value in the correction amount calculation unit 115 of the high accuracy correction amount calculation unit 102 in FIG. As in the case of detection, the correction amount calculation process of FIG. 28 is performed.
  • the maximum value detection unit 111 detects the maximum round-trip delay time as the maximum value
  • the high-precision correction amount output control unit 116 of the high-precision correction amount calculation unit 102 in FIG. As in the case where the delay time is detected, the output control process of FIG. 29 or 30 is performed.
  • both the time difference Tms for the round-trip delay time delay close to the minimum round-trip delay time and the time difference Tms for the round-trip delay time delay close to the maximum round-trip delay time can be detected as high-precision time differences.
  • the high precision correction of FIG. the maximum value detection unit 111 performs the maximum value detection processing of FIGS. 23 and 31, and both the minimum round trip delay time and the maximum round trip delay time are detected as the maximum value.
  • the statistical processing unit 112 (FIG. 22) performs the statistical processing of FIG. 25 and FIG. 32
  • the threshold setting unit 113 (FIG. 22) performs the threshold setting processing of FIG. 26 and FIG.
  • correction amount calculation unit 115 (FIG. 22) performs the correction amount calculation processing of FIG. 28, and the high accuracy correction amount output control unit 116 (FIG. 22) performs the output control processing of FIG. 29 or FIG. Done.
  • the high-accuracy time difference detection unit 114 performs the high-accuracy time difference detection processing of FIG. 35 instead of the high-accuracy time difference detection processing of FIGS.
  • FIG. 35 shows the high accuracy of the high accuracy correction amount calculation unit 102 in FIG. 22 when both the minimum round trip delay time and the maximum round trip delay time are detected as maximum values in the maximum value detection unit 111. It is a flowchart explaining the example of the process of the highly accurate time difference detection which the time difference detection part 114 performs.
  • step S271 the high-accuracy time difference detection unit 114 acquires the latest minimum round-trip delay time (as a variable) delay_min from the maximum value detection unit 111, and sets a threshold value.
  • the latest detection threshold value DMIN is acquired from the setting unit 113, and the process proceeds to step S272.
  • step S272 the high-accuracy time difference detection unit 114 adds the latest round-trip delay time delay from the delay time calculation unit 45 to the latest minimum round-trip delay time delay_min and the latest detection threshold DMIN. Determine if it is less than.
  • step S272 when it is determined that the latest round-trip delay time delay is less than the addition value delay_min + DMIN, that is, when the latest round-trip delay time delay is a value close to the latest minimum round-trip delay time delay_min.
  • the process proceeds to step S273, and the high-accuracy time difference detection unit 114 calculates the time difference Tms with respect to the latest round-trip delay time delay, that is, the latest time difference Tms from the time difference calculation unit 43 (FIG. 8) with high accuracy.
  • the time difference is detected and output (supplied) to the correction amount calculation unit 115, and the high-precision time difference detection process is terminated.
  • step S272 when it is determined that the latest round-trip delay time delay is not less than the addition value delay_min + DMIN, that is, when the latest round-trip delay time delay is not close to the latest minimum round-trip delay time delay_min, The process proceeds to step S274, and the high-accuracy time difference detection unit 114 acquires the latest maximum round-trip delay time (as a variable) delay_max from the maximum value detection unit 111 and the latest detection from the threshold setting unit 113. The threshold value DMAX is acquired, and the process proceeds to step S275.
  • step S275 the high-accuracy time difference detector 114 determines that the latest round-trip delay time delay from the delay time calculator 45 is a subtraction value delay_max-DMAX obtained by subtracting the latest detection threshold DMAX from the latest maximum round-trip delay time delay_max. Determine if it is large.
  • step S275 If it is determined in step S275 that the latest round-trip delay time delay is greater than the subtraction value delay_max-DMAX, that is, the latest round-trip delay time delay is a value close to the latest maximum round-trip delay time delay_max.
  • the process proceeds to step S273, and the high-accuracy time difference detection unit 114 sets the time difference Tms for the latest round-trip delay time delay, that is, the latest time difference Tms from the time difference calculation unit 43 (FIG. 8) to the high level. This is detected as an accurate time difference and output (supplied) to the correction amount calculation unit 115, and the high-accuracy time difference detection process is terminated.
  • step S275 If it is determined in step S275 that the latest round-trip delay time delay is not greater than the subtraction value delay_max-DMAX, that is, the latest round-trip delay time delay is not close to the latest maximum round-trip delay time delay_max. Then, the high-precision time difference detection process is terminated.
  • the latest round-trip delay time delay is a value close to the latest minimum round-trip delay time delay_min or a value close to the latest maximum round-trip delay time delay_max.
  • the latest time difference Tms which is a time difference with respect to the latest round-trip delay time delay, is detected as a high-precision time difference and supplied from the high-precision time difference detection unit 114 to the correction amount calculation unit 115.
  • FIG. 36 is a block diagram illustrating a second configuration example of the high-accuracy correction amount calculation unit 102 in FIG.
  • the high-accuracy correction amount calculation unit 102 of FIG. 36 is common to the case of FIG. 22 in that it includes a maximum value detection unit 111 to a threshold setting unit 113, a correction amount generation unit 115, and a high-accuracy correction amount output control unit 116. To do.
  • the high-accuracy correction amount calculation unit 102 of FIG. 36 includes a determination unit 131 and a high-accuracy time difference detection unit 132 instead of the high-accuracy time difference detection unit 114. This is different from the case of FIG.
  • the minimum round-trip delay among the time difference Tms with respect to the round-trip delay time delay close to the minimum round-trip delay time and the time difference Tms with respect to the round-trip delay time delay close to the maximum round-trip delay time is to detect the time difference Tms for the round-trip delay time delay close to the time as a high-precision time difference. Based on the statistical processing results, the round-trip delay time delay close to the maximum round-trip delay time The time difference Tms is also detected as a highly accurate time difference.
  • the round trip delay time delay is a load (for example, a network switch) applied to the network switch in the network 30 through which the communication is performed.
  • the amount of packets queued in the internal queue is a load (for example, a network switch) applied to the network switch in the network 30 through which the communication is performed.
  • the high-accuracy correction amount calculation unit 102 in FIG. 36 detects the time difference Tms with respect to the round-trip delay time delay close to the minimum round-trip delay time delay_min as a high-precision time difference.
  • the calculating unit 102 does not detect the time difference Tms with respect to the round trip delay time delay close to the maximum round trip delay time delay_max as a high accuracy time difference.
  • the high-accuracy correction amount calculation unit 102 in FIG. Detects a time difference Tms with respect to a round trip delay time delay close to the maximum round trip delay time delay_max as a highly accurate time difference.
  • the frequency of the round-trip delay time delay which is the result of the statistical processing (processing) is supplied from the statistical processing unit 112 to the determination unit 131 in the high-accuracy correction amount calculation unit 102.
  • the determining unit 131 determines whether or not to detect the time difference Tms for the round-trip delay time delay close to the maximum round-trip delay time delay_max as a high-precision time difference.
  • the flag is_use_max_delay as decision information representing the decision result is supplied to the high-accuracy time difference detection unit 132.
  • the flag is_use_max_delay is set to true. Further, when it is determined not to detect the time difference Tms with respect to the round trip delay time delay close to the maximum round trip delay time delay_max as the high precision time difference, the flag is_use_max_delay is set to false.
  • the high-accuracy time difference detection unit 132 is similar to the high-accuracy time difference detection unit 114 in FIG. 22, the time difference Tms for the round-trip delay time delay close to the minimum round-trip delay time delay_min, and the round-trip delay close to the maximum round-trip delay time delay_max.
  • a time difference Tms with respect to the time delay is detected as a highly accurate time difference.
  • the high accuracy time difference detection unit 132 detects at least the time difference Tms with respect to the round trip delay time delay close to the minimum round trip delay time delay_min as a high accuracy time difference.
  • the high-accuracy time difference detection unit 132 when the flag is_use_max_delay supplied from the determination unit 131 to the high-accuracy time difference detection unit 132 is set to true (the time difference Tms with respect to the round-trip delay time delay close to the maximum round-trip delay time delay_max, When it is determined that the time difference Tms is detected as a high-accuracy time difference detection unit 132, the high-accuracy time difference detection unit 132 also detects the time difference Tms for the round-trip delay time delay close to the maximum round-trip delay time delay_max as a high-precision time difference.
  • the maximum value detection unit 111 performs the maximum value detection processing of FIGS. 23 and 31, and the minimum value is the minimum round-trip delay time and the maximum round-trip delay. Both times are detected.
  • the statistical processing unit 112 performs the statistical processing of FIGS. 25 and 32
  • the threshold setting unit 113 performs the threshold setting processing of FIGS. 26 and 33.
  • correction amount calculation unit 115 performs the correction amount calculation process of FIG. 28, and the high-precision correction amount output control unit 116 performs the output control process of FIG. 29 or FIG.
  • FIG. 37 is a flowchart illustrating an example of the determination process performed by the determination unit 131 of the high-precision correction amount calculation unit 102 in FIG.
  • step S301 the determination unit 131 determines the frequency of the round trip delay time delay_min_count [0], delay_min_count [1], delay_min_count [2] obtained by the latest statistical processing in the statistical processing unit 112, and The sum total delay_min_count [3], that is, the sum total delay_min_count_temp of the frequency of the round trip delay time delay relatively close to the minimum round trip delay time delay_min is obtained.
  • the determination unit 131 sums the frequencies of delay time delay_delay_max_count [0], delay_max_count [1], delay_max_count [2], and delay_max_count [3] obtained by the latest statistical processing in the statistical processing unit 112. That is, the sum total delay_max_count_temp of the frequencies of the round-trip delay time delay relatively close to the maximum round-trip delay time delay_max is obtained, and the process proceeds from step S301 to step S302.
  • step S302 the determination unit 131 determines that the sum total delay_min_count_temp of the round trip delay time relatively close to the minimum round trip delay time delay_min is 0 and the sum total delay_max_count_temp of the round trip delay time delay relatively close to the maximum round trip delay time delay_max, It is determined whether the predetermined number is 1 or more, for example, greater than 2.
  • step S302 If it is determined in step S302 that the total delay_min_count_temp is 0 and the total delay_max_count_temp is greater than 2, that is, the minimum round-trip delay time delay_min in the round-trip delay time of M samples used for statistical processing If there is no round-trip delay time delay that is relatively close to and there is a round-trip delay time delay that is relatively close to the maximum round-trip delay time delay_max, the process proceeds to step S303, and the determination unit 131 sets the round-trip delay time delay_max to the maximum round-trip delay time delay_max. It is determined that the time difference Tms with respect to the close round-trip delay time delay is detected as a highly accurate time difference, and the flag is_use_max_delay is set to true.
  • the determination part 131 supplies flag is_use_max_delay to the high precision time difference detection part 132, and complete
  • step S302 If it is determined in step S302 that the total delay_min_count_temp is not 0 or the total delay_max_count_temp is determined not to be greater than 2, the process proceeds to step S304, and the determination unit 131 compares it with the minimum round-trip delay time delay_min.
  • the sum total delay_min_count_temp of near round trip delay time delay is greater than 2, for example, is greater than 2, and is the sum total delay_max_count_temp of round trip time delay relatively close to the maximum round trip delay time delay_max being 0? Determine if.
  • step S304 when it is determined that the total delay_min_count_temp is greater than 2 and the total delay_max_count_temp is 0, that is, the minimum round-trip delay time delay_min in the round-trip delay time of M samples used for statistical processing If there is a round-trip delay time delay that is relatively close to N, and there is no round-trip delay time delay that is relatively close to the maximum round-trip delay time delay_max, the process proceeds to step S305, and the determination unit 131 is close to the maximum round-trip delay time delay_max. It is determined that the time difference Tms with respect to the round trip delay time delay is not detected as a high precision time difference, and the flag is_use_max_delay is set to false.
  • the determination part 131 supplies flag is_use_max_delay to the high precision time difference detection part 132, and complete
  • step S304 If it is determined in step S304 that the total delay_min_count_temp is not greater than 2 or the total delay_max_count_temp is determined not to be 0, the process proceeds to step S306, and the determination unit 131 maintains the flag is_use_max_delay as it is. Then, the high-precision time difference detection unit 132 is supplied to finish the determination process.
  • FIG. 38 is a flowchart for explaining an example of high-precision time difference detection processing performed by the high-precision time difference detection unit 132 of the high-precision correction amount calculation unit 102 in FIG.
  • the high-accuracy time difference detection process in FIG. 38 is performed as part of the high-accuracy correction amount calculation process in step S102 in FIG.
  • the high-precision time difference detection process of FIG. 38 is common to the high-precision time difference detection process of FIG. 35 in that the same processes as steps S271 to S275 of FIG. 35 are performed in steps S311 to S315.
  • the high-accuracy time difference detection process of FIG. 38 is different from the high-accuracy time difference detection process of FIG. 35 in that a process of step S321 for determining the flag is_use_amx_delay is newly added.
  • step S311 the high-accuracy time difference detection unit 132 acquires the latest minimum round-trip delay time (as a variable) delay_min from the maximum value detection unit 111.
  • the latest detection threshold value DMIN is acquired from the threshold value setting unit 113, and the process proceeds to step S312.
  • step S312 the high-accuracy time difference detector 132 adds the latest round-trip delay time delay from the delay time calculator 45 to the latest minimum round-trip delay time delay_min and the latest detection threshold value DMIN. Determine if it is less than.
  • step S312 When it is determined in step S312 that the latest round-trip delay time delay is less than the added value delay_min + DMIN, the process proceeds to step S313, and the high-accuracy time difference detection unit 132 performs the process for the latest round-trip delay time delay.
  • the time difference Tms that is, the latest time difference Tms from the time difference calculation unit 43 (FIG. 8) is detected as a high-accuracy time difference and output to the correction amount calculation unit 115 for high-accuracy time difference detection processing. finish.
  • step S312 If it is determined in step S312 that the latest round-trip delay time delay is not less than the added value delay_min + DMIN, the process proceeds to step S321, and the high-accuracy time difference detection unit 132 receives the flag from the determination unit 131. Determine if is_use_max_delay is set to true.
  • step S321 If it is determined in step S321 that the flag is_use_max_delay is not set to true, that is, if the flag is_use_max_delay is set to false, the high-accuracy time detection process ends.
  • step S321 If it is determined in step S321 that the flag is_use_max_delay is set to true, the process proceeds to step S314, and thereafter, the same process as in FIG. 35 is performed.
  • step S314 the high-accuracy time difference detection unit 132 acquires the latest maximum round-trip delay time (as a variable) delay_max from the maximum value detection unit 111 and the latest detection threshold DMAX from the threshold setting unit 113. And the process proceeds to step S315.
  • step S315 the high-accuracy time difference detector 132 determines that the latest round-trip delay time delay from the delay time calculator 45 is a subtraction value delay_max-DMAX obtained by subtracting the latest detection threshold DMAX from the latest maximum round-trip delay time delay_max. Determine if it is large.
  • step S315 If it is determined in step S315 that the latest round-trip delay time delay is greater than the subtraction value delay_max-DMAX, the process proceeds to step S313, and the high-accuracy time difference detection unit 132 performs the latest round-trip delay time delay. , That is, the latest time difference Tms from the time difference calculation unit 43 (FIG. 8) is detected as a high-accuracy time difference, and is output to the correction amount calculation unit 115 for high-accuracy time difference detection processing. Exit.
  • step S315 If it is determined in step S315 that the latest round-trip delay time delay is not greater than the subtraction value delay_max-DMAX, the high-accuracy time difference detection process is terminated.
  • the latest round-trip delay time delay is a value close to the latest minimum round-trip delay time delay_min
  • the flag is_use_max_delay is set to true
  • the latest round-trip delay time is detected as a high-precision time difference, and is supplied from the high-precision time difference detection unit 132 to the correction amount calculation unit 115.
  • the latest round-trip delay time delay is not a value close to the latest minimum round-trip delay time delay_min, or when the flag is_use_max_delay is set to true, it is not close to the latest maximum round-trip delay time delay_max.
  • the high accuracy time difference is not supplied from the high accuracy time difference detection unit 132 to the correction amount calculation unit 115.
  • the determination unit 131 is relatively close to the minimum round-trip delay time delay_min among the round-trip delay times of M samples used for statistical processing.
  • the time difference Tms for the round-trip delay time delay close to the maximum round-trip delay time delay_max is set as a high-precision time difference. It is decided to detect, and the flag is_use_max_delay is set to true.
  • the detection thresholds DMIN and DMAX used for detection of the high-accuracy time difference are set to values selected from the three thresholds TH1 to TH3 as a plurality.
  • the detection threshold values DMIN and DMAX are variable values.
  • the detection threshold values DMIN and DMAX for example, the frequency distribution of the round-trip delay time obtained by statistical processing is used as an argument, and the detection threshold values DMIN and DMAX are set.
  • the high-precision correction amount calculation unit 102 in FIG. 36 performs the maximum value detection processing in FIGS. 23 and 31 in the maximum value detection unit 111, and sets the maximum value as the maximum value. Both the minimum round trip delay time and the maximum round trip delay time are detected.
  • the high-accuracy time difference detection unit 132 performs the high-accuracy time difference detection process shown in FIG.
  • correction amount calculation unit 115 performs the correction amount calculation process of FIG. 28, and the high-precision correction amount output control unit 116 performs the output control process of FIG. 29 or FIG.
  • the threshold setting unit 113 and the determination unit 131, processing different from the case where a variable value is adopted as the detection threshold DMAX (and the detection threshold DMIN) is performed.
  • FIG. 39 is a flowchart for explaining an example of statistical processing performed by the statistical processing unit 112 of the high-accuracy correction amount calculation unit 102 in FIG. 36 when a fixed value is adopted as the detection threshold DMAX.
  • the statistical processing unit 112 obtains the frequency of the round-trip delay time delay close to the minimum round-trip delay time delay_min, and the maximum round-trip delay time of FIG. Instead of the statistical processing of FIG. 32 for obtaining the frequency of the round-trip delay time delay close to delay_max, the statistical processing of FIG. 25 and the statistical processing of FIG. 39 are performed.
  • the fixed detection threshold DMAX for example, the largest threshold TH3 among the three thresholds TH1 to TH3 used in FIGS. 25 and 32 is adopted.
  • step S401 the statistical processing unit 112 is within the range of the threshold TH3 as the detection threshold DMAX having a fixed value from the maximum round-trip delay time delay_max (range from delay_max-TH3 to delay_max).
  • a variable delay_max_count for counting the frequency of the round-trip delay time delay is initialized to 0, and the process proceeds to step S402.
  • step S402 the statistical processing unit 112 acquires the latest maximum round-trip delay time (as a variable) delay_max from the maximum value detecting unit 111, and the process proceeds to step S403.
  • step S403 the statistical processing unit 112 initializes a variable j for counting the number of round trip delay times (delay time samples) to 0, and the process proceeds to step S404.
  • step S404 the statistical processing unit 112 determines that the round-trip delay time delay [ij] that is j samples before the latest round-trip delay time delay [i] from the delay time calculation unit 45 (FIG. 8) is the latest. It is determined whether or not a value obtained by subtracting a threshold value TH3 from the maximum round-trip delay time delay_max is equal to or greater than a subtraction value delay_max ⁇ TH3.
  • step S404 If it is determined in step S404 that the round trip delay time delay [ij] is equal to or greater than the subtraction value delay_max-TH3, the process proceeds to step S405, and the statistical processing unit 112 determines the threshold value from the latest maximum round trip delay time delay_max.
  • the variable delay_max_count for counting the number of round-trip delay times delay within the range of TH3 (value within the range from delay_max-TH3 to delay_max) is incremented by 1, and the process proceeds to step S406.
  • step S404 If it is determined in step S404 that the round trip delay time delay [ij] is not greater than or equal to the subtraction value delay_max-TH3, the process proceeds to step S406, and the statistical processing unit 112 uses the variable j for statistical processing. It is determined whether or not it is equal to a subtraction value M ⁇ 1 obtained by subtracting 1 from the number M of samples of the round trip delay time delay.
  • step S406 If it is determined in step S406 that the variable j is not equal to the subtraction value M-1, the process proceeds to step S407, and the statistical processing unit 112 increments the variable j by 1. And a process returns to step S404 from step S407, and the same process is repeated hereafter.
  • step S406 If it is determined in step S406 that the variable j is equal to the subtraction value M-1, that is, the past M round-trip delay times delay [i-M + 1] including the latest round-trip delay time delay [i]. If the frequency delay_max_count of the round-trip delay time delay in the range from delay_max-TH3 to delay_max is obtained for delay [i], the statistical processing is terminated.
  • FIG. 40 is a flowchart for explaining an example of determination processing performed by the determination unit 131 of the high-precision correction amount calculation unit 102 in FIG. 36 when a fixed value is adopted as the detection threshold DMAX.
  • the determination unit 131 When a fixed value (threshold value TH3) is adopted as the detection threshold value DMAX, the determination unit 131 (FIG. 36) performs the determination process of FIG. 40 instead of the determination process of FIG.
  • step S411 the determination unit 131 determines the frequency of the round-trip delay time delay obtained by the latest statistical process in the statistical processing unit 112 delay_min_count [0], delay_min_count [1], delay_min_count [2]. Then, the sum of delay_min_count [3], that is, the sum total delay_min_count_temp of the frequency of the round trip delay time relatively close to the minimum round trip delay time delay_min is obtained, and the process proceeds to step S412.
  • step S412 the determination unit 131 uses the total delay_min_count_temp obtained in step S411 and the frequency delay_max_count obtained in the statistical processing of FIG. 39, and uses the total round-trip delay time delay relatively close to the minimum round-trip delay time delay_min delay_min_count_temp. It is determined whether or not the frequency delay_max_count of the round-trip delay time delay relatively close to the maximum round-trip delay time delay_max is greater than 2, for example, as a predetermined number of 1 or more.
  • step S412 If it is determined in step S412 that the total delay_min_count_temp is 0 and the frequency delay_max_count is greater than 2, that is, the minimum round-trip delay time delay_min among the round-trip delay times of M samples used for statistical processing If there is no round-trip delay time delay that is relatively close to and there is a round-trip delay time delay that is relatively close to the maximum round-trip delay time delay_max, the process proceeds to step S413, and the determination unit 131 sets the round-trip delay time delay_max to the maximum round-trip delay time delay_max. It is determined that the time difference Tms with respect to the close round-trip delay time delay is detected as a highly accurate time difference, and the flag is_use_max_delay is set to true.
  • the determination part 131 supplies flag is_use_max_delay to the high precision time difference detection part 132, and complete
  • step S412 when it is determined that the total delay_min_count_temp is not 0 or the frequency delay_max_count is not greater than 2, the process proceeds to step S414, and the determination unit 131 compares the minimum delay time delay_min with the minimum round-trip delay time delay_min.
  • the total delay_min_count_temp of the nearest round trip delay time is a predetermined number equal to or greater than 1, for example, greater than 2, and the frequency delay_max_count of the round trip time delay relatively close to the maximum round trip delay time delay_max is 0 Determine whether or not.
  • step S414 If it is determined in step S414 that the total delay_min_count_temp is greater than 2 and the frequency delay_max_count is 0, that is, the minimum round-trip delay time delay_min among the round-trip delay times of M samples used for statistical processing If there is a round-trip delay time delay that is relatively close to, and there is no round-trip delay time delay that is relatively close to the maximum round-trip delay time delay_max, the process proceeds to step S415, and the determining unit 131 is close to the maximum round-trip delay time delay_max. It is determined that the time difference Tms with respect to the round trip delay time delay is not detected as a high precision time difference, and the flag is_use_max_delay is set to false.
  • the determination part 131 supplies flag is_use_max_delay to the high precision time difference detection part 132, and complete
  • step S414 If it is determined in step S414 that the total delay_min_count_temp is not greater than 2 or the frequency delay_max_count is not 0, the process proceeds to step S416, and the determination unit 131 maintains the flag is_use_max_delay as it is. Then, the high-precision time difference detection unit 132 is supplied to finish the determination process.
  • the determination unit 131 supplies the flag is_use_max_delay to the high-accuracy time difference detection unit 132 and also supplies it to the threshold setting unit 113 as shown by the dotted line in FIG.
  • FIG. 41 is a flowchart for explaining an example of threshold setting processing performed by the threshold setting unit 113 of the high-precision correction amount calculation unit 102 in FIG. 36 when a fixed value is adopted as the detection threshold DMAX.
  • the threshold value setting unit 113 When a fixed value (threshold value TH3) is adopted as the detection threshold value DMAX, the threshold value setting unit 113 (FIG. 36) performs the threshold value setting process of FIG. 41 in place of the threshold value setting process of FIGS. .
  • the detection threshold value DMAX is fixed to the threshold value TH3
  • the detection threshold value DMAX is not set (it is not necessary to set) in the threshold value setting process of FIG. 41, and only the detection threshold value DMIN is set.
  • the same processes as those of steps S151 to S155 of FIG. 26 are performed in steps S421 to S425, and the detection threshold value DMIN is set.
  • the threshold value setting unit 113 determines the frequency of delay time delay_delay_min_count [0], delay_min_count [1], delay_min_count [2] obtained by the latest statistical processing in the statistical processing unit 112, Of delay_min_count [3], the frequency delay_min_count [0] of the round-trip delay time delay in the first smallest (smallest) value range and the frequency delay_min_count [1] of the round-trip delay time delay in the second smallest value range The frequency delay_min_count [0] + delay_min_count [1] is added to the frequency delay_min_count [2] of the round trip time delay in the range of the third smallest value.
  • step S421 When it is determined in step S421 that the frequency delay_min_count [0] + delay_min_count [1] is greater than the frequency delay_min_count [2], the process proceeds to step S422, and the threshold setting unit 113 sets the detection threshold DMIN to the threshold Set to TH1.
  • step S421 If it is determined in step S421 that the frequency delay_min_count [0] + delay_min_count [1] is not greater than the frequency delay_min_count [2], the process proceeds to step S423, and the threshold setting unit 113 sets the third smallest value. It is determined whether the frequency delay_min_count [2] of the round-trip delay time delay in the range is greater than the frequency delay_min_count [3] of the round-trip delay time delay in the range of the fourth smallest (largest) value.
  • step S423 If it is determined in step S423 that the frequency delay_min_count [2] is greater than the frequency delay_min_count [3], the process proceeds to step S424, and the threshold setting unit 113 sets the detection threshold DMIN to the threshold TH2 (> TH1). Set.
  • step S423 If it is determined in step S423 that the frequency delay_min_count [2] is not greater than the frequency delay_min_count [3], the process proceeds to step S425, and the threshold setting unit 113 sets the detection threshold DMIN to the threshold TH3 (> Set to TH2).
  • step S426 the threshold setting unit 113 determines whether the flag is_use_max_delay supplied from the determination unit 131 is true.
  • step S426 When it is determined in step S426 that the flag is_use_max_delay is not true, that is, when the time difference Tms with respect to the round trip delay time delay close to the maximum round trip delay time delay_max is not detected as the high precision time difference, the threshold setting unit 113 performs step The detection threshold value DMIN set in S422, S424, or S425 is supplied to the high-accuracy time difference detection unit 114, and the threshold value setting process ends.
  • step S426 when it is determined in step S426 that the flag is_use_max_delay is true, that is, when the time difference Tms with respect to the round-trip delay time delay close to the maximum round-trip delay time delay_max is detected as a high-precision time difference,
  • the threshold value setting unit 113 sets the detection threshold value DMIN to, for example, the maximum threshold value TH3 among the threshold values TH1 to TH3, and supplies the detection threshold value DMIN to the high-accuracy time difference detection unit 114.
  • the high-accuracy time difference detection unit 114 uses the detection threshold value DMIN set as described above by the threshold value setting unit 113 and the detection threshold value DMAX having a fixed value (threshold value TH3). Is performed.
  • the round-trip delay time delay has a round-trip delay time delay that is relatively close to the maximum round-trip delay time delay_max. Since it is assumed that there is (almost) no round trip delay time delay that is relatively close to the minimum round trip delay time delay_min, the time difference Tms for the round trip delay time delay somewhat apart from the minimum round trip time delay_min Even in such a case, the maximum threshold value TH3 among the threshold values TH1 to TH3 is set as the detection threshold value DMIN in step S427 so that it is detected as a highly accurate time difference.
  • FIG. 42 shows a configuration example of an embodiment of a computer in which a program for executing the series of processes described above is installed.
  • the program can be recorded in advance in a hard disk 205 or ROM 203 as a recording medium built in the computer.
  • the program can be stored (recorded) in the removable recording medium 211.
  • a removable recording medium 211 can be provided as so-called package software.
  • examples of the removable recording medium 211 include a flexible disk, a CD-ROM (Compact Disc Read Only Memory), a MO (Magneto Optical) disc, a DVD (Digital Versatile Disc), a magnetic disc, and a semiconductor memory.
  • the program can be installed on the computer from the removable recording medium 211 as described above, or downloaded to the computer via a communication network or a broadcast network, and installed on the built-in hard disk 205. That is, the program is transferred from a download site to a computer wirelessly via a digital satellite broadcasting artificial satellite, or wired to a computer via a network such as a LAN (Local Area Network) or the Internet. be able to.
  • a network such as a LAN (Local Area Network) or the Internet.
  • the computer incorporates a CPU (Central Processing Unit) 202, and an input / output interface 210 is connected to the CPU 202 via the bus 201.
  • a CPU Central Processing Unit
  • the CPU 202 executes a program stored in a ROM (Read Only Memory) 203 according to the command. .
  • the CPU 202 loads a program stored in the hard disk 205 into a RAM (Random Access Memory) 204 and executes it.
  • the CPU 202 performs processing according to the flowchart described above or processing performed by the configuration of the block diagram described above. Then, the CPU 202 outputs the processing result as necessary, for example, via the input / output interface 210, from the output unit 206, or from the communication unit 208, and further recorded in the hard disk 205.
  • the input unit 207 includes a keyboard, a mouse, a microphone, and the like.
  • the output unit 206 includes an LCD (Liquid Crystal Display), a speaker, and the like.
  • the processing performed by the computer according to the program does not necessarily have to be performed in chronological order in the order described as the flowchart. That is, the processing performed by the computer according to the program includes processing executed in parallel or individually (for example, parallel processing or object processing).
  • program may be processed by one computer (processor), or may be distributedly processed by a plurality of computers.
  • the system means a set of a plurality of components (devices, modules (parts), etc.), and it does not matter whether all the components are in the same housing. Accordingly, a plurality of devices housed in separate housings and connected via a network and a single device housing a plurality of modules in one housing are all systems. .
  • IEEE 1588 PTP is adopted as a protocol for time synchronization.
  • the present technology provides a time difference between the master time and the slave time, and between the master device and the slave device.
  • the communication delay time delay can be obtained by any method, and can be applied to any case.
  • this technique can take the following structures.
  • a correction amount calculation unit for obtaining a correction amount for correcting the smoothed time difference using the time difference of interest when the delay time is the minimum value or the maximum value in the delay time with respect to the time difference
  • a data processing apparatus comprising: a smoothing time difference correction unit that corrects the smoothing time difference using the correction amount and outputs a corrected smoothing time difference.
  • a high-accuracy correction amount calculation unit for obtaining a high-accuracy correction amount for correcting the time difference;
  • the data processing device further comprising: a corrected smoothing time difference correction unit that corrects the corrected smoothing time difference using the high-accuracy correction amount and outputs a corrected smoothing time difference twice.
  • the high-accuracy correction amount calculation unit A maximum value detecting unit for detecting the maximum value of the delay time; A statistical processing unit for performing statistical processing to obtain the frequency of the delay time; Based on the frequency of the delay time obtained as a result of the statistical processing, a threshold setting unit that sets a detection threshold that is a threshold used for detection of the high-accuracy time difference; A high-accuracy time difference detector that detects a time difference with respect to the delay time within the detection threshold from the maximum value as the high-accuracy time difference;
  • the data processing device according to ⁇ 2>, further comprising: a correction amount calculation unit that obtains the high-accuracy correction amount using the high-accuracy time difference and the corrected smoothing time difference.
  • ⁇ 4> The data processing apparatus according to ⁇ 3>, wherein the maximum value detection unit detects one or both of a minimum value and a maximum value of the delay time as the maximum value.
  • an output value control that controls the output value so that the output value is zero-order held at the input value or gradually approaches the input value.
  • the smoothing time difference correction unit corrects the smoothing time difference to the corrected smoothing time difference by using the output value as the correction amount.
  • ⁇ 6> The data processing apparatus according to ⁇ 5>, further comprising a median processing unit that obtains the median of the correction value and supplies the median as the input value to the output value control unit.
  • the corrected smoothing time difference correction unit corrects the corrected smoothing time difference into the twice corrected smoothing time difference using the output value as the high-accuracy correction amount.
  • the time output unit corrects the slave time using the twice-corrected smoothed time difference as a time error of the slave time output by the time output unit.
  • the data processing apparatus described. ⁇ 10>
  • the correction amount calculation unit obtains the correction amount by subtracting the attention time difference that is the time difference with respect to the delay time that is the minimum value from the smoothing time difference,
  • the smoothing time difference correction unit corrects the smoothing time difference to the corrected smoothing time difference by subtracting the correction amount from the smoothing time difference for the attention time difference.
  • the time difference with respect to the delay time close to the maximum delay time is set to the high time.
  • the high-accuracy time difference detector is Detecting at least a time difference with respect to the delay time within a range of the detection threshold from a minimum value of the delay time as the high-accuracy time difference; In the determination unit, when it is determined to detect the time difference with respect to the delay time close to the maximum value of the delay time as the high-accuracy time difference, the detection value within the range of the detection threshold from the maximum value of the delay time.
  • the data processing device wherein a time difference with respect to the delay time is also detected as the high-precision time difference.
  • the threshold setting unit sets the detection threshold based on the frequency of the delay time obtained as a result of the statistical processing so that the delay time with the high frequency falls within the range of the detection threshold from the maximum value.
  • the data processing device according to ⁇ 3>.
  • the correction amount calculation unit obtains the high accuracy correction amount by subtracting the correction smoothing time difference from the high accuracy time difference,
  • the corrected smoothing time difference correction unit corrects the corrected smoothing time difference to the twice corrected smoothing time difference by adding the high-accuracy correction amount to the corrected smoothing time difference.
  • ⁇ 14> Obtained using the master time included in the message transmitted via the network from the master device that transmits a message including the master time, and the slave time output by the time output unit that outputs the slave time, Of the time difference series that is the difference between the master time and the slave time, the attention time difference of interest is smoothed using the surrounding time difference including the attention time difference, and the smoothed time difference is calculated. Output, Of the delay time series of communication with the master device, which is obtained using the master time and the slave time, the delay time with respect to the attention time difference is used for smoothing the attention time difference.
  • a correction amount for correcting the smoothed time difference is determined using the time difference of interest when the minimum or maximum value of the delay time with respect to the time difference is determined,
  • a data processing method comprising: correcting the smoothing time difference using the correction amount, and outputting a corrected smoothing time difference.
  • An output smoothing unit Of the delay time series of communication with the master device, which is obtained using the master time and the slave time, the delay time with respect to the attention time difference is used for smoothing the attention time difference.
  • a correction amount calculation unit for obtaining a correction amount for correcting the smoothed time difference using the time difference of interest when the delay time is the minimum value or the maximum value in the delay time with respect to the time difference
  • a program for causing a computer to function as a smoothing time difference correction unit that corrects the smoothing time difference using the correction amount and outputs a corrected smoothing time difference.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Electric Clocks (AREA)

Abstract

 本技術は、高精度の時刻誤差を求めることができるようにするデータ処理装置、データ処理方法、及び、プログラムに関する。 マスタデバイスから送信されてくるメッセージに含まれるマスタ時刻と、時刻出力部が出力するスレーブ時刻とを用いて求められる、マスタ時刻とスレーブ時刻との時刻差の系列のうちの、注目している注目時刻差が、その注目時刻差を含む周辺の時刻差を用いて平滑化され、平滑化時刻差が求められる。また、マスタ時刻とスレーブ時刻とを用いて求められる、マスタデバイスとの間の通信の遅延時間の系列のうちの、注目時刻差に対する遅延時間が、注目時刻差の平滑化に用いられた時刻差に対する遅延時間の中の最小値又は最大値である場合に、注目時刻差を用いて、平滑化時刻差を補正する補正量が求められ、平滑化時刻差が、補正量を用いて補正される。本技術は、例えば、スレーブ時刻を、マスタ時刻に同期させる場合に適用できる。

Description

データ処理装置、データ処理方法、及び、プログラム
 本技術は、データ処理装置、データ処理方法、及び、プログラムに関し、特に、例えば、マスタ時刻に対する、スレーブ時刻の同期の精度の低下を防止することができるようにするデータ処理装置、データ処理方法、及び、プログラムに関する。
 例えば、イーサネット(登録商標)等のネットワークに接続された複数のデバイスのクロック同期、すなわち、複数のデバイスそれぞれが計時する時刻の同期をとる方法としては、様々な方法が提案されている(例えば、特許文献1,2)。
 ここで、クロック同期をとるためのプロトコルとしては、例えば、NTP(Network Time Protocol)が知られているが、NTPでは、ミリ秒程度の同期精度が限界である。
 そこで、近年では、ナノ秒単位の同期精度を実現することができるIEEE(Institute of Electrical and Electronics Engineers)1588のPTP(Precision Time Protocol)が注目されている。
 PTPでは、マスタデバイスとスレーブデバイスとが、時刻を含むメッセージをやりとりすることで、スレーブデバイスが、そのスレーブデバイスの時刻を、マスタデバイスの時刻に一致(同期)させる。
 ここで、マスタデバイスは、ネットワークに接続された複数のデバイスのうちの1つのデバイスである。マスタデバイスの時刻(以下、マスタ時刻ともいう)が、時刻の基準となる。
 スレーブデバイスは、ネットワークに接続された複数のデバイスのうちの、マスタデバイス以外のデバイスである。PTPでは、スレーブデバイスの時刻(以下、スレーブ時刻ともいう)が、マスタ時刻に一致(同期)するように補正される。
特表2011-525038号公報 特開2007-019848号公報
 PTPでは、スレーブデバイスにおいて、スレーブ時刻をマスタ時刻に補正するための値、すなわち、例えば、マスタ時刻とスレーブ時刻との差である時刻差が、スレーブ時刻の誤差(時刻誤差)として求められ、その時刻誤差を0にするように、スレーブ時刻が補正される。
 時刻差は、マスタデバイスからスレーブデバイスにメッセージを送信するときの遅延時間delay_msと、その逆に、スレーブデバイスからマスタデバイスにメッセージを送信するときの遅延時間delay_smとが一致していることを前提として求められる。
 しかしながら、実際のネットワークを介した通信では、遅延時間delay_msとdelay_smとは、一致していないことが少なくない。
 そのため、遅延時間delay_msとdelay_smとが一致していることを前提として求められた時刻差は正確でないことがあり、そのような時刻差を0にするように、スレーブ時刻を補正しても、その補正後のスレーブ時刻が、マスタ時刻に一致せず、マスタ時刻に対する、スレーブ時刻の同期の精度が低下することがある。
 本技術は、このような状況に鑑みてなされたものであり、高精度の時刻誤差を求めることができるようにし、さらに、その時刻誤差を、スレーブ時刻の補正に用いることによって、スレーブ時刻の同期の精度の低下を防止することができるようにするものである。
 本技術のデータ処理装置、又は、プログラムは、マスタ時刻を含むメッセージを送信するマスタデバイスからネットワークを介して送信されてくる前記メッセージに含まれる前記マスタ時刻と、スレーブ時刻を出力する時刻出力部が出力する前記スレーブ時刻とを用いて求められる、前記マスタ時刻と前記スレーブ時刻との差である時刻差の系列のうちの、注目している注目時刻差を、その注目時刻差を含む周辺の時刻差を用いて平滑化し、平滑化時刻差を出力する平滑化部と、前記マスタ時刻と前記スレーブ時刻とを用いて求められる、前記マスタデバイスとの間の通信の遅延時間の系列のうちの、前記注目時刻差に対する前記遅延時間が、前記注目時刻差の平滑化に用いられた前記時刻差に対する前記遅延時間の中の最小値又は最大値である場合に、前記注目時刻差を用いて、前記平滑化時刻差を補正する補正量を求める補正量算出部と、前記平滑化時刻差を、前記補正量を用いて補正し、補正平滑化時刻差を出力する平滑化時刻差補正部とを備えるデータ処理装置、又は、そのようなデータ処理装置としてコンピュータを機能させるためのプログラムである。
 本技術のデータ処理方法は、マスタ時刻を含むメッセージを送信するマスタデバイスからネットワークを介して送信されてくる前記メッセージに含まれる前記マスタ時刻と、スレーブ時刻を出力する時刻出力部が出力する前記スレーブ時刻とを用いて求められる、前記マスタ時刻と前記スレーブ時刻との差である時刻差の系列のうちの、注目している注目時刻差を、その注目時刻差を含む周辺の時刻差を用いて平滑化し、平滑化時刻差を出力し、前記マスタ時刻と前記スレーブ時刻とを用いて求められる、前記マスタデバイスとの間の通信の遅延時間の系列のうちの、前記注目時刻差に対する前記遅延時間が、前記注目時刻差の平滑化に用いられた前記時刻差に対する前記遅延時間の中の最小値又は最大値である場合に、前記注目時刻差を用いて、前記平滑化時刻差を補正する補正量を求め、前記平滑化時刻差を、前記補正量を用いて補正し、補正平滑化時刻差を出力するステップを含むデータ処理方法である。
 本技術においては、マスタ時刻を含むメッセージを送信するマスタデバイスからネットワークを介して送信されてくる前記メッセージに含まれる前記マスタ時刻と、スレーブ時刻を出力する時刻出力部が出力する前記スレーブ時刻とを用いて求められる、前記マスタ時刻と前記スレーブ時刻との差である時刻差の系列のうちの、注目している注目時刻差が、その注目時刻差を含む周辺の時刻差を用いて平滑化され、平滑化時刻差が出力される。また、前記マスタ時刻と前記スレーブ時刻とを用いて求められる、前記マスタデバイスとの間の通信の遅延時間の系列のうちの、前記注目時刻差に対する前記遅延時間が、前記注目時刻差の平滑化に用いられた前記時刻差に対する前記遅延時間の中の最小値又は最大値である場合に、前記注目時刻差を用いて、前記平滑化時刻差を補正する補正量が求められる。そして、前記平滑化時刻差が、前記補正量を用いて補正され、補正平滑化時刻差が出力される。
 なお、データ処理装置は、独立した装置であっても良いし、1つの装置を構成している内部ブロックであっても良い。
 また、プログラムは、伝送媒体を介して伝送することにより、又は、記録媒体に記録して、提供することができる。
 本技術によれば、マスタ時刻に対する、スレーブ時刻の同期の精度の低下を防止することができる。
PTPにより、スレーブ時刻をマスタ時刻に一致させて、時刻の同期をとる方法を説明する図である。 PTPにより、時刻の同期をとるネットワークシステムの構成例を示す図である。 時計部21の構成例を示すブロック図である。 行きの遅延時間delay_ms、及び、帰りの遅延時間delay_smそれぞれの時系列の一例を示す図である。 時計部21の他の構成例、すなわち、時刻差Tmsの変動を抑制する時計部21の構成例を示すブロック図である。 時刻差Tmsの真値と、平滑化部44で得られる平滑化時刻誤差との関係を示す図である。 本技術を適用したネットワークシステムの一実施の形態の構成例を示す図である。 時計部61の構成例を示すブロック図である。 時計部61でのスレーブ時刻の制御の処理の例を説明するフローチャートである。 補正部46の第1の構成例を示すブロック図である。 補正部46による平滑化時刻差Tavの補正の概要を説明する図である。 平滑化部71及び補正量算出部72の構成例を示すブロック図である。 補正部46の平滑化部71が行う平滑化の処理の例を説明するフローチャートである。 補正部46の補正量算出部72が行う補正量算出の処理の例を説明するフローチャートである。 補正部46の出力値制御部73が行う出力値制御の処理の例を説明するフローチャートである。 補正部46の平滑化時刻差補正部74が行う平滑化時刻差補正の処理の例を説明するフローチャートである。 補正部46の第2の構成例を示すブロック図である。 メディアン処理部75のメディアン処理の例を説明するフローチャートである。 補正平滑化時刻差CTと、時刻差Tmsの真値との関係を示す図である。 補正部46の第3の構成例を示すブロック図である。 補正部46が行う時刻差補正処理の例を説明するフローチャートである。 高精度補正量算出部102の第1の構成例を示すブロック図である。 高精度補正量算出部102の最値検出部111が行う最値(最小値)検出の処理の例を説明するフローチャートである。 高精度補正量算出部102の統計処理部112が行う統計処理の例を説明する図である。 最値検出部111において、最値として、最小往復遅延時間が検出される場合の、統計処理部112が行う統計処理の例を説明するフローチャートである。 最値検出部111において、最値として、最小往復遅延時間が検出される場合の、閾値設定部113が行う閾値設定の処理の例を説明するフローチャートである。 最値検出部111において、最値として、最小往復遅延時間が検出される場合の、高精度時刻差検出部114が行う高精度時刻差検出の処理の例を説明するフローチャートである。 最値検出部111において、最値として、最小往復遅延時間が検出される場合の、高精度補正量算出部102の補正量演算部115が行う補正量演算の処理の例を説明するフローチャートである。 高精度補正量出力制御部116が行う出力制御の処理の例を説明するフローチャートである。 高精度補正量出力制御部116が行う出力制御の処理の他の例を説明するフローチャートである。 最値検出部111が行う最値(最大値)検出の処理の例を説明するフローチャートである。 最値検出部111において、最値として、最大往復遅延時間が検出される場合の、統計処理部112が行う統計処理の例を説明するフローチャートである。 最値検出部111において、最値として、最大往復遅延時間が検出される場合の、閾値設定部113が行う閾値設定の処理の例を説明するフローチャートである。 最値検出部111において、最値として、最大往復遅延時間が検出される場合の、高精度時刻差検出部114が行う高精度時刻差検出の処理の例を説明するフローチャートである。 最値検出部111において、最値として、最小往復遅延時間、及び、最大往復遅延時間の両方が検出される場合の、高精度時刻差検出部114が行う高精度時刻差検出の処理の例を説明するフローチャートである。 高精度補正量算出部102の第2の構成例を示すブロック図である。 決定部131が行う決定処理の例を説明するフローチャートである。 高精度時刻差検出部132が行う高精度時刻差検出の処理の例を説明するフローチャートである。 検出閾値DMAXとして、固定の値を採用する場合の、統計処理部112が行う統計処理の例を説明するフローチャートである。 検出閾値DMAXとして、固定の値を採用する場合の、決定部131が行う決定処理の例を説明するフローチャートである。 検出閾値DMAXとして、固定の値を採用する場合の、閾値設定部113が行う閾値設定の処理の例を説明するフローチャートである。 本技術を適用したコンピュータの一実施の形態の構成例を示すブロック図である。
 以下、本技術を、時刻の同期をとるためのプロトコルとして、IEEE1588のPTPを採用する場合について説明するが、その前段階の準備として、まず、PTPについて説明する。
 なお、本技術は、PTP等の、時刻の同期をとるためのプロトコルを採用する場合の他、マスタ時刻とスレーブ時刻との時刻差、及び、マスタデバイスとスレーブデバイスとの間の通信の遅延時間delayを何らかの方法で取得することができる、あらゆる場合に適用することができる。
 <PTPによる時刻の同期>
 図1は、PTPにより、スレーブ時刻をマスタ時刻に一致させて、時刻(スレーブ時刻)の同期をとる方法を説明する図である。
 PTPで同期をとるマスタデバイスとスレーブデバイスとは、ネットワークを介して接続されており、マスタデバイスはマスタ時刻を、スレーブデバイスはスレーブ時刻を、それぞれ計時している。
 PTPでは、まず、マスタデバイスが、シンクメッセージ(sync message)と呼ばれるメッセージを、スレーブデバイスに送信するとともに、そのシンクメッセージを送信したときのマスタ時刻Tm1を記憶する。
 スレーブデバイスは、マスタデバイスからのシンクメッセージを受信し、そのシンクメッセージを受信したときのスレーブ時刻Ts1を記憶する。
 その後、マスタデバイスは、フォローアップメッセージ(FollowUp message)と呼ばれるメッセージに、シンクメッセージを送信したときのマスタ時刻Tm1を含めて、スレーブデバイスに送信する。
 スレーブデバイスは、マスタデバイスからのフォローアップメッセージを受信し、そのフォローアップメッセージに含まれているマスタ時刻Tm1を記憶する。
 スレーブデバイスは、マスタデバイスからのフォローアップメッセージの受信後、ディレイリクエストメッセージ(DelayReq message)と呼ばれるメッセージを、マスタデバイスに送信する。また、スレーブデバイスは、ディレイリクエストメッセージを送信したときのスレーブ時刻Ts2を記憶する。
 マスタデバイスは、スレーブデバイスからのディレイリクエストメッセージを受信し、そのディレイリクエストメッセージを受信したときのマスタ時刻Tm2を記憶する。
 そして、マスタデバイスは、ディレイレスポンスメッセージ(DelayResp message)と呼ばれるメッセージに、ディレイリクエストメッセージを受信したときのマスタ時刻Tm2を含めて、スレーブデバイスに送信する。
 スレーブデバイスは、マスタデバイスからのディレイレスポンスメッセージを受信し、そのディレイレスポンスメッセージに含まれるマスタ時刻Tm2と、既に記憶しているマスタ時刻Tm1、並びに、スレーブ時刻Ts1及びTs2とを用いて、マスタ時刻とスレーブ時刻との時刻差Tmsを求める。
 ここで、時刻差Tmsが、マスタ時刻Tmからスレーブ時刻Tsを減算した値(Tm-Ts)であることとする。
 この場合、スレーブデバイスが、マスタデバイスからのシンクメッセージを受信したスレーブ時刻Ts1のタイミングのマスタ時刻Tm1'は、式Tm1'=Ts1+Tmsで表される。
 同様に、スレーブデバイスが、ディレイリクエストメッセージをマスタデバイスに送信したスレーブ時刻Ts2のタイミングのマスタ時刻Tm2'は、式Tm2'=Ts2+Tmsで表される。
 また、マスタデバイスからスレーブデバイスに、メッセージを送信したときの遅延時間を、遅延時間delay_msと表し、以下、行きの遅延時間delay_msともいうこととする。
 さらに、スレーブデバイスからマスタデバイスにメッセージを送信したときの遅延時間を、遅延時間delay_smと表し、以下、帰りの遅延時間delay_smともいうこととする。
 また、行きの遅延時間delay_msと帰りの遅延時間delay_smとを合わせた遅延時間を、遅延時間delayと表し、以下、往復遅延時間delayともいうこととする。
 この場合、行きの遅延時間delay_msは、式(1)に従って求めることができ、帰りの遅延時間delay_smは、式(2)に従って求めることができる。
   delay_ms=Tm1'-Tm1
       =(Ts1+Tms)-Tm1
       =Ts1-Tm1+Tms
                        ・・・(1)
   delay_sm=Tm2-Tm2'
       =Tm2-(Ts2+Tms)
       =Tm2-Ts2-Tms
                        ・・・(2)
 また、往復遅延時間delayは、式(1)及び式(2)を用い、式(3)に従って求めることができる。
   delay =delay_ms+delay_sm
      =(Ts1-Tm1+Tms)+(Tm2-Ts2-Tms)
      =(Ts1-Tm1)+(Tm2-Ts2)
                        ・・・(3)
 さらに、時刻差Tmsは、式(1)から式(2)を減算することにより、式(4)に従って求めることができる。
   Tms=1/2×{(Tm2-Ts2)-(Ts1-Tm1)+(delay_ms-delay_sm)}
                        ・・・(4)
 PTPでは、行きの遅延時間delay_msと帰りの遅延時間delay_smとが一致していることを前提として、すなわち、式delay_ms=delay_smが成り立つことを前提として、式(4)から導かれる式(5)に従って、時刻差Tmsが求められる。
   Tms=1/2×{(Tm2-Ts2)-(Ts1-Tm1)}
                        ・・・(5)
 スレーブデバイスは、マスタ時刻Tm1及びTm2と、スレーブ時刻Ts1及びTs2とを用い、式(5)に従って、時刻差Tmsを求め、その時刻差Tmsが0になるように、スレーブ時刻Tsを補正することにより、スレーブ時刻Tsを、マスタ時刻Tmに同期させる。
 すなわち、マスタデバイスとスレーブデバイスとは、PTPメッセージ、つまり、シンクメッセージ、フォローアップメッセージ、ディレイリクエストメッセージ、及び、ディレイレスポンスメッセージのやりとりを、定期的、又は、不定期に繰り返し行う。
 スレーブデバイスは、マスタデバイスとの間の、PTPメッセージのやりとりを繰り返し行うことによって時系列に得られるマスタ時刻Tm1及びTm2、並びに、スレーブ時刻Ts1及びTs2を用い、式(5)に従って、時刻差Tmsを、時系列に求め、時刻差Tmsが得られるごとに、時刻差Tmsが0になるように、スレーブ時刻Tsを補正する。
 図2は、PTPにより、時刻の同期をとるネットワークシステムの構成例を示す図である。
 図2において、ネットワークシステムは、マスタデバイス10と、スレーブデバイス20とが、例えば、LAN等のネットワーク30を介して接続されることにより構成されている。
 ここで、PTPにより、時刻の同期をとるネットワークシステムは、複数のビデオカメラで、動画を撮影する撮影システムに適用することができる。
 複数のビデオカメラそれぞれで撮影された動画を、いわゆる素材として、時刻にずれがない編集を行う場合には、複数のビデオカメラそれぞれが内蔵する時計の時刻を同期させる必要がある。
 PTPにより、時刻の同期をとるネットワークシステムを、撮影システムに適用することにより、その撮影システムを構成する複数のビデオカメラでは、(内蔵する時計の)時刻の同期をとることができる。
 この場合、マスタデバイス10は、撮影システムを構成する複数のビデオカメラのうちの1つのビデオカメラに相当し、スレーブデバイス20は、他の1つのビデオカメラに相当する。
 なお、図2では(後述する図7でも同様)、図が煩雑になるのを避けるため、ネットワーク30には、スレーブデバイスとして、1つのスレーブデバイス20だけが接続されているが、ネットワーク30には、複数のスレーブデバイスを接続することができる。
 また、図2では(後述する図7でも同様)、マスタデバイス10、及び、スレーブデバイス20の構成として、時刻の同期に関係する部分のみを図示してあり、その他の部分の図示は、省略してある。
 図2において、マスタデバイス10は、時計部11とメッセージ通信部12を有する。
 時計部11は、時刻を計時し、その時刻を、マスタ時刻として出力する。マスタ時刻は、メッセージ通信部12に供給される。
 メッセージ通信部12は、ネットワーク30を介して、スレーブデバイス20との間で、メッセージをやりとりする。
 すなわち、メッセージ通信部12は、シンクメッセージや、フォローアップメッセージ、ディレイレスポンスメッセージを、スレーブデバイス20に送信する。また、メッセージ通信部12は、スレーブデバイス20から送信されてくるディレイリクエストメッセージを受信する。
 なお、メッセージ通信部12は、時計部11から供給されるマスタ時刻Tmのうちの、シンクメッセージを送信したときのマスタ時刻Tm1を、フォローアップメッセージに含める。さらに、メッセージ通信部12は、時計部11から供給されるマスタ時刻Tmのうちの、ディレイリクエストメッセージを受信したときのマスタ時刻Tm2を、ディレイレスポンスメッセージに含める。
 スレーブデバイス20は、時計部21とメッセージ通信部22を有する。
 時計部21は、時刻を計時し、その時刻を、スレーブ時刻として出力する。
 また、時計部21は、メッセージ通信部22から供給される、マスタデバイス10からのフォローアップメッセージ及びディレイレスポンスメッセージから、マスタ時刻Tm1及びTm2を取得する。
 さらに、時計部21は、メッセージ通信部22を監視しており、メッセージ通信部22が、シンクメッセージを受信したときのスレーブ時刻Ts1、及び、ディレイリクエストメッセージを送信したときのスレーブ時刻Ts2を取得する。
 そして、時計部21は、マスタ時刻Tm1及びTm2、並びに、スレーブ時刻Ts1及びTs2を用い、式(5)に従って、時刻差Tmsを求め、その時刻差Tmsを0にするように、スレーブ時刻を補正する。
 メッセージ通信部22は、ネットワーク30を介して、マスタデバイス10との間で、メッセージをやりとりする。
 すなわち、メッセージ通信部22は、マスタデバイス10から送信されてくるシンクメッセージや、フォローアップメッセージ、ディレイレスポンスメッセージを受信する。また、メッセージ通信部22は、ディレイリクエストメッセージを、マスタデバイス10に送信する。
 メッセージ通信部22は、マスタデバイス10からのシンクメッセージ、フォローアップメッセージ、及び、ディレイレスポンスメッセージのうちの、マスタ時刻が含まれているフォローアップメッセージ、及び、ディレイレスポンスメッセージを、時計部21に供給する。
 以上のように構成されるネットワークシステムでは、図1で説明したようにして、マスタデバイス10とスレーブデバイス20との間でのPTPメッセージのやりとりが繰り返し行われ、時刻の同期がとられる。
 すなわち、マスタデバイス10において、メッセージ通信部12が、シンクメッセージを、スレーブデバイス20に送信し、そのシンクメッセージを送信したときのマスタ時刻Tm1を、時計部11から取得して記憶する。
 スレーブデバイス20では、メッセージ通信部22が、マスタデバイス10からのシンクメッセージを受信し、時計部21が、シンクメッセージを受信したときのスレーブ時刻Ts1を記憶する。
 その後、マスタデバイス10では、メッセージ通信部12が、フォローアップメッセージに、マスタ時刻Tm1を含めて、スレーブデバイス20に送信する。
 スレーブデバイス20では、メッセージ通信部22が、マスタデバイス10からのフォローアップメッセージを受信し、時計部21に供給する。時計部21は、メッセージ通信部22からのフォローアップメッセージに含まれているマスタ時刻Tm1を取得して記憶する。
 その後、スレーブデバイス20では、メッセージ通信部22が、ディレイリクエストメッセージを、マスタデバイス10に送信する。さらに、スレーブデバイス20では、時計部21が、ディレイリクエストメッセージを送信したときのスレーブ時刻Ts2を記憶する。
 マスタデバイス10では、メッセージ通信部12が、スレーブデバイス20からのディレイリクエストメッセージを受信し、そのディレイリクエストメッセージを受信したときのマスタ時刻Tm2を、時計部11から取得して記憶する。
 そして、マスタデバイス10では、メッセージ通信部12が、ディレイレスポンスメッセージに、マスタ時刻Tm2を含めて、スレーブデバイス20に送信する。
 スレーブデバイス20では、メッセージ通信部22が、マスタデバイス10からのディレイレスポンスメッセージを受信し、時計部21に供給する。時計部21は、メッセージ通信部22からのディレイレスポンスメッセージに含まれているマスタ時刻Tm2を取得する。
 以上のようにして、時計部21は、マスタ時刻Tm1及びTm2、並びに、スレーブ時刻Ts1及びTs2が得られると、それらのマスタ時刻Tm1及びTm2、並びに、スレーブ時刻Ts1及びTs2を用い、式(5)に従って、時刻差Tmsを求める。そして、時計部21は、時刻差Tmsを0にするように、スレーブ時刻を補正する。
 マスタデバイス10とスレーブデバイス20との間では、PTPメッセージのやりとりが繰り返し行われ、スレーブデバイス20では、PTPメッセージのやりとりによって、マスタ時刻Tm1及びTm2、並びに、スレーブ時刻Ts1及びTs2が得られるごとに、式(5)に従って、時刻差Tmsが、時系列に求められる。そして、図2のスレーブデバイス20では、時刻差Tmsが得られるごとに、時刻差Tmsが0になるように、スレーブ時刻Tsが補正される。
 図3は、図2の時計部21の構成例を示すブロック図である。
 図3において、時計部21は、マスタ時刻取得部41、スレーブ時刻取得部42、時刻差算出部43、及び、時刻出力部50を有し、(クロック)サーボ系を構成している。
 マスタ時刻取得部41には、メッセージ通信部22から、マスタデバイス10からのフォローアップメッセージ、及び、ディレイレスポンスメッセージが供給される。
 マスタ時刻取得部41は、マスタデバイス10からのフォローアップメッセージから、マスタデバイス10がシンクメッセージを送信したときのマスタ時刻Tm1を取得し、時刻差算出部43に供給する。
 また、マスタ時刻取得部41は、マスタデバイス10からのディレイレスポンスメッセージから、マスタデバイス10がディレイリクエストメッセージを受信したときのマスタ時刻Tm2を取得し、時刻差算出部43に供給する。
 一方、スレーブ時刻取得部42には、時刻出力部50が出力するスレーブ時刻が供給される。
 スレーブ時刻取得部42は、メッセージ通信部22を監視しており、メッセージ通信部22が、シンクメッセージを受信したときのスレーブ時刻Ts1と、ディレイリクエストメッセージを送信したときのスレーブ時刻Ts2とを、時刻出力部50から供給されるスレーブ時刻Tsから取得し、時刻差算出部43に供給する。
 時刻差算出部43には、マスタデバイス10とスレーブデバイス20との間で、PTPメッセージのやりとりが行われるたびに、上述したように、マスタ時刻取得部41から、マスタ時刻Tm1及びTm2が供給されるとともに、スレーブ時刻取得部42から、スレーブ時刻Ts1及びTs2が供給される。
 時刻差算出部43は、マスタ時刻取得部41からマスタ時刻Tm1及びTm2が供給され、スレーブ時刻取得部42からスレーブ時刻Ts1及びTs2が供給されるたびに、それらのマスタ時刻Tm1及びTm2、並びに、スレーブ時刻Ts1及びTs2を用い、式(5)に従って、時刻差Tmsを求め、スレーブ時刻の時刻誤差として、時刻出力部50に供給する。
 時刻出力部50は、PID(Proportinal,Integral,Differential)制御部51、DAC(Digital Analog Converter)52、VCO(Voltage Controlled Oscillator)53、及び、RTC(Real Time Clock)54を有し、時刻を計時して、その時刻を、スレーブ時刻として出力する。
 また、時刻出力部50は、時刻差算出部43からの時刻差Tmsを、スレーブ時刻の時刻誤差として、その時刻誤差を0にするように、スレーブ時刻を補正する。
 PID制御部51は、時刻差算出部43からの、時刻誤差としての時刻差Tmsを0にするように、PID制御を行うためのPID制御データを生成し、DAC52に供給する。
 DAC52は、PID制御部51からのPID制御データをDA変換し、その結果得られるPID制御信号を、VCO53に供給する。
 VCO53は、DAC52からのPID制御信号に従って、クロック信号を発振し、RTC54に供給する。
 RTC54は、図示せぬカウンタを内蔵し、VCO53からのクロック信号に従って、カウンタのカウント値を、例えば、カウントアップするとともに、そのカウント値を、スレーブ時刻として出力する。なお、RTC54は、時刻出力部50に供給される時刻誤差を0とするように、スレーブ時刻としてのカウント値を補正することができる。
 ところで、図2のネットワークシステムにおいて、ネットワーク30に、ネットワークスイッチが含まれ、マスタデバイス10とスレーブデバイス20とが、1個以上のネットワークスイッチを介して接続される場合がある。
 マスタデバイス10とスレーブデバイス20とが、ネットワークスイッチを介して接続される場合、そのネットワークスイッチにかかる負荷の変動等に起因して、行きの遅延時間delay_ms、及び、帰りの遅延時間delay_smそれぞれが(ほぼ)一定にならずに変動し、さらに、行きの遅延時間delay_msと帰りの遅延時間delay_smとが、一致しない(一致しているとみなすことができない)ことがある。
 図4は、行きの遅延時間delay_ms、及び、帰りの遅延時間delay_smそれぞれの時系列の一例を示す図である。
 すなわち、図4のAは、行きの遅延時間delay_msの時系列を示しており、図4のBは、帰りの遅延時間delay_smの時系列を示している。
 図4に示すように、行きの遅延時間delay_ms、及び、帰りの遅延時間delay_smは、いずれも、大きく変動している。さらに、行きの遅延時間delay_msと帰りの遅延時間delay_smとは、一致しないことが多い。
 なお、図4では、行きの遅延時間delay_msについては、値が比較的大きいサンプル(行きの遅延時間delay_msのサンプル)が多い傾向があり、帰りの遅延時間delay_smについては、値が比較的小さいサンプル(帰りの遅延時間delay_smのサンプル)が多い傾向がある。
 以上のように、行きの遅延時間delay_ms、及び、帰りの遅延時間delay_smが変動し、行きの遅延時間delay_msと帰りの遅延時間delay_smとが一致しないことに起因して、行きの遅延時間delay_msと帰りの遅延時間delay_smとが一致することを前提として求められる式(5)の時刻差Tmsの時系列は、大きく変動する。
 図3の時計部21において、大きく変動する時刻差Tmsを、時刻誤差として、時刻差算出部43から時刻出力部50に与えると、時刻出力部50が出力するスレーブ時刻が不安定になるため、大きく変動する時刻差Tmsに何らかの処理を施して、時刻差Tmsの変動を抑制する必要がある。
 図5は、図2の時計部21の他の構成例、すなわち、時刻差Tmsの変動を抑制する時計部21の構成例を示すブロック図である。
 なお、図中、図3の場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。
 図5において、時計部21は、マスタ時刻取得部41ないし時刻差算出部43、及び、時刻出力部50を有する点で、図3の場合と共通する。
 但し、図5の時計部21は、平滑化部44が新たに設けられている点で、図3の場合と相違する。
 平滑化部44には、時刻差算出部43から、時刻差Tmsが時系列に供給される。
 平滑化部44は、例えば、FIR(Finite Impulse Response)フィルタ等のディジタルフィルタで構成されるLPF(Low Pass Filter)であり、時刻差算出部43からの時刻差Tmsを平滑化し、その結果得られる平滑化時刻差を、時刻出力部50に供給する。
 したがって、図5では、時刻出力部50は、平滑化部44からの平滑化時刻差を、スレーブ時刻の時刻誤差として、その時刻誤差を0にするように、スレーブ時刻を補正する。
 図6は、時刻差Tmsの真値と、平滑化部44で得られる平滑化時刻誤差との関係を示す図である。
 上述したように、PTPでは、行きの遅延時間delay_msと帰りの遅延時間delay_smとが一致することを前提とするため、式(4)の右辺のdelay_ms-delay_smが0となり、その結果得られる式(5)に従って、時刻差Tmsが求められる。
 しかしながら、実際には、図4に示したように、行きの遅延時間delay_msと帰りの遅延時間delay_smとが一致しないことがある。
 いま、行きの遅延時間delay_msと帰りの遅延時間delay_smとの差を、遅延差offsetということとすると、行きの遅延時間delay_msと帰りの遅延時間delay_smとの関係は、式delay_ms=delay_sm+offsetで表される。
 この場合、式(4)の時刻差Tmsは、遅延差offsetを用いて、式(6)で表される。
   Tms=1/2×{(Tm2-Ts2)-(Ts1-Tm1)+offset}
                        ・・・(6)
 式(6)から、式(5)の時刻差Tmsを平滑化した平滑化時刻差は、図6に示すように、時刻差Tmsの真値(式(6))から、遅延差offsetの1/2の平均値(期待値)だけずれた値になる。
 したがって、そのような時刻差Tmsの真値からずれた平滑化時刻差を、時刻誤差として、その時刻誤差を0にするように、スレーブ時刻を補正しても、その補正後のスレーブ時刻が、マスタ時刻に一致せず、スレーブ時刻の同期の精度が低下する。
 そこで、本技術では、平滑化時刻差を補正することにより、高精度な時刻誤差を求め、以上のような行きの遅延時間delay_msと帰りの遅延時間delay_smとが一致しないことに起因するスレーブ時刻の同期の精度の低下を防止する。
 <本技術を適用したネットワークシステムの一実施の形態>
 図7は、本技術を適用したネットワークシステムの一実施の形態の構成例を示す図である。
 なお、図中、図2の場合と共通する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。
 図7において、ネットワークシステムは、マスタデバイス10、スレーブデバイス20、及び、ネットワーク30を有する点で、図2の場合と共通する。
 但し、図7のネットワークシステムは、スレーブデバイス20が、時計部21に代えて、時計部61を有する点で、図2の場合と相違する。
 <時計部61の構成例>
 図8は、図7の時計部61の構成例を示すブロック図である。
 なお、図中、図3の時計部21と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。
 図8において、時計部61は、マスタ時刻取得部41ないし時刻差算出部43、及び、時刻出力部50を有する点で、図3の場合と共通する。
 但し、図8の時計部21は、遅延時間算出部45、及び、補正部46が新たに設けられている点で、図3の場合と相違する。
 遅延時間算出部45には、マスタデバイス10とスレーブデバイス20との間で、PTPメッセージのやりとりが行われるたびに、マスタ時刻取得部41から、マスタ時刻Tm1及びTm2が供給されるとともに、スレーブ時刻取得部42から、スレーブ時刻Ts1及びTs2が供給される。
 遅延時間算出部45は、マスタ時刻取得部41からマスタ時刻Tm1及びTm2が供給され、スレーブ時刻取得部42からスレーブ時刻Ts1及びTs2が供給されるたびに、それらのマスタ時刻Tm1及びTm2、並びに、スレーブ時刻Ts1及びTs2を用い、式(3)に従って、往復遅延時間delayを求め、補正部46に供給する。
 補正部46には、遅延時間算出部45から往復遅延時間delayが供給される他、時刻差算出部43から時刻差Tmsが供給される。
 すなわち、補正部46には、マスタ時刻Tm1及びTm2、並びに、スレーブ時刻Ts1及びTs2を用いて式(3)によって求められる往復遅延時間delayと、その(往復遅延時間delayを求めるのに用いられた)マスタ時刻Tm1及びTm2、並びに、スレーブ時刻Ts1及びTs2を用いて式(5)によって求められる時刻差Tmsとが、いわばペア(セット)で供給される。
 補正部46は、遅延時間算出部45からの往復遅延時間delayに基づき、行きの遅延時間delay_msと帰りの遅延時間delay_smとが一致しないことに起因する、時刻差Tmsの真値からのずれをなくすように、時刻差算出部43からの時刻差Tmsを補正し、その時刻差Tmsの補正によって得られる値を、スレーブ時刻の時刻誤差として、時刻出力部50に供給する。
 したがって、図8では、時刻出力部50は、補正部46での時刻差Tmsの補正結果を、スレーブ時刻の時刻誤差として、その時刻誤差を0にするように、スレーブ時刻を補正する。
 <時計部61でのスレーブ時刻の制御>
 図9は、図8の時計部61でのスレーブ時刻の制御(補正)の処理の例を説明するフローチャートである。
 時計部61は、マスタデバイス10とスレーブデバイス20との間で、PTPメッセージがやりとりされるのを待って、ステップS11において、マスタ時刻Tm1及びTm2、並びに、スレーブ時刻Ts1及びTs2を取得する。
 すなわち、ステップS11では、マスタ時刻取得部41は、マスタデバイス10からのフォローアップメッセージから、マスタデバイス10がシンクメッセージを送信したときのマスタ時刻Tm1を取得し、時刻差算出部43、及び、遅延時間算出部45に供給する。
 さらに、マスタ時刻取得部41は、マスタデバイス10からのディレイレスポンスメッセージから、マスタデバイス10がディレイリクエストメッセージを受信したときのマスタ時刻Tm2を取得し、時刻差算出部43、及び、遅延時間算出部45に供給する。
 また、スレーブ時刻取得部42は、メッセージ通信部22が、シンクメッセージを受信したときのスレーブ時刻Ts1と、ディレイリクエストメッセージを送信したときのスレーブ時刻Ts2とを、時刻出力部50から供給されるスレーブ時刻Tsから取得し、時刻差算出部43、及び、遅延時間算出部45に供給する。
 その後、処理は、ステップS11からステップS12に進み、時刻差算出部43が、マスタ時刻取得部41からのマスタ時刻Tm1及びTm2と、スレーブ時刻取得部42からのスレーブ時刻Ts1及びTs2とを用い、式(5)に従って、時刻差Tmsを求め、補正部46に供給する。
 さらに、ステップS12では、遅延時間算出部45が、マスタ時刻取得部41からのマスタ時刻Tm1及びTm2と、スレーブ時刻取得部42からのスレーブ時刻Ts1及びTs2とを用い、式(3)に従って、往復遅延時間delayを求め、補正部46に供給して、処理は、ステップS13に進む。
 ステップS13では、補正部46が、遅延時間算出部45からの往復遅延時間delayに基づき、時刻差算出部43からの時刻差Tmsを補正し、その補正結果を、時刻出力部50に供給する時刻差補正処理を行って、処理は、ステップS14に進む。
 ステップS14では、時刻出力部50が、補正部46からの時刻差Tmsの補正結果を、スレーブ時刻の時刻誤差として、その時刻誤差を0にするように、スレーブ時刻を補正(制御)する。
 なお、図9の処理は、例えば、マスタデバイス10とスレーブデバイス20との間で、PTPメッセージがやりとりされるごとに繰り返し行われる。
 <補正部46の第1の構成例>
 図10は、図8の補正部46の第1の構成例を示すブロック図である。
 図10において、補正部46は、平滑化部71、補正量算出部72、出力値制御部73、及び、平滑化時刻差補正部74を有する。
 平滑化部71には、時刻差算出部43(図8)から時刻差Tmsが時系列に供給される。
 平滑化部71は、例えば、図5の平滑化部44と同様に構成され、時刻差算出部43からの時刻差Tmsを平滑化し、その結果得られる平滑化時刻差Tavを、補正量算出部72、及び、平滑化時刻差補正部74に供給する。
 すなわち、平滑化部71は、時刻差算出部43(図8)から時系列に供給される時刻差Tms(のサンプル)を、順次、注目する注目時刻差に選択する。そして、平滑化部71は、注目時刻差を含む周辺の複数の時刻差(注目時刻差の時間的に前後にある時刻差)を用いて、注目時刻差を平滑化し、平滑化時刻差Tavを出力する。
 ここで、平滑化部71が、例えば、2N+1タップのFIRフィルタで構成される場合(Nは1以上の整数)、平滑化部71は、注目時刻差、注目時刻差から時間的に過去側に隣接するNサンプル(個)の時刻差、及び、注目時刻差から時間的に未来側に隣接するNサンプルの時刻差を用いて、注目時刻差を、平滑化時刻差Tavに平滑化する。
 補正量算出部72には、平滑化部71から平滑化時刻差Tavが供給される他、時刻差算出部43(図8)から時刻差Tmsが時系列に供給されるとともに、遅延時間算出部45(図8)から往復遅延時間delayが時系列に供給される。
 補正量算出部72は、注目時刻差に対する往復遅延時間(注目時刻差とペアの往復遅延時間)が、注目時刻差の平滑化に用いられた2N+1個の時刻差に対する2N+1個の往復遅延時間の中の最小値又は最大値である場合に、注目時刻差、及び、注目時刻差に対する平滑化時刻差Tavを用いて、その平滑化時刻差Tavを補正する補正量Cを求め、出力値制御部73に供給する。
 出力値制御部73は、補正量算出部72からの補正量Cを、入力値として、出力値Coutが、入力値に0次ホールドされるように、又は、入力値に徐々に近づくように、出力値Coutを制御する。
 平滑化時刻差補正部74は、出力値制御部73の出力値Coutを、平滑化時刻差Tavを補正する補正量として用いて、平滑化部71からの平滑化時刻差Tavを補正し、その結果得られる補正平滑化時刻差CTを、スレーブ時刻の時刻誤差として、時刻出力部50(図8)に供給する。
 なお、図10において、補正部46を構成する平滑化部71、補正量算出部72、出力値制御部73、及び、平滑化時刻差補正部74は、時刻差Tms及び往復遅延時間delayを入力として、補正平滑化時刻差CTを出力するので、補正平滑化時刻差CTを生成する補正平滑化時刻差生成部を構成しているということができる。
 <補正部46による平滑化時刻差Tav(時刻差Tms)の補正の概要>
 図11は、図10の補正部46による平滑化時刻差Tavの補正の概要を説明する図である。
 すなわち、図11は、ネットワークスイッチを含むネットワーク30を用いて計測した行きの遅延時間delay_ms及び帰りの遅延時間delay_smの分布の概要を示している。
 図11において、x軸(水平方向)は、行きの遅延時間delay_msを表し、y軸(垂直方向)は、帰りの遅延時間delay_smを表す。
 行きの遅延時間delay_ms及び帰りの遅延時間delay_smは、式y=xで表される直線を対角線とする、図11に一点鎖線で示すような正方形状に分布する。
 式(3)に示したように、往復遅延時間delayは、行きの遅延時間delay_msと帰りの遅延時間delay_smとの加算値であり、したがって、往復遅延時間delayとして、ある値Aが求められた場合、その往復遅延時間delayを構成する行きの遅延時間delay_msと帰りの遅延時間delay_smは、x切片及びy切片それぞれとして、値Aを通る、直線y=xに直交する直線L上に分布する。
 いま、ネットワークスイッチを含むネットワーク30を用いて計測される行きの遅延時間delay_msと帰りの遅延時間delay_smとを加算した往復遅延時間delayの最小値、及び、最大値を、それぞれ、最小往復遅延時間、及び、最大往復遅延時間ということとする。
 最小往復遅延時間は、行きの遅延時間delay_ms及び帰りの遅延時間delay_smの分布を表す正方形(一点鎖線の正方形)の左下の点に対応し、最大往復遅延時間は、行きの遅延時間delay_ms及び帰りの遅延時間delay_smの分布を表す正方形の右上の点に対応する。
 図11において、最小往復遅延時間に対応する点付近では、行きの遅延時間delay_ms及び帰りの遅延時間delay_smは、いずれも、往復遅延時間delayの1/2付近の値しかとり得ない。
 同様に、最大往復遅延時間に対応する点付近でも、行きの遅延時間delay_ms及び帰りの遅延時間delay_smは、いずれも、往復遅延時間delayの1/2付近の値しかとり得ない。
 したがって、往復遅延時間delayが、最小往復遅延時間や最小往復遅延時間に近い値である場合には、行きの遅延時間delay_msと帰りの遅延時間delay_smとは(ほぼ)等しい可能性が極めて高い。
 そして、行きの遅延時間delay_msと帰りの遅延時間delay_smとが等しければ、式(4)の右辺のdelay_ms-delay_smが0となって、式(5)に従って、正確な(精度の高い)時刻差Tmsを求めることができる。
 以上のように、往復遅延時間delayが、最小往復遅延時間に近い小さい値や最小往復遅延時間に近い大きな値である場合には、その往復遅延時間delayに対する時刻差Tms(最小往復遅延時間や最小往復遅延時間に近い値の往復遅延時間delayが得られたときの時刻差Tms)は、正確な時刻差であるということができる。
 そこで、図10の補正部46では、そのような正確な時刻差を用いて、平滑化時刻差Tavを補正する。
 すなわち、図10の補正部46において、平滑化部71で、時刻差Tmsを平滑化して得られる平滑化時刻差Tavは、図6、及び、式(6)で説明したように、時刻差Tmsの真値から、遅延差offsetの1/2の平均値だけずれた値になる。
 ここで、時刻差Tmsの真値をTと、平滑化時刻差Tavの、時刻差Tmsの真値からのずれ量を△Tと、それぞれ表すこととすると、平滑化時刻差Tavは、式Tav=T+△Tで表される。
 図10の補正部46は、平滑化時刻差Tav=T+△Tから、ずれ量△Tをキャンセルするように、平滑化時刻差Tavを補正するため、ずれ量△Tを求める。
 ずれ量△Tは、式△T=Tav-Tで表されるので、平滑化時刻差Tavから、時刻差Tmsの真値Tを減算することで求めることができる。
 但し、時刻差Tmsの真値Tそのものは、得ることが困難であるため、補正部46では、時刻差Tmsの真値Tに代えて、比較的正確な時刻差、すなわち、最小往復遅延時間や最小往復遅延時間に近いと予測される小さな往復遅延時間delayや大きな往復遅延時間delayに対する時刻差Tcを用い、ずれ量△Tが、式△T=Tav-Tcに従って求められる。
 そして、補正部46は、ずれ量△Tを補正量Cとして用いて、平滑化時刻差Tavから、補正量Cとしてのずれ量△Tをキャンセルするように、平滑化時刻差Tavを補正する。
 <平滑化部71及び補正量算出部72の構成例>
 図12は、図10の平滑化部71及び補正量算出部72の構成例を示すブロック図である。
 図12において、平滑化部71は、2N+1タップのFIRフィルタになっており、2N個の遅延回路811,812,・・・,812N、2N+1個の乗算器821,822,・・・,822N+1、及び、2N個の加算器831,832,・・・,832Nを有する。
 遅延回路81nには、前段の遅延回路81n-1で(1サンプル前に)ラッチされた時刻差が供給される。遅延回路81nは、前段の遅延回路81n-1からの時刻差をラッチし(1サンプル分の時間だけ遅延して)、乗算器82n+1に供給する。
 但し、遅延回路811には、時刻差算出部43から最新の時刻差(のサンプル)が供給される。そして、遅延回路811は、時刻差算出部43からの最新の時刻差をラッチする。
 乗算器82nは、遅延回路81n-1から供給される時刻差に、フィルタ係数hnを乗算し、その結果得られる乗算値を、加算器83n-1に供給する。
 但し、乗算器821には、時刻差算出部43から最新の時刻差(のサンプル)が供給される。そして、乗算器821は、時刻差算出部43から最新の時刻差に、フィルタ係数h1を乗算し、その結果得られる乗算値を、加算器831に供給する。
 加算器83nは、前段の加算器83n-1から供給される加算値に、乗算器82n+1から供給される乗算値を加算し、その結果得られる加算値を、後段の加算器83n+1に供給する。
 但し、加算器831は、乗算器821から供給される乗算値と、乗算器822から供給される乗算値とを加算し、その結果得られる加算値を、後段の加算器832に供給する。
 また、加算器832Nは、前段の加算器832N-1から供給される加算値に、乗算器822N+1から供給される乗算値を加算して得られる加算値を、注目時刻差の平滑化時刻差(注目時刻差を平滑化した平滑化時刻差)Tavとして出力する。
 ここで、時刻差算出部43から平滑化部71(及び補正量算出部72)に供給される時刻差Tmsの最新のサンプル(時刻差サンプル)であるi番目の時刻差サンプルを、xiと表すこととすると、平滑化部71では、最新の時刻差サンプルxiが供給された場合、その最新の時刻差サンプルxiからNサンプル(時刻)前の時刻差サンプルxi-Nを注目時刻差として、最新の時刻差サンプルxiを含む過去2N+1個の時刻差サンプルxi-2Nないしxiを用い、式Tav=h1xi+h2xi-1+・・・+h2N+1xi-2Nに従って、注目時刻差xi-Nの平滑化時刻差Tavが求められる。
 平滑化部71で求められた注目時刻差xi-Nの平滑化時刻差Tavは、平滑化時刻差補正部74(図10)に供給されるとともに、補正量算出部72の後述する演算器96に供給される。
 図12において、補正量算出部72は、2N個の遅延回路911,912,・・・,912N、2N+1個のバッファ921,922,・・・,922N+1、2N個の遅延回路931,932,・・・,932N、2N+1個のバッファ941,942,・・・,942N+1、補正用時刻差検出部95、及び、演算器96を有する。
 遅延回路91nには、前段の遅延回路91n-1で(1サンプル前に)ラッチされた時刻差が供給される。遅延回路91nは、前段の遅延回路91n-1からの時刻差をラッチし、バッファ92n+1に供給する。
 但し、遅延回路911には、時刻差算出部43から最新の時刻差(のサンプル)が供給される。そして、遅延回路911は、時刻差算出部43からの最新の時刻差をラッチする。
 バッファ92nは、遅延回路91n-1から供給される時刻差を、補正用時刻差検出部95に供給する。
 但し、バッファ921には、時刻差算出部43から最新の時刻差(のサンプル)が供給される。そして、バッファ921は、時刻差算出部43から最新の時刻差を、補正用時刻差検出部95に供給する。
 遅延回路93nには、前段の遅延回路93n-1で(1サンプル前に)ラッチされた往復遅延時間delayが供給される。遅延回路93nは、前段の遅延回路93n-1からの往復遅延時間delayをラッチし、バッファ92n+1に供給する。
 但し、遅延回路931には、遅延時間算出部45(図8)から最新の往復遅延時間delay(のサンプル)が供給される。そして、遅延回路931は、遅延時間算出部45からの最新の往復遅延時間delayをラッチする。
 バッファ92nは、遅延回路93n-1から供給される往復遅延時間delayを、補正用時刻差検出部95に供給する。
 但し、バッファ921には、遅延時間算出部45から最新の往復遅延時間delay(のサンプル)が供給される。そして、バッファ921は、遅延時間算出部45から最新の往復遅延時間delayを、補正用時刻差検出部95に供給する。
 ここで、時刻差算出部43から補正量算出部72に供給される時刻差Tmsの最新の時刻差サンプルを、xiと表すとともに、遅延時間算出部45から補正量算出部72に供給される往復遅延時間delayの最新のサンプル(遅延時間サンプル)であるi番目の遅延時間サンプルを、yiと表すこととする。
 この場合、補正量算出部72に、最新の時刻差サンプルxi及び遅延時間サンプルyiが供給されたとき、すなわち、最新の時刻差サンプルxiからNサンプル前の時刻差サンプルxi-Nが、注目時刻差であるとき、補正用時刻差検出部95には、最新の時刻差サンプルxiを含む過去2N+1個の時刻差サンプルxi-2Nないしxiと、最新の遅延時間サンプルyiを含む過去2N+1個の遅延時間サンプルyi-2Nないしyiとが供給される。
 補正用時刻差検出部95は、最新の時刻差サンプルxiからNサンプル前の時刻差サンプルxi-Nが注目時刻差であるときに供給される2N+1個の遅延時間サンプルyi-2Nないしyi、すなわち、注目時刻差xi-Nの平滑化に用いられる2N+1個の時刻差サンプルxi-2Nないしxiに対する2N+1個の遅延時間サンプルyi-2Nないしyiの中から最小値を検出する。
 そして、注目時刻差xi-Nに対する遅延時間サンプル(往復遅延時間)yi-Nが、注目時刻差xi-Nの平滑化に用いられる2N+1個の時刻差サンプルxi-2Nないしxiに対する2N+1個の遅延時間サンプルyi-2Nないしyiの中の最小値である場合、すなわち、図11で説明したように、注目時刻差xi-Nに対する往復遅延時間yi-Nが小さく、したがって、注目時刻差xi-Nが精度の高い時刻差である可能性が高い場合、補正用時刻差検出部95は、注目時刻差xi-Nを、その注目時刻差xi-Nを平滑化した平滑化時刻差(注目時刻差に対する平滑化時刻差)Tavの補正に用いる補正用時刻差Tcとして検出し、演算器96に供給する。
 ここで、図11で説明したように、注目時刻差xi-Nに対する往復遅延時間yi-Nが大きい場合も、往復遅延時間yi-Nが小さい場合と同様に、注目時刻差xi-Nが精度の高い(真値に近い)時刻差である可能性が高い。
 そこで、補正用時刻差検出部95では、注目時刻差xi-Nに対する遅延時間サンプルyi-Nが、注目時刻差xi-Nの平滑化に用いられる2N+1個の時刻差サンプルxi-2Nないしxiに対する2N+1個の遅延時間サンプルyi-2Nないしyiの中の最小値である場合の他、その2N+1個の遅延時間サンプルyi-2Nないしyiの中の最大値である場合にも、注目時刻差xi-Nを、その注目時刻差xi-Nに対する平滑化時刻差Tavの補正に用いる補正用時刻差Tcとして検出することができる。
 その他、補正用時刻差検出部95では、注目時刻差xi-Nに対する遅延時間サンプルyi-Nが、注目時刻差xi-Nの平滑化に用いられる2N+1個の時刻差サンプルxi-2Nないしxiに対する2N+1個の遅延時間サンプルyi-2Nないしyiの中の最大値である場合にのみ、注目時刻差xi-Nを、その注目時刻差xi-Nに対する平滑化時刻差Tavの補正に用いる補正用時刻差Tcとして検出することができる。
 演算器96は、平滑化部71から供給される注目時刻差xi-Nに対する平滑化時刻差Tavと、補正用時刻差検出部95から供給される補正用時刻差Tcとを用い、上述のずれ量△Tに相当する補正量Cを、例えば、式C=Tav-Tcの演算を行うことにより求め、出力値制御部73に供給する。
 なお、補正用時刻差検出部95において、注目時刻差xi-Nが、補正用時刻差Tcとして検出されなかった場合、すなわち、注目時刻差xi-Nに対する遅延時間サンプルyi-Nが、その注目時刻差xi-Nの平滑化に用いられる2N+1個の時刻差サンプルxi-2Nないしxiに対する2N+1個の遅延時間サンプルyi-2Nないしyiの中の最小値(及び最大値)ではなく、したがって、注目時刻差xi-Nが精度の高い(真値に近い)時刻差でない場合、演算器96では、補正量Cは求められず(求めることはできず)、出力値制御部73に、補正量Cは供給されない。
 <補正部46の処理>
 図13は、図10の補正部46の平滑化部71が行う平滑化の処理の例を説明するフローチャートである。
 図13の平滑化の処理は、図9のステップS13の時刻差補正処理の一部として行われる。
 平滑化の処理は、例えば、時刻差算出部43から平滑化部71に、時刻差Tmsの最新の時刻差サンプルxiが供給されると開始される。
 平滑化の処理では、ステップS21において、平滑化部71が、最新の時刻差サンプルxiからNサンプル前の時刻差サンプルxi-Nを注目時刻差に選択し、処理は、ステップS22に進む。
 ステップS22では、平滑化部71は、最新の時刻差サンプルxiを含む過去2N+1個の時刻差サンプルxi-2Nないしxiを、注目時刻差xi-Nの平滑化に用いる平滑化用時刻差サンプルとして用い、式Tav=h1xi+h2xi-1+・・・+h2N+1xi-2Nに従って積和演算を行って、処理は、ステップS23に進む。
 ステップS23では、平滑化部71は、平滑化用時刻差サンプルxi-2Nないしxiを用いたステップS22の積和演算の結果を、注目時刻差xi-Nを平滑化した平滑化時刻差Tavとして、補正量算出部72、及び、平滑化時刻差補正部74に供給し、注目時刻差xi-Nの平滑化を終了する。
 図14は、図10の補正部46の補正量算出部72が行う補正量算出の処理の例を説明するフローチャートである。
 図14の補正量算出の処理は、図9のステップS13の時刻差補正処理の一部として行われる。
 補正量算出の処理は、例えば、時刻差算出部43から補正量算出部72に、時刻差Tmsの最新の時刻差サンプルxiが供給されるとともに、遅延時間算出部45から補正量算出部72に、往復遅延時間delayの最新の遅延時間サンプルyiが供給されると開始される。
 補正量算出の処理では、ステップS31において、補正量算出部72は、最新の時刻差サンプルxiからNサンプル前の時刻差サンプルxi-Nである注目時刻差xi-Nに対する往復遅延時間yi-Nが、平滑化部71で、注目時刻差の平滑化に用いられた2N+1個の平滑化用時刻差サンプルxi-2Nないしxiに対する2N+1個の遅延時間サンプルyi-2Nないしyiの中の最小値であるかどうかを判定する。
 ステップS31において、注目時刻差xi-Nに対する往復遅延時間yi-Nが、2N+1個の遅延時間サンプルyi-2Nないしyiの中の最小値であると判定された場合、処理は、ステップS32に進み、補正量算出部72は、注目時刻差xi-Nを、補正用時刻差Tcとして検出し、処理は、ステップS33に進む。
 ステップS33では、補正量算出部72は、平滑化部71から、注目時刻差xi-Nに対する平滑化時刻差Tavが供給されるのを待って、その注目時刻差xi-Nに対する平滑化時刻差Tavから、補正用時刻差Tcを減算することにより、補正量C=Tav-Tcを求め、処理は、ステップS34に進む。
 ステップS34では、補正量算出部72は、注目時刻差xi-Nに対して求めた補正量C=Tav-Tcを、出力値制御部73に供給(出力)して、注目時刻差xi-Nに対する補正量算出の処理を終了する。
 一方、ステップS31において、注目時刻差xi-Nに対する往復遅延時間yi-Nが、2N+1個の遅延時間サンプルyi-2Nないしyiの中の最小値でないと判定された場合、処理は、ステップS32ないしS34をスキップして、注目時刻差xi-Nに対する補正量算出の処理を終了する。
 この場合、補正量Cは、出力値制御部73に供給されない。
 なお、図14では、補正量算出部72において、注目時刻差xi-Nに対する往復遅延時間yi-Nが、2N+1個の遅延時間サンプルyi-2Nないしyiの中の最小値である場合にのみ、注目時刻差xi-Nを、補正用時刻差Tcとして検出し、その補正量Cを求めることとしたが、補正量算出部72では、注目時刻差xi-Nに対する往復遅延時間yi-Nが、2N+1個の遅延時間サンプルyi-2Nないしyiの中の最大値である場合にのみ、注目時刻差xi-Nを、補正用時刻差Tcとして検出し、その補正用時刻差Tcを用いた補正量Cを求めることができる。
 また、補正量算出部72では、注目時刻差xi-Nに対する往復遅延時間yi-Nが、2N+1個の遅延時間サンプルyi-2Nないしyiの中の最小値である場合と、最大値である場合のいずれの場合にも、注目時刻差xi-Nを、補正用時刻差Tcとして検出し、その補正用時刻差Tcを用いた補正量Cを求めることができる。
 図15は、図10の補正部46の出力値制御部73が行う出力値制御の処理の例を説明するフローチャートである。
 図15の出力値制御の処理は、図9のステップS13の時刻差補正処理の一部として行われる。
 出力値制御の処理は、例えば、注目時刻差の平滑化時刻差Tavが、平滑化部71から平滑化時刻差補正部74に供給されると開始される。
 図15の出力値制御の処理では、出力値制御部73は、補正量算出部72から補正量Cが供給されると、その補正量Cを、入力値として、出力値が、入力値に徐々に近づくように、出力値を制御する。
 すなわち、出力値制御の処理では、ステップS41において、出力値制御部73は、補正量算出部72から、補正量Cが入力値として供給されたかどうかを判定する。
 ステップS41において、補正量算出部72から、補正量Cが入力値として供給されたと判定された場合、処理は、ステップS42に進み、出力値制御部73は、出力値Coutの目標値がセットされる変数target_delay_offsetに、入力値としての補正量Cをセットし、処理は、ステップS44に進む。
 また、ステップS41において、補正量算出部72から、補正量Cが入力値として供給されていないと判定された場合、処理は、ステップS43に進み、出力値制御部73は、変数target_delay_offsetにセットされている値を維持し、処理は、ステップS44に進む。
 ステップS44では、出力値制御部73は、出力値Coutと、変数target_delay_offsetとの大小関係を判定する。
 なお、出力値Coutの初期値としては、例えば、0を採用することができる。
 ステップS44において、出力値Coutが、変数target_delay_offsetより大であると判定された場合、処理は、ステップS45に進み、出力値制御部73は、出力値Coutから変数target_delay_offsetを減算した減算値Cout-target_delay_offsetが、出力値Coutを変化させるときの単位変化量△s(>0)より大であるかどうかを判定する。
 ステップS45において、減算値Cout-target_delay_offsetが、単位変化量△sより大であると判定された場合、すなわち、出力値Coutを、単位変化量△sだけ小さくしても、変数target_delay_offsetを下回らない場合、処理は、ステップS46に進み、出力値制御部73は、出力値Coutを、単位変化量△sだけ小さくして、出力値制御の処理を終了する。
 一方、ステップS44において、出力値Coutが、変数target_delay_offsetより小であると判定された場合、処理は、ステップS47に進み、出力値制御部73は、変数target_delay_offsetから出力値Coutを減算した減算値target_delay_offset-Coutが、単位変化量△sより大であるかどうかを判定する。
 ステップS47において、減算値Cout-target_delay_offsetが、単位変化量△sより大であると判定された場合、すなわち、出力値Coutを、単位変化量△sだけ大きくしても、変数target_delay_offsetを上回らない場合、処理は、ステップS48に進み、出力値制御部73は、出力値Coutを、単位変化量△sだけ大きくして、出力値制御の処理を終了する。
 また、ステップS44において、出力値Coutと、変数target_delay_offsetとが等しいと判定された場合、ステップS45において、減算値Cout-target_delay_offsetが、単位変化量△sより大でないと判定された場合、及び、ステップS47において、減算値Cout-target_delay_offsetが、単位変化量△sより大でないと判定された場合には、いずれの場合も、処理は、ステップS49に進み、出力値制御部73は、出力値Coutを、変数target_delay_offsetにセットし、出力値制御の処理を終了する。
 なお、図15の出力値制御の処理では、出力値制御部73において、補正量算出部72から補正量Cが供給された場合に、その補正量Cを、入力値として、出力値Coutが、入力値に徐々に近づくように、出力値Coutを制御するが、出力値制御部73では、その他、補正量算出部72から補正量Cが供給された場合に、その補正量Cを、入力値として、出力値Coutが、入力値に0次ホールドされるように、出力値Coutを制御することができる。
 出力値制御部73において、出力値Coutが、入力値に0次ホールドされるように、出力値Coutを制御する場合、補正量算出部72から補正量Cが供給されると、出力値Coutは、即座に、補正量算出部72からの補正量Cにセットされ、補正量算出部72から、次の補正量Cが供給されるまで、そのまま維持される。
 図16は、図10の補正部46の平滑化時刻差補正部74が行う平滑化時刻差補正の処理の例を説明するフローチャートである。
 図16の平滑化時刻差補正の処理は、図9のステップS13の時刻差補正処理の一部として行われる。
 平滑化時刻差補正の処理は、例えば、注目時刻差の平滑化時刻差Tavが、平滑化部71から平滑化時刻差補正部74に供給されると開始される。
 平滑化時刻差補正の処理では、ステップS51において、平滑化時刻差補正部74が、平滑化部71からの注目時刻差に対する平滑化時刻差Tavから、出力値制御部73の出力値Coutを減算することにより、図11で説明したように、平滑化時刻差Tavに含まれる注目時刻差の真値ずれ量△Tをキャンセルするように、注目時刻差に対する平滑化時刻差Tavを補正する。そして、平滑化時刻差補正部74は、その補正の結果得られる補正平滑化時刻差CTを、スレーブ時刻の時刻誤差として、時刻出力部50に供給して、平滑化時刻差補正の処理を終了する。
 以上のように、図10の補正部46では、平滑化部71において、注目時刻差を、その注目時刻差を含む周辺の時刻差を用いて平滑化し、平滑化時刻差Tavを出力する。また、補正量算出部72において、注目時刻差に対する往復遅延時間が、注目時刻差の平滑化に用いられた時刻差に対する往復遅延時間の中の最小値又は最大値である場合に、注目時刻差を用いて、平滑化時刻差Tavを補正する補正量Cを求める。さらに、平滑化時刻差補正部74において、平滑化時刻差Tavを、補正量(としての出力制御部73の出力値)Cを用いて補正し、補正平滑化時刻差CTを出力する。そして、時刻出力部50では、補正平滑化時刻差CTを、スレーブ時刻の時刻誤差として用いて、スレーブ時刻が制御される。
 したがって、高精度の時刻誤差を求めることができ、その時刻誤差を、スレーブ時刻の制御(補正)に用いることによって、スレーブ時刻を、マスタ時刻に近づけ(時刻差を0に近づけ)、スレーブ時刻の同期の精度の低下を防止することができる。
 ここで、図11で説明したことから、往復遅延時間delayが、最小往復遅延時間に近い値である場合には、その往復遅延時間delayに対する時刻差は、精度の高い時刻差であり、そのような精度の高い時刻差が得られた場合にのみ、その時刻差を、時刻誤差として用いて、その時刻誤差を0にするように、スレーブ時刻を制御(補正)することにより、スレーブ時刻の同期をとることで、スレーブ時刻の同期の精度の低下を防止することができる。
 しかしながら、最小往復遅延時間に近い往復遅延時間delayに対する時刻差が得られた場合にのみ、その時刻差を、時刻誤差として用いて、その時刻誤差を0にするように、スレーブ時刻を制御する方法(以下、最小往復遅延時間に対する時刻差のみを用いる方法ともいう)では、最小往復遅延時間に近い往復遅延時間delayが得られない場合には、スレーブ時刻にサーボがかからない(スレーブ時刻が制御されない)ことになる。
 すなわち、最小往復遅延時間に対する時刻差のみを用いる方法では、例えば、トラフィックが多いネットワークスイッチを介して、PTPメッセージの通信が行われる場合には、最小往復遅延時間に近い往復遅延時間delayが得られる頻度が少なく、スレーブ時刻にサーボがかからないことになって、スレーブ時刻が、マスタ時刻に到達するのに時間を要することや、スレーブ時刻にかかるサーボが不安定になることがある。
 これに対して、図10の補正部46では、各時刻差を、注目時刻差として、その注目時刻差を平滑化時刻差Tavに平滑化し、その平滑化時刻差Tavを補正した補正平滑化時刻差CTを、時刻誤差として用いて、スレーブ時刻にサーボをかけるので、PTPメッセージの通信が、どのようなネットワークスイッチを介して行われる場合であっても、スレーブ時刻にかかるサーボが安定し、また、スレーブ時刻を、迅速に、マスタ時刻に到達させることができる。
 <補正部46の第2の構成例>
 図17は、図8の補正部46の第2の構成例を示すブロック図である。
 なお、図中、図10の場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。
 図17において、補正部46は、平滑化部71、補正量算出部72、出力値制御部73、平滑化時刻差補正部74、及び、メディアン処理部75を有する。
 したがって、図17の補正部46は、平滑化部71、補正量算出部72、出力値制御部73、及び、平滑化時刻差補正部74を有する点で、図10の場合と共通し、メディアン処理部75が新たに設けられている点で、図10の場合と相違する。
 メディアン処理部75には、補正量算出部72から補正量Cが供給される。
 メディアン処理部75は、補正量算出部72から新たな補正量Cが供給されると、その新たな補正量Cを含む過去P個の補正量Cを、メディアン処理の対象として、そのメディアン処理の対象のP個の補正量Cのメディアンを求める。
 そして、メディアン処理部75は、補正量算出部72からの新たな補正量Cが、メディアンに一致している場合には、その新たな補正量Cを、入力値Cinとして、出力値制御部73に供給する。
 また、補正量算出部72からの新たな補正量Cが、メディアンに一致していない場合には、前回、入力値Cinとして、出力値制御部73に供給した補正量を、再度、入力値Cinとして、出力値制御部73に供給する。
 なお、図17の補正部46も、図10の場合と同様に、補正平滑化時刻差CTを出力するので、図17の補正部46を構成する平滑化部71ないしメディアン処理部75は、図10の場合と同様に、補正平滑化時刻差CTを生成する補正平滑化時刻差生成部を構成しているということができる。
 図18は、図17のメディアン処理部75のメディアン処理の例を説明するフローチャートである。
 図18のメディアン処理は、図9のステップS13の時刻差補正処理の一部として行われる。
 メディアン処理は、例えば、補正量算出部72からメディアン処理部75に、新たな補正量Cが供給されると開始される。
 メディアン処理では、ステップS61において、メディアン処理部75は、補正量算出部72からの新たな補正量Cを含む過去P個の補正量Cを、メディアン処理の対象として、そのメディアン処理の対象のP個の補正量Cのメディアン(中央値)を求め、処理は、ステップS62に進む。
 ステップS62では、メディアン処理部75は、補正量算出部72からの新たな補正量Cが、ステップS61で求められたメディアンに一致しているかどうかを判定する。
 ステップS62において、新たな補正量Cが、メディアンに一致していると判定された場合、処理は、ステップS63に進み、メディアン処理部75は、その新たな補正量Cを、出力値制御部73の入力値Cinとして、出力値制御部73に供給し、メディアン処理を終了する。
 また、ステップS62において、新たな補正量Cが、メディアンに一致していないと判定された場合、処理は、ステップS64に進み、メディアン処理部75は、前回の入力値Cinを、そのまま、出力値制御部73の入力値Cinとして維持し、出力値制御部73に供給して、メディアン処理を終了する。
 メディアン処理によれば、補正量算出部72で算出された補正量Cが大きく変動した場合に、その補正量Cを用いて、平滑化時刻差Tavが補正され、その結果得られる、大きく変動した補正平滑化時刻差CTを、時刻誤差として用いて、スレーブ時刻にサーボがかけられることによって、サーボが不安定になることを防止することができる。
 <補正平滑化時刻差CTと、時刻差Tmsの真値との関係>
 図19は、補正平滑化時刻差CTと、時刻差Tmsの真値との関係を示す図である。
 補正平滑化時刻差CTは、時刻差Tmsを平滑化した平滑化時刻差Tavを補正して得られるため、時刻差Tmsが得られてから、その時刻差Tmsに対する補正平滑化時刻差CTが得られるまでには、タイムラグ(遅れ)がある。
 すなわち、例えば、図12に示したように、平滑化部71が、2N+1タップのFIRフィルタで構成される場合には、最新の時刻差サンプルxiからNサンプル前の時刻差サンプルxi-Nを、注目時刻差として、その注目時刻差に対する平滑化時刻差Tavが求められるため、最新の時刻差に対する補正平滑化時刻差CT(最新の時刻差に対して求められる補正平滑化時刻差CT)は、最新の時刻差が得られてから、少なくとも、Nサンプル(時刻)だけ遅れて得られる。
 このため、各時刻において得られる補正平滑化時刻差CTは、図19に示すように、時刻差の真値から幾分かずれる。
 また、上述のように、最新の時刻差に対する補正平滑化時刻差CTは、その最新の時刻差が得られてから、少なくとも、Nサンプルだけ遅れて得られるので、最新の時刻差に対する補正平滑化時刻差CTを時刻誤差として用いたスレーブ時刻のサーボは、最新の時刻差が得られてから、やはり、少なくとも、Nサンプルだけ遅れてかけられる。
 そのため、スレーブ時刻を、μ秒以下等の細かい精度で、マスタ時刻に一致させることが困難な場合がある。
 そこで、本技術では、真値に近い高精度の時刻差が得られた場合には、即座に、補正平滑化時刻差CTが、高精度の時刻差になるように、補正平滑化時刻差CTを補正し、その補正の結果を、時刻誤差として用いて、スレーブ時刻にサーボをかけることで、スレーブ時刻を、細かい精度で、マスタ時刻に一致させることを可能とする。
 なお、図11で説明したように、往復遅延時間delayが、最小値(最小往復遅延時間)や最大値(最大往復遅延時間)に近い値である場合に、その往復遅延時間delayに対する時刻差は、精度が高い。そこで、本技術では、最小往復遅延時間や最大往復遅延時間に近い往復遅延時間delayに対する時刻差を、真値に近い高精度の時刻差として検出する。
 <補正部46の第3の構成例>
 図20は、図8の補正部46の第3の構成例を示すブロック図である。
 図20において、補正部46は、補正平滑化時刻差生成部101、高精度補正量算出部102、及び、補正平滑化時刻差補正部103を有する。
 補正平滑化時刻差生成部101には、時刻差算出部43(図8)から時刻差Tmsが時系列に供給されるとともに、遅延時間算出部45(図8)から往復遅延時間delayが時系列に供給される。
 補正平滑化時刻差生成部101は、図10の平滑化部71ないし平滑化時刻差補正部74で構成される補正平滑化時刻差生成部、又は、図17の平滑化部71ないしメディアン処理部75で構成される補正平滑化時刻差生成部と同様に構成される。
 補正平滑化時刻差生成部101は、時刻差算出部43からの時刻差Tmsと、遅延時間算出部45からの往復遅延時間delayとを入力として、図10又は図17の場合と同様にして、注目時刻差に対する補正平滑化時刻差CTを生成し、高精度補正量算出部102、及び、補正平滑化時刻差補正部103に供給する。
 高精度補正量算出部102には、補正平滑化時刻差生成部101から補正平滑化時刻差CTが供給される他、時刻差算出部43(図8)から時刻差Tmsが時系列に供給されるとともに、遅延時間算出部45(図8)から往復遅延時間delayが時系列に供給される。
 高精度補正量算出部102は、時刻差算出部43からの最新の時刻差に対する往復遅延時間(注目時刻差とペアの往復遅延時間)delayが、往復遅延時間の最小値又は最大値である最値に近い値である場合に、最新の時刻差を、真値に近い高精度時刻差として検出し、その高精度時刻差、及び、補正平滑化時刻差生成部101からの注目時刻差に対する補正平滑化時刻差CTを用いて、その注目時刻差に対する補正平滑化時刻差CTを、精度の高い時刻誤差に補正する高精度補正量Cpを求め、補正平滑化時刻差補正部103に供給する。
 補正平滑化時刻差補正部103は、補正平滑化時刻差生成部101からの補正平滑化時刻差CTを、高精度補正量算出部102からの高精度補正量Cpを用いて補正し、その結果得られる2回補正平滑化時刻差CT2を、スレーブ時刻の時刻誤差として、時刻出力部50(図8)に供給する。
 図21は、図20の補正部46が、図9のステップS13で行う時刻差補正処理の例を説明するフローチャートである。
 ステップS101において、補正平滑化時刻差生成部101は、時刻差算出部43からの時刻差Tmsと、遅延時間算出部45からの往復遅延時間delayとを用いて、注目時刻差に対する補正平滑化時刻差CTを生成し、高精度補正量算出部102、及び、補正平滑化時刻差補正部103に供給して、処理は、ステップS102に進む。
 ステップS102では、高精度補正量算出部102は、時刻差算出部43からの最新の時刻差に対する往復遅延時間delayが、往復遅延時間の最値に近い値である場合に、最新の時刻差を、高精度時刻差として検出し、その高精度時刻差と、補正平滑化時刻差生成部101からの注目時刻差に対する補正平滑化時刻差CTを用いて、高精度補正量Cpを求める高精度補正量算出処理を行う。そして、高精度補正量算出部102は、高精度補正量Cpを、補正平滑化時刻差補正部103に供給して、処理は、ステップS102からステップS103に進む。
 ステップS103では、補正平滑化時刻差補正部103は、例えば、補正平滑化時刻差生成部101からの補正平滑化時刻差CTと、高精度補正量算出部102からの高精度補正量Cpとを加算することにより、補正平滑化時刻差CTを、2回補正平滑化時刻差CT2に補正し、スレーブ時刻の時刻誤差として、時刻出力部50(図8)に供給して、時刻差補正処理を終了する。
 ここで、高精度補正量算出部102は、例えば、高精度時刻差PTから、注目時刻差に対する補正平滑化時刻差CTを減算した減算値を、高精度補正量Cp=PT-CTとして求める。また、補正平滑化時刻差補正部103は、例えば、注目時刻差に対する補正平滑化時刻差CTと、高精度補正量Cpとを加算することにより、注目時刻差に対する2回補正平滑化時刻差CT2を求める。
 この場合、注目時刻差に対する2回補正平滑化時刻差CT2は、高精度時刻差PT=CT+Cp=CT+(PT-CT)、すなわち、最新の時刻差となる。
 <高精度補正量算出部102の第1の構成例>
 図22は、図20の高精度補正量算出部102の第1の構成例を示すブロック図である。
 図22において、高精度補正量算出部102は、最値検出部111、統計処理部112、閾値設定部113、高精度時刻差検出部114、補正量演算部115、及び、高精度補正量出力制御部116を有する。
 最値検出部111には、遅延時間算出部45(図8)から往復遅延時間delayが供給される。
 最値検出部111は、遅延時間算出部45から供給された往復遅延時間delayの系列の中の、最値(最小値である最小往復遅延時間、又は、最大値である最大往復遅延時間)を検出し、統計処理部112、及び、高精度時刻差検出部114に供給する。
 統計処理部112には、最値検出部111から往復遅延時間の最値が供給される他、遅延時間算出部45(図8)から往復遅延時間delayが供給される。
 統計処理部112は、往復遅延時間の最値を基準とする所定の範囲内の値の往復遅延時間の度数を求める統計処理を行い、その統計処理の結果である往復遅延時間の度数を、閾値設定部113に供給する。
 閾値設定部113は、統計処理部112からの、統計処理の結果である往復遅延時間の度数に基づいて、高精度時刻差の検出に用いる閾値である検出閾値を設定し、高精度時刻差検出部114に供給する。
 高精度時刻差検出部114には、最値検出部111から往復遅延時間の最値が供給されるとともに、閾値設定部113から検出閾値が供給される他、時刻差算出部43(図8)から時刻差Tmsが供給されるとともに、遅延時間算出部45(図8)から往復遅延時間delayが供給される。
 高精度時刻差検出部114は、遅延時間算出部45からの最新の往復遅延時間delayが、往復遅延時間の最値から検出閾値の範囲内の値である場合に、その最新の往復遅延時間delayに対する時刻差Tms、すなわち、時刻差算出部43からの最新の時刻差Tmsを、高精度時刻差として検出し、補正量演算部115に供給する。
 補正量演算部115には、高精度時刻差検出部114から高精度時刻差が供給される他、補正平滑化時刻差生成部101(図20)から、注目時刻差に対する補正平滑化時刻差CTが供給される。
 補正量演算部115は、高精度時刻差検出部114からの高精度時刻差と、補正平滑化時刻差生成部101からの注目時刻差に対する補正平滑化時刻差CTとを用いて、高精度補正量Cpを求め、高精度補正量出力制御部116に供給する。
 高精度補正量出力制御部116は、補正量演算部115からの高精度補正量Cpの、補正平滑化時刻差補正部103(図20)への供給(出力)を制御する。
 <往復遅延時間の最小値に近い往復遅延時間delayに対する時刻差Tmsを高精度時刻差として検出する場合の高精度補正量算出処理>
 以下、図22の高精度補正量算出部102が行う高精度補正量算出処理の例を説明する。
 なお、高精度時刻差としては、往復遅延時間の最小値(最小往復遅延時間)に近い往復遅延時間delayに対する時刻差Tmsと、往復遅延時間の最大値(最大往復遅延時間)に近い往復遅延時間delayに対する時刻差Tmsとを検出することができるが、まず、最小往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsのみを、高精度時刻差として検出する場合、すなわち、最値検出部111において、最値として、最小往復遅延時間が検出される場合について説明する。
 図23は、図22の高精度補正量算出部102の最値検出部111が行う最値(ここでは、最小値)検出の処理の例を説明するフローチャートである。
 図23の最値検出の処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 最値検出の処理では、ステップS111において、最値検出部111が、遅延時間算出部45(図8)からの最新の往復遅延時間delayが、現在得られている、往復遅延時間の最小値(最小往復遅延時間)がセットされている変数delay_minより小さいかどうかを判定する。
 ここで、変数delay_minの初期値としては、例えば、無限大等の、往復遅延時間の最大値として得られると予想される値よりも大きな値が採用される。
 ステップS111において、最新の往復遅延時間delayが、変数(最小往復遅延時間)delay_minより小さいと判定された場合、すなわち、最新の往復遅延時間delayが、変数delay_minにセットされるべき場合、処理は、ステップS112に進み、最値検出部111は、過去の最小往復遅延時間delay_minを一時的に保持する配列変数prev_delay_min[i]のインデクスiを、後述するステップS127でインクリメントされる変数Jにセット(初期化)して、処理は、ステップS113に進む。
 ここで、変数Jの初期値としては、配列変数prev_delay_min[i]のインデクスの最小値である、例えば、0が採用される。また、配列変数prev_delay_min[i]には、原則として、i+1回前に最小往復遅延時間delay_minであった往復遅延時間delayがセットされる。
 ステップS113では、最値検出部111は、配列変数prev_delay_min[i+1]に、配列変数prev_delay_min[i]をセットすることにより、配列変数prev_delay_min[i+1]を更新し、処理は、ステップS114に進む。
 ステップS114では、最値検出部111は、インデクスiが0であるかどうかを判定する。
 ステップS114において、インデクスiが0でないと判定された場合、処理は、ステップS115に進み、最値検出部111は、インデクスiを1だけデクリメントする。その後、処理は、ステップS115からステップS113に戻り、以下、同様の処理が繰り返される。
 また、ステップS114において、インデクスiが0であると判定された場合、処理は、ステップS116に進み、最値検出部111は、変数prev_delay_min[0]に、変数delay_minをセットし、その後、変数delay_minに、最新の往復遅延時間delayをセットする。さらに、最値検出部111は、変数Jを0に初期化し、処理は、ステップS117に進む。
 一方、ステップS111において、最新の往復遅延時間delayが、変数delay_minより小さくないと判定された場合、処理は、ステップS112ないしS116をスキップして、ステップS117に進み、最値検出部111は、最新の往復遅延時間delayが、変数delay_minに、あらかじめ決められた閾値TH(>0)を加算した加算値delay_min+TH以下であるかどうかを判定する。
 ステップS117において、最新の往復遅延時間delayが、加算値delay_min+TH以下であると判定された場合、すなわち、最新の往復遅延時間delayが、現在の最小往復遅延時間delay_minから閾値THの範囲内の値である場合(delayが、delay_minからdelay_min+THまでの範囲内の値である場合)、処理は、ステップS118に進み、最値検出部111は、最新の往復遅延時間delayが、現在の最小往復遅延時間delay_minから閾値THの範囲内の値でないケースをカウントする変数off_window_countを0にセット(初期化)し、処理は、ステップS128に進む。
 ステップS128では、最値検出部111は、変数delay_minを、往復遅延時間の最小値(最小往復遅延時間)として、統計処理部112、及び、高精度時刻差検出部114に出力(供給)して、最値検出の処理を終了する。
 また、ステップS117において、最新の往復遅延時間delayが、加算値delay_min+TH以下でないと判定された場合、すなわち、最新の往復遅延時間delayが、現在の最小往復遅延時間delay_minから閾値THの範囲内の値でない場合、処理は、ステップS119に進み、最値検出部111は、変数off_window_countを1だけインクリメントして、処理は、ステップS120に進む。
 ステップS120では、最値検出部111は、変数off_window_countが、あらかじめ決められた閾値TH_timeより大であるかどうかを判定する。
 ステップS120において、変数off_window_countが、閾値TH_timeより大でないと判定された場合、すなわち、往復遅延時間delayが変数delay_minから閾値THの範囲内の値でないことが、まだ、閾値TH_timeに相当する時間(サンプル数)だけ連続していない場合、処理は、ステップS121ないしS127をスキップして、ステップS128に進み、上述したように、最値検出部111は、変数delay_minを、往復遅延時間の最小値(最小往復遅延時間)として、統計処理部112、及び、高精度時刻差検出部114に出力(供給)して、最値検出の処理を終了する。
 また、ステップS120において、変数off_window_countが、閾値TH_timeより大であると判定された場合、すなわち、往復遅延時間delayが変数delay_minから閾値THの範囲内の値でないことが、閾値TH_timeに相当する時間(サンプル数)だけ連続した場合、処理は、ステップS121に進み、最値検出部111は、変数off_window_countを0にセットし、処理は、ステップS122に進む。
 ステップS122では、最値検出部111は、変数Jが、配列変数prev_delay_min[i]の配列数の最大値に相当する値としてあらかじめ決められた最大相当数J_max以上であるかどうかを判定する。
 ステップS122において、変数Jが、最大相当数J_max以上であると判定された場合、処理は、ステップS123に進み、最値検出部111は、最小往復遅延時間としての変数delay_minを、いままでより大きい値である、例えば、delay_min+2×THに更新し、処理は、ステップS128に進む。
 ステップS128では、最値検出部111は、上述したように、変数delay_minを、最小往復遅延時間として、統計処理部112、及び、高精度時刻差検出部114に出力して、最値検出の処理を終了する。
 また、ステップS122において、変数Jが、最大相当数J_max以上でないと判定された場合、処理は、ステップS124に進み、最値検出部111は、現在の最小往復遅延時間としての変数delay_minが、(配列)変数prev_delay_min[J]以上であるかどうかを判定する。
 ステップS124において、変数delay_minが、変数prev_delay_min[J]以上であると判定された場合、すなわち、現在の最小往復遅延時間delay_minが、過去に最小往復遅延時間となったことがある値(過去に、変数delay_minにセットされたことがある値)prev_delay_min[J]以上である場合、処理は、ステップS125に進み、最値検出部111は、過去に最小往復遅延時間となったことがある値がセットされた変数prev_delay_min[J]が現在の最小往復遅延時間delay_minよりも大きくなるように、変数prev_delay_min[J]に、変数delay_minと閾値THとを加算した値をセットすることにより、変数prev_delay_min[J]を更新して、処理は、ステップS126に進む。
 また、ステップS124において、変数delay_minが、変数prev_delay_min[J]以上でないと判定された場合、すなわち、現在の最小往復遅延時間delay_minが、過去に最小往復遅延時間となったことがある値prev_delay_min[J]より小さい場合、処理は、ステップS125をスキップして、ステップS126に進み、最値検出部111は、最小往復遅延時間としての変数delay_minを、変数prev_delay_min[J]に更新し、処理は、ステップS127に進む。
 ステップS127では、最値検出部111は、変数Jを1だけインクリメントして、処理は、ステップS128に進む。
 ステップS128では、最値検出部111は、上述したように、変数delay_minを、最小往復遅延時間として、統計処理部112、及び、高精度時刻差検出部114に出力して、最値検出の処理を終了する。
 図23の最値検出の処理では、基本的には、最新の往復遅延時間delayが、現在得られている最小往復遅延時間としての変数delay_minより小さい場合には、最小往復遅延時間としての変数delay_minが、最新の往復遅延時間delayに更新される。
 そして、delay_minからdelay_min+THまでの範囲内にない往復遅延時間delay、すなわち、delay_min+THを超える大きな往復遅延時間delayが連続した場合、ステップS122ないしS127において、最小往復遅延時間としての変数delay_minが、過去に最小往復遅延時間とされた、現在の最小往復遅延時間よりも大きい往復遅延時間等(がセットされた配列変数prev_delay_min[J])に更新される。
 すなわち、現在の最小往復遅延時間delay_minを大きく超える、大きな値の往復遅延時間delayが続いた場合には、そのような大きな値の往復遅延時間delayを、現在の最小往復遅延時間を用いて処理することは適切でないため、最小往復遅延時間としての変数delay_minが、幾分か大きな値に更新される。
 したがって、図23の最値検出の処理では、最新の往復遅延時間delayが、現在の最小往復遅延時間delay_minより小さい場合には、最小往復遅延時間delay_minは、最新の往復遅延時間delayに更新される。但し、現在の最小往復遅延時間delay_minを大きく超える往復遅延時間、すなわち、delay_min+THを超える往復遅延時間が、閾値TH_timeを超える回数だけ連続すると、最小往復遅延時間delay_minは、その最小往復遅延時間delay_minより大きい値に更新される。
 図24は、図22の高精度補正量算出部102の統計処理部112が行う統計処理の例を説明する図である。
 統計処理部112は、遅延時間算出部45(図8)からの最新の往復遅延時間delayを含む過去M個の往復遅延時間(遅延時間サンプル)を対象として(Mは2以上の整数)、統計処理を行う。
 統計処理は、図24に示すように、M個の往復遅延時間おきに、そのM個の往復遅延時間のうちの最新の往復遅延時間delayが得られたときに、その最新の往復遅延時間delayを含む過去M個の往復遅延時間を対象として行うことができる。
 また、統計処理は、図24に示すように、最新の往復遅延時間delayが得られるごとに、その最新の往復遅延時間delayを含む過去M個の往復遅延時間を対象として行うことができる。
 なお、統計処理を、M個の往復遅延時間おきに、そのM個の往復遅延時間のうちの最新の往復遅延時間delayが得られたときに、その最新の往復遅延時間delayを含む過去M個の往復遅延時間を対象として行う場合には、新たな統計処理が行われるまでは、直前に行われた統計処理の結果が維持される。
 そのため、図22の高精度補正量算出部102において、閾値設定部113は、統計処理部112の統計処理の結果に基づいて、検出閾値を設定するが、次の統計処理が行われるまでは、直前に行われた統計処理の結果に基づいて設定した検出閾値を維持する。
 図25は、最値検出部111において、最値として、最小往復遅延時間が検出される場合の、図22の高精度補正量算出部102の統計処理部112が行う統計処理の例を説明するフローチャートである。
 図25の統計処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 統計処理では、ステップS131において、統計処理部112は、往復遅延時間delayの度数をカウントする配列変数delay_min_count[0],delay_min_count[1],delay_min_count[2]、及び、delay_min_count[3]を、すべて0に初期化し、処理は、ステップS132に進む。
 ステップS132では、統計処理部112は、最値検出部111から、最新の最小往復遅延時間(としての変数)delay_minを取得して、処理は、ステップS133に進む。
 ステップS133では、統計処理部112は、往復遅延時間(遅延時間サンプル)の数をカウントする変数jを0に初期化して、処理は、ステップS134に進む。
 ステップS134では、統計処理部112は、遅延時間算出部45(図8)からの最新の往復遅延時間delay[i]からjサンプルだけ前(過去)の往復遅延時間delay[i-j]が、最新の最小往復遅延時間delay_minとあらかじめ決められた閾値TH0(>0)とを加算した加算値delay_min+TH0以下であるかどうかを判定する。
 ステップS134において、往復遅延時間delay[i-j]が、加算値delay_min+TH0以下であると判定された場合、処理は、ステップS135に進み、統計処理部112は、最新の最小往復遅延時間delay_minから閾値TH0の範囲内の値(delay_minから加算値delay_min+TH0までの範囲内の値)の往復遅延時間delayの数をカウントする変数delay_min_count[0]を1だけインクリメントして、処理は、ステップS142に進む。
 また、ステップS134において、往復遅延時間delay[i-j]が、加算値delay_min+TH0以下でないと判定された場合、処理は、ステップS136に進み、統計処理部112は、遅延時間算出部45からの最新の往復遅延時間delay[i]からjサンプルだけ前の往復遅延時間delay[i-j]が、最新の最小往復遅延時間delay_minと、閾値TH0よりも大の、あらかじめ決められた閾値TH1とを加算した加算値delay_min+TH1以下であるかどうかを判定する。
 ステップS136において、往復遅延時間delay[i-j]が、加算値delay_min+TH1以下であると判定された場合、処理は、ステップS137に進み、統計処理部112は、加算値delay_min+TH0から加算値delay_min+TH1までの範囲内の値の往復遅延時間delayの数をカウントする変数delay_min_count[1]を1だけインクリメントして、処理は、ステップS142に進む。
 また、ステップS136において、往復遅延時間delay[i-j]が、加算値delay_min+TH1以下でないと判定された場合、処理は、ステップS138に進み、統計処理部112は、遅延時間算出部45からの最新の往復遅延時間delay[i]からjサンプルだけ前の往復遅延時間delay[i-j]が、最新の最小往復遅延時間delay_minと、閾値TH1よりも大の、あらかじめ決められた閾値TH2とを加算した加算値delay_min+TH2以下であるかどうかを判定する。
 ステップS138において、往復遅延時間delay[i-j]が、加算値delay_min+TH2以下であると判定された場合、処理は、ステップS139に進み、統計処理部112は、加算値delay_min+TH1から加算値delay_min+TH2までの範囲内の値の往復遅延時間delayの数をカウントする変数delay_min_count[2]を1だけインクリメントして、処理は、ステップS142に進む。
 また、ステップS138において、往復遅延時間delay[i-j]が、加算値delay_min+TH2以下でないと判定された場合、処理は、ステップS140に進み、統計処理部112は、遅延時間算出部45からの最新の往復遅延時間delay[i]からjサンプルだけ前の往復遅延時間delay[i-j]が、最新の最小往復遅延時間delay_minと、閾値TH2よりも大の、あらかじめ決められた閾値TH3とを加算した加算値delay_min+TH3以下であるかどうかを判定する。
 ステップS140において、往復遅延時間delay[i-j]が、加算値delay_min+TH3以下であると判定された場合、処理は、ステップS141に進み、統計処理部112は、加算値delay_min+TH2から加算値delay_min+TH3までの範囲内の値の往復遅延時間delayの数をカウントする変数delay_min_count[3]を1だけインクリメントして、処理は、ステップS142に進む。
 また、ステップS140において、往復遅延時間delay[i-j]が、加算値delay_min+TH3以下でないと判定された場合、処理は、ステップS142に進み、統計処理部112は、変数jが、統計処理に用いる往復遅延時間delayのサンプルの数Mから1を減算した減算値M-1に等しいかどうかを判定する。
 ステップS142において、変数jが減算値M-1に等しくないと判定された場合、処理は、ステップS143に進み、統計処理部112は、変数jを1だけインクリメントする。そして、処理は、ステップS143からステップS134に戻り、以下、同様の処理が繰り返される。
 また、ステップS142において、変数jが減算値M-1に等しいと判定された場合、すなわち、最新の往復遅延時間delay[i]を含む過去M個の往復遅延時間delay[i-M+1]ないしdelay[i]を対象として、delay_minからdelay_min+TH0までの範囲の往復遅延時間delayの度数delay_min_count[0]、delay_min+TH0からdelay_min+TH1までの範囲の往復遅延時間delayの度数delay_min_count[1]、delay_min+TH1からdelay_min+TH2までの範囲の往復遅延時間delayの度数delay_min_count[2]、及び、delay_min+TH2からdelay_min+TH3までの範囲の往復遅延時間delayの度数delay_min_count[3]が求められた場合、統計処理を終了する。
 なお、図25の統計処理では、delay_minからdelay_min+TH0までの範囲、delay_min+TH0からdelay_min+TH1までの範囲、delay_min+TH1からdelay_min+TH2までの範囲、及び、delay_min+TH2からdelay_min+TH3までの範囲の4つの範囲(最小往復遅延時間delay_minを基準とする範囲)について、往復遅延時間delayの度数をカウントしたが、統計処理部112での統計処理では、3つ以下、又は、5つ以上の範囲について、往復遅延時間delayの度数をカウントすることができる。
 また、図23の最値検出の処理で用いられる閾値THとしては、例えば、図25の統計処理で用いられる4つの閾値TH0,TH1,TH2、及び、TH3のうちの、最大の閾値TH3を採用することができる。
 図26は、最値検出部111において、最値として、最小往復遅延時間が検出される場合の、図22の高精度補正量算出部102の閾値設定部113が行う閾値設定の処理の例を説明するフローチャートである。
 図26の閾値設定の処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 図26の閾値設定の処理では、総計処理部112での統計処理の結果得られる往復遅延時間delayの度数に基づいて、度数が多い往復遅延時間が、最値である最小往復遅延時間から検出閾値DMINの範囲内(delay_minからdelay_min+DMINまでの範囲)に入るように、検出閾値DMINが設定される。
 すなわち、閾値設定の処理では、ステップS151において、閾値設定部113は、統計処理部112での最新の統計処理によって得られた往復遅延時間delayの度数delay_min_count[0],delay_min_count[1],delay_min_count[2]、及び、delay_min_count[3]のうちの、例えば、1番目に小さい(最も小さい)値の範囲の往復遅延時間delayの度数delay_min_count[0]と2番目に小さい値の範囲の往復遅延時間delayの度数delay_min_count[1]とを加算した度数delay_min_count[0]+delay_min_count[1]が、3番目に小さい値の範囲の往復遅延時間delayの度数delay_min_count[2]よりも大であるかどうかを判定する。
 ステップS151において、度数delay_min_count[0]+delay_min_count[1]が、度数delay_min_count[2]より大であると判定された場合、すなわち、最小往復遅延時間delay_minに極めて近い往復遅延時間delayの数(delay_min_count[0]+delay_min_count[1])が、最小往復遅延時間delay_minにある程度近い往復遅延時間delayの数(delay_min_count[2])に比較して多い場合、処理は、ステップS152に進み、閾値設定部113は、最小往復遅延時間delay_minに近い値の往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出するときに用いる検出閾値DMINを、例えば、小さい値の閾値TH1に設定し、高精度時刻差検出部114に供給して、閾値設定の処理を終了する。
 また、ステップS151において、度数delay_min_count[0]+delay_min_count[1]が、度数delay_min_count[2]より大でないと判定された場合、処理は、ステップS153に進み、閾値設定部113は、3番目に小さい値の範囲の往復遅延時間delayの度数delay_min_count[2]が、4番目に小さい(最も大きい)値の範囲の往復遅延時間delayの度数delay_min_count[3]より大きいかどうかを判定する。
 ステップS153において、度数delay_min_count[2]が、度数delay_min_count[3]より大きいと判定された場合、すなわち、最小往復遅延時間delay_minにある程度近い往復遅延時間delayの数(delay_min_count[2])が、最小往復遅延時間delay_minからそれほど遠くない(「ある程度近い」より幾分遠い)往復遅延時間delayの数(delay_min_count[3])よりも多い場合、処理は、ステップS154に進み、閾値設定部113は、検出閾値DMINを、閾値TH1より大きい値の、例えば、閾値TH2に設定し、高精度時刻差検出部114に供給して、閾値設定の処理を終了する。
 また、ステップS153において、度数delay_min_count[2]が、度数delay_min_count[3]より大きくないと判定された場合、すなわち、最小往復遅延時間delay_minにある程度近い往復遅延時間delayの数(delay_min_count[2])が、最小往復遅延時間delay_minからそれほど遠くない往復遅延時間delayの数(delay_min_count[3])以下である場合、処理は、ステップS155に進み、閾値設定部113は、検出閾値DMINを、閾値TH2より大きい値の、例えば、閾値TH3に設定し、高精度時刻差検出部114に供給して、閾値設定の処理を終了する。
 なお、図26の閾値設定の処理では、検出閾値DMINを、3つの値としての閾値TH1,TH2、及び、TH3のうちのいずれか1つの値に設定することとしたが、その他、検出閾値は、2つ以下の値、又は、4つ以上の値のうちの1つの値に設定することができる。
 図27は、最値検出部111において、最値として、最小往復遅延時間が検出される場合の、図22の高精度補正量算出部102の高精度時刻差検出部114が行う高精度時刻差検出の処理の例を説明するフローチャートである。
 図27の高精度時刻差検出の処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 高精度時刻差検出の処理では、ステップS161において、高精度時刻差検出部114は、最値検出部111から、最新の最小往復遅延時間(としての変数)delay_minを取得するとともに、閾値設定部113から、最新の検出閾値DMINを取得して、処理は、ステップS162に進む。
 ステップS162では、高精度時刻差検出部114は、遅延時間算出部45(図8)からの最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minと最新の検出閾値DMINとを加算した加算値delay_min+DMIN未満であるかどうかを判定する。
 ステップS162において、最新の往復遅延時間delayが、加算値delay_min+DMIN未満であると判定された場合、すなわち、最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minに近い値である場合、処理は、ステップS163に進み、高精度時刻差検出部114は、最新の往復遅延時間delayに対する時刻差Tms、すなわち、時刻差算出部43(図8)からの最新の時刻差Tmsを、高精度時刻差PTとして検出し、補正量演算部115に出力(供給)して、高精度時刻差検出の処理を終了する。
 また、ステップS162において、最新の往復遅延時間delayが、加算値delay_min+DMIN未満でないと判定された場合、すなわち、最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minに近い値でない場合、高精度時刻差検出の処理を終了する。
 したがって、最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minに近い値でない場合には、高精度時刻差検出部114から補正量演算部115に、高精度時刻差PTは、供給されない。
 図28は、最値検出部111において、最値として、最小往復遅延時間が検出される場合の、図22の高精度補正量算出部102の補正量演算部115が行う補正量演算の処理の例を説明するフローチャートである。
 図28の補正量演算の処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 高精度時刻差検出の処理では、ステップS171において、補正量演算部115は、高精度時刻差検出部114から高精度時刻差PTが供給されたかどうかを判定する。
 ステップS171において、高精度時刻差検出部114から高精度時刻差PTが供給されたと判定された場合、処理は、ステップS172に進み、補正量演算部115は、高精度時刻差検出部114からの高精度時刻差(最新の時刻差)PTから、補正平滑時刻差生成部101(図20)から供給される、注目時刻差(最新の時刻差からNサンプルだけ前の時刻差)に対する補正平滑化時刻差CTを減算することにより、その補正平滑化時刻差CTを補正する補正量としての高精度補正量Cp=PT-CTを求め、高精度補正量出力制御部116に出力(供給)して、補正量演算の処理を終了する。
 また、ステップS171において、高精度時刻差検出部114から高精度時刻差PTが供給されなかったと判定された場合、補正量演算の処理を終了する。
 したがって、高精度時刻差検出部114から補正量演算部115に、高精度時刻差PTが供給されなかった場合、すなわち、高精度時刻差検出部114において、高精度時刻差PTが検出されなかった場合、補正量演算部115において、高精度補正量Cpは求められず、高精度補正量出力制御部116に供給されない。
 図29は、図22の高精度補正量算出部102の高精度補正量出力制御部116が行う出力制御の処理の例を説明するフローチャートである。
 図29の出力制御の処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 ここで、説明の便宜上、補正量演算部115から高精度補正量出力制御部116に供給される高精度補正量、すなわち、高精度補正量出力制御部116への入力値を、Cqと表し、高精度補正量出力制御部116から(補正平滑化時刻差補正部103(図20)に)出力される高精度補正量、すなわち、高精度補正量出力制御部116の出力値を、Cpと表す。後述する図30でも、同様である。
 図29の出力制御の処理では、高精度補正量出力制御部116は、補正量演算部115から供給される高精度補正量Cqを0次ホールドして、補正平滑化時刻差補正部103(図20)に供給する。
 すなわち、図29の出力制御の処理では、ステップS181において、高精度補正量出力制御部116は、補正量演算部115から、高精度補正量Cqが入力値として供給されたかどうかを判定する。
 ステップS181において、補正量演算部115から、高精度補正量Cqが入力値として供給されたと判定された場合、処理は、ステップS182に進み、補正量演算部115は、高精度補正量としての出力値Cpとして、入力値Cqを、補正平滑化時刻差補正部103(図20)に出力して、出力制御の処理を終了する。
 また、ステップS181において、補正量演算部115から、高精度補正量Cqが入力値として供給されていないと判定された場合、処理は、ステップS183に進み、高精度補正量出力制御部116は、高精度補正量としての出力値Cpをそのまま維持して、補正平滑化時刻差補正部103(図20)に出力して、出力制御の処理を終了する。
 以上のように、高精度補正量出力制御部116では、補正量演算部115からの高精度補正量が0次ホールドされて、補正平滑化時刻差補正部103(図20)に供給されるので、高精度時刻差検出部114において、高精度時刻差PTが検出された場合には、即座に、高精度時刻差PTを用いて高精度補正量Cpが求められ、補正平滑化時刻差補正部103に供給される。
 その結果、最新の時刻差が高精度時刻差PTである場合には、その高精度時刻差PTである最新の時刻差から求められた高精度補正量Cpを用いて、補正平滑化時刻差CTが、高精度の時刻差になるように、即座に補正されるので、その補正の結果得られる2回補正平滑化時刻差CT2を、時刻誤差として用いて、スレーブ時刻にサーボをかけることで、スレーブ時刻を、細かい精度で、マスタ時刻に一致させることができ、スレーブ時刻の同期の精度を向上させることができる。
 ここで、図20の補正部46では、補正平滑化時刻差生成部101において、時刻差算出部43(図8)からの時刻差Tmsごとに(遅延時間算出部45(図8)からの往復遅延時間delayごとに)、補正平滑化時刻差CTを得ることができるが、図19で説明したように、各時刻差に対する補正平滑化時刻差CTは、その時刻差が得られてから、少なくとも、Nサンプルだけ遅れて得られ、したがって、最新の時刻差に対する補正平滑化時刻差CTを時刻誤差として用いたスレーブ時刻のサーボは、最新の時刻差が得られてから、少なくとも、Nサンプルだけ遅れてかけられる。
 以上のように、補正平滑化時刻差生成部101では、時刻差算出部43(図8)からの時刻差Tmsごとに、補正平滑化時刻差CTを得ることができるが、その補正平滑化時刻差CTを時刻誤差として用いたスレーブ時刻のサーボには、時刻差Tmsの平滑化に起因するタイムラグが生じる。
 また、図20の補正部46では、高精度補正量算出部102において、最新の往復遅延時間delayが、最小往復遅延時間delay_minに近い値であれば、その最新の往復遅延時間delayに対する最新の時刻差Tmsが、真値に近い高精度時刻差PTとして検出され、補正平滑化時刻差CTを、その高精度時刻差PTに補正するような高精度補正量Cp=PT-CTが求められる。
 したがって、高精度補正量算出部102では、時刻差算出部43(図8)からの時刻差Tmsごとに、高精度時刻差PTが検出されるとは限らないが、最小往復遅延時間delay_minに近い往復遅延時間delayが得られれば、その往復遅延時間delayに対する時刻差Tmsが、高精度時刻差PTとして検出され、即座に、その高精度時刻差PTから求められる高精度補正量Cpによって、補正平滑化時刻差CTが補正されるので、補正平滑化時刻差CTを時刻誤差として用いたスレーブ時刻のサーボのように、時刻差Tmsの平滑化に起因するタイムラグは、生じない。
 以上から、図20の補正部46によれば、時刻差Tmsごとに得られる補正平滑化時刻差CTが、時刻差Tmsごとに得られるとは限らない高精度時刻差PTから求められる高精度補正量Cpを補い、タイムラグがない高精度時刻差PTから求められる高精度補正量Cpが、タイムラグがある補正平滑化時刻差CTを補うことによって、スレーブ時刻の同期の精度を向上させている、ということができる。
 以上のように、図20の補正部46では、時刻差Tmsごとに得られる補正平滑化時刻差CTと、タイムラグがない高精度時刻差PTから求められる高精度補正量Cpとが、相互に補い合うことによって、スレーブ時刻にサーボをかけられ、スレーブ時刻を、細かい精度で、マスタ時刻に一致させることができる。
 ここで、図22の高精度補正量算出部102の、閾値設定部113での検出閾値DMINの設定において、ネットワーク30(図7)での遅延が小さいことの頻度が高い場合には、検出閾値DMINとして小さい値TH1が設定され、その結果、高精度時刻差検出部114で高精度時刻差として検出される時刻差は、最小往復遅延時間delay_minに極めて近い往復遅延時間delayに対する時刻差Tmsになる。
 以上のように、ネットワーク30(図7)での遅延が小さいことの頻度が高い場合には、最小往復遅延時間delay_minは小さな値となり、そのような小さな値の最小往復遅延時間delay_minに極めて近い往復遅延時間delayに対する時刻差Tmsは、図11で説明したことから、より精度の高い時刻差であるので、そのような、より精度の高い時刻差が、高精度時刻差検出部114において高精度時刻差PTとして検出されることになる。
 なお、図29の出力制御の処理では、高精度補正量出力制御部116(図22)において、補正量演算部115から高精度補正量が供給された場合に、その高精度補正量を0次ホールドすることにより、即座に、補正平滑化時刻差補正部103(図20)に出力することとしたが、高精度補正量出力制御部116では、その他、例えば、補正量演算部115から高精度補正量が供給された場合には、その高精度補正量をそのまま出力し、その後、徐々に0に近づけることができる。
 図30は、図22の高精度補正量算出部102の高精度補正量出力制御部116が行う出力制御の処理の他の例を説明するフローチャートである。
 図30の出力制御の処理では、高精度補正量出力制御部116は、補正量演算部115から高精度補正量が供給された場合に、その高精度補正量をそのまま出力値として、補正平滑化時刻差補正部103(図20)に出力し、その後、出力値を、補正量演算部115からの高精度補正量から、徐々に0に近づける。
 なお、図30の出力制御の処理は、図21のステップS102の高精度補正量算出処理の一部として、図29の出力制御の処理と択一的に行われる。
 図30の出力制御の処理では、ステップS191において、高精度補正量出力制御部116は、補正量演算部115から、高精度補正量Cqが入力値として供給されたかどうかを判定する。
 ステップS191において、補正量演算部115から、高精度補正量Cqが入力値として供給されたと判定された場合、処理は、ステップS192に進み、補正量演算部115は、高精度補正量としての出力値Cpとして、入力値Cqを、補正平滑化時刻差補正部103(図20)に出力して、出力制御の処理を終了する。
 また、ステップS191において、補正量演算部115から、高精度補正量Cqが入力値として供給されていないと判定された場合、処理は、ステップS193に進み、高精度補正量出力制御部116は、出力値Cpと0との大小関係を判定する。
 ステップS193において、出力値Cpが0未満(負)であると判定された場合、処理は、ステップS194に進み、高精度補正量出力制御部116は、出力値Cpの絶対値|Cp|が、出力値Cpを変化させるときの単位変化量△s(>0)より大であるかどうかを判定する。
 ステップS194において、出力値Cpの絶対値|Cp|が、単位変化量△sより大であると判定された場合、すなわち、負の出力値Cpを単位変化量△sだけ大きくしても0を上回らない場合、処理は、ステップS195に進み、高精度補正量出力制御部116は、出力値Cpを、単位変化量△sだけ大きくして、補正平滑化時刻差補正部103(図20)に出力して、出力制御の処理を終了する。
 また、ステップS193において、出力値Cpが0より大(正)であると判定された場合、処理は、ステップS196に進み、高精度補正量出力制御部116は、出力値Cpの絶対値|Cp|が、単位変化量△sより大であるかどうかを判定する。
 ステップS196において、出力値Cpの絶対値|Cp|が、単位変化量△sより大であると判定された場合、すなわち、正の出力値Cpを単位変化量△sだけ小さくしても0を下回らない場合、処理は、ステップS197に進み、高精度補正量出力制御部116は、出力値Cpを、単位変化量△sだけ小さくして、補正平滑化時刻差補正部103(図20)に出力して、出力制御の処理を終了する。
 一方、ステップS193において、出力値Cpが0であると判定された場合、ステップS194において、出力値Cpの絶対値|Cp|が、単位変化量△sより大でないと判定された場合、及び、ステップS196において、出力値Cpの絶対値|Cp|が、単位変化量△sより大でないと判定された場合は、いずれの場合も、処理は、ステップS198に進み、高精度補正量出力制御部116は、出力値Cpを0にして、補正平滑化時刻差補正部103(図20)に出力し、出力制御の処理を終了する。
 <往復遅延時間の最大値に近い往復遅延時間delayに対する時刻差Tmsを高精度時刻差として検出する場合の高精度補正量算出処理>
 次に、最小往復遅延時間ではなく、最大往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsのみが、高精度時刻差として検出される場合、すなわち、最値検出部111において、最値として、最大往復遅延時間が検出される場合の、図22の高精度補正量算出部102の処理を説明する。
 図31は、図22の高精度補正量算出部102の最値検出部111が行う最値(ここでは、最大値)検出の処理の例を説明するフローチャートである。
 図31の最値検出の処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 最値検出の処理では、ステップS211において、最値検出部111が、遅延時間算出部45(図8)からの最新の往復遅延時間delayが、現在得られている、往復遅延時間の最大値(最大往復遅延時間)がセットされている変数delay_maxより大きいかどうかを判定する。
 ここで、変数delay_maxの初期値としては、例えば、0等の、往復遅延時間の最小値として得られると予想される値よりも小さな値が採用される。
 ステップS211において、最新の往復遅延時間delayが、最大往復遅延時間delay_maxより大きいと判定された場合、すなわち、最新の往復遅延時間delayが、変数delay_maxにセットされるべき場合、処理は、ステップS212に進み、最値検出部111は、過去の最大往復遅延時間delay_maxを一時的に保持する配列変数prev_delay_max[i]のインデクスiを、後述するステップS227でインクリメントされる変数Jにセット(初期化)して、処理は、ステップS213に進む。
 ここで、変数Jの初期値としては、配列変数prev_delay_max[i]のインデクスの最小値である、例えば、0が採用される。また、配列変数prev_delay_max[i]には、原則として、i+1回前に最大往復遅延時間delay_maxであった往復遅延時間delayがセットされる。
 ステップS213では、最値検出部111は、配列変数prev_delay_max[i+1]に、配列変数prev_delay_max[i]をセットすることにより、配列変数prev_delay_max[i+1]を更新し、処理は、ステップS214に進む。
 ステップS214では、最値検出部111は、インデクスiが0であるかどうかを判定する。
 ステップS214において、インデクスiが0でないと判定された場合、処理は、ステップS215に進み、最値検出部111は、インデクスiを1だけデクリメントする。その後、処理は、ステップS215からステップS213に戻り、以下、同様の処理が繰り返される。
 また、ステップS214において、インデクスiが0であると判定された場合、処理は、ステップS216に進み、最値検出部111は、変数prev_delay_max[0]に、変数delay_maxをセットし、その後、変数delay_maxに、最新の往復遅延時間delayをセットする。さらに、最値検出部111は、変数Jを0に初期化し、処理は、ステップS217に進む。
 一方、ステップS211において、最新の往復遅延時間delayが、変数delay_maxより大きくないと判定された場合、処理は、ステップS212ないしS216をスキップして、ステップS217に進み、最値検出部111は、最新の往復遅延時間delayが、変数delay_maxから、閾値TH(>0)を減算した減算値delay_max-TH以上であるかどうかを判定する。
 ステップS217において、最新の往復遅延時間delayが、減算値delay_max-TH以上であると判定された場合、すなわち、最新の往復遅延時間delayが、現在の最大往復遅延時間delay_maxから閾値THの範囲内の値である場合(delayが、delay_max-THから、delay_maxまでの範囲内の値である場合)、処理は、ステップS218に進み、最値検出部111は、最新の往復遅延時間delayが、現在の最大往復遅延時間delay_maxから閾値THの範囲内の値でないケースをカウントする変数off_window_countを0にセット(初期化)し、処理は、ステップS228に進む。
 ステップS228では、最値検出部111は、変数delay_maxを、往復遅延時間の最大値(最大往復遅延時間)として、統計処理部112、及び、高精度時刻差検出部114に出力(供給)して、最値検出の処理を終了する。
 また、ステップS217において、最新の往復遅延時間delayが、減算値delay_max-TH以上でないと判定された場合、すなわち、最新の往復遅延時間delayが、現在の最大往復遅延時間delay_maxから閾値THの範囲内の値でない場合、処理は、ステップS219に進み、最値検出部111は、変数off_window_countを1だけインクリメントして、処理は、ステップS220に進む。
 ステップS220では、最値検出部111は、変数off_window_countが、閾値TH_timeより大であるかどうかを判定する。
 ステップS220において、変数off_window_countが、閾値TH_timeより大でないと判定された場合、すなわち、往復遅延時間delayが変数delay_maxから閾値THの範囲内の値でないことが、まだ、閾値TH_timeに相当する時間(サンプル数)だけ連続していない場合、処理は、ステップS221ないしS227をスキップして、ステップS228に進み、上述したように、最値検出部111は、変数delay_maxを、往復遅延時間の最大値(最大往復遅延時間)として、統計処理部112、及び、高精度時刻差検出部114に出力して、最値検出の処理を終了する。
 また、ステップS220において、変数off_window_countが、閾値TH_timeより大であると判定された場合、すなわち、往復遅延時間delayが変数delay_maxから閾値THの範囲内の値でないことが、閾値TH_timeに相当する時間(サンプル数)だけ連続した場合、処理は、ステップS221に進み、最値検出部111は、変数off_window_countを0にセットし、処理は、ステップS222に進む。
 ステップS222では、最値検出部111は、変数Jが、配列変数prev_delay_max[i]の配列数の最大値に相当する値としてあらかじめ決められた最大相当数J_max以上であるかどうかを判定する。
 ステップS222において、変数Jが、最大相当数J_max以上であると判定された場合、処理は、ステップS223に進み、最値検出部111は、最大往復遅延時間としての変数delay_maxを、いままでより小さい値である、例えば、delay_max-2×THに更新し、処理は、ステップS228に進む。
 ステップS228では、最値検出部111は、上述したように、変数delay_maxを、最大往復遅延時間として、統計処理部112、及び、高精度時刻差検出部114に出力して、最値検出の処理を終了する。
 また、ステップS222において、変数Jが、最大相当数J_max以上でないと判定された場合、処理は、ステップS224に進み、最値検出部111は、現在の最大往復遅延時間としての変数delay_maxが、(配列)変数prev_delay_max[J]以下であるかどうかを判定する。
 ステップS224において、変数delay_maxが、変数prev_delay_max[J]以下であると判定された場合、すなわち、現在の最大往復遅延時間delay_maxが、過去に最大往復遅延時間となったことがある値(過去に、変数delay_maxにセットされたことがある値)prev_delay_max[J]以下である場合、処理は、ステップS225に進み、最値検出部111は、過去に最大往復遅延時間となったことがある値がセットされた変数prev_delay_max[J]が現在の最大往復遅延時間delay_maxよりも小さくなるように、変数prev_delay_max[J]に、変数delay_maxから閾値THを減算した値をセットすることにより、変数prev_delay_max[J]を更新して、処理は、ステップS226に進む。
 また、ステップS224において、変数delay_maxが、変数prev_delay_max[J]以下でないと判定された場合、すなわち、現在の最大往復遅延時間delay_maxが、過去に最大往復遅延時間となったことがある値prev_delay_max[J]より大きい場合、処理は、ステップS225をスキップして、ステップS226に進み、最値検出部111は、最大往復遅延時間としての変数delay_maxを、変数prev_delay_max[J]に更新し、処理は、ステップS227に進む。
 ステップS227では、最値検出部111は、変数Jを1だけインクリメントして、処理は、ステップS228に進む。
 ステップS228では、最値検出部111は、上述したように、変数delay_maxを、最大往復遅延時間として、統計処理部112、及び、高精度時刻差検出部114に出力して、最値検出の処理を終了する。
 図31の最値検出の処理では、基本的には、最新の往復遅延時間delayが、現在得られている最大往復遅延時間としての変数delay_maxより大きい場合には、最大往復遅延時間としての変数delay_maxが、最新の往復遅延時間delayに更新される。
 そして、delay_max-THからdelay_maxまでの範囲内にない往復遅延時間delay、すなわち、delay_max-THを下回る小さな(大きいとは言えない)往復遅延時間delayが連続した場合、ステップS222ないしS227において、最大往復遅延時間としての変数delay_maxが、過去に最大往復遅延時間とされた、現在の最大往復遅延時間よりも小さい往復遅延時間等(がセットされた配列変数prev_delay_max[J])に更新される。
 すなわち、現在の最大往復遅延時間delay_maxを大きく下回る、小さな値の往復遅延時間delayが続いた場合には、そのような小さな値の往復遅延時間delayを、現在の最大往復遅延時間を用いて処理することは適切でないため、最大往復遅延時間としての変数delay_maxが、幾分か小さな値に更新される。
 したがって、図31の最値検出の処理では、最新の往復遅延時間delayが、現在の最大往復遅延時間delay_maxより大きい場合には、最大往復遅延時間delay_maxは、最新の往復遅延時間delayに更新される。但し、現在の最大往復遅延時間delay_maxを大きく下回る往復遅延時間、すなわち、delay_max-THを下回る往復遅延時間が、閾値TH_timeを超える回数だけ連続すると、最大往復遅延時間delay_maxは、その最大往復遅延時間delay_maxより小さい値に更新される。
 図32は、最値検出部111において、最値として、最大往復遅延時間が検出される場合の、図22の高精度補正量算出部102の統計処理部112が行う統計処理の例を説明するフローチャートである。
 図32の統計処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 統計処理では、ステップS231において、統計処理部112は、往復遅延時間delayの度数をカウントする配列変数delay_max_count[0],delay_max_count[1],delay_max_count[2]、及び、delay_max_count[3]を、すべて0に初期化し、処理は、ステップS232に進む。
 ステップS232では、統計処理部112は、最値検出部111から、最新の最大往復遅延時間(としての変数)delay_maxを取得して、処理は、ステップS233に進む。
 ステップS233では、統計処理部112は、往復遅延時間(遅延時間サンプル)の数をカウントする変数jを0に初期化して、処理は、ステップS234に進む。
 ステップS234では、統計処理部112は、遅延時間算出部45(図8)からの最新の往復遅延時間delay[i]からjサンプルだけ前(過去)の往復遅延時間delay[i-j]が、最新の最大往復遅延時間delay_maxから閾値TH0(>0)を減算した減算値delay_max-TH0以上であるかどうかを判定する。
 ステップS234において、往復遅延時間delay[i-j]が、減算値delay_max-TH0以上であると判定された場合、処理は、ステップS235に進み、統計処理部112は、最新の最大往復遅延時間delay_maxから閾値TH0の範囲内の値(減算値delay_max-TH0からdelay_maxまでの範囲内の値)の往復遅延時間delayの数をカウントする変数delay_max_count[0]を1だけインクリメントして、処理は、ステップS242に進む。
 また、ステップS234において、往復遅延時間delay[i-j]が、減算値delay_max-TH0以上でないと判定された場合、処理は、ステップS236に進み、統計処理部112は、遅延時間算出部45からの最新の往復遅延時間delay[i]からjサンプルだけ前の往復遅延時間delay[i-j]が、最新の最大往復遅延時間delay_maxから閾値TH1(>TH0)を減算した減算値delay_max-TH1以上であるかどうかを判定する。
 ステップS236において、往復遅延時間delay[i-j]が、減算値delay_max-TH1以上であると判定された場合、処理は、ステップS237に進み、統計処理部112は、減算値delay_max-TH1から減算値delay_max-TH0までの範囲内の値の往復遅延時間delayの数をカウントする変数delay_max_count[1]を1だけインクリメントして、処理は、ステップS242に進む。
 また、ステップS236において、往復遅延時間delay[i-j]が、減算値delay_max-TH1以上でないと判定された場合、処理は、ステップS238に進み、統計処理部112は、遅延時間算出部45からの最新の往復遅延時間delay[i]からjサンプルだけ前の往復遅延時間delay[i-j]が、最新の最大往復遅延時間delay_maxから閾値TH2(>TH1)を減算した減算値delay_max-TH2以上であるかどうかを判定する。
 ステップS238において、往復遅延時間delay[i-j]が、減算値delay_max-TH2以上であると判定された場合、処理は、ステップS239に進み、統計処理部112は、減算値delay_max-TH2から減算値delay_max-TH1までの範囲内の値の往復遅延時間delayの数をカウントする変数delay_max_count[2]を1だけインクリメントして、処理は、ステップS242に進む。
 また、ステップS238において、往復遅延時間delay[i-j]が、減算値delay_max-TH2以上でないと判定された場合、処理は、ステップS240に進み、統計処理部112は、遅延時間算出部45からの最新の往復遅延時間delay[i]からjサンプルだけ前の往復遅延時間delay[i-j]が、最新の最大往復遅延時間delay_maxから閾値TH3(>TH2)を減算した減算値delay_max-TH3以上であるかどうかを判定する。
 ステップS240において、往復遅延時間delay[i-j]が、減算値delay_max-TH3以上であると判定された場合、処理は、ステップS241に進み、統計処理部112は、減算値delay_max-TH3から減算値delay_max-TH2までの範囲内の値の往復遅延時間delayの数をカウントする変数delay_max_count[3]を1だけインクリメントして、処理は、ステップS242に進む。
 また、ステップS240において、往復遅延時間delay[i-j]が、減算値delay_max-TH3以上でないと判定された場合、処理は、ステップS242に進み、統計処理部112は、変数jが、統計処理に用いる往復遅延時間delayのサンプルの数Mから1を減算した減算値M-1に等しいかどうかを判定する。
 ステップS242において、変数jが減算値M-1に等しくないと判定された場合、処理は、ステップS243に進み、統計処理部112は、変数jを1だけインクリメントする。そして、処理は、ステップS243からステップS234に戻り、以下、同様の処理が繰り返される。
 また、ステップS242において、変数jが減算値M-1に等しいと判定された場合、すなわち、最新の往復遅延時間delay[i]を含む過去M個の往復遅延時間delay[i-M+1]ないしdelay[i]を対象として、delay_max-TH0からdelay_maxまでの範囲の往復遅延時間delayの度数delay_max_count[0]、delay_max-TH1からdelay_max-TH0までの範囲の往復遅延時間delayの度数delay_max_count[1]、delay_max-TH2からdelay_max-TH1までの範囲の往復遅延時間delayの度数delay_max_count[2]、及び、delay_max-TH3からdelay_max-TH2までの範囲の往復遅延時間delayの度数delay_max_count[3]が求められた場合、統計処理を終了する。
 なお、図32の統計処理では、delay_max-TH0からdelay_maxまでの範囲、delay_max-TH1からdelay_max-TH0までの範囲、delay_max-TH2からdelay_max-TH1までの範囲、及び、delay_max-TH3からdelay_max-TH2までの範囲の4つの範囲(最大往復遅延時間delay_maxを基準とする範囲)について、往復遅延時間delayの度数をカウントしたが、統計処理部112での統計処理では、3つ以下、又は、5つ以上の範囲について、往復遅延時間delayの度数をカウントすることができる。
 図33は、最値検出部111において、最値として、最大往復遅延時間が検出される場合の、図22の高精度補正量算出部102の閾値設定部113が行う閾値設定の処理の例を説明するフローチャートである。
 図33の閾値設定の処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 図33の閾値設定の処理では、総計処理部112での統計処理の結果得られる往復遅延時間delayの度数に基づいて、度数が多い往復遅延時間が、最値である最大往復遅延時間delay_maxから検出閾値DMAXの範囲(delay_max-DMAXからdelay_maxまでの範囲)内に入るように、検出閾値DMAXが設定される。
 閾値設定の処理では、ステップS251において、閾値設定部113は、統計処理部112での最新の統計処理によって得られた往復遅延時間delayの度数delay_max_count[0],delay_max_count[1],delay_max_count[2]、及び、delay_max_count[3]のうちの、例えば、1番目に大きい(最も大きい)値の範囲の往復遅延時間delayの度数delay_max_count[0]と2番目に大きい値の範囲の往復遅延時間delayの度数delay_max_count[1]とを加算した度数delay_max_count[0]+delay_max_count[1]が、3番目に大きい値の範囲の往復遅延時間delayの度数delay_max_count[2]よりも大であるかどうかを判定する。
 ステップS251において、度数delay_max_count[0]+delay_max_count[1]が、度数delay_max_count[2]より大であると判定された場合、すなわち、最大往復遅延時間delay_maxに極めて近い往復遅延時間delayの数(delay_max_count[0]+delay_max_count[1])が、最大往復遅延時間delay_maxにある程度近い往復遅延時間delayの数(delay_max_count[2])に比較して多い場合、処理は、ステップS252に進み、閾値設定部113は、最大往復遅延時間delay_maxに近い値の往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出するときに用いる検出閾値DMAXを、例えば、小さい値の閾値TH1に設定し、高精度時刻差検出部114に供給して、閾値設定の処理を終了する。
 また、ステップS251において、度数delay_max_count[0]+delay_max_count[1]が、度数delay_max_count[2]より大でないと判定された場合、処理は、ステップS253に進み、閾値設定部113は、3番目に大きい値の範囲の往復遅延時間delayの度数delay_max_count[2]が、4番目に大きい(最も小さい)値の範囲の往復遅延時間delayの度数delay_max_count[3]より大きいかどうかを判定する。
 ステップS253において、度数delay_max_count[2]が、度数delay_max_count[3]より大きいと判定された場合、すなわち、最大往復遅延時間delay_maxにある程度近い往復遅延時間delayの数(delay_max_count[2])が、最大往復遅延時間delay_maxからそれほど遠くない(「ある程度近い」より幾分遠い)往復遅延時間delayの数(delay_max_count[3])よりも多い場合、処理は、ステップS254に進み、閾値設定部113は、検出閾値DMAXを、閾値TH1より大きい値の、例えば、閾値TH2に設定し、高精度時刻差検出部114に供給して、閾値設定の処理を終了する。
 また、ステップS253において、度数delay_max_count[2]が、度数delay_max_count[3]より大きくないと判定された場合、すなわち、最大往復遅延時間delay_maxにある程度近い往復遅延時間delayの数(delay_max_count[2])が、最大往復遅延時間delay_maxからそれほど遠くない往復遅延時間delayの数(delay_max_count[3])以下である場合、処理は、ステップS255に進み、閾値設定部113は、検出閾値DMAXを、閾値TH2より大きい値の、例えば、閾値TH3に設定し、高精度時刻差検出部114に供給して、閾値設定の処理を終了する。
 なお、図33の閾値設定の処理では、検出閾値DMAXを、3つの値としての閾値TH1,TH2、及び、TH3のうちのいずれか1つの値に設定することとしたが、その他、検出閾値は、2つ以下の値、又は、4つ以上の値のうちの1つの値に設定することができる。
 図34は、最値検出部111において、最値として、最大往復遅延時間が検出される場合の、図22の高精度補正量算出部102の高精度時刻差検出部114が行う高精度時刻差検出の処理の例を説明するフローチャートである。
 図34の高精度時刻差検出の処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 高精度時刻差検出の処理では、ステップS261において、高精度時刻差検出部114は、最値検出部111から、最新の最大往復遅延時間(としての変数)delay_maxを取得するとともに、閾値設定部113から、最新の検出閾値DMAXを取得して、処理は、ステップS262に進む。
 ステップS262では、高精度時刻差検出部114は、遅延時間算出部45からの最新の往復遅延時間delayが、最新の最大往復遅延時間delay_maxから最新の検出閾値DMAXを減算した減算値delay_max-DMAXより大であるかどうかを判定する。
 ステップS262において、最新の往復遅延時間delayが、減算値delay_max-DMAXより大であると判定された場合、すなわち、最新の往復遅延時間delayが、最新の最大往復遅延時間delay_maxに近い値である場合、処理は、ステップS263に進み、高精度時刻差検出部114は、最新の往復遅延時間delayに対する時刻差Tms、すなわち、時刻差算出部43(図8)からの最新の時刻差Tmsを、高精度時刻差として検出し、補正量演算部115に出力(供給)して、高精度時刻差検出の処理を終了する。
 また、ステップS262において、最新の往復遅延時間delayが、減算値delay_max-DMAXより大でないと判定された場合、すなわち、最新の往復遅延時間delayが、最新の最大往復遅延時間delay_maxに近い値でない場合、高精度時刻差検出の処理を終了する。
 したがって、最新の往復遅延時間delayが、最新の最大往復遅延時間delay_maxに近い値でない場合には、高精度時刻差検出部114から補正量演算部115に、高精度時刻差は、供給されない。
 なお、最値検出部111において、最値として、最大往復遅延時間が検出される場合、図22の高精度補正量算出部102の補正量演算部115では、最値として、最小往復遅延時間が検出される場合と同様に、図28の補正量演算の処理が行われる。
 さらに、最値検出部111において、最値として、最大往復遅延時間が検出される場合、図22の高精度補正量算出部102の高精度補正量出力制御部116では、最値として、最小往復遅延時間が検出される場合と同様に、図29又は図30の出力制御の処理が行われる。
 <往復遅延時間の最小値に近い往復遅延時間delayに対する時刻差Tms、及び、往復遅延時間の最大値に近い往復遅延時間delayに対する時刻差Tmsの両方を高精度時刻差として検出する場合の高精度補正量算出処理>
 以上のように、高精度時刻差としては、最小往復遅延時間に近い往復遅延時間delayに対する時刻差Tms、及び、最大往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsのうちの一方のみを検出する他、最小往復遅延時間に近い往復遅延時間delayに対する時刻差Tms、及び、最大往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsの両方を、高精度時刻差として検出することができる。
 そこで、以下では、最小往復遅延時間に近い往復遅延時間delayに対する時刻差Tms、及び、最大往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsの両方を、高精度時刻差として検出する場合について説明する。
 最小往復遅延時間に近い往復遅延時間delayに対する時刻差Tms、及び、最大往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsの両方を、高精度時刻差として検出する場合、図22の高精度補正量算出部102では、最値検出部111において、図23及び図31の最値検出の処理が行われ、最値として、最小往復遅延時間、及び、最大往復遅延時間の両方が検出される。
 また、統計処理部112(図22)では、図25及び図32の統計処理が行われ、閾値設定部113(図22)では、図26及び図33の閾値設定の処理が行われる。
 さらに、補正量演算部115(図22)では、図28の補正量演算の処理が行われ、高精度補正量出力制御部116(図22)では、図29又は図30の出力制御の処理が行われる。
 そして、高精度時刻差検出部114では、図27及び図34の高精度時刻差検出の処理に代えて、図35の高精度時刻差検出の処理が行われる。
 すなわち、図35は、最値検出部111において、最値として、最小往復遅延時間、及び、最大往復遅延時間の両方が検出される場合の、図22の高精度補正量算出部102の高精度時刻差検出部114が行う高精度時刻差検出の処理の例を説明するフローチャートである。
 図35の高精度時刻差検出の処理では、ステップS271において、高精度時刻差検出部114は、最値検出部111から、最新の最小往復遅延時間(としての変数)delay_minを取得するとともに、閾値設定部113から、最新の検出閾値DMINを取得して、処理は、ステップS272に進む。
 ステップS272では、高精度時刻差検出部114は、遅延時間算出部45からの最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minと最新の検出閾値DMINとを加算した加算値delay_min+DMIN未満であるかどうかを判定する。
 ステップS272において、最新の往復遅延時間delayが、加算値delay_min+DMIN未満であると判定された場合、すなわち、最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minに近い値である場合、処理は、ステップS273に進み、高精度時刻差検出部114は、最新の往復遅延時間delayに対する時刻差Tms、すなわち、時刻差算出部43(図8)からの最新の時刻差Tmsを、高精度時刻差として検出し、補正量演算部115に出力(供給)して、高精度時刻差検出の処理を終了する。
 また、ステップS272において、最新の往復遅延時間delayが、加算値delay_min+DMIN未満でないと判定された場合、すなわち、最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minに近い値でない場合、処理は、ステップS274に進み、高精度時刻差検出部114は、最値検出部111から、最新の最大往復遅延時間(としての変数)delay_maxを取得するとともに、閾値設定部113から、最新の検出閾値DMAXを取得して、処理は、ステップS275に進む。
 ステップS275では、高精度時刻差検出部114は、遅延時間算出部45からの最新の往復遅延時間delayが、最新の最大往復遅延時間delay_maxから最新の検出閾値DMAXを減算した減算値delay_max-DMAXより大であるかどうかを判定する。
 ステップS275において、最新の往復遅延時間delayが、減算値delay_max-DMAXより大であると判定された場合、すなわち、最新の往復遅延時間delayが、最新の最大往復遅延時間delay_maxに近い値である場合、処理は、ステップS273に進み、高精度時刻差検出部114は、最新の往復遅延時間delayに対する時刻差Tms、すなわち、時刻差算出部43(図8)からの最新の時刻差Tmsを、高精度時刻差として検出し、補正量演算部115に出力(供給)して、高精度時刻差検出の処理を終了する。
 また、ステップS275において、最新の往復遅延時間delayが、減算値delay_max-DMAXより大でないと判定された場合、すなわち、最新の往復遅延時間delayが、最新の最大往復遅延時間delay_maxに近い値でない場合、高精度時刻差検出の処理を終了する。
 以上のように、図35の高精度時刻差検出の処理では、最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minに近い値であるか、最新の最大往復遅延時間delay_maxに近い値である場合に、その最新の往復遅延時間delayに対する時刻差である最新の時刻差Tmsが、高精度時刻差として検出され、高精度時刻差検出部114から補正量演算部115に供給される。
 また、最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minに近い値でなく、かつ、最新の最大往復遅延時間delay_maxに近い値でもない場合には、高精度時刻差検出部114から補正量演算部115に、高精度時刻差は、供給されない。
 なお、最小往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsのみ、最大往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsのみ、並びに、最小往復遅延時間に近い往復遅延時間delayに対する時刻差Tms、及び、最大往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsの両方のうちのいずれを、高精度時刻差として検出するかは、例えば、ユーザの操作等に基づいて決定することができる。
 また、最小往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsのみ、最大往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsのみ、並びに、最小往復遅延時間に近い往復遅延時間delayに対する時刻差Tms、及び、最大往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsの両方のうちのいずれを、高精度時刻差として検出するかは、その他、例えば、統計処理部112の統計処理の処理結果に基づいて決定することができる。
 <高精度補正量算出部102の第2の構成例>
 図36は、図20の高精度補正量算出部102の第2の構成例を示すブロック図である。
 なお、図中、図22の場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。
 図36の高精度補正量算出部102は、最値検出部111ないし閾値設定部113、補正量生成部115、及び、高精度補正量出力制御部116を有する点で、図22の場合と共通する。
 但し、図36の高精度補正量算出部102は、決定部131が新たに設けられている点、及び、高精度時刻差検出部114に代えて、高精度時刻差検出部132が設けられている点で、図22の場合と相違する。
 図36の高精度補正量算出部102では、最小往復遅延時間に近い往復遅延時間delayに対する時刻差Tms、及び、最大往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsのうちの、最小往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出することを標準(基本)とし、統計処理の処理結果に基づいて、さらに、最大往復遅延時間に近い往復遅延時間delayに対する時刻差Tmsをも、高精度時刻差として検出する。
 ここで、マスタデバイス10(図7)とスレーブデバイス20とのネットワーク30を介した通信において、往復遅延時間delayは、通信時に経由するネットワーク30内のネットワークスイッチにかかっている負荷(例えば、ネットワークスイッチ内のキューにキューイングされているパケットの量)等に起因して大になる。
 したがって、ネットワーク30内のネットワークスイッチに、それほど大きな負荷がかかっていない場合には、最大往復遅延時間delay_maxに近い往復遅延時間delayが、ほとんど生じないことがあり得る。
 そこで、図36の高精度補正量算出部102は、最小往復遅延時間delay_minに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出することを標準とする。
 そして、ネットワーク30内のネットワークスイッチに、それほど大きな負荷がかかっていないこと等に起因して、最大往復遅延時間delay_maxに近い往復遅延時間delayが生じていない場合には、図36の高精度補正量算出部102は、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出しない。
 一方、ネットワーク30内のネットワークスイッチに大きな負荷がかかっていること等に起因して、最大往復遅延時間delay_maxに近い往復遅延時間delayが生じた場合には、図36の高精度補正量算出部102は、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsをも、高精度時刻差として検出する。
 図36の高精度補正量算出部102において、決定部131には、統計処理部112から、統計処理の(処理)結果である往復遅延時間delayの度数が供給される。
 決定部131は、統計処理部112からの、往復遅延時間delayの度数に基づいて、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出するか否かを決定し、その決定結果を表す決定情報としてのフラグis_use_max_delayを、高精度時刻差検出部132に供給する。
 ここで、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出することが決定された場合、フラグis_use_max_delayは、trueにセットされる。また、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出しないことが決定された場合、フラグis_use_max_delayは、falseにセットされる。
 高精度時刻差検出部132は、図22の高精度時刻差検出部114と同様にして、最小往復遅延時間delay_minに近い往復遅延時間delayに対する時刻差Tmsや、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出する。
 すなわち、高精度時刻差検出部132は、少なくとも、最小往復遅延時間delay_minに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出する。
 また、決定部131から高精度時刻差検出部132に供給されるフラグis_use_max_delayが、trueにセットされている場合(最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出することが決定された場合)、高精度時刻差検出部132は、さらに、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsをも、高精度時刻差として検出する。
 なお、図36の高精度補正量算出部102では、最値検出部111において、図23及び図31の最値検出の処理が行われ、最値として、最小往復遅延時間、及び、最大往復遅延時間の両方が検出される。
 また、統計処理部112では、図25及び図32の統計処理が行われ、閾値設定部113では、図26及び図33の閾値設定の処理が行われる。
 さらに、補正量演算部115では、図28の補正量演算の処理が行われ、高精度補正量出力制御部116では、図29又は図30の出力制御の処理が行われる。
 図37は、図36の高精度補正量算出部102の決定部131が行う決定処理の例を説明するフローチャートである。
 図37の決定処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 決定処理では、ステップS301において、決定部131は、統計処理部112での最新の統計処理によって得られた往復遅延時間delayの度数delay_min_count[0],delay_min_count[1],delay_min_count[2]、及び、delay_min_count[3]の総和、すなわち、最小往復遅延時間delay_minに比較的近い往復遅延時間delayの度数の総和delay_min_count_tempを求める。
 さらに、決定部131は、統計処理部112での最新の統計処理によって得られた往復遅延時間delayの度数delay_max_count[0],delay_max_count[1],delay_max_count[2]、及び、delay_max_count[3]の総和、すなわち、最大往復遅延時間delay_maxに比較的近い往復遅延時間delayの度数の総和delay_max_count_tempを求め、処理は、ステップS301からステップS302に進む。
 ステップS302では、決定部131は、最小往復遅延時間delay_minに比較的近い往復遅延時間delayの総和delay_min_count_tempが0であり、かつ、最大往復遅延時間delay_maxに比較的近い往復遅延時間delayの総和delay_max_count_tempが、1以上の所定の数としての、例えば、2より大であるかどうかを判定する。
 ステップS302において、総和delay_min_count_tempが0であり、かつ、総和delay_max_count_tempが2より大であると判定された場合、すなわち、統計処理に用いられたMサンプルの往復遅延時間の中に、最小往復遅延時間delay_minに比較的近い往復遅延時間delayが存在せず、最大往復遅延時間delay_maxに比較的近い往復遅延時間delayが存在する場合、処理は、ステップS303に進み、決定部131は、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出することを決定し、フラグis_use_max_delayをtureにセットする。
 そして、決定部131は、フラグis_use_max_delayを、高精度時刻差検出部132に供給して、決定処理を終了する。
 また、ステップS302において、総和delay_min_count_tempが0でないと判定されるか、総和delay_max_count_tempが2より大でないと判定された場合、処理は、ステップS304に進み、決定部131は、最小往復遅延時間delay_minに比較的近い往復遅延時間delayの総和delay_min_count_tempが1以上の所定の数としての、例えば、2より大であり、かつ、最大往復遅延時間delay_maxに比較的近い往復遅延時間delayの総和delay_max_count_tempが0であるかどうかを判定する。
 ステップS304において、総和delay_min_count_tempが2より大であり、かつ、総和delay_max_count_tempが0であると判定された場合、すなわち、統計処理に用いられたMサンプルの往復遅延時間の中に、最小往復遅延時間delay_minに比較的近い往復遅延時間delayが存在し、最大往復遅延時間delay_maxに比較的近い往復遅延時間delayが存在しない場合、処理は、ステップS305に進み、決定部131は、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出しないことを決定し、フラグis_use_max_delayをfalseにセットする。
 そして、決定部131は、フラグis_use_max_delayを、高精度時刻差検出部132に供給して、決定処理を終了する。
 また、ステップS304において、総和delay_min_count_tempが2より大でないと判定されるか、総和delay_max_count_tempが0でないと判定された場合、処理は、ステップS306に進み、決定部131は、フラグis_use_max_delayを、そのまま維持して、高精度時刻差検出部132に供給し、決定処理を終了する。
 なお、フラグis_use_max_delayの初期値としては、例えば、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出しないことを表すfalseを採用することができる。
 図38は、図36の高精度補正量算出部102の高精度時刻差検出部132が行う高精度時刻差検出の処理の例を説明するフローチャートである。
 図38の高精度時刻差検出の処理は、図21のステップS102の高精度補正量算出処理の一部として行われる。
 図38の高精度時刻差検出の処理は、ステップS311ないしS315において、図35のステップS271ないしS275とそれぞれ同様の処理が行われる点で、図35の高精度時刻差検出の処理と共通する。但し、図38の高精度時刻差検出の処理は、フラグis_use_amx_delayを判定するステップS321の処理が新たに加えられている点で、図35の高精度時刻差検出の処理と相違する。
 すなわち、図38の高精度時刻差検出の処理では、ステップS311において、高精度時刻差検出部132は、最値検出部111から、最新の最小往復遅延時間(としての変数)delay_minを取得するとともに、閾値設定部113から、最新の検出閾値DMINを取得して、処理は、ステップS312に進む。
 ステップS312では、高精度時刻差検出部132は、遅延時間算出部45からの最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minと最新の検出閾値DMINとを加算した加算値delay_min+DMIN未満であるかどうかを判定する。
 ステップS312において、最新の往復遅延時間delayが、加算値delay_min+DMIN未満であると判定された場合、処理は、ステップS313に進み、高精度時刻差検出部132は、最新の往復遅延時間delayに対する時刻差Tms、すなわち、時刻差算出部43(図8)からの最新の時刻差Tmsを、高精度時刻差として検出し、補正量演算部115に出力して、高精度時刻差検出の処理を終了する。
 また、ステップS312において、最新の往復遅延時間delayが、加算値delay_min+DMIN未満でないと判定された場合、処理は、ステップS321に進み、高精度時刻差検出部132は、決定部131からのフラグis_use_max_delayがtrueにセットされているかどうかを判定する。
 ステップS321において、フラグis_use_max_delayがtrueにセットされていないと判定された場合、すなわち、フラグis_use_max_delayがfalseにセットされている場合、高精度時刻検出の処理は終了する。
 また、ステップS321において、フラグis_use_max_delayがtrueにセットされていると判定された場合、処理は、ステップS314に進み、以下、図35の場合と同様の処理が行われる。
 すなわち、ステップS314において、高精度時刻差検出部132は、最値検出部111から、最新の最大往復遅延時間(としての変数)delay_maxを取得するとともに、閾値設定部113から、最新の検出閾値DMAXを取得して、処理は、ステップS315に進む。
 ステップS315では、高精度時刻差検出部132は、遅延時間算出部45からの最新の往復遅延時間delayが、最新の最大往復遅延時間delay_maxから最新の検出閾値DMAXを減算した減算値delay_max-DMAXより大であるかどうかを判定する。
 ステップS315において、最新の往復遅延時間delayが、減算値delay_max-DMAXより大であると判定された場合、処理は、ステップS313に進み、高精度時刻差検出部132は、最新の往復遅延時間delayに対する時刻差Tms、すなわち、時刻差算出部43(図8)からの最新の時刻差Tmsを、高精度時刻差として検出し、補正量演算部115に出力して、高精度時刻差検出の処理を終了する。
 また、ステップS315において、最新の往復遅延時間delayが、減算値delay_max-DMAXより大でないと判定された場合、高精度時刻差検出の処理を終了する。
 図38の高精度時刻差検出の処理では、最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minに近い値である場合と、フラグis_use_max_delayがtrueにセットされていて、最新の往復遅延時間delayが、最新の最大往復遅延時間delay_maxに近い値である場合とに、最新の時刻差Tmsが、高精度時刻差として検出され、高精度時刻差検出部132から補正量演算部115に供給される。
 また、最新の往復遅延時間delayが、最新の最小往復遅延時間delay_minに近い値でない場合や、フラグis_use_max_delayがtrueにセットされていても、最新の最大往復遅延時間delay_maxに近い値でない場合には、高精度時刻差検出部132から補正量演算部115に、高精度時刻差は、供給されない。
 図36の高精度補正量算出部102では、図37で説明したように、決定部131において、統計処理に用いられたMサンプルの往復遅延時間の中に、最小往復遅延時間delay_minに比較的近い往復遅延時間delayが存在せず、最大往復遅延時間delay_maxに比較的近い往復遅延時間delayが存在する場合に、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出することが決定され、フラグis_use_max_delayがtureにセットされる。
 そして、フラグis_use_max_delayがtureにセットされている場合には、最小往復遅延時間delay_minに近い往復遅延時間delayに対する時刻差Tmsだけでなく、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsも、高精度時刻差として検出される。
 したがって、ネットワーク30(図7)において、ネットワークスイッチが多段に接続され、その結果、遅延が小さいことがほとんどなく、遅延が大きいことの頻度が高くなった場合であっても、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出することができる。
 なお、図22や及び図36の高精度補正量算出部102では、高精度時刻差の検出に用いる検出閾値DMINやDMAXを、複数としての3つの閾値TH1ないしTH3の中から選択した値に設定することで、検出閾値DMINやDMAXを可変の値としたが、検出閾値DMINやDMAXについては、その他、例えば、統計処理によって得られる往復遅延時間の度数分布を引数とし、検出閾値DMINやDMAXを関数値として出力する関数を用いることにより、可変の値の検出閾値DMINやDMAXを求めることができる。
 また、検出閾値DMINやDMAXとしては、固定の値を採用することができる。
 以下、図36の高精度補正量算出部102において、検出閾値DMIN及びDMAXのうちの、例えば、検出閾値DMAXとして、固定の値を採用する場合の処理について説明する。
 検出閾値DMAXとして、固定の値を採用する場合、図36の高精度補正量算出部102では、最値検出部111において、図23及び図31の最値検出の処理が行われ、最値として、最小往復遅延時間、及び、最大往復遅延時間の両方が検出される。
 さらに、高精度時刻差検出部132では、図38の高精度時刻差検出の処理が行われる。
 また、補正量演算部115では、図28の補正量演算の処理が行われ、高精度補正量出力制御部116では、図29又は図30の出力制御の処理が行われる。
 そして、統計処理部112、閾値設定部113、及び、決定部131では、検出閾値DMAX(及び検出閾値DMIN)として、可変の値を採用する場合と異なる処理が行われる。
 図39は、検出閾値DMAXとして、固定の値を採用する場合の、図36の高精度補正量算出部102の統計処理部112が行う統計処理の例を説明するフローチャートである。
 検出閾値DMAXとして、固定の値を採用する場合、統計処理部112(図36)は、最小往復遅延時間delay_minに近い往復遅延時間delayの度数を求める図25の統計処理、及び、最大往復遅延時間delay_maxに近い往復遅延時間delayの度数を求める図32の統計処理に代えて、図25の統計処理、及び、図39の統計処理を行う。
 なお、固定の値の検出閾値DMAXとしては、図25及び図32で用いた3つの閾値TH1ないしTH3のうちの、例えば、最も大きい閾値TH3を採用することとする。
 図39の統計処理では、ステップS401において、統計処理部112は、最大往復遅延時間delay_maxから、固定の値の検出閾値DMAXとしての閾値TH3の範囲(delay_max-TH3から、delay_maxまでの範囲)内の往復遅延時間delayの度数をカウントする変数delay_max_countを0に初期化し、処理は、ステップS402に進む。
 ステップS402では、統計処理部112は、最値検出部111から、最新の最大往復遅延時間(としての変数)delay_maxを取得して、処理は、ステップS403に進む。
 ステップS403では、統計処理部112は、往復遅延時間(遅延時間サンプル)の数をカウントする変数jを0に初期化して、処理は、ステップS404に進む。
 ステップS404では、統計処理部112は、遅延時間算出部45(図8)からの最新の往復遅延時間delay[i]からjサンプルだけ前(過去)の往復遅延時間delay[i-j]が、最新の最大往復遅延時間delay_maxから閾値TH3を減算した減算値delay_max-TH3以上であるかどうかを判定する。
 ステップS404において、往復遅延時間delay[i-j]が、減算値delay_max-TH3以上であると判定された場合、処理は、ステップS405に進み、統計処理部112は、最新の最大往復遅延時間delay_maxから閾値TH3の範囲内の値(delay_max-TH3からdelay_maxまでの範囲内の値)の往復遅延時間delayの数をカウントする変数delay_max_countを1だけインクリメントして、処理は、ステップS406に進む。
 また、ステップS404において、往復遅延時間delay[i-j]が、減算値delay_max-TH3以上でないと判定された場合、処理は、ステップS406に進み、統計処理部112は、変数jが、統計処理に用いる往復遅延時間delayのサンプルの数Mから1を減算した減算値M-1に等しいかどうかを判定する。
 ステップS406において、変数jが減算値M-1に等しくないと判定された場合、処理は、ステップS407に進み、統計処理部112は、変数jを1だけインクリメントする。そして、処理は、ステップS407からステップS404に戻り、以下、同様の処理が繰り返される。
 また、ステップS406において、変数jが減算値M-1に等しいと判定された場合、すなわち、最新の往復遅延時間delay[i]を含む過去M個の往復遅延時間delay[i-M+1]ないしdelay[i]を対象として、delay_max-TH3からdelay_maxまでの範囲の往復遅延時間delayの度数delay_max_countが求められた場合、統計処理を終了する。
 図40は、検出閾値DMAXとして、固定の値を採用する場合の、図36の高精度補正量算出部102の決定部131が行う決定処理の例を説明するフローチャートである。
 検出閾値DMAXとして、固定の値(閾値TH3)を採用する場合、決定部131(図36)は、図37の決定処理に代えて、図40の決定処理を行う。
 図40の決定処理では、ステップS411において、決定部131は、統計処理部112での最新の統計処理によって得られた往復遅延時間delayの度数delay_min_count[0],delay_min_count[1],delay_min_count[2]、及び、delay_min_count[3]の総和、すなわち、最小往復遅延時間delay_minに比較的近い往復遅延時間delayの度数の総和delay_min_count_tempを求め、処理は、ステップS412に進む。
 ステップS412では、決定部131は、ステップS411で求められた総和delay_min_count_tempと、図39の統計処理で得られた度数delay_max_countとを用い、最小往復遅延時間delay_minに比較的近い往復遅延時間delayの総和delay_min_count_tempが0であり、かつ、最大往復遅延時間delay_maxに比較的近い往復遅延時間delayの度数delay_max_countが、1以上の所定の数としての、例えば、2より大であるかどうかを判定する。
 ステップS412において、総和delay_min_count_tempが0であり、かつ、度数delay_max_countが2より大であると判定された場合、すなわち、統計処理に用いられたMサンプルの往復遅延時間の中に、最小往復遅延時間delay_minに比較的近い往復遅延時間delayが存在せず、最大往復遅延時間delay_maxに比較的近い往復遅延時間delayが存在する場合、処理は、ステップS413に進み、決定部131は、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出することを決定し、フラグis_use_max_delayをtureにセットする。
 そして、決定部131は、フラグis_use_max_delayを、高精度時刻差検出部132に供給して、決定処理を終了する。
 また、ステップS412において、総和delay_min_count_tempが0でないと判定されるか、度数delay_max_countが2より大でないと判定された場合、処理は、ステップS414に進み、決定部131は、最小往復遅延時間delay_minに比較的近い往復遅延時間delayの総和delay_min_count_tempが、1以上の所定の数としての、例えば、2より大であり、かつ、最大往復遅延時間delay_maxに比較的近い往復遅延時間delayの度数delay_max_countが0であるかどうかを判定する。
 ステップS414において、総和delay_min_count_tempが2より大であり、かつ、度数delay_max_countが0であると判定された場合、すなわち、統計処理に用いられたMサンプルの往復遅延時間の中に、最小往復遅延時間delay_minに比較的近い往復遅延時間delayが存在し、最大往復遅延時間delay_maxに比較的近い往復遅延時間delayが存在しない場合、処理は、ステップS415に進み、決定部131は、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsを、高精度時刻差として検出しないことを決定し、フラグis_use_max_delayをfalseにセットする。
 そして、決定部131は、フラグis_use_max_delayを、高精度時刻差検出部132に供給して、決定処理を終了する。
 また、ステップS414において、総和delay_min_count_tempが2より大でないと判定されるか、度数delay_max_countが0でないと判定された場合、処理は、ステップS416に進み、決定部131は、フラグis_use_max_delayを、そのまま維持して、高精度時刻差検出部132に供給し、決定処理を終了する。
 なお、図40の決定処理では、決定部131は、フラグis_use_max_delayを、高精度時刻差検出部132に供給する他、図36に点線で示すように、閾値設定部113にも供給する。
 図41は、検出閾値DMAXとして、固定の値を採用する場合の、図36の高精度補正量算出部102の閾値設定部113が行う閾値設定の処理の例を説明するフローチャートである。
 検出閾値DMAXとして、固定の値(閾値TH3)を採用する場合、閾値設定部113(図36)は、図26及び図33の閾値設定の処理に代えて、図41の閾値設定の処理を行う。
 なお、いまの場合、検出閾値DMAXは、閾値TH3に固定であるため、図41の閾値設定の処理では、検出閾値DMAXは設定されず(設定する必要がなく)、検出閾値DMINだけが設定される。
 すなわち、図41の閾値設定の処理では、ステップS421ないしS425において、図26のステップS151ないしS155とそれぞれ同様の処理が行われ、検出閾値DMINが設定される。
 具体的には、ステップS421において、閾値設定部113は、統計処理部112での最新の統計処理によって得られた往復遅延時間delayの度数delay_min_count[0],delay_min_count[1],delay_min_count[2]、及び、delay_min_count[3]のうちの、1番目に小さい(最も小さい)値の範囲の往復遅延時間delayの度数delay_min_count[0]と2番目に小さい値の範囲の往復遅延時間delayの度数delay_min_count[1]とを加算した度数delay_min_count[0]+delay_min_count[1]が、3番目に小さい値の範囲の往復遅延時間delayの度数delay_min_count[2]よりも大であるかどうかを判定する。
 ステップS421において、度数delay_min_count[0]+delay_min_count[1]が、度数delay_min_count[2]より大であると判定された場合、処理は、ステップS422に進み、閾値設定部113は、検出閾値DMINを、閾値TH1に設定する。
 また、ステップS421において、度数delay_min_count[0]+delay_min_count[1]が、度数delay_min_count[2]より大でないと判定された場合、処理は、ステップS423に進み、閾値設定部113は、3番目に小さい値の範囲の往復遅延時間delayの度数delay_min_count[2]が、4番目に小さい(最も大きい)値の範囲の往復遅延時間delayの度数delay_min_count[3]より大きいかどうかを判定する。
 ステップS423において、度数delay_min_count[2]が、度数delay_min_count[3]より大きいと判定された場合、処理は、ステップS424に進み、閾値設定部113は、検出閾値DMINを、閾値TH2(>TH1)に設定する。
 また、ステップS423において、度数delay_min_count[2]が、度数delay_min_count[3]より大きくないと判定された場合、処理は、ステップS425に進み、閾値設定部113は、検出閾値DMINを、閾値TH3(>TH2)に設定する。
 そして、ステップS422,S424、及び、S425の後、処理は、いずれも、ステップS426に進み、閾値設定部113は、決定部131から供給されるフラグis_use_max_delayがtrueであるかどうかを判定する。
 ステップS426において、フラグis_use_max_delayがtrueでないと判定された場合、すなわち、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsが、高精度時刻差として検出されない場合、閾値設定部113は、ステップS422,S424、又は、S425で設定した検出閾値DMINを、高精度時刻差検出部114に供給して、閾値設定の処理を終了する。
 また、ステップS426において、フラグis_use_max_delayがtrueであると判定された場合、すなわち、最大往復遅延時間delay_maxに近い往復遅延時間delayに対する時刻差Tmsが、高精度時刻差として検出される場合、処理は、ステップS427に進み、閾値設定部113は、検出閾値DMINを、閾値TH1ないしTH3のうちの、例えば、最大の閾値TH3に設定して、高精度時刻差検出部114に供給し、閾値設定の処理を終了する。
 高精度時刻差検出部114では、閾値設定部113で上述のように設定される検出閾値DMINと、固定の値(閾値TH3)の検出閾値DMAXとを用いて、図38の高精度時刻差検出の処理が行われる。
 以上のように、図41の閾値設定の処理では、フラグis_use_max_delayがtrueである場合には、往復遅延時間delayの状況は、最大往復遅延時間delay_maxに比較的近い往復遅延時間delayが存在するが、最小往復遅延時間delay_minに比較的近い往復遅延時間delayが(ほとんど)存在しない状況になっていると推測されるので、最小往復遅延時間delay_minから幾分か離れた往復遅延時間delayに対する時刻差Tmsであっても、高精度時刻差として検出されるように、ステップS427において、検出閾値DMINには、閾値TH1ないしTH3のうちの、最大の閾値TH3が設定される。
 [本技術を適用したコンピュータの説明]
 次に、上述した一連の処理は、ハードウェアにより行うこともできるし、ソフトウェアにより行うこともできる。一連の処理をソフトウェアによって行う場合には、そのソフトウェアを構成するプログラムが、汎用のコンピュータ等にインストールされる。
 そこで、図42は、上述した一連の処理を実行するプログラムがインストールされるコンピュータの一実施の形態の構成例を示している。
 プログラムは、コンピュータに内蔵されている記録媒体としてのハードディスク205やROM203に予め記録しておくことができる。
 あるいはまた、プログラムは、リムーバブル記録媒体211に格納(記録)しておくことができる。このようなリムーバブル記録媒体211は、いわゆるパッケージソフトウエアとして提供することができる。ここで、リムーバブル記録媒体211としては、例えば、フレキシブルディスク、CD-ROM(Compact Disc Read Only Memory),MO(Magneto Optical)ディスク,DVD(Digital Versatile Disc)、磁気ディスク、半導体メモリ等がある。
 なお、プログラムは、上述したようなリムーバブル記録媒体211からコンピュータにインストールする他、通信網や放送網を介して、コンピュータにダウンロードし、内蔵するハードディスク205にインストールすることができる。すなわち、プログラムは、例えば、ダウンロードサイトから、ディジタル衛星放送用の人工衛星を介して、コンピュータに無線で転送したり、LAN(Local Area Network)、インターネットといったネットワークを介して、コンピュータに有線で転送することができる。
 コンピュータは、CPU(Central Processing Unit)202を内蔵しており、CPU202には、バス201を介して、入出力インタフェース210が接続されている。
 CPU202は、入出力インタフェース210を介して、ユーザによって、入力部207が操作等されることにより指令が入力されると、それに従って、ROM(Read Only Memory)203に格納されているプログラムを実行する。あるいは、CPU202は、ハードディスク205に格納されたプログラムを、RAM(Random Access Memory)204にロードして実行する。
 これにより、CPU202は、上述したフローチャートにしたがった処理、あるいは上述したブロック図の構成により行われる処理を行う。そして、CPU202は、その処理結果を、必要に応じて、例えば、入出力インタフェース210を介して、出力部206から出力、あるいは、通信部208から送信、さらには、ハードディスク205に記録等させる。
 なお、入力部207は、キーボードや、マウス、マイク等で構成される。また、出力部206は、LCD(Liquid Crystal Display)やスピーカ等で構成される。
 ここで、本明細書において、コンピュータがプログラムに従って行う処理は、必ずしもフローチャートとして記載された順序に沿って時系列に行われる必要はない。すなわち、コンピュータがプログラムに従って行う処理は、並列的あるいは個別に実行される処理(例えば、並列処理あるいはオブジェクトによる処理)も含む。
 また、プログラムは、1のコンピュータ(プロセッサ)により処理されるものであっても良いし、複数のコンピュータによって分散処理されるものであっても良い。
 さらに、本明細書において、システムとは、複数の構成要素(装置、モジュール(部品)等)の集合を意味し、すべての構成要素が同一筐体中にあるか否かは問わない。したがって、別個の筐体に収納され、ネットワークを介して接続されている複数の装置、及び、1つの筐体の中に複数のモジュールが収納されている1つの装置は、いずれも、システムである。
 なお、本技術の実施の形態は、上述した実施の形態に限定されるものではなく、本技術の要旨を逸脱しない範囲において種々の変更が可能である。
 すなわち、本実施の形態では、時刻の同期をとるためのプロトコルとして、IEEE1588のPTPを採用したが、本技術は、マスタ時刻とスレーブ時刻との時刻差、及び、マスタデバイスとスレーブデバイスとの間の通信の遅延時間delayを何らかの方法で取得することができる、あらゆる場合に適用することができる。
 なお、本技術は、以下の構成をとることができる。
 <1>
 マスタ時刻を含むメッセージを送信するマスタデバイスからネットワークを介して送信されてくる前記メッセージに含まれる前記マスタ時刻と、スレーブ時刻を出力する時刻出力部が出力する前記スレーブ時刻とを用いて求められる、前記マスタ時刻と前記スレーブ時刻との差である時刻差の系列のうちの、注目している注目時刻差を、その注目時刻差を含む周辺の時刻差を用いて平滑化し、平滑化時刻差を出力する平滑化部と、
 前記マスタ時刻と前記スレーブ時刻とを用いて求められる、前記マスタデバイスとの間の通信の遅延時間の系列のうちの、前記注目時刻差に対する前記遅延時間が、前記注目時刻差の平滑化に用いられた前記時刻差に対する前記遅延時間の中の最小値又は最大値である場合に、前記注目時刻差を用いて、前記平滑化時刻差を補正する補正量を求める補正量算出部と、
 前記平滑化時刻差を、前記補正量を用いて補正し、補正平滑化時刻差を出力する平滑化時刻差補正部と
 を備えるデータ処理装置。
 <2>
 前記遅延時間の最小値又は最大値である最値に近い遅延時間に対する時刻差を、精度が高い時刻差である高精度時刻差として検出し、前記高精度時刻差を用いて、前記補正平滑化時刻差を補正する高精度補正量を求める高精度補正量算出部と、
 前記補正平滑化時刻差を、前記高精度補正量を用いて補正し、2回補正平滑化時刻差を出力する補正平滑化時刻差補正部と
 をさらに備える
 <1>に記載のデータ処理装置。
 <3>
 前記高精度補正量算出部は、
  前記遅延時間の最値を検出する最値検出部と、
  前記遅延時間の度数を求める統計処理を行う統計処理部と、
  前記統計処理の結果得られる前記遅延時間の度数に基づいて、前記高精度時刻差の検出に用いる閾値である検出閾値を設定する閾値設定部と、
  前記最値から前記検出閾値の範囲内の前記遅延時間に対する時刻差を、前記高精度時刻差として検出する高精度時刻差検出部と、
  前記高精度時刻差と、前記補正平滑化時刻差とを用いて、前記高精度補正量を求める補正量演算部と
 を有する
 <2>に記載のデータ処理装置。
 <4>
 前記最値検出部は、前記遅延時間の最小値及び最大値のうちの一方、又は、両方を、前記最値として検出する
 <3>に記載のデータ処理装置。
 <5>
 前記補正量が、入力値として供給された後、出力値が、前記入力値に0次ホールドされるように、又は、前記入力値に徐々に近づくように、前記出力値を制御する出力値制御部をさらに備え、
 前記平滑化時刻差補正部は、前記出力値を、前記補正量として用いて、前記平滑化時刻差を、前記補正平滑化時刻差に補正する
 <1>ないし<4>のいずれかに記載のデータ処理装置。
 <6>
 前記補正値のメディアンを求め、前記入力値として、前記出力値制御部に供給するメディアン処理部をさらに備える
 <5>に記載のデータ処理装置。
 <7>
 前記高精度補正量が、入力値として供給された後、出力値が、前記入力値に0次ホールドされるように、又は、前記入力値から0に徐々に近づくように、前記出力値を制御する高精度補正量出力制御部をさらに備え、
 前記補正平滑化時刻差補正部は、前記出力値を、前記高精度補正量として用いて、前記補正平滑化時刻差を、前記2回補正平滑化時刻差に補正する
 <1>ないし<4>のいずれかに記載のデータ処理装置。
 <8>
 前記時刻出力部をさらに備え、
 前記時刻出力部は、前記補正平滑化時刻差を、前記時刻出力部が出力する前記スレーブ時刻の時刻誤差として用いて、前記スレーブ時刻を補正する
 <1>に記載のデータ処理装置。
 <9>
 前記時刻出力部をさらに備え、
 前記時刻出力部は、前記2回補正平滑化時刻差を、前記時刻出力部が出力する前記スレーブ時刻の時刻誤差として用いて、前記スレーブ時刻を補正する
 <1>ないし<4>のいずれかに記載のデータ処理装置。
 <10>
 前記補正量算出部は、前記平滑化時刻差から、前記最小値である前記遅延時間に対する前記時刻差である前記注目時刻差を減算することにより、前記補正量を求め、
 前記平滑化時刻差補正部は、前記注目時刻差についての前記平滑化時刻差から、前記補正量を減算することにより、前記平滑化時刻差を、前記補正平滑化時刻差に補正する
 <1>に記載のデータ処理装置。
 <11>
 前記統計処理の結果得られる前記遅延時間の度数に基づいて、前記遅延時間の最小値に近い遅延時間に対する時刻差の他に、前記遅延時間の最大値に近い遅延時間に対する時刻差を、前記高精度時刻差として検出するか否かを決定する決定部をさらに備え、
 前記高精度時刻差検出部は、
  前記遅延時間の最小値から前記検出閾値の範囲内の前記遅延時間に対する時刻差を、前記高精度時刻差として、少なくとも検出し、
  前記決定部において、前記遅延時間の最大値に近い遅延時間に対する時刻差を、前記高精度時刻差として検出することが決定された場合、前記遅延時間の最大値から前記検出閾値の範囲内の前記遅延時間に対する時刻差をも、前記高精度時刻差として検出する
 <3>に記載のデータ処理装置。
 <12>
 前記閾値設定部は、前記統計処理の結果得られる前記遅延時間の度数に基づいて、前記度数が多い遅延時間が、前記最値から前記検出閾値の範囲内に入るように、前記検出閾値を設定する
 <3>に記載のデータ処理装置。
 <13>
 前記補正量演算部は、前記高精度時刻差から、前記補正平滑化時刻差を減算することにより、前記高精度補正量を求め、
 前記補正平滑化時刻差補正部は、前記補正平滑化時刻差に、前記高精度補正量を加算することにより、前記補正平滑化時刻差を、前記2回補正平滑化時刻差に補正する
 <3>に記載のデータ処理装置。
 <14>
 マスタ時刻を含むメッセージを送信するマスタデバイスからネットワークを介して送信されてくる前記メッセージに含まれる前記マスタ時刻と、スレーブ時刻を出力する時刻出力部が出力する前記スレーブ時刻とを用いて求められる、前記マスタ時刻と前記スレーブ時刻との差である時刻差の系列のうちの、注目している注目時刻差を、その注目時刻差を含む周辺の時刻差を用いて平滑化し、平滑化時刻差を出力し、
 前記マスタ時刻と前記スレーブ時刻とを用いて求められる、前記マスタデバイスとの間の通信の遅延時間の系列のうちの、前記注目時刻差に対する前記遅延時間が、前記注目時刻差の平滑化に用いられた前記時刻差に対する前記遅延時間の中の最小値又は最大値である場合に、前記注目時刻差を用いて、前記平滑化時刻差を補正する補正量を求め、
 前記平滑化時刻差を、前記補正量を用いて補正し、補正平滑化時刻差を出力する
 ステップを含むデータ処理方法。
 <15>
 マスタ時刻を含むメッセージを送信するマスタデバイスからネットワークを介して送信されてくる前記メッセージに含まれる前記マスタ時刻と、スレーブ時刻を出力する時刻出力部が出力する前記スレーブ時刻とを用いて求められる、前記マスタ時刻と前記スレーブ時刻との差である時刻差の系列のうちの、注目している注目時刻差を、その注目時刻差を含む周辺の時刻差を用いて平滑化し、平滑化時刻差を出力する平滑化部と、
 前記マスタ時刻と前記スレーブ時刻とを用いて求められる、前記マスタデバイスとの間の通信の遅延時間の系列のうちの、前記注目時刻差に対する前記遅延時間が、前記注目時刻差の平滑化に用いられた前記時刻差に対する前記遅延時間の中の最小値又は最大値である場合に、前記注目時刻差を用いて、前記平滑化時刻差を補正する補正量を求める補正量算出部と、
 前記平滑化時刻差を、前記補正量を用いて補正し、補正平滑化時刻差を出力する平滑化時刻差補正部と
 して、コンピュータを機能させるためのプログラム。
 10 マスタデバイス, 11 時計部, 12 メッセージ通信部, 20 スレーブデバイス, 21 時計部, 22 メッセージ通信部, 30 ネットワーク, 41 マスタ時刻取得部, 42 スレーブ時刻取得部, 43 時刻差算出部, 44 平滑化部, 45 遅延時間算出部, 46 補正部, 50 時刻出力部, 51 PID制御部, 52 DAC, 53 VCO, 54 RTC, 61 時計部, 71 平滑化部, 72 補正量算出部, 73 出力値制御部, 74 平滑化時刻差補正部, 75 メディアン処理部, 811ないし812N 遅延回路, 821ないし822N+1 乗算器, 831ないし832N 加算器, 911ないし912N 遅延回路, 921ないし922N+1 バッファ, 931ないし932N 遅延回路, 941ないし942N+1 バッファ, 95 補正用時刻差検出部, 96 演算器, 101 補正平滑化時刻差生成部, 102 高精度補正量算出部, 103 補正平滑化時刻差補正部, 111 最値検出部, 112 統計処理部, 113 閾値設定部, 114 高精度時刻差検出部, 115 補正量演算部, 116 高精度補正量出力制御部, 131 決定部, 132 高精度時刻差検出部, 201 バス, 202 CPU, 203 ROM, 204 RAM, 205 ハードディスク, 206 出力部, 207 入力部, 208 通信部, 209 ドライブ, 210 入出力インタフェース, 211 リムーバブル記録媒体

Claims (15)

  1.  マスタ時刻を含むメッセージを送信するマスタデバイスからネットワークを介して送信されてくる前記メッセージに含まれる前記マスタ時刻と、スレーブ時刻を出力する時刻出力部が出力する前記スレーブ時刻とを用いて求められる、前記マスタ時刻と前記スレーブ時刻との差である時刻差の系列のうちの、注目している注目時刻差を、その注目時刻差を含む周辺の時刻差を用いて平滑化し、平滑化時刻差を出力する平滑化部と、
     前記マスタ時刻と前記スレーブ時刻とを用いて求められる、前記マスタデバイスとの間の通信の遅延時間の系列のうちの、前記注目時刻差に対する前記遅延時間が、前記注目時刻差の平滑化に用いられた前記時刻差に対する前記遅延時間の中の最小値又は最大値である場合に、前記注目時刻差を用いて、前記平滑化時刻差を補正する補正量を求める補正量算出部と、
     前記平滑化時刻差を、前記補正量を用いて補正し、補正平滑化時刻差を出力する平滑化時刻差補正部と
     を備えるデータ処理装置。
  2.  前記遅延時間の最小値又は最大値である最値に近い遅延時間に対する時刻差を、精度が高い時刻差である高精度時刻差として検出し、前記高精度時刻差を用いて、前記補正平滑化時刻差を補正する高精度補正量を求める高精度補正量算出部と、
     前記補正平滑化時刻差を、前記高精度補正量を用いて補正し、2回補正平滑化時刻差を出力する補正平滑化時刻差補正部と
     をさらに備える
     請求項1に記載のデータ処理装置。
  3.  前記高精度補正量算出部は、
      前記遅延時間の最値を検出する最値検出部と、
      前記遅延時間の度数を求める統計処理を行う統計処理部と、
      前記統計処理の結果得られる前記遅延時間の度数に基づいて、前記高精度時刻差の検出に用いる閾値である検出閾値を設定する閾値設定部と、
      前記最値から前記検出閾値の範囲内の前記遅延時間に対する時刻差を、前記高精度時刻差として検出する高精度時刻差検出部と、
      前記高精度時刻差と、前記補正平滑化時刻差とを用いて、前記高精度補正量を求める補正量演算部と
     を有する
     請求項2に記載のデータ処理装置。
  4.  前記最値検出部は、前記遅延時間の最小値及び最大値のうちの一方、又は、両方を、前記最値として検出する
     請求項3に記載のデータ処理装置。
  5.  前記補正量が、入力値として供給された後、出力値が、前記入力値に0次ホールドされるように、又は、前記入力値に徐々に近づくように、前記出力値を制御する出力値制御部をさらに備え、
     前記平滑化時刻差補正部は、前記出力値を、前記補正量として用いて、前記平滑化時刻差を、前記補正平滑化時刻差に補正する
     請求項3に記載のデータ処理装置。
  6.  前記補正値のメディアンを求め、前記入力値として、前記出力値制御部に供給するメディアン処理部をさらに備える
     請求項5に記載のデータ処理装置。
  7.  前記高精度補正量が、入力値として供給された後、出力値が、前記入力値に0次ホールドされるように、又は、前記入力値から0に徐々に近づくように、前記出力値を制御する高精度補正量出力制御部をさらに備え、
     前記補正平滑化時刻差補正部は、前記出力値を、前記高精度補正量として用いて、前記補正平滑化時刻差を、前記2回補正平滑化時刻差に補正する
     請求項3に記載のデータ処理装置。
  8.  前記時刻出力部をさらに備え、
     前記時刻出力部は、前記補正平滑化時刻差を、前記時刻出力部が出力する前記スレーブ時刻の時刻誤差として用いて、前記スレーブ時刻を補正する
     請求項1に記載のデータ処理装置。
  9.  前記時刻出力部をさらに備え、
     前記時刻出力部は、前記2回補正平滑化時刻差を、前記時刻出力部が出力する前記スレーブ時刻の時刻誤差として用いて、前記スレーブ時刻を補正する
     請求項2に記載のデータ処理装置。
  10.  前記補正量算出部は、前記平滑化時刻差から、前記最小値である前記遅延時間に対する前記時刻差である前記注目時刻差を減算することにより、前記補正量を求め、
     前記平滑化時刻差補正部は、前記注目時刻差についての前記平滑化時刻差から、前記補正量を減算することにより、前記平滑化時刻差を、前記補正平滑化時刻差に補正する
     請求項1に記載のデータ処理装置。
  11.  前記統計処理の結果得られる前記遅延時間の度数に基づいて、前記遅延時間の最小値に近い遅延時間に対する時刻差の他に、前記遅延時間の最大値に近い遅延時間に対する時刻差を、前記高精度時刻差として検出するか否かを決定する決定部をさらに備え、
     前記高精度時刻差検出部は、
      前記遅延時間の最小値から前記検出閾値の範囲内の前記遅延時間に対する時刻差を、前記高精度時刻差として、少なくとも検出し、
      前記決定部において、前記遅延時間の最大値に近い遅延時間に対する時刻差を、前記高精度時刻差として検出することが決定された場合、前記遅延時間の最大値から前記検出閾値の範囲内の前記遅延時間に対する時刻差をも、前記高精度時刻差として検出する
     請求項3に記載のデータ処理装置。
  12.  前記閾値設定部は、前記統計処理の結果得られる前記遅延時間の度数に基づいて、前記度数が多い遅延時間が、前記最値から前記検出閾値の範囲内に入るように、前記検出閾値を設定する
     請求項3に記載のデータ処理装置。
  13.  前記補正量演算部は、前記高精度時刻差から、前記補正平滑化時刻差を減算することにより、前記高精度補正量を求め、
     前記補正平滑化時刻差補正部は、前記補正平滑化時刻差に、前記高精度補正量を加算することにより、前記補正平滑化時刻差を、前記2回補正平滑化時刻差に補正する
     請求項3に記載のデータ処理装置。
  14.  マスタ時刻を含むメッセージを送信するマスタデバイスからネットワークを介して送信されてくる前記メッセージに含まれる前記マスタ時刻と、スレーブ時刻を出力する時刻出力部が出力する前記スレーブ時刻とを用いて求められる、前記マスタ時刻と前記スレーブ時刻との差である時刻差の系列のうちの、注目している注目時刻差を、その注目時刻差を含む周辺の時刻差を用いて平滑化し、平滑化時刻差を出力し、
     前記マスタ時刻と前記スレーブ時刻とを用いて求められる、前記マスタデバイスとの間の通信の遅延時間の系列のうちの、前記注目時刻差に対する前記遅延時間が、前記注目時刻差の平滑化に用いられた前記時刻差に対する前記遅延時間の中の最小値又は最大値である場合に、前記注目時刻差を用いて、前記平滑化時刻差を補正する補正量を求め、
     前記平滑化時刻差を、前記補正量を用いて補正し、補正平滑化時刻差を出力する
     ステップを含むデータ処理方法。
  15.  マスタ時刻を含むメッセージを送信するマスタデバイスからネットワークを介して送信されてくる前記メッセージに含まれる前記マスタ時刻と、スレーブ時刻を出力する時刻出力部が出力する前記スレーブ時刻とを用いて求められる、前記マスタ時刻と前記スレーブ時刻との差である時刻差の系列のうちの、注目している注目時刻差を、その注目時刻差を含む周辺の時刻差を用いて平滑化し、平滑化時刻差を出力する平滑化部と、
     前記マスタ時刻と前記スレーブ時刻とを用いて求められる、前記マスタデバイスとの間の通信の遅延時間の系列のうちの、前記注目時刻差に対する前記遅延時間が、前記注目時刻差の平滑化に用いられた前記時刻差に対する前記遅延時間の中の最小値又は最大値である場合に、前記注目時刻差を用いて、前記平滑化時刻差を補正する補正量を求める補正量算出部と、
     前記平滑化時刻差を、前記補正量を用いて補正し、補正平滑化時刻差を出力する平滑化時刻差補正部と
     して、コンピュータを機能させるためのプログラム。
PCT/JP2013/085040 2013-01-10 2013-12-27 データ処理装置、データ処理方法、及び、プログラム WO2014109255A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2013-002437 2013-01-10
JP2013002437 2013-01-10

Publications (1)

Publication Number Publication Date
WO2014109255A1 true WO2014109255A1 (ja) 2014-07-17

Family

ID=51166911

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/085040 WO2014109255A1 (ja) 2013-01-10 2013-12-27 データ処理装置、データ処理方法、及び、プログラム

Country Status (1)

Country Link
WO (1) WO2014109255A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10303987A (ja) * 1997-05-01 1998-11-13 Nippon Telegr & Teleph Corp <Ntt> 時刻差測定方法および時計同期装置
JP2004030358A (ja) * 2002-06-27 2004-01-29 Amano Corp 時刻配信サーバ情報収集並びに提供システム
JP2010190635A (ja) * 2009-02-17 2010-09-02 Sony Corp スレーブ装置、スレーブ装置の時刻同期化方法、マスタ装置および電子機器システム
JP2012164222A (ja) * 2011-02-08 2012-08-30 Hitachi Ltd 時刻同期方法及び計算機システム

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10303987A (ja) * 1997-05-01 1998-11-13 Nippon Telegr & Teleph Corp <Ntt> 時刻差測定方法および時計同期装置
JP2004030358A (ja) * 2002-06-27 2004-01-29 Amano Corp 時刻配信サーバ情報収集並びに提供システム
JP2010190635A (ja) * 2009-02-17 2010-09-02 Sony Corp スレーブ装置、スレーブ装置の時刻同期化方法、マスタ装置および電子機器システム
JP2012164222A (ja) * 2011-02-08 2012-08-30 Hitachi Ltd 時刻同期方法及び計算機システム

Similar Documents

Publication Publication Date Title
US11387925B2 (en) System for establishing and maintaining a clock reference indicating one-way latency in a data network
WO2013051446A1 (ja) 時刻制御装置、時刻制御方法、およびプログラム
US9519306B2 (en) Distribution device, distribution system, and distribution method
US9813226B2 (en) Modeling a clock
WO2013051447A1 (ja) 時刻制御装置、時刻制御方法、およびプログラム
KR101242419B1 (ko) 병렬처리 기반의 시각 동기화 장치
US20070086489A1 (en) Method and system for clock skew and offset estimation
KR20170058167A (ko) 시간 동기화 방법 및 그 장치
Ferrari et al. Evaluation of time gateways for synchronization of substation automation systems
US20180145863A1 (en) Methods and systems for determining optimal packets
US9882705B2 (en) Communication apparatus, communication method, and computer readable medium using propagation delay for time synchronization
JP2018116511A (ja) 状態推定器、及びプログラム
WO2014109255A1 (ja) データ処理装置、データ処理方法、及び、プログラム
US10097298B2 (en) Management device, system, and method
JP6615470B2 (ja) 同期制御装置、同期システム及び同期制御方法
US10042384B2 (en) System and methods for computer clock synchronization without frequency error estimation
CN107455006B (zh) 一种同步曝光的方法、装置及终端设备
JP2021093695A (ja) 同期制御装置、同期制御装置の制御方法、およびプログラム
EP3469747A1 (en) Methods and systems for skew estimation
WO2014073293A1 (ja) 通信装置、通信システム、および同期処理方法、並びにプログラム
JP6786770B2 (ja) 通信機能を備えた装置、当該装置を備えたシステム、および、台数探索方法
EP3545634A1 (en) Methods and systems for determining optimal messages
WO2017157459A1 (en) Configuration management in a communication network
CN115333665A (zh) 时钟同步方法及装置、存储介质、电子设备
TW202012954A (zh) 使用視訊影像及光達追蹤物體

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13870879

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13870879

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP