You are on page 1of 15

1378 IEEE TRANSACTIONS ON ROBOTICS, VOL. 31, NO.

6, DECEMBER 2015

Spline Path Following for Redundant


Mechanical Systems
Rajan J. Gill, Dana Kulić, and Christopher Nielsen

Abstract—Path following controllers make the output of a con- is designed to asymptotically stabilize the tracking error to zero.
trol system approach and traverse a prespecified path with no a When the tracking error is nonzero, the controller may drive the
priori time-parametrization. In this paper, we present a method end-effector to “cut through” an obstacle in order to reduce the
for path following control design applicable to framed curves
generated by splines in the workspace of kinematically redun- tracking error and thereby not precisely follow the contour.
dant mechanical systems. The class of admissible paths includes On the other hand, path following or maneuvre regulation
self-intersecting curves. Kinematic redundancies are resolved by controllers, as previously defined in [1], drive a system’s output
designing controllers that solve a suitably defined constrained to a desired path and make the output traverse the path without a
quadratic optimization problem. By employing partial feedback prespecified time parametrization. Thus, a path following con-
linearization, the proposed path following controllers have a clear
physical meaning. The approach is experimentally verified on a troller stabilizes all trajectories that cause the system’s output
four-degree-of-freedom (four-DOF) manipulator with a combina- to traverse the desired path, whereas trajectory tracking con-
tion of revolute and linear actuated links and significant model trollers do this for a single trajectory. In general, path following
uncertainty. results in smoother convergence to the desired path compared
Index Terms—Path following, redundant feedback linearization, with trajectory tracking, and the control signals are less likely to
set stabilization. saturate [4]. It is also shown in [5] for the linear case, and [6] for
the nonlinear case, that for nonminimum phase systems, path
I. INTRODUCTION following controllers remove performance limitations compared
HE problem of designing feedback control laws that make with trajectory tracking controllers, which have a lower bound
T the output of a control system follow a desired curve in
its workspace can be broadly classified as either a trajectory
on the achievable L2 -norm of the tracking error.
There are several approaches for implementing path follow-
tracking or path following problem. As previously suggested in ing. Papers [1], [7], and [8] project the current system state onto
[1], trajectory tracking consists of tracking a curve with an as- the desired path in real time. Then a tracking controller is used
signed time parameterization. In other words, besides the shape to stabilize this generated reference point. Contour error mit-
of the curve, the end-effector’s motion has a desired velocity igation controllers have also been proposed in the machining
and acceleration profile. This approach may not be suitable for community in addition to a trajectory tracking controller in or-
certain applications as it may limit the attainable performance, der to drive the machine tool toward a path [9]–[11]. However,
be unnecessarily demanding or even infeasible. For example, these approaches do not guarantee that the desired path will be
the primary objective of a robotic manipulator tracing a contour invariant, i.e., if for some time the output is on the path and has
in its output space in welding [2] or cutting [3] applications is a velocity tangent to the path, then the output will remain on the
to accurately traverse a path. The trajectory tracking approach path for all future time.
parametrizes the desired motion along the path and a controller Virtual holonomic constraints can be used to guarantee invari-
ance of a path via set stabilization. This methodology is used for
Manuscript received March 21, 2015; accepted October 8, 2015. Date of pub- orbital stabilization for a Furuta pendulum [12], helicopters [13],
lication November 11, 2015; date of current version December 2, 2015. This and, in the sense of hybrid systems, for the walking/running of
paper was recommended for publication by Associate Editor V. Krovi and Editor
T. Murphey upon evaluation of the reviewer’s comments. This work was sup-
bipedal robots [14]. In addition, [15] introduces conditions for
ported by the Natural Sciences and Engineering Research Council of Canada. feedback linearization of the transverse dynamics associated
The authors are with the Department of Electrical and Computer Engineer- with periodic orbits. This inspired the work in [16] in which an
ing, University of Waterloo, Waterloo, ON N2L 3G1, Canada (e-mail: rjgill@
uwaterloo.ca; dana.kulic@uwaterloo.ca; cnielsen@uwaterloo.ca).
arbitrary nonperiodic path in the output space can be made at-
This paper has supplementary downloadable material available at http:// tractive and invariant using transverse feedback linearization for
ieeexplore.ieee.org, provided by the author. The material consists of a video, single-input systems. This idea was further extended in [17] by
viewable with Windows Media Player, demonstrating the experiments shown
in Section IV of the paper. The path is a spline-interpolation of waypoints
providing conditions for which desired motions can be achieved
in the 3-D workspace of the robot manipulator. The video contains the two while on the path, as opposed to orbital stabilization where the
experiments, each with different artificial joint limits set for the wrist joint. dynamics along the closed curve in the state space are fixed.
Parameters for the controller: Constant desired tangential velocity profile : –100
mm/s Two runs were done with different joint limit settings: First experiment
The approach in [17] simplifies controller design and decom-
starts at: 0:15. Wrist joint limit set to 0 to 45◦ . Second experiment starts at: 1:38 poses the path following design problem into two independent
Wrist joint limit set to 45 to 90◦ . The size of the video is 55.9 MB. Contact subproblems: staying on the path and moving along the path.
rjgill@uwaterloo.ca for further questions about this work.
Color versions of one or more of the figures in this paper are available online
However, in [17], perfect knowledge of the dynamic parame-
at http://ieeexplore.ieee.org. ters of the system was assumed, performance was demonstrated
Digital Object Identifier 10.1109/TRO.2015.2489502 only for a linear, decoupled system, and the path is restricted to a

1552-3098 © 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See http://www.ieee.org/publications standards/publications/rights/index.html for more information.
GILL et al.: SPLINE PATH FOLLOWING FOR REDUNDANT MECHANICAL SYSTEMS 1379

special case of simple curves such as circles. One contribution of A. Class of Systems
this paper is that we enlarge the class of allowable paths, allow-
We consider a fully actuated Euler–Lagrange system with
ing self-intersecting paths and curves that are generated through an N -dimensional configuration space contained in RN and N
spline interpolation of given waypoints. This is accomplished
control inputs u ∈ RN . The model is given by
by designing a numerical algorithm and by using a systematic
approach to generate zero level set representations of the curves. d ∂L ∂L
− = A(q)u
Another contribution of this work is extending the class of sys- dt ∂ q̇ ∂q
tems of [17] to mechanical systems with kinematic redundan-
where q, q̇ ∈ RN are the configuration positions and veloci-
cies, by employing a novel redundancy resolution technique at
ties, respectively, of the system, and L(q, q̇) is the Lagrangian
the dynamic level, yielding bounded internal dynamics. Khatib
function. We assume that L is smooth and has the form
proposed a similar redundancy resolution mechanism for a spe-
L(q, q̇) = K(q, q̇) − P (q) where K(q, q̇) = (1/2)q̇  D(q)q̇ is
cific class of mechanical systems in [18], namely the torque-
the system’s kinetic energy and P : RN → R is the system’s
input model of robot manipulators. However the approach in
potential energy. The inertia matrix D(q) is positive definite for
this paper is to resolve the redundancies directly in the context
all q. Furthermore, A : RN → RN ×N , the input matrix (usually
of path following via feedback linearization, unlike in [18], and
identity), is smooth and nonsingular for all q.
is thus, applicable to general mechanical systems, which may
The system can be rewritten in the standard vector form
include a dynamic map between the system input and the output
forces. To the best of the author’s knowledge, redundancy res- D(q)q̈ + C(q, q̇)q̇ + G(q) = A(q)u (1)
olution in the context of feedback linearization is an unsolved
problem. We show that, under the assumption that the redun- where C(q, q̇) ∈ RN ×N represents the centripetal and Corio-
dant system has viscous friction on each degree of freedom, the lis terms, and G(q) = (dPq ) = ∇P (q) ∈ RN represents the
control law obtained by solving a static, constrained, quadratic gravitation effects [19]. Defining xc := q, xv := q̇, n := 2N ,
optimization problem yields bounded closed-loop internal dy- and x := (xc , xv ) ∈ RN × RN we can express (1) in state
namics. We further validate the control strategy on a nontrivial model form
   
