The MAVEN Magnetic Field Investigation

The MAVEN magnetic field investigation is part of a comprehensive particles and fields subsystem that will measure the magnetic and electric fields and plasma environment of Mars and its interaction with the solar wind. The magnetic field instrumentation consists of two independent tri-axial fluxgate magnetometer sensors, remotely mounted at the outer extremity of the two solar arrays on small extensions (“boomlets”). The sensors are controlled by independent and functionally identical electronics assemblies that are integrated within the particles and fields subsystem and draw their power from redundant power supplies within that system. Each magnetometer measures the ambient vector magnetic field over a wide dynamic range (to 65,536 nT per axis) with a resolution of 0.008 nT in the most sensitive dynamic range and an accuracy of better than 0.05 %. Both magnetometers sample the ambient magnetic field at an intrinsic sample rate of 32 vector samples per second. Telemetry is transferred from each magnetometer to the particles and fields package once per second and subsequently passed to the spacecraft after some reformatting. The magnetic field data volume may be reduced by averaging and decimation, when necessary to meet telemetry allocations, and application of data compression, utilizing a lossless 8-bit differencing scheme. The MAVEN magnetic field experiment may be reconfigured in flight to meet unanticipated needs and is fully hardware redundant. A spacecraft magnetic control program was implemented to provide a magnetically clean environment for the magnetic sensors and the MAVEN mission plan provides for occasional spacecraft maneuvers—multiple rotations about the spacecraft x\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$x$\end{document} and z\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$z$\end{document} axes—to characterize spacecraft fields and/or instrument offsets in flight.


