Вы находитесь на странице: 1из 100

Experiment no 1:

AIM: Write a program and simulate dynamical system of following models.


(a) I/O model
(b) State variable model

SOFTWARE REQUIRED: MATLAB

(A) I/O model


Input:
num=[7,9]
den=[6,4]
iomodel=tf(num,den)

Output:
num =
7

den =
6

Transfer function:
7s+9
------6s+4

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

(B) State variable model


Input:
num=[1 2]
den=[3 4]
sys=tf(num,den)
ssvmodel=ss(sys)
Output:
num =
1

den =
3

Transfer function:
s+2
------3s+4
a=

x1

x1 -1.333
b=

u1

x1 0.5
c=

x1

y1 0.4444
d=

u1

y1 0.3333

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Experiment no 2:
AIM: To obtain frequency response of a given system using
A) General method of finding the frequency domain specifications also obtain the gain margin
and phase margin

B) Polar plot
C) Bode plot
SOFTWARE REQUIRED: MATLAB
Input:
%frequency domain analysis of a dynamical system%
clear,clc
close all
num=input('enter the numerator polynomial-->');
den=input('enter the denominator polynomial-->');
sys=tf(num,den)
bode(sys)
grid
[gm pm wg wp]=margin(sys)
margin(sys)
sp=feedback(sys ,1);
[mag phase w]=bode(sp);
[mp k]=max(mag);
resonantpeak=20*log10(mp)
resonantfrequency=w(k)
n=1;
while 20*log(mag(n))>=3
n=n+1;
end
bandwidth=w(n)

Output:
enter the numerator polynomial-->10
enter the denominator polynomial-->[0.004 0.22 1 0]
Transfer function:
10
-----------------------0.004 s^3 + 0.22 s^2 + s

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

gm =
5.5000
pm =
31.7124
wg =
15.8114
wp =
6.2184
resonantpeak =
5.2848
resonantfrequency =
6.4194
bandwidth =
0.1000

Graph:

Bode Diagram
Gm = 14.8 dB (at 15.8 rad/sec) , Pm = 31.7 deg (at 6.22 rad/sec)

Magnitude (dB)

50

-50

-100

-150
-90

Phase (deg)

-135
-180
-225
-270
-1

10

10

10

10

Frequency (rad/sec)

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

10

A. Polar plot
clear all;
num=[1];
den=[1 2 5 2];
[rp,ip,w]=nyquist(num.den);
[rp,ip,w]=nyquist(num,den);
mag=[abs(rp+ip*i)];
ang=[angle(rp+ip*i)];
polar(ang,mag);
[p,q]=margin(num,den);
disp('Gain Margin in linear scale=');
disp(p);
disp('Gain Margin in dB=');
disp(20*log10(p));
disp('phase margin=');
disp(q);
OUTPUT:
Gain Margin in linear scale=
8.0018
Gain Margin in dB=
18.0638
phase margin=
Inf
B. Bode plot
clear all;
num=[0 0 0 1];
den=[1 2 5 2];
sys=tf(num,den)
bode(sys)
[p,q]=margin(num,den);
disp('Gain Margin in linear scale=');
disp(p);
disp('Gain Margin in dB=');

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

disp(20*log10(p));
disp('phase margin=');
disp(q);

OUTPUT:
Gain Margin in linear scale=
8.0018
Gain Margin in dB=
18.0638
phase margin=
Inf

Polar plot:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Bode plot:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Experiment no 3:
AIM: Determine stability of a given dynamical system using following methods
A) Root Locus

B) Bode Plot
C) Nyquist Plot
D) Liapunov stability criteria

SOFTWARE REQUIRED: MATLAB

Input:-

%root locus%
close all
clear,clc
num=input('enter the numerator polynomial-->');
den=input('enter thedenominator polynomial-->');
display('system transfer function is')
g=tf(num,den)
[roots1 gain]=rlocus(g);
rlocus(g)
grid
flag=1;
gi=length(gain);
ti=size(roots1);
ri=ti(1);
for i=1;gi-1
for j=1;ri
if real (roots1(j,i))>=0
disp('system is conditionally stable')
flag==0;
return
end
end
end
if flag==0
break
end
if flag==1
disp('system is stable')
end

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Output:
enter the numerator polynomial-->13
enter thedenominator polynomial-->[1 9 20 0]
system transfer function is
Transfer function:
13
-----------------s^3 + 9 s^2 + 20 s
ans =
16
ri =
3
System is conditionally stable
Graph:

Root Locus
15
0.81

0.7

0.56

0.38

0.2

0.89
10
0.95
5

Imaginary Axis

0.988
25
0

20

15

10

0.988
-5
0.95
-10
0.89
0.81
-15
-25

-20

0.7
-15

0.56

0.38

-10

-5

0.2
0

Real Axis

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

10

B) Bode Plot
Input:
%bode plot%
close all
clear,clc
num=input('enter the numerator polynomial-->');
den=input('enter thedenominator polynomial-->');
display('system transfer function is')
g=tf(num,den)
disp('stability analysis using bode plot')
bode(g)
grid
[gm pm gf pf]=margin(g)
figure
margin(g)
if gm>0 pm>0
disp('system is closed loop stable')
else
disp('system is closed loop unstable')
end
fprintf('phase margin is:%f',pm)
gm=20*log(gm)
fprintf('gain margin is db is:%f',gm)
Output
enter the numerator polynomial-->10
enter thedenominator polynomial-->[0.004 0.22 1 0]
system transfer function is
Transfer function:
10
-----------------------0.004 s^3 + 0.22 s^2 + s
stability analysis using bode plot
gm =
5.5000
pm =
31.7124
gf =
15.8114
pf =
6.2184
ans =
1
system is closed loop stable
phase margin is:31.712404
gm =
34.0950

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

gain margin is db is:34.094962

Bode Diagram
Gm = 14.8 dB (at 15.8 rad/sec) , Pm = 31.7 deg (at 6.22 rad/sec)

Magnitude (dB)

50

-50

-100

-150
-90

Phase (deg)

-135
-180
-225
-270
-1

10

10

10

10

Frequency (rad/sec)

Graph:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

10

C) Nyquist Plot
Input:
%nyquist plot
close all
clear,clc
num=input('enter the numerator polynomial-->');
den=input('enter thedenominator polynomial-->');
display('system transfer function is')
g=tf(num,den)
nyquist(g)
grid
[gm pm gf pf]=margin(g);
if gm>0 pm>0
disp('system is stable')
else
disp('system is unstable')
end
Output
enter the numerator polynomial-->100
enter thedenominator polynomial-->[1 10 100]
system transfer function is
Transfer function:
100
---------------s^2 + 10 s + 100
ans =
1
system is stable

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Graph:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

D) Liapunov stability criteria

INPUT:
%liapunov stability analysis
disp('***liapunov stability analysis***');
% get square matrices A and Q
A=input('enter system matris A=');
Q=input('enter positive definite square matrix A=');
flag=0;
%solve liapunov's equation
P=lyap(A,Q)
% find eigen values of P
[M,E]=eig(P)
eig_length=length(E);
disp('');
for i=1:eig_length
for j=1:eig_length
if (i==j)
if E(i,i)>0
continue;
else
disp('**System is Unstable***');
flag=1
break;
end
else
continue;
end
end
end
if (flag==0)
disp('**system is asymptotically stable in the large at orgin***');
end

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

OUTPUT:
***liapunov stability analysis***
enter system matris A=[-1 1;-2 -4]
enter positive definite square matrix A=[1 0;0 1]
P=
0.3833 -0.1167
-0.1167

0.1833

M=
-0.4179 -0.9085
-0.9085

0.4179

E=
0.1297
0

0
0.4370

**system is asymptotically stable in the large at orgin***

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

4.Transform a given dynamical system from input model to state


variable mode and vice-versa

Aim : To obtain the given dynamical system from input modle to state variable mode
Input:
close all
clear,clc
a=input('enter 1 for tf toss or 2 for ss to tf conversion');
if a==1
num=input('enter the numerator');
den=input('enter the deenominator');
[a b c d]=tf2ss(num,den)
end
if a==2
a=input('enter the system matrix');
b=input('enter the input matrix');
c=input('enter the output matrix');
d=input('enter the transmission matrix');
[num,den]=ss2tf(a,b,c,d)
sys=tf(num,den)
end
Output 1:

enter 1 for tf toss or 2 for ss to tf conversion1


enter the numerator[3 7 15]
enter the deenominator[1 7 14 18]
a=
-7 -14 -18
1 0 0
0 1 0
b=
1
0
0
c=
3

15

d=
0

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Output 2:
enter 1 for tf toss or 2 for ss to tf conversion2
enter the system matrix[0 1 0;0 0 1;-8 -14 -7]
enter the input matrix[0;0;1]
enter the output matrix[15 7 3]
enter the transmission matrix[0]
num =
0

3.0000 7.0000 15.0000

den =
1.0000 7.0000 14.0000 8.0000
Transfer function:
3 s^2 + 7 s + 15
---------------------s^3 + 7 s^2 + 14 s + 8

Result : Hence we obtained the given dynamical system from input model to state variable
modle

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

5.Obtain model matrix of a given system from obtain its diagonalize


From its exists form of system

Aim : To obtain the model matrix of a given system obtain its diagonalize from its exists
form
of system
INPUT:
%modal matrix of a given dynamic system
disp('');
disp('*****MODAL MATRIX OF SQUARE MATRIX A*******');
disp('');
%get user input
num=input('enter numerator of TF=');
den=input('enter denomenator of TF=');
sys=tf(num,den)
[a,b,c,d]=tf2ss(num,den)
[v,d]=eig(a)
disp('');
disp('modal matrix of A is:');
disp(v);
disp('diagonal matrix');
disp(d);
OUTPUT:
*****MODAL MATRIX OF SQUARE MATRIX A*******
enter numerator of TF=[0 0 10 10]
enter denomenator of TF=[1 6 5 10]
Transfer function:
10 s + 10
---------------------s^3 + 6 s^2 + 5 s + 10

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

a=
-6 -5 -10
1

10

10

b=
1
0
0
c=
0
d=
0
v=
0.9828

0.7382

0.7382

-0.1814

-0.1164 - 0.5307i -0.1164 + 0.5307i

0.0335

-0.3632 + 0.1674i -0.3632 - 0.1674i

d=
-5.4178
0

-0.2911 + 1.3270i

-0.2911 - 1.3270i

modal matrix of A is:


0.9828

0.7382

0.7382

-0.1814

-0.1164 - 0.5307i -0.1164 + 0.5307i

0.0335

-0.3632 + 0.1674i -0.3632 - 0.1674i

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

diagonal matrix
-5.4178
0

-0.2911 + 1.3270i

-0.2911 - 1.3270i

Result :
Hence we obtain the model matrix of a given system obtain its diagonalize from its
exists form of system

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Experiment no 6:
AIM: Write a program and implement linear quadratic regulator
Input:
%linear quadratic regulator
disp('LQR Design');
disp('');
%get plant open loop TF
num=input('enter the numerator of plant g(s)=');
den=input('enter the denomenator of plant g(s)=');
%covert to state space model
[A,B,C,D]=ssdata(ss(tf(num,den)));
%get the weighting matrices Q, R and N
Q=input('enter the weighting matrix Q=');
R=input('enter the weighting matrix R=');
N=input('enter the weighting matrix N=');
%design LQR
[k,s,e]=lqr(A,B,Q,R,N);
disp('');
disp('the optimal gain matrix K is:');
disp(k);
disp('');
disp(' the closed loop eigen values are:');
disp(e);
Output:
LQR Design
enter the numerator of plant g(s)=[1 3 6]
enter the denomenator of plant g(s)=[1 2 5]
enter the weighting matrix Q=[1 0;0 1]
enter the weighting matrix R=[1]
enter the weighting matrix N=[1;2]
the optimal gain matrix K is:

0.7592

1.6533

the closed loop eigen values are:

-1.3796 + 2.5305i
-1.3796 - 2.5305i

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

7. COMPENSATOR DESIGN
AIM:
A. Designing a Lag compensator for a system ( )

to meet the specifications

of Kc = 20sec-1, the phase margin is at least 550 and gain margin is at least 12dB. The
compensator is

( )

.
( )

B. Designing a Lead compensator for a system

to meet the

specifications of Kv = 20sec-1, the phase margin is at least 550 and gain margin is at
least 12dB. The compensator is

( )

SOFTWARE REQUIRED: MATLAB


PROGRAM:
A. Lag Compensator
clear all;
num1=[1.36 2.516];
den1=[1 4.95 3.95 0];
roots([14.95 3.95 0]);
sys1=tf(num1,den1) bode(sys1);
sys1=tf(num1,den1);
bode(sys1);
title('Root locus of the system G(s)= 1.36(s+1)/s(s+1)(s+3.95)');
sgrid(0.5,3);
cnum1=[10];
cden1=[1 1 10];
clusys=tf(cnum1,cden1);
cnum=[1.36 2.516];
cden=[1 4.95 5.31 2.516];
clsys=tf(cnum,cden);
figure
step(clusys,clsys);

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

B. Lead Compensator
clear all;
num1=[174 20];
den1=[83.3 167.2 1 0];
roots([83.3 167.2 1 0]);
sys1=tf(num1,den1);
bode(sys1);
margin(sys1);
title('Bode Plot of the system G(s)=20(8.7s+1)/s(0.5s+1)(166.7s=1)');
cnum1=[5];
cden1=[1 2 5];
clusys=tf(cnum1,cden1);
cnum=[174 20];
cden=[83.3 167.2 175 20];
clsys=tf(cnum,cden);
figure
step(clusys,clsys);

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

OUTPUT:
A. Lag Compensator

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

A. Lead Compensator

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

8. POWER FLOW ANALYSIS


AIM: Program to solve the power-flow of 5 Bus, 6 Lines (Ring Network)
PROGRAM:
% This set of equations includes two generator busses.
% Set problem size and initial conditions
n_bus = 5;
swing_bus = 1;
acc_fac = 1.3;
% Specify which busses are generator busses with flags.
% Note that 1 is "true" and 0 is "false" in MATLAB. In
% this example, Bus 2 and 3 are generator busses, and
the others
% are not.
gen_bus = [0 1 1 0 0];
% Create Y-bus
% Initializing Y-bus Parameters
Y12 = -1.508+12.9302i;
Y13 = -1.4857+12.626i;
Y14 = -3.3203+28.264i;
Y15 = 0;
Y21 = -1.508+12.9302i;
Y23 = -1.637+12.626i;
Y24 = 0;
Y25 = -2.198+17.582i;
Y31 = -1.4857+12.626i;
Y32 = -1.637+12.626i;
Y34 = -2.798+23.704i;
Y35 = 0;
Y41 = -3.3203+28.264i;
Y42 = 0;
Y43 = -2.792+23.704i;
Y45 = 0;
Y51 = 0;

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Y52 = -2.198+17.582i;
Y53 = 0;
Y54 = 0;
y12 = 0.477i;
y13 = 0.04883i;
y14 = 0.2185i;
y15 = 0;
y21 = 0.477i;
y23 = 0.581i;
y24 = 0;
y25 = 0.03745i;
y31 = 0.04883i;
y32 = 0.581i;
y34 = 0.2605i;
y35 = 0;
y41 = 0.2185i;
y42 = 0;
y43 = 0.2605i;
y45 = 0;
y51 = 0;
y52 = 0.03745i;
y53 = 0;
y54 = y45;
y10 = y12 + y13 + y14;
y20 = y21 + y23 + y25;
y30 = y31 + y32 + y34;
y40 = y41 + y34;
y50 = y52;
Y11 = -(Y12 + Y13 + Y14) + y10;
Y22 = -(Y21 + Y23 + Y25) + y20;
Y33 = -(Y31 + Y32 + Y34) + y30;
Y44 = -(Y41 + Y43 )+ y40;
Y55 = -Y52 + y50;
% formulate Y-bus
Ybus = [Y11 Y12 Y13 Y14 Y15 ; Y21 Y22 Y23 Y24 Y25;

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Y31 Y32 Y33 Y34 Y35; Y41 Y42 Y43 Y44 Y45 ;
Y51 Y52 Y53 Y54 Y55]
% Initialize the real and reactive power supplied to the
% power system at each bus. Note that the power at the
% swing bus doesn't matter, and the reactive power at the
% generator bus will be re-computed dynamically.
P(2) = 4.53;
P(3) = -0.93;
P(4) = -1.9;
P(5) = -0.66;
Q(2) = 0.0;
Q(3) = 0.0;
Q(4) = -1.02;
Q(5) = -0.95
% Initialize the bus voltages to 1.0 at 0 degrees
for ii = 1:n_bus
Vbus(ii) = 1;
end
% Set convergence criterion
eps = 0.00001;
% Initialize the iteration counter
n_iter = 0;
% Set a maximum number of iterations here so that
% the program will not run in an infinite loop if
% it fails to converge to a solution.
for iter = 1:100
% Increment the iteration count
n_iter = n_iter + 1;
% Save old bus voltages for comparison purposes
Vbus_old = Vbus;
% Calculate the updated bus voltage
for ii = 1:n_bus
% Skip the swing bus!
if ii ~= swing_bus
% If this is a generator bus, update the reactive

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

