Precision problem with matrix inversion
|
07-13-2015, 06:22 PM
Post: #1
|
|||
|
|||
Precision problem with matrix inversion
when I tried to solve the following original system of linear equations, I observed that obviously the Prime has some precision problems with matrix inversion if the elements have large or small exponents.
\( \underbrace{\begin{bmatrix} 130.2544E9 & 34.4351E9 & 17.1192E9 & 10.4385E9 \\ 55.2158E9 & 32.7918E9 & 18.5083E9 & 11.6938E9 \\ 26.9576E9 & 29.2367E9 & 22.0630E9 & 15.2900E9 \\ 17.8132E9 & 25.8109E9 & 27.0660E9 & 21.6890E9 \end{bmatrix}}_{\textrm{Matrix } P} \cdot \begin{bmatrix} Q_1 \\ Q_2 \\ Q_3 \\ Q_4 \end{bmatrix} = \underbrace{\begin{bmatrix} 400E3 \\ 400E3 \\ 400E3 \\ 400E3 \end{bmatrix}}_{\textrm{Vector }V} \) Solving for vector \([Q_i]\) by simply calculating \([Q_i] = \frac{[V]}{[P]}\) results in \( \begin{bmatrix} Q_1 \\ Q_2 \\ Q_3 \\ Q_4 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}\) The correct result should be: \( \begin{bmatrix} Q_1 \\ Q_2 \\ Q_3 \\ Q_4 \end{bmatrix} = \begin{bmatrix} -8.611E-9 \\ 6.765E-6 \\ 14.569E-6 \\ -7.782E-6 \end{bmatrix}\) In contrast to the Prime the 50g gives the correct result without any problem !! When reducing the exponents on both sides of the matrix equation, for example: \( \begin{bmatrix} 130.2544E6 & 34.4351E6 & 17.1192E6 & 10.4385E6 \\ 55.2158E6 & 32.7918E6 & 18.5083E6 & 11.6938E6 \\ 26.9576E6 & 29.2367E6 & 22.0630E6 & 15.2900E6 \\ 17.8132E6 & 25.8109E6 & 27.0660E6 & 21.6890E6 \end{bmatrix} \cdot \begin{bmatrix} Q_1 \\ Q_2 \\ Q_3 \\ Q_4 \end{bmatrix} = \begin{bmatrix} 400 \\ 400 \\ 400 \\ 400 \end{bmatrix} \) the result is still a "zero-vector", thus matrix inversion still gives an inverse with 0 for each element. When solving the system \( \begin{bmatrix} 130.2544 & 34.4351 & 17.1192 & 10.4385 \\ 55.2158 & 32.7918 & 18.5083 & 11.6938 \\ 26.9576 & 29.2367 & 22.0630 & 15.2900 \\ 17.8132 & 25.8109 & 27.0660 & 21.6890 \end{bmatrix} \cdot \begin{bmatrix} Q_1 \\ Q_2 \\ Q_3 \\ Q_4 \end{bmatrix} = \begin{bmatrix} 400 \\ 400 \\ 400 \\ 400 \end{bmatrix} \) the result from the Prime is correct: \( \begin{bmatrix} Q_1 \\ Q_2 \\ Q_3 \\ Q_4 \end{bmatrix} = \begin{bmatrix} -8.611E-3 \\ 6.765 \\ 14.569 \\ -7.782 \end{bmatrix}\) I tried various settings without any success. When exponents increase the Prime is no longer able to invert the coefficient matrix in a correct way, whereas the 50g always shows the correct results. Any thoughts about that? Thanks a lot |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)