Introduction

Using the total electron content (TEC) in ionospheric tomography was first suggested by Austen et al. (1986). Andreeva et al. (1990) successfully implemented experimental radiotomographic reconstructions. Xu et al. (1995) carried out two-dimensional ionospheric tomography experiment at low latitudes in East Asia to detect ionospheric anomalies. Since the late 1990s, the global navigation satellite system (GNSS) has been widely used in ionospheric research due to the high temporal and spatial resolutions as well as the low cost, which led to the era of the three-dimensional ionospheric computer tomography (CT) (Rius et al. 1997). Thus, the GNSS measurements became the main data source in three-dimensional ionospheric tomography. However, three-dimensional ionospheric tomography has certain limitations, especially for the insufficiency of horizontal observations (Yeh and Raymund 1991). Numerical inversion algorithms have been developed to overcome this problem. Generally, ionospheric tomography algorithms can be classified into two categories. The first is pixel-based algorithms, including additive algebraic reconstruction (Austen et al. 1988; Xu et al. 2005), multiplicative algebraic reconstruction (Raymund et al. 1990), simultaneous iterative reconstruction (Pryse et al. 1993), and the method of constrained least squares (Saito et al. 2017). To improve the iterative algorithm, Yao et al. (2015) imposed a priori constraints by increasing the virtual observations, Yao et al. (2018) applied the side rays to the inversion, and Zheng et al. (2018) proposed an automatic search technology of relaxation factor. The second is function-based algorithms, including the orthogonal function method and singular value decomposition (Fremouw et al. 1992; Raymund et al. 1994). Farzaneh and Forootan (2018) improved the empirical orthogonal function method by combining the spherical Slepian function with the orthogonal empirical function. In recent years, some new methods have been applied to CT. Harding and Milla (2013) applied compressed sensing (CS) to one-dimensional imaging of coherent backscatter from ionospheric plasma density irregularities at the magnetic equator. Panicciari et al. (2015) proposed a CT algorithm based on l1 minimization for CT by using GNSS phase measurement. Hysell et al. (2019) evaluated compressed sensing (CS) methods in the application of two-dimensional aperture-synthesis imaging of radar backscatter from field-aligned plasma density irregularities in the ionosphere, the evaluated CS methods included basis pursuit denoising, implemented with the fast iterative shrinkage thresholding algorithm, and orthogonal matching pursuit with a wavelet basis. Sui et al. (2021) applied compressed sensing (CS) based on l1 norm for the sparse reconstruction of 3-D regional ionospheric tomography using the differential STEC.

The theoretical framework of CS was constructed in 2006 (Candès and Tao 2006; Donoho 2006). CS shows that a signal can be reconstructed from a small number of measurements if the signal is sparse in a fixed basis or compressible. CS includes three parts: the sparse representation of the signal, the requirements for the observation matrix, and the reconstruction algorithm.

The sparse representation of the signal means that the signal only contains a few large and sparse elements, or it can be converted into a sparse vector using a matrix which is called a dictionary. Although most of the signals are not sparse, they generally follow a certain regularity. Thus, they can be sparsely represented by a dictionary. The two types of dictionaries are the complete orthogonal dictionary and the over-complete dictionary (Mallat and Zhang 1993). The complete orthogonal dictionary includes Fourier basis and discrete cosine transform dictionary. The over-complete dictionary can be further divided into fixed and learning dictionaries. Once a fixed dictionary is confirmed, it will not change, such as the Gabor dictionary (Bergeaud and Mallat 1998), Gaussian dictionary (Qian and Chen 1994) and cascade dictionary (Elad 2010). A learning dictionary is obtained through learning or training. Typical learning methods include the method of optimal directions algorithm (Elad and Aharon 2006), the recursive least squares algorithm (Skretting and Engan 2010), KSVD (Aharon et al. 2006), and the double sparse method (Rubinstein et al. 2010).

