Magnetic position sensor systems, devices and methods using recurrent neural networks

By using a recurrent neural network to process multiple magnetic sensor signals in the magnetic sensor system, the challenge of position measurement in the prior art in multi-degree of freedom moving scenarios is solved, and the position measurement effect with high accuracy, anti-interference ability and flexibility is achieved.

CN119546926AActive Publication Date: 2025-02-28MELEXIS ELECTRONIC TECH CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202380053212.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-07-11
Filing Date
2023-07-08
Publication Date
2025-02-28
Estimated Expiration
2043-07-08

AI Technical Summary

Technical Problem

Existing magnetic sensor systems have challenges in achieving high accuracy, anti-interference capability and flexible position measurement, especially in multi-degree-of-freedom movement scenarios.

Method used

Artificial neural networks, especially recurrent neural networks (RNNs), are used to combine multiple magnetic sensor signals to determine the position of the sensor device relative to the magnetic source through training networks, achieving high-accurate position measurement.

Benefits of technology

Highly accurate position measurement in multi-degree-of-freedom moving scenarios is achieved, with good anti-interference ability and flexibility, and the simple architecture of the neural network and the low number of trainable parameters make the system relatively lightweight.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119546926A_ABST
    Figure CN119546926A_ABST
Patent Text Reader

Abstract

Determining a position (x; x, y), the sensor device being movable relative to a magnetic source, or the magnetic source being movable relative to the sensor device; the sensor device comprises at least two magnetic sensors; the method comprises the steps of: a) obtaining a plurality of magnetic sensor signals from the magnetic sensor; b) determining or estimating the position of the sensor device based on the plurality of sensor signals or signals derived therefrom; wherein step b) comprises: using an artificial neural network to determine the position (x; x, y); the artificial neural network is a recurrent neural network trained using up to three hundreds of trainable parameters per degree of freedom for determining the position. A position sensor system. A position sensor device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates generally to the field of magnetic sensor systems, devices and methods and, more particularly, to position sensor systems in which a sensor device is movable relative to a magnetic source, or vice versa. Background Art

[0002] Magnetic sensors (e.g., current sensors, proximity sensors, position sensors, etc.) are known in the art. They are based on measuring magnetic field characteristics at one or more sensor locations. Depending on the application, the measured magnetic field characteristic(s) can be used to infer another quantity (such as, for example, current intensity, proximity of a so-called target, relative position of the sensor device to a magnet, etc.).

[0003] There are many variations of magnetic sensor devices, systems, and methods that address one or more of the following requirements: use simple or inexpensive magnetic structures, use simple or inexpensive sensor devices, be able to measure over a relatively large range, be able to measure with high accuracy, require only simple arithmetic, be able to measure at high speeds, be highly robust to positioning errors, be highly robust to external interference fields, provide redundancy, be able to detect errors, be able to detect and correct errors, have a good signal-to-noise ratio (SNR), etc. Two or more of these requirements often conflict with each other, so trade-offs need to be made.

[0004] Many arrangements for determining position based on signals obtained from magnetic sensors, and associated algorithms, are known in the art.

[0005] Artificial neural networks are known, and there are many types of artificial neural networks. They are typically used to solve complex problems for which there are no simple mathematical formulas, such as, for example, for image recognition, face recognition, speech recognition, handwriting recognition, computer translation, etc.

[0006] There is always room for improvement or substitution. Summary of the invention

[0007] An object of embodiments of the present invention is to provide a method of determining the position of a sensor device that is movable relative to a magnetic source (e.g., a permanent magnet), or a magnetic source (e.g., a permanent magnet) that is movable relative to the sensor device. The movement may have at most 1, or at most 2, or at most 3 degrees of freedom. For example, the movement may be a pure translation (i.e., no rotation) along a straight path or along a predefined curved path (1 degree of freedom), or a pure translation in a plane (2 degrees of freedom), or a pure translation in three dimensions, or a 1D rotation about a stationary axis (which may typically be performed by a handle or lever), or a 2D rotation about a stationary position (which may typically be performed by a joystick).

[0008] Another object of an embodiment of the present invention is to provide a magnetic position system: the magnetic position system includes a magnetic source (e.g., a permanent magnet) and a sensor device, the sensor device can be moved with 1, 2 or 3 degrees of freedom relative to the magnetic source, or the magnetic source can be moved with 1, 2 or 3 degrees of freedom relative to the sensor device, wherein the system is configured to determine (or estimate) the position of the sensor device relative to the magnetic source.

[0009] Another object of embodiments of the present invention is to provide a position sensor device for use in such a position sensor system, in which case the proposed method is performed within the position sensor device itself.

[0010] It is an aim of embodiments of the present invention to provide systems and methods wherein the magnetic source is a relatively small permanent magnet, for example a magnet having an outer dimension (eg length or diameter) of at most 10 mm, or at most 8 mm, or at most 5 mm.

[0011] An object of embodiments of the present invention is to provide such a system and method: in which the relative position can be determined with good accuracy in 1 or 2 or 3 directions, for example, for a measurement range from -2.5mm to +2.5mm, the mean square error (MSE) is less than ±100 microns, or less than ±50 microns, or less than ±20 microns; or for example, the absolute error or mean square error is less than 1% of the measurement range; or for example, the absolute error or mean square error is less than 1% of the maximum external dimension of the magnet (e.g., the maximum of length, width, height).

[0012] It is an object of embodiments of the present invention to provide a relatively simple and lightweight system.

[0013] An object of embodiments of the present invention is to provide a system and method that is less sensitive to external disturbance fields, and / or less sensitive to temperature changes, and / or less sensitive to demagnetization of magnets, and / or less sensitive to installation errors (e.g. lateral offset in the case of 1D movement and / or height offset, e.g. height offset in the case of 2D movement), and preferably has two or three or all of these characteristics.

[0014] An object of an embodiment of the present invention is to provide a magnetic sensor system that uses only a single type of magnetic sensor (eg, only vertical Hall elements or only horizontal Hall elements).

[0015] A specific embodiment of the invention aims to provide a magnetic sensor system having only four or five to nine magnetic sensor elements and wherein the sensor device is movable with 1 degree of freedom relative to the magnetic source or the magnetic source is movable with 1 degree of freedom relative to the sensor device.

[0016] A specific embodiment of the invention aims to provide a magnetic sensor system with only four or five to nine magnetic sensor elements and wherein the sensor device is movable with 2 degrees of freedom relative to the magnetic source or the magnetic source is movable with 2 degrees of freedom relative to the sensor device.

[0017] A specific embodiment of the invention aims to provide a magnetic sensor system having only four or five to sixteen magnetic sensor elements and wherein the sensor device is movable with 3 degrees of freedom relative to the magnetic source or the magnetic source is movable with 3 degrees of freedom relative to the sensor device.

[0018] An object of embodiments of the present invention is to provide such a method and such a system for accurate position determination in anti-counterfeiting applications, automotive applications, industrial applications, and / or robotic applications.

[0019] These and other objects are achieved by embodiments of the present invention.

[0020] According to a first aspect, the invention provides for determining a position (eg, x, or eg, x, y, or eg, a position of a sensor device) ψ), the sensor device being movable with 1 or 2 or 3 degrees of freedom, or with only 1 or only 2 or only 3 degrees of freedom relative to a magnetic source; the sensor device comprising a semiconductor substrate comprising a plurality of at least two magnetic sensors located at at least two different positions; the method comprising the following steps: a) obtaining a plurality of sensor signals from the plurality of magnetic sensors; b) determining (or estimating) the position of the sensor device relative to the magnetic source based on the plurality of magnetic sensor signals and / or signals derived therefrom (e.g., pairwise difference signals, gradient signals, ratios of pairwise difference signals, etc.); wherein step b) comprises: determining the position using a (e.g., a single) artificial neural network; wherein the artificial neural network is a recurrent neural network (RNN) having a predefined number (N) of trainable parameters, the recurrent neural network being trained for determining the position; the number of trainable parameters per degree of freedom being at most 300.

[0021] An artificial neural network typically includes an input layer, one or more hidden layers, and an output layer, and is trained to minimize a "cost function," such as minimizing the mean squared error (MSE) or absolute error of the difference between the actual (or ideal) position and the estimated (or predicted) position on a training data set.

[0022] A major advantage of the invention is that it does not require the sensor elements to be arranged relative to the magnet in such a way as to provide orthogonal signals.

[0023] The sensor device may be movable with only 1 degree of freedom (e.g., pure translation along a straight line or along a curve, without rotation), or may be movable with only 2 degrees of freedom (e.g., pure translation in a plane, without rotation), or may be movable with 3 degrees of freedom (e.g., pure translation in 3 directions, without rotation).

[0024] Surprisingly, even when the total number of used parameters is relatively low (e.g., fewer than 300 parameters per degree of freedom, or fewer than 250 trainable parameters per degree of freedom, or fewer than 200 trainable parameters per degree of freedom, or fewer than 150 trainable parameters per degree of freedom, or fewer than 100 trainable parameters per degree of freedom; or at most 900 or at most 800 or at most 700 or at most 600 or at most 500 or at most 400 or at most 300 or at most 250 trainable parameters for systems with exactly 3 degrees of freedom; or at most 600 or at most 500 or at most 400 or at most 300 or at most 200 or at most 250 trainable parameters for systems with exactly 2 degrees of freedom), the For very simple neural network architectures (e.g., with only 1, or only 2, or only 3, or only 4 GRU units) with at most 1 degree of freedom (e.g., at most 150 trainable parameters; or for systems with exactly 1 degree of freedom, at most 300 or at most 250 or at most 200 or at most 175 or at most 150 or at most 125 or at most 100 or at most 75 trainable parameters), the position accuracy achievable by this approach is surprisingly high, even taking into account one or more of the following: low or reduced sensitivity to external interfering fields (also called "stray fields"), low or reduced sensitivity to mounting tolerances (e.g., air gap, lateral offset), and low or reduced sensitivity to temperature variations.

[0025] Even more surprising is the fact that the RNN provides highly accurate results even when the sensor device follows an arbitrary path at arbitrary speeds for which the RNN was not explicitly trained. This provides a huge advantage: the neural network does not need to be trained with various specific movement paths or trajectories or profiles at various specific speeds, but excellent results can be obtained when the network is trained with relatively simple movement trajectories (or paths or profiles), such as movement at a constant speed. In particular, it was found that even if the sensor device is actually moved (or is moving) at a speed lower or higher than the speed for which the network was trained, the position determination (or estimation) is still very good.

[0026] Preferably, the size of the semiconductor substrate is at most 3.0 mm×3.0 mm, or at most 2.5 mm×2.5 mm, or at most 2.0 mm×2.0 mm, or at most 1.5 mm×1.5 mm, or at most 1.0 mm×1.0 mm.

[0027] Preferably, the area of ​​the semiconductor substrate is less than 9.0 mm 2 , or less than 7.0mm 2 , or less than 4.0mm 2 , or less than 3.0mm 2, or less than 2.5mm 2 , or less than 2.0mm 2 , or less than 1.5mm 2 , or less than 1.0mm 2 The value of .

[0028] Preferably, the maximum distance between two sensor elements which are farthest apart is a value in the range of 1.0 to 4.5 mm, or a value in the range of 1.5 to 3.0 mm, or a value in the range of 1.5 to 2.5 mm, or a value in the range of 1.0 to 2.0 mm.

[0029] In an embodiment, the sensor device is movable with only 1 degree of freedom relative to the magnetic source, and the artificial neural network (ANN) is a "simple recurrent network" (SRN) or a "simple recurrent neural network" (SRNN) with at most 300 trainable parameters, or at most 250 trainable parameters, or at most 200 trainable parameters, or at most 150 trainable parameters, or at most 100 trainable parameters, or at most 50 trainable parameters, such as Fig.29 As shown in the figure.

[0030] In an embodiment, the sensor device is movable with only 2 degrees of freedom relative to the magnetic source, and the artificial neural network (ANN) is a "simple recurrent network" (SRN) or a "simple recurrent neural network" (SRNN) with at most 600 trainable parameters, or at most 500 trainable parameters, or at most 400 trainable parameters, or at most 300 trainable parameters, or at most 250 trainable parameters, or at most 200 trainable parameters, or at most 150 trainable parameters, or at most 100 trainable parameters, or at most 50 trainable parameters, such as Fig.31 As shown in the figure.

[0031] In an embodiment, the sensor device is movable relative to the magnetic source with only 3 degrees of freedom, and the artificial neural network (ANN) is a "simple recurrent network" (SRN) or a "simple recurrent neural network" (SRNN) with at most 900 trainable parameters, or at most 750 trainable parameters, or at most 600 trainable parameters, or at most 450 trainable parameters, or at most 300 trainable parameters, or at most 250 trainable parameters, or at most 200 trainable parameters, or at most 150 trainable parameters, or at most 100 trainable parameters.

