Choosing a Retention Method to Control the Endoscopic Capsule by a Magnetic Field

The issues of the wireless endoscopic capsule control are of great interest nowadays as it provides the more detailed analysis of the digestive track revealing pathologies and morphological changes. This article deals with the final selection of a method for controlling the endoscopic capsule inside the human body and electromagnetic parameters of the coils. The calculations of the physical parameters and the selection of the magnetic coils are provided. The authors consider three methods of the capsule control: the diamagnetic levitation in a magnetic field, the levitation of a permanent magnet in a minimum magnetic field with additional restrictions from external forces, and the method of “pushing” the magnet. According to the analysis of different options of the magnetic system for the capsule control the preferred one is “pushing” the permanent magnet magnetized perpendicular to the capsule axis of symmetry. The use of the patient movable table significantly reduces the requirements for the magnetic system. The article provides the calculations that will be used to create a prototype of the capsule endoscopic complex with magnetic control.

The wireless capsule endoscopy is a modern painless mean for examination of the gastrointestinal tract (GIT) of a person [1][2][3] .The patient swallows the capsule with a tiny built-in camera that captures images of the walls of the digestive tract and transmits them to the reader for further processing and diagnosis.Currently the active developments are conducted in the field of increasing the efficiency of the procedure: the specialized software allowing to detect gastrointestinal diseases in automatic mode [4][5][6][7][8] is developed, the capsule is equipped with a more powerful optics, lighting system [9][10][11] and supply system, the capsule control system is improved 10,12,13 .The latter attracts the particular attention as it is aimed at increasing the mobility of the capsule inside the human body, which allows the capsule to stop at the desired location of the digestive tract for a more detailed pathology examination.
The control systems of the endoscopic capsule using a magnetic field are considered in many scientific articles and patents.For example, Rahman et al. used a magnet to hold and maneuver the capsule inside the human body 14 .Liao et al. describe a pilot study on using a magnetically controlled capsule to examine a stomach 15 .In 16 authors propose a utility model providing a capsule endoscope system capable of realizing a timed locating function.Wang et al. in 17 tell about a locomotion mechanism with external magnetic guidance.Reinschke propose a magnetic body with an adjustable field strength so that body is stably positioned in GIT 18 .
The described and the similar solutions have a number of disadvantages associated with the control system cumbersome, its inaccuracy and considerable power consumption.Therefore, it was decided to develop a system for the wireless capsule control, which takes into account the existing disadvantages of the art.
The developed control system for the endoscopic capsule is based on the theory of the magnetic location through the use of a set of thinfilm magnetoresistive magnetic field sensors to determine the spatial and angular coordinates of a magnetic dipole 19, 20. 21, 22 describe the numerical algorithms for finding the position and orientation of the magnetic dipole as well as the simulation of operation of the control system for magnetic capsule.
The developed capsule comprises a permanent magnet inside the capsule and six autonomous controlled sources of magnetic fields on each side for external management [23][24][25] .Each system of a "composite" coil consists of several independent coils.This approach allows a more precise and rapid measurement of the magnetic field changes (in this case, the magnetic field distribution can be stable, and can ensure the capsule movement in the desired direction and at the desired speed) and increases the system fault tolerance.
The selection of the control method is based on two factors: the ability to control the position of the capsule at any point of the working volume and the technical feasibility required for control.In this paper, the technical ability to create a prototype of the capsule endoscopic complex for a specified retention method is determined based on the calculation of the physical parameters of the electromagnetic coils, and the feasibility of the control is determined from the analysis of the forces calculated for a set of spatial points in a given volume.

