Uploaded by David Calo

Codigo de matlab Prueba1 2B

advertisement
Codigo de matlab
clear all; clc; close all;
format compact
YB=[3.3003 - 31.2033j, -1.6502 + 16.5017j,- 1.6502 + 16.5017j;
- 1.6502 + 16.5017j,8.2508 - 80.8083j,-6.6007 + 66.0066j;
- 1.6502 + 16.5017j,-6.6007 + 66.0066j,8.2508 - 80.8083j]
G=real(YB)
B=imag(YB)
V=[1,1,0.903];
Ang=[0,-6.4,-12.3];
Ang_r=deg2rad(Ang);
DQ_V=zeros(size(YB));
for n=1:3
for m=1:3
DQ(n,m)=V(n)*V(m)*(G(n,m)*sin(Ang_r(n)-Ang_r(m))B(n,m)*cos(Ang_r(n)-Ang_r(m)));
DQ_V(n,n)=DQ_V(n,n)+DQ(n,m);
end
DQ_V(n,n)=[DQ_V(n,n)-B(n,n)*V(n)^2]/V(n);
end
%%
% FUERA DE LA DIAGONAL
for n=1:3
for m=1:3
if n ~= m
DQ_V(n,m)=V(n)*(G(n,m)*sin(Ang_r(n)-Ang_r(m))B(n,m)*cos(Ang_r(n)-Ang_r(m)));
%
DQ_V(n,m)
end
end
% DQ_V(n,m)=DQ_V(n)
end
J=DQ_V
%%
Jgg=J(1:2,1:2)
Jgc=J(1:2,end)
Jcg=J(end,1:2)
Jcc=J(end,end)
% DV1 DV3 se cambian segun el caso
DV1=0.0108;
DV2=0.0435;
DV=[DV1; DV2]
DV3=0.047;
DQg=Jgg*DV+Jgc*DV3
Resultados:
Caso 1
Caso 2
Caso 3
Download