Investigation of Guidewire Deformation in Blood Vessels Based on an SQP Algorithm

This paper proposes a solution to the simulated deformation of guidewires when they come in contact with the blood vessel in an interventional surgery simulation training system. Starting from the principle of minimum energy, the guidewire is evenly dispersed into a rigid light bar articulation model. A sequential quadratic programming (SQP) algorithm is used to nonlinearly optimize the deflection angle of each light bar. When the elastic potential energy of the guidewire reaches a minimum, we can get the guidewire deformation we want to solve. The method proposed in this paper avoids necessity of delving into contact deformation caused by the contact force between the guidewire and the blood vessel wall, while solving the problem of the deformation of the guidewire due to the pose of the contact points. We use an ABAQUS (finite element software) simulation to verify that this solution has a theoretical simulation accuracy of 5.11%, and the designed experiments prove that the actual simulation accuracy is about 11%. Moreover, we also simulated the bending stress state of the guidewire by using the deflection angle of each bar. In addition, in order to achieve the most suitable simulation results, we discuss the discrete density of the guidewire model from the perspective of algorithm time consumption and simulation accuracy.


Introduction
Today, minimally invasive interventional surgery is widely used in the treatment of cardiovascular diseases.Guidewire is one of the most important surgical instruments in minimally invasive interventional surgery.In interventional surgery, the operators manipulate and move the guidewire along the blood vessel to the lesion site, and take appropriate treatment for the disease.So, the operation of the guidewire has become an essential skill for surgeons.However, surgeons must undergo a significant amount of training to master the operating skills of interventional surgery, and the risk factor in interventional surgery is very high.In addition, the consequences of incorrect operations are serious and there are few opportunities for surgeons to accumulate experience in practice.
With the development of computer technology and minimally invasive surgery, virtual surgery has played an increasingly important role in the medical field [1].In the 1980s, computer-assisted surgery emerged in Europe and North America and received extensive attention and research.Key to the development of interventional simulation training systems was the first interventional simulation system, the Dawson-Kaufman simulator developed by HT Medical (a medical company) [2].
Appl.Sci.2019, 9, 280 2 of 17 Subsequently, Simbionix and Mentice developed the Angio Mentor system and the VIST system, respectively [3,4].Alderliesten and Duratti also developed their own interventional simulation training prototype systems [5,6].Organizations such as the North American Society of Radiology and the European Society for Cardiovascular Interventional Radiology jointly developed tasks and strategies for simulation training [7].These training systems provided doctors with a virtual surgical training environment to overcome many of the problems in a doctor's traditional learning process.
The simulation of the movement of the guidewire within the blood vessel is a key technique for interventional surgery simulation.Most research has focused on the modeling of the interventional guidewire [8], and proposed a variety of instrument modeling methods based on physics [9], finite elements, and particle systems, etc.At the same time, some scholars studied the kinematics, working spaces, and singularity of surgical instruments, as well as interactive modeling methods for surgical instruments and ventricles [10,11].
A guidewire for interventional surgery and a guidewire used in a virtual training system for interventional surgery are shown in Figure 1.
Appl.Sci.2019, 9, x FOR PEER REVIEW 2 of 16 simulation system, the Dawson-Kaufman simulator developed by HT Medical (a medical company) [2].Subsequently, Simbionix and Mentice developed the Angio Mentor system and the VIST system, respectively [3,4].Alderliesten and Duratti also developed their own interventional simulation training prototype systems [5,6].Organizations such as the North American Society of Radiology and the European Society for Cardiovascular Interventional Radiology jointly developed tasks and strategies for simulation training [7].These training systems provided doctors with a virtual surgical training environment to overcome many of the problems in a doctor's traditional learning process.The simulation of the movement of the guidewire within the blood vessel is a key technique for interventional surgery simulation.Most research has focused on the modeling of the interventional guidewire [8], and proposed a variety of instrument modeling methods based on physics [9], finite elements, and particle systems, etc.At the same time, some scholars studied the kinematics, working spaces, and singularity of surgical instruments, as well as interactive modeling methods for surgical instruments and ventricles [10,11].
A guidewire for interventional surgery and a guidewire used in a virtual training system for interventional surgery are shown in Figure 1.At present, various simulation methods for the deformation of guidewires in virtual interventional surgery have been proposed.Nowinski defined the guidewire as a series of arcs that are smoothly connected to each other, which is based on finite element calculations, dynamically merging, splitting, adding, and removing arcs to simulate the deformation of guidewires [12].To obtain more realistic simulation results, Cotin modeled the guidewire into a series of deformable light beams and applied incomplete constraints to calculate the deformation of the light beam by an incremental finite element method to obtain the deformation of the entire guidewire [13].Luboz modeled the guidewire into a composite spring particle model and introduced additional bending forces to confine the guidewire to the interior of the blood vessel [14].Bergou proposed a discrete geometric model consisting of a series of arbitrary cross-sections and non-deformable thin rods [15], which was applied by Tang to simulate the deformation of guidewires [16].Although there have been many deformation simulation studies on guidewires in interventional procedures, there are still few studies that can achieve high simulation accuracy in a certain calculation time.
This paper proposes a scheme to simulate the deformation of a guidewire in the blood vessel, which can meet high simulation precision under a certain computational cost of algorithm.The main innovation of this method is to avoid the complicated research involved in addressing the matter of force, while solving the issue of the deformation state of the whole guidewire from the energy point of view, according to the pose of the guidewire at the contact point.We assume that the pose of the guidewire at the contact point can be obtained according to the collision detection process in simulation training systems for interventional surgery [17][18][19][20].In this paper, the guidewire is discretized into a rigid light bar articulation model, and a constrained nonlinear programming algorithm is used to solve the position at each point on the guidewire, thereby simulating the deformation of the entire guidewire.In the second part of this paper, we will introduce a physical modeling method for the guidewire, a mathematical model, and the sequential quadratic At present, various simulation methods for the deformation of guidewires in virtual interventional surgery have been proposed.Nowinski defined the guidewire as a series of arcs that are smoothly connected to each other, which is based on finite element calculations, dynamically merging, splitting, adding, and removing arcs to simulate the deformation of guidewires [12].To obtain more realistic simulation results, Cotin modeled the guidewire into a series of deformable light beams and applied incomplete constraints to calculate the deformation of the light beam by an incremental finite element method to obtain the deformation of the entire guidewire [13].Luboz modeled the guidewire into a composite spring particle model and introduced additional bending forces to confine the guidewire to the interior of the blood vessel [14].Bergou proposed a discrete geometric model consisting of a series of arbitrary cross-sections and non-deformable thin rods [15], which was applied by Tang to simulate the deformation of guidewires [16].Although there have been many deformation simulation studies on guidewires in interventional procedures, there are still few studies that can achieve high simulation accuracy in a certain calculation time.
This paper proposes a scheme to simulate the deformation of a guidewire in the blood vessel, which can meet high simulation precision under a certain computational cost of algorithm.The main innovation of this method is to avoid the complicated research involved in addressing the matter of force, while solving the issue of the deformation state of the whole guidewire from the energy point of view, according to the pose of the guidewire at the contact point.We assume that the pose of the guidewire at the contact point can be obtained according to the collision detection process in simulation training systems for interventional surgery [17][18][19][20].In this paper, the guidewire is discretized into a rigid light bar articulation model, and a constrained nonlinear programming algorithm is used to solve the position at each point on the guidewire, thereby simulating the deformation of the entire guidewire.In the second part of this paper, we will introduce a physical modeling method for the guidewire, Appl.Sci.2019, 9, 280 3 of 17 a mathematical model, and the sequential quadratic programming (SQP) algorithm used to create the models.The third part of the paper shows the deformation results of the algorithm simulation, and illustrates the feasibility of our proposed solution from the two aspects of software simulation and experimental design.

