1 Introduction

Bio-inspired robotic fish aim to emulate swimming of live fish (Childress 1981; Blake 1983) by deforming the body and/or moving different fins (Triantafyllou and Triantafyllou 1995; Mason and Burdick 2000a; Low 2006; y Alvarado and Youcef-Toumi 2006; Ichiklzaki and Yamamoto 2007; Yu et al. 2012; Long et al. 2006). Improved efficiency, maneuverability, and stealth are some of the potential advantages of robotic fish over traditional propeller-driven underwater vehicles (Anderson et al. 1998; Sfakiotakis et al. 1999; Triantafyllou et al. 2000). Among their many applications, robotic fish can provide an underwater platform for aquatic environmental monitoring (Tan 2011; Zhang et al. 2015), as well as serving as a tool for studying the behaviors of live fish through robot–animal interactions (Marras and Porfiri 2012). Numerous designs for robotic fish have been reported in the literature (Du et al. 2015), with different actuation mechanisms and levels of system complexity (Kopman and Porfiri 2013; Wang and Tan 2013; Behbahani et al. 2013; Kim et al. 2005; Wang et al. 2008; Aureli et al. 2010; Yu et al. 2004; Low and Willy 2006; Zhou et al. 2008; Ijspeert et al. 2007).

Modeling the robotic fish dynamics is often critical for the design, control, and understanding of robotic fish behavior, and it has received extensive attention in the literature (Lighthill 1971; Morgansen et al. 2007; Aureli et al. 2010; Kanso et al. 2005; Wang and Tan 2013, 2015; Wang et al. 2015; Chen et al. 2010; Kelly and Murray 2000; Kelly 1998). The most challenging step in dynamically modeling robotic fish is capturing the interactions between the body/fins and the fluid and calculating the resulting force and moment exerted on the body. Computational fluid dynamics (CFD) modeling (Zhang et al. 2006; Liu et al. 1996; Mittal 2004; Dong et al. 2010) is capable of describing such interactions with high fidelity and offering physical insight, but its computational cost often makes it infeasible for designing and control purposes. Several alternatives are available. For example, quasi-steady lift and drag models from airfoil theory can be applied to the body and fin surfaces of underwater robots (Morgansen et al. 2007; Kodati et al. 2008; Harper et al. 1998; Mason and Burdick 2000b; Mason 2003). One could also assume perfect fluids (irrotational potential flow) and exploit the symmetry to obtain a finite-dimensional model for the fluid–structure interactions (Kanso et al. 2005; Melli et al. 2006). Effects of vorticity can be accommodated by assuming, for example, vortices periodically shed from the tail fin (Kanso 2009; Kelly and Murray 2000).

In this work, we are focused on paired pectoral fin locomotion of a robotic fish. Although the caudal fin is the primary appendage used for propulsion in robotic fish (Lachat et al. 2006; Wang et al. 2008; Aureli et al. 2010; Wang and Tan 2013), pectoral fins play a vital role in maneuvering and stability of live fish while providing or assisting propulsion (Fontanella et al. 2013; Rosenberger 2001). Kinematics and hydrodynamics of live fish pectoral fins have been studied be several researchers (Webb 1973, 1975; Blake 1979, 1980). A number of investigations have been conducted on rigid pectoral fins with one or more degrees of freedom, to study their effect on robotic fish swimming (Kato and Furushima 1996; Kato and Inaba 1998; Kato et al. 2000; Liu et al. 2005; Morgansen et al. 2007; Kodati et al. 2008; Sitorus et al. 2009). Recently, studies have been pursued on flexible pectoral fins (Kato et al. 2008; Lauder et al. 2006; Palmisano et al. 2007; Tangorra et al. 2007; Barbera 2008; Phelan et al. 2010; Shoele and Zhu 2010; Behbahani et al. 2013), and pectoral fins with flexible joints (Behbahani and Tan 2014a, b, 2016a, b), to mimic live fish behavior more closely. While the flexibility of pectoral fins for live fish and robotic fish is appreciated and has been explored with both experimental (Lauder et al. 2006; Tangorra et al. 2007) and CFD (Dong et al. 2010) methods, systematic analysis of the role of pectoral fin flexibility in robotic fish performance has been limited.

The goal of this paper is to develop a systematic, computation-efficient framework for analyzing how the flexibility of pectoral fins affects the swimming performance and mechanical efficiency of the robot. While pectoral fin motions can generally be classified into three modes based on the axis of rotation, rowing, feathering, and flapping, we focus on the rowing motion since it can be utilized for a number of in-plane locomotion and maneuvering tasks, such as forward swimming, sideway swimming, and turning. A dynamic model for the robotic fish is first proposed. We use Newton–Euler equations to model the rigid body dynamics of the robot. The flexible fins are approximated as multiple rigid segments, connected via torsional springs and dampers. While the motion of the flexible fin in water could also be modeled with the Euler–Bernoulli beam theory (Kopman et al. 2015; y Alvarado and Youcef-Toumi 2006; Kopman and Porfiri 2013; Aureli et al. 2010; Wang et al. 2015; Chen et al. 2010), the multi-segment approach has been proven effective and computationally efficient in capturing large deformation in flexible caudal fins (Wang et al. 2015). Blade element theory is adopted to evaluate the hydrodynamic forces on the fin elements. The proposed dynamic model is verified through experiments on a free-swimming robotic fish prototype equipped with pectoral fins. The fins are 3D-printed with different stiffness levels, ranging from very flexible to rigid.

The dynamic model is used to analyze the impact of fin flexibility on swimming speed behavior at different fin-beat frequencies. It is found that, while the robot with rigid fins achieves a linearly increasing speed with the fin-beat frequency, there is an optimal frequency in the case of a flexible fin at which the speed is maximized. Furthermore, fins with moderate flexibility outperform the rigid fins on the speed performance for a large range of operating frequencies. The impact of speed ratio \(\zeta \) between the power stroke and the recovery stroke on the swimming behavior is also studied for different fins. Finally, the influences of fin flexibility and \(\zeta \) on the mechanical efficiency of the robot are examined. The study reveals interesting trade-offs between the different objectives (speed and efficiency) and supports the use of the proposed model as a promising tool for fin flexibility and gait design.

The remainder of this paper is organized as follows. Section 2 reviews the dynamics of the robotic fish body. Section 3 presents the dynamic model for the flexible pectoral fins. The kinematics of the flexible pectoral fins adopted in this work is presented in Sect. 4, while the method for mechanical efficiency calculation is discussed in Sect. 5. In Sect. 6, we present the robotic fish prototype, the pectoral fin fabrication method, the experimental setup, and the methods for model parameter identification. Section 7 is devoted to results. Finally, concluding remarks and future work directions are discussed in Sect. 8.

2 Dynamics of the Robotic Fish Body

The robotic fish under study contains two subsystems, the flexible pectoral fins, for which the dynamics are covered in Sect. 3, and the rigid body. The robotic fish prototype used in this study does have a caudal fin, but the consideration of hydrodynamics associated with an actuated caudal fin is outside the scope of this work. Instead, the (unactuated) caudal fin is considered part of the rigid body. To study the motion of the robot, we include the rigid body dynamics based on Kirchhoff’s equations of motion in an inviscid fluid (Fossen 1994; Aureli et al. 2010), with the added mass effect incorporated.

2.1 Rigid Body Dynamics

Fig. 1
figure 1

Top view of the robotic fish actuated by flexible pectoral fins and restricted to planar motion

Figure 1 illustrates a robotic fish, restricted to the planar motion, where \({[X, Y, Z]}^T\) denotes the global coordinates, and \({[x,y,z]}^T\) with unit vectors \([{\hat{i}},\hat{j},{\hat{k}}]\) indicates the body-fixed coordinates, attached to the center of mass of the robotic fish body. Each pectoral fin is modeled as multiple, connected, rigid elements, and \({\hat{m}}_i\) and \({\hat{n}}_i\) denote the unit vectors parallel to and perpendicular to the ith element of the pectoral fin, respectively, where superscripts r and l indicate the right and the left fin, respectively. The robotic fish body and the flexible pectoral fins are considered to be neutrally buoyant, with center of gravity and geometry coinciding. The simplified equations of the robotic fish body in the body-fixed coordinates are represented as (Barbera 2008; Wang et al. 2015; Behbahani and Tan 2016b)

$$\begin{aligned} (m_b-X_{\dot{V}_{C_x}}) {\dot{V}}_{C_x}&= (m_b-Y_{\dot{V}_{C_y}}) V_{C_y}\omega _{C_z}+F_x, \end{aligned}$$
(1)
$$\begin{aligned} (m_b-Y_{\dot{V}_{C_Y}}) {\dot{V}}_{C_y}&= -(m_b-X_{\dot{V}_{C_x}}) V_{C_x}\omega _{C_z}+F_y, \end{aligned}$$
(2)
$$\begin{aligned} (I_z-N_{{\dot{\omega }}_{C_x}}) \dot{\omega }_{C_z}&= {M}_z, \end{aligned}$$
(3)

where \(m_b\) is the mass of the robotic fish body, \(I_z\) is the robot inertia about the z-axis, and \(X_{\dot{V}_{C_x}}, Y_{\dot{V}_{C_y}}\), and \(N_{{\dot{\omega }}_{C_x}}\) are the hydrodynamic derivatives that represent the effect of the added mass/inertia on the rigid body (Fossen 1994). \(V_{C_x}, V_{C_y}\), and \(\omega _{C_z}\) are the surge, sway, and yaw velocities, respectively. The variables \(F_x, F_y\) and \(M_z\) denote the external hydrodynamic forces and moment exerted on the fish body, which are described as

$$\begin{aligned}&F_x= F_{h_{x}}-F_\mathrm{D} \cos \beta +F_\mathrm{L} \sin \beta , \end{aligned}$$
(4)
$$\begin{aligned}&F_y= F_{h_{y}}-F_\mathrm{D} \sin \beta -F_\mathrm{L} \cos \beta ,\end{aligned}$$
(5)
$$\begin{aligned}&M_z= M_{h_z}+M_\mathrm{D}, \end{aligned}$$
(6)

where \(F_{h_{x}}, F_{h_{y}}\), and \(M_{h_{z}}\) are the hydrodynamic forces and moment transmitted to the fish body by the pectoral fins, the details of which are provided in Sect. 3. As depicted in Fig. 1, \(F_\mathrm{D}, F_\mathrm{L}\), and \(M_\mathrm{D}\) are the body drag, lift, and moment, respectively. These forces and moment are expressed as (Morgansen et al. 2007; Aureli et al. 2010; Wang et al. 2015)

$$\begin{aligned}&F_\mathrm{D}= \frac{1}{2}\rho |V_C|^2 S_\mathrm{A} C_\mathrm{D}, \end{aligned}$$
(7)
$$\begin{aligned}&F_\mathrm{L}= \frac{1}{2}\rho |V_C|^2 S_\mathrm{A} C_\mathrm{L}\beta ,\end{aligned}$$
(8)
$$\begin{aligned}&M_\mathrm{D}= - C_\mathrm{M}\omega _{C_z}^2 {\text {sgn}} (\omega _{C_z}), \end{aligned}$$
(9)

where \(|V_C|\) is the linear velocity magnitude of the robotic fish body, \(|V_C|=\sqrt{{V}_{C_x}^2+{V}_{C_y}^2}, \rho \) is the mass density of water, \(S_\mathrm{A}\) is the wetted area of the body, \(C_\mathrm{D}, C_\mathrm{L}\) and \(C_\mathrm{M}\) are the dimensionless drag, lift, and damping moment coefficients, respectively, \(\beta \) is the angle of attack of the body, and \(\text {sgn}(.)\) is the signum function.

Finally, the kinematics of the robotic fish are described as (Wang et al. 2015)

$$\begin{aligned} {\dot{X}}&= V_{C_x}\; \cos \psi -V_{C_y}\; \sin \psi , \end{aligned}$$
(10)
$$\begin{aligned} {\dot{Y}}&= V_{C_y}\; \cos \psi +V_{C_x}\; \sin \; \psi ,\end{aligned}$$
(11)
$$\begin{aligned} \dot{\psi }&=\omega _{C_z}, \end{aligned}$$
(12)

where \(\psi \) denotes the angle between the x-axis and the X-axis.

3 Dynamics of Flexible Rowing Pectoral Fins

