The \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$N$\end{document}N-Link Swimmer in Three Dimensions: Controllability and Optimality Results

The controllability of a fully three-dimensional \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$N$\end{document}N-link swimmer is studied. After deriving the equations of motion in a low Reynolds number fluid by means of Resistive Force Theory, the controllability of the minimal 2-link swimmer is tackled using techniques from Geometric Control Theory. The shape of the 2-link swimmer is described by two angle parameters. It is shown that the associated vector fields that govern the dynamics generate, via taking their Lie brackets, all eight linearly independent directions in the combined configuration and shape space, leading to controllability; the swimmer can move from any starting configuration and shape to any target configuration and shape by operating on the two shape variables. The result is subsequently extended to the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$N$\end{document}N-link swimmer. Finally, the minimal time optimal control problem and the minimization of the power expended are addressed and a qualitative description of the optimal strategies is provided.


INTRODUCTION
The swimming motion of microorganisms in viscous fluid at low Reynolds number has been studied mathematically since the 1950s [13,22].There has recently been growing interest in understanding the behaviour of simple model swimmers due to the potential to manufacture such microrobots and use them for biomedical applications [18,21].For practical reasons, it can be beneficial for a proposed robotic swimmer to be as simple as possible while achieving full controllability.Here, we define swimming to be the translational and rotational motion of the swimmer in quiescent fluid due to changes in shape of the swimmer's body; by controllability we mean the ability of prescribing the shape changes in order to steer the swimmer from a given initial configuration (i.e., position and orientation) to a given final one.We neglect gravity, assuming that the swimmer is neutrally buoyant, and in view of proposing a model for a minimal swimmer, other net forces and torques acting on the body are not considered.
It is well known for swimmers in Stokes flow that if the body undergoes a shape change that is subsequently reversed, then the swimmer would return to its original position and orientation.This result, stated by Purcell [20], is known as the Scallop Theorem.In particular, a "scallop" consisting of two rigid links joined by a hinge that can open and close will not achieve any net displacement by repeatedly opening and closing its hinge.Purcell proposed that at least three links, connected by two hinges, are necessary to achieve a net displacement with periodic shape changes.This model is commonly referred to as Purcell's (planar) 3 -link swimmer, and has been shown to be controllable in two-dimensional space [9,17].
If the 3-link swimmer is twisted so that the axes of rotation for the two hinges are perpendicular to one another, then the swimmer is no longer planar in configuration.While this variant still has only two hinges, and therefore two degrees of freedom for the shape, it was shown that this swimmer is controllable in three-dimensional space [12].
In the present work, we consider a 2 -link swimmer that has a joint with two angular degrees of freedom.This joint can be thought of as a hinge whose axis can rotate about the axis of the first link.Alternatively, this corresponds to the non-planar 3 -link swimmer in the limit that the length of the central link vanishes so that the two perpendicular hinges are next to each other.
Note that there is a fundamental difference between the 2 -link swimmer with two degrees of motion and the non-planar 3 -link swimmer.It is clear that opening or closing either hinge changes the shape of the 3-link swimmer.Without the central link, however, one of the hinges simply rotates a link about its axis.The shape appears indistinguishable since each link is assumed to be a cylinder with rotational symmetry.Nevertheless, we show that the 2 -link swimmer can achieve arbitrary displacements and rotations in threedimensional space.This motion requires consideration of the viscous torque due to rotation of a link about its axis.Including this torque in the model enables the swimmer to rotate despite its shape appearing stationary due to symmetry of the cylindrical link.
Our 2 -link swimmer consists of a segment hinged to a thin cylindrical rod which is directed along the positive z -axis; the hinge is located at the origin of the co-moving reference frame, so that the shape of the swimmer is described by a point in the unit sphere S 2 , identifying the direction of the segment (link 2 ) with respect to the thin cylinder (link 1 ), see Figure 1.The shape parameters of the 2 -link swimmer are therefore the two angles ϑ and ϕ which parametrise a point in S 2 .The configuration parameters are the translation x ∈ R 3 and rotation R ∈ SO(3) of the change of coordinates of the co-moving frame with respect to the lab reference frame.
By the considerations above, the only forces acting on the swimmer are the hydrodynamic ones which, due to the slenderness of the swimmer, can be accurately approximated by Resistive Force Theory [11], according to which the local densities of viscous force and torque are linear in the components of the velocity of the swimmer which are parallel or perpendicular to the swimmer's body through suitable parallel and perpendicular drag coefficients 0 < C < C ⊥ .Adding the viscous torque due to the rotation of link 1 about its axis amounts to adding an extra term in the expression of the viscous torque acting on link 1 through a torsional drag coefficient C τ (see the expressions in (2.3)).
Once the total viscous force and torque are computed, setting them equal to zero allows us to obtain the equations of motion for the swimmer.These are conveniently written in the form of a (nonlinear) control system, so that tools from Geometric Control Theory can be applied.In this framework, the time changes of the shape parameters ϑ and ϕ are considered as the controls u 1 , u 2 of the system, since ϑ and ϕ are the parameters that can be actuated by the swimmer to modify its shape.Standard results and methods from Geometric Control Theory are used to prove Theorem 3.7 ensuring controllability of the 2 -link swimmer: any given final configuration can be reached starting from any assigned initial configuration by acting on the controls u 1 , u 2 (this is known as fiber controllability in the sense of Definition 3.4(i)).Technically, this is obtained by computing the Lie brackets of the vector fields V 1 and V 2 activated by u 1 and u 2 and showing that they generate all the possible directions of motion, thus proving that two linearly independent vectors, the V i 's, generate the six-dimensional space of translations and rotations (x, R) .
Controllability for the 2 -link both ensures that the equations of motion have a unique solution (Theorem 2.1) and can be easily extended to the N -link swimmer, providing the main result of the paper.Controllability of the system paves the way to the study of optimal swimming strategies.Our second result establishes the existence of an optimal solution and the qualitative characterisation of the optimal control that generates it, for two specific optimal control problems which are relevant for the applications, especially in view of possible robotic implementations.The minimal time optimal control problem seeks the optimal solution to move from a given configuration to another given one in the shortest possible time, whereas optimisation of the power expended deals with minimising the power expended to achieve the motion (this is useful in view in presence of limited amount of resources).Similar optimal control problems have been tackled in [7,9,19] for the power expended of a filament moving on a plane, for the minimal time of a planar Purcell swimmer, and for the minimal time ad quadratic cost for a scallop subject to a switching dynamics, respectively.
The paper is organised as follows: in Section 2 we describe the setting for the dynamics of the 2 -link swimmer, and we deduce the equations of motion.In Section 3, we prove Theorem 3.7 which states that the 2-link swimmer is fiber controllable according to Definition 3.4(i).We further describe how to generalise both the problem setting and the results obtained to the N -link swimmer in Section 4 and, in Section 5, we discuss some optimal control problems which are relevant in this context, namely the minimal time optimal control problem and the minimisation of the power expended.Finally, Section 6 collects an overview of the results obtained and discusses some potential perspectives.

DYNAMICS OF THE 2 -LINK SWIMMER
Let x t denote the position (with respect to the lab system) of the hinge of the 2 -link swimmer, and let ẽ(1) t := (sin ϕ t cos ϑ t , sin ϕ t sin ϑ t , cos ϕ t ) be the directions of the two links, where ϑ t ∈ R and ϕ t ∈ T := R/2π are the shape parameters. 1 Finally, let i be the length of the i -th link, so that the generic point on the i-th link, at a distance s ∈ [0, i ] from x t is given by sẽ (i) t , since in the co-moving system the hinge is located at the origin.
Co-moving frame of the 2 -link swimmer.In the lab system, the hinge located at x t is also rotated by a rotation matrix R t ∈ SO(3) , so that, denoting by e (i) the directions of the links, the generic point x (i) t (s) on link i at a distance s from x t is identified by (2.2) 1 Notice that the choice of letting (ϑt, ϕt) ∈ R × T makes the parametrization of a point on the sphere S 2 not injective.This will not affect the description of the motion of the swimmer.
The densities of viscous force f (i) t (s) and torque τ (i) t (s) are computed using Resistive Force Theory by t (s) = se (1) t ⊗ e (1) where C and C ⊥ are the parallel and perpendicular drag coefficients to each link and C τ is the torsional drag coefficient which takes into account the fact that the first link is a cylinder, the symbol ⊗ denotes the dyadic product of vectors ( (a ⊗ b) ij := a i b j ), the symbol × denotes the vector product in R 3 , and a superimposed dot denotes derivation with respect to time.
In order to compute the expressions in (2.3), we need to take the time derivative ẋ(i) t (s) , which, by (2.1) and (2.2), reads where Ω t and ω t are the angular matrix and the angular velocity, respectively, associated with the rotation matrix R t .
Taking some elementary vector identities 2 into account, we obtain t ⊗ e (1) where we also used that |ẽ t .integrating from 0 to i with respect to s, we obtain t ⊗ e (1) t ⊗ e (2) t ⊗ e t ⊗ e (1) t ⊗ e (2) The total viscous force is then given by and the total viscous torque by where the matrices K t , C t , and J t are defined by t and J(2) and the viscous force and torque due to the shape deformation are t and Tsh t := Expressions (2.6) and (2.7) can be written together in matricial form as The matrix is known in the literature as the grand resistance matrix.It is a 6 × 6 symmetric (see (2.8)) and positive-definite (see [14]) matrix.Suppose that the two links are of equal lengths, l 1 = l 2 =: L. Listing also φt and θt in the state of the system, and setting (2.9) equal to zero (this is sometimes called the self-propulsion constraint), we have where and u 1 , u 2 : [0, T ] → R are measurable functions.By straightforward computations we have

