EX-704 ELECTRICAL CAD LAB-1
EX-704 ELECTRICAL CAD LAB-1
EX-704 ELECTRICAL CAD LAB-1
(BITS/BIT/BITM)
Student Name:……………………………………………………
Roll No :…………………………
Branch:……………………………..Section……………………
Year …………………………Semester………………………..
FACULTY INCHARGE
1
2
LIST OF EXPERIMENTS SUB: SIMULATION LAB
SUB. CODE: (EX-802)
3
12. Zbus Building Algorithm
4
Date: Experiment-1
Apparatus: MATLAB
1
Circuit diagram:
Procedure:
1. Open Matlab-->Simulink--> File ---> New---> Model
2. Open Simulink Library and browse the components
3. Connect the components as per circuit diagram
4. Set the desired voltage and required frequency
5. Simulate the circuit using MATLAB
6. Plot the waveforms.
2
Graph:
Calculations:
3
Result:
4
Signature of the faculty
Date: Experiment-2
Apparatus: MATLAB
5
primary current has two components or branches, so there must be a parallel path with
primary winding of transformer. This parallel path of electric current is known as
excitation branch of equivalent circuit of transformer. The resistive and reactive
branches of
the excitation circuit can be represented as
Now if we see the voltage drop in secondary from primary side, then it would be ′K′ times
greater and would be written as K.Z2.I2.
Again I2′.N1 = I 2.N2
Therefore,
6
From above equation, secondary impedance of transformer referred to primary is,
So, the complete equivalent circuit of transformer referred to primary is shown in the
figure below,
7
Circuit Diagram:
8
Procedure:
1. Open Matlab-->Simulink--> File ---> New---> Model
2. Open Simulink Library and browse the components
3. Connect the components as per circuit diagram
4. Set the desired voltage and current
5. Simulate the circuit using MATLAB
6. Plot the waveforms
Graph:
Calculations:
9
Po wer Systems Simulation Lab GRIET/EEE
Result:
Aim: To determine voltage and power at the sending end and to regulate the voltage
using medium line model.
Apparatus: MATLAB
Theory: The transmission line having its effective length more than 80 km but less than
250 km, is generally referred to as a medium transmission line. Due to the line length
being considerably high, admittance Y of the network does play a role in calculating the
effective circuit parameters, unlike in the case of short transmission lines. For this reason
the modellingof a medium length transmission line is done using lumped shunt admittance
along with the lumped impedance in series to the circuit.
These lumped parameters of a medium length transmission line can be represented using
two different models, namely-
1)Nominal Π
representation. 2)Nominal T
representation.
Let’s now go into the detailed discussion of these above mentioned models.
As we can see here, VS and VR is the supply and receiving end voltages respectively,
..
Comparing equation (4) and (5) with the standard ABCD parameter equations
12
We derive the parameters of a medium transmission line as:
Circuit Diagram:
13
PROCEDURE:
1. Open Matlab-->Simulink--> File ---> New---> Model
2. Open Simulink Library and browse the components
3. Connect the components as per circuit diagram
4. Set the desired voltage and required frequency
5. Simulate the circuit using MATLAB
6. Calculate the voltage regulation of medium line model.
Calculations:
Result:
14
Date: Experiment-4
Apparatus: MATLAB
analysis. As we can see here, VS and VR is the supply and receiving end voltages
respectively, and
..........(1)
15
..........(2)
Comparing equation (4) and (5) with the standard ABCD parameter equations
16
Circuit Diagram:
PROCEDURE:
1. Open Matlab-->Simulink--> File ---> New---> Model
2. Open Simulink Library and browse the components
3. Connect the components as per circuit diagram
4. Set the desired voltage and required frequency
5. Simulate the circuit using MATLAB
6. Obtain the line performance of a line.
Graph:
17
Result
18
Date: Experiment-5
Aim: To determine the bus admittance matrix for the given power system Network
Theory:
19
For i = 1,2,….n, n = no. of buses of the given system, yij is the admittance of
element connected between buses i and j and yii is the admittance of element
connected between bus i and ground (reference bus).
START
Consider line l =
1
i = sb(1); I=
eb(1)
Y(i,i) =Y(i,i)+Yseries(l)
+0.5Yseries(l) Y(j,j)
=Y(j,j)+Yseries(l) +0.5Yseries(l)
Y(i,j) = -Yseries(l)
Y(j,i) =Y(i,j)
NO YES
Is l =NL?
l = l+1 Print Y -
Bus
Sto
p
20
MATLAB PROGRAM
function[Ybus] = ybus(zdata)
nl=zdata(:,1); nr=zdata(:,2); R=zdata(:,3); X=zdata(:,4);
nbr=length(zdata(:,1)); nbus = max(max(nl), max(nr));
Z = R + j*X; %branch impedance
y= ones(nbr,1)./Z; %branch admittance
Ybus=zeros(nbus,nbus); % initialize Ybus to zero
for k = 1:nbr; % formation of the off diagonal
elements if nl(k) > 0 & nr(k) > 0
Ybus(nl(k),nr(k)) = Ybus(nl(k),nr(k)) - y(k);
Ybus(nr(k),nl(k)) = Ybus(nl(k),nr(k));
end
end
for n = 1:nbus % formation of the diagonal
elements for k = 1:nbr
if nl(k) == n | nr(k) == n
Ybus(n,n) = Ybus(n,n) + y(k);
else, end
end
end
Calculations:
Result:
21
Date: Experiment-6
Aim:
To carry out load flow analysis of the given power system network by Gauss Seidel
metho
d
Apparatus: MATLAB
Theory:
Load flow analysis is the study conducted to determine the steady state operating
condition of the given system under given conditions. A large number of numerical
algorithms have been developed and Gauss Seidel method is one of such algorithm.
Problem Formulation
The performance equation of the power system may be written of
[I bus] = [Y bus][V bus] (1)
Selecting one of the buses as the reference bus, we get (n-1) simultaneous equations. The bus
loading equations can be written as
Ii = Pi-jQi / Vi* (i=1,2,3,…………..n) (2)
Where,
n
Pi=Re [ Σ Vi*Yik Vk] . (3)
k=1
n
Σ
Qi= -Im [ Vi*Yik Vk]. (4)
k=1
The bus voltage can be written in form of
n
Σ
Vi=(1.0/Yii)[Ii- Yij Vj] (5)
j=1
j≠i(i=1,2,… ......... n)& i≠slack bus
Substituting Ii in the expression for Vi, we get
n
Vi new=(1.0/Yii)[Pi-JQi / V io* - Σ Yij Vio] (6)
J=1
The latest available voltages are used in the above expression, we get
n n
Vi new =(1.0/Yii)[Pi-JQi / V oi* - Σ YijVjn- Σ Yij Vi o] (7)
J=1 j=i+1
The above equation is the required formula .this equation can be solved for voltages in
interactive manner. During each iteration, we compute all the bus voltage and check for
22
convergence is carried out by comparison with the voltages obtained at the end of
previous iteration. After the solutions is obtained. The stack bus real and reactive
powers, the reactive power generation at other generator buses and line flows can be
calculated.
Algorithm
Step1: Read the data such as line data, specified power, specified voltages, Q limits at the
generator buses and tolerance for convergences
Step2: Compute Y-bus matrix.
Step3: Initialize all the bus voltages.
Step4: Iter=1
Step5: Consider i=2, where i’ is the bus number.
Step6: check whether this is PV bus or PQ bus. If it is PQ bus goto step 8 otherwise go to next
step.
Step7: Compute Qi check for q limit violation. QGi=Qi+QLi.
7).a).If QGi>Qi max ,equate QGi = Qimax. Then convert it into PQ
bus. 7).b).If QGi<Qi min, equate QGi = Qi min. Then convert it into PQ
bus.
Step8: Calculate the new value of the bus voltage using gauss seidal formula.
i=1 n
Vi=(1.0/Yii) [(Pi-j Qi)/v i0*- Σ Yij Vj- Σ YijVj0]
J=1 J=i+1
Adjust voltage magnitude of the bus to specify magnitude if Q limits are not violated.
Step9: If all buses are considered go to step 10 otherwise increments the bus no. i=i+1 and Go
to step6.
Step10: Check for convergence. If there is no convergence goes to step 11 otherwise go to
step12.
Step11: Update the bus voltage using the formula.
Vinew=Vi old+ α(vinew-Viold) (i=1,2,…..n) i≠ slackbus ,α is the acceleration factor=1.4
Step12: Calculate the slack bus power, Q at P-V buses real and reactive give flows real and
reactance line losses and print all the results including all the bus voltages and all
the bus angles.
Step13: Stop.
23
START
Read
1. Primitive Y matrix
2. Bus incidence matrix A
3. Slack bus voltages
4. Real and reactive bus powers Pi& Qi
5. Voltage magnitudes and their limits
Form Ybus
Test
for type
of bus
(r+1)
Compute Qi
Qi (r+1
) >Qi, Qi (r+1
) <
max Qi,min
Qi (r+1
) = Qi (r+1
) = Compute (r+1)
Qi,max Qi,min Ai
Compute Ai
Compute δi (r+1)
(r+1) Vi(r+1)s
and
Compute Vi =|Vi |/δi(r+1)
24
Power Systems Simulation Lab GRIET/EEE
Replace Vi r
by Vi(r+1)
and advance bus count
i = i+1
B Is i<=n
Advance
A iteration Is
Δ Vmax<=ε
count, r = r+1
Procedure
□ Enter the command window of the MATLAB.
□ Create a new M – file by selecting File - New – M – File.
□ Type and save the program in the editor Window.
□ Execute the program by pressing Tools – Run.
□ View the results.
MATLAB program
clear
basemva=100;
accuracy=0.001; maxiter=100;
% no code mag degree MW Mvar MW Mvar Qmin Qmax Mvar
busdata=[1 1 1.0 0.0 0.0 0.0 0.0 0.0 0 0 0
5
2 0 1.0 0.0 256.66 110.2 0.0 0.0 0 0 0
3 0 1.0 0.0 138.6 45.2 0.0 0.0 0 0 0];
% bus bus R X 1/2B =1 for lines
linedata=[ 2 0.02 0.04 0.0 1
1
25
1 3 0.01 0.03 0.0 1
26
2 3 0.0125 0.025 0.0 1];
lfybus
lfgauss
busout
lineflow
Calculations:
Result
27
Date: Experiment-7
Aim
To carry out load flow analysis of the given power system by Newton Raphson method.
Algorithm
Step1: Input the total number of buses. Input the details of series line impendence and
line charging admittance to calculate the Y-bus matrix.
Step2: Assume all bus voltage as 1 per unit except slack bus.
Step3: Set the iteration count as k=0 and bus count as p=1.
Step4: Calculate the real and reactive power pp and qp using the
formulaP=ΣvpqYpq*cos(Qpq+ εp-εq)
Qp=ΣVpqYpa*sin(qpq+ εp-εa)
28
Evalute pp*=psp-pp*
Step5: If the bus is generator (PV) bus, check the value of Qp*is within the limits.If it Violates
the limits, then equate the violated limit as reactive power and treat it as PQ bus. If limit is
not isolated then calculate,
|vp|^r=|vgp|^rspe-|vp|r ; Qp*=qsp-qp*
Step6: Advance bus count by 1 and check if all the buses have been accounted if not go to step5.
Step7: Calculate the elements of Jacobean matrix.
Step8: Calculate new bus voltage increment pk and
fpk Step9: Calculate new bus voltage ep*h+ ep*
Fp^k+1=fpK+fpK
Step10: Advance iteration count by 1 and go to step3.
Step11: Evaluate bus voltage and power flows through the line .
Procedure
□ Enter the command window of the MATLAB.
□ Create a new M – file by selecting File - New – M – File.
□ Type and save the program in the editor Window.
□ Execute the program by pressing Tools – Run.
□ View the results.
MATLAB program:
clear
basemva=100;accuracy=0.001;maxiter=100;
% no code mag degree MW Mvar MW Mvar Qmin Qmax Mvar
busdata=[1 1.0 0.0 0.0 0.0 0.0 0.0 0 0 0
1 5
2 0 1.0 0.0 110. 0.0 0.0 0 0 0
256.66 2
3 0 1.0 0.0 138.6 45.2 0.0 0.0 0 0 0];
% bus bus R X 1/2B =1 for lines
linedata=[1 0.02 0.04 0.0 1
2
1 3 0.01 0.03 0.0 1
2 3 0.0125 0.025 0.0 1];
lfybus
29
lfnewto
n
busout
lineflow
Calculations:
Result
30
Date: Experiment-8(a)
OPTIMAL DISPATCH NEGLECTING LOSSES
Apparatus: MATLAB
Theory:
As the losses are neglected, the system model can be understood as shown in Fig, here n
number of generating units are connected to a common bus bar, collectively meeting the
total power demand PD. It should be understood that share of power demand by the units
does not involve losses.
Since transmission losses are neglected, total demand P D is the sum of all generations of n-
number of units. For each unit, a cost functions C i is assumed and the sum of all costs
computed from these cost functions gives the total cost of production CT.
generators where the cost function of the ith unit, from Eq.
(1.1) is:
Ci = αi + βiPi + γ Pi2
i
Now, the ED problem is to minimize C T , subject to the satisfaction of the following equality
and inequality constraints.
Equality constraint
31
The total power generation by all the generating units must be equal to the power demand.
Inequality constraint
Pimin ≤ Pi ≤ Pimax i = 1, 2, … , n
Economic dispatch problem can be carried out by excluding or including generator power
limits, i.e., the inequality constraint.
The constrained total cost function can be converted into an unconstrained function by
using the Lagrange multiplier as:
Since Ci = C1 + C2+…+Cn
From the above equation the coordinate equations can be written as:
32
Equations Required for the ED solution
For a known value of λ, the power generated by the ith unit from can be written as:
The value of λ can be calculated and compute the values of P i for i = 1, 2,…, n for
optimal scheduling of generation.
33
Procedure :
□ Create a new file in edit mode by selecting File - New File.
□ Browse the components and build the bus sytem
□ Execute the program in run mode by selecting tools-opf areas-select opf
□ Run the primal lp
□ View the results in case information-Generator fuel costs.
□ Tabulate the results.
Results:
Generato Gen Min Max Cost
r Name MW IOA IOB IOC MW MW $/Hr Lambda
1 79.52 150 5 0.11 10 250 1243.12 22.49
2 126 600 1.2 0.085 10 300 2100.66 22.62
3 114 335 1 0.1225 10 270 2041.01 28.93
34
Calculations
Result
35
Date: Experiment-8(b)
OPTIMAL DISPATCH INCLUDING LOSSES
Apparatus: MATLAB
Theory : When the transmission losses are included in the economic dispatch problem, we
can modify (5.4) as
PT P1 P2 PN PLOSS
where PLOSS is the total line loss. Since PT is assumed to be constant, we have
In the above equation dPLOSS includes the power loss due to every generator, i.e.,
dP PLOSS dP PLOSS dP PLOSS dP
1 2 N
LOSS P1 P2 PN
Also minimum generation cost implies dfT = 0 as given Multiplying by and combing we get
PLOSS PLOSS PLOSS
0 dP
dP2 dPN
P P 1 P
1 2 N
Adding with we obtain
N fT PLOSS
0 i dPi
1 Pi Pi
fT PLOSS
i 1, , N
Pi Pi 0,
Again since
fT dfT
, i 1, , N
Pi
Pi
36
we
get
df1 df2 dfN L N
L 1 L 2
dPi dP2 dPN
1
Li , i 1, , N
1 PLOSS Pi
Consider an area with N number of units. The power generated are defined by the vector
P P1 P2 PN
T
PLOSS PT BP
37
Circuit Diagram:
49
Procedure :
□ Create a new file in edit mode by selecting File - New File.
□ Browse the components and build the bus sytem
□ Execute the program in run mode by selecting tools-opf areas-select opf
□ Run the primal lp
□ View the results in case information-Generator fuel costs.
□ Tabulate the results.
Results:
Total Cost
=
5359.15$/
hr
Result
39
Date: Experiment-9
TRANSIENT RESPONSE OF A RLC CIRCUIT
Aim: To obtain the transient response of an RLC circuit with its damping frequency and
damping ratio using MATLAB
Apparatus: MATLAB
Theory: RLC circuits are widely used in a variety of applications such as filters in
communications systems, ignition systems in automobiles, defibrillator circuits in biomedical
applications, etc. The analysis of RLC circuits is more complex than of the RC circuits we
have seen in the previous lab. RLC circuits have a much richer and interesting response than
the previously studied RC or RL circuits. A summary of the response is given below.
Lets assume a series RLC circuit. The discussion is also applicable to other RLC circuits such as
the parallel circuit.
By writing KVL one gets a second order differential equation. The solution consists of two
parts:
in which is the damping ratio and is the undamped resonant frequency. The roots of
the quadratic equation are equal to,
For the example of the series RLC circuit one has the following characteristic equation for
the current iL(t) or vC(t),
s2 + R/L.s + 1/LC =0.
Depending on the value of the damping ratio one has three possible cases:
40
The total response consists of the sum of the
complementary and the particular solution. The case
of a critically damped response to a unit input step
function.
Procedure:
□ Enter the command window of the MATLAB.
□ Create a new M – file by selecting File - New – M – File.
□ Type and save the program in the editor Window.
□ Execute the program by pressing Tools – Run.
□ View the results.
MATLAB Program:
p = sqrt(1-z^2)
41
wd = wn*p;
h = [p/z];
k =
atan(h) m
= pi-k;
tr =
[m/wd] tp =
[pi/wd] q =
z*wn
ts =
[4/q] r =
z*pi f =
[r/p]
mp = exp(-f)
num = [0 0 n]
den = [1 z*z*wn n]
s = tf(num,den)
hold on
step(s)
impulse(s)
hold off
Result:
Enter value of undamped natural frequency 16
wn = 16
z= 0.5000
42
n = 256
p = 0.8660
k = 1.0472
tr = 0.1511
tp = 0.2267
q= 8
ts = 0.5000
r = 1.5708
f = 1.8138
mp = 0.1630
num = 0 0 256
den = 1 4 256
Transfer
function:
256
s^2 + 4 s + 256
Graph:
43
Calculations:
Result
44
Date: Experiment-10
Apparatus: MATLAB
Theory: The response of the armature current when a three-phase symmetrical short
circuit occurs at the terminals of an unloaded synchronous generator.
It is assumed that there is no dc offset in the armature current. The magnitude of the
current decreases exponentially from a high initial value. The instantaneous expression
for the fault current is given by
with .
45
is the direct axis subtransient time
constant is the direct axis transient time
constant
we have neglected the effect of the armature resistance hence α = π/2. Let us assume
that the fault occurs at time t = 0. From (6.9) we get the rms value of the
current as
which is called the subtransient fault current. The duration of the subtransient current is
dictated by the time constant Td . As the time progresses and Td´ ´ < t < Td´ , the first
exponential term will start decaying and will eventually vanish. However since t is still
nearly equal to zero, we have the following rms value of the current
This is called the transient fault current. Now as the time progress further and the second
exponential term also decays, we get the following rms value of the current for the
sinusoidal steady state
In addition to the ac, the fault currents will also contain the dc offset. Note that a
symmetrical fault occurs when three different phases are in three different locations in the
ac cycle.
Therefore the dc offsets in the three phases are different. The maximum value of the dc
offset is given by
Procedure:
1. Open Matlab-->Simulink--> File ---> New---> Model
2. Open Simulink Library and browse the components
3. Connect the components as per circuit diagram
4. Set the desired voltage and required frequency
5. Simulate the circuit using MATLAB
6. Plot the waveforms
46
Circuit Diagram:
Graph:
47
Calculations:
Result
48
Date: Experiment-11
Apparatus: MATLAB
Theory:
Single Line-to-Ground Fault
The single line-to-ground fault is usually referred as “short circuit” fault and occur s when
one conductor falls to ground or makes contact with the neutral wire. The general
representation of a single line-to-ground fault is shown in Figure 3.10 where F is the fault
point with impedances Z f. Figure 3.11 shows the sequences network diagram. Phase a is
usually assumed to be the faulted phase, this is for simplicity in the fault analysis
calculations. [1]
Ia0
F0
+
Va0 Z0
Iaf - N0
Ia1
F1
F
a 3Zf
+
Va1
Z1
+
- N1 1.
0
b Ia2 -
Ia Ibf
f =0 Icf = 0 F2
c +
Z2
Zf Va2
N2
+
-
Vaf
-
Since the zero-, positive-, and negative-sequence currents are equals as it can be
observed in Figure 3.11. Therefore,
I I I 1.00
49
3Z
a0 a1 a2
Z Z
Z
0 1 2
50
With the results obtained for sequence currents, the sequence voltages can be obtained
from
V
a0 0 1 1 1 I a 0
2
V
b1a1 1 a I
1.0 0 a
V
c2 01 a a2 Ia 2
By solving Equation
Vaa0 ZI0 0
Vaa1 Z1I 1
1.0
Vaa2 ZI2 2
If the single line-to-ground fault occurs on phase b or c, the voltages can be found by
the relation that exists to the known phase voltage components,
V
aVf 1 1 1 a0
bf 1 a
2
V a Va1
V 1 a
cf a 2 Va 2
as
V V aV
2 aV
bf a0 a1 a2
V V aV aV
2
cf a0 a1 a2
Line-to-Line Fault
A line-to-line fault may take place either on an overhead and/or underground
transmission system and occurs when two conductors are short-circuited. One of the
characteristic of this type of fault is that its fault impedance magnitude could vary over a
wide range making very hard to predict its upper and lower limits. It is when the fault
impedance is zero that the highest asymmetry at the line-to-line fault occurs
51
Zf
Zf
Iaf 0
IIbf cf
Vbc ZIf bf
I a0 0
II 1.00
Z12Z Z f
a1a 2
If Zf = 0,
II 1.0 0
Z1Z2
a1
a2
Va0 0
Va1a 1.0- Z1I 1
52
Finally, the line-to-line voltages for a line-to-line fault can be expressed as
F
a
b Ia0 Zf +3Zg Ia1 Zf Ia2 Zf
c
Iaf = 0 Ibf Icf + F0 F1 F2
+ +
Zf Zf Va0 Va1 Z1 Va2
Z0 + Z2
- - o -
N0 N1 1. 0 N2
Zg Ibf +Icf 0
-
N
n
Iaf 0
Vbf ()Zf Ibf
Zg Vcf ()Zf ZIgcf Icf
Zg ZIgbf
1.00
Ia1
()ZZ1 (Z 20 Zf )(Z Zf 3Zg )
f
(Z 20 Zf ) (Z Zf 3Zg )
53
(Z 0 Zfg 3Z )
IaIa21 []
(Z 20 Zf ) (Z 3Zg )
Zf
()ZZ2 f
IaIa01 []
(Z 20 Zf ) (Z 3Zg )
Zf
Iaf 0 Ia 0 Ia1 Ia
2 Ia 0 ()I a1 Ia 2
If Zf and Z g are both equal to zero, then the positive-, negative-, and zero-sequences
can be obtained from
1.00
Ia1
(ZZ20)( )
()Z
1 ()ZZ20
IIaa21 ()Z 0
[]
()ZZ20
IIaa01 ()Z 2
[]
()ZZ20
Iaf 0
Ibf I a 0 aI2 a1
aIa 2
Icf I a 0 aI a1 aI2 a2
The resultant phase voltages from the relationship given in Equation 3.78 can
be expressed as
54
Vaf Va 0 Va1 Va 2 3Va1
VbVf cf 0
55
And the line-to-line voltages are
Circuit Diagram:
Procedure:
1. Open Matlab-->Simulink--> File ---> New---> Model
2. Open Simulink Library and browse the components
3. Connect the components as per circuit diagram
4. Set the desired voltage and required frequency
5. Simulate the circuit using MATLAB
6. Plot the waveforms
56
Graph:
57
Result
58
Date: Experiment-12
Aim: To determine the bus impedance matrix for the given power system Network
Theory:
Formation of Z BUS matrix
Z-bus matrix is an important matrix used in different kinds of power system study such
as short circuit study, load flow study etc. In short circuit analysis the generator uses
transformer impedance must be taken into account. In quality analysis the two-short element
are neglected by forming the z-bus matrix which is used to compute the voltage distribution
factor. This can be largely obtained by reversing the y-bus formed by inspection method or by
analytical method.
Taking inverse of the y-bus for large system in time consuming; Moreover modification in
the system requires whole process to be repeated to reflect the changes in the system. In
such cases is computed by z-bus building algorithm.
Algorithm
Step 1: Read the values such as number of lines, number of buses and line data, generator
data and transformer data.
Step 2: Initialize y-bus matrix y-bus[i] [j]
=complex.(0.0,0.0) Step 3: Compute y-bus matrix by
considering only line data.
Step 4: Modifies the y-bus matrix by adding the transformer and the generator admittance to
the respective diagonal elements of y-bus matrix.
Step 5: Compute the z-bus matrix by inverting the modified y-bus matrix.
Step 6: Check the inversion by multiplying modified y-bus and z-bus matrices to check
whether the resulting matrix is unit matrix or not.
Step 7: Print the z-bus matrix.
59
START
STOP
Procedure:
□ Enter the command window of the MATLAB.
□ Create a new M – file by selecting File - New – M – File.
□ Type and save the program in the editor Window.
□ Execute the program by pressing Tools – Run.
60
□ View the results.
MATLAB Program :
function[Ybus] = ybus(zdata)
zdata(:,1)); nbus = max(max(nl), max(nr));
Z = R + j*X; %branch impedance
y= ones(nbr,1)./Z; %branch admittance
Ybus=zeros(nbus,nbus); % initialize Ybus to zero
for k = 1:nbr; % formation of the off diagonal
elements if nl(k) > 0 & nr(k) > 0
Ybus(nl(k),nr(k)) = Ybus(nl(k),nr(k)) - y(k);
Ybus(nr(k),nl(k)) = Ybus(nl(k),nr(k));
end
end
for n = 1:nbus % formation of the diagonal
elements for k = 1:nbr
if nl(k) == n | nr(k) == n
Ybus(n,n) = Ybus(n,n) + y(k);
else, end
end
end
Zbus= inv(Y)
Ibus=[-j*1.1;-j*1.25;0;0]
Vbus=Zbus*Ibus
OUTPUT:
Result:
61
Date: Experiment-13(a)
SYMMETRICAL COMPONENTS
Apparatus: MATLAB
Theory:
Before we discuss the symmetrical component transformation, let us first define
the a- operator.
a j
120 e0
1 j 3
2 2
Note that for the above operator the following relations hold
1 3
a2 e j 240 j
0
a
2 2
a e 1
3 j 3600
a5 e j e j 360 e j
0
and so on
6000 2400 a2
1 31 3
1 a a2 1 j j 0
2 2 2 2
Similarly
Finally
Va 0 Vb0 Vc0
62
Va 0 1 1 1 Va
1 2
Va1 a Vb
1 a
Va2 3 1 a Vc
a
2
V012 = [0.6 90
1.0 30
0.8 -30];
rankV012=length(V012(1,:));
if rankV012 == 2
mag= V012(:,1); ang=pi/180*V012(:,2);
V012r=mag.*(cos(ang)+j*sin(ang));
elseif rankV012 ==1
V012r=V012;
else
fprintf('\n Symmetrical components must be expressed in a one column array in
rectangular complex form \n')
fprintf(' or in a two column array in polar form, with 1st column magnitude & 2nd column
\n')
fprintf(' phase angle in degree.
\n') return, end
a=cos(2*pi/3)+j*sin(2*pi/3);
A = [1 1 1; 1 a^2 a; 1 a a^2];
Vabc= A*V012r
Vabcp= [abs(Vabc) 180/pi*angle(Vabc)];
fprintf(' \n Unbalanced phasors \n')
fprintf(' Magnitude Angle Deg.\n')
disp(Vabcp)
Vabc0=V012r(1)*[1; 1; 1];
Vabc1=V012r(2)*[1; a^2; a];
Vabc2=V012r(3)*[1; a; a^2];
63
Procedure:
1. Open Matlab--> File ---> New---> Script
2. Write the program
3. Enter F5 to run the program
4. Observe the results in MATLAB command window.
Result:
Vabc =
1.5588 + 0.7000i
-0.0000 + 0.4000i
-1.5588 + 0.7000i
Unbalanced phasors
Magnitude Angle Deg.
1.708 24.1825
8
0.400 90.0000
0
1.708 155.817
8 5
Result
64
Date: Experiment-13(b)
Aim: To obtain the original unbalanced phase voltages from symmetrical components
Apparatus: MATLAB
Theory:
Va012 CVabc
The original phasor components can also be obtained from the inverse symmetrical
component transformation, i.e.,
Vab C Va 012
1
c
Inverting the matrix C we get
Va 1 Va 0 Va 0
1 1
1
a Va1 C Va1
2
Vb 1 a
Vc 1 a a 2 Va 2 Va2
Va Va 0 Va1 Va
2
Ia012 CIabc
1
Iabc C Ia012
65
Program:
Iabc = [1.6 25
1.0 180
0.9 132];
rankIabc=length(Iabc(1,:))
; if rankIabc == 2
mag= Iabc(:,1);
ang=pi/180*Iabc(:,2);
Iabcr=mag.*(cos(ang)+j*sin(ang));
elseif rankIabc ==1
Iabcr=Iabc;
else
fprintf('\n Three phasors must be expressed in a one column array in rectangular complex
form \n')
fprintf(' or in a two column array in polar form, with 1st column magnitude & 2nd column
\n')
fprintf(' phase angle in degree.
\n') return, end
a=cos(2*pi/3)+j*sin(2*pi/3);
A = [1 1 1; 1 a^2 a; 1 a a^2];
I012=inv(A)*Iabcr;
symcomp= I012
Result:
symcomp =
-0.0507 + 0.4483i
0.9435 - 0.0009i
0.5573 + 0.2288i
Symmetrical
components Magnitude
Angle Deg.
0.4512 96.4529
0.9435 -0.0550
0.6024 22.3157
66
Result
67
Date: Experiment-14
SHORT CIRCUIT ANALYSIS OF 14 BUS SYSTEM
Aim: To obtain the short circuit analysis for a IEEE 14 bus system
Apparatus: POWERWORLD
Theory:
V f Z44I f
Zi 4
V Z I V i 1,2,3
,
i i4 f f
Z44
We further assume that the system is unloaded before the fault occurs and that the
magnitude and phase angles of all the generator internal emfs are the same. Then there will
be no current circulating anywhere in the network and the bus voltages of all the nodes
before the fault will be same and equal to Vf. Then the new altered bus voltages due to the
fault will be given from by
Z
i4
Vi V f Vi 1 Vf i 1, ,4
,
Z44
14 bus system :
68
Procedure :
□ Create a new file in edit mode by selecting File - New File.
□ Browse the components and build the bus sytem
□ Execute the program in run mode by selecting tools-fault analysis
□ Select the fault on which bus and calculate
□ Tabulate the results.
70
6 0.47538 0.47538 0.47538 -10.63 -130.63 109.37
7 0.42742 0.42742 0.42742 -8.44 -128.44 111.56
8 0.55864 0.55864 0.55864 -10.06 -130.06 109.94
9 0.41373 0.41373 0.41373 -9.5 -129.5 110.5
10 0.42145 0.42145 0.42145 -9.94 -129.94 110.06
11 0.44639 0.44639 0.44639 -10.37 -130.37 109.63
12 0.46474 0.46474 0.46474 -11.44 -131.44 108.56
13 0.45879 0.45879 0.45879 -11.27 -131.27 108.73
14 0.42532 0.42532 0.42532 -11.3 -131.3 108.7
Fault current = 4.45 p.u
= 1861.67 A
Result
71
Date: Experiment-15
Aim: To obtain the frequency response of single and two area power system using MATLAB
Formula used:
1)
2)
3)
4)
Where
D = damping coefficient
GG – gain of generator
GT - gain of turbine
GP - gain of power
KP – power system constant
KT- turbine constant
KG- generator constant
TP – power system time
constant TG- generator time
constant
Procedure:
1. Open Matlab-->Simulink--> File ---> New---> Model
2. Open Simulink Library and browse the components
3. Connect the components as per circuit diagram
4. Set the desired voltage and required frequency
5. Simulate the circuit using MATLAB
6. Plot the waveforms
72
SIMULINK RESULTS:
Single Area Power System Block Diagram
Graph:
73
RESULT
74
Date: Experiment-16
Aim: To obtain the frequency response of two area power system using MATLAB
Apparatus: MATLAB
Formula used:
1)
2)
3)
4)
Where
D = damping coefficient
GG – gain of generator
GT - gain of turbine
GP - gain of power
KP – power system constant
KT- turbine constant
KG- generator constant
TP – power system time
constant TG- generator time
constant
Procedure:
1. Open Matlab-->Simulink--> File ---> New---> Model
2. Open Simulink Library and browse the components
3. Connect the components as per circuit diagram
4. Set the desired voltage and required frequency
5. Simulate the circuit using MATLAB
6. Plot the waveforms
75
SIMULINK RESULTS:
Single Area Power System Block Diagram
Graphs:
76
77
Result
Aim: To obtain step response of rotor angle and generator frequency of a synchronous
machine
Apparatus: MATLAB
Circuit Diagram:
Procedure:
1. Open File ---> New---> Model
2. Open Simulink Library and browse the components
3. Connect the components as per circuit diagram
4. Set the desired voltage and required frequency
5. Simulate the circuit using MATLAB
6. Plot the waveforms
79
Graph:
80
Result
81
Signature of the faculty
82