Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

12th IEEE Workshop on Variable Structure Systems,

VSS’12, January 12-14, Mumbai, 2012

Sliding Mode Control Design for a Carangiform Robotic Fish


Jian-Xin Xu, Xue-Lei Niu and Zhao-Qin Guo

Abstract— In this paper, measures to resist parameter un- study steady state propulsion. [9] designed a four-link robotic
certainties and external disturbances are presented for a fish, and implemented a PID controller and a fuzzy logic
biomimetic robotic fish. The Carangiform robotic fish consists controller to control its speed and orientation respectively.
of 𝑁 links and 𝑁 − 1 joints, and its dynamic model of motion
is given in previous work [1]. Through this model, the relation [10] presented a neuronal model and a mechanical model of
between the motion of the fish and the torques added are fish swimming, and combined the two models together by
constructed. By giving particular reference angles of joints, the transformation of the motoneuron activity to mechanical
forward locomotion is obtained and serves as an example for forces and feedback of fish movements to stretch receptors.
the following study. Aiming at parameter uncertainties and Based on quasi-steady fluid flow theory, fish’s propulsion
environmental disturbances, we adopt sliding mode control
(SMC) to attenuate their impacts. Results of numerical ex- model was established in [11], [12], and nonlinear control
amples validate the effectiveness of SMC. Comparison of those method was investigated for trajectory stabilization of the
results shows that SMC works better than traditional computed robotic fish.
torque control when performing the tracking task in joint space. Due to the complexity of modeling interaction force
between fish body and water, most existing works considered
I. I NTRODUCTION steady speed of the robotic fish [7], [8], remaining dynamic
process not handled. Moreover, parameter uncertainties in
With increasing underwater activities and research work, the fish model are paid little attention in existing works. In
such as underwater archaeology, leakage detection, military this paper, we present a links-and-joints based robotic fish
reconnaissance [2], Autonomous Underwater Vehicle (AUV) model. Motion dynamics is given from previous result, and
is receiving more and more attention [3]. Traditional AUV, two kinds of control laws are given. The main contributions
usually thrusted by rotatory propellers, may not be satis- are: 1) By designing paticular reference joint angles, forward
factory in efficiency and maneuverability. Thus, new type locomotion of Carangiform fish is achieved; 2) Parameter
of AUV is needed. During the long period time of nature uncertainties and external disturbances are handled by sliding
selection, fish have evolved body structures and swimming mode control.
patterns that highly adapt to aquatic environments [4]. Ac-
The rest of the paper is organized as follows. In Section
tually, they are more advanced swimming machines with
II, the mechanical model of the robotic fish and dynamics
higher efficiency, more remarkable maneuverability and less
of the system are given. Section III gives formulation of the
noise than conventional AUV.
actual system which contains uncertainties and disturbances;
Inspired by these appealing merits, researchers developed
moreover, sliding mode controller design is given; In Sec-
many theories and numerous robotic fish prototypes to
tion IV, numerical examples are carried out to validate the
study and mimic the way that real fish moves. Generally,
effectiveness of the controller. Section V concludes the paper
swimming modes of fish is classified to three main cate-
with a brief summary.
gories: Anguilliform, Carangiform and Thunniform [5], [6].
In Anguilliform mode, the whole body participates in large II. DYNAMIC M ODEL OF THE ROBOTIC F ISH
amplitude undulations. While in Carangiform swimming, the
In this section, an Carangiform fish (carps, mackerels)
fish body undulations are confined to the last third of the
model is given to study its motion and control problems.
body length, and in Thunniform, the undulation proportion
From a biological perspective, in this swimming mode, only
is even less. Elongated body theory (EBT) [7], [8], assuming
the latter part of the fish body participates in large amplitude
sinusoidal motion of the fish body, was principally used to
undulations, while the amplitude of the undulation of the
This work was supported by the STARFISH project of Defence Science former part is small, which is different from the way that
and Technology Agency (DSTA), Singapore, under Grant R-263-000-622- Anguilliform fish moves. The most remarkable characteristic
232 in moving process of Carangiform fish, is that there exists
Jian-Xin Xu is with Department of Electrical and Computer Engineer-
ing, Faculty of Engineering, National University of Singapore, Singapore a body wave, traveling from head to tail [7]. Obviously, the
117576. He is also with NUS Graduate School for Integrative Sciences and traveling direction of the body wave in the fish is backwards,
Engineering (NGS), National University of Singapore, Singapore 117456. which is opposite to the direction that fish moves forward.
elexujx@nus.edu.sg
Xue-Lei Niu is with Department of Electrical and Computer Engineer-
ing, Faculty of Engineering, National University of Singapore, Singapore A. Fish Body Prototype
117576. niuxuelei@nus.edu.sg As shown in Fig. 1, we select the central line, which
Guo Zhaoqin is with NUS Graduate School for Integrative Sciences and
Engineering (NGS), National University of Singapore, Singapore 117456, locates at the center of the fish body and stretches from head
guozhaoqin@nus.edu.sg to tail, to represent the Carangiform fish, and we use links

978-1-4577-2067-3/12/$26.00 c 2011 IEEE 308


12th IEEE Workshop on Variable Structure Systems,
VSS’12, January 12-14, Mumbai, 2012

and joints to mimic its shape. The fish consists of 𝑁 links in water and relative velocity between the object and water,
and 𝑁 − 1 joints, where two connective links are connected in principle, the exact force distribution can be obtained by
by one joint. There is one motor on each joint, and it exerts solving the Navier-Stokes equation. However, the calculation
torques to its neighbor links. is quite complicated and time consuming [6]. In [10], the
Fig. 1 shows the top view of the central curve of the force is simplified and easy to compute. As shown in Fig.
Carangiform fish. 𝑥𝑜𝑦 is the world coordinates system. The 2, we adopt a simplified approximation of this force as (1)
position and orientation of each link 𝑖 are described by three and (2) indicate
coordinates 𝑥𝑖 , 𝑦𝑖 and 𝜙𝑖 : 𝑥𝑖 and 𝑦𝑖 denote the position of the
𝑤𝑖⊥ = −𝑓𝑖⊥ (𝑣𝑖⊥ )2 𝑠𝑔𝑛(𝑣𝑖⊥ ) (1)
midpoint of link 𝑖, while 𝜙𝑖 denotes the angle from +𝑥-axis
to link 𝑖. The links are numbered from head to tail (see Fig. 𝑤𝑖∥ = −𝑓𝑖∥ (𝑣𝑖∥ )2 𝑠𝑔𝑛(𝑣𝑖∥ ) (2)
1b). Each link 𝑖 is impacted by two types of external forces: where 𝑣𝑖⊥ , 𝑣𝑖∥ are parallel component and perpendicular
hydrodynamic forces 𝑤𝑖 and torques 𝜏𝑖 , 𝜏𝑖−1 (see Fig. 2). component of the velocity 𝑣𝑖 , and 𝑓𝑖⊥ , 𝑓𝑖∥ are the water
resistance coefficients in corresponding directions. The nota-
tion 𝑠𝑔𝑛(⋅) represents +1 if the element in the parentheses is
positive or −1 if negative. Based on the geometric relation-
ship (refer to Fig. 2), we have 𝑣𝑖⊥ = −𝑣𝑖𝑥 sin 𝜙𝑖 +𝑣𝑖𝑦 cos 𝜙𝑖 ,
𝑣𝑖∥ = 𝑣𝑖𝑥 cos 𝜙𝑖 +𝑣𝑖𝑦 sin 𝜙𝑖 , 𝑤𝑖𝑥 = −𝑤𝑖⊥ sin 𝜙𝑖 +𝑤𝑖∥ cos 𝜙𝑖 ,
𝑤𝑖𝑦 = 𝑤𝑖⊥ cos 𝜙𝑖 + 𝑤𝑖∥ sin 𝜙𝑖 , where 𝑣𝑖𝑥 , 𝑣𝑖𝑦 are projection
of the velocity 𝑣𝑖 on 𝑥-axis and 𝑦-axis; 𝑤𝑖𝑥 , 𝑤𝑖𝑦 are projec-
tion of the hydrodynamic force 𝑤𝑖 on 𝑥-axis and 𝑦-axis. All
of them are scalars. Hydrodynamic forces experienced by all
the links can be calculated the same way.
Since the link velocity 𝑣𝑖 can be possibly in any direction,
it is arduous to find each water resistance coefficient 𝑓 in
corresponding direction. Fortunately, 𝑓 remains unchanged
(a) The position(𝑥𝑖 , 𝑦𝑖 ) and orientation 𝜙𝑖 of each link 𝑖
in the direction of parallelling the link, as well as in the per-
pendicular direction. Thus, we calculate the hydrodynamic
forces in such a way that the need of the value of 𝑓 in
arbitrary direction is avoided.
C. Lagrangian Formulation of the Mechanical Model
In this part, we give dynamics of the fish model. Details
(b) Numbering of links
of derivation see [1].
Fig. 1. Sketch map of the Carangiform robotic fish model. (a) Position First, we define coordinates vector p ∈ ℜ3𝑁 as
and orientation representation. (b) Link numbering.
p = [𝑥1 , 𝑦1 , 𝜙1 , 𝑥2 , 𝑦2 , 𝜙2 , ⋅ ⋅ ⋅ , 𝑥𝑁 , 𝑦𝑁 , 𝜙𝑁 ]𝑇
where the notation (⋅)𝑇 denotes transpose of a vector or a
matrix (⋅). The constraints in the system can be formulated
in matrix form
𝑥1 + 𝑙21 cos 𝜙1 − 𝑥2 + 𝑙22 cos 𝜙2
⎡ ⎤

⎢ 𝑦1 + 𝑙21 sin 𝜙1 − 𝑦2 + 𝑙22 sin 𝜙2 ⎥


⎢ 𝑥2 + 2 cos 𝜙2 − 𝑥3 + 2 cos 𝜙3
𝑙2 𝑙3 ⎥

g(p) = ⎢

⎢ 𝑦 2 + 𝑙2
2 sin 𝜙 2 − 𝑦 3 + 𝑙3
2 sin 𝜙 3 ⎥= 0

.. ⎥
.
⎢ ⎥
⎢ ⎥
⎣ 𝑥𝑁 −1 + 𝑙𝑁2−1 cos 𝜙𝑁 −1 − 𝑥𝑁 + 𝑙2𝑁 cos 𝜙𝑁 ⎦
⎢ ⎥

𝑦𝑁 −1 + 𝑙𝑁2−1 sin 𝜙𝑁 −1 − 𝑦𝑁 + 𝑙2𝑁 sin 𝜙𝑁

