﻿ 自适应粒子群算法在AUV水动力参数辨识中的应用
 舰船科学技术  2021, Vol. 43 Issue (11): 90-95    DOI: 10.3404/j.issn.1672-7649.2021.11.016 PDF

Application of adaptive particle swarm optimization algorithm in AUV hydrodynamic parameter identification
ZHOU Yi, WANG Jun-xiong
State Key Laboratory of Naval Architecture and Ocean Engineering, Shanghai Jiao tong University, Shanghai 200240, China
Abstract: Based on the hydrodynamic parameter identification of autonomous underwater vehicle (AUV), the identification method of the hydrodynamic parameter identification of autonomous underwater vehicle is studied. In view of the problems existing in some identification methods of autonomous underwater vehicle’s hydrodynamic parameter identification at present that the hydrodynamic parameter identification equation does not adopt AUV six degrees of freedom motion equation and the hydrodynamic parameter identification process of AUV requires noise elimination and some identification methods are sensitive to the initial value of data, and considering the characteristics that there are many AUV hydrodynamic parameters and the coupling between parameters is high, an AUV hydrodynamic parameter identification method based on least square criterion and adaptive particle swarm optimization algorithm is proposed, and the method is verified by simulation experiments. The simulation results show that the method is feasible and robust and has better stability and rapidity compared with the particle swarm optimization algorithm.
Key words: autonomous underwater vehicle     parameter identification     adaptive particle swarm optimization algorithm     least squares criterion     simulation

1 AUV数学模型

 图 1 固定和运动坐标系 Fig. 1 Fixed and moving coordinates

 $\begin{split} & m(\dot u - vr + wq) + (W - B)\sin \theta - X = {X_{\dot u}}\dot u + {X_u}u +\\ & {X_{u\left| u \right|}}u\left| u \right| + {Z_{\dot w}}wq - {Y_{\dot v}}vr{\text{，}} \end{split}$ (1)
 $\begin{split} & m\left( {\dot v - wp + ur} \right) - (W - B)\cos \theta \sin \varphi - Y = {Y_{\dot v}}\dot v + {Y_v}v + \\ & {Y_{v\left| v \right|}}v\left| v \right| - {Z_{\dot w}}wp + {X_{\dot u}}ur{\text{，}} \end{split}$ (2)
 $\begin{split} & m(\dot w + vp - uq) - (W - B)\cos \theta \cos \varphi - Z =\\ & {Z_{\dot w}}\dot w + {Z_w}w + {Z_{w\left| w \right|}}w\left| w \right| + {Y_{\dot v}}vp - {X_{\dot u}}uq {\text{，}} \end{split}$ (3)
 $\begin{split} & {I_x}\dot p + {I_z}rq - {I_y}qr + {y_b}B\cos \theta \cos \varphi - {z_b}B\cos \theta \sin \varphi - K = \\ & {K_{\dot p}}\dot p + {K_p}p + {K_{p\left| p \right|}}p\left| p \right| + {Z_{\dot w}}wv - {Y_{\dot v}}vw + {N_{\dot r}}rq - {M_{\dot q}}qr{\text{，}} \end{split}$ (4)
 $\begin{split} & {I_y}\dot q - {I_z}rp + {I_x}pr - {z_b}B\sin \theta - {x_b}B\cos \theta \cos \varphi - M = \\ & {M_{\dot q}}\dot q + {M_q}q + {M_{q\left| q \right|}}q\left| q \right| - {Z_{\dot w}}wu + {X_{\dot u}}uw - {N_{\dot r}}rp + {K_{\dot p}}pr{\text{，}} \end{split}$ (5)
 $\begin{split} & {I_z}\dot r + {I_y}qp - {I_x}pq + {x_b}B\cos \theta \sin \varphi + {y_b}B\sin \theta - N = \\ & {N_{\dot r}}\dot r + {N_r}r + {N_{r\left| r \right|}}r\left| r \right| + {Y_{\dot v}}vu - {X_{\dot u}}uv + {M_{\dot q}}qp - {K_{\dot p}}pq{\text{。}} \end{split}$ (6)

