Prediction of geomagnetic indexes with the help of artificial neural networks

The results of prediction of geomagnetic indexes characterizing the state of the Earth's magnetosphere obtained with the help of artificial neural networks (ANN) for various prediction horizons are presented. The forecasts are based on multivariate time series including the values of the geomagnetic indices themselves, as well as data about the parameters of solar wind and interplanetary magnetic field, during several latest hours.


Introduction
The Earth's magnetosphere is one of the key space environment domains affected by solar wind (SW).Magnetic storms are one of the main manifestations of space weather.The term "space weather" is now accepted to understand the processes and phenomena occurring at the Sun, in the solar wind, magnetosphere and ionosphere of the Earth, which can influence the operation of airborne and groundbased technological systems, as well as the wellbeing and health of people.Strong magnetic storms can cause disturbances in the operation of telegraph lines and radio communications, pipelines, power lines and power networks [1].
Space weather effects upon the nearEarth environment are due to dynamic changes in the "Sun -solar wind -Earth" chain.Experimental studies show that geomagnetic storms have a significant impact on the nearEarth radiation environment, because after them the flux of the relativistic electrons of Outer Radiation Belt of the Earth usually increases for an order of magnitude or more (e.g.[2,3] and references therein).Extremely intense flux of electrons can disrupt operation of the electronic chips of equipment located on board spacecraft (e.g., [4]).
The main sources of disturbances of the Earth's magnetosphere are the coronal mass ejections, reaching the Earth's orbit, and highspeed streams of SW.A necessary (and perhaps a sufficient) condition for the emergence of magnetic storms is the presence of the south (negative) zcomponent of the interplanetary magnetic field (IMF Bz), which enables the transfer of energy from the SW into the Earth's magnetosphere [5].So, for shortterm prediction it is especially important to have operative information about the values of SW and IMF parameters.
The level of geomagnetic disturbances is usually estimated using geomagnetic indices Dst, Kp, Ap, AEAL (e.g.[1]).The Dst variation (Disturbance Stormtime variation) is an index of magnetic activity derived from the network of nearequatorial geomagnetic observatories that measures the intensity of the globally symmetrical equatorial electrojet (the "ring current").It has been calculated at the World Data Center WDCC2 at Kyoto, Japan (Geomagnetic Equatorial Dst index Home Page, http://wdc.kugi.kyotou.ac.jp/dstdir/index.html)since the International Geophysical Year, 1957, using data from four observatories at low to midlatitudes; its hourly values are available online.The planetary 3hourrange index Kp is the mean standardized Kindex from 13 geomagnetic observatories between 44 degrees and 60 degrees northern and southern geomagnetic latitude.The scale is 0 to 9 expressed in thirds of a unit, e.g. 5 is 4 2/3, 5 is 5 and 5+ is 5 1/3.The 3hourly Ap (equivalent range) index is derived from the Kp index.The global index Kp and derivative of the equivalent amplitude Ap are used to estimate the geomagnetic activity in the auroral zone as a whole.
There are several different methods used to predict Dst index.For example, Space Research Institute from Russia provides an advance warning about the geomagnetic storm magnitude: realtime predictions of the geomagnetic storm magnitude are updated every hour and are published at http://spaceweather.ru [6].The project of University of California, Berkeley (http://sprg.ssl.berkeley.edu/dst_index/welcome.html) produces a prediction of Dst index one hour ahead using data from ACE spacecraft, based on the modification of the empirical formula of Burton [7], using the same method as the above mentioned studies in the Space Research Institute.The Swedish Space Weather Centre (http://src.irf.se/en/forecasts/)predicts the next hourly value of the Dst index -one hour forward in relation to the last entered data -using the recurrent Elman neural network.The project WINDMI RealTime Dst and AL indices provides the Dst prediction, which is performed using a physical model based on the calculation of ring currents in the magnetosphereionosphere system, and which also uses as input the data from the ACE spacecraft [8].A modern model used to predict the Dst index one hour ahead proposed in [9] is based on artificial neural networks (ANN) combined with an analytical model of the SW-Earth's magnetosphere interaction.
The authors of this paper have their own experience of the Dst index prediction using scientific models based on ANN technology [1012], as well as experience of using adaptive (including ANN) methods for prediction of electrons flux in the outer radiation belt of the Earth [13].It was shown that the best quality of the Dstindex forecast is achieved when constructing a neural network model that uses both the history of the Dst index and the parameters of the solar wind (its speed) and IMF (Bz component) as input data [10].The website of the Space Weather Analysis Center at SINP MSU provides online prediction of Dst index 0.51.5 hours ahead by the parameters of SW and IMF measured by the ACE spacecraft using ANN (http://swx.sinp.msu.ru/models/dst.php).
However, one of the most urgent tasks of forecasting is forecast not for hours, but for a longer period, at least for the day ahead.One of the possible options is the transition from the forecast of the hourly values of Kp and Dst to the forecast of daily average and maximum values for the day.
The present paper is devoted to the comparison of the results of predicting the geomagnetic indices Dst, Kp and Ap with different horizons of the forecast among each other and with trivial models.

Data Sources and Preparation
The input data usually used for Dst index prediction are the parameters of SW plasma and of IMF, measured at the Earth's orbit by available spacecraft, and the values of Dst index itself.The data used in this study were obtained onboard ACE (Advanced Composition Explorer) spacecraft (http://www.srl.caltech.edu/ACE).
Time series (TS) of hourly values of the following physical quantities were used as input for the neural networks: a) SW parameters in Lagrange point L1 between the Earth and the Sun: SW speed v (measured in km/s) and SW protons density nP (measured in cm 3 ).b) IMF vector parameters in the same Lagrange point L1 (measured in nT): Bx, By, Bz (IMF components in GSM system), and B magnitude (IMF modulus).c) Equatorial geomagnetic index Dst (measured in nT).
The specific sources of data are listed elsewhere [12].
To account for possible daily and yearly variations of the Dst index, TS of sine and cosine values with daily and yearly period were also used as input data.Delay embedding of all TS for 24 hour depth was used to account for the previous history of input features.
In the forecasting, the SW and IMF data from the ACE (Advanced Composition Explorer), located at the Lagrange L1 point obtained by the SWEPAM and MAG instruments, were used http://www.srl.caltech.edu/ACE/ASC/.We used not preprocessed and cleanedup data of the second level, intended for scientific research, but operational data.This is due to the fact that the forecasting system being developed is designed to work in an online mode, in which the quality of the received data corresponds to the operational data.
Due to the nature of the data transmitted from the spacecraft, there are a significant number of gaps in them.Delay embedding significantly increases the negative influence of data gaps on data volume.Therefore, in this study we used filling of gaps 12 or less hours long by linear interpolation (for time moments when the gap is already over) or by extrapolation of the latest known value.Such method of gap filling is based on the fact that rapid changes are not typical for virtually all kinds of data used.Also, there is no reason for use of more sophisticated estimates.
As the working array, the data since October 22, 1997 (the beginning of data receipt from ACE) until the end of 2016 was used.After delay embedding, the working array was divided into training, validation and examination datasets.The training set was used to adjust the weights during ANN training, the validation set for periodic validation in the process of training in order to prevent overtraining, the examination set for independent evaluation of the results.The data from November 1997 till the end of 2009 was used for the training and validation sets, to which it was randomly split at the ratio of 75% to 25%.The data for 20102016 was used as the examination set.

