SlideShare a Scribd company logo
1 of 34
Download to read offline
Smart Grids and Power Systems Analysis
(ELE7031-B)
CW-01
Submitted By: Bilal Amjad
UoB Number: 19014392
MSc Smart Grids and Energy Systems
1
Table of Contents
1 Introduction............................................................................................................................. 6
2 Report structure....................................................................................................................... 6
3 MATPOWER.......................................................................................................................... 6
3.1 Download and install........................................................................................................ 6
3.2 File format........................................................................................................................ 7
3.3 Run power flow (PF) and optimal power flow (OPF) ..................................................... 7
3.4 Task 1: Perform Power Flow (PF) ................................................................................... 8
3.4.1 IEEE 9 bus test system.............................................................................................. 8
3.4.2 IEEE 30 bus test system.......................................................................................... 10
3.4.3 IEEE 118 bus test system........................................................................................ 12
3.5 Task 2: Increase 10% R and X and perform Power Flow (PF)...................................... 13
3.5.1 IEEE 9 bus test system............................................................................................ 14
3.5.2 IEEE 30 bus test system.......................................................................................... 15
3.5.3 IEEE 118 bus test system........................................................................................ 16
3.5.4 Add 2 generators in case30..................................................................................... 17
3.6 Comparison between Task 1 and Task 2........................................................................ 18
4 Simscape Electrical............................................................................................................... 20
4.1 Task 1: Familiarising with SimPower System and Simulink Toolboxes....................... 20
4.1.1 Simulink Toolbox ................................................................................................... 20
4.1.2 SimPowerSystem (SimPowerSystems) .................................................................. 21
4.2 Task 2: Implement single phase circuit in SimPowerSystems....................................... 21
4.2.1 Current and Voltage Measurements........................................................................ 22
4.2.2 Active and reactive power measurement ................................................................ 22
4.2.3 Export the outputs to Workspace............................................................................ 22
4.3 Task 2: Implement Three phase circuit in SimPowerSystems....................................... 24
4.3.1 Current and Voltage Measurements........................................................................ 24
4.3.2 Active and reactive power measurement ................................................................ 24
4.3.3 Export the outputs to Workspace............................................................................ 24
4.4 Task 3: Demo of Wind Farm Using Doubly-Fed Induction Generators........................ 26
4.4.1 Description.............................................................................................................. 26
2
4.4.2 SimPowerSystems Diagram.................................................................................... 26
4.4.3 Wind turbine Block parameters .............................................................................. 28
4.4.4 Turbine Response to wind speed ............................................................................ 29
References..................................................................................................................................... 33
3
List of Figures
Figure 1: IEEE 9 bus system [5]..................................................................................................... 8
Figure 2:Results summary of PF of case9. ..................................................................................... 9
Figure 3: IEEE 30 bus system, Single line diagram [7]................................................................ 10
Figure 4:Results summary of PF of case30. ................................................................................. 11
Figure 5: IEEE 118 bus system, Single line diagram [8].............................................................. 12
Figure 6:Results summary of PF of case118. ............................................................................... 13
Figure 7: Branch data matrix of a case in MATPOWER ............................................................. 13
Figure 8:Results summary of PF of case9 with 10% increase in R and X of branch data. .......... 14
Figure 9:Results summary of PF of case30 with 10% increase in R and X of branch data. ........ 15
Figure 10:Results summary of PF of case118 with 10% increase in R and X of branch data. .... 16
Figure 11: Two generators, added in case30 in generator data..................................................... 17
Figure 12: Result summary of case30 with two extra generators................................................. 17
Figure 13:Simulink Library browser of MATLAB. ..................................................................... 20
Figure 14:SimPowerSystem in Simulink Library Browser. ......................................................... 21
Figure 15:Single Phase Circuit using SimPowerSystem. ............................................................. 22
Figure 16:Current and Voltage graphs.......................................................................................... 23
Figure 17:P and Q graphs ............................................................................................................. 23
Figure 18: Three Phase Circuit using SimPowerSystem. ............................................................. 24
Figure 19::Current and Voltage graphs......................................................................................... 25
Figure 20:P and Q graphs ............................................................................................................. 25
Figure 21:Single-Line Diagram of the Wind Farm Connected to a Distribution System [11]..... 26
Figure 22: SimPowerSystems Diagram of the Wind Farm Connected to Distribution System ... 26
Figure 23: Protection system of Plant in SimPowerSystems........................................................ 27
Figure 24: Protection system of Wind Farm in SimPowerSystem ............................................... 27
Figure 25: Inside the Measurement block..................................................................................... 28
Figure 26: Wind turbine block parameters ................................................................................... 28
Figure 27: Turbine Power Characteristics graph .......................................................................... 29
Figure 28: Initial parameters setting of wind turbine.................................................................... 30
Figure 29: Output of Wind Farm in Voltage Regulation mode.................................................... 31
Figure 30: Output of Wind Turbine without voltage regulation................................................... 32
4
List of Tables
Table 1: Variables in M-files of MATPOWER.............................................................................. 7
Table 2: Comparison between Task 1 and Task 2 on case9 ......................................................... 18
Table 3: Comparison between Task 1 and Task 2 on case30 ....................................................... 18
Table 4: Comparison between Task 1 and Task 2 on case118 ..................................................... 19
5
Abstract
MATLAB is widely used in power system analysis including power flow analysis, microgrid
system design, system feasibility and grid integration studies, EMT simulation and harmonic
analysis, power plant model validation and deploy developed code directly to real-time and
embedded systems. MATPOWER and SimPowerSystem toolboxes are widely used for power
flow analysis and design power system in MATLAB, respectively. This report discussed the power
flow analysis, optimal power flow, designing single phase and three-phase circuits and analysing
the results using MATPOWER and SimPowerSystem in MATLAB briefly. A demo design of
Wind farm with distributed system is also explained to give the clear idea that how to design any
type of electrical power system using SimPowerSystem toolbox.
6
1 Introduction
It is very important to design and analyse any power system or project before practically
implementing it. There are many developed for power system design and analysis for educational,
research and commercial purposes. MATLAB is one of the most famous software, widely used for
educational and research purposes. There are number of tools in MATLAB for power system
design and analysis like MATPOWER, SimPowerSystem (SimPower System) and electric power
system simulator [1]. Designing of power system is done in Simulink while mathematical analysis
is mostly done on workspace. MATPOWER is based on workspace having M-files of different
cases and it is used to perform power flow and optimal power flow.
2 Report structure
The report is in two sections. The first section is about MATPOWER, starting with some
introduction on MATPOWER and how to download and install it. Then, some tasks are performed
and discussed.
In the second section, Simulink and SimPowerSystem toolboxes are discussed. There are some
design examples and a demo using SimPowerSystem toolbox with detailed discussion of results.
3 MATPOWER
It is an open source package includes MATLAB M-files developed by Ray D. Zimmerman, Carlos
E. Murillo-SĂĄnchez and Deqiang Gan of PSERC at Cornell University under the direction of
Robert Thomas [2].
MATPOWER is mainly used for power flow (PF) and optimal power flow (OPF) problems
analysis. It is widely used by educators and researchers. It is very simple to use and easy to modify
according to needs.
3.1 Download and install
MATPOWER is an open source software can be downloaded from home page of MATPOWER
website1
. After downloading, unzip the file and place the folder in the location of MATLAB path.
Open the MATLAB and open the folder containing install_matpower.m file. Add that path to
MATLAB path including subfolders and files and type the following command on workspace:
>>install_matpower
The MATPOWER will be installed into your MATLAB. To check that it is successfully installed
and working properly, type:
>> test_matpower
The complete detailed guide is available in MATPOWER user’s manual [3].
1
https://matpower.org/
7
3.2 File format
All the files are M-file in .m format. Each IEEE case is written as a function in MATLAB,
defining and returning variables baseMVA, bus, branch, gen, areas, and
gencost. The function contains structure arrays named as “mpc” having above mentioned
variables as field (struct.field). The of all fields and their parameters are in standard IEEE
and PTI format. Table 1 explains the structure, format and values of all these variables. More
detail can be found by type help caseformat in MATLAB workspace [2].
Table 1: Variables in M-files of MATPOWER
Sr.
No.
Variable
Name
Format Syntax Description
1. Mpc String or
structure
mpc=
’case_name’
It contains the name of case.
2. Version String as
a field
mpc.version It tells the version of MATPOWER
used
3. baseMVA Field mpc.baseMVA Base value of system MVA
4. Bus Field
(matrix)
mpc.bus It contains data of all busses. Each
row is representing a bus and column
are the values of different parameters
of bus.
5. Gen Field
(matrix)
mpc.gen It contains data of all generators.
Each row is representing a generator
and column are the values of
different parameters of generator.
6. Branch Field
(matix)
mpc.branch It contains data of all branches of
network. Each row is representing a
branch between two buses and
column are the values of different
parameters of branch.
7. Gencost Field
(matrix)
mpc.gencost It contains cost data of all generators.
Each row is representing cost data for
a generator and column are the values
of different parameters related to its
cost. It is used in OPF not in PF.
3.3 Run power flow (PF) and optimal power flow (OPF)
There is list of different example cases for performing PF and OPF included in MATPOWER
package. These cases are different IEEE bus systems. For example, ‘case9’ is an IEEE 9 bus
system. To perform PF or OPF on any case, it needs to enter only one command in MATLAB
workspace.
The syntax to perform PF is runpf(case_name). To perform PF on case 9 or IEEE 9 bus
system, the command will be:
>> runpf(case9);
8
The syntax to perform OPF is runopf(case_name). To perform OPF on case 9 or IEEE 9 bus
system, the command will be:
>> runopf(case9);
The results of PF or OPF will be shown on the workspace.
3.4 Task 1: Perform Power Flow (PF)
Task 1 is basically about the understating of code and variables in the M-files of different cases,
performing PF and analyse the results.
3.4.1 IEEE 9 bus test system
It is an IEEE benchmark test case named as case9 in MATPOWER. IEEE 9 bus system has 3
generator units with 12 busses, 6 transmission lines, 6 transformers and 3 loads as shown in the
figure 1 [4].
Figure 1: IEEE 9 bus system [5].
3.4.1.1 Command
To run power flow of IEEE 9 bus system, the command for MATLAB workspace is:
>> runpf(case9)
3.4.1.2 Results
The results show that Newton's method was used for power flow which converged in 4 iterations.
The system summary showed total generation capacity is 820.0MW and -900.0 to 900.0MVAr,
total Generation (actual) is 319.6MW and 22.8MVAr, total load of 315.0MW and 115.0MVAr
and total losses (I^2 * Z) are 4.64MW and 48.38MVAr. Voltage magnitude is minimum 0.996p.u.
at bus 9 and maximum is 1.040p.u. at bus 1, voltage angle is minimum -3.99 degree at bus 9 and
9
maximum 9.28 degree at bus 2, maximum active power (P) losses (I^2*R) 2.30MW at line 8-9
and maximum reactive power (Q) Losses (I^2*X) 15.83MVAr at line 8-2 as shown in the figure
2.
Figure 2:Results summary of PF of case9.
10
3.4.2 IEEE 30 bus test system
It is named as case30 in MATPOWER. IEEE 30 bus system has 6 generator units with 36 busses,
37 transmission lines, 10 transformers and 21 loads as shown in the figure 3 [6].
Figure 3: IEEE 30 bus system, Single line diagram [7].
3.4.2.1 Command
To run power flow of IEEE 30 bus system, the command for MATLAB workspace is:
>> runpf(case30)
11
3.4.2.2 Results
The results show that Newton's method was used for power flow which converged in 3 iterations.
The system summary showed total generation capacity is 335.0MW and -95.0 to 405.9MVAr, total
Generation (actual) is 191.6MW and 100.4MVAr, total load of 189.2MW and 107.2MVAr and
total losses (I^2 * Z) are 2.44MW and 8.99MVAr. Voltage magnitude is minimum 0.961p.u. at
bus 8 and maximum is 1.000p.u. at bus 1, voltage angle is minimum -3.96 degree at bus 19 and
maximum 1.48 degree at bus 13, maximum active power (P) losses (I^2*R) 0.29MW at line 2-6
and maximum reactive power (Q) Losses (I^2*X) 2.10MVAr at line 12-13 as shown in the figure
4.
Figure 4:Results summary of PF of case30.
12
3.4.3 IEEE 118 bus test system
It is named as case30 in MATPOWER. IEEE 32 bus system has 54 generator units with 118 busses,
118 transmission lines, 11 transformers and 99 loads as shown in the figure 5.
Figure 5: IEEE 118 bus system, Single line diagram [8].
3.4.3.1 Command
To run power flow of IEEE 118 bus system, the command for MATLAB workspace is:
>> runpf(case118)
3.4.3.2 Results
The results show that Newton's method was used for power flow which converged in 3 iterations.
The system summary showed total generation capacity is 9966.2MW and -7345.0 to
11777.0MVAr, total Generation (actual) is 4374.9MW and 795.7MVAr, total load of 4242.0MW
and 1438.0MVAr and total losses (I^2 * Z) are 132.86MW and 783.79MVAr. Voltage magnitude
is minimum 0.943p.u. at bus 76 and maximum is 1.050p.u. at bus 10, voltage angle is minimum
7.05 degree at bus 41 and maximum 3.975 degree at bus 89, maximum active power (P) losses
(I^2*R) 6.40MW at line 25-27 and maximum reactive power (Q) Losses (I^2*X) 59.22MVAr at
line 9-10 as shown in the figure 6.
13
Figure 6:Results summary of PF of case118.
3.5 Task 2: Increase 10% R and X and perform Power Flow (PF)
Objective of this task is to increase the value of resistance (R) and reactance (X) of branches by
10% of the system, analysis the results and compare with the previous results, before 10% increase.
Don’t modify the original case file because original case will be overwritten. Save a sperate file of
each case and then do modification.
In branch data R ad X are in 3rd
and 4th
column of branch data matrix as shown in the figure 7. The
10% increase will require in 3rd
and 4th
column only which will be done by multiplying these whole
columns by 1.1.
Figure 7: Branch data matrix of a case in MATPOWER
14
3.5.1 IEEE 9 bus test system
3.5.1.1 Commands
First save the case9 file into another variable:
>> mp1=case9
To increase R by 10%:
>> mp1.branch(:,3)=mp1.branch(:,3).*1.1
To increase X by 10%:
>> mp1.branch(:,4)=mp1.branch(:,4).*1.1
Now run power flow:
>> runpf(mp1)
3.5.1.2 Results
The results show that Newton's method was used for power flow which converged in 4 iterations.
The system summary showed total generation capacity is 820.0MW and -900.0 to 900.0MVAr,
total Generation (actual) is 320.1MW and 28.6MVAr, total load of 315.0MW and 115.0MVAr
and total losses (I^2 * Z) are 5.13MW and 53.48MVAr. Voltage magnitude is minimum 0.990p.u.
at bus 9 and maximum is 1.040p.u. at bus 1, voltage angle is minimum -4.44 degree at bus 9 and
maximum 10.20 degree at bus 2, maximum active power (P) losses (I^2*R) 2.54MW at line 8-9
and maximum reactive power (Q) Losses (I^2*X) 17.45MVAr at line 8-2 as shown in the figure
8.
Figure 8:Results summary of PF of case9 with 10% increase in R and X of branch data.
15
3.5.2 IEEE 30 bus test system
3.5.2.1 Commands
First save the case9 file into another variable:
>> mp2=case30
To increase R by 10%:
>> mp2.branch(:,3)=mp1.branch(:,3).*1.1
To increase X by 10%:
>> mp2.branch(:,4)=mp1.branch(:,4).*1.1
Now run power flow:
>> runpf(mp2)
3.5.2.2 Results
The results show that Newton's method was used for power flow which converged in 3 iterations.
The system summary showed total generation capacity is 335.0MW and -95.0 to 405.9MVAr, total
Generation (actual) is 191.9MW and 101.4MVAr, total load of 189.2MW and 107.2MVAr and
total losses (I^2 * Z) are 2.71MW and 9.97MVAr. Voltage magnitude is minimum 0.956p.u. at
bus 8 and maximum is 1.000p.u. at bus 1, voltage angle is minimum -4.39 degree at bus 19 and
maximum 1.61 degree at bus 13, maximum active power (P) losses (I^2*R) 0.32MW at line 2-6
and maximum reactive power (Q) Losses (I^2*X) 2.31MVAr at line 12-13, shown in the figure 9.
Figure 9:Results summary of PF of case30 with 10% increase in R and X of branch data.
16
3.5.3 IEEE 118 bus test system
3.5.3.1 Commands
First save the case9 file into another variable:
>> mp3=case118
To increase R by 10%:
>> mp3.branch(:,3)=mp1.branch(:,3).*1.1
To increase X by 10%:
>> mp3.branch(:,4)=mp1.branch(:,4).*1.1
Now run power flow:
>> runpf(mp3)
3.5.3.2 Results
The results show that Newton's method was used for power flow which converged in 3 iterations.
The system summary showed total generation capacity is 9966.2MW and -7345.0 to
11777.0MVAr, total Generation (actual) is 4387.3MW and 868.8MVAr, total load of 4242.0MW
and 1438.0MVAr and total losses (I^2 * Z) are 145.33MW and 856.22MVAr. Voltage magnitude
is minimum 0.943p.u. at bus 76 and maximum is 1.050p.u. at bus 10, voltage angle is minimum
4.37 degree at bus 41 and maximum 40.39 degree at bus 89, maximum active power (P) losses
(I^2*R) 6.99MW at line 25-27 and maximum reactive power (Q) Losses (I^2*X) 65.15MVAr at
line 9-10 as shown in the figure 10.
Figure 10:Results summary of PF of case118 with 10% increase in R and X of branch data.
17
3.5.4 Add 2 generators in case30
Here, 2 generators of 50MW are added into case30 (IEEE 30 bus system) at 14 and 24. These two
generators are heighted in figure 11, added into generator data. Similarly add the data of two
generators in generator cost data matrix.
Figure 11: Two generators, added in case30 in generator data
The results show that Newton's method was used for power flow which converged in 4 iterations.
The system summary showed total generation capacity is 465.0MW and -137.0 to 555.9MVAr,
total Generation (actual) is 195.9MW and 116.4MVAr, total load of 189.2MW and 107.02MVAr
and total losses (I^2 * Z) are 6.67MW and 25.05MVAr. Voltage magnitude is minimum 0.961p.u.
at bus 19 and maximum is 1.050p.u. at bus 14, voltage angle is minimum 0.00 degree at bus 1 and
maximum 13.38 degree at bus 14, maximum active power losses (I^2*R) 1.33MW at line 22-24
and maximum reactive power Losses (I^2*X) 5.26MVAr at line 4-12, shown in the figure 12.
Figure 12: Result summary of case30 with two extra generators
18
3.6 Comparison between Task 1 and Task 2
Task 1 performed power flow (PF) on the cases, case9, case30 and case118. In task 2, the values
of R and X in branch data for all 10% these three cases were increased and then PF performed on
it.
The table 2 shows the compression between task 1 and task 2 on IEEE 9 bus system which is case9
in MATPOWER. The table shows that when the value of R and X for branch data is increased by
10%, the power losses and voltage angle (max) increased, and the voltage magnitude somehow
drops. Similar things happened when in case30 and case118 as well (shown in table 3 and table 4).
Table 2: Comparison between Task 1 and Task 2 on case9
Table 3: Comparison between Task 1 and Task 2 on case30
19
Table 4: Comparison between Task 1 and Task 2 on case118
20
4 Simscape Electrical
4.1 Task 1: Familiarising with SimPower System and Simulink Toolboxes
4.1.1 Simulink Toolbox
It is a graphical programming environment based on MATLAB, developed by MathWorks. It is
used for simulation of modelling, simulating and analysing multi-domain dynamic systems. The
Simulink library contain the lot of toolboxes and in these tool boxes there are sets of blocks for
different purposes. These blocks are used to perform simulation [9].
To open the Simulink in the MATLAB, go on MATLAB home page and follow this path:
Simulink Library → Simulink
or just type simulink in MATLAB workspace.
The figure 13 shows the list of libraries in Simulink. To use any block, select the model and drag
it to the model window. The results can also be transformed on MATLAB workspace to perform
further actions.
Figure 13:Simulink Library browser of MATLAB.
21
4.1.2 SimPowerSystem (SimPowerSystems)
SimPowerSystem also known as SimPowerSystem or SimElectronics.
This toolbox contains
libraries, having model blocks for modelling and simulating electronic, mechatronic, and electrical
power systems. It has lot of components including semiconductors, motors, and components for
applications such as electromechanical actuation, smart grids, and renewable energy systems [10].
Follow this path to open the SimPowerSystem in MATLAB (shown in the figure 14):
Simulink Library → Simscape→ SimPowerSystems
Figure 14:SimPowerSystem in Simulink Library Browser.
4.2 Task 2: Implement single phase circuit in SimPowerSystems
The circuit shown in figure is implemented using SimPowerSystems in Simulink, MATLAB. This
is a single-phase circuit having AC source of 100V at 60Hz and Z source is an internal reactance
of source. A fifth harmonic is injected at 300Hz frequency using current source of 10A. A fifth
harmonic filter is used to filter the harmonic, which is a combination of resistance, capacitor and
inductor. Impedance measurement block is attached in parallel in the circuit to plot the phase
diagram of impedance vs frequency, to study the effect of harmonic filter.
22
4.2.1 Current and Voltage Measurements
Ammeter and Voltmeter are current measurement and voltage measurement blocks, respectively,
available in SimPowerSystem.
4.2.2 Active and reactive power measurement
Power measurement block has the input V voltage and I current and measure the active and reactive
power of the circuit. The display block is used to display measured parameters, voltage, current,
active power (P) and reactive power (Q). Then scope is attached to see the graphs of voltage,
current, active power (P) and reactive power (Q).
Figure 15:Single Phase Circuit using SimPowerSystem.
4.2.3 Export the outputs to Workspace
To export the results on workspace “to workspace” block from the Simulink library is used as
shown on the circuit in figure 15. Then these exported results are plotted using the following
commands:
Current and Voltage:
>> figure % plotting Current and Voltage
>> subplot(2,1,1)
>> plot(tout,i)
>> subplot(2,1,2)
>> plot(tout,v)
The figure 16 shows the plotted graphs for current and voltage of the circuit.
23
Figure 16:Current and Voltage graphs
Active and Reactive Power:
>> figure % plotting Active and Reactive Power
>> subplot(2,1,1)
>> plot(tout,p)
>> subplot(2,1,2)
>> plot(tout,q)
The figure 17 shows the plotted graphs for Active and Reactive Power of the circuit.
Figure 17:P and Q graphs
24
4.3 Task 2: Implement Three phase circuit in SimPowerSystems
The circuit shown in figure is implemented circuit using SimPowerSystems in Simulink,
MATLAB. This is a three-phase circuit having AC source of 208V phase to phase voltage at 60Hz.
A fifth harmonic is injected at 300Hz frequency using current source of 10A. A three-phase fifth
harmonic filter is used to filter the harmonic, which is a combination of resistance, capacitor and
inductor. Impedance measurement block is attached in parallel in the circuit to plot the phase
diagram of impedance vs frequency, to study the effect of harmonic filter.
4.3.1 Current and Voltage Measurements
“Three-phase V-I measurement” block is used to measure the three-phase current and voltage. The
results are displayed by display block as shown in the figure.
4.3.2 Active and reactive power measurement
Three-phase power measurement block has the input Vabc three-phase voltage (output of three-
phase voltage measurement) and Iabc three-phase current (output of three-phase current
measurement) and measure the active and reactive power of the circuit. The display block is used
to display measured parameters active power (P) and reactive power (Q). Then scope is attached
to see the graphs of voltage, current, active power (P) and reactive power (Q).
Figure 18: Three Phase Circuit using SimPowerSystem.
4.3.3 Export the outputs to Workspace
To export the results on workspace “to workspace” block from the Simulink library is used as
shown on the circuit in figure 18. Then these exported results are plotted using the following
commands:
Current and Voltage:
>> figure % plotting Current and Voltage
25
>> subplot(2,1,1)
>> plot(tout,i)
>> subplot(2,1,2)
>> plot(tout,v)
The figure 19 shows the plotted graphs for current and voltage of the circuit.
Figure 19::Current and Voltage graphs
Active and Reactive Power:
>> figure % plotting Active and Reactive Power
>> subplot(2,1,1)
>> plot(tout,p)
>> subplot(2,1,2)
>> plot(tout,q)
The figure 20 shows the plotted graphs for Active and Reactive Power of the circuit.
Figure 20:P and Q graphs
26
4.4 Task 3: Demo of Wind Farm Using Doubly-Fed Induction Generators
4.4.1 Description
This example uses the SimPowerSystems to study steady-state and dynamic performance of a
9MW wind farm connected to a distribution system. The single-line diagram is shown in figure
21. There are 6 1.5MW turbines which are connected with 20kV distribution systems. It exports
the power through 30km, 25kV feeder to a 120kV grid. At load of 2MVA is connected on bus
B25. A load of 500kW is on the bus 575V of the wind farm [11].
Figure 21:Single-Line Diagram of the Wind Farm Connected to a Distribution System [11]
Wind turbines is a doubly-fed induction generator (DFIG) containing of a wound rotor induction
generator and an AC/DC/AC IGBT-based PWM converter. 60Hz gird is directly connected with
stator winding. The benefit of the DFIG is its capability for power electronic converters to produce
or absorb reactive power. So, it eradicates the requirement for adding capacitor banks [11].
4.4.2 SimPowerSystems Diagram
The command on workspace to run this dome is:
power_wind_dfig
After entering this command, the circuit shown in figure 22 Wind Farm will be opened in Simulink.
Figure 22: SimPowerSystems Diagram of the Wind Farm Connected to Distribution System
27
4.4.2.1 Protraction systems
There is a protection system of both plant load at bus B25 and wind turbine. These protection
systems monitor the voltage, current, machine speed and DC link voltage of the DFIG. The figure
23 and figure 24 show the protection system of plant load and wind turbine, respectively.
Figure 23: Protection system of Plant in SimPowerSystems
Figure 24: Protection system of Wind Farm in SimPowerSystem
28
4.4.2.2 Measurement Block
Measurement block measures all the output parameters of windfarm and grid. The inside view of
this block is shown in figure 25.
Figure 25: Inside the Measurement block.
4.4.3 Wind turbine Block parameters
The parameters of wind farm are opened by double clicking on wind farm block. The figure 26
shows the parameters of wind farm.
Figure 26: Wind turbine block parameters
29
The turbine power characteristics can also be plotted by clicking on display under the parameters
of wind farm. The graph is between turbine speed and turbine output power as shown in figure 27.
The parameters ABCD in the graph are followed by DFIG in a controlled way. The turbine speed
optimization is gained between point B and point C on the curve.
Figure 27: Turbine Power Characteristics graph
A single wind turbine is simulated for 6-wind-turbine system by multiplying these parameters by
six:
i) Mechanical output power of turbine (from turbine data).
ii) Rate power of generator (from generator data).
iii) DC capacitor of bus (from convertor data).
4.4.4 Turbine Response to wind speed
The objective of this experiment observes how the wind speed affect the output parameters of wind
turbine and what is its impact on the system. DFIG works in two mode, voltage regulation and Var
regulation. The wind turbine will be drive in voltage regulation mode and without this mode to
observe the behaviour of turbine in both cases.
30
4.4.4.1 Voltage Regulation Mode
Initial the operation mode of wind turbine is set to voltage regulation, the reference voltage
(Vref) to control terminal voltage is set t 1p.u and voltage drop (Xs) 0.02p.u from the control
section of block parameters, as highlighted in figure 26.
Figure 28: Initial parameters setting of wind turbine
The model is run for 50s and results are exported to MATLAB workspace to plot them. Figure 27
show the recorded results of wind turbine in voltage regulation mode, plotted on workspace. It can
be observed that, wind speed was initially 8p.u up to 5 seconds. Then it started increasing and at
12s it reached to 14p.u. It can be seen that as wind start increasing the output active power (P) also
start increasing and reached to its rated output of 19MW before 20s. The pitch angle was zero in
the start. At 20s it increased to 8 degree to maintain the mechanical power of the turbine. In case
of voltage (V1) and reactive power (Q), the output shows that as active power start increasing with
wind speed, the turbine started observing reactive power to maintain the voltage level at regulated
value throughout the interval.
31
Figure 29: Output of Wind Farm in Voltage Regulation mode
4.4.4.2 Without Voltage Regulation Mode
Now, the mode of wind turbine from control parameters is changed to Var regulation instead of
voltage regulation to observe that how change in wind speed can affects output voltage of turbine
and the value of Qref is set to zero.
The simulation was run again, and the results are plotted it figure 28. The output shows that the
voltage raised to 1.021p.u as turbine started to generate rated power with unity power factor.
32
Figure 30: Output of Wind Turbine without voltage regulation
33
References
[1] M. Arnaout, R. Rammal and S. Abdulnabi, “Electric Power System Simulator Tool in
MATLAB,” in Science Education: Research and New Technologies, Croatia, InTech, 2017,
pp. 99-117.
[2] R. D. Zimmerman, C. E. Murillo-SĂĄnchez and D. (. Gan, MATPOWER User's manual
(Version 3.0.0), Ithaca: ower Systems Engineering Research Center (PSERC)School of
Electrical Engineering, Cornell University, 2005.
[3] R. D. Zimmerman and C. E. Murillo-Sanchez, MATPOWER User's Manual (Version 7.0),
Power Systems Engineering Research Center (PSerc), 2019.
[4] “IEEE 9-bus modified test system,” Dynamic IEEE test systems, [Online]. Available:
https://www.kios.ucy.ac.cy/testsystems/index.php/dynamic-ieee-test-systems/ieee-9-bus-
modified-test-system. [Accessed 19 January 2020].
[5] Y. Song, D. J. Hill and T. L. Liu, “Small-disturbance angle stability analysis of microgrids:
A graph theory viewpoint,” in IEEE Conference on Control Applications (CCA), Sydney,
2015.
[6] “IEEE 30-bus modified test system,” KIOS Research and Innovation Centre of Excellence
(KIOS CoE), [Online]. Available:
https://www.kios.ucy.ac.cy/testsystems/index.php/dynamic-ieee-test-systems/ieee-30-bus-
modified-test-system. [Accessed 19 January 2020].
[7] P. K. Hota and A. P. Naik, “Analytical Review of Power Flow Tracing in Deregulated Power
System,” American Journal of Electrical and Electronic Engineering, vol. 4, no. 3, pp. 92-
101, 2016.
[8] A. R. Al-Roomi, “118 Bus System (IEEE Test Case),” in Power Flow Test Systems
Repository, Halifax, Dalhousie University, Electrical and Computer Engineering, 2015.
[9] “MATLAB - Simulink,” Tutorial Point, [Online]. Available:
https://www.tutorialspoint.com/matlab/matlab_simulink.htm#. [Accessed 19 January 2020].
[10] “Simscape Electrical,” MathWorks, [Online]. Available:
https://www.mathworks.com/products/simscape-electrical.html. [Accessed 19 January
2020].
[11] SimPowerSystems User’s Guide, TransÉnergie Technologies Inc., 2004.

