# How to define your own winding distribution?

### Winding connection matrix definition

In MANATEE Software, the winding connection matrix is a matrix that represents the way the winding is placed inside the Slots (winding distribution). The slot’s winding can be split in several layer according to the dimension of the matrix. By definition this matrix shape is : (Nlay_rad, Nlay_tan, Zs, qs) with

• Nlay_tan : The number of orthoradial layer
• Zs : The number of Slot of the stator
• qs : The number of phase

The layer coordinate are defined this way :

Winding connection matrix layer coodinate definition

The slot coordinate are defined this way :

Winding connection matrix Slot coordinate definition

The winding connection matrix is a matrix of relative integer. wind_mat[a,b,c,d] is the number of coil turns Ntcoil in the layer (a,b) of the Slot n°c for the phase d.

If the number of turns is >0, the winding is going toward us. Else, the winding is going inside the slot.

The sum of all element of the winding connection matrix for any phase is null.

### Example

For this example, we will implement the winding of this machine (extract from : Prieto, B.; Martinez-Iturralde, M.; Fontan, L.; Elosegui, I., "Analytical Calculation of the Slot Leakage Inductance in Fractional-Slot Concentrated-Winding Machines," Industrial Electronics, IEEE Transactions on , vol.62, no.5, pp.2742,2752, May 2015)

2x2 layers winding example

There is the code to define this winding :

```Input.Magnetics.type_winding1 = 0; wind_mat0(1,1,:,:)=[1 0 0 0 0 1 -1 0 0 0 0 -1; 0 1 -1 0 0 0 0 -1 1 0 0 0; 0 0 0 -1 1 0 0 0 0 1 -1 0]'; wind_mat0(2,1,:,:)=[1 -1 0 0 0 0 -1 1 0 0 0 0; 0 0 -1 1 0 0 0 0 1 -1 0 0; 0 0 0 0 1 -1 0 0 0 0 -1 1]'; wind_mat0(1,2,:,:)=[0 0 0 0 -1 1 0 0 0 0 1 -1; -1 1 0 0 0 0 1 -1 0 0 0 0; 0 0 1 -1 0 0 0 0 -1 1 0 0]'; wind_mat0(2,2,:,:)=[1 0 0 0 0 1 -1 0 0 0 0 -1; 0 1 -1 0 0 0 0 -1 1 0 0 0; 0 0 0 -1 1 0 0 0 0 1 -1 0]'; Input.Magnetics.wind_mat=wind_mat0;```

We obtain the following results :

MANATEE plot_wind result

### Other winding definition

Besides directly specifying your winding connection matrix, it can be imported from Koil file or imported as a .mat file.