How to solve an overconstrained system of equations?

1.2k Views Asked by At

What is the easiest codeable way to solve an overconstrained static model? How does Force Effect https://forceeffect.autodesk.com do it? Given a 10m long bar angled as the hypotenuse of a 3, 4, 5 triangle with an xy pin constraint a (0,0), another xy constraint at (4,3), and a vertical force of 100N applied down at (10,6) Force Effect calculates the x and y reaction forces below at C and A. I am not as interested in this particular answer in how to get to it by a codeable algorithm.

enter image description here

So the equations are:

Sum Moments about C = 0 => Yca(Rax) + Xca(Ray) + Xcb(F1) = 0 => 3 Rax - 4 Ray = -4(-100)

Sum Moments about A = 0 => Yac(Rcx) + Xac(Rcy) + Xab(F1) = 0 => - 3 Rcx + 4 Rcy = -8(-100)

Sum Forces Y = 0 => Ray + Rcy + F1 = 0 => Ray + Rcy = -(-100)

Sum Forces X = 0 => Rax + Rcx = 0

Which could translate to a 4x4 matrix: Ax = b

|  3.   -4.    0.    0. |   | Rax |  =  | 400 |
|  0.    0.   -3.    4. |   | Ray |  =  | 800 |
|  0.    1.    0.    1. |   | Rcx |  =  | 100 |
|  1.    0.    1.    0. |   | Rcy |  =  |   0 |

And attempting to solve for x = inv(A)* b gives the following error in SciLab (or MatLab) -->inv(A) !--error 19 Problem is singular.

So the matrix is not invertible- whatever that means!

Turns out that Rcx = -Rax, so substituting that can make for a smaller 3x3 matrix.

3 Rax - 4 Ray = -4(-100)

3 Rax + 4 Rcy = -8(-100)

Ray + Rcy = -(-100)

3x3 matrix: Ax=b

|  3.   -4.    0.  |   | Rax |  =  | 400 |
|  3.    0.    4.  |   | Ray |  =  | 800 |
|  0.    1.    1.  |   | Rcy |  =  | 100 |

Attempting to solve for x = inv(A)* b still gives the following error in SciLab (or MatLab) -->inv(A) !--error 19

I’d be open to some sort of regular algebra substitution method to solve it if that is any easier. Please help. This is not homework.

I’d be open to some sort of substitution method to solve it if that is any easier. Please help. This is not homework. This is a simplified version of a real-world problem of a large free body being held in place by two fixed pins. It is not dynamic – nothing is moving.