## 6 Simulation and Experiment  
### Simulation Analysis  
To verify the correctness of attitude control algorithm, a three-dimensional (3D) model of the 2-DOF vector propulsion system is established, shown in Figure 4.  
Figure 4: 3D model of 2-DOF propulsion mechanism. 1, propeller; 2, spherical hinges; 3, fixed-length  
Figure 3: (a) The attitude when the fixed driving branch chain is parallel to the motor spindle and (b) the attitude when the movable driving branch chain is parallel to the motor spindle. bars; 4, sealing device; 5, polished rod; 6, rack installing seat; 7, gear; 8, rack; 9, linear guide with flange; 10, front bulkhead; 11, motor; 12, reinforcing plate; 13, rear bulkhead; 14, revolute joint; and 15, the propeller installation platform. After being simplify, the model is imported into ADAMS (2019, MSC Software, Los Angeles, CA, US and 1963) motion simulation software, and motion pair constraints are added, as shown in Figure 5.  
Set structure parameters \(l_{1}=l_{2}=l_{3}=140\)\(mm\), \(r=75\)\(mm\), and \(R=150\)\(mm\). The maximum nutation angle of propeller attitude can be calculated as \(36.6^{\circ}\), so that setting \(\alpha\) increases from \(0^{\circ}\) to \(360^{\circ}\) with step of 0.1, \(\beta\) increases from \(0^{\circ}\) to \(36.6^{\circ}\) with step of 0.1 when \(\alpha=0^{\circ}\sim 36.6^{\circ}\), and remains at \(36.6^{\circ}\) when \(\alpha=36.6^{\circ}\sim 323.4^{\circ}\), decreases from \(36.6^{\circ}\) to \(0^{\circ}\) with step of \(-0.1\) when \(\alpha=323.4^{\circ}\sim 360^{\circ}\). By means of the attitude control algorithm, the driving parameters sequences \(P_{2}R_{2}\) and \(P_{3}R_{3}\) could be obtained, as shown in Table 1. From the table it is observed that the positive values of \(P_{2}R_{2}\) and \(P_{3}R_{3}\) indicate the displacement of the polished rods in the positive direction of the z-axis of \(S\) coordinate, i.e., the AUV forward direction, whereas the negative values mean the displacement in the negative direction of the z-axis of \(S\) coordinate. In Figure 5, the positive direction of the z-axis of \(S\) coordinate are perpendicular to the bulkhead to the right. The driving parameters sequences are used as input parameters of ADAMS motion model to observe the propeller's motion attitude. As shown in Figure 6, \(\beta\) increases from \(0^{\circ}\) to \(36.6^{\circ}\) with slope of 1 when \(\alpha=0^{\circ}\sim 36.6^{\circ}\), and remains at \(36.6^{\circ}\) when \(\alpha=36.6^{\circ}\sim 323.4^{\circ}\), decreases from \(36.6^{\circ}\) to \(0^{\circ}\) with slope of \(-1\) when \(\alpha=323.4^{\circ}\sim 360^{\circ}\). Thus, the line shape stimulated by ADAMS anastomoses with the experimental figure in MATLAB (2019, MathWorks, Natick, MA, US and 1984), which can verify the correctness of the algorithm. Let the nutation angle \(\beta\) increase from \(0^{\circ}\) to \(36.6^{\circ}\) with the step of \(5^{\circ}\), and responding to each \(\beta\), \(\alpha\) increases from \(0^{\circ}\) to \(360^{\circ}\) with the step of \(0.1^{\circ}\). As shown in Figure 7a,b, it is easy to see that the variation of the M coordinate at the X and Y directions relative to the S coordinate is proportional to \(\beta\) and not more than 10 mm. Therefore, it can be considered that the in situ attitude adjustment is realized. Meanwhile, the maximum and minimum values of the rod elongation during each cycle are set as \(D\) and \(d\). respectively. Shown As shown in Figure 8a,b, when \(\beta=36.6^{\circ}\), \(D\) reaches a maximum value of \(80.063\) mm, and \(d\) reaches a minimum value of \(-80.063\) mm. When the rod elongation of the second drive branch reaches the maximum value, the attitude is \(\alpha=127.5^{\circ}\) and \(\beta=36.6^{\circ}\). When it reaches the minimum value, the attitude is \(\alpha=232.7^{\circ}\) and \(\beta=36.6^{\circ}\). Figure 5: Simulation model of 2-DOF propulsion mechanism.