[0032] Before the magnetic sensor signals are input into the neural network, the magnetic sensor signals can be normalized to a predefined range (e.g., from -1.0 to +1.0) (e.g., by dividing the measured value by a predefined constant stored in a non-volatile memory (e.g., flash memory) of the sensor device. The predefined constant can be a single value applicable to all sensors, or can be a specific value for each sensor location.

[0033] In an embodiment, the magnetic sensor signals are normalized by calculating a maximum amplitude of the magnetic sensor signals and by dividing each of the magnetic sensor signals by the absolute value of the amplitude.

[0034] In an embodiment, the recurrent network includes at least one GRU unit, or at least one simple RNN unit, or at least one LSTM unit.

[0035] In an embodiment, the artificial neural network (ANN) includes or consists of at most 12 GRU units, for example, only 1 GRU unit, or at most 2 GRU units, or at most 3 GRU units, or at most 4 GRU units, or at most 5 GRU units, or at most 6 GRU units, preferably organized in at most three, or at most two, or at most one hidden layers.

[0036] In an embodiment, the artificial neural network (ANN) comprises or consists of at most 12 simple RNN units, for example, only 1 simple RNN unit, or at most 2 simple RNN units, or at most 3 simple RNN units, or at most 4 simple RNN units, or at most 5 simple RNN units, or at most 6 simple RNN units, preferably organized in at most three, or at most two or at most one hidden layers.

[0037] In an embodiment, the artificial neural network (ANN) includes or consists of at most 12 LSTM units, for example, only 1 LSTM unit, or at most 2 LSTM units, or at most 3 LSTM units, or at most 4 LSTM units, or at most 5 LSTM units, or at most 6 LSTM units, preferably organized in at most three, or at most two or at most one hidden layers.

[0038] In some embodiments of the invention, the sensor device may be movable with only one or only two degrees of freedom relative to the magnetic source, or the magnetic source may be movable with only one or only two degrees of freedom relative to the sensor device.

[0039] In some embodiments of the invention, the sensor device may be movable with more than two degrees of freedom (eg, with three degrees of freedom) relative to the magnetic source, or the magnetic source may be movable with more than two degrees of freedom (eg, with three degrees of freedom) relative to the sensor device.

[0040] In an embodiment, a mean square error (MSE) of the position determined by the artificial neural network is less than 2% of the predefined measurement range, or less than 1.5% of the predefined measurement range, or less than 1% of the predefined measurement range.

[0041] In an embodiment, the recurrent neural network has only one hidden layer.

[0042] In an embodiment, the recurrent neural network has only one hidden layer with at most 4 GRU units, or has only one hidden layer with at most 4 SRNN units, or has only one hidden layer with at most LSTM units.

[0043] In an embodiment, the sensor device may be moved in a straight line relative to the magnetic source, or the magnetic source may be moved in a straight line relative to the sensor device, where the movement is a pure translation (1 degree of freedom). The position to be determined may be specified by a single coordinate (e.g., x). The measurement range may, for example, span a distance of at least ±2.5 mm, or at least ±5.0 mm, or at least ±7.5 mm, or at least ±10 mm, or at least ±15 mm, or at least ±20 mm, or at least ±25 mm.

[0044] In an embodiment, the sensor device may be moved along a curve relative to the magnetic source, or the magnetic source may be moved along a curve relative to the sensor device, wherein the movement is purely translational (1 degree of freedom).

[0045] In an embodiment, the sensor device may be moved along a curve relative to the magnetic source, or the magnetic source may be moved along a curve relative to the sensor device, where the movement is a combination of translation and rotation, but the rotation is linked to the translation (1 degree of freedom).

[0046] In an embodiment, the sensor device may be movable in a plane relative to the magnetic source, or the magnetic source may be movable in a plane relative to the sensor device, without rotation (2 degrees of freedom). The position to be determined may be specified by two orthogonal coordinates (e.g., x and y). The measurement range may span a distance of at least ±2.5 mm, or at least ±5.0 mm, or at least ±7.5 mm, or at least ±10 mm, or at least ±15 mm, or at least ±20 mm, or at least ±25 mm in two directions (e.g., X and Y).

[0047] In embodiments, the sensor device may be movable on the surface relative to the magnetic source, or the magnetic source may be movable on the surface relative to the sensor device, with rotation, but the rotation depends on the position on the surface (2 degrees of freedom).

[0048] In embodiments, the magnetic source is movable relative to the sensor device to rotate about a predefined axis, or the sensor device is movable relative to the magnetic source to rotate about a predefined axis, no translation (e.g., a magnet mounted on the axis of a spin button), 1 degree of freedom. The position to be determined can be specified by a single angle.

[0049] In embodiments, the magnetic source may be movable relative to the sensor device to rotate about a predefined axis, or the sensor device may be movable relative to the magnetic source to rotate about a predefined axis, with translation, but the translation depends on the angular position (e.g., a magnet mounted at a non-zero offset from the axis of a spin button), 1 degree of freedom.

[0050] In an embodiment, the magnetic source is mounted to a joystick handle that can be independently rotated by two angles (e.g., back / forward; and left / right). The magnet can perform translation, but the translation depends on two angle values ​​(2 degrees of freedom). The position to be determined can be specified by two angles. Fig.25 and Fig.26 An example is shown in .

[0051] In an embodiment, the number of degrees of freedom is at most 3, and the total number of trainable parameters of the artificial neural network is at most 900, or at most 800, or at most 700, or at most 600, or at most 500, or at most 400, or at most 300, or at most 250, or at most 200, or at most 150, or at most 100.

[0052] In an embodiment, the number of degrees of freedom is at most 2, and the total number of trainable parameters of the artificial neural network is at most 600, or at most 500, or at most 400, or at most 300, or at most 250, or at most 200, or at most 150, or at most 100.

[0053] In an embodiment, the number of degrees of freedom is at most 1, and the total number of trainable parameters of the artificial neural network is at most 300, or at most 250, or at most 200, or at most 150, or at most 100.

[0054] In an embodiment, the magnetic source is a permanent magnet.

[0055] In an embodiment, the sensor device is configured for performing only translation relative to the magnetic source.

[0056] In an embodiment, the sensor device is configured for performing a combined translation and rotation relative to the magnetic source, but the rotation is dependent on the translation.

[0057] In an embodiment, the magnetic source is configured for performing only translation relative to the sensor device.

[0058] In an embodiment, the magnetic source is configured for performing a combined translation and rotation relative to the sensor device, but the rotation is dependent on the translation.

[0059] In an embodiment, the magnetic sensor is a Hall sensor, eg a horizontal Hall sensor and / or a vertical Hall sensor.

[0060] In an embodiment, the recurrent neural network is a stateful recurrent network.

[0061] In an embodiment, the semiconductor substrate comprises at least three or only three magnetic sensors located at at least three different locations.

[0062] In an embodiment, the semiconductor substrate includes at least four or only four magnetic sensors (eg, H1 , H2 , H3 , H4 ) located at at least four different locations.

[0063] In an embodiment, the semiconductor substrate comprises a two-dimensional array or two-dimensional arrangement of magnetic sensors (eg, a 3×3 array, thus 9 sensor elements).

[0064] The at least three magnetic sensors may or may not be collinear.

[0065] The at least four magnetic sensors may or may not be collinear.

[0066] Simulations have shown the accuracy of a system with a bar magnet (having a length of about 5 mm) where the sensor device can move a distance of about 5.0 mm (e.g., from -2.500 mm to +2.500 mm) and where the sensor device has a 1 mm 2 Up to 4mm 2 A semiconductor substrate comprising:

[0067] - Only 1 horizontal Hall sensor yields an MSE (“mean square error”) of less than 0.005 mm, and a GRU1 (“gated recurrent unit”) with only about 10 to 20 parameters (e.g. about 13 parameters);

[0068] - Only 2 horizontal Hall sensors produce an MSE less than 0.005 mm (e.g. equal to about 0.002 mm) and require a GRU1 with only about 20 to 25 parameters;

[0069] - Only 3 horizontal Hall sensors produce an MSE of less than 0.005 mm (e.g. equal to about 0.0016 mm) and require a GRU1 with only about 20 to 25 parameters;

[0070] - Only 4 horizontal Hall sensors produce an MSE of less than 0.005 mm (e.g., equal to about 0.0011 mm) and require a GRU1 with only about 20 to 25 parameters;

[0071] When only considering the basic functionality of “determining position”, it can be concluded that these examples produce similar results, but they may act differently in non-ideal situations, such as, for example, in the presence of external interfering fields.

[0072] Using only horizontal Hall elements without an IMC ("Integrated Flux Concentrator") is an advantage, especially because this is cheaper to produce (no steps for providing an IMC are required).

[0073] In an embodiment, the semiconductor substrate includes at least two 2D magnetic pixels, each 2D magnetic pixel is capable of measuring a first magnetic field component Bx oriented in an X direction parallel to the semiconductor substrate and a second magnetic field component Bz oriented in a Z direction perpendicular to the semiconductor substrate. At least the 2D magnetic pixels are located at two different positions, for example, spaced apart in the X direction (i.e., the direction of relative movement), or spaced apart in the Y direction (i.e., transverse to the direction of movement), or spaced apart in both the X and Y directions.

[0074] In an embodiment, the semiconductor substrate includes or only includes horizontal Hall elements configured to measure a magnetic field component perpendicular to the substrate (i.e., horizontal Hall elements without IMC). The signals obtained from these horizontal elements can be directly input to the neural network. Preferably, the sensitivities of the horizontal elements are matched to each other in a known manner, for example, as described in US2019079142 (A1), or as described in EP3885779 (A1), both of which are incorporated herein by reference or in any other suitable manner. Alternatively or additionally, if the sensor device has at least three horizontal Hall elements, the paired difference ΔBz can be input into the neural network. Alternatively or additionally, if the sensor device has three horizontal Hall elements H1, H2, H3 that provide signals Bz1, Bz2, and Bz3, respectively, the average value Bz_avg (Bz_average value) of these signals can be determined, and three paired differences (Bz1-Bz_avg), (Bz2-Bz_avg), (Bz3-Bz_avg) can be input into the neural network.

[0075] In an embodiment, a semiconductor substrate includes at least one 2D magnetic pixel, each 2D magnetic pixel includes an integrated magnetic concentrator (IMC) and two horizontal Hall elements, which are arranged near the periphery of the IMC and are spaced 180° apart relative to each other. Such a sensor device with 1 IMC is capable of measuring Bx1, Bz1 at a first sensor position. If the device also has a second 2D magnetic pixel spaced apart from the first magnetic pixel, it is also capable of measuring Bx2, Bz2 at a second sensor position. In an embodiment, the signals obtained from these horizontal elements (e.g., h1 to h4) are input to a neural network. Alternatively or additionally, the sum and / or difference of the signals obtained from the horizontal Hall elements located on opposite sides of the IMC are input to the neural network. Alternatively or additionally, if the sensor device has at least two IMCs, the paired difference ΔBx=(Bx1-Bx2) and / or the paired difference ΔBz=(Bz1-Bz2) can be input to the neural network. Optionally, ΔBx / ΔBz or ΔBz / ΔBx can also be input to the neural network. Optionally, the sum of squares (ΔBx) 2 +(ΔBz) 2 It can also be input into a neural network.

[0076] In an embodiment, the semiconductor substrate includes at least one 3D magnetic pixel, each 3D magnetic pixel includes an integrated magnetic concentrator (IMC) and four horizontal Hall elements, which are arranged near the periphery of the IMC and are spaced at 90° relative to each other. Such a sensor device with 1 IMC is capable of measuring Bx1, By1, Bz1 at a first sensor position. If the device also has a second 3D magnetic pixel spaced apart from the first 3D pixel, it is also capable of measuring Bx2, By2, Bz2 at a second sensor position. In an embodiment, the signal obtained from the Hall element is input into the neural network. Alternatively or additionally, the sum and / or difference of each signal obtained from the horizontal Hall element located on the opposite side of the IMC is input into the neural network. Alternatively or additionally, if the sensor device has at least two IMCs, the pairwise difference ΔBx=(Bx1-Bx2) and / or the pairwise difference ΔBy=(By1-By2) and / or the pairwise difference ΔBz=(Bz1-Bz2) can be input into the neural network. Optionally, one or more ratios of these pairwise differences (e.g., ΔBx / ΔBz, ΔBy / ΔBz, ΔBx / ΔBy) may also be input into the neural network. Optionally, the sum of squares (ΔBx) 2 +(ΔBy) 2 +(ΔBz) 2 It can also be input into a neural network.

[0077] In an embodiment, the semiconductor substrate includes or only includes vertical Hall elements configured to measure a magnetic field component parallel to the substrate. The vertical Hall elements can all be oriented in a single direction, but this is not absolutely necessary, and for example, some can be oriented in the X direction and others can be oriented in the Y direction.

[0078] In an embodiment, the semiconductor substrate includes or includes only MR elements (magnetoresistive elements), such as GMR elements, AMR elements, XMR elements.

[0079] In an embodiment, the magnetic source is a two-pole magnet (eg, an axially or radially magnetized two-pole ring or disk magnet, or a two-pole bar magnet).

[0080] In an embodiment, the magnetic source is a quadrupole magnet (eg, an axially magnetized quadrupole ring or disk magnet).

[0081] In an embodiment, the sensor device further comprises a temperature sensor, and step a) further comprises: measuring a temperature (e.g., Temp) of the semiconductor substrate using the temperature sensor, and providing the measured temperature as an input to the neural network; and step b) comprises: determining a position (e.g., x; x, y; x, y) of the sensor device relative to the magnetic source based on the plurality of magnetic sensor signals and based on the measured temperature signals. ψ).

[0082] In the case of embodiments where temperature is added as an input to the neural network, the training data preferably contains data for at least two, or at least three, or at least four, or at least five, or at least six different temperatures.

[0083] In an embodiment, the training data includes at least one trajectory at a first temperature less than 0°C, and includes at least one trajectory at a second temperature of at least 80°C, and includes at least a third trajectory at a third temperature between 0°C and 80°C.

[0084] In an embodiment, the sensor device further comprises a temperature sensor, and the method further comprises the following steps: measuring the temperature of the semiconductor substrate using said temperature sensor, and using the measured temperature as an input to the neural network; and wherein step b) comprises: determining the position of the sensor device relative to the magnetic source based on said multiple magnetic sensor signals and based on the measured temperature; and wherein the network is trained to estimate the position using training data for different temperatures, derived from computer simulations, and / or obtained or derived from actual measurements.

[0085] In this embodiment, a single recurrent neural network is used for: (1) temperature correction of the magnetic sensor signal and simultaneously for (2) determining the position of the sensor device relative to the magnetic source.

[0086] In an embodiment, a network is trained for estimating position (e.g., 1D position or 2D or 3D position) using training data obtained or derived from simulated data provided by computer simulations and / or obtained or derived from measured data provided by actual measurements.

[0087] 1D neural networks can be trained in stateless mode and inference is done in stateful mode. This allows reducing onboard memory requirements as well as allowing limiting computational complexity. Using this technique, new predictions can be made for each new input sample.

[0088] 2D neural networks can be trained in stateful mode, and inference is performed in stateful mode.

[0089] In an embodiment of a 2D neural network, the measurement range is sampled using recyclable Bezier curves (eg, at least 128, or at least 256, or at least 512 Bezier curves).

[0090] In an embodiment, the start and end points of at least some of these Bezier curves are intentionally selected to be outside the actual measurement range. For example, if the X range and Y range extend from -2.5mm to +2.5mm, the neural network can be intentionally trained for positions where X and Y vary from -3.0mm to +3.0mm. In general, the start and end points of the trajectory can be selected to be at least 10% outside the actual measurement range. In an embodiment, the simulated data and / or measured data are interpolated to increase the spatial resolution by at least a factor of 2.

[0091] In embodiments where the simulated data includes temperature, the measured data is interpolated to increase the resolution of the temperature by at least a factor of 2.

[0092] In embodiments, at least some or all of the actual measurements are performed by physically moving the sensor device relative to the magnetic source or physically moving the magnetic source relative to the sensor device.

[0093] In an embodiment, at least some or all of the actual measurements are performed by generating a magnetic field using a test device comprising at least one coil, such as at least two coils, such as at least three coils, and by passing at least one current through the at least one coil.

[0094] In an embodiment, artificial noise is added to the training data.

[0095] In an embodiment, a network is trained to estimate position (e.g., 1D position or 2D or 3D position) using training data derived from computer simulations with artificial noise added, and / or obtained or derived from actual measurements, or a combination of both.

[0096] Applicants believe that the addition of artificial noise may be known in fields such as speech recognition or facial recognition, but is counterintuitive to the field of magnetic position sensors where position is to be accurately determined. In each case, it was not predictable that adding artificial noise to a neural network having a relatively simple architecture and / or using a relatively small number of trainable parameters would improve the accuracy of the position sensor system.

[0097] It should be noted that "data obtained from actual measurements" contain "actual noise" and therefore artificial noise does not need to be added, although it may be possible to add artificial noise.

[0098] In an embodiment, magnetic disturbance fields are added to the training data.

[0099] In an embodiment, the network is trained for estimating position using training data derived from computer simulations and / or obtained or derived from actual measurements with the addition of a magnetic disturbance field (Bext(Bexternal)).

[0100] However, preferably, for the magnetic disturbance field of all sensors, the value that adds a constant value to all sensors is a uniform but time-varying disturbance field, which means that the disturbance vector or disturbance value (in the case where all sensors are oriented in the same direction) is the same for all sensor positions. The disturbance field can be added to the simulation results, or can be added to the actual measurement results, or the actual measurement can be performed in an environment with the disturbance field.

