# A New BDS-2 Satellite Clock Bias Prediction Algorithm with an Improved Exponential Smoothing Method
## 2 Theory of Improved Exponential Smoothing Method Prediction
### Prediction Principle of ES Based on Sliding Window  
Since the smoothing coefficients of the ES method are difficult to determine and the error accumulation is relatively large as the forecast time increases, the algorithm is improved using the idea of sliding windows (SW) in forecasting SCBs. The flow of the SW method for forecasting SCBs is shown in Figure 2. The flow of the improved algorithm using the SW is shown in Figure 3. The process of forecasting the clock bias is divided into \(n\) steps. In each step, the best smoothing coefficient is chosen to reduce the prediction errors. The range of the smoothing coefficient is (0,1). In the first step, to obtain the optimal smoothing coefficient, the interval of (0,1) is divided into 999 parts on average, and the first value is 0.001 and the last value is 0.999. The above TNTF principle is employed in searching for the best smoothing coefficient. The found best smoothing coefficient is then used to develop an ES model to forecast the clock bias with the following length of L1. In the second step, the clock bias forecasted in the first step is used as the fitting sample for the ES model, and then, the best smoothing coefficient can be found employing the same method as in the first step. Based on the found optimal smoothing coefficient, an ES model is established to forecast the clock bias of the following length of L2. Repeat this until the end of the nth step. The final forecast clock bias is the sum of the forecast clock bias for each step. Taken together, the detailed steps for the ES model using the SW (ES + SW) are as follows. The flow of the ES + SW models are depicted in Figure 4.  
Figure 1: Flow chart of the optimization process of the thick near thin far (TNTF) principle.  
Take the first part as an example, and the rest of the parts are similar to the first one.  
Step 1 (parameter initialization). All parameters of the algorithm are initialized.  
Step 2 (searching for the best smoothing coefficient). The interval of (0,1) is divided into 999 parts equally, and the first value is 0.001, and the last value is 0.999. The TNTF principle is adopted to search for the best smoothing coefficient.  
Figure 4: Flow of the ES model using a sliding window.  
Figure 3: Flow chart of exponential smoothing (ES) clock bias prediction using a sliding window.  
Figure 2: Prediction flow chart of the sliding window method.  
Step 3 (modeling and forecasting). An ES model is developed for forecasting based on the searched best smoothing coefficients.  
Step 4 (SW processing). Take the previous steps as an example; in the first step, the forecast is stopped when the length of the forecast reaches L\({}_{1}\). In the second step, the clock bias from the first step forecast is used as the fitting sample for modeling, and the forecast is stopped when the length of the forecast reaches L\({}_{2}\). Repeat until the end of the nth step, and the final complete forecast clock bias sequences are the sum of the clock errors corresponding to L\({}_{1}\) + L\({}_{2}\) +... +L\({}_{n}\).