More Related Content

What's hot

Generation shift factor and line outage factor
Generation shift factor and line outage factorGeneration shift factor and line outage factor
Generation shift factor and line outage factorViren Pandya
 
concept of resilience and self healing in smart grid
concept of resilience and self healing in smart gridconcept of resilience and self healing in smart grid
concept of resilience and self healing in smart gridKundan Kumar
 
Unit 03 Protective relays
Unit  03 Protective relaysUnit  03 Protective relays
Unit 03 Protective relaysPremanandDesai
 
Reactive power management and voltage control by using statcom
Reactive power management and voltage control by using statcomReactive power management and voltage control by using statcom
Reactive power management and voltage control by using statcomHussain Ali
 
Heffron phillips model
Heffron phillips modelHeffron phillips model
Heffron phillips modelDr Ashok Tiwari
 
DigSILENT PF - 03 emt presentation
DigSILENT PF - 03 emt presentationDigSILENT PF - 03 emt presentation
DigSILENT PF - 03 emt presentationHimmelstern
 
REPORT- RADIAL FEEDER PROTECTION PANEL DEVELOPMENT
REPORT- RADIAL FEEDER PROTECTION PANEL DEVELOPMENTREPORT- RADIAL FEEDER PROTECTION PANEL DEVELOPMENT
REPORT- RADIAL FEEDER PROTECTION PANEL DEVELOPMENTHimanshu Paghdal
 
