Local Least Squares Analysis of Auroral Currents

Multi-spacecraft probing of geospace allows the study of physical structures on spatial scales dictated by orbital and instrumental parameters. This chapter highlights multi-point array analysis methods for constellations of two or three spacecraft such as Swarm, and also discusses multi-scale techniques for the geometrical characterisation of auroral current structures using observations of stationary or weakly time-dependent current structures along the tracks of individual satellites. Linear estimators are based on a least squares approach which is local in the sense that only few measurements around a reference point are considered for the reconstruction of geometrical and physical parameters. Local least squares estimators for ﬁeld-aligned currents are compared with non-local counterparts and also local estimators based on ﬁnite differences. Uncertainties, implementation and other practical aspects are discussed. The techniques are illustrated using selected Swarm crossings of the auroral zone.


Introduction
Coupling processes in the auroral zone are to a large extent controlled by electric currents flowing parallel to the ambient magnetic field lines (e.g., Lysak 1990;Paschmann et al. 2002;Vogt 2002). Auroral field-aligned currents (FACs) connect remote plasmas in geospace and are associated with global magnetospheric dynamics such as large-scale convection and substorms. The type of electrodynamic coupling in the auroral current circuit depends on the spatial scale L of FACs. Quasi-static coupling of the equatorial magnetosphere and the auroral ionosphere is expected on large scales L λ P ∼ 100 km (Lyons 1980;Lotko et al. 1987). Alfvénic coupling should be important on intermediate scales L λ A ∼ 10 km (Vogt and Haerendel 1998). On even smaller spatial scales in the kilometre range or below, auroral phenomena are typically very dynamic and short-lived, and not correlated with long-range magnetosphere-ionosphere coupling processes. The importance of spatial scales in FACs and their association with auroral processes and coupling regimes was confirmed by Lühr et al. (2015) using data from the initial phase of ESA's three-spacecraft Swarm mission when a range of inter-spacecraft distances was covered, see also Chap. 6 of this volume. Since April 2014, two Swarm satellites SwA and SwC orbit side-by-side in the auroral ionosphere, while the third Swarm satellite SwB moves at a higher altitude and lines up only occasionally with the lower pair to form a three-spacecraft constellation. SwA and SwC can be understood as a two-satellite array that allows the study of auroral FACs on a regular basis but restricted to the spatial scale given by their orbital separation.
To resolve electric current systems or other geospace structures by means of singlespacecraft data or multi-spacecraft observations, analysis methods must provide an adequate spatial resolution. The single-spacecraft approach where an individual satellite is assumed to move across a stationary or at most weakly time-dependent structure may resolve spatial scales given by the product of relative speed V and sampling interval Δt. Satellite constellations such as Cluster and Swarm allow to adopt a multi-point array perspective with the spatial resolution given by the inter-spacecraft distance scale Δr . For geospace phenomena and missions, V Δt is typically smaller than Δr . Single-spacecraft methods allow the study of smaller scales but only in the along-track direction. Multi-point array techniques provide information also about the across-track variability (and possibly temporal changes) but only on larger spatial scales (e.g., Russell et al. 1983;Dunlop et al. 1988;Neubauer and Glassmeier 1990;Pinçon and Lefeuvre 1991;Chanteur and Mottez 1993;Dudok de Wit et al. 1995;Bauer et al. 2000;Balikhin et al. 2001;Dunlop et al. 2002;De Keyser et al. 2007;Vogt et al. 2008a), see also the ISSI Scientific Reports SR-1 and SR-8 Daly 1998, 2008).
The category of analysis methods addressed in this report may be termed local least squares (LS) techniques. We are concerned mainly with multi-point array estimation of auroral FACs using vector magnetometer data from satellite missions such as Swarm, but also with multi-scale geometrical characterisation of current structures in the data of individual spacecraft. In local LS analysis, the least squares principle is applied to a confined region of interest, typically comprising only a few measurement points, equivalent to general (non-local) least squares modelling with localised basis functions but requiring less computational effort. Compared to local estimators based on finite differencing, local LS estimators turn out to be more robust with regard to non-regular (skewed or stretched) satellite constellations. To cover the multi-scale nature of auroral processes, in particular also intermediate and possibly even smaller scales, a multi-scale analysis technique developed by Bunescu et al. (2015Bunescu et al. ( , 2017 is included here as a localised version of the popular single-spacecraft minimum variance analysis or MVA that has its roots also in the least squares approach (Sonnerup and Scheible 1998

Methodology of Multi-spacecraft Array Techniques
Multi-spacecraft estimation of spatial gradients, electric currents, or boundary parameters is based on a set of satellite positions and corresponding observations that are interpreted as array measurements. In the simplest and most straightforward case, each satellite of a constellation contributes one position vector to the array, and all measurements are taken at the same time. This perspective was adopted, e.g., by Dunlop et al. (1988), Chanteur (1998), Harvey (1998), as well as Vogt and Paschmann (1998) in the preparation phase of ESA's four-spacecraft mission Cluster to develop analysis methods for electric currents and spatial gradients. The corresponding threespacecraft case of the LS approach was addressed by Vogt et al. (2009). The resulting estimators are instantaneous, thus perfectly localised in time, and also local in space at the lower resolution limit given by the inter-spacecraft separation scale that for Cluster ranged between 100 km and 10,000 km.
For the Swarm mission with only two satellites SwA and SwC close enough to be considered a multi-point array on a regular basis, the instantaneous approach was relaxed to include additional measurements shifted in time, thus generating a virtual planar four-point satellite array (Ritter and Lühr 2006;Ritter et al. 2013;Shen et al. 2012a;Vogt et al. 2013). Virtual along-track separations approximately equal to the distance between SwA and SwC of somewhat less than 100 km in the auroral zone are obtained using time shifts of about 10 s, considerably smaller than the variation time scales of FACs associated with quasi-static coupling. Localisation in space is characterised by the effective inter-spacecraft separation in the virtual quad, typically of the order of 100 km. In the context of this report, we refer to this class of methods as local analysis techniques.
When spatial distributions of electrodynamic variables for large parts of or even the entire auroral region are to be reconstructed from satellite crossings (e.g., He et al. 2012;Amm et al. 2015), possibly in combination with other ground-based data, the methodology is usually termed modelling rather than analysis, and should be referred to as a regional method (spatial extent of the order of 1000 km), applicable to structures that do not vary on time scales less than the satellite crossing time of the order of a few minutes. The most popular modelling approach is based on the least squares principle that we choose as a starting point for our discussion.

General Linear Least Squares
Least squares modelling can be characterised as a statistical technique to find the parameters of a model (m) that gives the best approximation of a given data set (d) of S measurements contaminated by random errors (residuals r ). The measurements d σ form the components of a data vector d. If all parameters a 1 , a 2 , . . . , a N enter the model function m linearly, then m = ν a ν f ν with basis functions f ν . The model parameters a ν are also called amplitudes and can be cast into a vector a. The estimation problem can be written in the form Ma = d with a matrix M and the solution a = M ils d where M ils is the pseudo-inverse of M in the least squares sense. For technical details of the general linear least squares approach, see Appendix A.
Regional least squares modelling of auroral field-aligned currents was carried out by He et al. (2012He et al. ( , 2014 who condensed ten years of CHAMP (Reigber et al. 2002) magnetic field measurements into the empirical FAC model MFACE using a set of data-adaptive basis functions called empirical orthogonal functions (EOFs). In the first modelling step, the set of EOFs was constructed from the data in a coordinate frame centred on the dynamic auroral oval to capture its magnetic local timedependent expansion and contraction during magnetospheric activity. The EOFs then serve as basis functions in an expansion of the form j (Δβ|p) = ν a ν (p) f ν (Δβ) where the parameter vector p is formed by a set of predictor variables (magnetic local time, seasonal and solar wind parameters, AE), and Δβ = β − β ACC is magnetic latitude in auroral oval coordinates, i.e. relative to the latitude of the auroral current centre β ACC . In a second step, the functional dependences β ACC = β ACC (p) and a ν = a ν (p) were determined also through least squares regression. The geophysical parameters that drive the model (such as the IMF, solar wind parameters and geomagnetic indices) are obtained from NASA's OMNIWeb service. Two sample outputs are shown in Fig. 4.1. The times chosen for producing the diagrams correspond to selected Swarm auroral crossings that are used also for demonstrating multi-point FAC estimators in Sect. 4.3.2 and multi-scale MVA analysis of FACs in Sect. 4.4.1.
With regard to the discussion below of gradient and curl estimation from multispacecraft magnetic field measurements, it is important to note that the normal equations produce parameter estimates that are linear in the data: we may write where the vectors q σ are the rows of M ils . They depend only on the array geometry but not on the measurements d σ , and may be termed generalised reciprocal vectors, see below. Linearity in the data applies also to any aspect of the model that can be expressed through a linear operation acting on the model function. Since differential operators like grad or curl are linear, least squares estimators of gradients and currents from linear magnetic field models based on multi-spacecraft vector measurements are linear in the data. The representation a = σ q σ d σ facilitates error analyses and

Local LS Estimators of Spatial Gradients
The position vectors in an array of S spacecraft are denoted as r σ , σ = 1, . . . , S, and the difference vectors are r σ τ = r τ − r σ . The average position or mesocentre r * = (1/S) σ r σ may be chosen to coincide with the origin. In such a mesocentric coordinate system, the position tensor R = σ (r σ − r * )(r σ − r * ) T simplifies to R = σ r r T . Note that the volumetric tensor introduced by Harvey (1998) differs by a factor of 1/S from the position tensor defined here.
To estimate the gradient vector of a scalar field h, we consider the model h(r) = h * + (r − r * ) · ∇h (or h(r) = h * + r · ∇h in a mesocentric frame). The function is linear in its four parameters, namely, the value h * of h at the mesocentre and the three components of the gradient ∇h. Using S measurements h σ at positions r σ , the least squares estimates are h * (1/S) σ h σ and The local LS estimate of the gradient matrix of a vector field B is given by The vectors q σ are solutions of Rq σ = r σ (4.4) Vogt et al. (2008b). Based on the rank of the (3 × 3) position tensor R, we distinguish two cases.

Invertible position tensor
If S ≥ 4, and the position vectors are not all in one plane, the position tensor is nonsingular (full rank 3), and we obtain q σ = R −1 r σ (Vogt et al. 2008b). The vectors q σ can be understood as generalised reciprocal vectors, because in the special case S = 4 they coincide with the (tetrahedral) reciprocal vectors (Chanteur 1998;Chanteur and Harvey 1998;Vogt et al. 2008b) defined through where (ρ, σ, τ, ν) is a cyclic permutation of (1, 2, 3, 4).

Singular position tensor, planar spacecraft array
If S ≥ 3, and the spacecraft are in all one plane but not co-linear, the position tensor has only rank 2. Measurements allow to determine the component ∇ p h of the Each vector q σ is perpendicular to the line segment L σ facing satellite no. σ at position vector r σ . The length |q σ | is inversely proportional to the distance between L σ and r σ gradient in the plane spanned by the three spacecraft (in-plane or perpendicular gradient) but not the component ∇ n h normal to that plane (out-of-plane or normal component). Additional information in the form of geometrical or physical assumptions (conditions, constraints) is required to determine ∇ n h. The vectors q σ are the minimum-norm solutions of Rq σ = r σ (Vogt et al. 2013), and may be termed planar reciprocal vectors. In the special case S = 3, they can be written in the form (Vogt et al. 2009) where (σ, τ, ν) is a cyclic permutation of (1, 2, 3), n = r 12 × r 13 = r σ τ × r σ ν , and the corresponding unit vector isn = n/|n|. The geometry of planar reciprocal vectors for a three-spacecraft configuration is sketched in Fig. 4.2. The relationships of planar reciprocal vectors to the eigenvalues and eigenvectors of the volumetric tensor (1/S)R are discussed in detail by Shen et al. (2012b). The singular position tensor case is most relevant for the Swarm mission: here the gradient vector cannot be resolved fully from the measurements, and additional information has to be taken into account to reconstruct its out-of-plane component. Constraints may in principle be incorporated in the least squares framework using Lagrange multipliers. The approach chosen by Vogt et al. (2009) is based on geometrical considerations, and offers the possibility to choose between three types of constraints: (1) gradient parallel to a given directionê, (2) gradient perpendicular to a given directionê, (3) the physical structure is stationary in a reference frame moving with a known velocity relative to the spacecraft array. Of particular importance for studies of field-aligned currents is a fourth constraint that combines the force-free condition B × (∇ × B) = 0 with ∇ · B = 0 to estimate the full magnetic gradient matrix from spacecraft measurements in one plane (Shen et al. 2012a;Vogt et al. 2013).

Local LS Estimators of Electric Currents
In the invertible position tensor case (spacecraft are not all in one plane), the local LS estimate of the curl ∇ × B can be written as In the singular position tensor case (spacecraft are in one plane but not co-linear), one may incorporate an adequate constraint to reconstruct the full gradient matrix ∇B first, and then take its skew-symmetric part 1 2 (∇B − ∇B T ) to obtain the curl (Vogt et al. 2009). If the curl is known to be parallel to a given direction as in the case of auroral FACs, one may also start from the density j n of the normal current (i.e. the component perpendicular to the plane spanned by the spacecraft positions) that is fully determined by the measurements through Heren is a unit vector normal to the spacecraft plane, and B p,σ are the planar components of the measured vectors B σ . The field-aligned current density is then given by j j n /n ·B 0 whereB 0 is the direction of the ambient magnetic field.

Related Local Estimators of Gradients and Currents
In preparation of the Cluster mission, gradient analysis methods were derived from several different principles such as discretised boundary integration (Dunlop et al. 1988), spatial interpolation (Chanteur 1998), and least squares estimation (Harvey 1998). For the Swarm mission, curl estimators based on finite differences (FD) and also on discretised boundary integrals (BI) were developed by Ritter and Lühr (2006), see also Shen et al. (2012a) and Ritter et al. (2013). Although the underlying principles differ, the resulting estimators may still turn out to be identical. Chanteur and Harvey (1998) demonstrated that in the regular (tetrahedral) four-spacecraft case, spatial interpolation yields the same analysis scheme as unconstrained least squares. Considering virtual four-point almost planar configurations relevant for the Swarm mission, (Vogt et al. 2013) compared different estimators for the normal component of the curl (corresponding to the radial current density) and found that the FD and BI estimators are algebraically identical.
Inter-comparisons of gradient and curl analysis schemes are facilitated by the observation that (to our knowledge) all the proposed multi-spacecraft methods yield estimators that are linear in the data. Using general results from linear algebra, (Vogt et al. 2008b) demonstrated that the problem of linear and consistent four-point gradient estimation has a unique solution. The same argumentation can be applied to three-spacecraft arrays: the number of free parameters (mesocentre value h * and two components of the planar gradient ∇ p h) is the same as the number of measurements (values h σ at three-spacecraft positions), therefore there is a unique three-point linear and consistent estimator for the planar gradient that can be expressed explicitly, e.g., using the formalism of Vogt et al. (2009).
All linear estimators for the gradient of a scalar variable h can be represented in the form ∇h σ p σ h σ with a specific set of vectors p σ , termed canonical base vectors by Vogt et al. (2013). For vector measurements, we obtain ∇B = σ p σ B T σ . The corresponding linear curl estimator can then be written in the form ∇ × B = σ p σ × B. The FD/BI and LS estimators for planar four-point configurations produced from the SwA-SwC pair yield canonical base vectors that differ only in terms proportional to a small configurational parameter ε = m/M ∼ 10 −2 with m and M as in Fig. 4.3, see Vogt et al. (2013) for a detailed description. The FD/BI estimator of the normal curl component (∇ × B) n can be written in the compact form (4.10) see also Appendix B in Vogt et al. (2013). Subscripts a and c indicate SwA and SwC, respectively, and superscripts ± denote the two time-shifted measurements.

Errors and Limitations
Spatial gradient estimates produced from multi-point measurements are affected by several errors and limitations: (a) measurement errors, (b) positional errors, (c) imperfections of the assumed linear model. In the planar spacecraft array case when additional information has to be considered to reconstruct the normal gradient, and (d) uncertainties in the imposed geometrical or physical conditions give rise to additional errors.

Measurement errors
Random uncertainties produced by limitations of the experimental setup (instrumental noise) are called measurement errors or physical errors. They can be quantified by means of error covariances δh σ δh τ for scalar observables, and δB σ δB T τ for vectors such as the magnetic field. Representations such as ∇h g = σ q σ h σ for linear gradient estimators offer a coherent framework for an assessment of the resulting uncertainties (Chanteur 1998;Vogt and Paschmann 1998;Vogt et al. 2008bVogt et al. , 2009Vogt et al. , 2013. The special case of isotropic and uncorrelated measurement errors yields δh σ δh τ = δ σ τ (δh) 2 where δ σ τ is the Kronecker delta symbol, and δh is a measure of instrumental sensitivity, resulting in the parameter covariant matrix δg δg T = (δh) 2 Q (4.11) with the tensor Q = σ q σ q T σ (reciprocal tensor). For planar arrays of spacecraft positions, g is an estimator of the in-plane gradient component. The square magnitude error is given by the trace (4.12) In both the invertible and the singular position tensor case, the term trace(Q) = σ |q σ | 2 is the square of an inverse length scale and can be understood as an error amplification factor that depends on the geometry (extension and shape) of the spacecraft array, see Vogt et al. (2008bVogt et al. ( , 2009Vogt et al. ( , 2013. Normalisation using the mean square inter-spacecraft distance (1/S) σ |r σ | 2 yields a scaled version of the geometrical error amplification factor. The case of gradient matrix estimators ∇B G = σ q σ B T σ , based on vector measurements is discussed in detail by Chanteur (1998) and Vogt et al. (2009).
Using the same approach and assumptions, the accuracy of linear curl estimators ∇ × B c = σ q σ × B σ is studied in Appendix B. The parameter covariance matrix is given by where E denotes the identity matrix. For a planar spacecraft array with normal unit vectorn we obtain (4.14) This case applies to Swarm field-aligned current estimates with the vectors q σ being the canonical base vectors of the respective LS or FD/BI estimator (Vogt et al. 2013).
Defining L q = σ |q σ | 2 −1/2 (gradient estimation error length) for a planar four-point configuration, we may express the mean square error of the radial (normal) current j n as |δ j n | 2 = (δ B) 2 /(μ 2 0 L 2 q ). Using the mean square inter-spacecraft distance L r = 1 4 σ |r σ | 2 1/2 as a measure of the extent of the spacecraft array, one may further rearrange to obtain the form (4.15) The first term is a reference error for field-aligned current density controlled only by the array size. The second term gives the influence of the array shape. Figure 4.4 displays the logarithm of L 2 r /L 2 q for m/M = ε = 10 −2 in terms of the configurational parameters μ = M/L and λ = /L (see Fig. 4.3). Error amplification is smallest (close to unity) for equal-sided (μ ≈ 1) and non-skewed (λ ≈ 0) quads. Significantly skewed configurations (λ 3) give rise to substantial error amplification.

Positional errors
Random uncertainties in spacecraft positions are called positional errors or geometrical errors. Isotropic and uncorrelated positional errors can be incorporated in the parameter covariances obtained from considering only measurement errors by replacing (δh) 2 → (δh) 2 + |∇h| 2 (δr ) 2 (Vogt and Paschmann 1998;Vogt et al. 2009). In the case of magnetic gradient and electric current estimates based on Swarm magnetic field data, positional errors have a much smaller impact than measurement errors because |∇B|δr δ B and can thus be neglected. This statement remains valid if positional inaccuracies in virtual four-point configurations imposed by time-shift errors δt (in the order of ms) are taken into account, then δr ∼ V δt where V is the spacecraft speed.

Model imperfections
Nonlinear variations of the observable over the spatial region covered by the spacecraft array cause deviations from the assumed linear model, and the spatial gradient is not perfectly uniform. In contrast to the statistical nature of measurement errors and positional errors which become less important for larger inter-spacecraft separation distances, gradient estimation errors due to deviations from linearity tend to increase with spacecraft separations (Robert et al. 1998). In the auroral zone the problem implies that current structures with variation scales (sheet widths) smaller than the array extension cannot be resolved and are effectively smeared out.

Uncertainties of imposed conditions
In the planar spacecraft array case (position tensor has rank 2) where only the inplane component can be directly estimated from the measurements, the constraint equations used to reconstruct the normal gradient may not be perfectly satisfied, producing additional errors. The quality of the normal gradient can be assessed by means of error indicators (Vogt et al. 2009(Vogt et al. , 2013. The assumption that the full gradient is aligned with a given directionê (parallel constraint) can lead to large uncertainties if |ê ×n| is small. The normal gradient estimate resulting from the perpendicular constraint (full gradient perpendicular to a given directionê) should be taken with care if the error indicator |ê ·n| is small. An error indicator for the force-free case that should not become too small is |B 0 ·n|. Since in the auroral zone the magnetic field forms a small angle with the radial vector, the error indicator for the virtual four-point configuration constructed from Swarm dual-spacecraft positions is close to unity and thus well-behaved. Larger uncertainties are expected at low latitudes.

Multi-spacecraft Array Techniques in Practice
The multi-point array techniques of Sect. 4.2 rest on the choice of canonical base vectors. For local LS estimators in the invertible position tensor case and a mesocentric coordinate frame, the canonical base vectors are generalised reciprocal vectors q σ = R −1 r σ . Estimators of the magnetic gradient matrix ∇B and the curl vector ∇ × B are given by Practical aspects of four-spacecraft LS estimators were discussed, e.g., by Chanteur and Harvey (1998), Vogt et al. (2008b), and Vogt (2014). This section is concerned with the implementation and applications of local LS estimators for the planar array case, i.e. three-spacecraft arrays and virtual four-point configuration constructed from the positions of SwA and SwC. Then the canonical base vectors q σ are minimum-norm solutions of Rq σ = r σ , and Eqs. (4.17) and (4.18) produce the in-plane gradient and the normal curl component directly from the measurements. The three-spacecraft LS gradient estimator was tested by Vogt et al. (2009) and applied to Cluster pressure measurements in the magnetail. The dual-satellite LS FAC estimator was validated by Vogt et al. (2013) using Cluster observations of a force-free plasma structure in the solar wind that had previously been studied and characterised in detail by means of multi-spacecraft timing analysis (Vogt et al. 2011). Below in Sect. 4.3.2 we present selected applications of the three-spacecraft and the dual-satellite LS FAC estimator to Swarm magnetic field measurements, after discussing the implementation of local LS estimators for planar arrays in Sect. 4.3.1.

Implementation of Planar Multi-point Array Estimators
Local LS gradient and/or curl estimation using measurements of a planar spacecraft array involves the following steps.

Construction of canonical base vectors
In the planar array case with the position vectors of all spacecraft located in one plane, we first compute the eigenvalues and eigenvectors of the position tensor R, and then construct the pseudo-inverse Q from the two largest eigenvalues ρ 1 , ρ 2 and the corresponding eigenvectorsê 1 andê 2 as (4.19) The eigenvalues are assumed to be in descending order, ρ 1 ≥ ρ 2 ≥ 0, and ρ 3 = 0 because the spacecraft array is planar. The canonical base vectors are q σ = Qr σ (in a mesocentric frame). The procedure works for both the virtual four-point configurations formed by positions of SwA and SwC as well as for three-spacecraft arrays.
In the latter case the canonical base vectors are planar reciprocal vectors (Vogt et al. 2009) that can also be computed using Eq. (4.6). For a thorough discussion of volumetric tensor (1/S) R eigenvectors and eigenvalues in the three-spacecraft case, see Appendix D of Shen et al. (2012b).

Estimation of planar gradient and/or normal current components
Array magnetic field data B σ allow to estimate directly the in-plane component of the gradient matrix as ∇ p B = σ q σ B T , and also the normal component c n of the curl: (4.20) The normal (out-of-plane) current density is given by j n = c n /μ 0 .

Quality indicators of planar gradient and normal current estimates
The stability of the (constrained) matrix inversion that yields the canonical base vectors is controlled by the effective condition number CN(R) = ρ 1 /ρ 2 of the position tensor R.
Error amplification due to the array shape is controlled by the ratio of square length scales L 2 r /L 2 q defined by Eq. (4.16), and directly related to the condition number through see Appendix C for a proof. Hence, CN(R) and L 2 r /L 2 q contain essentially the same information, and for moderately large values are related linearly: CN(R) 4L 2 r /L 2 q − 2. When also the array size is taken into account, error amplification is measured by the square inverse length scale L −2 q = σ |q σ | 2 . The uncertainty of both planar gradient and normal curl estimation is simply given by δ B/L q . Hence in addition to CN(R) also L q should be computed and checked to assess the quality of the estimated derivative.

Construction of the full gradient matrix and/or the full current vector
In order to obtain the full gradient, the component normal to the spacecraft plane has to be constructed in addition to the planar gradient estimate. This can be achieved by means of suitable constraint equations as discussed in Sect. 4.2.2, see also Vogt et al. (2009). The curl vector ∇ × B can then be read directly from the components of the skew-symmetric part of ∇B. In the special case of the force-free condition, the current is parallel to the ambient magnetic field B 0 , and the field-aligned current density j can be computed directly from the normal current density j n through j j n /n ·B 0 . The construction of normal gradients and planar curl components should be critically assessed using error indicators as discussed in Sect. 4.2.5.

Application to Swarm Auroral Crossings
To demonstrate local LS estimation of FACs for planar spacecraft arrays, we select two auroral crossings of the Swarm satellites when SwB was close enough to the SwA-SwC pair for the application of three-spacecraft techniques. Figure 4.5 shows magnetic field measurements of the three Swarm satellites in the Southern hemisphere on 24 July 2014, 02:44-02:50 UT, together with different FAC estimates and quality indicators. Clearly visible are negative parallel (downward) currents between ∼02:47:30 and ∼02:48:00 followed by positive parallel (upward) current until ∼02:48:30. The dual-satellite LS FAC estimates are very close to the Level-2 FAC product J_L2_AC apart from several smaller-scale deviations. They are due to the fact that the Level-2 dual-satellite FAC product is based on filtered Swarm magnetic field observations whereas here the least squares estimator processed unfiltered data as input. The smaller-scale deviations are much less pronounced if the dual-satellite LS estimate of the FAC profile is also computed after application of a suitable filter. The output produced by the three-spacecraft LS estimator, also based on unfiltered magnetic field measurements, also shows smaller-scale variability but otherwise follows the other two profiles quite well apart from an apparent time shift, caused by different mesocentres of the three-spacecraft array and the four-point configuration. Condition numbers for the current structure crossing are moderate (below 5 for the dual-satellite estimator, and not much larger than 10 for the three-spacecraft array). The angle between the ambient magnetic field and the normal direction of the three-spacecraft plane assumes tolerable values far from 90 • . The geometry of the current structure can be further studied using minimum variance analysis (MVA), discussed in more detail in Sect. 4.4 where the analysis procedure and key variables are explained. An important MVA parameter is the eigenvalue ratio that can be interpreted as a measure of planarity. For sufficiently large eigenvalue ratios we can think of the current structure as a sheet, with the eigenvector to the largest eigenvalue being tangential to the sheet. The auroral crossing considered here yields large eigenvalue ratios 29, 20 and 37 for SwA, SwB and SwC, respectively, and sheet orientations that are very consistent within a few degrees for all three satellites.
Data from the second Swarm auroral crossing on 29 May 2014, 13:36-13:44 UT, are displayed in Fig. 4.6. The largest current densities are observed between ∼13:39:30 and ∼13:41:30. Again apart from smaller-scale deviations due to differences in filtering of the input magnetic field measurements, the two dual-satellite FAC estimates (both based on data from SwA and SwC) are very similar. The FAC profile produced by the three-spacecraft LS estimator differs significantly at around 13:41, despite reasonable values of the quality indicators. Closer inspection of the SwB magnetic field profile reveals a substructure at 13:41 that is not present in the measurements of SwA and SwC, indicating non-uniform currents on the interspacecraft separation scale that are inconsistent with the linear model assumption. Eigenvalue ratios are 11, 16, 13 and thus somewhat smaller than for the first crossing, and also the sheet orientations obtained from single-spaceraft MVA show larger differences up to about 10 degrees.

Single-Spacecraft Multi-scale Analysis
Satellite measurements of the magnetic field allow the study of planar geospace structures such as current sheets or boundary layers through the eigenvalues and eigenvectors of the data covariance matrix. This type of principal axis decomposition is known as principal component analysis (PCA) or empirical orthogonal function (EOF) analysis in the statistical literature, and as minimum variance analysis (MVA) in space physics (Sonnerup and Cahill 1967). MVA can be derived using constrained least squares estimation (Sonnerup and Scheible 1998) and is usually applied to the entire geospace structure of interest. (Bunescu et al. 2015(Bunescu et al. , 2017 introduced a multiscale version by applying the MVA procedure using a range of sliding windows, thus producing local estimates of key MVA parameters such as the eigenvalue ratio and the angle characterising sheet orientation. The novel multi-scale version of MVA is described below in Sect. 4.4.2, followed by an application to Swarm magnetic field measurements in Sect

MVA Applied to Auroral Current Sheets
Since the magnetic field B is solenoidal (divergence-free), planar magnetic structures varying only in one spatial directionn satisfy thus B n =n · B is constant. Assuming that any observed variability alongn is due to sufficiently small random errors, the eigenvector to the smallest eigenvalue of the data covariance matrix is a proxy ofn. MVA applied to magnetic field data is sometimes termed MVAB. The method can be used also for other conserved plasma variables, see Sonnerup and Scheible (1998).
The quality ofn estimates is associated with eigenvalue ratios. In the case of auroral FAC sheets, magnetic perturbations are in the plane perpendicular to the ambient magnetic field. The problem reduces to two spatial dimensions with two relevant eigenvalues λ 1 ≥ λ 2 and two eigenvectorsê 1 ,ê 2 . The eigenvalue ratio λ 1 /λ 2 can be understood as a measure of planarity and should be sufficiently large. The sheet orientation is given by tangential vectorsB 0 (direction of the ambient magnetic field) andê 1 , and the normal unit vectorn =ê 2 . The orientation of auroral current sheets can be concisely characterised by the (inclination) angle formed by the sheet normal with magnetic north, or the spacecraft velocity vector (approximately geographic north for polar orbiting satellites such as CHAMP or Swarm).

Multi-scale Field-Aligned Current Analyzer
The multi-scale and continuous (local) variant of MVAB introduced by Bunescu et al. (2015Bunescu et al. ( , 2017, termed MS-MVA, can be summarised as follows: • A range of window widths w with linear resolution dw is defined. • At each time t of the magnetic field series, MVA is applied to an array of data segments of width w within a predefined range and centred at t, thus yielding a series of key MVA parameters λ 1 = λ max , λ 2 = λ min , R λ = λ 1 /λ 2 (eigenvalue ratio), and an inclination angle. All parameters are functions of time t and scale w. • In addition to these MVA parameters, the derivative of the largest eigenvalue λ 1 = λ max with respect to scale w is computed numerically to yield ∂ w λ max . • The continuous and multi-scale MVA parameters are displayed as functions of time t and scale w in a suitable two-dimensional graphical representation, either as a contour plot and/or using an appropriate colour bar. Important scales are found to show up well in colour plots of ∂ w λ max .
MS-MVA was validated using synthetic data and measurements of the Cluster and FAST satellites. Shown are the magnetic field measurements of SwA (panels 1 and 5), the eigenvalue ratio R λ (panels 2 and 6), the R λ (panels 2 and 6), the derivative ∂ w λ max (panels 3 and 7) and the current sheet inclination (panels 4 and 8) Figure 4.7 shows the MS-MVA results for the two Swarm auroral crossings considered already in Sect. 4.3.2. In both cases, MS-MVA was applied to magnetic field data from SwA (panels 1 and 5), here given in the mean-field-aligned (MFA) coordinate frame (note that in Figs. 4.5 and 4.6 the magnetic field was displayed in NEC coordinates). The eigenvalue ratio R λ is displayed in panels 2 and 6. The current sheet inclination is shown in panels 4 and 8. The multi-scale nature of the FAC sheets is visualised very clearly in the panels 3 and 7 showing ∂ w λ max .

Summary
The local least squares approach to the estimation of spatial derivatives from multispacecraft magnetic field measurements yields a generic framework for the analysis for auroral FACs and their errors. This report reviewed the underlying principles, estimation procedures, uncertainties, limitations, and practical aspects. The array geometry defines the position tensor with eigenvalues controlling the quality of gradient and curl estimates. Linear estimators can be uniquely qualified through their set of canonical base vectors, facilitating error analysis and comparison with alternative approaches. In planar spacecraft array configurations, reconstruction of the full gradient and curl vectors requires additional information that can be supplemented in the form of geometrical or physical constraints. The multi-scale nature of auroral currents can be investigated using a multi-scale version of the well-established minimum variance analysis. Analysis techniques were illustrated using selected auroral crossings of the Swarm satellites. m, and the best approximation in the least squares sense is given by minimising the total square deviation χ 2 ∝ |d − m| 2 = |r| 2 , where the square norm derives from a scalar product that may be designed to account for non-constant errors and possibly correlated observations through an error covariance matrix. In this sense, the best model vector minimises the (square) distance to the data vector. Furthermore, the best model satisfies the The matrix M ils is the pseudo-inverse of M in the least squares sense. The problem simplies further in the case of mutually orthogonal basis functions, then the amplitudes are given by a ν = f ν /|f ν | 2 · d where a vector f ν comprises the predictions of the basis function f ν , typically obtained through evaluation at the S independent variables (usually spatial coordinates, possibly combined with auxiliary parameters) corresponding to the measurements.

Appendix B: Accuracy of Linear Curl Estimators
Consider a linear estimator of the form with vectors q σ that are functions of the spacecraft positions but do not depend on the measurements B σ . The associated linear variation is given by δc = σ (q σ × δB σ + δq σ × B σ ) . (4.26) In the case of Swarm, the typical positional inaccuracy δr and instrumental error δ B are such that the second term can be dropped because in the auroral zone |∇B|δr δ B, see Vogt et al. (2013).

Appendix C: Condition Number of a Planar Position Tensor
In order to show that the product of L −2 q = σ |q σ | 2 (inverse square gradient estimation error length) and L 2 r = 1 4 σ |q σ | 2 1/2 (mean square inter-spacecraft distance) is in the planar spacecraft array case related to the effective condition number of the position tensor R through Eq. we work in a mesocentric coordinate frame to express the position vectors r σ and the position tensor R = σ r σ r T σ , thus L 2 r = 1 4 trace(R). The eigenvalues ρ 1 ≥ ρ 2 ≥ ρ 3 and corresponding eigenvectorsê 1 ,ê 2 ,ê 3 of R yield the alternative representation R = k ρ kêkê T k . Since the spacecraft configuration is assumed to be planar, R has rank 2, thus the third eigenvalue ρ 3 is zero, (4.33) and L 2 r = 1 4 trace(R) = 1 4 (ρ 1 + ρ 2 ). The effective condition number CN(R) in the construction of the pseudo-inverse is CN(R) = ρ 1 /ρ 2 . We further note that by defintion of q σ = Qr σ , σ q σ q T σ = σ Qr σ r T σ Q T = QRQ T = Q (4.35) because the operator Q = Q T acts only in the spacecraft plane (spanned by the two eigenvectorsê 1 andê 2 ), and QR yields the identity operation on that plane. Therefore,  and finally cosh ln CN(R) = 2L 2 r /L 2 q − 1.
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.