﻿ 基于NURBS和小波变换的船体曲面结构优化设计
 舰船科学技术  2023, Vol. 45 Issue (19): 31-34    DOI: 10.3404/j.issn.1672-7649.2023.19.005 PDF

Optimization design of hull surface structure based on NURBS and wavelet transform
WAN Yu-hua
School of Shipbuilding Engineering, Wuxi Insititute of Communications Technology, Wuxi 214151, China
Abstract: The optimal design of hull surface structure is an important part of ship design, which can improve the dynamic performance and efficiency of the ship. This paper proposes an optimization design method of hull surface structure based on non-uniform rational B-spline (NURBS) and wavelet transform. NURBS curve and surface modeling method is used to model the hull, and the flexibility of NURBS curve and surface and the decomposition algorithm of wavelet transform are based on it. The results show that the optimization design of hull curves and surfaces based on NURBS and wavelet transform is efficient and accurate.
Key words: NURBS     wavelet transform     Open GL
0 引　言

NURBS曲线是一种用于表示和建模曲线和曲面的数学工具，它具有较高的灵活性和精确性，可以通过控制点和权重来调整曲线的形状。在船体曲面结构设计中，可以利用NURBS曲线来建模船体的外形和内部结构，通过调整控制点和权重来优化曲面的形状，以满足设计要求。小波变换是一种数学工具，用于分析信号的时频特性。在船体曲面结构设计中，可以利用小波变换来分析船体曲面的局部特性，如曲率、法向量等。通过对曲面进行小波变换，可以获取曲面的局部特性信息，并根据设计要求进行优化调整。

1 NURBS样条曲线的基本研究

 $p(u) = \frac{{\displaystyle\sum\limits_{i = 0}^n {{N_{i,k}}} (u){d_i}{\omega _i}}}{{\displaystyle\sum\limits_{i = 0}^n {{N_{i,k}}} (u){\omega _i}}} \text{。}$

