PMABCMachineSwitchedRHS:

--------------------------------------------------------------------------
   Permanent magnet machine model in ABC coordinates with 6 switches.
   The switches connect the 3 phases to a resistor and capactor in
   parallel.
   Assumes a 3 phase machine in a Y connection. Control is by setting
   the switch positions.
   The permanent magnet flux distribution is assumed sinusoidal.
   The switch state has six possibilities. For a six switch inverter we"
   define

   v   
   |
   s1
   |- Phase A ----------
   s4
   |
   ground


   v   
   |
   s3
   |- Phase B ----------
   s6
   |
   ground

   v   
   |
   s5
   |- Phase C ----------
   s2
   |
   ground

   The switch states are

                          uA        uB        uC
   1 S5,S6,S1 closed      1/3      -2/3      1/3
   2 S6,S1,S2 closed      2/3      -1/3     -1/3
   3 S1,S2,S3 closed      1/3       1/3     -2/3
   4 S2,S3,S4 closed     -1/3       2/3     -1/3
   5 S3,S4,S5 closed     -2/3       1/3      1/3
   6 S4,S5,S6 closed     -1/3      -1/3      2/3

--------------------------------------------------------------------------
   Form:
   xDot = PMMachineABCSwitchedRHS( x, t, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x       (6,1)    The state vector [iA;iB;iC;omegaM;thetaM;u]
   t       (1,1)    Time
   d       (1,1)    Data structure
                    .lM   (1,1) Mutual inductance
                    .psiM (1,1) Permanent magnet flux
                    .lSS  (1,1) Stator self inductance
                    .rS   (1,1) Stator resistance
                    .p    (1,1) Number of poles (1/2 pole pairs)
                    .s    (1,1) Switch state
                    .tL   (1,1) Load torque
                    .bM   (1,1) Viscous damping (Nm/rad/s)
                    .j    (1,1) Inertia
                    .cL   (1,1) Load capacitance
                    .rL   (1,1) Load resistance

   -------
   Outputs
   -------
   x       (6,1)    The state vector derivative

--------------------------------------------------------------------------
   Reference: Lyshevski, S. E., "Electromechanical Systems, Electric
              Machines, and Applied Mechatronics," CRC Press, 2000,
--------------------------------------------------------------------------

Children:

Electrical: Motor/PMABCMachineRHS