Sei sulla pagina 1di 4

CEUNES Centro Universitrio Norte do Esprito Santo So Mateus

Disciplina: Circuitos Eltricos I


TURMA: 331
Data: 18.07.17

Laboratrio 6: Circuitos RL e RC
Questo 1)

1. Grficos:
2. Cdigos:

1 R = 10; % resistncia (ohms)


2 L = 2; % indutncia (H)
3 T = L/R; % constante de tempo (s)
4 Io= 20; % corrente em t=0 (A)
5 Vo = 0; % tenso em t <=0 (V)
6
7 t = -0.1:0.001:1; % tempo
8
9 %CORRENTE
10 for j =1:length(t)
11 if t(j)<=0
12 i(j) = Io; % corrente no circuito em t<0
13 else
14 i(j) = Io*exp(-t(j)/T); % corrente no circuito em t>0
15 end
16 end
17
18 %TENSO
19 for j =1:length(t)
20 if t(j)<=0
21 v(j) = Vo; % tenso no circuito em t<0
22 else
23 v(j) = Io*R*exp(-t(j)/T); % corrente no circuito em t>0
24 end
25 end
26
27 %POTNCIA
28 for j =1:length(t)
29 if t(j)<=0
30 p(j) = v(j)*i(j); % tenso no circuito em t<0
31 else
32 p(j) = v(j)*i(j); % corrente no circuito em t>0
33 end
34 end
35
36 %ENERGIA
37 for j =1:length(t)
38 if t(j)<=0
39 w(j) = (1/2)*L*i(j)^2;
40 else
41 w(j) = (1/2)*L*i(j)^2;
42 end
43 end
44
45 figure(1),subplot(4,1,1),plot(t,i),xlabel('tempo'),ylabel('corrente'),grid on
46 figure(1),subplot(4,1,2),plot(t,v),xlabel('tempo'),ylabel('tenso'),grid on
47 figure(1),subplot(4,1,3),plot(t,p),xlabel('tempo'),ylabel('potencia'),grid on
48 figure(1),subplot(4,1,4),plot(t,w),xlabel('tempo'),ylabel('energia'),grid on
Questo 2)

1. Grficos:
2. Cdigos:

1 R = 250000; % resistncia (ohms)


2 C = 0.000004; % condutncia (H)
3 T = R*C; % constante de tempo (s)
4 Vo= 20; % tenso em t=0 (A)
5 Io = 0;
6
7 t = -1:0.001:6; % tempo
8
9 %TENSO
10 for j =1:length(t)
11 if t(j)<=0
12 v(j) = Vo; % tenso no circuito em t<0
13 else
14 v(j) = Vo*exp(-t(j)/T); % corrente no circuito em t>0
15 end
16 end
17
18 %CORRENTE
19 for j =1:length(t)
20 if t(j)<=0
21 i(j) = Io; % corrente no circuito em t<0
22 else
23 i(j) = (Vo/R)*exp(-t(j)/T); % corrente no circuito em t>0
24 end
25 end
26
27 %POTNCIA
28 for j =1:length(t)
29 if t(j)<=0
30 p(j) = v(j)*i(j); % tenso no circuito em t<0
31 else
32 p(j) = v(j)*i(j); % corrente no circuito em t>0
33 end
34 end
35
36 %ENERGIA
37 for j =1:length(t)
38 if t(j)<=0
39 w(j) = (1/2)*C*v(j)^2;
40 else
41 w(j) = (1/2)*C*v(j)^2;
42 end
43 end
44
45 figure(1),subplot(4,1,1),plot(t,v),xlabel('tempo'),ylabel('tenso'),grid on
46 figure(1),subplot(4,1,2),plot(t,i),xlabel('tempo'),ylabel('corrente'),grid on
47 figure(1),subplot(4,1,3),plot(t,p),xlabel('tempo'),ylabel('potencia'),grid on
48 figure(1),subplot(4,1,4),plot(t,w),xlabel('tempo'),ylabel('energia'),grid on

Potrebbero piacerti anche