B样条曲线的节点矢量为 $T\left( {{t_0},{t_1},...,{t_n}} \right)$ ，且 ${t_i} < {t_{i + 1}}$ ，则第ip次B样条基函数定义如下：

 $\left\{ {\begin{array}{*{20}{l}} {{{N}_{i,0}}({t}) = \left\{ {\begin{array}{*{20}{l}} {1,{{t}_i} \leqslant t < {t_{i + 1}}} ，\\ {0,{\rm{else}}} ，\end{array}} \right.} \\ {{N_{i,p}}({t}) = \frac{{{t} - {{t}_i}}}{{{{t}_{i + p}} - {{t}_i}}}{{N}_{i,p - 1}}({\rm t}) + \frac{{{{t}_{i + p + 1}}}}{{{{t}_{{\text{i}} + 1}}}}{{N}_{i + 1,p - 1}}(t)} ，{\rm else}。\\ \end{array}} \right.$

NURBS样条的基函数是一组用于定义NURBS曲线和曲面的数学函数，常用的基函数为幂函数[1]、多项式函数等，如图1所示。

 图 1 NURBS样条的基函数曲线示意图 Fig. 1 Schematic diagram of the basis function curve of NURBS splines

NURBS样条具有以下特性：

1）局域非负性

 ${N_{t,p}}(t)\left\{ {\begin{array}{*{20}{l}} { \geqslant 0}，\; {t \in \left[ {{t_i},{t_{i + p + 1}}} \right]}，\\ { = 0，\;\rm{else}}。{{\text{ }}} \end{array}} \right.$

2）递推性

 ${{{N}}_{i,p}}({{t}}) = F\left( {{{{N}}_{{{i}},p - 1}}({{t}})} \right) \text{。}$

3）归一性

 $\sum\limits_{i = 0}^n {{N_{i,p}}} (t) = 1 \text{。}$

4）正数性。

 ${N_{t,p}}(t) \geqslant 0 \text{。}$

NURBS样条曲线具有局部控制性，即修改一个控制点只会影响与之相邻的部分曲线或曲面，同时具有良好的插值性，即可以通过控制点完全重建曲线或曲面。

 图 2 基于NURBS样条曲线的插值拟合实例 Fig. 2 Example of interpolation fitting based on NURBS spline curves
2 多分辨小波变换理论研究

 $\int\limits_R^{} {} {\left| {\frac{{x\left( \omega \right)}}{\omega }} \right|^2}{\rm{d}} \omega \leqslant \infty \text{。}$

$x\left( t \right)$ 的平移与伸缩变换如下式：

 ${x_s}\left( t \right) = \frac{1}{{\sqrt s }}x\left( {\frac{{t - \alpha }}{s}} \right) \text{。}$

 $\begin{gathered} W{T_f}\left( {s,t} \right) = \left\{ {f\left( t \right),x\left( t \right)} \right\} = \frac{1}{{\sqrt s }}\int\limits_{}^{} {f\left( t \right)} x\left( {\frac{{t - \alpha }}{s}} \right){\rm{d}}t \text{。} \end{gathered}$

 $\psi \left( t \right) = \left\{ \begin{split} &1，\;\;0 < t < \frac{1}{2} ，\\ &- 1，\frac{1}{2} < t < 1 ，\\ &0，\;\;{\rm{else}。} \\ \end{split} \right.$

Morlet小波函数是一个复指数函数，其实部表示信号的振幅变化，虚部表示信号的相位变化，其模型为：

 $M\left( t \right) = C{e^{\frac{{{t^2}}}{2}}}\cos \left( {5t} \right) \text{。}$

 图 3 Morlet小波函数波形图 Fig. 3 Morlet wavelet function waveform

3 基于NURBS和小波变换的船体结构拟合 3.1 基于NURBS样条曲线的船体曲线优化设计

 ${V_{i,j}}\left( {i = 0,1,...,m;j = 0,1,...,n} \right) \text{。}$

 $F = \{ \underbrace {0,{t_{p + 1}}, \cdots ,{t_n},1}_{p + 1}\} ;K = \{ \underbrace {0,{w_{q + 1}}, \cdots ,{w_n},1}_{q + 1}\} \text{。}$

 $S(F,K) = \sum\limits_{i = 0}^n {\sum\limits_{j = 0}^n {{N_{t,p}}(F)} } {N_{j,p}}(K){V_{i,j}} 。$

${N_{j,p}}(K)$ ${N_{t,p}}(F)$ 分别为p次B样条的基函数，图4为B样条的P次节点曲线控制示意图。图中可见6个P次节点，产生的B样条曲线具有较好的节点控制效果。

 图 4 B样条的P次节点曲线控制示意图 Fig. 4 Schematic diagram of P-degree node curve control for B-spline

 图 5 基于B样条生成的船舶型线、型面示意图 Fig. 5 Schematic diagram of ship lines and surfaces generated based on B-splines

3.2 基于NURBS样条曲线的船体曲面设计

1）曲面连续性判断

 $S(u,v) = \frac{{\displaystyle\sum\limits_{i = 0}^n {\displaystyle\sum\limits_{j = 0}^m {{\omega _{i,j}}} } {d_{i,j}}{N_{i,k}}(u){N_{j,l}}(v)}}{{\displaystyle\sum\limits_{i = 0}^n {\displaystyle\sum\limits_{j = 0}^m {{\omega _{i,j}}} } {N_{i,k}}(u){N_{j,l}}(v)}} \text{。}$

 ${\left. {\frac{{\partial {S^2}(u,v)}}{{\partial u}}} \right|_{u = 0}} = {\left. {p(v)\frac{{\partial {S^1}(u,v)}}{{\partial u}}} \right|_{u = 1}} + {\left. {q(v)\frac{{\partial {S^1}(u,v)}}{{\partial v}}} \right|_{u = 1}} \text{。}$

 图 6 基于NURBS的船舶曲面拟合流程图 Fig. 6 NURBS based ship surface fitting process

2）曲面的连接

 图 7 基于OpenGL平台的船体曲面拟合效果图 Fig. 7 Fitting diagram of ship hull line and curved surface

4 结　语

 [1] 贾萌珊, 齐子元, 薛德庆,等. 基于GASA-BP-BiLSTM的轴承故障预测研究[J]. 组合机床与自动化加工技术, 2023(5): 148−151+155. JIA Meng-shan, QI Zi-yuan, XUE De-qing, et al. Research on bearing failure prediction based on GASA-BP-BiLSTM[J]. Combined Machine Tool and Automatic Processing Technology, 2023(5): 148−151+155. [2] ZHU Fu-ping, QIN Qin, YANG Fang-yan, et al. Rolling bearing failure prediction method based on information fusion technology[J]. Mechanical Design, 2023, 40(1): 56-64. [3] 刘桂然. 基于BP-神经网络的风电主轴承故障预测[J]. 科学技术创新, 2020(26): 18-19. LIU Gui-ran. Fault prediction of main bearing of wind power based on BP-neural network[J]. Science and Technology Innovation, 2020(26): 18-19. [4] 李泓洋, 万烂军, 李长云, 等. 基于神经网络和证据理论的滚动轴承故障预测方法[J]. 湖南工业大学学报, 2020, 34(4): 35-41. LI Hong-yang, WAN Lan-jun, LI Chang-yun, et al. Rolling bearing failure prediction method based on neural network and evidence theory[J]. Journal of Hunan University of Technology, 2020, 34(4): 35-41. DOI:10.3969/j.issn.1673-9833.2020.04.006