OPAL-RT Power Hardware-In-the-Loop presentation
OPAL-RT Power Hardware-In-the-Loop presentationOPAL-RT Power Hardware-In-the-Loop presentation
OPAL-RT Power Hardware-In-the-Loop presentationOPAL-RT TECHNOLOGIES
 
Power quality.ppt
Power quality.pptPower quality.ppt
Power quality.pptKrish Krishna
 
Mat power manual
Mat power manualMat power manual
Mat power manualChiru Prakash
 
Doubly fed-induction-generator
Doubly fed-induction-generatorDoubly fed-induction-generator
Doubly fed-induction-generatorHarshad Karmarkar
 
Three Phase Synchonours Generator and AVR
Three Phase Synchonours Generator and AVR Three Phase Synchonours Generator and AVR
Three Phase Synchonours Generator and AVR Emre Öztoklu
 
Power Station Electrical Protection
Power Station Electrical ProtectionPower Station Electrical Protection
Power Station Electrical ProtectionRichard Smith
 
Power Flow Analysis using Power World Simulator
Power Flow Analysis using Power World SimulatorPower Flow Analysis using Power World Simulator
Power Flow Analysis using Power World SimulatorUmair Shahzad
 
Power Quality & Power Quality Problems
Power Quality & Power Quality ProblemsPower Quality & Power Quality Problems
Power Quality & Power Quality ProblemsPower System Operation
 
