2D Magnetic Actuation and Localization of a Surface Milli-Roller in Low Reynolds Numbers

—Magnetic actuation of minimally invasive medical tetherless devices holds great promise in several biomedical ap-plications. However, there are still several challenges in nonin- vasive localization, both in terms of sensing detectable signals of these devices and estimating their states. In this work, a magnetic milli-roller is actuated in a viscous ﬂuid under the inﬂuence of a rotatingmagneticﬁeld.ALyapunov-basednonlinearstateobserverisdesignedandimplementedtoestimatethepositionoftherollerusinga2DarrayofHall-effectsensors.Weshowthatthelocalstabilityofthestateobserveryieldsconvergencetooneofthelocal equilibria, for pre-deﬁned levels of sensor noise, initial conditions, and modeling errors. Performance is quantiﬁed using redundant measurements of the ﬁelds and we investigate the inﬂuence of the number of magnetic ﬁeld measurements on the observability of the system.Open-loopactuationandstateestimationaredemonstratedandexperimentalresultsshowthatthelocalizationofa5mmdiameterrolleralongsinusoidal,circularandsquaretrajectoriesachieveasteady-statemeanabsolutepositionerrorof 2 . 3 mm , 1 . 67 mm and 1 . 73 mm , respectively.

efficient magnetic-based manipulation system, two main components must be designed to simultaneously work in a specific environment. First, a magnetic actuation system generates the magnetic forces and torques needed to achieve locomotion of the tetherless devices, such as pulling [2], rolling or tumbling [3]- [5], swimming by the drag-based thrust of helical propellers [6] or using passively propagated bending waves along a flexible filament [7]. Second, a localization system provides real-time position feedback of the magnetic agent. Therefore, several non-invasive techniques have been presented to localize magnetic agents in a three-dimensional (3D) environment such as optical-based methods, computed tomography (CT), magnetic resonance (MR), ultrasound images, photoacoustic imaging (PAI), and magnetic field-based techniques [8].
Optical methods are important in preliminary characterization experiments to help understand the influence of the physical surroundings [9]. CT-based imaging methods are not suitable for real-time localization with relatively high spatial resolution, MR-based methods make use of relatively large magnetic fields, which imposes limitations to generate time-varying magnetic fields using actuation systems. The combination of MR-based navigation and MRI requires switching between two different magnetic field signals to achieve both actuation and imaging. However, this switching causes possible delays and navigation instabilities [8].
Ultrasound-based localization methods can provide real-time position of the magnetic agents in vivo. However, adequate resolution can only be achieved at relatively high-frequency sound waves, which is inversely proportional to its wavelength and this relationship limits the resolution and the size of the tracked magnetic agent [10]. PAI is a promising technique that combines optical contrast with acoustic spatio-temporal resolution to achieve noninvasive localization. However, there is still a need to overcome the penetration depth limitations imposed by light to enable detection of microrobots in human tissues [8]. On the other hand, magnetic fields are transparent to ultrasound wave reflectors and the availability of field sensors in the microtesla and nanotesla range would allow relatively small agents to be detected.
Several researchers have developed magnetic localization methods using two approaches [11]. The first is based on embedding a small magnet inside the agent and using external magnetic field sensor to estimate its pose. In the second approach, magnetic field measurements at the position of the agent are transmitted using field sensors and wireless circuits integrated with the agent. The first approach is more suitable for the localization of relatively small magnetic agents in the submillimeter scale. Popek  108 mm 3 using a rotating dipole field and an extended Kalman filter and reported a position error of 8.5 mm [12]. Guitron et al. have presented localization and closed-loop control of an origami robot using an array of Hall-effect sensors and achieved a position error of 0.99 mm [22]. They have implemented a decoupled two-phase actuation and localization operation to prevent strong coil field from interfering with field measurements of the robot. Khalil et al. have presented a localization and control strategy for a helical robot using an array of magnetic field sensors and a magnetic actuation system. They have achieved mean absolute error (MAE) of 2.3 mm in position estimation using a nonlinear inverse optimization technique [14]. Son et al. have also developed a 5 degrees-of-freedom (DOFs) localization system for a 524 mm 3 magnetic capsule [13]. A 2D array of Hall-effect sensors and a nonlinear optimization algorithm have been implemented to calculate the pose of the capsule with a position error of 2.1 mm. However, the robustness of the position estimation and the computational power are the main limitations of using nonlinear optimization [15]. In addition, localization techniques which make use of inverse optimization methods do not guarantee the stability nor do they enable convergence of the estimated states, and they are highly dependent on the initial conditions. Therefore, the design and implementation of a model-based nonlinear state observer is important to overcome the limitations of the numerical methods. Several researchers have proposed observer design methods, such as output injection method [16], extended Luenberger observer [17], and high-gain observer [18]. Outputs in these designs are typically assumed linear. However, there are several magnetic manipulation systems in which the measurements lead to nonlinear behaviors [19]. Here, we implement actuation and localization of a magnetic milli-roller in low Reynolds numbers (Re) using a spherical electromagnetic actuator and a 2D array of Hall-effect sensors, our contributions include: r Design of an electromagnetic actuator to generate rotating magnetic fields capable of actuating the magnetic roller.
r Design and implementation of a nonlinear state observer to achieve local-stability and convergence of the estimated position. The stability of the estimated states and its robustness to measurement noise and modeling errors are evaluated numerically and experimentally.
r Analysis of the influence of the number of field measurements on the observability of the roller. The remainder of this paper is organized as follows: In Section II, we present the dynamics of a magnetically-driven roller in low-Re and a nonlinear state observer is designed. Numerical results of the observer and its sensitivity to measurements noise and modeling errors are discussed in Section III. Section IV provides the experimental results. Finally, Section V concludes and provides directions for future work.

II. MAGNETIC LOCALIZATION SYSTEM
Reconstruction of the states of a tetherless roller in a fluid characterized by low-Re, involves modeling of its motion and design of a state-observer based on measurable outputs.

A. Equation of Motion in low-Re
Consider a tetherless spherical magnetic roller of diameter 2R and magnetic dipole m, moving with angular velocity ω and translating with velocityṗ on a flat surface. The body is immersed in a viscous fluid characterized by low-Re and its motion is influenced by an external magnetic field B at its center of mass. This field is produced using a spherical actuator permanent magnet of diameter 2R a and magnetic dipole moment m a , which undergoes purely controllable rotational motion about the axisΩ (Fig. 1). The position of the magnetic roller p is represented with respect to the material frame of the actuator magnet and its magnetic field is approximated by where μ 0 is the permeability of free space, I is a 3 × 3 identity matrix. The forces on the magnetic roller are balanced as In (2), F m is the magnetic force acting on the agent due the field of the actuator magnet and F d is the drag force. Further, F c is the contact force due to the friction between the roller and the surface. The magnetic force is given by The viscous drag force on the spherical agent is calculated as where η is the viscosity of the fluid, f t and f r are the normalized scalar near-wall fluid forces of the translation and rotation motion, respectively, and are given by [20] where δ is the height of the liquid film between the roller and the flat surface. The contact force due to non-hydrodynamic interactions between the surface and the roller is given by where F g and F b are the gravitational and buoyancy forces, respectively,Ṗ is the velocity vector of unit length, M is the mass of the roller, g is the gravitational acceleration, and ρ m is the density of the fluid. Furthermore, μ f is the dynamic coefficient of friction. The magnetic torque, T m , exerted by the external magnetic field must balance the drag torque on the roller, T d , such that where N is a unit vector normal to the 2D plane of motion. The magnetic torque on the roller is assumed to be in the direction of the rotation axis of the roller (ω), and we have [12]. H = 3P P T − I is a position-dependent matrix, P is the position vector of unit length, and the parameter k (0 < k ≤ 1) is dependent on the roller position, the fluid viscosity, and actuator frequency. Setting k = 1 corresponds to maximum torque which results in actuating the roller at its step-out frequency. The drag torque acting on the roller is given by Note that T t and T r are the normalized scalar torques of the transnational and rotational motion, respectively, such that (10) The orientation of the actuator magnet to the translating velocity of the tetherless body is related as follows: where . Equation (11) indicates that any change in the direction of the actuator magnet directly affects the translating velocity due to the over-damped nature of low-Re flow, and used to construct the state-observer.

B. State-Observer Design
The equation of motion shows that the translating speed of the roller is nonlinear with respect to its position from the magnet. To design a state observer (11) is written in the forṁ where p ∈ R n is the state vector and u ∈ R r is a vector of the inputs. The inputs are the components of the actuator dipole.
In (12), we assume the availability of measurable output vector (y ∈ R m ) as a function of the position of the roller through the output function h(·). We consider a full-order state-observer of the following form [21]: wherep is a vector of the estimated states,p is a vector of the desired reference states and (ū = U (p)) is a feed-forward control law. Further, L(·) is the observer nonlinear gain matrix.
The error dynamics, i.e., dynamics describing the difference between the estimated states and actual states based on the estimation error e = p −p, is calculated using (12) and (13). The corresponding observer-error dynamics is governed bẏ Since (e = 0) is the only equilibrium state of the observer-error dynamics (14) that is independent of the system states and inputs, then if L(·) is chosen such that (ė) achieves local asymptotic stability, the estimation error would converge to zero and p − p → 0 as t → ∞. Lyapunov's linearization method is used to acheive local asymptotic stability of the equilibrium state (e = 0). It suffices to choose the eigenvalues of the linearized observer-error dynamics Jacobian matrix at the equilibrium point e = 0 to be negative, such that where λ i is the ith eigenvalue of the Jacobian matrix. The problem of selecting the gain matrix is similar to that of a linear observer, but relatively more complicated due to the presence of nonlinearities in the Jacobian matrix of the inequality (15). We assume that the gain matrix is diagonal L(·) = diag(l 1 , l 2 ), where the gains l 1 and l 2 are obtained by solving the inequalities (15). The number of these inequalities is dependent on the order of system and although (11) describes 2D locomotion of a single roller, the observer design remains valid for estimation during 3D.

C. Nonlinear Measurement Function
Consider an array of sensors fixed between the actuator magnet and the roller (Fig. 1). The ith sensor in the array is subject to B i s = B r + B a , where B i s is the total field at the ith sensor, B r and B a are the field of the roller and actuator magnet, respectively. Since the position vector p i s to the ith sensor is fixed, the roller's position with respect to the ith sensor p i r is calculated as p i r = p − p i s . Assuming that the magnetic dipole of the roller aligns with the field of the actuator (i.e. m B). Thus the magnetic field of the roller is used as the observation function h(·) and can be written as where In the presence of m available field measurements, the output vector (16) is used to evaluate the degree of observability of the roller throughout the workspace.

D. Observability Analysis
The performance of the observer can be evaluated by investigating the observability of a given system with various available measurements. Consider the system in (12), assuming that the sensitivity and range of the sensors are sufficient to localize the roller in the predefined workspace, the nonlinear observability matrix can be evaluated using where L i  f h(p, u) is the ith order Lie derivative of h(p, u) along the vector field f (p, u). The necessary and sufficient condition for achieving local weak observability of the nonlinear system  (12) at a point (p 0 ) is that the observability matrix in (17) is full column rank (i.e., rank{O(p 0 )} = n). Applying singular value decomposition, Σ = diag(σ 1 , σ 2 . . . , σ n ) is a diagonal matrix of non-negative singular values, U and V are the left and right unitary matrices. To relate the degree of observability to the state estimation error, we consider the measurement residual y = y −ŷ which includes new information of the state from the measurements. The larger the observability degree of the system, the more efficiently the state estimation error can be corrected by the measurement residual. In order to find the recursion relationship between the state estimation error e and the measurement residualỹ, the nonlinear outputs in (12) Fig. 2(e) shows that the condition number and the observability of the roller is almost constant when more than nine magnetic field measurements are used.

E. Magnetic Actuation
An electromagnetic actuator is developed to generate a rotating field capable of actuating the roller. This actuator consists of a spherical permanent magnet surrounded by three orthogonal coils to control its orientation. An aerostatic bearing encompass the magnet to achieve a frictionless rotation. The combination of a permanent magnet and coils provides relatively high field density compared to the size of the coils. The coils are designed such that the on-axis field intensity of each coil at the center is constant for the same input current. This constraint makes the magnetic field, B c , linearly related to the input currents (B c = BI), where B is a local mapping between the supplied current and the field at the common center of the coils. The orientation of the actuator magnet required to generate the rotating field ism d = e ( Ω t)S(Ω)m o , whereΩ = Hω is the actuator magnet rotation axis required to generate a rotating field about the axis (ω) at the roller position [11]. S(Ω) is the skew-symmetric matrix of the axis (Ω), the matrix exponential of a skew-symmetric matrix creates a rotation matrix andm o is any unit vector perpendicular toΩ (i.e.,m o ⊥Ω). The input current, I, is calculated by where M a and R a are the mass and radius of the actuator magnet, respectively. Note that the observer (13) does not account for the dynamics of the coils that control the magnetic dipolem a . This assumption is valid when the 2D plane of the sensor array is located at a relatively large distance from the electromagnetic actuator. In this case, the unmodeled field produced by the coils would fall off as the inverse cube of the distance to the plane of the sensor array, enabling the measurement of B a and B r only. In practice, the unmodeled field will amplify the effect of the background noise and estimation accuracy.

III. STATE ESTIMATION NUMERICAL RESULTS
The stability and performance of the observer is tested at different levels of measurement noise and modeling errors.

A. Measurements Noise Sensitivity
A range of pre-defined Gaussian noise levels are added to the field measurements. These additive noise levels are chosen to model the internal noise range of the sensors used in the experiments and the actuation field mapping error. The acquisition frequency of the field is limited by the maximum frequency of the sensors used in the experiments. Three initial conditions are defined as I.C 1 = (0, 0), I.C 2 = (−5, 5) and I.C 3 = (−9, 9) mm. The initial states of the observer is set to the center (0,0) mm of the actuator's magnet (center of the workspace). The initial states of the circular and square trajectories are set to I.C 2 and I.C 3 , receptively. Fig. 3(a) shows the convergence of the estimated states to actual states when measurement noise is superimposed with the measured field with standard deviation of σ 1 = 10 μT. To quantity the performance, the MAE in position estimation is calculated using, In this case, the MAE is (2.03,0.66) mm. When we increase the noise to σ 2 = 80 μT for the same circular trajectory and initial conditions, the MAE increases to (3.35,4.41) mm ( Fig. 3(b)). Similarly, the observer yields stable convergence to a square trajectory with MAE of (0.35,0.33) mm for σ 1 (Fig. 3(c)) and MAE of (0.94, 0.88) mm for σ 2 (Fig. 3(d)). Despite the superimposed noise with the measured field, the estimated position along the circular trajectory converges in 2 s and 10 s in case where σ 1 and σ 2 are added, respectively. In the case of the square trajectory, the estimated states converges in ∼ 1 s.
In the previous analysis, the estimation accuracy, in terms of MAE, deteriorates as a result of the increased measurement noise. The measurement noise is tuned numerically to predict the MAE for various initial conditions and for noise range between 10 to 80 μT (Fig. 3(e)). It shows that the estimation accuracy is sensitive to variations in measurement noise and variations in initial conditions. Associated with the increase in noise level by 10 μT is an increase in the maximum MAE by 67%, 40%, and 34% for I.C 1 , I.C 2 , and I.C 3 , respectively. Therefore, estimation error reduction can be achieved by decreasing the effect of the background noise.

B. Sensitivity to Modeling Errors
It is unlikely that the observer can be effectively designed using nominal parameters without errors. Therefore, four predefined error levels are superimposed with the nominal parameters of the viscosity of the fluid, geometry of the roller, magnetic moment of the roller and spherical actuator. The predefined modeling error are entered into the observer such that the difference between the nominal parameters of the model and the observer are: Δ ∈ {Δ 1 , Δ 2 , Δ 3 , Δ 4 }. In the case of negligible mismatch between the parameters of the observer and the system, where Δ 1 = 0%, the MAE in estimation is (0.24 ± 0.8, 0.23 ± 0.9) mm for I.C 1 (solid lines), as shown in Fig. 4(a). A small deviation from I.C 1 results in a similar transient and steady-state response, as shown by the dashed lines in Fig. 4(a). Increasing the error level to Δ 2 = 10% results in an increase in the MAE to (0.26 ± 0.84, 0.27 ± 0.87) mm for I.C 1 (Fig. 4(b)). Similarly, additional modeling error introduced into the observer will deteriorate the position estimation as shown in Figs. 4(c) and (d) and the corresponding MAE is (0.28 ± 1.05, 0.38 ± 0.87) mm and (0.38 ± 0.83, 0.42 ± 0.86) mm for Δ 3 = 20% and Δ 4 = 50%, respectively. Again, any small deviation from I.C 1 does not yield a different response, as shown by the dashed trajectories.
To quantify the transient and steady-state performance at the same pre-defined error levels and greater deviations in the initial condition, we repeat the previous numerical analysis for I.C 2 . In this case the MAE corresponding to Δ 1 = 0 is calculated as (0.76 ± 1.03, 0.34 ± 1.91) mm (Fig. 4(e)). Similarly, increasing the error level to Δ 2 yields convergence with MAE of (0.78 ± 1.23, 0.35 ± 2.07) mm (Fig. 4(f)). The observer continues to become increasingly less accurate by increasing the introduced pre-defined error levels to Δ 3 (Fig. 4(g)) and Δ 4 (Fig. 4(h)), and the corresponding MAE is (0.81 ± 1.28, 0.42 ± 2.31) mm and (0.97 ± 1.4, 0.62 ± 2.57) mm, respectively. Note that the dashed lines in Figs. 4(e)-(h) show the response of the observer at the mentioned error levels and a small deviation from I.C 2 . The state estimation numerical results (Fig. 3 and 4) indicate the capability of the observer (13) to yield stable estimation under all circumstances (i.e., measurement noise, modeling errors, and initial conditions). These numerical results confirms the fact that choosing the nonlinear gain matrix, L, such that the observer inequality (15) is satisfied, the local stability of the error dynamics is achieved.

IV. STATE ESTIMATION EXPERIMENTAL RESULTS
The Lyapunov-based state observer is verified using openloop actuation and estimation experiments. The experiments  enables motion control of the roller along arbitrarily shaped trajectories using the spherical electromagnetic actuator.

A. Spherical Electromagnetic Actuator
A 5 mm diameter roller with dipole moment of 0.07 A.m 2 (N40 Neodymium, Neomagnete, Berlin, Germany) is immersed in silicon oil of viscosity 1 Pa.s (Re ∼ 10 −3 ). It is controlled to roll on a flat surface under the influence of a magnetic torque generated using a spherical magnet (Fig. 5(a) The sensors are arranged in a rectangular layout (4 × 4 array), such that their center-to-center distance are 7 mm and 14 mm along the x-and y-axis, respectively. The sensitivity of the sensors is 0.16 μT within a range of ± 5 mT. These sensors are calibrated by measuring the Earth's field and subtracting it from the field measurements during the experiments. The sensor readings are acquired via Serial Peripheral Interface with 16-bit data resolution. The sampling rates of the actuation and localization loops are 2 kHz and 0.94 kHz, respectively. The sensors are placed at a distance of 12 cm above the actuator magnet and 30 mm below the roller, and its motion is tracked with a camera for validation. Note that the sensors board can be placed above the roller if relatively larger actuation fields are needed to prevent magnetic saturation.

B. State Estimation Experimental Results
The position of the roller is estimated from the measured magnetic field. In order to evaluate the stability and the robustness of proposed nonlinear observer in the worst-case scenario, the minimum number of field measurements required for the system to be observable are used. The pre-calculated magnetic field map of the actuator magnet at the positions of the sensors is subtracted from the measured field using the sensors to calculate the field of the roller. The observer is initialized at the center of the workspace (0,0) mm ( Fig. 6(a)). The maximum disturbance in the field is measured as 0.25 mT, whereas the maximum actuating field measured by the sensors is 2 mT during the movement of the roller with respect to the sensors. In the trial shown in Fig. 6(a), the roller is allowed to move along a sinusoidal trajectory while its position is estimated. The modeled and the measured disturbance in background field during the movement of the magnetic roller are shown in Fig. 6(b). The estimated position MAEs are 1.8 mm and 3.1 mm along the x-and y-axes, respectively, and the position steady-state mean absolute error (S.S.MAE) is 2.3 mm, as shown in Fig. 6(c). Despite the 3-4 body length difference between the initial conditions of the observer and the initial roller's position, the observer achieves local stability and the estimated position converges in ∼ 8 s (Fig. 6(c)). Note that the observer cannot maintain a constant steady-state estimation error due to the condition number anisotropy in the workspace (Fig. 3) with the exception of m = 3 where the condition number is radially symmetric. Therefore, the state estimation experiences position-dependent observabaility, in terms of N c , which makes the observer less or more sensitive to mismatch between nominal and actual parameters and measurement noise for a given number of sensors and for different motion patterns within the workspace.
Figs. 7(a) and (b) show another state estimation experimental result of the roller during the travel along an approximately circular trajectory and the corresponding modeled and measured disturbance in background field, respectively. The estimated position of the agent converges to its actual position in approximately 8 s, despite the difference in initial conditions.  Fig. 7(c) shows that the states of the roller experience undesirable overshoot, that is followed by oscillation in the steady-state about e x = e y = 0. The estimated position MAEs are 1.18 and 2.77 mm along the x-and y-axes, respectively, with a S.S.MAE of 1.67 mm (Fig. 7(c)). When the roller is controlled to move along a square trajectory of side length of 28 mm (Fig. 8(a)), similarly to the previous trials, the measured magnetic fields (Fig. 8(b)) are used by the state observer through (16) and asymptotic stability is achieved using the matrix inequality (15). In this case, the estimated position of the roller converges to its actual position in approximately 12 s, and the estimated position MAEs are 2.23 mm and 1.69 mm along the x-and y-axes, respectively, with a S.S.MAE of 1.73 mm, as shown in Fig. 8(c). Please refer to the accompanying video.

V. CONCLUSION AND FUTURE WORK
On the basis of Lyapunov-based design, we show numerically and experimentally the local stability of a nonlinear state observer for magnetically actuated milli-roller. The position of the roller is estimated during locomotion under the influence of a rotating magnetic field. The observer is designed and implemented based on the nonlinear outputs of the difference between the pre-calculated map of the actuating field and the field measured using Hall-effect sensors. The numerical results illustrate local convergence and stability of the observer for pre-defined levels of magnetic field measurement noise, modeling error, and unknown initial conditions. This sensitivity analysis demonstrates that the MAE and steady-state error increase with the noise and modeling error, respectively. Our state estimation experimental results demonstrate the local stability of the observer and we achieve position tracking S.S.MAE of 2.3, 1.67 and 1.73 mm, for sinusoidal, circular, and square trajectories, respectively.
As part of our future studies, a globally convergent nonlinear observer will be investigated to achieve global asymptotic stability of the pose estimation for systems with nonlinear and nonmonotonic outputs. Observer-based closed-loop control will be implemented to achieve simultaneous magnetic actuation and localization of a swarm of rollers in 3D space in a noninvasive manner.