This section focuses on calculating the hydrodynamic forces on the flexible pectoral fin and determining its dynamics using blade element theory (Blake 1983), by dividing the fin span into multiple rigid elements. The rowing motion of the pectoral fin has been classified as a “drag-based” swimming mechanism, where the drag element of fluid dynamics generates the thrust (Lauder and Drucker 2004; Vogel 1994). The pectoral fin is considered to be rectangular with span length of S and chord length of C. We consider a coordinate system with unit vectors \({\hat{m}}_i\) and \({\hat{n}}_i\) for the pectoral fin; see Fig. 1. The relationship between these unit vectors and the robotic fish body-fixed coordinates is given by

$$\begin{aligned} \hat{m}_i&= \cos \gamma _i \hat{i} + \sin \gamma _i \hat{j}, \end{aligned}$$
(13)
$$\begin{aligned} \hat{n}_i&= -\sin \gamma _i \hat{i} + \cos \gamma _i \hat{j}, \end{aligned}$$
(14)

where \(\gamma _i\) is the angle between \(\hat{m}_i\) and \(\hat{i}\); see Fig. 1 for illustration. We use the left pectoral fin to illustrate the calculations. However, it is straightforward to extend the calculations to the right pectoral fin. Figure 2 provides a visualization of the parameters and variables of a flexible fin element.

Fig. 2
figure 2

Top view of ith element of the flexible fin and its parameters and variables

We divide the flexible fin into N rigid elements with an equal length of \(l=\frac{S}{N}\), where each segment is connected to its neighbors via a pair of torsional spring and damper. The constants of the spring and damper can be derived from the properties of the flexible material. The spring constant \(K_\mathrm{S}\) is evaluated as (Banerjee and Nagarajan 1997)

$$\begin{aligned} K_\mathrm{S}=\frac{ECh^3}{12l}, \end{aligned}$$
(15)

where h is the beam thickness and E is the Young’s modulus of the flexible material used for the pectoral fin. The damper coefficient \(K_\mathrm{D}\) can be evaluated as \(K_\mathrm{D}=\kappa K_\mathrm{S}\), where \(\kappa \) is a proportional constant. Figure 3 illustrates the forces on the ith element of the flexible fin. The angle \(\gamma _1\) is dictated by the pectoral fin actuator, and we need to find the angles \(\gamma _2\) to \(\gamma _N\), to know the trajectory of the flexible fin at each instant of time, which, subsequently, will allow one to evaluate the hydrodynamic force generated by the fin. In the following calculations, we assume an anchored robotic fish body. While considering the body motion in computing the hydrodynamic force on the actuated fin is instrumental in capturing the coupling between propulsion and robot motion (Kopman et al. 2015; Wang and Tan 2013), it significantly increases the modeling and subsequent computational complexity. In this work, the pectoral fin tip velocity is typically about ten times of the robotic fish body velocity; therefore, the modeling error introduced by ignoring the body motion is acceptable. This simplifying assumption has been adopted in the literature for robotic fish propelled with a caudal fin (Kopman and Porfiri 2013; Wang et al. 2015; y Alvarado and Youcef-Toumi 2006), and in our earlier work on rigid pectoral fins with flexible joints (Behbahani and Tan 2016a, b), where a similar robotic fish prototype was used.

Fig. 3
figure 3

Illustration of forces on the ith element of the flexible fin

The position of each point s on the ith element (see the definition of s in Fig. 2) at time t on the ith element can be described as

$$\begin{aligned} r_i(s,t) = \sum _{k=1}^{i-1}l\cdot {\hat{m}}_k + s \cdot {\hat{m}}_i. \end{aligned}$$
(16)

The corresponding velocity at the point s is

$$\begin{aligned} v_i(s,t) = \left\{ \sum _{k=1}^{i-1} l {\dot{\gamma }}_k \cos (\gamma _i -\gamma _k) + s {\dot{\gamma }}_i \right\} {\hat{n}}_i + \left\{ \sum _{k=1}^{i-1} l {\dot{\gamma }}_k \sin (\gamma _i -\gamma _k) \right\} {\hat{m}}_i, \end{aligned}$$
(17)

where \(\dot{\gamma }_k\) indicates the time derivative of \(\gamma _k\). Respectively, the corresponding acceleration at the point s is evaluated as

$$\begin{aligned} a_i(s,t)= & {} \left\{ \sum _{k=1}^{i-1} \left[ l {\ddot{\gamma }}_k \cos (\gamma _i -\gamma _k) + l {\dot{\gamma }}_k^2 \sin (\gamma _i -\gamma _k)\right] + s {\ddot{\gamma }}_i \right\} {\hat{n}}_i\nonumber \\&+ \left\{ \sum _{k=1}^{i-1} \left[ l {\ddot{\gamma }}_k \sin (\gamma _i -\gamma _k) - l {\dot{\gamma }}_k^2 \cos (\gamma _i -\gamma _k)\right] - s {\dot{\gamma }}_i^2 \right\} {\hat{m}}_i,\nonumber \\ \end{aligned}$$
(18)

where \(\ddot{\gamma }_k\) indicates the second time derivative of \(\gamma _k\).

3.1 Force Calculations for Element i

The hydrodynamic force on each element of the flexible fin is evaluated based on the blade element theory (Blake 1983) as follows

$$\begin{aligned} \mathrm {d}F_{h_{i}}(s,t) = -\frac{1}{2}C_n \big (\alpha _i(s,t)\big )\rho C |v_i (s,t)|^2 \mathrm {d}s\;\;\;\; \hat{e}_{v_{i}}, \end{aligned}$$
(19)

where \({\hat{e}}_{v_{i}}\) is a unit vector in the direction of the velocity of the ith element. \(C_n\) is the force coefficient, which depends on the angle of attack at each point, \(\alpha _i(s,t)\), and has a form of

$$\begin{aligned} C_n(\alpha _i)= \lambda \sin \alpha _i, \end{aligned}$$
(20)

where the parameter \(\lambda \) is evaluated empirically through experiments. Note that Eq. (19) captures both normal and span-wise components of the hydrodynamic force. The angle of attack at each point, \(\alpha _i(s,t)\), is defined via

$$\begin{aligned} \tan \alpha _i(s,t) = \frac{\langle v_i(s,t), {\hat{n}}_i\rangle }{\langle v_i(s,t), \hat{m}_i\rangle }, \end{aligned}$$
(21)

