0% found this document useful (0 votes)
45 views4 pages

Transformer Design Code

The document is a MATLAB script for transformer design that calculates various parameters such as core dimensions, winding specifications, and equivalent circuit parameters based on user inputs for KVA rating, voltage, frequency, and other design factors. It includes calculations for both low voltage and high voltage windings, as well as tank dimensions and cooling methods based on the KVA rating. The script outputs essential design metrics including dimensions, resistance values, and cooling method recommendations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views4 pages

Transformer Design Code

The document is a MATLAB script for transformer design that calculates various parameters such as core dimensions, winding specifications, and equivalent circuit parameters based on user inputs for KVA rating, voltage, frequency, and other design factors. It includes calculations for both low voltage and high voltage windings, as well as tank dimensions and cooling methods based on the KVA rating. The script outputs essential design metrics including dimensions, resistance values, and cooling method recommendations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

18/3/25 1:04 AM C:\Users\ri...\MATLABtransformerDesign.

m 1 of 4

clc;clear;
S=input('Enter the value of KVA rating = ' ); % S is the value of KVA rating
f=input('Enter nominal frequency = '); % f is the frequency
Vp=input('Enter the primary voltage = ' ); % Vp is the primary voltage
Vs=input('Enter the secondary voltage = ' ); % Vs is the secondary voltage
Contype=input('Enter the connection type = ' ,'s'); % This is for connection type
AmbTemp=input('Enter the ambient temperature = ' );
MaxTem=input('Enter the maximum allowable temperature = ' );
off_load_Tap_changer_percentage=input( 'Enter off-load tap changer percentage =
','s');
k=input('Enter k the value of voltage per turn constant = ' );

% Core design
Et=k*sqrt(S);
Bm=input('Enter the value of magnetic flux density = ' );
Ai=Et/(4.44*f*Bm); % Ai is the net area of iron in mm2
d=sqrt(Ai/0.6); % Diameter of circumscribing circle Ai=0.6*d^2 (for 3 stepped)
a=0.9*d; % Width of largest stamping
kw=input('Enter the value of the winding factor = ' );
CD=input('Enter the value of current density (A/mm2) = ' );
Aw=S*1e3/(3.33*f*Bm*kw*CD*1e6*Ai); % s=3.33*f*Bm*kw*CD*Aw*Ai*0.001 Aw=Window area in
mm2
r1=3; % The ratio of window height to window width varies from 2-4
Ww=sqrt(Aw/r1); % Aw=Hw*Ww-ki*Ww2 width of window in mm
Hw=sqrt(r1*Ww); % Height of window in mm
D=Ww+d; % Distance between adjacent limbs
hy=1.2*a; % Distance between window and the roof
H=Hw+2*hy; % Height of the core
W=2*D+a; %Width of the core

% Winding design
Vsph=Vs/sqrt(3); % Secondary per phase voltage
Tlv=Vsph/Et; % No. of turns for low voltage
Tlvact=round(Tlv);
Is=S*1000/(3*Vsph); % Secondary phase current
As=Is/CD; % Area of secondary conductor in mm2

if As>10
acl=sqrt(As); % Width of conductor in mm
aclact=acl+2; % Actual width = the width + the insulation in mm
b1=aclact/1000; % Actual width = the width + the insulation in meter
doutlv=(d*100)+2+((aclact*0.1)*2); % in cm
dinlv=(d*100)+2; % in cm
Lclv=Tlvact*0.1*aclact;
Condw=aclact;
disp('Rectangular cond. for LV');
else
dcl=sqrt(4*As/pi); % Diameter of conductor in mm
dclact=dcl+2; % Actual diameter = diameter + insulation in mm
18/3/25 1:04 AM C:\Users\ri...\MATLABtransformerDesign.m 2 of 4

b1=dclact/1000; % Actual width = width + insulation in meter


doutlv=(d*100)+2+((dclact/10)*2);
dinlv=(d*100)+2;
Lclv=Tlvact*dclact;
Condw=dclact;
disp('Circular cond. for LV ');
end

Vpph=Vp/sqrt(3); % Primary per phase voltage


Thv=Vpph/Et; % No. of turns for high voltage
Thvact=round(Thv);
Ip=S*1000/(3*Vpph); % Secondary phase current
Ap=Ip/CD; % Area of secondary conductor in mm2
frx=(Thvact/100);
fr=floor(frx);

if Ap>10
ach=sqrt(Ap); % Width of conductor in mm
achact=ach+2; % Actual width = the width + the insulation in mm
b2=achact/1000; % Actual width = the width + the insulation in meter
dinhv=doutlv+(2*3); % dinhv=doutlv+2*a assuming a = 3
douthv=dinhv+2+(2*10*(achact/10));
lhun=(10*(achact/10))+2;
lrem=(fr*(achact/10))+2;
ltap=(S*(achact/10))+2;
Lchv=(fr*lhun)+lrem+ltap;
Cond1=achact;
disp('Rectangular cond. for HV ');
else
dch=sqrt(4*As/pi); % Diameter of conductor in mm
dchact=dch+2; % Actual diameter= diameter + insulation in mm
b2=dchact/1000; % Actual width = width + insulation in meter
DINHV=doutlv+(2*3); % dinhv=doutlv+2*a assuming a=3)
douthv=dinhv+2+(2*10*(dchact/10));
lhun=(10*(dchact/10))+2;
lrem=(fr*(dchact/10))+2;
ltap=(S*(dchact/10))+2;
Lchv=(fr*lhun)+lrem+ltap;
Cond1=dchact;
disp('Circular cond. for HV ');
end

