cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

ILL Conditionned Matrix Solution

SAJ
1-Visitor
1-Visitor

ILL Conditionned Matrix Solution

Dear Collegues:

I have a system with linear equations but the matrix is ill conditionned so the solution I get using lsolve is not the correct answer. See attached sheet

Any suggestion on how to solve this with meaninful results. The answer I get is very large where It suppose to be very small. Thanks

10 REPLIES 10
MikeArmstrong
12-Amethyst
(To:SAJ)

There seems to be something wrong in your worksheet. I have just use a solve block and got different answers again.

Mike

I do not see what can be wrong. I started with:

B=A*Y but when

Y=lsolve(B,A) gives a different answer than above. There is a a big difference between the right answer very small and the incorrect one very large

The only thing like I mentionned is the matrix is ill conditionned so may have multiple solutions. Iam checking if there is a way to zone in the correct answer or how Mathcad handle these as far as sensitivity.

In a paper that used Matlab to solve this mentionned using least square g inverse. There are no other details. Is that different than Mathcad?

Fred_Kohlhepp
23-Emerald I
(To:SAJ)

Take a look at singular value decomposition {svd(A).}

Can you please elaborate more on this function and how It might help. It does not work for complex I can convert to real and imaginary but not sure what I am looking for. Thanks

RichardJ
19-Tanzanite
(To:SAJ)

Take the symbolic determinant of the matrix A, with no numerical assignments. It is 0, so your matrix is not just badly conditioned, it is perfectly singular. Your problem is indeterminate.

SAJ
1-Visitor
1-Visitor
(To:RichardJ)

This is weird. When I took the determinant of A numerically It is a large number. The symbolic one give near 0. Which one is right?

Working backward seems there are multiple answers to this based on lsolve and the answer I know is correct since both solution satisfy the equation. Having multiple answers seem to fill the ill condition matrix. Also I checked the condition of the matrix and It is very high suggesting ill condition.

RichardJ
19-Tanzanite
(To:SAJ)

This is weird. When I took the determinant of A numerically It is a large number. The symbolic one give near 0. Which one is right?

Neither. It's floating point error (even with the higher precision floating point arithmetic used by the symbolic processor). What is correct is exactly 0.

Working backward seems there are multiple answers to this based on lsolve and the answer I know is correct since both solution satisfy the equation. Having multiple answers seem to fill the ill condition matrix. Also I checked the condition of the matrix and It is very high suggesting ill condition.

The limit of ill-conditioned is singular. Absent roundoff error in the processing, the matrix is perfectly singular. Just take it's determinant using the symbolic processor with no variable assignments. It's zero. I also checked that with the old Maple symbolic processor in version 11.

SAJ
1-Visitor
1-Visitor
(To:RichardJ)

Thanks for checking and confirming the singularity. I guess from now on I will use the symbolic tool as a check as well

RichardJ
19-Tanzanite
(To:SAJ)

Symbolic math is a very powerful tool. But be aware that if your expression contains floating point numbers it still does floating point arithmetic, it just does arbitrary precision (default 20 decimal places) floating point arithmetic. If your expression contains only undefined variables and integers, if you get a solution, it is exact.

VladimirN
24-Ruby II
(To:SAJ)

And here what result has turned out in Mathcad Prime:

lsolve_Prime.jpg

Announcements

Top Tags