We finally build the following algorithm.
Algorithm 1.
1: Assign the obstacle Ω
0
, the potential W
0
, the curvature
threshold
¯
ω, the N target points {p
1
,. .. , p
N
} ∈ ∂Ω
0
,
the interval I
γ
, an initial guess (q
]
,σ
]
,S
]
), initial penalty
parameters τ
0
,τ
1
,ρ
λ
, a step size α, a scaling factor χ <
1 and a tolerance tol > 0.
2: Set k ← 0
3: Set ( ˜q
(k)
,
˜
σ
(k)
,
˜
S
(k)
) ← (q
]
,σ
]
,S
]
)
4: Compute L
new
out
= L
(k)
(q
]
,σ
]
,S
]
)
5: Set L
new
in
← L
new
out
6: repeat (Method of multipliers)
7: Set n ← 0
8: Set (q
(n)
,σ
(n)
,S
(n)
) ← ( ˜q
(k)
,
˜
σ
(k)
,
˜
S
(k)
)
9: Set L
old
out
← L
new
out
10: repeat (Projected gradient descent method)
11: Set L
old
in
← L
new
in
12: Compute (q
(n+1)
,σ
(n+1)
,S
(n+1)
) using (12)
13: Compute L
new
in
= L
(k)
(q
(n+1)
,σ
(n+1)
,S
(n+1)
)
14: Set n ← n + 1
15: until
L
new
in
− L
old
in
< tol
16: Set ( ˜q
(k+1)
,
˜
σ
(k+1)
,
˜
S
(k+1)
) ← (q
(n)
,σ
(n)
,S
(n)
)
17: Compute λ
(k+1)
using (7)
18: Set τ
0
← χτ
0
19: Set τ
1
← χτ
1
20: Set ρ
λ
← χρ
λ
21: Set L
new
out
← L
new
in
22: Set k ← k + 1
23: until
L
new
out
− L
old
out
< tol
Table 2: Obstacle and target settings. Q
l
(c) denotes the
square of side l = 0.3 and center c = (0.2,−0.3).
Test # Ω
0
Ω
1
1
/
0 {(0.25,−0.7)}
2
/
0 {(0.094,−0.406),(0.094,−0.406)}
3
/
0 {(0.05,−0.3),(0.2,−0.45), (0.35, −0.3)}
4
/
0 {(0.1,−0.3),(0.2,−0.45), (0.3, −0.3)}
5
/
0 {(0.135,−0.3),(0.2,−0.5), (0.265, −0.3)}
6 Q
l
(c) {(0.05, −0.15),(0.05,−0.45),(0.35,−0.45)}
7 Q
l
(c) {(0.05, −0.3),(0.2,−0.45),(0.35,−0.3)}
Let us now define the settings for our numeri-
cal experiments, summarized in Table 2. We first
focus on the case without obstacle, i.e. Ω
0
=
/
0
and W
0
≡ 0, with a number N of target points be-
tween 1 and 3. Then, we consider the case Ω
0
=
Q
l
(c) (the square of side l centered at c ∈ R
2
) with
l = 0.3 and c = (0.2, −0.3). Moreover, we choose
W
0
(x) =
l
2
− kx − ck
∞
2
+
and N = 3 target points
on ∂Ω
0
in different configurations. In all the tests
we choose the curvature threshold function
¯
ω(s) =
1−0.9s
(1−0.9s)+(0.1−0.09s)
2π(2 + s
2
), corresponding to (1)
with ω(s) = 2π(2 + s
2
), µ(s) = 1 − 0.9s and ε(s) =
0.1 − 0.09s. We assume that the manipulator has
unit length and it is discretized with 201 nodes. We
set γ =
1
200
, namely equal to the mesh size, so that
the interval I
γ
contains all the grid nodes except the
end points. As initial guess, we always choose q
]
close enough to the target points, whereas σ
]
≡ 0
and S
]
is such that all the starting contact points are
equally spaced around the midpoint of the manipu-
lator. Finally, we set the starting penalty parameters
τ
0
= τ
1
= ρ
λ
= 10
−3
, while α = 5 · 10
−3
, χ = 0.999
and tol = 10
−12
.
We begin with the simple test of a single target
point p
1
= (0.25,−0.7), Test 1. In Figure 1-(a) we
show the computed optimal configuration q of the
manipulator, the target point (black circle) and the
optimal contact point (yellow circle), while Figure
1-(b) represents the corresponding signed curvature
(thicker line) as a function of s ∈ [0,1], and the thresh-
olds ±
¯
ω(s) (thin lines). Finally, in Figure 1-(c) we
show the behavior of the contact value s
1
∈ I
γ
versus
the total number of iterations to reach convergence,
i.e. accounting for both inner and outer loops in Al-
gorithm 1. We clearly observe the sliding of s
1
toward
the free end, and its convergence.
In Test 2, we choose the two target points p
1
=
(0.094,−0.406), p
2
= (0.306, −0.406), and we re-
port the results in Figure 2. In particular, we observe
the evolution of the contact values s
1
and s
2
in Fig-
ure 2-(c): their behavior is similar to the one of the
previous test for about the first 10
3
iterations. In this
phase the manipulator is attracted and then pinned to
the target points, due to the large value of the penalty
parameter τ
1
. Once the corresponding target term in
L
(k)
is sufficiently reduced, the optimization proceeds
trying to decrease the curvature term. This is done in
the remaining iterations, where we observe a further
sliding of s
1
and s
2
before the convergence.
We proceed by considering the case of three tar-
get points at closer and closer distances, that is Test
3, 4 and 5. Figure 3 shows the results for Test 3,
with p
1
= (0.05,−0.3), p
2
= (0.2,−0.45) and p
3
=
(0.35,−0.3), while Figure 4 corresponds to Test 4,
with p
1
= (0.1,−0.3), p
2
= (0.2,−0.45) and p
3
=
(0.3,−0.3). For both configurations, we observe a
behavior of the contact values s
1
,s
2
,s
3
similar to the
previous test, but, in the second one, the final slid-
ing phase is much more evident. This is due to the
closer distance between p
1
and p
3
, forcing the curva-
ture of the manipulator, during the optimization, up
to the threshold
¯
ω on a large interval. Hence, the
optimal solution prefers to retract, adding a double
change of sign in the curvature around p
1
and reach-
ing
¯
ω on a much smaller interval, see Figure 4-(b)
and also Figure 3-(b) for comparison. Finally, Fig-
ure 5 corresponds to Test 5 with p
1
= (0.135, −0.3),
p
2
= (0.2,−0.5) and p
3
= (0.265,−0.3), which pro-
Multi-target Optimal Control Problems for a Tentacle-like Soft Manipulator
43