1 Introduction

Ionosphere, part of the upper atmosphere of Earth, is the most complex environment and it is crucial for radio signal propagation through the Earth’s atmosphere. Total electron content (TEC) is among the key ionospheric parameters and it is defined by the integral of electron density in a column of 1 m2 cross section along the signal transmission path. It changes depending on earth’s rotation, magnetic and solar activity, diurnal, monthly, seasonal and spatial variation. For example, spatio-temporal changes in the structure of ionosphere are usually calm in mid-latitude regions compared to the equatorial region. Understanding the behavior of spatial and temporal variations in TEC values is important for communication, GPS surveying, navigation and space weather studies (Tulunay et al. 2006; Belehaki et al. 2009; Inyurt et al. 2017). The changes in ionospheric TEC, depending on seasonal variation, have been monitored by many scientists for a long time. Guo et al. (2015) investigated the ionospheric TEC changes between 1999 and 2013 and found that solar activity was the major factor in TEC changes. The changing trend of TEC was determined as −0.08 TECU per yea; however, over the Arctic region this changing trend of TEC showed an increase during these years. Yang et al. (2015) examined GPS-TEC changes between 2000 and 2014, and found that TEC change was significantly dependent on solar activity and magnetic storm effect. Tariku (2015) also studied TEC change in the low-latitude regions with low levels of solar activity between 2008–2009 and the high level of solar activity between 2012-2013. When the seasonal variation of the average VTEC values for each hour was examined, it was found that the maximum and minimum changes were in the March equinox and June solstice periods, respectively. In general, these findings are possible in both cases where the level of solar activity is high and low.

Themens and Jayachandran (2016) used ten GPS receivers of the Canadian High-Arctic Ionospheric Network (CHAIN) to evaluate the performance of the IRI-2007 model. As a result of the study, TEC values, obtained from GPS receivers in the study area, were underestimated especially maxima solar activity conditions during summer and equinox periods. Moreover, it was observed that RMSE values reached up to 14 TECU in these periods. On diurnal timescales, the variations in TEC values were found to be underestimated by the IRI model, during equinox periods, by up to 40% at sub-auroral latitudes and up to 70% in the polar cap region. During the winter, diurnal variations were overestimated by up to 40% in the sub-auroral region and were underestimated within the polarcap by up to 80%.

Jee et al. (2014) examined GPS-TEC variations between the years 1992 and 2010 including the last two solar minimum periods through the TOPEX and JASON-1 satellites. Although global daily mean TEC maps showed that TEC differences were negligible between the two solar minimum periods, systematic differences were observed between −30% and +50% depending on local time, latitude and season. Deviations mainly stemmed from the relative effect of reduced solar EUV production and reduced recombination rate because of the thermospheric changes during the last solar minimum period. Therefore, ionosphere should be modeled precisely to monitor the changes caused by these factors effectively. Various approaches have been revealed for the understanding of this complex layer. As stated above, the ionosphere is affected by many factors which should be considered in ionospheric modeling.

In recent years, artificial neural network (ANN) has become an alternative method for modeling and forecasting ionospheric TEC precisely (Hernandez-Pajares et al. 1997; Cander 1998; Maruyama 2008; Habarulema et al. 2007; Huang and Yuan 2014). ANN is one of the choices to fill the gap and capture regional and global ionosphere modeling using historical data of ionospheric TEC. Song et al. (2018) showed that regional prediction of TEC was created using neural networks (NNs) over China. 19 input parameters which define causes of ionospheric variations were utilized for modeling ionosphere using 43 permanent GPS receiver. As a result of the study, TEC values obtained from the NN model presented good correlation with IRI-TEC and they suggested that NN could be effectively used as an alternative method for modeling the ionosphere. Tebabal et al. (2018) studied on local TEC modeling and forecasting using NN. They designed NN using geomagnetic storm index, solar activity index, time of day and day of the year for modeling GPS-TEC obtained from two GPS receivers located in low and mid-latitude regions between the period 2011 and 2014. The model prediction accuracy was evaluated for the data of 2015. They stated that the model accuracy was well for both stations. In the other part of the study, there was an attempt to forecast one day ahead TEC for both stations. It was stated that the NN method might be applied for the study of forecasting TEC values. Habarulema et al. (2007) utilized the NN method for South African GPS derived TEC using seasonal variation, diurnal variation, sunspot number and magnetic activity index. Predicted TEC values were compared with the TEC obtained from IRI-2001 and GPS-TEC. As a conclusion, NN predicted GPS-TEC more accurate than IRI-TEC at South African, but it was also stated that more GPS data was required for representing the seasonal variation of ionosphere accurately.