Candès and Tao (2005) proposed that the observation matrix should satisfy the restricted isometry property (RIP). Baraniuk et al. (2008) found that the observation matrix was not related to the atoms in the dictionary, which was equivalent to RIP. Candès and Plan (2011) suggested that the observation matrix selects sensing vectors independently at random from a probability distribution F, which includes all standard models and a framework for new measurement strategies, and the probability distribution F obeys a simple incoherence property and an isotropy property. However, it is difficult to determine whether the observation matrix satisfies RIP. Candès and Plan (2011) also suggested that RIP was too strict and conservative. Zhang (2013) demonstrated that, based on prior knowledge, the signal could be accurately reconstructed even if RIP was not satisfied. Moreover, Adcock et al. (2017) studied a situation where the observation matrix was highly correlated with the dictionary, but the signal was accurately reconstructed and proposed a framework that included the concepts of asymptotic sparsity, asymptotic incoherence, multisampling, and infinite-dimensional CS. Candès and Tao (2006) showed that RIP could most likely be satisfied when the Gaussian matrix, Fourier matrix, and binary matrix were used as the observation matrices. However, these matrices were random matrices. In some cases, it is hard to observe randomly, such as in ionospheric tomography. Therefore, it is one of the main research directions of CS to construct deterministic observation matrices (Elad 2007).

CS reconstruction algorithms can be divided into three categories. The first one is convex relaxation algorithms, in which the non-convex sparsity \(\ell_{0}\)-norm was replaced with \(\ell_{1}\), which has the convex property, thereby obtaining a convex optimization problem that is easier to solve. Convex optimization algorithms include constrained optimization (Figueiredo et al. 2007) and approximate operator-based strategies (Parikh and Boyd 2014). The second one is the greedy algorithms, including matching pursuit (Bergeaud and Mallat 1998), orthogonal matching pursuit (Tropp 2004), the iterative hard threshold method (Blumensath and Davies 2009), and the compressive sampling matching pursuit (CoSaMP) (Needell and Tropp 2009). The third category includes focal underdetermined system solver (Rao and Kreutz-Delgado 1999) and iteratively reweighted least squares (Chartrand and Yin 2008).

In the present study, three-dimensional ionospheric tomography based on CS is proposed. The electron density obtained from IRI empirical model is used to construct a dictionary, and then, the observation matrix is optimized based on weights. Lastly, unlike the previous studies (Panicciari et al. 2015; Sui et al. 2021), the CoSaMP reconstruction method is used to invert the electron density based on STEC data in China and Europe region. The inversion results are compared with ionosonde measurements.

Method

CS is a new signal sampling and reconstruction framework that can achieve the high-precision reconstruction of the original signal with very few samples. The observation matrix, sparse representation and reconstruction algorithm are the three key components of CS. When the observation matrix satisfies certain conditions, the signal can be accurately reconstructed with a very high probability. Sparseness means that only a few elements in the signal are non-zero or a few elements have large values. Although natural signals are generally non-sparse, most of them can be converted into a sparse signal through a dictionary. In addition, there are many reconstruction algorithms in CS theory, and the CoSaMP was used in this study.

Model

A pixel-based model was used in this study. The inversion area was divided into N grids, and it is assumed that the electron density in each grid was the same. Figure 1 shows the grid division in Region I (China). The longitude range of the inversion area was 104.5°–120.5° E, the latitude range was 24.5°–40.5° N, and the altitude range was 95–2100 km. The inversion area was divided into non-uniform grids, and there were five types of grids of different sizes. The five types of grids differed only in the altitude resolution, whereas the latitude and longitude resolution was always 1° × 1°. Table 1 shows the height information of the grids.

Fig. 1
figure 1

Grids in Region I (China)

Table 1 Grid height information in different altitude ranges (unit: km)

For a GPS ray passing through the inversion area, the TEC can be expressed as:

$${\text{STEC}}_{g} = \sum\limits_{i = 1}^{N} {l_{i} Ne_{i} } - \varepsilon_{d}$$
(1)

where \({\text{STEC}}_{g}\) is the TEC in the inversion area, \(i\) is the grid number, \(l_{i}\) is the intercept of the ray in the grid, \(Ne_{i}\) is the electron density at the center of the grid, and \(\varepsilon_{d}\) and \(\varepsilon_{s}\) represent the discretization error and the observation error, respectively. Based on the NeQuick model, the proportion \(r_{g}\) of \({\text{STEC}}_{g}\) in the inversion area to the total \({\text{STEC}}\) can be obtained by following the method proposed by Yao et al. (2018):