% power estimate.
if gen_bus(ii)
temp = 0;
for jj = 1:n_bus
temp = temp + Ybus(ii,jj) * Vbus(jj);
end
temp = conj(Vbus(ii)) * temp;
Q(ii) = -imag(temp);
end
% Calculate updated voltage at bus 'ii'. First, sum
% up the current contributions at bus 'ii' from all
% other busses.
temp = 0;
for jj = 1:n_bus
if ii ~= jj
temp = temp - Ybus(ii,jj) * Vbus(jj);
end
end
% Add in the current injected at this node
temp = (P(ii) - j*Q(ii)) / conj(Vbus(ii)) + temp;
% Get updated estimate of Vbus at 'ii'
Vnew = 1/Ybus(ii,ii) * temp;
% Apply an acceleration factor to the new voltage
estimate
Vbus(ii) = Vbus_old(ii) + acc_fac * (Vnew Vbus_old(ii));
% If this is a generator bus, update the magnitude of
the
% voltage to keep it constant.
if gen_bus(ii)
Vbus(ii) = Vbus(ii) * abs(Vbus_old(ii)) /
abs(Vbus(ii));
end
end
end

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

% Compare the old and new estimate of the voltages.


% Note that we will compare the real and the imag parts
% separately, and both must be within tolerances.
test = 0;
for ii = 1:n_bus
% Compare real parts
if abs( real(Vbus(ii)) - real(Vbus_old(ii)) ) > eps
test = 1;
URL: 132 www.ijar.lit.az
INTERNATIONAL JOURNAL Of ACADEMIC RESEARCH Vol. 2. No. 4. July 2010
end
% Compare imaginary parts
if abs( imag(Vbus(ii)) - imag(Vbus_old(ii)) ) > eps
test = 1;
end
end
% Did it converge? If so, get out of the loop.
if test == 0
break;
end
end
% Did it exceed the maximum number of iterations?
if iter == 100
disp('Max number of iterations exceeded!');
end
% Display results
for ii = 1:n_bus
[mag, phase] = r2p(Vbus(ii));
str = ['The voltage at bus ' int2str(ii) ' = ' ...
num2str(mag) '/' num2str(phase)];
disp(str);
end
% Display the number of iterationsstr = ['Number of
iterations = ' int2str(n_iter) ];
disp(str);

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

CIRCUIT DIAGRAM:

RESULT:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

9. DESIGN OF PID CONTROLLER

Aim: To design a simulink model of PID controller using MATLAB.

Software Required:

MATLAB (Matrix Laboratory)

Commands:
Simulink commonly used blocks ----------- i) Gain
ii) Integrator
iii) Scope
iv) Sum
v) Mux
Simulink commonly used blocks--------------i) Transfer function Block
ii) Subsystem Block

Open subsystem block delete the line between in 1 & out 1 paste the PID
controller circuit.
Simulink Source i) Step

Result: The design a simulink model of PID controller using has been
Successfully completed.

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Circuit Diagram:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Output waveforms:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

10.Conduct a power flow study on a given power system network


using
Gauss Seidel Iterative Method
PROBLEM:
The generator is connected at all the four buses while load are at buses 2 & 3. Values of Ybus and voltage are listed below.
Line bus
to bus
1-2
1-3
2-3
2-4
3-4
Y-bus=

R pu

X pu

0.05
0.10
0.15
0.10
0.05

0.15
0.30
0.45
0.30
0.15

3-j9
-2+j6
-1+j3
0

-2+j6
3.666-j11
-0.666+j2
-1+j3

-1+j3
-0.666+j2
3.666-j11
-2+j6

bus
1
2
3
4

0
-1+j3
-2+j6
3-j9

INPUT:
% gauss siedel load flow
clear
n=4
v=[1.04 1.04 1 1]
y=[3-j*9 -2+j*6 -1+j*3 0
-2+j*6 3.666-j*11 -0.666+j*2 -1+j*3
-1+j*3 -0.666+j*2 3.666-j*11 -2+j*6
0 -1+j*3 -2+j*6 3-j*9]
type=ones(n,1)
typechanged=zeros(n,1)
Qlimitmax=zeros(n,1)
qlimitmin=zeros(n,1)
vmagfixed=zeros(n,1)
type(2)=2
qlimitmax(2)=1.0
qlimitmin(2)=0.2
vmagfixed(2)=1.04
diff=10
noofiter=1
vprev=v
while (diff>0.00001\noofiter==1)
abs(v)abs(vprev)
%pause
vprev=v;
p=[inf 0.5 -1 0.3]
q=[inf 0 0.5 -0.1];

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

voltage
1.040
1.040
1
1

s=[inf+j*inf (0.5-j*0.2) (-1.0+j*0.5) (0.3-j*0.1)];


for i=2:n,
if type(i)==2 \typechanged(i)==1,
if (q(i)>qlimitmax(i)\q(i)<qlimitmin(i)),
if (q(i)<qlimitmin(i)),
q(i)=qlimitmin(i);
else
q(i)=qlimitmax(i);
end
type(i)=1;
typechanged(i)=1;
else
type(i)=2;
typechanged(i)=0;
end
end
end
sumyv=0;
for k=1:n,
if(i~=k)
sumyv=sumyv+y(i,k)*v(k);
end
end
v(i)=(1/y(i,i))*((p(i)-j*q(i))/conj(v(i))-sumyv);
if type(i)==2 & typechanged(i)~=1,
v(i)=polartorect(vmagfixed(i),angle(v(i))*180/pi);
end
end
diff=max(abs(abs(v(2:n))-abs(vprev(2:n))));
noofiter=noofiter+1;
OUTPUT:
n=

v = 1.0400

1.0400

1.0000

1.0000

y=
3.0000 - 9.0000i -2.0000 + 6.0000i -1.0000 + 3.0000i

-2.0000 + 6.0000i 3.6660 -11.0000i -0.6660 + 2.0000i -1.0000 + 3.0000i


-1.0000 + 3.0000i -0.6660 + 2.0000i 3.6660 -11.0000i -2.0000 + 6.0000i
0

-1.0000 + 3.0000i -2.0000 + 6.0000i 3.0000 - 9.0000i

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

type =
1
1
1
1
typechanged =
0
0
0
0
Qlimitmax =
0
0
0
0
qlimitmin =
0
0
0
0
vmagfixed =
0
0
0
0
type =
1
2

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

1
1
qlimitmax =
0

qlimitmin =
0
0.2000
0
0
vmagfixed =
0
1.0400
0
0
diff = 10
noofiter =

vprev = 1.0400

1.0400

1.0000

1.0000

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

11. SWING EQUATION

Aim: To develop a simulink model of swing equation.


