舰船科学技术  2024, Vol. 46 Issue (21): 109-112    DOI: 10.3404/j.issn.1672-7649.2024.21.019   PDF    
水面无人艇的模糊建模方法研究
张孟     
郑州工业应用技术学院,河南 郑州 451100
摘要: 为更好地应对水流、风力等外界干扰,提高航行的安全性和可靠性,研究水面无人艇的模糊建模方法。从惯性和艇体坐标系的2个角度,建立水面无人艇运动数学模型,全面描述无人艇的运动状态,包括位置、速度、加速度、航向角等关键参数;通过考虑风、浪、流这3个方面的干扰因素,建立水面无人艇环境干扰模型,得到总扰动力矩;以水面无人艇运动数学模型为基础,获取无人艇距离与航向角的偏差,作为模糊神经网络PID算法的输入,更好地应对水流、风力等外界干扰,输出水面无人艇航速与舵角控制量;依据总扰动力矩,得到无人艇的等效舵角值,与舵角控制量相加,得到最终的舵角控制信号,完成水面无人艇模糊建模,提高航行的安全性和可靠性。实验证明:该方法可有效确定水面无人艇的总扰动力矩,完成无人艇航速与舵角控制。
关键词: 水面无人艇     模糊建模     数学模型     环境干扰模型     模糊神经网络     PID算法    
Research on fuzzy modeling method of surface unmanned boat
ZHANG Meng     
Zhengzhou University of Industrial Technology, Zhengzhou 451100, China
Abstract: In order to better deal with the external interference such as current and wind, improve the safety and reliability of navigation, the fuzzy modeling method of surface unmanned boat is studied. Based on inertia and body coordinate system, a mathematical model is established to describe the motion state of unmanned surface vehicle, including position, speed, acceleration, heading Angle and other key parameters. By considering the disturbance factors of wind, wave and current, the environmental disturbance model of surface unmanned boat is established, and the total disturbance torque is obtained. Based on the mathematical model of the motion of the surface unmanned boat, the deviation between the distance and the heading Angle of the unmanned boat is obtained, which is used as the input of the fuzzy neural network PID algorithm to better cope with external interference such as current and wind, and output the speed and rudder Angle control quantity of the surface unmanned boat. According to the total disturbance torque, the equivalent rudder Angle value of the unmanned boat is obtained, which is added with the rudder Angle control quantity to obtain the final rudder Angle control signal, complete the fuzzy modeling of the surface unmanned boat, and improve the safety and reliability of navigation. Experiments show that the method can effectively determine the total disturbance torque of the unmanned surface boat, and complete the speed and rudder Angle control of the unmanned boat.
Key words: surface unmanned craft     fuzzy modeling     mathematical model     environmental interference model     Fuzzy neural network     PID algorithm    
0 引 言

水面无人艇作为一种新兴的智能海洋装备,其在海洋探测、环境监测、海上救援、军事侦察等领域展现出巨大的应用潜力[1]。为充分发挥无人艇的性能,对其进行建模是关键所在。无人艇的建模方法不仅关系到其运动特性的准确描述,还直接影响到后续的控制策略设计与实现[2]

例如,敖邦乾等[3]采用人工势场法为无人艇规划出高效的行驶路径,利用神经网络的自学习能力,在线调整PID控制器的各项参数,确保无人艇能够实现高精度的控制。虽然引入神经网络自学习能力可以提高PID控制器对动态环境的适应性,但人工势场法本身在动态环境下的适应性相对较差。当环境中出现新的障碍物或障碍物位置发生变化时,人工势场法需要重新计算势场,导致一定的延迟和计算负担。Kim,等[4]通过计算流体动力学(CFD)的方法,模拟波浪对船舶的影响,优化控制策略以保持船舶在预定航向上稳定航行。CFD方法对于特定波浪环境和船舶模型的模拟具有较高的准确性,但在面对不同环境或模型时,需要重新进行模拟和参数调整,降低其鲁棒性。陈卓等[5]将生物免疫系统的自我调节优化特性与遗传算法的进化搜索策略相结合,得到多策略免疫遗传算法,动态调整无人艇的控制参数,确保无人艇沿预定航向航行。多策略免疫遗传算法在理论上具有较强的全局搜索能力和鲁棒性,但在实际应用中受到多种因素的影响,如环境噪声、传感器误差等。这些因素会导致算法在实际应用中的稳定性和鲁棒性受到挑战。王宁等[6]在考虑推进器饱和约束的同时,保持无人艇的稳定航行和精确控制。通过实时监测推进器的输出状态,并动态调整控制指令,确保无人艇在推进器饱和条件下仍能沿着预定轨迹稳定航行。该方法在实际应用中会受到环境因素的影响,如水流、风力等。这些环境因素导致推进器输出状态的监测和控制指令的调整出现偏差,影响无人艇的稳定航行。