In this study, we utilized an ANN method to model and predict the seasonal ionospheric variations in TEC values over ANKR station in Turkey. The TEC values for the ANKR station were obtained for each season using the Ciraolo et al. (2007) method and these values were used as reference data in ANN. In the ANN model, TEC values were considered as 80% training, 10% testing and 10% prediction for each season. In Turkey, each season lasts 3 months (almost 90 or 92 days). Thus, in each season, 72 days (80%), 9 (10%) days and 9 (10%) days’ data were used in training, testing and prediction processes, respectively. Besides, ANN was constructed using the parameters, namely Day of Year (DOY), hour, F107 cm index (solar activity), Kp index and DsT index (magnetic storm index), as inputs. Theoretical backgrounds of TEC retrieval and ANN method are presented in the following sections.

2 TEC observation

GPS has become an important tool to monitor in real or near-real time ionosphere model due to the high popularity of GPS TEC observations for ionosphere research. Thus, the GPS-TEC acquisition method has also gained considerable importance. A signal from the satellite is exposed to many effects until it reaches the receiver. The ionospheric effect can be identified by the Eqs. (1), (2), and (3) which are used for GPS code and phase measurements.

$$\begin{aligned} L_{1,\mathrm{arc}} =& L_{1} - L_{2} = I_{1} - I_{2} +c ( \tau _{R1} - \tau _{R2} ) \\ &{}+c ( \tau _{S1} - \tau _{S2} ) + \frac{c}{f_{1}} N_{1,\mathrm{arc}} - \frac{c}{f_{2}} N_{2,\mathrm{arc}} +\varepsilon \end{aligned}$$
(1)

\(L_{1,\mathrm{arc}}\) is the ionosphere variable. Sub-indices (1,2) shows GPS carriers. \(L_{1}\) and \(L_{2}\) refer to other sub-indices, arc indicates each continuous arc of carrier phase observations, \(c\) is the speed of the light in vacuum, \(I_{1}\) and \(I_{2}\) ionospheric delay in length units at \(f_{1} =1575.42\ \mbox{MHz}\) and \(f_{2} =1227.60\ \mbox{MHz}\); \(\tau _{R}\), \(\tau _{S}\) are receiver and satellite hardware biases; \(N_{1}\), \(N_{2}\) are integer carrier phase ambiguities; \(\varepsilon \) is observational noise along the with multipath. The ionospheric effect depends on the frequency and this dependency can be explained by Eq. (2).

$$ I=\alpha \frac{\mathrm{STEC}}{f^{2}} $$
(2)
$$ \mathrm{STEC}= L_{1,\mathrm{arc}} - B_{R} - B_{S} - C_{\mathrm{arc}} - \varepsilon _{L} $$
(3)

Where \(B_{R} = \frac{c}{\beta } (\tau _{R1} - \tau _{R2} )\) and \(B_{ S} = \frac{c}{\beta } ( \tau _{S1} -\tau _{S2} )\) are satellite and receiver differential code biases for carrier-phase observations. \(\beta =\alpha \stackrel{\approx}{(\frac{1}{f_{1}^{2}}-\frac{1}{f_{2}^{2}} )} \sim 0.1\mbox{ m}/\mbox{TECU}\) is a constant value used to convert from meters to TECU. \(C_{\mathrm{arc}} = \frac{c}{\beta f_{1}} N_{1,\mathrm{arc}} - \frac{c}{\beta f_{2}} N_{2,\mathrm{arc}}\) is the carrier phase ambiguities in ionospheric observable, \(\varepsilon _{L} = \frac{\varepsilon }{\beta }\) is the effect of noise and multipath.