where \(\langle \cdot ,\cdot \rangle \) denotes the inner product.

The total hydrodynamic force acting on the ith element is defined by integrating Eq. (19) along the length of the element

$$\begin{aligned} F_{h_{i}}(t) = \int _0^l \mathrm {d} F_{h_{i}} (s,t). \end{aligned}$$
(22)

The interaction between two consecutive elements is captured via force balance on each element:

$$\begin{aligned} F_{h_{i}} + F_{A_{i-1}} - {F}_{A_i} = m_i {a}_i, \end{aligned}$$
(23)

where \(F_{A_{i}}\) is the force applied by element i on element \(i+1, F_{A_{i-1}}\) is the force applied by element \(i-1\) on element \(i, m_{i}\) is the effective mass of the ith element (which contains the mass and the added mass of element i, where the added mass is calculated based on a rigid plate moving in the water), and \(a_{i}\) denotes the acceleration of the midpoint of the ith element, which can be evaluated using Eq. (18) with \(s=\frac{l}{2}\). See Fig. 3 for illustration of the forces. Note that for the last element, \(F_{A_N} = 0\); therefore, Eq. (23) can be solved iteratively for \(F_{A_i}\), where \(0\le i \le N-1\).

3.2 Moment Calculations for Element i

The total hydrodynamic moment on the ith element is calculated as

$$\begin{aligned} M_{h_{i}} = \int _{0}^{l} s {\hat{m}}_i \times \mathrm {d}F_{h_{i}}(s,t), \end{aligned}$$
(24)

where \(\mathrm {d} F_{h_{i}}(s,t)\) is expressed in Eq. (19). The total moment relative to point \(A_{i-1}\) for element i is evaluated as

$$\begin{aligned} {M}_i= M_{h_{i}} + l \times F_{A_i} + M_{i+1} + M_{(S+D)_i} = I_i {\ddot{\gamma }}_i, \end{aligned}$$
(25)

where \(\times \) denotes the cross product, \(I_i\) represents the effective inertia of the ith element, and \( M_{(S+D)_i}\), the moment induced by the torsional spring and damper at \(A_{i-1}\), is evaluated as

$$\begin{aligned} M_{(S+D)_i}=-[K_\mathrm{S}(\gamma _{i}-\gamma _{i-1})+K_\mathrm{D}(\dot{\gamma _{i}}-{\dot{\gamma }}_{i-1})] {\hat{k}}, \end{aligned}$$
(26)

where \(K_\mathrm{S}\) and \(K_\mathrm{D}\) are the spring and damper coefficients used to model the flexible pectoral fin. Note that for the element \(N, M_{N+1} = 0\), which, through the recursion in the first equality in Zhou et al. (2008), allows the explicit expression of \({M}_i, 2\le i\le N\), in terms of other variables. The second equality in (25) thus provides (\(N-1\)) nonlinear second-order equations for \(\gamma _i\), where \(2\le i \le N\), which fully describe the dynamics of the N-element pectoral fin.

Equations (23) and (25) are used to find the total force/moment exerted on the robotic fish body:

$$\begin{aligned}&F_{h_x}= \langle F_{A_0},\;{\hat{i}}\rangle , \end{aligned}$$
(27)
$$\begin{aligned}&F_{h_y}= \langle F_{A_0},\;{\hat{j}}\rangle ,\end{aligned}$$
(28)
$$\begin{aligned}&M_{h_z}= -c_p \langle F_{A_0},\;{\hat{i}}\rangle -M_1, \end{aligned}$$
(29)

where \(c_p\) is the distance between robotic fish center of mass and the base of the flexible fin, \(F_{A_0}\) is the total force applied by the flexible pectoral fin to the center of mass of the robotic fish body, and \(M_1\) is the moment applied by the flexible pectoral fin to the center of mass of the robotic fish body. These forces and moments are then plugged into (46) to solve the rigid body dynamics of the robotic fish.

4 Kinematics of Flexible Rowing Pectoral Fins

The pectoral fins in this study sweep back and forth within the frontal plane. The rowing motion has distinct power and recovery strokes. During the power stroke, the pectoral fin moves backward to produce thrust through induced drag on the pectoral fin surface. On the other hand, during the recovery stroke, the fin moves toward the front of the fish, with minimal loading, to get ready for next fin-beat cycle. The pectoral fin is actuated at different speeds during the power and recovery strokes (faster power stroke) to produce a net thrust. In particular, we define the ratio

$$\begin{aligned} \zeta = \frac{P}{R}=\frac{\text {Power stroke speed}}{\text {Recovery stroke speed}}. \end{aligned}$$
(30)

For each fin-beat cycle, the pectoral fin base rotates according to