Modeling
For a more realistic simulation of the deformation of a guidewire in a blood vessel, proper modeling of the guidewire is very important.Elastic object simulation based on a physical model has always been a key research topic in the field of computer graphics.In the past few decades, simulation methods for one-dimensional, two-dimensional, and three-dimensional elastic objects have been proposed.One-dimensional elastic objects are also called linear elastic objects [21], and the study of their deformation simulation plays a critical role in many important research fields (such as engineering and microbiology).The simulation of one-dimensional elastic objects is often used for the simulation of the deformation of guidewires in a simulation training system for interventional surgery.At present, the simulation algorithms for linear elastic objects are mostly based on Newton's three laws, Hooke's law, Cosserat's elastic theory, and the principle of minimum energy [22].
The guidewire shown in Figure 1 was experimentally measured to have a diameter of 0.78 mm, a Young's modulus of 3.56 GPa, and a moment of inertia of 1.816 × 10 −14 m 4 .In this paper, the guidewire is regarded as a rigid light rod articulated model, and the guidewire is divided into n-section incompressible and inflexible equal-length light rods articulated to each other, and the adjacent light rods can only be relatively deflected at the joint node.As is shown in Figure 2, a plane rectangular coordinate system is established with the starting contact point A as the origin, and B as the end contact point.Of course, there may be other points that are in contact with the vessel wall between A and B. ∆θ represents the relative deflection angle between two adjacent light rods, and θ represents the deflection angle of one light rod.
Appl.Sci.2019, 9, x FOR PEER REVIEW 3 of 16 programming (SQP) algorithm used to create the models.The third part of the paper shows the deformation results of the algorithm simulation, and illustrates the feasibility of our proposed solution from the two aspects of software simulation and experimental design.

