You are on page 1of 16

UNIVERSITY OF THE SOUTH PACIFIC

School of Engineering and Physics

EE321 – Power System Analysis

Lab 1- Simulation and analysis of power systems using


MATLAB/Simulink and PSIM.

Group Members: Alvish Naidu (S11158221)


Avishay Narayan (S11158219)

Date: 14/02/2020

1
Aim
The aim of this lab is for students to get an introduction and can acquaint themselves on the
usage of SimPower System toolbox in MATLAB/Simulink and to analyse, simulate and design
power systems

Introduction
The MATLAB software is used by many big industries for various mathematical calculations and
also to analyse, used in exploration and visualisation of many types of systems. This lab focuses
on using MATLAB/Simulink to analyse power systems where the circuits will be made using
MATLAB/Simulink and the separate behaviours will be shown in the scopes

2
Algorithm:
Part 1 Question 1

calculate power
in each of the
calculate the phase phasor in the
form P(t)=
current which is
Start equal to phase
voltage divide by
Pmax*cos(wt-θ)
*cos(wt-θ-α)

load impendence

Add all the


phase powers
End to get total
power

Using the
formula Also plot total Using plot function, plot
P=3VIcosθ all graphs where x-axis
power is radinas and y axis is
verify total power
power

3
Part 1 Question 2

time limits are


declared from 0 to Sinosoidal instantaneous
Start 16.67msec power and voltage are
declared

The values of
current amplitude, Instantaneous current is
angular frequency calculated by dividing power
and phase angle are with voltage
optained for the
graph
End

Angular frequency is
converted from radians to
degrees
Current vs wt graph is
plotted

Zero vector is
plotting graph of created by using
voltage vs wt Xline=
Plotting graph of power vs wt zeros(1,length(wt)
) command

4
Part 2

From the reactances


Power system model the values of the
Start was made in simulink
software as required
inductor and
capacitors were
calculated

The frequency was


The voltage, phasor
chnaged from 60Hz to
50Hz and changes End frequency and resistor
values were applied
were seen

It was simulated and


Another scope had the Voltage and current vs
the scopes were used
reactive and active time was seen in one
to see the respective
power scope
waveforms

5
Matlab Code
Part 1 (Pre-Lab): Using Matlab to Analyze Power Systems
Part I: a)

V = 1200/sqrt(2); %rms voltage


gamma = acos(0.8); %angle theta
Z = 120*(cos(gamma)+j*sin(gamma)); %defining load impedance
I= V/Z %Current calculation

wt = 0:0.05:2*pi; %Range of wt
pa = 12000*cos(wt).*cos(wt-36.87*pi/180);
%Phase A power
pb = 12000*cos(wt-120*pi/180).*cos(wt-120*pi/180-36.87*pi/180);
%Phase B power
pc = 12000*cos(wt-240*pi/180).*cos(wt-240*pi/180-36.87*pi/180);
%Phase C power
pt = pa+pb+pc; %Sum of total power
plot(wt, pa, wt, pb, wt, pc, wt, pt), grid
%Plotting graph
xlabel('Radian') %x-axis label
ylabel('Power') %y-axis label

b)

Total_Power = 3*V*abs(I)*0.8 %Checking total power

Part II

Vm = 200; %Voltage
t=0:.0001:0.01667; %Plot range
v=Vm*cos(377*t); %Instantaneous voltage
p = 800 + 1000*cos(754*t - 36.87*pi/180); %Instantaneous power

i=p./v; %Instantaneous current

wt=180/pi*377*t; %Radian to degree

xl = zeros(1,length(wt)); %Zero vector

subplot(221), plot(wt, v, wt, xl), grid


title('Graph of v(t)'), xlabel('wt(degrees)') %Graph of voltage

subplot(222), plot(wt, p, wt, xl), grid

6
title('Graph of p(t)'), xlabel('wt(degrees)') %Graph of power

subplot(223), plot(wt, i, wt, xl), grid


title('Graph of i(t)'), xlabel('wt(degrees)') %Graph of current

Part III

Vrms =200; %Supply voltage


Z1 = 0.8+j*5.6; %Impedance 1
Z2 = 8-j*16 ; %Impedance 2
Motor_P = 1500+j*900; %Motor power
d2r = @(x) (x*pi/180);
r2d = @(x) (x*180/pi);

S1= Vrms^2/ Z1 %Power s1


S2= Vrms^2/ Z2 %Power s2
S3= Motor_P %Power for motor
S_total = S1 + S2+ S3 %Total power

I= S_total / Vrms %Supply current in


rectangular form
[abs(I) r2d(angle(I))] %Supply current in polar form
x =[r2d(angle(I))];
PF = cos(x) %New power factor

