TomSym Winding Factor of Electrical Machines
From TomWiki
Jump to navigationJump to search
This page is part of the TomSym Manual. See TomSym Manual. |
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
% Variable bounds
cbnd = {1 <= q <= 10};
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};
Nz = 2*ms*q*p;
alfae = (2*pi*p)/Nz;
% Slots pitch
tauz = Nz/(2*p); % == ms*q
s = tauz - ns;
eqs = {
(q * sin( alfae / 2)) * kz1 == sin(q * alfae / 2)
ks1 == sin((s * pi) / (tauz * 2))
kw1 == ks1 * kz1
(q * sin(3 * alfae / 2)) * kz3 == sin(3 * q * alfae / 2)
ks3 == sin((3 * s * pi) / (tauz * 2))
kw3 == ks3 * kz3
(q * sin(5 * alfae / 2)) * kz5 == sin(5 * q * alfae / 2)
ks5 == sin((5 * s * pi) / (tauz * 2))
kw5 == ks5 * kz5
kw == kw3^2 + kw5^2
};
options = struct;
options.name = 'WindFac';
options.solver = 'KNITRO';
guess = {ks1 == 0.5, ks3 == 0.5, ks5 == 0.5};
solution = ezsolve(kw,{cbnd;eqs},guess,options);
Problem type appears to be: minlp Time for symbolic processing: 1.3025 seconds Starting numeric solver ===== * * * =================================================================== * * * TOMLAB - TOMLAB Development license 999007. Valid to 2011-12-31 ===================================================================================== Problem: --- 1: WindFac f_k 0.254487291710305760 sum(|constr|) 0.000000042299732786 f(x_k) + sum(|constr|) 0.254487334010038540 f(x_0) 0.000000000000000000 Solver: KNITRO. EXIT=0. INFORM=0. Default MINLP KNITRO Locally optimal solution found FuncEv 32 GradEv 30 HessEv 23 ConstrEv 28 ConJacEv 28 ConHessEv 23 CPU time: 0.078000 sec. Elapsed time: 0.068000 sec.