0% found this document useful (0 votes)
66 views7 pages

MATLAB Work - Electrical

The document outlines 6 assignments for students to complete involving MATLAB programming and power systems simulations using the IEEE 14-bus test case system. The assignments involve: 1) power flow using fast decoupled method, 2) power flow with Newton-Raphson including reactive power limits, 3) sparse matrix implementations, 4) continuation power flow, 5) state estimation, and 6) optimal power flow. For each assignment, students are instructed to write original MATLAB code, provide comments, and include results and descriptions in a separate report file.

Uploaded by

Zohaib Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views7 pages

MATLAB Work - Electrical

The document outlines 6 assignments for students to complete involving MATLAB programming and power systems simulations using the IEEE 14-bus test case system. The assignments involve: 1) power flow using fast decoupled method, 2) power flow with Newton-Raphson including reactive power limits, 3) sparse matrix implementations, 4) continuation power flow, 5) state estimation, and 6) optimal power flow. For each assignment, students are instructed to write original MATLAB code, provide comments, and include results and descriptions in a separate report file.

Uploaded by

Zohaib Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

******** Please be sure that all the assignments must

be original and not been copied from anywhere


(plagiarism free), each line of codes need a clear comment
also using of building function and MATLAB Tool Box are
not allowed so please make sure not to use them at all.
Which means, it needed to write the codes from the base.
Please write a short report in separate file including the
result of the program and also explaining how the codes
used and its purpose, in order to get the result
**********

All assignments are base on the IEEE 14-bus system

Write 2 different Matlab program (codes) (two different sets) for


each assignment

Attention: Please follow the general guidelines as below

The report itself, should have some general description about the
assignment - for example - what difference did you find in NR and FD
(more iterations but faster, smaller matrix to be inverted etc). Does not
need to be very long. In addition to that please include brief descriptions
of MATLAB functions you have used in the code (the functions you wrote
in MATLAB, not the inbuilt ones). Please do not paste the code itself in the
report, as it has already been submitted in MATLAB files. Include results
like voltage magnitudes, voltage angles, number of iterations, which bus
hits the Q limit (whether upper or lower) number of non-zero elements in
sparse matrix, etc. Include a brief account of any coding problems you
encountered - like code diverging due to wrong loop indices (i, j, k etc)..
It is important that you include a description of the code and write which
part of the code does what.

Assignments

Assignment 1: Power Flow Solution using Fast-Decoupled method IEEE


14 BUS (form B1 and B2 from Y-bus) by following address:

a) To start the Fast Decoupled algorithm, assume a flat start of voltage


magnitudes 1 and angles 0. Calculate the errors in P and Q.
b) Calculate the B’ and B” matrices.
c) Use the matrix LU factorization and forward-backward solution on the
B’ and B” matrices to calculate the new voltage magnitudes and angles
d) Iterate until the errors in P and Q are less than 1MW and 1MVAr
(should take more iterations than the Newton Raphson algorithm).

Requirements are:

1. Voltage magnitude and angles at each bus


2. P and Q injections at each bus
3. P and Q flow at both ends of each branch
4. Display all the result with number of iterations
5. To be able to show B1 and B2

Assignment #2 for IEEE 14 BUS, Power Flow Solution using the Newton-
Raphson algorithm with Q limitation, Implement Q-Limits, Transformer Taps.
a). For the PV buses, check whether the Qi is within the Q limits of the
generator. If not, set Qi equal to the violated limit, change the PV bus to a
PQ bus and continue iterating the solution.

b). Add the transformers with off-nominal turns ratios (not 1:1) to your YBus
matrix.

Requirements are:

1. Voltage magnitude and angles at each bus


2. P and Q injections at each bus
3. P and Q flow at both ends of each branch
4. which bus hits the Q limit (whether upper or lower)
5. Display all the result with number of iterations

Hint:
Assignment #3 for IEEE 14 BUS, write new MATLAB code to handle
sparse matrices (Sparse Power Flow):

1. First, you should store your matrices – Ybus, Jacobian, B’, B” –


as sparse matrices.
2. Rewrite the programs for the Crout algorithm to factorize
matrices and the forward-backward solutions.
3. Replace the old matrix algorithms in your power flow with these
sparse matrix algorithms. The power flow should now run faster
even though it still takes the same number of iterations.

Write new programs to reorder the matrices before factorizing:

1. Write the program using Scheme 0 reordering.


2. Write the program using Tinney 1 reordering.
3. Calculate the number of multiplications/divisions using no
ordering, scheme 0 ordering, and Tinney 1 ordering.
4. Display all the result and number of non-zero elements
5. Show the voltages and angles of each buses, P and Q

Assignment #4 for IEEE 14 BUS, Write a Matlab program (code) for


CPF(Continuation Power Flow).

1. In the IEEE 14 bus system increase all the Pi and Qi uniformly by a


factor lambda
2. Write the CPF program that can handle these increases in lambda
3. Solve the power flow as the loads increase until the power flow no
longer converges
4. Switch the steps from lambda to step increases in the voltage
magnitude at bus 4
5. Plot the voltage magnitude at bus 4 against lambda (the PV curve)
6. Once the voltage passes the point of the nose in the PV curve, the
step can be changed from a voltage step to a lambda step
7. Display all the result and show the voltages and angles of each buses,
P and Q

Hint:
Continuation power flow method is used as theoretical base for carrying out
voltage stability performance analysis. It is used to obtain P-V Curve of
power system. In P-V Curve Continuation power flow starting with initial
operating point and increasing load to the maximum loading point. The
common principle behind the continuation power flow is simple and easy. It
employs a predictor-corrector scheme to find a solution path. It adopts
locally parameterized continuation technique. It includes state variable load
parameter, and step length for load parameter. The continuation power flow
involves a reformulation of the AC power-flow equations to include a power
scaling factor λ.
Assignment #5 : for IEEE 14 BUS, Write a Matlab program (code) to
solve the State Estimator.

1. Use the solved power flow of the IEEE 14-bus system to calculate the
following measurements:
a. Voltage magnitude at each bus
b. P and Q injections at each bus
c. P and Q flow at both ends of each branch
2. Add some noise to each measurement using a random number
generator
3. Write the state estimator solution program
4. Using the above measurements, solve the state estimator
5. Write the program to detect bad data
6. Replace one of the measurements with a bad data (add noise that is
more than 3 times sigma)
7. Check if your bad data detector successfully detects and identifies the
bad data
8. Display all the result and show the voltages and angles of each buses,
P and Q

Assignment #6 : for IEEE 14 BUS, Write a Matlab program (code) to solve


the Optimal Power Flow

1. For the IEEE 14-bus system assume that the cost functions of the
generators at buses 1 and 2 are given by

2. Solve the economic dispatch problem (without considering the power


flow on the lines) with Total P = 259MW
3. From the power flow solution, calculate Total P = P1 + P2, and use this
Total P to solve the economic dispatch problem
4. Solve OPF with the only control variable being P2
5. Solve the OPF again, this time with a line flow constraint on the branch
between buses 1 and 2 of 5MW
6. Compare the different costs of generation for these four cases
7. Display all the result and show the voltages and angles of each buses,
P and Q

******** Please be sure that all the assignment must be


original and not been copied from anywhere, two different
sets of codes are needed for each assignment**********

You might also like