Source: GitHub
Signature¶
def sdynpy.signal_processing.sdynpy_lrm.frf_local_model(references, responses, abscissa, f_out=None, bandwidth=None, transient=True, modelset=[[1, 1, 0], [1, 1, 1], [1, 1, 2]], export_ratio=0.1, max_parallel=512, print_time=True)Local modeling FRF estimator for MIMO systems. This function can be called directly or using frf.timedata2frf(...,method=‘LRM’) or frf.fft2frf(...,method=‘LRM’).
Parameters¶
references : ndarray (N_in, N_freqs) or (N_in, 1, N_freqs) REFERENCES FREQUENCY-DOMAIN DATA.
responses : ndarray, shape (N_out, N_freqs) or (N_out, 1, N_freqs) RESPONSES FREQUENCY-DOMAIN DATA.
abcissa : ndarray (N_freqs,) INPUT FREQUENCY VECTOR.
f_out : ndarray (N_freqs_out,), optional Output frequency vector. Finer resolution increases computational cost, but only to a finite limit. Compuatational cost will not increase beyond f_out = f_in, but large interpolation may result in a large export_ratio. The default is f_in
bandwidth : float, optional Local model estimation bandwidth in units of f_in. Larger values yield better noise filtering but risk underfitting and take longer to run.
transient : boolean, optional whetheter to include transient estimation in local models. Recommend False for impact testing or burst random, True otherwise. The default is True.
modelset : iterable of numpy (3,) arrays, optional Arrays contain [num. order, trans. order, denom. order]. Recommend increasing numerator order for nonlinear structures and complicated FRFs. The default is [[1,1,0],[1,1,1],[1,1,2]].
export_ratio : f;pat, optional (centered) proportion of local bands that can be stored and exported. Larger values risk capturing volatile end behavior but yield faster computation times. The default is 0.1.
max_parallel : int, optional for very large systems with high frequency resolution and large bandwidths, system RAM can be a constraint. The default number of parallel processes is the number of CPU threads. If this causes freezing, max_parallel can be set to reduce the allowed number of parallel threads. Also, smaller pools may initialize faster. The default is 512.
print_time : boolean, optional print remaining time if more than 10 seconds
Returns¶
f_out : ndarray (N_freqs_out,) estimated FRM frequency vector
H : ndarray (N_freqs_out, N_out, N_in) frequency response matrix
model_data : dict candidate model info and selected model at each frequency in f_out
Notes¶
To improve noise and transient removal, recommend increasing bandwidth
To reduce computation time, recommend decreasing f_out resolution, increasing export_ratio, or decreasing bandwidth. For very large systems, if freezing occurs, reduce max_parallel.
For more information, see “A practitioner’s guide to local FRF estimation”, K. Coletti. This function uses the MISO parameterization