4. Determining the Spatial Position of Magnetic Field Patterns
The localization of the sensor relative to the magnetic code tape, as outlined earlier, relies on a reference bit map. This method necessitates uniform lengths of magnetic domains representing the code bits, where both ones and zeros are encoded with consistent magnetic polarizations of equal strengths but opposite directions, perpendicular to the code tape. This level of uniformity allows the magnetic tape to be accurately described solely by the corresponding sequence of bits.
In an alternative localization method, the sensor captures the magnetic field pattern, similar to the previous method. However, instead of computing the measured bit pattern and matching it within a stored or learned bit map, the sensor directly localizes the measured field pattern within a pre-learned magnetic reference field map. This approach allows for less regularity in the code object, should simply be a magnetic item with non-repeating magnetic patterns. However, for demonstration purposes, we will employ a single-track binary absolute magnetic code tape.
The magnetic reference field map, or field map, depicts the relationship between the magnetic field vector and the longitudinal position (
Figure 10a). Stored within the sensor's memory, it comprises a series of values corresponding to the x and z components, or potentially the x, y, and z components, of the magnetic field above the tape at a height typical of the sensing elements. Additionally, the vector angle of the magnetic field can also be documented (
Figure 10b).
During normal operation, the sensor collects magnetic field vector data from the sensing elements and generates the measured field pattern. Subsequently, it identifies the section of the field map that closely resembles the measured field pattern. Under the assumption that patterns equal to or longer than the sensing array are not repeated within the field map, the position of the most similar section in the map is determined as the actual position of the sensor.
To quantify similarity, an established correlation technique, such as computing the average of squared deviations between the elements of the compared signals using the method of "least squares," can be employed. Alternatively, other metrics like the average of absolute differences may also be utilized. Normalizing the patterns before assessing dissimilarity is advantageous to mitigate the influence of the distance between the sensor and the code object in the z-direction. A scalar representing the magnitude of deviation between two normalized field patterns can be regarded as a measure of "dissimilarity," thus we will refer to it as minimum dissimilarity rather than maximum similarity.
Assuming the reference field map (
Figure 11a) is already established (through learning) for the motion range, an instance of localizing the sensor around -24.2 mm involves identifying the minimum dissimilarity between the sensed field pattern and the corresponding one from the field map at that position (
Figure 11b).
Figure 11c illustrates the linear nature of the dissimilarity-based calculated position, along with the error accumulated during the learning phase.
The learning process is depicted in
Figure 12, where the initial map values are set to zero. The sensor acquires the first field pattern and integrates it into the field map using linear interpolation between the sensing elements (
Figure 12a). By default, the actual position may align with the zero position in the map. As the sensor moves to the right, it continually localizes its position within the already learned map section (
Figure 12b). During this movement, the rightmost sensing elements encounter a zone where the reference field map contains constant zeroes. In evaluating the minimum dissimilarity, data from sensing elements continuously compared with constant zeroes does not contribute to localization. However, as the actual position is determined based on partial patterns moving above the known field map part, the "white spots" in the field map are overwritten with the measured field data.
Figure 12c illustrates the extension of the field map data on the left side during reverse motion. The sensor system is already operational during learning, even when the reference field map is not yet known.
Continuing to operate the learning mode even after accumulating the field map data over the entire range of motion proves practical for two primary reasons. Firstly, it allows for improving the field map by gathering additional measurement data at points initially unsampled during the initial learning phase. Secondly, ongoing learning may yield an alternative reference field map, distinct from the one established through self-learning upon installation. Such discrepancies often signal changes in the magnetic code tape, alterations in the magnetic or ferromagnetic environment, or misalignments of the sensor concerning its original trajectory along the code tape, thereby offering diagnostic insights.
In the example depicted in
Figure 13a permanent magnet was positioned near the magnetic code tape at approximately -25mm.
Figure 13a illustrates the field vector components as a function of position (which can be regarded as an alternative field map within this context). In
Figure 13, b, an example of dissimilarity is shown for a sensor position around -54.8mm, revealing a local minimum rather than a global one. Consequently, when searching for the sensor position based on minimum dissimilarity, it's practical to localize the new position near the last known one where the sensor is likely to be found, by identifying the local minimum of dissimilarity. This approach introduces a minor error while ensuring the sensing system's continued operation (
Figure 13c).
If the observed difference persists between the alternative field map and the operative reference field map, then replacing the operative map with the alternative one allows the sensor to continue operating with a reference map aligned to the changed environment, thereby reducing local errors (as depicted in
Figure 14).
The effectiveness of the field map-based positioning technique is further demonstrated in
Figure 15. A short and irregularly magnetized magnetic code object was used, consisting of a 4 mm wide and 1 mm thick magnetoelastic stripe. This code was manually created using a neodymium permanent magnet in two steps: first, the stripe was erased by sweeping one pole of the magnet across it, then it was touched at various points by the other pole. The sensing array comprised 11 members with a center-to-center distance of approximately 5.4 mm between adjacent elements. The sensor learned the map during a total movement of 5.6 mm and exhibited linear characteristics over nearly 100 mm. Alignment was done manually to appear parallel with the code stripe. During the recording of characteristics, a global search was forced, treating each point as an evaluated position as if the sensor had just appeared there.
Concerning the global (integral) error resulting from the cumulative localization error of partial measured field patterns at the boundaries of the learned map parts, one may consider to utilize a regularly structured magnetic code tape containing a pseudorandom binary sequence. It's important to highlight that the field map method demonstration utilized such a code tape, albeit without leveraging its regularity. Operating in parallel, the bit map, with its structured longitudinal grid, can aid in error cancellation and offer supplementary position information during initial learning. Meanwhile, field map-based localization can navigate through damaged or altered domains. Additionally, integrating ANN-based displacement sensing can enhance local linear properties.
For the autonomous learning of the reference bit map and determination of the sensor position, a Cortex M4 based microcontroller operating at 80MHz with 64kB RAM and 32kB FLASH was effectively utilized. While the field map-based localization method requires significantly more memory to store the reference map — approximately 40 bytes per magnetic code bit for 10 times spatial resolution and 12 to 16-bit magnetic field component data — it also demands greater computational power. This is achievable only in Cortex H7 or similar devices, or in FPGAs, where operations can be effectively parallelized. In our study, the field map-based method was operated in a “hybrid” manner, using the sensor head solely for signal acquisition.
The bit map technique described previously allows for the calculation of the original code bit sequence from the field maps, as shown in
Figure 10. This capability facilitates a seamless transition between the bit map and field map techniques, enabling cross-diagnostic functions between the two methods. Additionally, the spatial dependencies of the x and z components exhibit nearly harmonic conjugates, which can be aligned using a linear integral transformation, such as the Hilbert transformation. This alignment improves their phase-related match or overlap, allowing for joint evaluation in determining a corresponding bit pattern, even if the sensor elements are sensitive to only one field vector component. For instance, when elements are sensitive solely to the x component, the z component can be approximated by applying a Hilbert transformation to the Bx component (
Figure 16). On small samples, such as the measured field patterns, the Hilbert transform can be efficiently computed via convolution and can run in real time on both microcontrollers and FPGA architectures. It is important to note that the field map-based position determination method also works effectively with single-axis sensing chips without generating the harmonic conjugate of the field pattern. This approach may help reduce manufacturing costs as well as data acquisition and processing time, although it requires further analysis. For practical reasons, maintaining the sensitivity of the magnetic field sensing chips in the x direction is advisable, as this vector component is the least sensitive to lateral displacement, yaw, and rotation of the sensor.