﻿ 基于视线制导和PID控制的欠驱动船舶首摇抑制策略研究
 舰船科学技术  2022, Vol. 44 Issue (20): 54-59    DOI: 10.3404/j.issn.1672-7649.2022.20.011 PDF

1. 上海交通大学 海洋工程国家重点实验室，上海 200240;
2. 上海交通大学 三亚崖州湾深海科技研究院，海南 三亚 572000

Research on yaw suppression of underactuated ship based on line-of-sight guidance and PID control
GUO Jia-bao1,2, PENG Tao1,2, WANG Lei1,2, WANG Yi-ting1,2
1. State Key Laboratory of Ocean Engineering, Shanghai Jiao Tong University, Shanghai 200240, China;
2. SJTU-Sanya Yazhou Bay Institute of Deepsea Science and Technology, Sanya 572000, China
Abstract: When a large ship is cornering, if the direction of yaw is opposite to that of the desired course, the ship will be out of control due to the inertia of yaw. Aiming at this problem,this paper proposes a yaw suppression strategy. Firstly, a 3-DOF horizontal plane model of the underactuated ship is established. Then, the line of sight (LOS) method is used to transform the path tracking problem into the course control problem of the underactuated ship. By adding a yaw suppression item into PID control, a yaw suppression controller based on line of sight guidance and PID control is designed. The simulation results show that the proposed strategy is suitable for both straight and curved segments, and can effectively reduce the maximum vertical error(49.8%), average vertical error(56.2%), maximum course angle error(43.6%), average course angle error(42.9%) of the ship during cornering and improve the path tracking accuracy, it can also reduce the change in angular velocity of yaw and rudder angle, which has certain application value.
Key words: underactuated ship     path tracking     line of sight     PID control     yaw suppression
0 引　言