[0101] In other words, in this embodiment, the training data includes simulated data for a superposition of a magnetic field generated by a magnetic source and a uniform external interference field. For example, if all sensor elements measure a Bz value, a given value Bz_ext may be added to the sensor signals of all sensors measured substantially simultaneously. The value of Bz_ext may vary over time, for example, may vary relatively slowly over time, for example as a modulated signal (e.g., an amplitude modulated signal or a frequency modulated signal).

[0102] In particular embodiments, the training data uses at least 10 different values, or at least 20 different values, or at least 32 different values ​​of the external field.

[0103] In an embodiment, a mounting offset (eg, Yoffset) is added to the training data.

[0104] In an embodiment, a network is trained for estimating position using training data derived from computer simulations and / or obtained or derived from actual measurements, taking into account mounting offsets (e.g., offsets in height position (air gap) in the case of a 1D sensor system, and / or lateral offsets).

[0105] In the case of ID movement along a straight line, the mounting offset may include, for example, one or both of a lateral offset (Yoffset) and a height offset (Zoffset).

[0106] In case of 2D movement in a plane, the mounting offset may include a height offset (Zoffset).

[0107] In an embodiment, the training data includes measurement data provided by actual measurements performed on at least 3 different sensor devices (eg, 3 to 50, or 3 to 25 different sensor devices).

[0108] Preferably, each of the at least 3 different sensor devices comprises a semiconductor substrate obtained from at least three different semiconductor wafers (e.g., obtained from three “corner wafers” (i.e., wafers produced at a process corner) (e.g., obtained from at least 3 different corner wafers referred to as TT (typical-typical), SS (slow-slow) and FF (fast-fast))).

[0109] In an embodiment, wherein the training data comprises a plurality of trajectories for approaching a position in the envisaged measurement range from a plurality of different directions.

[0110] In embodiments, the sensor device is movable with only 1 degree of freedom relative to the magnetic source, or the magnetic source is movable with only 1 degree of freedom relative to the sensor device, and wherein the training data comprises at least two trajectories for various measurement positions approaching the measurement range in two different directions (e.g., one trajectory with increasing X values, and one trajectory with decreasing X values).

[0111] In an embodiment, the sensor device is movable with only 2 degrees of freedom relative to the magnetic source, or the magnetic source is movable with only 2 degrees of freedom relative to the sensor device, and wherein the training data includes at least four trajectories for various measurement positions approaching the measurement range in at least four different directions (e.g., a first trajectory with increasing X values ​​and increasing Y values, a second trajectory with increasing X values ​​and decreasing Y values, a third trajectory with decreasing X values ​​and increasing Y values, and a fourth trajectory with decreasing X values ​​and decreasing Y values).

[0112] In an embodiment, the sensor device is movable with only 3 degrees of freedom relative to the magnetic source, or the magnetic source is movable with only 3 degrees of freedom relative to the sensor device, and wherein the training data includes at least eight trajectories for various measurement positions approaching the measurement range in at least eight different directions (e.g., a first trajectory with increasing X, Y, and Z values, a second trajectory with increasing X and Y but decreasing Z values, a third trajectory with increasing X and Z values ​​but decreasing Y values, a fourth trajectory with increasing X values ​​but decreasing Y and Z values, a fifth trajectory with decreasing X values ​​but increasing Y and Z values, a sixth trajectory with decreasing X and Y values ​​but increasing Z values, a seventh trajectory with decreasing X and Z values ​​but increasing Y values, and an eighth trajectory with decreasing X, Y, and Z values).

[0113] In an embodiment, some or all of the trajectories are defined by Bezier curves.

[0114] In an embodiment, some or all of the trajectories are defined by Bezier curves that extend at least 10% or at least 20% outside the envisaged measurable range.

[0115] In an embodiment, the sensor device may be moved relative to the magnetic source along a straight line or along a curve. In this case, the method is a "method for determining a 1D position".

[0116] In an embodiment, the neural network has only one output node (for providing an estimated position value), and the hidden layer includes only a single GRU unit. In this case, only about 20 to 25 parameters (e.g., about 23 parameters) need to be trained.

[0117] In an embodiment, the sensor device is movable in a two-dimensional plane relative to the magnetic source. In this embodiment, step b) may comprise determining a first coordinate (x) along a first axis (X) and a second coordinate (y) along a second axis (Y), the second axis (Y) preferably being perpendicular to the X axis. In this case, the method is a "method for determining a 2D position". The neural network may have only two output nodes and the hidden layer may comprise only two or only four GRU units.

[0118] In an embodiment, the sensor device is movable relative to the magnetic source in three directions. In this embodiment, step b) may comprise determining a first coordinate (x) along a first axis (X) and a second coordinate (y) along a second axis (Y) and a third coordinate (z) along a third axis (Z), the second axis (Y) being preferably perpendicular to the X axis and the third axis (Z) being preferably perpendicular to the X axis and the Y axis. In this case, the method is a "method for determining a 3D position". The neural network may have only three output nodes and the hidden layer may comprise only three or only six GRU units.

[0119] In an embodiment, step b) further comprises: determining one or more additional signals in one or more of the following ways: by determining one or more pairwise differences, by determining one or more magnetic field gradients, by determining at least one average signal and by subtracting the average signal from at least two measured signals, by normalizing the signals (e.g., by scaling all signals), by calculating the ratio of two measured signals, by calculating the ratio of two pairwise differences, by calculating the ratio of two gradients; and feeding at least one of these additional signals into a neural network; and wherein the neural network is trained using training data derived from computer simulations and / or actual measurements for estimating position and is trained using one or more of these additional signals.

[0120] In an embodiment, the sensor device includes at least one group of sensors configured to measure parallel magnetic field components (e.g., Bz1 and Bz2), and the sensor device is configured to determine one or more pairwise differences for the one or more groups, and the (one or more) pairwise differences are input into a neural network, and the neural network is trained to estimate position based on training data including the (one or more) pairwise differences.

[0121] An advantage of this embodiment is that if pairwise difference, gradient or mean compensated data is input into the neural network, the neural network does not need to be trained to reduce or eliminate the magnetic interference field.

[0122] Likewise, if ratios of pairwise differences, ratios of gradients, or ratios of mean-compensated data are input into the neural network, the neural network does not need to be trained for temperature changes.

[0123] In an embodiment, the sensor device is configured to measure at least two magnetic field components parallel to the semiconductor substrate (e.g., Bx1 and Bx2), and to measure at least two magnetic field components perpendicular to the semiconductor substrate (e.g., Bz3 and Bz4 at the same position or at different positions), and the sensor device is provided for determining two pairwise differences ΔBx=(Bx2-Bx1) and ΔBz=(Bz2-Bz1), and / or ratios of these pairwise differences. rate, for example, R1=(ΔBx / ΔBz) or R2=(ΔBz / ΔBx), and the neural network is configured to receive 6 input signals, namely Bx1, Bx2, Bz1, Bx2, ΔBx and ΔBz, or to receive 7 input signals, namely Bx1, Bx2, Bz1, Bx2, ΔBx, ΔBz and R1, or to receive 7 input signals, namely Bx1, Bx2, Bz1, Bx2, ΔBx, ΔBz and R2.

[0124] In an embodiment, the recurrent neural network comprises at most twelve, or at most six, or at most four gated recurrent units (GRUs).

[0125] In an embodiment, the recurrent neural network includes one to four gated recurrent unit GRU units. The GRU can use a tanh function and / or a sigmoid function.

[0126] A "GRU node" is known in the art and stands for "Gated Recurrent Unit", which is typically used in linguistic applications such as velocity recognition, text classification, textuality analysis, etc., and especially for this reason, but it is not a trivial choice for use in position sensor systems.

[0127] Surprisingly, using four Hall sensor signals as input and using a GRU network, only 23 parameters need to be trained, but its accuracy is very similar to that of the "Kalman Filter" (generally considered to be "state of the art"), but the calculation speed can be about 5 times that of the "Kalman Filter", mainly due to the low number of trainable parameters.

[0128] One or more GRUs may be implemented in hardware, for example, as described in US20180046901(A1), the entire contents of which are incorporated herein by reference.

[0129] Preferably, the GRU uses a time sequence of at least 3 frames, or at least 5 frames, or at least 10 frames, or at least 20 frames. Fig. 10A It can be seen that the accuracy of the position estimate can be improved by choosing a larger time series.

[0130] In an embodiment, the neural network comprises at most twelve, or at most six, or at most four simple RNN units (SRNNs).

[0131] In an embodiment, the neural network comprises at most twelve, or at most six, or at most four LSTM units.

[0132] According to a second aspect, the present invention also provides a position sensor system, which comprises: a magnetic source (e.g., a permanent magnet); a sensor device comprising a semiconductor substrate comprising a plurality of at least two magnetic sensors located at at least two different positions, or at least four magnetic sensors located at at least two different positions (e.g., each measuring Bx and Bz); and a processing circuit configured to execute the method according to the first aspect.

[0133] The processing circuit may be implemented on the same substrate as the substrate including the sensor element, but the present invention is not limited thereto. In an embodiment, the sensor device may include a sensor chip including a semiconductor substrate including a magnetic sensor and an optional temperature sensor, and the processing circuit is implemented in the processing chip. The sensor chip and the processing chip are communicatively connected to each other. They may be implemented on a single printed circuit board (PCB), but this is not absolutely necessary.

[0134] In an embodiment, the sensor device is movable with only 1 degree of freedom relative to the magnetic source, and the sensor device includes 4 to 25, or 4 to 16, or 4 to 9 magnetic sensors, and the sensor device or the magnetic source is movable along a straight line or along a curve, and the number of trainable parameters is at most 150, or at most 100, or at most 50.

[0135] In an embodiment, the sensor device is movable with only 2 degrees of freedom relative to the magnetic source, and the sensor device includes 4 to 25, or 4 to 16, or 4 to 9 magnetic sensors, and the sensor device or the magnetic source is movable in two directions in a virtual plane (e.g., XY) or on a virtual surface, and the number of trainable parameters is at most 300, or at most 250, or at most 200, or at most 150, or at most 100.

[0136] In an embodiment, the movement of the sensor device relative to the magnetic source is purely translational without rotation.

[0137] In an embodiment, the movement of the sensor device relative to the magnetic source is purely rotational without translation.

[0138] In an embodiment, the movement of the sensor device relative to the magnetic source is a combination of translation and rotation, but the rotation is dependent on the translation.

[0139] In an embodiment, a mean square error (MSE) of the position determined by the artificial neural network is less than 2% of the predefined measurement range, or less than 1.5% of the predefined measurement range, or less than 1% of the predefined measurement range.

[0140] In an embodiment, the semiconductor substrate including the plurality of magnetic sensors has a size of at most 3.0 mm x 3.0 mm.

[0141] In an embodiment, the processing circuit comprises a programmable processor having a 32-bit CPU core and a floating point unit (FPU), and comprises up to 2M bytes or up to 1M bytes of flash memory and up to 512K bytes or up to 256K bytes of RAM, the programmable processor being configured to run at an internal clock frequency of up to 400MHz or up to 200MHz or up to 100MHz; and the artificial neural network is implemented in software configured to be executed by the programmable processor.

[0142] The processor may have a 32 bits CPU core.

[0143] In an embodiment, the semiconductor substrate contains 4 to 25 horizontal Hall elements, or 4 to 16 horizontal Hall elements, or 4 to 9 horizontal Hall elements, preferably without IMC, and all magnetic sensor elements are horizontal Hall elements, whereby there are no vertical Hall elements or magnetoresistive elements.

[0144] In an embodiment, the position sensor system further comprises an AI accelerator for executing an artificial neural network.

[0145] AI accelerators can be implemented in the analog domain or the digital domain.

[0146] According to a third aspect, the present invention also provides a position sensor device, comprising: a semiconductor substrate, which includes at least two magnetic sensors, which are spaced apart from each other and configured to provide at least two magnetic sensor signals; a processing circuit, which is configured to execute the method according to the first aspect.

[0147] In an embodiment, the semiconductor substrate is implemented in a first chip, and the processing circuit is implemented in a second chip, and the first chip and the second chip are mounted on a printed circuit board (PCB).

[0148] In an embodiment, the processing circuit may be incorporated inside the position sensor device. The position sensor device may be in the form of a PCB or a module or assembly with multiple chips, or in the form of a single package.

[0149] Particular and preferred aspects of the invention are set out in the accompanying independent and dependent claims. Features from the dependent claims may be combined with features of the independent claims and with features of other dependent claims as appropriate and not just as explicitly set out in the claims.

[0150] These and other aspects of the invention will be apparent from and elucidated with reference to the embodiment(s) described hereinafter. BRIEF DESCRIPTION OF THE DRAWINGS

[0151] Figure 1 is a perspective view of a position sensor arrangement comprising a magnet and a sensor device, wherein the magnet is movable in a straight line relative to the sensor device.

[0152] Figure 2 Yes, you can Figure 1 A high-level block diagram of a position sensor device used in a position sensor system.

[0153] Figure 3A Shows that it will Figure 1 The amplitudes of the magnetic field components Bx, By, Bz measured in arbitrary units in the plane XY at a distance of 5.0 mm below the two-pole bar magnet. Figure 3A It is a grayscale image. Figure 3B is a dithered picture (provided for illustrative purposes only).

[0154] Figure 4A is a high-level block diagram of a position sensor system proposed by the present invention, which is configured to determine the position of a sensor device relative to a magnetic source or the position of a magnetic source relative to the sensor device using a trained artificial neural network (ANN).

[0155] Figure 4B Shows Figure 4A The special case of where the ANN is implemented inside the sensor device.

[0156] FIG. 5A to FIG. 5F ,as well as FIG. 6A to FIG. 6C Schematically illustrates the generation of a method that can be used in embodiments of the present invention (e.g., for training Figure 4A or Figure 4B Various examples of training data for artificial neural networks.

[0157] Figure 7 Shows Figure 4A A variant of the block diagram of , in which additional signals are derived from the measured signals and in which these additional signals are also fed into the ANN.

[0158] FIG. 8A to FIG. 8F An example of a sensor arrangement that may be used in embodiments of the invention is shown.

[0159] Fig.9A shows a graph with several waveforms representing changes in signal amplitude according to the position of the sensor device, which can be represented by Fig. 8E The sensor element is Figure 1 The position sensor is used in the system when measured.

[0160] Fig. 9B shows the Fig.9A signal.

[0161] Fig. 10A A graph illustrating the effect of the length of the time series of a recurrent neural network in stateless mode on the mean absolute error for a linear position sensor is shown.

[0162] Fig. 10B A graph illustrating the effect of the number of Hall elements on the mean absolute error is shown.

[0163] Fig. 10C A graph illustrating the effect of die size on mean absolute error is shown.

[0164] Fig.11A A block diagram of a neural network proposed by the present invention using a hidden layer with a single GRU unit configured to determine a 1D position is shown. The GRU unit receives as input at least 4 magnetic sensor signals and optionally also a temperature signal.

[0165] Fig. 11B is shown for a single GRU unit (e.g., Fig.11A ), the typical number of trainable parameters depending on the number of input signals.

[0166] Fig.12 (a) to Fig.12 (g) shows an example of a frame sequence that can be used to train a neural network for a 1D position sensor system.

[0167] Fig.13A Shown is a block diagram of another neural network trained to estimate ID position, the neural network comprising only two GRU units, as may be used in embodiments of the present invention. Fig. 13B A typical number of trainable parameters for examples of such networks is shown.

[0168] Fig.14A Shown is a block diagram of another neural network trained to estimate ID position, the neural network comprising only two GRU units, as may be used in embodiments of the present invention. Fig. 14B A typical number of trainable parameters for examples of such networks is shown.

[0169] Fig.15AShown is a block diagram of another neural network trained to estimate ID position, the neural network comprising only four GRU units, as may be used in embodiments of the present invention. Fig. 15B A typical number of trainable parameters for examples of such networks is shown.

[0170] Fig.16 is a perspective view of a position sensor system with two degrees of freedom. The system comprises a magnet and a sensor device, the magnet being movable relative to the sensor device in a plane XY.

[0171] Fig.17 Shown are a number (512) of Bezier curves that may be used to train a neural network for determining 2D positions.

[0172] Fig.18A The method for estimating the sensor arrangement (e.g., Fig.16 A recurrent neural network for 2D positions of the image (as shown in ). The network has only two GRU units.

[0173] Fig.18B A typical number of trainable parameters for examples of such networks is shown.

[0174] Fig.19 Shows the use of Fig.17 The 512 trajectories shown in Fig.18A An example of the resulting predictions of the neural network shown in .

[0175] Fig. 20A The method for estimating the sensor arrangement (e.g., Fig.16 1 ). The network has two fully connected hidden layers, each of which includes two GRU units, resulting in only four GRU units in total.

[0176] Fig. 20B A typical number of trainable parameters for examples of such networks is shown.

[0177] Fig.21 is a table showing the number of trainable parameters for a sensor system having four magnetic sensors arranged in a straight line (e.g., as Fig. 8A ), with one to four GRU units per layer, with only one or only two layers, and an estimate of the resulting accuracy (with respect to MSE in mm).

[0178] Fig. 22 is a table showing the number of trainable parameters for a sensor system having four magnetic sensors arranged on a regular 2×2 grid (e.g., as Figure 8B ), with one to four GRU units per layer, with only one or only two layers, and an estimate of the resulting accuracy (with respect to MSE in mm).

[0179] Fig.23 shows that it can be used to estimate (for example, as in Figure 1 or Fig.16 Block diagram of another recurrent neural network for 1D or 2D or 3D positions of a sensor arrangement (shown in ). The network has three hidden layers, each of which includes four GRU units, thus having a total of 12 GRU units.

[0180] Fig.24 A flow chart showing a method proposed by the invention for determining the position of a sensor device relative to a magnetic source or the position of a magnetic source relative to a sensor device, wherein the movement has only 1 or 2 or 3 degrees of freedom, such as pure translation without rotation (e.g. Figure 1 and Fig.16 ), or pure rotation about a stationary axis (e.g., a magnet of a knob or button mounted on a shaft), or movement with both rotation and translation, but where the rotation depends on the translation and the translation depends on the rotation (e.g., as in Fig.25 or Fig.26 A joystick that can be moved forward / backward and left / right as shown in the figure, or a magnet for an off-axis mounted knob or button), etc.

[0181] Fig.25 is a perspective view of a position sensor system with two degrees of freedom in which a magnet is mounted to a joystick that can move forward / backward and left / right relative to the sensor device about a reference point located on a semiconductor substrate.

[0182] Fig.26 is a perspective view of a position sensor system with two degrees of freedom in which a magnet is mounted to a joystick that can move forward / backward and left / right relative to the sensor device about a reference point located above a semiconductor substrate.

[0183] Fig. 27 is a graph showing the raw output signal (in arbitrary units) of a horizontal Hall element for various amplitudes of magnetic field at temperatures of -40°C and at +80°C.

[0184] Fig.28 The diagram shows Fig.11A Table of the accuracy of a 1D positioning system (GRU1 architecture) using either 4 input signals (4 magnetic signals) or 5 input signals (4 magnetic signals and temperature).

[0185] Fig.29A table showing a typical number of trainable parameters for a 1D positioning system using a recurrent neural network with 5 input signals (4 magnetic signals and temperature) for various architectures; and

[0186] Fig.30 Illustrative accuracy of these systems is shown.

[0187] Fig.31 A table showing a typical number of trainable parameters for a 2D positioning system using a recurrent neural network with 5 input signals (4 magnetic signals and temperature) for various architectures; and

[0188] Fig.32 Illustrative accuracy of these systems is shown.

[0189] Fig.33A and Fig.33B is an illustrative example of a simple neural network.

[0190] These drawings are only schematic and non-limiting. In the drawings, for illustrative purposes, the size of some of the elements may be exaggerated and not drawn to scale. Any reference numerals in the claims should not be construed as limiting the scope. In different drawings, the same reference numerals refer to the same or similar elements. DETAILED DESCRIPTION

[0191] The present invention will be described with respect to particular embodiments and with reference to certain drawings but the invention is not limited thereto but only by the claims.

[0192] The terms first, second, etc. in the specification and in the claims are used to distinguish between similar elements and not necessarily to describe a sequence in time, space, level, or in any other manner. It should be understood that the terms so used are interchangeable under appropriate circumstances, and that the embodiments of the invention described herein are capable of operation in a sequence different from that described or illustrated herein.

[0193] The terms top, bottom, etc. in the specification and claims are used for descriptive purposes and not necessarily for describing relative positions. It is to be understood that the terms so used are interchangeable under appropriate circumstances and that the embodiments of the invention described herein are capable of operation in orientations other than those described or illustrated herein.

[0194] It should be noted that the term "comprising" used in the claims should not be interpreted as being limited to the means listed thereafter; it does not exclude other elements or steps. Thus, the term should be interpreted as specifying the presence of the stated features, integers, steps or components as mentioned, but does not exclude the presence or addition of one or more other features, integers, steps or components, or groups thereof. Thus, the scope of the expression "a device comprising means A and B" should not be limited to devices consisting only of component A and component B. It means that for the present invention, the only relevant components of the device are A and B.

[0195] References throughout this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification do not necessarily all refer to the same embodiment, but may refer to different embodiments. Furthermore, in one or more embodiments, as would be apparent to one of ordinary skill in the art from this disclosure, the particular features, structures, or characteristics may be combined in any suitable manner.

[0196] Similarly, it should be appreciated that in the description of exemplary embodiments of the present invention, for the purpose of streamlining the present disclosure and assisting in the understanding of one or more of the various inventive aspects, the various features of the present invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than the features expressly recited in each claim. On the contrary, as reflected in the appended claims, the inventive aspects lie in fewer features than all of the features of a single preceding disclosed embodiment. Thus, the claims appended to the specific embodiments are hereby expressly incorporated into the specific embodiments, wherein each claim itself represents a separate embodiment of the present invention.

[0197] In addition, although some embodiments described herein include some features included in other embodiments but do not include other features included in these other embodiments, the combination of features of different embodiments is intended to fall within the scope of the present invention and form different embodiments as will be understood by those skilled in the art. For example, in the appended claims, any of the embodiments claimed for protection may be used in any combination.

[0198] In the description provided herein, numerous specific details are set forth. However, it should be understood that embodiments of the present invention may be practiced without these specific details. In other instances, well-known methods, structures, and techniques are not shown in detail to avoid obscuring the understanding of this specification.

[0199] In this document, the abbreviation "DOF" means "degrees of freedom".

[0200] In this document, the abbreviation "ANN" means "Artificial Neural Network".

[0201] In this document, the abbreviation "RNN" means "Recurrent Neural Network".

[0202] In this document, the abbreviation "LSTM" means "Long Short-Term Memory Network".

[0203] In this document, the abbreviation "GRU" means "Gated Recurrent Unit".

[0204] In this document, unless otherwise mentioned, the abbreviation “MSE” means “mean square error” and is expressed in [mm].

[0205] In this document, unless explicitly mentioned otherwise, the term "magnetic sensor device" or "sensor device" refers to a device comprising at least two magnetic sensor elements, which device is preferably integrated in a semiconductor substrate. The sensor device may be included in a package (also referred to as a "chip"), but that is not absolutely necessary.

[0206] In this document, the term “sensor element” or “magnetic sensor element” refers to a single vertical Hall element or a single horizontal Hall element or a single magnetoresistive (MR) element (eg, a GMR element or an XMR element or an AMR element).

[0207] In this document, the term "magnetic sensor" or "magnetic sensor structure" may refer to a set of components or subcircuits or structures capable of measuring magnetic quantities, such as, for example, a set of at least two magnetic sensor elements, or a Wheatstone bridge containing four MR elements.

[0208] In certain embodiments of the present invention, the term "magnetic sensor" or "magnetic sensor structure" may refer to an arrangement including one or more integrated magnetic concentrators (IMCs) (also referred to as "integrated flux concentrators") and two or four or eight horizontal Hall elements arranged near the periphery of the IMCs.

[0209] In this document, the expressions "in-plane component of the magnetic field vector" and "orthogonal projection of the magnetic field vector in the sensor plane" mean the same thing. If the sensor device is or comprises a semiconductor substrate, this also means "the magnetic field component parallel to the semiconductor substrate". The in-plane component is typically referred to as Bx or By.

[0210] In this document, the expressions "out-of-plane component of a vector" and "Z-component of a vector" and "orthogonal projection of the vector onto an axis perpendicular to the sensor plane" mean the same thing. The out-of-plane component is typically referred to as Bz.

[0211] Embodiments of the invention are typically described using an orthogonal coordinate system fixed to the sensor device and having three axes X, Y, Z, wherein the X-axis and the Y-axis are parallel to the substrate and the Z-axis is perpendicular to the substrate.

[0212] In this document, the expressions "spatial derivative" or "derivative" or "spatial gradient" or "gradient" are used as synonyms. In the context of the present invention, the gradient is typically determined as the difference between two values ​​measured at two different positions which may be spaced apart by a distance in the range from 1.0 mm to 3.0 mm. In theory, the gradient is calculated as the difference between the two values ​​divided by the distance "dx" between the sensor positions, but in practice the division by "dx" is often omitted, since the measured signal needs to be scaled anyway.

[0213] For this reason, the terms "magnetic field gradient" and "pairwise difference" may be used interchangeably.

[0214] In this document, horizontal Hall plates are typically referred to as H1, H2, etc., and signals from these horizontal Hall plates are typically referred to as h1, h2, etc.; vertical Hall plates are typically referred to as V1, V2, etc.; and signals from these vertical Hall plates are typically referred to as v1, v2, etc.

[0215] In this document, the expression "neural network is trained" means that the neural network is trained using "machine learning" (ML) or using deep learning techniques. Software for deep learning is known in the art and is commercially available, for example from Google.

[0216] In this document, the expression "stateful neural network" means that the prediction of the output signal(s) is done on a frame-by-frame basis.

[0217] In the present invention, a network topology having a single hidden layer with "n1" components is labeled as: "GRU n1", see for example Fig.11A Figure 14 Fig.18A .

[0218] In the present invention, a network topology with two hidden layers, a first hidden layer with "n1" GRU components, and a second hidden layer with "n2" GRU components, is labeled as: "GRU n1, n2", see for example Fig.13A Figure 15 Fig. 20A .

[0219] In this document, the expressions "GRU unit" or "GRU component" mean the same thing unless other meanings are clearly indicated from the context.

[0220] In the present invention, a network topology with three hidden layers - a first hidden layer with "n1" GRU components, a second hidden layer with "n2" GRU components, and a third hidden layer with "n3" GRU components - is labeled as: "GRUn1, n2, n3", see e.g. Fig.21 and Fig. 22 .

[0221] Similarly, “RNN n1” means a network topology having a single hidden layer with n1 RNN components; “RNN n1n2” means a network topology having two hidden layers, namely a first hidden layer having n1 RNN components and a second hidden layer having n2 RNN components; and “RNN n1n2 n3” means a network topology having three hidden layers, namely a first hidden layer having n1 RNN components, a second hidden layer having n2 RNN components, and a third hidden layer having n3 RNN components.

[0222] Similarly, “LSTM n1” means a network topology having a single hidden layer with n1 LSTM components; “LSTM n1n2” means a network topology having two hidden layers, namely, a first hidden layer having n1 LSTM components and a second hidden layer having n2 LSTM components; and “LSTM n1 n2 n3” means a network topology having three hidden layers, namely, a first hidden layer having n1 LSTM components, a second hidden layer having n2 LSTM components, and a third hidden layer having n3 LSTM components.

[0223] The present invention relates generally to the field of magnetic position sensor systems, devices and methods. And more specifically, the task of the inventors was to find a method and system for accurate position determination of an object that can move with only 1 or only 2 or only 3 degrees of freedom (DOF) for anti-counterfeiting applications, automotive applications, industrial applications and / or robotic applications.

[0224] The inventors thought of using artificial neural networks, but in order to be commercially viable, the solution had to be "relatively lightweight", e.g. in terms of the number of layers, number of nodes and / or trainable parameters. Thus, they had to solve the problem of discovering whether such a neural network could be built that was relatively lightweight and at the same time provided high accuracy and could be processed almost in real time (e.g., within 10ms), in other words, they had to find out whether such a lightweight neural network existed, and / or how many trainable parameters would be needed to achieve sufficient accuracy for the envisioned application, etc.

[0225] Artificial neural networks (ANNs) have been around for decades. According to some sources, at least six types of ANNs are used in machine learning: (1) feedforward neural networks, (2) radial basis function neural networks, (3) Kohonen self-organizing neural networks, (4) recurrent neural networks (RNNs), (5) convolutional neural networks, and (6) modular neural networks.

[0226] Artificial neural networks (ANNs) are typically used to solve highly complex mathematical problems, such as, for example, facial recognition, speech recognition, handwriting recognition. These networks typically require tens of thousands of nodes and need to be trained with thousands of training images or sound clips. The execution of such networks requires a considerable amount of time.

[0227] For at least the reasons stated above, the use of artificial neural networks is not an obvious choice for building position sensor systems having only 1 or only 2 or only 3 degrees of freedom, not because it was believed that such systems would not work, but because it was believed that such networks would be highly complex, and / or would require considerable processing power and / or memory resources and / or processing time, and for these and other reasons would not be suitable for automotive applications, industrial applications, and / or robotic applications where a nearly real-time response (e.g., a response within about 10 ms) is an absolute requirement.

[0228] Refer to the attached drawings.

[0229] Figure 1 is a perspective view of a position sensor arrangement 100 comprising a magnetic source 101 and a sensor device 102 . Figure 1 The magnetic source is a two-pole magnet, but magnets with more than two poles, such as magnets with four poles, may also be used. The shape of the magnet shown is a bar magnet, but this is not necessary for the invention to work, and other magnet shapes, such as ring magnets or disk magnets, may also be used. The sensor device is preferably a packaged integrated chip. In Figure 1 In the example of , the sensor device 102 has a fixed position and the magnet 101 is movable along the line X. In other embodiments, the magnet 101 may have a fixed position and the sensor device may be movable relative to the magnet 101. The present invention is limited to position sensor systems that allow movement with only 1 degree of freedom (e.g., Figure 1 ), or movement with only 2 degrees of freedom (e.g., Fig.16 , Fig.25 , Fig.26 ) (e.g., pure translation along a straight line, or pure translation along a curve, or pure translation in plane XY), or movement with only 3 degrees of freedom (not shown) (e.g., pure translation in three dimensions). Figure 1 In a preferred embodiment of the sensor arrangement, the position in the Y direction (lateral offset) is preferably constant and equal to 0, and the position in the Z direction (height direction) is also preferably constant and typically has a value in the range from 0.1 mm to 10.0 mm, or in the range from 0.1 mm to 5.0 mm, but due to installation tolerances, the actual values ​​of Y and Z may be slightly different.

[0230] Figure 2 It shows that it can be Figure 1 A high-level block diagram of a classical position sensor device 102 used in a position sensor system to determine the position of a magnet 101 relative to a sensor device 102. The sensor device includes a first magnetic sensor that provides a first signal s1 (e.g., a quasi-sine signal), and a second magnetic sensor that provides a second signal s2 (e.g., a quasi-cosine signal). The first magnetic sensor and the second magnetic sensor can be two horizontal Hall elements spaced apart in the X direction, or two vertical Hall elements spaced apart in the X direction. The sensor device 102 can include a "front end" 103, which is configured to bias and read out the sensor elements, and to digitize the measured signals s1 and s2 using an analog-to-digital converter (ADC). In box 104, the digitized signal can be further processed using an inverse tangent function, and the result can be "linearly corrected" in a "post-processing" box 105, for example using a lookup table (LUT) with optional interpolation, or using a piecewise linear approximation with optionally programmable data points. Such circuits are known in the art and therefore do not need to be explained in more detail here. It should be noted that the division of the various functions among blocks 103, 104, and 105 is somewhat arbitrary, for example, because the functions of blocks 104 and 105 may be implemented in hardware or in software executed by a programmable processor, and the ADC may be considered a separate block located between the front end 103 and the programmable processor, etc. Figure 2 The main purpose of this is to show that the classical solution for determining the position X of the magnet 101 typically comprises trigonometric functions and post-processing steps which are opposite to the solution proposed by the present invention, which will be further described.

[0231] Figure 3A and Figure 3B Shows the distance Figure 1 The amplitudes of the magnetic field components Bx, By, Bz are measured at each position (x, y) in the plane XY at a distance of about 5.0 mm from the bipolar bar magnet 101. The amplitudes are expressed in arbitrary units. Figure 3A It is a grayscale image. Figure 3BThe jitter graphs are provided for illustrative purposes. Such graphs can be obtained through actual measurements or through computer simulations. Figure 3A and Figure 3B In the example shown in FIG. 1 , the graph provides the amplitudes of Bx, By, and Bz for X and Y values ​​ranging from -4.0 mm to +4.0 mm, while for Figure 1 The measurement range of the system shown in is limited to from -2.5 mm to +2.5 mm. It should be clear that this is only an example and embodiments of the invention may use other magnets and / or other measurement ranges.

[0232] Figure 4A is a high-level block diagram of a position sensor system proposed by the present invention, which is configured for determining the position of a sensor device (e.g., Figure 1 The sensor device 102) is relative to a magnetic source (e.g., Figure 1 101), or determine the location of a magnetic source (e.g., Figure 1 The magnet 101) is relative to the sensor device (e.g., Figure 1 The location of the sensor device 102) is arranged such as Figure 1 The arrangement 100 shown in Fig.16 The system 1600 shown in FIG. Fig.25 System 2500, or Fig.26 The system 2600 is shown, but the invention is not limited to these examples. Figure 4A Shown in.

[0233] The proposed system 400 includes a plurality of at least two, or at least three, or at least four magnetic sensors. The magnetic sensor may be a Hall element, such as a horizontal Hall element, a vertical Hall element, a magnetoresistive (MR) element, or a combination thereof. The system 400 further includes a "bias and readout circuit system" for obtaining a signal from the magnetic sensor, such as including one or more of the following: a current source, a voltage source, a Wheatstone bridge, etc. The bias and readout circuit may be part of a front-end block 403, which may be connected to the front-end block 403. Figure 2 The front-end block 103 of the system 400 may be the same or different. Block 403 may also include at least one amplifier (not shown) and / or a device for sensitivity correction of various sensor elements. System 400 may also include at least one analog-to-digital converter ADC, which may be part of the front-end block 403, but not necessarily. The magnetic sensor and the bias and readout circuits will typically be implemented in a sensor device (e.g., an integrated sensor chip). The sensor device may further include a temperature sensor, and block 403 may be further configured to perform temperature correction on the measured signal.

[0234] According to an important aspect of the invention, the system 400 comprises a trained artificial neural network (ANN) configured to process signals obtained from the magnetic sensor element, and / or signals derived therefrom (e.g., difference signals), and optionally also to process signals obtained from the temperature sensor 406. The ANN can be implemented partly in hardware and partly in software, or completely in hardware or completely in software. Parts of the ANN can even be implemented in the analog domain (e.g., using so-called hardware accelerators).

[0235] In an embodiment, the system 400 includes an analog hardware accelerator. In this case, the front end 403 can be configured to provide an analog signal to the hardware accelerator, and to digitize at least one output of the hardware accelerator using at least one ADC, and to further process these digitized signals using digital circuits and / or programmable processors.

[0236] In an embodiment, the system 400 includes a digital hardware accelerator. In this case, the front end 403 may include an ADC and is configured to provide a digital signal to the digital hardware accelerator and is configured to further process at least one digital output provided by the hardware accelerator using a digital circuit and / or a programmable processor.

[0237] In an embodiment, the system 400 does not include a hardware accelerator. In this case, the front end 403 may include an ADC and be configured to provide a digital signal to a programmable processor that executes the algorithm of the ANN entirely in software.

[0238] It can be understood from the above that the ANN block 410 can be implemented in various ways, for example:

[0239] i) completely within the sensor device, for example, using a programmable processor or DSP 423, and using one or more analog hardware accelerators 421 and / or one or more digital co-processors 422, such as Figure 4B Of course, the analog accelerator will typically be followed by at least one ADC, and the programmable processor or DSP will typically be connected to volatile memory (e.g., RAM) and non-volatile memory (e.g., flash memory), but such details need not be shown.

[0240] ii) Entirely in an external device, for example, entirely in a laptop, desktop computer, or another processing device external to the sensor device, such as a powerful digital signal processor (DSP), or ECU, etc.

[0241] iii) Partly inside the sensor device and partly outside the sensor device, for example, in a laptop, a desktop computer, or another processing device external to the sensor device, such as a powerful digital signal processor (DSP), or an ECU, etc.

[0242] The programmable processor may be integrated in the same semiconductor substrate as the sensor element, or may be a separate chip mounted on the same printed circuit board (PCB) as the sensor device and communicatively coupled thereto.

[0243] In some embodiments, the sensor device includes a temperature sensor, but the temperature correction is not performed by the front end, but rather by the ANN. In this embodiment, a single neural network is thereby used to: perform (1) temperature correction of the magnetic sensor signal, and also to (2) determine the position of the sensor device relative to the magnetic source (or vice versa).

[0244] In all embodiments of the invention, the system 400 uses an artificial neural network (ANN) 410 that is trained to determine a 1D or 2D or 3D position based on signals obtained from the magnetic sensor and / or derived therefrom, and optionally also based on a temperature signal.

[0245] Although Figure 4A Although not explicitly shown in the figure, when the ANN 410 is executed by an external device, the sensor device and the external device must of course be communicatively connected, for example, using a wired interface or a wireless interface. Any suitable interface can be used to establish such communication. Such interfaces are well known in the art and are not the primary focus of the present invention and are therefore not described in detail.

[0246] FIG. 5A to FIG. 5F Schematic diagram of computer simulation-based training Figure 4A Various examples of "training data" for artificial neural networks.

[0247] The examples given assume a sensor device with four horizontal Hall plates providing signals Bz1, Bz2, Bz3, Bz4, but as already mentioned above, the invention is not limited thereto and may have less than four or more than four sensor elements and / or may use other magnetic sensor elements, or a mixture of magnetic sensor elements. The number, type and position of the sensor elements in the simulation must correspond to the actual number, type and position of the sensor elements in the sensor device. FIG. 8A to FIG. 8F Several examples are shown in .

[0248] The present invention proposes to use a recurrent neural network (RNN). The RNN is trained with a relatively large set of "training data". The "training data" can be viewed as a list (or file, or sequence) of groups or sets of corresponding values ​​(also called "frames"). A frame for a 1D position sensor system (where the sensor device includes four horizontal Hall elements) may consist of 5 values: (X, Bz1, Bz2, Bz3, Bz4), where X is the position of the sensor device, and Bz1-Bz4 are the values ​​(or signals) obtained from the four magnetic sensor elements for said position.

[0249] The value for position X is not chosen randomly, but rather is chosen assuming that the sensor device follows a particular "trajectory". Fig.12 (a) to Fig.12 Several examples of 1D trajectories are illustrated in (g), referred to herein as: "constant speed", "teleport", "sinusoidal", "flat top", "bounce", "sharp top", and "step". A trajectory can be continuous and change relatively smoothly, or it can change abruptly. Thus, for a 1D position sensor system, a "trajectory" can be represented by a list (or file) of positions (e.g., X) assumed by the sensor at different times. Fig.12 (a) to Fig.12 In the example of (g), each trajectory contains one hundred thousand samples (also written as 100K), but this is not absolutely necessary, and trajectories with a smaller or larger number of positions will also work. During some experiments, a training set of 100K frames was used, and during other experiments, 64K frames were used to train the network. Both provided adequate results, but of course, the present invention is not limited to this, and in some embodiments, a neural network with a position sensor system with only 1 degree of freedom can be trained with a training set containing a different number of frames, for example, from one thousand (1K) to ten million (10M) frames, or from ten thousand (10K) to one million (1M) frames, or from twenty thousand (20K) to five hundred thousand (500K) frames, or from fifty thousand (50K) to two hundred thousand (200K) frames.

[0250] For each position X, the values ​​Bz1 , Bz2 , Bz3 , Bz4 that a hypothetical sensor device with a specific size and sensor arrangement would measure when the sensor device is in this position can be determined, for example, by simulation tools.

[0251] exist Figure 5A In the example of , the neural network is "only" trained to detect the position X based on the measured sensor signal, and thus the network is not explicitly trained for external interference fields, temperature changes, lateral offsets, height offsets, random noise, or a combination thereof. In other words, Figure 5A The simulation tool assumes, for example, that the magnets are generated as Figure 3A In the magnetic field illustrated in the figure, the value of Y (lateral offset) is exactly equal to 0.0 mm, the value of Z (height) is exactly equal to 5.0 mm, the magnetic external interference field (Bext (Bexternal)) is exactly equal to 0, the temperature is constant, and there is no random noise, but in reality, due to various reasons such as installation tolerances, environmental influences, etc., these assumptions are only approximately correct. This is the simplest example and provides "basic functionality". The basic idea is to train a neural network so that it can provide accurate position values ​​based on the measured sensor data.

[0252] exist Figure 5B In the example of , the simulation tool allows not only the input of values ​​for position X, but also the input of values ​​for the external magnetic interference field. In the case where the sensor device only contains horizontal Hall elements, only the Bz component Bz_ext (Bz_external) of the external interference field is relevant. It is assumed that the magnetic interference field (if present) is a uniform field, which means that the interference is the same for all sensor positions. Since the value of Bz_ext is not explicitly measured by the sensor device, its value is not explicitly stored in the training data file, but the values ​​of Bz1 to Bz4 are changed due to the external interference field. In an embodiment, the trajectory file contains a plurality of sub-trajectories, for example, in a range from 2 to 1024 sub-trajectories, or from 2 to 512 sub-trajectories, or from 2 to 256 sub-trajectories, or from 2 to 128 sub-trajectories, or from 2 to 64 sub-trajectories, or from 2 to 32 sub-trajectories, or from 2 to 16 sub-trajectories, or from 2 to 8 sub-trajectories, or from 2 to 4 sub-trajectories. The X value of each sub-trajectory can be the same as Fig.12 (a) to Fig.12 (g) are the same or similar, and the value of the external interference field Bz_ext along this sub-trajectory can be constant. However, different sub-trajectories will have different values ​​for the external interference field Bz_ext (Bz_ext). The idea is to train the neural network so that it can provide accurate position values ​​based on sensor data even in the presence of external interference fields, and thereby make the position sensor system using such a neural network robust or more robust with respect to external interference fields.

[0253] exist Figure 5CIn the example of , the simulation tool allows not only the input of a value for position X, but also the input of a temperature value (e.g., the temperature of the semiconductor substrate). In an embodiment, a single temperature on the semiconductor substrate is measured, and the simulation assumes that the temperature distribution on the semiconductor surface of the sensor device is "stable". It should be noted that this assumption allows the temperatures at various sensor locations to be different. Since the temperature value is explicitly measured by the sensor device, its value "Temp" is added to the training data file as an additional input. In an embodiment, the trajectory file contains multiple sub-trajectories, for example, in the range from 2 to 1024 sub-trajectories, or 2 to 512, or 2 to 256, or 2 to 128, or 2 to 64, or 2 to 32, or 2 to 16, or 2 to 8, or 2 to 4. The X value of each sub-trajectory can be the same as Fig.12 (a) to Fig.12 (g) are the same or similar, and the temperature value Temp along this sub-trajectory can be constant. However, different sub-trajectories will have different values ​​for temperature. The idea is to train the neural network so that it can provide accurate position values ​​based on sensor data even when the temperature of the semiconductor substrate varies, and thereby make a position sensor system using such a neural network robust or more robust to temperature changes.

[0254] exist Figure 5D In the example of , the simulation tool allows not only the input of values ​​for position X, but also for lateral offset. Since the sensor device itself cannot measure the lateral offset, the value of Yoffset is not explicitly added to the training data, but is "merged" into the Bz value. In order to cope with various lateral offset values, the method with multiple sub-tracks can also be applied here. The idea is to train a neural network so that it can provide accurate position values ​​based on the sensor data even in the case of lateral mounting offsets; and thereby make a position sensor system using such a neural network robust or more robust with respect to mounting tolerances.

[0255] exist Figure 5EIn the example of , the simulation tool allows not only the input of a value for position X, but also a value for noise. The idea behind this embodiment is to try to train the neural network to cope with random noise or pseudo-random noise, such as will occur with Hall sensors. Since the noise for each sensor and for each moment will typically be different, the simulation tool can take five values ​​as input: one value for position X, and one noise value for each sensor element. Of course, it is also possible to implement the noise addition in the simulation tool itself. In an embodiment, the amplitude of the noise is predefined and is the same for all sensors. In another embodiment, the amplitude of the noise depends on the signal measured by the specific sensor element (for example, is proportional to the signal measured by the specific sensor element). The idea is to train the neural network so that it is more robust with respect to noise.

[0256] Various non-ideal factors (e.g., external interference fields, temperature changes, lateral offsets, noise, etc.) can also be combined, such as Fig. 5F As shown in the figure.

[0257] Alternatively or additionally, it is possible to utilize FIG. 5A to FIG. 5E The neural network is trained using a combination (e.g., the sum) of the various "training data files" obtained, or any subset thereof.

[0258] FIG. 6A to FIG. 6C The figure shows that instead of or in addition to using computer simulations, training data can also be generated by performing actual measurements in a test setup. It should be noted that actual measurements automatically include noise.

