## 4 Simulation Results
### Control in Noisy Environments, Considering Fuel Consumption  
We present the MATLAB simulation results for our control laws in noisy environments. We further consider fuel consumption of the vehicle as time goes on.  
To simulate noisy environments, we added zero-mean Gaussian noise with standard deviation 0.1 degrees to deflection angles \(\left[\delta_{\mathrm{f1}},\delta_{\mathrm{f2}},\delta_{\mathrm{f3}},\delta_{ \mathrm{f4}},\delta_{\mathrm{cav_{pitch}}}\right]\) of the vehicle. Recall that \(\Delta=0.2\) degrees and that \(\Delta_{2}=0.1\) degrees. Thus, noise is significant compared to control inputs. We use the rudder control in Section 3.6 to control roll motions in noisy environments.  
In this subsection, we simulate the case where the target depth varies as time goes on. This is a practical scenario, since the vehicle may have to change its depth while performing a mission. We run the simulation for 50 s. During the first 12.5 s, the target depth is set to 0.3 m. During the second 12.5 s, the target depth is set to 0.5 m. During the fourth 12.5 s, the target depth is set to 0.3 m. During the fourth 12.5 s, the target depth is set to 0.5 m.  
In this subsection, we consider fuel consumption. Hence, we update the trim input \(\mathrm{u}_{0}\) as follows: \(\mathrm{u}_{0}(1)\rightarrow\mathrm{u}_{0}(2)\rightarrow\mathrm{u}_{0}(3) \ldots\rightarrow\mathrm{u}_{0}(\mathrm{T})\). Then, we use the updated \(\mathrm{u}_{0}(\mathrm{t})\) to derive (5)-(7). Also, we use the roll control law presented in Section 3.6 to maintain zero roll in noisy environments.  
Figure 7 shows the depth of the vehicle with respect to time. See that the depth of the vehicle changes according to target depth change. We use the fuzzy method in Section 3.5 to reduce the fluctuation of the vehicle, as it follows the target depth. Thus, the fluctuation of the vehicle gradually decreases as time goes on.  
Figure 6: The depth of the vehicle with respect to time (controllers not considering fuel consumption).  
Figure 8 shows the change of \(\phi,\theta,\psi\) with respect to time. See that the pitch angle \(\theta\) is almost zero, oscillating between \(-1\) degree and \(1\) degree. This small pitch is desirable, since a large pitch change leads to large planing force. See that the roll angle is almost zero, which is achieved by our roll control.  
Figure 9 shows the change of deflection angles \(\left[\delta_{\ell 1},\delta_{\ell 2},\delta_{\ell 3},\delta_{\ell 4},\delta_{\mathrm{cav}_{\mathrm{ pitch}}}\right]\) with respect to time. Since \(\mathrm{u}_{0}(\mathrm{t})\) changes as time goes on, we can see that the deflection angles gradually change as time goes on. This change can be seen clearly in the last subplot of Figure 9. Also, Figure 9 shows that deflection angles are disturbed considerably.  
Figure 8: The change of \(\phi,\ \theta,\ \psi\) with respect to time (controllers considering noisy environments and fuel consumption).  
Figure 7: The depth of the vehicle with respect to time (controllers considering noisy environments and fuel consumption).  
Figure 10 shows the distance between the transom of the vehicle and the cavity wall. In the case where this distance is less than zero, planing occurs. The planing force does not appear in the simulation, since the distance does not decrease below zero.  
Figure 9: The deflection angles with respect to time (controllers considering noisy environments and fuel consumption).