Dynamic Path Planning for Bevel-Tip Flexible Needle Insertion into Soft Tissue Based on a Real-Time Finite Element Model

(is paper presents a novel dynamic path planning methodology for needle steering into the soft tissue. A real-time finite element model is used to simulate the procedure of a flexible needle into the homogeneous soft tissue, which provides the dynamic deformation information for the path planning.(e relationship between needle base and tip is formulated as the transformations of homogeneous matrix with quasi-static assumptions. Based on the reachability of the flexible needle, the real-time motions of obstacles and target are considered through the dynamic needle-tissue interactions. A testbed including a XY linear stage, one rotator, and a CCD camera is constructed, and the experiments are designed to validate the proposed method. (e 23G PTC needle was inserted into the PVA phantom with markers, and the CCD camera was utilized to record the needle trajectories and motions of target and obstacles. (e targeting errors between the experimental and planned paths are less than 1.20mm, and the distance from the obstacle to needle is not smaller than 1.16mm.(e results demonstrate that the proposed algorithm is effective for online planning the paths in the needle-tissue interactive environment.


Introduction
e needle insertion procedures are one of the most common minimally invasive medical procedures, which are widely used in biopsy, anaesthesia, and radiotherapy [1][2][3][4]. Needles are inserted deep into the focus area of different organs such as lung, liver, or prostate for diagnosis, localized therapeutic drug delivery, and sample removal from tissues. Sensitive parts such as the vessels should avoid contact with needles at the same time. During the interaction process, the interaction force between the needle and tissue would lead to the movement of obstacles and goals. And the needle can deviate from its intended path due to the unbalanced resistance force acting on the needle tip. Hence, this research proposed a dynamic path planning methodology that can steer and control the needle to get to the focus area while avoiding the vessels or other sensitive parts inside the organ. e needles used in the interventional procedures are classified into three types, that is, rigid needle, flexible needle, and soft needle [5]. In many diagnoses and treatment procedures, the soft and flexible needles are required to avoid obstacles or reach the targets in one insertion [6], which requires the needle possessing good flexibilities and steerability [7]. However, the needle-tissue interactions, which cause the obstacles and targets to move from their original position, contribute to the greater targeting challenges of the needle as the practice scenarios of needle insertions are more complicated. In the complicated scenarios, the percutaneous needles are required to hit the targets hidden by the anatomical obstacles or to get to multiple targets in different locations. erefore, it is essential to research the needle steerability and path feasibility for improving the accuracy and successful rate of needle insertion operations.
To improve the accuracy of needle insertions, the needle trajectory should be planned and updated according to the dynamic needle-tissue interactions. Needle path planning is to control the insertion parameters and guide the tip for avoiding the obstacles and reaching the targets [8][9][10], which reflects the dynamic procedure of needle-tissue interactions [11]. DiMaio et al. first addressed the concept of needle steering, modeled the domain of target and obstacles with the artificial potential field (APF), and planned the effective trajectories [8,9]. Jiang et al. improved the APF algorithm with the conjugate gradient method, which can escape from a local minimal point [12], and the discrete potential field was used for path planning of surgical needles in 3D anatomical environments [13]. e virtual spring was employed to model the tissue properties by Glozman, and the path planning problem is converted into the optimization of lateral force [14]. However, the artificial potential field and virtual spring method did not account for the steerability of flexible needles.
During insertion of the flexible needle, the tissue around the needle tip is compressed and the asymmetric resistance force against the compression due to the asymmetric needle tip can deflect the flexible needle, as shown in Figure 1. e direction of bending is determined by the direction of the bevel-tip. Rotating the needle base would change the direction of the bevel-tip, which would change the direction of the asymmetric force and tip bending direction; hence, by rotating the needle base, different needle trajectories would be generated.
Many groups have studied the steerability of bevel-tip needle. Webster's experiments showed that the trajectory of flexible needles follows a circular arc under the ideal conditions [15]. Based on the phenomena, the nonholonomic unicycle and bicycle models were presented for describing the kinematics of the bevel-tip needles using the Lie group [16]. Reed et al. discussed the instant angle discrepancy between the base and the tip for the soft needle [17], but the time lag is better for flexible needles.
Many path planning algorithms based on nonholonomic kinematic model have been proposed to obtain feasible needle trajectories [18][19][20][21][22][23]. Park et al. considered the probability of needle tip pose, which was approximated as the probability density function [18,19]. e path planning problem is to solve the maximum probability of needle path [20]. Alterovitz et al. considered the uncertainties caused by the needle-tissue interactions [23]. e Markov decision model was used to depict the needle motion, and the dynamic programming is employed to obtain an optimal control sequence [22]. Alterovitz et al. also provided a targeting error model with Euclidean distance for optimizing the needle trajectories [10]. Duindam et al. presented the forward and inverse kinematic equations of flexible needle based on the nonholonomic model, and the null motion was employed to a three-dimensional needle path [21]. Wang et al. simplied Duindam's work and proposed the stop-and-turn strategy to control the needle, which could decrease the number of needle rotations [24]. e computer searching methods were also applied in the needle path planning. e exhaustive method, Nelder-Mead downhill simplex method, and Haystack were used in the path planning by Hamzé, and the comparisons showed that Haystack is faster than others [25]. Abayazid et al. proposed a path planning algorithm with rapid exploring random trees (RRTs) to guide the needle tip in real time [26]. Vrooijnk et al. studied needle path planning problem in the nonstatic environment with two-dimensional ultrasound images, but the obstacles and target moved with constant speed [27]. Morimoto et al. reported that the image-based path planning was employed to design and fabricate the concentric tube robots [28]. Korayem et al. proposed the dynamic modeling of flexible arms which simultaneously take large motions and small deflections into account [29,30], and based on the precise model of the general flexible mobile manipulator, the path planning approach of mobile elastic robotic arms is proposed, which points out the importance of dynamic effect in path planning [31]. In these studies, the motions of obstacles and targets caused by needle-tissue interactions were not considered for adjusting the needle trajectories.
As it can be seen from the literature, various path planning algorithms have been developed for optimizing the needle trajectories. e traditional planning algorithm such as genetic, RRT, and annealing algorithm is in essence an optimization algorithm, which can only generate the optimal needle path in a rigid space. It is not sufficient and applicable to apply in the deformable environment because the tissue deformation cannot be considered. First, the targeting error involves two parts in the complicated environment with the moving targets and obstacles. One is the tip-target error, and the other is the needle-obstacle collision error. e two errors are affected by the needle-tissue interactions, which can lead to the offsets from their original locations of obstacles and targets inside the tissue. Second, the targeting error and the collisions with the obstacles cannot be predicted and corrected without a model-based control, even though there exist imaging devices in the needle insertion procedure. It is necessary to correct and compensate the insertion errors based on a predictive model-based control to ensure the convergence of a feasible and effective path in complicated circumstances. e aim of this paper is to develop a novel algorithm for planning a feasible trajectory in the dynamic needle-tissue interactive environment. Unlike the existing algorithms, the dynamic information of the targets and obstacles is predicted and applied to the path planning procedure, and they can facilitate to correct the needle insertion errors. e advantages of the proposed planning algorithm are as follows.
e targeting error and obstacle collision error are both considered in the path planning algorithm. e dynamic needle-tissue interactions are as the feedback to guide and control the needle to avoid the obstacles and get to the target. e experiments are designed to validate the effectiveness of the proposed algorithm. is work can be used for developing virtual training system and assisting the surgeon to plan pre-and intraoperative paths. e rest of this paper is organized as follows: the problem of dynamic path planning is presented in Section 2; Section 3 provides the dynamic path planning with inverse kinematics, finite element prediction model, and general insertion error, followed by the algorithm for the dynamic path generation introduced in Section 4; the testbed setup is introduced; the experimental results are discussed in Section 5; and finally, the conclusions and future work are provided.

Problem Definition and Assumptions
In this paper, obstacles represent the sensitive parts such as the vessels that should avoid contact with needles. Goals represent the focus area for tissue extraction or drug delivery. e soft tissue is a deformable medium. Under the interaction of needles, the internal structure would move dynamically, and the needle would bend at the same time, which would lead to needle targeting errors and mitigate the effectiveness of diagnosis and therapy. e objective of the path planning for needle insertion is to find feasible paths between given insertion location and the moving target and obstacles, whose movement is caused by needle insertion actions. A complicated case for needle insertion is illustrated in Figure 2.
In order to reach the targets inside the human body, the needle is deflected to avoid the obstacles (organs inside the body), such as the bones and vessels. It is necessary to plan a feasible path from the outside of the body to target inside the body.
e path planning problem is described as follows. Given the initial pose of needle tip q start , an initial pose of the target q target , and the initial poses of the obstacles q obstacle . Since the motions of target and obstacles need to be considered, the parameters of needle-tissue interaction are also provided. e procedure of needle insertion is divided into n time sequences. e outputs of the algorithm are the adjusting angles of all the needle segments, as shown in equation (2): (1) e solution of g n (Φ) satisfies the pose of changed target, as follows: and the paths should also avoid the pose of moved obstacles g(q obstacle [t n ]). e assumption of this work is as follows. e procedure of needle insertion is composed of a series of quasi-static processes. e flexible needle moves in the dynamic environment, and the obstacles and the target move in the homogeneous, linear-elastic material of soft tissue. e motion of the needle with bevel angle tip is fully determined by the motion of needle tip, and the motion of needle tip is steered by adjusting the needle base. e experimental settings in our group for needle insertion into the phantom are at 1 mm/s, and there would be pause of 10 seconds after the rotation of the needle base. Hence, the lag between the needle base and needle tip can be compensated, and the angle of needle tip is fully controlled by the rotating the needle base.

Proposed Methodology
e schematic diagram of the proposed path planning algorithm is shown in Figure 3. In clinical surgery, obstacles represent the sensitive parts such as the vessels that should avoid contact with needles. Goals represent the focus area for tissue extraction or drug delivery. e initial positions of obstacles and target can be predetermined by preoperative medical image. e dynamic path planning is converted as an optimal problem: the optimization objectives are to minimize the distance between the needle tip and the target and maximize the distance between the obstacle and needle trajectory. ese two terms compose the general insertion  error in artificial potential field (APF). e kinetic model that described the relationship between the needle base and needle tip and the needle-tissue interaction model that predicts the obstacles and goals' movement are both required: the Denavit-Hartenberg method is used to describe the motion from needle base to the tip and formulate the forward and inverse kinematic equations of bevel-tip flexible needle. A real-time finite element (FE) method is employed to estimate the needle-tissue interactions, which are used to predict the displacements of the obstacles and target inside the tissue when planning the needle paths. e feasible paths from the current position of needle tip to moved target can be generated by the inverse kinematics. After each adjusting action, the new locations of target and obstacles are calculated by the FE model. en, according to the initial location of tip and updated location of target, the sets of adjusting angle are generated by the inverse kinematic equation. e feasible paths provided by the kinematic equation are used for calculating the general insertion error. If the tip reaches the target, the optimal path is found. If not, calculate the new locations and repeat the above steps.

Kinematics Model of Flexible Needle.
In this paper, we take into account the path planning of flexible needles in the dynamic environment, and the obstacles and target move in the linear-elastic material of soft tissue. It is assumed that the motion of the needle is fully determined by the motion of needle tip, and the motion of needle tip is steered by adjusting the needle base [32]. e lag between the needle base and needle tip is neglected, and the angle of needle tip is fully controlled by rotating the needle base [17,21]. Under the previous assumptions, the motion of needle is determined by two control inputs: the insertion depth d and the rotation angle θ. e motion of needle insertion includes one translation and one rotation of needle base, which is shown in Figure 1. e translation of needle base transmitted to the needle tip is transformed into a combination of the translation along the z direction and the rotation about the y axis. Neglecting the needle torsion, the rotation of needle base is transformed into the rotation of needle tip, and ω tip ≡ ω base [21].
By analyzing the deflection of flexible, the needle deflection is independent of the depth of insertion. When the same type of needles is inserted into the same material of soft tissue, the needle deflection is a constant over the small insertion depth [32]. e two control inputs are reduced to one input, i.e., the angle of rotation ϕ. According to the quasi-static thinking, the needle can be decomposed into finite segments, and the insertion procedure can be taken as the combination of the segments' insertions, shown in Figure 4. e generalized coordinate is chosen to describe the pose of needle segment, written as e homogeneous matrix g(q) of body frame fixed at q is written as where P(q) � [x, y, z] T ∈ R 3 represents the relative position of the i th needle segment; R(q) ∈ SO(3) represents the orientation of the i th needle segment; and ϕ, θ, and ψ are the angles about X, Y, and Z axes in the reference frame. e initial body frame Ox 0 y 0 z 0 is created on the needle base, and the end body frame Ox n y n z n is created on the needle tip.
Following the Denavit-Hartenberg method, the motion of flexible needles can be described by the transform of homogeneous matrix from the needle base to needle tip [32], written as follows: where g i,i+1 denotes the homogeneous transform from the i th segment to the (i + 1) th . Φ denotes the adjusting angle set of needle base. In the path planning algorithm, we formulate an expression to find an efficient adjusting angle set and construct a path from insertion location to the target.

Prediction Model for Needle-Tissue
Interactions. e key to dynamic path planning is the real-time information of needle-tissue interactions, especially the movements of the target and obstacles. e finite element method can adopt the complex geometries and boundaries of linear and nonlinear soft tissue materials, and it is used for simulating the soft tissue deformation. In this paper, we consider the case that the flexible needle is inserted into the homogeneous, linear, and elastic soft tissue, which is modeled in the literature [33].
In the FE model, the needle-tissue interactive procedure is decomposed into four different processes [33]. e stiffness force of soft tissue is acted on the needle tip in process 1. e needle enters into the tissue at a certain depth in process 2, and the needle's displacement is constrained by the cutting and friction forces. e needle gets to the target and keeps its position in process 3. Finally, the needle is retreated from the tissue. After meshing the tissue model and initializing the boundaries and properties of needle and tissue, the calculation is implemented in Matlab. e iteration time for 1061 × 1061 2D grid mesh is 10 ms on an Intel i7-3.5 GHz dual-core machine running Linux OS. e simulation can provide real-time information for path planning in the dynamic environment. e yield displacements of target and obstacles inside soft tissue are provided for updating the trajectories during a needle insertion procedure. For the sake of exposition, the displacement of tissue node from the FE model is defined as where u x and u y are the components in the x and y directions. rough the FE model, the displacements of tissue node can be related to the parameters of needle insertion, and it is formulated as where x 0 , y 0 , and z 0 are the original coordination of the tissue node, for the two-dimensional case, z 0 � 0. m t is the parameter of soft tissue, including its dimension, Young's modulus, Poisson ratio, and areal density. m n is the parameter of needle material, including its Young's modulus and moment of inertia. v is the insertion velocity, and α is the angle of needle tip. For illustrating the validation of FE simulation, 10 markers were embedded inside the phantom, as shown in Figure 5. e errors between the simulation and experiment are calculated as the absolute error, written as in which u Sim and u Exp are the displacements of simulation and experiment, respectively. e tissue nodes in Figure 5 are classified into three types, including the nodes constrained by the needle (nodes 1 and 3), the nodes close to the boundary (nodes 5 and 10), and the nodes far away from the needle (nodes 8 and 9). e errors of ten nodes in Figure 5 are calculated and listed in Table 1. In the table, e x and e y are the mean values of errors between the FE model and experimental results in the x and y directions, respectively. From the table, the errors of the nodes close to the needle are bigger than that of nodes far away from the needle, but the relative errors of the nodes close to the needle are smaller. e maximum value of the mean error between the simulated and experimental results is less than 0.50 mm. e simulation results agree well with the experimental results, and the finite element mode can reflect the interactions between flexible needle and linearelastic soft tissue. e prediction results through the FE model can provide the real-time information of targets and obstacles inside the tissue for the path planning algorithm.

General Insertion
Error. e objective of path planning is to avoid the obstacle and reach the target. e Euclidean distance is employed to describe the error of needle insertion into soft tissue. Figure 6 depicts the distances from needle body to the obstacle and from needle tip to the target.
In this figure, d on (t) is the Euclidean distance between needle body and the obstacle at time t and d gt (t) is the Euclidean distance between needle tip and the target at time t. e distances d on (t) and d gt (t) are formulated as where d on i (t) denotes the distance between flexible needle body and the i th obstacle at time t. x t (t), x g (t) , and x o i (t) are the positions of tip, target, and i th obstacle at time t. d gt (t) can be calculated by Since the turning points on the path can be obtained using the inverse kinematic equation, the interpolation is employed to smooth the needle trajectory S(x n ). e distance d on i is calculated with S(x n ) and x o i (t).
e artificial potential field is used to define the general insertion error as follows [34]: where ε gt is the targeting error and ε on is the obstacle error. ρ i is calculated with d on i and the security distance d 0 , written as Equation (11) creates the attractive field with the target and the repulsive field with the obstacles. κ g and κ o are the factors of attractive and repulsive fields. N o is the number of obstacles in the needle-tissue environment. e general insertion error ε(t) is written as follows: e needle tip can move along the direction that the potential energy is the minimum; meanwhile, the needle body can avoid the obstacles.

Dynamic Path Planning with Inverse Kinematics.
Planning the feasible paths is to solve the inverse kinematics of flexible needles. e initial insertion location needs to be determined considering the reachability. e initial insertion pose can be derived from equation (5) with the targeting pose, which is written as e needle insertion is an inverse procedure, and the reachable zone for the tip can help the surgeon to determine the insertion location when the target is given by the medical images.
e feasible insertion locations can be calculated with the inverse kinematic equation [32]. Considering the anatomical structures around the target, the surgeon can determine an insertion location which can avoid the obstacles as much as possible.   Considering the displacements of the target and obstacles during the procedure of needle insertion, we employ the finite element model to describe the needle-tissue interactions and predict their displacements in real time. e general insertion error is defined with concept of artificial potential field (APF), and the dynamic path planning is converted as an optimal problem of general insertion error.
It is necessary to understand the real-time information of target and obstacles for the dynamic path planning. e needle-tissue procedure is divided into n continuous time sequence, and the corresponding adjusting angle is written as follows: Substituting the adjusting set Φ into the kinematic model, the position of needle tip can be calculated in the time sequence. e proposed real-time FE model is used to calculate the dynamic positions of target and each obstacle in the time sequence t, which is written as e general insertion error ε in the time sequence t can be obtained with the dynamic information of needle tip, target, obstacles, and needle trajectory. Since there exist many or no feasible paths to target with the avoidance of obstacles, an optimal trajectory is the one with a minimal insertion error. e dynamic path planning is converted as an optimal problem, which is written as where ϵ is an allowable small offset. According to the flowchart in Figure 3, the parameters are initialized firstly, including the properties of needle and tissue. e parameters of needle involve needle length L, bevel angle of needle tip α, needle deflection ω, and rotation angle θ. e insertion information is required, including initial insertion location x → t (t 0 ), the target position x → g (t 0 ), and locations of obstacles x o (t 0 ) at t 0 . e security distance between needle and obstacles d 0 , the attractive factor κ g , and repulsive factor κ o should also be initialized. If equation (17) is satisfied, the planned program follows YES or turns to NO path.

Online Rolling Prediction.
In the optimization of feasible paths with equation (17), the information of target and obstacles should be updated in each iterative steps. e dynamic information of target and obstacles is used to calculate the general insertion error in the current iterative step, and the updated information predicted by the FE model is used for the next iterative step. e online rolling method is used to update the prediction information, as shown in Figure 7. e adjusting angle ϕ k−1 in the previous step is the input of the current k th iterative step. ϕ k−1 is substituted into the kinematic equation, and the location of needle tip x t (t k ) at the k step is calculated. e set of adjusting angles Φ k is obtained with the future location of the target x g (t k+1 ) and x t (t k ) based on the inverse kinematics. e future locations of the obstacles x o (t k+1 ) are employed to update the general insertion error ε(t k ). e candidate adjusting angle for the k step is selected by minimizing the general insertion errors. Repeating the above steps, the current adjusting angle ϕ k is the input of next planning step until the needle tip gets to the target. e detail planning process is shown as follows: first, run the FE simulation algorithm to calculate the position of target x g (t 1 ) and the locations of obstacles x o (t 1 ) at time t 1 . According to the initial location of needle tip x t (t 0 ) and x g (t 1 ), the M feasible paths can be calculated with the static path planning algorithm and the candidate set of adjusting angle is Φ 1 � [ϕ 11 , ϕ 12 , . . . , ϕ 1M ]. Choosing the minimal general insertion error is to obtain an optimal adjusting angle ϕ 1 . e specific update procedure of the needle tip is shown in Figure 8.
In the figure, Φ 1 � [ϕ 11 , ϕ 12 , . . . , ϕ 1n t1 ] is the set of adjusting angle, by which the needle tip gets to the position x g (t 1 ) at t 1 . e green curve denotes the feasible trajectories to the new location x t (t 1 ) of needle tip at t 1 , and green sphere denotes the location of needle tip at t 1 . e purple curve denotes the feasible trajectories from x t (t 1 ) to x t (t 2 ) at t 2 , and purple sphere is the location of needle tip at t 2 .
e new location of needle tip x t (t 1 ) is calculated with the planned adjusting angle ϕ 1 . en, the new locations of target x g (t 2 ) and locations x o (t 2 ) are updated with the FE model. e M feasible trajectories from new tip location x t (t 1 ) to next target position x g (t 2 ) are updated with static path planning algorithm. e planned needle is decomposed into n t 2 segments, and the planned set of adjusting angle is calculated as e optimal set of adjusting angle is obtained with equation (17), and the second set of adjusting angle is obtained as ϕ 2 . For the time t i , the candidate set Φ i of adjusting angle is calculated with the tip location x t (t i ) at t i and the target location x g (t i+1 ) at t i+1 , and the adjusting angle is planned with the optimal general insertion error as ϕ i ∈ Φ i . Repeat the above steps, the optimal set adjusting angle and its corresponding set of segment length are written as

Updating the Number of Needle Segment.
In the path planning, the length of needle segment determined the target reachability and obstacle avoidance of needle tip. For the given initial insertion location and target position, the longer needle segment can get to the target with few Mathematical Problems in Engineering rotations, which facilitates the operations of physicians and alleviates patient's suffering. However, the long needle segment cannot construct the complicated trajectories with the obstacle avoidance. erefore, we select the longer segments to generate the feasible paths. If the longer segments fail, we select the shorter segments to generate the feasible paths. For the k th planning step, the planned needle length is written as First, we select n tk 0 as the number of needle segments. If the planned paths can satisfy the general insertion error, the number of needle segments is chosen as n tk � n tk 0 . If not, the number of needle segments is chosen as n tk � n tk j � 2j × n tk 0 through verifying the general insertion error.
Because the needle path is limited to the radius and depth of needle insertion, it is possible to fail to plan the feasible paths. Increasing the number of needle segments infinitely will lead to the endless loop of iterative calculations. erefore, the maximum number of needle segments is set in the algorithm; if the number of needle segments is bigger than 50, the program will stop calculating. For the clinical practice, the surgeons or robot cannot operate too many segments. In the path planning algorithm, the segment's length of initial planning step is bigger than that of later planning step, i.e., l k−1 ≥ l k . At the beginning of path planning algorithm, the initial segment's length is given. e segment's length of previous step l k−1 is selected as the initial value of segment's length for the k middle step. e number of needle segments is dynamic, not static for the path planning algorithm.

Convergence and Error Analysis.
In the optimization of feasible paths, finding the minimum general insertion error is to search the zone with minimum potential energy.
e local minimum of APF may lead to the failure of optimization and reaching the target [12]. For avoiding the local minimum of APF, finite initial values are given to calculate the sets of adjusting angles, in which the optimized path is searched from the finite feasible paths. e finite sets of inverse kinematic solution guarantees the convergence of optimization procedure. Because we do not search the optimized paths in the whole space, the optimized path is locally an optimal solution.
In order to obtain the optimal solution in the whole space, we select the uniformly distributed initial values to generate the feasible paths, as follows: (20) Figure 9 shows an example of feasible paths filling the whole space.
From the figure, the uniformly distributed initial value can generate feasible paths filling the whole space, from which the optimal path is searched to guarantee the global optimization. If more optimal solution is required, the smaller interval Δϕ is needed to generate the finer paths. In the path planning algorithm, we select M � 21 as the number of needle segments, which can search the optimal path with less computation. e proposed algorithm does not include the feedback from the real-time information, which could lead to the error accumulation from the prediction models. According to the kinematics of flexible, the prediction error of needle tip is about ± 0.70 mm. e prediction error of target inside tissue with the finite element model is about ± 1.00 mm. erefore, the needle tip may displace off the moved target, and the error is approximated as ± 1.70 mm. It is inevitable to eliminate the errors originated from the prediction models, so the real-time imaging information should be used for adjusting the paths online.

Experimental Setup.
e experimental setup consists of a CCD camera, a tissue container, a needle clamper, a light source, a needle, two linear actuators, and one rotator, as shown in Figure 10. e linear actuators (the resolution is 0.25 μm) are provided by Physik Instrumente (PI Shanghai) Co. Ltd. e

Kinematics
Inverse kinematics FE model ε (t k ) Figure 7: Iterative scheme of dynamic path generation.

Insertion location
Target x 1 (t 1 ) x g (t n ) x t (t 2 ) ... ...  For investigating and recording the tissue's motion and needle trajectories, the markers are embedded inside the PVA phantom as the target and obstacles, shown in Figure 11.
In this figure, the markers 1-5 denote the obstacles, and the marker 6 denotes the target inside the phantom.
In the figure, the markers 1-5 obstacle and goal locations are shown in Table 2.

Experiment
, and the updated locations of obstacles are Oj n ](j � 1, 2, 3, 4, 5). e turning points are calculated with the inverse and forward kinematics, and the spline curve is used to smooth the planned trajectory. e location of needle tip x t in the time sequence is calculated with the planned adjusting angle. e CCD camera recorded the procedure of needle insertion into the phantom with a frequency of 12 HZ. e insertion time is about 20 s, in which 240-280 photos were stored for analyzing needle trajectory. erefore, the time sequence is taken as t � [t 1 , t 2 , . . . , t 250 ], and the smoothed needle path in the time sequence is obtained as e general insertion error [ε t 1 , ε t 2 , . . . , ε t 250 ] is calculated with the dynamic needle-tissue information in the time sequence t n .
For the insertion procedure with three and four rotations, the needle segments were taken as 33.33 mm and 25.00 mm. e attractive and repulsive factors are taken as κ g � 1 and κ o � 10, and the security distance d 0 � 2.00 mm. e initial insertion location of needle tip lied at x t 0 � [53.00, 0.00, 5.00], which is above the target. With the dynamic path planning algorithm, the planned adjusting angle is Φ 3D � [0.20°, 178.86°, −0.24°] and Φ 4D � [0.00°, 175.70°, −0.18°, 0.12°] for the insertions with three and four rotations, respectively.
In the experiments, the directions of bevel-tip angle were adjusted with the planned Φ 3D and its insertion depths were 34.00 mm, 33.00 mm, and 33.00 mm. With the set of adjusting angle Φ 4D , the insertion depth was 25.00 mm uniformly. e insertion velocity was 5 mm/s.

Experimental Results and Analysis.
In the experiments, the 22G PTC needle bypassed the 2 and 5 obstacles and inserted into the PVA phantom. e CCD camera recorded the insertions with 3 and 4 rotations, shown in Figure 12.
From the figure, the needle was far away from 2 obstacles and approached 5 obstacles.  e obstacles and target moved from their original positions because of the needle-tissue interactions. When the needle base is rotated 3 times, the displacements in X and Y directions are shown in Figure 13.
From the figure, all the obstacles and the target displaces from their original location. e obstacles 1 and 4 (marker 3 is similar to marker 4, and it was not plotted in Figure 13) are away from the needle, and their displacements are smaller. Obstacle 2 has bigger displacement in the Y direction, the maximum is 1.55 mm and has smaller displacement in X direction, and the maximum is 0.07 mm. e maximum of resultant displacement is 1.56 mm, and its final location is [55. 34, 40.91]. e enlarged view shows the displacement of the obstacle 5 and demonstrates the trajectory off its original location [53.60, 70.11]. Obstacle 5 has bigger displacement in the X direction, and the maximum is 0.54 mm. e Y displacement is smaller than obstacle 2, and the maximum is 1. 30  With the planned adjusting angles, the needle base was steered by the actuators to change the direction of bevel-tip's angle. e flexible needle inserts into the PVA phantom, and the experimental trajectory is shown in Figure 15. For illustrating the effectiveness of the planned path, the error ‖ε‖ G between needle tip and target is described as Because obstacles 1, 3, and 4 are far away from the needle, only the errors ‖ε‖ O 2 and ‖ε‖ O 5 of obstacles 2 and 5 are listed in Table 3. e distance between the needle and obstacles is bigger than 1.16 mm, and the distance between needle tip and target is less than 1.20 mm. e planned needle trajectory can avoid the dynamic obstacles and reach the moved target effectively.
From the experimental results, the proposed dynamic path planning algorithm facilitates to avoid obstacles and reaching target and searching the trajectory with the minimal general insertion error. e algorithm accounts for the reachability and steerability of flexible needles, which can be realized with the experiments.

Conclusions and Future Work
In this paper, a novel dynamic path planning algorithm is developed for needle insertion into soft tissue considering the dynamic motions of target and obstacles. e needle-  tissue interaction model is based on a FE model with the modified local constraint method, which can provide real-time feedback for path planner. e forward and inverse kinematics of flexible needles are modeled based on the quasi-static approach and D-H method, in which the needle is steered by rotating the needle base to generate the desired trajectory.  e existence of inverse kinematic solution is investigated to determine the reachability of flexible needle. An iterative approach is developed to generate the feasible path by minimizing the general insertion error defined by artificial potential field. e experimental results showed that the actual paths using proposed algorithm agree well with the simulation results. Future work includes developing a better FE model that can simulate the inhomogeneous and nonlinear tissue properties that are close to the realistic soft tissue. In addition, a robust control strategy will be studied to consider the stability and steering ability of the flexible needle.
Data Availability e needle-tissue interaction simulation data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.

Authors' Contributions
Murong Li and Dedong Gao contributed equally to this work.