Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Turbulence

This page describes the random gusts HPR Sim generates from the Dryden model, repeatable from a seed, and why no flight uses them.

In short

  • What it models: random gusts from the Dryden model. The gust pattern has a published spectrum (how gust strength spreads over wavelength). It is sized by height and the wind at 20 ft, and repeatable from a seed.
  • Sources: MIL-F-8785C, the US military flying-qualities specification (1980), noting where MIL-HDBK-1797 (1997) differs. Random numbers come from xoshiro256++ (Blackman and Vigna, 2021) and Marsaglia and Bray’s polar method (1964).
  • How well it is validated: analytic and unit tests only. Over 2²⁰ samples, each component’s spectrum is within 4 standard errors of theory in every octave band (±1–3% in the wide bands). Not compared with another simulator or a real flight.
  • What it leaves out: Dryden is an aircraft model, unvalidated for rockets (evidence row G12). Its frozen gust pattern needs airspeed well above the gusts, which fails on the rail and near apogee. No flight uses it, and none is planned (issue #39). Above 2,000 ft the caller supplies the intensity.

Code and sources

Code: hpr_atmos::dryden, using the seeded generator in hpr_core::random.

Sources:

  • [8785C] MIL-F-8785C, Military Specification: Flying Qualities of Piloted Airplanes (5 November 1980), §3.7 and the definitions in §6.2.7, pinned as mil-f-8785c.
  • [1797] MIL-HDBK-1797 (1997), Appendix A §4.9, for its differences only. It is not pinned: no stable public copy was found.
  • [BV] D. Blackman and S. Vigna, “Scrambled linear pseudorandom number generators”, ACM TOMS 47(4) (2021): xoshiro256++ with SplitMix64 seeding.
  • [MB] G. Marsaglia and T. A. Bray, “A convenient method for generating normal variables”, SIAM Review 6(3) (1964): the polar method.

The Dryden model

The Dryden spectra, the parameters that size them, and the generator that turns them into gusts.

Dryden spectra

Turbulence is a frozen random field that the vehicle moves through, so its spectra are functions of spatial frequency Ω (rad/m, [8785C] §6.2.7). They are one-sided, with ∫0∞ΦdΩ=σ2 ([8785C] §3.7.1.2), and Φw is like Φv:

Φu(Ω)=2Luπσu21+(LuΩ)2,Φv(Ω)=Lvπσv2(1+3(LvΩ)2)(1+(LvΩ)2)2,Ru(ξ)=σu2exp(−|ξ|/Lu),Rv(ξ)=σv2exp(−|ξ|/Lv)(1−|ξ|2Lv)

Each spectrum and autocorrelation is a Fourier pair,

Φ(Ω)=2π∫0∞R(ξ)cos(Ωξ)dξ,

and a test checks this numerically.

The factor-of-two trap. [1797] writes the transverse spectra with 2Lv and 12(LvΩ)2 over (1+4(LvΩ)2)2, and halves the lengths (Lu=2Lv). The spectra are identical, but mixing one document’s lengths with the other’s formula puts the transverse scales off by two. This code uses [8785C]’s form and lengths throughout.

Parameters

  • The low-altitude model is in [8785C] §3.7.3.4 and Figs. 10–11. With h the height above terrain in ft, the lengths in ft, u20 the mean wind at 20 ft, and k=0.177+0.000823h:

    Lu=Lv=hk1.2,Lw=h,σw=0.1u20,σu=σv=σwk0.4
    • The formulas hold from 10 to 1,000 ft. Below 10 ft this code uses the 10 ft values. From 1,000 to 2,000 ft the figures give L=1000ft and equal intensities.
    • The model covers only up to about 2,000 ft (§3.8.1), so above that the constructor returns an error instead of quietly holding values.
    • Fig. 9 marks u20 = 15, 30 and 45 kt for light, moderate and severe turbulence.
    • For aircraft at low altitude, u lies along the horizontal relative mean wind and w is vertical ([8785C] p. 60).
  • The medium/high-altitude model ([8785C] §3.7.2, above about 2,000 ft) is isotropic, with L=1750ft.

    • The intensity against altitude and exceedance probability is only a graph (Fig. 7), so the caller supplies it.
    • Neither military document says how to blend 1,000–2,000 ft. MATLAB’s documentation interpolates linearly, but that is its own choice.
  • In the gust field’s axes, u is the longitudinal component and v, w the transverse ones.

    • The longitudinal spectrum belongs to the component along the path through the frozen field. For a climbing rocket that is nearly vertical. The flight engine doesn’t use turbulence, and no milestone plans it yet (issue #39). Whoever adds it must align u with the path.
    • Getting that wrong changes the statistics. A horizontal gust given the longitudinal spectrum has twice the transverse power at low frequency, and 2/3 of it at high frequency.
    • The axes’ signs don’t matter.

Generator

Exact discretization, so step length never changes the statistics.

  • u is a first-order Gauss-Markov state. Over a step Δs, with ρ=e−Δs/L: x←ρx+1−ρ2n.

  • v and w each use two normalized states, driven as dx1/ds=(−x1+η)/L and dx2/ds=(x1−x2)/L, with output

    y=σ2(3x1+(1−3)x2).
    • The stationary covariance is the same for every L:

      P=(1121212)
    • The output’s autocorrelation is exactly Rv. Algebra: cΦ(r)Pc𝖳 is 2e−r(1−r/2) with c=(3,1−3).

    • Over r=Δs/L, the transition is Φ(r), plus Gaussian noise of covariance Q=P−ΦPΦ𝖳:

      Φ(r)=e−r(10r1),Q11=P(1,2r),Q12=12P(2,2r),Q21=Q12,Q22=12P(3,2r),P(n,x)=γ(n,x)Γ(n)
    • Written with the regularized incomplete gamma function, Q keeps full relative precision for tiny steps, where the closed form 12−e−2r(r2+r+12) cancels to nothing. The noise is drawn through Q’s Cholesky factor.

  • The state is normalized, so intensities and lengths can change from one step to the next (with altitude, say) without breaking stationarity.

  • Draws come in a fixed order (u, two for v, two for w) from a seeded xoshiro256++. So the same seed and steps give bit-identical gusts on one platform.

    • The integer stream is identical everywhere.
    • Normals and gusts go through the math library’s ln and exp, which may differ in the last bit between platforms.
  • The generator serializes, so a run can be checkpointed and resumed.

GustField precomputes a realization at a fixed spacing and interpolates it linearly. That makes the gust a pure function of the path coordinate, which an adaptive integrator can evaluate repeatedly and on rejected steps.

  • Linear interpolation smooths wavelengths near the spacing, so keep the spacing at or below a tenth of the smallest scale length.
  • A field holds at most 107 samples.

Limits for rockets

  • Dryden is scaled for aircraft: its lengths and intensities describe aircraft flying roughly level. A rocket climbs through the low-altitude model’s height dependence in seconds. The frozen-field assumption holds when airspeed is well above the gust velocities. That is false on the rail and near apogee, where the gust field barely moves past the vehicle.
  • Whoever adds turbulence to a flight picks the path coordinate, what to key the field on: distance flown through the air, or altitude. They also decide how to fade gusts in on the rail. This module does neither.

Tests that pin this

  • dryden::tests::dryden_spectrum_matches_theory is the done when of the atmosphere and wind milestone:
    • Setup: 2²⁰ samples at 1 m (3.3 ft), with σ=(1.5,1.2,0.9) m/s and L=(40,40,20) m.

    • Estimate: 256 Hann-windowed segments of 4,096 samples, averaged (Bartlett’s method).

    • In every octave band from bin 1 to Nyquist, each component’s mean ratio to theory is within 4 standard errors.

    • The variance of a band’s mean ratio is

      1nK[1+2ρ12n−1n+2ρ22n−2n]

      for n bins and K segments, with the Hann window’s neighboring-bin correlations ρ1=2/3 and ρ2=1/6. The bracket tends to 1.94.

    • The one- and two-bin bands at the bottom are loose (±25%, ±21%); the wide bands (±1–3%) pin the spectrum.

    • Theory is the continuous spectrum sampled at 1 m (3.3 ft), in closed form. Below a tenth of Nyquist it is checked against [8785C]’s formula to 1%.

    • The variance of the record is within 5% of σ2.

  • The exactness tests:
    • transition_preserves_the_stationary_covariance: ΦPΦ𝖳+Q=P to 4ε for steps from 10−12 to 103 scale lengths.

    • two_steps_compose_into_one, to 1e-12 relative, down to r=10−9:

      Q(a+b)=ΦQ(a)Φ𝖳+Q(b)

      with Φ=Φ(b).

    • transverse_output_has_the_dryden_autocorrelation.

    • regularized_gamma_matches_independent_references.

  • The stepping loop: quarter_meter_steps_give_the_one_meter_correlation, to 2e-3.
    • The sampling error is about 4e-4, so this catches a scale length 10% off.
    • It can’t tell an exact step from an Euler step (8e-5 apart), which is why the exactness tests above exist.
  • The spectra:
    • spectra_integrate_to_the_variance
    • spectra_are_the_cosine_transforms_of_the_autocorrelations
  • The parameters: low_altitude_parameters_follow_the_specification, at 100 ft moderate: Lu=505.169ft and σu/σw=1.715849. It also checks the 10 ft floor, the 1,000–2,000 ft hold, and the refusal above 2,000 ft.
  • Determinism: the same seed gives bit-identical fields, and a serialized generator resumes the stream.
  • hpr_core::random::tests:
    • Bit-identical to rand_xoshiro over 104 draws for 5 seeds.
    • The normal sampler’s moments and CDF at ±2σ, within 5 standard errors.
FusionSpace HPRVersion 0.1.0Issued 2026-11-21In preparationAbout HPR Sim