2 最小二乘准则和自适应粒子群算法的研究

 $\begin{split} & m(\dot u - vr + wq) + (W - B)\sin \theta - X =\\ & {X_{\dot u}}\dot u + {X_u}u + {X_{u\left| u \right|}}u\left| u \right| + {Z_{\dot w}}wq - {Y_{\dot v}}vr{\text{。}} \end{split}$ (7)

 $T = \left[ {\begin{array}{*{20}{c}} {\dot u}&u&{u\left| u \right|}&{wq}&{ - vr} \end{array}} \right]\left[ {\begin{array}{*{20}{c}} {{X_{\dot u}}} \\ {{X_u}} \\ {{X_{u\left| u \right|}}} \\ {{Z_{\dot w}}} \\ {{Y_{\dot v}}} \end{array}} \right]{\text{，}}$ (8)
 $T = m(\dot u - vr + wq) + (W - B)\sin \theta - X {\text{。}}$ (9)

2.1 最小二乘法准则

 $\dot x(t) = f(x(t),u(t),\theta ){\text{，}}$ (10)

 $J(\theta ) = \sum\limits_{i = 1}^N {{{\left( {{{\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{x} }_i} - {x_i}(\theta )} \right)}^{\rm{T}}}} \left( {{{\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{x} }_i} - {x_i}(\theta )} \right) {\text{。}}$ (11)

2.2 自适应粒子群算法

 ${v_{i,j}}(t + 1) = k{v_{i,j}}(t) + {c_1}{r_1}[{p_{i,j}} - {x_{i,j}}(t)] + {c_2}{r_2}[{p_{g,j}} - {x_{i,j}}(t)] {\text{，}}$ (12)
 ${x_{i,j}}(t + 1) = {x_{i,j}}(t) + {v_{i,j}}(t + 1) {\text{。}}$ (13)