MATLAB CODE FOR TRANSIENT STATE STABILITY DESIGN:
global Pm f H E V X1 X2 X3
Pm = 0.80; E = 1.17; V = 1.0;
X1 = 0.65; X2 = 1.80; X3 = 0.8;
H = 5.0; f = 60; tf = 1; Dt = 0.01;
% Fault is cleared in 0.3 sec.
tc = 0.3;
swingmeu(Pm, E, V, X1, X2, X3, H, f, tc, tf, Dt)
% Fault is cleared in 0.4 sec. and 0.5 sec.
tc = .5;
swingmeu(Pm, E, V, X1, X2, X3, H, f, tc, tf, Dt)
tc = .4;
swingmeu(Pm, E, V, X1, X2, X3, H, f, tc, tf, Dt)
disp('Parts (a) & (b) are repeated using swingrk4')
disp('Press Enter to continue')
pause
tc = 0.3;
swingrk4(Pm, E, V, X1, X2, X3, H, f, tc, tf)
tc = .5;
swingrk4(Pm, E, V, X1, X2, X3, H, f, tc, tf)
tc = .4;
swingrk4(Pm, E, V, X1, X2, X3, H, f, tc, tf)
% This program solves the swing equation of a one-machine system
% when subjected to a three-phase fault with subsequent clearance
% of the fault. Modified Euler method
function swingmeu(Pm, E, V, X1, X2, X3, H, f, tc, tf, Dt)
%global Pm f H E V X1 X2 X3 27
clear t
if exist('Pm')~=1

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Pm = input('Generator output power in p.u. Pm = '); else, end


if exist('E')~=1
E = input('Generator e.m.f. in p.u. E = '); else, end
if exist('V')~=1
V = input('Infinite bus-bar voltage in p.u. V = '); else, end
if exist('X1')~=1
X1 = input('Reactance before Fault in p.u. X1 = '); else, end
if exist('X2')~=1
X2 = input('Reactance during Fault X2 = '); else, end
if exist('X3')~=1
X3 = input('Reactance after Fault X3 = '); else, end
if exist('H')~=1
H = input('Generator Inertia constant in sec. H = '); else, end
if exist('f')~=1
f = input('System frequency in Hz f = '); else, end
if exist('Dt')~=1
Dt = input('Time interval Dt = '); else, end
if exist('tc')~=1
tc = input('Clearing time of fault in sec tc = '); else, end
if exist('tf')~=1
tf = input('Final time for swing equation in sec tf = '); else, end 28
Pe1max = E*V/X1; Pe2max=E*V/X2; Pe3max=E*V/X3;
clear t x1 x2 delta
d0 =asin(Pm/Pe1max);
t(1) = 0;
x1(1)= d0;
x2(1)=0;
np=tf /Dt;
Pemax=Pe2max;
ck=pi*f/H;
for k = 1:np
if t(k) >= tc
Pemax=Pe3max;
else, end
t(k+1)=t(k)+Dt;

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Dx1b=x2(k);
Dx2b=ck*(Pm-Pemax*sin(x1(k)));
x1(k+1)=x1(k)+Dx1b*Dt;
x2(k+1)=x2(k)+Dx2b*Dt;
Dx1e=x2(k+1);
Dx2e=ck*(Pm-Pemax*sin(x1(k+1)));
Dx1=(Dx1b+Dx1e)/2;
Dx2=(Dx2b+Dx2e)/2;
x1(k+1)=x1(k)+Dx1*Dt; 29
x2(k+1)=x2(k)+Dx2*Dt;
end
delta=180*x1/pi;
clc
fprintf('\nFault is cleared at %4.3f Sec. \n', tc)
head=['

'

'

time

'

delta

Dw '

degrees

rad/s'

'

'];

disp(head)
disp([t', delta' x2'])
h=figure; figure(h)
plot(t, delta), grid
title(['One-machine system swing curve. Fault cleared at ', num2str(tc),'s'])
xlabel('t, sec'), ylabel('Delta, degree')
cctime(Pm, E, V, X1, X2, X3, H, f)

% Obtains the critical clearing time

% This program solves the swing equation of a one-machine system


% when subjected to a three-phase fault with subsequent clearance
% of the fault.
function swingrk4(Pm, E, V, X1, X2, X3, H, f, tc, tf, Dt)
%global Pm f H E V X1 X2 X3
if exist('Pm') ~= 1
Pm = input('Generator output power in p.u. Pm = '); else, end 30
if exist('E') ~= 1
E = input('Generator e.m.f. in p.u. E = '); else, end
if exist('V') ~= 1

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

V = input('Infinite bus-bar voltage in p.u. V = '); else, end


if exist('X1') ~= 1
X1 = input('Reactance before Fault in p.u. X1 = '); else, end
if exist('X2') ~= 1
X2 = input('Reactance during Fault X2 = '); else, end
if exist('X3') ~= 1
X3 = input('Reactance after Fault X3 = '); else, end
if exist('H') ~= 1
H = input('Generator Inertia constant in sec. H = '); else, end
if exist('f') ~= 1
f = input('System frequency in Hz f = '); else, end
if exist('tc') ~= 1
tc = input('Clearing time of fault in sec tc = '); else, end
if exist('tf') ~= 1
tf = input('Final time for swing equation in sec tf = '); else, end
Pe1max = E*V/X1; Pe2max=E*V/X2; Pe3max=E*V/X3;
clear t x delta
d0 =asin(Pm/Pe1max);
t0 = 0;
x0 = [d0; 0]; 31
tol=0.001;
tspan = [t0; tc];
[t1,xf]=ode45('pfpower', tspan, x0); % During fault solution
x0c =xf(length(xf), :);
tspan = [tc, tf];
[t2,xc] =ode45('afpower', tspan, x0c); % After fault solution
t =[t1; t2]; x = [xf; xc];
delta = 180/pi*x(:,1);
clc
fprintf('\nFault is cleared at %4.3f Sec. \n', tc)
head=['

'

'

time

'

'

delta

Dw '

degrees

rad/s'
'];

disp(head)

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

disp([t, delta, x(:, 2)])


h=figure; figure(h)
plot(t, delta), grid
title(['One-machine system swing curve. Fault cleared at ', num2str(tc),'s'])
xlabel('t, sec'), ylabel('Delta, degree')
cctime(Pm, E, V, X1, X2, X3, H, f)

% Obtains the critical clearing time

% This function Simulates the swing equation of a one-machine system


% and returns the critical clearing time for stability. 32
function cctime(Pm, E, V, X1, X2, X3, H, f)
Pe1max = E*V/X1; Pe2max=E*V/X2; Pe3max=E*V/X3;
d0 =asin(Pm/Pe1max);
dmax = pi-asin(Pm/Pe3max);
cosdc = (Pm*(dmax-d0)+Pe3max*cos(dmax)-Pe2max*cos(d0))/(Pe3max-Pe2max);
if abs(cosdc) > 1
fprintf('No critical clearing angle could be found.\n')
fprintf('System can remain stable during this disturbance.\n\n')
return
else, end
dc = acos(cosdc);
if dc > dmax
fprintf('No critical clearing angle could be found.\n')
fprintf('System can remain stable during this disturbance.\n\n')
return
else, end
tf = 0.4;
x0 = [d0; 0];
tspan = [0, tf];
options = odeset('RelTol', 0.00001);
[t1,xf] =ode23('pfpower', tspan, x0, options);
kk=find(xf(:,1) <= dc); k=max(kk);
tt=t1(k); 33
while tf <= tt & tf <= 3.6
tf=tf+.4;
fprintf('\nSearching with a final time of %3.2f Sec. \n', tf)
tol=0.00001+tf*2.5e-5;

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

tspan = [0, tf];


options = odeset('RelTol', tol);
[t1,xf] =ode23('pfpower', tspan, x0, options);
kk=find(xf(:,1) <= dc); k=max(kk);
tt= t1(k);
end
tmargin = t1(k);
if tf >= 3.6
fprintf('\nA clearing time could not be found up to 4 sec. \n\n')
return
else, end
fprintf('\nCritical clearing time = %4.2f seconds \n', tmargin)
fprintf('Critical clearing angle = %6.2f degrees \n\n', dc*180/pi

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

SIMULINK MODEL:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

OUTPUT WAVEFORMS:

RESULT: The critical clearing time is determined by the program to be


Critical clearing time = 0.41 seconds
Critical clearing angle = 98.83 degrees

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

12. A SIMULINK MODEL FOR A SINGLE AREA


LOAD FREQUENCY PROBLEM & SIMULATION

Aim: To develop a simulink model for a single area load frequency control problem and
Its simulation using MATLAB.

Software Required:

MATLAB (Matrix Laboratory)

Commands:
Simulink commonly used blocks ----------- i) Gain
ii) Integrator
iii) Scope
iv) Sum
v) Mux
Simulink commonly used blocks--------------i) Transfer function Block
ii) Subsystem Block