$${\text{STEC}}_{g} = \left( {r_{g} - \varepsilon_{r} } \right) \cdot \left( {{\text{STEC}} - \varepsilon_{s} } \right)$$
(2)

where \(\varepsilon_{r}\) and \(\varepsilon_{s}\) are the errors of \(r_{g}\) and STEC, respectively. By substituting (2) into (1), we arrive at:

$$r_{g} \cdot {\text{STEC}} = \sum\limits_{i = 1}^{N} {l_{i} Ne_{i} } - \varepsilon_{d} + \left( {{\text{STEC}} - \varepsilon_{s} } \right) \cdot \varepsilon_{r} + r_{g} \cdot \varepsilon_{s}$$
(3)

The matrix form of (3) is as follows:

$${\mathbf{S}}_{{\mathbf{g}}} = {\mathbf{L}} \cdot {\mathbf{Ne}}_{{\mathbf{i}}} - {{\varvec{\upvarepsilon}}}_{{\mathbf{d}}} + {\mathbf{S}}{{\varvec{\upvarepsilon}}}_{{\mathbf{r}}} + {\mathbf{r}}{{\varvec{\upvarepsilon}}}_{{\mathbf{s}}}$$
(4)

where each item corresponds to the vector or matrix form of each item in (3). For example, \({\mathbf{S}}_{{\mathbf{g}}}\) is the column vector form of \(r_{g} \cdot {\text{STEC}}\). From (4), it can be seen that the observation equation contains many error terms, including the discretization error caused by gridding \({{\varvec{\upvarepsilon}}}_{{\mathbf{d}}}\), the scale factor error \({\mathbf{S}}{{\varvec{\upvarepsilon}}}_{{\mathbf{r}}}\), and the observation error of STEC \({\mathbf{r}}{{\varvec{\upvarepsilon}}}_{{\mathbf{s}}}\).

Sparse representation

A prerequisite for signal reconstruction using CS is a sparse representation of the signal. Although the regional electron density column vector is usually not sparse, it can be represented sparsely after dictionary conversion. To verify the sparsity of ionospheric electron density, an experiment was carried out based on the IRI model. The IRI model was used to obtain the long-term electron density \({\mathbf{Ne}}_{{{\mathbf{IRI}}}}\) in the inversion area, and then, the singular value decomposition was used to construct a long-term dictionary:

$${\mathbf{D}} \cdot {\mathbf{s}} \cdot {\mathbf{v}}^{{\mathbf{T}}} = {\mathbf{Ne}}_{{{\mathbf{IRI}}}}$$
(5)
$${\mathbf{a}}_{{{\mathbf{IRI}}}} = {\mathbf{s}} \cdot {\mathbf{v}}^{{\mathbf{T}}}$$
(6)

where \({\mathbf{a}}_{{{\mathbf{IRI}}}}\) is the conversion result of \({\mathbf{Ne}}_{{{\mathbf{IRI}}}}\) using dictionary \({\mathbf{D}}\). The electron density at the center of the grid in the inversion area is expressed as:

$${\mathbf{Ne}}_{{\mathbf{i}}} = {\mathbf{D}} \cdot {\mathbf{a}}_{{\mathbf{0}}}$$
(7)

where \({\mathbf{Ne}}_{{\mathbf{i}}}\) is a column vector composed of the electron density at the center of the grid in the inversion area. Due to the lack of real electron density data in the entire region, the sparse representation of the ionosphere in this region was evaluated based on \({\mathbf{a}}_{{{\mathbf{IRI}}}}\).

Figure 2 shows the elements in the first 50 rows and first 100 columns of \({\overline{\mathbf{a}}}_{{{\mathbf{IRI}}}}\), where \({\overline{\mathbf{a}}}_{{{\mathbf{IRI}}}}\) is the normalized \({\mathbf{a}}_{{{\mathbf{IRI}}}}\), i.e., \({\overline{\mathbf{a}}}_{{{\mathbf{IRI}}}} (i,j){ = }\frac{{{\text{abs}}({\mathbf{a}}_{{{\mathbf{IRI}}}} (i,j))}}{{\max ({\text{abs}}({\mathbf{a}}_{{{\mathbf{IRI}}}} (:,j)))}}\). It can be seen that a few elements in the front rows have large absolute values, indicating that \({\mathbf{a}}_{{{\mathbf{IRI}}}}\) has a good sparsity and the ionospheric electron density can be sparsely represented by a, which only contains k large elements, and the other elements are set to zero. Specifically, the sparsity of a is k, and the location of all non-zero elements in a (i.e., the row number) is called the support set. Equation (7) is converted to:

$${\mathbf{Ne}}_{{\mathbf{i}}} = {\mathbf{D}} \cdot ({\mathbf{a}} - {{\varvec{\upvarepsilon}}}_{{\mathbf{a}}} )$$
(8)

where \({{\varvec{\upvarepsilon}}}_{{\mathbf{a}}}\) is the error of a. By combining (4) and (8), we obtain:

$${\mathbf{S}}_{{\mathbf{g}}} = {\mathbf{A}} \cdot {\mathbf{a}} - {\mathbf{A}} \cdot {{\varvec{\upvarepsilon}}}_{{\mathbf{a}}} - {{\varvec{\upvarepsilon}}}_{{\mathbf{d}}} + {\mathbf{S}}{{\varvec{\upvarepsilon}}}_{{\mathbf{r}}} + {\mathbf{r}}{{\varvec{\upvarepsilon}}}_{{\mathbf{s}}}$$
(9)
$${\mathbf{A}} = {\mathbf{L}} \cdot {\mathbf{D}}$$
(10)

where \({\mathbf{A}}\) is the observation matrix, \({\mathbf{a}}\) is sparse, which makes it possible to reconstruct \({\mathbf{Ne}}_{{\mathbf{i}}}\) using CS.

Fig. 2
figure 2

Elements in the first 50 rows and first 100 columns of \({\overline{\mathbf{a}}}_{{{\mathbf{IRI}}}}\), \({\overline{\mathbf{a}}}_{{{\mathbf{IRI}}}}\) represents the conversion result of the ionospheric electron density by the dictionary, there are 13,568 rows and 17,520 columns in \({\overline{\mathbf{a}}}_{{{\mathbf{IRI}}}}\), large elements in \({\overline{\mathbf{a}}}_{{{\mathbf{IRI}}}}\) are concentrated in the front rows

Observation matrix weight

The weighting of the observation matrix is complex and is restricted by two factors: the error term and the reconstruction performance of the observation matrix. In the algorithm, the inner product and the method of the least squares were used. An appropriate weight of the observation equation can help to obtain good results. However, the weight can change the reconstruction performance of the observation matrix positively or negatively. Therefore, both factors should be considered when determining the weight.

In the CS theory, the observation matrix should satisfy certain conditions in order to reconstruct the signal with high probability and accuracy. Candès and Tao (2005) proposed that the observation matrix needed to satisfy RIP. Specifically, for \(k = 1,2,3, \ldots ,K\), the isometric constant \(\delta_{k}\) of the matrix \({{\varvec{\Phi}}}\) is defined as the minimum value that satisfies:

$$(1 - \delta_{k} )||{\mathbf{x}}||_{2}^{2} \le ||{\mathbf{\Phi x}}||_{2}^{2} \le (1 + \delta_{k} )||{\mathbf{x}}||_{2}^{2}$$
(11)

where \(|| \, ||_{2}\) is the \(\ell_{2}\) norm and x is a k column sparse vector. If \(0 < \delta_{k} < 1\), then \({{\varvec{\Phi}}}\) satisfies k-order RIP.

