GI MainPicture

Generalized Inverse Matrix on the Example of Converting a Three-Phase Voltage (Ua, Ub, Uc) into a Two-Phase one (Uα, Uβ) in an Electric Motor

1. Abbreviation

Generalized inverse matrix = Pseudoinverse matrix



2. Introduction

Let there be a matrix (operator) that maps the space of vectors ‘x’ with size n x 1 to the space of vectors ‘y’ with size m x 1:


Our task is to find such a matrix (operator) that performs the inverse transformation:


If A is a square matrix n=m and is non-singular det(A) ≠ 0, then the task is easily solved by finding the inverse matrix for A:


You can see the algorithm for finding the inverse square matrix in the article: “Matrix Functions for Digital Signal Processing. C Code and Octave Script”
The situation is more complicated for rectangular matrices (1). In this case we need to find a rectangular matrix (10), which is called generalized inverse matrix or pseudoinverse matrix.
Definition of generalized inverse matrix.
A generalized inverse matrix is called a matrix (10) with size n x m for a matrix (1) with size m x n satisfying the matrix equation:
  • It can be proved that for any matrix A there cannot exist two (or more) different generalized inverse matrices. See the proof in [1]
  • Definition (13) does not contradict the definition for a square inverse matrix (12)
  • If a square matrix is singular then a generalized inverse matrix can be calculated for it
I will take as an example a matrix for converting a three-phase voltage to a two-phase voltage for an electric motor:



3. Generalized Inverse Matrix Calculation

Now I will give without proof a description of the algorithm for finding the generalized inverse matrix. The proof of this algorithm see in [1]
  1. Calculate the rank of the matrix A with size m x n:
  2. We represent the matrix A as a product of two matrices B and C:
    Matrix B is composed of r linearly independent columns of matrix A. The matrix C is calculated from (18)
  3. Then we calculate the generalized inverse matrix with the formula:
Now let’s apply this algorithm to our example (14), (15), (16):
  1. The rank of the matrix (15) is easy to find using an Octave Tool, see the MatrixFunctionsSupport.m
  2. The matrix B is composed by taking the first two linearly independent columns from (15):
    Multiplying the matrices in (26), we obtain the equations:
    Solving these equations, we obtain the matrix C:
  3. Now we calculate the generalized inverse matrix by formula (22) using the Octave Tool:
Finally we write down the solution for (16):


4. Download the MatrixGenInverseSupport.m

The Octave script supports the example calculation. You can download the file:
with the button:

5. Literature / References

[1] Gantmaher F. R. “Theory of matrices”, Publishing House: Fizmatlit, ISBN: 978-5-9221-0524-8, 2010