Вы находитесь на странице: 1из 9

%-- 29/03/14 08:15 --%

diary('aula_2903')
r=1.5;
c=1;
g=tf([1.5],[1])
step(g)
ramp(g)
g=tf([1.5],[1.5*1 1])
step(g)
hold on
g=tf([1.5],[1.5*3 1])
step(g)
hold on
g=tf([1],[1.5*3 1])
step(g)
hold on
g=tf([2],[1.5*3 1])
step(g)
hold on
clc
R1=4;
clc
R1=4;R2=4;C2=2;C1=2;
g1=tf([1,[R1*C1 1])
g1=tf(1,[R1*C1 1])
g2=tf(R2,[R2*C2 1])
ge=series(g1*g2)
ge=series(g1,g2)
step(50*ge)
gt=parallel(g1,g1)
ge2=series(gp,g2)
ge2=series(gt,g2)
step(ge2)
hold on
estep(gt)
step(gt)
hold on
step(gt*50)
step(ge*50)
diary'aula2903_1'
diary('aula2903_1')
step(gt*50)
clc
g1=tf(1,[R1*C1 1])
g2=tf(R2,[R2*C2 1])
ge=series(g1,g2)
pole(g1,g2)
pole(g1)
pole(g2)
pzmap(g1,g2)
pole(ge)
pzmap(ge)
rlocus(ge)
%-- 31/03/14 13:27
cargelinstaller
%-- 31/03/14 13:42
%-- 05/04/14 08:09
%-- 05/04/14 08:56
R=3.21;

--%
--%
--%
--%

L=2.847*10^-3;
Ke=9.16*10^-2
Kt=9.16*10^-2;
B=1.41*10^-4;
L=2.847e-3;
Ke=9.16e-2;
Kt=9.16e-2;
B=1.41e-4;
F=1.81e-2;
J=6e-4;
Va=10
g1=tf([Kt],[L*J(J*R+L*B)(R*B+Kt*Ke)])
g1=tf([Kt],[L*J(J*R+(L*B))((R*B)+(Kt*Ke))])
g1=tf([Kt],[L*J+(J*L)],[R*B+(Kt*Ke)])
g2=tf([L+R],[L*J+(J*L)],[R*B+Ke*Kt])
B=1.41e-4;
clc
dir
load temp20.txt
size(temp20)
plote(temp20)
plot(temp20)
diary('aula0504.txt')
hold on
%projeto do filtro passa baixas
%taxa amostral
ta=100;
%freq de corte
wc=2;
%ordem do filtro
n=2
help butter
%freq de corte normalizada
wn=wc/(ta/2)
%projeto do filtro
[b,a]=butter(n,wn);
yf=filter(b,a,temp20);
hold on
plot(yf,'r')
plot(yf,'r',LineWidth,2)
plot(yf,'r','LineWidth',2)
yf2=yf-28.3);
yf2=yf-28.3;
plot(yf2)
yf3=yf2(1101;45000,1);
yf3=yf2(1101:45000,1);
plot(yf3,'r')
grid on
hold off
plot(yf3,'r')
grid on
k=34.2;
l=0.08;
l=0.08e4;
t=(1.19-0.08e4);
t=(1.19e4-0.08e4;
t=1.19e4-0.08e4;
g1=tf(k,[t 1])
g2=tf(1,[l^2/2 l 1]
g2=tf(1,[l*l/2 l 1])

plot(yf3
hold on
plot(yf3)
hold on
plot(yf3)
hold on
step(g)
g=g1*g2
step(g)
plot(yf3,'r')
g3=tf([-l 2],[l 2])
g4=g1*g3
plotstep(g4)
step(g4)
load ident2.txt
plot(ident2)
size(ident2)
plot(ident2(:,1),ident2(:2))
plot(ident2(:,1),ident2(:,2))
m=42.98;
z=sqrt(((log(m/100))^2/((pi^2)+((log(m/100))^2)))
z=sqrt(((log(m/100))^2/((pi^2)+((log(m/100))^2))))
td=0.35;
wn=1+(0.7*z))/td
wn=(1+(0.7*z))/td
a=1
gaprox=tf([a*(wn^2)],[1 2*z*wn wn^2])
hold on
plot(gaprox)
step(gaprox)
a=0.245
gaprox=tf([a*(wn^2)],[1 2*z*wn wn^2])
step(gaprox)
t=[1 1.5 2 3]
qe=[9132 30075 46407 66666.67
qe=[9132 30075 46407 66666.67]
qe=[9132 30075 46407 66666]
plot(t,qe,'or')
plot(t,qe,'r')
t=[0 10 20 30 41 52 63 75 87 100 114 128 143 159 177]
h=[280 260 240 220 200 180 160 140 120 100 80 60 40 20 0]
plot(t,h,'or')
qs=[0 721 1445 2168 2964 3760 4556 5425 6293 7234 8247 9260 10345 11503 12806]
plot(qs,h)
plot(h,qs)
plot(qs,h)
h=[280 260 240 220 200 180 160 140 120 100 80 60 40 20 0]
plot(h,qs)
plot(qs,h)
qs=[41636 40912 40188 39465 38669 37873 37077 36208 35340 34399 33386 32373 3128
7 30130 28827]
plot(qs,h)
qs=[41636 40512 39388 38265 37029 35793 34557 33208 31860 30399 28826 27253 2556
7 23770 21747]
plot(qs,h)
r=[3e-7]
r=[3e-7 47e-7 91e-7 136e-7 185e-7 233e-7 282e-7 336e-7 389e-7 447e-7 509e-7 637e
-7 709e-7 788e-7]
plot(r
qs=[41636 40516 39396 38276 37044 35812 34580 33236 31892 30436 28868 27300 2562

0 23828 21812]
plot(qs,h)
r=[6e-7 50e-7 94e-7 138e-7 186e-7 234e-7 366e-7 446e-7 507e-7 569e-7 635e-7 705e
-7 784e-7]
plot(qs,h)
%-- 08/04/14 12:28 --%
t=[1 1.5 2 3]
qe=[90 300 464 666]
plot(t,qe,'or')
r=[0 0.56 1.12 1.68 2.296 2.912 3.528 4.2 4.872 5.6 6.384 7.168 8.008 8.904 9.91
2]
t=[0 10 20 30 41 52 63 75 87 100 114 128 143 159 177]
plot(t,r,)
plot(t,r)
plot(r,t)
r=[0 0.056 0.112 0.168 0.2296 0.2912 0.3528 0.42 0.4872 0.56 0.6384 0.7168 0.800
8 0.8904 0.9912]
plot(r,t)
%-- 10/04/14 13:00 --%
%-- 26/04/14 09:35 --%
diary('aula2604.txt')
R=1 % Incluindo a resistncia das escovas
L=6.5e-3;
J=.0017;
B=.0009;
ke=.35;
kt=.35;
F=.15;
ge=tf([1,[L R])
ge=tf(1,[L R])
gm=tf([1,[J B])
gm=tf(1,[J B])
gdireto=ge*kt*gm
grealim=ke
G=ge*kt*gm
H=Ke
H=ke
help
help feedback
ftmf=feedback(G,H)
ft1=G/(1+G*H)
ft2=minreal(ft1)
ftmf
step(50*ftmf)
hold on
grid
step(50*ftmf,.15)
t=0:.001:.15;
y=step(50*ftmf,t);
plot(t,y,'0')
plot(t,y,'or')
size(y)
y(151)
yp=max(y)
mp=(yp-y)/y*100
yss=y
yss=y(151)
mp=(yp-yss)/yss*100

y=step(100*ftmf,t);
yss
yss(151)
yss=y(151)
mp=(yp-yss)/yss*100
yp=max(y)
mp=(yp-yss)/yss*100
Gtorque=gm
Htorque=ke*ge*kt
ftmf_torque=feedback(Gtorque,Htorque)
ge
y_torque=step(0.89*ftmf_torque,t);
y_torque=step(-.89*ftmf_torque,t);
plot(t,y_torque,'ob')
figure(2)
plot(t,y_torque,'ob')
grid
ytotal=y+y_torque;
plot(y,y_torque,'or')
plot(t,y_total,'ob')
plot(t,ytotal,'ob')
xlabel('tempo (s)")
xlabel('tempo (s)')
xlabel('Velocidade (rad/s)')
xlabel('Tempo(s)')
title('Resposta ao degrau')
ylabel('Velocidade (rad/s)')
plot(tempo,velocidade)
tempo
hold on
plot(t,ytotal,'ob')
plot(t,ytotal,'o')
plot(t,ytotal,'r')
tempo
figure(3)
plot(tempo,velocidade)
plot(tempo,velocidade,'k')
ginversor==tf(6,[5 1])
ginversor=tf(6,[5 1])
kbomba=3.33e-5
greserv=tf(1,[.196 0])
malha_aberta=ginversor*kbomba*greserv
step(10*malha_aberta,60);
grid
step(10*malha_aberta,600);
grid
hold on
step(10*malha_aberta,60);
step(10*malha_aberta,600);
step(10*malha_aberta,600,'o');
step(10*malha_aberta,600);
%-- 27/04/14 12:07 --%
%-- 30/04/14 14:28 --%
x=-7.5:.5:7.5;
y=x;
[X,Y]=meshgrid(x,y);
R=sqrt(X.^2+Y.^2)+eps;
Z=sin(r)./R;
mersh(X,Y,Z)

mesh(X,Y,Z)
Z=sin(R)./R;
mesh(X,Y,Z)
R=1;
L=6.5e-3;
J=.0017;
B=.0009;
ke=.35;
kt=.35;
F=.15;
ge=tf(1,[L R]);
gm=tf(1,[J B]);
gdireto=ge*kt*gm;
grealim=ke;
G=ge*kt*gm;
H=ke;
ftmf=feedback(G,H);
ft1=G/(1+G*H)
step(50*ftmf,.15)
hold on
grid
plot(t,y,'or')
t=0:.001:.15;
plot(t,y,'or')
size (y)
step(10*ftmf,.15)
%-- 09/05/14 11:27 --%
d=[2 3 7 2 1]
roots(d)
d=[2 3 8 2 1]
roots(d)
d=[1 3 8 2 1]
roots(d)
d=[1 3 8 2 6]
roots(d)
pole(d)
pzmap(d)
g=tf(2 1[2 3 7 2 1])
g=tf(2,1[2 3 7 2 1])
g=tf([2 1],[2 3 7 2 1])
pole(g)
roots(g)
root(g)
pzmap(g)
g=tf([2 1],[2 3 7 2 6])
pzmap(g)
g=tf([2 1],[2 3 7 2 5])
pzmap(g)
g=tf([2 1],[2 3 7 2 4])
pzmap(g)
g=tf([2 1],[2 3 7 3 4])
pzmap(g)
g=tf([2 1],[2 3 5 2 4])
pzmap(g)
g=tf([2 1],[2 2 7 2 4])
pzmap(g)
pzmap(g
g=tf([2 1],[1 3 7 2 4])
pzmap(g)
g=tf([2 1],[2 3 7 2 1])

pzmap(g)
G(s)=tf( 1[(s+1)(s+10)])
G(s)=tf(1[(s+1)(s+10)])
g=tf([2 1],[2 3 7 2 1])
bode(g)
g=tf(2,1 [2 3 7 2 1])
G(s)=tf(1[0 1][0 10])
G(s)=tf(1[0 1],[0 10])
G(s)=tf(1[1 10])
G(s)=tf(1,[1 10])
G=tf(1,[1 10])
G=tf(1,[0 1][0 10])
G=tf(1,[0 1]*[0 10])
G=tf(1,[0 1],[0 10])
G=tf(1,[0 1] [0 10])
g1=tf([Kt],[L*J(J*R+L*B)(R*B+Kt*Ke)])
G=tf(1,([0 1])([0 10]))
g=tf(1,[0 1*0 10])
g=tf(1,[0 1][0 10])
g=tf([1,[0 1][0 10]])
g1=tf([Kt],[1*2(1*2+3*4)])
num=1;
den=([0 1][0 10])
den=[0 1][0 10]
den=[0+1][0+10]
den=[0 1],[0 10]
den=([0 1],[0 10])
den=[0 1]*[0 10]
den=[0 1][0 10]
den=[1 1][1 10]
den=([1 1][1 10])
den=[1*0 10]
g=tf([2],[1.5*3 1])
g=tf([1],[(0 1)(0 10])
g=tf([1],[(1 1)(1 10])
help
help tf
g=tf(1([1 1 1 10])
g=tf(1([1 1 1 10]))
help
g2=tf(1,[l*l/2 l 1])
g=tf(1,[1 1*1 10])
g=tf(1,[0 1*1 10])
g=tf(1,[1*1 10])
g=tf(1,[1]*1 10])
g=tf(1,[1 0*1 10])
g=tf(1,[1 1*1 10])
g=tf(1,[1 1][*1 10])
g=tf(1,[1 1][1 10])
g=tf(1,[1 1][1 10]])
g=tf(1,[1 1 1 10])
g=tf(1,[1 1 * 1 10])
g=tf(1,[1 1*1 10])
g=tf(1,[(1 1)*(1 10)])
g=tf(1,[1 1*1 10])
help expression
g=tf(1,[1 1|1 10])
g=tf(1,[0 1|1 10])
g=tf(1,[0 1 1|1 10])
g=tf(1,[0 1 |1|1 10])

a=[1 1]
a=[0 1]
den1=[0 1]
den2=[1 10]
g=tf(1,[den1*den2])
Reserv=tf(1,[.196 0])
g=tf(1,[0 1;1 10])
g1=tf(1,[5 1])
plot(g1)
roots(g1)
bode(g1)
pzmap(g1)
g1=tf(1,[1 1])
plot(g1)
g1=tf(1,[1.25 1])
step(g1*10)
hold on
step(g1*20)
num=[5];
den=[1 2 10];
g=tf(num,den);
step(g)
g=tf(5,[1 2 10])
step(g)
hold on
g=tf(5,[1 3 10])
step(g)
g=tf(5,[1 4 10])
step(g)
%-- 09/05/14 15:06 --%
g=tf(1,[1 0.5 1])
step(g)
hold on
g1=tf(2 20 1[500 20 2])
g1=tf(2 20 1,[500 20 2])
g1=tf([2 20 1],[500 20 2])
step(g1)
g1=tf([2+20+1],[500 20 2])
step(g1)
g1=tf([2 20 1],[500 20 2])
step(g1)
g=tf(1,[1.25 1])
step(g)
g=tf(5,[1 4 10])
step(g)
g=tf(1,[1.25 1])
step(50*g)
a=5;
f=0.2;
t=0:0.1:99.9:
t=0:.1:99.9;
u=a*sin(2*pi*f*t);
y=lsin(y,u,t);
y=lsin(g,u,t);
y=lsin(g,u,t)
%-- 10/05/14 08:20 --%
diary('aula10_05.txt')
%-- 10/05/14 10:27 --%
diary('aula10_05.txt')

dados=xlsready('C:\Extensao\Anlise e projeto de sistemas de controle\Aula 10_05\e


xercicio temperatura')
dados=xlsready('C:\Extensao\Analise e projeto de sistemas de controle\Aula 10_05
\exercicio temperatura')
dados=xlsready('C:\Extensao\Anlise e projeto de sistemas de controle\Aula 10_05\e
xercicio temperatura')
dados=xlsready('C:\exertermica2014.xlsx')
dados=xlsread('C:\exertermica2014.xlsx')
dados=xlsread('C:\exerctermica2014.xlsx')
tempo=dados(:,1);
exper=dados(:,2);
mod_excel=dados(:,3);
plot(tempo,exper,'or')
hold
plot(tempo,mod_excel,'b')
plot(tempo_simu,temperatura_simu,'k')
plot(tempo_simu,temp_simu,'k')
%-- 12/05/14 13:36 --%
%-- 16/05/14 14:05 --%

Вам также может понравиться