pyyeti.srs.vrs

pyyeti.srs.vrs(spec, freq, Q, linear, Fn=None, getmiles=False, getresp=False)[source]

Vibration response specturm - RMS response of single DOF systems to base PSD(s).

Parameters:
  • spec (2d ndarray or 2-element tuple/list) – If ndarray, its columns are [Freq, PSD1, PSD2, ... PSDn]. Otherwise, it must be a 2-element tuple or list, eg: (Freq, PSD) where PSD is: [PSD1, PSD2, ... PSDn]. In the second usage, PSD can be 1d in which case the outputs will also be 1d; in the first usage, the outputs will be 2d. The frequency vector must be monotonically increasing.

  • freq (1d array_like) – Vector of frequencies to define the integration step; see usage note 2 below.

  • Q (scalar) – Dynamic amplification factor \(Q = 1/(2\zeta)\) where \(\zeta\) is the fraction of critical damping.

  • linear (bool) – If True, use linear interpolation to expand spec to the frequencies in freq. If False, spec is expanded via interpolation in log space. In other words:

    Use:

    When:

    linear=False

    spec is an actual PSD test specification – that is, it uses constant db/octave slopes

    linear=True

    spec doesn’t use constant db/octave slopes (eg, an analysis curve)

    The pyyeti.psd.interp() routine is called to perform the interpolation.

  • Fn (1d array or None) – Defines the frequency(s) at which to compute the response. If None, Fn = freq.

  • getmiles (bool) – If True, return the Miles’ equation estimate for the RMS response. Miles’ equation assumes the PSD is flat and extends forever in both directions from frequency. The estimate is typically good if the PSD is flat for at least 2 octaves in both directions and the damping is less that 10%.

  • getresp (bool) – If True, return the PSD response curves at the frequency(s) in Fn. Note: internally, this will also set getmiles to True.

Returns:

  • Zvrs (1d or 2d ndarray) – The SDOF RMS acceleration response spectrum. For example, the response spectrum is in Grms if the spec is given in G^2/Hz. Zvrs.shape = (len(Fn), n), where n is the number of input specifications. Will be 1d only if the PSD input in spec was 1d (in the second usage); in that case, Zvrs.shape = (len(Fn),).

  • Zmiles (1d or 2d ndarray; optional) – The Miles’ estimate of Zvrs. Only returned if getmiles or getresp is True. Zmiles(f) = sqrt(pi/2*Fn*Q*psd(f)). Shape will be the same as Zvrs.

  • PSDresp (dictionary; optional) – Only returned if getresp is True. Members:

    key

    value

    ’f’

    frequency vector for responses; same as freq

    ’psd’

    3-D array; shape = (len(Fn), n, len(f)), where n is the number of input specifications

Notes

VRS [1] computes the acceleration RMS (root-mean-square) response of a spectrum of single DOF systems that are excited by an input base acceleration PSD(s):

  _____    ^
 |     |   |
 |  M  |  ---  SDOF acceleration PSD response
 |_____|
  /  |
K \ |_| C  ^
  /  |     |
[=======] ---  input base acceleration PSD

The response of each system is computed independently by integration across the entire frequency range as specified in freq.

The equation for the VRS is:

\[Z_{vrs}(f_n) = \sqrt { \sum\limits_{i} { \frac{1 + (p_i / Q)^2} {(1 - p_i^2)^2 + (p_i / Q)^2}} \cdot PSD(freq_i) \cdot \Delta freq_i}\;\;;\; p_i = \frac{freq_i}{f_n}\]

Miles’ equation is:

\[Z_{miles}(f_n) = \sqrt{\frac{\pi}{2} \cdot f_n \cdot Q \cdot PSD(f_n)}\]

Important usage notes:

  1. Responses calculated at the extreme frequency points may not be accurate because the transfer function is cut off during integration. As a rule of thumb, accuracy can be expected an octave away from the end points.

  2. The integration is not accurate until delta_f as computed from freq is less than f/Q, i.e. the response at frequency f is not accurate unless delta_f < f/Q, where Q=1/2/zeta. The integration should be conservative if this condition is not met and delta_f is not unreasonably large.

  3. Applying a flat PSD spectrum can be used to determine if the delta_f is good since you can compare to the Miles’ equation results.

To estimate a peak from the RMS, consider using \(\sqrt{2 \ln(f \cdot T_0)}\) for the peak factor instead of the common 3 (for 3-rms or 3-sigma). This peak factor is derived in the Notes section in pyyeti.fdepsd.fdepsd().

References

Raises:

ValueError – When Q <= 0.5; routine is only for underdamped systems.

Examples

Compute response spectra for example shown in reference. The results should be:

vrs                = [6.38, 11.09, 16.06]
miles              = [6.47, 11.21, 15.04]
response PSD peaks = [2.69,  4.04,  1.47]
>>> import numpy as np
>>> from pyyeti import srs
>>> spec = np.array([[20, .0053],
...                  [150, .04],
...                  [600, .04],
...                  [2000, .0036]])
>>> frq = np.arange(20, 2000, 2.)
>>> Q = 10
>>> fn = [100, 200, 1000]
>>> v, m, resp = srs.vrs((spec[:, 0], spec[:, 1]), frq, Q,
...                      linear=False, Fn=fn, getresp=True)
>>> np.set_printoptions(precision=2)
>>> v
array([  6.38,  11.09,  16.06])
>>> m
array([  6.47,  11.21,  15.04])
>>> resp['psd'][:, 0].max(axis=1)
array([ 2.69,  4.04,  1.47])