# Development of Portable Magnetic Adsorption Amphibious Robot
## 5 Dynamic Modeling and Motion Simulation of Amphibious Robot
### Robot Motion Experiment Simulation  
The amphibious robot's operating environment is very complex, so in order to achieve accurate control of the robot, it was necessary to design a closed-loop control system and carry out a system simulation experiment. (1) Propulsion system transfer function  
Under normal circumstances, the propeller motor can be simplified into a first-order inertia link, and the transfer function can be expressed as follows:  
\[G_{p}(s)=\frac{K_{p}}{T_{p}s+1} \tag{17}\]  
where \(K_{p}\) is the transfer coefficient of the motor and \(T_{p}\) is the time constant of the motor. As a nonlinear system, the thruster needs to be linearized. As can be seen from the thruster thrust formula (Equation (11)), where all parameters are constant, it can be written as follows:  
\[T=Cn \tag{18}\]\(C=2K_{T}\rho D^{4}n_{0}\), where \(n_{0}\) is the rated speed of the motor, from which the transfer function of speed and thrust can be derived:  
\[G_{T}(s)=\frac{T(s)}{n(s)}=C \tag{19}\]  
(2) Transfer function of motion system  
Fixed depth motion control model: the robot only carries out fixed depth motion in the vertical plane, and its motion equation is as follows:  
\[(m+Q_{\ddot{w}})\ddot{w}=C_{z}w+T_{z} \tag{20}\]  
where \(Q_{\ddot{w}}\) is an additional quality, \(C_{z}\) is a dimensionless coefficient of the z-axis, and \(T_{z}\) is the vertical force. According to the relationship between the depth value (\(Z_{h}\)) and the linear velocity (\(w\)), \(\dot{Z}_{h}=w\), \(\ddot{Z}_{h}=\dot{w}\), the transfer function between the depth of the robot and the thrust received can be derived as follows:  
\[G_{w}(s)=\frac{Z_{h}(s)}{T_{z}(s)}=\frac{1}{(m+Q_{w})s^{2}-C_{Z}s} \tag{21}\]  
Fixed heading motion control model: the robot only rotates on the horizontal plane, and its heading motion equation is as follows:  
\[M_{T}-M_{R}-M_{\dot{r}}=I_{z}\dot{r} \tag{22}\]  
The total pushing torque in the horizontal direction is as follows:  
\[M_{T}=2 Tl_{2}=2K_{T}\rho D^{4}n^{2}l_{2} \tag{23}\]  
The blocked torque of the robot is as follows:  
\[M_{R}=0.5N_{r}\rho Sr^{2} \tag{24}\]  
where \(N_{r}\) is the resistance coefficient when the robot alters its course and \(S\) is the characteristic area. The moment of inertia is calculated as follows:  
\[M_{\dot{r}}=Q_{r}\dot{r} \tag{25}\]  
where \(Q_{r}\) is the added mass. \(\dot{r}\) is represented by \(\ddot{\psi}\), which is sorted and simplified as follows:  
\[\frac{M_{T}}{I_{z}+Q_{r}}=\ddot{\psi} \tag{26}\]  
where \(\psi\) is the heading angle. The transfer function of the turning motion can be obtained by using the Laplace transform:  
\[T=Cn \tag{18}\]0  
Through actual measurements, estimation, and reference to the relevant literature [17], the values of each part of the parameters can be determined: \(S=0.24\) m\({}^{2}\), \(K_{p}=120\), \(T_{p}=0.6\) s, \(C=0.017\), \(C_{z}=-1.31\), \(N_{r}=0.25\), \(N_{\dot{r}}=0.08I_{z}\), \(I_{z}=0.94\) kg \(\cdot\) m\({}^{2}\), \(I_{y}=0.78\) kg \(\cdot\) m\({}^{2}\). They are substituted into the transfer function of the fixed depth and fixed bow motion control system:Transfer function of fixed depth motion control system:  
\[T=Cn \tag{18}\]1  
Fixed heading motion control system transfer function:  
\[T=Cn \tag{18}\]2  
The control system was introduced into the PID controller, and then modeling and simulations were carried out to obtain the simulation curves for the fixed depth and fixed bow conditions, as shown in Figures 20 and 21, respectively. It can be seen from the simulation curve that in the fixed depth simulation process, it takes 6 s from the initial response to the target depth. At the 15 th second, the system stabilizes within the target depth range, and the maximum overshoot is 5%. In the course of the fixed heading simulation, it takes 6 s from the initial response to the target heading angle. In the 11 th second, the system stabilizes within the range of the target heading angle, and the maximum overshoot is 7%.