redundant platform with significant modeling uncertainties us- xv 0
ing a robust controller. ẋ = f (x) + g(x)u := + u (2)
In this paper, the class of paths that can be followed are fv (x) gv (xc )
broadened, made possible by systematic approach to generating where f : Rn → Rn and g : Rn → Rn ×n are smooth,
zero level set of a function, and using a numerical algorithm gv (xc ) := D−1 (xc )A(xc ) and fv (x) :=−D−1 (xc )(C(x)xv +
in the controller. A novel approach to resolving redundancies is G(xc )).
proposed. Finally, nontrivial experimental verification including Motivated by the task space of a robotic manipulator, we take
robustification is performed. the output of system (2) to satisfy
The detailed problem statement and proposed approach are
outlined in Section II. The control design is explained in Sec- ∂h(x)
y = h(x), = 0, y ∈ Rp (3)
tion III and experimental results are shown in Section IV. ∂xv
where p is the dimension of the output space and h : Rn → Rp is
smooth. Let J(xc ) := ∂∂xhc , the output Jacobian, be nonsingular.
A. Notation We allow the system to be redundant in the following sense.
Let x, y denote the standard inner product of vectors x and Definition II.1. System (2),(3) is redundant if N > p.
y in Rn . The Euclidean norm of a vector and induced matrix
norm are both denoted by  · . The notation s ◦ h : A → C B. Admissible Paths
represents the composition of maps s : B → C and h : A → B.
We assume that we are given a finite number, nspline ∈ N, of
The ith element of a vector is denoted [x]i . The symbol :=
(p + 1)-times continuously differentiable, parametrized curves
means equal by definition. Given a C 1 mapping φ : Rn → Rm
in the output space of (2)
let dφx be its Jacobian evaluated at x ∈ Rn . If f , g : Rn → Rn
are smooth vector fields we use the following standard notation σ k : R → Rp , k ∈ {1, 2, . . . , nspline } . (4)
for iterated Lie derivatives L0f φ := φ, Lkf φ := Lf (Lkf −1 φ) =
The curves need not be polynomials, but we nevertheless use
dLkf −1 φx , f (x), Lg Lf φ := Lg (Lf φ) = dLf φx , g(x).
the term spline in accordance with common practice. We are
also given nspline nonempty, closed, intervals of the real line
Ik := [λ(k ,m in) , λ(k ,m ax) ] ⊂ R. The desired path is the set
II. PROBLEM FORMULATION
We consider path following problems in the workspace 
nsp lin e

of kinematically redundant, fully actuated, Euler-Lagrange P := σk (Ik ) . (5)


k =1
systems. In this section, we define the class of systems con-
sidered, the class of allowable paths, and conclude by stating We assume that the overall path is (p + 1)-times continuously
the problem studied. differentiable in the following sense:
1380 IEEE TRANSACTIONS ON ROBOTICS, VOL. 31, NO. 6, DECEMBER 2015

Assumption 1 (smoothness of path). The curves (4) satisfy vector can be chosen to be [0 0 1] . Once the appropriate
frame is chosen, the proposed approach for coordinate transfor-
(∀k ∈ {1, 2, . . . , nspline − 1}) (∀i ∈ {0, 1, . . . , p + 1})
mation and control design (see Section III) can be applied with
 
di σk  di σk +1  no additional modifications. •
= .
dλi λ=λ( k , m a x ) dλi λ=λ( k + 1 , m i n ) Path following control design can naturally be cast as a set
stabilization problem. This point of view was successfully taken
In the case of closed paths, the same equality must hold between in [22] and [17]. We also take this approach but, unlike previous
spline index 1 and nspline . study, we do not require that the path P be an embedded, nor
This assumption is required to ensure continuous control ef- immersed, submanifold of the output space. In other words,
fort over the entire path. In the case of spline interpolation the curve may be self-intersecting. Removing this restriction is
(fitting polynomials between desired waypoints), Assumption 1 particularly useful because it allows the curve to go through an
can be enforced by setting it as a constraint in the spline fit- arbitrary set of waypoints in the output space of system (2) and
ting formulation and using polynomials of sufficiently high de- can be constructed using classical spline fitting.
gree. Typically the parameter λ of each curve σk represents
the chord length between waypoints; namely, λ(k ,m in) = 0 and
λ(k ,m ax) = lk where lk is the Euclidean distance between the C. Problem Statement
k’th and (k + 1) waypoints [20]. The problem studied in this paper is to find a continuous feed-
Remark II.2. Assumption 1 can be relaxed if continuity of back controller for system (2), with nspline curves that satisfy
the control signal over the entire path is not required. Further- Assumptions 1 and 2, that renders the path P in (5) invariant
more, if Assumption 1 is only true for i = 0, i.e., the path is and attractive. Invariance is equivalent to saying that if for some
not continuously differentiable, the control input can still be time t = 0, the state x(0) is appropriately initialized with the
kept continuous by designing the desired tangential velocity output y = h(x(0)) on the path P, then (∀t ≥ 0) h(x(t)) ∈ P.
profile in such a way that the output slows down and stops Attractiveness is equivalent to ensuring that for initial condi-
at σk (λ(k ,m ax) ) = σk +1 (λ(k +1,m in) ), and then resumes motion tions x(0) such that the output h(x(0)) is in a neighborhood of
along curve k + 1 in finite time. See Remark III.4 • the desired path P, h(x(t)) under (2) approaches P.
We further assume that the curves (4) are framed. The motion along the path should also be controllable so
Assumption 2 (framed curves). For each spline k, the first p that a tangential position or velocity profile (η ref (t)) can be
derivatives of σk are linearly independent, i.e., tracked. Furthermore, any remaining redundant dynamics (will
show up as internal dynamics for the closed-loop system) must
(∀k ∈ {1, 2, . . . , nspline }) (∀λ ∈ Ik ) be bounded.
 
spanR σk (λ), σk (λ), . . . , σk (λ) = Rp .
(p)
III. MULTIPLE SPLINE PATH FOLLOWING DESIGN
Assumption 2 allows the use of Gramm–Schmidt orthogonal- We begin by defining a coordinate transformation in Section
ization to construct Frenet–Serret frames (FSFs) in the output III-A that depends on a given path segment (4) and the system
space Rp . The use of FSFs for control of mobile robots is a dynamics (2). These coordinates partition the system dynamics
well-known technique [21]. In this paper, we use Assumption 2 into a subsystem that governs the motion transversal to the de-
to generate a zero-level set representation of P in the state space sired path and a tangential subsystem that governs the motion
of (2). Previous studies [17] relied on the zero-level set represen- of the system along the path (see Section III-B). The tangen-
tation to already be available by restricting the class of paths to tial dynamics are further decomposed to reveal the redundant
1-D embedded submanifolds, which precludes self-intersecting dynamics. It will be shown that the system in transformed co-
curves. ordinates has a structure that facilities control design, namely
Remark II.3. Assumption 2 can be relaxed to only requiring the dynamics will appear linear and decoupled. One of the keys
that the curve be regular by not using FSF to construct a basis to this construction is the ability to unambiguously determine
that aligns with the curve at each point along the curve. Con- the spline that is currently closest to the system output (3). By
sider a straight line σ(λ) = [λ 0] ∈ R2 . This curve violates doing so, we are able to deal with self-intersecting curves and
Assumption 2 at all points λ. The first basis vector is taken to be curves (5) that are not embedded submanifolds. A novel re-
the unit tangent vector [1 0] (as is the case in the FSF). The dundancy resolution approach is then proposed to ensure the
normal vector cannot be constructed via FSF, since the curva- redundant dynamics remain bounded (see Section III-C). The
ture is zero. However, one can choose the normal vector to be overall block diagram can be found below in Fig. 1.
[0 1] .
Furthermore, consider a regular torsion free curve in the xy-
plane of a 3-D workspace. This curve also violates Assumption A. Coordinate Transformation
2, since σ (3) (λ) will be a linear combination of σ and σ . How- We construct a coordinate transformation T that maps the
ever, one can choose the first basis vector to again be the unit state x of system (2) to a new set of coordinates that correspond

tangent vector σσ (λ)
(λ) . The unit normal vector can be chosen to to the tangential position/velocity along the path, and the dis-
be the 90◦ rotation of the first basis vector, and the final basis tance and velocity toward/transversal to the path.
GILL et al.: SPLINE PATH FOLLOWING FOR REDUNDANT MECHANICAL SYSTEMS 1381

2) Numerical Optimization for λ∗ and k ∗ : The tangential


coordinates defined by (7) and (8) rely on the computation of
the parameters k ∗ —which characterizes which of the nspline
curves σk (Ik ) is closest to the system’s output—and λ∗ —which
characterizes the point σk ∗ (λ∗ ) closest to the system’s output.
Assumption 3 (Initial λ∗ and k ∗ are known). Based on the
initial conditions of the system at time t = 0, the corresponding
k ∗ ∈ {1, . . . , nspline } and λ∗ ∈ Ik ∗ are known.
Assumption 3 can be satisfied by apriori global minimum
brute-force optimization solvers to find the closest point of
h(x(0)) to the path P. One can do this by quantizing the path
P and searching for the point with minimum distance to the
Fig. 1. Entire control system block diagram. output, while keeping track of the curve number k and the path
parameter λ. The output to this approach will not yield the exact
solution (due to the quantization of P), but will be adequate for
1) Tangential States: For the moment assume that the closest sufficiently small quantization. In the case that multiple global
spline to the output y is known; denote it as k ∗ . In the case that minima exist, one can be chosen arbitrarily. Then for t > 0, a
nspline = 1, the k notation can be dropped to ease readability. numerical local optimizer like gradient descent can be used on-
Furthermore, denote the parameter of spline k ∗ that corresponds line, initialized at the previous time-step’s k ∗ , λ∗ . The algorithm
to the closest point to the output y as λ∗ ∈ Ik ∗ [17] we developed (see Algorithm 1) can be found in Appendix A.
Remark III.1. In [17], the path to be followed was assumed
λ∗ := k ∗ (y) := arg inf y − σk ∗ (λ) . (6) to be a 1-D embedded submanifold, which precludes self-
λ∈Ik ∗
intersecting curves. By employing Algorithm 1 under Assump-
The first tangential state is the projected, traversed arclength tion 3, this study removes that restriction and enlarges the class
along the path of admissible paths.

