matlab code
Objective: Overall goal is to develop a power flow/ short circuit analysis tool Goal of assignment is to develop code to calculate the power flow admittance matrix given topology and bus data Data format Data should be entered into a text, csv, mat or xml file. Data is organized in rows for lines branches) and buses nodes. The first row gives number of buses and lines and transformers. es. NB NL NT 000000 For each line the row provides Type (=1 for line, 2 for transformer). Frombus number), Tobus number), Rpu, Xpu, pu and Capacity pu, and tappu (1 if this is a line, puratiotap) if a transformer) Type From TOR X B C tapo For each bus the row provides Type 3 for bus), Busbus number). Class 1 slack-2 PV-3 PQ) Generated Real Power(PG), Generated Reactive PowerQGI, Load Real PowerP), Load Reactive Power(Q), all in PU, and bus kV Type Bus Class PG QG P Q kV X Entries shown as zero are not used (we just enter)-it is just the simplest format to load into matlab or to set up objects. You will need the data listed, but are not restricted to the above format. Assignment Write the code to read text file, compute the admittance matrix and display in rectangular form. Please implement key steps as functions/methods. For example: Function build (Y) Input: data for line n Output: updated Y Method: Y is initialized to zero If linen connects busi to bus the entries of Y change as follows Yi-YileBn/2-1/Rn+jxn) Vij=YjBn/2+1/R+ Yij=Yij-1/R20 Y-Y-1/1R+x) These four formulas can themselves be in a function with buildly looping over lines. Then for other types of branches you only add to that function Again, depending upon how you like to code and the problem at hand there can will be more efficient ways to do things. What I would like is a code that is bunch of understandable and reusable modules rather than a long code with everything inline. Objective: Overall goal is to develop a power flow/ short circuit analysis tool Goal of assignment is to develop code to calculate the power flow admittance matrix given topology and bus data Data format Data should be entered into a text, csv, mat or xml file. Data is organized in rows for lines branches) and buses nodes. The first row gives number of buses and lines and transformers. es. NB NL NT 000000 For each line the row provides Type (=1 for line, 2 for transformer). Frombus number), Tobus number), Rpu, Xpu, pu and Capacity pu, and tappu (1 if this is a line, puratiotap) if a transformer) Type From TOR X B C tapo For each bus the row provides Type 3 for bus), Busbus number). Class 1 slack-2 PV-3 PQ) Generated Real Power(PG), Generated Reactive PowerQGI, Load Real PowerP), Load Reactive Power(Q), all in PU, and bus kV Type Bus Class PG QG P Q kV X Entries shown as zero are not used (we just enter)-it is just the simplest format to load into matlab or to set up objects. You will need the data listed, but are not restricted to the above format. Assignment Write the code to read text file, compute the admittance matrix and display in rectangular form. Please implement key steps as functions/methods. For example: Function build (Y) Input: data for line n Output: updated Y Method: Y is initialized to zero If linen connects busi to bus the entries of Y change as follows Yi-YileBn/2-1/Rn+jxn) Vij=YjBn/2+1/R+ Yij=Yij-1/R20 Y-Y-1/1R+x) These four formulas can themselves be in a function with buildly looping over lines. Then for other types of branches you only add to that function Again, depending upon how you like to code and the problem at hand there can will be more efficient ways to do things. What I would like is a code that is bunch of understandable and reusable modules rather than a long code with everything inline