**Open Access Library Journal**

Vol.03 No.01(2016), Article ID:68217,8 pages

10.4236/oalib.1102299

Applications of Virtual Modules in Numerical Analysis

Abd Elrazig Awadelseed Edries Suliman^{1,2}

^{1}Department of Computer Science, University Bisha, Bisha, KSA ^{2}Al-Neelain University, Khartoum, Sudan

Copyright © 2016 by author and OALib.

This work is licensed under the Creative Commons Attribution International License (CC BY).

http://creativecommons.org/licenses/by/4.0/

Received 9 January 2016; accepted 24 January 2016; published 28 January 2016

ABSTRACT

A number of modules have been designed and developed by the paper writer, using LabVIEW for numerical analysis to the design of a virtual interactive graphical user interface (GUI) software to solve QR Factorization, and LU Factorization. The focus of this study is to provide virtual models to solve systems of linear Equations by using QR Factorization, LU methods. The significant finding reached by the researchers, is that the virtual model can be used to solve any systems of linear equation. Based on the previous finding, the researcher recommends that other systems of linear equation also can follow the same analogy to solve numerical equation method.

**Keywords:**

Virtual Modules, QR Factorization, LU Factorization, LabVIEW, Numerical Analysis, Virtual Instrument

**Subject Areas:** **Numerical Methods**

1. Introduction

There are several numerical computation packages that serve as educational tools and are also available for commercial use. Of the available packages, LabVIEW is the most widely used in GUI [1] . A linear system of equations can be transformed into a system whose solution is simpler to compute by factoring the input matrix into the multiplication of several simpler matrices. The most commonly used factorization methods are LU and QR. The LU factorization methods are available only for square matrixes [2] . The QR factorization methods can handle both square and rectangular matrices. Factorization methods can be used to solve many matrix problems, such as solving linear system of equations, inverting a matrix, and finding the determinant of a matrix [3] .

This paper will design and develop Interactive Virtual modules (VIs) for studying 1) QR Factorization, 2) LU Factorization. The linear system of equations using LU and QR methods is used because the sample students study a course of the linear system of equations solved by LU and QR methods.

Using the LabVIEW, program has been designed and tested, and the application of the solution of a system of linear equations by 1) QR Method A is, 2) QR Method A is, and 3) QR Method A is and Solving Systems of Equations LU-Factorization Method.

The main purpose of this paper is to help unspecialized people in the computer science. It is for those who use the numerical linear system. The LU is preferred to Matlab because LABVIEW is a graphical user interface (GUI) and it can easily be understood by the students. It is essential in the third word.

Background

This background concurs with Virtual laboratories, Solutions of Systems of Linear Equations (The QR factorization technique and LU factorization technique), and LU factorization technique.

Virtual laboratories typically originate from computation and simulation software such as Matlab [4] or LabVIEW [5] . Yet, one has to take care that such software can also be used for real system control.

Solutions of Systems of Linear Equations [6] . A system of equations is a collection of two or more equations with the same set of unknowns. In solving a system of equations, we try to find values for each of the unknowns that will satisfy every equation in the system.

(1)

The equations in the system can be linear or non-linear. This paper adopts the systems of linear equations. The problem can be expressed in narrative algebraic form.

The QR factorization technique factors the input matrix A as the product of two matrices, such that A = QR, where R is an upper triangular matrix. QR factorization can be used with both square and rectangular matrices. When the matrix A is square and non-singular, its QR factorization is unique, and all the diagonal elements of R are positive [7] .

A number of algorithms are possible for QR factorization, such as the Householder transformation, the Givens transformation, the Fast Givens transformation, and the Gram-Schmidt method.

The LU factorization technique factors the input square matrix A as the product of two triangular matrices, such that A = LU, where L is a lower triangular matrix with ones on the diagonal, and U is an upper triangular matrix. This factorization A = LU exists if all the N leading principal sub-matrices of A have non-zero determinants, where N is the number of rows or columns in A. If this factorization exists and A is non-singular, the LU factorization is unique.

Typically, in order to receive a more precise calculation, LU factorization is performed using the format PA = LU, where P is a permutation matrix. You can use this format to perform the LU factorization on any square matrix.

LabVIEW [5] is a graphical programming language that uses icons instead of lines of text to create applications. In contrast to text-based programming languages, where instructions determine program execution, LabVIEW [5] uses dataflow programming, where data determine execution.

LabVIEW can be used to address the needs of various courses in technology and science curriculum [8] - [11] .

2. Materials and Methods

In this paper, the description of how to design and implement a Virtual lab using the LabVIEW program for the solution of a system of linear equations by: QR Method and the LU factorization Method is given.

2.1. Solving Systems of Equations QR Method in LabVIEW

In this section examples of virtual modules in QR Method are presented: 1) QR Method A is, 2) QR Method A is, and 3) QR Method A is.

These will be dealt with successively.

2.1.1. QR Methods A Is N ´ N

The basis of the QR Method for calculating the Eigenvalues of A is the fact that a real matrix can be written as A = QR (QR factorization of A) where Q is orthogonal and R is upper triangular.

We will begin by first solving a linear system. Let us consider QR Method A is. This is shown in Figure 1. It comprised the equation, solve QR Method, find (Q) and find (R) where A is.

Solve by Use LabVIEW

2.1.2. QR Method A Is M £ N

Example VI to perform QR Method A is.