Part 2: Simulation on Simulink

Fig [1]: Simulink Simulation

7
Tested Results
Part 1 (Pre-Lab): Using Matlab to Analyze Power Systems
Part I: a)

Fig [2]: Plot of 3 Phase Power

The three phase powers have equal amplitude but are 120 degrees out of phase. It is the
expected case for a balanced three phase load. And the total power is a constant at 144000

8
b)

Fig [3]: Current and Total Power Check

Part II

Fig [4]: Graph of v(t), p(t) and i(t)

9
Manual Calculations:
p ( t ) =800+1000 cos ( 754 t−36.87 ° )¿ 800+1000 cos 36.87 ° cos 754 t +sin 36.87 ° sin 754 t
¿ 800+800 cos 754 t+600 sin 754 t¿ 800 [ 1+cos 2 ( 377 ) t ] +600 sin 2 (377 ) t

P = 800 W
Q = 600 Var
S=800+ j 60 0
¿ 1000 ∠36.87° VA

1
S= V m × I m
2
1
1000 ∠ 36.87 °= 200 ∠0° × I m
2
ℑ=10 ∠−36.87° A
Part III

10
Fig [5]: Results for Part III

Part 2: Simulation on Simulink

11
Frequency = 60Hz

Fig [6]: Voltage Signal Approx 120V

Fig [7]: Current Signal Approx 5Amps

Fig [8]: Active Power Approx 320W, Reactive Power 0 Var


Frequency = 50Hz

It was observed that the period had increased.

12
Fig [9]: Voltage Signal

Fig [10]: Current Signal

Fig [11]: Active and Reactive Power

Discussion

13
In part 1 of the pre-lab section, the total power calculated was 14400 which was the same value
of constant total power observed from Fig [2]. The power for individual phases had the same
magnitude but were out of phase by 120 degrees which can also be observed from Fig [1].
For the second part of the pre-lab, v(t), p(t) and i(t)=p(t)/v(t) was graphed using Matlab.
Observing the graph for p(t), the waveform drops below zero from a positive value that power
is stored for the positive path and is consumed for the negative. The current with a value of 10A
is 36.87 degrees lagging voltage and the angular frequency was seen to be 377 rad/sec.
Moving on to the third part of the pre-lab, a power system was analyzed. S 1, S2 and S3 were
calculated to be 1000-j7000 VA, 1000+j2000 VA and 1500+j900 VA respectively. The total
power obtained by adding S1, S2 and S3 was 3500-j4100 VA. Current supplied was calculated to
be 17.5+j20.5 A and the power factor came out to be 0.7307.
After the pre-lab section, the provided power system was simulated in Simulink at different
frequencies. Since the system was balanced, analysis was conducted in the single phase form
and the voltage and current waveforms were obtained from the scope. The voltage and current
were the same at 120V and 5A respectively for both the 60Hz and 50Hz frequency simulation.
However there was a difference in the angular frequency of the 50Hz when compared to 60Hz.
The same observation was made for the active power at approximately 320W. The reactive
power was 0 Var.

Conclusion

14
After completing this lab, it can be concluded that MATLAB/Simulink was surely known and
comprehended. It was seen that Simulink can be utilized to build up mechanical, electrical and
complex circuits and models. MATLAB contents and graphs were created and 3 3 phase power
analysis was conveyed. A blunder we can see from this lab is efficient mistake when the output
is generated from MATLAB contrasts from hypothetical count in light of the fact that MATLAB
utilizes exceptionally exact values though during manual figuring, we will in general round of
the values.

Reference

15
Fig [1]: Simulink Simulation……………………………………………………………………………………………………7
Fig [2]: Plot of 3 Phase Power………………………………………………………………………………………………..8
Fig [3]: Current and Total Power Check………………………………………………………………………………….9
Fig [4]: Graph of v(t), p(t) and i(t)…………………………………………………………………………………………..9
Fig [5]: Results for Part III……………………………………………………………………………………………………..11
Fig [6]: Voltage Signal Approx 120V………………………………………………………………………………………12
Fig [7]: Current Signal Approx 5Amps……………………………………………………………………………………12
Fig [8]: Active Power Approx 320W, Reactive Power 0 Var…………………………………………………..12
Fig [9]: Voltage Signal……………………………………………………………………………………………………………13
Fig [10]: Current Signal…………………………………………………………………………………………………………13
Fig [11]: Active and Reactive Power………………………………………………………………………………………13

Department of engineering, The University of the South Pacific. (2020).EE321 lab manual.
Retrieved from https://elearn.usp.ac.fj/course/view.php?id=4994

16

You might also like