k −1
Consider first the case in which two curves σi , σj , i, j ∈
η1 = η1 k ∗ (x) := s ◦ ◦ h(x) + sk (λ(k ,max) ) (7) {1, . . . , nspline } overlap. That is, there exist two closed, possi-
k∗ k∗
k =1
bly disconnected, sets Λi ⊂ Ii , Λj ⊂ Ij with (∀λi ∈ Λi )(∃λj ∈
Λj ) σi (λi ) = σj (λj ). Suppose that at the current time-step, we
where have k ∗ = i and λ∗ = λi ∈ Λi . Then, the coordinate transforma-
λ

tion employed is completely determined by the curve σi . At the

dσk ∗ (λ)

sk (λ) :=

next time-step, the algorithm will search Ik for its next update.


dλ. This local search implies that the algorithm will not “jump” to
λ( k , min)
Ij despite the existence of intersection points.
This integral does not have to be computed for real-time imple- The second case, the one in which there is single curve that is
mentation if only tangential velocity control is required, which not injective, is handled similarly. Suppose there exist two values
will be the case in the experiment (see Section IV). Note the λ1 , λ2 ∈ Ik ∗ , λ1 < λ2 , with σk ∗ (λ1 ) = σk ∗ (λ2 ). By continuity,
slight abuse of notation for using η1 to represent both the state it is possible to find two open intervals I1 , I2 ⊂ Ik ∗ with λ1 ∈ I1
and the map. The summation term on the right in (7) is used to get and λ2 ∈ I2 and I1 ∩ I2 = ∅. Now suppose that at the current
the arclength over the entire path P so that η1 remains continu- time-step, we have λ∗ = λ1 . At the next time-step, the algorithm
ous even as the current spline number k ∗ increments/decrements. will search I1 for its next update. This local search implies that
Note that this summation can be computed offline and accessed the algorithm will not “jump” to I2 despite the existence of an
as a look-up-table during real-time control. intersection point.
With η1 representing the projected tangential position of the In addition, when the output y is equidistant to multiple points
output y along the path, tangential velocity is computed by on the path, the algorithm will again just choose the λ∗ that is
taking the time derivative. By the chain rule closest to the previous time-step’s λ∗ , due to the local nature of
the monotonic gradient descent algorithm. •
dsk ∗ dk ∗ ∂h 3) Transversal States: The transversal states represent the
η2 = η2 k ∗ (x) := η˙1 =
dλ∗ dy ∂xc (8) cross-track error to the path using the remaining FSF (nor-
= e1 k ∗ (λ∗ ), J(xc )xv |λ∗ = ◦h(x) mal) vectors as follows. The k ∗ notation will be dropped for
brevity. The generalized FS vectors are constructed applying
(see Appendix B for complete derivation) where e1 is the unit- the Gram–Schmidt Orthonormalization process to the vectors
tangent FS vector σ (λ), σ (λ), . . . , σ (p) (λ)

∗ dσk ∗ dσk ∗  dλ∗ σk ∗ (λ∗ ) ēj (λ)
e1 k ∗ (λ ) := = = . (9) ej (λ) := (10)
dsk ∗ dλ λ=λ∗ dsk ∗ σk ∗ (λ∗ ) ēj (λ)
.
1382 IEEE TRANSACTIONS ON ROBOTICS, VOL. 31, NO. 6, DECEMBER 2015

Proof. See Appendix B. 


By [23, Proposition 5.1.2], for each x∗ ∈ U , it is possible to
find a function ϕ : Rn → Rn −2p so that by the Inverse Function
Theorem [23] there exists a neighborhood Ux ∗ such that the
mapping
T : Ux ∗ ⊆ Rn → T (Ux ∗ ) ⊆ Rn

x → (η1 , η2 , ξ11 , ξ21 , . . . , ξ1p−1 , ξ2p−1 , ζ)


(13)
= (η1 (x), η2 (x), ξ11 (x), ξ21 (x), . . . ,

ξ1p−1 (x), ξ2p−1 (x), ϕ(x))


is a diffeomorphism onto its image. In practice, the domain of
T can often be extended to all of U (see Section IV).
Fig. 2. Example of the FSF when p = 3. Let us bring back the spline notation k to explicitly indicate
that the coordinate transformation is dependent on the curve k ∗ ,
where which is determined using Algorithm 1. Namely, the coordinate
j −1
 transformation can be viewed as a collection of nspline maps
ēj (λ) := σ (j ) (λ) − σ (j ) (λ), ei (λ) ei (λ)
i=1 Tk : Uk ⊆ Rn → Tk (Uk ) ⊆ Rn
for j ∈ {1, . . . , p}. This formulation is well-defined by Assump-
x → (η1 k (x), η2 k (x), ξ11k (x), ξ21k (x), . . . ,
tion 2. For curves that violate Assumption 2, other ad-hoc or-
thonormalization processes can be used, see Remark II.3. The
transversal positions can be computed by projecting the error to ξ1p−1
k
(x), ξ2p−1
k
(x), ϕk (x)) =
the path, y − σ(λ∗ ), onto each of the FS normal vectors
ξ1j −1 = ξ1j −1 (x) := ej (λ∗ ), h(x) − σ(λ∗ )|λ∗ = ◦h(x) (11) ⎡ k
−1 ⎤
⎢ sk (λ∗ ) + sk (λ(k ,m ax) ) ⎥
for j ∈ {2, . . . , p}. Taking time derivatives yields (see Appendix ⎢ k =1 ⎥
⎢ ⎥
B for complete derivation) ⎢ ∗
e1 k (λ ), J(xc )xv  ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
ξ2j −1 := ξ2j −1 (x) = ξ˙1j −1 ⎢ e (λ ∗
), h(x) − σ (λ ∗
) ⎥
⎢ 2k k ⎥
⎢ ⎥
⎢ ⎥
η2 (x) ∗  ⎢ η2 k (x)  ⎥
= e (λ ), h(x) − σ(λ∗ ) ⎢ ∗ e2 k (λ∗ ), h(x) − σk (λ∗ ) +e2 k (λ∗ ), J(xc )xv  ⎥
σ (λ∗ ) j ⎢ σk (λ ) ⎥
⎢ ⎥
⎢ .. ⎥
⎢ ⎥
+ ej (λ∗ ), J(xc )xv  |λ∗ = ◦h(x) (12) ⎢ . ⎥
⎢ ⎥
⎢ ⎥
j ∈ {2, . . . , p}, and e j (λ∗ ) are given in (A.2). If p = 2, then ⎢ e (λ ∗
), h(x) − σ (λ ∗
) ⎥
⎢ pk k ⎥
e 2 (λ∗ ) and h(x) − σ(λ∗ ) are orthogonal and ξ21 simplifies to ⎢ ⎥
⎢ ⎥
e2 (s(λ∗ )), J(xc )xv . Fig. 2 illustrates the p = 3 case. ⎢ η2 k (x)  ⎥
⎢ ∗ ep k (λ∗ ), h(x) − σk (λ∗ ) +ep k (λ∗ ), J(xc )xv  ⎥
4) Diffeomorphism: In this section, we show that the tangen- ⎣ σk (λ ) ⎦
tial and transversal maps defined above can be used to construct ϕk (x)
a diffeomorphism. For brevity, we again drop the spline k nota-
tion. First, define the lift of curve σ to Rn as where λ∗ = k ◦ h(x), k ∈ {1, . . . , nspline }. As we show later,
satisfying a path following task depends on a state feedback
Γ := {x ∈ Rn : ξ11 (x) = ξ12 (x) = . . . = ξ1p−1 (x) = 0} involving the η and ξ states. Thus, it is desirable for η and ξ to
which represents the states x that correspond to the output y remain continuous from one curve on the path to the next, i.e.,
being on the curve. The above set is not necessarily a manifold as k changes via Algorithm 1, to avoid wear on equipment due
since the curves considered can be self-intersecting or even self- to jerky motions. The following proposition will show this.
overlapping, thus is more general to the restricted manifold case Proposition III.3. The coordinate transformation
analyzed in [17].
T̄k (x) := [η1 k (x), η2 k (x), ξ11k (x), ξ21k (x), . . . , ξ1p−1 (x),
Lemma III.2. There exists a domain U ⊆ Rn with Γ ⊂ U k

such that for all x ∈ U , and (6) is solved by Algorithm 1, ξ2p−1 (x)] (14)
k
the 2p functions (7), (8), (11), (12) have linearly independent
differentials. is continuous as k changes by Algorithm 1.
GILL et al.: SPLINE PATH FOLLOWING FOR REDUNDANT MECHANICAL SYSTEMS 1383

B. Dynamics and Control


The dynamics in transformed coordinates are

η̇1 = η2

η̇2 = L2f η1 (x) + Lg Lf η1 (x)u

ξ˙11 = ξ21

ξ˙21 = L2f ξ11 (x) + Lg Lf ξ11 (x)u


(15)
..
.
Fig. 3. Spline k and spline k + 1, their stitch point σ k (λ(k , m a x ) ) =
σ k + 1 (λ(k + 1 , m in ) ), and the hyperplane.
ξ˙1p−1 = ξ2p−1

Proof. Based on Algorithm 1, k changes when the output ξ˙2p−1 = L2f ξ1p−1 (x) + Lg Lf ξ1p−1 (x)u
of the system crosses the hyperplane shown in Fig. 3. Thus,
we must show that T̄k (x) = T̄k +1 (x) for x that correspond to ζ̇ = Lf ϕ(x) + Lg ϕ(x)u =: fζ (x, u)
the output y = h(x) on this hyperplane. This is equivalent to
showing where x = T −1 (η, ξ, ζ). The Lie derivatives can be computed
given the state maps from Section III-A4 and the class of system
(∀x ∈ {x ∈ Rn |x = (k ◦ h(x))−1 (λ(k ,m ax) )}) (2)
T̄k (x) = T̄k +1 (x). η2
L2f η1 (x) = e (λ∗ ), J(xc )xv 
σ (λ∗ ) 1
First, the coordinate transformation relies on the computation of
λ∗ = k ◦ h(x), which can be easily verified to be continuous  
∂(J(xc )xv )

in x for a fixed k. The tangential position for a fixed k is contin- + e1 (λ ), xv + J(xc )fv (x)
∂xc
uous since sk (λ∗ ) is a function of σ (λ∗ ), which is continuous
by Assumption 1. On the hyperplane, η1 k (x) = sk (λ(k ,m ax) ) +
k −1 k Lg Lf η1 (x) = e1 (λ∗ ) J(xc )gv (xc )
i=1 si (λ(k ,m ax) ) = i=1 si (λ(k ,m ax) ) = η1 k + 1 (x) and is
still continuous at the transition.  
∂(J(xc )xv )
For the remaining states, h(x), J(x) are continuous by the L2f ξ1j −1 (x) = ej (λ∗ ), xv + J(xc )fv (x)
∂xc
class of systems (2). The remaining terms are the FS vec-
tors and its derivatives. For a fixed k, the FS vectors ej k (λ∗ ) η2 ∗ 
depends on σ (j ) (λ∗ ) for j = 1, . . . , p by (10), and thus, will + e (λ ), 2J(xc )xv − e1 η2
σ (λ∗ ) j
be continuous by Assumption 1. Furthermore, the derivative
  2
of the FS vectors are governed by the FS equations for gen- η2

eral spaces (A.2) , and depend only on the generalized cur- + h(x) − σ(λ ), e j (λ∗ )
e (λ),e i + 1 (λ)  σ (λ∗ )
vatures Xi (λ) = i σ (λ) , i ∈ {1, . . . , p − 1}. Thus, the
 
highest derivative that appears again is σ (p) (λ∗ ) and so the FS Lg Lf η1 (x) ∗ ∗
2 σ (λ ), σ (λ )
vector derivatives will remain continuous for a fixed spline +e j (λ∗ ) − η
σ (λ∗ ) 2
σ (λ∗ )4
k. At the transition point, ej k (λ(k ,m ax) ) = ej k + 1 (λ(k +1,m in) )
(j ) (j )
holds if and only if σk (λ(k ,max) ) = σk +1 (λ(k +1,min) ) for j ∈ Lg Lf ξ1j −1 (x) = ej (λ∗ ) J(xc )gv (xc )
{1, . . . , p}. This is satisfied by Assumption 1. To show that
e j k (λ(k ,m ax) ) = e j k + 1 (λ(k +1,m in) ) for j ∈ {1, . . . , p}, by (A.2) Lg Lf η1 (x)
it suffices to show that the generalized curvatures are continu- + (h(x) − σ(λ∗ )) e j (λ∗ )
σ (λ∗ )
ous at the transition, i.e., Xi k (λ(k ,m ax) ) = Xi k + 1 (λ(k +1,m in) )
for i ∈ {1, . . . , p − 1}. By definition of the curvatures, this for j ∈ {2, . . . , p} and λ∗ =  ◦ h(x). Physically, see their def-
then simplifies to showing e j k (λ(k ,m ax) ) = e j k + 1 (λ(k +1,min) ) initions in Section III-A, the η-subsystem represents the dy-
for j ∈ {1, . . . , p − 1}. These derivatives can be expressed by namics tangent to the path, and the ξ-subsystem represents the
evaluating the derivative of (10), and so the equation will hold dynamics transversal to the path. Thus, the redundant dynamics
(j ) (j )
if σk (λ(k ,max) ) = σk +1 (λ(k +1,min) ) for j ∈ {1, . . . , p}. Again fζ represent the dynamics of the system (2) that do not produce
by Assumption 1 this holds.  any output motion.
1384 IEEE TRANSACTIONS ON ROBOTICS, VOL. 31, NO. 6, DECEMBER 2015

It then follows from Lemma III.2 that the decoupling matrix Unlike kinematic redundancy resolution techniques [19], we
⎡ ⎤ seek a scheme at the dynamic level that can incorporate actuator
Lg Lf η1 (x)
constraints while ensuring the internal dynamics of the system
⎢ ⎥
⎢ Lg Lf ξ11 (x) ⎥ are bounded. The approach should also work when the joint-
⎢ ⎥
β(x) := ⎢ .. ⎥= space and task-space dynamics are not necessarily related by
⎢ ⎥
⎣ . ⎦ a static input conversion map (as is the case for torque-input
Lg Lf ξ1p−1 (x) model of a robot manipulator [18]). Such systems include a
⎡ ⎤ combined motor and manipulator model (see Section IV, where
e1 (λ∗ ) a dynamic relation exists between motor input voltage and end-
⎢ ⎥ effector force), or mobile manipulator systems.
⎢ (h(x) − σ(λ∗ )) ∗ ⎥
⎢ ∗  ∗ ⎥
e2 (λ )e1 (λ ) + e2 (λ ) ⎥ Suppose the ξ-subsystem is stabilized and the η-subsystem is
⎢ σ (λ∗ )
⎢ ⎥ tracking a desired profile η ref (t) by some outer loop controller
⎢ .. ⎥J(xc )gv (xc )
⎢ . ⎥ for v. The zero dynamics correspond to the redundant dynam-
⎢ ⎥
⎢ ⎥ ics ζ̇ = fζ (x, u) under the transform (17) x = T −1 (η ref (t), 0, ζ)
⎣ (h(x) − σ(λ )) ∗  ⎦
∗ ∗  ∗  and vη = η̇2ref (t), vξ = 0. In order to ensure a well-behaved re-

ep (λ )e1 (λ ) + ep (λ )
σ (λ ) sponse, we must ensure boundedness of the zero dynamics.
has full rank for all x ∈ U . This is equivalent to saying that for With v generated by some outer loop controller, there is some
each x ∈ U , system (2) with output (η1 (x), ξ11 (x), . . . , ξ1p−1 (x)) freedom in the choice of the control input u under the feedback
has a vector relative degree of {2, . . . , 2} and we can perform transform (17) (recall v ∈ Rp , u ∈ RN =n /2 and n > 2p); this
partial feedback linearization. Let freedom can be used to enforce boundedness of the zero dy-
  namics. Since the relation from u to the states is dynamic, one
α(x) := L2f η1 (x) L2f ξ11 (x) . . . L2f ξ1p−1 (x) (16) can use dynamic programming to achieve some desired (and
  bounded) trajectory in the zero dynamics. However, this in gen-
and introduce an auxiliary input v = vη vξ ∈ R × Rp−1 eral is quite complicated. This is why previous studies on path
such that following have relied on the zero dynamics being absent or as-
v = β(x)u + α(x) (17) sumed to be stable. To make things simple, consider the static
optimization
the dynamics (15) become
min (u − r(x)) W (u − r(x)) (18)
ζ̇ = fζ (x, u) η̇1 = η2 ξ˙1j = ξ2j u

under the constraint (17). It is a static minimization of a quadratic


η˙2 = vη ξ˙2j = vξ j
function of u under a linear constraint, or which a closed form
where j ∈ {1, . . . , p − 1} and x = T −1 (η, ξ, ζ). solution for u can be solved for using Lagrange multipliers.
In U the ξ-subsystem is linear and controllable, and can The matrix W ∈ Rn ×n is an invertible weighting matrix, and
be stabilized to ensure attractiveness and invariance of the the function r : Rn → Rn is used to bias the control input u to
path P. One can do this using a simple PD controller vξ j = achieve desired behavior in the zero dynamics. For example, if
−KPj ξ1j − KD j j
ξ2 , j ∈ {1, . . . , p − 1}, for positive KPj , KD
j
. r(x) ≡ 0, then we are minimizing control effort while staying
Another transversal controller is (22) which is used on the exper- on the path and following some desired η ref (t).
imental platform to overcome modeling uncertainties. Doing so Most real systems have actuation and configuration limits.
will stabilize the largest controlled invariant subset of Γ known Thus, another useful criteria for redundancy resolution is to
as the path following manifold [17]. The η-subsystem is also lin- design u so that the configuration variables xc are driven away
ear and controllable, thus a tangential controller can be designed from their limits. For example, consider a joint on a manipulator.
for vη to track some desired tangential position or velocity pro- If this joint is at its minimum value, setting the control effort
file η ref (t). A block diagram of the entire control system can be corresponding to this joint to be the maximum control effort will
seen in Fig. 1. likely increase the value of the joint, thereby pushing it away
Remark III.4. Suppose a desired tangential velocity trajec- from the negative joint limit. The corresponding r function to
tory is to be tracked η2ref (t). In the case that Assumption 1 fails achieve this behavior in (18) is
for i > 0, η2ref (t) can be designed such that it approaches zero ui m a x − ui m i n
at the junction of the splines, then ramping up to, for instance, r(xc )i = − (xc i − xc i m i n ) + ui m a x (19)
xc i m a x − xc i m i n
some desired steady-state value just after the junction. This way,
the control input remains continuous and the system avoids un- for i ∈ {1, . . . , N }, or graphically shown below in Fig. 4.
wanted transients associated with the differential discontinuities Using Lagrangian multipliers, the solution to (18) under con-
of the path. • straint (17) is

