ABToDQ:

--------------------------------------------------------------------------
   Convert between AB and DQ coordinates for 3 phase currents.
   It uses the length of the vector to determine the direction
   of the transformation.

   Type ABToDQ for a demo

--------------------------------------------------------------------------
   Form:
   i = ABToDQ( i, omegaT )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   i             (2 or 3,1)  Current [iA;iB;iC] or [iD;iQ]
   omegaT        (1,1)       Angular rate times time: omega*t

   -------
   Outputs
   -------
   i             (3 or 2,1)  Current [iD;iQ] or [iA;iB;iC]

--------------------------------------------------------------------------
   Reference: Gill Estevez, P. ,"Model Dinamico de Una Turbina 
              de velocidad variable con Generador de Imanes Permanentes y 
              control de angulo de calaje ? Analisis de Control de 
              Velocidad. Figure 7.
--------------------------------------------------------------------------