fundamental eigensolution matrix determinant

2 views (last 30 days)
Jeff
Jeff on 9 Jun 2017
Commented: Jeff on 10 Jun 2017
Assembling the eigensolutions of a system of differential equations into a matrix results in what some have coined as the "fundamantal matrix". If the determinant of this matrix is NONZERO then all of the solutions are considered linearly independent.
I have obtained both the eigenvalues & eigenvectors from a state-space matrix representing a system of differential eqs. I suspect that the eigenvectors are linearly independent, but when I take the determinant of the assembled fundamental matrix I get a value that is NONZERO, but extremely small. This can be seen by running the code below after placing the contents of matlab.mat into your WORKSPACE.
TF=zpk(SIMULINKbode.values)
TF2=tf(SIMULINKbode.values);
[V,D] = eig(SIMULINKbode.values(2,1).a);
det(V)
The 2 norm of V = 1. Hence, the magnitude of the individual elements of V are all less than unity. So taking the determinant means multiplying a bunch of elements with magnitudes less than UNITY which inherently yields a very small number. So that makes it difficult to ascertain whether determinant is NONZERO and small due to that fact, or if the determinant is actually = 0 but numerical error prevents the determinant being IDENTICALLY = 0.
Does anyone have any suggestions how to address this? Is there some threshold of significant figures that I can say that the determinant is either ZERO or NONZERO?
It should be noted there is some level of error in V due to error in assessing the eigenvalues of SIMULINKbode.values(2,1).a. The code below demonstrates that the error in the eigenvalues is on the order of 10^-11. So that error will propagate through to the eigenvectors. What level of significant figures for that error I do not know, nevertheless, it exists. So this makes it confusing when interpreting the result of the determinant.
[row,col,v] = find(D);
v(:,2)=cell2mat(TF(2,1).p);
vdiff=[v(:,1)-v(:,2)];

Answers (3)

Steven Lord
Steven Lord on 9 Jun 2017
Don't use the determinant for determining singularity.
A = 0.1*eye(400);
dA = det(A)
The variable dA is 0 and so you'd assume A is singular. But A is a nonzero multiple of the identity matrix, which is definitely NOT singular.
B = [flintmax, flintmax; flintmax, flintmax*(1+eps)];
dB = det(B)
The variable dB is on the order of 1e+16, but B is a nonzero scalar multiple of a matrix whose determinant is eps:
C = [1 1; 1 1+eps]
dC = det(C)
See section 9, "Norms and Condition Numbers", of the Linear Equations chapter of Cleve's Numerical Computing with MATLAB textbook for more information.
  4 Comments
Steven Lord
Steven Lord on 9 Jun 2017
Ah, you're using an older release. You can see the same type of scenario with:
B = [1e10 1e10; 1e10 1e10*(1+eps)]
Its determinant is not particularly small, but that's just a scaled version of matrix C that has a very small determinant.
As for the chapter in Cleve's book: the Linear Equations chapter is chapter 2. Section 9 inside chapter 2 is titled "Norms and Condition Numbers".
Walter Roberson
Walter Roberson on 9 Jun 2017
flintmax was introduced in R2013a. Which release are you using?

Sign in to comment.


Walter Roberson
Walter Roberson on 9 Jun 2017
"The 2 norm of V = 1"
Not in R2017a it isn't -- norm(V) comes out about 1.4+ (but not sqrt(2))
If you
[V,D] = eig( sym(SIMULINKbode.values(2,1).a) );
then norm(V) comes out more than 10000.
I took your data over to a different symbolic package and calculated the eigenvalues and eigenvectors symbolically, to get exact answers. They are very long expressions -- too long to be of any practical use. Calculating the determinant of V then took a fair bit of time, but I was able to show that the while the real portion of det(V) appears to be 0, the imaginary part is roughly 3E12 -- very definitely not 0.
When I did the same thing in MATLAB, the V matrix returned is full of variable precision numeric values instead of being exact. It turns out that for this calculation, as soon as the root of a quintic or higher order polynomial are called for, MATLAB finds a numeric approximation instead of using a placeholder standing in for the root. Anyhow, with the higher precision symbolic numbers in place, det(V) shows a distinctly non-zero imaginary part in MATLAB. (I did the calculation in MATLAB first and then moved over to the other package, thinking that the numeric approximations MATLAB had done were preventing it from calculating a proper solution, but the exact solution does come out pretty much the same for the imaginary component.)