Open subsystem block delete the line between in 1 & out 1 paste the PID
controller circuit.
Simulink Source i) Step

Result: The simulink model for a single area load frequency control problem was
developed & successfully completed.

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Circuit Diagram:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Output Waveforms:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

13. A SIMULINK MODEL FOR A TWO AREA


LOAD FREQUENCY PROBLEM & SIMULATION

Aim: To develop a simulink model for a two area load frequency control problem and
Its simulation using MATLAB.

Software Required:

MATLAB (Matrix Laboratory)

Commands:
Simulink commonly used blocks ----------- i) Gain
ii) Integrator
iii) Scope
iv) Sum
v) Mux
Simulink commonly used blocks--------------i) Transfer function Block
ii) Subsystem Block

Open subsystem block delete the line between in 1 & out 1 paste the PID
controller circuit
Simulink Source i) Step

Result: The simulink model for a two area load frequency problem was developed
successfully.

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Circuit Diagram:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

O/p waveforms:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

14. SIMULINK MODEL FOR A TWO AREA


SYSTEM WITH PID CONTROLLER

Aim: To develop a simulink model for a two area load frequency problem with PID
controller.

Software Required:

MATLAB (Matrix Laboratory)

Commands:
Simulink commonly used blocks ----------- i) Gain
ii) Integrator
iii) Scope
iv) Sum
v) Mux
Simulink commonly used blocks--------------i) Transfer function Block
ii) Subsystem Block

Open subsystem block delete the line between in 1 & out 1 paste the PID
controller circuit
Simulink Source i) Step

Result: The simulink model for a two area load frequency problem with PID controller has
been successfully developed.

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

CIRCUIT DIAGRAM:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

O/p Wave forms:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

15. SINGLE PHASE FULL CONVERTER USING RL & E


LOADS

Aim: To analyze the simulation of 1 full controlled converter with RL & E load.
Software Required: PSPICE (Personal Computer Simulated Program with
Integrated Circuit Emphasis.

Program:
VS 10 0 SIN(0 169.7V 60HZ)
VG1 6 2 PULSE(0V 10V 2777.78US 1NS 1NS 100US 16666.7US)
VG2 7 0 PULSE(0V 10V 2777.78US 1NS 1NS 100US 16666.7US)
VG3 8 0 PULSE(0V 10V 11111.1US 1NS 1NS 100US 16666.7US)
VG4 9 1 PULSE(0V 10V 11111.1US 1NS 1NS 100US 16666.7US)
*DF 3 2 DMOD
R1 2 4 10
L1 4 5 20MH
C1 2 11 793UF
RX 11 3 0.1
VX 5 3 DC 10V
VY 10 1 DC 0V
XT1 1 2 6 2 SCR
XT2 3 0 7 0 SCR
XT3 0 2 8 2 SCR
XT4 3 1 9 1 SCR
.SUBCKT SCR 1 2 3 2
S1 1 5 6 2 SMOD
RG 3 4 50
VX 4 2 DC 0V
VY 5 7 DC 0V
DT 7 2 DMOD

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

RT 2 6 1
CT 6 2 10UF
F1 2 6 POLY(2) VX VY 0 50 11
.MODEL SMOD VSWITCH( RON=0.0125 ROFF=10E+5 VON=5V VOFF=0V )
.MODEL DMOD D( IS=2.2E-15 BV=1800 TT=0)
.ENDS SCR
.TRAN 10US 100MS 16.6MS
.PROBE
.FOUR 120HZ I(VX)
.END

**** 08/24/110 18:40:18 ******** NT Evaluation PSpice (July 1997) ************


//
****

Diode MODEL PARAMETERS

***************************************************************************

XT1.DMOD
IS

2.200000E-15

BV

XT2.DMOD

XT3.DMOD

2.200000E-15

2.200000E-15

1.800000E+03

1.800000E+03

XT4.DMOD
2.200000E-15

1.800000E+03

1.800000E+03

**** 08/24/110 18:40:18 ******** NT Evaluation PSpice (July 1997) ************

//

****

Voltage Controlled Switch MODEL PARAMETERS

***************************************************************************

XT1.SMOD
RON

XT2.SMOD

.0125

.0125

ROFF 1.000000E+06
VON

XT3.SMOD

.0125

XT4.SMOD

.0125

1.000000E+06

VOFF 0

1.000000E+06

1.000000E+06

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

**** 08/24/110 18:40:18 ******** NT Evaluation PSpice (July 1997) ************

//

****

INITIAL TRANSIENT SOLUTION

TEMPERATURE = 27.000 DEG C

***************************************************************************

NODE VOLTAGE

NODE VOLTAGE

NODE VOLTAGE

1) 0.0000 ( 2) 1.000E-09 ( 3) -10.0000 (

5) 1.200E-09 ( 6) 1.000E-09 ( 7) 0.0000 ( 8) 0.0000

9) 0.0000 ( 10)

NODE VOLTAGE

4) 1.200E-09

0.0000 ( 11) -10.0000 (XT1.4) 1.000E-09

(XT1.5) 1.085E-15 (XT1.6) 1.000E-09 (XT1.7) 1.085E-15 (XT2.4) 0.0000

(XT2.5) -10.0000 (XT2.6)-110.0E-12 (XT2.7) -10.0000 (XT3.4) 1.000E-09

(XT3.5) 1.085E-15 (XT3.6)-9.939E-21 (XT3.7) 1.085E-15 (XT4.4) 0.0000

(XT4.5) -10.0000 (XT4.6)-110.0E-12 (XT4.7) -10.0000

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

VOLTAGE SOURCE CURRENTS


NAME

VS

CURRENT

-1.000E-11

VG1

-1.178E-27

VG2

0.000E+00

VG3

2.001E-11

VG4

0.000E+00

VX

-2.001E-11

VY

1.000E-11

XT1.VX

0.000E+00

XT1.VY

-1.085E-21

XT2.VX

0.000E+00

XT2.VY

-1.000E-11

XT3.VX

-2.001E-11

XT3.VY

-1.085E-21

XT4.VX

0.000E+00

XT4.VY

-1.000E-11

TOTAL POWER DISSIPATION 2.00E-10 WATTS

**** 08/24/110 18:40:18 ******** NT Evaluation PSpice (July 1997) ************

//

****

FOURIER ANALYSIS

TEMPERATURE = 27.000 DEG C

***************************************************************************

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

OUTPUT WAVEFORMS:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

FOURIER COMPONENTS OF TRANSIENT RESPONSE I(VX)

DC COMPONENT = 1.146457E+01

HARMONIC FREQUENCY

FOURIER

NORMALIZED PHASE

NORMALIZED
NO

(HZ)

COMPONENT COMPONENT (DEG)

1.750E+02

PHASE (DEG)

1.200E+02

2.146E+00

1.000E+00

0.000E+00

2.400E+02

5.049E-01

2.353E-01

3.600E+02

1.782E-01

8.306E-02 -9.826E+01 -2.733E+02

4.800E+02

1.024E-01

4.770E-02

1.473E+02 -2.767E+01

6.000E+02

5.992E-02

2.792E-02

2.605E+01 -1.490E+02

7.200E+02

4.915E-02

2.290E-02 -9.568E+01 -2.707E+02

8.400E+02

2.808E-02

1.308E-02

1.393E+02 -3.576E+01

9.600E+02

2.720E-02

1.268E-02

2.139E+01 -1.536E+02

1.080E+03

1.327E-02

6.184E-03 -9.691E+01 -2.719E+02

2.976E+01 -1.453E+02

TOTAL HARMONIC DISTORTION = 2.573184E+01 PERCENT

JOB CONCLUDED

TOTAL JOB TIME

.45

O/p Waveform Details: V(2,3) Voltage across the load terminals.


I(Vx) current across the load terminals.

Result: Analysis of 1 full controlled converter circuit has been successfully completed.
ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

16. THREE PHASE FULL CONVERTER USING RL & E


LOADS
DATE:

Aim: To analyze the simulation of three phase full controlled converter with RL & E
load.

