Modeling and Simulation of Multiphase Machines in the Matlab/Simulink Environment

Multiphase machines are AC machines characterized by a stator winding composed of a generic number n of phases. In today’s electric drive and power generation technology, multiphase machines play an important role for the benefits they bring compared to traditional three-phase ones (Levi, 2008; Levi et al., 2007). Such benefits have been widely highlighted by existing literature (Levi et al., 2007) and are mainly related to: an increased fault tolerance; higher power ratings achieved through power segmentation; enhanced performance in terms of efficiency and torque ripple. The use of multiphase machines is spreading both in small-power safety-critical applications as well as in very high-power industrial drives (Tessarolo et al., 2010), in electric-propulsion drives (Castellan et al., 2007) and power generation systems (Sulligoi et al., 2010). Regardless of whether they are used as motors or generators, multiphase electrical machines are almost always connected to power electronics systems (inverters for motors, rectifiers for generators), which interface them to the electric grid (Sulligoi et al., 2010; Castellan et al. 2008). Therefore, if the dynamic behaviour of a multiphase machine is to be predicted through simulations in the design and development stage, it is essential to do this by means of system-level simulations, where not only the electric machine is included, but also the power electronics and control systems that interact with it. Such a system-level simulation approach makes it difficult to use Finite-Element (FE) methods due to the complexity of the domain to be modelled and to the well-known computational heaviness of time-stepping FE simulations. Conversely, lumped-parameter models, to be implemented in the Matlab/Simulink environment, may provide designers with a powerful mean of analysis and investigation, provided that all the system components to be studied are modelled with an adequate level of accuracy and completeness. As concerns power electronics systems usually interfaced to multiphase machines, whether operating as motors or generators, the Matlab/Simulink environment offers wide and complete libraries where the designer can find reliable pre-defined blocks (for electronic switches, snubbers, diodes, etc.) to be used in building the application-related apparatus models. The same pertains to control and regulation blocks, which can be built up directly based on their transfer functions and logics. A possible criticality can be encountered when it comes to build the multiphase machine model. In fact, no predefined blocks are presently available in the Matlab/Simulink environment for this purpose. On the other side, building a dedicated user-defined machine


Introduction
Multiphase machines are AC machines characterized by a stator winding composed of a generic number n of phases.In today's electric drive and power generation technology, multiphase machines play an important role for the benefits they bring compared to traditional three-phase ones (Levi, 2008;Levi et al., 2007).Such benefits have been widely highlighted by existing literature (Levi et al., 2007) and are mainly related to: an increased fault tolerance; higher power ratings achieved through power segmentation; enhanced performance in terms of efficiency and torque ripple.The use of multiphase machines is spreading both in small-power safety-critical applications as well as in very high-power industrial drives (Tessarolo et al., 2010), in electric-propulsion drives (Castellan et al., 2007) and power generation systems (Sulligoi et al., 2010).Regardless of whether they are used as motors or generators, multiphase electrical machines are almost always connected to power electronics systems (inverters for motors, rectifiers for generators), which interface them to the electric grid (Sulligoi et al., 2010;Castellan et al. 2008).Therefore, if the dynamic behaviour of a multiphase machine is to be predicted through simulations in the design and development stage, it is essential to do this by means of system-level simulations, where not only the electric machine is included, but also the power electronics and control systems that interact with it.Such a system-level simulation approach makes it difficult to use Finite-Element (FE) methods due to the complexity of the domain to be modelled and to the well-known computational heaviness of time-stepping FE simulations.Conversely, lumped-parameter models, to be implemented in the Matlab/Simulink environment, may provide designers with a powerful mean of analysis and investigation, provided that all the system components to be studied are modelled with an adequate level of accuracy and completeness.As concerns power electronics systems usually interfaced to multiphase machines, whether operating as motors or generators, the Matlab/Simulink environment offers wide and complete libraries where the designer can find reliable pre-defined blocks (for electronic switches, snubbers, diodes, etc.) to be used in building the application-related apparatus models.The same pertains to control and regulation blocks, which can be built up directly based on their transfer functions and logics.A possible criticality can be encountered when it comes to build the multiphase machine model.In fact, no predefined blocks are presently available in the Matlab/Simulink environment for this purpose.On the other side, building a dedicated user-defined machine model for any specific multiphase arrangement may require a non-trivial work due to the wide variety of multiphase schemes (in terms of phase number and distribution) and due to the several different modelling approaches which can be derived from the current literature on the subject (Levi et al., 2007).Based on the above premises, this Chapter aims at providing Matlab/Simulink users, interested in simulating electromechanical systems where multiphase machines are involved, with some general modelling and implementation strategies which enable them to treat all the multiphase machine schemes of practical interest in a unified manner.The Chapter is organized so as to sequentially cover the topics listed below:

•
Qualitative description of the various stator multiphase arrangements for multiphase machines.

•
Introduction of Vector-Space Decomposition as a method for a unified treatment of the mentioned multiphase schemes.

•
Implementation of the VSD-based model in the Matlab-Simulink environment.

Variety, modelling and representation of multiphase winding schemes
There is a large variety of multiphase machines depending on: 1.The number of phases n constituting the stator winding; 2. The way in which the n phases are physically arranged; 3. The kind of rotor (which may be of squired-cage, permanent-magnet, reluctance, assisted-reluctance type as well as in ordinary three-phase machines).As concerns phase arrangement, for instance, the n phases may be distributed symmetrically around the stator circumference with a phase shift of 360/n electrical degrees, as it happens in five-phase (Pereira et al., 2006) and seven-phase (Figueroa et al., 2006) symmetrical machines (Fig. 1a).Otherwise, the n phases (with n necessarily being an integer multiple of 3) may be grouped into N three-phase sets, displaced by 60/N electrical degrees apart: this is the case of the so called split-phase winding configurations (Levi et al., 2007;Tessarolo et al., 2010) (Fig. 1b).Finally, more complicated solutions can be also implemented, such as in the propulsion motor described by Terrein et al., 2004, where n=15 stator phases are grouped into three five-phase sets.

Graphical representation convention
The graphical representation of the winding scheme used in Fig. 1 is quite conventional and widespread.However, for the sake of clarity it can be better understood referring to Fig. 2 and Fig. 3, where such graphical representation is shown aside the physical phase arrangement in the case of a concentrated winding machine (the same pertains to distributed windings, of course).It can be seen that each coil group of the phase is represented by an arrow pointing in the direction of the magnetic field which would originate if the coil group carried a positive current.Coil groups shifted by 180 electrical degrees are represented by arrows of different line styles (solid and dashed).

Modeling assumptions
In modelling the various types of multiphase machines, the following usual assumptions with be made in the rest of the Chapter: 1. Magnetic saturation is neglected, so inductances are assumed as constant.2. It is assumed that the air-gap width of the machine can be modelled as a constant plus a sinusoidal function whose period equals a pole pitch.3.All the n phases are geometrically identical except for their angular displacement, hence electrical machines with fractional slot windings are not covered.
4. Each phase is composed of identical coil groups (or phase belts) shifted by π electrical radians apart (as in the 5-phase example shown in Fig. 2); in other words, each phase has one coil group per pole.Conversely, such winding topologies as that shown in Fig. 3 (one phase belt per pole pair) and are not covered.It is noticed that the assumption made in point 4 is not importantly restrictive, since such winding schemes as that shown in Fig. 3 are very rarely used in practice as they give rise to important even-order space harmonics in the air-gap (Klingshirn, 1983).

Multiphase machine modelling through Vector-Space Decomposition
The purpose of this Section is to propose a VSD method which applies to both symmetrical and asymmetrical n-phase winding schemes, for whatever integer n greater than 3. To do this, we propose that the VSD transformation should consist of two cascaded steps (Fig. 4): Fig. 4. Two-step transformation for the VSD of a generic multiphase model 1.The first is a merely geometrical transformation (W) capable of mapping the actual winding structure into a conventional one; the precise meaning of this "mapping" operation will be clarified next.2. The second is a decoupling transformation [represented by matrix T(x) where x is the rotor position] to be applied to the conventional machine model.Such transformation is meant to project machine variables onto a set of mutually orthogonal subspaces.The overall VSD transformation V(x)=T(x)W will then result from combining the two transformations.The advantage of this approach is that the properly called VSD theory can be developed only for the conventional multiphase model (thereby making abstraction of the particular phase arrangement of the actual machine), instead of tailoring VSD procedures on any particular multiphase winding topology that may occur in practice.

Selection of the conventional multiphase model
The question arises as to which multiphase model is the most suitable for being chosen as "conventional".A natural answer would be the symmetrical n-phase winding scheme with 2π/n phase progression, which is considered by Figueroa et al., 2006.With such a choice, the theory proposed in by Figueroa et al., 2006 could be in fact used to build the VSD transformation V(x).The problem which would occur with this choice, however, would be the lack of generality.In fact, there would be some n-phase schemes of practical importance which could not be mapped into an equivalent symmetrical winding with 2π/n phase progression through any transformation W. For instance, this would happen for any splitphase (multiple-star) windings composed of an even number of phases.The concept is illustrated in Fig. 5a-b; the figure shows how a triple-star winding can be certainly mapped into a symmetrical 9-phase scheme with 2π/9 phase progression (through a transformation W' 3×3 mapping phase A1 into A, phase A2 into -F, phase A3 into B, etc.), while a dual-star winding (Fig. 5c) cannot be mapped into any 6-phase scheme with 2 π /6 phase progression, just because there does not exist a 6-phase scheme with 2 π /6 phase progression.In order to overcome the above limitation, a different choice of the conventional multiphase scheme is made.The conventional n-phase winding arrangement selected for the purpose is shown in Fig. 6 and entails n phases numbered from 0 to n−1 and sequentially arranged over a pole span with a phase progression angle.
With such a choice, any n-phase winding (whether symmetrical or asymmetrical, with even or odd phase count) can be mapped into a conventional n-phase arrangement such as that in Fig. 6 by means of a geometrical transformation W, built as detailed in the next Section.

Geometrical transformation into conventional winding scheme
By geometrical transformation we mean a sequence of phase permutations and reversals capable of reducing the actual winding scheme into an equivalent one having the conventional structure shown in Fig. 6.The principle is illustrated in Fig. 7 with the examples of a symmetrical 5-phase winding (a) and of an asymmetrical 6-phase (dual star) winding (c) to be mapped into their corresponding conventional arrangements respectively through transformations W 5 and W 2×3 .

Fig. 7. Geometrical transformation into conventional phase arrangement
Let us suppose that the phase variables are arranged in vector form as per ( 2) and (3) respectively for the 5-phase and the dual star case and as per (4) for the conventional winding schemes:

General transformation for symmetrical n-phase configurations
Let us now consider the general case of a symmetrical n-phase winding with 2π/n phase progression (see Fig. 1a and Fig. 5b as examples); it can be mapped into a conventional phase arrangement through the geometrical transformation W n defined as: The formal proof of ( 7) is omitted for the sake of brevity as the formula can be easily checked on a case-by-case basis.

General transformation for asymmetrical (split-phase) configurations
Let us consider the general case of an asymmetrical (or split-phase) winding composed of N m-phase stars shifted by 2π/(mN) stars (Fig. 5a shows an example with m=3 and N=3, Fig. 1b with m=3 and N=2).Such a winding can be mapped into a conventional mN-phase arrangement through the geometrical transformation given by: The formula can be easily checked to hold on a case-by-case basis.

Machine model in conventional multiphase variables
In the previous Section it has been shown how any multiphase scheme can be mapped into an equivalent one having a "conventional" phase arrangement and the suitable variable transformation matrices to be applied for this purpose have been presented.Therefore, it is not restrictive to suppose, in the following, that stator phases are distributed according to the conventional scheme.Hereinafter we shall present the form that the machine model equations take in this case.
The stator voltage equation in matrix form is given by: where phase variables are (superscript t denotes transposition): ( ) ( ) () The stator inductance matrix is assumed to be composed of a leakage inductance term () l s L , not dependent on rotor position, and of an air-gap inductance term ( ) Substitution of ( 16) into (9) gives: ( ) Based on the assumptions listed in 2.2, the air-gap inductance matrix can be written as: ( ) ( ) where: Equations ( 19)-( 22) directly descend from the expression of the mutual inductance (due to air-gap flux) between two phases of indices "i" and "j" (Tessarolo et al., 2009)

VFD transformation matrix
The problem with the machine model expressed in multiphase variables is that stator model matrices are not constant in presence of rotor saliency (L md ≠ L mq ), as shown by ( 23).Furthermore, it would be desirable that model variables become constant during sinusoidal steady-state operation.Additionally, the model written as per 3.2 contains quite involved inductance matrix structure and is thereby little suitable for implementation.Finally, a simple expression for the machine torque cannot be derived from the model formulated as per 3.2.
Vector-Space Decomposition (VSD) is a modelling technique which enables one to significantly simplify the machine equations (Levi et al., 2007) and finally yields a model structure (including diagonal matrices) which is simple to implement numerically.VSD, as proposed in this Chapter, is based on using a variable transformation T which maps the conventional multiphase vector variables ( 10)-( 13) into "orhtonormal" vector coordinates (denoted with subscript dq in the following) as per ( 24).Model matrices are accordingly transformed as per ( 25). () The transformation matrix T(x) proposed here to accomplish the VSD is given by: 1 cos cos 2 cos 3 cos 1 0 sin sin 2 sin 3 sin 1 1 cos 3 cos 6 cos 9 cos 3 1 2 0 sin 3 sin 6 sin 9 sin 3 1 1 cos 5 cos 10 cos 15 cos 5 1 0 sin 5 sin 10 sin 10 sin 5 1 We notice that the proposed matrices do not coincide either with those used by Figueroa et al., 2006, or with those mentioned in Levi et al., 2007, but are specifically design to treat an nphase machine with conventional multiphase arrangement (Tessarolo, 2009).

Machine model in transformed coordinates
In this Section, the transformation T(x) defined above will be applied to the model of the nphase salient-pole machine whose model in conventional multiphase coordinates has been established in 3.2.By applying transformation T(x) to model variables as per ( 24) and matrices ( 16) and ( 16) we obtain the transformed model matrices (marked by subscript dq) below: ( ) More precisely, the transformed leakage inductance matrix takes the diagonal form (Tessarolo, 2009): where: ( ) for h = 1, 3, 5, ... is the harmonic inductance of the machine of order h (Tessarolo, 2009).The air-gap inductance matrix becomes: ( ) ( ) The overall inductance matrix in transformed coordinates is then the diagonal matrix below: Using ( 24), the relationship (15) between the flux linkage and current vectors becomes: which, in virtue of ( 29), gives: Using the above relationships, the stator voltage equation ( 9) becomes: It is important to remark that in the last passage of (37), we have used the fact that L dq , given by ( 34), is time-invariant, i.e.
If we left-multiply (37) by () x T we obtain: where the rotor speed in electrical radians per second has been introduced: The product () 40) can be expanded using (25) as follows: ( where we have used identities t = CC I and d dx = C0 .Considering the structure (26) of P(x), the product () () can be expanded as: 0 1 0000 100000 000 300 003000 () () 00000 5 000050 The final expression for the machine voltage equation in orthonormal coordinates is then: which is formally identical to the transformed voltage equation of a three-phase synchronous machine in the rotor dq reference frame.From (44) a simple expression for the machine electromagnetic torque can be also derived.
In fact, if we left-multiply both sides of (44) by i dq t we obtain: Using ( 10), ( 11), ( 24), we can write the left-hand side member of (45) as follows: ] where p e is the instantaneous electrical power entering machine terminals; using ( 14) and (28), the term where p mag is the amount of power used to change the magnetic energy 1 2 t mag dq dq dq w = iL i stored in machine magnetic circuits.As a result of ( 46)-( 48), equation ( 45) becomes: where is the part of the power converted into mechanical power.Then, the power p m can be also written in terms of electromagnetic machine torque T em and mechanical rotor speed ω m : where p is the number of pole pairs.By equalling ( 50) and ( 51) one obtains the expression for the electromagnetic torque: where the first term represents the reluctance torque component (due to rotor saliency and acting even in absence of rotor MMF) and the second term represents the torque component due to the interaction between stator and rotor magneto-motive force fields.The electromagnetic torque ( 52) is to be used along with the externally-applied torque T ext in the mechanical differential equation which governs the shaft speed dynamics: where J is the rotor moment of inertia, B is the viscous friction coefficient and ω m is mechanical rotor speed, equal to ω/p.