u = β † (x)(v − α(x)) + In ×n − β † (x)β(x) r(x) (20)
C. Redundancy Resolution
 −1
If n = 2p, there is no ϕ map, and thus, no redundant dynam- where β † (x) = W −1 β(x) β(x)W −1 β(x) and In ×n is
ics. However, if n > 2p, then the system has internal dynamics. the identity matrix.
GILL et al.: SPLINE PATH FOLLOWING FOR REDUNDANT MECHANICAL SYSTEMS 1385

yields the dynamics in the transformed coordinates


η̇1 = η2
b2 1
η̇2 = (ζ2 − η2 ) + u2 =: vη
m2 m2
ζ̇1 = ζ2
 
b1 + b 2 b2 1
ζ̇2 = − ζ2 + η2 + u1 .
m1 m1 m1
The corresponding terms in the feedback transform (17) are
Fig. 4. Function r(xc ) for avoiding joint and actuation limits. α(x) = mb 22 (x2 − x4 ) and β(x) = [0 m12 ]. Now, assume the
desired tangential reference trajectory as
 ref 
η1
η ref (t) =
0

for some constant η1ref . The control law vη = KP (η1ref − η1 ) +


KD (−η2 ) for positive KP , KD will force η to converge to
η ref . Thus, the zero dynamics are the redundant dynamics when
η = η ref and α(x) + β(x)u = vη = 0, i.e.,

Fig. 5. A planar two-DOF fully-actuated system where m 1 , m 2 , b1 , b2 > 0. ζ̇1 = ζ2


 
b1 + b 2 1
ζ̇2 = − ζ2 + u1 .
Conjecture III.5. Using (20) and (19) to generate the control m1 m1
input u results in boundedness of the redundant dynamics ζ̇ = Using the controller (20) yields the zero dynamics
fζ (x, u), while achieving path following and maintaining joint
limits, in the situation that system (1) has inherent damping. ζ̇1 = ζ2
Conjecture III.5 has been tested and verified on the following  
b1 + b 2 1
two examples 1 and 2, and on our experimental platform in ζ̇2 = − ζ2 + r(x)1
Section IV. m1 m1
Example 1 (2-DOF linear system). Consider the linear sys- and, thus, the zero dynamics can be made globally exponen-
tem in Fig. 5 with output y ∈ R taken to be the position of the tially stable if, for example, r(x)1 is a linear function of
top-most block. Let mi , bi , and ui be the mass, coefficient of ζ1 = x1 with negative slope. This is precisely the case with
friction, and force acting on each respective block. our proposed r function (19). Furthermore, the equilibrium
The corresponding dynamics are point will be ζ2 = 0, and the value of x = T −1 (η ref , ζ1 , ζ2 = 0)
⎡ ⎤ ⎡ ⎤ for which r(x)1 vanishes. In our proposed r function, this oc-
0 1 0 0 0 0 curs when ζ1 = x1 = u 1 u 1 m−ua x1 (x1 m a x − x1 m i n ) + x1 m i n . If
⎢ ⎥ ⎢ ⎥ m ax m in
u1 m a x = −u1 m i n , which usually is the case for practical ex-
⎢ ⎥ ⎢ 1 ⎥
⎢ 0 − b1 + b 2 0
b2
⎥ ⎢ 0 ⎥ amples, then the equilibrium point is ζ1 = 12 (x1 m i n + x1 m a x ),
⎢ m1 ⎥
m1 ⎢ ⎥
ẋ = ⎢ ⎥x + ⎢ m1 ⎥u
⎢0 0 0 1⎥ ⎢0 0 ⎥
the average value of the joint limits. Thus, the path following
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ constraints are met and the zero dynamics are stabilized while
⎣ b2 b2 ⎦ ⎣ 1 ⎦ achieving the objective of staying within joint limits using (19).
0 0 − 0
m2 m2 m2 
Example 2 (3-DOF planar manipulator). Consider a planar
=: Ax + Bu
  three-DOF robot manipulator and the desired path of a circle,
y = 0 0 1 0 x. and the point η1 = 0 on the path is to be stabilized, shown in
Fig. 6 .
For this particular example, N = 2, p = 1. Thus p − 1 = 0 Here N = 3, p = 2, and thus, the dimension of redundancy is
and there are no transversal dynamics. Therefore, under our 1. Let’s further assume that each link has unit mass and inertia,
path following context, the position of the output along the path with the center of mass of each link be at the midpoint of each
is η1 = x3 . The remaining function ϕ : R4 → R2 is chosen to link. Without loss of generality, we assume gravity is ignored.
complete a diffeomorphism. For instance The dynamics can be derived as per [19] to yield the form (1).
Let the redundant state be ζ1 = ζ1 (x) = xc 1 + xc 2 + xc 3 ,
T : R4 → R4 the sum of the joint angles, the angle the end-effector
makeswith the ground. Thus ζ2 = xv 1 + xv 2 + xv 3 , and
x → (η1 (x), η2 (x), ζ1 (x), ζ2 (x)) = (x3 , x4 , x1 , x2 ) ζ̇2 = 3i=1 [f (x) + g(x)u]i |x=T −1 (η ,ξ ,ζ ) . The zero dynamics
1386 IEEE TRANSACTIONS ON ROBOTICS, VOL. 31, NO. 6, DECEMBER 2015

Fig. 6. Planar three-DOF fully-actuated manipulator whose task is to stabilize


a point on a circle. Fig. 7. Phase portrait of the zero dynamics for the three-DOF manipulator
example with G = 0.

correspond to these redundant dynamics when ξ = 0 and η = 0


and, thus, v = 0. Stability of the zero dynamics depends on the D. Continuity of Control Input
choice of u. The tangential and transversal dynamics using the linearizing
Suppose that u is chosen as in (20) with r from (19). The control input v become a series of double integrators. Stabilizing
parameters for the r function are ui m a x = −ui m i n = 10 for such dynamics can be done using linear control techniques. For
i = 1, 2, 3. The joint limits are chosen so that x = T −1 (η = the path P it would be nice for the control input u to remain
η ref , ζ1 = 0, ζ2 = 0) is the average value of the joint limits. continuous as the output moves from one curve to another within
This is done to see if ζ = (0, 0) will become an equilibrium P.
point for the zero dynamics. Theorem III.8. If the auxiliary input v is chosen to be a con-
The resulting phase curves for the zero dynamics for the tinuous function of T̄k (x) with k = k ∗ selected by Algorithm 1,
three-DOF simple robot case with viscous friction can be found then the control input u is continuous for the entire splined path
in Fig. 7. P.
Notice there are two equilibrium points in the zero dynamics Proof. If v is a continuous function of η and ξ, then v is
phase plane: One is unstable and one that is asymptotically continuous if and only if the η and ξ states are continuous. This
stable. The unstable equilibrium point is the singularity config- is in fact the case by Proposition III.3, thus v is continuous over
uration of the manipulator on the zero dynamics manifold. The the entire path.
asymptotically stable equilibrium point is located at ζ = (0, 0), The control input u is calculated based on the feedback trans-
which corresponds to the joint positions being at the midpoint form (17) for the k’th spline:
of their joint limits. Furthermore, if the system were to have
no viscous friction, ζ = (0, 0) will no longer be asymptotically v = βk ∗ (x)u + αk ∗ (x).
stable. 
Remark III.6. The proposed approach assumes that the sys- Since v is continuous, u is continuous if and only if βk ∗ (x)
tem is fully actuated. To examine the under-actuated system and αk ∗ (x) are continuous (assuming the optimization to solve
case, let m be the number of inputs, p be the dimension of the for u in the redundant case is also smooth). Equivalently, in a
output space, and N be the degrees of freedom of the system. similar manner to Proposition III.3, we must show that
There is a basic requirement ([17]) that m ≥ p − 1 in order to 1) βk (x) and αk (x) are continuous given k;
only follow the path, and m ≥ p in order to follow the path and 2) βk (x) and αk (x) are continuous at the transition of k
move along it in a desired fashion. (∀x ∈ {x ∈ Rn |x = (k ◦ h(x))−1 (λ(k ,m ax) )})
If N > m = p, it is still possible to follow the path in a
desired fashion, however the internal dynamics would be com- βk (x) = βk +1 (x) , αk (x) = αk +1 (x).
pletely uncontrollable, since all the freedom over the control
input will be used to stay on the path and traverse the path. If Using the definition for βk (x) from Section III-B, the term
N = m > p, then Conjecture III.5 applies. If N > m > p, then J(xc )gv (xc ) is continuous over the path (by system assump-
there will be some uncontrolled internal dynamics and the pro- tions) and is not dependent on the spline k. The remaining terms
posed redundancy resolution approach may not work to ensure are all used in T̄k (x), and thus, it follows from Proposition III.3
boundedness of these internal dynamics. • that βk (x) is continuous.
Remark III.7. In the case that the system hits a singularity Similarly, using the definition for αk (x) from Section III-B,
(J(x) loses rank), the controller will fail as the decoupling ma- the terms e j k (λ∗ ), j ∈ {1, . . . , p} are continuous for a given
trix β loses rank, and there will no longer be a solution to the spline k because by using the FS formulae from Proposition
(p+1) ∗
feedback transformation (17) or (20). The proposed method- III.3, the highest derivative that appears will be σk (λ ); our
p+1
ology assumes that J is nonsingular by the class of systems path is C by Assumption 1. The remaining terms in α are
(Section II-A). Practically, one just has to ensure J(x) is non- continuous since they are the same ones in T̄k (x), which were
singular in the neighborhood of Γ = h−1 (P). • already shown to be continuous in Proposition III.3. 
GILL et al.: SPLINE PATH FOLLOWING FOR REDUNDANT MECHANICAL SYSTEMS 1387

