Source: GitHub
Signature¶
def sdynpy.signal_processing.sdynpy_srs.srs(signal, dt, frequencies=None, damping=0.05, spectrum_type=9, b_filter_weights=None, a_filter_weights=None)Computes shock response spectrum of a signal
Computes the shock response spectrum using a ramp invariant digital filter simulation of the single degree-of-freedom system.
Parameters¶
signal : np.ndarray A shape (..., num_samples) ndarray containing the sampled signals to compute SRSs from.
dt : float The time between samples (1/sample rate)
frequencies : np.ndarray An iterable of frequency lines at which the shock response spectrum will be calculated. If not specified, it will be computed from the sample rate/10000 to the sample rate/4 over 50 lines.
damping : float Fraction of critical damping to use in the SRS calculation (e.g. you should specify 0.03 to represent 3%, not 3). The default is 0.03.
spectrum_type : int The type of spectrum desired: If
spectrum_type> 0 (pos) then the SRS will be a base acceleration-absolute acceleration model Ifspectrum_type< 0 (neg) then the SRS will be a base acceleration-relative displacement model (expressed in equivalent static acceleration units). If abs(spectrum_type) is: 1--positive primary, 2--negative primary, 3--absolute maximum primary 4--positive residual, 5--negative residual, 6--absolute maximum residual 7--largest of 1&4, maximum positive, 8--largest of 2&5, maximum negative 9 -- maximax, the largest absolute value of 1-8 10 -- returns a matrix s(9,length(fn)) with all the types 1-9.b_filter_weights : np.ndarray, optional Optional filter weights with shape (frequencies.size,3). The default is to automatically compute filter weights using
sdof_ramp_invariant_filter_weights.a_filter_weights : np.ndarray, optional Optional filter weights with shape (frequencies.size,3). The default is to automatically compute filter weights using
sdof_ramp_invariant_filter_weights.
Returns¶
srs : np.ndarray The shock response spectrum at the frequencies specified. If
spectrum_type== 10 or -10, then this will have shape (... x 9 x len(frequencies)) where each row is a different type of SRSfrequencies : np.ndarray The frequencies at which the SRSs were computed.