# How to define your own winding distribution?

### Winding connection matrix definition

In MANATEE software, any polyphase winding topology can be implemented by directly defining the so-called connection matrix. This winding matrix can be used for the stator or for the rotor, for any type (DC, AC, squirrel cage, setc).

This connection matrix represents how the winding is magnetically positioned inside slots for each phase. The slot area is split in several regions corresponding to different winding layers. By definition, the winding connection matrix shape is: (Nlay_rad, Nlay_tan, Zs, qs) with

• Nlay_tan: number of orthoradial layer (circumferential, in trigonometric direction)
• Zs: number of lamination slots
• qs: number of phase

The winding layer coordinates are defined this way :

Winding connection matrix layer coordinate definition

The slot coordinates are defined this way :

Winding connection matrix Slot coordinate definition

The winding connection matrix is a matrix of relative integers to accound for current direction and number of turns. 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 positive, a positive current is flowing toward us (positive z-axis of MANATEE geometrical convention).

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

### Example

For this example, the winding of the following machine is implemented (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.