the (known) initial output position y0 = h(x0 ). Then, when the


real-time control law is run, Algorithm 1 is used to determine
the k ∗ and λ∗ at each time-step. The coordinate transforma-
tion follows from Section III-A4. Since n − 2p = 2, we need
a map ϕk : Rn → R2 to complete the diffeomorphism. We let
ϕ1 k (x) = xc 2 + xc 3 + xc 4 and ϕ2 k (x) = xv 2 + xv 3 + xv 4 for
all k to represent the angle and its rate, respectively, of the end-
effector with respect to the ground plane. It can be shown that
this completes the diffeomorphism.
The dynamics in the transformed space are then
η̇1 = η2
η̇2 = L2f η1 ∗k (x) + Lg Lf η1 ∗k (x)u
Fig. 8. The CPM with the joint coordinates and output space labelled.
ξ˙11 = ξ21
IV. EXPERIMENT ξ˙21 = L2f ξ11∗k (x) + Lg Lf ξ11∗k (x)u
A. System ξ˙12 = ξ12∗k
The test platform is the Clearpath Robotic Manipulator
(CPM) (see Fig. 8) which is a four degree of freedom, fully ξ˙22 = L2f ξ12∗k (x) + Lg Lf ξ12∗k (x)u
actuated system (N = 4). The shoulder, elbow, and wrist links
ζ̇1 = ζ2
are actuated by dc linear actuators. The dynamics are derived in
[22] and is of the form (1). The dimension of the output space is 
4

p = 3 – y1 and y2 are the end-effector positions projected on the ζ̇2 = [fv (x) + gv (x)u]i
ground plane, and y3 is the end-effector’s height off the ground. i=2
The input to the system is the motor voltages. Since N > p, the where x = Tk−1 ∗
∗ (η, ξ, ζ), k is chosen by Algorithm 1, and ζ̇
CPM system is redundant. represent the redundant dynamics for path following.
Setting v = βk ∗ (x)u + αk ∗ (x) as previously defined in (17),
B. Path Generation the following partially linearised system is obtained:
Waypoints in the 3-D workspace were specified a-priori, and
a standard spline-fitting process using polynomials [20] was η˙1 = η2 ξ˙11 = ξ21 ξ˙12 = ξ22
used to fit splines through these way points while ensuring η˙2 = vη ξ˙21 = vξ 1 ξ˙22 = vξ 2
fourth-derivative continuity. Thus, quintic polynomial splines
are required to fit the waypoints. ζ̇ = f¯ζ (x, v)
A total of 15 way points are specified. The way points were
placed to create self-intersections in the path to show the robust- where x = Tk−1 ¯
∗ (η, ξ, ζ) and fζ represents the redundant dynam-

ness of Algorithm 1. Mathematically, our path is regular, and ics based on our choice of control input u. The desired task is
C 4 satisfies Assumptions 1 and 2, and is given as the following to track a constant tangential velocity profile (i.e., to track some
after spline interpolation η2ref ) while staying on the path (force ξ to go to zero). Design-
ing a controller for v is a linear control design problem; the one
σ k : Ik → R 3 , k = 1, 2, . . . , 14 found in [22] is used as it was shown to be robust to the modeling
⎡ 5 ⎤ inaccuracies. The tangential controller is a PI controller

a λ i 
⎢ i=0 i ⎥ vη (η, t) = KP η2ref − η2 (t) +
⎢ ⎥
⎢ 5 ⎥

λ → ⎢ i ⎥
bi λ ⎥ t
⎢ i=0 ⎥  ref (21)
⎣ 5 ⎦ KI η2 − η2 (τ ) dτ.
ci λ i
0
i=0

where Ik = [0, lk ], and lk is the chord length from the way point For the transversal controller, let ξ = ξ11 , ξ21 , ξ12 , ξ22 , vξ =
k to k + 1. (vξ 1 , vξ 2 ). Then
!
K1 ξ/ξ : ξ ≥ μ > 0
C. Control Design vξ = (K + K0 ) ξ + (22)
K2 ξξ : ξ < μ.
The first step in the control design is to define the coordinate
transformation. The k ∗ and λ∗ are determined by Algorithm where K, K0 , K1 , K2 ∈ R3×3 , μ ∈ R are constants that depend
1. The initial guess for Algorithm 1 is determined a-priori by on a robustness criteria and are used as tuning parameters [22],
solving the optimization globally using brute force and given [24].
1388 IEEE TRANSACTIONS ON ROBOTICS, VOL. 31, NO. 6, DECEMBER 2015

Fig. 9. Output position.


Fig. 11. Transformed state positions.

Fig. 10. Algorithm 1 information.


Fig. 12. Joint angles.

To solve u based on the auxiliary control v, the optimization


tances, so an inverse measurement model is used to retrieve the
is done as outlined in Section III-C using (19). The actuation
states xc of the system. The encoder resolution for the waist
limits are ui m a x = −ui m i n = 50% duty cycle for i = 1, . . . , 4.
is 1.3E − 5 rad, and for the linear actuators is 4.2E − 5 in.
The joint limit values xc i m a x , xc i m i n were set to their true limits
The derivative of xc is numerically computed to retrieve the
for joints i = 1, 2, 3, and for the wrist joint (i = 4) two different
xv states using a first-order approximation. The tangential con-
runs were done, one with limits set to 0 − 45 degrees and another
troller (21) is the only dynamic part of the control algorithm,
to 45 − 90 degrees. The results are found in the subsequent
and is discretized also using a first-order approximation.
section.
We implement the path following controller on the CPM via
D. Results
Labview Real-Time Module to control the motor PWM am-
plifiers and to read the optical encoders. The loop rate of the The results of the path following controllers using both joint
controller is 20 ms. The encoders read the linear actuator dis- limit values can be found in Figs. 9–13. The output of Algorithm
GILL et al.: SPLINE PATH FOLLOWING FOR REDUNDANT MECHANICAL SYSTEMS 1389

Fig. 14. At the start of the run, the true λ∗ is known. As the output y moves,
at each subsequent time-step a numerical optimizer is likely to find the global
minimum of y − σ k ∗ (λ) if initialized at the previous time-step’s λ∗ , since
the global minimum will be near.

Furthermore, a redundancy resolution scheme is proposed


Fig. 13. Control effort.
based on a static optimization. A conjecture is made stating
that this scheme can yield bounded zero dynamics and, in par-
ticular, satisfy an objective of staying away from joint limits.
1 is also shown for reference, with the number of iterations the This scheme has been validated in two analytical examples, as
gradient descent takes to converge at each time-step shown. well as on our experimental platform. A rigorous proof may be
The path following controller naturally converges to the clos- direction for future study. In addition, a dynamic optimization
est point on the path due to the explicit stabilization of the path may be done to account for the system dynamics in the case that
following manifold. the system does not have inherent damping, which may also be
Note that in the Cartesian plot, the responses are very similar, direction for future study.
with similar path errors. The transformed state plots also show
this as expected: the controllable η and ξ subsystems behave
APPENDIX A
the same in both scenarios, because these subsystems, under
NUMERICAL OPTIMIZATION
the feedback transform, do not depend on the redundant state
dynamics (ζ). The redundant state ζ trajectory differs, however, Due to the nature of numerical algorithms, the computation
since we are using the redundancy to maintain different joint of λ∗ and k ∗ for t > 0 is done discretely. At the next time-step
angle limits using (18), (19). The plots show well-behaved dy- t = Δt (where Δt is sampling time of the computer) and as the
namics and boundedness for ζ as we had postulated for systems output y moves, the next closest local minimum of y − σk ∗ (λ)
with inherent damping. is the global minimum, assuming that the output y has not moved
Closer inspection of the xc states in Fig. 12 shows that indeed far within the time-step. Thus, simple numerical algorithms like
our controller was able to satisfy the respective joint angle limits. gradient descent can be used to find the nearest local minimum
The angle trajectories are also slightly different for the first which will end up being the global minimum. The idea is illus-
three joints, because maintaining the output on the path with a trated in Fig. 14 above.
different preferred position of the wrist forces the angles for the For a moment, assume that the output y is already on the
elbow and shoulder links to adjust accordingly. All this is done path (y = σk ∗ (λ∗ )). If the output y moves too far within one
automatically by (18),(19). time-step (corresponds to a large change in the path parameter
Fig. 13 shows well-behaved control action without chattering. λ∗ ), then there may be a local minimum between the initial
guess (the previous time-step’s solution) and the true global
minimum. Thus, we can ensure that a numerical algorithm will
V. CONCLUSION AND FUTURE WORK not get stuck at such a well by ensuring the path parameter
This paper proposes a method for following general paths only changes by some amount Δλ, which keeps the function
in the form of sequences of curves; most notably are spline y − σk ∗ (λ)y =σ k ∗ (λ∗ ) convex for λ ∈ [λ∗ − Δλ, λ∗ + Δλ]. If
interpolated paths which can be made to go through arbitrary σk ∗ is unit-speed parametrized, i.e., σ (λ) = 1 for all λ, then
way points. The path following manifold corresponding to this Δλ corresponds to the allowable distance along the curve that
path is stabilized, thus rendering the path attractive and invariant. can be travelled.
A numerical algorithm is used to allow the use of paths which This Δλ is a conservative estimate for the allowable change
are self-intersecting. in parameter in one time-step, since requiring the function to
1390 IEEE TRANSACTIONS ON ROBOTICS, VOL. 31, NO. 6, DECEMBER 2015