Software Required: PSPICE (Personal Computer Simulated Program with


Integrated Circuit Emphasis.

Program:
VAN 14 0 SIN(0V 200V 50HZ 0 0 0)
VBN 2 0 SIN(0V 200V 50HZ 0 0 -120)
VCN 3 0 SIN(0V 200V 50HZ 0 0 -240)
VG1 8 4 PULSE(0V 10V 5MS 1NS 1NS 100US 20MS)
VG2 11 3 PULSE(0V 10V 8.33MS 1NS 1NS 100US 20MS)
VG3 9 4 PULSE(0V 10V 11.66MS 1NS 1NS 100US 20MS)
VG4 13 1 PULSE(0V 10V 15MS 1NS 1NS 100US 20MS)
VG5 10 4 PULSE(0V 10V 18.33MS 1NS 1NS 100US 20MS)
VG6 12 2 PULSE(0V 10V 21.66MS 1NS 1NS 100US 20MS)
R 4 6 20
L 6 7 5.5MH
VX 7 5 DC 0V
VY 14 1 DC 0V
XT1 1 4 8 4 SCR
XT2 5 3 11 3 SCR
XT3 2 4 9 4 SCR
XT4 5 1 13 1 SCR
XT5 3 4 10 4 SCR
XT6 5 2 12 2 SCR
.SUBCKT SCR 1 2 3 2
S1 1 5 6 2 SMOD
RG 3 4 50

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

DT 7 2 DMOD
VY 5 7 DC 0V
VX 4 2 DC 0V
RT 6 2 1
CT 6 2 10UF
FT 2 6 POLY(2) VX VY 0 50 11
.MODEL SMOD VSWITCH(RON=0.0125 ROFF=10E+5 VON=0.8V VOFF=0V)
.MODEL DMOD D(IS=2.2E-15 BV=1800V TT=0)
.ENDS SCR
.TRAN 5US 50MS 21.66MS
.PROBE
.END

**** 08/24/110 09:06:53 ******** NT Evaluation PSpice (July 1997) ************

//

****

Diode MODEL PARAMETERS

***************************************************************************
***

XT1.DMOD
IS
BV

XT2.DMOD

2.200000E-15

IS
BV

2.200000E-15

1.800000E+03

XT5.DMOD

XT3.DMOD

1.800000E+03

2.200000E-15

XT4.DMOD
2.200000E-15

1.800000E+03

1.800000E+03

XT6.DMOD

2.200000E-15
1.800000E+03

2.200000E-15
1.800000E+03

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

**** 08/24/110 09:06:53 ******** NT Evaluation PSpice (July 1997) ************

//

****

Voltage Controlled Switch MODEL PARAMETERS

***************************************************************************

XT1.SMOD
RON

XT2.SMOD

.0125

.0125

ROFF 1.000000E+06
VON

.8

VOFF 0

VOFF 0

1.000000E+06

1.000000E+06
.8

1.000000E+06

XT6.SMOD

.0125

.8

XT4.SMOD

.0125

.8

.0125

ROFF 1.000000E+06
VON

.0125

.8

XT5.SMOD
RON

XT3.SMOD

1.000000E+06

.8
0

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

**** 08/24/110 09:06:53 ******** NT Evaluation PSpice (July 1997) ************

//

****

INITIAL TRANSIENT SOLUTION

TEMPERATURE = 27.000 DEG C

***************************************************************************
***

NODE VOLTAGE

NODE VOLTAGE

NODE VOLTAGE

1) 0.0000 ( 2) -173.2100 ( 3) 173.2100 (

5) -172.0400 ( 6) -172.0400 ( 7) -172.0400 ( 8) 172.0400

9) 172.0400 ( 10) 172.0400 ( 11) 173.2100 ( 12) -173.2100

( 13)

0.0000 ( 14)

NODE VOLTAGE

4) 172.0400

0.0000 (XT1.4) 172.0400 (XT1.5) 172.0E-06

(XT1.6) 172.0400 (XT1.7) 172.0E-06 (XT2.4) 173.2100 (XT2.5) -172.0400

(XT2.6) 173.2100 (XT2.7) -172.0400 (XT3.4) 172.0400 (XT3.5) -173.2000

(XT3.6) 172.0400 (XT3.7) -173.2000 (XT4.4)

0.0000 (XT4.5) -172.0400

(XT4.6)-1.893E-09 (XT4.7) -172.0400 (XT5.4) 172.0400 (XT5.5) 172.9900

(XT5.6) 361.2900 (XT5.7) 172.9900 (XT6.4) -173.2100 (XT6.5) -172.2600

(XT6.6) 16.0430 (XT6.7) -172.2600

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

VOLTAGE SOURCE CURRENTS


NAME

CURRENT

VAN

1.551E-25

VBN

1.720E+01

VCN

-1.720E+01

VG1

0.000E+00

VG2

0.000E+00

VG3

0.000E+00

VG4

0.000E+00

VG5

0.000E+00

VG6

0.000E+00

VX

1.720E+01

VY

-1.551E-25

XT1.VY

-1.720E-10

XT1.VX

0.000E+00

XT2.VY

-3.453E-10

XT2.VX

0.000E+00

XT3.VY

-3.453E-10

XT3.VX

0.000E+00

XT4.VY

-1.720E-10

XT4.VX

0.000E+00

XT5.VY

1.720E+01

XT5.VX

0.000E+00

XT6.VY

1.720E+01

XT6.VX

0.000E+00

TOTAL POWER DISSIPATION 5.96E+03 WATTS

JOB CONCLUDED

TOTAL JOB TIME

.20

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Output Waveforms:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Output Waveforms:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Output Waveforms:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

O/p Waveform Details:


V(4,5) ------ Voltage across the load terminals.
I(Vx) ------- Current through the load.
V(14,0)------ Voltage across the Van to Neutral.
V(2,0) ------ Voltage across the Vbn to Neutral.
V(3,0) ------ Voltage across the Vcn to Neutral.
V(1,8) ------ Voltage across the T1.
V(2,9) ------ Voltage across the T2.
V(3,10) ------ Voltage across the T3.

Result: Analysis of three phase full controlled converter circuit has been
Successfully completed.

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

17. SINGLE PHASE AC VOLTAGE CONTROLLER


Aim: To analyze the simulation of single phase ac voltage controller.
Software Required: PSPICE (Personal Computer Simulated Program with
Integrated Circuit Emphasis.

Program:
VS 1 0 SIN(0V 169.7V 60HZ)
VG1 2 4 PULSE(0V 10V 4166.7US 1NS 1NS 100US 16666.67US)
VG2 3 1 PULSE(0V 10V 12500.0US 1NS 1NS 100US 16666.67US)
R 4 5 2.5
L 5 6 6.5MH
VX 6 0 DC 0V
CS 1 7 0.1UF
RS 7 4 750
XT1 1 4 2 4 SCR
XT2 4 1 3 1 SCR
.SUBCKT SCR 1 2 3 2
S1 1 5 6 2 SMOD
RG 3 4 50
VX 4 2 DC 0V
VY 5 2 DC 0V
RT 2 6 1
CT 6 2 10UF
F1 2 6 POLY(2) VX VY 0 50 11
.MODEL SMOD VSWITCH(RON=0.01 ROFF=10E+5 VON=0.1V VOFF=0V)
.ENDS SCR
.TRAN 10US 33.33MS
.PROBE
.FOUR 60HZ V(4)
.END

**** 10/29/109 15:58:41 ******** NT Evaluation PSpice (July 1997) ************

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

SINGLE PHASE AC VOLTAGE CONTROLER

****

Voltage Controlled Switch MODEL PARAMETERS

***************************************************************************
***
XT1.SMOD
XT2.SMOD
RON 1.000000E-03 1.000000E-03
ROFF 1.000000E+06 1.000000E+06
VON .1
.1
VOFF 0
0
**** 10/29/109 15:58:41 ******** NT Evaluation PSpice (July 1997) ************
SINGLE PHASE AC VOLTAGE CONTROLER

****

INITIAL TRANSIENT SOLUTION

TEMPERATURE = 27.000 DEG C

***************************************************************************

NODE VOLTAGE

NODE VOLTAGE

NODE VOLTAGE

1) 0.0000 ( 2) 0.0000 ( 3) 0.0000 (

5) 0.0000 ( 6) 0.0000 ( 7) 0.0000 (XT1.4) 0.0000

NODE VOLTAGE

4) 0.0000

(XT1.5) 0.0000 (XT1.6) 0.0000 (XT2.4) 0.0000 (XT2.5) 0.0000