Fig. 2. External forces acting on link 𝑖.


where 𝑙𝑖 is the length of link 𝑖, g(p) ∈ ℜ2(𝑁 −1) .
Define 𝐽(p) as the Jacobian of the constraints matrix g(p)
∂g(p)
B. Hydrodynamic Force 𝐽(𝑝) =
∂p
When there is relative motion between the fish and the where 𝐽(p) ∈ ℜ2(𝑁 −1)×3𝑁 . Afterwards, we give the external
surrounding fluid, fluid is displaced and hydrodynamic force forces vector which acts on individual coordinate of p
arise. The force can be obtained through surface integrals
of vector force per area around the fish body. Since this w = [𝑤1𝑥 , 𝑤1𝑦 , 𝜏1 , 𝑤2𝑥 , 𝑤2𝑦 , 𝜏2 − 𝜏1 , ⋅ ⋅ ⋅ ,
force is related with the geometry of the object immersed 𝑤𝑁 𝑥 , 𝑤𝑁 𝑦 , −𝜏𝑁 −1 ]𝑇 (3)

978-1-4577-2067-3/12/$26.00 c 2011 IEEE 309


12th IEEE Workshop on Variable Structure Systems,
VSS’12, January 12-14, Mumbai, 2012

where 𝜏𝑖 − 𝜏𝑖−1 represents the total torque exerted on link A. Parameter Uncertainties
𝑖. It is worth noting that 𝜏0 = 𝜏𝑁 = 0, since there are no In the robotic fish model we construct, many parameters
torques at the endpoints. involve uncertainties. These uncertainties either come from
The system dynamics is then given as inaccuracy in the modeling, or come from unpredictable
influence of surroundings. The water resistance coefficient 𝑓
p̈ = 𝐴(p)ṗ + 𝐵(p)w (4) can be affected by many factors, such as different velocities
of fish with respect to the environment. Thus, it is rather an
where 𝐴(p) = −𝑀 −1 𝐽 𝑇 (𝐽𝑀 −1 𝐽 𝑇 )−1 𝐽, ˙ 𝐵(p) = estimated parameter than an accurate one. The mass matrix
𝑀 −1 [𝐼 − 𝐽 𝑇 (𝐽𝑀 −1 𝐽 𝑇 )−1 𝐽𝑀 −1 ], 𝐴(p) ∈ ℜ3𝑁 ×3𝑁 , 𝑀 can be measured accurately on ground, but when the fish
𝐵(p) ∈ ℜ3𝑁 ×3𝑁 , 𝑀 ∈ ℜ3𝑁 ×3𝑁 is the mass matrix and comes into water, 𝑀 becomes inaccurate because of added
it can be written as mass effect. Though we cannot know the exact information
of the interested parameters due to complex factors, those
𝑀 = 𝑑𝑖𝑎𝑔{𝑚1 , 𝑚1 , 𝐼1 , 𝑚2 , 𝑚2 , 𝐼2 , ⋅ ⋅ ⋅ , 𝑚𝑁 , 𝑚𝑁 , 𝐼𝑁 } parameters always change in a predictable range. This is
reasonable because every parameter has its own physical
where 𝑚𝑖 is the mass and 𝐼𝑖 is the moment of inertia of meaning, thus it neither blows up to infinity nor becomes
link 𝑖. The notation 𝑑𝑖𝑎𝑔{} represents that 𝑀 is a diagonal too small. Then, we can always give an upper bound and a
matrix, and the diagonal elements are in the braces. 𝐼 is lower bound for each parameter.
identity matrix with the same dimension as 𝑀 . We define that
(4) contains all the acceleration terms, of which we
are more interested in angular acceleration terms 𝜙¨𝑖 . By 𝐹⊥ = 𝑑𝑖𝑎𝑔{𝑓1⊥ , 𝑓2⊥ , ⋅ ⋅ ⋅ , 𝑓𝑁 ⊥ }
partitioning (4), we obtain dynamics of 𝜙 𝐹∥ = 𝑑𝑖𝑎𝑔{𝑓1∥ , 𝑓2∥ , ⋅ ⋅ ⋅ , 𝑓𝑁 ∥ }
Assume that there exist parameter uncertainties on 𝑀 , 𝐹⊥
𝜙¨ = 𝐴1 (p)ṗ + 𝐵1 (p)w𝑥 + 𝐵2 (p)w𝑦 + 𝐵3 (p)𝐵𝜏 𝜏 (5)
and 𝐹∥ , and their norms are bounded.
For derivation convenience, we define that
= [𝜙1 , 𝜙2 , ⋅ ⋅ ⋅ , 𝜙𝑁 ]𝑇 2 2
where 𝜙 v⊥sin = [𝑣1⊥ 𝑠𝑔𝑛(𝑣1⊥ ) sin 𝜙1 , ⋅ ⋅ ⋅ , 𝑣𝑁 ⊥ 𝑠𝑔𝑛(𝑣𝑁 ⊥ ) sin 𝜙𝑁 ]
𝑇

w𝑥 = [𝑤1𝑥 , 𝑤2𝑥 , ⋅ ⋅ ⋅ , 𝑤𝑁 𝑥 ]𝑇 2 2
v⊥cos = [𝑣1⊥ 𝑠𝑔𝑛(𝑣1⊥ ) cos 𝜙1 , ⋅ ⋅ ⋅ , 𝑣𝑁 ⊥ 𝑠𝑔𝑛(𝑣𝑁 ⊥ ) cos 𝜙𝑁 ]
𝑇