1）惯性权重

 k = \left\{ {\begin{aligned} & {{k_{\min }} + \frac{{({k_{\max }} - {k_{\min }})*(f - {f_{\min }})}}{{({f_{avg}} - {f_{\min }})}},f \leqslant {f_{avg}}} {\text{，}}\\ & {{k_{\max }},f > {f_{avg}}} {\text{。}} \end{aligned}} \right. (14)

2）学习因子

3）种群规模

4）粒子范围

5）最大速度

6）适应度值

 图 2 自适应粒子群算法流程 Fig. 2 Flow of adaptive particle swarm optimization algorithm
3 AUV水动力参数辨识算法设计

1）随机初始化各粒子，确定初始个体最优和全局最优

2）进入迭代，更新惯性权重，更新个体最优和全局最优位置

3）迭代指定步数，输出全局最优位置

4 模拟仿真

 图 3 PSO与自适应PSO辨识收敛曲线 Fig. 3 Identification convergence curves of PSO and adaptive PSO

1）辨识过程自始至终采用的为AUV六自由度方程，充分保留了其运动方程非线性、参数时变性、强耦合等特点，贴近实际，整体辨识结果较好，说明自适应粒子群算法的适用性较好。表4虽然只辨识了式（1）中所涉及到的AUV水动力参数，但该方法对于辨识参数的维度不敏感，因而对于其他水动力参数的辨识可类似进行。

2）当实际观测数据引入的噪声标准差从1%～7%变化时，AUV的水动力参数辨识的相对误差不超过3.27%，辨识结果较好，充分体现了自适应粒子群算法在AUV水动力参数辨识中对数据所掺杂噪声敏感性较低的特点；

3）辨识中并未对数据初值做特殊要求，可看出该方法对初值的敏感度较低，适应性较好；

4）表4中不同噪声水平下的AUV水动力参数辨识中，所运用的自适应粒子群算法参数设置均相同，意在控制变量，突出考察该方法对不同噪声的鲁棒性。在实际情况下，可对自适应粒子群算法中的参数进行调整，以获得更好的结果。

5 结　语

 [1] 李庆梅, 刘平, 等. 基于NSGA-Ⅱ算法的水下机器人水平面运动参数辨识[J]. 上海第二工业大学学报, 2016, 33(2): 141-145. LI Qing-mei, LIU Ping, et al. Hydrodynamic coefficients identification for the horizontal plane motion of the underwater vehicle using NSGA-II algorithm[J]. jouranl of shanghai polytechinc university, 2016, 33(2): 141-145. DOI:10.3969/j.issn.1001-4543.2016.02.011 [2] 李迎华, 吴宝山, 张华. CFD动态网格技术在水下航行体非定常操纵运动预报中的应用研究[J]. 船舶力学, 2010, 14(10): 1100-1108. LI Ying-hua, WU Bao-shan, ZHANG Hua. Research on application of prediction for unsteady maneuvering motion of underwater vehicle by dynamic mesh technique in CFD[J]. Journal of Ship Mechanics, 2010, 14(10): 1100-1108. DOI:10.3969/j.issn.1007-7294.2010.10.004 [3] KIM J Y, KIM K H, CHOI H S, et al. Estimation of hydrodynamic coefficients for an AUV using nonlinear observers[J]. IEEE Journal of Oceanic Engineering, 2002, 27(4): 830-840. DOI:10.1109/JOE.2002.805098 [4] 陈玮琪, 颜开, 王宝寿. 辨识航行体水动力参数的智能方法[J]. 船舶力学, 2011, 15(4): 359-363. CHEN Wei-qi, YAN Kai, WANG Bao-shou. Intelligent identification of hydrodynamic parameters of navigating body[J]. Journal of Ship Mechanics, 2011, 15(4): 359-363. DOI:10.3969/j.issn.1007-7294.2011.04.005 [5] RIDAO P, BATLLE J, CARRERAS M. Model identification of a low-speed UUV[C]//Proceedings of the 1st IFAC workshop on guidance and control of underwater vehicles, Glasgow, Scotland, UK: IFAC, 2003: 47−52. [6] 林子淇. 水下机器人动力学建模与系统辨识技术研究[D]. 哈尔滨: 哈尔滨工程大学, 2015. LIN Ziqi. Research on dynamic modeling and techniques of system identification of underwater Vehicle[D]. Harbin: Harbin Engineering University, 2015. [7] 王绍宾. 基于鲁棒控制的自主水下航行器控制方法研究[D]. 哈尔滨: 哈尔滨工程大学, 2018. WANG Shaobin. Research on control method of autonomous underwater vehicle based on robust control[D]. Harbin: Harbin Engineering University, 2018. [8] SILPA C. Autonomous underwater robot: vision and control.[D]. Australian National University, Australia, 2001. [9] Kennedy J, Eberhart R. Particle swarm optimization[C]//IEEE Int’l Confon Neural Networks. Perth, Australia, 1995: 1942−1948. [10] SHI Y H, EBERHART R C. A modified particle swarm optimizer[J]. IEEE international conference on evolutionary computation, anchorage alsaka, 1998, 69-73. [11] 沈智鹏, 代昌盛. 欠驱动船舶路径跟踪的强化学习迭代滑模控制[J]. 哈尔滨工程大学学报, 2017(5). SHEN Zhipeng, DAI Changsheng. Iterative sliding mode control based on reinforced learning and used for path tracking of under-actuated ship[J]. Journal of Harbin Engineering University[J], 2017(5). [12] 罗彩君. 基于粒子群算法的欠驱动船舶航向控制研究[J]. 舰船科学技术, 2019, 41(10): 25-27. LUO Cai-jun. Research on underactuated ship heading control based on particle swarm optimization[J]. ship science and technology, 2019, 41(10): 25-27. [13] 韦波. 粒子群优化的RBF神经网络在海上运输事故预测中的应用[J]. 舰船科学技术, 2016, 38(4): 181-183. WEI Bo. Application of RBF neural network in the prediction of sea transportation accidents in the particle swarm optimization[J]. ship science and technology, 2016, 38(4): 181-183. [14] 方淡玉, 黄橙, 等. 基于船舶六自由度运动的船舶航行安全实时监控系统研究[J]. 数字技术与应用, 2013(6). FANG Dan-yu, HUANG Cheng, et al. Research on real-time monitoring system of ship navigation safety based on ship's six degrees of freedom movement[J]. Digital Technology and Application, 2013(6).