Source: GitHub
Signature¶
def sdynpy.signal_processing.sdynpy_massprops.rigid_body_shape_scaling(rbm_modes, trans_shapes, rot_shapes, center_of_rotation=None, return_mass_properties=False, rcond=None, symmetrize=True, check_rank=True)Recover scaled/mass-normalized rigid-body shapes and optionally mass properties from a set of mass-normalized rigid-body modes and user-supplied pure rigid-body translation/rotation shapes.
Parameters¶
rbm_modes : (n, 6) array_like Mass-normalized rigid-body mode shapes. Columns span the 6 rigid-body modes. Assumed to satisfy Phi.T @ M @ Phi = I in the underlying mass metric.
trans_shapes : (n, 3) array_like Unscaled pure translation shapes corresponding to unit translations in x, y, z (or equivalent unit physical translations in the chosen measurement basis).
rot_shapes : (n, 3) array_like Unscaled pure rotation shapes corresponding to unit rotations about x, y, z (1 radian), defined about some reference point.
center_of_rotation : (3,) array_like, optional Reference point about which rot_shapes were constructed. If provided, the center of mass is also returned in global coordinates. If omitted, COM is returned only relative to the rotation reference point.
return_mass_properties : bool, optional If True, also return recovered mass properties.
rcond : float, optional Cutoff for pseudoinverse.
symmetrize : bool, optional If True, symmetrize the recovered rigid-body mass matrix and inertia tensors.
check_rank : bool, optional If True, check that the supplied rigid-body basis has rank 6.
Returns¶
scaled_shapes : (n, 6) ndarray Mass-normalized/scaled physical rigid-body shapes corresponding as closely as possible to the supplied pure translation/rotation basis. Columns correspond to [Tx, Ty, Tz, Rx, Ry, Rz].
mass_props : dict, optional Returned only if return_mass_properties=True. Contains:
‘A’ : (6, 6) transformation matrix such that B ≈ Phi @ A
‘G’ : (6, 6) rigid-body generalized mass matrix in basis B
‘mass’ : scalar total mass
‘com_relative’ : (3,) center of mass relative to rotation reference point
‘com_global’ : (3,) center of mass in global coordinates (if center_of_rotation provided)
‘inertia_about_reference’ : (3, 3) inertia tensor about the rotation reference point
‘inertia_about_com’ : (3, 3) inertia tensor about center of mass
‘principal_inertias’ : (3,) eigenvalues of inertia_about_com
‘principal_axes’ : (3, 3) eigenvectors of inertia_about_com
‘reconstruction_error’ : relative Frobenius norm of B - Phi @ A
‘G_tt’, ‘G_tr’, ‘G_rt’, ‘G_rr’ : 3x3 blocks of G
Notes¶
Let Phi = rbm_modes and B = [trans_shapes rot_shapes]. Since both span the rigid-body subspace, B = Phi A for some A. Using mass normalization Phi.T M Phi = I, the rigid-body generalized mass matrix is
G = B.T M B = A.T AThe mass properties are extracted from:
G = [[ m I, -m [c]_x ],
[ m [c]_x, J_ref ]]where c is COM relative to the reference point used to define the rotation shapes, and J_ref is the inertia tensor about that same reference point.
Sign convention for c assumes the rotation shapes follow: u = omega x (x - O)