w𝑦 = [𝑤1𝑦 , 𝑤2𝑦 , ⋅ ⋅ ⋅ , 𝑤𝑁 𝑦 ]𝑇 2 2
v∥sin = [𝑣1∥ 𝑠𝑔𝑛(𝑣1∥ ) sin 𝜙1 , ⋅ ⋅ ⋅ , 𝑣𝑁 ∥ 𝑠𝑔𝑛(𝑣𝑁 ∥ ) sin 𝜙𝑁 ]
𝑇

= [𝜏1 , 𝜏2 , ⋅ ⋅ ⋅ , 𝜏𝑁 −1 ]𝑇 2
v∥cos = [𝑣1∥ 2
𝑠𝑔𝑛(𝑣1∥ ) cos 𝜙1 , ⋅ ⋅ ⋅ , 𝑣𝑁 ∥ 𝑠𝑔𝑛(𝑣𝑁 ∥ ) cos 𝜙𝑁 ]
𝜏 𝑇

1 0 ⋅⋅⋅ 0
⎡ ⎤
. .. Then, hydrodynamic forces w𝑥 and w𝑦 can be written as
⎢ −1 1
⎢ .. .


⎢ ⎥ w𝑥 = 𝐹⊥ v⊥sin − 𝐹∥ v∥cos (6)
𝐵𝜏 = ⎢ 0 −1 . . . 0
⎢ ⎥
w𝑦 = −𝐹⊥ v⊥cos − 𝐹∥ v∥sin

⎢ ⎥ (7)
⎢ . . .
⎣ .. .. ..

1 ⎦
where w𝑥0 , w𝑦0 are nominal values of w𝑥 , w𝑦 . From a
0 ⋅⋅⋅ 0 −1 practical point of view, the coordinate p and its derivative
ṗ are always bounded, which indicates that both 𝐴(p) and
and 𝐴1 (p)∈ℜ𝑁 ×3𝑁 , 𝐵1 (p)∈ℜ𝑁 ×𝑁 , 𝐵2 (p)∈ℜ𝑁 ×𝑁 , 𝐵3 (p)∈ 𝐵(p) are bound, because 𝐴(p) and 𝐵(p) are functions of p
ℜ𝑁 ×𝑁 are corresponding coefficient matrices obtained from and ṗ. Together with the fact that 𝐹⊥ and 𝐹∥ are bounded,
matrix 𝐴(p), 𝐵(p) in (4). It is worth noting that the we can know that w𝑥 and w𝑦 are bounded from (6) and (7).
dimension of 𝜏 is 𝑁 − 1, one less than the total number
of links 𝑁 . B. External Disturbances
Besides parameter uncertainties, we have to take into ac-
III. S LIDING M ODE C ONTROL D ESIGN FOR THE count environmental disturbances when considering system
ROBOTIC F ISH S YSTEM dynamics. Disturbances are always existing in the robotic
fish system, no matter in outdoor or indoor environments.
Modeling inaccuracies always exist and have strong ad- In outdoor environment, such as seas or rivers, the robotic
verse effects on control systems. Thus, any practical design fish will experience unpredictable currents or waves, which
must address them explicitly [13]. Otherwise, the control law are generated by winds or heat exchange, either beneath or
may lose effect since the actual parameters deteriorate the on the surface of the water. In indoor environment, such as
performance of the whole system. Here we adopt sliding a water tank, the robotic fish will experience the reflection
mode control, which belongs to robust controllers. In this wave from the water container, which are generated by the
robotic fish system, it is obvious that the number of actuators swimming motion of the fish itself.
is less than that of reference input. Therefore, we have some In general, these disturbances can be both additive and
considerations on that when we design the sliding mode multiplicative to the dynamic equations of motion. However,
control law. the additive disturbances are a good approximation for most

978-1-4577-2067-3/12/$26.00 c 2011 IEEE 310


12th IEEE Workshop on Variable Structure Systems,
VSS’12, January 12-14, Mumbai, 2012

