 # Debug the SVD Decomposition in M2 cRIO when Calculating RZ

XMLWordPrintable

#### Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
2
• Sprint:
TSSW Sprint - Apr 24 - May 08, TSSW Sprint - May 08 - May 22
• Team:
Telescope and Site
• Urgent?:
No

#### Description

Debug the SVD decomposition in M2 cRIO when calculating RZ. I think the problem comes from the "uniqueness" of SVD.

#### Activity

Based on Singular_value_decomposition:

Non-degenerate singular values always have unique left- and right-singular vectors, up to multiplication by a unit-phase factor eiφ (for the real case up to a sign). Consequently, if all singular values of a square matrix M are non-degenerate and non-zero, then its singular value decomposition is unique, up to multiplication of a column of U by a unit-phase factor and simultaneous multiplication of the corresponding column of V by the same unit-phase factor. In general, the SVD is unique up to arbitrary unitary transformations applied uniformly to the column vectors of both U and V spanning the subspaces of each singular value, and up to arbitrary unitary transformations on vectors of U and V spanning the kernel and cokernel, respectively, of M.

Show Te-Wei Tsai added a comment - - edited Based on Singular_value_decomposition : Non-degenerate singular values always have unique left- and right-singular vectors, up to multiplication by a unit-phase factor eiφ (for the real case up to a sign). Consequently, if all singular values of a square matrix M are non-degenerate and non-zero, then its singular value decomposition is unique, up to multiplication of a column of U by a unit-phase factor and simultaneous multiplication of the corresponding column of V by the same unit-phase factor. In general, the SVD is unique up to arbitrary unitary transformations applied uniformly to the column vectors of both U and V spanning the subspaces of each singular value, and up to arbitrary unitary transformations on vectors of U and V spanning the kernel and cokernel, respectively, of M.

In the tests, I got the following error codes: 6088, 6060, 6053.

Show Te-Wei Tsai added a comment - In the tests, I got the following error codes: 6088, 6060, 6053.

1. https://github.com/lsst-ts/ts_mtm2_cell/pull/30
2. https://github.com/lsst-ts/ts_m2com/pull/33
3. https://github.com/lsst-ts/ts_m2gui/pull/40

The main issue in these PRs is to fix the rz calculation. The update in LabVIEW is the same as the calculation in mock_control_closed_loop.py in ts_m2com

Thanks!

Show Te-Wei Tsai added a comment - Please help to review the PRs: 1. https://github.com/lsst-ts/ts_mtm2_cell/pull/30 2. https://github.com/lsst-ts/ts_m2com/pull/33 3. https://github.com/lsst-ts/ts_m2gui/pull/40 The main issue in these PRs is to fix the rz calculation. The update in LabVIEW is the same as the calculation in mock_control_closed_loop.py in ts_m2com Thanks!

Thanks Tiago's and Patricio's reviews in GitHub.

Show Te-Wei Tsai added a comment - Thanks Tiago's and Patricio's reviews in GitHub.

#### People

Assignee: Te-Wei Tsai
Reporter: Te-Wei Tsai
Reviewers:
Patricio Cortes, Tiago Ribeiro
Watchers:
Te-Wei Tsai, Tiago Ribeiro