$$\begin{aligned} \gamma _1(t)= {\left\{ \begin{array}{ll} \frac{\pi }{2}-\gamma _\mathrm{A} \cos \Big [ \pi \big (\frac{\zeta +1}{T_p}\big ) t \Big ],&{} 0\le t\le \frac{T_p}{\zeta +1}\\ \frac{\pi }{2}+\gamma _\mathrm{A} \cos \Big [ \pi \big (\frac{\zeta +1}{\zeta T_p}\big ) \big ( t- \frac{T_p}{\zeta +1} \big ) \Big ], &{} \frac{T_p}{\zeta +1} < t\le T_p \end{array}\right. } \end{aligned}$$
(31)

where \(\gamma _\mathrm{A}\) is the amplitude of fin the actuation and \(T_P\) denotes the period of one cycle.

Fig. 4
figure 4

Illustration of the pectoral fin motion during power and recovery strokes: a the snapshots at different time instances of one fin-beat cycle, where \(T_p\) represents the total time for each cycle; b orientation and angular velocity of the base of the pectoral fin with respect to the main axis of the robotic fish, where \(\zeta =5, \gamma _{rm A}=50\) deg, and \(T_p=1\) s are used

Figure 4 illustrates the pectoral fin kinematics. The visualization of the pectoral fin motion during one fin-beat cycle is shown in Fig. 4a. Note that for \(\zeta = 1\), the pectoral fin flaps symmetrically during the power stroke and the recovery stroke, and for \(\zeta >1\), the pectoral fin slows down and spends more time in the recovery phase. Figure 4b illustrates the orientation angle \(\gamma _1\) and the angular velocity \(\dot{\gamma _1}\) of the base of the pectoral fin with respect to the x-axis of the robotic fish during one fin-beat cycle. For turning the robotic fish, we just actuate one of the pectoral fins and keep the other fin still.

5 Mechanical Efficiency

Aside from the swimming performance (for example, swimming speed or turning radius), another critical factor about the robotic fish is its mechanical efficiency. We will analyze the efficiency of the robot under different pectoral fin properties using the model presented in Sects. 3 and 4. In particular, it is of interest to investigate the effect of flexibility of the pectoral fins on the mechanical efficiency. During steady-state swimming, the mechanical efficiency of the robot is evaluated as (Blake 1983; Nakashima et al. 2003; Suzuki et al. 2007)

$$\begin{aligned} \eta = \frac{W_b}{W_\mathrm{T}}, \end{aligned}$$
(32)

where \(W_\mathrm{b}\) is the useful work needed to move the robotic fish during each fin-beat cycle and \(W_\mathrm{T}\) is the total work done by the pectoral fins during the same period. In this study, we do not consider other energy losses, such as the amount of electrical power used by other electronics, or frictional losses in motors and gears. The useful work \(W_\mathrm{b}\) is determined by

$$\begin{aligned} W_\mathrm{b} = \int _{t_0}^{t_0+T_p} F_{\text {Thrust}}(t) V_{C_x}(t) \mathrm {d}t, \end{aligned}$$
(33)

where \(t_0\) denotes the beginning of the fin-beat cycle and \(F_{\text {Thrust}} = F_{h_x}\) is the total hydrodynamic force produced by the pectoral fin in the x direction, exerted on the robotic fish body. The total work done by the paired pectoral fins, \(W_\mathrm{T}\), is obtained via

$$\begin{aligned} W_\mathrm{T} = 2\int _{t_0}^{t_0+T_p}\max \left\{ 0, \sum _{i = 1}^{N}\int _0^l \langle \mathrm {d}F_{h_{i}}(s,t),{v}_{i}(s,t)\rangle \right\} \mathrm {d}t. \end{aligned}$$
(34)

At some instants of time, the mechanical power of the pectoral fins could be negative. However, the servos cannot reclaim this energy from the water. Therefore, we treat the instantaneous power for these cases to be zero, which explains the \(\max (0,\cdot )\) operation in (34).

6 Materials and Methods

6.1 Robotic Fish Prototype

A robotic fish prototype, similar to that in Behbahani and Tan (2016a), was used to test and validate the proposed dynamic model and to support the performance analysis. This robotic fish included a rigid body, two pectoral fins, and a caudal fin. The rigid body was designed in SoildWorks software and printed in the VeroWhitePlus material from a PolyJet multi-material 3D printer (Objet350 Connex 3D System from Stratasys) and was coated with acrylic paint to minimize water absorption of the 3D-printed material. The body had a length of 15 cm, height of 8 cm, and width of 4.6 cm. Three waterproof servomotors (Traxxas 2065 Waterproof Sub-Micro Servo from Traxxas) was used to move the pectoral fins and caudal fin individually. The robot was battery-operated, using a Li-ion rechargeable battery (7.4 V, 1400 mAh from Powerizer), and a customized power converter PCB was designed to regulate the voltage to 5 V (through LM2673) and 3.3 V (through LP38690) for the servomotors and the microcontroller, respectively. The robot fin motion was controlled by a microcontroller (Arduino Pro Mini, 3.3 V). A picture of the 3D-printed body, along with all the other components for the robot, is shown in Fig. 5.

Fig. 5
figure 5

3D-printed robotic fish body and other components of the robot

6.2 Pectoral Fin Fabrication

Fig. 6
figure 6

Solidworks design of a composite pectoral fin

The pectoral fins used in this study were designed to have a composite structure and were 3D-printed. The fins could be easily detached from the fin mounts, to enable testing of the robot with different fins. We followed the approach proposed in Clark et al. (2015) for creating the composite fins, the effective stiffness of which can be easily adjusted by changing the thicknesses of different layers. The composite fins were made of two different materials, a rigid plastic material (VeroWhitePlus) and a flexible rubberlike material (TangoBlackPlus). The details of the design are illustrated in Fig.  6. The flexibility of the fins was controlled by adjusting the thickness of the VeroWhitePlus inner layer while keeping the total thickness of the fin constant (1.2 mm). Pectoral fins of size 45 mm \(\times \) 37.5 mm, with three different stiffness values, were fabricated. The specifications of these fins are summarized in Table 1. The fins are named F1–F3 for later reference in this paper.

Table 1 Specifications of pectoral fins with different flexibilities

The 3D-printed pectoral fins were treated with a thin coat of Ultra-Ever Dry omniphobic material (UltraTech International Inc.) to prevent changes of properties that may occur when they come in contact with water. Figure 7 shows an actual 3D-printed pectoral fin, before and after the Ultra-Ever Dry treatment. The application of Ultra-Ever Dry results in a white cast on the treated part.

Fig. 7
figure 7

An actual 3D-printed pectoral fin. Right Original fin; left printed fin treated with Ultra-Ever Dry omniphobic material

6.3 Experimental Setup

Fig. 8
figure 8

Experimental setup: a actual, b output of the Motive software

Experiments were conducted in a 6-ft-long, 2-ft-wide, and 2-ft-deep tank. An Optitrack motion capture system, containing four Flex 13 cameras, each mounted on heavy-duty universal stand via Manfrotto super clamp and 3D junior camera head, was used to track the robotic fish swimming. A computer equipped with Motive 1.7.5 software, capable of supporting real-time and offline workflows, was used to extract the desired data. The details of this setup are shown in Fig. 8. Two different locomotion modes, forward swimming and turning, were adopted for the robotic fish in the experiments. For each experiment, the robotic fish swam for approximately 30 s to reach its steady-state motion, and then, the steady-state data were captured and extracted. In the forward swimming case, we recorded the time it took for the robot to swim a distance of 50 cm. The experiment for each setting was repeated ten times, to minimize the impact of random factors on the experimental results.

6.4 Parameter Identification

All the parameters used in the simulations were either measured directly or identified experimentally. Details of the identification procedure for parameters of the robotic fish body can be found in Behbahani and Tan (2016a, b). The mass of the robotic fish was \(m_b = 0.502\) kg, and the inertia was evaluated to be \(I_z = 7.26\times 10^{-4}\) kg/\(\text {m}^2\). The added masses and added inertia were calculated based on a prolate spheroid approximation for the robotic fish body (Aureli et al. 2010; Fossen 1994), which were \(-X_{\dot{V}_{C_x}} = 0.1619\) kg, \(-Y_{\dot{V}_{C_y}} = 0.3057\) kg, and \(-N_{{\dot{\omega }}_{C_x}} = 5.52\times 10^{-5}\,\hbox {kg}/\text {m}^2\). The wetted surface area of the robotic fish body was \(S_\mathrm{A} = 0.0325\,\text {m}^2\). The drag, lift, and moment coefficients were identified empirically, using the rigid pectoral fins and \(\zeta = 2\). In particular, these parameters were tuned to match the forward velocity, turning radius, and turning period obtained in simulation with the experimental measurement, when two different power stroke speeds are used, completing the power stroke in 0.5 and 0.3 s, respectively. The resulting coefficients were \(C_\mathrm{D} = 0.42, C_\mathrm{L} = 4.86\), and \(C_\mathrm{M} = 7.6\times 10^{-4}\,\hbox {kg}/\text {m}^2\). The parameter \(\lambda \) from Eq. (20), which represents the hydrodynamic force coefficient of the pectoral fin, was identified empirically to be 0.6, by matching the forward swimming velocity of the robotic fish utilizing rigid pectoral fins for the fin-beat frequencies of 1 and 1.667 Hz, and power/recovery stroke ratio \(\zeta = 2\). This parameter was then used for all the other fin-beat frequencies, pectoral fin flexibilities, and \(\zeta \) ratios.

The spring and damper coefficients of the flexible fins were tuned to match the forward swimming velocity and the turning period of the robotic fish collected from experiments for \(\zeta = 2\), and fin-beat frequencies of 1 and 1.667 Hz. Each fin is discretized into three elements. The parameters for each fin are summarized in Table 1. These numbers were then used for all the other fin-beat frequencies and \(\zeta \) ratios throughout the simulations. We note that the choice of the number of approximating rigid segments is an important issue. Clearly, the more elements, the more accurate approximation to the flexible fin shape, at the cost of increased computational complexity. It is also reasonable to use more rigid elements for more flexible fins. However, the equations for the fin dynamics (\(\gamma _i\) equations) are highly nonlinear; for example, Eqs. (17) and (19) imply that the hydrodynamic force depends on terms like \(\dot{\gamma }^2_k\sin ^2(\gamma _i - \gamma _k)\)). The latter makes solving these equations in their current form very challenging when the number of elements gets big. As a result, we have found that three segments provide an acceptable trade-off between the modeling accuracy and computational cost, and the good match between the experimental results and model predictions reported in Sect. 7 also suggests that the three-segment approximation is reasonable.

