Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
52
Добавлен:
12.02.2014
Размер:
152.49 Кб
Скачать

Ministry of science and education, youth and sport of Ukraine

Zaporozhie National Technical University

Department EEA

Report

Laboratory work#5

Done L.A.Askerova

Checked T.M.Kornus

Zaporozhie

2012

5 lABORATORY WORK

  1. TOPIC: Calculation of transients in linear electric circuits by numerical method.

  1. PURPOSE OF THE WORK: Practice of applying of method of state variable, numerical methods of integration of the differential equations and discrete current models of inductive and capacitor elements in backward Euler method for calculations of transients.

  1. The Proceeding of work

Figure 1.1 – Variant 1, electrical scheme

Figure 1.2 – Reduced scheme

    1. Block-Diagram of executing program

3.2 Program

R1=20;

R2=10;

R3=30;

L3=0.002;

C2=3e-04;

f=50;

ph1=60;

omeg=2*pi*f;

t(1)=0;

N=input('Number of iterations=');

tk=input('enter the last moment of simulation=');

h=tk/N;

E1=220*exp(ph1*(pi/180)*i);

%impedance of pre-commutation contour

XLb=omeg*L3;

Zb=R1+R3+i*XLb;

%initial conditions

I3L=E1/(Zb);

Uc(1)=0;

I3LM=abs(I3L);

phI3L=(angle(I3L)/pi*180);

I3(1)=current(I3LM,f,phI3L,t(1));

I2(1)=0;I1(1)=I3(1);

%definition of conductances

G11=(1/R2)+(1/R3)+(1/R1);

G33=(1/R3)+(h/L3);

G22=(1/R2)+(C2/h);

G13=1/R3;

G31=G13;

G12=1/R2;

G21=G12;

G32=0;

G23=G32;

G=[G11 -G12 -G13;

-G21 G22 -G21;

-G31 -G32 G33];

t1=input('time moment of error is among above mentioned=');

for k=2:N

t(k)=t(k-1)+h;

Emf(k)=voltas(220,f,ph1,t(k));

I11=Emf(k)/R1;

I22=Uc(k-1)*(C2/h);

I33=-I3(k-1);

I=[I11;I22;I33];

Pot=G\I;

I1(k)=(Emf(k)-Pot(1))/R1;

I2(k)=(Pot(1)-Pot(2))/R2;

I3(k)=(Pot(1)-Pot(3))/R3;

Uc(k)=Pot(2);

if t(k)-t1<=h

eps1=I1(k)-I2(k)-I3(k);

eps21=Emf(k)-(I1(k)*R1+I2(k)*R2+Uc(k));

end

end

subplot(2,1,1), plot(t,I1,'.-',t,I2,'--',t,I3);

grid on; title ('Currents in the branches of the scheme')

xlabel('time');

ylabel('Current');

legend('I1','I2','I3',-1);

subplot(2,1,2), plot(t,Uc);

grid on;title ('Condencer voltage')

xlabel('time');

ylabel('Voltage');

legend('Uc',-1);

disp(['error eps1=', num2str(eps1)]);

disp(['error eps2=', num2str(eps21)]);

3.2.1 Listing of the rogramm

>> lw_5

Number of iterations=500

enter the last moment of simulation=0.005

time moment of error is among above mentioned=0.00342

error eps1=-8.8818e-016

error eps2=0

    1. The plot of executing program

Figure 1.3. – Graphs of currents and capacity voltage

Conclusion: The program to execute the transient process was made, it operates well as the errors are so tiny that they indicate the appropriate way of calculations. The plot of transient currents and capacity voltage was built.

Соседние файлы в папке мэмс