marine control applications [14]. Hence, we assume that the From the definition of e, we set the control objective as
disturbances have additive format in this work. tracking the first 𝑁 − 1 reference inputs. Next, we define the
The disturbances function as external forces, which are sliding surface as
similar to w𝑥 , w𝑦 and 𝜏 in (5). Since the disturbances adhere
to the original external forces and they are additive, (5) can 𝜎 = 𝐶e + ė (10)
be written as follows
where 𝐶 is a diagonal matrix whose entries are positive
𝜙¨ = 𝐴1 (p)ṗ + 𝐵1 (p)(w𝑥 + d𝑥 ) + 𝐵2 (p)(w𝑦 + d𝑦 ) scalars.
+𝐵3 (p)𝐵𝜏 (𝜏 + d𝜏 ) (8) Assume that information of the coordinate vector p and
its velocity ṗ is available by means of vision or other
where d𝑥 ∈ ℜ𝑁 and d𝑦 ∈ ℜ𝑁 are the disturbance vectors in measurement system. Now, we give the control law. As stated
the directions of 𝑥-axis and 𝑦-axis, respectively, d𝜏 ∈ ℜ𝑁 −1 before, the control law consists of two parts
is the disturbance vector on the torque 𝜏 . In practice, d𝑥 , d𝑦
and d𝜏 will change in a reasonable range. 𝜏 = 𝜏0 + 𝜏𝑠 (11)
−1 ¨ ˙ ˙
Note that among the parameter uncertainties and external 𝜏0 = (𝐵6𝑛 𝐵𝜏 ) [𝜙𝑟𝑁 𝑒𝑤 − 𝐶(𝜙𝑁 𝑒𝑤 − 𝜙𝑟𝑁 𝑒𝑤 )
disturbances that appear in (8), only d𝜏 is matched, while all
−(𝐴2𝑛 ṗ + 𝐵4𝑛 w𝑥𝑛 + 𝐵5𝑛 w𝑦𝑛 )] (12)
the others are unmatched, because they are not in the range 𝜎
space of the input matrix 𝐵3 (p)𝐵𝜏 . 𝜏𝑠 = −𝜌(𝐵6𝑛 𝐵𝜏 )−1 (13)
∣∣𝜎∣∣
C. Sliding Mode Control Law Design
where 𝜌 = 𝑑max + 𝜂, 𝜂 is a positive constant. 𝜏0 is used to
Generally, there are two standard steps in sliding mode handle nominal model, 𝜏𝑠 is used to handle the uncertainties.
control design: 1) a sliding surface is given such that system Then, we have the following theorem.
on it manifests desired behavior; 2) a discontinuous control Theorem 1: Consider the nonlinear system (9) associated
law is utilized to drive the system states into that surface and with the chosen sliding surface 𝜎 = 0. Under the control law
stay on it for all future time [15]. (11)-(13), the sliding surface will be reached in finite time.
The sliding mode control law is composed of two parts. Proof. First we define the Lyapunov function
The first part is used to handle the nominal model, while the
second is used to handle system uncertainties. Since there 1 𝑇
𝑉 = 𝜎 𝜎
are not enough number of actuators to track all the reference 2
inputs, we have to make a trade-off when setting the control Differentiating it, we obtain
objective, i.e., tracking the same number of reference inputs
as that of actuators. In this model, the number of actuators, 𝑉˙ = 𝜎 𝑇 𝜎˙ = 𝜎 𝑇 (𝐶 ė + ë)
i.e., the number of torques, applied on the fish is 𝑁 −1. Thus, = 𝜎 𝑇 [𝐶(𝜙˙ 𝑁 𝑒𝑤 − 𝜙˙ 𝑟𝑁 𝑒𝑤 ) − 𝜙¨𝑟𝑁 𝑒𝑤 + (𝐴2 ṗ + 𝐵4 w𝑥
we make the dimension of the sliding surface be 𝑁 − 1.
+𝐵4 d𝑥 + 𝐵5 w𝑦 + 𝐵5 d𝑦 + 𝐵6 𝐵𝜏 𝜏 + 𝐵6 𝐵𝜏 d𝜏 )]
Before designing the sliding surface, we first define angu-
lar error and its derivative = 𝜎 𝑇 [𝐶(𝜙˙ 𝑁 𝑒𝑤 − 𝜙˙ 𝑟𝑁 𝑒𝑤 ) − 𝜙¨𝑟𝑁 𝑒𝑤
+(𝐴2𝑛 ṗ + 𝐵4𝑛 w𝑥𝑛 + 𝐵5𝑛 w𝑦𝑛 + 𝐵6𝑛 𝐵𝜏 𝜏 ) + d]
e = 𝜙𝑁 𝑒𝑤 − 𝜙𝑟𝑁 𝑒𝑤 ė = 𝜙˙ 𝑁 𝑒𝑤 − 𝜙˙ 𝑟𝑁 𝑒𝑤
where 𝜙𝑁 𝑒𝑤 = [𝜙1 , 𝜙2 , ⋅ ⋅ ⋅ , 𝜙𝑁 −1 ]𝑇 , representing the Substituting (11), (12) and (13) into 𝑉˙ , one obtains
first 𝑁 − 1 actual joint angles, and 𝜙𝑟𝑁 𝑒𝑤 =
𝑉˙ = −𝜌∣∣𝜎∣∣ + 𝜎 𝑇 d ≤ −𝜌∣∣𝜎∣∣ + ∣∣𝜎∣∣ ⋅ ∣∣d∣∣
[𝜙1𝑟 , 𝜙2𝑟 , ⋅ ⋅ ⋅ , 𝜙(𝑁 −1)𝑟 ]𝑇 , representing the first 𝑁 − 1 refer-
ence joint angles. The dynamics of 𝜙𝑁 𝑒𝑤 is ≤ −𝜌∣∣𝜎∣∣ + 𝑑max ∣∣𝜎∣∣ = −𝜂∣∣𝜎∣∣

𝜙¨𝑁 𝑒𝑤 = 𝐴2 (p)ṗ + 𝐵4 (p)(w𝑥 + d𝑥 ) + 𝐵5 (p)(p)(w𝑦 + d𝑦 ) It is obvious that 𝑉˙ is negative definite. By Lyapunov