Modeling
For a more realistic simulation of the deformation of a guidewire in a blood vessel, proper modeling of the guidewire is very important.Elastic object simulation based on a physical model has always been a key research topic in the field of computer graphics.In the past few decades, simulation methods for one-dimensional, two-dimensional, and three-dimensional elastic objects have been proposed.One-dimensional elastic objects are also called linear elastic objects [21], and the study of their deformation simulation plays a critical role in many important research fields (such as engineering and microbiology).The simulation of one-dimensional elastic objects is often used for the simulation of the deformation of guidewires in a simulation training system for interventional surgery.At present, the simulation algorithms for linear elastic objects are mostly based on Newton's three laws, Hooke's law, Cosserat's elastic theory, and the principle of minimum energy [22].
The guidewire shown in Figure 1 was experimentally measured to have a diameter of 0.78 mm, a Young's modulus of 3.56 GPa, and a moment of inertia of 1.816 × 10 −14 m 4 .In this paper, the guidewire is regarded as a rigid light rod articulated model, and the guidewire is divided into n-section incompressible and inflexible equal-length light rods articulated to each other, and the adjacent light rods can only be relatively deflected at the joint node.As is shown in Figure 2, a plane rectangular coordinate system is established with the starting contact point A as the origin, and B as the end contact point.Of course, there may be other points that are in contact with the vessel wall between A and B. ∆θ represents the relative deflection angle between two adjacent light rods, and θ represents the deflection angle of one light rod.In this paper, the deformation of the guidewire in the blood vessel is studied according to the principle of minimum energy.The advancement of the guidewire in the blood vessel can be seen as a quasi-static process.Therefore, taking the guidewire as the research object, in order to minimize the elastic potential energy of the guidewire, all the light rods between the contact points of the guidewire need to constantly adjust their pose to optimal states.We will construct a mathematical model based on the principle of minimum energy below, and use a sequential quadratic programming (SQP) algorithm to solve the mathematical model, and transform the deformation problem of the guidewire into a nonlinear programming problem under multi-constraint conditions.In this paper, the deformation of the guidewire in the blood vessel is studied according to the principle of minimum energy.The advancement of the guidewire in the blood vessel can be seen as a quasi-static process.Therefore, taking the guidewire as the research object, in order to minimize the elastic potential energy of the guidewire, all the light rods between the contact points of the guidewire need to constantly adjust their pose to optimal states.We will construct a mathematical model based on the principle of minimum energy below, and use a sequential quadratic programming (SQP) algorithm to solve the mathematical model, and transform the deformation problem of the guidewire into a nonlinear programming problem under multi-constraint conditions.