Traditionally, the weight is generally determined based on the covariance matrix. As can be seen from the supplementary material, the error terms include the discretization error \({{\varvec{\upvarepsilon}}}_{{\mathbf{d}}}\), the scale factor error \({\mathbf{S}}{{\varvec{\upvarepsilon}}}_{{\mathbf{r}}}\), the observation error term \({\mathbf{r}}{{\varvec{\upvarepsilon}}}_{{\mathbf{s}}}\), and the sparse representation error term \({\mathbf{A}} \cdot {{\varvec{\upvarepsilon}}}_{{\mathbf{a}}}\). The discretization error can be neglected because it is on the order of 0.01 TECU. See supplementary material for detailed error analysis. In one calculation, \(S\varepsilon_{r} \sim N(m_{Sr} ,\delta_{Sr}^{2} )\), \(\delta_{Sr} \ll \left| {m_{Sr} } \right|\). \(r\varepsilon{s} \sim N(0,...)\), and may not be true in one calculation. Ignore the scale factor error for its small standard deviation and the uncertainty \(r\varepsilon_{s}\), only consider the sparse representation error term \(A\varepsilon_{a} \sim N(0,\sum\nolimits_{i = 1}^{N} {l_{i}^{2} } \cdot \delta_{a}^{2} )\), setting the weight to \({1 \mathord{\left/ {\vphantom {1 {\sqrt {\sum\nolimits_{i = 1}^{N} {l_{i}^{2} } } }}} \right. \kern-0pt} {\sqrt {\sum\nolimits_{i = 1}^{N} {l_{i}^{2} } } }}\) is appropriate. However, in CS, the performance of the observation matrix directly affects the reconstruction result or even leads to an incorrect result. The performance of the observation matrix is affected by the weight. Therefore, when determining the weight, we focused on the performance of the observation matrix. According to our experience, the performance weight of the observation equation is as follows:

$$w = {1 \mathord{\left/ {\vphantom {1 {\sum\limits_{i = 1}^{N} {l_{i} } }}} \right. \kern-0pt} {\sum\limits_{i = 1}^{N} {l_{i} } }}$$
(12)

where \(w\) is the weight, i.e., the weight of the observation is the reciprocal of the total intercept of the observation. By combining (9) with the above equation, we obtain:

$${\mathbf{wS}}_{{\mathbf{g}}} = {\mathbf{wA}} \cdot {\mathbf{a}} - {\mathbf{wA}} \cdot {{\varvec{\upvarepsilon}}}_{{\mathbf{a}}} - {\mathbf{w}}{{\varvec{\upvarepsilon}}}_{{\mathbf{d}}} + {\mathbf{wS}}{{\varvec{\upvarepsilon}}}_{{\mathbf{r}}} + {\mathbf{wr}}{{\varvec{\upvarepsilon}}}_{{\mathbf{s}}}$$
(13)

where \({\mathbf{w}}\) is the weight matrix of \(w\), and the off-diagonal elements in the matrix were 0.

Reconstruction algorithm

The CoSaMP algorithm was used to reconstruct the electron density. The CoSaMP algorithm was a special greedy algorithm. Theoretical performance analysis was difficult for the greedy algorithm (Blumensath et al. 2012). Davenport and Wakin (2010) reported that the theoretical conditions of the greedy algorithm were stricter than RIP, while other researchers showed that the theoretical performance of some greedy algorithms was close to and even better than that of the convex relaxation method in some specific situations (Tropp 2004; Needell and Vershynin 2010; Blumensath and Davies 2008).

CoSaMP is different from classical matching pursuit algorithms. In each iteration, the CoSaMP algorithm chooses multiple atoms in the support set based on the correlation. Then, the support set was cropped using the method of least squares. The specific steps are as follows:

  1. 1.

    Initialization. For \({\mathbf{y = A}} \cdot {\mathbf{a}}\), where \({\mathbf{y}}\) and \({\mathbf{A}}\) correspond to \({\mathbf{wS}}_{{\mathbf{g}}}\) and \({\mathbf{wA}}\) in (13), respectively. Let \({\mathbf{a = 0}}\), \({\mathbf{b = 0}}\), the sparseness is k, and the support set is empty \({{\varvec{\Omega}}} = \emptyset\). The columns of A are normalized to obtain B.

  2. 2.

    The residual error is updated, and the normalized sensing matrix is correlated with the residual error. \({\mathbf{ry = y - A}} \cdot {\mathbf{a}}\), \({\mathbf{p = B}}^{{\mathbf{T}}} \cdot {\mathbf{ry}}\).

  3. 3.

    The set R of the 2k row numbers that are most correlated with the residual error is obtained, namely, the row R corresponding to the 2k elements with the largest absolute value in p, \({{\varvec{\Omega}}} = {{\varvec{\Omega}}} \cup {\mathbf{R}}\).

  4. 4.

    b is updated using the least squares, and the support set is cropped. \({\mathbf{b}}({{\varvec{\Omega}}}) = {\mathbf{B}}({{\varvec{\Omega}}})^{ - 1} \cdot {\mathbf{ry}} + {\mathbf{b}}({{\varvec{\Omega}}})\). The row \({{\varvec{\Omega}}}_{{\mathbf{0}}}\) corresponding to the k elements with the largest absolute value was obtained from b, \({{\varvec{\Omega}}} = {{\varvec{\Omega}}}_{{\mathbf{0}}}\).

  5. 5.

    Update b. \({\mathbf{b}}({{\varvec{\Omega}}})\) remains constant, and the other rows of b are set to 0.

  6. 6.

    Steps 2–5 are repeated until ry no longer changes, or the 1-norm of ry is less than the threshold, which is set to 5% of the 1-norm of y.

  7. 7.

    The results are calculated. Using the final support set, the sparseness representation of the electron density a is calculated using the least squares method. Then, the electron density \({\mathbf{Ne}}_{{\mathbf{i}}}\) is obtained using (8).