We will begin by second solving a linear system. Let us consider QR Method A is. This is shown in Figure 2. It comprised the equation, solve QR Method, find (Q) and find (R) where A is.

Solve by Use LabVIEW

2.1.3. QR Method A Is m > n

Example VI to perform QR Method A is.

Figure 3 shows linear system of equations with matrix 6 × 4, solve QR. Method, find (Q) and find (R) where A is.

Solve by Use LabVIEW

2.2. Solving Systems of Equations LU-Factorization in LabVIEW

The LU factorization technique factors the input square matrix A as the product of two triangular matrices, such

Figure 1. QR method A is.

Figure 2. QR method A is.

Figure 3. QR method A is.

that A = LU, where L is a lower triangular matrix with ones on the diagonal, and U is an upper triangular matrix. This factorization A = LU exists if all the N leading principal sub matrices of A have non-zero determinants, where N is the number of rows or columns in A. If this factorization exists and A is non-singular, the LU factorization is unique.

Typically, in order to receive a more precise calculation, LU factorization is performed using the format PA = LU, where P is a permutation matrix. This format can be used to perform the LU factorization on any square matrix.

Example VI to perform LU Decomposition.

Figure 4 shows linear system of equations with matrix 3 × 3, solve LU Method, find (U) and find (L).

Solve by Use LabVIEW

3. Results and Discussion

The VI module presented in this paper to solve numerical models, has been experimented and has given positive results as shown by the table from (1 to 4).

Figure 4. LU factorization method.

Using LabVIEW program has been designed and tested, and the application of the solution of a system of linear equations by:

3.1. QR Method A Is N ´ N

The linear equations are written in Matrix Form (Ax = B). Form A and B (known vector) are supplied as inputs to the VI.

The VI solves the QR Method. A is and displays the results as shown in Table 1 (matrix A is 4 × 4). The VI is flexible and can be easily modified to accommodate more number of equations by simply changing the dimension of A, B, and solution vector.

3.2. QR Method A Is M £ N

The VI solves for the QR Method A is and displays the results as shown in Table 2 (matrix A is 3 < 6). The VI is flexible and can be easily modified to accommodate more number of equations by simply changing the dimension of A, B, and solution vector.

Table 1. The VI modules for QR method A is.

Table 2. The VI modules for QR method A is.

3.3. QR Method A Is M > N

The VI solves for the QR Method A is and displays the results as shown in Table 3 (matrix A is 6 > 4). The VI is flexible and can be easily modified to accommodate more number of equations by simply changing the dimension of A, B, and solution vector.

3.4. Solve LU-Factorization

The VI solves for the LU decomposition and displays the results as shown in Table 4 (matrix A is 3 × 3). The VI is flexible and can be easily modified to accommodate more number of equations by simply changing the dimension of A, B, and solution vector.

4. Conclusions

This study has attempted to apply modern methods of solution of linear equations form Ax = b. The study started by providing an account about the analysis of linear systems and the types of matrices, especially those

Table 3. The VI module for QR method A is.

Table 4. The VI modules for solve LU-factorization method.

of two-dimensional form, which are used in the solution of these systems. The modern methods used to solve these linear equations are QR and LU methods.

A number of modules have been developed using LabVIEW for numerical analysis and engineering problem solving; these linear equations are QR and LU methods courses.

Cite this paper

Abd Elrazig Awadelseed Edries Suliman, (2016) Applications of Virtual Modules in Numerical Analysis. *Open Access Library Journal*,**03**,1-8. doi: 10.4236/oalib.1102299

References

- 1. Martinez, W.L. (2011) Graphical User Interfaces. WIREs Computational Statistics, 3, 119-133.

http://dx.doi.org/10.1002/wics.150 - 2. Saad, Y. (1996) Iterative Methods for Sparse Linear Systems. PWS, Boston, Section 10.3 and Further.
- 3. Watkins, D. (1982) Understanding the QR Algorithm. SIAM Review, 24, 427-440.

http://dx.doi.org/10.1137/1024100 - 4. Matlab (2015) The MATLAB Online Programming Contest.

http://www.mathworks.com/matlabcentral/contest/ - 5. National Instruments (2015). LabVIEW,

http://www.ni.com/LabVIEW - 6. Poole, D. (2006) Linear Algebra: A Modern Introduction. 2nd Edition, Thomson Brooks/Cole, Canada.
- 7. Mwangi, K. (2008) Understanding the QR Algorithm.

http://www.slideshare.net/kmwangi/qr-algorithm-presentation-1529818 - 8. Anderson, J.A., Korrapati. R.B. and Swain, N.K. (1999) Digital Signal Processing Using Virtual Instrumentation. Proceedings of SPIE, 4052.
- 9. Korrapati, R.B. and Swain, N.K. (2000) Study of Modulation Using Virtual Instruments. Proceedings of National Conference on Allied Academies, 18 July 2015.

http://ijme.us/cd_06/PDF/ENG%20206-116.pdf - 10. Swain, N.K., Anderson, J.A. and Korrapati, R.B. (2000) Computer Based Virtual Engineering Laboratory (CBVEL) and Engineering Technology Education. 2000 Annual ASEE Conference Proceedings, 22 July 2015.

https://peer.asee.org/computer-based-virtual-engineering-laboratory-cbvel-and-engineering-technolgy-education - 11. Wells, L. and Travis, J. (1996) LabVIEW for Everyone, Graphical Programming Even Made Easier. Prentice Hall, Upper Saddle River, 199.