Wave spectrum estimation method and apparatus based on dynamic dispersion factor
By modeling and predicting the dynamic dispersion factor using complex-valued Transformer networks, the problem of spectral shift in the transition zone between deep and shallow water is solved by traditional methods. This achieves higher accuracy in wave spectrum estimation and parameter stability, making it suitable for complex aquatic environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-03-10
AI Technical Summary
Traditional wave spectrum estimation methods cannot respond in real time to the dynamic relationship between water depth and frequency in the transition zone between deep and shallow water, resulting in increased errors in spectrum shift and wave height estimation, especially in complex water environments such as nearshore and shoal areas where they are not adaptable enough.
Complex-valued Transformer networks are used to model and predict dynamic dispersion factors. Multi-head self-attention mechanism is used to learn the correlation between complex frequencies, wavenumbers and depth, and wavenumber correction is performed to improve the accuracy of spectrum estimation.
It improves the accuracy and stability of wave spectrum estimation, adapts to complex water environments, optimizes the calculation accuracy of wave height spectrum, significant wave height and dominant frequency period, and solves the error amplification problem of traditional piecewise dispersion formula under dynamic water depth conditions.
Smart Images

Figure CN121346753B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of hydrological measurement, and in particular to a wave spectrum estimation method and apparatus based on dynamic dispersion factor. Background Technology
[0002] Acoustic Doppler profilers (ADCPs), as core equipment for measuring ocean, lake, and nearshore current and wave parameters, have been widely used in hydrological surveying and ocean observation. Wave parameter estimation usually relies on frequency domain analysis of vertical velocity time series, and wave characteristics are quantified by deriving wave height spectrum and related parameters. However, traditional wave spectrum inversion methods are generally based on segmented processing at different water depths. One formula is used to calculate dispersion in deep water, while another formula is used to calculate dispersion in shallow water. This segmented processing method is difficult to adapt to the actual complex water environment.
[0003] However, in nearshore, sandbar, and shoal areas where water depth transitions to shallow water, the dynamic changes in water depth and the irregularities in seabed topography cause significant variations in wave number during wave propagation, and the nonlinear dispersion effect becomes more pronounced. Traditional methods using fixed dispersion relations to calculate wave number cannot respond in real time to the dynamic relationship between water depth and frequency, leading to problems such as spectral shift and increased wave height estimation errors. Since ADCP measurement data needs to be analyzed in the frequency domain (such as FFT) to obtain wave frequency and then invert wave number, the limitations of fixed formulas further amplify the errors caused by changes in wave group velocity and phase velocity with water depth and wavelength in actual sea conditions. Therefore, there is an urgent need for a dispersion relation correction algorithm that can adapt to different water depth conditions to improve the accuracy and scene adaptability of wave spectrum estimation. Summary of the Invention
[0004] This application provides a wave spectrum estimation method and apparatus based on dynamic dispersion factor. By using complex-valued Transformer network modeling to predict dynamic dispersion factor, the accuracy of spectrum estimation and stability of wave parameters are improved under varying water depth conditions, providing better technical support for wave observation in complex waters such as nearshore and shoals.
[0005] In a first aspect, embodiments of this application provide a wave spectrum estimation method based on a dynamic dispersion factor, the method comprising:
[0006] A continuous-time ADCP velocity sequence is obtained, a vertical velocity power spectrum is obtained based on the ADCP velocity sequence, a complex-valued frequency at different frequency points is obtained based on the vertical velocity power spectrum, and then the wave number and depth corresponding to each frequency point are obtained, and the wave number and depth are processed into complex values.
[0007] Using the complex-valued frequency, wavenumber, and depth corresponding to the same frequency point as a set of input vectors, multiple sets of input vectors are input into a pre-trained dynamic dispersion factor prediction model in a batch input manner. The dynamic dispersion factor prediction model learns the correlation between the complex frequency, wavenumber, and depth in each set of input vectors based on a multi-head self-attention mechanism to obtain the dynamic dispersion factor.
[0008] The wavenumber at each frequency point is corrected using the dynamic dispersion factor to obtain the corrected wavenumber. The wave spectrum of the ADCP velocity sequence is obtained based on the corrected wavenumber. The wave spectrum includes the wave height spectrum, the effective wave height, and the dominant frequency period.
[0009] Secondly, embodiments of this application provide a wave spectrum estimation device based on a dynamic dispersion factor, comprising:
[0010] The acquisition module is used to acquire a continuous-time ADCP velocity sequence, acquire a vertical velocity power spectrum based on the ADCP velocity sequence, acquire complex-valued frequencies at different frequency points based on the vertical velocity power spectrum, acquire the wave number and depth corresponding to each frequency point, and perform complex-valued processing on the wave number and depth.
[0011] The prediction module uses the complex-valued frequency, wavenumber, and depth corresponding to the same frequency point as a set of input vectors, and inputs multiple sets of input vectors into the pre-trained dynamic dispersion factor prediction model in a batch input manner. The dynamic dispersion factor prediction model learns the correlation between the complex frequency, wavenumber, and depth in each set of input vectors based on a multi-head self-attention mechanism to obtain the dynamic dispersion factor.
[0012] The estimation module uses the dynamic dispersion factor to correct the wavenumber at each frequency point to obtain the corrected wavenumber, and obtains the wave spectrum of the ADCP velocity sequence based on the corrected wavenumber. The wave spectrum includes the wave height spectrum, the effective wave height, and the dominant frequency period.
[0013] Thirdly, embodiments of this application provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform a wave spectrum estimation method based on a dynamic dispersion factor.
[0014] Fourthly, embodiments of this application provide a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including a wave spectrum estimation method based on a dynamic dispersion factor.
[0015] The main contributions and innovations of this invention are as follows:
[0016] This scheme employs refined preprocessing of the ADCP velocity sequence, including mean removal, bandpass filtering, and window function weighting, to effectively remove interference signals and reduce spectral leakage, laying a precise data foundation for subsequent analysis. By utilizing complex-valued Transformer models with complex-domain parameter modeling, this scheme fully preserves the amplitude and phase correlation of wave signals, overcoming the information fragmentation limitations of traditional real-valued models and improving the completeness of dispersion relationship characterization. Furthermore, this scheme deeply mines the dynamic correlation between complex-valued frequency, wave number, and depth through a multi-head self-attention mechanism, accurately capturing the nonlinear dispersion effect in the transition zone between shallow and deep water, enhancing adaptability to complex aquatic environments. Finally, this scheme uses a dynamic dispersion factor to adaptively correct the wave number, optimizing the calculation accuracy of wave height spectrum, significant wave height, and dominant frequency period, solving the error amplification problem of traditional piecewise dispersion formulas under dynamic water depth conditions.
[0017] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0019] Figure 1 This is a flowchart of a wave spectrum estimation method based on dynamic dispersion factor according to an embodiment of this application;
[0020] Figure 2 This is a structural block diagram of a wave spectrum estimation device based on dynamic dispersion factor according to an embodiment of this application;
[0021] Figure 3 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0022] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0023] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0024] Example 1
[0025] This application provides a wave spectrum estimation method based on dynamic dispersion factor. It uses complex-valued Transformer network modeling to predict the dynamic dispersion factor, thereby improving the accuracy of spectrum estimation and the stability of wave parameters under varying water depth conditions. This provides better technical support for wave observation in complex waters such as nearshore and shallow waters. Specifically, refer to... Figure 1 The method includes:
[0026] A continuous-time ADCP velocity sequence is obtained, a vertical velocity power spectrum is obtained based on the ADCP velocity sequence, a complex-valued frequency at different frequency points is obtained based on the vertical velocity power spectrum, and then the wave number and depth corresponding to each frequency point are obtained, and the wave number and depth are processed into complex values.
[0027] Using the complex-valued frequency, wavenumber, and depth corresponding to the same frequency point as a set of input vectors, multiple sets of input vectors are input into a pre-trained dynamic dispersion factor prediction model in a batch input manner. The dynamic dispersion factor prediction model learns the correlation between the complex frequency, wavenumber, and depth in each set of input vectors based on a multi-head self-attention mechanism to obtain the dynamic dispersion factor.
[0028] The wavenumber at each frequency point is corrected using the dynamic dispersion factor to obtain the corrected wavenumber. The wave spectrum of the ADCP velocity sequence is obtained based on the corrected wavenumber. The wave spectrum includes the wave height spectrum, the effective wave height, and the dominant frequency period.
[0029] In some embodiments, a continuous-time ADCP velocity sequence is acquired from an acoustic Doppler profiler (ADCP). In acquiring the ADCP velocity sequence, a continuous vertical velocity time sequence is acquired from the upward beam as the ADCP velocity sequence. The sampling frequency during the acquisition process is not less than 1 Hz, and the sampling time is not less than 10 minutes.
[0030] In some embodiments, the ADCP velocity sequence is preprocessed, and then the vertical velocity power spectrum is obtained based on the preprocessed ADCP velocity sequence. The preprocessing includes: mean removal operation, bandpass filtering operation, and window function weighting operation.
[0031] Furthermore, the purpose of the mean removal operation in this scheme is to remove the DC component (average current) from the ADCP velocity sequence, while retaining the oscillating part of the wave. Let... To obtain the ADCP velocity sequence, the mean value in the ADCP velocity sequence is obtained. The mean-removal operation is represented by the following formula:
[0032]
[0033] in, This is the ADCP velocity sequence after the mean removal operation.
[0034] Furthermore, since the wave signal velocity oscillates around zero, the acoustic Doppler profiler will simultaneously measure low-frequency components such as tidal current and residual current when acquiring acoustic signals. These low-frequency components will affect the spectrum analysis. Therefore, this scheme uses bandpass filtering to retain the signal within the wave frequency range and filter out low-frequency (tidal current, etc.) and high-frequency (noise) components.
[0035] Specifically, in the bandpass filtering process, the ADCP velocity sequence after the mean removal operation is first subjected to a discrete Fourier transform, expressed by the following formula:
[0036]
[0037] in, It is the Fourier transform result, which is the complex value representation of the k-th frequency point of the ADCP velocity sequence after the mean removal operation. It contains amplitude and phase information, and N is the total number of samples.
[0038] Specifically, let the sampling frequency be... Low cutoff frequency High cutoff frequency filter order Construct the frequency domain mask using the following formula:
[0039]
[0040] in, For the center frequency, For bandwidth, Each frequency component in the corresponding spectrum , This is an intermediate value of the frequency domain mask, because in actual calculations, the frequency domain mask... Therefore, by The frequency domain mask can be obtained.
[0041] Then based on the obtained frequency domain mask Fourier transform results Processing is performed to obtain intermediate quantities. Then... The filtered result is obtained by performing an inverse Fourier transform, expressed by the following formula:
[0042]
[0043] in, This is the filtered result after the inverse Fourier transform. For time-domain signals, k is the frequency point, and N is the total number of samples. This is an intermediate quantity.
[0044] Specifically, since the typical wave period is 2~25s, corresponding to a frequency range of approximately 0.04-0.5Hz, this scheme uses bandpass filtering to retain time-domain signals with a frequency range of 0.04-0.5Hz.
[0045] Furthermore, the purpose of window function weighting in this scheme is to reduce sidelobe leakage in the Fourier transform, thereby improving spectral resolution. In this scheme, since the Hanning window has low spectral leakage, it is used to perform window function weighting on the filtering results. The formula for the window function is as follows:
[0046]
[0047] Where N is the number of samples and n is the number of samples.
[0048] Specifically, the formula for weighting the filtering results using a window function is expressed as follows:
[0049]
[0050] in, This is the result after weighting by the window function, i.e., the preprocessed result after preprocessing the ADCP velocity sequence. For window functions, This is the filtering result.
[0051] In some embodiments, the ADCP velocity sequence is segmented, with each segment corresponding to a frequency point, and the vertical velocity power spectrum at each frequency point is calculated using the following formula:
[0052]
[0053] in, Let L represent the vertical velocity power spectrum at the k-th frequency point, where L is the total number of segments, l is the segment index, and FFT represents the Fourier transform. Let l be the ADCP velocity sequence of the l-th segment, and U be the window energy correction factor.
[0054] Specifically, , The number of samples per segment is used to correct the power attenuation caused by the window function.
[0055] Furthermore, the complex frequency of each frequency point is obtained based on the vertical velocity power spectrum. Since the vertical velocity power spectrum is obtained through Fourier transform, it is in complex form, and the complex frequency obtained from the vertical velocity power spectrum is also in complex form.
[0056] In other words, this scheme uses FFT to process the vertical power spectrum to obtain the complex frequency of each frequency point.
[0057] In some specific embodiments, the depth corresponding to each frequency point is directly obtained from the ADCP velocity sequence, and the wavenumber of each frequency point is obtained based on the dispersion relationship between the complex-valued frequency and the wavenumber at different frequencies. In wave propagation theory, the dispersion relationship describes the wavenumber. The relationship between the complex-valued frequency ω and the wavenumber dispersion when the water depth is greater than or equal to the threshold λ is as follows:
[0058]
[0059] Where g is the gravitational acceleration constant, and ω is the complex frequency. For wave number.
[0060] When the water depth is less than the threshold λ, the dispersion relationship between the complex frequency and the wavenumber is as follows:
[0061]
[0062] Where g is the gravitational acceleration constant, and ω is the complex frequency. For wave number, For depth.
[0063] Furthermore, wavenumbers are represented by complex linear mapping. And the depth h is complexified, expanding the real-valued input to... ,in This represents the wave number or water depth. Subsequently, a complex weight matrix is constructed. ,in For trainable parameters, the complex embedding result is defined as follows: This mapping can automatically learn the nonlinear relationship between wavenumber, water depth, and complex frequency, and during training, the parameters... Joint optimization is performed through error backpropagation. This method allows for the optimization of real-valued inputs. The complex-valued vector form is converted to maintain consistency with the complex frequency features obtained by the Fourier transform, thereby ensuring that the complex-valued Transformer model performs a unified feature representation and modeling in the complex domain.
[0064] (1) Specifically, the definition of a complex-valued linear mapping is as follows:
[0065] For input scalar Construct the extended vector
[0066]
[0067] Here, an additional constant 1 is added as a bias input.
[0068] Define the complex weight matrix:
[0069]
[0070] Therefore, the result of complex embedding is:
[0071]
[0072] here Represents the complex field.
[0073] (2) Decompose into real part / imaginary part
[0074] In implementation, complex numbers are typically decomposed into real and imaginary parts:
[0075]
[0076] here This indicates the operation of taking the real part. This indicates the operation of taking the imaginary part.
[0077] (3) Wavenumber : Obtain complex embedding .
[0078] water depth : Obtain complex embedding .
[0079] Will and (Complex frequencies obtained from FFT) spliced together:
[0080]
[0081] Then, it is projected onto the input dimension of the Transformer through a layer of complex-valued linear mapping. .
[0082] Specifically, wavenumber and depth The advantages of performing complexification are:
[0083] 1) Unified form - All input features are in the complex domain, which facilitates isomorphic processing in complex value attention and complex value feedforward layers.
[0084] (2) Parameters are learnable - The mapping matrix parameters are completely optimized by training and can automatically adapt to different water depths and wave number ranges.
[0085] (3) Strong expressive power - The complex linear layer can learn the coupling relationship between amplitude and phase, which helps to model the phase delay effect in dispersion relation.
[0086] In some specific embodiments, the dispersion relationship between complex-valued frequency and wavenumber is segmented based on different water depths. That is, the dispersion relationship is different when the water depth is greater than or equal to the threshold λ and when the water depth is less than the threshold λ. However, in reality, the water depth is often smoothly transitioned. Therefore, if the above formula is applied in the "deep-shallow water transition zone", the accuracy will be affected. Therefore, this solution uses a preset dynamic dispersion factor prediction model to predict a dynamic dispersion factor and uses the dynamic dispersion factor to correct the dispersion relationship, thereby more accurately describing the dispersion relationship between complex-valued frequency and wavenumber.
[0087] Specifically, the dynamic dispersion factor in this scheme is a correction function used to correct the relationship between complex-valued frequency and wavenumber.
[0088] In some embodiments, before performing the multi-head self-attention mechanism, an input embedding layer is constructed, in which the normalized wavenumber and depth are positionally encoded in a sine-cosine position encoding manner.
[0089] Specifically, the formula for sine-cosine position coding is expressed as follows:
[0090]
[0091] Where p is the normalized wavenumber and depth, i is the coding dimension index, d is the coding dimension, and PE is the position coding value. That is, when the coding dimension is even, sine coding is used, and when the coding dimension is odd, cosine coding is used.
[0092] In some embodiments, a complex-valued Transformer model is used as the dynamic dispersion factor prediction model, wherein all trainable parameters in the dynamic dispersion factor prediction model are in complex-valued form, that is, each set of input vectors is also in complex-valued form.
[0093] Furthermore, in each attention head of the multi-head self-attention mechanism, complex-valued weights are constructed to perform a linear transformation on the input vector to obtain complex-valued representations of the query vector, key vector, and value vector. Then, attention is calculated based on the query vector, key vector, and value vector to obtain the attention result, expressed by the formula:
[0094]
[0095] in, Let i be the relevance between the i-th query vector and the j-th key vector. For the i-th query vector, Let be the conjugate transpose of the j-th key vector. For the dimension of attention head, Used to extract the real part of a complex number. To The normalization result, For attention results, This is the j-th value.
[0096] Specifically, the formula for using complex-valued weights to perform a linear transformation on the input vector is expressed as follows:
[0097]
[0098] in, Let be the real part of the complex-valued weight. For the imaginary part of the complex-valued weights, Let be the real part of the input vector. Let be the imaginary part of the input vector. The real part of the complex-valued bias. For the imaginary part of the complex-valued bias, Let be the real part of the linear transformation result. This represents the imaginary part of the linear transformation result.
[0099] Then, the results of the linear transformation are processed using the pre-defined query matrix, key matrix, and value matrix to obtain the query vector, key vector, and value vector.
[0100] In some specific embodiments, the attention results of each attention head in the multi-head self-attention mechanism are integrated, and after residual connections, LayerNorm layers, and feedforward networks are applied, the encoder output is obtained. The feedforward network uses the modReLU activation function for output, and the formula for the modReLU activation function is as follows:
[0101]
[0102] in, As input to the activation function, For the modulus of z, , For the real part, is the imaginary part, and b is the learnable bias.
[0103] Specifically, the residual connections, LayerNorm layers, and feedforward networks are all standard results in Transformer. In this scheme, the parameters in the residual connections, LayerNorm layers, and feedforward networks are all in complex-valued form. Specifically, since the intermediate layers of the model involve complex-valued features, the modReLU activation function is used after the feedforward network to nonlinearly adjust the amplitude while preserving the phase information.
[0104] Specifically, the dynamic dispersion factor is obtained by using the output head to output the encoder's output. The dynamic dispersion factor is also in complex form, and its real part is... The imaginary part is .
[0105] Specifically, the dynamic dispersion factor prediction model explicitly retains complex domain information and effectively expresses the complex spectrum variation law of waves in the transition area between deep and shallow water by learning the real and imaginary parts of the frequency response in parallel. It achieves adaptive correction of the traditional shallow water dispersion factor and is superior to the real value model in terms of energy spectrum main frequency identification accuracy and spectrum stability. It is especially suitable for modeling scenarios of complex frequency data obtained by current measuring instruments such as ADCP.
[0106] Specifically, the input signal of the dynamic dispersion factor prediction model originates from the velocity sequence collected by an underwater Doppler current meter (ADCP). After frequency domain transformation, it takes the form of a complex number, containing both amplitude and phase information. Phase characteristics play an important role in wavenumber inversion, dispersion relation correction, and wave propagation direction identification. If a traditional real-valued deep learning model is used, the complex signal needs to be decomposed into real and imaginary parts for independent modeling, which disrupts the inherent coupling relationship between amplitude and phase, leading to a decrease in the estimation accuracy of the dispersion factor.
[0107] Specifically, in the multi-head self-attention calculation, the attention weight is calculated using the complex conjugate inner product, and complex-valued parameters are used in both the multi-head attention and feedforward networks to achieve synchronous modeling and learning of amplitude and phase information. Compared with the traditional transformer, this scheme performs linear and nonlinear operations directly in the complex domain, which can completely preserve the physical relationship between amplitude and phase. Moreover, the complex-valued operation is consistent with the frequency domain representation of wave signals, avoiding the information loss caused by real-valued encoding / decoding. The phase shift of wave signals corresponds to phase rotation in the complex plane, and the complex-valued network can naturally adapt to this change, thereby improving the generalization performance under different propagation direction conditions. It can also effectively suppress the interference of phase noise and improve the stability of the dispersion correction factor.
[0108] In some specific embodiments, the loss function of the dynamic dispersion factor prediction model is:
[0109]
[0110] in, This represents the total loss of the dynamic dispersion factor prediction model. For dynamic dispersion factor, For physical tags, MSE stands for Mean Squared Error. Here, is the complex frequency, and g is the acceleration due to gravity. For wave number, For a weight decay system, , , These are adjustable weighting coefficients.
[0111] Specifically, when calculating the physical tag, if k cannot be obtained directly, the linear dispersion inverse solution (in the form of tanh(kh)) is used as the initial value of k.
[0112] Specifically, the dynamic dispersion factor prediction model uses AdamW as the optimizer and sets the learning rate to 1e. 4~1e 3. The learning rate decays by 3% per round.
[0113] In some specific embodiments, the formula for correcting the wavenumber at each frequency point using the dynamic dispersion factor is expressed as follows:
[0114]
[0115] in, To correct the wavenumber, For complex-valued frequencies, is the dynamic dispersion factor, and g is the gravitational acceleration.
[0116] The wave height spectrum is obtained based on the corrected wave number and the vertical velocity power spectrum, and the formula is expressed as follows:
[0117]
[0118] in, For the wave high spectrum, The vertical velocity power spectrum, Let h be a hyperbolic sine function, and h be the depth. For frequency.
[0119] The formula for calculating the significant wave height is expressed as follows:
[0120]
[0121] in, Let be the effective wave height, and be the spectral energy zero matrix. For the wave high spectrum, d represents the frequency, and d represents the integral sign.
[0122] The formula for the peak period is expressed as:
[0123]
[0124] in, Peak frequency, This is the peak period.
[0125] Specifically, all complex value forms mentioned in this scheme are complex number representations, that is, the parameters are represented as complex numbers of z = a + ib.
[0126] Example 2
[0127] Based on the same concept, referencing Figure 2 This application also proposes a wave spectrum estimation device based on dynamic dispersion factor, comprising:
[0128] The acquisition module is used to acquire a continuous-time ADCP velocity sequence, acquire a vertical velocity power spectrum based on the ADCP velocity sequence, acquire complex-valued frequencies at different frequency points based on the vertical velocity power spectrum, acquire the wave number and depth corresponding to each frequency point, and perform complex-valued processing on the wave number and depth.
[0129] The prediction module uses the complex-valued frequency, wavenumber, and depth corresponding to the same frequency point as a set of input vectors, and inputs multiple sets of input vectors into the pre-trained dynamic dispersion factor prediction model in a batch input manner. The dynamic dispersion factor prediction model learns the correlation between the complex frequency, wavenumber, and depth in each set of input vectors based on a multi-head self-attention mechanism to obtain the dynamic dispersion factor.
[0130] The estimation module uses the dynamic dispersion factor to correct the wavenumber at each frequency point to obtain the corrected wavenumber, and obtains the wave spectrum of the ADCP velocity sequence based on the corrected wavenumber. The wave spectrum includes the wave height spectrum, the effective wave height, and the dominant frequency period.
[0131] Example 3
[0132] This embodiment also provides an electronic device, see reference. Figure 3 It includes a memory 404 and a processor 402, the memory 404 storing a computer program and the processor 402 being configured to run the computer program to perform the steps in any of the above method embodiments.
[0133] Specifically, the processor 402 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0134] Memory 404 may include a mass storage device for data or instructions. For example, and not limitingly, memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 404 may include removable or non-removable (or fixed) media. Where appropriate, memory 404 may be internal or external to a data processing device. In a particular embodiment, memory 404 is non-volatile memory. In a particular embodiment, memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0135] The memory 404 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.
[0136] The processor 402 reads and executes computer program instructions stored in the memory 404 to implement any of the wave spectrum estimation methods based on dynamic dispersion factors in the above embodiments.
[0137] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.
[0138] The transmission device 406 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 406 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0139] The input / output device 408 is used to input or output information. In this embodiment, the input information may be a continuous-time ADCP velocity sequence, etc., and the output information may be an iso-wavelength spectrum, significant wave height, and dominant frequency period, etc.
[0140] Optionally, in this embodiment, the processor 402 can be configured to perform the following steps via a computer program:
[0141] A continuous-time ADCP velocity sequence is obtained, a vertical velocity power spectrum is obtained based on the ADCP velocity sequence, a complex-valued frequency at different frequency points is obtained based on the vertical velocity power spectrum, and then the wave number and depth corresponding to each frequency point are obtained, and the wave number and depth are processed into complex values.
[0142] Using the complex-valued frequency, wavenumber, and depth corresponding to the same frequency point as a set of input vectors, multiple sets of input vectors are input into a pre-trained dynamic dispersion factor prediction model in a batch input manner. The dynamic dispersion factor prediction model learns the correlation between the complex frequency, wavenumber, and depth in each set of input vectors based on a multi-head self-attention mechanism to obtain the dynamic dispersion factor.
[0143] The wavenumber at each frequency point is corrected using the dynamic dispersion factor to obtain the corrected wavenumber. The wave spectrum of the ADCP velocity sequence is obtained based on the corrected wavenumber. The wave spectrum includes the wave height spectrum, the effective wave height, and the dominant frequency period.
[0144] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0145] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0146] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product may include one or more computer-executable components configured to perform the embodiments when the program is run. The one or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted in this respect that, as Figure 3 Any box in the logical flow can represent a program step, or interconnected logic circuits, boxes and functions, or a combination of program steps and logic circuits, boxes and functions. Software can be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.
[0147] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0148] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A wave spectrum estimation method based on dynamic dispersion factor, characterized in that, The method comprises the following steps: obtaining an ADCP velocity sequence of continuous time, obtaining a vertical velocity power spectrum based on the ADCP velocity sequence, obtaining a complex frequency of different frequency points based on the vertical velocity power spectrum, and then obtaining a wave number and a depth corresponding to each frequency point, and performing complex value processing on the wave number and the depth; using the complex frequency, the wave number and the depth corresponding to the same frequency point as a group of input vectors, inputting multiple groups of input vectors into a pre-trained dynamic dispersion factor prediction model in a batch input manner, the dynamic dispersion factor prediction model learning the correlation between the complex frequency, the wave number and the depth in each group of input vectors based on a multi-head self-attention mechanism to obtain a dynamic dispersion factor, wherein a complex value Transformer model is used as the dynamic dispersion factor prediction model, and all trainable parameters in the dynamic dispersion factor prediction model are in complex value form; correcting the wave number of each frequency point using the dynamic dispersion factor to obtain a corrected wave number, and obtaining a wave spectrum of the ADCP velocity sequence based on the corrected wave number, wherein the wave spectrum comprises a wave height spectrum, an effective wave height and a peak period, and the formula for correcting the wave number of each frequency point using the dynamic dispersion factor is as follows: wherein, is the modified wave number, is the complex frequency, is the dynamic dispersion factor, g is the acceleration of gravity; the formula for obtaining the wave height spectrum based on the corrected wave number and the vertical velocity power spectrum is as follows: wherein, is the wave height spectrum, is the vertical velocity power spectrum, is the hyperbolic sine function, h is the depth, is the frequency; the formula for calculating the effective wave height is as follows: ; the formula for calculating the peak period is as follows: wherein is the peak frequency, is the peak period.
2. The wave spectrum estimation method based on dynamic dispersion factor according to claim 1, characterized in that, preprocessing the ADCP velocity sequence, and then obtaining a vertical velocity power spectrum based on the preprocessed ADCP velocity sequence, wherein the preprocessing comprises mean removal operation, band-pass filtering operation and window function weighting operation.
3. The wave spectrum estimation method based on dynamic dispersion factor according to claim 1, characterized in that, segmenting the ADCP velocity sequence, each segment corresponding to a frequency point, and calculating the vertical velocity power spectrum of each frequency point by the following formula: wherein, represents the vertical velocity power spectrum at the kth frequency bin, L is the total number of segments, / is the segment index, FFT represents the Fourier transform, is the ADCP velocity sequence of the / th segment, U is the window energy correction factor.
4. The wave spectrum estimation method based on dynamic dispersion factor according to claim 1, characterized in that, directly obtaining the depth corresponding to each frequency point in the ADCP velocity sequence, and obtaining the wave number of each frequency point based on the dispersion relationship between the complex frequency and the wave number of different frequency points.
5. The wave spectrum estimation method based on dynamic dispersion factor according to claim 1, characterized in that, In each attention head of the multi-head self-attention mechanism, a complex weight is constructed to linearly transform the input vector to obtain a query vector, a key vector and a value vector in complex value representation, and then attention calculation is performed based on the query vector, the key vector and the value vector to obtain an attention result, and the formula is as follows: wherein, is a relevance of the i-th query vector to the j-th key vector, is the i-th query vector, is a conjugate transpose of the j-th key vector, is a dimension of the attention head, is used to take a real part of a complex number, is a normalization result of is a normalization result of is an attention result, is the j-th value.
6. A wave spectrum estimation apparatus based on dynamic dispersion factor, characterized by, The method comprises the following steps: an obtaining module, configured to obtain an ADCP velocity sequence of continuous time, obtain a vertical velocity power spectrum based on the ADCP velocity sequence, obtain a complex frequency of different frequency points based on the vertical velocity power spectrum, and then obtain a wave number and a depth corresponding to each frequency point, and perform complex value processing on the wave number and the depth; a prediction module, configured to use the complex frequency, the wave number and the depth corresponding to the same frequency point as a group of input vectors, input multiple groups of input vectors into a pre-trained dynamic dispersion factor prediction model in a batch input manner, and learn the correlation between the complex frequency, the wave number and the depth in each group of input vectors based on a multi-head self-attention mechanism to obtain a dynamic dispersion factor, wherein a complex value Transformer model is used as the dynamic dispersion factor prediction model, and all trainable parameters in the dynamic dispersion factor prediction model are in complex value form; An estimation module corrects the wave number of each frequency point using the dynamic dispersion factor to obtain a corrected wave number, and obtains a wave spectrum of the ADCP velocity sequence based on the corrected wave number, wherein the wave spectrum includes a wave height spectrum, an effective wave height, and a main frequency period. wherein, is the modified wave number, is the complex frequency, is the dynamic dispersion factor, g is the acceleration of gravity; The wave height spectrum is obtained based on the corrected wave number and the vertical velocity power spectrum, and is expressed as follows: wherein, is the wave height spectrum, is the vertical velocity power spectrum, is the hyperbolic sine function, h is the depth, is the frequency; The effective wave height is calculated according to the following formula: wherein is the effective wave height, and is the wave height spectrum, is the frequency, and d is the integral sign; The peak period is calculated according to the following formula: wherein is the peak frequency, is the peak period. 7.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to run the computer program to execute the wave spectrum estimation method based on the dynamic dispersion factor according to any one of claims 1-5.
8. A readable storage medium, characterized by, The readable storage medium stores a computer program, and the computer program includes program code for controlling a process to execute the process, and the process includes the wave spectrum estimation method based on the dynamic dispersion factor according to any one of claims 1-5.
Citation Information
Patent Citations
Unstable wave directional spectrum estimation method
CN120541409A
Water body motion state recognition method and device based on spectral moment characteristics and readable storage medium thereof
CN120561776A