matlab

34

Upload: maycon-gomez-unac

Post on 16-Dec-2015

214 views

Category:

Documents


0 download

DESCRIPTION

Circuitos Electricos 2

TRANSCRIPT

Presentacin de PowerPoint

clcclearR1=1; R2=4;XL1=2j; XL2=6j;XC=-8j;E1=8*exp(j*20*pi/180)E2=10;Z=[(R1+XL1+XC+R2) -(XC+R2); -(XC+R2) (XC+R2+XL2)]V=[(E2+E1); -E2]I=inv(Z)*VVR2=(I(1)-I(2))*R2VXL2=I(2)*XL2%%%%%%%%%%%%%%%%% GRAFICANDOf=60; w=2*pi*f; T=1/f;t=linspace(-T,T,300);%%%% PARA LA RESISTENCIAVR2mx=abs(VR2)thVR2=angle(VR2);VR2t=VR2mx*sin(w*t+thVR2);%%%%PARA LA BOBINAVXL2mx=abs(VXL2)thVXL2=angle(VR2);VXL2t=VXL2mx*sin(w*t+thVXL2);% para graficar fuentesE1t=8*sin(w*t+20*pi/180);E2t=10*sin(w*t);%% para graficar corriente I1I1m=abs(I(1));angI1=angle(I(1));I1t=I1m*sin(w*t+angI1);% para graficar corriente I2I2m=abs(I(2));angI2=angle(I(2));I2t=I2m*sin(w*t+angI2);% comandos para graficar% E1 & E2subplot(2,2,1)plot(t,E1t,'r-',t,E2t,'g--')gridaxis([-T T -12 12])legend('E1(t)','E2(t)')title('Voltajes')xlabel('t(s)')ylabel('volt')%%%%% graficando Vr2subplot(2,2,2)plot(t,VR2t,'r-')gridaxis([-T T -10 10])legend('Vr2(t)')title('Voltaje en R2')xlabel('t(s)')ylabel('volt')% graficando corrientessubplot(2,2,3:4)plot(t,I1t,'m-',t,I2t,'k:')gridaxis([-T T -1.5 1.5])legend('i1(t)','i2(t)')title('corrientes')xlabel('t(s)')ylabel('A')