[0259] Fig. 6A A relatively simple example is shown where the sensor device is physically moved to a known position X relative to a magnet, and the value measured by the sensor is output and stored in a file along with the position X. In experiments, the sensor device was physically moved to two thousand (2K) different positions within a distance of 5 mm (from -2.5 mm to +2.5 mm) for training the neural network, and the results were good.

[0260] Figure 6B A slightly more complex example is shown, in which furthermore a magnetic disturbance field is applied to the sensor. Figure 5B As described, the sensor device may be moved to follow multiple sub-trajectories, and a different magnetic interference field (eg, Bz_ext) may be applied for each of these sub-trajectories.

[0261] Figure 6C An even more complex example is shown, in which further the external temperature of the sensor device varies.

[0262] exist Figure 6CIn the example, the position is varied and the temperature is varied, but no external perturbation field is applied.

[0263] exist Figure 6C In the example, the position is varied and an external disturbance field is applied, but the temperature is kept constant.

[0264] exist Figure 6C In the example, the position is varied, and an external disturbance field is applied, and the temperature is varied.

[0265] Of course, it is also possible to combine training data obtained by simulation with training data obtained by actual measurements.

[0266] It should be noted that "obtaining real measurement data from the sensor element of the sensor device" can be obtained by physically moving the sensor device relative to a stationary magnet, but can also be obtained by using a test device with multiple coils (sometimes also called a "3D coil system"), for example, as described in EP3621091 (A1) (incorporated herein by reference), which simulates the magnetic field that would be experienced by the sensor element if the sensor device were in a specific position relative to a specific magnet. Generating a magnetic field by means of coils provides the advantages that the sensor device can remain stationary and that delicate mechanical movements can be replaced by controlling the current flowing through the corresponding coils of the test device.

[0267] In a particular embodiment, an artificial neural network is trained using training data, the training data being derived from raw measurement signals obtained from magnetic sensor elements from a plurality of sensor devices (e.g., at least 5, or at least 10, or at least 20, or at least 50, or at least 100 sensor devices) and information obtained from temperature sensors present in these sensor devices (e.g., incorporated on the same semiconductor substrate as the magnetic sensor elements), the training data being measured under the following conditions: at various ambient temperatures (e.g., in increments of 20° C.), when the sensor devices are mechanically positioned at different positions relative to a permanent magnet (e.g., in 1% increments of a predefined measurement range), or when the sensor devices are placed in a test device or a “3D coil system”, where a magnetic field is generated at the sensor location by controlling a plurality of currents.

[0268] In a variant, not only a plurality of sensor devices are used to obtain the raw measurement data, but also a plurality of permanent magnets. This offers the advantage that imperfections (or production tolerances) of the magnets are also taken into account.

[0269] The raw measured data is preferably interpolated to improve spatial resolution, and may optionally be smoothed or low-pass filtered.

[0270] The plurality of sensor devices may be obtained from a single wafer, or may be obtained from a plurality of wafers, e.g. from a plurality of wafers of the same production batch; and / or e.g. from different "corner wafers" (i.e. wafers produced with different "process corners"). The plurality of sensor devices used for training the neural network may, for example, include sensor devices obtained from at least 3 different corner wafers, which are referred to as TT (typical-typical), SS (slow-slow) and FF (fast-fast), where the first letter refers to NMOS characteristics and the second letter refers to PMOS characteristics.

[0271] Alternatively or additionally, the sensor devices may be obtained from different locations of one or more wafers. As an example, 5 chips may be used per wafer, e.g. 1 chip comprising a substrate portion at the center of the wafer and 4 chips comprising substrate portions near the edge.

[0272] After the artificial neural network has been trained, the resulting training parameters can then be stored, for example, in a non-volatile memory of the specific device being measured, and may also be stored in other devices comprising substrate portions obtained from the same wafer as the device actually measured, and may also be stored in other devices from other wafers from the same production batch.

[0273] The training parameters may be determined for each production batch, or the same parameters may also be stored in a sensor device (eg, in a non-volatile memory of the sensor device) that includes substrate portions obtained from wafers from other production batches.

[0274] Figure 7 shows a block diagram of a position sensor system 700, which can be considered as Figure 4A A variation of the block diagram of , further comprising a “pre-processing” block 730, which is configured to receive one or more or all of the measured signals, and is configured to generate “additional signals” (e.g., paired difference signals, gradient signals, average signals, differences between measured signals and average signals, ratios of measured signals, ratios of difference signals, ratios of gradients, normalized signals, etc.), and to provide one or more or all of these additional signals to the artificial neural network 710.

[0275] As an example of a sensor device having four horizontal Hall elements H1 to H4, the normalized signal can be determined according to the following set of formulas:

[0276] sum = h1 + h2 + h3 + h4;

[0277] a1=h1 / sum;

[0278] a2=h2 / sum;

[0279] a3=h3 / sum;

[0280] a4=h4 / sum;

[0281] Where sum is the sum signal, h1 to h4 are the signals obtained from the Hall sensors H1 to H4, respectively, a1 is the normalized version of h1, a2 is the normalized version of h2, etc. The signal sums a1, a2, a3, a4 are additional signals that can be fed into the ANN.

[0282] Figure 7 Neural Network 710 Figure 4A The neural network 410 receives more input signals and thus needs to be trained with additional training data. FIG. 5A to FIG. 6C The training data described in can also be used here, but needs to be extended with additional information. FIG. 5A to FIG. 6C An extended version of the training data may include multiple frames containing the following values: (x, Bz1, Bz2, Bz3, Bz4, sum, a1, a2, a3, a4) or the following values: (x, Bz1, Bz2, Bz3, Bz4, Temp, sum, a1, a2, a3, a4).

[0283] In another example of a sensor device having four horizontal Hall elements H1 to H4, the additional data may be determined according to the following set of formulas:

[0284] a1=(h1-h2);

[0285] a2=(h3-h4);

[0286] a3=a1 / a2;

[0287] And the training data may include multiple frames containing the following values: (x, Bz1, Bz2, Bz3, Bz4, a1, a2, a3) or (x, Bz1, Bz2, Bz3, Bz4, Temp, a1, a2, a3), where Temp is a measured temperature value (e.g., the temperature of a semiconductor substrate).

[0288] But of course, the present invention is not limited to these examples.

[0289] As another example, in the case where the sensor is a 3D magnetic pixel that measures Bx, By, Bz at each sensor location, the sum of squares can be determined as sum = (Bx×Bx)+(By×By)+(Bz×Bz), and the three additional signals can be calculated as, for example: a1 = Bx / sum; a2 = By / sum; a3 = Bz / sum.

[0290] The pre-processing block 730 may be implemented in the analog domain, in the digital domain, or partially in the analog domain (e.g., pairwise subtraction) and partially in the digital domain (e.g., calculating ratios). Depending on the implementation, the pre-processing block 730 may include an analog-to-digital converter (ADC), an arithmetic or logic unit (ALU), or the like.

[0291] Using a pre-processing block 730 in front of the ANN may produce more accurate results.

[0292] FIG. 8A to FIG. 8F Several examples of sensor arrangements that can be used in embodiments of the present invention are shown, but of course the present invention is not limited to these examples. Results of position sensor systems using these sensor arrangements and their variations will be discussed further. FIG. 8A to FIG. 8F In the example shown in , the sensor device contains only horizontal Hall elements, without a flux concentrator. Two different die sizes (or "grid sizes") were simulated: the first die size has an area of ​​about 1.0 mm x 1.0 mm, and the second die has an area of ​​about 0.5 mm x 0.5 mm, but of course, the invention is not limited thereto, and other die sizes or grid sizes may also be used. Various arrangements of various numbers of Hall elements were simulated, for example: 1 x 2 in a horizontal line (see e.g. Fig. 8A ), the 1×4 on the horizontal line as two pairs (see e.g. Figure 8B ), 1×4 equally spaced diagonally (see e.g. Figure 8C ), at the 4 intersections of a regular 2×2 grid (see e.g. Fig.8D ), at the 9 intersections of a regular 3×3 grid (see e.g. Fig. 8E ), 9 pseudo-random positions (see e.g. Fig.8F ), but the invention is not limited to these examples, and other topologies may be used, as well as other sensor elements (e.g., vertical Hall elements, MR elements, 2D magnetic pixels, 3D magnetic pixels, etc.).

[0293] Fig.9A Shows that Fig. 8E . Graph of simulated signal waveforms of signals h1 ... h9 measured by sensor elements H1 ... H9 of the sensor device shown in FIG. 1 as they move along the X axis. It can be seen that signals h4, h5 and h6 are close to zero, so the positions of sensor elements H4, H5, H6 are a rather poor choice for this particular sensor system. This example shows that using more Hall elements does not necessarily mean that the results will be more accurate if their positions are poorly chosen.

[0294] Fig. 9B shows a graph with artificially added noise (e.g., Gaussian noise). Fig.9AThe simulation surprisingly shows that when the ANN is trained with data containing added noise, the accuracy of the predicted position X may actually improve slightly. This is very surprising.

[0295] Fig. 10A It shows that when using Fig. 8E For a sensor device with an area of ​​1.0 mm×1.0 mm and 3×3=9 horizontal Hall elements arranged as shown in FIG, the “length of the time series” of several recurrent neural networks (RNNs) has the following effect: Figure 1 Graph of the effect of the mean absolute error (MAE, in mm) of the linear position sensor system shown in A.

[0296] Three graphs are shown: the first graph (indicated by black circles) uses an RNN 2 2 architecture (2 layers, each with 2 components) with 37 trainable parameters; the second graph (indicated by black triangles) uses an LSTM 1 architecture (1 layer, with 1 component) with 46 trainable parameters; and the third graph (indicated by black squares) uses a GRU 1 architecture (1 layer, with 1 component) with 35 trainable parameters.

[0297] It should be noted that neural networks with a recurrent neural network (RNN) architecture, a “long short-term memory” (LSTM) architecture and a “gated recurrent unit” architecture, as well as methods for training them using deep learning techniques, are known per se in the field of artificial neural networks, but such networks have not, to the best of the inventors’ knowledge, been used in the field of magnetic position sensor systems. Fig. 10A It can be appreciated from Figure 1 that the absolute error of the position determined (or predicted or estimated) by an artificial neural network can be surprisingly reduced by increasing the "length of the time series" of the recurrent network. Moreover, and this is another big surprise: the number of trainable parameters for such networks can be surprisingly low, especially when compared to neural networks for facial recognition, speech recognition, handwriting recognition, etc., which require tens or even hundreds of thousands of trainable parameters. In this regard it should be noted that it is widely believed that artificial networks require a large number of trainable parameters and demand considerable resources in terms of CPU power and memory requirements, which makes them unsuitable or prohibitively expensive for applications such as "positioning sensor systems" for automotive, industrial or robotic applications.

[0298] from Fig. 10A It can be seen that a time series of length 2 already provides some improvement, and a time series of length at least 5 can reduce the mean absolute error (MAE) to about 1 / 2, but time series of length at least 10 or at least 20 can also be used.

[0299] Other simulations were performed to test the effects of other parameters such as die size and the number of Hall elements. For these simulations, a time series of length equal to 50 (indicated herein by "t50") was used in order to obtain "as good as possible" results and / or to minimize the effects of the time series length. However, this does not mean that in actual implementations, a time series of 50 is required, but a time series of length 5 or even smaller (e.g., 4 or 3 or 2) may also be used.

[0300] For the sake of completeness, it should be noted that a recurrent network (RNN) can function in either stateless mode or stateful mode. "Stateless mode" means that the network resets its internal state after a given time series. In this case, the network needs to be fed the entire time series, and the length of the time series matters. In "stateful mode", new predictions are generated for each new "frame", and the internal state is not reset after a time series. In this case, the input to the NN is not a time series of multiple frames, but only a single frame. For this mode, the time series length does not apply.

[0301] In a preferred embodiment, the RNN is configured to function in a stateful mode.

[0302] Fig. 10B A graph illustrating the effect of the number of Hall elements on the mean absolute error (MAE) is shown. The simulations were performed for a sensor device having a die size of 1.0 mm x 1.0 mm.

[0303] Three graphs are shown: the first graph (indicated by black circles) uses a Dense 8 8 8 architecture (i.e., an RNN with 3 hidden layers, each hidden layer comprising 8 fully connected nodes); the second graph (indicated by black triangles) uses a GRU 1 architecture (i.e., a single GRU component) with a time series length of 50 (t50); and the third graph (indicated by black squares) uses a GRU 4 4 4 architecture (i.e., an RNN with 3 hidden layers, each hidden layer comprising 4 fully connected nodes, each node comprising a GRU component).

[0304] The chart can be interpreted as follows:

[0305] 1) When using a dense neural network with 3 fully connected hidden layers, the mean absolute error (MAE) typically decreases as the number of sensor elements increases. (This is intuitively expected).

[0306] 2) The MAE curve for the “GRU 1t50” architecture has a very surprising property:

[0307] a) The MAE for the GRU architecture is about 1 / 3 of the MAE of the dense network (when using 2 or 3 sensor elements);

[0308] b) MAE for the GRU architecture has its minimum when using four sensor elements;

[0309] c) The MAE for the GRU architecture seems to be independent of the number of sensor elements (when only 4 to 9 sensor elements are used), and even seems to increase when more than 7 Hall elements are used.

[0310] 3) The MAE curve for “GRU 4 4 4t50” provides only a small improvement relative to the “GRU 1t50” architecture, but is much more complex in terms of hardware and software resources.

[0311] From the above it can be concluded that the "GRU 1t50" architecture in combination with a sensor device having 2 to 9 sensor elements, preferably 4 to 7 sensor elements, seems to be the best solution in terms of "high accuracy" and "low complexity". Fig. 10A The conclusion that the MAE of the neural network with the “GRU 1 architecture” does not increase significantly when the length of the time series decreases to values ​​of at least 5, the same conclusion applies to the “GRU 1” architecture using time series of at least 5.

[0312] Fig. 10C A graph illustrating the effect of die size on mean absolute error (MAE) is shown. In the graph, the area of ​​"die size 1" is 1.0 mm x 1.0 mm, and the area of ​​"die size 2" is 0.5 mm x 0.5 mm. Fig. 10B Two of the three architectures that produced the smallest MAE in , namely, “GRU 1t50” and GRU 4 4 4”, were simulated to see how these curves would change as the die size decreases. It should be noted that Fig. 10C The curve with black triangles and black squares in Fig. 10B The curves in are the same, but with a different vertical scale.

[0313] like Fig. 10C It can be seen that when the die size is changed from 1.0mm 2 Reduced to 0.25mm 2 , the MAE curve with the black triangle for the “GRU 1t50” architecture will shift slightly upward (i.e., the MAE will increase slightly), but the MAE typically only worsens by a factor of about 1.5.

[0314] The MAE curve with the black squares for the "GRU 4 4 4t50" architecture also does not seem to be much affected by the die size. According to the graph, the MAE seems to increase for some points and decrease for other points, but as mentioned above, this may be due to the fact that the locations of some of the sensor elements may have been chosen a bit unfortunate.

[0315] Not surprisingly, the MAE curve with black squares and black diamonds for the “GRU 4 4 4t50” is lower than the MAE curve with black triangles and black circles for the “GRU 1t50” architecture, even though the latter has a much simpler network complexity.

[0316] It is also interesting to note that accuracy does not decrease as a scaling factor of die size area, but the price of the silicon die typically decreases. This allows the technician to make a trade-off between die size and accuracy.