Jeff
Jeff on 10 Jun 2017
Again, the issue resides with the normalization of V. Below is a code I devised to denormalize each of the eigenvectors in V. Anyway, I have redefined the state-space matrix to be a simpler 3x3 matrix for demonstration purposes. The result of denormalizing V yields nice integer values. Now the determinant can be more readily interpreted.
A=[[14 8 -19];[-40 -25 52];[-5 -4 6]];
[V,D]=eig(A);
indx1=[find(real(V(:,1))) find(real(V(:,2))) find(real(V(:,3)))];
indx2=[find(imag(V(:,1))) find(imag(V(:,2))) find(imag(V(:,3)))];
mag=[real(V(indx1(:,1),1)) real(V(indx1(:,2),2)) real(V(indx1(:,3),3));imag(V(indx2(:,1),1)) imag(V(indx2(:,2),2)) [1;1]];
MAG=[1;1;1]*[min(abs(mag(:,1))) min(abs(mag(:,2))) min(abs(mag(:,3)))];
V2=V./MAG;
det(V2)
Below this procedure is applied to the 6x6 state-space matrix, SIMULINKbode.values(2,1).a, contained within matlab.mat file. The results do not have clean integer values; nonetheless, the determinant is clearly NONZERO. The code is crude so maybe someone can suggest a more succinct way to execute the denormalization? Is there a denormalization function in MATLAB?
[V,D]=eig(SIMULINKbode.values(2,1).a);
indx1=[find(real(V(:,1))) find(real(V(:,2))) find(real(V(:,3))) find(real(V(:,4))) find(real(V(:,5))) find(real(V(:,6)))];
indx2=[find(imag(V(:,1))) find(imag(V(:,2))) find(imag(V(:,3))) find(imag(V(:,4))) find(imag(V(:,5))) find(imag(V(:,6)))];
mag=[real(V(indx1(:,1),1)) real(V(indx1(:,2),2)) real(V(indx1(:,3),3)) real(V(indx1(:,4),4)) real(V(indx1(:,5),5)) real(V(indx1(:,6),6));imag(V(indx2(:,1),1)) imag(V(indx2(:,2),2)) imag(V(indx2(:,3),3)) imag(V(indx2(:,4),4)) imag(V(indx2(:,5),5)) imag(V(indx2(:,6),6))];
MAG=[1;1;1;1;1;1]*[min(abs(mag(:,1))) min(abs(mag(:,2))) min(abs(mag(:,3))) min(abs(mag(:,4))) min(abs(mag(:,5))) min(abs(mag(:,6)))];
V2=V./MAG;
det(V2)
  1 Comment
Jeff
Jeff on 10 Jun 2017
Any suggestions how to execute the denormalization in the code below more succinctly? Is there a denormalization function in MATLAB?
[V,D]=eig(SIMULINKbode.values(2,1).a);
indx1=[find(real(V(:,1))) find(real(V(:,2))) find(real(V(:,3))) find(real(V(:,4))) find(real(V(:,5))) find(real(V(:,6)))];
indx2=[find(imag(V(:,1))) find(imag(V(:,2))) find(imag(V(:,3))) find(imag(V(:,4))) find(imag(V(:,5))) find(imag(V(:,6)))];
mag=[real(V(indx1(:,1),1)) real(V(indx1(:,2),2)) real(V(indx1(:,3),3)) real(V(indx1(:,4),4)) real(V(indx1(:,5),5)) real(V(indx1(:,6),6));imag(V(indx2(:,1),1)) imag(V(indx2(:,2),2)) imag(V(indx2(:,3),3)) imag(V(indx2(:,4),4)) imag(V(indx2(:,5),5)) imag(V(indx2(:,6),6))];
MAG=[1;1;1;1;1;1]*[min(abs(mag(:,1))) min(abs(mag(:,2))) min(abs(mag(:,3))) min(abs(mag(:,4))) min(abs(mag(:,5))) min(abs(mag(:,6)))];
V2=V./MAG;

Sign in to comment.

Categories

Find more on Operating on Diagonal Matrices 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!