SQP Algorithm
Sequential quadratic programming (SQP) is currently recognized as one of the best algorithms for dealing with medium-and small-scale nonlinear programming problems [23][24][25].The algorithm obtains the optimal solution of the original problem by simplifying the original problem into a series of quadratic programming subproblems.If the optimal solution can be obtained, it is considered to be the optimal solution of the original nonlinear programming problem.Otherwise, it takes a quadratic approximation to the Lagrangian function, and the approximate solution is used to replace the new quadratic programming problem, and the iteration is continued.In addition, it can also be used for optimization problems with strong nonlinearity [26,27].
A typical nonlinear programming problem has the form shown in Equations ( 1) and ( 2).
Objective function is and constraint condition is where x is the design parameter vector, f(x) is the scalar form.G(x) is a constraint function vector, which can be an equality constraint or an inequality constraint.
The SQP algorithm solves the QP (Quadratic Program) subproblem after taking the quadratic approximation of the Lagrangian function in Equation (3).
where λ is the Lagrangian factor.The QP subproblem expressed as per Equations ( 4) and ( 5) can be obtained by linearizing nonlinear constraints.
and the constraint function is where d is the full variable search direction, ∇ is the gradient, and matrix H is the positive definite quasi-Newton approximation of the Hessian matrix of the Lagrangian function, which is calculated by the BFGS method.And Equation (4) can be solved by any QP algorithm.The implementation of the SQP algorithm used in this paper mainly includes the following three steps: • Updating the Hessian matrix H of the Lagrange function according to Equation ( 6) where • Solving the quadratic programming problem For each main iteration of the SQP algorithm, we need to solve a QP subproblem as shown in the following Equations ( 9) and (10).
The objective function is : min q(x) and the constraints are : where w i is the i-th row of matrix w ∈ R m×n .The solution process can be divided into two steps: first, calculate the feasible point of the solution, secondly, generate an iterative sequence of feasible points, and the sequence converges to the solution of the problem.
• One-dimensional search and calculation of the objective function After solving the QP subproblem, we get a vector from which a new iteration of the following Equation ( 11) can be obtained.
where d k denotes a vector from x k pointing to x k+1 , and the scalar step parameter ∂ k is determined by a suitable linear search process.Each value of ∂ k must ensure that the Equation ( 12) has a sufficient amount of reduction. where 2.3.Solving of Deformation of the Guidewire

Elastic Potential of the Guidewire
In the plane rectangular coordinate system shown in Figure 2, we specify that if a light rod is deflected clockwise relative to the upper rod, the relative deflection angle is negative, such as ∆θ B .On the contrary, if counterclockwise, the relative deflection angle is positive, such as ∆θ V .The relative deflection angle (∆θ) can be used as a measure of the elastic potential energy (e) of two adjacent light rods, which can be expressed by Equation (14) as: where ε is a constant coefficient, E is the Young's modulus of the guidewire, and I is the moment of inertia.Therefore, the sum of the elastic potentials (E gu ) of the guidewire is:

Constraints
During the advancement of the guidewire in the blood vessel, there are two constraints at the contact points, namely the positional constraint and deflection angle constraint.Assuming that the H-th light rod is in contact with the vessel wall, the coordinate of the contact point is (a,b), and the deflection angle of the light rod at the contact point is θ H . θ H can be Hexpressed by Equation (16), which is the sum of the relative deflection angles of all the light rods between A and H.
The linear equality constraint function constructed from the deflection angle of the contact point is: where w 1 is a strictly n-order lower triangular matrix, and x is the design vector of the algorithm.They can be expressed as: When the guidewire advances in the blood vessel, if the H-th light rod is in contact with the blood vessel wall, the H-th row of w 1 is retained, other elements are discarded, and θ H of b 1 is retained accordingly.

• Relative deflection angle constraints
In order to ensure that the curve of the guidewire deformation simulation is smooth and continuous, the magnitude of relative deflection angle is constrained by the linear inequality constraint function (19).
where w 2 is an n-order unit diagonal matrix.The value of b 2 is related to n.The larger n is, the smaller b 2 is.

• Position constraints
Assuming that the horizontal displacement of the H-th light rod is x i , and the vertical displacement is y i , we can obtain: So the position constraint function of contact point is: where L indicates the length of the guidewire.

Bending Stress of Guidewire
The relative deflection angle ∆θ between two adjacent light rods can also be used as a measure of the bending stress (σ b ) between two adjacent light rods, and the relationship between the two is as follows: where k is the proportionality constant.In this paper, we only discuss the relative magnitude of the stress to show the stress state at each point on the guidewire, not the actual magnitude.