VSD model implementation in the Matlab/Simulink environment
The mathematical modelling of the multiphase machines described above is suitable for a modular, scalable and flexible implementation in the Matlab/Simulink environment.
A block scheme which can be used for this purpose is provided in Fig. 8, where the particular case of a multiphase synchronous machine with wound-field rotor is considered.
Of course, the same scheme holds in case of induction machines as well as for Permanent Magnet (PM) or reluctance synchronous machines, provided that the field voltage input is removed or properly replaced.
The overall system comprises a "Simulink domain", where the multiphase machine model is implemented, and a "SimPowerSystems domain" where the power electronics connected to the machine is modelled.

Implementation of multiphase machine model in conventional phase variables
The core of the system represented in Fig. 8 is constituted by the "Multiphase machine Simulink model in conventional variables" block, whose detailed structure is depicted in Fig. 9.It implements the differential equations of the machine under the hypothesis that stator phases are geometrically arranged according to the "conventional" n-phase scheme discussed in 3.1.Therefore, the mathematical model implemented is the one described in Section 3.2 of this Chapter.The choice of using conventional variables makes the block independent of the phase arrangement and on the phase number.In order to be implemented using phase currents as state variables, the stator voltage equation ( 44) is rewritten in the following form: This differential equation directly maps into the block scheme shown in Fig. 9.

