# Adaptive Algorithm for Fast 3D Characterization of Magnetic Sensors
## 2 Materials and Methods
### Field Generation
Since we only used the impedances' magnitude information for our equalizer design, we calculated this from the complex valued results as follows:  
\[|Z(\Omega)|=\bigg{|}\frac{S_{vi}(\Omega)}{S_{vv}(\Omega)}\bigg{|}. \tag{1}\]  
For their use as filter design target curves, we smoothed the results along the frequency axis with a basic infinite impulse response (IIR) filter (Butterworth design, filter order 4). The very low frequencies were not very well captured by our ADC; thus, we manually set the values for the first \(5\,\)Hz to the coil pair resistances of \(5\,\Omega\), \(6\,\Omega\), and \(7\,\Omega\), respectively. Furthermore, we limited the EQ design to a frequency range of interest according to the sensor's specifications. As we used a fluxgate sensor (FLC 100, Stefan Mayer Instruments, Dinslaken, Germany [21], powered by the GPP-4323) with a sensitive frequency range of \(0\,\)kHz to \(1\,\)kHz to test our presented method, we limited the design curves for the coil equalizing filters to \(2\,\)kHz, with the signal components above remaining unchanged. Since the impedance grows with higher frequencies and, correspondingly, lower frequencies become dampened in the equalization approach, this choice of a bandwidth allows for higher-signal components in the frequency area of interest. The individual target curves are normalized to their respective maxima \(Z_{\rm x,0}\), \(Z_{\rm y,0}\), and \(Z_{\rm z,0}\) to obtain filters with unity gain at the maximum amplitude. With the resulting specified target characteristics, we designed type I linear phase finite impulse response (FIR) \begin{table}
\begin{tabular}{c c c} \hline
**Coil** & **Resistance (DC)** & **Edge Length \(\ell\)** \\ \hline Inner—x & \(2.5\,\Omega\) & \(306\,\)mm \\ \hline Mid—y & \(3.0\,\Omega\) & \(352\,\)mm \\ \hline Outer—z & \(3.5\,\Omega\) & \(398\,\)mm \\ \hline \end{tabular}
\end{table} 
Table 1: Coil parameters. filters \(\mathbf{h}_{\text{Z}_{\text{x}}}\), \(\mathbf{h}_{\text{Z}_{\text{y}}}\), and \(\mathbf{h}_{\text{Z}_{\text{z}}}\) of order \(N_{\text{filter}}=256\) by means of a least squares approach [22; 23]. The resulting magnitude behavior of the filters is visualized in Figure 3.  
We needed to include an additional gain correction step after imprinting the impedance behavior with the equalizing filters to harmonize the magnetic flux densities to the coil sizes. For the derivation of these gains, we consider the general equation for the magnetic field at the center of a square Helmholtz coil with the vacuum magnetic permeability \(\mu_{0}\), the (time-variant) current through the coil \(i(t)\), the equivalent cylindrical Helmholtz coil's radius \(R_{\text{H}}\), and the voltage (noise) amplitude \(u_{0}\), which is the same for the different coils. When a specific coil's quantity is described, the respective Cartesian direction is used in the variable's indices. Thus, we obtain the equation  
\[B_{\text{x}}(0,t) =\frac{8}{\sqrt{125}}\frac{\mu_{0}N_{\text{coil}}i_{\text{x}}(t) }{R_{\text{H}}} \tag{2}\] \[\propto\frac{\mu_{0}N_{\text{coil}}i_{\text{x}}(t)\sqrt{\pi}}{ \ell_{\text{x}}}\] (3) \[\propto\frac{u_{0}}{Z_{\text{x},0}\ell_{\text{x}}} \tag{4}\]  
to describe this field for the x coil at the center of the pair. We use this coil as the reference and thus set its additional gain to \(\beta_{\text{x}}=1\). The gains for the y and z coils follow from equating the different parameter versions for (4) as  
\[\beta_{\text{x}}\frac{1}{Z_{\text{x},0}\ell_{\text{x}}}=\frac{1} {Z_{\text{x},0}\ell_{\text{x}}}\overset{!}{=}\beta_{\text{y}}\frac{1}{Z_{\text {y},0}\ell_{\text{y}}}\overset{!}{=}\beta_{\text{z}}\frac{1}{Z_{\text{z},0} \ell_{\text{z}}} \tag{5}\] \[\Rightarrow\beta_{\text{y}}=\frac{Z_{\text{y},0}\ell_{\text{y}}}{ Z_{\text{x},0}\ell_{\text{x}}},\qquad\beta_{\text{z}}=\frac{Z_{\text{z},0}\ell_{ \text{z}}}{Z_{\text{x},0}\ell_{\text{x}}}, \tag{6}\]  
which are quantified for our setup with the chosen replicated frequency area in Table 2.