RELATED APPLICATION

The present application claims the benefit of U.S. Provisional Patent Application No. 61/113,534 filed Nov. 11, 2008 entitled “Method for Robotic Endoscope Path Definition and Following During Insertion and Retraction,” naming as inventors, Caitlin Donhowe, Jun Zhang, Kristoffer Donhowe, Eric Storne, Thomas Yorkey, Kenneth R. Krieg, and Amir Belson, the entirety of which is hereby incorporated by reference.
BACKGROUND

1. Field of Invention

Aspects of this invention are related to medical device path planning, and more particularly are related to path planning for an articulatable multisegment medical device.

2. Related Art

An endoscope is a medical device for visualizing the interior of a patient's body. Endoscopes have been used for a variety of medical diagnostic procedures and for a variety of medical interventional procedures.

Many different types of endoscopes are known. For example, one steerable endoscope has an elongated body with a steerable distal portion and an automatically controlled proximal portion. Such an endoscope is described in U.S. Pat. No. 6,468,203 B2, entitled “Steerable Endoscope and Improved Method of Insertion,” of Amir Belson issued on Oct.22, 2002, which is incorporated herein by reference in its entirety.

In general, conventional medical device pathplanning is performed using medical imaging data usually CAT, Xray, MRI, PET of fluoroscopy imaging data. Pathplanning is considered in U.S. Pat. No. 5,611,025, entitled “Virtual internal cavity inspection system,” issued Mar. 11, 1997; U.S. Pat. No. 7,167,180, entitled “Automatic path planning system and method,” issued Jan. 23,2007; U.S. Pat. No. 6,380,958, entitled “Medicaltechnical System,” issued Apr. 30, 2002; U.S. Patent Application Publication No. US 2008/0091340 A1 (filed Dec. 26, 2004, disclosing “Targeted Marching”); and U.S. Patent Application Publication No. US 2003/0109780 A1 (filed Jun. 6, 2002, disclosing “Methods and Apparatus for Surgical Planning”).
SUMMARY

Unlike prior art methods that required path planning prior to use of a steerable medical device, waypoints of a steerable medical device are stored as the device is moved within a patient. The stored waypoints are an ordered sequence of locations. The ordered sequence of locations defines a safe path within the patient for moving an articulatable portion of the steerable medical device.

Thus, the articulatable portion of the steerable medical device is constrained to follow the safe path as the articulatable portion moves within the patient or as the device is inserted into the patient. In one aspect, the articulatable portion of the steerable medical device is constrained to remain within a boundary region enclosing the safe path.

In one embodiment, the articulatable portion of the steerable medical device includes a segment of the steerable medical device. The segment, in turn, includes a plurality of links.

In another aspect, the boundary region is a tube having a crosssection. Examples of crosssections include, but are not limited to, a circular crosssection, an oblate crosssection, and a rectangular cross crosssection.

In still yet another aspect, constraining the articulatable portion of the steerable medical device to remain within a boundary region enclosing the safe path includes generating position and orientation data for each of the plurality of segments. This process uses the ordered sequence of locations and a kinematic model of the plurality of segments of the steerable medical device.

The process of generating position and orientation data for each of the plurality of segments includes minimizing a cost function. In one aspect, minimizing a cost function further includes minimizing the sum of the absolute values of relative joint angles, with an additional constraint that link positions must remain within some distance Δ of the safe path formed by the waypoints.

An apparatus includes a steerable medical device having an articulatable portion. The articulatable portion includes at least one articulatable segment. The apparatus also includes a controller, coupled to the steerable medical device. The controller includes a processor, and a medical device controller coupled to the processor and to the steerable medical device. The processor stores in the memory an ordered sequence of locations of waypoints. The processor also analyzes the ordered sequence of locations and outputs to the medical device controller at lease one command to constrain the articulatable portion within a boundary region enclosing a safe path defined by the ordered sequence of location.
BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagrammatic view of a steerable medical device including an articulatable portion, and a safe path.

FIG. 2 is a diagrammatic view of an apparatus used in one aspect of the processes and operations described herein.

FIGS. 3A to 3C are diagrammatic views of boundary regions enclosing a safe path.

FIG. 4 is a process flow diagram for one embodiment of a method of configuring a steerable medical device to follow a safe path.

FIG. 5 is a diagrammatic view of elements of a kinematic model that can be used in the method of FIG. 4.

In the drawings, the first digit of a figure number indicates the figure in which the element with that figure number first appeared.
DETAILED DESCRIPTION

In one aspect, a steerable medical device 100 (FIG. 1), sometimes referred to as medical device 100, includes a plurality of segments 1011, 1012, 1013 . . . In the embodiment of FIG. 1, at least three segments 1011, 1012, 1013 include a plurality of movable links 1021, 1022 and 1023, respectively. In one aspect, a tip of steerable medical device 100 is at distal end 120 and typically includes at least a camera.

The use of a steerable medical device with at least three segments each having a plurality of movable links is illustrative only and in not intended to be limiting. In view of this disclosure, a steerable medical device may include from at least one segment having a plurality of links to a number of segments with movable links needed to provide the required functionality for the steerable medical device.

An example of a steerable medical device 100 is a steerable endoscope. In the following description, steerable medical device 100 is referred to as steerable endoscope 100. The use of steerable endoscope 100 as an example of a steerable medical device is illustrative only and is not intended to be limiting to this specific steerable medical device.

The plurality of movable links in a segment allows that segment to be articulated as steerable endoscope 100 moves into and out of a patient. Thus, such segments are referred to as articulatable segments.

In one aspect, an operator manipulates a direction controller 245 (FIG. 2) to move the tip of steerable endoscope 100 in a particular direction within the patient. In response to commands from a processor in processor module 250, as described more completely below, and a signal from direction controller 245, an endoscope controller 240 (FIG. 2) for steerable endoscope 100 configures each of the links so that each segment is constrained to move along, e.g., to follow, a known safe path 150 (FIG. 1) that is defined, in one aspect, by movement of the tip of endoscope 100.

In one embodiment, as the operator steers the tip of steerable endoscope 100 through the patient, a safe path is generated. More specifically, as the operator inserts steerable endoscope 100 into a patient and moves steerable endoscope 100 towards a desired location, an ordered sequence of locations {P_{k}, P_{k+1}, P_{k+2}, P_{k+3}, P_{k+4}} (FIG. 1) of the tip of endoscope 100 are recorded in a memory 230 (FIG. 2) as waypoint data 231, in this example.

The ordered sequence of locations {P_{k}, P_{k+1}, P_{k+2}, P_{k+3}, P_{k+4}} (FIG. 1) represent the motion of the tip of steerable endoscope 100 through the patient. Thus, the ordered sequence of locations {P_{k}, P_{k+1}, P_{k+2}, P_{k+3}, P_{k+4}} represent a safe path 150, which has been chosen by the operator, for steerable endoscope 100 to follow as steerable endoscope 100 is inserted into and withdrawn from the patient.

Using the tip movement to generate an ordered sequence of locations that define safe path 150 is illustrative only and is not intended to be limiting. Alternatively, steerable endoscope 100 could be inserted in a passive state, and then all the inserted articulatable segments activated at one. The positions of the links in the articulatable segments at the time of activation provide an ordered sequence of locations that define safe path 150 for additional insertion and for retraction of steerable endoscope 100.

In one aspect, as described more completely below, all trailing segments 1011, 1012, 10103 . . . of steerable endoscope 100 are constrained to follow safe path 150 that is defined by ordered sequence of locations {P_{k}, P_{k+1}, P_{k+2}, P_{k+3}, P_{k+4}}. However, trailing segments 1011, 1012, 10103 . . . may not follow safe path 150 exactly. In one aspect, the operator can define a boundary region around safe path 150. The boundary region (See FIGS. 3A to 3C) is a volume inside which steerable endoscope 100 can move safely. In one aspect, all trailing segments 1011, 1012, 10103 . . . are constrained to remain within this boundary region as steerable endoscope 100 moves into the patient.

Also, in another aspect, as medical device 100 is withdrawn from the patient, articulatable segments 1011, 1012, 10103 . . . are constrained to remain within this boundary region. Hence, unlike prior art techniques that required advance planning, a safe route for medical device 100 into and out of a patient is generated based on waypoint data 231 recorded as steerable endoscope 100 moves into the patient.

When segment 1011 is considered a trailing segment, as just described, segment 1011 is controlled in the same way as the other trailing articulatable segments. However, in another insertion mode, segment 1011 remains directly controlled by the operator and does not change shape with insertion. In this insertion mode, segment 1011 would not be considered a trailing segment.

FIGS. 3A to 3C are illustrations of boundary regions 310A to 310C, with different crosssectional shapes, for safe path 150 defined by ordered sequence of locations {P_{k}, P_{k+1}, P_{k+2}, P_{k+3}, P_{k+4}}. In FIG. 3A, boundary region 310A has a circular crosssection. In FIG. 3B, boundary region 310B has an oblate crosssection. In FIG. 3C, boundary region 310C has a rectangular crosssection, and in particular, a specific instance of a rectangular crosssection, a square crosssection.

In one aspect, each location P_{k }is a point in space (x_{k}, y_{k}, z_{k}) relative to a fixed reference frame. Thus, each of boundary regions 310A, 310B, 310C defines a threedimensional volume enclosing safe path 150. This volume is referred to as a tube having a cross section to convey the threedimensional characteristics of the volume. Tube, as used here, is not a physical tube inserted in the patient to define the volume.

The particular crosssectional shapes of the boundary regions illustrated in FIGS. 3A to 3C are illustrative only and are not intended to be limiting. In view of this disclosure, for a particular medical procedure and steerable medical device, an appropriately shaped boundary region or regions can be selected.

It is not necessary that the boundary region have the same crosssectional shape over the entire extent of the safe path. For example, a first portion of a boundary region could have a first crosssectional shape, and a second portion of the boundary region could have a second crosssectional shape that is different from the first crosssectional shape.

FIG. 4 is a process flow diagram for one embodiment of a method 400 used with a steerable medical device such as steerable endoscope 100. In one aspect, instructions in a METHOD 400 module 232 (FIG. 2) in memory 230 are executed on a processor in processor module 250 to perform at least some of the operations described more completely below.

In method 400, STORE WAYPOINTS operation 420, as described more completely below, saves waypoints of the tip of steerable endoscope 100 as an ordered sequence of locations. The ordered sequence of locations represents the trajectory of the tip as steerable endoscope 100 is inserted into the patient. As described above, the ordered sequence of locations defines a safe path 150 that has been selected by the operator of steerable endoscope 100.

The stored ordered sequence of locations is retrieved and analyzed in FOLLOW SAFE PATH process 430. FOLLOW SAFE PATH process 430 configures the articulatable portion of endoscope 100 so that the articulatable portion of endoscope 100 is constrained to follow safe path 150 as the articulatable portion moves within the patient. Herein, following the safe path does not mean that the safe path is followed exactly, but rather that the articulatable portion steerable endoscope 100 stays at least within a safe region, sometimes called a boundary region, about safe path 150.

In FIG. 4, one embodiment of STORE WAYPOINTS operation 420 and FOLLOW SAFE PATH process 430 are illustrated and described more completely below. This embodiment is illustrative only and is not intended to be limiting to the specific operations and processes described. In view of this disclosure, one knowledgeable in the field can utilize other techniques to move the articulatable portion of a steerable medical into and out of a patient while following the safe path described herein.

In FIG. 4, upon initiation of method 400, an INTIALIZE operation 401 is performed. INTIALIZE operation 401 initializes any variables, memory structures etc that are need for subsequent operations in method 400. In one aspect, INITIALIZE operation 401 uses display controller 235 (FIG. 2) to generate a display on display device 210 that permits the operator of steerable endoscope 100 to select parameters that define the extent of the boundary region, for example. Upon completion INTIALIZE operation 401 (FIG. 4) transfers processing to ESTABLISH WAYPOINT operation 402 in STORE WAYPOINTS operation 420.

In ESTABLISH WAYPOINT operation 402, a waypoint on the safe path of the endoscope is established. This can be done in a variety of ways. Accordingly, check operations 410 to 412, as discussed more completely below, are illustrative only and are not intended to be limiting to this particular implementation.

In one aspect, as the operator inserts steerable endoscope 100 into a body cavity (for instance, through an incision in the stomach into the abdominal cavity) insertion is paused periodically. When motion of endoscope 100 is paused, DEVICE MOTION PAUSED check operation 410 transfers processing to DEVICE MOTION RESUMED check operation 411.

If steerable endoscope 100 is paused to determine a safe trajectory for the tip, the operator uses the camera and illumination at the tip of steerable endoscope 100 to determine a safe trajectory inside the body cavity. When viewing the interior of the body cavity and determining a safe direction for farther insertion, the endoscope tip may be oriented in any direction to provide views of the body cavity.

Once a safe trajectory is determined, the tip is oriented in the direction that the operator intends steerable endoscope 100 to travel upon farther insertion. The operator then inserts endoscope 100 farther into the patient. However, the operator could also retract endoscope 100 after the pause. Thus, upon resumption of motion of endoscope 100, DEVICE MOTION RESUMED check operation 411 transfers processing to INSERTION check operation 412.

INSERTION check operation 412 determines whether after the pause, the operation is continuing to insert endoscope 100 or is retracting endoscope 100. If the operator is continuing to insert endoscope 100, check operation 412 transfers processing to SAVE WAYPOINT operation 430. Conversely, if the operator is retracting endoscope 100, check operation 412 transfers to DEVICE MOTION PAUSED check operation 410 and to MAINTAIN SEGMENTS IN BOUNDARY REGION operation 405.

Again, the combination of operations 410 to 412 is one way to allow an operator to establish a waypoint. Alternatively, the operator could, for example, push a button when a safe trajectory has been identified and the operator is about to move the endoscope tip on that trajectory.

SAVE WAYPOINT operation 403 records the previous location of the tip as a waypoint in WAYPOINT DATA 403a, which in FIG. 2 is shown as waypoint data 231. SAVE WAYPOINT operation 403, upon completion, transfers processing to NEW LINK INSERTED check operation 404. SAVE WAYPOINT operation 403 also transfers back to the start of ESTABLISH WAYPOINT operation 402 in case the operator decides to change the direction of the safe trajectory.

In this example, insertion of a link is used as a trigger to record another waypoint for the tip. However, other criteria can be used so long as locations of the tip are saved with sufficient resolution to permit determining a safe path. As steerable endoscope 100 is moved further into the patient along the safe trajectory, as each new link is inserted in the patient, the location of the tip is saved as another waypoint. In this example, when a new link is inserted, NEW LINK INSERTED check operation 404 transfers processing to SAVE WAYPOINT operation 403, which was described above, and to UPDATE check operation 409.

UPDATE check operation 409 is shown with a dotted line in FIG. 4 because check operation 409 is optional. In one aspect, the configuration of the trailing segments of endoscope 100 is updated only after a predefined number of new waypoints have been saved. In this aspect, UPDATE check operation 409 does not transfer processing to process 405 until the predefined number of new waypoints is available in WAYPOINT DATA 403A. Also, UPDATE check operation 409 checks the states of the articulatable segments and if none of the articulatable segments have state articulating, UPDATE check operation 409 does not transfer processing to process 405. Alternatively, the configuration of the trailing segments of endoscope 100 is updated for each new waypoint and so UPDATE check operation 409 is not needed.

In this embodiment, FOLLOW SAFE PATH process 430 includes MAINTAIN SEGMENTS IN BOUNDARY REGION process 405 and SEND COMMAND process 406. MAINTAIN SEGMENTS IN BOUNDARY REGION process 405 uses the saved waypoints to generate a configuration for each of the inserted links so that trailing segments 1011 to 1013 follow safe path 150 of the tip as defined by the waypoints. As noted above, for some steerable medical devices, it may not be possible to configure the trailing segments to follow exactly safe path 150. Thus, in one aspect, a boundary region about the ordered sequence of locations {P_{k}}_{k=1} ^{N }is generated. Here, P_{k }denotes the Cartesian coordinates of the endoscope tip when the number of the inserted links is k. After the endoscope has been inserted for N links, the path trajectory of the endoscope tip is recorded as ordered sequence of locations {P_{k}}_{k=1} ^{N }in memory 230 (FIG. 2).

As described above, the boundary region defines a volume around safe path 150, i.e., a volume that encloses safe path 150. The trailing segments can safely pass through any part of the boundary region as the trailing segments move towards the surgical site, or move away from the surgical site.

In one aspect, a kinematic model of steerable endoscope 100, such as model 500 in FIG. 5, is used in MAINTAIN SEGMENTS IN BOUNDARY REGION process 405. In kinematic model 500, (FIG. 5), a first level 501 of model 500 defines the number of articulatable segments in a plurality of articulatable segments of the steerable endoscope. In this example, the steerable endoscope has four articulatable segments Seg 1, Seg 2, Seg 3, and Seg 4.

A second level 502 of model 500 is a representation of links and joints in each of four articulatable segments Seg 1, Seg 2, Seg 3, and Seg 4. In this example, each segment includes eight links, where adjacent links are separated by a joint. The joints are numbered sequentially from the distal end to the proximal end of the endoscope, starting with a value one. (This numbering sequence is for convenience only. In other aspects, the numbering may increase in going from a proximal location towards a distal location.) Each link has a fixed length and the associated joint can rotate in a single plane, either the xplane or the yplane. The joints alternate so adjacent links rotate in different planes.

In model 500, each of four articulatable segments Seg 1, Seg 2, Seg 3, and Seg 4 has an angle of rotation about the xaxis and an angle of rotation about the yaxis. For articulatable segment Seg 1, the angle of rotation about the xaxis is θ_{y} ^{1}, (sometimes referred to as pitch) and the angle of rotation about the yaxis is θ_{x} ^{1 }(sometimes referred to as yaw). For articulatable segment Seg 2, the angle of rotation about the xaxis is θ_{y} ^{2}, and the angle of rotation about the yaxis is θ_{x} ^{2}. For articulatable segment Seg 3, the angle of rotation about the xaxis is θ_{y} ^{3}, and the angle of rotation about the yaxis is θ_{x} ^{3}. For articulatable segment Seg 4, the angle of rotation about the xaxis is θ_{y} ^{4}, and the angle of rotation about the yaxis is θ_{x} ^{4}.

Row 505 in model 500 gives the initial constraint on the joint angles. In this example, the joint angles for a segment are assumed to be equal. Thus, each joint angle is onefourth of the corresponding segment angle. Row 506 in model 500 gives the roll matrix for each joint.

In this model, ylinks are links that cause motion in the ydirection rather than links that rotate about the ydirection. This definition results in R_{x}(θ_{y}). Similarly, in this model, xlinks are links that cause motion in the xdirection rather than links that rotate about the xdirection. This definition results in R_{y}(θ_{x}) Those knowledgeable in the field understand that alternative definitions can be used in the kinematic model, where xlinks are links that rotate about the xdirection and ylinks are links that rotate about the ydirection. Irrespective of the kinematic model definitions, the results are equivalent.

Thus, model 500 is illustrative only and is not intended to be limiting. Model 500 is used in one example that is developed more completely below.

Using stored ordered sequence of locations {P_{k}}_{k=1} ^{N }and kinematic model 500, a cost function is minimized to generate position and orientation data of the endoscope segments in MAINTAIN SEGMENTS IN BOUNDARY REGION process 405. Specifically, in one aspect, positions and orientations are generated for each of the links in the articulatable portion of endoscope 100. The positions and orientations are constrained within the boundary region.

The cost function allows the position and orientation to be optimized for a variety of criteria, for example, but not limited to: 1) maximum tip controllability; 2) maximum distance of the segments from inversekinematic singularities; 3) maximum distance of the segments from articulation limits; 4) maximum distance from userdefined bodycavity boundaries (organs, adhesions, etc.); 5) minimum distance from the defined path.

In process 405, the cost function may be a dynamically changing function of any number of criteria. However, the number of criteria is selected so the cost function can be minimized and the segments positioned to achieve the constrained movement within an endoscope movement time acceptable to the operator. Conventional techniques are used by a processor to minimize the cost function selected subject to the position constraints imposed.

In an additional aspect, an embodiment of process 405 determines the optimal configuration of the segments (relative segment angles) to satisfy the constraint that the segment links stay “near to” the path defined by the tip forward motion and any additional constraints on the link (or segment) positions.

For example, in process 405, the segments may be allowed to assume positions within a tubular bounding region 310A (FIG. 3A) around the tip path while encouraging tip manipulability. One way to encourage tip manipulability in process 405 is to minimize the sum of the absolute values of the relative joint angles, with the additional constraint that the link positions not deviate by more than a distance at each of the waypoints in ordered sequence of locations {P_{k}}_{k=1} ^{N}. In one aspect, distance Δ is specified by the operator.

Upon determining the configuration for each of the articulatable segments, MAINTAIN SEGMENTS IN BOUNDARY REGION process 405 transfers processing to SEND COMMAND process 406 (FIG. 4). In SEND COMMAND process 406, the processor in processor module 250 (FIG. 2) sends at least one command to the motors in endoscope controller 240 to configure the articulatable segments based on the locations and orientations generated in process 405, i.e., based on the configuration generated in process 405. This constrains the articulatable segments within the boundary region as endoscope 100 moves further into the patient.

SEND COMMAND process 406 transfers to DEVICE MOTION PAUSED check operation 410 and to RETRACTION AND LINK RETRACTED check operation 407. RETRACTION AND LINK RETRACTED check operation 407 determines whether endoscope 100 is being retracted and whether a link has been retracted. If both of these conditions are true, check operation 407 transfers to DELETE WAYPOINT operation 408.

DELETE WAYPOINT operation 408 deletes the stored waypoint for the withdrawn link and transfers to operation 405. Hence, operations 405 to 408 cause endoscope 100 to follow safe path 150 as endoscope 100 is retracted from the patient.

In the example of FIG. 2, in response to the command, endoscope controller 240 configures the segments so that as the segments move forward, the segments are constrained to stay within the boundary region. Thus, the segments may not follow the trajectory of the tip exactly, but the segments follow a path within the boundary region that is safe.

When the operator starts to withdraw the endoscope from the patient, the waypoints in the stored ordered sequence of locations {P_{k}}_{k=1} ^{N }decrease by one as each link is withdrawn. Processes 405 and 406 are used as steerable endoscope is withdrawn to maintain endoscope 100 with the boundary region.

As a further example of process 405, the control of the joint angles at constant endoscopic length increments is considered such that the endoscope configuration is kept within a safety area, the boundary region described above, during the process of insertion and withdrawal. In this example, a configuration of the trailing links that is closest, as measured by Euclidean norm, to the tip trajectory is generated in process 405, since the tip trajectory represents a safe route selected by the operator.

