Modal Analysis and System Identification (identification
)¶
Created on Nov. 26, 2017 @author: Joseph C. Slater
-
identification.
cmif
(freq, H, freq_min=None, freq_max=None, plot=True)[source]¶ Complex mode indicator function
Plots the complex mode indicator function
Parameters: freq : array
The frequency vector in Hz. Does not have to start at 0 Hz.
H : array
The complex frequency response function
freq_min : float, optional
The minimum frequency to be plotted
freq_max : float, optional
The maximum frequency to be plotted
plot : boolean, optional (True)
Whether to also plot mode indicator functions
Returns: cmifs : complex mode indicator functions
Notes
Note
Allemang, R. and Brown, D., “A Complete Review of the Complex Mode Indicator Function (CMIF) With Applications,” Proceedings of ISMA International Conference on Noise and Vibration Engineering, Katholieke Universiteit Leuven, Belgium, 2006.
Examples
>>> import vibrationtesting as vt >>> M = np.diag([1,1,1]) >>> K = K = np.array([[3.03, -1, -1],[-1, 2.98, -1],[-1, -1, 3]]) >>> Damping = K/100 >>> Cd = np.eye(3) >>> Cv = Ca = np.zeros_like(Cd) >>> Bt = np.eye(3) >>> H_all = np.zeros((3,1000,3), dtype = 'complex128') >>> for i in np.arange(1, 4): ... for j in np.arange(1, 4): ... omega, H_all[i-1,:,j-1] = vt.sos_frf(M, Damping/10, K, Bt, ... Cd, Cv, Ca, 0, 3, i, ... j, num_freqs = 1000) >>> _ = vt.cmif(omega, H_all)
-
identification.
mdof_cf
(f, TF, Fmin=None, Fmax=None)[source]¶ Curve fit to multiple degree of freedom FRF
If Fmin and Fmax are not entered, the first and last elements of TF are used.
If the first column of TF is a collocated (input and output location are the same), then the mode shape returned is the mass normalized mode shape. This can then be used to generate an identified mass, damping, and stiffness matrix as shown in the following example.
Parameters: f: array
The frequency vector in Hz. Does not have to start at 0 Hz.
TF: array
The complex transfer function
Fmin: int
The minimum frequency to be used for curve fitting in the FRF
Fmax: int
The maximum frequency to be used for curve fitting in the FRF
Returns: z: double
The damping ratio
nf: double
Natural frequency (Hz)
u: array
The mode shape
Notes
FRF are columns comprised of the FRFs presuming single input, multiple output z and nf are the damping ratio and natural frequency (Hz) u is the mode shape. Only one peak may exist in the segment of the FRF passed to sdofcf. No zeros may exist within this segment. If so, curve fitting becomes unreliable.
Author: Original Joseph C. Slater. Python version, Gabriel Loranger
Examples
>>> # First we need to load the sampled data which is in a .mat file >>> import vibrationtesting as vt >>> import scipy.io as sio >>> data = sio.loadmat(vt.__path__[0] + '/data/case2.mat') >>> #print(data) >>> # Data is imported as arrays. Modify then to fit our function >>> TF = data['Hf_chan_2'] >>> f = data['Freq_domain'] >>> # Now we are able to call the function >>> z, nf, a = vt.mdof_cf(f,TF,500,1000) >>> nf 192.59382330...
-
identification.
sdof_cf
(f, TF, Fmin=None, Fmax=None)[source]¶ Curve fit to a single degree of freedom FRF.
Only one peak may exist in the segment of the FRF passed to sdofcf. No zeros may exist within this segment. If so, curve fitting becomes unreliable.
If Fmin and Fmax are not entered, the first and last elements of TF are used.
Parameters: f: array
The frequency vector in Hz. Does not have to start at 0 Hz.
TF: array
The complex transfer function
Fmin: int
The minimum frequency to be used for curve fitting in the FRF
Fmax: int
The maximum frequency to be used for curve fitting in the FRF
Returns: z: double
The damping ratio
nf: double
Natural frequency (Hz)
a: double
The numerator of the identified transfer functions
Plot of the FRF magnitude and phase.
Notes
Author: Original Joseph C. Slater. Python version, Gabriel Loranger
Examples
>>> # First we need to load the sampled data which is in a .mat file >>> import vibrationtesting as vt >>> import scipy.io as sio >>> data = sio.loadmat(vt.__path__[0] + '/data/case1.mat') >>> #print(data) >>> # Data is imported as arrays. Modify then to fit our function. >>> TF = data['Hf_chan_2'] >>> f = data['Freq_domain'] >>> # Now we are able to call the function >>> z, nf, a = vt.sdof_cf(f,TF,500,1000) >>> nf 212.092530551...