and
(2.13) The following theorem, whose proof is a byproduct of the controllability Theorem 3.7, holds.

CONTROLLABILITY
3.1.Preliminaries.In this subsection we present the basic notions about control systems on Lie groups.We use their properties in order to state the controllability results for the 2 -link swimmer in Subsection 3.2.
Let G be an n -dimensional matrix Lie group and let S be an m-dimensional parallelizable manifold (see [4, page 160]); we call M := G×S the configuration space, whose generic element is z := (g, s).Definition 3.1.A nonlinear control system on G is an ODE of the form where ξ is a map from the tangent space T S to the Lie algebra g of G which is linear in the fibers, i.e., for some analytic (nonlinear) maps ξ i : S → g , i = 1, . . ., m , and u : [0, T ] → (u 1 (t), . . ., u m (t)) ∈ T s S R m is the vector of controls.
Denoting by êR m i the elements of the canonical basis of R m , system (3.1) can be written as where By the definition of push-forward, the left-hand side in (3.4) is ), where D denotes the differential; since Ψ g defined in (3.3) is nothing but the left-translation by g in the G-component of z, it turns out that where L g is the left translation by g ∈ G (namely, L g h = gh), T e is the tangent map to the identity e ∈ G , and I m is the m -dimensional identity matrix.
Remark 3.3.The following observations are straightforward: (i) for any ḡ ∈ G, the vector fields Z i ( i = 1, . . ., m ) in (3.2) are equivariant with respect to the group action Ψ ḡ defined in (3.3); (ii) for any Z i , Z j ∈ T g G × R m and for any ḡ ∈ G , the Lie bracket [Z i , Z j ] is equivariant with respect to the group action Ψ ḡ .
We now give the definition of fiber controllability and controllability.
Definition 3.4.The nonlinear control system (3.1)(i) is said to be fiber controllable if for any initial (g 0 , s 0 ) ∈ M and final g 1 ∈ G there exist a time T > 0 and control inputs u : [0, T ] → R m such that g(0) = g 0 and g(T ) = g 1 , where (g(t), s(t)) is the unique solution to (3.1).(ii) is said to be fiber controllable at (g 0 , s 0 ) ∈ M if there exists a neighbourhood U g0 of g 0 ∈ G such that for each g 1 ∈ U g0 there exist a time T > 0 and control inputs u : [0, T ] → R m such that g(0) = g 0 and g(T ) = g 1 , where (g(t), s(t)) is the unique solution to (3.1).
It can immediately be noted that if condition (ii) in Definition 3.4 holds for every (g 0 , s 0 ) ∈ M, then condition (i) holds.We observe that the uniqueness of solutions to (3.1) is granted by [16, Lemma 2.1].Theorem 3.5.Let us consider a control system on a Lie group G of the form (3.2).Then (i) it is fiber controllable at (g 0 , s 0 ) ∈ M in the sense of Definition 3.4(ii) if where Lie({Z 1 , . . ., Z m }) is the Lie algebra generated by the vector fields Z 1 , . . ., Z m and Π G denotes the projection on the group component; (ii) if condition (3.5) hold for every s 0 ∈ S , then it is fiber controllable in the sense of Definition 3.4(i).
Proof.(i) The proof is a straightforward application of [6, Theorem 5.9], where it is proved that condition (3.5) implies local fiber configuration accessibility at (g 0 , s 0 ) (see [6, Definition 5.7]) for affine control systems on Lie groups.Since it is well known that for driftless systems accessibility is equivalent to controllability and that the result holds globally in time, fiber controllability at (g 0 , s 0 ) in the sense of Definition 3.4(ii) follows.
(ii) This is easily proved since condition (3.5) is independent of g 0 .
The following statement of the Orbit Theorem can be easily derived from [15, Chapter 2, Theorems 1 and 2].Theorem 3.6 (The orbit theorem).Let M be an analytic manifold, and let Z be a family of analytic vector fields on M. Then (a) each orbit of Z is an analytic submanifold of M, and (b) if N is an orbit of Z , then the tangent space of N at z is given by Lie z (Z) .In particular, the dimension of Lie z (Z) is constant as z varies on N .
3.2.The controllability theorem.We are interested in studying how the shape change of our swimmer determines its spatial position and orientation in the framework of control systems on Lie groups.We will work with M = G × S = SE(3) × R × T , by posing where R(α, β, γ) ∈ SO(3) and τ := (x 1 , x 2 , x 3 ) ∈ R 3 .In order to write system (3.2) in vector form, we introduce the Lie algebra isomorphism L : R 6 → se(3) defined by .
The application of L −1 to the g -component in (3.2) will transform it from a 4×4 -matrix into a vector in R 6 .Moreover, denoting by Z G and Z S the G-and S -components, respectively, of any Z ∈ T g SE(3) × R 2 , Remark 3.3(ii) implies that, for any Moreover, since L is a Lie algebra isomorphism, if Z i = (gξ i (s), êR 2 i ) , i = 1, 2, we can rewrite (3.7) as where we have denoted by Γ the left-hand side in (3.7).We recall here that We can now state the controllability theorem for the 2 -link swimmer.Proof.The proof is divided into three steps.
Step 1.By (3.6), the equations of motion (2.11) can be cast in the form In (3.8), we notice that g −1 ġ ∈ se(3); the action of g −1 on an element ġ of the tangent space T g SE( 3) can be written as We now remark that, since L is an isomorphism, system (3.8) is exactly a control system on the Lie group SE(3) according to Definition 3.1, and thus the control vector fields are equivariant with respect to the SE(3) action, as pointed out in Remark 3.3(i).
Step 2. By Remark 3.3(ii) and Theorem 3.5(i), to prove the fiber controllability of the system at a point (h, s * ) it suffices to compute the Lie brackets of the vector fields V i at a point (e, s * ) and to show that they generate any directions in the Lie algebra se(3) .A simple computation of these Lie brackets at the point (e, s * ) = e, (ϕ * , ϑ * ) = e, ( π 2 , 0) yields where p and q are polynomials whose explicit expressions are (3.10) Notice that q never vanishes, wheres the set {(C , C ⊥ , C τ , L) ∈ (0, +∞) 4 : p(C , C ⊥ , C τ , L) = 0} has zero four-dimensional Lebesgue measure.This proves that, through the iterated Lie brackets, it is possible to generate the 6-dimensional Lie algebra se(3) at the point (h, s * ) = (e, ( π 2 , 0)).Fiber controllability at (h, s * ) follows.
Step 3. Recalling that for any s ∈ S there exists a point h ∈ G such that (h , s) belongs to the orbit of the point (h, s * ) (since the shape variable can be steered directly by means of the control functions u i , invoking that the group action is free), and that the vector fields V i are analytic3 , the Orbit Theorem 3.6 states that the Lie algebra generated by the vector fields V 1 and V 2 has the same dimension at any point along the orbit.Finally, thanks to the equivariance of the vector fields with respect to the group action (see Remark 3.3(ii)), it is easy to see that V 1 and V 2 also generate the Lie algebra se(3) at any points of the form (e, s) .Fiber controllability follows from Theorem 3.5(ii).Remark 3.8.By standard results on control theory [5,23], controllability is ensured with controls in L ∞ , thus for any final time T < +∞ the 2-link swimmer is fiber controllable by means of absolutely continuous shape parameters (ϑ t , ϕ t ) ∈ R × T for all t ∈ [0, T ] (see the S -component of (3.8)).Proposition 3.9.If C τ = 0 the 2 -link swimmer is not fiber controllable, and we recover the well-known scallop theorem.
Proof.Let us consider the the basis vectors êR 6  1 , . . ., êR 6  6 , whose image through L is a basis of the Lie algebra se(3).Setting C τ = 0 in (2.13) and (2.14) we have that The first six components of the V i 's belong to the Lie algebra se(3) via the isomorphism L , so that we will work with the v i 's defined in the proof of Theorem 3.7.The expression of V 2 in (3.11) yields that êR 6 6 = −v 2 .Because of this, we do not have two real shape parameters, because − θ coincides with one direction of the Lie algebra.As a result, whenever we move the angle theta, the system reacts with a counter-rotation by the same angle, so that the 2 -link swimmer does not leave the plane determined by the initial angle.In this case, the angle ϑ cannot be considered as a proper shape parameter.Therefore, for C τ = 0 , the system has only one shape parameter which makes it equivalent to a planar scallop subject to the well-known scallop theorem (see [20]).

