Firstly, by using the relationships between the parameters given in three types of unimodal wave spectra (the rational fraction unimodal spectrum, the Jonswap spectrum, and the Neumann spectrum) and the characteristic quantities of the sample spectrum (such as the zero-order moment m0 and the frequency corresponding to the peak value ωp, etc.), the parameters in the unimodal wave spectra are calculated, so as to obtain the specific expressions of the unimodal wave spectra.
Secondly, taking two unimodal wave spectra as the low-frequency sub-spectrum and the high-frequency sub-spectrum, respectively, a bimodal ocean wave spectrum is constructed by superimposing the low-frequency sub-spectrum and the high-frequency sub-spectrum, and the specific expression of the bimodal wave spectrum is obtained.
Finally, the bimodal wave spectrum and the sample spectrum are input into the improved particle swarm optimization (PSO) algorithm to optimize the parameters of the bimodal wave spectrum. After multiple rounds of iterative optimization, the parameter expressions of the bimodal wave spectrum with high accuracy are obtained.
3.2. Construct Bimodal Wave Spectra
In this paper, the three wave spectra mentioned in
Section 3.1 are selected as the basic components of the bimodal wave spectrum, and the bimodal wave spectrum is constructed by superimposing the low-frequency sub-spectrum and the high-frequency sub-spectrum:
where
S(
ω),
S1(
ω),
S2(
ω), and
ω represent the bimodal wave spectrum, low-frequency sub-spectrum, high-frequency sub-spectrum, and frequency, respectively.
During the superposition process, the zero-order moments
m01 and
m02 of the low-frequency sub-spectrum and the high-frequency sub-spectrum are important parameters of the single-peak wave spectrum. However, the characteristic quantities of the sample spectrum cannot directly yield the values of m
01 and m
02; and when two single-peak wave spectra are superimposed to form a bimodal wave spectrum, there will be an issue where the energy of the high-frequency part of the bimodal wave spectrum is slightly higher than that of the sample spectrum. Therefore, the solving and iterative method proposed by [
16] is employed to determine the values of m
01 and m
02 and to address the problem of excessive energy in the high-frequency part of the bimodal wave spectrum. The specific process is as follows:
Considering the narrow-spectrum [
28,
29] nature of the single-peak spectrum, some approximate assumptions can be made:
Among them, S01 and S02 represent the spectral peak energies of the low-frequency sub-spectrum and the high-frequency sub-spectrum, respectively, and m01 and m02 represent the zero-order moments of the low-frequency sub-spectrum and the high-frequency sub-spectrum, respectively. The establishment of Equation (6) needs to be based on an approximate assumption that the widths of the low-frequency sub-spectrum and the high-frequency sub-spectrum are approximately the same. The sample spectra in this study all meet this condition.
The following establishes the relationship between the characteristic quantities of the sample spectrum and the parameters of the sub-spectrum. First, Equation (7) naturally holds the following:
Among them, m01, m02, and m0 represent the zero-order moment of the low-frequency sub-spectrum, the zero-order moment of the high-frequency sub-spectrum, and the zero-order moment of the sample spectrum, respectively.
Secondly, considering the narrow-spectrum characteristics of the unimodal wave spectrum, if the two peak frequencies of the sample spectrum are far apart, then the peak frequencies of the bimodal wave spectrum have a minimal offset from the peak frequencies of the corresponding sample spectrum. Therefore, the following conclusions can be drawn:
Among them, ω01 and ω02 represent the low-frequency peak frequency and the high-frequency peak frequency of the bimodal wave spectrum, respectively, and ω1 and ω2 represent the low-frequency peak frequency and the high-frequency peak frequency of the sample spectrum, respectively.
By combining Equations (6) and (7), we can obtain
According to the fact that the low-frequency peak value of the sample spectrum is the sum of the spectral peak value of the low-frequency sub-spectrum and the spectral value of the high-frequency sub-spectrum at that position,
S01 and
S02 can be calculated, that is,
Similarly, for the high-frequency peak value, this should be as follows:
Since the energy of the single-peak wave spectrum is mainly concentrated around the peak frequency and
S2(
ω1) is close to zero, it can be assumed that
S1 is contributed entirely by
S01, i.e.,
However, Equation (13) should not be treated in the same way. The single-peak wave spectrum has a long tail, and when ω2 >> ω1, the contribution of S1(ω2) to S2 can be omitted, and it is sufficient to take S02 = S2; when ω2 does not differ much from ω1, S1(ω2) cannot be ignored, or else the high-frequency portion of the bimodal wave spectrum will be overestimated. Therefore, an iterative approach is used to solve this problem.
First assume that the initial iteration value is as follows:
Next,
ω =
ω2 is brought into
S1(
ω) to determine
S1(
ω2), which is then brought into Equation (13) to obtain the following:
According to Equation (17), this process is repeated until the desired accuracy is achieved. It is calculated that in the vast majority of cases, one iteration will satisfy the required accuracy.
Through the above method, this paper is able to accurately calculate the zero-order moments m01 and m02 of the low-frequency sub-spectrum and the high-frequency sub-spectrum based on the known characteristic quantities of the sample spectrum and properly solves the problem of the excessively high energy in the high-frequency part of the bimodal sea wave spectrum.
In addition, given that the single-peak spectrum exhibits narrow-spectrum characteristics, and according to the sample spectrum in this paper, the low-frequency peak frequency and the high-frequency peak frequency are far apart. Therefore, during the superposition process, we assume that all parameters of these two single-peak wave spectra are independent of each other. (The experimental results show that when the above two conditions are met, the fitting accuracy error of the bimodal sea wave spectrum with independent parameters is less than 5%).
3.3. Improved Particle Swarm Optimization (PSO) Algorithm
The particle swarm optimization (PSO) algorithm is an optimization algorithm based on swarm intelligence. By simulating the foraging behavior of bird flocks, it uses particles to search for optimal parameters in the solution space. Each particle represents a potential solution and has an initial position and velocity. The position and velocity of particles are updated based on individual and group experience. This paper improves the traditional PSO algorithm by adding an adaptive parameter adjustment module and a local search enhancement module to enhance the algorithm’s local search ability and the ability to explore potential optimal solutions. Moreover, in the update steps of particle positions and velocities, the overall average value is used to replace the single optimal value of each particle to prevent the particle swarm from prematurely converging around a local optimal solution. In the optimization of wave spectrum parameters, the spectrum model has multiple parameters (such as spectral peak frequency, sharpness factor, etc.). The improved PSO algorithm can iteratively adjust the parameters of the spectrum model to find a set of parameters that minimize the error between the fitted spectrum and the measured spectrum, so as to better fit the observed data.
First, initialize the PSO algorithm model. Randomly generate a set of particles (in this paper, 50 particles are generated), define the initial velocity of each particle, and set the value range of each parameter. Second, define the fitness function of the model. The fitness function measures the degree of fit between the fitted spectrum and the measured spectrum. In this paper, the mean squared error (
MSE) is selected as the fitness function (the closer the
MSE is to zero, the better the fitting effect):
Among them,
S1(
fi) represents the fitted spectrum,
S2(
fi) represents the sample spectrum, and
fi represents the frequency.
fi has the characteristic of a uniform grid distribution. That is to say,
fi is uniformly distributed within a specific interval (f
min, f
max), and the frequency interval is fixed. The formula for the uniform grid distribution is as follows:
Among them, Δ
f represents the frequency interval and
N represents the number of frequency points. In this paper, the parameters of the uniform grid distribution of
fi for the three types of bimodal sample spectra are listed in
Table 2.
Finally, update the position and velocity of the particles to obtain the final parameter values. The formulas are as follows:
where
t is the number of iterations (set to 100 iterations in the text), the value of
d depends on the number of parameters of the bimodal wave spectrum, and
and
are the velocity and position of particle
i in the
t-th iteration, respectively.
ω is the inertia weight. (In this paper, the initial range of
ω is set to be from 0.4 to 0.9. As the number of iterations increases, the value of
ω will change dynamically through the adaptive parameter adjustment module during each iteration.)
c1 and
c2 are learning factors. (In this paper, the initial range of
c1 and
c2 is set to be from 0.5 to 2.5. As the number of iterations increases, the values of
c1 and
c2 are also dynamically adjusted through the adaptive parameter adjustment module during each iteration).
γ1 and
γ2 are random numbers.
is the overall average value of the particle swarm, and
is the historical optimal position of the swarm.