Facts controllers
Facts controllersFacts controllers
Facts controllersDebayon Saha
 
Simulation and analysis of HVDC on MATLAB and PSCAD
Simulation and analysis of HVDC on MATLAB and PSCADSimulation and analysis of HVDC on MATLAB and PSCAD
Simulation and analysis of HVDC on MATLAB and PSCADVishal Bhimani
 
Automatic Power Factor Corrector Using Arduino report
Automatic Power Factor Corrector Using Arduino reportAutomatic Power Factor Corrector Using Arduino report
Automatic Power Factor Corrector Using Arduino reportSelf-employed
 

What's hot (20)

Generation shift factor and line outage factor
Generation shift factor and line outage factorGeneration shift factor and line outage factor
Generation shift factor and line outage factor
 
concept of resilience and self healing in smart grid
concept of resilience and self healing in smart gridconcept of resilience and self healing in smart grid
concept of resilience and self healing in smart grid
 
Unit 03 Protective relays
Unit  03 Protective relaysUnit  03 Protective relays
Unit 03 Protective relays
 
Reactive power management and voltage control by using statcom
Reactive power management and voltage control by using statcomReactive power management and voltage control by using statcom
Reactive power management and voltage control by using statcom
 
Heffron phillips model
Heffron phillips modelHeffron phillips model
Heffron phillips model
 
Facts lectures-2014
Facts lectures-2014Facts lectures-2014
Facts lectures-2014
 
DigSILENT PF - 03 emt presentation
DigSILENT PF - 03 emt presentationDigSILENT PF - 03 emt presentation
DigSILENT PF - 03 emt presentation
 
REPORT- RADIAL FEEDER PROTECTION PANEL DEVELOPMENT
REPORT- RADIAL FEEDER PROTECTION PANEL DEVELOPMENTREPORT- RADIAL FEEDER PROTECTION PANEL DEVELOPMENT
REPORT- RADIAL FEEDER PROTECTION PANEL DEVELOPMENT
 
OPAL-RT Power Hardware-In-the-Loop presentation
OPAL-RT Power Hardware-In-the-Loop presentationOPAL-RT Power Hardware-In-the-Loop presentation
OPAL-RT Power Hardware-In-the-Loop presentation
 
Power quality.ppt
Power quality.pptPower quality.ppt
Power quality.ppt
 
Mat power manual
Mat power manualMat power manual
Mat power manual
 
Doubly fed-induction-generator
Doubly fed-induction-generatorDoubly fed-induction-generator
Doubly fed-induction-generator
 
Three Phase Synchonours Generator and AVR
Three Phase Synchonours Generator and AVR Three Phase Synchonours Generator and AVR
Three Phase Synchonours Generator and AVR
 
Power Station Electrical Protection
Power Station Electrical ProtectionPower Station Electrical Protection
Power Station Electrical Protection
 
Power Flow Analysis using Power World Simulator
Power Flow Analysis using Power World SimulatorPower Flow Analysis using Power World Simulator
Power Flow Analysis using Power World Simulator
 
Power Quality & Power Quality Problems
Power Quality & Power Quality ProblemsPower Quality & Power Quality Problems
Power Quality & Power Quality Problems
 
Facts controllers
Facts controllersFacts controllers
Facts controllers
 
Simulation and analysis of HVDC on MATLAB and PSCAD
Simulation and analysis of HVDC on MATLAB and PSCADSimulation and analysis of HVDC on MATLAB and PSCAD
Simulation and analysis of HVDC on MATLAB and PSCAD
 
Power Quality
Power QualityPower Quality
Power Quality
 
Automatic Power Factor Corrector Using Arduino report
Automatic Power Factor Corrector Using Arduino reportAutomatic Power Factor Corrector Using Arduino report
Automatic Power Factor Corrector Using Arduino report
 

Similar to Power Systems analysis with MATPOWER and Simscape Electrical (MATLAB/Simulink)

bachelors-thesis
bachelors-thesisbachelors-thesis
bachelors-thesisVishal Gawade
 
FINAL REPORT
FINAL REPORTFINAL REPORT
FINAL REPORTCaner Ayhan
 
Digital Control in Power Electronics - Buso & Mattavelli - 2006.pdf
Digital Control in Power Electronics - Buso & Mattavelli - 2006.pdfDigital Control in Power Electronics - Buso & Mattavelli - 2006.pdf
Digital Control in Power Electronics - Buso & Mattavelli - 2006.pdfGollapalli Sreenivasulu
 
Digital Control in Power Electronics.pdf
Digital Control in Power Electronics.pdfDigital Control in Power Electronics.pdf
Digital Control in Power Electronics.pdfGollapalli Sreenivasulu
 
Half bridge converter simulation.pdf
Half bridge converter simulation.pdfHalf bridge converter simulation.pdf
Half bridge converter simulation.pdfssuserd9e1db
 
mechatronics lecture notes.pdf
mechatronics lecture notes.pdfmechatronics lecture notes.pdf
mechatronics lecture notes.pdfTsegaye Getachew
 
mechatronics lecture notes.pdf
mechatronics lecture notes.pdfmechatronics lecture notes.pdf
mechatronics lecture notes.pdfLaggo Anelka
 
Master's_Thesis_XuejiaoHAN
Master's_Thesis_XuejiaoHANMaster's_Thesis_XuejiaoHAN
Master's_Thesis_XuejiaoHANXuejiao Han
 
Optimum design and performance for nablus network
Optimum design and performance for nablus networkOptimum design and performance for nablus network
Optimum design and performance for nablus networkslmnsvn
 
Brocade200 E Metro Cluster Design
Brocade200 E Metro Cluster DesignBrocade200 E Metro Cluster Design
Brocade200 E Metro Cluster Designbsdux
 
