Instrumentation & Measurement Magazine 23-5 - 37





   Xi  t   Xi  t   Xi  t   	(12)

	

Causal moving average operator is (13):
Yi  t ,  

	

t

1



 Y  u du	(13)
i

t 

Prediction operator is defined as (14):
  
Xˆ i  t  
 Xi  t    1Yi  t , 1   12 d 12  1  1 	(14)



	

τ1 is averaging time.
Prediction error is defined as (15):
	

e  t , , 1  Xi  t     Xˆ i  t   






  1  Xi  t   

	(15)


 1   1  Xi  t 






Define prediction error RMS as (16):





 S  f   H  j2 f 

RMS e 
t ,τ, 1 

	

xx

2

df 	(16)

0

The transfer function H  j 2 f  is given by (17):
2

	

    
4  1  1  1  sin2  f  2 
	(17)
 
  
  
 
 4  1  1  sin2  f  1   4  1  sin2  f    1 



 





In fact, RMS prediction error is averaged in time domain.
For a fixed time interval τ, all available historical data are used.
The first step is to set the initial parameters: drift parameter d,
averaging time τ1. The second step is to minimize RMS by adjusting the frequency drift parameter d, which is the optimal
estimation of d. The third step is to find the minimum value
of RMS by adjusting the average interval parameter τ1, where
is the optimal estimation of τ1. There is very little interaction
between the two parameters. Therefore, only one or two iterations are necessary to find the optimum values.

Algorithm Implementation and Result
Analysis
The timekeeping system consists of the atomic clock ensemble, measurement and comparison system and atomic time
algorithm. Local atomic time TA (NTSC) in China is generated by atomic clock signals of cesium and hydrogen, which
are measured by a multiplexer and time interval counter, and
then generated by an atomic time algorithm. In this paper,
only the hydrogen maser of the system is used to generate the
time scale.

Algorithm Design
In this paper, a software system based on FORTRAN language is developed to implement the atomic time timescale
algorithm. Fig. 1 is the flow chart of algorithm design. The
August 2020	

Fig. 1. Flow chart of algorithm.

realization of the algorithm is mainly divided into the following steps: reading and setting the initial value of the clock
difference file, optimum estimation of frequency drift parameter d and averaging time τ1, prediction of clock difference
between each clock and paper clock, prediction of weight, estimation of clock difference between reference clock and paper
clock, and prediction of frequency.

Algorithm Implementation and Result Analysis
The original data used in this paper are from three hydrogen
masers in the timekeeping laboratory of the NTSC of the Chinese Academy of Sciences. The clock difference data from May
1 to July 31, 2018 are selected to calculate the time scale of the
exponential filtering method. The parameters of the filter are
set by the above methods, and the basic measurement interval is 1 h. The initial value of clock difference between each
clock and paper clock is chosen as the clock difference relative to UTC at MJD58239. Because the frequency prediction of
the exponential filtering algorithm is based on error estimation theory, the selection of initial value is also very important.
In this experiment, the initial frequency and frequency drift
parameters were determined by quadratic fitting of clock difference data in the last ten days of April 2018. The initial values

IEEE Instrumentation & Measurement Magazine	37



Instrumentation & Measurement Magazine 23-5

Table of Contents for the Digital Edition of Instrumentation & Measurement Magazine 23-5

