Professional Documents
Culture Documents
Lab 2 Ybus Matrix
Lab 2 Ybus Matrix
Objective:
To learn writing code for Y-Bus matrix for multi-bus system in MATLAB
Resources:
Pc installed with latest version of MATLAB.
Example:
Matlab Code:
fori = 1:4
16
for j = 1:4
if(i==j)
for k = 1:3
if(left_node(k)==i)||(right_node(k)==j)
Y_bus(i,j) = Y_bus(i,j) + admittance(k)
End
End
End
End
End
Task 1:
Students are required to write the code for the non-diagonal entries of the admittance matrix.
Solution to task 1:
Else
For i=1:4;
For j=1:4;
If I !=j
Y_bus(i,j) = Y_bus(i,j) + admittance(k)
End
End
End
End
Learning Outcomes:
Questions:
17
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
18