Summary of the Proposed Method
In order to understand the idea of the solution proposed in this paper more intuitively, we simplified the second part of the paper in Figure 3, below.
Appl.Sci.2019, 9, x FOR PEER REVIEW 7 of 16 In order to understand the idea of the solution proposed in this paper more intuitively, we simplified the second part of the paper in Figure 3, below.According to the principle of minimum energy, when the objective function takes the minimum value, we get the deformation of the guidewire.

Figure 3.
Flow chart of the proposed method.

Deformation by SQP Algorithm
According to the SQP algorithm introduced in the second part of paper, we designed a program to realize the contact deformation of the guidewire.Now, we will show the results from three perspectives.

• Two-point contact
There are only two contact points between the guidewire and the vessel wall.Table 1 shows the information about the contact points.

Deformation by SQP Algorithm
According to the SQP algorithm introduced in the second part of paper, we designed a program to realize the contact deformation of the guidewire.Now, we will show the results from three perspectives.

• Two-point contact
There are only two contact points between the guidewire and the vessel wall.Table 1 shows the information about the contact points.

• Three-point contact
There are only three contact points between the guidewire and the vessel wall.Table 2 shows the information on the contact points.

• Three-point contact
There are only three contact points between the guidewire and the vessel wall.Table 2 shows the information on the contact points.

• Multipoint contact
When the guidewire moves from the origin and goes forward along the x-axis to contact the unilateral vessel wall, there are many touch points on the guidewire.Figure 6 shows the deformation simulation results of the guidewire in two contact situations.The equation for an oblique vessel wall in Figure 6a is y = 1.5x−30, and its position constraint function can be expressed

• Multipoint contact
When the guidewire moves from the origin and goes forward along the x-axis to contact the unilateral vessel wall, there are many touch points on the guidewire.Figure 6 shows the deformation simulation results of the guidewire in two contact situations.The equation for an oblique vessel wall in Figure 6a is y = 1.5x−30, and its position constraint function can be expressed by Equation (23).The equation for a vertical vessel wall in Figure 6b is x = 45, and its position constraint function can be expressed by Equation (24).

Deformation by ABAQUS Simulation
ABAQUS is widely considered to be a powerful finite element software with a library of various types of material models.Here, ABAQUS is used to simulate the deformation of the guidewire for the two-point contact situation seen in Figure 4.The simulation parameters of the guidewire in ABAQUS are shown in Table 3.

Deformation by ABAQUS Simulation
ABAQUS is widely considered to be a powerful finite element software with a library of various types of material models.Here, ABAQUS is used to simulate the deformation of the guidewire for the two-point contact situation seen in Figure 4.The simulation parameters of the guidewire in ABAQUS are shown in Table 3.Then, we compare the results of the ABAQUS simulation with the results of the SQP algorithm to obtain Figure 8.Then, we compare the results of the ABAQUS simulation with the results of the SQP algorithm to obtain Figure 8.If (hi, qi) represents the coordinates of each point on the deformation curve obtained by the SQP algorithm, and (Fi, Qi) represents the coordinates of the corresponding point obtained by the ABAQUS simulation.Hence, the plane distance between the two results can be expressed by Equation (25), which is the error between the results of SQP algorithm and the result of ABAQUS simulation.

