Señales

Páginas: 2 (436 palabras) Publicado: 9 de enero de 2011
Ahora modelar en matlab para el caso 1 y dos y con sus respectivos
graficos.

clear all;
close all;

g=9.8;
k=5*g/0.01; % F=kX
beta=5*g/0.01;
m=5;
%condiciones iniciales
x0=10;
xp0=1;t=linspace(0,10,200000);
dt=t(2)-t(1);
X=zeros(2,200000);
X(:,1)=[x0 xp0]';
A=[0 1;-k/m -beta/m];
B=[0 1/m]';
a=1;
f=1;
w=2*pi*f;
Km=sqrt((a*w*beta)*(a*w*beta)+(k*a)^2);fi=atan(w*beta/k);
u=Km*sin(w*t+fi);

for i=2:1:200000
X(:,i)=(eye(2)+dt*A)*X(:,i-1)+dt*B*u(1,i-1);
end

lambda1=-(beta/(2*m))+0.5*sqrt(((beta/m)^2)-4*k/m);xp1=((k-m*w^2)*Km*cos(fi)+beta*w*Km*sin(fi))/(((k-m*w^2)^2)+((beta*w)^2));
xp2=((k-m*w^2)*Km*sin(fi)-beta*w*Km*cos(fi))/(((k-m*w^2)^2)+((beta*w)^2));

Xpt=sqrt((xp1^2)+(xp2^2));

psi=atan(xp2/xp1);

c1=x0-Xpt*sin(psi);c2=xp0-Xpt*w*cos(psi)-lambda1*(c1+Xpt*sin(psi));

x=c1*exp(lambda1*t)+c2*t.*exp(lambda1*t)+(Xpt*sin(w*t+psi));

xp=c1*exp(lambda1*t).*lambda1+c2*exp(lambda1*t)+c2*t.*exp(lambda1*t)+Xpt*w*cos(w*t+psi);subplot(3,3,1), plot(t,x), title('Posicion solucion analitica');
subplot(3,3,2), plot(t,X(1,:)), title('Posicion solucion numerica');

subplot(3,3,3), plot(t,X(1,:),'r',t,x,'b'), title('Posicionsolucion numerica(rojo)-analitica(azul)');

subplot(3,3,4), plot(t,X(2,:)), title('velocidad solucion numerica');
subplot(3,3,5), plot(t,xp), title('velocidad solucion analitica');subplot(3,3,6), plot(t,X(2,:),'r',t,xp,'b'), title('velocidad solucion numerica(rojo)-analitica(azul)');

subplot(3,3,7), plot(t,u(1,:)), title('Input');

ac=-beta/(2*m);bc=(1/2)*sqrt(4*k/m-(beta/m)^2);

c2c=(xp0-Xpt*w*cos(psi)-ac*(x0-Xpt*sin(psi)))/bc;

xc=exp(ac*t).*(cos(bc*t)+c2c*sin(bc*t))+Xpt*sin(w*t+psi);xcp=exp(ac*t).*c1.*cos(bc*t)+exp(ac*t).*c1.*bc.*sin(bc*t)+exp(ac*t).*c2c.*ac.*sin(bc*t)+exp(ac*t).*c2c.*cos(bc*t).*bc+Xpt.*w.*cos(w*t+psi);

subplot(3,3,8), plot(t,xc), title('posicion solucion compleja');
subplot(3,3,9), plot(t,xcp), title('velocidad solucion compleja');
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • La señal
  • Señales
  • Señalamientos
  • señalamientos
  • señales
  • Señales
  • Señales
  • señales

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS