The Development of a Virtual Simulator for a Novel Design Non-Permanent Magnetic Needle Based Eye Anesthesia Training System

Ophthalmic anesthesia plays a crucial role in eye surgery. However, the conventional practice of this process is a blind procedure, in which a needle is inserted blindly into the cadaver. This paper introduces a needle tip tracking system for ophthalmic anesthesia training focusing on the Retrobulbar block procedure. The study presents a development in a prototyped system using Hall effect sensor arrays to track a 5D magnetized needle tip (X, Y, Z, <inline-formula> <tex-math notation="LaTeX">$\boldsymbol{\theta }$ </tex-math></inline-formula>, <inline-formula> <tex-math notation="LaTeX">$\boldsymbol{\varphi }$ </tex-math></inline-formula>). The orbital structure is fabricated with embedded Hall effect sensors. The extended Kalman filter and least square method are developed to select the observation model from multiple training sets and to estimate the needle tip coordinates. The robotic manipulator (ABB YUMI) is used to model the training set between the distance and the initial angle of the magnetized needle. The developed system provides the needle tip position with an RMS of Euclidean distance error up to 1.7398 ± 0.5288 mm. As a result, the system is capable of providing the needle tip positions with an acceptable error comparing the system’s accuracy with the size of the retrobulbar target space and important anatomies.

more significant than the average size of a human's globe in 105 an orbital structure. However, further studies show that the 106 perpendicular model used in the calculation cannot provide 107 a precise needle tip position even when the actual needle is 108 located inside the detecting space. This paper introduces the 109 development of the eye anesthesia training system in various 110 aspects, including the multiple angular training set, the mul-111 tiple angular model selection algorithms, and the localization 112 technique from the multiple angular models.  The current study focuses on the training system for retrob-120 ulbar block, which is one of the standard processes for 121 ophthalmic surgical preparations [34]. Using an inferolateral 122 quarter of the orbital structure model from the CT scan as a 123 starting structure, a Hall effect sensor array is inserted into 124 the model. The sensor array comprises 26 high-resolution 125 Hall effect sensors [35]located in 4 columns, the same as 126 the previous study prototype [23]. The Hall effect sensors 127 capture the strength of the magnetic field emitted from a 128 magnetized needle. The magnetizer induces the charges on 129 the needle. The sensing voltages are aggregated by an ana-130 log multiplexer (model ADG732). The data is then con-131 veyed to a digital-analog converter (DAC). The 12-bit DAC 132 (ADS1115) is used in transforming the sensing voltage into 133 digital data [36]. The Arduino Mega is selected as the central 134 controller to convey the digital data to a computer using the 135   In this study, the orientation in x and y axis (ϕ) is assumed to   of position (P i (X i , Y i , Z i )) and orientation in the quater-184 nion system (q i (x i , y i , z i , w i )) relating to the system's origin 185 (X , Y , Z ) O rigin as shown in Fig. 3.   The threshold is set as a result from the first experiment.

207
The filtered data is then applied with the directional vector of 208 the activated sensors. The directional vector is denoted by (6). distance in the planar plane leading to (7)- (10).
where r i denotes the distance between the magnetic source 225 and sensor number i, while θ i is an orientation between them. 226 x, y and z are the coordinates of needle tip referring to the 227 position of sensor number i.

228
Although the distance and angular of the magnetized nee-229 dle can be calculated by (7)-(10) and the given initial angle 230 (θ 0 ), the initial angle affects the magnetization direction ( − → m ), 231 which affects the system unable to calculate the needle tip 232 coordinates with (7). Therefore, we select the 3rd degree 233 polynomial regression between the sensing data and known 234 distance from the first experiment as the transfer function, 235 which is denoted in (11).
where a, b, c and d are the constant parameters of 3rd degree 238 polynomial regression from the different initial angles in first 239 experiment ( Table 1). The experiment sets to collect the data 240 between the sensor and the posture of the magnetized needle 241 will be discussed in the experimental chapter.

