反转4x4矩阵-需要数值最稳定的解决方案 [英] Invert 4x4 matrix - Numerical most stable solution needed

查看:112
本文介绍了反转4x4矩阵-需要数值最稳定的解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想反转一个4x4矩阵.我的号码以定点格式存储(准确的说是1.15.16).

I want to invert a 4x4 matrix. My numbers are stored in fixed-point format (1.15.16 to be exact).

我通常使用浮点算术构建伴随矩阵并除以行列式(例如蛮力求解).到目前为止,这对我仍然有效,但是在处理定点数时,由于使用了所有的乘法运算,我得到的精度损失是不可接受的.

With floating-point arithmetic I usually just build the adjoint matrix and divide by the determinant (e.g. brute force the solution). That worked for me so far, but when dealing with fixed point numbers I get an unacceptable precision loss due to all of the multiplications used.

注意:在定点算法中,我总是丢弃立即结果中的一些最低有效位.

Note: In fixed point arithmetic I always throw away some of the least significant bits of immediate results.

那么-反转矩阵的最数值稳定的方法是什么?我不太在乎性能,但是简单地浮点运算会降低我的目标体系结构的速度.

So - What's the most numerical stable way to invert a matrix? I don't mind much about the performance, but simply going to floating-point would be to slow on my target architecture.

推荐答案

我认为答案取决于矩阵的确切形式.具有固定点的标准分解方法(LU,QR,Cholesky等)在固定点上非常好,尤其是对于较小的4x4矩阵.参见Press等人的《数字食谱》一书.这些方法的说明.

I think the answer to this depends on the exact form of the matrix. A standard decomposition method (LU, QR, Cholesky etc.) with pivoting (an essential) is fairly good on fixed point, especially for a small 4x4 matrix. See the book 'Numerical Recipes' by Press et al. for a description of these methods.

本文给出了一些有用的算法,但不幸的是,这是背后的难题.他们建议进行(枢轴式)Cholesky分解,其中包含一些过于复杂而无法在此处列出的功能.

This paper gives some useful algorithms, but is behind a paywall unfortunately. They recommend a (pivoted) Cholesky decomposition with some additional features too complicated to list here.

这篇关于反转4x4矩阵-需要数值最稳定的解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