be convex is sufficient, not necessary to ensure convergence


Algorithm 1. Determining λ∗ and k ∗ at each time step.
of a numerical algorithm to λ∗ if initialized properly. In logic
notation, Δλ must satisfy Input: The closest spline k ∗ and corresponding λ∗ , step

size α, the gradient ∂  ¯ k∗
∂ λ (λ ), and an for the
stopping criterion.
(∀λ∗ ∈ Ik ∗ ) (∀λ ∈ [λ∗ − Δλ, λ∗ + Δλ] ∩ Ik ∗ )
Output: The closest spline k ∗ and the λ∗ minimizing
" #
¯ k ∗ (λ) = y − σk ∗ (λ).

d2 y − σk ∗ λ)y =σ k ∗ (λ∗ )
∗ 
>0 1: Initialize  ¯ λ∗ =  ¯ k ∗ (λ∗ ), g = ∂  ¯ k∗
∂ λ (λ )
dλ2 2: repeat
which is equivalent to 3: λ∗ ← λ∗ − αg/ g , ¯ λ∗ ← 
 ¯ k ∗ (λ∗ )
4: if ¯ λ∗ < ¯ λ∗ then
(∀λ∗ ∈ Ik ∗ ) (∀λ ∈ [λ∗ − Δλ, λ∗ + Δλ] ∩ Ik ∗ ) 5: λ∗ ← λ∗ ,  ¯ λ∗ ←  ¯ λ∗
∗ 
6: g ← ∂ λ (λ )
∂¯ k∗
σk ∗ (λ∗ ) − σk ∗ (λ), σk ∗ (λ)
7: α ← 1.2α {increase the step size}
σk ∗ (λ∗ ) − σk ∗ (λ), σk ∗ (λ)2 8: else
< σk ∗ (λ) .
2
+ (A.1) 9: α ← 0.5α {decrease the step size}
σk ∗ (λ∗ ) − σk ∗ (λ)2
10: end if
The relation in (A.1) can be used as a test to infer the 11: until |λ∗ − λ∗ | <
allowable speed at which the output y can traverse a path 12: if λ∗ > max(Ik ∗ ) then
in order for a numerical optimizer to succeed in evaluating 13: k ∗ ← k ∗ + 1
k ∗ (y) = arg inf λ∈Ik ∗ y − σk ∗ (λ). In particular for a unit- 14: GOTO Line 1
speed parametrized curve and assuming the output is on the 15: else if λ∗ < min(Ik ∗ ) then
path P, if (A.1) holds for some Δλ, then the allowable speed 16: k ∗ ← k ∗ − 1
λ
along the curve (η2 ) is Δ Δt . 17: GOTO Line 1
Example 3 (Ellipse). Let nspline = 1 and consider the path 18: end if
of a single ellipse (the k ∗ subscript will be dropped) σ(λ) =
(2 cos(λ), sin(λ)). When λ∗ = 0, all λ ∈ [−1.5136, 1.5136] sat-
isfies the inequality in (A.1). This means that when the output known neighborhood of the tangential velocity, the step size α
is at σ(0), the change in the path parameter in one time-step in Algorithm 1 can be tuned in order to minimize the number of
is +/ − 1.5136. This value can be solved for analytically or steps taken in the gradient descent, and thus, the computational
numerically using the inequality in (A.1). We can run the same load.
test for all λ∗ over the path and take the smallest resulting range
to be the Δλ. 
APPENDIX B
A numerical algorithm like steepest descent works for finding
SUPPORTING PROOFS AND DERIVATIONS
λ∗ if it starts within Δλ of λ∗ , however it normally takes many
iterations to converge since the algorithm takes small step sizes Proof of Lemma III.2 Note that (6) is solved for by Algo-
to the solution [25]. Another approach is to use some knowledge rithm 1, so if the output y is equidistant to multiple points
about η2ref to adjust the step size. In particular, if the path is unit- on the path, then a λ∗ is always well defined by the local
speed parametrized, one could use an initial step size of η2ref Δt search.
in the direction of the steepest descent to quickly approach the Next, we write the differentials for each function
solution. If the path is not unit-speed parametrized, a map of $ %
η1ref (t) and λ∗ can be constructed using (7) sampled at each ∂η1 ds d
= J(xc ), 01×N
time step, and the smallest jump in λ∗ can be used as the initial ∂x dλ dy
step size. An algorithm like monotonic gradient descent with  
= e1 (λ∗ ) J(xc ), 01×N
adaptive step size works nicely (Algorithm 1) using this initial
step size [26]. ∂η2  
= ∗, e1 (λ∗ ) J(xc )
Determining k ∗ is just a matter of checking if the λ∗ com- ∂x
puted by the numeric algorithm is outside the domain Ik ∗ . If j −1 $  
∂ξ1 ∗  1 ∗ ∗ 
it is, then k ∗ must be incremented or decremented, as done in = (h(x) − σ(λ )) e (λ )e1 (λ )
∂x σ (λ∗ ) j
Algorithm 1. Let  ¯ k ∗ (λ) := y − σk ∗ (λ) be the function to
be minimized. The algorithm for determining λ∗ and k ∗ can be  
+ ej (λ∗ ) J(xc ), 01×N
found in Algorithm 1.
$   
Algorithm 1 is ran at each time-step in order to calculate the ∂ξ2j −1 1
= ∗, h(x) − σ(λ∗ ) e (λ∗ )
coordinate transformation. In Algorithm 1, lines 1 to 11 are the ∂x σ (λ∗ ) j

familiar monotonic gradient descent algorithm with step size    %
adaptation [26]. Lines 12 to 18 determine which spline we are ∗  ∗ 
e1 (λ ) + ej (λ ) J(xc )
on. Depending on the path following application, if there is a
GILL et al.: SPLINE PATH FOLLOWING FOR REDUNDANT MECHANICAL SYSTEMS 1391

where ∗ denotes a vector of dimension 1 × N . Looking Generalized FS equations [28]


