Development of numerical linear algebra algorithms in dynamic fixed-point format: a case study of Lanczos tridiagonalization - Pradhan, Tapan; Kabi, Bibek; Mohanty, Ramanarayan; Routray, Aurobinda (International journal of circuit theory and applications, 2016)
Summary Proper range and precision analysis play an important role in the development of fixed‐point algorithms for embedded system applications. Numerical linear algebra algorithms used to find singular value decomposition of symmetric matrices are suitable for signal and image‐processing applications. These algorithms have not been attempted much in fixed‐point arithmetic. The reason is wide dynamic range of data and vulnerability of the algorithms to round‐off errors. For any real‐time application, the range of the input matrix may change frequently. This poses difficulty for constant and variable fixed‐point formats to decide on integer wordlengths during float‐to‐fixed conversion process because these formats involve determination of integer wordlengths before the compilation of the program. Thus, these formats may not guarantee to avoid overflow for all ranges of input matrices. To circumvent this problem, a novel dynamic fixed‐point format has been proposed to compute integer wordlengths adaptively during runtime. Lanczos algorithm with partial orthogonalization, which is a tridiagonalization step in computation of singular value decomposition of symmetric matrices, has been taken up as a case study. The fixed‐point Lanczos algorithm is tested for matrices with different dimensions and condition numbers along with image covariance matrix. The accuracy of fixed‐point Lanczos algorithm in three different formats has been compared on the basis of signal‐to‐quantization‐noise‐ratio, number of accurate fractional bits, orthogonality and factorization errors. Results show that dynamic fixed‐point format either outperforms or performs on par with constant and variable formats. Determination of fractional wordlengths requires minimization of hardware cost subject to accuracy constraint. In this context, we propose an analytical framework for deriving mean‐square‐error or quantization noise power among Lanczos vectors, which can serve as an accuracy constraint for wordlength optimization. Error is found to propagate through different arithmetic operations and finally accumulate in the last Lanczos vector. It is observed that variable and dynamic fixed‐point formats produce vectors with lesser round‐off error than constant format. All the three fixed‐point formats of Lanczos algorithm have been synthesized on Virtex 7 field‐programmable gate array using Vivado high‐level synthesis design tool. A comparative study of resource usage and power consumption is carried out. Copyright © 2015 John Wiley & Sons, Ltd. This paper outlines a study on fixed‐point algorithm development of a well‐known linear algebra kernel, that is, Lanczos algorithm. Large dynamic range of input matrices makes the float‐to‐fixed conversion process difficult to decide on integer wordlengths, which can avoid overflow for all cases. Working towards this issue, the major contribution of this work is the development of a dynamic fixed‐point format for obtaining integer wordlengths of variables during run‐time. An analytical framework for numerical accuracy evaluation is also discussed in detail.