Fixed-Point Hestenes Algorithm for Singular Value Decomposition of Symmetric Matrices Tapan Pradhan Department of Electrical Engineering Indian Institute of Technology Kharagpur, WB, 721302 Email: tapanpradhan78@hotmail.com Bibek Kabi Advanced Technology and Development Centre Indian Institute of Technology Kharagpur, WB, 721302 Email: bibek.kabi@gmail.com Aurobinda Routray Department of Electrical Engineering Indian Institute of Technology Kharagpur, WB, 721302 Email: aurobinda.routray@gmail.com Abstract—The present paper discusses the implementation of fixed-point Hestenes’ singular value decomposition (SVD) algo- rithm for symmetric matrices in C/C++ and SystemC platform. Steps for developing fixed-point algorithm from floating-point version are discussed. Quantization noise propagation model for computationally intensive sections of the algorithm are derived and validated. The results are compared with the floating-point version of the algorithm. Accuracy is measured in terms of number of accurate fractional bits, signal-to-quantization-noise- ratio (SQNR), orthogonality and factorization errors. Results show that the constant static Q format performs better than variable static Q format in terms of number of accurate fractional bits when the variables have close ranges. Variable static Q format implementation exhibits an overall better performance. Keywords—Constant static Q format, error propagation, fixed- point SVD, signal-to-quantization-noise-ratio (SQNR), variable static Q format. I. I NTRODUCTION Predominantly in all signal and image processing applica- tions covariance matrix is used as efficient feature descriptor. Several signal and image processing algorithms are based on subspace based method involving computation of eigenspace (singular values and singular vectors) of the covariance matrix. SVD plays an important role in finding singular triplet of these matrices. Principal component analysis (PCA), pattern recog- nition in signal and image processing [1] are few examples where SVD is primarily used. SVD of a dense matrix A m×n can be stated as A = U ΣV T (1) where U m×m and V n×n are orthogonal (or unitary) matri- ces and their columns are called left and right singular vectors respectively. Σ is a diagonal matrix and contains all singular values along its diagonal in a non-increasing order. For a symmetric matrix m = n and U and V span the same vector space. Hence computation of either U or V is sufficient. For symmetric matrices, eigenvalue decomposition and singular value decomposition are closely related as follows [4]: Suppose A is a symmetric matrix, with eigenvalues λ i and orthonormal eigen vectors u i so that A = U ΛU T is an eigen- value decomposition of A, with Λ= diag[λ 1 λ 2 ...λ n ],U = [u 1 u 2 ...u n ] and UU T = I . Then an SVD of symmetric matrix A is, A = U ΣV T , where diagonal elements of Σ i.e. σ i = abs(λ i ) and v i = sign(σ i ).u i where sign(0) = 1. For symmetric positive definite matrices eigenvalue decomposition (EVD) and SVD leads to the same decomposition. There are several algorithms for SVD as stated in literature [2]-[4]. Classical Jacobi algorithm for SVD is known to be accurate among all. However, being a two-sided version it is one of the slowest algorithms and is not suitable for real-time applications. Fixed-point format of Jacobi SVD algorithm has been implemented using CORDIC and is faster as compared to its floating-point counter part [7]. Hestenes’ algorithm is a variant of one-sided Jacobi’s algorithm and is discussed in [5]- [6]. Being a one-sided version the time of computation is lesser than two-sided Jacobi’s algorithm. To implement this algorithm in embedded and reconfigurable platforms, development and analysis of fixed-point version is necessary. Although numer- ical linear algebra algorithms like SVD are designed with floating-point data types, they are finally implemented in fixed- point architectures to reduce cost, chip size, power consump- tion and latency. With the wide spread application of embedded computing in the last ten years, fixed-point algorithms have gained considerable importance. Therefore, we have taken up a case study for the development of fixed-point Hestenes’ algorithm. We have developed the fixed-point version of the algorithm in constant static and variable static Q format. A fixed-point format of a number can be represented as Qm.n or Qn, where m is the number of integer bits and n is the number of fractional bits. In constant static Q format representation Q point definition is same for all variables and remains static throughout the program. This type of representation is suitable for algorithms in which variables have close dynamic ranges. In variable static Q format representation Q point definitions are assigned to variables based on their statistics and remain same throughout the program. Both the fixed-point formats are implemented in C/C++ and SystemC environments. We have also evaluated the numerical accuracy of the fixed- point algorithm using bit-true (fixed-point) simulation and analytical based approach. Signal-to-quantization-noise-ratio (SQNR), number of accurate fractional bits, orthogonality and factorization errors are used to evaluate accuracy from bit- true simulation results. Quantization noise source and error propagation model for computationally intensive parts of the algorithm have been studied analytically. The rest of the paper is organised as follows. Section II discusses Hestenes’ algorithm for floating-point platforms. Conversion of floating-point to fixed-point procedure along with various fixed-point formats have been discussed in sec- tion III. Section IV presents the numerical accuracy evaluation Proceedings of the 2013 International Conference on Electronics, Signal Processing and Communication Systems 63