[0317] From the above it can be concluded that die size is not critical for the present invention to work.

[0318] Fig.11A FIG. 1 shows a block diagram of a trained artificial neural network ANN 1110 proposed by the present invention, which ANN 1110 can be used in a magnetic position sensor system having only one degree of freedom, such as Figure 1 , Figure 4A and Figure 4B as well as Figure 7 or variations thereof, for example including another magnet, or wherein the path of relative movement is curved, etc.

[0319] The ANN has an input layer, a single hidden layer including a single GRU component, and an output layer.

[0320] The input layer is configured to receive a plurality of magnetic sensor signals (eg, h1, h2, h3, h4), and optionally also to receive a temperature signal, such as from the front end block 403 (see Figure 4A and Figure 4B ), and optionally also for receiving "additional signals", such as, for example, from pre-processing block 730 (see Figure 7 ), pairwise differences, gradients, ratios, etc.

[0321] For a 1D position sensor system, the output is just a single position (eg, value X).

[0322] Using training data (e.g. FIG. 5A to FIG. 6C The GRU is trained using any of the training data described in, or a combination thereof, to determine a 1D position (e.g., the value of the position x along the x-axis).

[0323] Fig. 11B is a graph showing the number of input signals for a single GRU (e.g., Fig.11A 1D position sensor system). If "additional signals" are added, the number of trainable parameters may increase.

[0324] During the experiment, a specific GRU component from a specific vendor was used, for which the number N of trainable parameters for a single GRU layer can be calculated according to the following formula: N = 3 (n 2 +n×m+2n), where m is the number of inputs and n is the number of outputs. The output of the GRU layer is equal to the number of units. The output of the GRU layer is also attached to the output layer, which is a dense layer with its own parameters. Dense layers are sometimes also called "fully connected" layers. As an example, if the NN needs to estimate a variable (e.g., x) based on signals obtained from four magnetic sensors (m=4), the number of trainable parameters for the GRU layer is N=3×(1+4+2)=3×7=21. For a network with a single output, the output layer can, for example, have 2 additional parameters, resulting in a total of 23 trainable parameters. If the NN also uses temperature as an input, then n=1, m=5, and N=3×(1+5+2)=3×8=24 for the GRU layer, and assuming 2 parameters for the dense layer, a total of 26 trainable parameters are produced. If the NN gets 4 magnetic sensor signals, and 1 temperature signal, and 3 "additional signals" (e.g., two gradients, and the ratio of these gradients) as input, then n=1, m=8 for the GRU layer, and N=3×(1+8+2)=3×11=33. Assuming the output layer has 2 additional parameters, this means there are a total of 33+2=35 trainable parameters.

[0325] For GRU parts obtained from another supplier, this number may be slightly different, and should therefore be used only as an estimate. Whatever the exact number, it is completely surprising that artificial neural networks with a number of parameters less than 300, or less than 250, or less than 200, or less than 150, or less than 100, or less than 75, or less than 50, or less than 40, or less than 35, or less than 30 can provide very accurate results.

[0326] According to the simulation results, Figure 1 A 1D position sensor system (including a two-pole magnet with a length of about 5 mm and a 2 To about 1.0mm 2 A die size area in the range of and having at least 2 or at least 4 horizontal Hall elements and having Fig.11A The mean absolute error (MAE) of the sensor device with the neural network architecture shown in the figure is only about 0.02 mm to about 0.08 mm for a measurement range of -2.5 mm to +2.5 mm, that is, the absolute accuracy is on the order of about 0.4% to about 1.6%.

[0327] It is surprising that such good accuracy can be achieved with such an extremely simple neural network, which has far less than a thousand trainable parameters, for example, less than 300 trainable parameters, or even less than 100. It is almost unbelievable that a sensor device with only four sensor elements combined with an ANN with only a single GRU can do this work with only about 20 to 25 trainable parameters.

[0328] It should be noted that ANNs can be executed very quickly. As an example, during the experiments, the ANN was executed entirely in software on a laptop with an Intel Core i7-8750H running at 4.1 GHz. Fig.11A An ANN with 23 trainable parameters takes only about 0.716ms. This number should only be used as a rough estimate to get an impression of the order of magnitude.

[0329] It is expected that executing the same (or similar) algorithm on a fast digital signal processor (DSP), optionally with at least some hardware acceleration (analog or digital), will also be fast enough for many applications.

[0330] Fig.12 (a) to Fig.12 (g) shows examples of "frame sequences" that can be used to train a neural network for a 1D position sensor system. These sequences have been combined above FIG. 5A to FIG. 5F A discussion was held. Fig.12 (a) to Fig.12 The illustrative sequences shown in (g) are referred to herein as: (a) "constant speed", (b) "teleport", (c) "sine", (d) "flat top", (e) "bounce", (f) "sharp top", and (g) "step". Another big surprise not discussed above is that simulations have shown that even if the sensor device performs a movement similar to Fig.12 (a) to Fig.12 Any of the moves shown in (g) (for which the network was not explicitly trained) are distinct, and the positions predicted by the ANN are highly accurate.

[0331] Fig.13A , Fig.14A and Fig.15AThree block diagrams of other trained artificial neural networks (ANNs) 1310, 1410, 1510 that may be used in a magnetic position sensor system having only 1 degree of freedom, such as a magnetic position sensor system Figure 1 , Figure 4A and Figure 4B as well as Figure 7 or variations thereof, for example including another magnet, and / or wherein the path of relative movement is curved, etc.

[0332] FIG. 13A to FIG. 1 Each of these neural networks 1310, 1410, 1510 of 5 can be viewed as Fig.11A The main difference is that these ANNs include 2 GRU or 4 GRU components instead of just one. Although the number of trainable parameters of these networks is higher than Fig. 11B , but these networks are thus more powerful and should be able to provide at least as good results, perhaps slightly better.

[0333] Fig. 13B , Fig. 14B and Fig. 15B A typical number of trainable parameters for these networks is shown, depending on the number of input signals, but of course the invention is not limited to these examples.

[0334] Fig.16 is a perspective view of a position sensor system 1600 having two degrees of freedom (DOF). The system 1600 includes a magnet 1601 for generating a magnetic field, and a sensor device 1602 for sensing the magnetic field using a plurality of magnetic sensors.

[0335] The 2D position sensor system 1600 can be viewed as Figure 1 A variation of the 1D position sensor system 100, the main differences being:

[0336] 1) Fig.16 The magnet 1601 can move in a plane parallel to the XY plane;

[0337] 2) The position is defined by two independent variables (e.g. X and Y), so the output layer of the ANN needs to provide 2 independent outputs;

[0338] 3) ANN needs to be trained “for certain 2D locations”;

[0339] 4) The sensor device comprises at least 4 sensor elements, which may be collinear, but preferably are not collinear (see Fig.21 Relative to Fig. 22 );

[0340] 5) ANNs for 2D position sensor systems can be trained in stateful mode, and inference can be performed in stateful mode. In contrast, 1D neural networks can be trained in stateless mode, and inference can be performed in stateful mode.

[0341] Most or all of the above also apply mutatis mutandis here.

[0342] For example, Figure 4A , Figure 4B and Figure 7 The block diagram of is also applicable to a 2D position sensor system; since the sensor device 1602 includes at least four sensor elements, Fig. 8A The sensor arrangement cannot be used, but FIG. 8B to FIG. 8F A sensor arrangement may be used.

[0343] Suitable trajectories for creating training data will be Fig.17 will be described in Fig.18A and Fig. 20A An illustrative network topology is described in . Examples of achievable accuracy are given in Fig.19 For a sensor with only four sensor elements, the number of trainable parameters and the corresponding achievable accuracy will be Fig.21 and Fig. 22 Described in.

[0344] In a preferred embodiment of the 2D position sensor system, the movement is a "pure translation" with no rotation. Although not absolutely necessary, preferably the magnet 1601 is a quadrupole magnet, such as an axially magnetized quadrupole disk magnet.

[0345] Fig.17 A plurality of 512 Bezier curves are shown which may be used as "trajectories" for creating "training data" for training a neural network for determining 2D position. In fact, where a single "trajectory" is sufficient for a 1D position sensor system, a relatively large number of trajectories (in Fig.17 In the example of : 512 trajectories), used to train a 2D position sensor system.

[0346] The above Figures 5A to 6C Most of what is described in also applies here, for example, each trajectory can have several sub-trajectories to cope with external interference fields, and / or temperature changes, and / or noise, except that the trajectory of the 2D position sensor system should change the value of x and y within the measurement range instead of keeping one of them constant. Fig.17 As can be seen in FIG. 1 , the variables x and y vary over an area covering at least the measurement range, which is defined as a square area, where the variables x and y may range from -2.5 mm to +2.5 mm.

[0347] It should be noted that other trajectories may of course also be used (optionally in combination with Bezier curves), for example, a set of trajectories parallel to the X-axis, a set of trajectories parallel to the Y-axis, a set of trajectories forming an angle of approximately 10° with the X-axis, and a set of trajectories forming an angle of approximately 20° with the X-axis, and so on.

[0348] and FIG. 5A to FIG. 5F Similar to what is described in , the training data can be provided by a simulation tool that takes as input not only the values ​​of X, but also the values ​​of Y, and optionally, the values ​​of external interference fields, temperature, and noise. FIG. 6A to FIG. 6C Similar to what is described in , training data can also be provided by physically moving a magnet relative to the sensor device and capturing sensed data, or by positioning the sensor device in a test device known as a "3D coil system" where a magnetic field is generated for each of the sensor positions by controlling current flowing through a coil so as to simulate the magnetic field that the sensor of the sensor device would see if it were physically moved relative to a permanent magnet.