+𝐵6 (p)𝐵𝜏 (𝜏 + d𝜏 ) theorem for stability, the equilibrium at the origin 𝜎 = 0 is
asymptotically stable. If 𝜙𝑁 𝑒𝑤 (𝑡 = 0) is off 𝜙𝑟𝑁 𝑒𝑤 (𝑡 = 0)
= 𝐴2𝑛 (p)ṗ + 𝐵4𝑛 (p)w𝑥𝑛 + 𝐵5𝑛 (p)w𝑦𝑛
in the beginning, the sliding surface is reached in a finite
+𝐵6𝑛 (p)𝐵𝜏 𝜏 + d(p, 𝜏, 𝑡) (9) time 𝑡𝑟𝑒𝑎𝑐ℎ ≤ ∥𝜎(𝑡 = 0)∥∞ /𝜂, where ∥(⋅)∥∞ denotes the
where 𝐴2 (p), 𝐵4 (p), 𝐵5 (p), 𝐵6 (p), are submatrices ob- ∞−norm of (⋅). After the system reaches the sliding surface
tained from matrix 𝐴(p), 𝐵(p) in (4), corresponding to 𝜎 = 0, it stays there. In the sliding mode, 𝜎(𝑡) = 0, 𝜎(𝑡)
˙ =
𝜙¨𝑁 𝑒𝑤 , and 𝐴2𝑛 (p), 𝐵4𝑛 (p), 𝐵5𝑛 (p), 𝐵6𝑛 (p) are their nom- 0, the equivalent control is 𝜏𝑒𝑞 = (𝐵6 𝐵𝜏 )−1 [𝜙¨𝑟𝑁 𝑒𝑤 −
inal values. d(p, 𝜏, 𝑡) = (𝐴2 − 𝐴2𝑛 )ṗ + (𝐵4 w𝑥 − 𝐵4𝑛 w𝑥𝑛 + 𝐶(𝜙˙ 𝑁 𝑒𝑤 − 𝜙˙ 𝑟𝑁 𝑒𝑤 )−(𝐴2 ṗ+𝐵4 w𝑥 +𝐵4 d𝑥 +𝐵5 w𝑦 +𝐵5 d𝑦 +
𝐵4 d𝑥 ) + (𝐵5 w𝑦 − 𝐵5𝑛 w𝑦𝑛 + 𝐵5 d𝑦 ) + (𝐵6 𝐵𝜏 𝜏 − 𝐵6𝑛 𝐵𝜏 𝜏 + 𝐵6 𝐵𝜏 d𝜏 )]. (10) gives the dynamics of e, which contains the
𝐵6 𝐵𝜏 d𝜏 ), represents the difference between the actual terms first three angular errors. Since all entries of the diagonal
and nominal terms. In the expression of d(p, 𝜏, 𝑡), all the matrix 𝐶 are chosen to be positive scalars, it is easy to show
terms are bounded, thus we assume that the norm of it has that on the sliding surface, each single element of e always
an upper bound converges to 0, thus yielding the result that the first 𝑁 − 1
reference inputs can be tracked.
∣∣d(p, 𝜏, 𝑡)∣∣ ≤ 𝑑max

978-1-4577-2067-3/12/$26.00 c 2011 IEEE 311


12th IEEE Workshop on Variable Structure Systems,
VSS’12, January 12-14, Mumbai, 2012

IV. N UMERICAL E XAMPLES d𝜏 = 10−3 × [0.2 + 0.2 sin 𝑡, 0.1 − 0.2 cos 𝑡]𝑇 . Chattering
Forward motion is the most common locomotion pattern phenomenon always exists in sliding mode control, which
of Carangiform fish (in this work, all the examples are given is a character of it. To have a smoother control signal, we
𝜎
by using forward locomotion). If the fish moves forward, replace ∥𝜎∥ in (13) with a saturation function 𝑠𝑎𝑡(𝜎).
there exists a body wave traveling backwards. Since the wave ⎧ 𝜎
travels from its head to tail, the head is preceding the tail
 , if ∣∣𝜎∣∣ > 𝜖,
∣∣𝜎∣∣

affected by the wave. More generally, the movement of the 𝑠𝑎𝑡(𝜎) =
⎩ 𝜎,
 otherwise.
former part of the body has a phase lead than the latter one, 𝜖
and it is reflected in the phase difference among the link
and here we choose 𝜖 = 0.1
orientation angle 𝜙𝑗 (𝑗 = 1, ⋅ ⋅ ⋅ , 𝑁 ). For the reason that the
In the first scenario, we use sliding mode control, and se-
backward moving wave has the same oscillating frequency
lect the parameters as 𝐶 = 𝑑𝑖𝑎𝑔{10, 1} (a diagonal matrix),
at different places, we suppose each 𝜙𝑗 follow the same
𝑑max = 40, 𝜂 = 0.1. At time 𝑡 = 0, the fish is still, and its
angular frequency. Following these considerations, we let the
three links are aligned on 𝑥-axis with its head at the origin,
reference 𝜙𝑗𝑟 assume the following form
which means p = [0.15 0 0 0.45 0 0 0.75 0 0 1.05 0 0]𝑇 .
𝜙𝑗𝑟 = 𝐴𝑚 (𝑗) ⋅ sin[𝜔𝑡 + (2 − 𝑗)𝜃] (14) The control torques are shown in Fig. 3.
where 𝑗 = 1, 2, ⋅ ⋅ ⋅ , 𝑁 . 𝑡 denotes time instant. 𝐴𝑚 (𝑗), 𝜔 are
the amplitude and angular frequency of 𝜙𝑗𝑟 respectively, and 0.06
τ1 τ2

𝜃 is the phase lead of link 𝑖 comparing with its latter one. 0.04