STEC is the integral of the electron density path between satellite and receiver calculated from the differential delays of pseudo-ranges and phases. STEC is converted to Vertical total electron content (VTEC) using mapping function single layer model (SLM) which assumes that electron density field is spherically symmetric. In order to obtain VTEC observations from the GPS observations, we have processed RINEX files according to STEC calibration method (Ciraolo et al. 2007) with one-hour temporal resolution.

3 Artificial neural networks (ANN) method

Artificial neural networks (ANNs) are biologically designed computational model constructed of many simple interconnected elements called neurons associated with coefficients which constitute the neural structure (Kisi et al. 2015). They have been successfully used in many scientific fields by utilizing the large-scale parallel local processing and dispersed storage features available in the human brain (Al-Shammari et al. 2016; Samadianfard et al. 2018). The ANNs can recognize the underlying relationships between input and output procedures and form a model among them (Kisi et al. 2016). They are very effective in modeling and simulating linear and nonlinear systems (Bilgili 2010; Bilgili et al. 2013; Samadianfard et al. 2018).

In recent years, the ANNs have become useful and competent modeling tools, especially for characterization processes that are difficult to identify through physically or statistically determined equations (Samadianfard et al. 2018). Various types of ANNs with different structures and different learning algorithms can be developed in modeling and simulating linear and nonlinear systems. The more common and commonly used architectures cover multi-layer perceptron feed-forward networks (MLP) that are trained using back-propagation (BP) training algorithms. Figure 1 presents a three-layered ANN which comprises layers \(i\), \(j\) and \(k\), with the weights \(W _{ij}\) and \(W _{jk}\). As seen in this figure, an MLP structure consists of an input layer that includes input variables, hidden layer(s), and an output layer that includes output variable(s) (Kisi et al. 2016). In the structure of artificial neural networks, each neuron has an adjustable weight factor (w) and bias (b). Variables (inputs) from the input layer of the network are multiplied by connection weights and added by the biases. This situation results in the collection of variables in the hidden layer of the network. The adjusted parameters are then passed through an activation (transfer) function to obtain the output for this neuron. The outputs produced from the first hidden layer become the inputs to the output layer of the network (Kisi et al. 2015). Randomly assigned initial weights are corrected in the training process in which the model outputs are compared with the measured outputs and errors are back-propagated, and the final weights are calculated by minimizing the errors (Mansouri et al. 2016).

Fig. 1
figure 1

A three-layered ANN structure (Mansouri et al. 2016)

In the second and third layers, each neuron receives the \(x\) input value calculated by the weighted sum of the outputs from the previous layer. For example, \(y\) in the second layer \(j\) can be calculated as (Mansouri et al. 2016):

$$ y_{pj} = \sum_{i=1}^{I} W_{ij} O_{pi} + \theta_{j} $$
(4)

where \(\theta _{j}\) is the bias for neuronj, \(O _{pi}\) the \(i\)th output of the previous layer, \(W _{ij}\) the weights between the first and second layers. The \(y\) value is passed through a nonlinear activation function and an output \(f (y)\) is obtained from each neuron in the second and third layers. The commonly used activation function (logistic function) is expressed as follows (Mansouri et al. 2016):

$$ f(y)= \frac{1}{1+ \mathrm{e}^{-y}} $$
(5)

After the training process, the assimilation of the network can be seen as the output. The most appropriate learning algorithm should be adopted to reduce errors in the training process. The learning algorithms for an MLP model are based on thee BP technique. The main purpose of the BP method is to reduce the number of network errors that can be calculated (Wang et al. 2016).

$$ \mathrm{e}=0.5 \sum_{k=1}^{N} (o_{k} - t_{k})^{2} $$
(6)

where \(N\) indicates the number of processors, \(o_{k}\) denotes the network output in the \(k\)th processor and \(t _{k}\) is the target value.

