% IMPLEMENTATION OF GAUSS SEIDEL METHOD IN MATLAB
% DESIGNED BY:
% HAFIZ KASHIF KHALEEL B-12588
% CREATED: 19-Dec-2009
% SEMESTER # 7, EE(POWER)
% SUBJECT: POWER SYSTEM OPERATION AND CONTROL
% University of South Asia. Lahore. PAKISTAN
format short g
disp (' TABLE 9.2 PAGE # 337 LINE DATA FOR EXAMPLE 9.2 ')
linedata=[1 2 0.01008, 0.05040, 3.815629, -19.078144, 10.25, 0.05125;
1 3 0.00744, 0.03720, 5.169561, -25.847809, 7.75, 0.03875;
2 4 0.00744, 0.03720, 5.169561, -25.847809, 7.75, 0.03875;
3 4 0.01272, 0.06360, 3.023705, -15.118528, 12.75, 0.06375]
disp (' TABLE 9.3 PAGE # 338 BUS DATA FOR EXAMPLE 9.2 ')
busdata=[1 0, 0, 50, 30.99, 1.00, 0 1;
2 0, 0, 170, 105.35, 1.00, 0 2;
3 0, 0, 200, 123.94, 1.00, 0 2;
4 318, 0 , 80, 49.58, 1.02, 0 3]
% Bus Type: 1.Slack Bus 2.PQ Bus 3.PV Bus
ss=i*linedata(:,8);
y=linedata(:,5)+i*linedata(:,6);
totalbuses = max(max(linedata(:,1)),max(linedata(:,2))); % total buses
totalbranches = length(linedata(:,1)); % no. of branches
ybus = zeros(totalbuses,totalbuses);
for b=1:totalbranches
ybus((linedata(b,1)),(linedata(b,2)))=-y(b);
ybus((linedata(b,2)),(linedata(b,1))) =ybus((linedata(b,1)),(linedata(b,2)));
end
for c=1:totalbuses
for d=1:totalbranches
if linedata(d,1) == c || linedata(d,2) == c
ybus(c,c) = ybus(c,c) + y(d) + ss(d);
end
end
end
disp('TABLE 9.3 PAGE # 338 BUS ADMITTANCE MATRIX FOR EXAMPLE 9.2')
ybus
z=zeros(totalbuses,4);
busnumber=busdata(:,1);
PG=busdata(:,2);
QG=busdata(:,3);
PL=busdata(:,4);
QL=busdata(:,5);
V=busdata(:,6);
VV=V;
ANG=busdata(:,7);
type = busdata(:,8);
P = (PG-PL)./100; % per unit active power at buses
Q = (QG-QL)./100; % per unit reactive power at buses
tol=1;
iter=0;
kk=input('Enter the tolerance for iteration ');
%alfa=input('Enter the value of ALPHA ');
alfa=1.6
while tol > kk
for i = 2:totalbuses
YV = 0;
for k = 1:totalbuses
if i~=k
YV = YV + ybus(i,k)* V(k); % multiplying admittance & voltage
end
YV;
end
if busdata(i,8) == 3 %Calculating Qi for PV bus
%Q(i) = -imag(conj(V(i))*(YV + ybus(i,i)*V(i)));
Q(i) = -imag(conj(V(i))*(YV + ybus(i,i)*V(i)));
busdata(i,3)=Q(i);
end
% end
V(i) = (1/ybus(i,i))*((P(i)-j*Q(i))/conj(V(i)) - YV); % Compute Bus Voltages.
% Calculating Corrected Voltage for PV bus
if busdata(i,8) == 3
vc(i)=abs(VV(i))*(V(i)/abs(V(i)));
busdata(i,6)=vc(i);
V(i)=vc(i);
end
% Calculating Accelerated Voltage for PQ bus
if busdata(i,8) == 2
VACC(i)= VV(i)+alfa*(V(i)-VV(i));
busdata(i,6)=VACC(i);
V(i)=VACC(i);
end
%V(i)=V;
end
iter = iter + 1; % Increment iteration count.
tol = max(abs(abs(V) - abs(VV))); % Calculate tolerance.
VV = V;
end
Q;
iter
YV;
V;
%real(VACC')
z(1:totalbuses,1)=busdata(:,1);
z(1:totalbuses,2)=busdata(:,8);
z(1:totalbuses,3)=abs(busdata(:,6));
z(1:totalbuses,4)=radtodeg(angle(V));
disp(' Bus No. Bus Type Voltage Angle ');
z
没有合适的资源?快使用搜索试试~ 我知道了~
高斯赛德尔潮流计算在 matlab 环境中执行的情况
共1个文件
m:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 19 浏览量
2023-03-29
10:29:44
上传
评论
收藏 2KB ZIP 举报
温馨提示
高斯赛德尔潮流计算在 matlab 环境中执行的情况。这是解决方案的一般程序。只需输入数据在表中,例如 (linedata & busdata)。并得到导纳矩阵和解决方案.zip
资源推荐
资源详情
资源评论
收起资源包目录
高斯赛德尔潮流计算在 matlab 环境中执行的情况。这是解决方案的一般程序。只需输入数据在表中,例如 (linedata & busdata)。并得到导纳矩阵和解决方案.zip (1个子文件)
az.m 4KB
A
共 1 条
- 1
资源评论
- 2401_835506692024-05-10感谢大佬分享的资源给了我灵感,果断支持!感谢分享~
GZM888888
- 粉丝: 176
- 资源: 2945
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功