Architecture and parameters of ANN
The ANN architecture used in the present study was the multilayer perceptron (MLP).For all neural network models the results of which are presented in this paper, a multilayer perceptron with a single hidden layer of 16 neurons was used.Previous studies have shown that using more layers and/or neurons does not lead to better predictive results.Logistic transfer function was used for all neurons.ANN was trained with the error backpropagation algorithm with learning rate of 0.01 and moment of 0.5.Training was terminated when during 500 epochs the result of network operation on the validation set did not improve.
For each model, 5 networks with various sets of initial weights were trained, their answers were averaged, and the assessments of the quality of the model were considered for the averaged result.This approach means using the simplest committee of homogeneous predictive models.
To construct neural network models for daily values, several architectures of neural networks were used in this study, including the multilayer perceptron (MLP) and the general regression neural networks (GRNN).Statistical indexes of the quality of the constructed models for different architectures and learning algorithms turned out to be approximately the same.For predictions of the daily average values, the results obtained using NeuroShell Predictor software from the American company Ward Systems Group, Inc. [14] will be presented below.This package uses the original amorphous neural network architecture TurboProp2 based on the wellknown cascade correlation algorithm [15], which adaptively selects the optimal complexity and optimal structure of connections among neurons in the process of learning.This architecture is characterized by extremely fast learning compared to other architectures, with a comparable quality of results.
All the parameters of the neural networks during the computational experiments were fixed, as well as the separation of data patterns between the training sample (from November 1997 to the end of 2009) and the examination set (independent data, from start of 2010 to the end of 2016), which was used to compare the quality of the obtained neural network models.Only the sets of variables the values of which were used as input data were changed, which permits us to state that the observed effects are related exclusively to which physical variables and with what time delays affect the formation of the daily average value of the geomagnetic indexes.