Dataset

GPS observations on March 10, 2015, in China region (Region I) and on July 5, 2014, in the Europe region (Region II) are used to reconstruct the ionospheric electron based on CS. The Kp and Dst index is presented in Table 2 and Fig. 3. The STEC data of the Region I were derived from the terrestrial network by code-phase leveling, and DCBs were estimated by the spherical harmonic model (Jin et al. 2012). The STEC data of Region II can be downloaded from http://www.gage.upc.edu/products (Rovira-Garcia et al. 2016a, 2016b). Ionosonde observations at Wuhan (30.50°, 114.40°) and Dourbes (50.10°, 4.60°) are also used to compare with the reconstructed results. Ionosonde data can be downloaded from https://lgdc.uml.edu/common/DIDBFastStationList. Figure 4 shows the three-dimensional map of Region II, and Figs. 5 and 6 show GPS stations, inversion area, and ionosonde stations used in Region I and Region II, respectively.

Table 2 Kp index (https://www-app3.gfz-potsdam.de/kp_index/Kp_ap_since_1932.txt)
Fig. 3
figure 3

Dst index (https://wdc.kugi.kyoto-u.ac.jp/dst_final)

Fig. 4
figure 4

Inversion map of Region II. The blue box denotes the inversion area, and the black box indicates the projection of the inversion area on the ground, the small circles stand for GPS stations, the triangle is the ionosonde station, and the dusty blue lines are ray paths in the inversion area

Fig. 5
figure 5

GPS stations (red dots), inversion area (black box), and ionosonde station (black triangle) used for verification in Region I

Fig. 6
figure 6

GPS stations (red dots), inversion area (black box), and ionosonde station (black triangle) used for verification in Region II

Results and discussion

Figures 7 and 8 compare the variation of the electron density peak height reconstructed by CS (blue circles), generated from IRI (black line) and measured by Wuhan and Dourbes ionosondes (red dots) in Regions I and II, respectively. We can see from Fig. 7 that in Region I the peak height reconstructed by CS shows a similar trend to that generated from the IRI model and measured by Wuhan ionosonde, and the peak height reconstructed by CS is higher than that obtained from the other two ways, this may be caused by the insufficient applicability of the dictionary. As shown in Fig. 8, the peak height reconstructed by CS was higher than that calculated by IRI model and observed by Dourbes ionosonde in Region II. Besides, the trend of the peak height reconstructed by CS is consistent with that obtained from the IRI model and Dourbes ionosonde.

Fig. 7
figure 7

Inversion results for Region I. Peak height of the ionospheric electron density at the ionosonde station

Fig. 8
figure 8

Inversion results for Region II. Peak height of the ionospheric electron density at the ionosonde station

Then, we take the Wuhan and Dourbes ionosonde measurements as the reference and calculate the error and SD of the peak height of the IRI model and CS, as shown in Table 3. In Region I and Region II, the mean error and SD of CS are larger than those of IRI model, which means the IRI model can predict the peak height more accurately.

Table 3 Peak height error (unit: km) and the relative error, CS is our method

Figures 9 and 10 compare the peak electron density reconstructed by CS (blue circles), predicted by IRI model (black line) and observed by ionosonde (red dots) in Region I and Region II. As shown in Fig. 7, in Region I, the peak electron density reconstructed by CS was very close to that observed by the ionosonde, while IRI model predicted result is much larger than that of CS and Wuhan ionosonde observation. In Region II, the CS result shows a similar trend to the ionosonde observation. Table 4 shows the mean error and SD for the peak electron density in Region I and Region II, and the ionosonde observations at Wuhan and Dourbes were taken as the reference. Obviously, in Region I, the mean error and SD of the peak electron density reconstructed by CS are smaller than those predicted by the IRI model, which indicates that CS can reconstruct the peak electron density more accurately. However, in Region II, the difference in the mean error and SD between CS and IRI models is not obvious.

Fig. 9
figure 9

Inversion results for Region I. Peak electron density at the ionosonde station

Fig. 10
figure 10

Inversion results for Region II. Peak electron density at the ionosonde station

Table 4 Peak electron density error (unit: 1010 m−3) and the relative error, CS is our method

Figure 11 shows the comparison of the electron density profiles reconstructed by CS (blue lines), predicted by IRI model (black lines) and inversed by the SAO Explorer software based on the ionosonde observations at Wuhan (red lines) during the period from 00:00 to 23:00 UTC on March 10, 2015, in the Region I. It needs to be noted that the profile above the peak height of the ionosonde was extrapolated. As shown in Fig. 11, the electron density profiles reconstructed by CS are in good agreement with that observed by the Wuhan ionosonde, although the peak height of the electron density reconstructed by CS is generally higher than that observed by an ionosonde. IRI model predicted electron density profiles are twice the ionosonde observations.

Fig. 11
figure 11

Inversion results for Region I. Ionospheric electron density profile at the ionosonde station (00:00–23:00), the blue line denotes CS result, the red line is ionosonde result, the black line denotes IRI result

Figure 12 compares the electron density profiles reconstructed by CS (blue lines), predicted by IRI model (black lines) and inversed by the SAO Explorer software based on the ionosonde observations at Dourbes (red lines) during the period from 00:00 to 23:00 UTC on July 5, 2014, in the Region II. These three profiles are very similar. In addition, compared with Fig. 11, the reconstruction result of CS in Region II was superior to that in Region I, especially before 11:00 UTC.

Fig. 12
figure 12

Inversion results for Region II. Ionospheric electron density profile at the ionosonde station (00:00–23:00), the blue line denotes the CS result, the red line is the ionosonde result, and the black line denotes the IRI result

Figure 13 shows the electron density slices at different latitudes at 00:00 UTC on March 10, 2015, in Region I by CS. All slices show enhanced electron density in the region between 200 and 400 km, and the electron density of this area decreases with the increase of the latitude. In addition, the electron density also enhances with the increase of the longitude. This is because Region I is in the morning, and the solar radiation was stronger in large-longitude and low-latitude areas.

Fig. 13
figure 13

Electron density sections along the latitude direction in Region I at 00:00 UTC time

Figure 14 shows the electron density slices at different longitudes at 00:00 UTC in Region I by CS. Similar to Fig. 13, enhanced electron density was observed between 200 and 400 km. Also, the electron density in this region decreased with the increase of the latitude and enhanced with the increase of the longitude.

Fig. 14
figure 14

Electron density sections along the longitude direction in Region I at 00:00 UTC time

Figure 15 shows the electron density slices at different altitudes in Region I at 00:00 UTC by CS. We can see from Fig. 14 that the maximum electron density in the slice at 300 km appears at 25° latitude and 120° longitude, which was consistent with the findings of Figs. 12 and 13.

Fig. 15
figure 15

Electron density sections along the height direction in Region I at 00:00 UTC time

Figures 16, 17 and 18 present the time variation of the electron density slices at 32° latitude, 112° longitude, and 300 km altitude in Region I by CS, respectively. All these three figures show that the electron density increases with time and peaks at 08 UTC; after that, it decreases rapidly. It can be seen from Fig. 16 that the enhanced electron density area from 200 to 400 km moved from a high-longitude area to a low-longitude area with time and then disappeared at 16:00 UTC. As presented in Fig. 17, the enhanced electron density area expanded from low-latitude areas to high-latitude areas and then vanished at 16:00. The same phenomenon is shown in Fig. 18 as well. It can be seen from Figs. 16 and 17 that the changes in electron density along the longitude direction were smaller than that along the latitude direction. In addition, the enhanced electron density area between 200 and 400 km, which appeared at 0:00 UTC, and the center of the spheroid moved to 112°longitude and below 25° latitude at around 8:00 UTC, disappeared at 16:00, which was consistent with the time of solar radiation.

Fig. 16
figure 16

Electron density sections along the 32° latitude line at different times in Region I

Fig. 17
figure 17

Electron density sections along the 112° longitude line at different times in Region I

Fig. 18
figure 18

Electron density sections along the 300 km height line at different times in Region I

Figures 19, 20 and 21 present the electron density slices at different latitudes, longitudes, and altitudes in Region II at 00:00 UTC by CS. Enhanced electron density between 300 and 500 km can be seen in these three figures, and the electron density peaked at 45° latitude and at 380 km altitude. As shown in Fig. 21, two high-electron density bands in the slice at 400 km and 45° latitude were distributed on each side of the 5° longitude line.

Fig. 19
figure 19

Electron density sections along the latitude direction in Region II at 00:00 UTC time

Fig. 20
figure 20

Electron density sections along the longitude direction in Region II at 00:00 UTC time

Fig. 21
figure 21

Electron density sections along the height direction in Region II at 00:00 UTC time

Figures 22, 23 and 24 show the time variation of the electron density slices at the 47° latitude line, the 2° longitude line, and 300 km altitude in Region II by CS, respectively. The electron density reached the minimum between 2:00 and 4:00 UTC; then, it began to increase and reach its maximum at 18:00 UTC; after that, it decreased again. The peak height decreased to a minimum at 8:00 UTC and then increased with time. In addition, the graphs show that the horizontal gradient in the longitude direction was smaller than that in the latitude direction.

Fig. 22
figure 22

Electron density sections along the 47° latitude line at different times in Region II

Fig. 23
figure 23

Electron density sections along the 2° longitude line at different times in Region II

Fig. 24
figure 24

Electron density sections along the 300 km height line at different times in Region II

In addition, CT by CS shows high computational efficiency. The computational efficiency is affected by the iterations of the algorithm and the observed quantity. In our case, the number of iterations was mostly less than 10. The observed quantity used in one calculation was about 2000, 3 epochs for Region I, 21 epochs for Region II. The algorithm ran on an ordinary desktop computer; Table 5 shows the runtime environment. Figure 25 presents the elapsed time of each reconstruction by CS; most of them were less than 10 s, and the mean values for Regions I and II were 6.1 s and 5.7 s, respectively. It should be noted that the \({\text{STEC}}_{g}\) and the dictionary were prepared in advance. Saito et al. (2017) showed that their method can produce three-dimensional electron density distributions over Japan every 15 min with a latency of about 6 min, the cost of DCB estimation was within 1 s.

Table 5 Runtime environment
Fig. 25
figure 25

Elapsed time of each reconstruction

Summary

Ionospheric tomography is an ill-posed problem. CS is able to reconstruct the signal through a small number of observations under certain conditions. In this study, CS was first used for ionospheric tomography. Specifically, a dictionary was constructed based on the IRI model, and the sparse representation of the ionospheric electron density was studied. Moreover, using weight matrix optimization to improve the performance of the observation matrix and the scale factor obtained through the NeQuick 2 model to retain more observations ensured the performance of the observation matrix. GPS data in two regions (I: China, II: Europe) were used to reconstruct the electron density based on this proposed method, and the results were compared with ionosonde observations. The main results of this study are summarized as follows:

  1. 1.

    In Region I, the peak electron density reconstructed by CS is in agreement with the ionosonde observation; the peak height is generally higher than the observation; the reason may be that the inaccuracy of IRI in Region I affects the suitability of the dictionary. In Region II, the peak electron density and height are consistent with the ionosonde observation.

  2. 2.

    Distribution and variation of the electron density reconstructed by CS in both regions were consistent with the actual situation. The results showed that the horizontal gradient of the electron density in the latitude direction was larger than that in the longitude direction. In addition, the electron density exhibited the local time dependence.

  3. 3.

    Ionospheric tomography based on CS greatly improved the resolution and computational efficiency. The average time for each reconstruction was about 6 s. For Region I, each reconstruction only uses data within 1 min. Although the calculation is conducted once every 5 min, to match the temporal resolution of the ionosonde data, it can be flexibly adjusted, such as one reconstruction once per epoch.