NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

clc
clear
format long
i=sqrt(-1);
Z13=0.05*i; % line impedance BUS1-BUS3
Z12=0.025*i; % line impedance BUS1-BUS2
Z23=0.05*i; % line impedance BUS2-BUS3
Y13=(1/Z13);
Y12=(1/Z12);
Y23=(1/Z23);
Sbaz=100; % Base power
S3=5+4*i; % Bus3 apparent power
P2=4.26;
V1=(1.000+0*i); % v1(0)
V3(1)=1.000+0*i; % v3(0)
V2(1)=1.05+0*i; % v2(0)
for n=1:100 % iteration code
V3(n+1)=((Y13*V1)+(Y23*V2(n))-(conj(S3)/conj(V3(n))))/(Y13+Y23);
Q2(n+1)=(-1)*(imag((conj(V2(n)))*((V2(n)*(Y23+Y12))-(Y23*V3(n+1))-(Y12*V1))));
S2(n+1)=(P2)+(Q2(n+1))*i ;
VC2(n+1)=((conj(S2(n+1))/conj(V2(n)))+(Y23*V3(n+1))+(Y12*V1))/(Y23+Y12);
f(n+1)=imag(VC2(n+1));
e(n+1)=sqrt(((V2(1))^2)-((f(n+1))^2));
V2(n+1)=e(n+1)+f(n+1)*i ;
a=abs(V3(n+1)-V3(n));
b=abs(V2(n+1)-V2(n));
c=abs(Q2(n+1)-Q2(n));
if a<=0.00005 && b<=0.00005 && c<=0.00005
disp('V3 value'); disp(V3(n+1));
disp('V2 value'); disp(V2(n+1));
disp('Q2 value'); disp(Q2(n+1));
disp(' number of iteration '); disp(n+1);
cS1=(conj(V1))*((Y13*(V1-V3(n+1)))+(Y12*(V1-V2(n+1))));
S1=conj(cS1);
I13=Y13*(V1-V3(n+1));
I12=Y12*(V1-V2(n+1));
I23=Y23*(V2(n+1)-V3(n+1));
I1=I12+I13;
I2=I12-I23;
I3=I23+I13;
S13loss=(norm((I13))^2)*(Z13);
S12loss=(norm((I12))^2)*(Z12);
S23loss=(norm((I23))^2)*(Z23);
S12outcome=V1*conj(I12);
S13outcome=V1*conj(I13);
S23outcome=V2(n+1)*conj(I23);
S12income=S12outcome-S12loss;
S13income=S13outcome-S13loss;
S23income=S23outcome-S23loss;
break
else
continue
end
end
% zero-first-second-third-last-iteration-voltage values table
iterations= {'Zero iteration';'First iteration';'Second iteration';'Third iteration';'Last iteration'}; % code to create table
Voltage1= [V1;V1;V1;V1;V1];
Voltage2= [V2(1);V2(2);V2(3);V2(4);V2(n+1)];
Voltage3= [V3(1);V3(2);V3(3);V3(4);V3(n+1)];
Table=table(iterations,Voltage1,Voltage2,Voltage3);
% last iteration voltage and current values
Values= {'V1';'V2';'V3';'I1';'I2';'I3'};
Complex_pu= [V1;V2(n+1);V3(n+1);I1;I2;I3];
Module_pu= abs(Complex_pu);
Phase_Angle= (angle(Complex_pu)/pi*180);
Last_iteration1=table(Values,Complex_pu,Module_pu,Phase_Angle);
% last iteration power values
Last_iteration_Values= {'S1';'S2';'S3';'losses between 12';'losses between 13';'losses between 23';'from 1 to 2 powersys';'from 1 to 3 powersys';'from 2 to 3 powersys ';'from 2 to 1 powersys';'from 3 to 1 powersys';'from 3 to 2 powersys '};
Complex_pu= [S1;S2(n+1);S3;S12loss;S13loss;S23loss;S12outcome;S13outcome;S23outcome;S12income;S13income;S23income];
Module_pu= abs(Complex_pu) ;
Complex_true= Complex_pu*Sbaz ;
Module_true= Module_pu*Sbaz;
Phase_Angle= (angle(Complex_pu)/pi*180);
Last_iteration2=table(Last_iteration_Values,Complex_pu,Module_pu,Complex_true,Module_true,Phase_Angle);
disp(Table)
disp(Last_iteration1)
disp(Last_iteration2)
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.