(XT2.6) 0.0000
VOLTAGE SOURCE CURRENTS
NAME
CURRENT
VS
VG1
VG2
V1
XT1.VX
XT1.VY
XT2.VX

0.000E+00
0.000E+00
0.000E+00
0.000E+00
0.000E+00
0.000E+00
0.000E+00

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Output Waveforms:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

XT2.VY

0.000E+00

TOTAL POWER DISSIPATION 0.00E+00 WATTS


**** 10/29/109 15:58:41 ******** NT Evaluation PSpice (July 1997) ************
SINGLE PHASE AC VOLTAGE CONTROLER

****

FOURIER ANALYSIS

TEMPERATURE = 27.000 DEG C

***************************************************************************
**

FOURIER COMPONENTS OF TRANSIENT RESPONSE V(4)

DC COMPONENT = -3.538046E-03
HARMONIC FREQUENCY FOURIER NORMALIZED PHASE
NORMALIZED
NO
(HZ) COMPONENT COMPONENT (DEG)
PHASE (DEG)
1
2
3
4
5
6
7
8
9

6.000E+01 1.013E+02 1.000E+00 -1.785E+01 0.000E+00


1.200E+02 1.014E-02 1.002E-04 7.757E+01 9.542E+01
1.800E+02 6.157E+01 6.080E-01 6.853E+01 8.638E+01
2.400E+02 3.373E-02 3.331E-04 9.069E+01 1.085E+02
3.000E+02 3.383E+01 3.341E-01 -6.915E+01 -5.131E+01
3.600E+02 2.922E-02 2.886E-04 8.397E+01 1.018E+02
4.200E+02 7.703E+00 7.607E-02 1.243E+02 1.422E+02
4.800E+02 1.608E-02 1.588E-04 3.060E+01 4.845E+01
5.400E+02 1.278E+01 1.262E-01 -1.276E+02 -1.098E+02

TOTAL HARMONIC DISTORTION = 7.091939E+01 PERCENT

JOB CONCLUDED
TOTAL JOB TIME

.19

Result: Analysis of Single Phase AC Voltage Controller has been successfully


Completed.

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

18. THREE PHASE INVERTER WITH PWM CONTROLLER


DATE:

Aim: To simulation three phase Inverter with PWM controller circuit by using PSPICE.
Software Required: PSPICE (Personal Computer Simulated Program with
Integrated Circuit Emphasis.

Program:
VS 1 0 DC 100V
RB1 22 6 50
VG1 22 3 PULSE(0 40V 0 1NS 1NS 0.5MS 1MS)
RB2 16 15 50
VG2 16 0 PULSE(0 40V 166.67US 1NS 1NS 0.5MS 1MS)
RB3 8 7 50
VG3 8 4 PULSE(0 40V 333.33US 1NS 1NS 0.5MS 1MS)
RB4 12 11 50
VG4 12 0 PULSE(0 40V 550US 1NS 1NS 0.5MS 1MS)
RB5 10 9 50
VG5 10 5 PULSE(0 40V 666.67US 1NS 1NS 0.5MS 1MS)
RB6 14 13 50
VG6 14 0 PULSE(0 40V 833.33US 1NS 1NS 0.5MS 1MS)
VY 1 2 DC 0V
VX 3 20 DC 0V
RA 20 17 10
LA 17 21 5MH
RB 4 18 10
LB 18 21 5MH
RC 5 19 10
LC 19 21 5MH
D1 3 2 DMOD
D3 4 2 DMOD
D5 5 2 DMOD
D2 0 5 DMOD
D4 0 3 DMOD
D6 0 4 DMOD
.MODEL DMOD D(IS=2.2E-15 BV=1200V TT=0)
Q1 2 6 3 3 2N6546
Q3 2 7 4 4 2N6546

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Q5 2 9 5 5 2N6546
Q2 5 15 0 0 2N6546
Q4 3 11 0 0 2N6546
Q6 4 13 0 0 2N6546
.MODEL 2N6546 NPN(IS=2.33E-27 BF=13 CJE=1PF CJC=607.3PF TF=26.5NS)
.TRAN 5US 2.5MS 1.0MS
.PROBE
.OPTIONS ABSTOL=1.0U RELTOL=1.0M VNTOL=1 ITL5=20000
.FOUR 1KHZ I(VX) V(3,21)
.END

**** 08/24/110 12:37:50 ******** NT Evaluation PSpice (July 1997) ************

//

****

Diode MODEL PARAMETERS

******************************************************************************

DMOD
IS

2.200000E-15

BV 1.200000E+03
**** 08/24/110 12:37:50 ******** NT Evaluation PSpice (July 1997) ************
//

****

BJT MODEL PARAMETERS

******************************************************************************

2N6546
NPN
IS

2.330000E-27

BF 13
NF 1
BR 1
NR

CJE

1.000000E-12

CJC 607.300000E-12
TF 26.500000E-09

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

**** 08/24/110 12:37:50 ******** NT Evaluation PSpice (July 1997) ************

//

****

INITIAL TRANSIENT SOLUTION

TEMPERATURE = 27.000 DEG C

******************************************************************************

NODE VOLTAGE

NODE VOLTAGE

NODE VOLTAGE

1) 100.0000 (

2) 100.0000 (

5) 50.0000 (

6) 50.0020 (

9) 50.0000 ( 10) 50.0000 ( 11) 2.500E-09 ( 12)

( 13) 2.500E-09 ( 14)

3) 50.0000 (

7) 50.0000 (

NODE VOLTAGE

4) 50.0000

8) 50.0000

0.0000 ( 15) 2.500E-09 ( 16)

0.0000

0.0000

( 17) 50.0000 ( 18) 50.0000 ( 19) 50.0000 ( 20) 50.0000

( 21) 50.0000 ( 22) 50.0020

VOLTAGE SOURCE CURRENTS


NAME

VS

CURRENT

-4.500E-10

VG1

5.000E-11

VG2

5.000E-11

VG3

5.000E-11

VG4

5.000E-11

VG5

5.000E-11

VG6

5.000E-11

VY

4.500E-10

VX

-8.882E-16

TOTAL POWER DISSIPATION 4.50E-08 WATTS

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

**** 08/24/110 12:37:50 ******** NT Evaluation PSpice (July 1997) ************

//

****

FOURIER ANALYSIS

TEMPERATURE = 27.000 DEG C

******************************************************************************

FOURIER COMPONENTS OF TRANSIENT RESPONSE I(VX)

DC COMPONENT = -9.305282E-03

HARMONIC FREQUENCY
NO

(HZ)

FOURIER

COMPONENT

NORMALIZED

COMPONENT

(DEG)

1.077E+02

PHASE

NORMALIZED

PHASE (DEG)

1.000E+03

1.932E+00

1.000E+00

0.000E+00

2.000E+03

2.156E-03

1.116E-03 -1.796E+02 -2.873E+02

3.000E+03

1.092E-03

5.653E-04 -1.335E+02 -2.412E+02

4.000E+03

1.334E-03

6.904E-04

1.682E+02

5.000E+03

8.069E-02

4.177E-02

9.323E+01 -1.450E+01

6.000E+03

5.955E-04

3.083E-04

1.789E+02

7.000E+03

4.246E-02

2.198E-02

9.395E+01 -1.379E+01

8.000E+03

4.444E-04

2.301E-04

1.791E+02

9.000E+03

2.705E-04

1.400E-04

2.873E+01 -7.901E+01

6.048E+01

7.118E+01

7.140E+01

TOTAL HARMONIC DISTORTION = 4.722475E+00 PERCENT

O/p Waveform Details: V(5,3) Voltage across the R,B phases.


V(4,5) Voltage across the Y,B phases.
V(3,4) Voltage across the R,Y phases.

Result: Analysis of three phase inverter with PWM controller circuit has been
Successfully completed.

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

CIRCUIT DIAGRAM:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Output Waveforms:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

**** 08/24/110 12:37:50 ******** NT Evaluation PSpice (July 1997) ************


//

****

FOURIER ANALYSIS

TEMPERATURE = 27.000 DEG C

******************************************************************************

FOURIER COMPONENTS OF TRANSIENT RESPONSE V(3,21)

DC COMPONENT = -3.740272E-02
6

6.000E+03

6.279E-02

