# Time Scale Control Using Dynamic GMDH Neural Network Forecasting Based on Real Measurement Data
## 2 Materials and Methods  
The research related to the weekly forecasting of the Polish Time Scale UTC(PL) using a GMDH-type neural network, based on actual measurement data, is carried out based on the developed forecasting procedure. A block diagram presenting the operation of the forecasting procedure is presented in Figure 1. The procedure begins with checking whether the BIPM has published new UTC-UTC(PL) or UTCr-UTC(PL) data on the FTP server. When new data is found, an appropriate time series is prepared, taking into account this data. The next step is to train the GMDH-type neural network based on the appropriately prepared input data. The selected parameters of the neural network play a key role in the training process. Empirical studies conducted by the author indicated that the greatest impact on the quality of training concerns the selection of the degree of the polynomial activation function of the neuron and the appropriate selection of the ratio of training to testing data. The validation criterion was the option of including the entire data set in the testing process of the GMDH neural network. After the appropriate selection of the parameters, guaranteeing that the smallest value of errors are encountered during the training process, the UTC-UTC(PL) difference values are forecast for the entire upcoming week, the forecast results are sent to the GUM, and the forecasts are included in the process of controlling the Polish Time Scale UTC(PL). One of the most important aspects of dynamic time scale forecasting is the proper preparation of the input data for the GMDH-type neural network. This is the main element of the developed forecasting system, based on the forecasting procedure. The use of a method that allows for the proper preparation of these data, in the form of an appropriate time series, has a very strong impact on the quality of the obtained forecasts. For the purposes of conducting research related to the dynamic forecasting of the Polish Time Scale UTC(PL) based on real measurement data, two time series (TS1 and TS2) have been developed, containing data with a 1-day interval. The TS1 time series preparation method assumes the use of three types of data: the phase time values \(xa(t)\) between the 1 pps (pulse per second) signals from the UTCPL(t) and the atomic clock implementing this scale (\(clock_{PL}\)), the \(xb(t)\) values, which represent the UTC-UTC(k) difference values, and the \(xbr(t)\) values, which represent the UTC-UTC(k) difference values, determined according to the following relationships:  
\[xa(t)=UTC_{PL}(t)-clock_{PL}(t), \tag{1}\]  
\[xb(t)=UTC(t)-UTC_{PL}(t), \tag{2}\]  
\[xbr(t)=UTC(t)-UTC_{PL}(t). \tag{3}\]  
Figure 1: Flowchart of the forecasting procedure [19]. The values of \(xb(t)\) described by the above relationship (2) are based on the differences published in the bulletin \"Circular T\" by the BIPM for the UTC(PL) for the MJD days ending with 4 and 9, i.e., with a 5-day interval. In order to determine the values of these differences for each day, the Hermite polynomial interpolation, available in all versions of MATLAB since 2017 (PCHIP function), is used. Thanks to this function, the number of training data is extended, which provided the required minimum number of input data for the GMDH-type neural network. A failure to provide the required minimum number of training data may adversely affect the process of training the GMDH-type neural network [15]. Determining the data with a 1-day interval also shortened the time period for the input data, which is also of great importance in regard to forecasting the UTC(k) in the case of a clock replacement. The values of the \(xbr(t)\) differences described by relationship (3) are the data determined by the BIPM based on the UTC Rapid scale and that are published every Wednesday at 7:00 p.m. on the FTP server. In order to prepare the final training data for the GMDH-type neural network, the appropriately prepared time series that is used as the input into the GMDH-type neural network is composed of two data subsets.