0% found this document useful (0 votes)
51 views

Experiment No: 1: Function

The document contains summaries of 8 experiments related to power analysis of single and three phase AC circuits: 1. Experiment 1 analyzes power in a single phase circuit by calculating voltage, current, active power, reactive power and apparent power. 2. Experiment 2 analyzes voltages and currents in a three phase circuit connected in both star and delta configurations. 3. Experiment 3 analyzes a three loop circuit by calculating branch currents, voltages, and powers using matrix methods. 4. Experiment 4 evaluates the bus incidence matrix for a 5 bus system. 5. Experiment 5 evaluates the branch path incidence matrix for the 5 bus system. 6. Experiment 6 evaluates the basic cut set incidence matrix and basic loop incidence

Uploaded by

Sonali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Experiment No: 1: Function

The document contains summaries of 8 experiments related to power analysis of single and three phase AC circuits: 1. Experiment 1 analyzes power in a single phase circuit by calculating voltage, current, active power, reactive power and apparent power. 2. Experiment 2 analyzes voltages and currents in a three phase circuit connected in both star and delta configurations. 3. Experiment 3 analyzes a three loop circuit by calculating branch currents, voltages, and powers using matrix methods. 4. Experiment 4 evaluates the bus incidence matrix for a 5 bus system. 5. Experiment 5 evaluates the branch path incidence matrix for the 5 bus system. 6. Experiment 6 evaluates the basic cut set incidence matrix and basic loop incidence

Uploaded by

Sonali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

EXPERIMENT NO: 1

% Power analysis for single phase circuit Expriment No : 1


function SPACCPA(f,V,R,XL,XC)
% Distribution of power in single
% phase circuit
% f = 50;
% V = 230;
% R = 4;
% XL = 1.5;
Z = complex(R , XL-XC);
theta = atan((XL-XC)/R);
I = V / abs(Z);
S = V*(-I);
t = 0:0.0001:0.06;
wt = 2*pi*f.*t;
Vi = complex(V * sqrt(2) .* cos(wt) , V * sqrt(2) .* sin(wt));
Ii = Vi ./ Z;
Viim = imag(Vi);
Iiim = imag(Ii);
subplot(2, 2, 1); plot(Viim);hold all;plot(Iiim);plot(t);hold off;figure(gcf);
title('Instantaneous voltage and current');
Si = (Vi .* Ii);
Siim = imag(Si);
subplot(2, 2, 3); plot(Siim);
title('Apparent power');
Pi = S .* cos(theta) .* (cos(2 .* wt) - 1);
Qi = S .* sin(theta) .* (sin(2 .* wt));
subplot(2, 2, 4); plot(Pi);
title('Active power');
subplot(2, 2, 2); plot(Qi);
title('Reactive power');
subplot(2, 2, 3); plot(Pi + Qi);
title('Apparent power');
end

EXPERIMENT NO:2
function TPACCPA(f,V,R,XL,XC,gen_conn,load_conn)
Rr = R(1);
XLr = XL(1);
XCr = XC(1);
Zr = complex(Rr , XLr-XCr);
Ry = R(2);
XLy = XL(2);
XCy = XC(2);
Zy = complex(Ry , XLy-XCy);
Rb = R(3);
XLb = XL(3);
XCb = XC(3);
Zb = complex(Rb , XLb-XCb);
t = 0:0.0001:0.06;
wt = 2*pi*f.*t;
if strcmp(gen_conn , 'star') && strcmp(load_conn , 'star')
Vri = complex(V * sqrt(2) .* cos(wt) , V * sqrt(2) .* sin(wt));
Iri = Vri ./ Zr;
Vrim = imag(Vri);
Irim = imag(Iri);
Vyi = complex(V * sqrt(2) .* cos(wt-(2*pi/3)) , V * sqrt(2) .* sin(wt-(2*pi/3)));
Iyi = Vyi ./ Zy;
Vyim = imag(Vyi);
Iyim = imag(Iyi);
Vbi = complex(V * sqrt(2) .* cos(wt-(4*pi/3)) , V * sqrt(2) .* sin(wt-(4*pi/3)));
Ibi = Vbi ./ Zb;
Vbim = imag(Vbi);
Ibim = imag(Ibi);
hold all;plot(Vrim);plot(Vyim);plot(Vbim);plot(Iyim);plot(Irim);plot(Ibim);hold
off;figure(gcf);
elseif strcmp(gen_conn , 'star') && strcmp(load_conn , 'delta')
Vri = complex(V * sqrt(2)* sqrt(3) .* cos(wt) , V * sqrt(2)* sqrt(3) .* sin(wt));
Iri = Vri ./ Zr;
Vrim = imag(Vri);
Irim = imag(Iri);
Vyi = complex(V * sqrt(2)* sqrt(3) .* cos(wt-(2*pi/3)) , V * sqrt(2)* sqrt(3) .*
sin(wt-(2*pi/3)));
Iyi = Vyi ./ Zy;