Interface with external blocks
The machine block shown in Fig. 9 accepts "conventional voltages" v s as inputs and provides "conventional currents" i s as outputs.The actual machine phases, however, are not arranged according to the conventional multiphase scheme assumed for unification purposes as per 3.1.Therefore, for the machine block to communicate with external blocks, it is necessary to "reorder" or "permute" conventional variable vectors to obtain the vectors of the physical (or natural) phase voltages and currents.Moreover, external blocks interfaced with the machine model are often representative of power electronics equipment since it is very unusual that a multiphase machine is directly c o n n e c t e d t o t h e g r i d o r t o p a s s i v e l o a d s .Power electronics blocks, used to simulate inverters or converters, are generally built using SimPowerSystems library items.As a result, the "stator interface" block appearing in Fig. 8 is added to perform these two tasks (the internal block structure is shown in Fig. 10): 1. Machine variable transformation between "conventional" and "natural" coordinate systems.

Conversion of machine phase voltages and currents from plain Simulink signals into
SimPowerSystems bus attributes.The former task is performed by means of the permutation matrices W introduced in 3.1 and 3.2.The latter task is performed making use of one ideal current generator block and one voltage measurement block per machine phase.More precisely, the voltage across each machine phase is measured and used to build the natural phase voltage vector, which will be then transformed into the conventional phase voltage vector through matrix W. The natural phase currents which come from the machine model, instead, are imposed to flow across their relative phase bus by means of the ideal current generators.

Model parameterization, initialization and adaptation to different multiphase machines
The advantage of the multiphase machine model implementation presented in this Chapter is that it can be easily parametrized and initialized so as to adapt it to simulate various kinds of multiphase machines, differing by the number and geometrical arrangement of the phases.

Parametrization
The input parameters which the user has to define, as far as the stator portion of the model is concerned, are the following: a.The number of phases b.The phase arrangement, to be chosen among the types described in Section 2. Typically: n-phase symmetrical or asymmetrical, in the latter case specifying the number N of winding sections and the number m of phases per section.c.The phase resistance r, to be used to build the diagonal resistance matrix R as per (28).d.The phase harmonic inductances (31), to build the diagonal transformed inductance matrix (30).

Initialization
The initialization can be performed through a Matlab script run only once at the beginning of the simulation.The script performs the following tasks:

Fig. 2 .
Fig. 2. Example of a two-pole 5-phase electric machine where each phase has coil groups shifted by π electrical radians

Fig. 5 .Fig. 6 .
Fig. 5. Mapping of a triple-star winding (a) into a symmetrical 9-phase scheme with 2π/9 phase progression (b); a dual-star winding (c) cannot be mapped into any symmetrical 6-phase scheme with 2π/6 phase progression y indicates a generic phase variable, such as a current, voltage or flux linkage and superscript t indicates transposition.It can be easily seen that the following relationships must hold for the windings (a), (c) to be respectively equivalent to windings (b), (d) in Fig.7 symbol x k , with x ∈ {v, i, φ, e} and k ∈ {0, 1,…, n−1} represents the k th phase voltage (v), current (i), flux linkage (φ) or e.m.f.due to the rotor (e).The resistance matrix R is the n×n diagonal matrix having all its diagonal elements equal to phase resistance r: and current vectors are linked by the stator inductance matrix L which, for salient-pole machines, is a function of the rotor position x.

Fig. 8 .
Fig. 8. Block scheme of the Simulink implementation of the multiphase machine model

Fig. 9 .
Fig. 9. Internal structure of the model "Multiphase machine Simulink model in conventional variables"

Fig. 10 .
Fig. 10.Internal structure of the stator interface block