Automatic generation of power system network diagram(Mimic diagram) from a CI...
Automatic generation of power system network diagram(Mimic diagram) from a CI...Automatic generation of power system network diagram(Mimic diagram) from a CI...
Automatic generation of power system network diagram(Mimic diagram) from a CI...Nikhil Valiveti
 
Combined heat and power design guide by ASHRAE
Combined heat and power design guide by ASHRAECombined heat and power design guide by ASHRAE
Combined heat and power design guide by ASHRAEAli Hasimi Pane
 
Digital Control of Power Electronics Course Manual Index
Digital Control of Power Electronics Course Manual IndexDigital Control of Power Electronics Course Manual Index
Digital Control of Power Electronics Course Manual IndexHamish Laird
 
Electronics en engineering-basic-vocational-knowledge
Electronics en engineering-basic-vocational-knowledgeElectronics en engineering-basic-vocational-knowledge
Electronics en engineering-basic-vocational-knowledgesandeep patil
 
380 Vdc Architectures for the Modern Data Center
380 Vdc Architectures for the Modern Data Center380 Vdc Architectures for the Modern Data Center
380 Vdc Architectures for the Modern Data CenterEltek
 

Similar to Power Systems analysis with MATPOWER and Simscape Electrical (MATLAB/Simulink) (20)

bachelors-thesis
bachelors-thesisbachelors-thesis
bachelors-thesis
 
FINAL REPORT
FINAL REPORTFINAL REPORT
FINAL REPORT
 
Digital Control in Power Electronics - Buso & Mattavelli - 2006.pdf
Digital Control in Power Electronics - Buso & Mattavelli - 2006.pdfDigital Control in Power Electronics - Buso & Mattavelli - 2006.pdf
Digital Control in Power Electronics - Buso & Mattavelli - 2006.pdf
 
Digital Control in Power Electronics.pdf
Digital Control in Power Electronics.pdfDigital Control in Power Electronics.pdf
Digital Control in Power Electronics.pdf
 
Half bridge converter simulation.pdf
Half bridge converter simulation.pdfHalf bridge converter simulation.pdf
Half bridge converter simulation.pdf
 
mechatronics lecture notes.pdf
mechatronics lecture notes.pdfmechatronics lecture notes.pdf
mechatronics lecture notes.pdf
 
mechatronics lecture notes.pdf
mechatronics lecture notes.pdfmechatronics lecture notes.pdf
mechatronics lecture notes.pdf
 
1608m um001 -en-p
1608m um001 -en-p1608m um001 -en-p
1608m um001 -en-p
 
Master's_Thesis_XuejiaoHAN
Master's_Thesis_XuejiaoHANMaster's_Thesis_XuejiaoHAN
Master's_Thesis_XuejiaoHAN
 
Optimum design and performance for nablus network
Optimum design and performance for nablus networkOptimum design and performance for nablus network
Optimum design and performance for nablus network
 
Textbook retscreen pv
Textbook retscreen pvTextbook retscreen pv
Textbook retscreen pv
 
Solar blinds
Solar blindsSolar blinds
Solar blinds
 
Brocade200 E Metro Cluster Design
Brocade200 E Metro Cluster DesignBrocade200 E Metro Cluster Design
Brocade200 E Metro Cluster Design
 
Aviation Control Unit
Aviation Control UnitAviation Control Unit
Aviation Control Unit
 
Automatic generation of power system network diagram(Mimic diagram) from a CI...
Automatic generation of power system network diagram(Mimic diagram) from a CI...Automatic generation of power system network diagram(Mimic diagram) from a CI...
Automatic generation of power system network diagram(Mimic diagram) from a CI...
 
Combined heat and power design guide by ASHRAE
Combined heat and power design guide by ASHRAECombined heat and power design guide by ASHRAE
Combined heat and power design guide by ASHRAE
 
Digital Control of Power Electronics Course Manual Index
Digital Control of Power Electronics Course Manual IndexDigital Control of Power Electronics Course Manual Index
Digital Control of Power Electronics Course Manual Index
 
Stk 500
Stk 500Stk 500
Stk 500
 
Electronics en engineering-basic-vocational-knowledge
Electronics en engineering-basic-vocational-knowledgeElectronics en engineering-basic-vocational-knowledge
Electronics en engineering-basic-vocational-knowledge
 
380 Vdc Architectures for the Modern Data Center
380 Vdc Architectures for the Modern Data Center380 Vdc Architectures for the Modern Data Center
380 Vdc Architectures for the Modern Data Center
 

More from Bilal Amjad

IoT Based Smart Energy Meter using Raspberry Pi and Arduino
IoT Based Smart Energy Meter using Raspberry Pi and Arduino IoT Based Smart Energy Meter using Raspberry Pi and Arduino
IoT Based Smart Energy Meter using Raspberry Pi and Arduino Bilal Amjad
 
Solar Radiation monthly prediction and forecasting using Machine Learning tec...
Solar Radiation monthly prediction and forecasting using Machine Learning tec...Solar Radiation monthly prediction and forecasting using Machine Learning tec...
Solar Radiation monthly prediction and forecasting using Machine Learning tec...Bilal Amjad
 
Big Data in Smart Grid
Big Data in Smart GridBig Data in Smart Grid
Big Data in Smart GridBilal Amjad
 
Flexibility of Power System (Sources of flexibility & flexibility markets)
Flexibility of Power System (Sources of flexibility & flexibility markets)Flexibility of Power System (Sources of flexibility & flexibility markets)
Flexibility of Power System (Sources of flexibility & flexibility markets)Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Bilal Amjad
 
Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)Bilal Amjad
 
bubble sorting of an array in 8086 assembly language
bubble sorting of an array in 8086 assembly languagebubble sorting of an array in 8086 assembly language
bubble sorting of an array in 8086 assembly languageBilal Amjad
 
