Digital fluxgate magnetometer: design notes

We presented an approach to understanding the performance of a fully digital fluxgate magnetometer. All elements of the design are important for the performance of the instrument, and the presence of the digital feed-back loop introduces certain peculiarities affecting the noise and dynamic performance of the instrument. Ultimately, the quantisation noise of the digital to analogue converter is found to dominate the noise of the current design, although noise shaping alleviates its effect to some extent. An example of magnetometer measurements on board a sounding rocket is presented, and ways to further improve the performance of the instrument are discussed.


Introduction
A modern trend in space research is to use small satellites and rocket payloads as a cost-effective space solution for small commercial companies and university researchers. To be in line with this, developing small, lightweight, but sufficiently sensitive instruments is among the main challenges. Fluxgate magnetometers (FGMs) [1] are 'must-have' instruments on board practically every scientific or commercial spacecraft being used for both research and service purposes. To compare FGMs with other types of magnetometers, it is evident to state that FGMs have no real competitors if precise measurements of the vector magnetic field are necessary [2].
An essential technology for electronic unit miniaturisation is the broad implementation of digital data processing that promises almost unlimited resources for reducing mass, dimensions, costs and power consumption, as well as improving usability and flexibility [3][4][5]. Using digital technology is even more crucial because of the usual lack of data transmission channel throughput for small satellites with limited ground support. At the same time the digital implementation of an actual analogue device creates problems related to the discretisation of internal data processing [6,7].
A joint team of KTH and LCISR previously developed such a digital FGM-the Small Magnetometer In Low mass Experiment (SMILE) [8]. This paper briefly describes the original design, and focuses on solving the specific problems and trade-offs between the sensitivity, response and stability. A description of the current instrument design is given, followed by a discussion of the analogue and digital circuit noise contribution. Further, a mathematical model of the whole magnetometer is presented, with a detailed discussion of the effects of the digital part on the stability and noise levels. The paper also presents experimental data from a recent flight of the instrument on board the ESA REXUS-10 sounding rocket with the SQUID (Spinning QUad Ionospheric Deployer) student payload launched from Esrange in 2011 [9].

Magnetometer design
The magnetometer electronics combines flux-gate sensor analogue front-end circuits with a main digital integrated circuit-a Field Programmable Gate Array (A3P250 FPGA from Actel). The digital correlation algorithm implemented in the FPGA provides the full processing of amplified and digitised fluxgate sensor signals, output data and the necessary dynamics of the analogue feedback voltage. The digital part of the feedback loop programmed in the FPGA allows the generation of a set of parameters necessary for the implementation of a specific application to the given experiment without changing the hardware, which is important for a low budget and time-constrained design.
A block diagram of the magnetometer is shown in figure 1, where the main parts are: with an ADC interface, digital data processing blocks, memory and digital I/O interface, three DACs for generating feedback signals, circuits of system synchronisation and excitation signal generation and control • Flash memory IC • Low-pass filters of DAC signals and voltage-to-current converters Signals from flux-gate pick-up windings tuned for the parametrical amplification of the excitation frequency second harmonic coming to the pick-up amplifiers, and which are then digitised by an ADC. The feedback compensation currents are converted from the output voltages of the custom DACs implemented in the FPGA [8] by analogue voltage-tocurrent converters.
Since the fundamental limitations are set by the sensor used, its characteristics are described first. Then we present the test results for all the major units and components in order to understand their contribution to the noise and their influence on the parameters of the complete instrument.