模糊神经网络PID算法结合模糊控制的灵活性和神经网络的自学习能力,能够更好地适应水面无人艇在复杂多变环境中的航行需求。通过在线调整PID参数,该算法能够应对各种不确定性因素,如水流、风力等外界干扰,确保无人艇能够在各种复杂情况下保持稳定的航行状态,提高航行的安全性和可靠性。为此,研究水面无人艇的模糊建模方法,期望能够为无人艇的控制与导航提供理论支持,推动无人艇技术的进一步发展。

1 水面无人艇建模 1.1 水面无人艇的运动数学模型

水面无人艇(USV)的运动可以分别从2个坐标系的角度来理解和描述,分别是惯性和艇体坐标系$ {\chi _1} $$ {\chi _2} $。在$ {\chi _2} $下,无人艇的运动学方程为:

$ \left[ \begin{array}{l} {{\dot x}_0} \\ {{\dot y}_0} \\ {\dot \varphi } \end{array} \right] = \left[ \begin{array}{ccc} \cos \varphi & - \sin \varphi & 0 \\ \sin \varphi & \cos \varphi & 0 \\ 0 & 0& 1 \end{array} \right] = \left[ \begin{array}{l} u \\ v \\ c \end{array} \right] 。$ (1)

式中:$ u $$ v $$ c $为前行、横移、波动速度;$ \varphi $为航向角;$ \left( {{x_0},{y_0}} \right) $为航行轨迹;$ \left( {{{\dot x}_0},{{\dot y}_0}} \right) $$ \dot \varphi $$ \left( {{x_0},{y_0}} \right) $$ \varphi $的一阶导数。

依据式(1)获取$ {\chi _2} $下,无人艇的运动学方程为:

$ \left\{ \begin{array}{l} m\left( {\dot u - vc - {x_G}{c^2}} \right) = {H_x}\left( {\dot u,\dot v,\dot c,u,v,c,\theta } \right) ,\\ m\left( {\dot v + uc + {x_G}\dot c} \right) = {H_y}\left( {\dot u,\dot v,\dot c,u,v,c,\theta } \right) ,\\ Jc + m{x_G}\left( {\dot v + uc} \right) = P\left( {\dot u,\dot v,\dot c,u,v,c,\theta } \right) 。\end{array} \right. $ (2)

式中:$ J $为转动惯量;$ \dot u $$ \dot v $$ \dot c $$ u $$ v $$ c $的一阶导数;$ \theta $为舵角;$ m $为无人艇质量;$ {H_x} $$ {H_y} $为在横纵方向无人艇承受的力矩;$ {x_G} $为重心在艇体坐标系中的偏移量;$ P $为偏航力矩。

对式(2)进行Taylor级数处理,同时去掉除一阶小量以外的其余变量,得到水面无人艇的线性运动学方程,令部分流体学导数为0,便可获取水面无人艇的线性运动数学模型,公式如下:

$ \left\{ \begin{gathered} \left( {m - {F_{x\dot u}}} \right)\dot u = {H_{xu}}\Delta u ,\\ \left( {m - {F_{y\dot v}}} \right)\dot v + \left( {m{x_G} - {F_{y\dot c}}} \right)\dot c = \left( {{H_{yv}}v - m{u_0}} \right)c + {H_{y\theta }}\theta,\\ \left( {J - {P_{\dot c}}} \right)\dot c + \left( {m{x_G} - {P_{\dot v}}} \right)\dot v = {P_v}v + \left( {{P_c} - m{x_G}{u_0}} \right)c + {P_\theta }\theta 。\\ \end{gathered} \right. $ (3)
1.2 水面无人艇环境干扰模型

水面无人艇在航行过程中,会受到风、浪、流的干扰,风扰动数学模型为:

$ \left\{ \begin{gathered} H_x^w = \frac{{\rho {B_1}{V^2}{A_x}}}{2} + \hat H_x^w ,\\ H_y^w = \frac{{\rho {B_2}{V^2}{A_y}}}{2} + \hat H_y^w ,\\ H_n^w = \frac{{\rho {B_2}{V^2}{A_n}}}{2} + \hat H_n^w。\\ \end{gathered} \right. $ (4)

式中:$ \hat H_x^w $$ \hat H_y^w $$ \hat H_n^w $为三自由度下变动风力扰动力矩;$ H_x^w $$ H_y^w $$ H_n^w $为三自由度下的风扰动力矩;$ \rho $为空气密度;$ {A_x} $$ {A_y} $$ \left\{ \begin{array}{l} {F_u} = {u_f} + {V_f}\cos \left( {\alpha - \varphi } \right)\\ {F_v} = {v_f} + {V_f}\cos \left( {\alpha - \varphi } \right)\end{array} \right. $为力矩系数;$ {B_1} $$ {B_2} $为无人艇艏向、右舷的投影;$ \left\{ \begin{array}{l} {F_u} = {u_f} + {V_f}\cos \left( {\alpha - \varphi } \right) \\ {F_v} = {v_f} + {V_f}\cos \left( {\alpha - \varphi } \right) \end{array} \right. $为相对风速。

令流向为$ \varphi $,均匀流扰动数学模型为:

$ \left\{ \begin{array}{l} {H_u} = {u_f} + {V_f}\cos \left( {\alpha - \varphi } \right),\\ {H_v} = {v_f} + {V_f}\cos \left( {\alpha - \varphi } \right) 。\end{array} \right. $ (5)

式中:$ {H_u} $$ {H_v} $为前行、横移时的均匀流扰动力矩;$ {u_f} $$ {v_f} $为无人艇对水速度分量;$ {V_f} $为水流速度。

令幅度为$ s $;浪扰动数学模型为:

$ \left\{ \begin{gathered} H_x^a = \frac{{\hat \rho {s^2}\cos \beta {{\hat A}_x}\left( \beta \right)}}{2} ,\\ H_x^a = \frac{{\hat \rho {s^2}\sin \beta {{\hat A}_y}\left( \beta \right)}}{2} ,\\ H_n^a = \frac{{\hat \rho {s^2}\sin \beta {{\hat A}_n}\left( \beta \right)}}{2} 。\\ \end{gathered} \right. $ (6)

式中:$ \beta $为波向;$ \hat \rho $为水密度;$ {\hat A_x}\left( \beta \right) $$ {\hat A_y}\left( \beta \right) $$ {\hat A_n}\left( \beta \right) $为波浪漂移力系数。

通过整合式(5)~式(6),得到水面无人艇的总扰动力矩$ \hat H $

1.3 水面无人艇的模糊控制模型

以水面无人艇运动数学模型与环境干扰模型为基础,结合模糊神经网络PID算法,设计水面无人艇模糊控制模型,通过模糊神经网络实时调整PID参数,可以更好地应对水流、风力等外界干扰,提高航行的安全性和可靠性。以建立的水面无人艇运动数学模型为基础,获取水面无人艇的距离偏差Ex与航向偏差$ {E_\varphi } $,在模糊神经网络PID算法内,输入$ {E_x} $,输出水面无人艇的前行速度控制量$ \hat u $,完成航速控制。在模糊神经网络PID算法内,输入$ {E_\varphi } $,输出水面无人艇的舵角控制量$ \hat \varphi $,完成航向控制。以航向控制为例,模糊神经网络PID算法的航向控制模型建立步骤如下:

1)确定输入层$ {Q^1} $。以$ {E_\varphi } $$ {E_\varphi } $的变化率$ \Delta {E_\varphi } $为输入变量$ Q_j^1 = \left( {{E_\varphi },\Delta {E_\varphi }} \right) $,其中,输入层神经元编号为$ j $

2)求解隶属度函数,得到隶属度函数层的输出为:

$ Q_{jl}^2 = {e^{ - \frac{{{{\left( {Q_j^1 - {z_{jl}}} \right)}^2}}}{{\delta _{jl}^2}}}} 。$ (7)

式中:$ l $为隶属度函数层的神经元编号;$ {z_{jl}} $$ {\delta _{jl}} $为隶属函数的中心值与宽度。

3)设计模糊规则,得到规则层的输出为:

$ Q_\tau ^3 = \prod\limits_{l = 1}^\eta {Q_{jl}^2}。$ (8)

式中:$ \eta $为隶属度函数层的神经元数量。

4)归一化计算,归一化层的输出为:

$ Q_\gamma ^4 = \frac{{Q_\tau ^3}}{{\displaystyle\sum\limits_{\tau = 1}^M {Q_\tau ^3} }}。$ (9)

式中:$ M $为规则层神经元数量。

5)确定输出层,得到PID算法的控制参数,比例、积分、微分系数为KPKIKD

6)计算水面无人艇的舵角控制量$ \hat \varphi $,同理,可获取水面无人艇的前行速度控制量$ \hat u $,完成航速控制,依据水面无人艇环境干扰模型得到的总扰动力矩$ \hat F $,可获取水面无人艇的等效舵角值($ \varphi ' $),将$ \hat \varphi $$ \varphi ' $相加得到最终的无人艇舵角控制量,完成航向控制。

2 结果与分析

以某无人艇为实验对象,利用本文方法对该无人艇进行模糊建模,无人艇模糊建模的实验环境如图1所示。图1中,发动机为无人艇的动力源,负责提供推进力,使无人艇能够在水面上前进、后退、转向等。尾舵用于控制无人艇的航行方向。电启动用于启动发动机。支架用于支撑和固定无人艇的各个部件,确保整个无人艇结构的稳定性和可靠性。电子仓负责接收和处理来自传感器的信息,执行控制指令。排水泵用于排除无人艇内部或周围的积水,防止无人艇因进水而损坏或失去性能。

图 1 无人艇模糊建模的实验环境 Fig. 1 Experimental environment of fuzzy modeling of unmanned boat

在存在环境扰动情况下,利用本文方法对该水面无人艇进行模糊建模,实现水面无人艇航速与航向控制,确保水面无人艇安全航向。利用本文方法确定水面无人艇航行时的总扰动力矩,确定结果如图2所示。从图2(a)中可以看出,本文方法可有效建立水面无人艇环境干扰模型,确定总干扰力矩,最大干扰力矩在80Nm左右。从图2(b)中可以看出,本文方法可有效建立无人艇模糊控制模型,完成无人艇航速控制,且本文方法的控制结果能够精准跟随期望航速,仅有微小的波动量。从图2(c)中可以看出,本文方法具备无人艇航向控制的可行性,且本文方法的控制舵角,依旧能够精准跟随期望舵角,且舵角变化曲线非常平滑,可提升水面无人艇航行的稳定性。

图 2 总扰动力确定结果与水面无人艇控制结果 Fig. 2 Determination result of total disturbance force and control result of surface unmanned vehicle
3 结 语

由于无人艇运动系统具有高度的非线性、随机性和不确定性,特别是在复杂海洋环境下的航行,传统建模方法难以达到理想的控制效果。因此,研究水面无人艇的模糊建模方法,实现对无人艇航向和航速的精确控制,即使在恶劣的海况条件下也能保持稳定的航行状态。

参考文献
[1]
陈淑玲, 邹蓓蕾, 仲亚, 等. 具有不同首柱角的高速水面无人艇耐波性能研究[J]. 江苏科技大学学报(自然科学版), 2022, 36(6): 9-14,30.
CHEN Shuling, ZOU Beilei, ZHONG Ya, et al. Research on resistance performance of high-speed unmanned surface vessel with different stem post angles[J]. Journal of Jiangsu University of Science and Technology(Natural Science Edition), 2022, 36(6): 9-14,30.
[2]
夏家伟, 朱旭芳, 罗亚松, 等. 基于深度强化学习的无人艇轨迹跟踪算法研究[J]. 华中科技大学学报(自然科学版), 2023, 51(5): 74-80.
XIA Jiawei, ZHU Xufang, LUO Yasong, et al. Study on trajectory tracking algorithm of unmanned surface vehicle based on deep reinforcement learning[J]. Journal of Huazhong University of Science and Technology (Nature Science Edition), 2023, 51(5): 74-80.
[3]
敖邦乾, 姜孝均, 董泽芳, 等. 基于神经网络-PID控制的水面无人艇控制系统设计[J]. 控制工程, 2024, 31(7): 1178-1184.
AO Bangqian, JIANG Xiaojun, DONG Zefang, et al. Design of unmanned surface vehicle control system based on neural network-PID control[J]. Control Engineering of China, 2024, 31(7): 1178-1184.
[4]
KIM D, TEZDOGAN T. Cfd-based hydrodynamic analyses of ship course keeping control and turning performance in irregular waves. Ocean Engineering, 2022, 248(5), 81−92.
[5]
陈卓, 金建海, 张波, 等. 基于多策略免疫遗传算法的无人艇航向自适应控制[J]. 船舶力学, 2023, 27(9): 1273-1282.
CHEN Zhuo, JIN Jianhai, ZHANG Bo, et al. Adaptive control method of unmanned surface vehicle course based on MSFIGA algorithm[J]. Journal of Ship Mechanics, 2023, 27(9): 1273-1282. DOI:10.3969/j.issn.1007-7294.2023.09.001
[6]
王宁, 王仁慧, 鲁挺. 推进器饱和约束的水面无人艇固定时间精准跟踪控制[J]. 控制理论与应用, 2023, 40(1): 55-64.
WANG Ning, WANG Renhui, LU Ting. Fixed-time precision tracking control of an unmanned surface vehicle constrained by thruster saturations[J]. Control Theory & Applications, 2023, 40(1): 55-64. DOI:10.7641/CTA.2022.10778