7 Results and Analysis

7.1 Dynamic Model Validation

First, we have included plots of simulation results to illustrate how the flexible pectoral fin moves. The time history of the angles of different elements of the flexible pectoral fin, and the respective angles of attack, is shown in Fig. 9. In this simulation, the flexible fin F2 was used. Note the clear phase lags between the consecutive elements’ angles \(\gamma _i\). The angles of attack for all elements are constant (90\(^\circ \) or −90\(^\circ \)) for most of the time, but they experience abrupt changes during the transition between power and recovery strokes.

Fig. 9
figure 9

Time history of flexible pectoral fin: a evolution of the rigid element angles \(\gamma _1\)\(\gamma _3\), for one movement cycle, b variation of the angles of attack for all elements, where \(\zeta =5, \gamma _\mathrm{A}=50\) deg, and \(T_p=3\) s, c zoom-in view of the angle of attack for one movement cycle

Fig. 10
figure 10

Case of F2 with \(\zeta =2\): comparison between dynamic model simulation and experimental measurement of the forward swimming velocity, for different fin-beat frequencies

Next, we present results that validate our proposed dynamic model, where the case of pectoral fin F2 with \(\zeta = 2\) is used. Additional results supporting the model can be found in Sect. 7.2. Figure 10 shows the comparison between model predictions and experimental measurements of the forward swimming velocity, reported in both cm/s and body length per second (BL/s) versus the fin-beat frequency. The fin-beat frequency is defined as \(\frac{1}{T_p}\), where \(T_p\) is the duration of each fin-beat cycle. In the experiments, for \(\zeta =2\), the speed limit of the servo motors translated to a maximum actuation frequency of 2 Hz, so we have extended the simulation results to fin-beat frequency of 3 Hz in order to capture the performance trend of the robotic fish. From Fig. 10, the speed of the robotic fish drops after the fin-beat frequency reaches an optimal value, beyond which it gets harder for the flexible pectoral fins to follow the prescribed servo motion, and thus, the fin oscillation amplitude drops, resulting in a dropping thrust and speed as the frequency gets higher. Figures 11 and 12 show a comparison between simulation and experimental results on the turning period and the turning radius versus fin-beat frequency, respectively. In Fig. 11, the turning period drops with the fin-beat rate, as expected, up to a particular optimal frequency, beyond which it starts to increase. The optimal frequency in Fig. 11 coincides with that in Fig. 10. This can be explained by that, in both cases, the hydrodynamic forces generated by each pectoral fin are correlated with the fin oscillation amplitude, the behavior of which follows the same frequency response given our anchored-body assumption. The simulation results in Fig. 12 suggest that the turning radius of the robotic fish is nearly independent of fin-beat frequencies. The experimental data support the simulation to some extent. The mean of the turning radius remains almost the same (between 16 and 18 cm) for different fin-beat frequencies. Due to the disturbances from the interaction between the fluid and the tank wall, the robotic fish typically would not stay repeatedly on the same orbit in each turning experiment, which inevitably introduced noticeable error in the turning radius measurement.

Fig. 11
figure 11

Case of F2 with \(\zeta =2\): comparison between dynamic model simulation and experimental measurement of the turning period, for different fin-beat frequencies

Fig. 12
figure 12

Case of F2 with \(\zeta =2\): comparison between dynamic model simulation and experimental measurement of the turning radius, for different fin-beat frequencies

