Vortex phase matching as a strategy for schooling in robots and in fish
Experiments with robotic fish
We developed, and employed, a bio-mimetic robotic fish platform (Fig. 1, Supplementary Figs. 1–4 and Movie 1 and 2) in order to experimentally evaluate the costs and benefits of swimming together. We constructed two identical robotic fish, 45 cm in length and 800 g in mass. Each has three sequential servo-motors controlling corresponding joints, covered in a soft, waterproof, rubber skin. In addition, the stiffness of the rubber caudal fin decreases towards the tip33 (Supplementary Fig. 1). The motion of the servomotors is controlled using a bio-inspired controller called a central pattern generator (CPG)34,35 resulting in the kinematics that mimic normal real fish body undulations when swimming36 (see Supplementary Fig. 2 and Note 1). Here, due to the complexity of the problem (as discussed above) we consider hydrodynamic interactions between pairs of fish. We note that this is biologically meaningful as swimming in pairs is both the most common configuration found in natural fish populations7,10,37,38, and it has been found that even in schools fish tend to swim close to only a single neighbour7,37.
Fig. 1: The robotic fish platform employed to investigate hydrodynamic benefits of schooling.
a The reverse Karman vortices shedding by the robotic fish with dye flow visualisation. b Schematic view of the setup that allows setting various spatiotemporal differences between two robotic fish swimming in a flow tank (Front-back distance D ∈ [0.22, 1] BL (body length), Left-right distance G ∈ [0.27, 0.33] BL and Phase difference Φ ∈ [0, 2π]). A laser generator was used to visualise the hydrodynamic interactions (see Supplementary Note 1). c The phase difference Φ is evaluated by the difference between the undulation phase of the two robots. Undulation phase is evaluated based on the lateral position Lt of the tail tip. d Power cost (absolute value on the left y-axis, and relative value compared to the average power cost on the right y-axis), is shown as a function of the phase difference at D = 0.33 BL and G = 0.27 BL. Error bars are standard error of the mean.
Full size image
To evaluate the energetics of swimming together we conducted experiments on our pair of robotic fish in a flow tank (test area: 0.4-m-wide, 1-m-long and 0.45-m-deep; Fig. 1b and Supplementary Fig. 3). In order to conduct such an assessment we first measured the speed of our robots when freely swimming alone (we did so in a large tank 2-m-wide, 3-m-long and 0.4-m-deep). We then set the flow speed within our flow tank to this free-swimming speed (0.245 ms−1) allowing us to ensure the conditions in the flow tank are similar to those of the free-swimming robot. Unlike in the solitary free-swimming condition, to have precise control of spatial relationships in the flow tank we suspended each robotic fish by attaching a thin aluminium vertical bar to the back of each robot, which was then attached to a step motor above the flow tank (Supplementary Fig. 3 and Movie 2). To establish whether the robotic fish connected with a thin bar has similar hydrodynamics compared to when free swimming, we measured the net force (of the drag and thrust generated by the fish body in the front-back direction) acting on the robot in the flow tank. The measured net force over a full cycle (body undulation) was found to be zero; thus the bar is not measurably impacting the hydrodynamics of our robot fish in the front-back direction as they swim in the flow tank (Supplementary Fig. 5).
To further validate the utility of the platform, we also compared the power consumption of our robots swimming side-by-side, for different relative phase differences Φ, with equivalent measurements made with a simple 2D computational fluid dynamics (CFD) model of the same scenario (Supplementary Note 2). In both cases (see Supplementary Fig. 6a, c for robotic experiments and CFD simulations, respectively) we find that there exists an approximately sinusoidal relationship between power costs and phase difference which is defined as Φ = ϕleader − ϕfollower (Fig. 1c, d). Due to the 2D nature of the simulation, as well as many other inevitable differences between simulations and real world mechanics, the absolute power costs are different from those measured for the robots, but nevertheless the results from these two approaches are broadly comparable and produce qualitatively similar relative power distributions when varying the phase difference between the leader and follower. These results indicate that our robotic fish are both an efficient (making estimates of swimming costs is far quicker with our robotic platform than it is with CFD simulations) and effective (in that they capture the essential hydrodynamic interactions as well as naturally incorporate 3D factors) platform for generating testable hypotheses regarding hydrodynamic interactions in pairs of fish.
We subsequently utilise our robots to directly measure the energy costs associated with swimming together as a function of relative position (front-back distance D from 0.22 to 1 body length (BL) in increments of 0.022 BL and left-right distance G from 0.27 to 0.33 BL in increments of 0.022 BL) while also varying the phase relationships (phase difference, Φ) of the body undulations exhibited by the robots (the phase of the follower’s tailbeat ϕfollower relative to that of the leader’s ϕleader, Fig. 1c).
By conducting 10,080 trials (~120 h of data), we obtain a detailed mapping of the power costs relative to swimming alone associated with these factors (Fig. 2a). Such a mapping allows us to predict how real fish, that continuously change relative positions6,8, should correspondingly continuously adjust their phase relationship in order to maintain hydrodynamic benefits. To quantify the costs we determine the energy required to undulate the tail of each robot allowing us to define, and calculate, a dimensionless relative power coefficient as:
$$eta =frac{({P}_{1}^{{rm{Water}}}-{P}^{{rm{Air}}})-({P}_{2}^{{rm{Water}}}-{P}^{{rm{Air}}})}{{P}_{1}^{{rm{Water}}}-{P}^{{rm{Air}}}}=frac{{P}_{1}^{{rm{Water}}}-{P}_{2}^{{rm{Water}}}}{{P}_{1}^{{rm{Water}}}-{P}^{{rm{Air}}}},$$
(1)
where η is the relative power coefficient, PAir, ({P}_{1}^{{rm{Water}}}) and ({P}_{2}^{{rm{Water}}}) are the power costs of the robotic fish swimming in the air (an approximation of the dissipated power cost due to mechanical friction, resistance, etc. within the robot that are not related to interacting with the water), alone in water, or in a paired context in the water, respectively. ({P}_{1}^{{rm{Water}}}-{P}^{{rm{Air}}}) and ({P}_{2}^{{rm{Water}}}-{P}^{{rm{Air}}}) therefore represent the power costs due to hydrodynamics while swimming alone, and in a pair, respectively (see Methods section). Correspondingly, the coefficient η compares the energy cost of fish swimming in pairs to swimming alone. Positive values (blue in Fig. 2a) and negative values (red in Fig. 2a) respectively represent energy saving and energy cost relative to swimming alone. The difference between the maximum energy saving and maximum energy cost for the robots is ~13.4%.
Fig. 2: Robotic fish save energy by vortex phase matching (VPM).
a Relative power coefficient η shown as a function of the phase difference between the leader and the follower Φ and front-back distance D at left–right distance G = 0.31 BL. The dashed line (also in b) shows the functional relationship described in Eq. (2) that determines the theoretical phase relationship that maximally saves energy (Methods section). ({Phi }_{0}^{* }) is the optimal initial phase difference (fitted to the data points of maximum energy saving, as shown in b). The points marked by red square, blue circle and blue square indicate example cases depicted on panels c–e. b Location of maximal energy saving in the robotic trials. Point size and darkness denote the number of occurrences of each phase difference value at each front-back distance. c–e An illustration of important spatial configurations for vortex phase matching. Energy cost is related to how the follower moves its body relative to the direction of the induced flow of the vortices, in the opposite direction with Φ0 = ({Phi }_{0}^{* })+π (c) or in the same direction with Φ0 = ({Phi }_{0}^{* }) (d, e). Followers interact with the induced flow of vortices with the same body phase at any front-back distance (within the range of hydrodynamic interactions), termed vortex phase matching. (d, e; Φ0 = ({Phi }_{0}^{* }) describes the hydrodynamic interaction resulting in energy saving, see description in the text). As the front-back distance changes, the followers must dynamically adopt phase difference Φ, with respect to that of the leader.
Full size image
Our results indicate that there exists a relatively simple linear relationship between front-back distance and relative phase difference of the follower that minimises the power cost of swimming (as indicated by the dashed lines in Fig. 2a, b, the theoretical basis of which we will discuss below). This suggests that a follower can minimise energetic expenditure (and avoid substantial possible energetic costs) by continuously adopting a unique phase difference Φ that varies linearly as a function of front-back distance D (see Fig. 2b for example), even as that distance changes. We find that while left-right distance G does alter energy expenditure, this effect is minimal when compared to front-back positioning, and has little effect on the above relationship (Supplementary Figs. 7 and 8) in the range explored here.
Although we know fish generate reverse Kármán vortices at the Reynolds number (Re = Lu/ν ≈ 105, where L is the fish body length, u is the swimming or flow speed and ν is the kinematic viscosity) in our experiments39 (Supplementary Fig. 9 and Movie 1), turbulence will dominate over longer distances18. In accordance with this, we see a relatively fast decay in the benefits of swimming together as a function of D (e.g., D > 0.7 BL, Supplementary Fig. 10), a feature we also expect to be apparent in natural fish schools (where it would likely be exacerbated by what would almost always be less-laminar flow conditions). Therefore, we expect, based on our results, that hydrodynamic interactions are dominated by short-distance vortex-body interactions (with D 2 BL), and it thus cannot benefit from neighbour-generated vortices. We also chose this method since isolating the fish would likely induce stress responses that could confound our results. To evaluate body kinematics in the presence of vortices we analysed the body undulations of the follower when in close proximity (within 0.4 BL), where hydrodynamic effects will be strongest (Supplementary Fig. 25). We find that in the vicinity of vortices, fish exhibit a higher tailbeat amplitude and lower tailbeat frequency (Supplementary Fig. 26), which indicates less power consumption48.
To further test if fish can save energy by adopting VPM with the typical vortex-body hydrodynamic interactions (Φ0 = −0.2π), we compared an estimation of the power consumption under different hydrodynamic interactions. Since the hydrodynamic interactions are mainly determined by the initial phase difference Φ0 (see above), we analysed performance in the full possible range from −π to π (see Supplementary Fig. 25 for the detailed method). We define relative energy saving when fish exhibit higher tailbeat amplitudes A (Fig. 4a) and lower tailbeat frequencies f (Fig. 4b) than average48, and find that the range is Φ0∈ [−0.5π, 0.5π] (the shaded area in Fig. 4). Figure 4 also shows that while fish adopting Φ0 ≈ 0 will save the most energy, those exhibiting Φ0 = −0.2π, as in our experiments, will save almost the same amount (thus they are very close to optimal in this respect).
Fig. 4: Relative energetic benefits to a follower in real fish pairs.
a, b Energy cost analysis was conducted by calculating the difference in amplitude A (a) and frequency f (b) at Φ0 and the same measurements with the opposite phase Φ0 + π (written as A+π and f+π respectively) as a function of initial phase difference Φ0 (Supplementary Fig. 25 and Note 4). Data are pooled from all pairs when the follower’s front-back positions are not >0.4 BL distance (where the hydrodynamic interactions are expected to be the strongest). The hatched areas show the energy saving zone of Φ0. The dashed line denotes ({Phi }_{0}^{* }), the most typically observed initial phase difference exhibited by our fish. (Average amplitude is 0.09 BL, average frequency is 2.3 Hz).
Full size image
Fish in our experiments (Fig. 3c at D = 0 BL) spent 59% of their time swimming with phase relationships (Φ0∈ [−0.5π, 0.5π]) that save energy, and the remaining 41% that imposes some (relative) energetic costs. However, because the energy cost has a sinusoidal relationship to the phase difference (Fig. 1d) simply calculating the percentage of time in each regime (in which there is either a benefit or a cost, regardless of the magnitude of each) is insufficient. By combining the frequencies (occurrences) of each phase difference Φ observed in Fig. 3c and the sinusoidal shape of the power cost as a function of Φ (Fig. 1d and Supplementary Fig. 6b, d), we can estimate that by behaving as they do, fish (in our flow conditions) save (by accumulating all benefits and extra costs; where a random behaviour would give 0) an overall 15% of the total possible (which would be achieved by perfectly adopting the optimal phase to the neighbour-generated vortices at all the time, Supplementary Fig. 27). It is possible that if fish are exposed to more challenging, stronger flow regimes (here we employed those of typical swimming), that this percentage will increase. However we would never expect fish motion to be completely dominated by a need to save energy as they must also move in ways as to obtain salient social and asocial information from their visual, olfactory, acoustic and hydrodynamic environment, such as to better detect food52, environmental gradients44 and threats16. Nevertheless, kinematic analysis suggests that they adopt VPM in a way that results in energy savings (dashed line in Fig. 4).
In summary, our bio-mimetic robots provided an effective platform with which we could explore the energetic consequences of swimming together in pairs and revealed that followers could benefit from neighbour-generated flows if they adjust their relative tailbeat phase difference linearly as a function of front-back distance, a strategy we term vortex phase matching. A model based on fundamental hydrodynamic principles, informed by our flow visualisations, was able to account for our results. Together, this suggests that the observed energetic benefit occurs when a follower’s tail movement coincides with the induced flow generated by the leader. Finally, experiments with real fish demonstrated that followers indeed employ vortex phase matching and kinematic analysis of their body undulations suggests that they do so, at least in part, to save energy. By providing evidence that fish do exploit hydrodynamic interactions, we gain an understanding of important costs and benefits (and thus the selection pressures) that impact social behaviour. In addition, our findings provide a simple, and robust, strategy that can enhance the collective swimming efficiency of fish-like underwater vehicles. More
