CMPS Lab Manual
CMPS Lab Manual
Tech
Experiment No.-01
Class
Roll No.
Batch
Date
Experiment No. 01
Aim :-Introduction of MATLAB and control system tool box.
Apparatus:- MATLAB Software.
Theory:-
1. Basic
Is a high-performance language
Stands for Matrix Laboratory
Allow to easily work with entire matrices rather than one number at a time
Comes with a basic set of tools for visualizing data and for performing calculations on
matrices and vectors
For specific technologies, MATLAB provides toolboxes, which add to the basic
MATLAB functionality. We have the Image Processing Toolbox. Some other toolboxes
include:
i. Statistics Toolbox
ii. Neural Network Toolbox
iii. Fuzzy Logic Toolbox
iv. Signal Processing Toolbox
v. Wavelet Toolbox
vi. Financial Toolbox
vii. Bioinformatics Toolbox
viii. Database Toolbox
2. MATLAB Windows
The MATLAB windows are mainly include 4 parts: Command Window, Workspace window,
Command History window and Current Directory window.
i. Command Window – this is where you type commands and usually the outputs (or
error messages) appear here too
ii. Workspace window – if you define new variables their names should be listed here.
iii. Command History window – this is where past commands are remembered. If you want
to re-run a previous command or to edit it you can drag it from this window to the
command window or double click to re-run it.
iv. Current Directory window- show the files in Current Directory.
3. The M-Files
x=-pi:0.01:pi
y=cos(x)
plot(x,y)
xlabel('x')
ylabel('y=cos(x)')
Output :-
a=2
x=1
2
3
A=9 7 0
0 8 6
7 1 -6
y = 6
7
8
9
10
y’ = 6 7 8 9 10
u = 0 1 2 3 4 5 6 7 8
x = Columns 1 through 7
0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000
Columns 8 through 11
0.7000 0.8000 0.9000 1.0000
y = Columns 1 through 7
1.0000 1.1052 1.2214 1.3499 1.4918 1.6487 1.8221
Columns 8 through 11
2.0138 2.2255 2.4596 2.7183
Ans = -192.0000
Ans = 3 3
Ans = 0.2812 -0.2187 -0.2187
-0.2187 0.2812 0.2812
0.2917 -0.2083 -0.3750]
Ans = 1.0000 0 0
0.0000 1.0000 0
0.0000 0 1.0000
Ans = -4.8055
12.6462
3.1594
Conclusion:-
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Signature of Subject
Expert
Experiment No.- 02
Class
Roll No
Batch
Date
Experiment No. 02
Aim :- Program to execute YBus & ZBus using singular transformation.
Apparatus:- MATLAB Software.
Theory:-
Z Matrix or bus impedance matrix is an important tool in power system analysis. Though, it
is not frequently used in power flow study, unlike YBUS matrix, it is, however, an important tool in
other power system studies like short circuit analysis or fault study. The ZBUS matrix can be
computed by matrix inversion of the YBUS matrix. Since the YBUS matrix is usually sparse, the explicit
ZBUS matrix would by dense so memory intensive to handle directly.
Z Matrix can be formed by either inverting the YBUS matrix or by using Z bus building
algorithm. The latter method is harder to implement but more practical and faster (in terms of
computer run time and number of floating-point operations per second) for a relatively large system.
Z= [ ]
Because the ZBUS is the inverse of the YBUS, it is symmetrical like the YBUS. The diagonal
elements of the ZBUS are referred to as driving-point impedances of the buses and the off-diagonal
elements are called transfer impedances.
V=Z*I
In matrix form it is given as,
( )
( ) ( )
Z Matrix can be formed by either inverting the Ybus matrix or by using Z bus building
algorithm. The latter method is harder to implement but more practical and faster (in terms of
computer run time and number of floating-point operations per second) for a relatively large system.
ZBus=(YBus)-1
The Zbus is the inverse of the Ybus, it is symmetrical like the Ybus. The diagonal elements of
the Zbus are referred to as driving-point impedances of the buses and the off-diagonal elements are
called transfer impedances.
YBUS is so much more popular in calculation is the matrix becomes sparse for large systems;
that is, many elements go to zero as the admittance between two far away buses is very small. In the
ZBUS, however, the impedance between two far away buses becomes very large, so there are no zero
elements, making computation much harder.
The bus frame of reference, the performance of the interconnected network is described by n
independent nodal equations, where n is the total number of buses (n+1 nodes are present, out of
which one of them is designated as the reference node). For example a 5-bus system will have 5
external buses and 1 ground/ ref. bus). The performance equation relating the bus voltages to bus
current injections in bus frame of reference in admittance form is given by,
Electric power transmission needs optimization in order to determine the necessary real and
reactive power flows in a system for a given set of loads, as well as the voltages and currents in the
system. Power flow studies are used not only to analyze current power flow situations, but also to
plan ahead for anticipated disturbances to the system, such as the loss of a transmission line to
maintenance and repairs. The power flow study would determine whether or not the system could
continue functioning properly without the transmission line.
The nodal admittance matrix form,
Y= [ ]
Once the admittance matrix has been formed, the admittance matrix can be input to solve the
matrix form of Ohm's Law—the equation Y*V=I, In this instance V is N*1 vector of the voltage
at each node and I is N*1 vector of corresponding currents. In matrix form given as,
( )
( ) ( )
To illustrate this process with the admittance matrix of the three bus network in the figure
would be:
( )
Problem:-
0 0 y33 0 0
0 0 0 y44 0
0 0 0 0 y55 ]
A = [ -1 0 0
0 -1 0
0 0 -1
1 -1 0
0 1 -1 ]
B=transpose(A)
Ybus=B*Yprim*A
Zbus=inv(Ybus)
Output:-
y11 = - 2.0000i
y22 = - 2.5000i
y33 = - 3.3333i
y44 = - 5.0000i
y55 = - 3.3333i
Yprim = [ -2.0000i 0 0 0 0
0 - 2.5000i 0 0 0
0 0 - 3.3333i 0 0
0 0 0 - 5.0000i 0
0 0 0 0 - 3.3333i ]
A = [ -1 0 0
0 -1 0
0 0 -1
1 -1 0
0 1 -1 ]
B = [-1 0 0 1 0
0 -1 0 -1 1
0 0 -1 0 -1 ]
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Question:-
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Find Element node incidence matrix and Bus incidence matrix for given tree diagram.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Conclusion:-
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Signature of Subject
Expert
Experiment No.- 03
Class
Roll No
Batch
Date
Experiment No. 03
Aim :- Program to execute ZBr & YBr using singular transformation.
Apparatus:- MATLAB Software.
Theory:-
A graph shows the geometrical interconnection of the elements of a network. A sub graph
is any subset of elements of the graph.
A path is a sub graph of connected elements with not more than two elements connected
to any one node. A graph is connected if and only if there is a path between every pair of nodes.
If each element of the connected graph is assigned a direction then it is an oriented graph.
A representation of a power system and the corresponding graph and oriented graph are
shown in Fig below,
A cut set is a set of elements that, if removed, divides a connected sub graphs. In other
words, a basic or fundamental cut set of the graph is the set of elements consisting of only one
branch (or) twig and minimal number of links (or) chords as shown in Fig. 3.
No. of basic cut sets = No. of twigs
Ub(Branches)
B=
Bl=Links
The identity matrix Ub shows the one-to-one correspondence of the branches and basic
cut sets.
To find out tree branch admittance matrix using formula
YBR=(B)T*YPRIM*B
Problem:-
Que. A Power network specified by following data.
Sr. No. From From Reactance (in P.U.)
1 1 2 j*0.6
2 1 3 j*0.5
3 3 4 j*0.5
4 1 2 j*0.4
5 4 2 j*0.2
Find Tree branch admittance matrix and tree branch impedance matrix for given data
using singular transformation.
Program:-
clc;
clear all;
close all;
z11 = j*0.6;
z22 = j*0.5;
z33 = j*0.5;
z44 = j*0.4;
z55 = j*0.2;
y11 = 1/z11
y22 = 1/z22
y33 = 1/z33
y44 = 1/z44
y55 = 1/z55
Yprim = [ y11 0 0 0 0
0 y22 0 0 0
0 0 y33 0 0
0 0 0 y44 0
0 0 0 0 y55]
B=[1 0 0
0 1 0
0 0 1
1 0 0
1 -1 -1]
C = transpose(B)
YBr = C*Yprim*B
ZBr = inv(YBr)
Output:-
y11 = - 1.6667i
y22 = - 2.0000i
y33 = - 2.0000i
y44 = - 2.5000i
y55 = - 5.0000i
Yprim = [ - 1.6667i 0 0 0 0
0 - 2.0000i 0 0 0
0 0 - 2.0000i 0 0
0 0 0 - 2.5000i 0
0 0 0 0 - 5.0000i ]
B=[1 0 0
0 1 0
0 0 1
1 0 0
1 -1 -1 ]
C=[ 1 0 0 1 1
0 1 0 0 -1
0 0 1 0 -1 ]
YBr = [ -9.1667i 5.0000i 5.0000i
Calculations:-
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Question:-
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Find fundamental cut-set (B) incidence matrix for given tree diagram.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Conclusion:-
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Signature of Subject
Expert
Experiment No.- 04
Class
Roll No
Batch
Date
Experiment No. 04
Aim :- Program to execute ZBr & YBr using Non-Singular transformation
Apparatus:- MATLAB Software.
Theory:-
A graph shows the geometrical interconnection of the elements of a network. A sub graph
is any subset of elements of the graph.
A path is a sub graph of connected elements with not more than two elements connected
to any one node. A graph is connected if and only if there is a path between every pair of nodes.
If each element of the connected graph is assigned a direction then it is an oriented graph.
A representation of a power system and the corresponding graph and oriented graph are
shown in Fig below,
A cut set is a set of elements that, if removed, divides a connected sub graphs. In other
words, a basic or fundamental cut set of the graph is the set of elements consisting of only one
branch (or) twig and minimal number of links (or) chords as shown in Fig. 3.
No. of basic cut sets = No. of twigs
Ub(Branches)
B=
Bl=Links
The identity matrix Ub shows the one-to-one correspondence of the branches and basic
cut sets.
Augmented Cut Set Matrix:(B^)
The basic cut set incidence matrix is of the size e × b, therefore, a non-square matrix and
hence, inverse does not exist. In other words, B is a singular matrix. In order to make the matrix
B a non-singular matrix, we augment the number of columns equal to the number of links by
adding fictitious cut sets known as tie-cut sets, which contain only links.
Find Tree branch admittance matrix and tree branch impedance matrix for given
data using non singular transformation
Program:-
clc;
clear all;
close all;
z11 = j*0.6;
z22 = j*0.5;
z33 = j*0.5;
z44 = j*0.4;
z55 = j*0.2;
y11 = 1/z11
y22 = 1/z22
y33 = 1/z33
y44 = 1/z44
y55 = 1/z55
1 0 0 0 0
0 1 0 0 0
B= 0 0 1 0 0
1 0 0 1 0
1 -1 -1 0 1
y11 0 0 0 0
0 y22 0 0 0
Yprim= 0 0 y33 0 0
0 0 0 y44 0
0 0 0 0 y55
C=transpose(B)
YBr=C*Yprim*B
ZBr = inv(YBr)
Output:-
y11 = -1.6667i
y22 = -2.0000i
y33 = -2.0000i
y44 = -2.5000i
y55 = -5.0000i
Yprim =
[ -1.6667i 0 0 0 0
0 -2.0000i 0 0 0
0 0 -2.0000i 0 0
0 0 0 -2.5000i 0
0 0 0 0 -5.0000i ]
B=
[1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
1 0 0 1 0
1 -1 -1 0 1]
C=
[1 0 0 1 1
0 1 0 0 -1
0 0 1 0 -1
0 0 0 1 0
0 0 0 0 1]
YBr =
-2.5000i 0 0 -2.5000i 0
ZBr =
0 0.5000i 0 0 0.5000i
0 0 0.5000i 0 0.5000i
Calculations:-
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Question:-
Write down steps to find out tree branch admittance matrix or non singular
transformation.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Find Augmented cut-set (B)^ incidence matrix for given tree diagram.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Conclusion:-
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Signature of Subject
Expert
Experiment No.- 05
Class
Roll No
Batch
Date
Experiment No. 05
Aim :- Program to execute ZLOOP & YLOOP using Singular transformation.
Apparatus:- MATLAB Software.
Theory:-
Loops which contain only one link are independent and are called basic loops as shown
in Fig. 1.
In other words, whenever a link element is added to the existing tree, basic loops or fundamental
loops can be obtained.
No. of fundamental loops = No. of links
The incidence of elements to basic loops of a connected graph is shown by the basic loop
incidence matrix (C). The elements of this matrix are as follows:
cij =1: If the ith element is incident to and oriented in the same direction as the jth basic loop.
cij = −1: If the ith element is incident to and oriented in the opposite direction as the jth basic loop.
cij = 0:If the ith element is not incident to the jth basic loop.
The basic loop incidence matrix, of dimension e*l for the graph shown in Fig. 1 below
Question:-
Que. For a given power network find loop impedance matrix using MATLAB for singular
transformation.
Program:-
clc;
clear all;
close all;
z11 = j*0.6;
z22 = j*0.5;
z33 = j*0.5;
z44 = j*0.4;
z55 = j*0.2;
z12=j*0.1;
z21=j*0.1;
z14=j*0.2;
z41=j*0.2;
z11 z12 0 z14 0
z21 z22 0 0 0
ZPRIM= 0 0 z33 0 0
z41 0 0 z44 0
0 0 0 0 z55
C=[-1 -1
0 -1
0 1
1 0
0 1]
A=transpose(C)
ZLOOP=A*ZPRIM*C
YLOOP=inv(ZLOOP)
Output:-
z11 =0.6000i
z22 = 0.5000i
z33 = 0.5000i
z44 = 0.4000i
z55 = 0.2000i
z12 =0.1000i
z21 =0.1000i
z14 =0.2000i
z41 =0.2000i
[0.6000i 0.1000i 0 0.2000i 0
0.1000i 0.5000i 0 0 0
ZPRIM= 0 0 0.5000i 0 0
0.2000i 0 0 0.4000i 0
0 0 0 0 0.2000i]
C=[-1 -1
0 -1
0 1
1 0
0 1]
-1 0 0 1 0
A=
-1 -1 1 0 1
ZLOOP =
[ 0.6000i -0.3000i
-0.3000i 1.6000i ]
YLOOP =
[ -1.8391i -0.3448i
-0.3448i -0.6897i ]
Calculations:-
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Question:-
Write down steps to find out loop impedance matrix for singular transformation.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
_______________________________________________________________
Conclusion:-
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
_______________________________________________________________
Signature of Subject
Expert
Experiment No.- 06
Class
Roll No
Batch
Date
Experiment No. 06
Aim: - Program to execute ZLoop & YLoop using Non-Singular transformation.
Apparatus:- MATLAB Software.
Theory:-
Loops which contain only one link are independent and are called basic loops as shown
in Fig. 1. In other words, whenever a link element is added to the existing tree, basic loops or
fundamental loops can be obtained.
No. of fundamental loops = No. of links
The incidence of elements to basic loops of a connected graph is shown by the basic loop
incidence matrix (C). The elements of this matrix are as follows:
cij =1: If the ith element is incident to and oriented in the same direction as the jth basic loop.
cij = −1: If the ith element is incident to and oriented in the opposite direction as the jth basic loop.
cij = 0:If the ith element is not incident to the jth basic loop.
The basic loop incidence matrix, of dimension e*l for the graph shown in Fig. 1 below
Question:-
Que. For a given power network find loop impedance matrix using MATLAB for singular
transformation.
2 1 3 j*0.5 -
4 1 2 j*0.4 -
5 2 4 j*0.2 -
Program:-
clc;
clear all;
close all;
z11 = j*0.6;
z22 = j*0.5;
z33 = j*0.5;
z44 = j*0.4;
z55 = j*0.2;
z12=j*0.1;
z21=j*0.1;
z14=j*0.2;
z41=j*0.2;
1 0 0 -1 1
0 1 0 0 -1
C^ = 0 0 1 0 -1
0 0 0 1 0
0 0 0 0 1
A=transpose(C^)
(ZLOOP)=A*ZPRIM*C^
(YLOOP)=inv(ZLOOP)
Output:-
Zprim = [ 0.6000i 0.1000i 0 0.2000i 0
0.1000i 0.5000i 0 0 0
0 0 0.5000i 0 0
0.2000i 0 0 0.4000i 0
0 0 0 0 0.2000i]
C^ = [ 1 0 0 -1 1
0 1 0 0 -1
0 0 1 0 -1
0 0 0 1 0
0 0 0 0 1]
A=[1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
-1 0 0 1 0
1 -1 -1 0 1]
Calculations:-
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Question:-
Write down steps to find out loop impedance matrix for non singular transformation.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Find Augmented Loop (C)^ incidence matrix for given tree diagram.
______________________________________________________________________________
______________________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
______________________________________________________________________________
Conclusion:-
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Signature of Subject
Expert
Experiment No.- 07
Class
Roll No
Batch
Date
Experiment No. 07
Aim :- Program to execute ZBus using Step by Step method algorithm
Apparatus:- MATLAB Software.
Theory:-
The bus impedance matrix is found by three methods,
Inverse of YBUS.
Current injection technique
ZBUS Building algorithm
i. Inverse of YBUS:-
This method is simple method to find out ZBUS,
IBUS=YBUS*VBUS
VBUS=( YBUS)-1* IBUS
ZBUS=( YBUS)-1
ii. Current injection Method:-
VBUS=ZBUS * IBUS---------------------------------------------------------------------------------(1)
Above equation can be written in expanded form
V1=Z11I1+Z12I2+Z13I3+............................+Z1n In
V2=Z21I1+Z22I2+Z23I3+............................+Z2n In
V3=Z31I1+Z32I2+Z33I3+............................+Z3n In
.....
.....
.....
.....
Vn=Zn1I1+Zn2I2+Zn3I3+............................+Znn In
It immediately follows
Zij --------------------------------------------------------------------------------------------(2)
j=1,2,3,..........................n.
Question:-
Consider the positive sequence network for given table below, and find ZBUS using step by
step algorithm.
Branch Connecting Positive Sequence
No. Buses Impedance
1 0-1 j*0.25
2 0-3 j*0.20
3 1-2 j*0.08
4 2-3 j*0.06
5 2-3 j*0.06
6 1-3 j*0.13
Program :-
clc;
clear all;
close all;
Zbusnew1=[Zb1]
%step-2 Zb=j*0.08 is added from Existing Bus to New Bus (i=1) % Zb2=j*0.08;
Z111=j*0.25;
Zbusold=[ Z111];
Z111 Z111+Zb2]
%step-3 Zb=j*0.06 is added from Existing Bus to new Bus (i=2)% Zb3=j*0.06;%
Z114=j*0.25;
Z124=j*0.25;
Z134=j*0.25;
Z214=j*0.25;
Z224=j*0.33;
Z234=j*0.33;
Z314=j*0.25;
Z324=j*0.33;
Z334=j*0.39;
P=Zb4+Z224+Z334-2*Z234;
Z125=j*0.25;
Z135=j*0.25;
Z215=j*0.25;
Z225=j*0.25;
Z235=j*0.33;
Z315=j*0.25;
Z325=j*0.33;
Z335=j*0.36;
Z116=j*0.25;
Z126=j*0.25;
Z136=j*0.25;
Z216=j*0.25;
Z226=j*0.2233;
Z236=j*0.2933;
Z316=j*0.25;
Z326=j*0.2933;
Z336=j*0.3096;
R=Zb6+Z336;
Output:-
Zbusnew1 = [ 0.2500i ]
Zbusnew2 = [ 0.2500i 0.2500i
0.2500i 0.3300i ]
Zbusnew3 = [ 0.2500i 0.2500i 0.2500i
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
S.G.M.C.O.E.Mahagaon Department of Electrical Engineering
Computer Methods in Power System Final Year B.Tech
Question:-
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
_______________________________________________________________
__________________________________________________________________
__________________________________________________________________
_______________________________________________________________
__________________________________________________________________
_______________________________________________________________
__________________________________________________________________
_______________________________________________________________
Conclusion:-
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
_______________________________________________________________
Signature of Subject
Expert
Experiment No.- 08
Class
Roll No
Batch
Date
Experiment No. 08
Aim :- Program to execute Gauss-Siedel Method
Apparatus:- MATLAB Software.
Theory:-
Iterative methods of solving equations are more advantageous. Elimination methods, such
as Gaussian elimination, are prone to large round-off errors for a large set of equations. Iterative
methods, such as the Gauss-Seidel method, give the user control of the round-off error. Also, if
the physics of the problem are well known, initial guesses needed in iterative methods can be
made more judiciously leading to faster convergence. What is the algorithm for the Gauss-Seidel
method? Given a general set of n equations and n unknowns, we have
..
..
..
If the diagonal elements are non-zero, each equation is rewritten for the corresponding
unknown, that is, the first equation is rewritten with X1 on the left hand side, the second equation
is rewritten with X2 on the left hand side and so on as follows
Program:-
clc;
clear all;
close all;
dx=1 x=2
iter=0
iter = iter +1
g=(-1/9)*x^3+(6/9)*x^2+(4/9)
dx=g-x;
x=x+dx
fprintf('%g',iter),
disp([g,dx,x])
end
Output:-
dx =1
x=2
iter = 0
iter G dx x
8 4 0.0012 4
9 4 0 4
Question:-
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
_______________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Conclusion:-
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
_______________________________________________________________
Signature of Subject
Expert