Overall, it can be concluded from Figs. 10, 11, and 12 that the proposed dynamic model can well capture the motion of the robotic fish actuated by flexible pectoral fins. Additional results in Sect. 7.2 will further validate the model through good match between experimental and simulation results.

Fig. 13
figure 13

Experimental and simulation results on the forward swimming velocity versus fin-beat frequency for different flexibilities of the pectoral fin, where the power/recovery stroke ratio \(\zeta = 2\) for all cases

7.2 Impact of Fin Stiffness

Here we compare the performance of pectoral fins with different flexibilities to gain insight into the influence of fin flexibility. We utilized a fin-beat pattern as specified in (31), where \(\zeta = 2\). The simulation and experimental results, shown in Fig. 13, are reported in both cm/s and BL/s. Again, we have extended the simulation results to fin-beat frequency of 3 Hz in order to capture the performance trend of the robotic fish. From Fig. 13, it is interesting to note that with rigid fins (F1), the swimming velocity increases nearly linearly with the fin-beat frequency, while for the flexible fins (F2 and F3), there is a clear optimal frequency at which the velocity is maximum. Fins with moderate flexibility (F2) outperform the rigid fins (F1) for the entire fin-beat frequency range achievable by the robotic fish prototype. This can be explained by that the flexible fin F2 moves beyond the line defined by the servo shaft, while the rigid fin always moves in sync with the servo shaft line, resulting in a larger oscillation amplitude for the flexible fin (until the frequency is high enough). The optimal frequency of operation for the flexible fin case is believed to be correlated to the resonant frequency of the fin in water, which drops as the flexibility of the fin increases. When the fin is too flexible (F3), its movement is greatly constrained by the resistance from water, which explains the corresponding poor swimming performance for the robotic fish.

Fig. 14
figure 14

Experimental comparison of the forward swimming velocities at different power/recovery stroke speed ratios \(\zeta = 2\) and 4. a Velocity versus fin-beat frequency, and b velocity versus power stroke time

7.3 Impact of the Power to Recovery Stroke Speed Ratio

This subsection is devoted to studying the effect of the power to recovery stroke speed ratio (\(\zeta \)) on the performance of the robotic fish. Figure 14 shows the experimental results on the forward swimming velocity, comparing the cases of \(\zeta = 2\) and 4. Here the fin flexibility spans F1–F3. Figure 14a shows the velocity versus fin-beat frequency. Overall, it seems to suggest that a higher \(\zeta \) provides better performance for each fin flexibility at each fin-beat frequency. Note that the rightmost point in each curve corresponds to the maximum speed that the servo can handle. Figure 14b presents the comparison on the swimming velocity versus the power stroke time (duration). Note that while the performance of the robotic fish with the larger ratio, \(\zeta = 4\), outperforms the case of \(\zeta = 2\) most of the time, for the most flexible fin F3, the case of \(\zeta = 2\) outperforms that of \(\zeta = 4\) when the power stroke time is small (or equivalently, at high power stroke speeds). Therefore, in the following we use model-based simulation to further study the impact of the power to recovery stroke speed ratio.

Fig. 15
figure 15

Simulation comparison of the forward swimming velocities at different power/recovery stroke speed ratios \(\zeta =\) 1.5, 2, 3, 4, and 5. a Velocity versus fin-beat frequency for case of F1, b velocity versus power stroke time for case of F1, c velocity versus fin-beat frequency for case of F2, d velocity versus power stroke time for case of F2, e velocity versus fin-beat frequency for case of F3, f velocity versus power stroke time for case of F3

Figure 15 provides a comparison within a wider range of power/recovery stroke speed ratios \(\zeta =\) 1.5, 2, 3, 4, and 5, for pectoral fins F1–F3, and for an extended fin-beat frequency. In all simulations, the maximum servo speed is fixed, which corresponds to a fin-beat frequency of 3 Hz when \(\zeta =2\). Therefore, the rightmost point on each curve represents the highest fin-beat frequency achievable with the corresponding \(\zeta \) under the servo constraint. From Fig. 15a, one can conclude that for the rigid pectoral fin F1, a higher \(\zeta \) provides a faster swimming speed at each fin-beat frequency, which matches the results from Fig. 14. On the other hand, the highest achievable swimming speed under the constraint of the servo speed does not happen at the highest \(\zeta \). Instead, the highest swimming speed is obtained if a moderate \(\zeta \) (2 or 3) is used. From Fig. 15c, e, it can be observed that, for flexible fins, the swimming speed is no longer a monotone increasing function of \(\zeta \) at each fin-beat frequency. There is a critical value \(\zeta ^*\), beyond which a higher \(\zeta \) results in a slower robot speed for a given fin-beat frequency. In addition, by comparing Fig. 15c, e, the more flexible the fin is, the lower \(\zeta ^*\); in particular, \(\zeta ^*=4\) for F2, and \(\zeta ^*=3\) for F3. For each flexible fin, the maximum swimming speed achievable with servo constraints takes place at the optimal fin-beat frequency when the power/recovery stroke speed ratio is \(\zeta ^*\). Similarly, Fig. 15b, d, f presents the comparison on the swimming velocity versus the power stroke time. Since we fix the amplitude \(\gamma _\mathrm{A}\) of the fin beat, each power stroke time corresponds to a particular power stroke speed. From the figures, it is clear that, for each fin, for any given power stroke speed, there is an intermediate value \(\zeta ^*\) that achieves the best swimming speed. In other words, for a given power stroke speed, there is an optimal recovery stroke speed, not too high, not too low. This can be explained as follows. Initially, when \(\zeta \) is increased, the recovery stroke speed drops, resulting in weaker “braking” force on the robot and thus faster swimming speed; however, as \(\zeta \) is increased further, the robot spends too much time decelerating, leading to a lower average swimming speed.

7.4 Impact of Flexibility on Mechanical Efficiency

Fig. 16
figure 16

Calculated mechanical efficiency versus fin-beat frequency and spring constant of the flexible fins