THE N -LINK SWIMMER
In this section, we extend the results obtained in the previous sections to the N -link swimmer.We consider a slender swimmer composed of a chain of N > 2 links of length i 0 hinged at their extremities and moving in an infinite viscous fluid.In order to avoid degeneracy, we require that there exist at least i, j ∈ {1, . . ., N } , i = j , such that i > 0 and j > 0 .
To provide a dynamical description of the N -link swimmer, we follow the construction of Section 2: each link is described by two angles ϑ (i) ∈ R , ϕ (i) ∈ T that identify the direction of the link with respect to the co-moving frame.The angles {ϑ (i) , ϕ (i) } N i=2 are the shape parameters of the system and we will prove that the swimmer is able to move in the fluid once the time evolution of the 2N − 2 functions t → ϑ  The unit vectors that describe the directions of the links are (see Figure 2) formulas for the blocks in (4.2) and (4.3).The vectors Fsh t and Tsh t are so that, analogously to (2.9), the equations of motion read By recalling that Mt is positive definite, and therefore invertible, (4.5) can be written as where, for i = 2, . . ., N , V (i) 2 are vector fields with 6 + 2(N − 1) = 2N + 4 components.The following theorem, whose proof is a byproduct of the controllability Theorem 4.2, holds.Proof.The proof follows the reasoning of that of [9,Theorem 3.1], where it is proved that the controllability of a planar N -link swimmer follows from that of a planar Purcell 3link swimmer.In the present case, from the controllability of the 2-link swimmer in three dimensions, together with the analyticity of the vector fields {V )) with respect to the i 's, we will be able to deduce the controllability of the N -link swimmer.
More precisely, by setting 1 = 2 =: L and i = 0 for all i = 3, . . ., N , we reduce the N -link swimmer to a 2 -link swimmer, which can be described as in Section 2. In particular, the equations of motion (4.6) read  t )u (2) t , ϕ where the first eight components of W Proof.Theorem 5.1 provides the existence of a solution to (5.4).Uniqueness of ū1 is implied by the strict convexity of L P with respect to u 1 and u 2 .The regularity of ū1 and ū2 is a consequence of a standard application of the Pontryagin Maximum Principle 4 .