9.894E-04 -1.540E+02 -3.335E+02

7.000E+03

8.977E+00

1.415E-01

8.000E+03

2.998E-02

4.724E-04 -1.618E+02 -3.414E+02

9.000E+03

6.691E-01

1.054E-02

1.759E+02 -3.620E+00

8.448E+01 -9.505E+01

TOTAL HARMONIC DISTORTION = 2.494957E+01 PERCENT

JOB CONCLUDED

TOTAL JOB TIME

.28

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

15. RESONANT PULSE COMMUTATION CIRCUIT

Aim: To simulation Resonant Pulse Commutation Circuit by PSPICE.


Software Required: PSPICE (Personal Computer Simulated Program with
Integrated Circuit Emphasis.

Program:
VS 1 0 DC 200V
VG1 7 0 PULSE(0V 100V 0 1U 1U 0.4MS 1MS)
VG2 8 0 PULSE(0V 100V 0.4MS 1U 1U 0.6MS 1MS)
VG3 9 0 PULSE(0V 100V 0 1U 1U 0.2MS 1MS)
RG1 7 0 10MEG
RG2 8 0 10MEG
RG3 9 0 10MEG
C 1 2 31.2UF IC=200V
L 2 3 6.4UH
D1 4 1 DMOD
DM 0 4 DMOD
.MODEL DMOD D(IS=1E-25 BV=1800V TT=0)
RM 4 5 0.5
LM 5 6 5MH
VX 6 0 DC 0V

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

VY 1 10 DC 0V

.SUBCKT DCSCR 1 2 3 4
DT 5 2 DMOD
ST 1 5 3 4 SMOD
.MODEL DMOD D(IS=1E-25 BV=1800V TT=0V)
.MODEL SMOD VSWITCH(RON=0.1 ROFF=10E+6 VON=10V VOFF=5V)
.ENDS DCSCR
XT1 10 4 7 0 DCSCR
XT2 3 4 8 0 DCSCR
XT3 1 3 9 0 DCSCR
.TRAN 0.5US 3MS 1.5MS 0.5US
.PROBE
.END

**** 08/24/110 08:20:52 ******** NT Evaluation PSpice (July 1997) ************

//
****

Diode MODEL PARAMETERS

*****************************************************************************
*

DMOD

XT1.DMOD

XT2.DMOD

XT3.DMOD

IS 100.000000E-27 100.000000E-27 100.000000E-27 100.000000E-27


BV

1.800000E+03

1.800000E+03

1.800000E+03

1.800000E+03

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

**** 08/24/110 08:20:52 ******** NT Evaluation PSpice (July 1997) ************

//

****

Voltage Controlled Switch MODEL PARAMETERS

*****************************************************************************
*

XT1.SMOD
RON

.1

XT2.SMOD
.1

XT3.SMOD

.1

ROFF 10.000000E+06 10.000000E+06 10.000000E+06


VON 10

10

10

VOFF 5

**** 08/24/110 08:20:52 ******** NT Evaluation PSpice (July 1997) ************

//

****

INITIAL TRANSIENT SOLUTION

TEMPERATURE = 27.000 DEG C

*****************************************************************************
NODE VOLTAGE

NODE VOLTAGE

NODE VOLTAGE

NODE VOLTAGE

1) 200.0000 ( 2) 39.76E-09 ( 3) 39.76E-09 ( 4) 9.940E-06

5) 0.0000 ( 6) 0.0000 ( 7) 0.0000 (

9) 0.0000 ( 10) 200.0000 (XT1.5) 1.2089 (XT2.5) 39.86E-09

8) 0.0000

(XT3.5) 1.2089

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Output Waveforms:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

VOLTAGE SOURCE CURRENTS


NAME

VS

CURRENT

-1.988E-05

VG1

0.000E+00

VG2

0.000E+00

VG3

0.000E+00

VX

1.988E-05

VY

1.988E-05

TOTAL POWER DISSIPATION 3.98E-03 WATTS

JOB CONCLUDED

TOTAL JOB TIME

.42

O/p Waveform Details: I(VX) --- Current Through Load Terminals .


I(C) ------ Current Through Capacitor.
V(1,2) --- Voltage Across the Capacitor.

Result: Analysis of Resonant Pulse Commutation has been successfully completed.

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

20. IMPULSE COMMUTATION CIRCUIT

Aim: To simulation Impulse Commutation Circuit by using PSPICE.

Software Required: PSPICE (Personal Computer Simulated Program with


Integrated Circuit Emphasis.

Program:
VS 1 0 DC 200V
VG1 5 0 PULSE(0V 100V 0 1US 0 0.4MS 1MS)
VG2 6 0 PULSE(0V 100V 0.4S 1US 1US 0.6MS 1MS)
VG3 7 0 PULSE(0V 100V 0 1US 1US 0.2MS 1MS)
RG1 5 0 10MEG
RG2 6 0 10MEG
RG3 7 0 10MEG
C 12 9 20UF IC=200V
LR 1 10 5UH
L1 1 13 25UH
D1 2 13 DMOD
DM 2 0 DMOD
.MODEL DMOD D(IS=1E-25 BV=1000V TT=0)
RM 2 3 10
LM 3 4 20MH
VX 4 0 DC 0V
VY 1 8 DC 0V
VZ 10 11 DC 0V
VA 8 12 DC 0V
XT1 8 2 5 0 DCSCR
XT2 11 9 6 0 DCSCR
XT3 9 2 7 0 DCSCR
.SUBCKT DCSCR 1 2 3 4

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

DT 5 2 DMOD
ST 1 5 3 2 SMOD
.MODEL DMOD D(IS=1E-25 BV=1000V TT=0V)
.MODEL SMOD VSWITCH(RON=0.1 ROFF=10E+6 VON=10V VOFF=5V)
.ENDS DCSCR
.TRAN 0.5US 3MS 1.5MS 0.5US
.PROBE
.END

**** 08/24/110 10:02:22 ******** NT Evaluation PSpice (July 1997) ************

//

****

Diode MODEL PARAMETERS

***************************************************************************
***

DMOD

XT1.DMOD

XT2.DMOD

XT3.DMOD

IS 100.000000E-27 100.000000E-27 100.000000E-27 100.000000E-27


BV

1.000000E+03

1.000000E+03

1.000000E+03

1.000000E+03

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

**** 08/24/110 10:02:22 ******** NT Evaluation PSpice (July 1997) ************

//

****

Voltage Controlled Switch MODEL PARAMETERS

***************************************************************************

XT1.SMOD
RON

.1

XT2.SMOD
.1

XT3.SMOD

.1

ROFF 10.000000E+06 10.000000E+06 10.000000E+06


VON 10

10

10

VOFF 5

**** 08/24/110 10:02:22 ******** NT Evaluation PSpice (July 1997) ************

//

****

INITIAL TRANSIENT SOLUTION

TEMPERATURE = 27.000 DEG C

***************************************************************************

NODE VOLTAGE

NODE VOLTAGE

NODE VOLTAGE

1) 200.0000 ( 2) 198.8E-06 ( 3) 0.0000 ( 4) 0.0000

5) 0.0000 ( 6) 0.0000 ( 7) 0.0000 (

9) 39.76E-09 ( 10) 200.0000 ( 11) 200.0000 ( 12) 200.0000

( 13) 200.0000 (XT1.5)

NODE VOLTAGE

8) 200.0000

1.2091 (XT2.5) 1.2089 (XT3.5) 41.75E-09

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

Output Waveforms:

ELLENKI COLLEGE OF ENGINEERING & TECHNOLOGY

VOLTAGE SOURCE CURRENTS


NAME

VS

CURRENT

-1.988E-05

VG1

1.988E-16

VG2

3.976E-20

VG3

1.988E-16

VX

1.988E-05

VY

-1.871E-11

VZ

1.988E-05

VA

-1.988E-05

TOTAL POWER DISSIPATION 3.98E-03 WATTS

JOB CONCLUDED

TOTAL JOB TIME

.47

O/p Waveform Details: I(VX) --- Current Through Load Terminals .


V(2,0) --- Voltage Across the diode.

Result: Analysis of Impulse commutation circuit has been successfully completed.

TRR COLLEGE OF ENGINEERING

TRR COLLEGE OF ENGINEERING

Вам также может понравиться