Calculating the physical parameters of the coils
One of the determining factors when choosing the control method is the technical and the economic feasibility of the electromagnetic coil of the endoscopic capsule moving system.To The initial data for the calculation of the coil parameters are the number of ampere-turns required for the capsule control, the minimum and maximum radius of the coil set on the basis of the geometrical design requirements of the system.
Since the diameter of the winding wire is not known in advance, the estimation of the parameters is carried out for a set of round wires with a diameter of 1.5 mm, 2.5 mm, 4 mm and further to 12 mm in increments of 2 mm.The calculation for this set allows to pretty accurately estimate the parameters of the coil and based on the evaluation select the capsule control method and the characteristics of the electromagnetic system.Then it becomes possible to carry out an accurate calculation of the coils geometry.The copper is chosen as a material for the wire as the copper coils ceteris paribus will be significantly more compact than aluminum ones.The exact copper grade in the evaluation of the coils' parameters is ignored since the small variation in the properties of the used in the wires alloys, but it can be counted after the final determination of the desired parameters of the electromagnetic retention.
The number of turns in the winding is given by: , where -the assurance coefficient used to account the share of the winding volume occupied by the insulation, -the required magnetomotive force of the coil in Ampere-turns, -the current limit for copper wire of the suitable diameter.The function rounds upwards to the nearest integer.The current limit is calculated based on the standard of the current density for the wires in the closed space 8 A/mm 2 .
It is assumed that the coil windings are stacked in a hexagonal closest packing shown in Figure 1.The density ρ of the package equals to the ratio of the cross-sectional area occupied by the conductor to the total sectional area of the coil: . The cross-sectional area of the coil can be estimated as: , where -the diameter of the winding wire, -packing density.
To calculate the number of layers in the coil winding wire using this method winding we use the ratio: . where -the minimum and the maximum radius of the coil respectively.The function is used, since the number of winding layers can be fractional.
After determining the number of winding layers, the thickness of the coil is calculated by the expression: . The results of the calculations can determine the total current in the coil by the equation: . Full active resistance of the electromagnetic coil is calculated by: .where ρthe copper resistivity, s-the sectional area of the winding wire, l-its length.The wire length is determined from the average radius of the winding and the number of turns as follows: The weight of the wire is calculated by the formula: = where -the cooper specific density.The required voltage across the coil is determined from the Ohm's law to an external circuit 26 : = This coils' reactance is not taken into account due to the assumption of the quasistationary mode.

Choosing the retention method
For the analysis of the applicability of the management of the capsule was reviewed by three methods Three methods of the capsule control were analyzed from the point of applicability: the diamagnetic levitation in a magnetic field, the levitation of a permanent magnet in a minimum magnetic field with additional restrictions from external forces, and the method of "pushing" the magnet, which can be used to move the magnet jerkily, and for levitation implementing by continuous compensation of external forces according to the feedback system.For the final choice of the control method, consider the technical feasibility of the control system for each of them.

Diamagnetic levitation
The force acting in the magnetic field on the diamagnetic depends on the strength of its magnetic dipole moment, which is equal at a first approximation to the product of the magnetization and the volume of the body V:

= ̅
The magnetization of the diamagnetic is  determined by its susceptibility χ and the external magnetic field : Thus, the current strength depends on the diamagnetic volume.
In assessing the possibility of withholding the diamagnetic the amount of pyrolytic graphite for the calculation was estimated at 1.36.10 -6 m 3 .Even this optimistic assessment will require for a system with an internal diameter of 60 cm (capable of levitating the endoscopic capsule in the gravitational field) the use of the magnetic coils producing the magnetomotive force of 1.35 MA-turns.The design parameters of the respective magnetic coils are shown in Table 1 (for calculation the inner coil radius was assumed to be 30 cm, outer -40 cm 23 ).Such coils are technically difficult to implement, extremely massive, require individual development of power supplies and economically costly.
To find out the amount of the possibly used diamagnetic the volume of the available space for placement was calculated based on 3D-model of the capsule.The value of the available volume was .This value is more than 7 times lower than that used in the preliminary estimates.This means that the actual construction of the capsule just to overcome the gravity force will require the magnetomotive force much greater than previously calculated.All the mass and the dimensional parameters of each such coil will increase inversely with a change in the diamagnetic volume in comparison with the coils shown in Table 1.Thus, for example, the mass of the coils on each side of the capsule retaining system should be more than 20 tons.The coils with such parameters do not exist, and in case of their creation with the use of high-temperature superconductors, they will be unsuitable for use in inhabited areas because of the high value of the magnetic fields they create.
Thus, the creation of the magnetic coils able to control the capsule of the current construction inside the human body using the diamagnetic is technically and economically infeasible.

The permanent magnet retention
For the analysis the ability of the system to control the capsule with a permanent magnet, it is necessary to clarify the available value of the capsule dipole magnetic moment.Based on the 3D-model of the endoscopic capsule, the total volume of free space suitable for the placement of the cylindrical magnet without interfering the construction of the capsule is: The ability to use the non-cylindrical permanent magnets is not considered because their use would lead to a loss of axial symmetry of the magnetic properties, and as a result to the new demands for the feedback system complicating the control system.
Calculating the magnetic moment of such a magnet by the formula: , where -the remanence in the used magnet alloy, we obtain the results shown in Table 2.
In further calculations, the magnetic moment of the capsule is taken equal to 0.34 , which corresponds to the use of the N45 magnet.The N52 magnets are not used in the calculation, as they give a relatively small gain in the magnetic moment of the capsule, and thus are much harder and more expensive to produce than the N38 and N45 magnets 27 The weight of the proposed magnet is .This weight slightly increases the force exerted on the capsule and the further calculations neglect the influence of the weight (as it is insignificant in comparison with the forces exerted from the tubular organs peristalsis).

Levitation in a constant magnetic field with restrictions
To hold the capsule with a permanent magnet on the axis of the system it is necessary to use the coils with a magnetomotive force of 1.2 MA-turns.Taking into account the amendments to clarify the volume of the permanent magnet and the linear dependence of the influencing the permanent magnet external field from the current in the coil, the required magnetomotive force is 0.8 MA-turns.
The calculation results in the created program of physical parameters of such coils (the inner radius is 30 cm, the outside is 40 cm) are shown in Table 3.
As shown in Table 3, the copper coils creating a required for the magnet levitation field and taking in account the requirements for the system geometry (cubic configuration, the lumen diameter is 60 cm) should be more than a meter thick and weighing more than two tons each.Such coils are non-technological, expensive, and require the use of expensive special power supplies.At the same time, the power consumed by the system of six coils may exceed 1 MW.This means that the levitation implementation in the constant magnetic field with links from the gastrointestinal tract of the patient is unreasonable without the use of the cooling to liquid-helium temperature hightemperature superconductors of the second generation, which will reduce the energy consumption and the size of the system due to the increase in the allowable current density.
The accurate estimation of the coils parameters required for the implementation of this approach to the capsule control will require a large number of intensive calculations to find the configuration of the currents in the coils that create a minimum of the magnetic field at the desired point with the required for the retention parameters.It can significantly increase the required parameters of the magnetic coils.
In addition, the very concept of such a retention requires the precise knowledge of forces from the gastrointestinal tract influencing the  capsule at any time of the examination, continuous measurement of which is a separate massive engineering task and will require a significant complication of the feedback system.Thus, the levitation of a permanent magnet in a minimum of the constant magnetic field with a limited degree of freedom exerted from the gastrointestinal tract cannot be applied in the developed capsule endoscopic complex due to the low economic efficiency and excessive technical complexity.

"Pushing" the permanent magnet
For the "pushing" method, for one coil the boosting of the magnet is guaranteed on the possibly far distance from the coil in the minimum field created by the coil.In actual fact, other coils in the system are also active, the joint use of which will significantly reduce the requirements to the magnetomotive force of the coils.Thus, only the method of control by "pushing" the magnet has the potential for reducing the requirements for the magnetic coils, which makes it the most promising and economically viable.This method of control is discussed below.

Choosing the magnetic coils
The magnetomotive force of the coils is chosen from the condition that it is able to move the capsule against the exerted on it forces in any direction at any position of the capsule at any point in the workspace.
To check this condition the working area is divided into a grid of points, in each of which the gradient of the magnetic field is determined by the matrix: Each component of the matrix is calculated numerically using the average analog of the first derivative: , where -the point counting number in the list of calculated points.
The forces exerted on the body in a magnetic field are determined by the formula: .where -the magnetic moment of the body.The magnetic moment of the endoscopic capsule is considered permanent and the reversal magnetization processes are neglected in the analysis, since they cannot have a significant impact on the capsule control.
For the calculation, the program uses the matrix form of the equation: , where -the matrix of the magnetic field gradient described above.These components of the force are given by: .Then, to determine the adequacy of the magnetic forces we test the movement ability of the capsule located in the calculation points and oriented in three mutually perpendicular directions (along the unit vectors of the coordinate system).This choice of the capsule orientation will simplify the calculations, because it reduces the number of components during the forces calculation.Thus, in case of the orientation of the capsule dipole moment along an axis Ox, forces exerted on the capsule will be determined as follows: . The feasibility of such movements ensures the retention of the arbitrarily oriented capsule in any given direction.Thus, when testing the movement feasibility the enumeration of the current in the system of the electromagnetic coils with the specified maximum value of the magnetomotive force of the coils is performed.
During the enumeration for each combination of currents, after setting the magnetic moment of the body and finding the magnetic field gradient at each calculation point the calculation of forces exerting on the body is conducted.The components of the forces acting along the vector of the capsule magnetic dipole moment and perpendicular to it are analyzed separately.As a criterion of the capsule controllability, we take the adequacy of minimum of the calculated forces acting along the capsule axis to overcome the resistance force of the intestine.For the forces exerting perpendicular to the capsule axis, such a condition is not required, since the resistance force, acting perpendicular to the axis, can be accurately assessed only in the experiment, and their value is obviously lower than the resistance force of the longitudinal movement.After identifying a set of longitudinal forces for each point of the workspace, the maximum attainable forces in this point are determined.Then, a point with a minimal force and the required magnetomotive force of the coils is found according to the formula: , where -the magnetomotive force used in the calculation, -the magnetic moment used in the calculation, -the real magnetic moment of the capsule, -the required force, the calculated value of the i-th component of the force at the point with the minimum of this component.

The choice for basic geometry
As the basic geometry of the coils, we consider the most technological solution in manufacturing consisting of six identical magnetic coils, one for each side (Figure 2) 23,24 .The calculation was performed for the two possible magnetization variants of the endoscopic capsule: parallel and orthogonal to the geometrical axis of symmetry.The design of both versions of the Fig. 5.The analysis result of the longitudinal forces in case of the capsule magnetized along its axis of symmetry and using a movable table Fig. 6.The analysis result of the longitudinal forces in case of the capsule magnetized orthogonally to its axis of symmetry and using a movable table magnetization are identical; they differ only in the direction of the magnetic moment vectors used in the construction of the magnets.

The capsule magnetized along the axis of symmetry
Figure 3 shows an array of points, in which the forces exerted on the capsule along its geometrical axis were determined.The maximum magnetomotive force of the coils in this calculation is 1500 A-turns, the magnetic moment of the capsule is assumed to be 1 . The size of the points and their color corresponds to a force value (in Newtons).The force values at the red points are above the median for the set of calculated forces and are not shown, as we are interested only in the minimum force.The asymmetry of the values along the axis Ox and along the axes Oy and Oz is connected with the exception of a number of sets of symmetrical currents in the coils from the calculation, which is taken into account in the analysis.
The force influencing the capsule is minimum at the points on the axes of the magnetic coils and is maximally close to them 24 .So to the point on the axis of the coil at a distance of 21 cm from the center of the capsule control system, the calculated force is N.As approaching the center of the coil, this force will weaken down to zero, making the capsule retention impossible at the centers of the coils.Restricting by the point located at a distance of 21 cm from the center, to control the capsule we will need to use the magnetic coil with the magnetomotive force: The parameter estimation of the coils with such a magnetomotive force is presented in Table 4.These coils have a realistic dimensional and weight characteristics, technological, but still are very heavy (550 kg per coil) and consume up to of electric power, which, in addition to power issues, require the use of a flow water cooling for the coils.Furthermore, this embodiment does not allow to control the capsule in the vicinity of the geometric center of the magnetic coil of the system.

The magnetic axis orthogonal to the capsule axis
In this embodiment, the calculated forces (Figure 4) exerting on the capsule along the geometrical axis are close to zero in the center of the system.The calculations show that to control the capsule placed in the center we need the magnetic coils with the magnetomotive force of over several MA-turns, which is unacceptable.
If we exclude the central area with a radius of 3.5 cm from the consideration, the minimum operating force will be equal to N and for the control it will require the magnetomotive force: The characteristics of the corresponding magnetic coils are shown in Table 5.The designed coils are more technological than in case of magnetization along the symmetry axis of the capsule, but still are quite massive and require the individual development of power sources or the use of expensive composite sources.In addition, a large space in the central part of the active volume appeared to be inoperative.

System with the movable table
To reduce the requirements for the magnetic coils of the capsule retention system it is proposed to use a movable table for a patient.The calculations have shown above that in any orientation of the magnetic moment vector of the capsule there are local areas with a minimum force.These particular areas create the need for such strong magnetic coils.The use of a movable along the horizontal axis table, if necessary, can mechanically move the capsule from the area with the lowest effort to the area with the better control, thereby reducing the requirements for the electromagnetic control system.Below we summarize the results of the calculations performed in assumption that the patient is moved freely along one of the horizontal axes of the magnetic system.

The capsule is magnetized along the axis of symmetry
The result of the calculation of the minimum force while using a mechanical movement of the capsule along the Ox axis is shown in Figure 5.The analysis shows that the minimum force will exert on the capsule at the maximum distance from the center of the system (the point in the upper right corner of the array in Figure 5).The minimum force is N.Under such conditions, it control the capsule it is required the coil with magnetomotive force equal to: Such coils are similar by their physical characteristics to those shown in Table 5, but the use of the movable table enables the capsule retention throughout the workspace without exception.

The magnetic axis orthogonal to the axis of the capsule
The distribution of minimum forces when using the capsule magnetized orthogonally to its geometric axis together with the movable table is shown in Figure 6.The calculated forces are maximum along the axes of the magnetic coils and minimum in a small central area and along the diagonals of the magnetic system.The problem of small forces along the diagonals is solved mechanically by using an inclination of the magnetic system about the axis of the patient table in a range of ± 45 °.The requirements for the magnetomotive force of the coils will be determined by the central point.The maximum calculated force at this point is N.However, this power is calculated in the approximation of the pointlike capsule, which makes a significant error in the calculation due to the rapid increase in forces exerting on the capsule with distance from the geometric center of the system.Accounting for the actual size of the magnet installed in the capsule and the more detailed calculation of the magnetic field in the center give the value of the minimum force of N. The required magnetomotive force of the coil is: The physical characteristics of such a coil are shown in Table 6.This winding is the lightest and the technological one from all the above and the capacity released on the active resistance does not exceed 14 kW, allowing to use the commercially available standard power supply for powering the coil.
Thus, after the analysis of different variants of the capsule magnetic control system as the preferred embodiment we chose the "pushing" of a permanent magnet magnetized perpendicular to the axis of symmetry of the capsule.At that, it is necessary to use the movable table for a patient, which significantly reduces the requirements for the magnetic system.

Proposals for the control system
To implement the control of the magnetic capsule it is necessary to continuously monitor its position and orientation in space.The analysis of publications devoted to the development of endoscopic capsules and tools identified two methods of retention suitable for the use in the designed capsule endoscopic complex prototype: ultrasonic and optical.
The optical method is based on the analysis of images from two cameras directed orthogonally, which continuously perform imaging of the workspace.This approach is used, for example, in the development of magnetic-controlled micro robots in the University of Utah 28 .The disadvantage of this method is the possibility of using only on the stage of the final adjustment of the control algorithms, since this method is not able to determine the position of the capsule inside the opaque object.
The ultrasonic method is based on the triangulation of the capsule making an ultrasound by sensors located on the surface of the tested object or on the periphery of the workspace.This location method was developed within the project ARES (Assembling Reconfigurable Endoluminal Surgical system) 29 aimed at assembling robots inside the human body.This method is the most promising because it does not require the transparency of the exanimated object, and is suitable for use in the clinical setting.
The next task of the capsule control after determining its position is the choice of the currents correlation in the coils of the magnetic system, allowing to move the capsule in a given direction.For that end it is proposed to divide the workspace into the grid and for each node to pre-calculate the matrix of the magnetic field gradients from each of the magnetic coils during the flow of the designed maximum current I max through it, where i -the number of the magnetic coil.Then, after the system determined the position of the capsule, we select the closest to the real state point of the grid and calculate the maximum force components of each of the coils: , where matrix is defined on the basis of the known in advance the total magnetic moment m, and the capsule orientation defined by the localization.After calculating all the sets of forces from each of the coils, we decompose the required by the capsule operator force vector, given as into six vectors where K i -the coefficient for the i-th coil.After defining all six coefficients K i in each of the magnetic coils we apply the corresponding current , that allows to exert on the capsule the force that is the closest to the one requested by the operator.
If we cannot reach the desired force at the point of the capsule, the decomposition is alternatively carried out with a shift to the nearest nodes of the computational grid in the direction of the patient table movement.After reaching the desired force, the table needs to be moved by the used shift amount by the computational grid.

CONCLUSION
This paper deals with the final choice of the method for endoscopic capsule control based on the technical feasibility.It was found that "pushing" the magnet is the only method feasible in practice.The most viable from the technical and the economic point of view is the use of the geometry in the form of a cube with six identical coils, one on each side.At that, the capsule should be magnetized perpendicularly to its geometrical axis of symmetry and the magnetic system should be supplied with a table movable along one of its axes.
The authors also put forward the primary proposals on the method of the system implementation determining the capsule position inside the workspace and on the algorithm currents setting in the coil to perform the requested by the operator influence to the capsule.
Thus, the magnetic system can ensure the rotation and movement of the capsule in the space by changing the external field gradient produced by the magnetic coils.
In the future, the authors plan to create a prototype of the described in this article capsule endoscopic complex controlling the capsule by the means of the external magnetic field.It is assumed that the magnetic complex will be cheaper than the existing analogues, consume less power and provide a more accurate localization of the capsule inside the human digestive tract, thereby increasing the effectiveness of this method of diagnosis.
analyze the properties of the coil, it is necessary to calculate the following parameters:

Fig. 1 .
Fig. 1.The hexagonal packing circles in the plane, in which the centers of the circles lie in the corners of a regular hexagon

Table 1 .
The embodiments of the coils' parameters with magnetomotive force of 1.35 MA-turns depending on the wire diameter.

Table 2 .
The magnetic moments of the endoscopic capsule depending on the grade of the material used in the magnet

Table 3 .
The embodiments of the coils' parameters with magnetomotive force of 0.8 MA-turns depending on the wire diameter.

Table 4 .
The embodiments of the coils' parameters with magnetomotive force of 200 kA-turns depending on the wire diameter.

Table 5 .
The embodiments of the coils' parameters with magnetomotive force of 120 kA-turns depending on the wire diameter

Table 6 .
The embodiments of the coils' parameters with magnetomotive force of 50 kA-turns depending on the wire diameter