No label
Instrumentation & Measurement Magazine 23-5 - No label
Instrumentation & Measurement Magazine 23-5 - Cover2
Instrumentation & Measurement Magazine 23-5 - 1
Instrumentation & Measurement Magazine 23-5 - 2
Instrumentation & Measurement Magazine 23-5 - 3
Instrumentation & Measurement Magazine 23-5 - 4
Instrumentation & Measurement Magazine 23-5 - 5
Instrumentation & Measurement Magazine 23-5 - 6
Instrumentation & Measurement Magazine 23-5 - 7
Instrumentation & Measurement Magazine 23-5 - 8
Instrumentation & Measurement Magazine 23-5 - 9
Instrumentation & Measurement Magazine 23-5 - 10
Instrumentation & Measurement Magazine 23-5 - 11
Instrumentation & Measurement Magazine 23-5 - 12
Instrumentation & Measurement Magazine 23-5 - 13
Instrumentation & Measurement Magazine 23-5 - 14
Instrumentation & Measurement Magazine 23-5 - 15
Instrumentation & Measurement Magazine 23-5 - 16
Instrumentation & Measurement Magazine 23-5 - 17
Instrumentation & Measurement Magazine 23-5 - 18
Instrumentation & Measurement Magazine 23-5 - 19
Instrumentation & Measurement Magazine 23-5 - 20
Instrumentation & Measurement Magazine 23-5 - 21
Instrumentation & Measurement Magazine 23-5 - 22
Instrumentation & Measurement Magazine 23-5 - 23
Instrumentation & Measurement Magazine 23-5 - 24
Instrumentation & Measurement Magazine 23-5 - 25
Instrumentation & Measurement Magazine 23-5 - 26
Instrumentation & Measurement Magazine 23-5 - 27
Instrumentation & Measurement Magazine 23-5 - 28
Instrumentation & Measurement Magazine 23-5 - 29
Instrumentation & Measurement Magazine 23-5 - 30
Instrumentation & Measurement Magazine 23-5 - 31
Instrumentation & Measurement Magazine 23-5 - 32
Instrumentation & Measurement Magazine 23-5 - 33
Instrumentation & Measurement Magazine 23-5 - 34
Instrumentation & Measurement Magazine 23-5 - 35
Instrumentation & Measurement Magazine 23-5 - 36
Instrumentation & Measurement Magazine 23-5 - 37
Instrumentation & Measurement Magazine 23-5 - 38
Instrumentation & Measurement Magazine 23-5 - 39
Instrumentation & Measurement Magazine 23-5 - 40
Instrumentation & Measurement Magazine 23-5 - 41
Instrumentation & Measurement Magazine 23-5 - 42
Instrumentation & Measurement Magazine 23-5 - 43
Instrumentation & Measurement Magazine 23-5 - 44
Instrumentation & Measurement Magazine 23-5 - 45
Instrumentation & Measurement Magazine 23-5 - 46
Instrumentation & Measurement Magazine 23-5 - 47
Instrumentation & Measurement Magazine 23-5 - 48
Instrumentation & Measurement Magazine 23-5 - 49
Instrumentation & Measurement Magazine 23-5 - 50
Instrumentation & Measurement Magazine 23-5 - 51
Instrumentation & Measurement Magazine 23-5 - 52
Instrumentation & Measurement Magazine 23-5 - 53
Instrumentation & Measurement Magazine 23-5 - 54
Instrumentation & Measurement Magazine 23-5 - 55
Instrumentation & Measurement Magazine 23-5 - 56
Instrumentation & Measurement Magazine 23-5 - 57
Instrumentation & Measurement Magazine 23-5 - 58
Instrumentation & Measurement Magazine 23-5 - 59
Instrumentation & Measurement Magazine 23-5 - 60
Instrumentation & Measurement Magazine 23-5 - 61
Instrumentation & Measurement Magazine 23-5 - 62
Instrumentation & Measurement Magazine 23-5 - 63
Instrumentation & Measurement Magazine 23-5 - 64
Instrumentation & Measurement Magazine 23-5 - 65
Instrumentation & Measurement Magazine 23-5 - 66
Instrumentation & Measurement Magazine 23-5 - 67
Instrumentation & Measurement Magazine 23-5 - 68
Instrumentation & Measurement Magazine 23-5 - Cover3
Instrumentation & Measurement Magazine 23-5 - Cover4
https://www.nxtbook.com/allen/iamm/26-6
https://www.nxtbook.com/allen/iamm/26-5
https://www.nxtbook.com/allen/iamm/26-4
https://www.nxtbook.com/allen/iamm/26-3
https://www.nxtbook.com/allen/iamm/26-2
https://www.nxtbook.com/allen/iamm/26-1
https://www.nxtbook.com/allen/iamm/25-9
https://www.nxtbook.com/allen/iamm/25-8
https://www.nxtbook.com/allen/iamm/25-7
https://www.nxtbook.com/allen/iamm/25-6
https://www.nxtbook.com/allen/iamm/25-5
https://www.nxtbook.com/allen/iamm/25-4
https://www.nxtbook.com/allen/iamm/25-3
https://www.nxtbook.com/allen/iamm/instrumentation-measurement-magazine-25-2
https://www.nxtbook.com/allen/iamm/25-1
https://www.nxtbook.com/allen/iamm/24-9
https://www.nxtbook.com/allen/iamm/24-7
https://www.nxtbook.com/allen/iamm/24-8
https://www.nxtbook.com/allen/iamm/24-6
https://www.nxtbook.com/allen/iamm/24-5
https://www.nxtbook.com/allen/iamm/24-4
https://www.nxtbook.com/allen/iamm/24-3
https://www.nxtbook.com/allen/iamm/24-2
https://www.nxtbook.com/allen/iamm/24-1
https://www.nxtbook.com/allen/iamm/23-9
https://www.nxtbook.com/allen/iamm/23-8
https://www.nxtbook.com/allen/iamm/23-6
https://www.nxtbook.com/allen/iamm/23-5
https://www.nxtbook.com/allen/iamm/23-2
https://www.nxtbook.com/allen/iamm/23-3
https://www.nxtbook.com/allen/iamm/23-4
https://www.nxtbookmedia.com