1 船舶动力学模型

 $\left\{ \begin{gathered} (m - {X_{\dot u}})\dot u - mvr - {X_u}u = X ，\\ (m - {Y_{\dot v}})\dot v - {Y_v}v - {Y_{\dot r}}r + (mu - {Y_r}) = Y ，\\ ({I_z} - {N_{\dot r}})\dot r - {N_r}r - {N_v}v - {N_{\dot v}}\dot v = N 。\\ \end{gathered} \right.$ (1)

 $\left\{ \begin{gathered} X = {X_T} + {\tau _x} ，\\ Y = {Y_\delta } + {\tau _y} + {Y_b} ，\\ N = {N_\delta }\delta + {\tau _z} + {Y_b}{l_b} 。\\ \end{gathered} \right.$ (2)

 ${\boldsymbol{M}}\dot {\boldsymbol{V }}+ {\boldsymbol{G}}(V){\boldsymbol{V}} = {\boldsymbol{HF}} + {\boldsymbol{D}} 。$ (3)
 ${\boldsymbol{M}} = \left[ {\begin{array}{*{20}{c}} {m - {X_{\dot u}}}&0&0 \\ 0&{m - {Y_{\dot v}}}&{ - {Y_{\dot r}}} \\ 0&{ - {N_{\dot v}}}&{{I_z} - {N_{\dot r}}} \end{array}} \right]，$ (4)
 ${\boldsymbol{G}}({\boldsymbol{V}}) = \left[ {\begin{array}{*{20}{c}} { - {X_u}}&0&{ - mv} \\ 0&{ - {Y_v}}&{mu - {Y_r}} \\ 0&{ - {N_v}}&{ - {N_r}} \end{array}} \right]，$ (5)
 ${\boldsymbol{V}} = \left[ {\begin{array}{*{20}{c}} u \\ v \\ r \end{array}} \right]，$ (6)
 ${\boldsymbol{H}} = \left[ {\begin{array}{*{20}{c}} 0&0&0 \\ 0&{{Y_\delta }}&1 \\ 0&{{N_\delta }}&{{l_\delta }} \end{array}} \right]，$ (7)
 ${\boldsymbol{F }}= {\left[ {\begin{array}{*{20}{c}} 0&\delta &{{Y_b}} \end{array}} \right]^{\rm{T}}}，$ (8)
 ${\boldsymbol{D}} = {\left[ {\begin{array}{*{20}{c}} {{X_T} + {\tau _{xwind}}}&{{\tau _{ywind}}}&{{\tau _{zwind}}} \end{array}} \right]^{\rm{T}}}。$ (9)

 ${\boldsymbol{\dot V}} = - {{\boldsymbol{M}}^{ - 1}}{\boldsymbol{GV}} + {{\boldsymbol{M}}^{ - 1}}({\boldsymbol{HF}} + {\boldsymbol{D}}) 。$ (10)
 ${\boldsymbol{V }}= \left[ \begin{gathered} u \\ v \\ r \\ \end{gathered} \right] 。$ (11)
2 计算模型

a1=（203, –29.5, 6.8），a2=（203, 29.5, 6.8）, a3=（–197, 29.5,6.8），a4=（–197，–29.5,6.8）。

4个角在固定坐标系的位置根据重心位置，a1a2a3a4和首向角 $\psi$ 来确定，可以写成如下形式：

 $\dot \eta = {J_\theta }(\eta )v ，$ (12)
 ${J_\theta }(\eta )\mathop = \limits^{3DOF} R(\psi ) = \left[ {\begin{array}{*{20}{c}} {\cos (\psi )}&{ - \sin (\psi )}&0 \\ {\sin (\psi )}&{\cos (\psi )}&0 \\ 0&0&1 \end{array}} \right]。$ (13)

3 基于视线制导和PID控制的首摇抑制器设计 3.1 LOS算法的基本原理和改进应用

 图 1 传统LOS理论示意图 Fig. 1 Schematic of traditional LOS theory
 ${\psi _{LOS}} = ac\tan 2 \Bigg(\frac{{{y_{k + 1}} - y}}{{{x_{k + 1}} - x}}\Bigg) 。$ (14)

 图 2 适用于曲线的LOS理论示意图 Fig. 2 Schematic of curve-applied LOS theory

 ${\alpha _\psi } = {\alpha _k} + {\tan ^{ - 1}}( - e/ \Delta ) 。$ (15)

 $e = \frac{{|A{x_0} + B{y_0} + C|}}{{\sqrt {{A^2} + {B^2}} }}。$ (16)

 $\left\{ \begin{gathered} {({x_{k + 1}} - x)^2} + {({y_{k + 1}} - y)^2} \leqslant {R_0}^2，\\ k = k + 1 。\\ \end{gathered} \right.$ (17)

 $\psi = \psi - \Biggr(\Biggr[\frac{\psi }{{2\text{π} }} + 0.5\Biggr]\cdot 2 \text{π} \Bigg)。$ (18)

 ${\psi _e} = {\psi _e} - \Biggr(\Biggr[\frac{{{\psi _e}}}{{2\pi }} + 0.5\Biggr]\cdot 2\text{π} \Biggr)。$ (19)

3.2 改进的PID控制

PID控制由于其鲁棒性好、算法简单、可靠性高，被广泛应用于控制领域。为了能够更加平滑的进行操舵，降低操舵幅度，提高操舵效率，基于PID控制设计了首摇抑制器，通过在 PID 控制器中增加首摇抑制项，抑制有害的首摇。当首摇方向和船舶的期望航向一致时，首摇有益，抑制器并不发生作用，但若首摇方向与期望航向相反，此时首摇有害，抑制器会做出判断，减小首摇对船舶航行的影响。

 $u(t) = {K_p}e(t) + {K_I}\int {e(t){\rm{d}}t} + {K_D}\frac{{{\rm{d}}e(t)}}{{{\rm{d}}t}} + {K_\omega }g(e(t),\omega (t))。$ (20)

$e(t)\omega (t) \geqslant 0$ 时，

 $g(e(t),\omega (t)) = 0 。$ (21)

$e(t)\omega (t) \lt 0$ 时，

 $g(e(t),\omega (t)) = \omega。$ (22)

 $e(t) = {\alpha _\psi }(t) - \psi (t)。$ (23)
4 数值模拟 4.1 参数设置

 图 3 首摇抑制前后的航行轨迹对比图 Fig. 3 Comparison of trajectory diagram before and after yaw suppression
4.2 仿真结果与分析

 图 4 路径跟踪垂直误差 Fig. 4 Cross error of path tracking

 图 5 路径跟踪航向角误差 Fig. 5 Course angle error of path tracking

 图 6 首摇角速度 Fig. 6 Angular velocity of yaw

 图 7 首摇抑制前后的艏向角 Fig. 7 Heading angle of ship before and after yaw suppression

 图 8 舵角控制 Fig. 8 Rudder angel control

 图 9 舵角分布 Fig. 9 Rudder angle distribution
5 结　语

1）进入弯道后，首摇抑制策略能有效控制船舶首向，使其回到航线上。

2）对比航段内，首摇抑制策略能有效减小船舶的最大垂向误差(49.8%)、平均垂向误差(56.2%)、最大航向角误差(43.6%)和平均航向角误差(42.9%)，提高路径跟踪精度。

3）对比航段内，首摇抑制策略的控制更为柔和，可降低首摇角速度的变化幅度；可降低操舵幅度，使舵角分布更为集中。

 [1] 郭晨, 汪洋, 孙富春, 等. 欠驱动水面船舶运动控制研究综述[J]. 控制与决策, 2009, 24(3): 321-329. DOI:10.3321/j.issn:1001-0920.2009.03.001 [2] 余亚磊, 苏荣彬, 冯旭, 等. 基于速变 LOS 的无人船反步自适应路径跟踪控制[J]. 中国舰船研究, 2019, 14(3): 163-171. [3] DAI L, CAO Q, XIA Y, et al. Distributed MPC for formation of multi-agent systems with collision avoidance and obstacle avoidance[J]. Journal of the Franklin Institute, 2017, 354(4): 2068-2085. DOI:10.1016/j.jfranklin.2016.12.021 [4] 卜仁祥, 刘正江, 胡江强. 欠驱动船舶非线性滑模靠泊控制器[J]. 交通运输工程学报, 2007, 7(4): 24-29. DOI:10.3321/j.issn:1671-1637.2007.04.006 [5] ALMEIDA J, SILVESTRE C, PASCOAL A. Cooperative control of multiple surface vessels in the presence of ocean currents and parametric model uncertainty[J]. International Journal of Robust and Nonlinear Control, 2010, 20(14): 1549-1565. DOI:10.1002/rnc.1526 [6] SHOJAEI K. Neural network formation control of underactuated autonomous underwater vehicles with saturating actuators[J]. Neurocomputing, 2016, 194: 372-384. DOI:10.1016/j.neucom.2016.02.041 [7] ZOU T, SHEN Z, DAI C. Adaptive iterative sliding mode berthing control for underactuated ship based on chaotic particle swarm[C]//2018 37th Chinese Control Conference (CCC). IEEE, 2018: 2881-2886 [8] FOSSEN T I, PETTERSEN K Y, GALEAZZI R. Line-of-sight path following for dubins paths with adaptive sideslip compensation of drift forces[J]. IEEE Transactions on Control Systems Technology, 2014, 23(2): 820-827. [9] 贺宏伟, 邹早建, 曾智华. 欠驱动水面船舶的自适应神经网络-滑模路径跟随控制[J]. 上海交通大学学报, 2020, 54(9): 890. DOI:10.16183/j.cnki.jsjtu.2019.122 [10] 秦梓荷, 林壮, 李平, 等. 基于 LOS 导航的欠驱动船舶滑模控制[J]. 中南大学学报:自然科学版, 2016, 47(10): 3605-3611. [11] 祝亢, 黄珍, 王绪明. 基于深度强化学习的智能船舶航迹跟踪控制[J]. 中国舰船研究, 2021, 16(1): 43-113. DOI:10.19693/j.issn.1673-3185.01940 [12] FOSSEN T I, LEKKAS A M. Direct and indirect adaptive integral line-of-sight path-following controllers for marine craft exposed to ocean currents[J]. International Journal of Adaptive Control & Signal Processing, 2017, 31(4): 445-463. [13] BORHAUG E, PAVLOV A, PETTERSEN K Y, et al. Integral LOS control for path following of underactuated marine surface vessels in the presence of constant ocean currents[C]//Conference on Decision and Control, 2008: 4984-4991. [14] PIAO Z, GUO C, SUN S, et al. Research into the automatic berthing of underactuated unmanned ships under wind loads based on experiment and numerical analysis[J]. Journal of Marine Science and Engineering, 2019, 7(9): 1-22. [15] FOSSEN T I. Handbook of marine craft hydrodynamics and motion control[M]. John Wiley and Sons, 2011.