A case of typical usage is presented here.
To use real code, take a look at the showcase notebook.
a = pyEMA.Model(
frf_matrix,
frequency_array,
lower=10,
upper=10000,
pol_order_high=60,
driving_point=3,
frf_type='accelerance'
)
The main inputs in the Model
class are the Frequency Response Function (frf_matrix
) with shape (n_locations, n_frequencies)
and the frequency vector (frequency_vector
) with shape (n_frequencies,)
.
To set the frequency limits on the frf_matrix
, the lower
and upper
arguments are used. The poles will be combuted based on the frf_matric
within these limits, however, the reconstruction will be compted between the limits (0, upper)
.
This argument determines the highest polynomial order used to approximate the frf_matrix
.
If given, the driving_point
is the index of the frf_matrix
of the driving location. This location is used to scale the modal constants to the modal shapes.
where j
is the driving point index.
This argument gives information about what type of FRF you are using. If the accelerations are measured and then the FRF is computed using the excitation data, the frf_type
is acceleration
. If the speed is measured, the frf_type
is mobility
and if the displacement is measured, the frf_type
is receptance
.
It is possible to transition between accelerance, mobility and receptance:
omega = 2 * np.pi * frequency_array
mobility = receptance * (1j*omega)
accelerance = receptance * (-omega**2)
For further description of the arguments, see code documentation <code-doc-Model>
.
This step must always be carried out. The increasing polynomial order (up to pol_order_high
) is used to approximate the FRFs.
a.get_poles()
After the poles are computed, the stable ones must be selected. To select stable poles, two ways are possible.
a.select_poles()
If the approximate values of natural frequencies are already known, it is not necessary to display the stability chart:
approx_nat_freq = [314, 864]
a.select_closest_poles(approx_nat_freq)
To identify the modal constants, the get_constants()
method must be called. The method currently supports two methods, lsfd
and lsfd_proportional
. Both methods are based on the Least-Squares Frequency Domain method, however, the lsfd_proportional
assumes the proportional damping and thus return real-values modal constants.
H, A = a.get_constants(method='lsfd')
The method returns the reconstructed FRFs, H
, and the modal constants, A
. The lower and upper residuals can also bi accessed through LR
and UR
attributes, respectively.
lower_residual = a.LR
upper_residual = a.UR
If the driving_point
argument was passed to the Model
class, the modal shapes are available through phi
attribute:
modal_shapes = a.phi
pyEMA
enables the use of the poles identified using one set of measurments, to identify the modal constants using a different set of measurments.
Create a new object using different set of FRFs:
c = pyEMA.Model(
frf_matrix,
frequency_array,
lower=10,
upper=10000,
pol_order_high=60
)
Compute reconstruction based on poles determined on object a
:
H, A = c.get_constants(whose_poles=a)