## 2 Materials and Methods
### Simulations  
The propulsion system was simulated using Simulink from MatLab(r). During simulations, the reduced inverse dynamics developed in the present article were considered as the plant. The platform was set to follow a rotation over the \(Y\) axis with roll, pitch and yaw motions defined in (35). From such motions, universal upper joints \(B_{i}\) were computed as well as desired limb lengths. The controlled variable was then the required force \(\mathcal{F}_{i}\) to actuate the limbs so that upper joints might be reached. Four controllers were implemented for such task: PD, Fuzzy-PD (FUPD), Feedforward Plus PD (FFPD), and Feedforward Plus \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{\(kp_{i}\)/\(kd_{i}\)} & \multicolumn{5}{c}{\(\epsilon_{i}\)} \\ \cline{2-7}  & **LN** & **N** & **Z** & **P** & **LP** \\ \hline \multirow{2}{*}{\(\dot{e}_{i}\)} & N & VH/VH & H/H & S/M & H/H & VH/VH \\  & Z & VH/VH & M/M & Z/Z & M/M & VH/VH \\ \cline{1-1}  & P & VH/VH & H/H & S/M & H/H & VH/VH \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Fuzzy control rules for \(kp_{i}\) and \(kd_{i}\). Figure 9: Membership functions for inputs: \(e_{i}\) (a), \(\dot{e}_{i}\) (b), and outputs: \(kp\) (c) and \(kd\) (d). Fuzzy-PD (FFUPDD). Each simulation consisted of the generation of the flapping trajectory over a period of 5 s. For all cases, the flapping total amplitude was set to \(\pm 30\). Moreover, the flapping frequency was increased during simulations from 0.5 to 5 Hz, with steps of 0.5 Hz. The simulations' purpose was of visualizing which controllers could effectively handle the path tracking problem while frequency increased (since high frequencies are desired for thrust generation inside BAUVs). Each controller was responsible for computing the required acting force from each limb separately. Additionally, the same set of fuzzy rules, and input and output variables, were employed for the implementation of the FUPD and FFUPD controllers. Finally, simulations followed the parameters from Table 3.  
Two set of simulations were conducted:  
* Set 1 of simulations: The effectiveness of four controllers was tested based on the comparison of how each limb could reach the desired length when the platform changed its position over time. The precision of following the desired trajectory for each limb was compared for the whole spectrum of flapping frequencies. * Set 2 of simulations: The desired platform's trajectory and flapping frequencies stayed constant as the previous set, but disturbances were added to each limb's line of action. Three different types of disturbances were simulated and added to the plant: step (\(S\)), ramp (\(R\)) and sinusoid (\(Si\)), mathematically defined by: \[f(S,t)= \begin{cases}0,&0\leq t<1;\;2\leq t<3;t\geq 4\\ 5,&1\leq t<2;\;3\leq t<4\end{cases} (N),\] (43) \[f(R,t)=\begin{cases}0,&0\leq t<1;\;2\leq t<3;t\geq 4;\\ 5(t-1),&1  
proper control, limbs will fail at attaining desired positions once the flapping frequency starts to increase, which can be visualized by comparing results from both figures. The three limbs could have followed their assigned trajectories when the flapping frequencies were as low as 1 Hz. However, once the flapping frequency of the moving platform increased to 5 Hz, abrupt changes of position could not be correctly overcome by the classic PD controller or the adaptive FUPD controller. The feedforward stage from the FFPD and FFUPD controllers better adapted and reacted to sudden changes and presented better performances while frequency increased. Since limb 1 was assigned as a pivot and did not suffer of abrupt changes, any of the four employed controllers could have served for the task of keeping it in position. However, as seen on Figures 10a and 11a, PD and FUPD present a steady-state error. Since adaptive controllers (FUPD, FFUPD) are iteratively tuning the proportional and derivative gains, they present faster responses when overcoming the initial state error inside all examples.