0% found this document useful (0 votes)
64 views10 pages

Circuit Theory-Ii: Ms. Mariam Gul

The document summarizes tasks and examples from Circuit Theory-II class. It includes MATLAB scripts and outputs for 6 tasks: 1) Plotting voltage and current curves for an RL circuit where the current leads voltage by 90 degrees, 2) Plotting and comparing instantaneous power curves for circuits from examples 1 and 2, 3) Proving that the summation of voltages and currents is zero in a three-phase circuit, 4) Finding the current and voltage in a circuit using matrix inversion, 5) Calculating line voltages and currents between a Y-connected generator and Y-connected load.

Uploaded by

Muhammad Imran
Copyright
© Attribution Non-Commercial (BY-NC)
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)
64 views10 pages

Circuit Theory-Ii: Ms. Mariam Gul

The document summarizes tasks and examples from Circuit Theory-II class. It includes MATLAB scripts and outputs for 6 tasks: 1) Plotting voltage and current curves for an RL circuit where the current leads voltage by 90 degrees, 2) Plotting and comparing instantaneous power curves for circuits from examples 1 and 2, 3) Proving that the summation of voltages and currents is zero in a three-phase circuit, 4) Finding the current and voltage in a circuit using matrix inversion, 5) Calculating line voltages and currents between a Y-connected generator and Y-connected load.

Uploaded by

Muhammad Imran
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 10

CIRCUIT THEORY-II

Ms. Mariam Gul


Muhammad Imran Lakha
TASKS LAB 1
TASKS LAB 2
TASK 2.1:
Plot the curve of voltage and current same as in 2.1, just the current is leading 90 degrees
using MATLAB.
MATLAB SCRIPT:
clear all; close all; clc;
t=0:0.5e-3:20e-3;
i=5*cos(377*t);
a_rad=(90*pi/180);
v=20*cos(377*t-a_rad);
plot(t,v,'r',t,i,'b');
title('Voltage and Current of RL Circuit');
xlabel('Seconds');
ylabel('Voltage(V) and Current (mA)');
legend('v','i');
grid;
hold;
GRAPHICAL OUTPUT:

Voltage and Current of RL Circuit


20
v
15 i

10
Voltage(V) and Current (mA)

-5

-10

-15

-20
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
Seconds
TASK 2.2:
Plot instantaneous power for the voltage and current given in exercise 2.1 and 2.1 task and
compare it with the instantaneous power of example 2.2. Write a brief analysis on the three
plots using MATLAB.
MATLAB SCRIPT:
clear all; close all; clc;
t=0:0.5e-3:20e-3;
v1=20*cos(377*t);
a_rad1=(60*pi/180);
i1=5*cos(377*t-a_rad1);
p1=v1.*i1;
i2=20*cos(377*t);
a_rad2=(90*pi/180);
v2=5*cos(377*t-a_rad2);
p2=v2.*i2;
v3=20*cos(377*t);
i3=5*cos(377*t);
p3=v3.*i3;
plot(t,p1,'r',t,p2,'b',t,p3,'g');
xlabel('seconds');
ylabel('Power');
legend('Example 2.1','Task 2.1','Example 2.2');
grid;
hold;
GRAPHICAL OUTPUT:

100
Example 2.1
Task 2.1
Example 2.2

50
Power

-50
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
seconds

TASK2.3
Prove that the summation of voltage and current in three phase circuit is zero.
MATLAB SCRIPT
clear all; close all; clc;
t=0:1e-4:200e-4;
f=60;
x=2*pi*f*t;
v1=10*sin(x);
v2=10*sin(x-2*pi/3);
v3=10*sin(x+2*pi/3);
vt=v1+v2+v3;
plot(t,vt,t,v1,t,v2,t,v3);
legend('total');
hold;
i1=5*sin(x);
i2=5*sin(x-2*pi/3);
i3=5*sin(x+2*pi/3);
it=v1+v2+v3;
plot(t,it,t,i1,t,i2,t,i3);
legend('total');
hold;
fprintf('the sum of the voltages will be %f ',vt);
fprintf('the sum of the currents will be %f ',it);
GRAPHICAL OUTPUT

10
total
8

-2

-4

-6

-8

-10
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02

TASK2.5
For the circuit shown in Figure, find the current i 1(t) and the voltage VC (t) by MATLAB.
(Hint: I.= inv (Z.)*V)
MATLAB SCRIPT

clear all;close all;clc;


Z = [10-7.5*j -6+5*j;-6+5*j 16+3*j];
y=2*exp(j*pi*(-105/180));
V = [5;y];
I = inv(Z)*V;
I1_abs=abs(I(1));
I1_ang=angle(I(1))*180/pi;
Vct=(-10*j)*(I(1)-I(2));
Vct_abs=abs(Vct);
Vct_ang=angle(Vct);
fprintf('current i(t), magnitude: %f \n angle in degrees: %f \n',I1_abs,I1_ang);
fprintf('voltage Vc(t), magnitude: %f \n angle in degrees: %f \n',Vct_abs,Vct_ang);

OUTPUT:
Current i(t), magnitude: 0.387710
Angle in degrees: 15.019255
Voltage Vc(t), magnitude: 4.218263
Angle in degrees: -0.713171
TASK 2.6:
A Y-connected balanced three-phase generator with an impedance of 0.4+j0.3 per phase is
connected Y connected balanced load with an impedance of 24 + j19 per phase. The line
joining the generator and the load has an impedance of 0.6 + j0.7 per phase. Assuming a
positive sequence for the source voltages and that Van = 120 30o V, find: (a) the line
voltages & the line currents using MATLAB.
MATLAB SCRIPT:
clear all; close all; clc;
Van=103.92+60i; %source voltage
Zt=25+20i; %Total Impedance: sum of impedances of Transmission line, Load and Source
Generator
Ian=Van/Zt; %Current per Phase
Mag=abs(Ian);
Ang1=angle(Ian)*180/pi;
Ang2=(angle(Ian)*180/pi)-120;
Ang3=(angle(Ian)*180/pi)-240;
fprintf('Magnitude of line current will be %f Amps\n Angle of 1st phase will be %f \n Angle
of 2nd phase will be %f\n Angle of 3rd phase will be %f \n',Mag,Ang1,Ang2,Ang3);
Vl=1.732*Van;
Magv=abs(Vl);
Ang4=angle(Vl)*180/pi+30;
Ang5=angle(Vl)*180/pi+30-120;
Ang6=angle(Vl)*180/pi+30-240;
fprintf('Magnitude of line voltage will be %f Volts\n Angle of 1st line will be %f \n Angle of
2nd line will be %f\n Angle of 3rd line will be %f \n',Magv,Ang4,Ang5,Ang6);

OUTPUT:
Magnitude of line current will be 3.748088 Amps
Angle of 1st phase will be -8.659080
Angle of 2nd phase will be -128.659080
Angle of 3rd phase will be -248.659080
Magnitude of line voltage will be 207.835427 Volts
Angle of 1st line will be 60.000728
Angle of 2nd line will be -59.999272
Angle of 3rd line will be -179.999272

You might also like