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

GI_formula1_3

GI_formula4_7

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:

GI_formula8

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

GI_formula9_10

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:

GI_formula11_12

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:
GI_formula13
Notes
  • 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:

GI_formula14_15

GI_formula16

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:
    GI_formula17
  2. We represent the matrix A as a product of two matrices B and C:
    GI_formula18_20
    GI_formula21
    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:
    GI_formula22
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
    GI_formula23
  2. The matrix B is composed by taking the first two linearly independent columns from (15):
    GI_formula24_26
    Multiplying the matrices in (26), we obtain the equations:
    GI_formula27
    Solving these equations, we obtain the matrix C:
    GI_formula28
  3. Now we calculate the generalized inverse matrix by formula (22) using the Octave Tool:
    GI_formula29
    Then:
    GI_formula30
Finally we write down the solution for (16):

GI_formula31

4. Download the MatrixGenInverseSupport.m

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

5. Literature / References

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