araba

Embed Size (px)

DESCRIPTION

codigo matlab

Citation preview

clear allclc%Fonte no dominio complexofonte_1=60/sqrt(2)*exp(j*(degtorad(-10)));fonte_2=40/sqrt(2)*exp(j*(degtorad(0)));R1=100+0*j;R2=70+0*j;L1=2*w*j;L2=3*w*j;L3=3*w*j;L4=4*w*j;M23=1*w*j;M24=1.5*w*j;M34=2*w*j;w=(12*pi)*0.5+12*pi;c=270/1000000;C1=-j/(c*w);A=[(100+(10*w-1/(c*w))*j) (-100-(1.5*w)*j) (-8.5*w+1/(w*c))*j;...(-100-(1.5*w)*j) (170+6*w*j) (-2.5*w*j);...(-8.5*w+1/(w*c))*j (-2.5*w*j) (11*w-1/(w*c))*j];B=[fonte_1; 0 ; -fonte_2];x=A\B;I1=x(1,1);I2=x(2,1);I3=x(3,1);%correntesabs(x(1,1))radtodeg(phase(x(1,1)))abs(x(2,1))radtodeg(phase(x(2,1)))abs(x(3,1))radtodeg(phase(x(3,1)))%Tenses individuaisVR2=R2*I2;VR1=R1*(I1-I2);VL1=L1*I2;VL2=(L2*(I1-I2))+(M24*(I1-I3))-(M23*(I3-I2));VL3=(L3*(I2-I3))-(M23*(I2-I1))-(M34*(I3-I1));VL4=(L4*(I1-I3))+(M24*(I1-I2))-(M34*(I3-I2));VC1=C1*(I1-I3);%Potncias individuais dos elementospot_R2=VR2*conj(I2);pot_R1=VR1*conj(I1-I2);pot_L1=VL1*conj(I2);pot_L2=VL2*conj(I1-I2);pot_L3=VL3*conj(I2-I3);pot_L4=VL4*conj(I1-I3);pot_C1=VC1*conj(I1-I3);%Tenses e correntes das fontes E1 e E2parte_real_tensao_E1=real(fonte_1)parte_imaginaria_tensao_E1=imag(fonte_1)parte_real_corrente_E1=real(I1)parte_imaginaria_corrente_E1=imag(I1)parte_real_tensao_E2=real(fonte_2)parte_imaginaria_tensao_E2=imag(fonte_2)parte_real_corrente_E2=real(-I3)parte_imaginaria_corrente_E2=imag(-I3)%Potencias real e imaginarias dos indutores L1=2H e L4=4Hpot_real_L1=real(pot_L1)pot_imaginaria_L1=imag(pot_L1)pot_real_L4=real(pot_L4)pot_imaginaria_L4=imag(pot_L4)