assembly language programming organization of IBM PC chapter 9 part-2(decimal...
assembly language programming organization of IBM PC chapter 9 part-2(decimal...assembly language programming organization of IBM PC chapter 9 part-2(decimal...
assembly language programming organization of IBM PC chapter 9 part-2(decimal...Bilal Amjad
 
assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...
assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...
assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...Bilal Amjad
 
Limit of complex number
Limit of complex numberLimit of complex number
Limit of complex numberBilal Amjad
 
simple combinational lock
simple combinational locksimple combinational lock
simple combinational lockBilal Amjad
 
4-bit camparator
4-bit camparator4-bit camparator
4-bit camparatorBilal Amjad
 
Orthogonal trajectories
Orthogonal trajectoriesOrthogonal trajectories
Orthogonal trajectoriesBilal Amjad
 

More from Bilal Amjad (20)

IoT Based Smart Energy Meter using Raspberry Pi and Arduino
IoT Based Smart Energy Meter using Raspberry Pi and Arduino IoT Based Smart Energy Meter using Raspberry Pi and Arduino
IoT Based Smart Energy Meter using Raspberry Pi and Arduino
 
Solar Radiation monthly prediction and forecasting using Machine Learning tec...
Solar Radiation monthly prediction and forecasting using Machine Learning tec...Solar Radiation monthly prediction and forecasting using Machine Learning tec...
Solar Radiation monthly prediction and forecasting using Machine Learning tec...
 
Big Data in Smart Grid
Big Data in Smart GridBig Data in Smart Grid
Big Data in Smart Grid
 
Flexibility of Power System (Sources of flexibility & flexibility markets)
Flexibility of Power System (Sources of flexibility & flexibility markets)Flexibility of Power System (Sources of flexibility & flexibility markets)
Flexibility of Power System (Sources of flexibility & flexibility markets)
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
 
Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)
 
bubble sorting of an array in 8086 assembly language
bubble sorting of an array in 8086 assembly languagebubble sorting of an array in 8086 assembly language
bubble sorting of an array in 8086 assembly language
 
assembly language programming organization of IBM PC chapter 9 part-2(decimal...
assembly language programming organization of IBM PC chapter 9 part-2(decimal...assembly language programming organization of IBM PC chapter 9 part-2(decimal...
assembly language programming organization of IBM PC chapter 9 part-2(decimal...
 
assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...
assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...
assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...
 
Limit of complex number
Limit of complex numberLimit of complex number
Limit of complex number
 
simple combinational lock
simple combinational locksimple combinational lock
simple combinational lock
 
4-bit camparator
4-bit camparator4-bit camparator
4-bit camparator
 
Orthogonal trajectories
Orthogonal trajectoriesOrthogonal trajectories
Orthogonal trajectories
 

Recently uploaded

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEslot gacor bisa pakai pulsa
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoĂŁo Esperancinha
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 

Recently uploaded (20)

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 

Power Systems analysis with MATPOWER and Simscape Electrical (MATLAB/Simulink)

  • 1. Smart Grids and Power Systems Analysis (ELE7031-B) CW-01 Submitted By: Bilal Amjad UoB Number: 19014392 MSc Smart Grids and Energy Systems
  • 2. 1 Table of Contents 1 Introduction............................................................................................................................. 6 2 Report structure....................................................................................................................... 6 3 MATPOWER.......................................................................................................................... 6 3.1 Download and install........................................................................................................ 6 3.2 File format........................................................................................................................ 7 3.3 Run power flow (PF) and optimal power flow (OPF) ..................................................... 7 3.4 Task 1: Perform Power Flow (PF) ................................................................................... 8 3.4.1 IEEE 9 bus test system.............................................................................................. 8 3.4.2 IEEE 30 bus test system.......................................................................................... 10 3.4.3 IEEE 118 bus test system........................................................................................ 12 3.5 Task 2: Increase 10% R and X and perform Power Flow (PF)...................................... 13 3.5.1 IEEE 9 bus test system............................................................................................ 14 3.5.2 IEEE 30 bus test system.......................................................................................... 15 3.5.3 IEEE 118 bus test system........................................................................................ 16 3.5.4 Add 2 generators in case30..................................................................................... 17 3.6 Comparison between Task 1 and Task 2........................................................................ 18 4 Simscape Electrical............................................................................................................... 20 4.1 Task 1: Familiarising with SimPower System and Simulink Toolboxes....................... 20 4.1.1 Simulink Toolbox ................................................................................................... 20 4.1.2 SimPowerSystem (SimPowerSystems) .................................................................. 21 4.2 Task 2: Implement single phase circuit in SimPowerSystems....................................... 21 4.2.1 Current and Voltage Measurements........................................................................ 22 4.2.2 Active and reactive power measurement ................................................................ 22 4.2.3 Export the outputs to Workspace............................................................................ 22 4.3 Task 2: Implement Three phase circuit in SimPowerSystems....................................... 24 4.3.1 Current and Voltage Measurements........................................................................ 24 4.3.2 Active and reactive power measurement ................................................................ 24 4.3.3 Export the outputs to Workspace............................................................................ 24 4.4 Task 3: Demo of Wind Farm Using Doubly-Fed Induction Generators........................ 26 4.4.1 Description.............................................................................................................. 26
  • 3. 2 4.4.2 SimPowerSystems Diagram.................................................................................... 26 4.4.3 Wind turbine Block parameters .............................................................................. 28 4.4.4 Turbine Response to wind speed ............................................................................ 29 References..................................................................................................................................... 33
  • 4. 3 List of Figures Figure 1: IEEE 9 bus system [5]..................................................................................................... 8 Figure 2:Results summary of PF of case9. ..................................................................................... 9 Figure 3: IEEE 30 bus system, Single line diagram [7]................................................................ 10 Figure 4:Results summary of PF of case30. ................................................................................. 11 Figure 5: IEEE 118 bus system, Single line diagram [8].............................................................. 12 Figure 6:Results summary of PF of case118. ............................................................................... 13 Figure 7: Branch data matrix of a case in MATPOWER ............................................................. 13 Figure 8:Results summary of PF of case9 with 10% increase in R and X of branch data. .......... 14 Figure 9:Results summary of PF of case30 with 10% increase in R and X of branch data. ........ 15 Figure 10:Results summary of PF of case118 with 10% increase in R and X of branch data. .... 16 Figure 11: Two generators, added in case30 in generator data..................................................... 17 Figure 12: Result summary of case30 with two extra generators................................................. 17 Figure 13:Simulink Library browser of MATLAB. ..................................................................... 20 Figure 14:SimPowerSystem in Simulink Library Browser. ......................................................... 21 Figure 15:Single Phase Circuit using SimPowerSystem. ............................................................. 22 Figure 16:Current and Voltage graphs.......................................................................................... 23 Figure 17:P and Q graphs ............................................................................................................. 23 Figure 18: Three Phase Circuit using SimPowerSystem. ............................................................. 24 Figure 19::Current and Voltage graphs......................................................................................... 25 Figure 20:P and Q graphs ............................................................................................................. 25 Figure 21:Single-Line Diagram of the Wind Farm Connected to a Distribution System [11]..... 26 Figure 22: SimPowerSystems Diagram of the Wind Farm Connected to Distribution System ... 26 Figure 23: Protection system of Plant in SimPowerSystems........................................................ 27 Figure 24: Protection system of Wind Farm in SimPowerSystem ............................................... 27 Figure 25: Inside the Measurement block..................................................................................... 28 Figure 26: Wind turbine block parameters ................................................................................... 28 Figure 27: Turbine Power Characteristics graph .......................................................................... 29 Figure 28: Initial parameters setting of wind turbine.................................................................... 30 Figure 29: Output of Wind Farm in Voltage Regulation mode.................................................... 31 Figure 30: Output of Wind Turbine without voltage regulation................................................... 32
  • 5. 4 List of Tables Table 1: Variables in M-files of MATPOWER.............................................................................. 7 Table 2: Comparison between Task 1 and Task 2 on case9 ......................................................... 18 Table 3: Comparison between Task 1 and Task 2 on case30 ....................................................... 18 Table 4: Comparison between Task 1 and Task 2 on case118 ..................................................... 19
  • 6. 5 Abstract MATLAB is widely used in power system analysis including power flow analysis, microgrid system design, system feasibility and grid integration studies, EMT simulation and harmonic analysis, power plant model validation and deploy developed code directly to real-time and embedded systems. MATPOWER and SimPowerSystem toolboxes are widely used for power flow analysis and design power system in MATLAB, respectively. This report discussed the power flow analysis, optimal power flow, designing single phase and three-phase circuits and analysing the results using MATPOWER and SimPowerSystem in MATLAB briefly. A demo design of Wind farm with distributed system is also explained to give the clear idea that how to design any type of electrical power system using SimPowerSystem toolbox.
  • 7. 6 1 Introduction It is very important to design and analyse any power system or project before practically implementing it. There are many developed for power system design and analysis for educational, research and commercial purposes. MATLAB is one of the most famous software, widely used for educational and research purposes. There are number of tools in MATLAB for power system design and analysis like MATPOWER, SimPowerSystem (SimPower System) and electric power system simulator [1]. Designing of power system is done in Simulink while mathematical analysis is mostly done on workspace. MATPOWER is based on workspace having M-files of different cases and it is used to perform power flow and optimal power flow. 2 Report structure The report is in two sections. The first section is about MATPOWER, starting with some introduction on MATPOWER and how to download and install it. Then, some tasks are performed and discussed. In the second section, Simulink and SimPowerSystem toolboxes are discussed. There are some design examples and a demo using SimPowerSystem toolbox with detailed discussion of results. 3 MATPOWER It is an open source package includes MATLAB M-files developed by Ray D. Zimmerman, Carlos E. Murillo-SĂĄnchez and Deqiang Gan of PSERC at Cornell University under the direction of Robert Thomas [2]. MATPOWER is mainly used for power flow (PF) and optimal power flow (OPF) problems analysis. It is widely used by educators and researchers. It is very simple to use and easy to modify according to needs. 3.1 Download and install MATPOWER is an open source software can be downloaded from home page of MATPOWER website1 . After downloading, unzip the file and place the folder in the location of MATLAB path. Open the MATLAB and open the folder containing install_matpower.m file. Add that path to MATLAB path including subfolders and files and type the following command on workspace: >>install_matpower The MATPOWER will be installed into your MATLAB. To check that it is successfully installed and working properly, type: >> test_matpower The complete detailed guide is available in MATPOWER user’s manual [3]. 1 https://matpower.org/
  • 8. 7 3.2 File format All the files are M-file in .m format. Each IEEE case is written as a function in MATLAB, defining and returning variables baseMVA, bus, branch, gen, areas, and gencost. The function contains structure arrays named as “mpc” having above mentioned variables as field (struct.field). The of all fields and their parameters are in standard IEEE and PTI format. Table 1 explains the structure, format and values of all these variables. More detail can be found by type help caseformat in MATLAB workspace [2]. Table 1: Variables in M-files of MATPOWER Sr. No. Variable Name Format Syntax Description 1. Mpc String or structure mpc= ’case_name’ It contains the name of case. 2. Version String as a field mpc.version It tells the version of MATPOWER used 3. baseMVA Field mpc.baseMVA Base value of system MVA 4. Bus Field (matrix) mpc.bus It contains data of all busses. Each row is representing a bus and column are the values of different parameters of bus. 5. Gen Field (matrix) mpc.gen It contains data of all generators. Each row is representing a generator and column are the values of different parameters of generator. 6. Branch Field (matix) mpc.branch It contains data of all branches of network. Each row is representing a branch between two buses and column are the values of different parameters of branch. 7. Gencost Field (matrix) mpc.gencost It contains cost data of all generators. Each row is representing cost data for a generator and column are the values of different parameters related to its cost. It is used in OPF not in PF. 3.3 Run power flow (PF) and optimal power flow (OPF) There is list of different example cases for performing PF and OPF included in MATPOWER package. These cases are different IEEE bus systems. For example, ‘case9’ is an IEEE 9 bus system. To perform PF or OPF on any case, it needs to enter only one command in MATLAB workspace. The syntax to perform PF is runpf(case_name). To perform PF on case 9 or IEEE 9 bus system, the command will be: >> runpf(case9);
  • 9. 8 The syntax to perform OPF is runopf(case_name). To perform OPF on case 9 or IEEE 9 bus system, the command will be: >> runopf(case9); The results of PF or OPF will be shown on the workspace. 3.4 Task 1: Perform Power Flow (PF) Task 1 is basically about the understating of code and variables in the M-files of different cases, performing PF and analyse the results. 3.4.1 IEEE 9 bus test system It is an IEEE benchmark test case named as case9 in MATPOWER. IEEE 9 bus system has 3 generator units with 12 busses, 6 transmission lines, 6 transformers and 3 loads as shown in the figure 1 [4]. Figure 1: IEEE 9 bus system [5]. 3.4.1.1 Command To run power flow of IEEE 9 bus system, the command for MATLAB workspace is: >> runpf(case9) 3.4.1.2 Results The results show that Newton's method was used for power flow which converged in 4 iterations. The system summary showed total generation capacity is 820.0MW and -900.0 to 900.0MVAr, total Generation (actual) is 319.6MW and 22.8MVAr, total load of 315.0MW and 115.0MVAr and total losses (I^2 * Z) are 4.64MW and 48.38MVAr. Voltage magnitude is minimum 0.996p.u. at bus 9 and maximum is 1.040p.u. at bus 1, voltage angle is minimum -3.99 degree at bus 9 and
  • 10. 9 maximum 9.28 degree at bus 2, maximum active power (P) losses (I^2*R) 2.30MW at line 8-9 and maximum reactive power (Q) Losses (I^2*X) 15.83MVAr at line 8-2 as shown in the figure 2. Figure 2:Results summary of PF of case9.
  • 11. 10 3.4.2 IEEE 30 bus test system It is named as case30 in MATPOWER. IEEE 30 bus system has 6 generator units with 36 busses, 37 transmission lines, 10 transformers and 21 loads as shown in the figure 3 [6]. Figure 3: IEEE 30 bus system, Single line diagram [7]. 3.4.2.1 Command To run power flow of IEEE 30 bus system, the command for MATLAB workspace is: >> runpf(case30)
  • 12. 11 3.4.2.2 Results The results show that Newton's method was used for power flow which converged in 3 iterations. The system summary showed total generation capacity is 335.0MW and -95.0 to 405.9MVAr, total Generation (actual) is 191.6MW and 100.4MVAr, total load of 189.2MW and 107.2MVAr and total losses (I^2 * Z) are 2.44MW and 8.99MVAr. Voltage magnitude is minimum 0.961p.u. at bus 8 and maximum is 1.000p.u. at bus 1, voltage angle is minimum -3.96 degree at bus 19 and maximum 1.48 degree at bus 13, maximum active power (P) losses (I^2*R) 0.29MW at line 2-6 and maximum reactive power (Q) Losses (I^2*X) 2.10MVAr at line 12-13 as shown in the figure 4. Figure 4:Results summary of PF of case30.
  • 13. 12 3.4.3 IEEE 118 bus test system It is named as case30 in MATPOWER. IEEE 32 bus system has 54 generator units with 118 busses, 118 transmission lines, 11 transformers and 99 loads as shown in the figure 5. Figure 5: IEEE 118 bus system, Single line diagram [8]. 3.4.3.1 Command To run power flow of IEEE 118 bus system, the command for MATLAB workspace is: >> runpf(case118) 3.4.3.2 Results The results show that Newton's method was used for power flow which converged in 3 iterations. The system summary showed total generation capacity is 9966.2MW and -7345.0 to 11777.0MVAr, total Generation (actual) is 4374.9MW and 795.7MVAr, total load of 4242.0MW and 1438.0MVAr and total losses (I^2 * Z) are 132.86MW and 783.79MVAr. Voltage magnitude is minimum 0.943p.u. at bus 76 and maximum is 1.050p.u. at bus 10, voltage angle is minimum 7.05 degree at bus 41 and maximum 3.975 degree at bus 89, maximum active power (P) losses (I^2*R) 6.40MW at line 25-27 and maximum reactive power (Q) Losses (I^2*X) 59.22MVAr at line 9-10 as shown in the figure 6.
  • 14. 13 Figure 6:Results summary of PF of case118. 3.5 Task 2: Increase 10% R and X and perform Power Flow (PF) Objective of this task is to increase the value of resistance (R) and reactance (X) of branches by 10% of the system, analysis the results and compare with the previous results, before 10% increase. Don’t modify the original case file because original case will be overwritten. Save a sperate file of each case and then do modification. In branch data R ad X are in 3rd and 4th column of branch data matrix as shown in the figure 7. The 10% increase will require in 3rd and 4th column only which will be done by multiplying these whole columns by 1.1. Figure 7: Branch data matrix of a case in MATPOWER
  • 15. 14 3.5.1 IEEE 9 bus test system 3.5.1.1 Commands First save the case9 file into another variable: >> mp1=case9 To increase R by 10%: >> mp1.branch(:,3)=mp1.branch(:,3).*1.1 To increase X by 10%: >> mp1.branch(:,4)=mp1.branch(:,4).*1.1 Now run power flow: >> runpf(mp1) 3.5.1.2 Results The results show that Newton's method was used for power flow which converged in 4 iterations. The system summary showed total generation capacity is 820.0MW and -900.0 to 900.0MVAr, total Generation (actual) is 320.1MW and 28.6MVAr, total load of 315.0MW and 115.0MVAr and total losses (I^2 * Z) are 5.13MW and 53.48MVAr. Voltage magnitude is minimum 0.990p.u. at bus 9 and maximum is 1.040p.u. at bus 1, voltage angle is minimum -4.44 degree at bus 9 and maximum 10.20 degree at bus 2, maximum active power (P) losses (I^2*R) 2.54MW at line 8-9 and maximum reactive power (Q) Losses (I^2*X) 17.45MVAr at line 8-2 as shown in the figure 8. Figure 8:Results summary of PF of case9 with 10% increase in R and X of branch data.
  • 16. 15 3.5.2 IEEE 30 bus test system 3.5.2.1 Commands First save the case9 file into another variable: >> mp2=case30 To increase R by 10%: >> mp2.branch(:,3)=mp1.branch(:,3).*1.1 To increase X by 10%: >> mp2.branch(:,4)=mp1.branch(:,4).*1.1 Now run power flow: >> runpf(mp2) 3.5.2.2 Results The results show that Newton's method was used for power flow which converged in 3 iterations. The system summary showed total generation capacity is 335.0MW and -95.0 to 405.9MVAr, total Generation (actual) is 191.9MW and 101.4MVAr, total load of 189.2MW and 107.2MVAr and total losses (I^2 * Z) are 2.71MW and 9.97MVAr. Voltage magnitude is minimum 0.956p.u. at bus 8 and maximum is 1.000p.u. at bus 1, voltage angle is minimum -4.39 degree at bus 19 and maximum 1.61 degree at bus 13, maximum active power (P) losses (I^2*R) 0.32MW at line 2-6 and maximum reactive power (Q) Losses (I^2*X) 2.31MVAr at line 12-13, shown in the figure 9. Figure 9:Results summary of PF of case30 with 10% increase in R and X of branch data.
  • 17. 16 3.5.3 IEEE 118 bus test system 3.5.3.1 Commands First save the case9 file into another variable: >> mp3=case118 To increase R by 10%: >> mp3.branch(:,3)=mp1.branch(:,3).*1.1 To increase X by 10%: >> mp3.branch(:,4)=mp1.branch(:,4).*1.1 Now run power flow: >> runpf(mp3) 3.5.3.2 Results The results show that Newton's method was used for power flow which converged in 3 iterations. The system summary showed total generation capacity is 9966.2MW and -7345.0 to 11777.0MVAr, total Generation (actual) is 4387.3MW and 868.8MVAr, total load of 4242.0MW and 1438.0MVAr and total losses (I^2 * Z) are 145.33MW and 856.22MVAr. Voltage magnitude is minimum 0.943p.u. at bus 76 and maximum is 1.050p.u. at bus 10, voltage angle is minimum 4.37 degree at bus 41 and maximum 40.39 degree at bus 89, maximum active power (P) losses (I^2*R) 6.99MW at line 25-27 and maximum reactive power (Q) Losses (I^2*X) 65.15MVAr at line 9-10 as shown in the figure 10. Figure 10:Results summary of PF of case118 with 10% increase in R and X of branch data.
  • 18. 17 3.5.4 Add 2 generators in case30 Here, 2 generators of 50MW are added into case30 (IEEE 30 bus system) at 14 and 24. These two generators are heighted in figure 11, added into generator data. Similarly add the data of two generators in generator cost data matrix. Figure 11: Two generators, added in case30 in generator data The results show that Newton's method was used for power flow which converged in 4 iterations. The system summary showed total generation capacity is 465.0MW and -137.0 to 555.9MVAr, total Generation (actual) is 195.9MW and 116.4MVAr, total load of 189.2MW and 107.02MVAr and total losses (I^2 * Z) are 6.67MW and 25.05MVAr. Voltage magnitude is minimum 0.961p.u. at bus 19 and maximum is 1.050p.u. at bus 14, voltage angle is minimum 0.00 degree at bus 1 and maximum 13.38 degree at bus 14, maximum active power losses (I^2*R) 1.33MW at line 22-24 and maximum reactive power Losses (I^2*X) 5.26MVAr at line 4-12, shown in the figure 12. Figure 12: Result summary of case30 with two extra generators
  • 19. 18 3.6 Comparison between Task 1 and Task 2 Task 1 performed power flow (PF) on the cases, case9, case30 and case118. In task 2, the values of R and X in branch data for all 10% these three cases were increased and then PF performed on it. The table 2 shows the compression between task 1 and task 2 on IEEE 9 bus system which is case9 in MATPOWER. The table shows that when the value of R and X for branch data is increased by 10%, the power losses and voltage angle (max) increased, and the voltage magnitude somehow drops. Similar things happened when in case30 and case118 as well (shown in table 3 and table 4). Table 2: Comparison between Task 1 and Task 2 on case9 Table 3: Comparison between Task 1 and Task 2 on case30
  • 20. 19 Table 4: Comparison between Task 1 and Task 2 on case118
  • 21. 20 4 Simscape Electrical 4.1 Task 1: Familiarising with SimPower System and Simulink Toolboxes 4.1.1 Simulink Toolbox It is a graphical programming environment based on MATLAB, developed by MathWorks. It is used for simulation of modelling, simulating and analysing multi-domain dynamic systems. The Simulink library contain the lot of toolboxes and in these tool boxes there are sets of blocks for different purposes. These blocks are used to perform simulation [9]. To open the Simulink in the MATLAB, go on MATLAB home page and follow this path: Simulink Library → Simulink or just type simulink in MATLAB workspace. The figure 13 shows the list of libraries in Simulink. To use any block, select the model and drag it to the model window. The results can also be transformed on MATLAB workspace to perform further actions. Figure 13:Simulink Library browser of MATLAB.
  • 22. 21 4.1.2 SimPowerSystem (SimPowerSystems) SimPowerSystem also known as SimPowerSystem or SimElectronics. This toolbox contains libraries, having model blocks for modelling and simulating electronic, mechatronic, and electrical power systems. It has lot of components including semiconductors, motors, and components for applications such as electromechanical actuation, smart grids, and renewable energy systems [10]. Follow this path to open the SimPowerSystem in MATLAB (shown in the figure 14): Simulink Library → Simscape→ SimPowerSystems Figure 14:SimPowerSystem in Simulink Library Browser. 4.2 Task 2: Implement single phase circuit in SimPowerSystems The circuit shown in figure is implemented using SimPowerSystems in Simulink, MATLAB. This is a single-phase circuit having AC source of 100V at 60Hz and Z source is an internal reactance of source. A fifth harmonic is injected at 300Hz frequency using current source of 10A. A fifth harmonic filter is used to filter the harmonic, which is a combination of resistance, capacitor and inductor. Impedance measurement block is attached in parallel in the circuit to plot the phase diagram of impedance vs frequency, to study the effect of harmonic filter.
  • 23. 22 4.2.1 Current and Voltage Measurements Ammeter and Voltmeter are current measurement and voltage measurement blocks, respectively, available in SimPowerSystem. 4.2.2 Active and reactive power measurement Power measurement block has the input V voltage and I current and measure the active and reactive power of the circuit. The display block is used to display measured parameters, voltage, current, active power (P) and reactive power (Q). Then scope is attached to see the graphs of voltage, current, active power (P) and reactive power (Q). Figure 15:Single Phase Circuit using SimPowerSystem. 4.2.3 Export the outputs to Workspace To export the results on workspace “to workspace” block from the Simulink library is used as shown on the circuit in figure 15. Then these exported results are plotted using the following commands: Current and Voltage: >> figure % plotting Current and Voltage >> subplot(2,1,1) >> plot(tout,i) >> subplot(2,1,2) >> plot(tout,v) The figure 16 shows the plotted graphs for current and voltage of the circuit.
  • 24. 23 Figure 16:Current and Voltage graphs Active and Reactive Power: >> figure % plotting Active and Reactive Power >> subplot(2,1,1) >> plot(tout,p) >> subplot(2,1,2) >> plot(tout,q) The figure 17 shows the plotted graphs for Active and Reactive Power of the circuit. Figure 17:P and Q graphs
  • 25. 24 4.3 Task 2: Implement Three phase circuit in SimPowerSystems The circuit shown in figure is implemented circuit using SimPowerSystems in Simulink, MATLAB. This is a three-phase circuit having AC source of 208V phase to phase voltage at 60Hz. A fifth harmonic is injected at 300Hz frequency using current source of 10A. A three-phase fifth harmonic filter is used to filter the harmonic, which is a combination of resistance, capacitor and inductor. Impedance measurement block is attached in parallel in the circuit to plot the phase diagram of impedance vs frequency, to study the effect of harmonic filter. 4.3.1 Current and Voltage Measurements “Three-phase V-I measurement” block is used to measure the three-phase current and voltage. The results are displayed by display block as shown in the figure. 4.3.2 Active and reactive power measurement Three-phase power measurement block has the input Vabc three-phase voltage (output of three- phase voltage measurement) and Iabc three-phase current (output of three-phase current measurement) and measure the active and reactive power of the circuit. The display block is used to display measured parameters active power (P) and reactive power (Q). Then scope is attached to see the graphs of voltage, current, active power (P) and reactive power (Q). Figure 18: Three Phase Circuit using SimPowerSystem. 4.3.3 Export the outputs to Workspace To export the results on workspace “to workspace” block from the Simulink library is used as shown on the circuit in figure 18. Then these exported results are plotted using the following commands: Current and Voltage: >> figure % plotting Current and Voltage
  • 26. 25 >> subplot(2,1,1) >> plot(tout,i) >> subplot(2,1,2) >> plot(tout,v) The figure 19 shows the plotted graphs for current and voltage of the circuit. Figure 19::Current and Voltage graphs Active and Reactive Power: >> figure % plotting Active and Reactive Power >> subplot(2,1,1) >> plot(tout,p) >> subplot(2,1,2) >> plot(tout,q) The figure 20 shows the plotted graphs for Active and Reactive Power of the circuit. Figure 20:P and Q graphs
  • 27. 26 4.4 Task 3: Demo of Wind Farm Using Doubly-Fed Induction Generators 4.4.1 Description This example uses the SimPowerSystems to study steady-state and dynamic performance of a 9MW wind farm connected to a distribution system. The single-line diagram is shown in figure 21. There are 6 1.5MW turbines which are connected with 20kV distribution systems. It exports the power through 30km, 25kV feeder to a 120kV grid. At load of 2MVA is connected on bus B25. A load of 500kW is on the bus 575V of the wind farm [11]. Figure 21:Single-Line Diagram of the Wind Farm Connected to a Distribution System [11] Wind turbines is a doubly-fed induction generator (DFIG) containing of a wound rotor induction generator and an AC/DC/AC IGBT-based PWM converter. 60Hz gird is directly connected with stator winding. The benefit of the DFIG is its capability for power electronic converters to produce or absorb reactive power. So, it eradicates the requirement for adding capacitor banks [11]. 4.4.2 SimPowerSystems Diagram The command on workspace to run this dome is: power_wind_dfig After entering this command, the circuit shown in figure 22 Wind Farm will be opened in Simulink. Figure 22: SimPowerSystems Diagram of the Wind Farm Connected to Distribution System
  • 28. 27 4.4.2.1 Protraction systems There is a protection system of both plant load at bus B25 and wind turbine. These protection systems monitor the voltage, current, machine speed and DC link voltage of the DFIG. The figure 23 and figure 24 show the protection system of plant load and wind turbine, respectively. Figure 23: Protection system of Plant in SimPowerSystems Figure 24: Protection system of Wind Farm in SimPowerSystem
  • 29. 28 4.4.2.2 Measurement Block Measurement block measures all the output parameters of windfarm and grid. The inside view of this block is shown in figure 25. Figure 25: Inside the Measurement block. 4.4.3 Wind turbine Block parameters The parameters of wind farm are opened by double clicking on wind farm block. The figure 26 shows the parameters of wind farm. Figure 26: Wind turbine block parameters
  • 30. 29 The turbine power characteristics can also be plotted by clicking on display under the parameters of wind farm. The graph is between turbine speed and turbine output power as shown in figure 27. The parameters ABCD in the graph are followed by DFIG in a controlled way. The turbine speed optimization is gained between point B and point C on the curve. Figure 27: Turbine Power Characteristics graph A single wind turbine is simulated for 6-wind-turbine system by multiplying these parameters by six: i) Mechanical output power of turbine (from turbine data). ii) Rate power of generator (from generator data). iii) DC capacitor of bus (from convertor data). 4.4.4 Turbine Response to wind speed The objective of this experiment observes how the wind speed affect the output parameters of wind turbine and what is its impact on the system. DFIG works in two mode, voltage regulation and Var regulation. The wind turbine will be drive in voltage regulation mode and without this mode to observe the behaviour of turbine in both cases.
  • 31. 30 4.4.4.1 Voltage Regulation Mode Initial the operation mode of wind turbine is set to voltage regulation, the reference voltage (Vref) to control terminal voltage is set t 1p.u and voltage drop (Xs) 0.02p.u from the control section of block parameters, as highlighted in figure 26. Figure 28: Initial parameters setting of wind turbine The model is run for 50s and results are exported to MATLAB workspace to plot them. Figure 27 show the recorded results of wind turbine in voltage regulation mode, plotted on workspace. It can be observed that, wind speed was initially 8p.u up to 5 seconds. Then it started increasing and at 12s it reached to 14p.u. It can be seen that as wind start increasing the output active power (P) also start increasing and reached to its rated output of 19MW before 20s. The pitch angle was zero in the start. At 20s it increased to 8 degree to maintain the mechanical power of the turbine. In case of voltage (V1) and reactive power (Q), the output shows that as active power start increasing with wind speed, the turbine started observing reactive power to maintain the voltage level at regulated value throughout the interval.
  • 32. 31 Figure 29: Output of Wind Farm in Voltage Regulation mode 4.4.4.2 Without Voltage Regulation Mode Now, the mode of wind turbine from control parameters is changed to Var regulation instead of voltage regulation to observe that how change in wind speed can affects output voltage of turbine and the value of Qref is set to zero. The simulation was run again, and the results are plotted it figure 28. The output shows that the voltage raised to 1.021p.u as turbine started to generate rated power with unity power factor.
  • 33. 32 Figure 30: Output of Wind Turbine without voltage regulation
  • 34. 33 References [1] M. Arnaout, R. Rammal and S. Abdulnabi, “Electric Power System Simulator Tool in MATLAB,” in Science Education: Research and New Technologies, Croatia, InTech, 2017, pp. 99-117. [2] R. D. Zimmerman, C. E. Murillo-SĂĄnchez and D. (. Gan, MATPOWER User's manual (Version 3.0.0), Ithaca: ower Systems Engineering Research Center (PSERC)School of Electrical Engineering, Cornell University, 2005. [3] R. D. Zimmerman and C. E. Murillo-Sanchez, MATPOWER User's Manual (Version 7.0), Power Systems Engineering Research Center (PSerc), 2019. [4] “IEEE 9-bus modified test system,” Dynamic IEEE test systems, [Online]. Available: https://www.kios.ucy.ac.cy/testsystems/index.php/dynamic-ieee-test-systems/ieee-9-bus- modified-test-system. [Accessed 19 January 2020]. [5] Y. Song, D. J. Hill and T. L. Liu, “Small-disturbance angle stability analysis of microgrids: A graph theory viewpoint,” in IEEE Conference on Control Applications (CCA), Sydney, 2015. [6] “IEEE 30-bus modified test system,” KIOS Research and Innovation Centre of Excellence (KIOS CoE), [Online]. Available: https://www.kios.ucy.ac.cy/testsystems/index.php/dynamic-ieee-test-systems/ieee-30-bus- modified-test-system. [Accessed 19 January 2020]. [7] P. K. Hota and A. P. Naik, “Analytical Review of Power Flow Tracing in Deregulated Power System,” American Journal of Electrical and Electronic Engineering, vol. 4, no. 3, pp. 92- 101, 2016. [8] A. R. Al-Roomi, “118 Bus System (IEEE Test Case),” in Power Flow Test Systems Repository, Halifax, Dalhousie University, Electrical and Computer Engineering, 2015. [9] “MATLAB - Simulink,” Tutorial Point, [Online]. Available: https://www.tutorialspoint.com/matlab/matlab_simulink.htm#. [Accessed 19 January 2020]. [10] “Simscape Electrical,” MathWorks, [Online]. Available: https://www.mathworks.com/products/simscape-electrical.html. [Accessed 19 January 2020]. [11] SimPowerSystems User’s Guide, TransÉnergie Technologies Inc., 2004.