( ) ( )
In Equation ( 25), the smaller the zi, the closer the deformation result calculated by the SQP algorithm and the result of ABAQUS simulation are, that is to say, the better the simulation accuracy of the solution proposed in this paper is. Figure 9a shows the calculation error of each point of the guidewire at different θB if there are only two touch points.We can calculate that the average position error of all the guidewires is 0.2556 mm.We know that the average diameter of blood vessels is about 5 mm in interventional procedures.Therefore, the calculation accuracy (ρ) of the deformation simulation based on the SQP algorithm can be given by Equation ( 26), and we can better understand that from Figure 9b.The simulation accuracy can be used in an interventional training system to accurately reflect the deformation process of a guidewire in a blood vessel, and If (h i , q i ) represents the coordinates of each point on the deformation curve obtained by the SQP algorithm, and (F i , Q i ) represents the coordinates of the corresponding point obtained by the ABAQUS simulation.Hence, the plane distance between the two results can be expressed by Equation (25), which is the error between the results of SQP algorithm and the result of ABAQUS simulation.
In Equation ( 25), the smaller the z i , the closer the deformation result calculated by the SQP algorithm and the result of ABAQUS simulation are, that is to say, the better the simulation accuracy of the solution proposed in this paper is. Figure 9a shows the calculation error of each point of the guidewire at different θ B if there are only two touch points.We can calculate that the average position error of all the guidewires is 0.2556 mm.We know that the average diameter of blood vessels is about 5 mm in interventional procedures.Therefore, the calculation accuracy (ρ) of the deformation simulation based on the SQP algorithm can be given by Equation ( 26), and we can better understand that from Figure 9b.The simulation accuracy can be used in an interventional training system to accurately reflect the deformation process of a guidewire in a blood vessel, and meet the requirements of the system for authentic simulation.
In Equation ( 25), the smaller the zi, the closer the deformation result calculated by the SQP algorithm and the result of ABAQUS simulation are, that is to say, the better the simulation accuracy of the solution proposed in this paper is. Figure 9a shows the calculation error of each point of the guidewire at different θB if there are only two touch points.We can calculate that the average position error of all the guidewires is 0.2556 mm.We know that the average diameter of blood vessels is about 5 mm in interventional procedures.Therefore, the calculation accuracy (ρ) of the deformation simulation based on the SQP algorithm can be given by Equation ( 26), and we can better understand that from Figure 9b.The simulation accuracy can be used in an interventional training system to accurately reflect the deformation process of a guidewire in a blood vessel, and meet the requirements of the system for authentic simulation.

Discrete Density (n/L)
From the above analysis, we found that the calculation error ρ and the time cost (t) of the algorithm depend on the discrete density (n/L) of the guidewire.The smaller discrete density will lead the deformation curve to have a sawtooth effect, and a larger discrete density increases the time consumption of the algorithm.A suitable value of n/L can help to obtain reliable simulation results in real-time in a simulation training system for interventional surgery.
Taking θ B = π/4 as an example, when other variables are fixed, Figure 10 shows the curve of the computational cost of the SQP algorithm for different values of discrete density.

Discrete Density (n/L)
From the above analysis, we found that the calculation error ρ and the time cost (t) of the algorithm depend on the discrete density (n/L) of the guidewire.The smaller discrete density will lead the deformation curve to have a sawtooth effect, and a larger discrete density increases the time consumption of the algorithm.A suitable value of n/L can help to obtain reliable simulation results in real-time in a simulation training system for interventional surgery.
Taking θB = π/4 as an example, when other variables are fixed, Figure 10 shows the curve of the computational cost of the SQP algorithm for different values of discrete density.The horizontal axis of the curve in Figure 10 represents the discrete density of the guidewire, and the vertical axis represents the computational cost of the algorithm.When contact conditions change, the curve of the above graph changes little.The curve can be divided into three regions according to different discrete densities.As for curve 1, although the algorithm takes less time, the deformation curve of guidewire is not smooth, due to the small n/L, so the deformation simulation The horizontal axis of the curve in Figure 10 represents the discrete density of the guidewire, and the vertical axis represents the computational cost of the algorithm.When contact conditions change, the curve of the above graph changes little.The curve can be divided into three regions according to different discrete densities.As for curve 1, although the algorithm takes less time, the deformation curve of guidewire is not smooth, due to the small n/L, so the deformation simulation of the guidewire loses its authenticity.As for curve 3, although the simulation effect of the guidewire is very good, the algorithm takes a long time and affects the information feedback speed of the training system, so curve 3 is also not acceptable.In general, it is reasonable to use curve 2. The position of the red dot in Figure 10 is the value taken in the above analysis and calculation process.