Note that in Carangiform fish, the amplitude of the body


0.02
wave gradually increases from its head to its tail, thus we
have the following relation: 𝐴𝑚 (1) < ⋅ ⋅ ⋅ < 𝐴𝑚 (𝑗) < ⋅ ⋅ ⋅ < 0

𝐴𝑚 (𝑁 ). Torques
In this model, we select 𝑁 = 3, i.e., the robotic fish
−0.02

consists of three links. The first link is the longest, and the −0.04

third link is the shortest. Their length proportion is referred to −0.06

[2]. Table I shows mechanical parameters of the links, where


𝑙𝑖 , 𝑚𝑖 , 𝐼𝑖 are the length, mass and moment of inertia of link −0.08

𝑖 respectively, 𝑓𝑖⊥ and 𝑓𝑖∥ are estimated water resistance −0.1

coefficients [10]. Their SI units are 𝑚(𝑚𝑒𝑡𝑒𝑟), 𝑘𝑔, 𝑘𝑔 ⋅ 𝑚2 ,


0 2 4 6 8 10 12 14 16 18 20
Time (s)

𝑁 𝑠2 /𝑚2 , 𝑁 𝑠2 /𝑚2 .
Fig. 3. Scenario 1: Torques trajectory (Sliding mode control).
TABLE I
M ECHANICAL PARAMETERS OF THE L INKS
Link # 𝑙𝑖 𝑚𝑖 𝐼𝑖 𝑓𝑖⊥ 𝑓𝑖∥
1. 0.15 0.45 1.4603 × 10−3 2.7 2.70 0.1

2. 0.108 0.168 2.721 × 10−4 5.4 1.40 0


3. 0.0975 0.1236 1.632 × 10−4 5.4 1.141
−0.1

−0.2

Based on (14), we give the reference angles 𝜙𝑗𝑟 . Since this −0.3
x1 trajectory

robotic fish is essentially an underactuated system, tracking


−0.4
of arbitrary number of reference inputs is impossible. How-
−0.5
ever, by reference planning approach in [1], which conducts
equilibrium analysis at the neighborhood of the equilibrium −0.6

point, this problem can be handled. Following this method −0.7

and the relation between the amplitudes of the body wave, −0.8

we choose 𝜃 = 2.003, 𝐴𝑚 (1) = 0.3142, 𝐴𝑚 (2) = 0.3227, −0.9


0 2 4 6 8 10 12 14 16 18 20
𝐴𝑚 (3) = 1.0090. Other parameter is appropriately chosen Time (s)

as 𝜔 = 2𝜋. In this section, the above set of parameters


(𝜃, 𝐴𝑚 , 𝜔), applies to all scenarios, and we only consider Fig. 4. Scenario 1: 𝑥1 trajectory (Sliding mode control).
the forward moving case due to space limitation.
For simplicity, we suppose that the parameter uncer- In the second scenario, we use computed torque control
tainties are in the following form: 𝑀 = (1 + 𝛼)𝑀0 , method [1] in (16), with the feedback coefficients 𝑘1 = 10,
𝐹⊥ = (1 + 𝛽1 )𝐹⊥0 , 𝐹∥ = (1 + 𝛽2 )𝐹∥0 , where 𝛼 = 𝑘2 = 1.
0.2, 𝛽1 = 0.2, 𝛽2 = 0.2. The disturbances parameters
are: d𝑥 = 10−3 × [1 + sin 𝑡, −2 + cos 𝑡, 0.5 − 2 sin 𝑡]𝑇 , 𝜏 = (𝐵𝜏𝑇 𝐵3 𝐵𝜏 )−1 𝐵𝜏𝑇 [𝜙¨𝑟 + 𝑘1 (𝜙𝑟 − 𝜙) + 𝑘2 (𝜙˙ 𝑟 − 𝜙)
˙
d𝑦 = 10−3 × [0.2 + 0.3 sin 𝑡, 1 + 2 cos 𝑡, 0.3 − 4 sin 𝑡]𝑇 , −(𝐴1 ṗ + 𝐵1 w𝑥 + 𝐵2 w𝑦 )] (16)

978-1-4577-2067-3/12/$26.00 c 2011 IEEE 312


12th IEEE Workshop on Variable Structure Systems,
VSS’12, January 12-14, Mumbai, 2012

where 𝜙𝑟 = [𝜙1𝑟 , 𝜙2𝑟 , ⋅ ⋅ ⋅ , 𝜙𝑁 𝑟 ]𝑇 is the vector of reference which means arbitrary number of trajectory tracking is
angles for all the links, and 𝑘1 , 𝑘2 are coefficients relating to impossible. Furthermore, robustness can not be guaranteed
feedback terms. Here we choose 𝑘1 = 10, 𝑘2 = 1. Other for unmatched uncertainties or disturbances.
parameters and initial condition are the same as the first
V. C ONCLUSION
scenario. The comparison of angular error between sliding
mode controller and computed torque controller is shown In this paper, the dynamic model of the Carangiform
in Fig. 5. It is obvious that by SMC method, the first two robotic fish is first given. Based on the fact that body wave
joint angular errors quickly converge to 0 after a short period exists on the body of a traveling fish, we give the reference
of time. The third joint angular error changes around 0 but angles for all the links’ orientation by using sinusoidal
cannot converge. While by computed torque method, the functions. We find that when the former reference angle has
three joint angular errors are much larger than those obtained a phase lead compared with the latter one, the fish moves
from SMC method, and none of them converge to 0 in the forward. Sliding mode control is proposed to handle the
end. actual system model, which takes into account parameter
uncertainties and external disturbances. SMC design can
promise theoretically that angular error of the first two links
converge to zero. Numerical results show that the effec-
0.4
SMC tiveness of SMC to resist uncertainties, and better tracking
trajectory