∗ ) (h(x) −
1
at the transversal terms, the product σ (λ
∗ 
 ∗ ⎡ ⎤
σ(λ )) ej (λ ) produces a scalar, call it α. Thus, the e 1 (λ)
⎢ ⎥
terms become ⎢ e (λ) ⎥
⎢ 2 ⎥
⎢ ⎥
⎢ . ⎥
∂ξ1j −1   ⎢ . ⎥ = σ (λ)
⎢ . ⎥
= αe1 (λ∗ ) + ej (λ∗ ) J(xc ), 01×N ⎢ ⎥
∂x ⎢ ⎥
⎢ ep −1 (λ) ⎥
⎣ ⎦
∂ξ2j −1   
= ∗, αe1 (λ∗ ) + ej (λ∗ ) J(xc ) . e p (λ)
∂x
⎡ ⎤⎡ ⎤
0 X1 (λ) . . . 0 0 e1 (λ)
Since the domain U does not include singularity points of J(xc ) ⎢ ⎥⎢ ⎥
⎢ −X1 (λ) 0 ... 0 0 ⎥⎢ e2 (λ) ⎥
by the class of systems, the differentials will be linearly inde- ⎢ ⎥⎢ ⎥
⎢. .. .. .. ⎥⎢ .. ⎥
⎢. .. ⎥⎢ ⎥
pendent if the vectors ei , i = 1, . . . , p are orthogonal. These ⎢. . . . . ⎥⎢ . ⎥
⎢ ⎥⎢ ⎥
vectors are orthogonal because they are the FS orthonormal ⎢ ⎥⎢ ⎥
⎣0 0 ... 0 Xp −1 (λ) ⎦⎣ ep −1 (λ) ⎦
basis vectors. 
0 0 ... −Xp −1 (λ) 0 ep (λ)
Derivation of (8) By the fundamental theorem of calculus,
∗ (A.2)
dλ∗ = σk ∗ (λ ). Geometric arguments provide that dy =
ds k ∗ d k ∗

Kk ∗ (y)σk ∗ (λ∗ ) where Kk ∗ : Rp → R is a smooth scalar func- e i (λ),e i + 1 (λ) 


tion [27]. To solve Kk ∗ (y), the following identity may be used: where Xi (λ) = σ (λ) , i ∈ {1, . . . , p − 1}. 

k ∗ (y) = k ∗ (σk ∗ (k ∗ (y))). REFERENCES


[1] J. Hauser and R. Hindman, “Maneuver regulation from trajectory tracking:
Feedback linearizable systems,” in Proc. IFAC Symp. Nonlinear Control
Differentiating both sides Syst. Design, 1995, pp. 595–600.
[2] P. Sicard and M. D. Levine, “An approach to an expert robot welding
system,” IEEE Trans. Syst., Man Cybern., vol. 18, no. 2, pp. 204–222,
dk ∗ dk ∗ dk ∗
= σ (λ)|λ=λ∗ Mar./Apr. 1988.
dy dy dy [3] K. Erkorkmaz and Y. Altintas, “High speed CNC system design. part iii:
High speed tracking and contouring control of feed drives,” Int. J. Mach.
dk ∗ Tools Manuf., vol. 41, no. 11, pp. 1637–1658, 2001.
⇒ σk ∗ (λ)|λ=λ∗ = 1 [4] L. Lapierre and D. Soetanto, “Nonlinear path-following control of an
dy
AUV,” Ocean Eng., vol. 34, no. 11, pp. 1734–1744, 2007.
dk ∗  [5] D. E. Miller and R. H. Middleton, “On limitations to the achievable
⇒ σk ∗ (λ)|λ=λ∗ = Kk ∗ (y)σk ∗ (λ∗ ) σk ∗ (λ∗ ) = 1 path tracking performance for linear multivariable plants,” IEEE Trans.
dy Automat. Control, vol. 52, no. 11, pp. 2586–2601, Dec. 2008.
1 [6] A. P. Aguiar, J. P. Hespanha, and P. V. Kokotovic, “Path-following for non-
⇒ Kk ∗ (y) = . minimum phase systems removes performance limitations,” IEEE Trans.
σk ∗ (λ∗ )2 Automat. Control, vol. 50, no. 2, pp. 234–239, Feb. 2005.
[7] R. Skjetne, T. I. Fossen, and P. V. Kokotović, “Robust output maneuvering
for a class of nonlinear systems,” Automatica, vol. 40, no. 3, pp. 373–383,
Thus, η2 can be compactly written as (8).  2004.
d ∗
Derivation of (12) First note the identity dt ej (λ ) = [8] K. Kant and S. W. Zucker, “Toward efficient trajectory planning: The
σ (λ∗ )  path-velocity decomposition,” Int. J. Robot. Res., vol. 5, no. 3, pp. 72–89,
e j (λ∗ ) d
dy ẏ and
d
dy = σ k ∗ (λ∗ )2 from above. Then, 1986.
[9] G.-C. Chiu and M. Tomizuka, “Contouring control of machine tool feed
drive systems: A task coordinate frame approach,” IEEE Trans. Control
Syst. Technol., vol. 9, no. 1, pp. 130–139, Jan. 2001.
ξ2j −1 := ξ˙1j −1 [10] H.-Y. Chuang and C.-H. Liu, “Cross-coupled adaptive feedrate control for
&  ' multiaxis machine tools,” J. Dyn. Syst., Meas. Control, vol. 113, no. 3,
d  pp. 451–457, 1991.
= e j (λ∗ ) J(xc )xv (h(x) − σ(λ∗ )) [11] M.-Y. Cheng and C.-C. Lee, “Motion controller design for contour-
dy y =h(x) following tasks based on real-time contour error estimation,” IEEE Trans.
Ind. Electron., vol. 54, no. 3, pp. 1686–1695, Jun. 2007.
&  '
∗  ∗ d 
 [12] A. S. Shiriaev, L. B. Freidovich, A. Robertsson, R. Johansson, and A.
+ ej (λ ) J(xc )xv − σ (λ ) J(xc )xv Sandberg, “Virtual-holonomic-constraints-based design of stable oscilla-
dy y =h(x) tions of furuta pendulum: Theory and experiments,” IEEE Trans. Robot.,
vol. 23, no. 4, pp. 827–832, Aug. 2007.
  [13] S. Westerberg, U. Mettin, A. S. Shiriaev, L. B. Freidovich, and Y. Orlov,
σ (λ∗ )
= e j (λ∗ ) J(xc )xv (h(x) − σ(λ∗ )) “Motion planning and control of a simplified helicopter model based on
σ (λ∗ )2 virtual holonomic constraints,” in Proc. IEEE Int. Conf. Adv. Robot., 2009,
pp. 1–6.

+ ej (λ∗ ) J(xc )xv − e1 (λ∗ )e1 (λ∗ ) J(xc )xv [14] C. Chevallereau, E. Westervelt, and J. Grizzle, “Asymptotic stabilization
of a five-link, four-actuator, planar bipedal runner,” in Proc. 43rd IEEE
Conf. Decision Control, 2004, vol. 1, pp. 303–310.
and using the simplification that ej , e1  = 0 for j > 1 and [15] A. Banaszuk and J. Hauser, “Feedback linearization of transverse dynam-
ics for periodic orbits,” Syst. Control Lett., vol. 26, no. 2, pp. 95–105,
η2 (x) = e1 , J(xc )xv  yields (12).  1995.
1392 IEEE TRANSACTIONS ON ROBOTICS, VOL. 31, NO. 6, DECEMBER 2015

[16] C. Nielsen and M. Maggiore, “Output stabilization and maneuver reg- Rajan J. Gill received the B.A.Sc. degree in mecha-
ulation: A geometric approach,” Syst. Control Lett., vol. 55, no. 5, tronics engineering and the M.A.Sc. degree in electri-
pp. 418–427, 2006. cal & computer engineering, from the University of
[17] A. Hladio, C. Nielsen, and D. Wang, “Path following for a class of me- Waterloo, Waterloo, ON, Canada, in 2012 and 2015,
chanical systems,” IEEE Trans. Control Syst. Technol., vol. 21, no. 6, respectively. He is currently a Ph.D. candidate at the
pp. 2380–2390, Nov. 2013. Swiss Federal Institute of Technology in Zurich (ETH
[18] O. Khatib, “A unified approach for motion and force control of robot Zurich) in the area of design and control of under ac-
manipulators: The operational space formulation,” IEEE J. Robot. Autom., tuated flying vehicles.
vol. 3, no. 1, pp. 43–53, Feb. 1987.
[19] M. W. Spong, S. Hutchinson, and M. Vidyasagar, Robot Modeling and
Control. Hoboken, NJ, USA: Wiley, 2006.
[20] K. Erkorkmaz and Y. Altintas, “High speed {CNC} system design. part i:
Jerk limited trajectory generation and quintic spline interpolation,” Int. J. Dana Kulić received the combined B.A.Sc. and
Mach. Tools Manuf., vol. 41, no. 9, pp. 1323–1345, 2001. M.Eng. degrees in electromechanical engineering,
[21] C. C. de Wit, B. Siciliano, and B. Bastin, Theory of Robot Control, 3rd ed. and the Ph.D. degree in mechanical engineering from
New York, NY, USA: Springer, 1997. the University of British Columbia, Vancouver, BC,
[22] R. Gill, D. Kulic, and C. Nielsen, “Robust path following for robot Canada, in 1998 and 2005, respectively. From 2006
manipulators,” in Proc. IEEE/RSJ Int. Conf. Intell. Robots Syst., 2013, to 2009, she was a JSPS Postdoctoral Fellow and a
pp. 3412–3418. Project Assistant Professor at the Nakamura Labo-
[23] A. Isidori, Nonlinear Control Systems II, vol. 2. New York, NY, USA: ratory at the University of Tokyo. She is currently
Springer-Verlag, 1999. an Associate Professor at the Electrical and Com-
[24] E. Farzad and H. Khalil, “Output feedback stabilization of fully lin- puter Engineering Department at the University of
earizable systems,” Int. J. Control, vol. 56, no. 5, pp. 1007–1037, Waterloo, Waterloo, ON, Canada. Her research in-
1992. terests include human motion analysis, robot learning, humanoid robots, and
[25] J.-F. Bonnans, J. C. Gilbert, C. Lemaréchal, and C. A. Sagastizábal, Nu- human.machine interaction.
merical Optimization: Theoretical and Practical Aspects. New York, NY,
USA: Springer, 2006.
[26] M. Toussaint. (2012). Some notes on gradient descent. Machine Christopher Nielsen received the B.A.Sc. degree in
Learning & Robotics Lab, FU Berlin, Germany. [Online]. Available: electrical engineering from the University of Water-
http://ipvs.informatik.uni-stuttgart.de/mlr/marc/notes/gradientDescent. loo, Waterloo, ON, Canada, in 2002, and the M.A.Sc.
pdf and Ph.D. degrees from the University of Toronto,
[27] L. Consolini, M. Maggiore, C. Nielsen, and M. Tosques, “Path follow- Toronto, ON, Canada, in 2004 and 2008, respectively.
ing for the pvtol aircraft,” Automatica, vol. 46, no. 8, pp. 1284–1296, In 2008 he joined the Department of Electrical and
2010. Computer Engineering at the University of Water-
[28] M. A. Akivis and B. A. Rosenfeld, Elie Cartan (1869–1951), vol. 123. loo where he is currently an Associate Professor. His
Providence, RI, USA: Amer. Math. Soc.,2011. current research interests include geometric control
theory, motion control, and output feedback.

You might also like