Different training algorithms have been applied to minimize the error function, but the most widely used training algorithms are the back-propagation algorithm. In this paper, the Levenberg Marquardt (LM) algorithm was chosen as the training process (Kisi et al. 2016). In BP, optimization of the weights and biases is achieved through backward propagation of the error during the training process. With the ANN, the input and output values in the training data set are compared. Thus, the values of the processing units are changed to reduce the difference between the predicted and the target values. The error vector used to set network weights and biases is generated by the difference between the predicted and target values. Several algorithms, such as Resilient Propagation (RP) and Levenberg-Marquardt (LM), are used for training ANNs by considering BP (Kisi et al. 2015). The network topology is composed of neurons associated with links and commonly structured in a number of layers. The network topology is made up of neurons associated with the connections and usually structured in several layers. Weighted input from the previous layer is received and the outputs are then processed by each layer node with a transfer function. Since the activation function is a sigmoid, the data is usually scaled to lie within a constant range between 0 and 1 (Samadianfard et al. 2018).

Identification of an appropriate architecture for a neural network for a certain problem is a necessary factor since the network topology fully affects the complexity of calculations. In the present paper, the number of hidden neurons is determined by different trials. The trial and error technique starts with two hidden neurons at first. Then, the number of neurons is increased by 1 to 20 in each trial. The available data is divided into two sets of training and testing and this technique is continued until a significant increase in the reduction of the estimation error is achieved. The model is then validated by investigating the accuracy of the test data set. Thus, the structure with the minimum estimation error is determined as the resultant ANN model (Samadianfard et al. 2018).

4 Statistical metrics for performance evaluation

In this study, Root Mean Square Error (RMSE), and correlation coefficient (\(R\)) were used as statistical metrics for evaluating the performance of ANN models. The RMSE and \(R\) can be calculated as follows:

$$ \mathrm{RMSE}= \sqrt{\frac{1}{N} \sum_{j=1}^{N} ( Y_{\mathrm{measured}\ j} - \mathrm{Y} _{\mathrm{modeled}\ j} )^{2}} $$
(7)
$$\begin{aligned} R= {\begin{aligned}[c]\frac{\sum ( Y_{\mathrm{measured}\ j} - \overline{Y}_{\mathrm{measured}\ j}) (Y_{\mathrm{modeled}\ j} - \overline{Y}_{\mathrm{modeled}\ j})}{\sqrt{\sum ( Y_{\mathrm{measured}\ j} - \overline{Y}_{\mathrm{measured}\ j})^{2} \sum (Y_{\mathrm{modeled}\ j} - \overline{Y}_{\mathrm{modeled}\ j})^{2}}}\end{aligned}} \end{aligned}$$
(8)

where \(N\) is the number of the data set, and \(Y_{\mathrm{measured}\ j}\) and \(Y_{\mathrm{modeled}\ j}\) are the measured and modeled TEC values, respectively. Besides, \(\overline{Y}_{\mathrm{measured}\ j}\) and \(\overline{Y}_{\mathrm{modeled}\ j} \) represent the mean value of measured and modeled TEC values, respectively.

5 Modeling and performance evaluation

The performance of ANN mainly depends on the network structure setting. Therefore, parameters which affect ionosphere should be determined carefully. The ionosphere is mainly affected by day-to-day, the hour of the day, solar activity and magnetic storm. In this study, we constructed an ANN with 5 input layers and 5 hidden layers to model the TEC variation for each season. Input parameters were defined as DOY, hour, F107 cm index (solar activity), Kp index and DsT index (magnetic storm index). To implement our ANN method, training, testing and prediction data sets were arranged as 80%, 10% and 10% for all seasons. After training and testing the data sets with ANN, the weights and biases for hidden and final output layers were extracted and presented in Table 1. Then, the mathematical models for all seasons were generated using these weights as seen in Table 2. In addition, Fig. 2 shows the structure of the ANN used in this study and it gives information about how the mathematical equations were extracted using the weights and biases in Table 1.

Fig. 2
figure 2

Structure of ANN Method used

Table 1 Weights used in equations
Table 2 Mathematical equations of ANN models for all seasons