CTC
0.2 performance is obtained compared with that using computed
0
torque control.
1r

R EFERENCES
φ −φ

−0.2
1

−0.4
[1] J.-X. Xu and X.-L. Niu, “Analytical control design for a biomimetic
0 2 4 6 8 10 12 14 16 18 20 robotic fish,” in Industrial Electronics (ISIE), 2011 IEEE International
Time (s) Symposium on, June 2011, pp. 864 –869.
0.4
[2] J. Yu, L. Wang, and M. Tan, “Geometric optimization of relative link
SMC lengths for biomimetic robotic fish,” IEEE Transactions on Robotics,
trajectory

0.2 CTC vol. 23, no. 2, pp. 382–386, Apr. 2007.


0
[3] C. Zhou, M. Tan, Z. Cao, S. Wang, D. Creighton, N. Gu, and
S. Nahavandi, “Kinematic modeling of a bio-inspired robotic fish,”
−0.2 in IEEE International Conference on Robotics and Automation, 2008.
2r
φ −φ

−0.4
ICRA 2008., May 2008, pp. 695 –699.
2

[4] K. Zou, C. Wang, G. Xie, T. Chu, L. Wang, and Y. Jia, “Cooperative


−0.6 control for trajectory tracking of robotic fish,” in American Control
0 2 4 6 8 10 12 14 16 18 20
Time (s) Conference, 2009. ACC ’09., June 2009, pp. 5504 –5509.
[5] M. Sfakiotakis, D. Lane, and J. Davies, “Review of fish swimming
1.5 modes for aquatic locomotion,” IEEE Journal of Oceanic Engineering,
SMC
trajectory

1 CTC vol. 24, no. 2, pp. 237 –252, Apr. 1999.


[6] J. Colgate and K. Lynch, “Mechanics and control of swimming: A
0.5 review,” IEEE Journal of Oceanic Engineering, vol. 29, no. 3, pp.
0 660 – 673, July 2004.
3r

[7] M. J. Lighthill, “Aquatic animal propulsion of high hydromechanical


φ −φ

−0.5 efficiency,” Journal of Fluid Mechanics, vol. 44, no. Nov., pp. 265–
3

−1 301, 1970.
0 2 4 6 8 10 12 14 16 18 20 [8] ——, “Large-amplitude elongated-body theory of fish locomotion,”
Time (s) Proceedings of the Royal Society of London. Series B, Biological
Sciences, vol. 179, no. 1055, pp. 125–138, 1971.
[9] J. Z. Yu, M. Tan, S. Wang, and E. Chen, “Development of a biomimetic
robotic fish and its control algorithm,” IEEE Transactions on Systems
Fig. 5. Comparison of angular error between Scenario 1: sliding mode Man and Cybernetics Part B: Cybernetics, vol. 34, no. 4, pp. 1798–
control (SMC) and Scenario 2: computed torque control (CTC). 1810, Aug. 2004.
[10] O. Ekeberg, “A combined neuronal and mechanical model of fish
swimming,” Biological Cybernetics, vol. 69, no. 5-6, pp. 363–374,
Comparing the two scenarios, we find that when there exist Oct. 1993.
parameter and unmodeled uncertainties, computed torque [11] K. A. Morgansen, V. Duidam, R. J. Mason, J. W. Burdick, and R. M.
Murray, “Nonlinear control methods for planar carangiform robot
control cannot work very well, because the error between fish locomotion,” in IEEE International Conference on Robotics and
the actual joint angles and reference joint angles are large Automation, 2001. Proceedings 2001 ICRA., vol. 1, 2001, pp. 427 –
and always exists. When we use sliding mode control, the 434 vol.1.
[12] K. A. Morgansen, P. A. Vela, and J. W. Burdick, “Trajectory stabiliza-
first two reference inputs can be perfectly tracked, thus we tion for a planar carangiform robot fish,” in Robotics and Automation,
achieve the goal in Sec. IV-B when designing the sliding 2002. Proceedings. ICRA ’02. IEEE International Conference on,
surface. vol. 1, 2002, pp. 756 – 762 vol.1.
[13] J. Slotine and W. Li, Applied nonlinear control. Prentice Hall, 1991.
In Scenario 1, though 𝜙1𝑟 and 𝜙2𝑟 can be tracked ac- [14] T. Fossen, Guidance and Control of Ocean Vehicles. New York, NY:
curately, perfect tracking of 𝜙3𝑟 cannot be promised the- Wiley, 1995.
[15] W. Cao and J. Xu, “Nonlinear integral-type sliding surface for both
oretically. The fundamental reason is that the system is matched and unmatched uncertain systems,” IEEE Transaction on
underactuated, i.e., the number of actuators in the system Automatic Control, vol. 49, no. 8, pp. 1355–1360, Aug 2004.
is fewer than the number of independent physical variables,

978-1-4577-2067-3/12/$26.00 c 2011 IEEE 313

You might also like