Page updated: March 22, 2021
Author: Curtis Mobley
View PDF

Autocovariance Functions: Numerical Example

This page gives a numerical example of the Wiener-Khinchin theorem, which leads into the details of how to sample autocovariance functions so that the resulting variance spectra meet the needs for surface generation.

The blue curve of Panel (a) in Fig. 1 plots the one-sided Pierson-Moskowitz spectrum (Eq. 2 of the Wave Variance Spectra: Examples page) for wind speed of U10 = 5ms1. Using this spectrum, surfaces are generated at N = 1024 points over a region of length L = 100m. Note that N is a power of 2 as required for the use of the fast Fourier transform algorithm. The spacing of these points is at intervals of Δx = LN = 0.0944m. The red dot at ν1 = 1L = 0.011m is the fundamental frequency. The point at νN2 = 1(2Δx) = 5.121m is the Nyquist spatial frequency. The green vertical ticks show the locations of the remaining N 2 points, which are evenly spaced at intervals of Δν = 0.011m.


PIC

Figure 1: Illustration of the Wiener-Khinchin theorem for a single realization of a random sea surface.

These discrete samples of the variance spectrum are then used as described on the Spectra to Surfaces: 1D page to create a random realization of the sea surface z(r) at N points. One such surface, generated for a particular sequence of random variables, is shown in Fig. 1(c). The periodogram of this surface, computed via Eqs. (2) and (3) of the Surfaces to Spectra: 1D page and Eq. (4) of the Spectra to Surfaces: 1D page, is shown in red in Fig. 1(b). The blue curve in this panel is the one-sided spectrum 𝒮1s(ν) of Panel (a), replotted for reference. The statistical noise in the periodogram is Gaussian distributed about the theoretical 𝒮1s(ν). These three panels of the figure are the essentially the same as the figure on the Spectra to Surfaces: 1D page; the only difference is that the sequence of random numbers used to generate the surface is different and linear axes are used for the upper-right panel.

Equation (3) of Autocovariance Functions: Theory page applied to the z(r) of Panel (c) gives the autocovariance shown in red in Panel (d). This curve contains statistical noise. To obtain a theoretical curve for comparison, the Pierson-Moskowitz spectrum was sampled at 2048 points to insure coverage of most of the spectrum. The discrete Wiener-Khinchin theorem (Eq. 10 of the Autocovariance Functions: Theory page) was then used to obtain the autocovariance from the discretely sampled spectrum:

Czz(r) = 𝔇ν1{𝒮 2s(u)} = 𝔇ν1{𝒮 2s(ν = νu)Δν}. (1)

Here the DFT was computed via Eq. (8) of the Fourier Transforms page. Note that the discrete spectrum 𝒮2s(u) was obtained by sampling the continuous spectral density at the desired ν values and then multiplying by the appropriate bandwidth. Because 𝒮2s(u) is a real and even function of νu, its Fourier transform is also real and even. The result is shown as the green curve in this Panel (d). Equation (5) of the Spectra to Surfaces: 1D page gives the total variance of z2 = 0.0197m2 for U10 = 5ms1. The numerical result obtained by sampling 𝒮2s(ν) and taking the inverse Fourier transform as just described gives Czz(0) = z2 = 0.0178m2.

Latta and Bailie (1968) analytically computed the autocorrelation of the Pierson-Moskowitz spectrum in temporal form, but the result is a formula of horrible complexity consisting of the sum of five slowly converging infinite series, the terms of which are themselves are products of infinite series. That paper plots the numerically evaluated result in terms of an unspecified but normalized temporal lag, which makes comparison with the present results for spatial lag quantitatively impossible. However, de Boer (1969) obtained the spatial covariance of the Pierson-Moskowitz spectrum in the form of integrals of Bessel functions, which also require careful numerical evaluation. Figure 2 shows their result for the autocovariance function of waves in the down-wind direction. Their plot is in terms of a nondimensional normalized lag distance ξN = (2gU2). The green curve of Fig. 1(d) has a minimum of 0.0063m2 at = ±7.96m. This translates to an autocorrelation of -0.31 at a normalized lag of ξN = 6.3. These value are in reasonable agreement with the minimum seen in Fig. 2, keeping in mind that the curves in that figure were themselves generated on a 1960’s era computer by difficult numerical integrations of unknown accuracy. The agreements for the variance and the location and magnitude of the minimum indicate that the numerically computed CzzPM() is probably correct for all lags. (This numerical calculation will be verified again with greater accuracy in the discussion of the Horoshenkov spectra below, for which the exact autocovariance is known.)


PIC

Figure 2: Fig. 7 from de Boer (1969): “Spatial correlation Function of Wind-Generated Ocean Surface Waves in the Down-Wind Direction.” The normalized lag distance is ξN = (2gU2).

Taking the DFT of the green curve in Fig. 1(d) should give the two-sided spectrum 𝒮2s(ν) corresponding to the one-sided spectrum plotted in Panel (a). The green curve in Panel (e) of that figure shows the result (after dividing by the finite bandwidth, as mentioned previously), which is indeed one-half of the one-sided spectrum 𝒮1s(ν) (shown in blue). This provides a check on the correctness of a round-trip Fourier transform.

Taking the DFT of the red curve in Panel (d) gives a sample estimate of 𝒮2s(ν), which is shown in red in Panel (e). This curve has statistical noise, but it visually appears to be distributed about the theoretical value given by the green curve.

The statistical noise inherent in any single random realization of the sea surface and its autocovariance can be reduced by averaging the results from many surface realizations. Figure 3 is the same as Fig. 1, except that Nsurf = 100 independent surfaces are generated. This reduces the statistical noise by a factor of 1100. The red curve in Panel (b) shows the ensemble average periodogram for the 100 surfaces. It is clear that the average periodogram is in excellent agreement with the theoretical variance spectrum, except for a small amount of remaining statistical noise.

The red curve of Panel (d) is the average autocovariance for the 100 surfaces. This curve is much closer to the theoretical (green) curve than the autocovariance for the single surface of Fig. 1(d). The DFT of this average autocovariance is shown by the red curve in Panel (e). Again, this curve has much less noise and is closer to the (green) theoretical spectrum.

The statistical noise in the ensemble averages can be made arbitrarily small by averaging more and more surfaces. Figure 4 shows that averages for 1,000 surfaces have noise levels in the periodogram, autocovariance, and spectrum derived from the autocovariance, that are almost unnoticeable at the scale of the figures.


PIC

Figure 3: Same as Fig. 1, but for 100 surface realizations. The red curve in Panel (d) is the average of the autocovariances of the 100 surfaces. The red curve in Panel (e) is the Fourier transform of the 100-surface average of Panel (d). Only the first surface is plotted in Panel (c).


PIC

Figure 4: Same as Fig. 1, but for 1000 surface realizations. The red curve in Panel (d) is the average of the autocovariances of the 1000 surfaces. The red curve in Panel (e) is the Fourier transform of the 1000-surface average of Panel (d). Only the first surface is plotted in Panel (c).

Comments for Autocovariance Functions: Numerical Example:

Loading Conversation