How does matlab normalize its eigenvectors?

38 views (last 30 days)
Melissa
Melissa on 3 Jul 2013
Good Afternoon All,
I am currently working with a mass-stiffness problem where I have two matrices M and K. Solving the eigenvalue problem I find the natural frequencies and the modeshapenatural frequencies with nastran as well as kinetic energy distribution (based off the modeshapes or eigenvectors) but my eigenvectors are not matching up. I was just wondering if anyone knew what matlab does in normalizing the eigenvectors?
I have also applied another transformation matrix to the K and M matrices and again receive the correct natural frequencies but my eigenvectors don't match either...hm.
If anyone could help explain I would greatly appreciate it.
Thanks,
Here is my code for producing natural frequencies and modeshapes:
K=[1200000, 0, 0, 0, 137797.6, -17335.2; 0, 1200000, 0, -137797.6, 0, -156678.4; 0, 0, 1200000, 17335.2, 156678.4, 0; 0, -137797.6, 17335.2, 97608.59896, -454.17925, 42493.43822; 137797.6, 0, 156678.4, -454.17925, 223401.7905, 1880.660199; -17335.2, -156678.4, 0, 42493.43822, 1880.660199, 282511.7668];
M=[300, 0, 0, 0, 0, 0; 0, 300, 0, 0, 0, 0; 0, 0, 300, 0, 0, 0; 0, 0, 0, 10.6, -1.419, -7.017; 0, 0, 0, -1.419, 47.96, .189; 0, 0, 0, -7.017, .189, 47.23];
function [Nat_Frequency_HZ,ModeShapes] = Nat_Frequency_ModeShape_Calculator(K,M)
% User Input
%This is a subfunction of the main program of PT_Wizard_Calculator.
%Please see the main routine document for further information of inputs.
%
% K: Stiffness Matrix of the system [6x6 matrix]
% M: The Mass System Matrix
% Output:
% Nat_Frequency: Natural Frequencies of the system [6x1 dimension]
% ModeShapes: ModeShapes of the System [6x6 dimension]
%Solving Eigenvalue Problem K*x=lambda*M*x
[EigenVec,EigenVal]=eig(K,M);
%Natural Frequency (rad/sec) are the Eigenvalues
Nat_Frequency_RS=diag(EigenVal);
%Sorting Frequency in ascending order
[Nat_Frequency_RS,Indexing]=sort(sqrt(Nat_Frequency_RS));
%Converting rad/sec to hz
Nat_Frequency_HZ=Nat_Frequency_RS/(2.*pi);
%ModeShapes are the Eigenvectors
ModeShapes=EigenVec(:,Indexing);
ModeShapes=ModeShapes';
The eigenvalues in nastran are: [0.9 -0.1 1.1 0 0 0; -0.1 -1.7 0.1 0 0 0; 1.4 -0.2 -1.2 0 0 0; 0 -0.2 0 0 0 0; 0.8 0.1 0.9 0 0 0; 0 0.5 -0.1 0 0 0]
  2 Comments
Muthu Annamalai
Muthu Annamalai on 3 Jul 2013
Seems like a case of differing by a unitary transformation between the eigenvectors from MATLAB ans nastran. I would only say you can apply a Gram-Schmidt orthonormalization procedure to both sets and compare them. This should give you a similar (same?) basis set.
Melissa
Melissa on 3 Jul 2013
Hm. Just tried the Gram-Schmidt process on my eigenvectors but failed to work on the ones from Nastran. Thanks for the advice though :)

Sign in to comment.

Answers (1)

James Tursa
James Tursa on 3 Jul 2013
If "... not matching up ..." just means that the ordering is different, you might look into this FEX submission by John D'Errico:

Categories

Find more on Linear Algebra in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!