PS-2-Lab manual
PS-2-Lab manual
Matlab
High Level
Languages such as
C, Pascal etc.
Assembly
1
School Of Engineering and Technology
Department of Electrical Engineering
Matlab
Command
m-files mat-files
Line
functions
Command execution like Data
DOS command window storage/
loading
Input
Output
capability
Matlab Screen
2
School Of Engineering and Technology
Department of Electrical Engineering
Workspace / Current
Directory
Command Window
Command History
3
School Of Engineering and Technology
Department of Electrical Engineering
4
School Of Engineering and Technology
Department of Electrical Engineering
5
School Of Engineering and Technology
Department of Electrical Engineering
6
School Of Engineering and Technology
Department of Electrical Engineering
7
School Of Engineering and Technology
Department of Electrical Engineering
8
School Of Engineering and Technology
Department of Electrical Engineering
9
School Of Engineering and Technology
Department of Electrical Engineering
10
School Of Engineering and Technology
Department of Electrical Engineering
11
School Of Engineering and Technology
Department of Electrical Engineering
12
School Of Engineering and Technology
Department of Electrical Engineering
13
School Of Engineering and Technology
Department of Electrical Engineering
14
School Of Engineering and Technology
Department of Electrical Engineering
15
School Of Engineering and Technology
Department of Electrical Engineering
16
School Of Engineering and Technology
Department of Electrical Engineering
17
School Of Engineering and Technology
Department of Electrical Engineering
18
EXPERIMENT 2 TO STUDY THE MATLAB
COMMAND
Matlab Program:
Clc
X = 2.75 ;
Y = 1.5 ;
Z=1
A = x+y+z
B = x*y*z
C = x/y
D = x^y
E = x^2
19
Output:
A = 5.2500
B = 4.125
C = 1.833
D = 4.5604
E = 7.5625
20
Experiment 3 :
Draw the waveforms of 3 phase AC voltages
showing each phase with corresponding
colour.
Solution:
% this program gives 3 phase AC voltage
waveform as the output
Clc
Clear all
t=0:1:100;
Er=100*sin(314*t);
Ey=100*sin(314*t – (120*pi/180));
Eb=100*sin(314*t – (240*pi/180));
Plot(t,Er,’-*r’,t,Ey,’-*y’,t,Eb,’-*b’)
grid
title(‘Three phase AC voltage waveforms’)
xlabel(‘Theta in radians’)
ylabel(‘AC voltage in volts’)
gtext(‘Er’)
gtext(‘Ey’)
gtext(‘Eb’)
21
EXPERIMENT 4
Single Phase Half Wave Rectifier with R & RL load
Aim:
To simulate the 1Ø half controlled rectifier circuit with R & RL load and obtain the
corresponding waveforms using MATLAB/SIMULINK.
Formulae used:
𝑽𝒎
Average dc voltage, Vdc = (1+cosα) (volts)
𝝅
𝑽𝒎 𝟏
Operation:
The phase controlled rectifiers using SCRs are used to obtain controlled dc output voltages
from the fixed ac mains input voltage. The circuit diagram of a half controlled converter is
shown in Figure 1. The output voltage is varied by controlling the firing angle of SCRs. The
single phase half controlled converter consists of two SCRs and two diodes. During positive
half cycle, SCR1 and Diode 2 are forward biased. Current flows through the load when SCR1
is triggered into conduction. During negative half cycle, SCR3 and D1 are forward biased. If
the load is resistive, the load voltage and load current are similar.
If the load is inductive, the current will continue to flow even when the supply voltage
reverses polarity due to the stored energy in the inductor. At the end of positive half cycle,
D2 is reverse biased and D1 is forward biased. As SCR1 is not turned off the freewheeling
current due to the stored energy in the inductor will flow through the diode D1 and SCR1.
When SCR3 is triggered, the current gets transferred from SCR1 to SCR3. Load current now
flows from supply via SCR3, load and D4. At the end of negative half cycle, the freewheeling
current will flow 0through the diode D2 and SCR3.
Circuit Diagram:
22
Model Graph:
Resistive Load
Inductive load:
Result:
Thus the Single Phase half controlled Rectifier with R & RL Load circuit is simulated using
MATLAB/SIMULINK and the corresponding waveforms are obtained.
23
EXPERIMENT 5
Aim:
To simulate the 1Ø fully Controlled rectifier circuit with R & RL load and obtain the
corresponding waveforms using MATLAB/SIMULINK.
Formulae used:
The phase controlled rectifiers using SCRs are used to obtain controlled dc output voltages
from the fixed ac mains input voltage. The circuit diagram of a fully controlled converter is
shown in Figure 2. The output voltage is varied by controlling the firing angle of SCRs. The
single phase fully controlled converter consists of four SCRs. During positive half cycle, SCR1
and SCR 2 are forward biased. Current flows through the load when SCR1 and SCR2 is
triggered into conduction. During negative half cycle, SCR3 and SCR4 are forward biased. If
the load is resistive, the load voltage and load current are similar.
When the load is inductive, SCR1 and SCR2 conduct from to . The nature of the
load current depends on the values of R and L in the inductive load. Because of the inductance,
the load current keeps on increasing and becomes maximum at . At , the supply voltage
reverses but SCRs 1 and 2 does not turn off. This is because the load inductance does not allow
the current to go to zero instantly. Thus the energy stored in the inductance flows against the
supply mains. The output voltage is negative from to + since supply voltage is negative.
Circuit Diagram:
24
Model Graph:
Resistive Load
Inductive load:
Result:
Thus the Single Phase fully controlled Rectifier with R & RL Load circuit is simulated using
MATLAB/SIMULINK and the corresponding waveforms are obtained.
25
26
EXPERIMENT 6
Aim: To simulate the 3Ø fully Controlled rectifier circuit with R & RL load and obtain the
corresponding waveforms using MATLAB/SIMULINK.
Theory:
The three phase full bridge converter works as three phase AC-DC converter for firing
angle delay 00<α≤900 and as three phase line commutated inverter for 900<α<1800. The
numbering of SCRs 1, 3, 5 for the positive group and 2, 4, 6 for negative group. This numbering
scheme is adopted here as it agrees with the sequence of gating of six thyristors in a 3-phase
full converter.
Here each SCR is conduct for 1200. At any time two SCRs, one from positive group
and other from negative group must conduct together and this combination must conduct for
600.this means commutation occurs for every 600. For ABC phase sequence of three phase
supply thyristors conduct in pairs: T1 and T2, T2 and T3, T3 and T4, T4 and T5, T5 and T6,
T6 and T1.
Formulae used:
3𝑉𝑚𝑙
Average output voltage 𝑉0 = cos ∝
𝜋
2
RMS of the source current is 𝐼𝑠 = 𝐼𝑜√
3
Each SCR conducts for 1200 for every 3600. Therefore the RMS value of SCR current is
1
𝐼𝑟 = 𝐼𝑜√
3
26
Circuit Diagram:
Model Graph:
Resistive load:
27
Inductive load:
Result:
Thus the three phase fully controlled Rectifier with R & RL Load circuit is simulated using
MATLAB/SIMULINK and the corresponding waveforms are obtained.
28
EXPERIMENT 7
SINGLE PHASE AC VOLTAGE REGULATOR
Aim:
To simulate the 1Ø AC voltage regulator circuit and obtain the suitable waveforms using
MATLAB/SIMULINK
Theory:
AC regulators are used to get variable AC voltage from the fixed mains voltage. Some of the
important applications of AC regulators are: domestic and industrial heating, induction heating
in metallurgical industries, induction motor speed control for fan and pump drives, transformer
tap changers in utility systems, static reactive power compensators, lighting control etc.,
Earlier, auto transformers, transformers with taps and magnetic amplifiers were
employed in these applications because of high efficiency, compact size, flexibility in control
etc. Two thyristors in anti-parallel are employed for full wave control. In this case, isolation
between control and power circuit is most essential because of the fact that the cathodes of the
two thyristors are connected to the common point. For low power applications, a triac may be
used. In this case isolation between control and power circuitry is not necessary.
Formulae Used:
The triggering pulse is generated at the point at which the associated cosine wave becomes
instantaneously equal to the control voltage.
In other words,
29
Circuit Diagram:
Operation:
A triac control circuit for lamp dimmers is shown in Fig.1. A diac is a gateless triac designed
to breakdown at a low voltage. During the positive half cycle, the triac requires a positive gate
pulse for turning it on. This is provided by the capacitor C. When its voltage is above the
breakdown voltage of the diac, the capacitor C discharges through the triac gate. When the triac
turns on, the capacitor Voltage will be reset to zero. A similar operation takes place in the
negative half cycles, and a negative gate pulse will be applied when the diac breaks down in
the reverse direction. Adjustment of series resistance, R determines the charging rate of
capacitor C and hence the value of the phase angle delay. The output power and thus light
intensity are varied by controlling the phase of conduction of the triac.
Model
Graph:
Result:
Thus the 1 Ø AC Voltage regulator with R load circuit is executed with the help of MATLAB
software and the graph is plotted.
30
EXPERIMENT 8:
TO FIND OUT THE VARIATION OF VOLTAGE REGULATION WITH
POWER FACTOR FOR THE SHORT TRANSMISSION LINE.
PROGRAM:
Clc;
Clear all;
Vr = 220e3
R = 10;
X = 15.7;
Z = R + X*I;
Irmag = 56.8;
Pf = 1:-0.001:0.6;
Irang = acos(pf);
Ir = Irmag * exp(-i*irag);
Vs = (Vr/sqrt(3)) + Ir*z;
VrNL = abs(Vs);
VrFL = abs(Vr/sqrt(3));
Per_vol_regu = ((VrNL - VrFL)/VrFL)*100;
Plot(pf, Per_vol_regu,’-‘);
Grid
Xlabel(‘power factor’)
Ylabel(‘voltage regulation’)
Hold on;
Ir = Irmag*exp(i*Irang);
Vs = (Vr/sqrt(3)) = Ir*z;
VrNL = abs(Vs);
VrFL = abs(Vr/sqrt(3));
Per_vol_regu = ((VrNL - VrFL)/VrFL)*100;
Plot(pf, Per_vol_regu,’*-‘);
Gtext(‘Vreg Vs lagging pf’)
Gtext (‘Vreg Vs leading pf’).
31
EXPERIMENT 9:
TO OBTAIN VOLTAGE REGULATION AND EFFICIENCY OF A
SHORT TRANSMISSION LINE
PROGRAM:
%% A three phase overhead line 200km long R = 0.16 ohm/km and Conductor diameter of
2cm with spacing 4,5,6m transposed.%%
%% Find A,B,C,D constants ,sending end voltage,current ,power factor and power %%
%% when the line is delivering full load of 50MW at 132kV ,0.8 pf lagging ,
%% transmission efficiency , receiving end voltage and regulation. %%
ab=input('value of ab = ');
bc=input('value of bc = ');
ca=input('value of ca = ');
Pr=input('receving end power in mw = ');
Vr=input('receving end voltage in kv = ');
pfr=input('receving end power factor = ');
l=input('length of the line in km = ');
R=input('resistance/ph/km = ');
f=input('frequency = ');
D=input('diameter in m = ');
rad=D/2;
newrad=(0.7788*rad);
deq=(ab*bc*ca)^(1/3);
L=2*10^(-7)*log(deq/newrad);
C=(2*pi*8.854*10^-12)/log(deq/rad);
XL=2*pi*f*L*l*1000;
rnew=R*l;
Z=rnew+i*(XL);
Y=i*(2*pi*f*C*l*1000);
A=1+((Y*Z)/2);
D=A;
B=Z;
C=Y*(1+(Y*Z)/4);
Vrph=(Vr*10^3)/1.732;
irold=(Pr*10^6)/(1.732*Vr*10^3*.8);
32
k=sin(acos(pfr));
Ir=irold*(pfr-(j*k));
Vs=((A*Vrph)+(B*Ir));
Is=((C*Vrph)+(D*Ir));
angle(Vs);
angle(Is);
f=angle(Vs);
u=angle(Is);
PFS=cos(f-u);
eff=((Pr*10^6)/(3*abs(Vs)*abs(Is)*PFS))*100;
reg=(((abs(Vs)/abs(A))-abs(Vrph))/abs(Vrph))*100;
L
C
rnew
A
B
C
AbsoluteVs = abs(Vs)
AbsoluteIs = abs(Is)
AngleofVs = angle(Vs)*180/pi
AngleofIs = angle(Is)*180/pi
PFS
eff
reg
33
EXPERIMENT 10 ANALYSIS OF TRANSMISSON LINE WITH
DIFFERENT FAULT CONDITION
Aim:
To simulate the 3 Ø AC Transmission lines with different fault at different location on two
machine 3 bus system using MATLAB/SIMULINK.
1. Initialization
Note that the system has already been initialized to start in steady-state. If you are
familiar with the Load Flow procedure you can skip this item and proceed to step 2.
Open the mask of the M1 1000 MVA and M2 5000 MVA Synchronous Machine blocks:
In the Load Flow tab of machine M1, the 'Generator type' parameter is set to 'PV', indicating
that the load flow will be performed with the machine controlling its active power and its
terminal voltage. The 'Active power generation' parameter is set to 950e6 W and the terminal
voltage is defined by the Load Flow Bus block labeled M1 and connected to the machine
terminals.
The 'Generator type' parameter of machine M2 is set to 'swing', indicating that the machine will
be used as a swing bus for balancing the power.
In the Powergui menu, select 'Load Flow'. A new window appears. A summary of the load flow
settings is displayed in a table. Press the 'Compute' button to solve the load flow. The table now
display the actual machine active and reactive powers.
Press the 'Apply' button to apply the load flow solution to the model.
Look in the hydraulic turbine and governor (HTG) and Excitation system contained in the two
Regulator subsystems to note that the initial mechanical power and field voltage have been
automatically initialized by the Load Flow. The reference mechanical powers and reference
voltages for the two machines have also been updated in the two constant blocks connected at
the HTG and excitation system inputs: Pref1=0.95 pu (950 MW), Vref1=1pu; Pref2=0.8091 pu
(4046 MW), Vref2=1 pu.
34
2. Single-phase fault
After fault clearing, the 0.8 Hz oscillation is quickly damped. This oscillation mode is
typical of inter-area oscillations in a large power system. First trace on the 'Machine' scope
shows the rotor angle difference d_theta1_2 between the two machines. Power transfer is
maximum when this angle reaches 90 degrees. This signal is a good indication of system
stability. If d_theta1_2 exceeds 90 degrees for a too long period of time, the machines will
loose synchronism and the system goes unstable. Second trace shows the machine speeds.
Notice that machine 1 speed increases during the fault because during that period its electrical
power is lower than its mechanical power. By simulating over a long period of time (50
seconds) you will also notice that the machine speeds oscillate together at a low frequency
(0.025 Hz) after fault clearing. The two PSS (Pa type) succeed to damp the 0.8 Hz mode but
they are not efficient for damping the 0.025 Hz mode. If you select instead the Multi-Band PSS
(value=2 in the PSS constant block) you will notice that this stabilizer type succeeds to damp
both the 0.8 Hz mode and the 0.025 Hz mode.
You will now repeat the test with the two PSS out of service (value=0 in the PSS
constant block). Restart simulation. Notice that the system is unstable without PSS. You can
compare results with and without PSS by double clicking on the 2nd blue block on the right
side. You can also compare the results obtained with the two solution methods 'Detailed' and
'Phasor' by double-clicking on the first blue block on the right side.
Figure:
35
Result: 1) Single line to ground fault (with fault clear within time)
36
Result: 1) 3 phase to ground fault (Unclear fault)
37
Result: 1) Line to Line fault
38