Vyim = imag(Vyi);
Iyim = imag(Iyi);
Vbi = complex(V * sqrt(2)* sqrt(3) .* cos(wt-(4*pi/3)) , V * sqrt(2)* sqrt(3) .*
sin(wt-(4*pi/3)));
Ibi = Vbi ./ Zb;
Vbim = imag(Vbi);
Ibim = imag(Ibi);
hold all;plot(Vrim);plot(Vyim);plot(Vbim);plot(Iyim);plot(Irim);plot(Ibim);hold
off;figure(gcf);
elseif strcmp(gen_conn , 'delta') && strcmp(load_conn , 'star')
elseif strcmp(gen_conn , 'delta') && strcmp(load_conn , 'delta')
end

EXPERIMENT NO: 3
% Analysis of three loop circuit Experiment No: 3
Eg1 = 150;
Eg2 = complex(170*cos(pi/36),170*sin(pi/36));
Z1 = 2+0.5i;
Z2 = 3+1i;
Z3 = 4+2i;
Z4 = 8-6i;
Z5 = 10+4i;
coff_mtrx = [Z1,Z2,0;Z3,-(Z2+Z3),Z4;Z5,-Z5,-(Z4+Z5)];
% inv_coff = inv(coff_mtrx);
emf_mtrx = [Eg1;0;Eg2];
% curr_mtrx = inv_coff * emf_mtrx;
curr_mtrx = coff_mtrx\ emf_mtrx;
Iz1 = curr_mtrx(1);
Iz2 = curr_mtrx(2);
Iz3 = Iz1 - Iz2;
Iz4 = curr_mtrx(3);
Iz5 = Iz1 - Iz2 - Iz4;
Vz1 = Iz1 * Z1;
Vz2 = Iz2 * Z2;
Vz3 = Iz3 * Z3;
Vz4 = Iz4 * Z4;
Vz5 = Iz5 * Z5;
Sz1 = Iz1^2 * Z1;
Sz2 = Iz2^2 * Z2;
Sz3 = Iz3^2 * Z3;
Sz4 = Iz4^2 * Z4;
Sz5 = Iz5^2 * Z5;
Sts = Eg1*Iz1+Eg2*Iz5;
Stc = Sz1 + Sz2 + Sz3 + Sz4 + Sz5;
[Eg2a Eg2m] = cart2pol(real(Eg2),imag(Eg2));
[Iz1a Iz1m] = cart2pol(real(Iz1),imag(Iz1));
[Iz2a Iz2m] = cart2pol(real(Iz2),imag(Iz2));
[Iz3a Iz3m] = cart2pol(real(Iz3),imag(Iz3));
[Iz4a Iz4m] = cart2pol(real(Iz4),imag(Iz4));
[Iz5a Iz5m] = cart2pol(real(Iz5),imag(Iz5));

EXPERIMENT NO: 4
% Evaluation of Bus incidence singular matrix Experiment No : 4
% nd = [1 2 3 4 5];
% br = [nd(1), nd(2);nd(1), nd(3);nd(1), nd(5);nd(5) nd(4)];
% lk = [nd(3), nd(4);nd(2), nd(3);nd(3), nd(5)];
nd = [1 2 3 4 5];
br = [nd(1), nd(2);nd(1), nd(3);nd(3), nd(4);nd(3) nd(5)];
lk = [nd(2), nd(3);nd(2), nd(4);nd(4), nd(5)];
e = [br;lk];
columns = size(nd,2);
rows = size(e,1);
j = 1;
for m = j:rows
i = 1;
for n = i:columns
if m <= size(br,1)
stnd = br(m,1);
fnnd = br(m,2);
else
stnd = lk(m-size(br,1),1);
fnnd = lk(m-size(br,1),2);
end
A(m,stnd) = 1;
A(m,fnnd) = -1;
end
end
A(:,1) = [];
A