Experiments
The experimental platform is shown in Figure 11.A simple blood vessel model is made in SolidWorks and printed with a 3D printer.The orange objects in the picture, with width of 1.5 mm and thickness of 0.8 mm, correspond to our sample vessel wall.The vessel wall is affixed to the surface of a transparent acrylic sheet with scale paper, and another acrylic sheet is affixed over the vessel wall.When the guidewire advances inside the blood vessel, the position of the contact point of the guidewire with the blood vessel wall and the deflection angle can be obtained from the scale paper.In order to obtain the length of the guidewire from the contact point to the entrance of the blood vessel (O), the position of the contact point can be marked on the guidewire with a highlighter, and after the guidewire is taken out, the corresponding length is measured with a scale.If the contact between the guidewire and the vessel wall is in line contact, it is not necessary to constrain each point on the contact line, but only a few special points with large differences in curvature are needed, which can reduce the computational cost of the algorithm, while also ensuring the accuracy of the simulation.If the contact between the guidewire and the vessel wall is in line contact, it is not necessary to constrain each point on the contact line, but only a few special points with large differences in curvature are needed, which can reduce the computational cost of the algorithm, while also ensuring the accuracy of the simulation.
For position I and position II, three contact points are taken as constraints of the algorithm.Tables 4 and 5 present the contact information of the guidewire at the contact points in position I and position II, respectively, including the coordinates of the contact point, the deflection angle of the guidewire, the length (L) between different contact points, and the length (lin) of the guidewire that has been put into the blood vessel.For position I and position II, three contact points are taken as constraints of the algorithm.Tables 4 and 5 present the contact information of the guidewire at the contact points in position I and position II, respectively, including the coordinates of the contact point, the deflection angle of the guidewire, the length (L) between different contact points, and the length (l in ) of the guidewire that has been put into the blood vessel.We can get the deformation simulation results of guidewire with the SQP algorithm according to the contact information, as shown in Figure 13a We can get the deformation simulation results of guidewire with the SQP algorithm according to the contact information, as shown in Figures 13a,b  In the experiment, the guidewire inside the blood vessel was marked with a highlighter every 5 mm, and the coordinates on the scale paper were recorded, then compared twith the coordinates of the corresponding points obtained by the algorithm.As is shown in Figure 14, we use z to represent the distance between the two coordinates of the same point, which is the error between the algorithm simulation and the real experiment.In the experiment, the guidewire inside the blood vessel was marked with a highlighter every 5 mm, and the coordinates on the scale paper were recorded, then compared twith the coordinates of the corresponding points obtained by the algorithm.As is shown in Figure 14, we use z to represent the distance between the two coordinates of the same point, which is the error between the algorithm simulation and the real experiment.We can get the deformation simulation results of guidewire with the SQP algorithm according to the contact information, as shown in Figures 13a,b  In the experiment, the guidewire inside the blood vessel was marked with a highlighter every 5 mm, and the coordinates on the scale paper were recorded, then compared twith the coordinates of the corresponding points obtained by the algorithm.As is shown in Figure 14, we use z to represent the distance between the two coordinates of the same point, which is the error between the algorithm simulation and the real experiment.(28)

Discussion
This study aimed to provide a solution for the deformation of a guidewire within the blood vessel in an interventional surgical training system.In this paper, based on the principle of minimum energy, the guidewire was regarded as a rigid light rod articulated model.An SQP algorithm was used to nonlinearly plan the relative deflection angles of all the light rods between the contact points, in order to obtain the deformation state of the guidewire.We verified the feasibility of this solution from two perspectives.Firstly, by comparing the results of an ABAQUS software simulation and the algorithm calculation, which yielded a calculation accuracy of about 5%.Secondly, the calculation accuracy was proven to be about 11% through design experiments.This accuracy can fully meet the requirements of a virtual training system for authentic simulation.Moreover, we proposed a method for expressing the relative magnitude of the stress at each point on the guidewire.By comparing the color map on the guidewire in Figures 4 and 7, it was shown that this representation is effective and feasible.
As long as information on the location of contact is provided, the solution presented herein can more realistically simulate the deformation of a guidewire in any type of contact with any shape of blood vessel.Moreover, we believe that in order not to increase the computational cost of the algorithm, it is possible to treat a multi-point contact on a straight line or a line contact with little curvature change as a point contact.As for line contacts with large curvature changes, we can replace all other contact points with several points with large curvature changes.This processing not only can greatly reduce the number of constraints and computational costs of the algorithm, but also has an effect on the simulation accuracy of the deformation within an acceptable range.
In addition, we discussed the effect of the discrete density of the guidewire model on computational cost and simulation accuracy of the algorithm.Under the premise of higher algorithm simulation accuracy, the discrete density corresponding to the shorter algorithm time was selected.We have proven that the discrete density was more suitable around a value of 1, and the algorithm takes less than 0.2 s.
Of course, we believe that there is a more reasonable way to deal with discrete density.The discrete density used in the algorithm is constant.If the curvature of a portion of a guidewire is very small, it can also achieve high simulation accuracy at a small discrete density.Therefore, if the discrete density of each part of the guidewire is determined by the curvature, the number of design vectors of the algorithm will be reduced, and the calculation amount and calculation time of the algorithm will be lower, correspondingly.Therefore, we will explore the relationship between the discrete density and curvature of the guidewire in future work.