% Calculation of equivalent circuit parameters


davlv=(dinlv+doutlv)/2;
lmtlv=(pi*davlv)/100; % in meter
Rlv=(0.021*Tlvact*lmtlv)/As;

davhv=(dinhv+douthv)/2;
lmthv=(pi*davhv)/100; % in meter
18/3/25 1:04 AM C:\Users\ri...\MATLABtransformerDesign.m 3 of 4

Rhv=(0.021*Thvact*lmthv)/Ap;

Reqlv=Rlv+Rhv*((Tlvact/Thvact)^2);
Reqhv=Rhv+Rlv*((Thvact/Tlvact)^2);

Lc=0.5*(Lchv+Lclv)/100;
dav=0.5*(dinlv+douthv);
Lmt=(pi*dav)/100;
acl=4/100; % Clearance between HV and LV + insulation in meter
Xeq=2*pi*f*(pi*0.0000004)*((Thvact)^2)*(Lmt/Lc)*(acl+0.5*(b1+b2));
Zeq=sqrt((Reqhv)^2)*((Xeq)^2);
Zbase=Vp/Ip;
Zeqpu=(Zeq/Zbase)*100; % in percentage

if Zeqpu<=10
disp('Accepted Zeq');
else
disp('Not accepted Zeq');
end

% Tank dimensions
if Vp>66000
Dt=0.32;
else
Dt=0.12;
end
X=2*Dt+(douthv/100); % X: Tank length
Y=W+2*Dt+(douthv/100)-a; % Y: Tank width
m=H;
Z=m+0.5; % Tank height

if S<= 20
disp('Cooling method is AN (Air Natural)' );
elseif (S>20) && (S<=50)
disp('Cooling method is AB (Air Blast)' );
elseif (S>50) && (S<=10000)
disp('Cooling method is ON (Oil Natural)' );
elseif (S>10000) && (S<=15000)
disp('Cooling method is OB (Oil Blast)' );
elseif (S>15000) && (S<=25000)
disp('Cooling method is OFN (Oil Forced Natural)' );
elseif (S>25000) && (S<=60000)
disp('Cooling method is OFB (Oil Forced Blast)' );
else
disp('Cooling method is OFW (Oil Forced Water)' );
end

fprintf('H=%6.5f\n',H);
fprintf('D=%6.5f\n',D);
18/3/25 1:04 AM C:\Users\ri...\MATLABtransformerDesign.m 4 of 4

fprintf('W=%6.5f\n',W);
fprintf('Tlv=%6.5f\n',Tlvact);
fprintf('Area LV=%6.5f\n',As);
fprintf('Length and width of LV cond.=%6.5f\n' ,Condw);
fprintf('doutlv=%6.5f\n',doutlv);
fprintf('dintlv=%6.5f\n',dinlv);
fprintf('Lclv=%6.5f\n',Lclv);
fprintf('Thv=%6.5f\n',Thvact);
fprintf('Area HV=%6.5f\n',Ap);
fprintf('Conductor diameter=%6.5f\n',Cond1);
fprintf('l 100 turns=%6.5f\n',lhun);
fprintf('dinhv=%6.5f\n',dinhv);
fprintf('douthv=%6.5f\n',douthv);
fprintf('Lchv=%6.5f\n',Lchv);
fprintf('Rlv=%6.5f\n',Rlv);
fprintf('Rhv=%6.5f\n',Rhv);
fprintf('Reqlv=%6.5f\n',Reqlv);
fprintf('Reqhv=%6.5f\n',Reqhv);
fprintf('Xeq=%6.5f\n',Xeq);
fprintf('Zeq=%6.5f\n',Zeq);
fprintf('Tank depth=%6.5f\n',X);
fprintf('Tank width=%6.5f\n',Y);
fprintf('Tank height=%6.5f\n',Z);

You might also like