EXPERIMENT NO: 5
% Evaluation of branch path incidence matrix Experiment No : 5
nd = [1 2 3 4 5];
br = [nd(1), nd(2);nd(1), nd(3);nd(1), nd(5);nd(5) nd(4)];
rows = size(br,1);
refnode = nd(1);
j = 1;
for m = j:rows
m
testnode = nd(m+1);
while(testnode ~= refnode)
i = 1;
for n = i:rows
if (testnode ~= refnode)
if (testnode == br(n,1))
K(n,m) = 1;
testnode = br(n,2);
elseif (testnode == br(n,2))
K(n,m) = -1;
testnode = br(n,1);
end
end
end
end
end
K

EXPERIMENT NO: 6
% Evaluation of basic cut set incidence singular matrix Experiment No: 6
nd = [1 2 3 4 5];
br = [nd(1), nd(2);nd(1), nd(3);nd(1), nd(5);nd(5) nd(4)];
lk = [nd(3), nd(4);nd(2), nd(3);nd(3), nd(5)];
e = [br;lk];
columns = size(br,1);
rows = size(e,1);
j = 1;
for m = j:rows
i = 1;
for n = i:columns
if m <= size(br,1)
stnd = br(m,1);
fnnd = br(m,2);
else
stnd = lk(m-size(br,1),1);
fnnd = lk(m-size(br,1),2);
end
A(m,stnd) = 1;
A(m,fnnd) = -1;
end
end
A(:,1) = [];
A;
Ab = A(1:4,:);
Al = A(5:7,:);
rows = size(br,1);
refnode = nd(1);
j = 1;
for m = j:rows
m;
testnode = nd(m+1);
while(testnode ~= refnode)
i = 1;
for n = i:rows
if (testnode ~= refnode)
if (testnode == br(n,1))
K(n,m) = 1;
testnode = br(n,2);
elseif (testnode == br(n,2))

K(n,m) = -1;
testnode = br(n,1);
end
end
end
end
end
K;
Bl = Al * transpose(K);
Bl;
rows = size(A,2);
B = eye(rows);
B = [B;Bl]

EXPERIMENT NO: 7
% Evaluation of basic loop incidence singular matrix Experiment No: 7
nd = [1 2 3 4 5];
br = [nd(1), nd(2);nd(1), nd(3);nd(1), nd(5);nd(5) nd(4)];
lk = [nd(3), nd(4);nd(2), nd(3);nd(3), nd(5)];
e = [br;lk];
columns = size(br,1);
rows = size(e,1);
j = 1;
for m = j:rows
i = 1;
for n = i:columns
if m <= size(br,1)
stnd = br(m,1);
fnnd = br(m,2);
else
stnd = lk(m-size(br,1),1);
fnnd = lk(m-size(br,1),2);
end
A(m,stnd) = 1;
A(m,fnnd) = -1;
end
end
A(:,1) = [];
A;
Ab = A(1:4,:);
Al = A(5:7,:);
rows = size(br,1);
refnode = nd(1);
j = 1;
for m = j:rows
m;
testnode = nd(m+1);
while(testnode ~= refnode)
i = 1;
for n = i:rows
if (testnode ~= refnode)
if (testnode == br(n,1))
K(n,m) = 1;
testnode = br(n,2);
elseif (testnode == br(n,2))

K(n,m) = -1;
testnode = br(n,1);
end
end
end
end
end
K;
Bl = Al * transpose(K);
Cb = -1 * transpose(Bl);
rows = size(Cb,2);
C = eye(rows);
C = [Cb;C]

EXPERIMENT NO: 8
a = complex(-0.5,sqrt(3)/2);
a2 = a * a;
Ts = (1/sqrt(3))*[1 1 1;1 a2 a;1 a a2];
Tscnjt = conj(Ts);
Zs = sym('Zs');
Zm = sym('Zm');
Zstatic = [Zs Zm Zm;Zm Zs Zm;Zm Zm Zs];
Zstatic
Z012s = Ts * Zstatic * Tscnjt;
Z012s = simplify(Z012s);
Z012s
Zm1 = sym('Zm1');
Zm2 = sym('Zm2');
Zrotary = [Zs Zm1 Zm2; Zm2 Zs Zm1; Zm1 Zm2 Zs];
Zrotary
Z012r = Ts * Zrotary * Tscnjt;
Z012r = simplify(Z012r);
Z012r

You might also like