[0349] As described above ( Figure 6C Similar considerations as described later regarding the number of sensor devices to be used to acquire the raw measurement data, including semiconductor substrate portions obtained from several semiconductor wafers and / or semiconductor substrate portions obtained from several locations on a semiconductor wafer, also apply here.

[0350] Fig.18A FIG. 1 shows a block diagram of a trained artificial neural network ANN 1810 proposed by the present invention, which ANN 1810 can be used in a magnetic position sensor system 1600 having only 2 degrees of freedom, such as Fig.16 or a variation thereof, for example including another magnet, or as shown in Fig.25 or Fig.26 As shown in the figure.

[0351] ANN 1810 has an input layer, a single hidden layer including two GRU components, and an output layer.

[0352] The input layer is configured to receive a plurality of magnetic sensor signals (eg, h1, h2, h3, h4), and optionally also to receive a temperature signal, such as from the front end block 403 (see Figure 4A and Figure 4B ), and optionally also for receiving "additional signals", such as, for example, from pre-processing block 730 (see Figure 7 ), pairwise differences, gradients, ratios, etc.

[0353] The output layer needs to provide two independent output values, for example x and y.

[0354] Use as above (about Fig.17 ) are used to train two GRUs for determining 2D positions using the training data described in FIG.

[0355] Fig.18B A typical number of trainable parameters for the network is shown, depending on the number of input signals, but of course the invention is not limited to these examples.

[0356] Fig.19 An example of the result prediction of a neural network having a topology as shown in FIG18 is shown, which uses Fig.17 The ANN 1810 was trained on the 512 trajectories shown in . The ideal position is shown by a circle with a radius of 2.5 mm; the position estimated by the ANN 1810 is indicated by a point close to the circle. It can be seen that the absolute error for this example is about 0.3 mm, which is about 12% of the measured range. The ANN has two GRUs, each GRU unit has only 25 trainable parameters, the entire network has a total of 54 trainable parameters, and the average MSE is 0.0143.

[0357] Fig. 20A The method for estimating the position of the sensor system (e.g., Fig.16 Block diagram of another recurrent neural network 2010 for 2D positions of . The network can be viewed as Fig.18A A variation of network 1810 having the same input layer and the same output layer, but with two hidden layers, each hidden layer having two GRU units, for a total of four GRU units.

[0358] Fig. 20B A typical number of trainable parameters for the network is shown, depending on the number of input signals, but of course the invention is not limited to these examples.

[0359] Fig.21 is a table showing the number of trainable parameters for a 2D position sensor system including a two-pole magnet and a sensor device having four magnetic sensors arranged in a straight line (e.g., Figure 8C ), and having at least two GRU units organized in one or more GRU layers, the one or more GRU layers each having one or more GRU units, and an estimate of the resulting accuracy regarding the MSE in mm.

[0360] It can be seen that the MSE for these sensor systems is about 0.23mm to 0.39mm, which is about 10% of the measurement range. This table shows that no matter how many GRU units are used, the combination Fig.16 A two-pole magnet using a sensor arrangement with four sensor collinear elements will not produce high accuracy results. But of course, if an accuracy of about 12% is good enough for some applications, a simple ANN with a single layer with 2 GRU units (such as Fig.18A ) can be used, with this single layer having 54 parameters ( Fig.21 ).

[0361] Fig. 22 1 is a table showing the number of trainable parameters for a 2D position sensor system including a two-pole magnet 1601 and a sensor device 1602 having four magnetic sensors arranged on a regular 2×2 grid (e.g., Fig.8D ), and having one or more layers, each of which has one or more GRU units, and an estimate of the resulting accuracy (with respect to the MSE in mm).

[0362] It can be seen that when using an ANN with a single hidden layer with only 1 GRU unit, the MSE for these sensor systems is about 0.28 mm, which is about 12% of the measurement range, e.g. Fig.18A As shown in . Fig.21 A comparison of the tables shows that if the ANN contains only 1 GRU unit, positioning the four sensors on the grid does not really help improve the accuracy.

[0363] However, when the ANN contains a hidden layer with at least two GRU units, the MSE drops to a value of at most 0.0143, which is less than 0.3% of the measured range. The result for 2 layers with 2 GRU units is 0.0091. It can be seen that the MSE can be further reduced to about 1 / 3, but at the cost of using more GRU units and a larger number of trainable parameters.

[0364] The best trade-off between accuracy and complexity appears to be the solution provided by the second row of the table, i.e. Fig.18A The ANN architecture illustrated in , requires only 54 parameters in total. But of course, the invention is not limited thereto, and other solutions will also be applicable, for example, an ANN with two or more hidden layers, each of which has at least two GRU units. And of course, solutions with more than four sensor elements will also work.

[0365] Fig.23shows that it can be used to estimate (for example, as in Figure 1 , Fig.16 , Fig.25 or Fig.26 23. A block diagram of another recurrent neural network 2310 for 1D or 2D or 3D locations of a sensor arrangement (shown in, but not limited to, FIG. 23. The network has three hidden layers, each of which includes four GRU units, resulting in a total of 12 GRU units. Fig. 10B and Fig. 10C Some performance characteristics of these networks are shown.

[0366] Fig.24 A flow chart of a method 2400 for determining a position (e.g., a 1D position or a 2D or 3D position) of a sensor device 102, 1602, 2502, 2602 that is movable with only 1, only 2, or only 3 degrees of freedom relative to a magnetic source 101, 1601, 2501, 2601, or a magnetic source 101, 1601, 2501, 2601 that is movable with only 1, only 2, or only 3 degrees of freedom relative to the sensor device 102, 1602, 2502, 2602, e.g., a 1D movement along a straight line or along a curved path, or a 2D movement in a plane, or a 3D movement in 3 directions, e.g., a pure translation without rotation, or two rotations without translation (e.g., Fig.25 or Fig.26 The method comprises the following steps:

[0367] a) obtaining (2402) a plurality of sensor signals from a plurality of magnetic sensors;

[0368] b) determining (2405) a position of the sensor device relative to a magnetic source based on the plurality of magnetic sensor signals and / or signals derived therefrom (referred to as "additional signals"), wherein the position is determined using an artificial neural network (ANN), wherein the artificial neural network is a recurrent neural network trained for determining the position, wherein the ANN has at most 300 trainable parameters per degree of freedom (thus, for a system with only 1 degree of freedom, there are at most 300 trainable parameters; and for a system with only 2 degrees of freedom, there are at most 600 trainable parameters; and for a system with only 3 degrees of freedom, there are at most 900 trainable parameters).

[0369] In a variation of the method, the sensor device may further comprise a temperature sensor, and the ANN may further take into account the measured temperature.

[0370] Fig.25is a perspective view of an illustrative position sensor system 2500 with two degrees of freedom in which a permanent magnet 2501 is mounted to a joystick that can move forward / backward and left / right relative to a sensor device 2502 about a reference point Pref (Pref) located on a semiconductor substrate containing multiple magnetic sensor elements.

[0371] In the example shown, the magnet 2501 is an axially magnetized cylindrical magnet, but the invention is not limited thereto and other magnets may be used.

[0372] The 2D position of the joystick can be represented by two angle values: ψ is either a function of two coordinates X, Y (e.g., the coordinates of the ends of the joystick in the XY plane) or a function of the coordinates of EP4105768 (A1) Figure 2 The invention is defined by the two angles α, β defined in , which is incorporated herein by reference.

[0373] Sensor device 2502 may include Figure 4A As shown in the figure, or Figure 4B The sensor device includes a plurality of magnetic sensor elements or magnetic sensor structures, such as a plurality of horizontal Hall elements, or a 2D magnetic pixel (e.g., including an IMC and two horizontal Hall elements; or including two vertical Hall elements; or including an MR element), or a 3D magnetic pixel (e.g., including an IMC and four horizontal Hall elements). In a specific embodiment, the sensor device includes only horizontal Hall elements and does not include an IMC.

[0374] Sensor device 2502 includes a recurrent neural network (ANN) with a total of at most 2×300=600 trainable parameters, but as shown in Fig.31 It will be appreciated that the number of trainable parameters may be much less, e.g., up to 400 or up to 300 or up to 200 or up to 100, depending on the number of inputs supplied to the ANN. The ANN may have, e.g., a GRU2 architecture (see e.g. Fig.14A ), or SRNN2 architecture (similar to GRU2 but using two SRNN units instead of two GRU units), or SRNN3 architecture (having a single hidden layer with three SRNN units), or SRNN4 architecture (having a hidden layer with four SRNN units), but the present invention is not limited thereto, and a recurrent neural network using LSTM units instead of GRU units or SRNN units may also be used.

[0375] Fig.26 is a perspective view of an illustrative position sensor system 2600 having two degrees of freedom in which a magnet is mounted to a joystick that is movable forward / backward and left / right relative to the sensor device about a reference point located above a semiconductor substrate. Sensor system 2600 is Fig.25 A variant of the sensor system 2500 and directed to Fig.25 Everything mentioned about the system also applies here.

[0376] Fig. 27 is a graph showing real world measurements obtained from a horizontal Hall element (shown in arbitrary units) for various amplitudes of magnetic field, measured at temperatures of –40°C and at +80°C. It can be seen that the amplitude of the signal provided by the horizontal Hall element is highly dependent on temperature. In fact, if the temperature of the substrate drops from +80°C to -40°C, the signal amplitude almost doubles.

[0377] Although the sensitivity of the Hall element is corrected in the front end block 403 (see Figure 4A and Figure 4B ) is technically possible, but a preferred embodiment of the invention does not perform a temperature correction of the signal in the front-end block, but instead measures the temperature of the semiconductor substrate, digitizes this signal and feeds it as an additional input to the ANN. It should be noted that it is sufficient to measure the temperature at only one location of the semiconductor substrate and that, for example, it is not necessary to measure the temperature of each Hall element individually. In this way, the number of input signals applied to the ANN can be significantly reduced and the complexity of the network can be kept small.

[0378] Fig.28 The diagram shows Fig.11A Table of the accuracy of a 1D positioning system (GRU1 architecture) using either 4 input signals (4 magnetic signals) or 5 input signals (4 magnetic signals and temperature). It can be appreciated that when temperature is measured and input to the ANN as an additional input signal, the mean square error (MSE) is significantly improved (reduced), in this example by a factor of five. Although Fig.28 It is not explicitly shown in , but the same effect is achieved in other neural network architectures mentioned in this application (where a temperature signal is input into the NN, accuracy is improved with only a slight increase in the number of trainable parameters).

[0379] Fig.29 A table showing the typical number of trainable parameters for a 1D positioning system using a recurrent neural network with 5 input signals (4 magnetic signals and temperature) for various architectures is shown. As can be seen, the number of trainable parameters required for these architectures is only about 9 to 31, which is extremely low, especially compared to other systems that require thousands of trainable parameters to achieve comparable accuracy.

[0380] Fig.30The typical accuracy of these systems is shown. It can be seen that the accuracy of the GRU1 architecture is quite good, but the accuracy of the SRNN2 architecture is even six times higher, while the number of trainable parameters is reduced from 26 to 19. This is completely unexpected. It can be seen that the accuracy can be further improved to about 2.0 times by using the SRNN3 architecture, which is still an extremely simple neural network architecture with a very small number (e.g., much less than 100) of trainable parameters.

[0381] Fig.31 A table with a typical number of trainable parameters for a 2D positioning system using (a) a sensor device with four 1D magnetic pixels (each configured to provide a Bz signal) and a temperature sensor, or (b) a sensor device with four 2D magnetic pixels (each configured to provide an in-plane component and an out-of-plane component) and a temperature sensor is shown. It can be seen that the number of trainable parameters required for these architectures is only about 22 to 84, which is extremely low, especially compared to other systems that require thousands of trainable parameters to achieve comparable accuracy.

[0382] Fig.32 The typical accuracy of these systems is shown. It can be seen that the accuracy of the GRU2 architecture is quite good, but the accuracy of the SRNN3 architecture is about the same, while the number of trainable parameters is reduced to almost 1 / 2. It can be seen that the accuracy can be further improved by about 2.0 times by using the SRNN4 architecture, which is still a relatively simple neural network architecture with a very small number (much less than 100) of trainable parameters.

[0383] Fig.33A is an illustrative example of a "simple neural network". The network may have only a single hidden layer. The units of this layer are SRNN units (simple RNN units). All of these units are interconnected, they have 1 arrow pointing to each other's unit, including one arrow feeding back to itself. Each arrow represents a weight. Each "+" represents a bias.

[0384] Fig.33B is a schematic representation of an RNN3 network, i.e., a simple recurrent network with a single hidden layer with only 3 SRNN units.

[0385] Although not explicitly shown, the present invention will also be applicable to recurrent neural networks containing only LSTM units.

[0386] Although no explicit examples are given for systems with 3 degrees of freedom, a person skilled in the art who benefits from the present disclosure may use the same principles as described above for systems with 1 degree of freedom or systems with 2 degrees of freedom, particularly for 3D position systems in which a magnet can be translated relative to a sensor device (or the sensor device can be translated relative to a magnet) and in which position can be determined by three independent displacement values ​​(x, y, z).

Claims

1. A method (2400) for determining a position (x; x, y; φ, ψ) of a sensor device (102; 1602; 2502; 2602), the sensor device (102; 1602; 2502; 2602) being movable with one or two or three degrees of freedom relative to a magnetic source (101; 1601; 2501; 2601), or the magnetic source (101; 1601; 2501; 2601) being movable with one or two or three degrees of freedom relative to the sensor device (102; 1602; 2502; 2602); The sensor device comprises a semiconductor substrate comprising a plurality of at least two magnetic sensors (H1, H2) located at at least two different locations; The method comprises the following steps: a) obtaining (2401) a plurality of sensor signals (h1, h2) from the plurality of magnetic sensors (H1, H2); b) determining (2405) a position of the sensor device (102; 1602) relative to the magnetic source (101; 1601) based on the plurality of magnetic sensor signals (h1, h2) and / or signals derived therefrom; It is characterized in that Step b) comprises determining said position (x; x, y; φ, ψ) using an artificial neural network; wherein the artificial neural network is a recurrent neural network having a predefined number (N) of trainable parameters, the trainable parameters being trained to determine the position; And wherein the number of trainable parameters is at most 300 per degree of freedom.

2. The method according to claim 1, in, The recurrent neural network is a stateful recurrent network.

3. The method according to any one of the preceding claims, in, The semiconductor substrate comprises at least three or only three magnetic sensors (H1, H2, H3) located at at least three different locations; or wherein the semiconductor substrate comprises at least four or only four magnetic sensors (H1, H2, H3, H4) located at at least four different locations; Or wherein the semiconductor substrate comprises a two-dimensional array or a two-dimensional arrangement of magnetic sensors.

4. The method according to any one of the preceding claims, in, The sensor device (402a; 402b) further comprises a temperature sensor (406), And wherein step a) further comprises: measuring the temperature (Temp) of the semiconductor substrate using the temperature sensor, and providing the measured temperature as an input to the neural network; And wherein step b) comprises determining the position (x; x, y; φ, ψ) of the sensor device relative to the magnetic source based on the plurality of magnetic sensor signals and based on the measured temperature signal.

5. The method according to any one of the preceding claims, in, The neural network is trained for estimating the position (x; x, y; φ, ψ) using training data obtained or derived from simulation data provided by computer simulation and / or obtained or derived from measurement data provided by actual measurements.

6. The method according to claim 5, wherein: The simulated data and / or the measured data are interpolated to increase the spatial resolution by at least a factor of 2.

7. The method according to claim 5 or 6, wherein: At least some or all of the actual measurements are performed by physically moving the sensor device relative to the magnetic source or physically moving the magnetic source relative to the sensor device.

8. The method according to claim 5 or 6, wherein: At least some or all of the actual measurements are performed by generating a magnetic field using a test device comprising at least one coil, and by causing at least one current to flow through the at least one coil.

9. The method according to any one of claims 5 to 8, in, Artificial noise is added to the training data; and / or wherein a magnetic interference field (Bext(Bext)) is added to said training data; And / or wherein a mounting offset (Yoffset) is added to the training data.

10. The method according to any one of claims 5 to 9, in, The training data comprises measurement data provided by actual measurements performed on at least 3 different sensor devices; Preferably, each of the at least three different sensor devices comprises a semiconductor substrate obtained from at least three different semiconductor wafers.

11. The method according to any one of the preceding claims, in, The sensor device is movable with only one degree of freedom relative to the magnetic source, or the magnetic source is movable with only one degree of freedom relative to the sensor device, and wherein the training data comprises at least two trajectories for various measurement positions approaching a measurement range in two different directions; or wherein the sensor device is movable with only 2 degrees of freedom relative to the magnetic source, or the magnetic source is movable with only 2 degrees of freedom relative to the sensor device, and wherein the training data comprises at least four trajectories for various measurement positions approaching a measurement range in at least four different directions; Or wherein the sensor device is movable with only 3 degrees of freedom relative to the magnetic source, or the magnetic source is movable with only 3 degrees of freedom relative to the sensor device, and wherein the training data comprises at least eight trajectories for various measurement positions approaching a measurement range in at least eight different directions.

12. The method according to any one of the preceding claims, in, Step b) further comprises determining one or more additional signals in one or more of the following ways: by determining one or more pairwise differences, by determining one or more magnetic field gradients, by determining at least one average signal and by subtracting said average signal from at least two measured signals, by normalizing the signals, by calculating a ratio of two measured signals, by calculating a ratio of two pairwise differences, by calculating a ratio of two gradients; and feeding at least one of these additional signals into said neural network; And wherein the neural network is trained using training data derived from computer simulations and / or actual measurements for estimating the position (x; x, y) and is trained using one or more of the additional signals.

13. The method according to any one of the preceding claims, in, The recurrent neural network includes at most twelve gated recurrent units (GRUs); or wherein the recurrent neural network comprises at most twelve simple RNN units (SRNN); Or wherein the recurrent neural network includes at most twelve LSTM units.

14. A position sensor system (100; 1600; 2500; 2600), comprising: Magnetic source (101; 1601; 2501; 2601); A sensor device (102; 1602; 2502; 2602), the sensor device (102; 1602; 2502; 2602) comprising a semiconductor substrate comprising a plurality of at least two magnetic sensors (H1, H2) located at at least two different locations; Processing circuitry configured to perform a method according to any one of the preceding claims.

15. The position sensor system according to claim 14, in, The sensor device (102) is movable with only 1 degree of freedom relative to the magnetic source (101), and wherein the sensor device comprises 4 to 25 magnetic sensors, and wherein the sensor device or the magnetic source is movable along a straight line or along a curve, and wherein the number of trainable parameters is at most 150; Or wherein the sensor device (1602; 2502; 2602) is movable with only 2 degrees of freedom relative to the magnetic source (1601; 2501; 2601), and wherein the sensor device comprises 4 to 25 magnetic sensors, and wherein the sensor device or the magnetic source is movable in two directions in a virtual plane (XY) or on a virtual surface, and wherein the number of trainable parameters is at most 300.

16. The position sensor system according to claim 14 or 15, in, The movement of the sensor device relative to the magnetic source is purely translational and without rotation; or wherein the movement of the sensor device relative to the magnetic source is purely rotational without translation; Or wherein the movement of the sensor device relative to the magnetic source is a combination of translation and rotation, but the rotation is dependent on the translation.

17. A position sensor system according to any one of claims 14 to 16, in, The mean square error (MSE) of the position determined by the artificial neural network is less than 2% of a predefined measurement range.

18. A position sensor system according to any one of claims 14 to 17, in, The semiconductor substrate including the plurality of magnetic sensors has a size of at most 3.0 mm×3.0 mm; And / or wherein the processing circuit comprises a programmable processor having a 32-bit CPU core and a floating point unit (FPU), and comprises up to 2M bytes of flash memory and up to 512K bytes of RAM, the programmable processor being configured to run at an internal clock frequency of up to 400MHz, wherein the artificial neural network is implemented in software configured to be executed by the programmable processor.

19. A position sensor system according to any one of claims 14 to 18, in, The semiconductor substrate comprises 4 to 25 horizontal Hall elements, preferably without IMC; And wherein all of the magnetic sensor elements are horizontal Hall elements.

20. A position sensor device (102; 1602; 2502; 2602), comprising: A semiconductor substrate comprising at least two magnetic sensors (H1, H2), the at least two magnetic sensors (H1, H2) being spaced apart from each other and configured to provide at least two magnetic sensor signals (h1, h2); A processing circuit configured to perform the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Device and system for testing magnetic devices

    EP3621091A1

  • Devices and methods for measuring a magnetic field gradient

    EP3885779A1

  • Device and method for determining an orientation of a magnet, and a joystick

    EP4105768A1

  • Hardware accelerator for compressed GRU on FPGA

    US20180046901A1

  • Stray field rejection in magnetic sensors

    US20190079142A1