The SMILE fluxgate sensor
The smallest known (21 grams for a three-component 20 mm cube) magnetic sensor with volume compensation designed for SMILE was described in the original publication [8]. Eliminating the transverse field allows a decrease of specific errors such as nonorthogonality, angular instability and drifts related to both the lateral sensitivity and quadrature (out-ofphase) signal, which is often increased in the presence of a transverse field [10][11][12][13]. In addition, an optimised spatial field distribution was designed to increase the stability of the compensation (feedback) field applied to each fluxgate component [14]. With this distribution the feedback field integrated along the cores remains practically constant even when the geometry or position of the sensor cores changes due to temperature variation, material aging etc.
The original sensor was investigated in the magnetic calibration and test laboratory of the Nurmijärvi Geophysical Observatory of the Finnish Meteorological Institute [15] in 2007. Its main parameters were found to be comparable or even better than those of the best stationary fluxgate sensors, with orthogonality errors of (4...20) angular minutes, and stability of the angles with respect to the excitation current regimes and temperature in the range of −30 °C to +45 °C below the resolution of the system. The total non-linearity measured with the first SMILE electronics at random magnetic fields applied in the ±50 μT range was within ±3 nT.
During further improvement, the dimensions of the feedback windings (which are wound on the sensor cubic frame) were modified along with the diameter of the wire and the number of turns. This reduced the spread of parameters and increased the sensor reliability, structural stability and reproducibility. In addition, using a low-noise amorphous alloy together with carefully selected annealing conditions (including the temperature profile and time, and the parameters of the magnetic field during treatment) resulted in a reduction of the sensor noise.
Tests of the latest version of the sensor with analogue electronics showed that its noise level is (10..15) pT at the excitation power of only 16 mW for all three components. For these measurements the sensors were placed inside a magnetic shield and connected to specially made analogue electronics. These electronics for separate testing were designed to reduce to a minimum the possible influence on the sensor. The output signals of this analogue magnetometer were amplified and digitised by an external delta-sigma ADC with a resolution better than 1 pT. The sensor noise power spectrum is shown in figure 2

Noise contribution of the input stages
The ADC (500 kSPS, 4-channel, 12-bit plus sign, successive approximation AD7324 from Analog Devices) sequentially converts using an internal multiplexer three amplified output signals of the sensor and excitation current with a sample rate of 128 kHz for each channel. The excitation current with an 8 kHz frequency is also digitised at the same sample rate for tuning and future adjusting purposes. Therefore, for a 64 kHz equivalent frequency band the calculated ADC noise is ⋅ ≈ ⋅ − 1/ 12 64 000 1.1 10 3 LSB/ Hz. A test to isolate the input stage noise was carried out. In this test, the ADC range was ±10 V (LSB = 2.4 mV), the amplifier gain for X channel was 250 and for Y, Z it was 30. The measurements were performed with the compensation and sensor excitation switched off (open-loop magnetometer configuration without flux-gate signals). Figure 3 shows the spectral densities of the raw ADC readings.
Comparing the measured values of about ⋅ − 2 10 3 LSB/ Hz for the X channel, and about 10 −3 LSB/ Hz for the Y and Z channels, one can see that the resolution of the Y, Z channels was limited by the ADC noise level. This means that either the gain or ADC resolution should be increased. For the X-channel the voltage noise at the ADC input was about 5 mV/ Hz and the amplifier input-referred 20 μV/ Hz, which approximately corresponded to the LM6144 pre-amplifier parameters. This result confirms the correctness of the analogue front-end implementation and suggests a gain value and ADC range. The maximum possible gain was chosen based on the amplitude of the sensor imbalance (feed-though) signals of about 5 mV, ADC input range ±2.5 V with an overload margin of about (6...10) dB. In this case, with a gain  of 250 the maximum amplitude of the feed-through signals (below 1.3 V) does not exceed half of the ADC range for all the components.
Following the analogue front end are the digital electronics (implemented in FPGA), which cannot add noise other than due to quantisation unless there are errors in the design.

Noise in the feedback analogue stages
To check the DACs and the reference voltage, source noise measurements were performed when the constant code was sent to the DACs (with the feedback loop switched off) and the output monitored with an external precision (130 dB SNR, 0.6 ppm INL) delta-sigma ADC (ADS1281 from Texas Instruments with appropriate control and interface circuits used in this ADC board). Figure 4 shows the noise spectrum at the voltage-to-current converter input with the half-range code applied to the DAC, which corresponds to zero output voltage. This characterises the intrinsic, total DAC and voltage reference noise without quantisation errors. This measured DAC noise and the DAC quantisation noise are further decreased by the noise shaping phenomenon described in more detail below.

