Skip to main content
. 2021 Aug 31;21(17):5865. doi: 10.3390/s21175865
Algorithm 1 IM state-space identification
  • 1:

    input: horizon i; voltage vsα and vsβ; current isα and isβ; and weight W1 and W2

  • 2:

    output: discrete state-space A, B, C, and D

  • 3:

    procedureSubspaceID(i,vsα,vsβ,isα,isβ,W1,W2)

  • 4:

        initialize U0|2i−1 and Y0|2i−1                                                                ▹ Equation (10)

  • 5:

        calculate Oi                                  ▹ Equation (15)

  • 6:

        calculate Zi and Zi+1                                                            ▹ Equations (11) and (12)

  • 7:

        do [U,Σ,V]=svd(W1,Oi,W2)

  • 8:

        define n=4

  • 9:

        calculate Γi and Γi−1                                                                             ▹ Equation (17)

  • 10:

      do Least-Square problem to obtain A, C, and K                                  ▹ Equation (19)

  • 11:

      do Least-Square problem to obtain B and D                                        ▹ Equation (21)

  • 12:

    end procedure