Introduction
The Mars Atmosphere and Volatile EvolutioN (MAVEN) mission seeks to understand the history of climate change on Mars by studying the present state of the Mars upper atmosphere and ionosphere, and the processes governing atmospheric loss to space . Mars has a thin and dusty atmosphere comprised primarily of carbon dioxide (96 %), argon (∼2 %) and nitrogen (∼2 %) with traces of carbon monoxide, water, oxygen, and other gases. The temperatures and pressures in the Mars lower atmosphere are comparable to those found in the Earth's stratosphere. With a surface pressure of only about 1 % of Earth's, and temperatures well below 273 K, it is difficult to reconcile the thin atmosphere we see today with the geological evidence (channels, valley networks, erosional features, small scale layering, and aqueous mineralogy) that suggest water flowed on Mars until about 4 billion years ago (e.g., Carr 1996;Hoke et al. 2011;Bibring et al. 2006).
The preponderance of geologic evidence suggests that early Mars had a warm and dense atmosphere and perhaps an ocean, if not standing water, persisting for a geologically significant period. If so, where is this water today, and what became of the dense atmosphere? Mars is not so massive as to trap volatile species indefinitely, so while loss processes remain poorly understood, atmospheric loss to space is a prime candidate for their removal. Indeed, ample evidence of an enrichment of heavy isotopes ( 15 N/ 14 N, 38 Ar/ 36 Ar, and D/H) in the atmosphere (Jakosky and Phillips 2001;Mahaffy et al. 2013) and direct measurements of escaping ions made by orbiting spacecraft (Barabash et al. 2007;Nilsson et al. 2011) implicate loss to space as a significant, if not dominant, loss mechanism throughout Mars history.
The Mars atmosphere no longer enjoys the protection from the solar wind afforded by the presence of a global magnetic field of appreciable magnitude. However, early Mars did have an Earth-like magnetic field of sufficient strength to shelter the atmosphere from the solar wind (Acuña et al. 1998(Acuña et al. , 2001. So it is tempting to speculate that a warm and dense Mars atmosphere existed within the protection afforded by an early Mars dynamo, and the demise of the dynamo, some 4 billion years ago, exposed the atmosphere to stripping by the solar wind. Had Mars retained a dynamo, would it be more habitable today? To answer this question we need understand the processes at work in the Mars atmosphere, and how to use that knowledge to infer the evolutionary history of the atmosphere. The MAVEN spacecraft will spend more than a Mars year in polar orbit, sampling the Mars space environment with a full suite of in-situ and remote sensing instruments . These instruments are designed to provide the measurements necessary to characterize the upper atmosphere and ionosphere; quantify the current rate of escape of atmospheric constituents under a variety of solar wind conditions; and by backward extrapolation (more accurately, modeling) quantify the total atmospheric loss to space throughout Mars history. In looking back through time, we must bear in mind that our young Sun was likely far more active in the extreme ultraviolet than at present, and characterized by dramatically more violent outflows than we see today. The MAVEN prime mission is designed to observe the solar wind interaction with Mars during the declining phase of the current solar cycle, which thus far appears unremarkable but for a relatively weak sunspot activity.

Mars Magnetic Field
The discovery of the intense magnetization of the Mars crust is one of the most remarkable findings of the exploration of Mars, and one of the most illuminating. The Mars Global Surveyor (MGS) mission established that Mars has no global magnetic field, and therefore no dynamo at present, but it must have had one in the past when the crust acquired intense remanent magnetization. It is likely that a molten iron core formed early, after or during hot accretion 4.5-4.6 Ga, and for at least a few hundred million years a substantial global field was generated by dynamo action in the core. The chronology proposed by  attributes the global distribution of magnetization to the early demise of the dynamo, prior to the last great impacts (∼4 Ga) that left large unmagnetized basins in the crust. This view has been supported by more complete analyses of the large impact basins (Lillis et al. 2008a(Lillis et al. , 2008b(Lillis et al. , 2013, leading to more precise estimates of the dynamo's demise. It appears that dynamo generation of the global magnetic field was extinguished before formation of Hellas and Utopia basins approximately 4.0-4.1 Ga. Early onset and cessation of the dynamo is difficult to reconcile with the notion of a dynamo driven by solidification of an inner core (Schubert et al. 1992), the preferred energy source for the Earth's dynamo. Alternatively, an early dynamo can be driven by thermal convection, with or without plate tectonics, for the first 0.5-1 Gyr (Breuer and Spohn 2003;Schubert and Spohn 1990;Stevenson et al. 1983;Connerney et al. 2004), persisting as long as the core heat flow remains above a critical threshold for thermal convection (Nimmo and Stevenson 2000). With knowledge that Mars had a substantial global magnetic field billions of years ago, it is quite natural to consider whether the Mars atmosphere may have been sheltered from the solar wind for a geologically significant period. In the dynamo era, Mars may have retained a warm and dense atmosphere, only to lose it subsequent to decay of the global field. Did the Mars dynamo prevent loss of atmosphere to space?
There is also a supply side argument to be made on behalf of the Mars dynamo, if only indirectly. The supply side argument follows from interpretation of the crustal magnetic imprint within the framework of plate tectonics. A planetary dynamo is driven by vigorous convective motions in the core, resulting from a temperature gradient across the core-mantle boundary. The thermal gradient persists as long as an efficient cooling mechanism (e.g., mantle convection, and plate tectonics) is maintained. Following this line of thought, the demise of the dynamo may be associated with cessation of plate tectonics. On Earth, we associate plate tectonics with active geological processes: crustal subduction, mantle convection, active volcanism, and consequently venting of gases from the interior. This is the rationale for a supply side argument: maintenance of a dense atmosphere via the active geologic processes associated with mantle convection, subduction, and volcanism.
After more than 2 full Mars years of mapping operations, MGS produced an unprecedented global map of magnetic fields due to remanent magnetism in the crust (Connerney et al. 2005). An updated and improved version of this map, using the full set of data acquired during the MGS mission, appears in Fig. 1. This map reveals contrasts in magnetization that appear in association with known faults; variations in magnetization clearly associated with volcanic provinces; and magnetic field patterns reminiscent of transform faults at spreading centers (Connerney et al. 2005). Connerney et al. proposed that the entire crust acquired a magnetic imprint via crustal spreading and cooling in the presence of a reversing dynamo; and that erasure of this imprint occurred where the crust was buried (thermal demagnetization) by flood basalts to depths of a few km. Transform faults are unique to plate tectonics, Fig. 1 Map of the magnetic field of Mars observed by the Mars Global Surveyor satellite at a nominal 400 km altitude (after Connerney et al. 2005). Each pixel is colored according to the median value of the filtered radial magnetic field component observed within the 1/2°by 1/2°latitude/longitude range represented by the pixel. Colors are assigned in 12 steps spanning two orders of magnitude variation. Where the field falls below the minimum contour a shaded MOLA topography relief map provides context. Contours of constant elevation (−4, −2, 0, 2, 4 km elevation) are superimposed so if these features are indeed transform faults then the Mars crust formed via sea floor spreading as on Earth Sleep 1994).
The magnetic record is complemented by geomorphological analyses that are suggestive of plate tectonics having occurred on Mars early in its history. The alignment of the great volcanic edifices on Mars is consistent with plate motion over a mantle plume (Connerney et al. 2005) or, conversely, volcanic chains formed above subducting slabs (Sleep 1994;1994;Yin, personal communication 2012). The topographical relief along much of the dichotomy boundary has been interpreted as a series of ridge/transform fault segments (Sleep 1994). A recent structural analysis of the Valles Marineris fault zone (Yin 2012) likens this trough system to the left-slip, transtensional Dead Sea fault zone on Earth: an undisputed plate boundary. It is difficult to understand how such a structure evolved on Mars in the absence of plate tectonics.
Is it possible that a warm and dense atmosphere on Mars was supplied by outgassing associated with plate tectonics? If so, the Mars dynamo may have been instrumental in both the supply and maintenance of an early dense atmosphere. The fate of Mars' atmosphere may well be inseparable from cessation of plate tectonics and the demise of the dynamo; a marker for the evolution of Mars as a planet.

Interaction with the Solar Wind
Mars stands as an obstacle to the solar wind, the high velocity (supersonic) stream of plasma emanating from the Sun. The expanding solar wind drags the frozen-in interplanetary magnetic field (IMF) along with it, and forms a multi-tiered interaction region about Mars as  Brain et al. 2015). The solar wind carries with it the interplanetary magnetic field (yellow) as it streams (dashed lines) toward the bow shock (green) upstream of Mars. Intense crustal magnetic fields (orange) impose structure throughout localized regions of the upper atmosphere and ionosphere it interacts with the extended atmosphere and electrically-conducting ionosphere (Fig. 2). The characteristics of the solar wind interaction with a weakly magnetized, or unmagnetized body are in some regards similar to the flow about a magnetized planet (Luhmann et al. 1992;Brain 2006), but for the lack of a global-scale magnetosphere within which the motion of charged particles is governed by an intrinsic planetary magnetic field.
Since the solar wind is supersonic, a bow shock forms upstream of Mars (Fig. 2). The slowed, shocked solar wind flows around the obstacle within the magnetosheath, a turbulent region (Espley et al. 2004) bounded by the bow shock and a lower boundary, often referred to as the magnetic pile-up boundary (Bertucci et al. 2003), or alternatively the induced magnetosphere boundary (e.g., Brain et al. 2015) or induced magnetopause. It marks the narrow transition between plasma dominated by ions of solar wind origin and plasma dominated by ions of planetary origin; it is often approximated by a paraboloid of revolution about the planet-Sun line. The magnetic field extends well downstream in the anti-sunward direction, in effect draped around the conducting obstacle, to form the magnetotail, by analogy with the magnetotail that forms downstream of a magnetic planet. A magnetic planet imposes a geometry and polarity on the field in its magnetotail, whereas the magnetotail formed downstream of an unmagnetized body changes direction in response to changes in the direction of the interplanetary magnetic field.
However, Mars is neither an unmagnetized body, such as Venus, nor a magnetized body, like Earth. Where the Mars crust is intensely magnetized it can establish order over scale lengths of hundreds of kilometers much in the way the Earth's field does. In the Earth's upper atmosphere and ionosphere, a complex system of currents flow in response to solar heating of the atmosphere, particularly where horizontal magnetic fields Fig. 3 Plane projection of the magnetic field geometry above the intensely magnetized southern highlands based on the crustal magnetic field model of . This figure illustrates the field geometry that would be encountered during periapsis passes along a line of constant longitude (near 150 degrees east) and centered at 50 degrees south latitude. Similar "mini-magnetospheres" may be encountered above much of the magnetized crust, depending on spacecraft altitude and solar wind conditions are encountered (equatorial fountain effect and electrojet), and in response to the imposition of electric potentials (in particular, auroral ovals). By analogy to magnetized planets, field-aligned currents, called Birkeland currents, flow along the magnetic field and deposit energy into the electrically conducting ionosphere, particularly during solar storms, leading to auroral displays. Auroral emissions have been observed on Mars (Bertaux et al. 2005;Lundin et al. 2006;Brain and Halekas 2012) in association with the most intensely magnetized regions of the southern highlands. On Earth, and other planets with (dipolar) magnetic fields, auroral displays are most often observed in the polar regions. In contrast, on Mars, auroral emissions are observed in association with intense crustal magnetic fields that are strong enough to sustain magnetic fields to great heights, well above the ionosphere. Figure 3 illustrates the complexity of the magnetic field observed in a meridian plane projection over the southern highlands, extending throughout the Mars upper atmosphere and ionosphere. The MAVEN spacecraft will sample the magnetic field and plasma environment throughout this region from about 120 km upwards, during "deep dip" campaigns and nominal orbital operations.
The crustal fields are strong enough to dramatically alter the nature of the interaction with the solar wind, as can be seen in the multi-fluid magnetohydrodynamic simulation (Dong et al. 2014) illustrated in Fig. 4. Field magnitudes are appreciably larger in regions of strong crustal fields than they would otherwise be, creating "mini-magnetospheres" where charged particle motion is guided by persistent, and stable, magnetic geometries. The geometry imposed by strong crustal fields dictates where field lines threading the ionosphere link with the solar wind and distant plasma environments, giving rise to deposition of energy and aurorae. The strong crustal fields can also impose a polarity and geometry in the magnetotail as they are drawn tailward by the solar wind (Brain et al. 2010). Numerical simulations have amply demonstrated that the strong magnetic fields associated with the southern highlands have a shielding effect that reduces the ion escape flux (Ma et al. 2004;Dong et al. 2014).  (Dong et al. 2014). Upper left panel is a meridian plane projection of the magnitude (color) and direction (arrows) of plasma velocity near Mars. Lower left panel shows the simulated magnetic field lines and magnetic field magnitude (colors) in meridian plane projection. Large field magnitudes very near the planet's surface are due to strong crustal magnetic fields, primarily in the southern hemisphere, but strong fields due to the solar wind interaction are also encountered at altitude on the day side of the planet. Rightmost panels illustrate flow velocity (upper) and magnetic field magnitude (lower) in greater detail and unencumbered by flow and field vectors In collisionless plasmas, waves provide one of the main ways of distributing energy across the system. Ion cyclotron waves are produced when ions move in resonance with the magnetic fields. This produces fluctuations in the magnetic field with frequencies that depend on the mass and charge state of the ions producing them. Additionally, the highly turbulent Martian magnetosheath offers an unusual plasma environment where nonlinear (i.e. δB ∼ |B|) kinetic plasma modes develop (Glassmeier and Espley 2006). Some groups have examined the role that plasma wave heating may play in the escape of atmosphere (Ergun et al. 2006;Andersson et al. 2010) but this task will be easier once the full Poynting flux is available using data from both the MAVEN MAG and LPW instruments.
Magnetic reconnection is another important plasma process that may play an important role in bulk atmospheric escape (Brain et al. 2010). Magnetic reconnection may occur when anti-parallel (or nearly so) magnetic fields are brought together in a plasma, resulting in a localized exception to the frozen-in condition of the magnetic field. This allows magnetic fields to reconfigure ("reconnect") and in the process magnetic energy is converted into thermal energy. Energization of the plasma can enhance atmospheric escape but the geometrical consequences of reconnection could be at least as important. The reconfiguration of the magnetic field may allow field lines that were connected to the IMF to lose that connection; conversely, reconfiguration may at times facilitate continuity with the IMF. Halekas et al. (2009) found many observations indicative of reconnection at Mars, suggesting that reconnection may not be uncommon. The first of its kind, fully instrumented particles and fields package (PFP) onboard MAVEN will allow careful investigation of this possibility.
The measurement of magnetic fields at Mars is therefore important to a variety of interrelated scientific topics, all bearing on the processes that control atmospheric loss to space. Characterizing the magnetic fields throughout the interaction region provides a framework to help us understand the complex solar wind interaction with Mars (atmosphere, ionosphere, crustal magnetic sources, and conducting interior). In addition, the magnetic field magnitude and geometry are critical for understanding the trajectories of potentially escaping charged particles. The MAVEN Magnetic Fields Investigation plays an important role in understanding the role of plasma waves, reconnection, and bulk plasma structures in facilitating atmospheric escape and more broadly in the dynamics of the solar wind interaction.

Science Requirements
The magnetometer investigation (MAG) driving requirements benefit from a detailed knowledge of the magnetic field environment that MAVEN will transit, a consequence of the Mars Global Surveyor magnetic mapping and aerobraking passes. The MAVEN MAG requirements are sourced from the MAVEN Mission requirements document, Level 3 PFP functional requirements (Particle & Fields functional requirements document), and Level 4 functional requirements. A relevant subset of the MAG instrument requirements are listed as follows: • Measure the magnitude and direction of the ambient magnetic field; • Provide the vector magnetic field (via broadcast vector) to other science payloads in flight; • Encompass a dynamic range of measurement from 3 nT to 3000 nT; • Provide measurement accuracy and resolution of 1 % or better; • Sample rate sufficient to provide temporal resolution of 20 seconds or better; • Provide complete hardware redundancy of the magnetic field measurement; • Sensor orthogonality and alignment knowledge to 0.25 degrees or better; • Provide non-magnetic a/c heaters for sensor thermal control, operating and non-operating.
A more complete study of the magnetic field magnitudes that MAVEN may sample, between target altitudes of 125 and 400 km, was performed to optimize the choice of instrument dynamic ranges. Since MAVEN's mission plan does not target specific latitudes/longitudes, we need be prepared for the maximum field magnitude that might be experienced above the surface of the planet at altitudes in excess of ∼100 km. This study used the extensive MGS database and demonstrated that a dynamic range of 512 nT might only rarely be exceeded during the entire mission, including the "deep dip" orbits. The magnetometer system provided as part of the Particles and Fields Package meets and exceeds the Project requirements with a pair of independent magnetic sensors with the performance characteristics listed in Table 1.

Investigation Design
The MAVEN particles and fields instrumentation form an ensemble of instruments ("Particles and Fields Package") controlled by a single hardware-redundant data processing unit (PFDPU) interfacing to the spacecraft. The PFP (Fig. 5) services the Solar Wind Electron Analyzer (SWEA) instrument (Mitchell et al. 2014), the Solar Wind Ion Analyzer (SWIA) instrument , the Langmuir Probe and Waves (LPW) instrument (Andersson et al. 2015), the Extreme Ultraviolet (EUV) instrument, the Solar Energetic Particles (SEP) instrument, and the SuperThermal And Thermal Ion Composition (STATIC) instrument (McFadden et al. 2015) in addition to the Magnetometer instrumentation (MAG). The MAVEN magnetic field investigation (MAG) consists of two independent and identical fluxgate magnetometer systems that are interfaced to and controlled by the PFDPU. The particles and fields electronics package is a stack of individual electronics boxes (Fig. 6) that service each of the instruments; two of the "slices" are occupied by identical magnetometer electronics frames that service the two magnetometer sensors. Each electronics box is fully shielded and each draws power from the redundant power supplies within the PFP. Individual and independent a/c heater electronics assemblies provide thermal control for the MAG sensors and are also accommodated on separate cards elsewhere within the PFP. These are powered directly by the spacecraft, providing uninterruptible power for sensor thermal control regardless of the state (on or off) of the PFP. The a/c heaters are proportional controllers that maintain sensor temperature within comfortable operational limits. They are designed to insure that no dc currents can circulate in the resistive heater elements that are The magnetometer sensors are located at the very end of the solar array panels on modest extensions (.66 m in length) designated as MAG "boomlets", placing them approximately 5.6 m from the center of the spacecraft body (Fig. 7). Magnetometer sensors are best accommodated remotely, as far from spacecraft subsystems as is practical, to minimize the relative contribution of spacecraft-generated magnetic fields. Care is taken to minimize the magnetic signature of spacecraft subsystems, of course, but one of the most effective ways to reduce spacecraft-generated magnetic fields is to separate spacecraft systems and sensor, taking maximum advantage of the 1/r 3 diminution of a magnetic (dipole) source with distance from the source. Thus magnetometer sensors are often accommodated on a lengthy dedicated magnetometer boom that is deployed after launch. Alternatively, they may be accommodated at the outer extremity of the solar arrays, taking advantage of an essential appendage that also deploys post-launch. MAVEN took the latter approach, much as its predecessor Mars Global Surveyor did (Acuña et al. 2001). In typical implementations, a pair of magnetic sensors ("dual magnetometer technique") provides hardware redundancy as well as a capability to detect magnetic fields at two locations on the spacecraft. This capability offers the potential to monitor spacecraft generated magnetic fields in flight, by comparison of the field measured by each sensor. When both sensors are mounted along a radius vector on a dedicated magnetometer boom, one "outboard" and one "inboard", one can take advantage of the 1/r 3 diminution of the (dipolar) field of the spacecraft with distance along the boom to identify local sources and separate the fields due to local sources from the ambient field. The outboard sensor is typically allocated the majority of the spacecraft telemetry allocation for the investigation, and sampled at a higher rate than the inboard sensor, anticipating a spacecraft field that changes slowly in time (this is not always the case!). Thus the outboard sensor is the primary sensor, and the inboard sensor is the secondary sensor, though in many implementations their role may be reversed if desired.
The MAVEN magnetometer sensors are located on the +Y spacecraft solar array ("outboard") and the −Y spacecraft solar array ("inboard"). The assignment is arbitrary, and in keeping with prior missions (Mars Observer, Mars Global Surveyor) and software heritage; you may prefer to think of the +Y sensor as the primary sensor, and −Y as the secondary sensor. In reality, they are identical, and each sensor is capable of performing either role. It was anticipated that the +Y sensor ("outboard" or primary sensor) location would be preferred over the −Y sensor location, from a spacecraft magnetic interference perspective, by virtue of the location of various components on the body of the spacecraft (reaction wheels in particular). Thus the +Y sensor was designated as primary sensor ("outboard"), and −Y sensor as secondary sensor; observations of the magnetic field during cruise operations confirmed this expectation. In early cruise, the inboard or secondary sensor was sampled at a lesser rate, but as of June 2014, our current practice is to utilize the same sample rate for both sensors for diagnostic purposes.

Spacecraft Requirements
Instrument accommodation is always of concern for a magnetometer investigation, extending beyond the mechanical and thermal interfaces discussed above. Since the magnetometer sensors measure the ambient magnetic field, any appreciable spacecraft-generated magnetic fields may interfere with accurate measurement of the environmental field. The magnetic field produced by the spacecraft is managed via a spacecraft magnetic control plan that tracks the expected magnetic field at the sensor locations, and manages the net field at the sensors to meet a requirement appropriate to the mission. In recognition of the relatively weak field of the solar wind at Mars, the Project adopted a spacecraft magnetic field requirement not to exceed (NTE) 2 nT static and 0.25 nT variable. The static field is allocated a larger limit because with periodic spacecraft maneuvers a static magnetic field may be periodically measured in flight and corrected for analytically.

Spacecraft Magnetic Control Plan
During the spacecraft design phase, and through assembly, test, and launch operations (ATLO), a magnetic model of the spacecraft was maintained as part of the spacecraft magnetic control program. This model accounts for the location and magnetic moment of spacecraft components and subsystems, and provides an estimate of the resultant spacecraft magnetic field, summed vectorially over its many parts, at the magnetometer sensor locations. The model is a management tool, used to help allocate a fraction of the total not-to-exceed (NTE) spacecraft magnetic requirement to various subsystems and to guide mitigation where necessary. For example, when preliminary magnetic testing of the reaction wheel assemblies (RWA) indicated that they would contribute excessively to the variable (ac) spacecraft field, the Project responded with magnetic shielding enclosures for the RWAs that lessened their contribution to the field at the MAG sensors by about an order of magnitude.
Spacecraft components, subsystems, and instruments were characterized by magnetic test at the Lockheed Martin (LM) Waterton Canyon facility or at subcontractor facilities. Test articles included engineering models that were available early in the program and for some subsystems and instruments, flight or qualification models. The solar arrays were carefully designed with compensation loops to null the magnetic signature of the array under illumination. This was accomplished by compensating each individual cell string with a matched compensation loop on the underside of the panel ("backwiring"). Verification testing of the solar array compensation scheme was performed on a qualification panel tested at LM's Sunnyvale facility. This test consists of exciting the compensated string with a square-wave current and measurement of the resultant magnetic field with a magnetic gradiometer, using synchronous detection to accurately determine the response in an industrial environment. The actual flight arrays did not receive active magnetic testing although the arrays and array extensions ("boomlets") did undergo magnetic screening (with a sensitive magnetic gradiometer) for magnetic remanence (magnetic "sniff test"). This testing is done on the flight article, and any objects (hardware, thermal blankets, etc.) installed near the end of the array, to avoid magnetic contamination near the sensor.
The entire spacecraft underwent additional testing prior to shipment to the launch site. One test ("swing test") was performed to provide an estimate of the net spacecraft magnetic moment, and another ("magnetic compatibility test") was performed to measure the magnetic field produced by systems and components when activated. The swing test, as the name implies, consists of measuring the variation in magnetic field observed by a static magnetic sensor as the spacecraft, suspended at the end of a lanyard, executed pendulum motion. This motion provides a clear periodic signal that is easily distinguished from background in an industrial facility. A rotation test was also performed, in which the suspended spacecraft was rotated in the presence of the magnetic sensor, to identify the location of magnetically "hot" components. For the magnetic compatibility test, the magnetic field was monitored as various subsystems were energized, to characterize the resultant magnetic signature. During one of these tests, we identified dc heaters in the propulsion system that had not been compensated properly; Project was able to reconfigure the operation of these heater circuits prior to shipment to reduce the stray field to acceptable levels. Additional detail on the MAVEN spacecraft magnetic control plan, its implementation and verification, is provided in the companion paper by .

Instrument Description
The GSFC fluxgate magnetometer meets and exceeds the vector measurement requirement with a simple and robust instrument with extensive flight heritage. The MAVEN magnetometer design draws from Goddard's extensive flight experience, with over 78 magnetometers developed for space research and built at GSFC (e.g., Voyagers 1 and 2, Pioneer 11, Giotto, Lunar Prospector, Mars Observer, Mars Global Surveyor, MESSENGER, STEREO, WIND, ACE, AMPTE, TRMM, Freja, Viking, UARS, DMSP, Firewheel, MAGSAT, POGS, RBSP, and Juno). All are based on fluxgate designs developed by Mario Acuña at GSFC. The MAVEN sensors cover the modest dynamic range requirement with two instrument ranges that will be used in the Mars environment (±512 nT and ±2048 nT full scale). The instrument also has a high dynamic range (65,536 nT full scale) that is useful in integration and test, permitting operation in ambient field in an Earth field environment without resort to magnetic shielding or nulling devices.

Principle of Operation
The fluxgate magnetometer is a simple, robust sensor capable of very high vector accuracy while requiring only modest resources (Acuña 2002). The principle of operation is illustrated with the help of the simplified schematic (Fig. 8) that describes a generic, single axis fluxgate magnetometer utilizing a ring core sensing element. The sensing element is a high permeability ring formed by wrapping a thin tape of 6-81 molybdenum permalloy onto a non-magnetic Inconel hub. This material is nickel-iron alloy with about 81 % nickel and 6 % molybdenum content, the remainder iron, with a magnetic permeability of order 100,000.
The "fluxgate" works by driving this sensing element cyclically into saturation by exciting a toroidal winding at a drive frequency, typically about 15 kHz. The core saturation "gates" the ambient magnetic flux threading the sensing coil, as the core permeability alternates between very high, in the unsaturated state, and very low, in the saturated state. Core saturation occurs at twice the drive frequency, modulating the ambient flux at twice the drive frequency, and inducing a voltage in the sensing coil at 2f , which is amplified and passed to a synchronous detector. The synchronous detector is essentially a lock-in amplifier, using as a reference the second harmonic of the drive frequency, all derived from a stable crystal controlled oscillator. The output of the detector is fed back to the sense coil to drive the field in the sensor to zero, which results in a sensor with very high linearity. The output voltage is linearly related to the ambient field aligned with the axis of the sense/feedback coil. Several dynamic ranges may be implemented by selection of different feedback resistors using field effect transistors to perform the switching function.
A vector instrument ( Fig. 9) incorporates three single axis analog circuits like that shown schematically in Fig. 8, or possibly four if a redundant axis is included. The three component (x, y, z) analog outputs are sampled on the same clock transition 32 times each second by dedicated 16-bit Analog-to-Digital Converters (ADC) that follow anti-aliasing single pole low pass filters (−3 dB at 16 Hz). All four ADCs are controlled by, and read by, a digital processor that formats the data for transfer to the PFPDPU, along with housekeeping data (temperatures, voltages, current measurements) sampled sequentially by a fourth dedicated engineering ADC.
The MAVEN sensor (Figs. 10 and 11) utilizes two ring core sensing elements, each of which sits inside of a pair of nested sense/feedback coils. This design uses the pair of orthogonal sense/feedback coils to detect both components of the magnetic field in the plane of the ring core, and to null the field in the plane of the ring core. Since each sensor element measures the field in two orthogonal directions, one may either have a redundant measure of the field along one axis or one may simply drive the redundant sense/feedback coil to null with the output from the companion sensor. The MAVEN magnetometers use this approach to null the field along the redundant axis. This design achieves superior linearity in strong fields relative to designs using single axis sense/feedback coils and it uses only two ring core sensing elements instead of the three required for a vector instrument otherwise. Each sensor assembly (Fig. 12) is permanently mated to an optical cube that defines the reference coordinate system for the sensor.

Analog Design
The FGM electronics (analog and digital) for each magnetometer are mounted in a single card frame in the PFP stack (Fig. 13). The thermal controllers for the sensors are mounted back-to-back on a small circuit board stiffener (Fig. 14) mounted elsewhere in the PFP (instrument interface board) to avoid the possibility of interference with sensitive analog circuitry. The MAVEN magnetometer electronics were developed with many Simplified block diagram of one of the two identical MAVEN vector magnetometers. The tri-axial fluxgate sensor (left) is mounted on the MAG "boomlet" at the end of the solar array and harnessed to the electronics package mounted in the spacecraft body. The analog and digital electronics (right shaded portion) is contained on a single multilayer electronics board that is contained in a shielded enclosure (frame) within the PFP assembly of the same electronics parts used for the Juno instrument, which was built to operate in a more demanding radiation environment; as such, the MAVEN instrument substantially exceeds the mission radiation requirement. The sensor assembly is passive and radiation tolerant.
A common drive circuit in the analog electronics drives the two sensor ring cores cyclically into saturation using a dedicated toroidal winding on each ring core. The ambient magnetic field in each sensor is sensed by synchronous detection of the second harmonic of the drive frequency, the presence of which reveals an imbalance in the response of the permeable ring core due to the presence of an external field (Acuña 2002). As with any fluxgate, care must be taken to insure that the spacecraft does not generate interference at harmonics of the drive frequency which could confuse the signal otherwise attributed to an ambient magnetic field. The two magnetometers operate independently, and to ensure that one does not interfere with the other, they are driven at different frequencies derived from the master clock. Flight model 1 (FM1) uses a drive frequency of 15.2 kHz, and flight model 2 (FM2) uses a drive frequency of 16.3 kHz. This results in ample separation of the second harmonic frequencies (30.4 kHz for FM1, 32.5 kHz for FM2).
The appropriate instrument dynamic range is selected, automatically, by range control logic within the field programmable gate array (FPGA), resulting in autonomous opera- Fig. 10 Expanded illustration of the sensor assembly showing the type LE phenolic sensor block (green), nested sense and feedback coils (red), base (blue), thermal isolation feet (light blue), clam-shell protective cover (tan), and carbon composite mounting bracket assembly (black) with attached calibration cube Fig. 11 Photograph of the MAVEN magnetometer sensor assembly showing the phenolic sensor block (brown), nested sense and feedback coils, and sensor printed circuit board. The sensor is provided with a (shielded) pigtail connector to insure that interconnect hardware is kept at a sensible distance from the sensor; nevertheless, all components installed on the MAG boomlets are subject to enhanced magnetic screening prior to use tion through the entire dynamic range. All range and instrument control functions are implemented in hardware. The FGM powers up in operational mode autonomously, sending telemetry packets to the Particles and Fields Digital Processing Unit (PFDPU) immediately and without need of further commands. A limited command set allows us to tailor the science and engineering telemetry to available resources (via averaging and decimation of samples or packets) and to uplink changes in the parameters that control various functions as desired.
Power and Thermal Interface Each magnetometer sensor board receives power from the PFDPU. There are two magnetometer boards in the MAVEN implementation and each board receives an independent power service from the PFDPU in order to maintain hardware redundancy. The magnetometer electronics requires ±13 V from the PFDPU service. The MAG electronics uses local linear regulators to produce the required internal voltages for the analog reference voltage VREF (+11.4 V), current source (−8.5 V), sensor analog to digital converters (+5 V and −5 V), and digital logic levels (+3.3 V and +2.5 V). There is no EMI filter on the MAG electronics board for the ±13 V power supplied to MAG as this function is provided by the PFDPU power service. Fig. 12 Assembled sensor assembly. Once assembled, all parts of the sensor assembly remain assembled except for the lower part of the carbon composite mounting bracket assembly (black) that attaches to the MAG "boomlet". The top part of the mounting bracket with the attached optical cube remains in assembly with the sensor block throughout the entire test and calibration program

Fig. 13
Magnetometer analog and digital board (one of two identical assemblies) in its shielded frame, top cover removed for viewing. The analog portion is to the left, where the sensor cable connector J25 resides, and the digital portion is to the right. The FPGA is the large square device on the upper right Fig. 14 Magnetometer a/c heater board (one of two identical assemblies, mounted back-to-back) in its carrier frame. This assembly is mounted on the PFP instrument interface board The two magnetometer AC heater circuits require separate +28 V supplies (+24 V to +36 V) and operate independently and autonomously from the sensor electronics. These power lines pass through the PFP but are powered independently of the PFP so that the MAG sensors are supplied with operational and survival thermal power regardless of the state of the PFP. Each AC heater circuit operates autonomously when the nominal spacecraft bus unregulated power is applied and requires no commands or external configuration.

Fig. 15
Simplified block diagram of one of the two identical MAVEN a/c heater electronics assemblies. The tri-axial fluxgate sensor (left) is mounted on the MAG "boomlet" at the end of the solar array. The heater control electronics (right shaded portion) is contained on a single multilayer electronics board that is integrated with the PFP instrument interface board (in order to minimize potential interference with sensitive analog electronics). A transformer-coupled heater monitor is made available to the spacecraft engineering telemetry so that the thermal power delivered to the MAG sensors may be monitored when the MAG electronics is powered off The heater pulse width modulator (PWM) starts to activate at approximately +30 • C and continues to increase power as the measured temperature drops to approximately −15 • C, at which point the heater is fully on. The maximum power dissipated in the 80 heater is dependent upon the (unregulated) power supply voltage; in orbit about Mars, each sensor consumes approximately 1 W thermal power to maintain the sensor thermal environment.
The heater circuitry resides on a daughterboard resident on the power supply circuit board in the PFDPU; it is physically separated from the MAG sensor electronics. A simplified block diagram of the heater circuit is shown (Fig. 15). The AC heater contains a transformer-coupled input that receives 3.3 V level logic pulses from the DPU at a frequency of 131 kHz and a duty cycle of approximately 50 %. This is used to synchronize the AC heater pulse width modulation (PWM) circuitry to the PFDPU clock. In the event that AC heater circuit power is on and the DPU clock is not present, an on-board oscillator set close to the sync frequency will operate the PWM circuit. When the PFDPU is active, the heater excitation frequency is synchronized to the PFDPU clocks. This is done to minimize potential interference with other sensors (principally the Langmuir probe) on the payload.
Each magnetometer heater circuit provides a transformer-coupled heater monitor as an analog output to the spacecraft. This service is provided in order to gain visibility into heater operation at times when the PFP (and MAG) is powered off. The voltage output of the heater monitor is proportional to the power dissipated in the 80 sensor heater resistance, providing an indirect measurement of sensor temperature that is available in spacecraft telemetry. The primary purpose of this service is to provide verification of proper functionality of the sensor heaters in the absence of engineering telemetry from the PFP.

Digital Implementation
The MAG electronics implementation requires only simple logic functions and does not require the capability and complexity of a microprocessor or software; it utilizes a low-power Field Programmable Gate Array (FPGA) for all logic functions. The required logic is contained within a single radiation-hard Aeroflex UT6325 FPGA with +3.3 V input/output. The MAVEN design closely follows the Juno implementation, for which a very robust, radiation tolerant instrument was required. This FPGA provides ample logic capability as well as sufficient internal radiation-hard memory. Aeroflex UT54ACS14E Schmitt-trigger inverters are utilized for all signals that interface to the PDFPU.
MAG receives serial commands from the PFDPU digital control board (DCB) and returns telemetry to the PFPDPU for further processing and/or transfer to the spacecraft command and data handling (C&DH) processor. The MAG board receives an 8.388 MHz clock (HFCLK) from the PFDPU which provides the global clock used by the MAG FPGAs, as well as for the other fields and particles instruments hosted by the PFP. A derivative of this frequency is output to the analog sensor readout portion of the circuitry and utilized for resonant tuning of the magnetometer.
The 1.048 MHz CMD_CLK signal supplied by the DCB is used to shift in the command (CMD) data from the DCB. The shift register outputs are synchronized internally to the main FPGA MAG_OSC clock prior to use by the MAG Command Processor logic. The MAG has several commands associated with instrument operation but does not require commands at startup to function. MAG does, however, require HFCLK and CMD_CLK to produce science telemetry in the nominal operating mode. The CMD_CLK is resynchronized to the internal HFCLK prior to use by the telemetry processor.

Data Modes
Each MAG electronics board communicates independently with the PFDPU, immediately upon application of power, and receipt of clock, without need for additional commands of any kind. The MAG telemetry consists of a fixed-size block of telemetry sent once every second to the PFDPU for further processing and/or transmission to the spacecraft. The MAG uses this single telemetry format to communicate science and engineering data to the PFDPU. This telemetry format consists of header information (a synchronization pattern, frame counter, spacecraft time information, and MAG status words) as well as a block of science measurements (three components of the vector magnetic field in sensor coordinates at 32 vector samples per second) and a block of analog and digital housekeeping information. Upon receipt, and subject to ground command, the PFDPU selects a portion of this telemetry for retransmission to the spacecraft and ground, tailoring the output to meet telemetry allocations and science requirements.
The PFDPU may perform averaging and decimation of the native 32 vector samples/sec telemetry to achieve a desired telemetry allocation. This is performed by unweighted averaging over 2 n samples ("boxcar average"). Thus sample rates of 32, 16, 8, 4, 2, 1 vector samples/sec are available (independently) for each magnetometer, upon selection of the MAG telemetry mode via uplink command to the PFDPU. MAG packets transacted by the PFDPU are fixed size; depending on the telemetry mode selected, the science data portion of the packet contains 2 n seconds of vector data, where n = [0, 1, 2, 3, 4, 5]. The PFDPU may also implement a simple 8-bit differencing scheme that offers a factor of two data compression, exclusive of the uncompressed header, for each instrument (independently). In our implementation, this data compression scheme is lossless: if any of the differences exceed the 8-bit dynamic range allocated, the uncompressed packet is transmitted instead. This method of data compression (differencing) works particularly well with data that decreases in spectral amplitude with increasing frequency, as is most often the case with magnetometer data. In both cruise and the Mars environment, the data compression method works as designed; uncompressed packets have been substituted in difference mode (8-bit differences exceeded) very infrequently. The difference mode may be selected by ground command to the PFDPU; it has been used liberally throughout cruise to Mars.

Range Change Algorithm
Each MAG electronics card provides logic for autonomous operation of the magnetometer sensor, choosing an appropriate dynamic range (512, 2048, or 65,536 nT) depending on the environmental field. Alternatively, the instrument dynamic range may be commanded (manual mode) via an instruction passed to MAG via the PFDPU. Automatic range control is designed to work with minimal mathematics operations (lacking a microprocessor) by simple inspection of the three components of the measured magnetic field. The algorithm provides adequate hysteresis to prevent multiple transitions ("toggling") in the vicinity of a threshold and uses a "look back" period to prevent multiple transitions during spacecraft rolls; it is based on the Juno range control algorithm.
Each MAG allows a change of dynamic range only at a packet boundary (once per second). The instrument range reported in the packet header thus represents the dynamic range of all samples acquired in the corresponding one second interval. The MAG will range up (increasing dynamic range, decreasing sensitivity) in order to prevent saturation of individual axes. The ranging algorithm keeps track of how many times a measurement (in each component) exceeds a preset ranging threshold (Fig. 16); if this count exceeds a (programmable) threshold, the instrument will range up at the next opportunity (packet boundary, once per second). This feature provides some noise immunity in that it makes it unlikely that a spurious measurement, or a few spurious measurements, will inadvertently trigger a range change.
Each MAG will range down (decreasing dynamic range, increasing sensitivity) to preserve as much measurement resolution as possible. Ranging down works in a similar manner, but threshold comparisons are made over a "look back" interval that is designed to encompass at least one spin period. This is used to prevent undesired range changes that would otherwise occur when all three components of the field drop below a threshold for only a portion of the spacecraft spin period. The MAVEN spacecraft is a three-axis stabilized spacecraft, but it is required to perform rotations about spacecraft principal axes from time to time to satisfy instrument calibration requirements. These are currently scheduled to be performed approximately every two months, depending on orbital geometry and other scheduling constraints.
The 512 nT dynamic range is anticipated to satisfy measurement requirements throughout the vast majority of the mission, including the "deep dip" campaigns that bring the spacecraft to lower altitudes for a few days at a time. In this range, the 16 bit quantization provides more than adequate measurement resolution (±0.008 nT), and a greater dynamic range would be required only if the periapsis during one of the deep dips occurred over a specific latitude and longitude corresponding to some of the most intensely magnetized sites in the Mars crust. This may occur unintentionally, and if so the instrument has the capability to optimize the dynamic range (autonomously switch to the 2048 nT dynamic range) should the very strongest fields be encountered at periapsis during a deep dip.

Radiation Environment and Parts Engineering
The MAVEN electronics parts radiation requirement is met by parts that are radiation tolerant to total ionizing dose (TID) of 13 krads (Si) @ 100 mil Al. Additionally, electronic Fig. 16 Instrument autonomous range selection algorithm increases the instrument dynamic range to prevent saturation in response to an increasing (blue) magnetic field magnitude in any of the three vector components and decreases instrument dynamic range in response to a decreasing field (red). The algorithm uses "guard bands" to prevent rapid back and forth changes in dynamic range ("toggling") in the presence of field fluctuations near range limits. Nominal threshold values (as a percent of the dynamic range in parentheses) are shown as well as nominal dynamic ranges and quantization step sizes parts are required to meet a linear energy transfer (LET) threshold against latchup and single event effects (SEE) of 75 MeV cm 2 /mg (or undergo additional radiation testing). The MAVEN electronics design and implementation closely follows that of the Juno magnetometer investigation (Connerney et al. 2015), which was designed for a more severe radiation environment (50 krads TID). The MAVEN magnetometers were built from the Juno parts list and as such greatly exceed the MAVEN radiation requirement.

Performance
Performance of the magnetometers was monitored throughout the test program (Table 2) using a series of calibration procedures repeated before and after significant environmental tests. These calibration procedures are discussed below and in more detail in Connerney et al. (2015). FM1 preceded FM2 through development and thus had a more extensive series of calibrations.
A sensor with linear response may be characterized by the sensor model: Where the true field vector [B] may be expressed as a linear combination [A] of the sensor response; here [A] is a nearly diagonal 3 by 3 matrix. The three components of the sensor response in counts (c i ) are corrected for small offsets (o i ) and scaled to magnetic units with scale factors (s i ). In practice we use near-unity s i that are slight corrections (< 0.3 %) to the nominal scale factors (0.0156, 0.0625, 2.000 nT/count in sensor dynamic ranges 0, 1, 3; these correspond to 512, 2048, and 65,536 nT full scale). The matrix A is often called the "orthogonality matrix" and it is a function of the sensor construction and alignment to the reference cube; it is used to express the measured field in the coordinate system defined by the reference cube normal vectors. We compared calibrations performed prior to and after Absolute vector accuracy of the measurements will be limited in strong fields by knowledge of the orientation of the MAG sensors with respect to the spacecraft attitude determination sensor suite on the body of the spacecraft. The largest uncertainty in absolute sensor attitude is attributed to the initial deployment attitude and stability over temperature of the outermost solar array panels. Our experience with the much larger (but very similar in construction) arrays on the Juno spacecraft, which are instrumented with attitude determination star cameras at their outermost extent (Connerney et al. 2015), leads to an expectation of better than 1 degree combined accuracy of deployment and stability over all environmental conditions. Likewise, absolute vector accuracy realized in very weak field environments is limited by knowledge of the spacecraft magnetic field and its variation in time (discussed below).

Test Program
The MAVEN instruments followed the GSFC MAG group's standard laboratory setup and test procedure. The sensor bobbins and sensor assembly are thermally cycled over a wide temperature range for mechanical stress relief. The sensors are thermally cycled once from +75 • C to −35 • C followed by 12 cycles from +60 • C to −20 • C. The magnetometer electronics progress through resonant tuning of the analog input circuitry and frequency response verification, followed by voltage, temperature, and frequency margin testing (VTFMT) in the laboratory. This involves comprehensive functional testing at hot and cold temperature extremes (+80 • C to −40 • C) while varying voltages and frequencies over their margined envelopes. The electronics and sensor were also assayed for biological contamination prior to delivery.
The magnetometer electronics were integrated to the main electronics box of the PFP and experienced environmental tests as part of the PFP instrument suite including thermal vacuum, thermal balance, the full array of electromagnetic compatibility tests, and vibration. Before and after each test element, comprehensive end-to-end functional tests were performed to provide system-level baselines for MAG. While it is not feasible to perform accurate magnetic calibrations without access to the magnetic test site, functional performance and sensor noise levels were established within two four-layer Mu-metal shield cans. These shielded enclosures were designed to protect the sensors from physical damage throughout integration with the PFP at the University of California, Berkeley, and later in the ATLO environment at Lockheed Martin's Waterton Canyon facility in Denver. Each of the multilayer Mu-metal shielded enclosures was fitted with a computer-controlled tri-axial coil system that was used inside the shield cans for both AC and DC stimuli. This allowed full functional verification throughout integration and test at Lockheed's facility. The magnetometer sensors were to be mounted, eventually, at the outer end of the solar panels, but throughout much of ATLO the solar panels are not physically present. Therefore the sensors were mounted atop the spacecraft buss, within their protective enclosures, to facilitate integration and test while awaiting final assembly.

Calibration
Calibrations of the MAVEN MAG instruments were performed on numerous occasions at system and subsystem levels. We used subsystem level calibrations on the FGMs to establish performance characteristics well in advance of system level calibrations. Later in development, when the Flight Models (FMs) were available, system level calibrations were performed before and after each element of the environmental test program (e.g., vibration, thermal vacuum) to establish that exposure to extreme environmental conditions did not alter the instrument response to magnetic fields. At the system level, our reference coordinate system is determined by the non-magnetic reflective optical cube affixed to each sensor. These small optical cubes (0.5 inch = 1.27 cm on a side) are fabricated to 10 arcsec orthogonality and all cubes were independently measured by the optics branch at GSFC. The magnetometer response is determined relative to this cube. Calibrations relative to the optical cube include both intrinsic sensor performance and the stability of the mechanical system that serves to bind all elements to each other.
Magnetic calibrations were performed at the GSFC Mario H. Acuña (MHA) Magnetic Test Facility (MTF), a remote facility located adjacent to the GSFC campus. The MTF includes a 22 foot (6.7 m) diameter Braunbeck coil system, and associated control (building 304) and reference (building 309) structures, as well as other facilities. The 22 foot facility is sufficient to calibrate magnetometers to better than 100 parts per million (ppm) absolute accuracy for applied fields in all directions and field magnitudes up to about 1 Gauss. An independent measurement of applied magnetic fields is provided by Overhausen Proton Precession magnetometers (reference magnetometer) placed near the unit under test.
The Proton Precession magnetometers provide an absolute measurement of the applied field over the dynamic range of about 20,000 nT to 1.2 Gauss (120,000 nT). The facility is operated in a closed loop with a remote reference vector magnetometer to null variations in the Earth's field so applied fields may be held constant to a fraction of a nT over the duration of a calibration sequence.
Two independent methods were used to calibrate the MAVEN magnetometers. The vector fluxgates are calibrated in the 22' facility using a method ("MAGSAT method") developed by Mario Acuña for calibration of the magnetometer flown on the MAGSAT mission. This technique uses precise 90 degree rotations of the sensing element and a sequence of applied (facility) fields to simultaneously determine the parameters of the magnetometer model response as well as a similar set of parameters that describe the facility coil orthogonality (Acuña 1981); a more accessible reference is Connerney et al. (2015). The method takes advantage of the accuracy with which the orientation of the sensor (reference optical cube) may be determined via autocollimation with a set of precision theodolites or alternately laser autocollimators. We used a pair of non-magnetic T-3000 theodolites permanently affixed to the coil facility structural members to perform accurate autocollimation. The calibration method uses a sequence of applied fields of known magnitude aligned with the coil system symmetry axes (north-south, east-west, up-down) with the sensor oriented in a minimum of 3 orientations, as determined above, representing precise 90 degree rotations from the initial orientation. All of the elements of the linear sensor response may be determined by inverting the resulting overdetermined linear system (Connerney et al. 2015). Since the method simultaneously determines the coil facility alignment matrix, the stability of the Braunbeck coil system may be monitored throughout the test program as well. Numerous MAGSAT calibrations performed using the ultra-stable Juno sensors demonstrated that the elements of the coil system's orthogonality matrix may be determined with better than 10 ppm repeatability using this method. Measured over a time span of several months, variations in coil system orthogonality were found to be less than a few tens of ppm.
The second calibration method, developed by Danish Technical University (DTU) researchers (called the "thin shell" method, alternately the "Orsted" method) uses a large set of rotations in a known and stable field to obtain much the same instrument parameters, subject to an arbitrary rotation (Risbo et al. 2002). This method can be performed at a suitable (i.e., magnetically quiet) location using the Earth's field as a reference, simply by making a sufficient number of measurements of the vector field measured by the sensor in many orientations relative to the ambient field-thus the name: "thin shell". This method also employs a Proton Precession reference magnetometer to measure the ambient field magnitude and account for any variations in the field during the test. Of course, this method can also be employed in a magnetic test facility at any desired field magnitude within the dynamic range of the facility. So we have also performed calibrations of the MAVEN magnetometers in our facility at several applied field magnitudes (which we call "thick shell" or nested thin shell calibrations) using this method; these calibrations may be performed relatively quickly and without need of optical attitude sensing devices.
The "thin shell" method by itself determines the magnetometer sensor response in an unknown coordinate system-an "intrinsic" coordinate system of the magnetometer sensorthe orientation of which needs to be determined by other means. This is equivalent to stating that the parameters of the linear sensor model may be determined subject to an arbitrary rotation, or, that only the symmetric part of the sensor response matrix is established via a "thin shell" calibration. We routinely compare the sensor response matrix determined via the thin shell method with the symmetric part of the complete sensor response matrix determined via the MAGSAT calibration method.
Sensor zero offsets are determined in the magnetic facility by physically reversing the sensor in a weak field, or by rotating the sensor in a weak (or zero) field. This may be done either in the center of the coil system, operated in nulling mode, or inside of a suitably demagnetized, multi-layer mu metal shield can. Sensor zeros are determined in the magnetic test facility, in a nulled field, and are obtained with an accuracy of better than ½ nT, limited only by the stability of the facility's applied cancellation field. In practice, more accurate zeros are determined in flight, after spacecraft deployments in the weak interplanetary magnetic field, using spacecraft rotations to effect sensor reversals.

In-Flight Calibrations
In-flight calibrations are designed to monitor stability of magnetometer offsets and to provide a capability to diagnose and monitor spacecraft-generated magnetic fields. In most applications, the magnetic sensors are fixed in the spacecraft reference frame, and a constant magnetic field in the sensor (sensor offset or bias) is indistinguishable from a constant ("static") spacecraft-generated magnetic field. Thus it is common practice to lump them together and estimate the sum of the sensor offset and static spacecraft magnetic field. This may be done by performing spacecraft rotations in the environmental magnetic field.

Fluxgate Zeros and Static Spacecraft Field Determination
The mission plan allows for magnetic calibration maneuvers (roll maneuvers) that are scheduled to occur during the science collection phase approximately every other month, interleaved loosely with calibration maneuvers scheduled for the UVS investigation on a similar cadence. Two MAG calibration roll activities have already been conducted during cruise operations. Another set of MAG calibration maneuvers are scheduled to occur during transition orbit phase, and subsequent maneuvers will be scheduled throughout science phase. Care is taken to schedule the MAG calibration maneuvers to occur when (where) the spacecraft is more likely to experience a relatively benign environment-i.e., times and places where the magnetic field is more likely to be relatively quiet and not large in magnitude. For example, MAG calibrations will avoid periapsis where large variations in the magnetic field are expected and regions of near Mars space characterized by large field fluctuations (e.g., magnetosheath).
The periodic MAG calibration sequences (MAGROLLS) are designed to provide ∼12 rotations about one axis, followed immediately by another ∼12 rotations about a second spacecraft axis. These execute at ∼2 degrees per second rotation rate and each set of 12 rotations require about 42 minutes to complete. Prior to execution of the maneuver, a command is sent to reduce the spacecraft battery state of charge (SOC) to 80 %, which effectively shuts off the solar arrays for the duration of the maneuver. This is done to eliminate the possibility of variable fields associated with solar array circuitry that might arise under variations of solar illumination angle (the subject of another set of in-flight tests). Figure 17 shows the magnetic field measured during MAVEN's second MAGROLL sequence performed on day 183, 2014. This maneuver executed in cruise, with the second set of rotations immediately following the first. Subsequent to MOI, we have been performing the z axis and x axis roll maneuvers on sequential orbits in consideration of the duration of the sequence and the limited time available, in orbit, in a relatively quiet (magnetic) environment.
A set of rotations about two different axes is sufficient to uniquely determine the combined sensor offsets/spacecraft field as long as the spacecraft magnetic field does not vary during the maneuvers. The rolls occur about the spacecraft principal moments of inertia, Fig. 17 Magnetic field in spacecraft payload coordinates throughout the second cruise MAGROLL maneuver on DOY 183, 2014, during which the spacecraft executes a rolls at 2 degrees/s about a principal axis (near the z axis), followed by rolls about an orthogonal axis (near spacecraft x). Instrument dynamic range was commanded to manual range 1 (±2048 nT) for the first few rolls about z, followed by rolls about both z and x in range 0 (±512 nT), followed by rolls about x in range 1. After completion of the sequence, the instruments are returned to autorange mode which depend on deployments, and are not closely aligned with the spacecraft payload coordinate system. For simplicity we refer to the roll axis closest to the spacecraft z axis as the "z axis" roll, and that closest to the x axis as the "x axis" roll. Inspection of the vector field during these rolls demonstrates that the rotation axes are not closely aligned with the spacecraft payload axes in the cruise (stowed) configuration. Prior to Mars orbit insertion (MOI) the boom-mounted auxiliary pointing platform (APP), laden with multiple science instruments, remains attached to the body of the spacecraft.
We will use the term "offset" to describe the combined sensor zeros and spacecraft static field in what follows. We use a statistical least-squares estimation algorithm described by Acuña (2002) to estimate offsets. This method was developed to estimate offsets using the Alfvenic properties of the solar wind, that is, the observation that magnetic field variations in the solar wind tend to be variations in angular direction, preserving the magnitude of the field. The method works very well applied to spacecraft rolls where the variations in the vector field ought to preserve the field magnitude as well. The offset vector (O) is obtained from a series of vector measurements (i = 1, 2, 3, . . . n) of the magnetic field, Where the difference B i = B i − B (i+l) may be formed using sequential measurements of the vector field (l = 1) or measurements separated by l samples, chosen to provide a suitable vector difference B i , compared to measurement noise or instrument quantization step size, but not so large that variations in the field magnitude over l samples arise often. Applied to spacecraft rolls, l should be chosen to provide difference point pairs over a small fraction of a roll period. The inverse of the 3 × n matrix [ B i ] is obtained using the singular value decomposition method (Lanczos 1961). Mario Acuña obtained the result above simply by observing that differences in the measured vector field during a pure rotation of the field ought to be orthogonal to the ambient field, which is simply the measured field minus the offset. Leinweber et al. (2008) showed that this result may also be obtained by assuming that variations in the field magnitude are uncorrelated with the variance in differences of the three components. Simply stated, if the offsets are properly estimated, the measured field magnitude will not evidence a spin modulation as the spacecraft rotates (see also Auster et al. 2002). Figure 18 shows the result of the offset estimation methodology applied to the second MAGROLL maneuver obtained in cruise, which provides an estimate of the offset appropriate to that time (and the state of the spacecraft at that time). The MAVEN spacecraft will execute these maneuvers periodically, approximately every other month, as conditions dictate to monitor stability of the offsets over time. The current plan calls for these observations to be obtained in relatively low noise environments (solar wind, magnetotail), access to which is dictated by the orbital evolution and to some extent solar wind conditions. The latter are unpredictable on a time scale relevant to mission operations planning.
The roll maneuvers provide the most robust zeros estimation, but they consume propellant and compete with other spacecraft and instrument operations, so they are scheduled infrequently. We may also estimate zeros on occasion using a related method that takes advantage of statistical properties of the solar wind: variations in the field tend to be Alfvenic in nature, consisting of rotations of the field vector without variation in magnitude. We use the same algorithm described above to estimate the zeros that minimize variations in measured field magnitudes over a span of time during which the spacecraft is in the solar wind and not on field lines that intersect the bow shock (where disturbed conditions are often experienced). MAVEN's orbital geometry and solar wind conditions limit the use of this method, which should be used judiciously since the solar wind is often anything but Alfvenic in nature.

Spacecraft-Generated Magnetic Fields
Operation of the science instruments during cruise to Mars provided an opportunity to acquire instrument and subsystem calibration and performance data, exercise operations processes that will be required on orbit, and gain experience operating the instruments and the spacecraft. Operation of the magnetometers during the cruise phase also provides the first magnetic measurements of the spacecraft and systems, fully integrated and functioning in flight configuration, and operating in a low field environment. During cruise we noted spacecraft-generated magnetic fields of low amplitude associated with a few subsystems, notably thrusters (used infrequently after orbit insertion and orbital period reduction), reaction wheels, and the power subsystem (solar array circuits). Thruster operation produces a distinctive and easily recognizable signal with about 6 nT amplitude for the duration of the burn; this is attributed to the momentary energization of solenoids controlling fuel flow. The power subsystem is capable of producing fields of ∼1 nT at the sensor locations, depending on the state ("on" or "off") of a subset of solar array circuits located at the outer extremity of the outer solar array panels (nearest to the MAG sensors) and the solar illumination intensity. These artifacts are currently under study and the Project is actively investigating mitigation strategies to reduce or eliminate these effects during routine science operations.
The magnetic fields associated with the four reaction wheel assemblies (RWAs) appear at the (variable) frequency of operation of the individual wheels when their speed falls within Fig. 18 Application of offset estimation to range 0 (±512 nT range) observations obtained during the second cruise magroll exercise, using a six second lag for vector differences, during which the field rotates in the sc reference frame by 12 degrees. The figure in the upper left is a diagnostic hodogram of B y vs. B x . In the lower figure a time series of the field magnitude and the negative of the field magnitude is shown (dotted lines) demonstrating little spin modulation in the magnetic field magnitude with the estimated offsets applied to the vector observations the passband (0-16 Hz) of the magnetometers. The periodic signal from these sources is typically of low magnitude (0.1-0.2 nT) but has been observed (at least in one case) to increase in magnitude at very low reaction wheel speeds (less than 0.1 Hz). The Project is currently evaluating a proposal to bias the reaction wheel speeds to higher RPMs during science operations to shift the interference above the magnetometers passband (or to as high a frequency as is practical).
We also observed variations in magnetic field associated with solar array operation that we have identified with switching of one or more circuits residing on the outer solar array panels. We originally detected a step variation if the field at the −Y sensor location (∼1 nT) and the +Y sensor location (∼0.5 nT) during early cruise that occurred when the solar arrays were essentially switched off via a command to reduce the state of charge of the batteries. An additional in-flight test is planned prior to the start of science operations that will excite individual circuits on the outer panels so we can uniquely identify the source and correct the field, analytically, using spacecraft telemetry that identifies changes in switch state.

Science Orbits Operations
The magnetometers were powered again on shortly after the Mars Orbit Insertion (MOI) maneuver and they are to remain on throughout the mission. Orbital operations then largely consist of managing the instrument sample rate to conform to the instrument telemetry allocation and planning spacecraft maneuvers designed to diagnose and track any changes in the spacecraft magnetic field and/or instrument offsets. In late cruise and during early science operations, both instruments are being operated at the same sample rate to assist in this process.
Current plans call for the magnetometer to sample at the high (32 vectors/s) rate throughout periapsis (altitude less than 500 km) and at lesser rates throughout the rest of the orbit, subject to the (time-variable) telemetry allocation. Telemetry allocations change throughout the mission subject to practical limitations, such as the Earth-Mars distance and the number and frequency of downlink opportunities afforded the Mission. In addition, the PFDPU collects and stores magnetometer data at the highest rate continuously, and holds this data, along with that from the particle instruments and the Langmuir and Plasma Wave Investigation, in memory aboard the spacecraft. This data ("burst mode") is available for downlink upon command, after an examination of the "survey" data already downlinked. The concept allows the science team to decide how to allocate precious telemetry resources retrospectively, after a brief examination of the time series data downlinked at a lesser rate earlier.
Eventually the on-board memory is overwritten, making room for new burst mode observations.

Data Processing
Ground processing of magnetometer data is performed routinely at GSFC following downlink and transmission to the Science Data Center (SDC) at the University of Colorado, Boulder. An automated script at GSFC searches the database at the SDC for data files that have yet to be downloaded, executing hourly. Files identified as such are pulled to the MAG operations computer automatically and queued for immediate processing.
The MAG data processing is responsive to the need for rapid turn-around, since other instruments require magnetic field vectors in their preliminary analysis, by design before spacecraft supplementary engineering data is available for archive processing. A preliminary MAG data processing pipeline (Fig. 19) executes prior to receipt of reconstructed spacecraft ephemeris (NAIF SPK kernels) and attitude information (NAIF C-kernels) necessary for archive processing, and without benefit of engineering telemetry that may be necessary for detailed analysis. Preliminary processing is conducted to assess the health and safety of the instrument, producing time series magnetic field vectors in either sensor or spacecraft payload coordinates that are useful in diagnosing instrument offsets and spacecraft-generated magnetic fields.
A similar but more comprehensive archive processing pipeline (Fig. 20) incorporates reconstructed spacecraft ephemeris and attitude information, and any supplementary spacecraft engineering information, producing magnetic field vectors, and spacecraft position vectors, in a variety of coordinate systems of interest.
Both processing pipelines utilize the same code which is designed to retain the ability to process data when supplementary data is lacking for a complete analysis. The data flow is designed to be extremely flexible in the ability to assimilate unanticipated observations, such as engineering telemetry that may be desired for analysis, and not anticipated early in the mission. This facility is implemented by utilizing a decommutated telemetry file that passes data to the main processing program in a text "keyword = value" format, originally developed for the Mars Observer and Mars Global Surveyor Projects.

Telemetry De-commutation
Raw binary MAG packets are checked for errors and decommutated using a bit map appropriate to the instrument mode (sample rate, differencing scheme if elected). Each data Fig. 19 Flow diagram of the preliminary MAG data processing. Preliminary processing is done prior to receipt of supplementary spacecraft engineering data (e.g., solar array currents), reconstructed spacecraft ephemeris, and attitude kernels, to assess instrument health and safety and to estimate sensor zeros and/or static spacecraft magnetic fields. Supplementary engineering data and reconstructed spacecraft kernels are typically available with a few days to 1 week delay packet contains sufficient information within its header to allow processing of the data that it contains, from a magnetometer only perspective (i.e., excluding any spacecraft engineering data that may be required). The decom program produces a decommutated telemetry file (".dtl" extension) that is an ASCII stream of "keyword = value" pairs, utilizing a text format similar to that employed by JPL's NAIF text kernel readers.

MAG Packet Processing
MAG packet processing operates on the dtl input files, converting instrument counts to magnetic field in nanoteslas, and engineering measurements in counts to engineering units, using calibration files for the instruments and conversion coefficients for engineering quantities (currents, temperatures, voltages, etc.). A SCLK (spacecraft clock) conversion file, provided by NAIF, is required to convert spacecraft clock words to Coordinated Universal Time (UTC), and a leapseconds kernel file ("leap.ker"), also provided by NAIF, is required to maintain accuracy of UTC time conversions. The input files may contain sensor data from either or both of the magnetometers, depending on whether the two (independent) data streams are merged, and as is the case in archive processing, may contain supplementary spacecraft engineering data (e.g., solar array currents, solar array switch states, etc.) for use in spacecraft magnetic field mitigation.
Archive processing adds access to reconstructed spacecraft ephemeris (SPK) and attitude information (C-kernels) that are delivered somewhat later than the instrument science data on a schedule dictated by the Project. The Project currently envisions a weekly delivery of bested C-kernels, which are pieced together from a set of many smaller files that contain overlapping data in places, abundant data gaps, and retransmission duplicates. The C-kernels are required to render spacecraft position and magnetic field vectors in the desired coordinate Fig. 20 Flow diagram of MAG final data processing. Final processing is done subsequent to receipt of reconstructed spacecraft ephemeris and attitude kernels using the same program elements. Data files containing time-ordered records of fully-calibrated magnetic field vectors, rendered in several useful coordinate systems, are the archive data products. Each record contains spacecraft position rendered in the appropriate coordinate system along with supplementary engineering data, where useful systems. These vectors appear in Cartesian coordinates on output records, one record per observation, at the highest time resolution available, for science data archive. Archive processing may also include spacecraft supplementary engineering data, merged with the instrument science data in dtl files, should that be necessary in processing a correction for time-variable spacecraft-generated magnetic fields. Where necessary engineering data is not available with the required time cadence, interpolation of the engineering data may be required; if interpolation is not feasible, as an alternative, the magnetic field vectors may be averaged and resampled, if necessary. Static spacecraft magnetic fields are compensated via subtraction of a constant (for example, determined from a previous spacecraft roll maneuver, or MA-GROLL calibration sequence) that is passed to the analysis program via the input dtl file.

NAIF Kernel Utilities for Ancillary Engineering
The only component on the spacecraft that articulates is the Articulated Payload Platform (APP), since the spacecraft solar arrays and the high gain antenna are all fixed. A moving component or subsystem is a potential source of a variable spacecraft magnetic field, if it has a significant magnetic moment. The APP will be calibrated after deployment (post-MOI) by taking observations of celestial objects in different directions, and before science operations begin, an in-flight magnetic compatibility test will be performed. This test consists of cycling the APP through rotations about the two articulation axes while the magnetic sensors record the magnetic field. In the event that the APP produces a variation in the magnetic field sensed by the magnetometers, an attitude kernel (C-kernel) for the APP will be available for use by the team in applying a correction.

Spacecraft Magnetic Field Mitigation
A static spacecraft magnetic field or instrument offset is measured via periodic spacecraft roll maneuvers and eliminated in data processing either via adjustment of sensor zeros in the instrument calibration file or by insertion of an offset variable in the decommutated telemetry file for each sensor. As of this writing we anticipate that a dynamic correction will be implemented to compensate for the field produced by the solar array, using spacecraft telemetry on switch states and measurements of the current produced by illumination of the arrays. Implementation of this correction will follow analysis of the in-flight tests planned for execution in the near future. The engineering telemetry necessary for this correction will be passed to the processing program via augmentation of the dtl file. We also anticipate archiving the reaction wheel speeds along with the magnetometer data to avoid confusion with environmental phenomena.

Standard Data Products
For immediate use by the science team, and other instrument teams, we provide a quick look product that consists of time-ordered records of magnetic field vectors in nanoteslas, rendered in spacecraft payload coordinates, along with browse products that are useful in identification of intervals of special interest. These files contain magnetic field processed with a static spacecraft field approximation, but do incorporate the full sensor zeros, calibration scale factors, and sensor orthogonality matrix conversion. These quicklook products are intended for preliminary analysis and planning purposes and are not intended for science archive.
Archive products are produced in a variety of coordinate systems when final reconstructed spacecraft ephemeris and attitude information are available. These include a planetcentered ("pc") coordinate system, rotating with Mars (z aligned with the spin axis) and with the x axis through the Mars IAU prime meridian; and a Sun-state ("ss") coordinate system wherein the primary reference vector (x axis) points from the object (Mars) to the Sun and the secondary reference vector (y axis) is in the Mars orbit plane (approximately opposite to orbital motion) such that the z axis is northward. Both of these coordinate systems are also available with respect to any other body ("object") of interest, for example, the satellites Phobos and Deimos. For use during the cruise phase of the mission, prior to MOI, a solar equatorial ("se") system may be employed, in which the primary reference vector (x axis) is the vector from the Sun to the spacecraft, the secondary reference vector (y axis) lies in the Sun's equator plane, and +z is aligned with the Sun's spin axis. Finally, the magnetic field observations are also provided in spacecraft payload ("pl") coordinates, suitable for use in association with measurements obtained by other instruments on the spacecraft. The spacecraft payload coordinate system and the MAG sensor coordinate systems are illustrated in Fig. 21. Note that the outer solar array panels are rotated about the spacecraft x axis by ±20 degrees; this configuration is designed to assist spacecraft stability during the deep dip passes through the extended Mars atmosphere.
Science archive products are pushed to the SDC on a regular schedule.

Summary
The MAVEN magnetic fields investigation will provide accurate vector magnetic field observations throughout all phases of the mission at sample rates of up to 32 vector samples/s, depending on telemetry allocation. The instrumentation provides two-sensor vector measurements for spacecraft magnetic field mitigation and complete hardware redundancy for risk mitigation. Magnetic field vectors are provided in-flight for use by other payloads in optimizing data collection and telemetry utilization. Spacecraft maneuvers (MAGROLLS) will be performed during science operations approximately every two months to monitor spacecraft fields and sensor offsets, and a series of additional in-flight tests have been performed to diagnose and correct for small-amplitude spacecraft-generated magnetic fields. These data, together with the synergistic particle observations acquired by the PFP instrumentation, and observations of plasma waves, ultraviolet emissions, and mass spectrometry, will form the foundation of a comprehensive study of the Mars atmosphere and its evolution.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided 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.