netsse.analys.sawb#
Python implementation of various algorithms for sea state estimation using the wave-buoy analogy (WBA), i.e. using the wave-induced responses of ships considered as sailing wave buoys (SAWB).
Copyright (C) 2023-2026 Technical University of Denmark, R.E.G. Mounet
This code is part of the NetSSE software.
NetSSE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
NetSSE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
To credit the author, users are encouraged to use below reference:
Mounet, R. E. G., & Nielsen, U. D. NetSSE: An open-source Python package
for network-based sea state estimation from ships, buoys, and other
observation platforms (version 2.2). Technical University of Denmark,
GitLab. February 2026. https://doi.org/10.11583/DTU.26379811.
Last updated on 20-02-2026 by R.E.G. Mounet
Functions#
|
Computes an estimate of the point wave spectrum using a generalised version of the |
|
Computes an estimate of the sea state using the spectral-residual method |
Module Contents#
- netsse.analys.sawb.genspecres(Rxy, Hxy, freq, beta, opt=None)[source]#
Computes an estimate of the point wave spectrum using a generalised version of the spectral-residual method from Brodtkorb et al. (2017) and Nielsen et al. (2018).
The cross-spectra from any number of responses are used as input. Using the motion transfer functions of the vessel, the wave spectrum is estimated through iteration.
Warning
Long-crested wave conditions are assumed in this sea state estimation method. The present version of the algorithm does not allow to distinguish waves coming from port and starboard sides.
- Parameters:
Rxy (array_like of shape (Nresp,Nfreq)) â
The response cross-spectra.
Note
The phase of the complex-valued response spectra is not important in this implementation, and the amplitude (absolute value) alone can be provided without this affecting the estimation results.
Hxy (array_like of shape (Nresp,Nbeta,Nfreq)) â
The RAO products for the ship, provided in the same order of response pairs as for the response cross-spectra Rxy.
Note
The phase of the complex-valued transfer functions is not important in this implementation, and the amplitude alone can be provided without this affecting the estimation results.
freq (array_like of shape (Nfreq,)) â The frequencies of the response spectra and the transfer functions (should match).
beta (array_like of shape (Nbeta,)) â
The discretized heading angles [deg] at which the transfer functions are known.
Tip
For a port-starboard symmetric ship, directions from 0 deg to 180 deg only can be considered to lower the computational cost.
opt (dict, optional) â
Optional parameters controlling the SSE calculation. Available options are:
- âmaxiterâint, or array_like of shape (Nresp,)
Maximum number of iterations (default: 50).
- âtolCoefâfloat, or array_like of shape (Nresp,)
Tolerance coefficient (default: 0.1).
- âgainFactâfloat, or array_like of shape (Nresp,)
Gain factor, as a fraction of the maximum gain value (default: 0.5).
- âweightsâfloat, or array_like of shape (Nresp,)
Weights given to each response in the calculation of the final spectrum estimate (default: equal weight for each response, i.e. wij = 1/Nresp).
Note
array_like entries of the dictionary can be input for a response-specific option. In such case, the array elements must be provided in the same order as for the response spectra.
- Returns:
S_wave (array_like of shape (Nfreq,)) â The estimated 1-D wave spectrum.
beta_est (float) â The estimated relative wave heading [degrees].
num_it (array_like of shape (Nresp,)) â The average number of iterations used per heading angle, for the individual response pairs.
References
Brodtkorb, A. H., Nielsen, U. D., & Sørensen, A. J. (2018). Online wave estimation using vessel motion measurements. IFAC-PapersOnLine, 51(29), 244â249. https://doi.org/10.1016/j.ifacol.2018.09.510
Brodtkorb, A. H., Nielsen, U. D., & Sørensen, A. J. (2018). Sea state estimation using vessel response in dynamic positioning. Applied Ocean Research, 70, 76â86. https://doi.org/10.1016/j.apor.2017.09.005
Nielsen, U. D., Brodtkorb, A. H., & Sørensen, A. J. (2018). A brute-force spectral approach for wave estimation using measured vessel motions. Marine Structures, 60, 101â121. https://doi.org/10.1016/j.marstruc.2018.03.011
Brodtkorb, A. H., & Nielsen, U. D. (2023). Automatic sea state estimation with online trust measure based on ship response measurements. Control Engineering Practice, 130. https://doi.org/10.1016/j.conengprac.2022.105375
Example
>>> S_wave, beta_est, num_it = genspecres(Rxy, Hxy, freq, beta, opt=None)
- netsse.analys.sawb.specres(Rxy, TRF, freq, beta, opt=None)[source]#
Computes an estimate of the sea state using the spectral-residual method from Brodtkorb et al. (2017) and Nielsen et al. (2018).
The heave, roll, and pitch response cross-spectra are used as input. Using the motion transfer functions of the vessel, the wave spectrum is estimated through iteration.
Warning
Long-crested wave conditions are assumed in this sea state estimation method.
Note
This Python code is based on a MATLAB/Simulink implementation by Astrid H. Brodtkorb.
- Parameters:
Rxy (array_like of shape (Nfreq,6)) â The complex-valued response spectra, given as in:
Rxy = [heaveheave, rollroll, pitchpitch, heaveroll, heavepitch, rollpitch].TRF (array_like of shape (Nfreq,3*Nbeta)) â
The transfer functions of the ship, in heave, roll, and pitch, concatenated along the second axis as in:
TRF = [heave_TF,roll_TF,pitch_TF]Note
The phase of the complex transfer functions is not important in this implementation, and the amplitude alone can be provided without this affecting the estimation results.
freq (array_like of shape (Nfreq,)) â The frequencies of the response spectra and the transfer functions (should match).
beta (array_like of shape (Nbeta,)) â
The discretized heading angles [deg] at which the transfer functions are known.
Tip
For a port-starboard symmetric ship, directions from 0 deg to 180 deg only can be considered to lower the computational cost.
opt (dict, optional) â
Optional parameters controlling the SSE calculation. Available options are:
- âmaxiterâint, or array_like of shape (6,)
Maximum number of iterations (default: 50).
- âtolCoefâfloat, or array_like of shape (6,)
Tolerance coefficient (default: 0.1).
- âgainFactâfloat, or array_like of shape (6,)
Gain factor, as a fraction of the maximum gain value (default: 0.5).
- âweightsâfloat, or array_like of shape (6,)
Weights given to each response in the calculation of the final spectrum estimate (default: equal weight for each response, i.e. wij = 1/6).
Note
array_like entries of the dictionary can be input for a response-specific option. In such case, the array elements must be provided in the same order as for the response spectra.
- Returns:
S_wave (array_like of shape (Nfreq,)) â The estimated 1-D wave spectrum.
beta_est (float) â The estimated relative wave heading [degrees].
num_it (array_like of shape (6,)) â The average number of iterations used per heading angle, for the individual response pairs organised as:
num_it = [it3, it4, it5, it34, it35, it45].
References
Brodtkorb, A. H., Nielsen, U. D., & Sørensen, A. J. (2018). Online wave estimation using vessel motion measurements. IFAC-PapersOnLine, 51(29), 244â249. https://doi.org/10.1016/j.ifacol.2018.09.510
Brodtkorb, A. H., Nielsen, U. D., & Sørensen, A. J. (2018). Sea state estimation using vessel response in dynamic positioning. Applied Ocean Research, 70, 76â86. https://doi.org/10.1016/j.apor.2017.09.005
Nielsen, U. D., Brodtkorb, A. H., & Sørensen, A. J. (2018). A brute-force spectral approach for wave estimation using measured vessel motions. Marine Structures, 60, 101â121. https://doi.org/10.1016/j.marstruc.2018.03.011
Brodtkorb, A. H., & Nielsen, U. D. (2023). Automatic sea state estimation with online trust measure based on ship response measurements. Control Engineering Practice, 130. https://doi.org/10.1016/j.conengprac.2022.105375
Example
>>> S_wave, beta_est, num_it = specres(Rxy, TRF, freq, beta, opt=None)