The Sun incidence angles \(\alpha\) and \(\beta\) are crucial in our approach to characterise the scalar residual. To clarify, in Fig. 3 we illustrate the definition of these angles with respect to the spacecraft and the Sun position. \(\alpha\) is the azimuth in the spacecraft x–z plane (nominally the orbit plane), and \(\beta\) is the “elevation” out of the x–z plane positive towards left (looking in the nominal flight direction; i.e. positive opposite the spacecraft yaxis). Examples of values for \(\alpha\) and \(\beta\) for particular Sun positions are:

\(\beta = +90^\circ\): Sun directly from \(y\) (i.e. from the left during nominal flight)

\(\beta = 90^\circ\): Sun directly from \(+y\) (i.e. from the right)

\(\beta = 0^\circ\), \(\alpha = 0^\circ\): Sun directly from \(+x\) (i.e. from the front)

\(\beta = 0^\circ\), \(\alpha = +90^\circ\): Sun directly from \(z\) (above)

\(\beta = 0^\circ\), \(\alpha = +180^\circ\): Sun directly from \(x\) (i.e. from the back—slightly above the boom)
Considering how these angles vary over orbits of the Swarm spacecraft during nominal flight, we find that \(\alpha\) varies rapidly from \(360^\circ\) down to \(0^\circ\) within one orbit (i.e. within \({\approx }90\) min), while \(\beta\) varies slowly up and down typically by \({\approx }1.25^\circ\) in one day (for Alpha and Charlie, \(1.20^\circ\) for Bravo).
Although the observed scalar residuals clearly vary with the Sun incidence angles \(\alpha\) and \(\beta\) (see Fig. 2), there is no direct mapping of \(\Delta F\) in terms of these parameters. This is a consequence of the scalar residuals \(\Delta F \approx \delta \vec {B}_\mathrm {Sun} \cdot \vec {b}_0\) being the projection of the magnetic disturbance vector \(\delta \vec {B}_\mathrm {Sun}\), onto the unit vector \(\vec {b}_0\) of the ambient magnetic field direction (Earth’s main field). The former is oriented relative to the spacecraft, while the latter is oriented relative to Earth, which results in the variations with the spacecraft local time (captured by \(\beta\)) as seen in Fig. 2. The spacecraft local time changes by 12 hours (corresponding to a change in \(\beta\) by \(180^\circ\)) within approximately \(4\frac{1}{2}\) months.
To account for the projection on to the ambient field, we consider a vector magnetic disturbance \(\delta \vec {B}_\mathrm {Sun}(\alpha , \beta )\), with each component depending individually on the Sun incidence angles. Mathematically, we describe each component of the disturbance field vector by a spherical harmonic expansion in \(\alpha\) and \(\beta\) i.e. we consider three independent spherical harmonic expansions in all.
This model characterising the Sundriven disturbance is coestimated together with a model of the temporal evolution of the VFM sensitivity and an adjustment of the preflight estimated nonorthogonality angles of the VFM sensor. For this we perform a scalar calibration via a least squares fit, minimising the discrepancy (\(\Delta F\)) between the fully calibrated and corrected measurements from the ASM and the modulus of the vector measurements from the VFM after our model has been applied. Huber weights are used iteratively to eliminate the effect of anomalous measurements (“outliers”) on the estimated models.
Model parameterisation
As outlined above, our model characterising the Sundriven disturbance vector \(\delta \vec {B}_\mathrm {Sun}\) consists of three spherical harmonic expansions up to degree and order 25, one for each of the magnetic field components in the VFM magnetometer frame, with the position of the Sun with respect to the spacecraft parameterised by the Sun incidence angles \(\alpha\) and \(\beta\). It takes the form
$$\begin{aligned} \delta \vec {B}_\mathrm {Sun} = \sum _{n=0}^{25} \sum _{m=0}^n \left( \vec {u}_n^m \cos m \alpha + \vec {v}_n^m \sin m \alpha \right) P_n^m(\sin \beta ) \end{aligned}$$
where \(\vec {u}_n^m\) and \(\vec {v}_n^m\) are the spherical harmonic expansion coefficients, with one component for each component of the disturbance field, and \(P_n^m\) are the Schmidt seminormalised Legendre functions. Note that \(\delta \vec {B}_\mathrm {Sun}\) includes static terms (\(n = m = 0\)) that describe a static (i.e. independent of the Sun position) disturbance vector. The disturbance field vector \(\delta \vec {B}_\mathrm {Sun}\) is thus described by \(3 \times 26^2 = 2028\) model coefficients.
The model for rescaling the vector measurements and taking into account any small adjustment of the nonorthogonality of the VFM sensors, which is required in order to obtain the fully calibrated and corrected vector field measurements \(\vec {B}_\mathrm {VFM}\), now takes the form
$$\begin{aligned} \vec {B}_\mathrm{VFM} = \underline{\underline{P}}^{1} \underline{\underline{S}}^{1} \vec {B}_{{\rm pre}\text{}{\rm flight}}  \delta \vec {B}_\mathrm{Sun} \end{aligned}$$
where \(\vec {B}_{{\rm pre}\text{}{\rm flight}}\) are the VFM measurements calibrated using the preflight parameters and corrected for the preflight determined stray fields as described in TøffnerClausen (2015). \(\underline{\underline{S}}\) is a \(3 \times 3\) diagonal scaling matrix with elements
$$\begin{aligned} s_j = s^{{\rm B}\text{}{\rm spline}}(t) + s_{j,\mathrm {Tsensor}} T_\mathrm {sensor} + s_{j,\beta } \beta \end{aligned}$$
where \(s^{{\rm B}\text{}{\rm spline}}(t)\) is a quadratic Bspline in time with 3month knot separation (common for all three components of the magnetic field), and \(s_{j,\mathrm {Tsensor}}, j=13\) is an adjustment of the preflight estimated dependency of the VFM sensitivity on its sensor temperature, \(T_\mathrm {sensor}\), for each sensor axis j. \(s_{j,\beta }\) is an empirical scaling parameter and \(\beta\) the Sun incidence angle, as defined above. The choice of quadratic Bsplines with 3month knot separation is made to allow sufficient flexibility of the model; the exact choice of Bspline knot times is not crucial as very similar results are obtained with other, similar parameterisations. The estimated Bsplines exhibit very moderate accelerations (in the case of the full model, see Fig. 6), and it may be possible to simplify the parameterisation of the time dependence in future models, e.g. to an exponential saturation in time as this is the expected behaviour of the VFM instrument sensitivity; however, an exponential model is illconditioned on the time span of data used here.
\(\underline{\underline{P}}\) is the nonorthogonality matrix that makes small adjustments to the preflight estimated nonorthogonalities of the VFM sensor (cf. Olsen 2003)
$$\begin{aligned} \underline{\underline{P}} = \left( \begin{array}{ccc} 1 &{} \quad 0 &{} \quad 0 \\ \sin u_1 &{} \quad \cos u_1 &{} \quad 0 \\ \sin u_2 &{} \quad \sin u_3 &{} \quad \sqrt{1  \sin ^2 u_2  \sin ^2 u_3} \\ \end{array} \right) \end{aligned}$$
Our inflight calibration model comprises 18 parameters in all; together with the 2028 parameters describing \(\delta \vec {B}_\mathrm {Sun}\) this results in 2046 model parameters to be estimated, as listed in Table 1.
Estimation of model parameters: inversion and regularisation
In order to estimate the 2046 model parameters from the scalar residuals we need to solve a nonlinear inverse problem. The nonlinearity arises from the treatment of nonorthogonalities (Olsen 2003).
The forward relationship between the vector of the scalar residuals, \(\mathbf {d}\) (\(d_i = \Delta F_i\), the scalar residual of the ith data point), and the model parameter vector \(\mathbf {m}\), may therefore be written in the form
$$\begin{aligned} \mathbf {d} = \mathbf {g}(\mathbf {m}) + \mathbf {e} \end{aligned}$$
where \(\mathbf {g}(\mathbf {m})\) is a nonlinear function of the model parameters and \(\mathbf {e}\) is a small remainder that cannot be explained by the model, which we seek to minimise.
Linearisation of this problem is straightforward. A regularised, iteratively reweighted, least squares solution to the inverse problem is then obtained using the algorithm
$$\begin{aligned} \mathbf {m}_{k+1} = \mathbf {m}_{k} + (\underline{\underline{\mathbf {G}}}_k^T \underline{\underline{\mathbf {W}}}_{k} \underline{\underline{\mathbf {G}}}_k + \lambda \underline{\underline{\mathbf {R}}})^{1} \left( \underline{\underline{ \mathbf {G}}}_k^T \underline{\underline{\mathbf {W}}}_k \left[ \mathbf {d} \mathbf {g}(\mathbf {m}) \right]  \lambda \underline{\underline{\mathbf {R}}} \mathbf {m}_k \right) \nonumber \end{aligned}$$
where at the kth iteration, \(\underline{\underline{\mathbf {G}}}_k= \left. {\partial \mathbf {g}(\mathbf {m}) \over \partial \mathbf {m}} \right _{\mathbf {m}=\mathbf {m}_k}\), is the appropriate Jacobian matrix, \(\underline{\underline{\mathbf {R}}}\) is a regularisation matrix discussed in detail below, and \(\underline{\underline{\mathbf {W}}}_{k}\) is a (Huber) weighting matrix.
\(\underline{\underline{\mathbf {W}}}_{k}\) is updated at each iteration and consists of diagonal elements
$$\begin{aligned} ^kw_i = \min \left( 1, \frac{c \sigma }{^kd_i} \right) . \end{aligned}$$
\(^kd_i\) is the scalar residual of the ith data point using model vector \(\mathbf {m}_k\) and
$$\begin{aligned} \sigma = \sqrt{\frac{\sum _i \left( ^{k1}w_i \ ^kd_i \right) ^2}{\sum _i \left( ^{k1}w_i \right) ^2}}, \end{aligned}$$
being a (robust) estimate of the standard deviation of the residuals at iteration k. We set \(c = 2\), slightly higher than the value of 1.5 usually chosen, in order to ensure that the less numerous polar data are not overly downweighted in the determination of the calibration parameters.
It turns out that the full set of 2046 parameters is not needed to obtain good results and low data misfit, which is confirmed by inspection of the eigenvalues of the matrix \((\underline{\underline{\mathbf {G}}}_k^T \underline{\underline{\mathbf {W}}}_{k} \underline{\underline{\mathbf {G}}}_k + \lambda \underline{\underline{\mathbf {R}}})\), as presented in Fig. 4 for Swarm Alpha. The magnitudes of the sorted eigenvalues (in order of decreasing magnitude) exhibit a distinct drop around 750–800 degrees of freedom, indicating the smaller eigenvalues contribute little to the solution. The inversion of this matrix was therefore finally performed using a truncated singular value decomposition (TSVD) procedure, retaining only 750 degrees of freedom.
A regularisation matrix \(\underline{\underline{\mathbf {R}}}\) is also included to help stabilise the inversion. This is necessary because the Swarm satellites operate in a tightly controlled attitude orientation which leads to a poor excitation of the VFM instrument along the axis perpendicular to the orbit plane (the east–west direction corresponding to the yaxis of the VFM sensor). Consequently, the parameters related to the yaxis are poorly determined in a scalar calibration. The regularisation matrix \(\underline{\underline{\mathbf {R}}}\) is therefore defined so that it acts on the parameters \(s_{2,\mathrm {Tsensor}}\), \(s_{2,\beta }\), \(u_1\), and \(u_3\) to force \(s_{2,\mathrm {Tsensor}} \simeq \left( s_{1,\mathrm {Tsensor}} + s_{3,\mathrm {Tsensor}}\right) /2\) (to reflect the physical properties of the VFM sensor) and also to minimise the norms \(s_{2,\beta }^2\) and \(u_1^2 + u_3^2\). \(\lambda\) is chosen to be sufficiently large to effectively impose the regularisation on the estimated model. Note that no regularisation is directly imposed on \(\delta \vec {B}_\mathrm {Sun}\) but use of truncated SVD during the inversion automatically acts to suppresses structure in regions that are not well constrained by the input data.
The starting model for the inversions is “unity”, i.e. \(\underline{\underline{P}} = \underline{\underline{S}} =\underline{\underline{I}}\), where \(\underline{\underline{I}}\) is the identity matrix, and \(\vec {u}_n^m = \vec {v}_n^m = \vec {0}\). The inversions typically converge within 25 iterations.