243
The system calculates the needle tip position as the state ( − → x k ) 244 at frame k in a term of the cartesian coordinate system, where 245 the direction of unit vector − → d refers to the direction in x 246 and y axis, while the output of (8), (9), and (10) denotes the 247 coordinates in − → d and z with the orientation of the needle (θ 0 ). 248 The transfer function in (11) also applies to the covariance 249 of sensing data ( k i ) to calculate the covariance of needle tip 250 position (σ ) Nevertheless, the initial angle of the magnetized needle 253 remains unknown. Therefore, Least Squares Estimation 254 (LSQ) technique involves selecting this angle from training 255 data sets. 273 where Z k is an observation state at frame k, consisting of After LSQ selects the observation model and initial angle of 300 the needle, the system resamples and updates the needle state 301 with the observation model to estimate the belief of needle 302 state using an Extended Kalmar filter. Fig. 7 illustrates the 303 concept of the needle tip tracking system using EKF using N 304 units of the Hall effect sensor. The magnitude and observation 305 vectors are converted to possible distances and orientations 306 from the sensor's coordinates in the frame (k).
307 EKF provides the system to functionally estimate the 3D 308 position of the needle tip in a term of probability density 309 function (PDF). The needle tip's coordinates are initially 310 modeled with a first-order Markov chain with the sensing data 311 as an independent condition. This chain can be written as: is set to be 0 in this system since the hand gesticulation is unpredictable. 2) Predicted estimate covariance: Step: 3) Measurement residual: where K k denotes Kalman gain at time k. f is the MSL cal-  holder was modified with a socket for the robotics finger to 333 grasp. The robot system set the gripping force as 12 Nm to 334 grip the holder while moving to the designed coordinates. The 335 needle tip coordinates, representing an end of the effector in 336 the system, were registered and calculated by the 4-Points 337 tool tip calibration procedure [43]. This process generates 338 the parameter set that refers to the needle tip property in a 339 coordinate system. We defined the minimum error per motion 340 as 0.1 mm and maximum velocity as 5 mm/s.

341
The sensor position was set as the origin of the system 342 ((P) O rigin), as shown in Fig. 8. The sensor position was fused 343 with a set of commands to generate the target coordinates 344 in a hemisphere shape. 4 command sets, which have differ-345 ent initial angles between the needle and Hall effect sensor 346 from 0 to 45 degrees (15 degrees per each set), were created 347 by MATLAB. Each command set consisted of the hemispher-348 ical coordinates with the specific orientation varying radius 349 from 0.5 mm to 14.5 mm (1 mm per step), which have an 350 origin at the incipient position. Additionally, each radius of 351 the hemisphere contains 452 coordinates. The robot arm was 352 programmed to move the end effector to all coordinates in 353 the anticlockwise direction, as shown in Fig. 8. The robot 354 arm moved from the inside hemisphere (0.5 mm) to the 355 outside hemisphere (14.5 mm), respectively. We recorded 356 the coordinates together with sensing data from the Hall 357 effect sensor. At the end of each experiment, the automated 358    The array of 9 Hall effect sensors was fabricated in a 379 3 × 3 square shape as shown in Fig.9. The sensor sockets 380 were fabricated by a 3D printing technique using PLA mate-381 rial, which provides a resolution of around 0.1 mm. The 382 center of sensor number 1 was assigned as the origin of 383 the measurement system ((P) O rigin). The distances between 384 sensors were 8 mm in both the x and y axes due to the 385 workspace from the first experiment. The command set, 386 which consisted of 9 coordinates, was generated randomly in 387 VOLUME 10, 2022 FIGURE 12. The box plot between the sensing data and the distance from the sensor in the hemisphere shape (from 1.5 to 13.5) of 4 different initial angles.  as shown in Fig. 9. We set the velocity of this experiment as 391 constant velocity (2 mm/sec). The experiment was repeated 392 4 times with different command sets and different initial 393 angles from 0 to 45 (as defined in training data). The LSQ 394 and EKF techniques were applied to estimate the needle tip 395 position based on the training set from the first experiment. 396 We generated the ground truth using the position feedback 397 from the robot arm every 0.2 seconds. The Euclidean distance 398 between the ground truth arm and estimated needle states was 399 calculated to illustrate the accuracy of the developed system.   almost the same as the space in the human's orbital cav-405 ity (12.0 -14.0 mm) [3], [44]. Therefore, the system was 406 designed with the same sockets' position from previous stud-407 ies [45]. The orbital structure was embedded with 24 sensors, 408 VOLUME 10, 2022   Table 1. Moreover, we applied the sensing data 40 samples). On the other hand, the X and Y axis motion 470 has a lessened effect on the Euclidean distance error. Fur-471 ther investigation on the results shows that the error in the 472 localization system was accumulated over the increasing time 473 frames, as in Fig. 17 and 18, which is the common problem 474 in EKF system. Moreover, there is no remarkable error from 475 the different initial angles as shown in Fig. 17.

477
The reference coordinate was registered to the phantom posi-478 tion as the origin of the validation system. The experiment 479 was repeated 10 times with the same target sequence (1 to 8). 480 The output state was calculated 2 times in each step. The 481 estimated coordinates were compared with the target points 482 as shown in Fig. 19. We calculate the Euclidean distance 483 between target points and estimated coordinates. Besides, all 484 errors in the x, y, and z axis were recorded as in Table 2. The 485 RMS error of the Euclidean distance involved describing the 486 accuracy of the system. The result illustrates that the system 487 has accuracy of around 1.958 ± 1.060 mm with the maximum 488 error in z-axis around (4.5739 mm).

490
In the first experiment, the result illustrated that the maximum 491 detection area of the sensor is around 13.5 mm, which is 492 similar to the output from previous studies. The change in 493 the sensor model enhances the detected resolution between 494 VOLUME 10, 2022 the magnetic field and sensing data, while detection space