Message Boards Message Boards

2
|
468 Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How to avoid underflow using Eigensystem for 90x90 matrix with very large numbers?

Posted 2 months ago

Hello all,

I am trying to use the Eigensystem command to determine the eigenvalues and eigenvectors of a multi-degree of freedom system. At the moment, I have a mass matrix and a stiffness matrix, both square matrices with dimensions 90x90, however I am aiming to increase their size even further by increasing the number of degrees of freedom. My problem is that most values in my stiffness matrix are of the order of x10^17, while my mass matrix has values less than 10^3. I was able to determine the eigenvalues/eigenvectors for the same problem but with fewer degrees of freedom (smaller matrices) by setting the precision of the matrices myself, using:

Eigensystem[{SetPrecision[StiffnessMatrix, 500], SetPrecision[MassMatrix, 500]}];

however now I still get underflow errors when I set the precision to 20,000, and any higher I go it just becomes too slow. Is there a way around this issue or a smarter way of doing it? I have attached a code with the 2 matrices. Thanks for your help.

Attachments:
4 Replies

The matrices are not full rank, so a pre-conditioning step that passes them through SVD (back and forth) may help.

{us, \[Sigma]s, vs} = SingularValueDecomposition[stiffnessMatrix];
{um, \[Sigma]m, vm} = SingularValueDecomposition[massMatrix];
sm2 = us . \[Sigma]s . vs\[ConjugateTranspose];
mm2 = um . \[Sigma]m . vm\[ConjugateTranspose];
EigenSystem[{sm2, mm2}]

Hopefully that'll be problem-free.

Thank you for your answer! I have implemented the code exactly as you sent and it works perfectly, although it appears that my matrices may be flawed after all. Thanks again.

I'm not sure if it was intentional, the matrices not full rank, and they have different ranks as well: MatrixRank[massMatrix] != MatrixRank[stiffnessMatrix]

As a purely stylistic matter, it's better to reserve names that start with uppercase letters for Mathematica's use. It is then easier to distinguish Mathematica's symbols and your own symbols. Even single-letter uppercase symbols are not all available for use, so as a convention it's useful just not to use them at all. Say, P is available, but D is not, and P = 8 succeeds, but D = 8 fails.

Thanks for your comment, if fact the matrices are indeed flawed, hence the difference in ranks. Thank you for your suggestions regarding the naming too.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract