## 4 Improved Artificial Potential Field Method
### Combing with Dynamic Window Method  
The essence of the dynamic window method [22] is to sample the velocity space \((v,\omega)\) of the robot according to its dynamic characteristics, and generate new velocity \(v\) and angular velocity \(\omega\) under the influence of various factors over time. The series of velocity spaces \((v,\omega)\) are simulated and analyzed to obtain a variety of paths; then, the optimal velocity space \((v,\omega)\) is obtained through the evaluation function. Finally, the whole optimal path will be obtained by repeating the process above. The motion equation of the amphibious robot can be summarized as follows:  
\[\left\{ \begin{array}{l}x_{t}=x_{t-\Delta t}+v\Delta tcos\alpha\\ y_{t}=vy_{t-\Delta t}+\Delta tcos\beta\\ z_{t}=z_{t-\Delta t}+v\Delta tcos\gamma\\ \theta_{t}=\theta_{t-\Delta t}+\omega\Delta t\end{array} \right. \tag{19}\]  
where \(x_{t}\) represents the displacement of the amphibious robot in the x axis at time \(t\), \(y_{t}\) and \(z_{t}\) similarly represent the displacement in the y axis and z axis, \(\theta_{t}\) represents the motion angle of the robot at time \(t\), \(\Delta t\) represents the time step, \(v\) and \(\omega\) represent the velocity and acceleration, respectively, and the specific values can be obtained from the above kinetic function. \(\alpha\), \(\beta\) and \(\gamma\) represent the angle between velocity \(v\) and the x axis, y axis, z axis, respectively. Figure 5: Improved attraction field diagram. This algorithm needs to be constrained by the robot's motion ability and environment, which consists of three points: (1) the velocity constraint \(V_{m}\), which is the velocity and angular velocity within the range of the robot's own motion ability; (2) the acceleration constraint \(V_{a}\), which measures the influence of the acceleration range of the robot on the speed; (3) the obstacle constraint \(V_{d}\), which is to ensure that the robot will not collide with the obstacle under the range of braking ability. The expressions are as follows:  
\[V_{m} =\{(v,\omega)|v\in[v_{min},v_{max}],\ \omega\in[\omega_{min},\omega_{max}]\} \tag{20}\] \[V_{a} =\{(v,\omega)|v\in[v_{t}-\dot{v_{b}}\Delta t,v_{t}+\dot{v_{a}} \Delta t],\ \omega\in[\omega_{t}-\dot{\omega_{b}}\Delta t,\omega_{t}+\dot{\omega_{a}} \Delta t]\] (21) \[V_{d} =\{(v,\omega)|v\leq\sqrt{2 dist(v,\omega)\dot{v_{b}}},\ \omega\ \leq\sqrt{2 dist(v,\omega)\dot{v_{b}}}\} \tag{22}\]  
where \(\dot{v_{a}}\) and \(\dot{\omega_{a}}\) represent the maximum acceleration of the robot at time \(t\), \(\dot{v_{b}}\) and \(\dot{\omega_{b}}\) represent the maximum deceleration, and \(dist(v,\omega)\) represents the nearest distance between the robot and the obstacle. The evaluation function is given as Equation (23). \[G(v,\omega) =a*heading(v,\omega)+b*dist(v,\omega)+c*velocity(v,\omega) \tag{23}\]  
where \(heading(v,\omega)\) is the angle between the velocity direction and the goal, \(velocity(v,\omega)\) is the value of the velocity, and \(a,b,c\) are the influence factors of angle, distance and velocity, respectively. This paper concentrates on the path planning in an amphibious environment. The trajectory and motion state of the robot can be restored as much as possible by combining with the artificial potential field method and the dynamic window method. The impact on the whole trajectory can be observed more precisely when the motion state changes, and this provides the data support for the further adjustment and optimization later on. Figure 6 shows the flow-process diagram of the hybrid algorithm. Firstly, information related to the environment, obstacles and the robot itself must be obtained. The former two items of information are identified by sensors mounted on the robot, while the latter information is obtained by its own parameters, kinematics and dynamics equations. Since this paper mainly studies amphibious bionic robotic fish, it is necessary to determine whether the environment of the robot is land or underwater. This can be identified by mounting a pressure sensor on the top of the robot.