Analysis of the digital system
Following the block diagram of the entire system (see figure 5) the loop gain is the product of the transformation factors of the connected in series parts (sensor K S , the input analogue frontend K AI , the digital data processing unit K D1 , the adder Σ K 1 , and the output analogue circuits together with sensor feedback winding K AO ): In the first approximation the sensor is described as a delay unit with sensitivity independent of the frequency of interest. An electromotive force is produced according to Faraday's law as a response to excitation magnetic flux pulses and the sensor output signal appears up to half an excitation period after a change in the measured field. Also, there is an additional phase shift for sensor pick-up signals due to capacitive loading, which can be represented for the measured field as an additional delay. The shift increases because of the tuning of the sensor output to raise the sensitivity and ratio of the useful signal to the feed-through one [16]. Using a delay is more convenient than calculating the phase distortion of the flux-gate output spectral composition, which is not necessary for analysing the data processing. Consequently, an equivalent sensor transfer function in the frequency domain is: where S is the sensitivity and τ S is the equivalent sensor delay.
If the sensor delay is less than one excitation period it can be neglected because of the gated nature of the magnetometer operation. The next stage of analogue circuits is the pick-up amplifier and ADC-they are an 'all-pass' circuit with the transfer ratio K AI for the frequencies of interest. At the ADC output the uncompensated field signals are represented by 16 samples for each channel distributed uniformly over the excitation period.
The digital part of the instrument consists of a matched filter (correlator) and an adder accumulator. The filter calculates residual magnetic fields b r by summing the products of the ADC codes a i and reference coefficients c i during one period (for each component): The factor of 2 −R is described later in section 7.
In a similar manner as for the sensor the matched filter is characterised by a constant P and a time delay. The scaling factor P substitutes the sum in (3), because this sum is frequency independent. The delay consists of two contributions. The first part is introduced because the sum of products is only available at the end of the processing period. This delay depends on the shape of the sensor output signal and its phase relationship to the excitation signal and reference time of the digital processing block, in the the worst case amounting to one excitation period T ex . The second part is due to the fact that the combined pulse-width and delta-sigma DAC [8] needs one more period T ex to set a final output voltage. Combining both, the digital processing results in the transfer function of Here the maximum delay is used, but the real magnetometer operation is more complicated, especially at high frequencies, because the ADC voltage changes during the excitation period. The adder is updated at the end of each excitation period by the calculated residual field code multiplied by a scaling factor k 1 described below. It is a replacement of an analogue magnetometer integrator and its frequency response is: Here, the factor of T 1/ ex is introduced to take into account the time step of the feed-back path. The 'DAC' and 'ADC' outputs (figure 5) are used to form the digital output data of the magnetometer. Different syntheses of output data were used during testing. Note that here 'ADC' refers to the processed ADC data over one period (not the raw ADC readings).
The last stage of the block-diagram is the feedback path, which consists of the DAC, the analogue low-pass filter, the voltage-to-current converter and the sensor feedback winding. The transfer function for this circuit is the product of the frequency independent DAC LSB value, the response of the low pass filter with the voltage-to-current transformer ( ) K f LPF and the sensor compensation coil constant C C : Finally, the resulting loop gain of the magnetometer is: The loop gain depends on several values and the parameters of the real design. Whereas some parameters are known or can be easily calculated using component datasheets and a schematic diagram, the coefficients P and k 1 are of key importance for understanding the performance of the digital design and have to be considered in more detail. Later on we show how the magnetometer's overall frequency response depends on these coefficients and how they are used to adjust the frequency performance.
The initial internal calibration (described in section 7) defines such values of c i that a change of DAC will create the same but negative correction code resulting in full onestep compensation-the fastest possible response for discrete systems. Thus, this code (let us call it processed ADC data) can be used for magnetometer output data correction. To find the coefficient P for this implementation the amplified and digitally processed magnetic field has to result in the same code D that has been sent to the DAC during internal calibration (except for the sign that is used to create the negative feedback): The numerical evaluation of the obtained equations is based on the frequency response of the analogue output circuits that is found from the schematic diagram and parameters of the electronic components along with the sensitivity of the sensor of S of ⋅ − 4 10 6 V nT −1 , the gain of the amplifier and the ADC conversion factor = ⋅ = ⋅ K 255 2 5 4.18 10 AI 13 5 bits V −1 , the DAC LSB value of 0.31 mV bits −1 , and the sensor compensation constant of the feedback windings of = ⋅ C 7.7 10 C 6 nT A −1 . This gives a P = −0.038. In the case of 'one-step compensation' the coefficient k 1 equals 1. Figure 6 presents the gain obtained from equation (6). The system has potential instability, which is a common property of discrete first order systems (higher orders are added at frequencies where the loop gain is much lower than 1)-a result of additional phase shifts appeared because of delays in the discrete data processing and feedback.
Modeling the system with different parameters demonstrates that changing k 1 is a useful method to adjust the magnetometer response. Figure 7 shows examples of the amplitude-frequency responses of the model with closed feedback for two values of k 1 = 0.5, 0.25 (a convenient digital realisation of the factor is dividing the data by 2).
Measurements of the amplitude-frequency response (AFR) of the magnetometer confirm the predictions of the model but show that the response has an overshoot that is lower than calculated-only 40...60% at k 1 = 0.5. This is due to the data being sampled not once as assumed in the model, but 16 times during the excitation period, and the real equivalent data processing delay being dependent on the excitation phase and the sensor tuning, and smaller than one excitation period.