Results and discussion
To assess and compare the quality of models, the following statistical indexes characterizing the deviation of the prediction from the real values of the predicted quantities were used in this study: the multiple determination coefficient R 2 (R squared), the root mean squared error (RMSE), the correlation coefficient(r).Figures 1 and 2 show that the quality of ANN prediction, as expected, decreases with increasing prediction horizon for both geomagnetic indexes.It can be seen that sharper decrease is observed for Kp.If we compare the results obtained for geomagnetic coefficients for different horizons with the same dependence for the prediction of the electron fluxes of the outer Earth's Radiation belt (ERB) [13], we see that the quality of the electron flux prediction decreases with prediction horizon increasing from 1 to 12 hours slower than that for the predictions of Dst and Kp.This fact allows suggesting that the characteristic time for the development of processes in the Earth's magnetosphere that affect the electron flux of ERB is much larger than the characteristic time of the processes of development of a geomagnetic disturbance.
To confirm this hypothesis, one more goal of this paper was to obtain predictions for one day ahead for the daily average values of Kp and Ap indices, as well as for the daily maximum of the Dst amplitude (since the average daily value of the Dstindex has no physical meaning).
Table 1 displays the values of the same statistical indexes as were shown in Fig. 1,2the coefficient of multiple determination R 2 , the root-mean-square error RMSE and the correlation coefficient r, obtained for the predictions of daily average geomagnetic indices Kp•10 and Ap, and of the Dst index daily maximum amplitude one day ahead, obtained with the help of the ANN model and the trivial model, which repeats the value measured for the previous day ("tomorrow as today").From Table 1 it can be seen that best predicted is daily average Kp index, and worst of all, the daily average Ap index.The ANN models give better results than the trivial models.This is especially clear for R 2 .Since the daily average Kpindex is a generally accepted index of the daily state of the Earth's magnetosphere, further attempts to improve the prediction have been made for it.Figures 3 and 4 show examples of the time series of the daily average Kp index (multiplied by 10), measured and predicted one day ahead by two different ANNs, from April 30 to September 2, 2015, and from May 9 to July 31, 2016, respectively.To construct the neural network model ANN1, the following 82 input features were used: sine and cosine values with one year period, current and prior values for the preceding 7 days ("rectangular" embedding of the multivariate time series) for the following quantities: daily minimum Dst index value, daily average and daily maximum Kp index values, daily average Ap index value, daily maximum and daily average values of the modulus of the IMF vector |B|, daily maximum absolute value of the IMF Bz component in the GSM system, daily average and daily maximum values of SW velocity v, and daily maximum SW density n p .For the ANN2 model, the data was extended with the values of the same quantities, obtained at the previous turn of the Sun, 25, 26, and 27 days ago (to take into account the recurrence of solar wind fluxes from coronal holes).Figures 3 and 4 show that taking into account the data from the preceding rotation of the Sun brought some improvement, although it was not very significant.Further attempts to improve the prediction by adding data on the sunspot number (with the help of this it was planned to indirectly take into account the influence of the coronal mass ejections) and the ULF index of the IMF, did not lead to any noticeable extra improvement.The comparison of Figures 3 and 4 also shows that there is no clear dependence of the prediction quality on the phase of the solar activity cycle for the periods under study.

Conclusion
The results of prediction of geomagnetic indexes Dst and Kp obtained with the help of artificial neural networks (ANN) for various prediction horizons are presented.Forecasting of the hourly values of Dst and Kp as well as of the average daily values of these indices is based on the history of the values of the indices themselves and on the data on the parameters of the solar wind and the interplanetary magnetic field and their prehistory.It is shown that with the increase of the forecasting horizon, the quality of prediction decreases quite rapidly, especially for Kp index.This fact can be explained by the characteristic time of development of processes in the Earth's magnetosphere that affect the geomagnetic situation, as well as by the physical differences between the Dst and Kp indices.The direction of further research aimed at increasing the prediction horizon and improving the quality of forecasting should be taking into account the intraday hourly dynamics of the input parameters when predicting the daily average values of the geomagnetic indices.
This study was performed at the expense of the Russian Science Foundation, grant no.161700098.

Fig. 1 Fig. 1 .
Fig. 1.Multiple determination coefficient R 2 and correlation coefficient (r) for Dst and Kp indexes vs prediction horizon in hours, for ANN and trivial models

Fig. 2
Fig. 2 displays the values of root mean squared error (RMSE) for Dst and Kp indexes as a function of prediction horizon for the average of predictions of 5 ANN with various sets of initial weights, and for the trivial models.

Fig. 2 .
Fig. 2. Root mean squared error (RMSE) for Dst and Kp vs prediction horizon in hours, for ANN and trivial models.

Fig. 3 .
Fig. 3.An example of the predictions of the time series of daily average Kp-index one day ahead from April 30 to September 2, 2015 and their comparison with the measured values.

Fig. 4 .
Fig. 4.An example of the predictions of the time series of daily average Kp-index one day ahead from May 9 to July 31, 2016 and their comparison with the measured values.

Table 1 .
Statistical indexes for prediction of daily average values of Kp•10 and Ap and of daily maximum Dst amplitude one day ahead obtained with ANN and trivial models