As described above P_{k }denotes the Cartesian coordinate of the endoscope tip when the number of the inserted links is k. After the endoscope has been inserted for N links, the path trajectory of the endoscope tip is recorded in a series {P_{k}}_{k=1} ^{N}. Process 405 controls the joint angles to achieve an endoscope link configuration close to the waypoints in recorded series {P_{k}}_{k=1} ^{N}. This is formulated as the following optimization, where J is the cost function discussed above:

$\begin{array}{cc}\underset{\theta}{\mathrm{min}}\ue89eJ=\frac{1}{2}\ue89e\sum _{k=1}^{N}\ue89e{\uf605{p}_{k}{P}_{k}\uf606}^{2}& \left(1\right)\end{array}$

subject to

θ_{min}≦θ≦θ_{max}, (2)

where p_{k }is the coordinate of each link determined by the kinematics model.

To apply an iterative procedure to solve this problem, assume that at the nth step, a solution is θ_{n }and the next increment Δθ_{n }is to be determined. The new link coordinate is approximated by

p ^{n+1} ≈p ^{n}+∇_{θ} _{ n } p·Δθ _{n}. (3)

Substituting expression (3) into the cost function gives:

$\begin{array}{cc}{J}^{n+1}=\frac{1}{2}\ue89e{\uf605{p}^{n+1}P\uf606}^{2}\approx \frac{1}{2}\ue89e{\uf605{\nabla}_{{\theta}_{n}}\ue89ep\xb7\Delta \ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89e{\theta}_{n}+{p}^{n}P\uf606}^{2}.& \left(4\right)\end{array}$

This is indeed a quadratic programming problem:

$\begin{array}{cc}\underset{\Delta \ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89e\theta}{\mathrm{min}}\ue89eJ=\frac{1}{2}\ue89e\Delta \ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89e{{\theta}_{n}\ue8a0\left({\nabla}_{{\theta}_{n}}\ue89ep\right)}^{T}\ue89e\nabla {\theta}_{n}\ue89ep\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89e\Delta \ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89e{\theta}_{n}+{\left({p}^{n}P\right)}^{T}\ue89e{\nabla}_{{\theta}_{n}}\ue89ep\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89e\Delta \ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89e{\theta}_{n},& \left(5\right)\end{array}$

subject to

θ_{min}−θ_{n}≦Δθ_{n}≦θ_{max}−θ_{n}. (6)
Kinematics Model

With respect to FIG. 5, let the first input parameter be defined as:

$\begin{array}{cc}q=\left[\begin{array}{cc}{\theta}_{x}^{1}& {\theta}_{y}^{1}\\ {\theta}_{x}^{2}& {\theta}_{y}^{2}\\ {\theta}_{x}^{3}& {\theta}_{y}^{3}\\ {\theta}_{x}^{4}& {\theta}_{y}^{4}\end{array}\right].& \left(7\right)\end{array}$

The vector of joint angles is defined as:

$\begin{array}{cc}{q}_{\mathrm{jw}}=\left[\begin{array}{c}\frac{{\theta}_{x}^{1}}{4},\frac{{\theta}_{y}^{1}}{4},\frac{{\theta}_{x}^{1}}{4},\frac{{\theta}_{y}^{1}}{4},\frac{{\theta}_{x}^{1}}{4},\frac{{\theta}_{y}^{1}}{4},\frac{{\theta}_{x}^{1}}{4},\frac{{\theta}_{y}^{1}}{4},\frac{{\theta}_{x}^{2}}{4},\frac{{\theta}_{y}^{2}}{4},\frac{{\theta}_{x}^{2}}{4},\frac{{\theta}_{y}^{2}}{4},\\ \frac{{\theta}_{x}^{2}}{4},\frac{{\theta}_{y}^{2}}{4},\frac{{\theta}_{x}^{2}}{4},\frac{{\theta}_{y}^{2}}{4},\frac{{\theta}_{x}^{3}}{4},\frac{{\theta}_{y}^{3}}{4},\frac{{\theta}_{x}^{3}}{4},\frac{{\theta}_{y}^{3}}{4},\frac{{\theta}_{x}^{3}}{4},\frac{{\theta}_{y}^{3}}{4},\frac{{\theta}_{x}^{3}}{4},\\ \frac{{\theta}_{y}^{3}}{4},\frac{{\theta}_{x}^{4}}{4},\frac{{\theta}_{y}^{4}}{4},\frac{{\theta}_{x}^{4}}{4},\frac{{\theta}_{y}^{4}}{4},\frac{{\theta}_{x}^{4}}{4},\frac{{\theta}_{y}^{4}}{4},\frac{{\theta}_{x}^{4}}{4},\frac{{\theta}_{y}^{4}}{4}\end{array}\right],& \left(8\right)\end{array}$

and the state of each link is defined as:

$\begin{array}{cc}{T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(1\right)=\left[\begin{array}{cc}{R}_{y}\ue8a0\left(\frac{{\theta}_{x}^{1}}{4}\right)& \left(\begin{array}{c}0\\ 0\\ a\ue8a0\left(1\right)\end{array}\right)\\ 0& 1\end{array}\right],\text{}\ue89e{T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(3\right)=\left[\begin{array}{cc}{R}_{y}\ue8a0\left(\frac{{\theta}_{x}^{1}}{4}\right)& \left(\begin{array}{c}0\\ 0\\ a\ue8a0\left(3\right)\end{array}\right)\\ 0& 1\end{array}\right],\text{}\ue89e{T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(5\right)=\left[\begin{array}{cc}{R}_{y}\ue8a0\left(\frac{{\theta}_{x}^{1}}{4}\right)& \left(\begin{array}{c}0\\ 0\\ a\ue8a0\left(5\right)\end{array}\right)\\ 0& 1\end{array}\right],\text{}\ue89e{T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(7\right)=\left[\begin{array}{cc}{R}_{y}\ue8a0\left(\frac{{\theta}_{x}^{1}}{4}\right)& \left(\begin{array}{c}0\\ 0\\ a\ue8a0\left(7\right)\end{array}\right)\\ 0& 1\end{array}\right],\text{}\ue89e{T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(2\right)=\left[\begin{array}{cc}{R}_{x}\ue8a0\left(\frac{{\theta}_{y}^{1}}{4}\right)& \left(\begin{array}{c}0\\ 0\\ a\ue8a0\left(2\right)\end{array}\right)\\ 0& 1\end{array}\right],\text{}\ue89e{T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(4\right)=\left[\begin{array}{cc}{R}_{x}\ue8a0\left(\frac{{\theta}_{y}^{1}}{4}\right)& \left(\begin{array}{c}0\\ 0\\ a\ue8a0\left(4\right)\end{array}\right)\\ 0& 1\end{array}\right],\text{}\ue89e{T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(6\right)=\left[\begin{array}{cc}{R}_{x}\ue8a0\left(\frac{{\theta}_{y}^{1}}{4}\right)& \left(\begin{array}{c}0\\ 0\\ a\ue8a0\left(6\right)\end{array}\right)\\ 0& 1\end{array}\right],\text{}\ue89e{T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(8\right)=\left[\begin{array}{cc}{R}_{x}\ue8a0\left(\frac{{\theta}_{y}^{1}}{4}\right)& \left(\begin{array}{c}0\\ 0\\ a\ue8a0\left(8\right)\end{array}\right)\\ 0& 1\end{array}\right],\text{}\ue89e\mathrm{where}\ue89e\text{}\ue89e{R}_{x}\ue8a0\left(\theta \right)=\left[\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\ue8a0\left(\theta \right)& \mathrm{sin}\ue8a0\left(\theta \right)\\ 0& \mathrm{sin}\ue8a0\left(\theta \right)& \mathrm{cos}\ue8a0\left(\theta \right)\end{array}\right]\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\mathrm{and}\ue89e\text{}\ue89e{R}_{y}\ue8a0\left(\theta \right)=\left[\begin{array}{ccc}\mathrm{cos}\ue8a0\left(\theta \right)& 0& \mathrm{sin}\ue8a0\left(\theta \right)\\ 0& 1& 0\\ \mathrm{sin}\ue8a0\left(\theta \right)& 0& \mathrm{cos}\ue8a0\left(\theta \right)\end{array}\right]& \left(9\right)\end{array}$

The rest of the T_{lw}'s can be obtained in a similar fashion. In particular,

$\begin{array}{cc}{T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(33\right)=\left[\begin{array}{cc}I& \left(\begin{array}{c}0\\ 0\\ a\ue8a0\left(33\right)\end{array}\right)\\ 0& 1\end{array}\right].& \left(10\right)\end{array}$

Notice that all these T_{lw}'s are in the Special Euclidean Lie group SE(4).

The cumulative transform to the base from the distal end of link k can be derived as

$\begin{array}{cc}{T}_{c\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89e1}\ue8a0\left(k\right)=\prod _{j=1}^{k}\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89e{T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(j\right)={T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(1\right)\times {T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(2\right)\times \dots \times {T}_{1\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89ew}\ue8a0\left(k\right).& \left(11\right)\end{array}$

In this section, gradient ∇_{θ}l_{k }is derived, where l is the position vector for link k. To this end, define the basis for the skewsymmetric matrix so(3) as follows:

$\begin{array}{cc}{\sigma}_{x}=\left[\begin{array}{ccc}0& 0& 0\\ 0& 0& 1\\ 0& 1& 0\end{array}\right],{\sigma}_{y}=\left[\begin{array}{ccc}0& 0& 1\\ 0& 0& 0\\ 1& 0& 0\end{array}\right],{\sigma}_{z}=\left[\begin{array}{ccc}0& 1& 0\\ 1& 0& 0\\ 0& 0& 0\end{array}\right].& \left(12\right)\end{array}$

The rotation matrices can then be described as

R _{x}(θ)=exp(σ_{x}θ), R _{y}(θ)=exp(σ_{y}θ), R _{z}(θ)=exp(σ_{2}θ). (13)

Suppose that R is a rotation matrix

$\begin{array}{cc}R=\left[\begin{array}{ccc}{r}_{11}& {r}_{12}& {r}_{13}\\ {r}_{21}& {r}_{22}& {r}_{23}\\ {r}_{31}& {r}_{32}& {r}_{33}\end{array}\right].& \left(14\right)\end{array}$

Since RR^{T}=I, an important property for R can be derived:

Rσ _{x} R ^{T} =r _{11}σ_{x} +r _{21}σ_{y} +r _{31}σ_{z}, (15)

R ^{T}σ_{x} R=r _{11}σ_{x} +r _{12}σ_{y} +r _{13 }σ_{z}, (16)

Rσ _{y} R ^{T} =r _{12}σ_{x} +r _{22}σ_{y} +r _{32}σ_{z}, (17)

R ^{T}σ_{y} R=r _{21}σ_{x} +r _{22}σ_{y} +r _{23}σ_{z}, (18)

Now, the gradient dT_{cl}(k)/dθ is derived. Let

$\begin{array}{cc}{T}_{\mathrm{lw}}\ue8a0\left(k\right)=\left[\begin{array}{cc}{R}_{k}& {a}_{k}\\ 0& 1\end{array}\right]\ue89e\text{}\ue89e\mathrm{and}\ue89e\text{}\ue89e{T}_{c\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89el}\ue8a0\left(k\right)=\left[\begin{array}{cc}{S}_{k}& {l}_{k}\\ 0& 1\end{array}\right].& \left(19\right)\end{array}$

It is easy to derive that

$\begin{array}{cc}{S}_{k}={R}_{1}\ue89e{R}_{2}\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{R}_{k},& \left(20\right)\\ \begin{array}{c}{l}_{k}=\ue89e{R}_{1}\ue89e{R}_{2}\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{R}_{k1}\ue89e{a}_{k}+{R}_{1}\ue89e{R}_{2}\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{R}_{k2}\ue89e{a}_{k1}+\dots +{R}_{1}\ue89e{a}_{2}+{a}_{1}\\ =\ue89e{S}_{k1}\ue89e{a}_{k}+{S}_{k2}\ue89e{a}_{k1}+\dots +{S}_{1}\ue89e{a}_{2}+{a}_{1},\end{array}& \left(21\right)\end{array}$

and l_{1}=a_{1}. We therefore have

$\begin{array}{cc}\frac{\uf74c{S}_{k}}{\uf74c\theta}=\frac{\uf74c}{\uf74c\theta}\ue89e\left({R}_{1}\ue89e{R}_{2}\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{R}_{k}\right),& \left(22\right)\\ \frac{\uf74c{l}_{k}}{\uf74c\theta}=\frac{\uf74c{S}_{k1}}{\uf74c\theta}\ue89e{a}_{k}+\frac{\uf74c{S}_{k2}}{\uf74c\theta}\ue89e{a}_{k1}+\dots +\frac{\uf74c{S}_{1}}{\uf74c\theta}\ue89e{a}_{2},\left(k\ge 2\right).& \left(23\right)\end{array}$

When θ=θ_{x} ^{1}, for k≧7, we have

$\begin{array}{cc}\begin{array}{c}\phantom{\rule{4.4em}{4.4ex}}\ue89e\frac{\uf74c{S}_{k}}{\uf74c{\theta}_{x}^{1}}\ue89e{S}_{k}^{T}=\ue89e\frac{\uf74c}{\uf74c{\theta}_{x}^{1}}\ue89e\left({R}_{1}\ue89e{R}_{2}\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{R}_{k}\right)\ue89e{S}_{k}^{T}\\ =\ue89e\frac{\uf74c{R}_{1}}{\uf74c{\theta}_{x}^{1}}\ue89e\left({R}_{2}\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{R}_{k}\right)\ue89e{S}_{k}^{T}+{R}_{1}\ue89e{R}_{2}\ue89e\frac{\uf74c{R}_{3}}{\uf74c{\theta}_{x}^{1}}\ue89e\left({R}_{4}\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{R}_{k}\right)\ue89e{S}_{k}^{T}+\\ \ue89e{R}_{1}\ue89e{R}_{2}\ue89e{R}_{3}\ue89e{R}_{4}\ue89e\frac{\uf74c{R}_{5}}{\uf74c{\theta}_{x}^{1}}\ue89e\left({R}_{6}\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{R}_{k}\right)\ue89e{S}_{k}^{T}+\\ \ue89e{R}_{1}\ue89e{R}_{2}\ue89e{R}_{3}\ue89e{R}_{4}\ue89e{R}_{5}\ue89e{R}_{6}\ue89e\frac{\uf74c{R}_{7}}{\uf74c{\theta}_{x}^{1}}\ue89e\left({R}_{8}\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{R}_{k}\right)\ue89e{S}_{k}^{T}\end{array}& \left(24\right)\\ \phantom{\rule{0.3em}{0.3ex}}\ue89e=\left(\frac{{\sigma}_{y}}{4}\right)+{R}_{1}\ue89e{R}_{2}\ue8a0\left(\frac{{\sigma}_{y}}{4}\right)\ue89e{\left({R}_{1}\ue89e{R}_{2}\right)}^{T}+{R}_{1}\ue89e{R}_{2}\ue89e{R}_{3}\ue89e{R}_{4}\ue8a0\left(\frac{{\sigma}_{y}}{4}\right)\ue89e{\left({R}_{1}\ue89e{R}_{2}\ue89e{R}_{3}\ue89e{R}_{4}\right)}^{T}+{R}_{1}\ue89e{R}_{2}\ue89e{R}_{3}\ue89e{R}_{4}\ue89e{R}_{5}\ue89e{R}_{6}\ue8a0\left(\frac{{\sigma}_{y}}{4}\right)\ue89e{\left({R}_{1}\ue89e{R}_{2}\ue89e{R}_{3}\ue89e{R}_{4}\ue89e{R}_{5}\ue89e{R}_{6}\right)}^{T}& \left(25\right)\\ \phantom{\rule{4.4em}{4.4ex}}\ue89e=\frac{{\sigma}_{y}}{4}+{S}_{2}\ue8a0\left(\frac{{\sigma}_{y}}{4}\right)\ue89e{S}_{2}^{T}+{S}_{4}\ue8a0\left(\frac{{\sigma}_{y}}{4}\right)\ue89e{S}_{4}^{T}+{S}_{6}\ue8a0\left(\frac{{\sigma}_{y}}{4}\right)\ue89e{S}_{6}^{T},& \left(26\right)\end{array}$

which in turn yields

$\begin{array}{cc}\frac{\uf74c{S}_{k}}{\uf74c{\theta}_{x}^{1}}=\frac{1}{4}\ue89e\left({\sigma}^{y}+{S}_{2}\ue89e{\sigma}_{y}\ue89e{S}_{2}^{T}+{S}_{4}\ue89e{\sigma}_{y}\ue89e{S}_{4}^{T}+{S}_{6}\ue89e{\sigma}_{y}\ue89e{S}_{6}^{T}\right)\ue89e{S}_{k}.& \left(27\right)\end{array}$

For k=5 or 6, we obtain

$\begin{array}{cc}\frac{\uf74c{S}_{k}}{\uf74c{\theta}_{x}^{1}}\ue89e{S}_{k}^{T}=\frac{{\sigma}_{y}}{4}+{S}_{2}\ue8a0\left(\frac{{\sigma}_{y}}{4}\right)\ue89e{S}_{2}^{T}+{S}_{4}\ue8a0\left(\frac{{\sigma}_{y}}{4}\right)\ue89e{S}_{4}^{T},\text{}\ue89e\mathrm{thus}\ue89e\text{}\ue89e\frac{\uf74c{S}_{k}}{\uf74c{\theta}_{x}^{1}}=\frac{1}{4}\ue89e\left({\sigma}_{y}+{S}_{2}\ue89e{\sigma}_{y}\ue89e{S}_{2}^{T}+{S}_{4}\ue89e{\sigma}_{y}\ue89e{S}_{4}^{T}\right)\ue89e{S}_{k};& \left(28\right)\end{array}$

for k=3 or 4,

$\begin{array}{cc}\frac{\uf74c{S}_{k}}{\uf74c{\theta}_{x}^{1}}=\frac{1}{4}\ue89e\left({\sigma}_{y}+{S}_{2}\ue89e{\sigma}_{y}\ue89e{S}_{2}^{T}\right)\ue89e{S}_{k};& \left(29\right)\end{array}$

and for k=1 or 2,

$\begin{array}{cc}\frac{\uf74c{S}_{k}}{\uf74c{\theta}_{x}^{1}}=\frac{1}{4}\ue89e{\sigma}_{y}\ue89e{S}_{k};& \left(30\right)\end{array}$

In summary,

$\begin{array}{cc}\frac{\uf74c{S}_{k}}{\uf74c{\theta}_{x}^{1}}=\{\begin{array}{cc}\frac{1}{4}\ue89e{\sigma}_{y}\ue89e{S}_{k},& k=1,2;\\ \frac{1}{4}\ue89e\left({\sigma}_{y}+{S}_{2}\ue89e{\sigma}_{y}\ue89e{S}_{2}^{T}\right)\ue89e{S}_{k},& k=3,4;\\ \frac{1}{4}\ue89e\left({\sigma}_{y}+{S}_{2}\ue89e{\sigma}_{y}\ue89e{S}_{2}^{T}+{S}_{4}\ue89e{\sigma}_{y}\ue89e{S}_{4}^{T}\right)\ue89e{S}_{k},& k=5,6;\\ \frac{1}{4}\ue89e\left({\sigma}_{y}+{S}_{2}\ue89e{\sigma}_{y}\ue89e{S}_{2}^{T}+{S}_{4}\ue89e{\sigma}_{y}\ue89e{S}_{4}^{T}+{S}_{6}\ue89e{\sigma}_{y}\ue89e{S}_{6}^{T}\right)\ue89e{S}_{k},& k\ge 7.\end{array}& \left(31\right)\\ \frac{\uf74c{S}_{k}}{\uf74c{\theta}_{x}^{2}}=\{\begin{array}{cc}0,& k\le 8;\\ \frac{1}{4}\ue89e\left({S}_{8}\ue89e{\sigma}_{y}\ue89e{S}_{8}^{T}\right)\ue89e{S}_{k},& k=9,10;\\ \frac{1}{4}\ue89e\left({S}_{8}\ue89e{\sigma}_{y}\ue89e{S}_{8}^{T}+{S}_{10}\ue89e{\sigma}_{y}\ue89e{S}_{10}^{T}\right)\ue89e{S}_{k},& k=11,12;\\ \frac{1}{4}\ue89e\left({S}_{8}\ue89e{\sigma}_{y}\ue89e{S}_{8}^{T}+{S}_{10}\ue89e{\sigma}_{y}\ue89e{S}_{10}^{T}+{S}_{12}\ue89e{\sigma}_{y}\ue89e{S}_{12}^{T}\right)\ue89e{S}_{k},& k=13,14;\\ \frac{1}{4}\ue89e\left({S}_{8}\ue89e{\sigma}_{y}\ue89e{S}_{8}^{T}+{S}_{10}\ue89e{\sigma}_{y}\ue89e{S}_{10}^{T}+{S}_{12}\ue89e{\sigma}_{y}\ue89e{S}_{12}^{T}+{S}_{14}\ue89e{\sigma}_{y}\ue89e{S}_{14}^{T}\right)\ue89e{S}_{k},& k\ge 15.\end{array}& \left(32\right)\\ \frac{\uf74c{S}_{k}}{\uf74c{\theta}_{x}^{3}}=\{\begin{array}{cc}0,& k\le 16;\\ \frac{1}{4}\ue89e\left({S}_{16}\ue89e{\sigma}_{y}\ue89e{S}_{16}^{T}\right)\ue89e{S}_{k},& k=17,18;\\ \frac{1}{4}\ue89e\left({S}_{16}\ue89e{\sigma}_{y}\ue89e{S}_{16}^{T}+{S}_{18}\ue89e{\sigma}_{y}\ue89e{S}_{18}^{T}\right)\ue89e{S}_{k},& k=19,20;\\ \frac{1}{4}\ue89e\left({S}_{16}\ue89e{\sigma}_{y}\ue89e{S}_{16}^{T}+{S}_{18}\ue89e{\sigma}_{y}\ue89e{S}_{18}^{T}+{S}_{20}\ue89e{\sigma}_{y}\ue89e{S}_{20}^{T}\right)\ue89e{S}_{k},& k=21,22;\\ \frac{1}{4}\ue89e\left({S}_{16}\ue89e{\sigma}_{y}\ue89e{S}_{16}^{T}+{S}_{18}\ue89e{\sigma}_{y}\ue89e{S}_{18}^{T}+{S}_{20}\ue89e{\sigma}_{y}\ue89e{S}_{20}^{T}+{S}_{22}\ue89e{\sigma}_{y}\ue89e{S}_{22}^{T}\right)\ue89e{S}_{k},& k\ge 23.\end{array}& \left(33\right)\end{array}$

Similarly,

$\begin{array}{cc}\frac{\uf74c{S}_{k}}{\uf74c{\theta}_{y}^{1}}=\{\begin{array}{cc}0,& k=1;\\ \frac{1}{4}\ue89e\left({S}_{1}\ue89e{\sigma}_{x}\ue89e{S}_{1}^{T}\right)\ue89e{S}_{k},& k=2,3;\\ \frac{1}{4}\ue89e\left({S}_{1}\ue89e{\sigma}_{x}\ue89e{S}_{1}^{T}+{S}_{3}\ue89e{\sigma}_{x}\ue89e{S}_{3}^{T}\right)\ue89e{S}_{k},& k=4,5;\\ \frac{1}{4}\ue89e\left({S}_{1}\ue89e{\sigma}_{x}\ue89e{S}_{1}^{T}+{S}_{3}\ue89e{\sigma}_{x}\ue89e{S}_{3}^{T}+{S}_{5}\ue89e{\sigma}_{x}\ue89e{S}_{5}^{T}\right)\ue89e{S}_{k},& k=6,7;\\ \frac{1}{4}\ue89e\left({S}_{1}\ue89e{\sigma}_{x}\ue89e{S}_{1}^{T}+{S}_{3}\ue89e{\sigma}_{x}\ue89e{S}_{3}^{T}+{S}_{5}\ue89e{\sigma}_{x}\ue89e{S}_{5}^{T}+{S}_{7}\ue89e{\sigma}_{x}\ue89e{S}_{7}^{T}\right)\ue89e{S}_{k},& k\ge 8.\end{array}& \left(34\right)\\ \frac{\uf74c{S}_{k}}{\uf74c{\theta}_{y}^{2}}=\{\begin{array}{cc}0,& k\le 9;\\ \frac{1}{4}\ue89e\left({S}_{9}\ue89e{\sigma}_{x}\ue89e{S}_{9}^{T}\right)\ue89e{S}_{k},& k=10,11;\\ \frac{1}{4}\ue89e\left({S}_{9}\ue89e{\sigma}_{x}\ue89e{S}_{9}^{T}+{S}_{11}\ue89e{\sigma}_{x}\ue89e{S}_{11}^{T}\right)\ue89e{S}_{k},& k=12,13;\\ \frac{1}{4}\ue89e\left({S}_{9}\ue89e{\sigma}_{x}\ue89e{S}_{9}^{T}+{S}_{11}\ue89e{\sigma}_{x}\ue89e{S}_{11}^{T}+{S}_{13}\ue89e{\sigma}_{x}\ue89e{S}_{13}^{T}\right)\ue89e{S}_{k},& k=14,15;\\ \frac{1}{4}\ue89e\left({S}_{9}\ue89e{\sigma}_{x}\ue89e{S}_{9}^{T}+{S}_{11}\ue89e{\sigma}_{x}\ue89e{S}_{11}^{T}+{S}_{13}\ue89e{\sigma}_{x}\ue89e{S}_{13}^{T}+{S}_{15}\ue89e{\sigma}_{x}\ue89e{S}_{15}^{T}\right)\ue89e{S}_{k},& k\ge 16.\end{array}& \left(35\right)\\ \frac{\uf74c{S}_{k}}{\uf74c{\theta}_{y}^{3}}=\{\begin{array}{cc}0,& k\le 17;\\ \frac{1}{4}\ue89e\left({S}_{17}\ue89e{\sigma}_{x}\ue89e{S}_{17}^{T}\right)\ue89e{S}_{k},& k=18,19;\\ \frac{1}{4}\ue89e\left({S}_{17}\ue89e{\sigma}_{x}\ue89e{S}_{17}^{T}+{S}_{19}\ue89e{\sigma}_{x}\ue89e{S}_{19}^{T}\right)\ue89e{S}_{k},& k=20,21;\\ \frac{1}{4}\ue89e\left({S}_{17}\ue89e{\sigma}_{x}\ue89e{S}_{17}^{T}+{S}_{19}\ue89e{\sigma}_{x}\ue89e{S}_{19}^{T}+{S}_{21}\ue89e{\sigma}_{x}\ue89e{S}_{21}^{T}\right)\ue89e{S}_{k},& k=22,23;\\ \frac{1}{4}\ue89e\left({S}_{17}\ue89e{\sigma}_{x}\ue89e{S}_{17}^{T}+{S}_{19}\ue89e{\sigma}_{x}\ue89e{S}_{19}^{T}+{S}_{21}\ue89e{\sigma}_{x}\ue89e{S}_{21}^{T}+{S}_{23}\ue89e{\sigma}_{x}\ue89e{S}_{23}^{T}\right)\ue89e{S}_{k},& k\ge 24.\end{array}& \left(36\right)\end{array}$

In this subsection, the Jacobian is derived. Let

$\begin{array}{cc}{T}_{J}\ue8a0\left(k\right)=\prod _{j=k+1}^{N}\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89e{T}_{\mathrm{lw}}\ue8a0\left(j\right)={T}_{\mathrm{lw}}\ue8a0\left(k+1\right)\times \dots \times {T}_{\mathrm{lw}}\ue8a0\left(N\right),& \left(37\right)\end{array}$

and denote its blocks as

$\begin{array}{cc}{T}_{J}\ue8a0\left(k\right)=\left[\begin{array}{cc}{R}_{k}^{J}& {l}_{k}^{J}\\ 0& 1\end{array}\right].& \left(38\right)\end{array}$

Recalling Eq. (19), we have

$\begin{array}{cc}\begin{array}{c}\frac{\uf74c{T}_{c\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89el}\ue8a0\left(N\right)}{\uf74c{\theta}_{x}^{1}}=\ue89e\left[\begin{array}{cc}\frac{\uf74c{S}_{N}}{\uf74c{\theta}_{x}^{1}}& \frac{\uf74c{l}_{N}}{\uf74c{\theta}_{x}^{1}}\\ 0& 0\end{array}\right]\\ =\ue89e\frac{\uf74c{T}_{\mathrm{lw}}\ue8a0\left(1\right)}{\uf74c{\theta}_{x}^{1}}\ue89e{T}_{\mathrm{lw}}\ue8a0\left(2\right)\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{T}_{\mathrm{lw}}\ue8a0\left(N\right)+\\ \ue89e{T}_{\mathrm{lw}}\ue8a0\left(1\right)\ue89e{T}_{\mathrm{lw}}\ue8a0\left(2\right)\ue89e\frac{\uf74c{T}_{\mathrm{lw}}\ue8a0\left(3\right)}{\uf74c{\theta}_{x}^{1}}\ue89e{T}_{\mathrm{lw}}\ue8a0\left(4\right)\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{T}_{\mathrm{lw}}\ue8a0\left(N\right)+\\ \ue89e{T}_{\mathrm{lw}}\ue8a0\left(1\right)\ue89e{T}_{\mathrm{lw}}\ue8a0\left(2\right)\ue89e{T}_{\mathrm{lw}}\ue8a0\left(3\right)\ue89e{T}_{\mathrm{lw}}\ue8a0\left(4\right)\ue89e\frac{\uf74c{T}_{\mathrm{lw}}\ue8a0\left(5\right)}{\uf74c{\theta}_{x}^{1}}\ue89e{T}_{\mathrm{lw}}\ue8a0\left(6\right)\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \\ \ue89e{T}_{\mathrm{lw}}\ue8a0\left(N\right)+{T}_{\mathrm{lw}}\ue8a0\left(1\right)\ue89e{T}_{\mathrm{lw}}\ue8a0\left(2\right)\ue89e{T}_{\mathrm{lw}}\ue8a0\left(3\right)\ue89e{T}_{\mathrm{lw}}\ue8a0\left(4\right)\ue89e{T}_{\mathrm{lw}}\ue8a0\left(5\right)\ue89e{T}_{\mathrm{lw}}\ue8a0\left(6\right)\\ \ue89e\frac{\uf74c{T}_{\mathrm{lw}}\ue8a0\left(7\right)}{\uf74c{\theta}_{x}^{1}}\ue89e{T}_{\mathrm{lw}}\ue8a0\left(8\right)\ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e\dots \ue89e\phantom{\rule{0.8em}{0.8ex}}\ue89e{T}_{\mathrm{lw}}\ue8a0\left(N\right)\\ =\ue89e\left[\begin{array}{cc}{R}_{1}\ue89e\frac{{\sigma}_{y}}{4}& 0\\ 0& 0\end{array}\right]\ue89e{T}_{J}\ue8a0\left(1\right)+{T}_{c\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89el}\ue8a0\left(2\right)\ue89e\left[\begin{array}{cc}{R}_{3}\ue89e\frac{{\sigma}_{y}}{4}& 0\\ 0& 0\end{array}\right]\ue89e{T}_{J}\ue8a0\left(3\right)+\\ \ue89e{T}_{c\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89el}\ue8a0\left(4\right)\ue89e\left[\begin{array}{cc}{R}_{5}\ue89e\frac{{\sigma}_{y}}{4}& 0\\ 0& 0\end{array}\right]\ue89e{T}_{J}\ue8a0\left(5\right)+{T}_{c\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89el}\ue8a0\left(6\right)\ue89e\left[\begin{array}{cc}{R}_{7}\ue89e\frac{{\sigma}_{y}}{4}& 0\\ 0& 0\end{array}\right]\ue89e{T}_{J}\ue8a0\left(7\right).\end{array}& \left(39\right)\end{array}$

The last equality is obtained by the definition of T_{cl }and T_{J}. Proceeding further, we have

$\begin{array}{c}\frac{\uf74c{T}_{c\ue89e\phantom{\rule{0.3em}{0.3ex}}\ue89el}\ue8a0\left(N\right)}{\uf74c{\theta}_{x}^{1}}=\ue89e\left[\begin{array}{cc}{R}_{1}\ue89e\frac{{\sigma}_{y}}{4}& 0\\ 0& 0\end{array}\right]\ue8a0\left[\begin{array}{cc}{R}_{1}^{J}& {l}_{1}^{J}\\ 0& 1\end{array}\right]+\\ \ue89e\left[\begin{array}{cc}{S}_{2}& {l}_{2}\\ 0& 1\end{array}\right]\ue8a0\left[\begin{array}{cc}{R}_{3}\ue89e\frac{{\sigma}_{y}}{4}& 0\\ 0& 0\end{array}\right]\ue8a0\left[\begin{array}{cc}{R}_{3}^{J}& {l}_{3}^{J}\\ 0& 1\end{array}\right]+\\ \ue89e\left[\begin{array}{cc}{S}_{4}& {l}_{4}\\ 0& 1\end{array}\right]\ue8a0\left[\begin{array}{cc}{R}_{5}\ue89e\frac{{\sigma}_{y}}{4}& 0\\ 0& 0\end{array}\right]\ue8a0\left[\begin{array}{cc}{R}_{5}^{J}& {l}_{5}^{J}\\ 0& 1\end{array}\right]+\\ \ue89e\left[\begin{array}{cc}{S}_{6}& {l}_{6}\\ 0& 1\end{array}\right]\ue8a0\left[\begin{array}{cc}{R}_{7}\ue89e\frac{{\sigma}_{y}}{4}& 0\\ 0& 0\end{array}\right]\ue8a0\left[\begin{array}{cc}{R}_{7}^{J}& {l}_{7}^{J}\\ 0& 1\end{array}\right]\\ =\ue89e\left[\begin{array}{c}{S}_{1}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{R}_{1}^{J}{S}_{3}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{R}_{3}^{J}{S}_{5}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{R}_{5}^{J}{S}_{7}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{R}_{7}^{J}\\ 0\\ {S}_{1}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{l}_{1}^{J}{S}_{3}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{l}_{3}^{J}{S}_{5}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{l}_{5}^{J}{S}_{7}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{l}_{7}^{J}\\ 0\end{array}\right].\end{array}$

Therefore, the derivative of the position vector l_{N }with respect to the joint angle θ_{x} ^{1 }is

$\begin{array}{cc}\begin{array}{c}\frac{\uf74c{l}_{N}}{\uf74c{\theta}_{x}^{1}}=\ue89e{S}_{1}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{l}_{1}^{J}{S}_{3}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{l}_{3}^{J}{S}_{5}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{l}_{5}^{J}{S}_{7}\ue89e\frac{{\sigma}_{y}}{4}\ue89e{l}_{7}^{J}\\ =\ue89e\frac{{S}_{1}}{4}\ue8a0\left[\begin{array}{c}{l}_{1,3}^{J}\\ 0\\ {l}_{1,1}^{J}\end{array}\right]+\frac{{S}_{3}}{4}\ue8a0\left[\begin{array}{c}{l}_{3,3}^{J}\\ 0\\ {l}_{3,1}^{J}\end{array}\right]+\frac{{S}_{5}}{4}\ue8a0\left[\begin{array}{c}{l}_{5,3}^{J}\\ 0\\ {l}_{5,1}^{J}\end{array}\right]+\frac{{S}_{7}}{4}\ue8a0\left[\begin{array}{c}{l}_{7,3}^{J}\\ 0\\ {l}_{7,1}^{J}\end{array}\right].\end{array}& \left(40\right)\end{array}$

In the above examples, the sequence of ordered locations and sixdegrees of freedom were considered in configuring articulatable segments to remain within a boundary region, sometimes called a safe region. However, in some applications, consideration of only twodegrees of freedom may be sufficient. The xy position could be controlled, or the pitch and the yaw could be controlled. In these applications, each waypoint only includes two degrees of freedom corresponding to an insertion depth and the above processes become less computationally intensive while the safe path is followed.

System controller 220 (FIG. 2) is illustrated as unified structures for ease of illustration and understanding. This is illustrative only and is not intended to be limiting. The various component of system controller 220 can be located apart and still perform the functions described.

The above description and the accompanying drawings that illustrate aspects and embodiments of the present inventions should not be taken as limiting—the claims define the protected inventions. Various mechanical, compositional, structural, electrical, and operational changes may be made without departing from the spirit and scope of this description and the claims. In some instances, wellknown circuits, structures, and techniques have not been shown or described in detail to avoid obscuring the invention.

While the memory in FIG. 2 is illustrated as a unified structure, this should not be interpreted as requiring that all memory is at the same physical location. All or part of the memory can be in a different physical location than a processor. Memory refers to a volatile memory, a nonvolatile memory, or any combination of the two.

A processor is coupled to a memory containing instructions executed by the processor. This could be accomplished within a computer system, or alternatively via a connection to another computer via modems and analog lines, or digital interfaces and a digital carrier line.

All examples and illustrative references are nonlimiting and should not be used to limit the claims to specific implementations and embodiments described herein and their equivalents. The headings are solely for formatting and should not be used to limit the subject matter in any way, because text under one heading may cross reference or apply to text under one or more headings. Finally, in view of this disclosure, particular features described in relation to one aspect or embodiment may be applied to other disclosed aspects or embodiments of the invention, even though not specifically shown in the drawings or described in the text.