2.1. Locating Principle with Magnetic Field
The magnetic locating approach uses one cylindrical magnet as the source of the reference magnetic field. The center of the magnet is treated as the origin of an orthogonal coordinate system, which can be called the magnet frame. In practice, the magnet is placed on the patient’s chest right above the target location. The locating system starts functioning as soon as the surgeon turns on the power supply. When the stent with the attached detector is inserted as usual, its location can be expressed by three-dimensional coordinates in this magnet frame by relating the measurement to its location in the theoretical reference magnetic field. A grid of magnetic field vectors surrounding the reference magnet is computed a priori and stored. Upon obtaining a measurement vector during stent deployment, the reference grid is searched to find the closest match, which will be taken to be the measured location of the sensor. With the use of the theoretical magnetic field reference described here and the noise-canceling approach described in the next section, the system can avoid going through a time-consuming calibration procedure before use. In short, the system can be set up within seconds then continuously provide the real-time position information about the stent’s location with necessary accuracy as the stent is being deployed.
The schematic of this method in surgical application is shown in
Figure 2, where a body is shown as it would be in practice lying on a flat surface. A body coordinate system is shown with
aligned with the aorta (along the length of the torso).
is transverse to the aorta and in the horizontal plane, and
is vertical (aligned with gravity). The origin of the body coordinate system is assumed to be in the center of the aorta, directly under the xiphoid, though in general it could be located at any point relative to any bony landmark. The goal in this application is to locate a specific portion of the perfusion stent (e.g., the leading edge) in the body coordinate system.
Figure 2 also shows an electromagnet located outside the body with a magnet coordinate system, with its axes of
. The algorithm, as described later, will determine the sensor location within the range of the electromagnet, expressed in the magnet coordinate system. If the magnet coordinate system is aligned with and at a known location relative to the body coordinate system, then one can transfer a known location in the magnet frame to the body frame. This relative alignment and positioning is achieved by first placing the electromagnet on the body in a known position and orientation relative to an appropriate landmark. In this study, the placement of the magnet is at the origin of the body frame, which is right above the xiphoid bone. For a cylindrical magnet, the radial component of the magnetic field is symmetric. Therefore, the
X axis in the magnet frame is taken to be aligned to be parallel with
in the body frame. In addition, the
Z axis is aligned vertically in space, thereby fixing the direction of the
Y axis. In this study, the destination of the sensor is directly under the xiphoid bone, in the aorta, though it could be set at any other location relative to the electromagnet within the measurable field. After the stent enters the aorta, the trajectory can be approximated as a straight line.
The goal of the locating system is to track the position of the sensor (and therefore the stent) along the aorta and report its position in the body frame. The detector consists of one triple-axis accelerometer (MXC400xXC) and one triple-axis magnetometer (MMC5603NJ) soldered onto a printed circuit board (PCB). The schematic and the fabricated sensor are shown in
Figure 3. The overall size of this detector has length of 30 mm and diameter of 1.8 mm. The PCB is attached to the leading edge of the stent, which is also attached to a guide wire used for insertion into the body. The relative position of the PCB to the stent is recorded. Because a guide wire is needed for stent deployment, the additional wires for communication with the sensor do not pose a problem, as they can be attached to the guide wire. This eliminates the need for extra circuitry with the sensor that might otherwise be needed for wireless communication. The stent is made from Nitinol, whose magnetic permeability and susceptibility are both low enough to be ignored [
21]. All implantable parts are contained inside a sheath, which has a diameter of 10 Fr (3.4 mm). When the sensor reaches the target location in vivo, the sheath will be removed so that the stent will expand to cover the trauma on the vessel.
The reference magnetic field source in this research is provided by a cylindrical magnet, the most common shape for both permanent magnets and electromagnets. There are several analytical approaches to generate the magnetic field spatial distribution. One common approach is to simulate the cylinder magnet by a dipole model [
8,
19]. This approach requires the magnet size to be small compared to the target–sensor distance. If the magnet has a significant size, as in this work, another model that is based on the Biot–Savart law can be applied. This model simplifies the cylinder magnet as two parallel planar coils, with current flowing in the same directions. In this research, the height of the cylindrical magnet is
cm, and the radius
cm. In any plane that passes through its central axis, the magnetic flux density vector can be decomposed into an axial part
and a radial part
, which are orthogonal and can be obtained by Equations (
1) and (
2) [
22]. These two equations are generally used with SI units and provide the flux density in Tesla units (T). In this paper, some quantities are more convenient to be measured using CGS units, such as the flux density, which is measured in Gauss (G), and the system dimensions are measured in centimeters (cm). The
term will be later represented by a dimensionless coefficient. By rotating
with angle
around the Z axis,
is decomposed into
and
through Equations (
3) and (
4), while
is unchanged with
. The spatial distribution of the flux density vector
is extended into the 3D coordinate system, as shown in
Figure 4. This model has been validated by comparing the simulation to the actual value measured by the sensor. However, it is worth mentioning that this model is still not a perfect simulation of a real electromagnet because it ignores factors such as the ferromagnetic nucleus and the boundary condition between the coil and the shell. A more comprehensive model is an objective for our future research.
In Equations (
1) and (
2),
is the constant of air permeability. The magnetic permeability of all human body components can be approximated by the permeability of water, whose difference to air permeability is negligible [
7]. Therefore, it is valid to treat the permeability as a static parameter.
M is a constant characteristic parameter of a permanent magnet called magnetization that describes the magnetic moment in the unit volume [
23].
Once the predicted field pattern is known, the next step is to locate new measurements in this pattern. In this work, a nearest neighbor algorithm is used. Assume there are reference points with total number of
a distributed in the SMF pattern. The reference points are indexed by
. For every arbitrary point indexed with
i, the location coordinate
is related to the local magnetic field prediction
using Equations (
1)–(
4). The field will be measured with a three-axis magnetometer. When a measurement
is taken from the sensor at an unknown location, the magnitude of the difference
between the measurement and reference values is calculated by Equation (
5). Then an exhaustive calculation of
for
is performed for all reference points. The desired location of the sensor can be determined by the reference location where the minimum of
occurs. The search is computed with the Python scikit-learn module, which can accomplish the task with excellent speed and accuracy [
24].
In the surgical application in which the magnet is placed right over the body landmark with axes aligned with the patient’s body in the previously introduced way, the sensor’s horizontal distance to the destination along the aorta is represented by the X axis coordinate. The measurement in this dimension is the most valuable one for the application in this paper. The Y and Z axes readings, which represent the side and vertical location offsets from the magnet center, will not change drastically as the stent moves along the aorta.
2.2. External Magnetic Disturbance Cancellation
The working principles of the location methods introduced above are valid under ideal conditions without mentioning noise and interference. In practice, various sources of magnetic interference, including the earth’s magnetic field, a metal surgical bench, or a bullet fragment inside the patient’s body, are all possible sources of error for magnetic-based locating systems [
25]. Mathematically, the effect of all the disturbances is expressed by Equation (
6) [
26]. In this equation,
is a
vector of the three-axis sensor’s actual measurement under interference, and
is a
vector of the true magnetic field without interference at the same location.
and
are accuracy-degrading factors. In many studies,
is called the soft iron effect, whose main cause is the soft iron materials around the sensor that could change the nearby magnetic permeability. The factor
is called the hard iron effect, which comes from all permanently magnetized components fixed around the magnetometer. Besides the components soldered on the PCB, interference could also come from the stent and the guide wire, which may be made from magnetic material. In addition, the magnetometer may have manufacturing bias or temperature-induced bias. A more comprehensive analysis for all causes of error is introduced in [
27]. Inherent sensor biases are typically removed by a calibration procedure before the actual experiment [
16]. The calibration algorithm requires the sensor to be held at a fixed location in a homogeneous field and rotated randomly to
k directions while ensuring adequate coverage of all octants. The solution of
can be obtained when the overall difference from all
k measurements to the static magnitude reaches the minimum [
26]. In addition, this method enables the true sensitivity values for each axis (in matrix
) to be determined. A more reliable calibration approach by creating an uniform magnetic field is introduced in [
17]. The proposed method in this paper does not address these biases but focuses on external disturbances to the measured magnetic field.
An example experiment was carried out to measure the range of
and
using a Neodymium cylinder magnet (one of the most powerful magnet materials commercially available [
28]) with a diameter of 0.8 cm and height of 1 cm as the magnetic source. The magnet is placed 15 cm above the sensor. In the horizontal range of 15 cm, the magnetic measurement in shown
Figure 5, where the reference magnetic strength
varies from 1.03 to 0.39 G, and the disturbance
varies from 0.46 to 0.53 G. In this test, no ferrous objects exist around the system, which makes the geomagnetic field the only source of
. The ratio of the
range to the
range is 0.11 in this test. This ratio can be reduced by applying a more powerful magnet source. However, the constant disturbance is not a reasonable assumption for this application because the reliability of our magnetic locating approach requires the measurement of the reference magnetic field to be as accurate as possible. The locating accuracy drops as interference strength increases, which cannot be controlled on the battlefield, where multiple disturbances may exist. Therefore, an electromagnet was chosen as the desired source, whose strength of the generated magnetic field is proportional to the applied current
I. The exclusive parameter
M of a permanent magnet in Equation (
1) and (
2) is replaced by
, where
is a unit magnetic field strength vector when
. The actual value of
is still hard to measure directly. To find its true value for a certain electromagnet, first, the spatial distribution is generated by assuming
and
. Next, measurements are collected along a straight trajectory that passes through the center of the magnet. The ratio between the measurements and the analytical model at corresponding locations in each axis is calculated and then averaged, which is denoted by
. When this is tested in advance for a chosen electromagnet, the actual value of the SMF can be expressed by replacing the
term in Equation (
1) and (
2) by
.
When an electromagnet is used as the SMF source, a better simulation of the interference is developed through Equation (
7). The interference sources are classified into two categories; the first source is from the near-sensor range, which includes sensor manufacturing variance, the materials on the printed circuit board (PCB) onto which it is soldered, and the stent wires. After the detector is fabricated, the effect from these components will be constant; these components are expressed by
and
. The second source includes the interference in the background; the additional term
corresponds to the disturbance that is invariant with respect to time but variant with respect to location.
can be removed by taking advantage of the electromagnet. When a switching relay is turned on and off in the electromagnet circuit, the current will switch between a constant amplitude
I and 0. At a given measurement location, when the switch is turned off, the background magnetic field is measured and denoted as
, then the current is turned on and the new measurement is denoted as
(Equation (
7)), which includes background vector
superposed on the desired magnetic reference vector. Therefore, the disturbance can be removed from the desired measurement by
. This switching process is repeated frequently while the detector is moving so that it can deal with an interference that varies with location. Its effectiveness requires that
and
are measured at a stationary location, which means the current switching should be frequent enough so that the displacement between two measurements in a dynamic process is negligible. In addition, the electromagnet should be able to generate a constant
throughout the measurement. These factors will be discussed in the later section about the experiment.
The soft iron effect term
can be solved by calibration in advance or approximated as an identity matrix in many studies [
19]. The term
is added in Equation (
7) to represent soft iron objects that are not fabricated around the sensor. It is an assumption that these interferences are caused by objects such as the bullet or shrapnel shell that are magnetized by the source magnet. Therefore,
is a highly random term that depends on the number and magnetic susceptibility of all objects in the surrounding regions. Their effect will appear and disappear as the electromagnet source is switched on or off, and the amplitudes are proportional to the source SMF strength. Assuming
is an identity matrix and the hard iron interference has been successfully removed by the approach introduced before, the measurement error can be expressed by Equation (
8). At a stationary location, by adjusting and measuring the current amplitude and then correspondingly varying
, the slope of the
I-
curve is the magnitude of
. This approach cannot directly cancel the soft iron object disturbance, but it can show how serious the soft iron effect from potential interfering sources is.
2.3. Tilt Angle Compensation
In the process of deploying the sensor inside the artery, the sensor’s linear translation may be accompanied by rotation. To obtain the closest matching point with a given measurement, the sensor’s local coordinate frame always needs to be kept aligned with the magnet frame (this assumes a straight-line path of the aorta in the present application). Otherwise, if the sensor rotates with respect to the magnet frame, then the locating method that finds the matching magnetic field point is invalid. As is shown in
Figure 6, for an arbitrary orientation of the sensor in the body, the fixed magnet frame
can be rotated to the direction of the sensor frame
by first rotating around the
Z axis with angle
, then rotating around the
Y axis with angle
, and finally rotating around the
X axis with angle
. These three angles are Euler angles and are usually called yaw, pitch, and roll. In this application, the stent is inserted through a non-solid guiding wire to move inside the thin and straight artery. This feature makes the detector rotation most likely to happen around the
X axis, the roll angle. Therefore, the roll angle measurement is the most important secondary measurement in this system.
To measure the Euler angles, additional sensors should be added to the detector. There are two types of sensors that can achieve this. The first one is the gyroscope that measures the angular velocity, which can be continuously integrated to obtain the Euler angles’ change [
30]. This method is not applied in this paper to avoid possible direction measurement error that grows with time due to the integration of gyro drift. Instead, an algorithm introduced by Ozyagcilar that uses an accelerometer is applied [
31]. Before the sensor is used in practice, calibration is necessary for an accelerometer. The accelerometer measurement error can be simplified as a constant bias in the way expressed by Equation (
9), where
is the measurement,
is the real acceleration, and
is the bias error.
To solve the
X axis component of
, which is denoted as
, the X axis of the sensor should be first aligned vertically, with the X axis reading denoted as
. Then the sensor should be flipped upside down, with the X axis rotated 180°, with the second reading denoted as
.
can be obtained as
. The other two components can be obtained in the same way. The accelerometer signal contains both a static component (acceleration of gravity, 1 g) and a dynamic component (acceleration of the sensor as it is moved). While the sensor is approximately in its static state, or during very slow movements, the dynamic component is minimal and the measurement only consists of the gravity acceleration. However, the stent deployment process is a dynamic process, where the sensor is repeatedly moved, then stopped, then moved again. Therefore, in practice the movement state is determined as either static or dynamic by setting
as the static acceleration threshold. When the static condition is satisfied, the gravity acceleration
g in the magnet frame and the measurement
in the sensor frame can be expressed by Equation (
10). This equation shows how to mathematically convert from one frame to another frame through a certain rotation sequence in roll, pitch, and yaw. Even though pitch and yaw should have little variation in this application, the measurement approach will be introduced to make the theory comprehensive.
It can be noticed that
, which suggests the gravity acceleration measurement will not be affected by the change in
. In other words,
cannot be measured with gravity acceleration. Therefore, we can first solve
and
by substituting Equations (
12) and (
13) into Equation (
10) and ignoring
to get the solution of roll and pitch by Equations (
15) and (
16). Note that for periods during which the measurement amplitude is not within the static range between
and
, the most recently found roll and pitch angles are used as approximations. As mentioned above, during stent deployment, these periods are intermittent and not problematic.
To obtain the yaw angle
, the help of the geomagnetic field is needed, where 0° is defined as the direction of the geomagnetic north pole. Since the magnetometer and accelerometer are fixed on the PCB to keep the three axes orthogonal to each other, the rotation matrix of Equations (
12) and (
13) can be applied to rotate a random direction measurement of the geomagnetic field vector
into a horizontal plane, where the new vector
has its
Z axis component as 0. From its X-Y components, the yaw angle can be obtained by Equation (
17) [
31]. However, this approach is not reliable enough because the magnetic disturbance will be included in the measurement. Therefore, the yaw angle will be taken as a constant zero in this system.
Finally, when the Euler angles are solved, for a measurement
that is heading to a random direction, the tilt compensation can be applied with the following equation: