Taller 3: All Long
Taller 3: All Long
%%%%%Carga 2%%%%
z2=5+8i;
z3=6+7i;
z4=8+5i;
% carga 5
a1=5+8i;
b1=9+4i;
c1=8+7i;
% carga 6
a=5+8i
b=9+4i
c=8+7i
% trnaformacion d-y
R1=(b*c)/(a+b+c)
R2=(a*c)/(a+b+c)
R3=(a*b)/(a+b+c)
vL=440/3;
m = menu('COMPESADOR DE FACTOR DE PORTENCIA'...
,'1. FASE - FASE ','2. FASE - NEUTRO');
switch m
case 2
x=input('Ingrese el nuevo FP:');
% Linea 1-N
%carga 1
zeq1= 1/(1/z1+1/a1+1/R3)
i1=vL/zeq1;
fp1=0.8
P1=vL.*i1*cosd(fp1);
S1=vL*i1;
Q1=vL.*i1.*sind(fp1);
Q11=P1*tand(x)
C1=Q11./2*pi*60*vL^2
%Linea 2-N
zeq2= 1/(1/z3+1/b1+1/R1)
i2=vL/zeq2;
fp1=0.8
P2=vL*i2*cosd(fp1);
S2=vL*i2;
Q2=vL*i2*sind(fp1);
Q2=P2*tand(x)
C2=Q2/2*pi*60*vL^2
%Linea 3-N
zeq3= 1/(1/c1+1/R2)
i3=vL/zeq3;
fp1=0.8
P3=vL*i3*cosd(fp1);
S3=vL*i3;
Q3=vL*i3*sind(fp1);
Q3=P3*tand(x)
C3=Q3/2*pi*60*vL^2
%1111111111111
figure;
subplot(3,1,1)
title('Compesador FP')
ylabel('Potencia Reactiva')
xlabel('Potencia Real');
%22222222222222222
subplot(3,1,2)
%3333333333333
subplot(3,1,3)
title('Compesador FP')
ylabel('Potencia Reactiva')
xlabel('Potencia Real');
zeq73= 1/(1/z4+1/(a1+b1)+1/(R3+R1))
i73=vL/zeq73;
fp1=0.8
P73=vL*i73*cosd(fp1);
S73=vL*i73;
Q73=vL*i73*sind(fp1);
Q73=P73*tand(x)
C73=Q73/2*pi*60*vL^2
%%%2-3
zeq63= 1/z3+1/(b1+c1)+1/(R2+R1)
i63=vL/zeq63;
fp1=0.8
P63=vL*i63*cosd(fp1);
S63=vL*i63;
Q63=vL*i63*sind(fp1);
Q63=P63*tand(x)
C63=Q63/2*pi*60*vL^2
subplot(2,1,1)
subplot(2,1,2)
vectarrow([0 0],[P63 0])
hold on
vectarrow([P63 0],[P63 Q63])
hold on
vectarrow([0 0],[P63 Q63])
title('Compesador FP')
ylabel('Potencia Reactiva')
xlabel('Potencia Real');
subplot(2,1,1)
end
unión
%VECTORES
S=[10 30 45 50 20 45 42 36 48 10 47 15 10 23 33 36 38 50 10 25 29 24 26
47];
fp=[0.6 0.62 0.74 0.78 0.65 0.62 0.59 0.80 0.69 0.6 0.81 0.83 0.6 0.69
0.59 0.59 0.81 0.78 0.6 0.67 0.80 0.79 0.73 0.83];
Ic_1
Volt_1
% m = menu('Graficas'...
% ,'1. Triangulo de Potencia ','2.Corriente');
% switch m ;
% case 1
% x=input('Ingrese el nuevo FP:');
% P=Volt_1.*Ic_1*cosd(fp);
% S1=Volt_1*Ic_1;
% Q1=Volt_1.*Ic_1*sind(fp);
% Q11=Volt_1*Ic_1*sind(x);
% C1=Q11./2*pi*60*Volt_1^2;
% figure;
% %VARIACION DE GRAFICA TRIANGULO DE POTENCIA
% for i=1:length(fp)
% title('Corriente')
% P0 = [0,0];
% P1 = [P(i),0];
% P2 = [P(i),Q1(i)];
% P3=[P(i), Q11];
%
% vectarrow(P0,P1);
% xlim([0 8000])
% ylim([0 100])
% ylabel('Potencia Reactiva')
% xlabel('Potencia Real');
% str = {'P [kW]'};
% text(P(i)/2,0.5,str)
% hold on
%
% vectarrow(P1,P2);
% str = {'Q [kVAr]'};
% text(P(i)+0.5,fp(i)/2,str)
% hold on
%
% vectarrow(P0,P2);
% str = {'S [kVA]'};
% text(P(i)+0.5,fp(i)/2,str)
% hold on
%
% vectarrow(P0,P3);
% str = {'Q [kVAr]'};
% text(P(i)+0.7,fp(i)/2,str)
% pause(2)
% end
%
% case 2
I(i)=S(i)./Volt_1.*fp(i);
title('Corriente')
xlim([0 24]);
ylim([0 50]);
plot(I)
stairs(I);
drawnow;
pause(0.8)
end
% Grafica_Ic1=double([(0: length (I)-1)',I']);
% end
Ejemplo
clc
clear all
P11 = [10 30 45 50 20 45 42 36 48 10 47 15 10 23 33 36 38 50 10 25 29 24
26 47];
P22 = [0.6 0.62 0.74 0.78 0.65 0.62 0.59 0.80 0.69 0.6 0.81 0.83 0.6 0.69
0.59 0.59 0.81 0.78 0.6 0.67 0.80 0.79 0.73 0.83];
figure;
for i=1:length(P22)
P0 = [0,0];
P1 = [P11(i),0];
P2 = [P11(i),P22(i)];
vectarrow(P0,P1);
str = {'P [kW]'};
text(P11(i)/2,0.5,str)
xlim([0 12])
ylim([0 12])
hold on
vectarrow(P1,P2);
str = {'Q [kVAr]'};
text(P11(i)+0.5,P22(i)/2,str)
hold on
vectarrow(P0,P2);
str = {'S [kVA]'};
text(P11(i)/2,P22(i)/2,str)
pause(2);
end
ejemplo
clc
clear all
P11 = [10 30 45 50 20 45 42 36 48 10 47 15 10 23 33 36 38 50 10 25 29 24
26 47];
P22 = [0.6 0.62 0.74 0.78 0.65 0.62 0.59 0.80 0.69 0.6 0.81 0.83 0.6 0.69
0.59 0.59 0.81 0.78 0.6 0.67 0.80 0.79 0.73 0.83];
figure;
for i=1:length(P22)
P0 = [0,0];
P1 = [P11(i),0];
P2 = [P11(i),P22(i)];
vectarrow(P0,P1);
str = {'P [kW]'};
text(P11(i)/2,0.5,str)
xlim([0 12])
ylim([0 12])
hold on
vectarrow(P1,P2);
str = {'Q [kVAr]'};
text(P11(i)+0.5,P22(i)/2,str)
hold on
vectarrow(P0,P2);
str = {'S [kVA]'};
text(P11(i)/2,P22(i)/2,str)
pause(2);
end
Cd domingo
Vlp=500;
i1=100;
S=[10 30 45 50 20 45 42 36 48 10 47 15 10 23 33 36 38 50 10 25 29 24 26
47].*1000;
fp=[0.6 0.62 0.74 0.78 0.65 0.62 0.59 0.80 0.69 0.6 0.81 0.83 0.6 0.69
0.59 0.59 0.81 0.78 0.6 0.67 0.80 0.79 0.73 0.83];
for (i=1:24)
I(i)=S(i)./Vlp.*fp(i);
title('Corriente')
xlim([0 24]);
ylim([0 50]);
stairs(I);
drawnow;
pause(0.8)
end
pio=double([(0: length (I)-1)',I']);
% fp1=0.8
%
% P1=Vlp.*i1*cosd(fp1);
% S1=Vlp*i1;
% Q1=Vlp.*i1.*sind(fp1);
% Q11=P1*tand(30);
% C1=Q11./2*pi*60*Vlp^2
% figure(2);
% subplot(1,1,1)
% vectarrow([0 0],[P1 0])
% hold on
% vectarrow([P1 0],[P1 Q1])
% hold on
% vectarrow([0 0],[P1 Q1])
% hold on
% vectarrow([0 0],[P1 Q11])
%
% title('Compesador FP')
% ylabel('Potencia Reactiva')
% xlabel('Potencia Real');
Prueba
function varargout = prueba(varargin)
% PRUEBA MATLAB code for prueba.fig
% PRUEBA, by itself, creates a new PRUEBA or raises the existing
% singleton*.
%
% H = PRUEBA returns the handle to a new PRUEBA or the handle to
% the existing singleton*.
%
% PRUEBA('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in PRUEBA.M with the given input
arguments.
%
% PRUEBA('Property','Value',...) creates a new PRUEBA or raises the
% existing singleton*. Starting from the left, property value pairs
are
% applied to the GUI before prueba_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property
application
% stop. All inputs are passed to prueba_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only
one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = prueba_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)