Training, testing and prediction results of ANN for all seasons were presented in Fig. 3 in order to reveal the performances of the ANN method. Considering the training results, ANN models for summer and autumn had higher accuracies with RMSE 2.50 TECU and 2.67 TECU, respectively, than the models acquired for spring and winter. For all seasons, according to the derived results of the ANN method, based on the training data set, the RMSE ranged from 2.50 TECU to 4.22 TECU, while the corresponding range of 2.54–4.11 was obtained based on the testing data set. For the testing data set, the highest ANN accuracy was retrieved for autumn data set with RMSE 2.54 TECU whereas the lowest accuracy was obtained from spring data set with RMSE 4.11 TECU. After obtaining training and testing results, ANN models for all seasons were extracted using the weights in Table 1 and all models were presented in Table 2. Based on the models in Table 2, TEC values for the rest of the seasons (9 days) were predicted and the results were evaluated as seen in Fig. 3. Considering the prediction results, ANN predicted TEC values in winter and autumn better than summer and spring with RMSE 3.92 TECU and 3.97 TECU, respectively. The testing results showed that the ANN method performed the highest accuracy for autumn data set; however, the prediction results revealed that the highest accuracy was obtained from winter data set. For the prediction results, the \(R\) value of winter data set (0.74) was lower than the autumn data set (0.88) while the RMSE values were opposite. This situation is most probably associated with the accuracy and precision of the data sets. For autumn data set, the precision between the predicted TEC and real TEC was high; however, the accuracy of the results was low, and the opposite situation existed for the predicted winter data set. Moreover, it was observed that ANN models overestimated TEC values while predicting for spring, summer and autumn data sets as seen in Fig. 3.

Fig. 3
figure 3

Training, Testing and prediction results for each analyzed season

6 Discussion and conclusion

Watthanasangmechai et al. (2012) carried out the neural network (NN) application for predicting TEC values in Thailand. Input parameters were defined as DOY, F10.7 cm and hour for period 2005–2009. In order to determine the performance of the NN, predicted TEC was compared with GPS-TEC and IRI-2007 data using RMSE. Results showed that the proposed NN can predict TEC quite well over Thailand. Tulasi Ram et al. (2018) applied ANN to obtain local ionosphere model over low (Armi GPS station) and mid-latitude (Ebre GPS station) locations and compared the results with GPS-TEC. Their testing results presented the RMSE as 6.003 TECU and 4.214 TECU, respectively. ANN model had a good agreement for both stations located in low and mid-latitude regions. Moreover, they also predicted 1 h ahead of one day TEC and they reached promising results.

This work was carried out to model and predict seasonal ionospheric variations at ANKR station (Turkey) in 2015 using the ANN method. The parameters (F10.7 cm, DsT, Kp, DOY, hour) which impact the TEC data were taken as the ANN inputs. Training, testing and predicted TEC data were set as 80%, 10% and 10%, respectively. ANN models for summer and autumn data showed better performance with RMSE 2.50 TECU and 2.67 TECU compared to spring and winter months according to training results. Moreover, RMSE ranged from 2.50 TECU to 4.22 TECU with regard to all training results. Our testing RMSE results showed changes between 2.54 TECU and 4.11 TECU. When these results were compared to the study performed by Tulasi Ram et al. (2018), it was clear that we obtained better testing results in our case study.

ANN’s accuracy demonstrated the best performance for autumn season with RMSE 2.54 TECU and the worst performance in spring season with RMSE 4.11 TECU for testing data. Considering the prediction results, it was observed that ANN gave better performance in winter and autumn than summer and spring with RMSE 3.92 TECU and 3.97 TECU, respectively. However, for the prediction results, the \(R\) value of winter data set (0.74) was lower than the autumn data set (0.88) while the RMSE values were opposite. For autumn data set, the precision between the predicted TEC and real TEC was high; however, the accuracy of the results was low, and the opposite situation existed for the predicted winter data set. Moreover, it was observed that ANN models overestimated TEC values while predicting for spring, summer and autumn data sets. As a conclusion, considering all results, it was revealed that seasonal ionospheric modeling and predicting could be successfully achieved using the ANN method.