Calculation of The Bus Admittance Matrix of A Multi-Bus Electrical Power System Using MATLAB

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Assignment No.

08EL03

Calculation of the Bus Admittance Matrix of a Multi-Bus Electrical Power System Using MATLAB
Introduction:
This assignment compromises of a program that in MATLAB coding to return the values of Bus Admittance Matrix of a multi-bus electrical network. The main advantages of bus admittance matrix are that it helps in data preparation. Its formation and modification is easy. For a large power system, more than 90 per cent of its off-diagonal elements are zero. Hence, the computer memory requirements are less. Mathematically,

Program Execution Demonstration:


This program works as user defined function that should be present in MATLAB current directory for the execution. Input Values: The impedance Matrix along with the branch number is first defined on the command window and then the function is called to get the results. Output Values: Once the input values are given, the function returns the bus admittance matrix with the order of n x n. Where n is the number of bus in the system.

MATLAB Code:
function imped_matrix(Z_delta) [m,n]=size(Z_delta); if m~=0 numArray1=Z_delta(:,1); numArray2=Z_delta(:,2); ResisArray=Z_delta(:,3); ReactArray=Z_delta(:,4); numBranchArray=length(numArray1); numbusArray=max(max(numArray1),max(numArray2)); ImpedArray=ResisArray+j*ReactArray ImpedOnes=ones(numBranchArray,1)./ImpedArray BusImpedMatrix=zeros(numbusArray,numbusArray) for k=1:numBranchArray if numArray1(k)>0 & numArray2(k)>0

Assignment No. 2

08EL03

BusImpedMatrix(numArray1(k),numArray2(k))=BusImpedMatrix(numArray1(k),numArra y2(k))-ImpedOnes(k); BusImpedMatrix(numArray2(k),numArray1(k))=BusImpedMatrix(numArray1(k),numArra y2(k)); end end for n=1:numbusArray for k=1:numBranchArray if numArray1(k)==n | numArray2(k)==n; BusImpedMatrix(n,n)=BusImpedMatrix(n,n)+ImpedOnes(k) else,end end end end

Execution:
Running Program for the System shown below:

Input on Command Window:


>> AN_imped = [1 2 0.06 0.18; 1 3 0.03 0.09; 2 3 0.08 0.24]; >> imped_matrix(AN_imped)

Output Returned by the Function:


BusImpedMatrix = 5.0000 -15.0000i -1.6667 + 5.0000i -3.3333 +10.0000i -1.6667 + 5.0000i 2.9167 - 8.7500i -1.2500 + 3.7500i -3.3333 +10.0000i -1.2500 + 3.7500i 4.5833 -13.7500i

Assignment No. 2

08EL03

Flow Chart

You might also like