Finally, we focus on the mechanical efficiency of the robotic fish. Figure 16 shows the efficiency curve versus fin-beat frequency and spring constant values of the flexible fins. Here the calculations are based on power/recovery stroke speed ratio \(\zeta \) = 2. We considered eight different fins with different spring constants, where the damper-to-spring constant ratio, \(\kappa \), was kept at 0.24. This value matches the ratios obtained from the tested pectoral fins F2 and F3 in this work (0.23 and 0.24, respectively, from the parameters in Table 1). The figure confirms that there is an optimal flexibility for each fin-beat frequency that results the highest mechanical efficiency for the robotic fish. Additional insight can be drawn based on Fig. 17a, where the computed mechanical efficiency of the robot is shown as a function of the fin-beat frequency, for all three fins F1–F3. It can be seen that the mechanical efficiency of the rigid fin (F1) slightly increases with the fin-beat frequencies. On the other hand, flexible fins tend to be more efficient at lower frequencies. In fact, the efficiency with fin F2 is higher than that with F1 for frequencies lower than 2.7 Hz, and even fin F3 outperforms F1 on efficiency until the frequency reaches about 1.2 Hz.

Fig. 17
figure 17

Comparison of non-dimensionalized parameters of the robotic fish actuated by paired pectoral fins with different flexibilities versus different fin-beat frequencies for the case of \(\zeta \) = 2: a calculated efficiency and Strouhal number, b dimensionless velocity and Reynolds number, and c forward swimming velocity in cm/s and efficiency

To bring additional insight into the robotic fish performance analysis, one can further study some non-dimensionalize parameters of the robotic fish. These parameters include the Reynolds number, \({Re} = \frac{|V_{C}|L}{\nu }\), and the Strouhal number \({St} = \frac{2fS\sin \gamma _\mathrm{A}}{|V_\mathrm{C}|}\), where \(|V_\mathrm{C}|\) is the swimming speed of the robot, L is the robotic fish length, \(\nu \) is the kinematic viscosity of water, S is the pectoral fin span length, \(\gamma _\mathrm{A}\) is the fin flapping amplitude (Sitorus et al. 2009; Kodati et al. 2008), and f is the fin-beat frequency. Another non-dimensionalize parameter of interest is the dimensionless velocity, which is defined as \(V_\mathrm{DL} = \frac{|V_\mathrm{C}|}{S\omega _\mathrm{A}}\), where \(\omega _\mathrm{A} = \pi \frac{(\zeta +1)}{T_p}\). These dimensionless parameters are reported in Fig. 17 for pectoral fins with different flexibilities and \(\zeta =2\), versus different fin-beat frequencies. Figure 17a shows a distinct inverse correlation between the efficiency and the Strouhal number. For each fin flexibility, when the Strouhal number is at its lowest, the efficiency is highest. Figure 17b shows that the robotic fish demonstrates the highest dimensionless velocity when the Reynolds number is at the lower end, except for the rigid fin (F1), where the dimensionless velocity remains almost constant. Figure 17c shows that the optimal frequency for the forward swimming velocity of the robotic fish for each flexible fin does not coincide with the optimal frequency for the efficiency. Specifically, the frequency for optimal efficiency is lower than that for optimal swimming speed. This can be explained as follows. The optimal frequency for swimming speed is largely dependent on the natural frequency of the fin, at which the fin oscillation amplitude is maximized given a fixed amplitude for the servo motion. As the actuation frequency is increased (but before reaching the natural frequency), while the useful work \(W_b\) (see Eq. 33) increases due to increased thrust and forward velocity, the total work \(W_\mathrm{t}\) (see Eq. 34) increases even faster since an increasing portion of the hydrodynamic force is oriented in the lateral direction (which does not contribute to \(W_\mathrm{b}\)). The latter results in the peaking of the mechanical efficiency prior to reaching the natural frequency. Therefore, the model presented in this paper can be used as a tool to address an optimal, multi-objective design problem. Note that the Strouhal numbers shown here are higher than 1, which are far from the Strouhal numbers of biological fish, (typically in the range of 0.25–0.5; Triantafyllou and Triantafyllou 1995; Sitorus et al. 2009; Rohr and Fish 2004). The reason is that the robotic fish used in this study is driven solely by the pectoral fins, which results in relatively low forward swimming speeds and thus large Strouhal numbers.

8 Conclusion and Future Work

The goal of this work was to study the impact of the pectoral fin flexibility on the robotic fish performance and mechanical efficiency. We introduced a novel dynamic model for a robotic fish actuated with paired pectoral fins, where the fin is modeled as multiple rigid elements joined through torsional springs and dampers and blade element theory is used to calculate the hydrodynamic forces on the elements. The dynamic model was validated through experiments conducted on a robotic fish, where the swimming and turning performance of the robot was measured for fins with different flexibilities (two flexible, one rigid). The model was then used extensively to evaluate the impacts of fin stiffness, fin-beat frequency, and power/recovery stroke speed ratio on robot swimming speed and mechanical efficiency. The analysis reveals the intricate trade-off between objectives (swimming speed versus efficiency) and supports the use of the presented model for multi-objective design of fin morphology and control.

There are several directions in which the current work will be continued. First, it is desirable to be able to efficiently solve the fin dynamics for a larger number of approximating segments. To this end, we will investigate approaches to approximating the nonlinear dynamics to facilitate numerical solutions. One example is to replace the \(\sin \) and \(\cos \) terms with their Taylor series approximations. Second, this work (see, for example, Fig. 17c) indicates that flexible fins tend to perform better than rigid fins in speed and efficiency at low fin-beat frequencies, while rigid fins do better at high fin-beat frequencies. It is thus of interest to develop fins with tunable stiffness (Behbahani and Tan 2015) and investigate the control of stiffness in different robot operating regimes. Third, in this paper we focused on the case of a rigid link between the actuator and the fin base, which necessitates the use of power/recovery stroke speed ratio \(\zeta >1\) in order to produce net positive thrust. Our earlier work (Behbahani and Tan 2016a, b) shows that, using flexible passive joints, one can achieve net thrust with symmetric servo motion during power and recovery strokes, which simplifies control implementation and potentially offers gain in speed performance. Therefore, as part of our future work, we will investigate jointly designing and optimizing flexible joints and flexible fins. Finally, in this work we have only considered pectoral fin propulsion. While pectoral fin actuation alone is sometimes useful for locomotion or maneuvering (Hasan 2015), in general it is of interest to explore the interactions between the pectoral fins and the (actuated) caudal fin for optimizing the speed and efficiency of the robotic fish.