pyOMA.core.SSICovRef.BRSSICovRef#

class pyOMA.core.SSICovRef.BRSSICovRef(*args, **kwargs)[source]#

Bases: ModalBase

__init__(*args, **kwargs)[source]#

Methods

__init__(*args, **kwargs)

build_toeplitz_cov([num_block_columns, ...])

Builds a Block-Toeplitz Matrix of Covariances with varying time lags and decomposes it by a Singular Value decomposition.

compute_modal_params([max_model_order, ...])

Perform a multi-order computation of modal parameters.

estimate_state(order[, max_modes, algo])

Compute the state matrix A, output matrix C and next-state-output covariance matrix G from the singular values and vectors of the block Toeplitz matrix, truncated at the requested order.

init_from_config(conf_file, prep_signals)

A method for initializing a modal object from configuration data bypassing common operations in explicit code for semi-automated analyses

integrate_quantities(vector, accel_channels, ...)

Rescales mode shapes from modal accelerations / velocities to modal displacements, by multiplication of the relevant modal coordinates (where accelerometers, or velocimeters were used, with $-1 omega^2$ or $i omega$, respectively,

load_state(fname, prep_signals)

Loads the state of the object from a compressed numpy archive file and returns the object This is only a stub for reimplementing the method in a derived class

modal_analysis(A, C[, rescale_fun])

Computes the modal parameters from a given state space model as described by Peeters 1999 and Döhler 2012.

remove_conjugates(eigval[, eigvec_r, ...])

This method finds complex conjugate modes, and removes unstable and overdamped poles.

rescale_mode_shape(modeshape[, rotate_only])

Rescales and rotates modeshapes in the complex plane.

save_state(fname)

Saves the state of the object to a compressed numpy archive file This is only a stub for reimplementing the method in a derived class

synthesize_correlation(A, C, G)

Correlation function synthetization in a modal decoupled form follows Reynders-2012-SystemIdentificationMethodsFor(Operational)ModalAnalysisReviewAndComparison Eq.

synthesize_spectrum(A, C, G)

L = N*dt (duration = number_of_samples*sampling_period) P = N*df (maximal frequency = number of samples * frequency inverval)

Attributes

accel_channels

velo_channels

build_toeplitz_cov(num_block_columns=None, num_block_rows=None, shift=0)[source]#

Builds a Block-Toeplitz Matrix of Covariances with varying time lags and decomposes it by a Singular Value decomposition.

  <-num_block_columns * n_r ->  _
[     R_m      R_m-1      ...      R_1    ]^
[     R_m+1    R_m        ...      R_2    ]num_block_rows * n_l
[     ...      ...        ...      ...    ]
[     R_2m-1   ...        ...      R_m    ]v

The total number of block columns and block rows should not exceed the maximum time lag of pre-computed correlation functions:

num_block_columns + num_block_rows + shift < prep_signals.m_lags

Parameters:
  • num_block_columns (integer, optional) – Number of block columns. By default, half the number of time lags are used

  • num_block_rows (integer, optional) – Number of block rows. By default it is set equal to num_block_columns

  • shift (integer, optional) – Allows the assembly of a shifted Block-Toeplitz matrix, s. t. the correlation function starting at shift is assembled into the block Toeplitz matrix

compute_modal_params(max_model_order=None, max_modes=None, algo='svd', modal_contrib=True)[source]#

Perform a multi-order computation of modal parameters. Successively calls

  • estimate_state(order, max_modes, algo)

  • modal_analysis(A,C)

  • synthesize_correlation(A,C, G), if modal_contrib == True

At ascending model orders, up to max_model_order. See the explanations in the the respective methods, for a detailed explanation of parameters.

Parameters:

max_model_order (integer, optional) – Maximum model order, where to interrupt the algorithm. If not given, it is min(num_channels * (num_block_rows + 1), num_reference_channels * num_block_columns)

estimate_state(order, max_modes=None, algo='svd')[source]#

Compute the state matrix A, output matrix C and next-state-output covariance matrix G from the singular values and vectors of the block Toeplitz matrix, truncated at the requested order. Estimation of the state matrix can be performed by QR decomposition or Singular Value decomposition of the shifted observability matrix. If max_modes is specified, the singular value decomposition is truncated additionally, also known as Crystal Clear SSI.

Parameters:
  • order (integer, required) – Model order, at which the state matrices should be estimated

  • max_modes (integer, optional) – Maximum number of modes, that are known to be present in the signal, to suppress noise modes

  • algo (str, optional) – Algorithm to use for estimation of A. Either ‘svd’ or ‘qr’.

Returns:

  • A (numpy.ndarray) – State matrix: Array of shape (order, order)

  • C (numpy.ndarray) – Output matrix: Array of shape (num_analised_channels, order)

  • G (numpy.ndarray) – next-state-output covariance matrix : Array of shape (order, num_ref_channels)

classmethod init_from_config(conf_file, prep_signals)[source]#

A method for initializing a modal object from configuration data bypassing common operations in explicit code for semi-automated analyses

This is a stub of the method that must be reimplemented by every derived class

classmethod load_state(fname, prep_signals)[source]#

Loads the state of the object from a compressed numpy archive file and returns the object This is only a stub for reimplementing the method in a derived class

modal_analysis(A, C, rescale_fun=None)[source]#

Computes the modal parameters from a given state space model as described by Peeters 1999 and Döhler 2012. Mode shapes are scaled to unit modal displacements. Complex conjugate and real modes are removed prior to further processing. Typically, order // 2 modes are in the returned arrays.

Parameters:
  • A (numpy.ndarray) – State matrix: Array of shape (order, order)

  • C (numpy.ndarray) – Output matrix: Array of shape (num_analised_channels, order)

Returns:

  • modal_frequencies ((order,) numpy.ndarray) – Array holding the modal frequencies for each mode

  • modal_damping ((order,) numpy.ndarray) – Array holding the modal damping ratios (0,100) for each mode

  • mode_shapes ((n_l, order,) numpy.ndarray) – Complex array holding the mode shapes

  • eigenvalues ((order,) numpy.ndarray) – Complex array holding the eigenvalues for each mode

save_state(fname)[source]#

Saves the state of the object to a compressed numpy archive file This is only a stub for reimplementing the method in a derived class

synthesize_correlation(A, C, G)[source]#

Correlation function synthetization in a modal decoupled form follows Reynders-2012-SystemIdentificationMethodsFor(Operational)ModalAnalysisReviewAndComparison Eq. 161 p. 74 (24) where Lambda are the correlation functions of the identified system

Parameters:
  • A (numpy.ndarray) – State matrix: Array of shape (order, order)

  • C (numpy.ndarray) – Output matrix: Array of shape (num_analised_channels, order)

  • G (numpy.ndarray) – next-state-output covariance matrix : Array of shape (order, num_ref_channels)

Returns:

  • corr_matrix_synth ((n_l, n_r, m_lags, n_modes) numpy.ndarray) – Array holding the modally decomposed correlation functions for each channel n_l and reference channel n_r and all modes

  • modal_contributions ((order,) numpy.ndarray) – Array holding the contributions of each mode to the input correlation function.

To use cross-validation for the modal contributions, manually replace the correlation matrix, between steps system identification and modal analysis:

order=40
m_lags= 150

n_blocks = 40
k = 10

cardinality = n_blocks // k
block_indices = np.arange(cardinality*k)
np.random.shuffle(block_indices)

prep_signals.corr_blackman_tukey(max_m_lags, num_blocks=n_blocks, refs_only=True)

i = 1 # subset i out of k

test_set = block_indices[i * cardinality:(i + 1) * cardinality]
training_set = np.take(block_indices, np.arange((i + 1) * cardinality, (i + k) * cardinality), mode='wrap')

# use the training set for building the Toeplitz matrix
prep_signals.corr_matrix_bt = np.mean(prep_signals.corr_matrices_bt[training_set,...,:this_m_lags], axis=0)
modal_data.build_toeplitz_cov(int(this_m_lags // 2))

# use the test set for modal analysis
prep_signals.corr_matrix_bt = np.mean(prep_signals.corr_matrices_bt[test_set,...,:this_m_lags], axis=0)

A, C, G = modal_data.estimate_state(order)
this_modal_frequencies, this_modal_damping, this_mode_shapes, this_eigenvalues, = modal_data.modal_analysis(A, C)
_, this_modal_contributions = modal_data.synthesize_correlation(A, C, G)

synthesize_spectrum(A, C, G)[source]#

L = N*dt (duration = number_of_samples*sampling_period) P = N*df (maximal frequency = number of samples * frequency inverval)

dt * df = 1/N L * P = N