Internal calibration
The procedure of the internal calibration described in this section should not be confused with the calibration of a whole instrument, which refers to the measurement of the actual parameters of a magnetometer (transformation factors, nonorthogonality etc). The purpose of the internal calibration is to find the coefficients c i used for data processing implemented in the FPGA.
For the internal calibration the sensor is installed in a magnetic shield and the DACs are controlled by external serial interface commands. The procedure is performed for each component separately to exclude the possibility of a crosstalk influence. A positive DAC code (D bits) is set, so as to provide a sufficiently large sensor output signal (which must be within the ADC range). Then the raw ADC readings p i are recorded over a few excitation periods. The procedure is then performed for the same negative code (-D bits) and the ADC readings m i are recorded. The coefficients are found from the one-step compensation approach. This means that the input signal should be fully compensated by being calculated and generated in the feedback DAC code (D in the case of calibration). The reference coefficients c i may be found from equation (3) assuming that b r is the difference of the input signals

Dynamic parameters of the magnetometer
The instrument block diagram is useful for the estimation of the instrument dynamic parameters. Among different applications of Earth-field magnetometers the most speed-demanding are those on rockets and spinning satellites. Suppose the magnetometer rotates with the spin axis perpendicular to the field. The magnetic field measured by a component perpendicular to the spin axis described is . The maximum rate of change of the magnetic field component in this axis is ωB m , which for the near Earth field of about 60 μT at 5 revolutions per second amounts to a 236 nT field change in one excitation period (125 μs).
For such a response speed, a minimum full-power bandwidth 10 Hz and small signal cut-off frequency >100 Hz are necessary for this magnetometer if the dynamic error must be about 0.1%. Since the magnetometer is a first-order system (a low-pass filter of first order) this error is calculated as ( ) − + f f 1 1/ 1 / cutoff 2 and for the above-mentioned 5 Hz sine signal it is about 0.125%. One has to check that the input signal does not exceed the analogue input range at the stated rate of field change. For example, for the coefficient k 1 = 0.25, only a quarter of the residual field measured by the sensor is added to the previous DAC value. Thus, in the steady state the residual field is equal to the rate multiplied by four (1/k 1 ), i.e. 944 nT, and the input stages have to be capable of transferring these field signals adjusted for a peak factor (cr): The peak factor can be found after magnetometer internal calibration-it is the ratio of the maximum magnitude of the correlation coefficients to their mean-square value (typically around 2). Although the voltage amplitude is still less than the ADC range, together with the feed-through voltage clipping can occur at a fast rotation of the sensor. In order to provide an additional clipping margin and faster response the scaling factor k 1 = 0.5 can be used. The maximum residual field at rotation is 472 nT and the ADC input voltage will not exceed about 0.96 V in this case. If an intermediate value of k 1 is needed the correlation coefficients can be recalculated with a necessary multiplier, which is more convenient than analogue front end readjustment.

