## 2 Materials and Methods
### Undulation Analysis  
The swimming propulsion of the fishbot is produced by undulations that are provided by two actuated joints. As illustrated in Figure 3, a single undulation can be split into three different phases as follows [16]: beginning (Figure 3a), middle (Figure 3b), and ending (Figure 3c). According to the dynamic lift theory of fish locomotion, when the undulation begins (Figure 3a), the moving tail fin--due to the certain angle relative to the direction of the water flow (i.e., an angle of attack)--produces a lift (thrust) \(L\) by pushing the water in the same backward direction as the water flow [17]:  
\[L=C_{L}(1/2)\,\rho U^{2}A \tag{3}\]  
where \(C_{L}\) is the coefficient of the lift of the fin, \(\rho\) is the density of the fluid (water), \(U\) is the velocity of the fin, and \(A\) is the planform area of the fin. For symmetrical hydrofoils, such as the tail fin of fishes, \(C_{L}\) can be approximated as follows:  
\[C_{L}\approx 2\pi\alpha_{\text{a}} \tag{4}\]  
where \(\alpha_{\text{a}}\) is the angle of attack of the fluid. However, the above Equation (4) holds only for small values (up to the critical value of about \(15^{\circ}\)) of \(\alpha_{\text{a}}\). At values of \(\alpha_{\text{a}}\) that are higher than the critical one, a stall occurs, i.e., a  
Figure 3: Phases of undulation of fully actuated fishbot. \(\alpha_{1}\), \(\alpha_{2}\), and \(\alpha_{\text{a}}\) denote the angular deviation of the two joints and the angle of attack of the tail fin, respectively. Notice that the angle of attack is relatively small at the beginning of undulation and then gradually increases to values that are higher than the critical value (typically about \(15^{\circ}\)). Steps **a**, **b** and **c** represent different position of the fishbot body during a single phase of undulation. separation of the turbulent flow behind the fin, resulting in an abrupt reduction in the lift and a significant increase in the hydrodynamic drag. From the second phase (Figure 3b,c), in which the fin moves in a blunt angle relative to the water flow, the tail fin stalls and would not be able to produce any thrust. Moreover, the tail fin moves in an opposite direction to the water flow (Figure 3c). This would result in a high-pressure build-up at the front part of the tail fin (i.e., \"lower\" part of the hydrofoil), and a low-pressure area behind the fin (the \"upper\" part of the hydrofoil). Such a pressure difference would result in turbulent fluid flow between the front and rear parts of the fin, resulting in flow separation and, ultimately, in hydrodynamic pressure (form) drag \(D\) that can be expressed as follows [17]:  
\[D=C_{D}(1/2)\;\rho U^{2}A \tag{5}\]  
where \(C_{D}\) is the coefficient of drag, \(\rho\) is the density of the fluid (water), \(U\) is the velocity of the fin, and \(A\) is the planform area of the fin. The inflicted hydrodynamic drag would result in an undesired braking effect. The overall propulsion force would depend on the difference between the thrust and braking forces generated by the above-mentioned phases of undulation [18; 19]. Consequently, enhancing the thrust or (and) diminishing the braking associated with these phases of undulation might result in a favorable overall increase in the propulsion thrust. We shall elaborate in the next subsection on how the proposed limited underactuation could achieve such an overall increase in the thrust. For simplicity, we assume that the water flow is both (i) laminar and (ii) in a direction parallel to the longitudinal axis of the anterior segment of the bot. In reality (e.g., due to the Coanda effect, vortices, etc. ), this might not be exactly the case. Also, we consider the pressure drag only, ignoring the second component of the overall hydrodynamic drag--the skin friction drags. We assume that the value of the latter is negligible due to the streamlined body of the fishbot and the smooth surface of its fairings. Nevertheless, we assume that these simplifications do not significantly compromise the fidelity of the proposed approach.