pyyeti.cla.PSD_consistent_rss

pyyeti.cla.PSD_consistent_rss(resp, xr, yr, rr, freq, forcepsd, drmres, case, i)[source]

Compute phase-consistent (time-correlated) root-sum-square (RSS) responses in a PSD analysis; each RSS is of two rows.

In the following, ‘x’ denotes DOF 1 for the RSS and ‘y’ denotes the perpendicular direction: resp = sqrt(x*x + y*y).

Parameters:
  • resp (2d ndarray) – Frequency response curves: DOF x len(freq)

  • xr (1d array_like) – Index vector of the ‘x’ resp rows (input to RSS)

  • yr (1d array_like) – Index vector of the ‘y’ resp rows (input to RSS)

  • rr (1d array_like or None) – If RSS responses are to be stored in the same matrix (category) as resp, then rr is an index vector specifying which rows will hold the RSS. For example, resp could have 3 rows with xr = 0, yr = 1, and rr = 2. The 3rd row would be the RSS of the first two.

    On the other hand, if the RSS is to be stored alone in its category, set rr to None. For example, resp could have 2 rows with xr = 0, yr = 1. Then, the category would only have 1 data recovery item

  • freq (1d array_like) – Frequency vector (Hz)

  • forcepsd (2d ndarray) – Matrix of force PSDs; nforces x len(freq)

  • drmres (input/output SimpleNamespace) – Results for a DRM; eg if drmres = results[‘ifa’]:

    .rms (r x cases)
    .cases (list of cases)
    .freq (freq x 1)
    .psd (cases x r x freq)
    ._psd (temp dict, psd[case] is freq x r)
    .srs.srs[q] (cases x r x freq)
    .srs.ext[q] (each r x freq)
    .srs.frq (freq,)
    .srs.type (string, either 'srs' or 'eqsine')
    .srs.units (string, eg: 'G, rad/sec^2')
    .ext (r x 2), .maxcase (length r), .mincase ([])
    
  • case (string) – Unique case identifier (like ‘MaxQ’) for storing the PSD results, eg:

    results['ifa']._psd[case]
    
  • i (integer) – Current force index; starts at 0 and goes to nforces-1

Returns:

None

Notes

This function is typically called by a “drfunc” specified in a call to DR_Def.add(). An example function that uses this routine is provided there.

The drmres input is modified on each call:

._psd[case] is updated (size = drm rows x freq)

On the last call the RSS is computed and stored in ._psd[case] according to rr.

These members are created to keep track of needed values (but deleted on last call):

.tmp.varx  = 'x' variance
.tmp.vary  = 'y' variance
.tmp.covar = covariance
.tmp.xresp = list of 'x' response matrices;
              - list is nforces long
              - each response matrix is len(xr) x freq
.tmp.yresp = list of 'y' response matrices

This routine works by computing the maximum length principal axis (eigenvector) of the covariance matrix. The RSS results are then calculated along the eigenvector direction. See comments in source code of pyyeti.ytools._calc_covariance_sine_cosine() for more details. Also see, for example, reference [1].

References