Magnetometer overall noise estimation
It is evident that both the sensitivity and resolution of a magnetometer are limited by sensor characteristics, but the overall resulting quality of an instrument depends on all the instrument elements and their interaction as well as on the internal data processing, as considered above. Besides, there is a contribution of the noise of the voltage reference used for compensation signal generation.
In our case, we can estimate the effect of the reference noise as follows. An ultralow noise voltage reference ADR441 (from Analog Devices) is used, and its noise level (as described in the datasheet) is: 48 nV/ Hz at 1 kHz and 1.2 μV p-p in the band (0.1...10) Hz. The reference voltage is buffered by the operational amplifier LM7322 (from Texas Instruments), and the amplifier has a noise level of 14 nV/ Hz at 1 kHz and 1.8 μV p-p in the band (0.1...10) Hz. Therefore, the resulting noise contribution of the voltage reference source , and is about 50 nV/ Hz at 1 kHz and 2.2 μV p-p in the band (0.1...10) Hz. For a 2.5 V reference voltage and 64 000 nT magnetometer range, this corresponds to 0.0013 nT/ Hz at 1 kHz and 0.056 nT p-p. The latter value roughly corresponds to a spectral density of 3 pT/ Hz in the band of (0.1...10) Hz. Both these values are well below the combined noise of the rest of the system, and thus due to the noise quadrature sum they can be neglected.
Starting with the SMILE feed-back DAC resolution (13 bits) and measurement range (±65 μT) one can calculate LSB = 2.65·10 3 /2 13 ≈ 16 nT and the quantisation noise is ≈ 16/ 12 4.6 nT rms. This results in a noise spectral density of about 72 pT/ Hz in a 4 kHz bandwidth at uniform distribution. At the same time the measurements show a noise reduction at low frequencies-the effect of quantisation noise shaping when its major part is located at high frequency (figure  This phenomenon is well known and used in Σ − ∆ ADCs: the quantisation noise generated by the DAC is injected into output and goes through the signal loop-the feedback path, sensor and forward channel. Basically, the data processing equivalent filter acts as a low-pass filter for the signal, and as a highpass one for the quantisation noise. Thus, the filter (integrator) performs the noise shaping function increasing the resolution at low frequency. Using the mathematical model of the simplified magnetometer structure the quantisation noise shape was calculated and is shown in figure 9. The transfer function for quantisation (and other DACs) noise is 1/(1 + G( f )). The normalised plot demonstrates the ratio of the quantisation noise filtration by the forward channel (integrator) providing a quite good resulting resolution even with the low-bits DAC of the SMILE. Note that the model assumes no other noise sources except quantisation.
However, the simple frequency domain model used for the described analysis does not reveal some peculiarities that appear due to the non-linear nature of the quantisation. This non-linearity becomes significant and cannot be neglected when the input signal variations (the measured signal along with the sensor and analogue front end noise) become smaller or even comparable with the DAC least-significant bit. As a result of this the measured noise of the magnetometer depends on the measuring conditions-the background field level, frequency and variability. It appears as the DAC bit (code) sticking for a long time (compared with the sample rate). The consequence is less attenuation of the quantisation noise when the stuck bit of the DAC is finally changed. Such a phenomenon was observed during the noise measurements-with the sensor installed in a magnetic shield when a residual field component is close to an integer DAC code. In figure 10 the SMILE noise spectra are shown where higher noise for the X component (blue line) is clearly seen compared with the plots in figure 8 (red line). Both plots were created for the same instrument but with a different sensor position in the magnetic shield and therefore a slightly different field value for the X component. The sparse changes of the DAC-X code resulted in the noise increasing.
Using the 'ADC' output (see figure 5) and adding it to the 'DAC', one allows a slight improvement to the resolution especially at high frequency. The addition is done with the DAC data shifted by the two samples to take into account the delays in the digital data processing, and it improves the waveforms of the output signals. But the low number of DAC bits still limits the SMILE resolution. This is because of the simple fact that the 'ADC' output does not contain enough information about low frequency signals-the digital integrator (adder) along with the feedback reduces very efficiently the low frequency contents of the 'ADC' output that is supplementary to the 'DAC' code. This frequency-dependent reduction can be found from the inverse loop transfer function shown in figure 9.

Potential for the improvement of the digital magnetometer
Since the magnetometer noise is limited by the DAC resolution, a way to improve the performance of the magnetometer is to increase the number of DAC bits. Different approaches have individual advantages and drawbacks and should be considered depending on the magnetometer target application.
One approach would be to add some kind of dither signal to 'switch on' the noise shaping for different signals and then perform filtering. This dither even could be realised inside the FPGA without additional hardware but it improves the noise only for signal levels that produce 'stuck' DAC code but can worsen performance for other cases. Moreover, this theoretical possibility is not completely predictable because of the nonlinearity and difficulty of the modeling.
Another approach is to increase the DAC master frequency to increase the bit resolution. This can be made inside the FPGA but in terms of the frequency of the FPGA this is limited to at most adding two bits, since the DAC frequency is 65 MHz already. At the same time it would increase the power consumption and may add DAC errors and non-linearity related to the non-ideality of high-frequency clocks.
Yet another approach is to add digital, FPGA-implemented 'low-order' DACs for each channel that drives in parallel the present analogue filters and voltage-to-current converters. It looks promising if there are enough resources in the FPGA. However, using two DACs with different scales will change the analogue electronics and result in the necessity of a more complicated calibration procedure. The main issue expected is the non-linearity of the resulting combined DAC.
Finally, one could use external multi-bit DACs (off-theshelf integrated circuits) with the desired parameters-probably, this is the simplest way of lowering the quantisation noise, but if the magnetometer is intended for a harsh environment the DAC degradation should be considered especially due to radiation exposure in satellite applications.
In the case of the SMILE digital magnetometer the hardware modifications look more promising since more bits of DACs can be added easily.
Another direction of the instrument improvement is a digital filter (FPGA implementation) which can provide data clean from the high frequency noise at a decreased rate. An example of the magnetometer noise after data digital filtering and decimation (performed externally) is shown in figure 11. In this example the previously recorded magnetometer output data were filtered in MathLab using low-pass FIR (Hann window) with a 300 Hz cut-off frequency. Decreased highfrequency quantisation noise is clearly seen, whereas the main (low-pass) range is intact including interference from a mains   Figure 11. Noise of the SMILE sensor data (using DAC + ADC output), filtered externally. In the modified block diagram we show an additional adder (Σ 2 ) to sum the DAC and the processed and scaled (by k 2 ) ADC values to form data for digital filtration. An additional delay-line (τ d ) described above is also shown.

Example of the magnetometer flight performance
A SMILE-type magnetometer was flown on board the REXUS-10 rocket on February 23, 2011, in the SQUID student experiment [9]. Figure 13 shows an overview of the SMILE data. The magnetic field data together with other sensors allow the reconstruction of the flight events. Analysing the rotation phase from the magnetic field data the spin rate can be obtained during all parts of the flight including boom deployment, retraction and then autorotation. Prior to the flight it was not known what the motion of the flight unit would be after re-entry, whether it would retain the spin, wobble, fall flat-side down or sideways, or autorotate. Autorotation is a coupled rectilinear motion with a rotation around a body axis which is not the major principal inertia axis. As the unit is not a rigid body at re-entry, it is hard to judge whether the loss of stable spin at T + 220 s is due to the booms or intrinsic features at re-entry. However, it is clear from the SMILE data that autorotation indeed starts at T + 370 s (9 km altitude based on the altimeter data), and continues until the parachute deployment at T + 490 s.

Summary
We presented a detailed analysis of the digital magnetometer design and the instrument performance. Here we demonstrated the importance and contribution of all elements to the final parameters of the magnetometer, and while the analogue components are described in a straightforward way, the presence of the digital data processing and digital feedback introduces certain complications. The trade-off of fast compensation (and thus fast dynamic response) and noise reduction is discussed, as well possible approaches to the reduction of the instrument noise. In the current design the instrument noise is largely determined by the DAC quantisation noise. This constraint can be relieved by going to a higher resolution DAC (either by means of increasing the underlying frequency of the bitstream, or by splitting the DAC into coarse-fine channels, or using an off-the shelf integrated component). The presented data from a sounding rocket flight demonstrate the performance of the magnetometer on a rapidly spinning payload.