pyvib.frf module¶
-
pyvib.frf.bla_periodic(U, Y)[source]¶ Calculate the frequency response matrix, and the corresponding noise and total covariance matrices from the spectra of periodic input/output data.
Note that the term stochastic nonlinear contribution term is a bit misleading. The NL contribution is deterministic given the same forcing buy differs between realizations.
G(f) = FRF(f) = Y(f)/U(f) (Y/F in classical notation) Y and U is the output and input of the system in frequency domain.
Parameters: - u (ndarray) – Forcing signal
- y (ndarray) – Response signal (displacements)
- fs (float) – Sampling frequency
- fmin (float) – Starting frequency in Hz
- fmax (float) – Ending frequency in Hz
Returns: - G (ndarray) – Frequency response matrix(FRM)
- covGML (ndarray) – Total covariance (= stochastic nonlinear contributions + noise)
- covGn (ndarray) – Noise covariance
-
pyvib.frf.covariance(y)[source]¶ Compute covariance matrix output spectra due to noise from signal y
The variation is calculated along the periods and averaged over the realizations.
Parameters: y (ndarray(npp,p,R,P)) – signal where npp is the number of points per period, p is the number of dofs, R is the number of realizations, and P is the number of periods Returns: covY – covariance matrix of the dof(s). Return type: ndarray(nfd,p,p)
-
pyvib.frf.nonperiodic(u, y, N, fs, fmin, fmax)[source]¶ Calculate FRF for a nonperiodic signal.
A nonperiodic signal could be a hammer test. For nonperiodid signals, normally H1 or H2 is calculated. H2 is most commonly used with random excitation. H1 is used when the output is expected to be noisy compared to the input. H2 is used when the input is expected to be noisy compared to the output.
H1 = Suy/Suu H2 = Syy/Syu
All spectral densities are calculated in frequency domain Suy is the Cross Spectral Density of the input and output Suu/Syy is the Auto Spectral Density of the input/output. Also called power
spectral density(PSD)Suy = Syu* (complex conjugate). See [1]_
Parameters: - u (ndarray) – Forcing signal
- y (ndarray) – Response signal (displacements)
- N (int) – Number of points used for fft. N = 2^nfft, where nfft standard is chosen as 8.
- fs (float) – Sampling frequency
- fmin (float) – Starting frequency in Hz
- fmax (float) – Ending frequency in Hz
Returns: - freq (ndarray) – Frequencies for the FRF
- FRF (ndarray) – Receptance vector. Also called H.
- sigT (ndarray)
- gamma (ndarray) – Coherence. Between 0 and 1 that measures the correlation between u(n) and y(n) at the frequency f, ie. can y be predicted from u. The coherence of a linear system therefore represents the fractional part of the output signal power that is produced by the input at that frequency. 1 is perfect correlation, 0 is none.
- Notes —–
- [1] (Ewins, D. J. “Modal testing: theory, practice and application (2003),)
- pages 141.
- https (//en.wikipedia.org/wiki/Spectral_density)
- https (//en.wikipedia.org/wiki/Coherence_(signal_processing))