Figure 2 .
Figure 2. The discrete model of the guidewire.

Figure 2 .
Figure 2. The discrete model of the guidewire.

Table 1 .Figure 4
Figure 4 shows the deformation of the guidewire when θB is equal to −π/2, −π/4, 0, π/4, π/2, and the color bar in the figure indicates the relative deflection angle (∆θ), which we use to indicate the relative magnitude of the bending stress at each point on the guidewire, rather than the actual size.

Figure 3 .
Figure 3. Flow chart of the proposed method.

Figure 4 Figure 4
Figure 4 shows the deformation of the guidewire when θ B is equal to −π/2, −π/4, 0, π/4, π/2, and the color bar in the figure indicates the relative deflection angle (∆θ), which we use to indicate the relative magnitude of the bending stress at each point on the guidewire, rather than the actual size.

Figure 4 .
Figure 4. Optimized deformed shape of the two-point contact guidewire for different values of θ B .

Figure 4 .
Figure 4. Optimized deformed shape of the two-point contact guidewire for different values of θB.

Figure 5 .
Figure 5. Optimized deformed shape of the three-point contact guidewire for different values of θC.

Figure 5 .
Figure 5. Optimized deformed shape of the three-point contact guidewire for different values of θ C .

Figure 6 .
Figure 6.Optimized guidewire shapes for different contact conditions.(a) The equation for an oblique vessel wall is y = 1.5x − 30; (b) The equation for a vertical vessel wall is x = 45.

Figure 6 .
Figure 6.Optimized guidewire shapes for different contact conditions.(a) The equation for an oblique vessel wall is y = 1.5x − 30; (b) The equation for a vertical vessel wall is x = 45.

16 Figure 8 .
Figure 8.Comparison of the deformed shape of the two point-contact guidewire computed via sequential quadratic programming (SQP) optimization or by ABAQUS.

Figure 8 .
Figure 8.Comparison of the optimized deformed shape of the two point-contact guidewire computed via sequential quadratic programming (SQP) optimization or by ABAQUS.

Figure 9 .
Figure 9. (a) Calculation error for the two point-contact guidewire; (b) Physical meaning of calculation error.

Figure 9 .
Figure 9. (a) Calculation error for the two point-contact guidewire; (b) Physical meaning of calculation error.

Figure 10 .
Figure 10.Relationship between time cost (t) and discrete density (n/L).

Figure 10 .
Figure 10.Relationship between time cost (t) and discrete density (n/L).

Figure 11 .
Figure 11.The experimental platform.If the guidewire enters the blood vessel from the entrance at the origin, Figure 12a,b show two positions during the advancement of the guidewire, known as position I and position II, respectively.If the contact between the guidewire and the vessel wall is in line contact, it is not necessary to constrain each point on the contact line, but only a few special points with large differences in curvature are needed, which can reduce the computational cost of the algorithm, while also ensuring the accuracy of the simulation.

12 .
Two positions during the advancement of the guidewire: (a) Position I; (b) Position II. .

Figure 13 .
Figure 13.Deformed guidewire shape optimized via SQP in two positions: (a) Position I; (b) Position II.

Figure 13 .
Figure 13.Deformed guidewire shape optimized via SQP in two positions: (a) Position I; (b) Position II.

Figure 14 .
Figure 14.Position errors on SQP optimized guidewire shape.Figure 14.Position errors on SQP optimized guidewire shape.Equation (27) shows the average value of the algorithm error corresponding to position I and position II, respectively.z avg_I ≈ 0.513 mm, z avg_I I ≈ 0.578 mm.(27)Therefore, the deformation simulation accuracy of the guidewires in these two positions is:

Table 1 .
Input data for the two-point contact guidewire deformation problem.

Table 3 .
Input data for the ABAQUS simulation of the two-point contact guidewire problem.

Table 3 .
Input data for the ABAQUS simulation of the two-point contact guidewire problem.

Table 4 .
Contact information about position I.

Table 4 .
Contact information about position I.

Table 5 .
Contact information about position II.