Winding Factor of Electrical Machines

TomSym implementation of GAMS Example (WINDFAC, SEQ=224)

This model determines the optimal winding factor for electrical machines.

Michna, M, and Gdanska, P, Winding Factor of Electrical Machines, 1984.

clear mex % minlpBB sometimes needs this

ms = 3; % number of phases
p  = 2; % number of pole pairs
K  = 5; % harmonic order
ns = 1; % coil span
clear pi

%     q:  number of slots per one phase and per one pole
%     Nz: number of slots
%     s:  span

toms integer q Nz s

% Variable bounds
cbnd = {1 <= q <= 10
    1 <= Nz
    1 <= s};

toms kz1 kz3 kz5 ks1 ks3 ks5 % coil-group factor (1-3) coil-span factor
toms kw kw3 kw5 % winding factor
toms kw1 % inding factor for first harmonic

% kw1 bound
cbnd = {cbnd; 0.8 <= kw1};

eq = {Nz == 2*ms*q*p};

alfae = (2*pi*p)/Nz;

% Slots pitch
tauz = Nz/(2*p);

eq = {eq; s == tauz - ns};

eq = {eq; (q * sin( alfae / 2)) * kz1 == sin(q * alfae / 2)};

eq = {eq; ks1 == sin((s * pi) / (tauz * 2))};

eq = {eq; kw1 == ks1 * kz1};

eq = {eq; (q * sin(3 * alfae / 2)) * kz3 == sin(3 * q * alfae / 2)};

eq = {eq; ks3 == sin((3 * s * pi) / (tauz * 2))};

eq = {eq; kw3 == ks3 * kz3};

eq = {eq; (q * sin(5 * alfae / 2)) * kz5 == sin(5 * q * alfae / 2)};

eq = {eq; ks5 == sin((5 * s * pi) / (tauz * 2))};

eq = {eq; kw5 == ks5 * kz5};

eq = {eq; kw == kw3 * kw3 + kw5 * kw5};

solution = ezsolve(kw,{cbnd;eq});
Problem type appears to be: minlp
===== * * * =================================================================== * * *
TOMLAB - Tomlab Optimization Inc. Development license  999001. Valid to 2010-02-05
=====================================================================================
Problem: ---  1:                                f_k       0.254487298107780480
                                       sum(|constr|)      0.000000000000000056
                              f(x_k) + sum(|constr|)      0.254487298107780540
                                              f(x_0)      0.000000000000000000

Solver: minlpBB.  EXIT=0.  INFORM=0.
Dense Branch and Bound MINLP
Optimal integer solution found

FuncEv   32 GradEv   38 HessEv   31 ConstrEv   37 ConJacEv   37 ConHessEv   31 Iter    7 
CPU time: 0.156250 sec. Elapsed time: 0.187000 sec.