# Modifications to ArduSub That Improve BlueROV SITL Accuracy and Design of Hybrid Autopilot
## 3 Open-Loop Experimental Testing and Hydrodynamic Characterization
### Inertia Analysis  
Every BROV2 has unique inertia properties resulting from their payload, which may consist of custom modules or different sensors. In the case of the BROV2 that underwent open-loop testing, the ballasts stabilized its buoyancy altered its angular moments of inertia. Having determined that there is no linear term \(N_{r}\), and constraining the value of \(N_{r|r|}\) according to the analysis just described, the acceleration term \(\dot{r}\) may be reintroduced to study the unsteady regime and determine the remaining inertia terms. If added mass \(N_{r}\) assumes the values suggested in [16; 38], and the \(N\) controlled by the experimenter is also considered constrained, then the only remaining unknown quantity in Equation (10) is the moment of inertia \(I_{zz}\). Stated mathematically, Equation (10) reduces to the ordinary differential equation  
\[\dot{r}(N)=\frac{N-N_{r|r|}r^{2}}{I_{z}+N_{\dot{r}}} \tag{12}\]  
where \(\dot{r}(N)\) is the vehicle's yaw acceleration given an applied input yaw torque \(N\), \(N_{r|r|}\) is the quadratic damping in yaw, \(I_{zz}\) is the moment of inertia in yaw, \(N_{r}\dot{r}\) is the added mass in yaw, and \(r\) is the measured output yaw velocity. Hence, for any of the six yaw torques tested Equation (12) has a one-parameter family of solutions  
\[r(N)=f(t,I_{z}) \tag{13}\]  
where \(r\) is yaw velocity, which is a function of time \(t\), respective control torque \(N\), and moment of inertia \(I_{zz}\). The solutions proposed above are applicable for constant torques \(N\). Referencing Figure 9, it can be seen that in the moments immediately after the yaw torque input initiates there is a concave up region where the yaw torque is ramping up and has not yet reached its intended magnitude. Every trial has this initial thruster ramp-up time when yaw torque increases with time; the velocity at the time when constant torque is reached describes the left-hand boundary conditions for the added mass fitting. While a constant torque is maintained, velocity continues to increase with time. Eventually, in every trial the vehicle reaches an equilibrium steady state as defined in the previous viscous drag analysis. Therefore, the intervals and boundary conditions of Equation (13) are  
\[t_{0}\leq t\leq t_{f},\quad r(t_{0})=r_{0},\quad r(t_{f})=r_{f}. \tag{14}\]  
where \(t\) is time, \(t_{0}\) is the thruster ramp-up time while the vehicle is accelerating, \(t_{f}\) is the settling time when steady-state velocity is reached, \(r_{0}\) is the velocity when constant torque is reached, and \(r_{f}\) is the steady-state velocity. At the time \(t_{0}\), where the curve transitions from concave up to concave down, full respective constant torque is reached; the corresponding velocity at the inflection point also gives the initial conditions \(r(t_{0})=r_{0}\) for the particular solution. Extracting \(t_{f}\) from the experimental data required other processing. To account for noise and the overshoot present at higher torques, a sliding window that calculated a moving average starting from the initial overshoot moving to the right was utilized which converged when the sliding window average absolute error from \(r_{f}\) was within a 5% tolerance, choosing the left-hand limit of the sliding window as \(t_{f}\). Now that the differential Equation (12) is well defined, with all other constants constrained, and the boundary conditions are established, the ordinary differential Equation (13) poses initial value problems for \(r(N)\) dependent on the choice of \(I_{zz}\). Essentially, Equation (12) is an initial value problem with the boundary conditions shown in Equation (14) having a one-parameter family of solutions Equation (13) dependent on \(I_{zz}\). To trim down the search space of the infinite number of solutions, \(I_{zz}\) was assumed to be greater than the values suggested in [16; 17; 38] and less than a solid rectangle with the dimensions of the BROV2.