CONCLUSIONS AND OUTLOOK
In this paper we studied the dynamics, controllability and optimal control problems for a 2 -link swimmer capable of performing fully three-dimensional shape changes.In Section 2, we described the configuration and shape of the swimmer and derived the equations of motion of the 2-link swimmer in a low Reynolds number flow by means of Resistive Force Theory and enforcing the so-called self-propulsion constraint (setting the viscous force and torque equal to zero, see (2.9) and (2.11)).Theorem 2.1 states the existence and uniqueness of the solution to the equations of motion (2.11).It is derived directly from Theorem 3.7, which is the main result of the paper and the core of Section 3. The proof of Theorem 3.7 is achieved by applying techniques from Geometric Control Theory.
In Section 4 we extended the results to the case of a general, fully three-dimensional N -link swimmer, exploiting the analyticity of the vector fields governing the dynamics.Finally, in Section 5, we addressed two specific optimal control problems for the 2-link swimmer, namely the minimal time optimal control problem and the minimisation of the power expended.Both problems have an independent interest and find their relevance in the design of artificial micro-devices which mimic the motion of natural micro-organisms.
The results obtained in this paper focus on the self-propulsion case, as it is the first step towards the design of self-propelling micro-robots.Nonetheless, it can be interesting for the applications, and object of future work, to extend the study to externally driven micro-swimmers.This direction has already been pursued in the case of two-dimensional magneto-elastic swimmers: in [2,3] a planar N -link is studied, showing that it can achieve a non-zero net displacement when actuated by a sinusoidal external magnetic field; in [10] local controllability of a 2-link magneto-elastic swimmer is proved, wheres in [8] the actuation of a three-dimensional N -link swimmer by an external magnetic field is studied.Finally, we mention that the case of a multi-flagellar swimmer is studied in [24].Imposing an external actuating field on the one hand has the benefit of helping the swimmer to move and simplifying its design from the engineering point of view, while on the other hand makes the problem more challenging from the mathematical point of view.  By stationarizing the Hamiltonian of the Pontryagin Maximum Principle with respect to u 1 and u 2 , we obtain the control ū1 and ū2 together with their regularity: the functions t → ū1 (t) , t → ū2 (t) are continuous if the stationary point belongs to [a, b] 2 for all t ∈ [0, t f ] ; otherwise, it is of bang-bang type.

t
and t → ϕ

Acknowledgments.
RM developed part of this work (Sections 2 and 4) as part of his B.Sc. thesis under the supervision of MM.HS thanks the hospitality of the department of mathematics of the Politecnico di Torino and gratefully acknowledges partial support from the MIUR grant Dipartimenti di Eccellenza 2018-2022 (CUP: E11G18000350001) and support of the Natural Sciences and Engineering Research Council of Canada (NSERC), [funding reference number RGPIN-2018-04418].Cette recherche a été financée par le Conseil de recherches en sciences naturelles et en génie du Canada (CRSNG), [numéro de référence RGPIN-2018-04418].MM is a member of the Gruppo Nazionale per l'Analisi Matematica, la Probabilità e le loro Applicazioni (GNAMPA) of the Istituto Nazionale di Alta Matematica (INdAM).MZ is a member of the Gruppo Nazionale per la Fisica Matematica (GNFM) of the Istituto Nazionale di Alta Matematica (INdAM).Both MM and MZ gratefully acknowledge support from the MIUR grant Dipartimenti di Eccellenza 2018-2022 (CUP: E11G18000350001).