pyFDN.tiny_rotation_matrix#
- pyFDN.tiny_rotation_matrix(n, delta, spread=0.1, dtype=None)[source]#
Generate orthogonal matrix with small eigenvalue angles.
Creates a rotation matrix suitable for use in FDN feedback structures, where small eigenvalue angles help control the density of the impulse response. The eigenvalue angles are delta * pi, randomly spread by the spread factor. The matrix is constructed from 2x2 Givens rotations with these angles, pre- and post-multiplied by a random orthogonal matrix so that the result is dense but keeps the prescribed eigenvalues. For odd matrix sizes, one eigenvalue is at 1.
- Parameters:
- Returns:
Orthogonal matrix of shape (n, n)
- Return type:
rotation_matrix
Example
>>> R = tiny_rotation_matrix(6, 12) >>> R.shape torch.Size([6, 6]) >>> torch.allclose(R @ R.T, torch.eye(6), atol=1e-5) True