# Time Scale Control Using Dynamic GMDH Neural Network Forecasting Based on Real Measurement Data
## 2 Materials and Methods
The first one, \(x_{1}(t)\), contains data groups (from 1 to _i_) from day \(t_{0}\) to day \(t_{n}\), which is determined according to the relationship:  
\[x_{1}(t)=xa(t)+xb(t)=UTC(t)-clock_{PL}(t). \tag{4}\]  
Day \(t_{n}\) is the day for which the last value of this time series is known before the date of each publication of the \"Circular T\" bulletin (\(t_{pub}\)). In turn, the second subset, \(x_{2}(t)\), is the supplementation of the TS1 time series with the group of data between days \(t_{n}\) and \(t_{nr}\), which is determined according to the relationship:  
\[x_{2}(t)=xa(t)+xbr(t)=UTCr(t)-clock_{PL}(t). \tag{5}\]  
The differences in regard to \(xbr(i)\) are published every Wednesday on day \(t_{pub}\). This is also the first possible day of the forecast (\(t_{forecast}\)). Every week, after the publication of new values of the \(xbr(t)\), the time series TS1 data are supplemented with new data calculated based on (5). At the time of publication of a new bulletin \"Circular T\", the new data \(i+1\) are determined based on relationship (4), which for the appropriate days replace the previous data determined based on relationship (5). The method of preparing the TS2 time series is very similar to the preparation of the TS1 series. The only difference is that the first group of data consists only of the values of the \(xb(t)\) differences supplemented with the missing values determined by the PCHIP function. The second group of data consists of the \(xbr(t)\) difference values only. The general method of preparing the TS1 and TS2 time series is presented in Figure 2. A detailed description of the preparation of the TS1 and TS2 time series is presented in [19; 22]. Figure 2: General method for preparing TS1 and TS2 time series. The dynamic forecasting of the Polish Time Scale UTC(PL), using actual measurement data, for the Time and Length Department of the GUM, by the IMEI UZ, is conducted every Wednesday, after the publication of the \(xbr(t)\) data by the BIPM, with a 1-day interval for the entire upcoming week (from Wednesday to the following Wednesday). For this purpose, a GMDH-type neural network is used, alongside the GMDH Shell tool, using a previously developed procedure. The first forecast is performed on Wednesday, with a forecast horizon of 3 days. Forecasting is performed for 8 days from the current Wednesday to the following Wednesday. The adoption of such research methodology is based on the fact that the publication of the \(xbr(t)\) data takes place on Wednesday at 19:00. Such a forecasting method has been adopted so that the employees of the Time and Length Department in the Central Office of Measurements can introduce a correction to the UTC(PL) time scale control system on Wednesdays, before the publication of the \(xbr(t)\) data. The process of conducting research related to forecasting the values of differences in the \(xbr(t)\) for the UTC(PL), based on the forecasting procedure, has been described at the beginning of the chapter. In regard to the process of training a GMDH-type neural network, the key factor influencing the quality of the training process is the appropriate selection of the parameters: the ratio of training to testing data, the neuron transition function, and the validation function. The ratio of training to testing data is assumed to be in the range of 70/30 to 80/20, which guarantee the smallest values of training errors to be achieved. In the case of a GMDH-type neural network, the neuron transition function takes the form of a polynomial, the degree of which can be changed. It has been empirically verified that changing the degree of the polynomial from a linear function, through the use of a polynomial, to a quadratic polynomial enables the smallest values of training errors to be achieved. Furthermore, it has been assumed as a validation function that the entire set of input data will be used to test the current topology of the GMDH-type neural network.