You are on page 1of 3

function [ wn,X,phi ] = viblnoa1gdlf( m,k,xo,vo )

% VIBLNOA1GDL - Respuesta de Vib Libre No amortiguada de 1 GDL


% Por: Pedro Pablo Fujimori
% Al : 04/05/16
%
----------------------------------------------------------------------------------------------------% CALCULOS
wn = sqrt(k/m); % (rad/s) Frecuencia natural
tau = 2*pi/wn;
% (s) Periodo de oscilacion
f = 1/tau;
% (Hz) Frecuencia natural
%
t = 0:0.01:5*tau;
% (s) Vector de instantes para
grafica
phi = atan(wn*xo/vo);
% (rad) angulo de fase
X = sqrt((wn*xo)^2 + vo^2 /wn); % (m) Amplitud
%
x = X*sin(wn*t+phi);
% (m) Respuesta - posicion en
funcion del tiempo
v = X*wn*cos(wn*t+phi);
% (m/s) Respuesta - velocidad en
funcion del tiempo
a = -X*wn^2*sin(wn*t+phi);
% (m/s^2) Respuesta - aceleracion en
funcion del tiempo
%
% SALIDA DE DATOS
plot(t,x), xlabel('Tiempo t , en s '), ylabel('Posicion x(t), en m'),
grid on, axis tight
title('Respuesta - posicion en funcion del tiempo')
figure
plot(t,v), xlabel('Tiempo t , en s '), ylabel('Velocidad v(t), en m/s'),
grid on, axis tight
title('Respuesta - velocidad en funcion del tiempo')
figure
plot(t,a), xlabel('Tiempo t , en s '), ylabel('Aceleracion a(t), en m/s')
, grid on, axis tight
title('Respuesta - aceleracion en funcion del tiempo')
%
figure
plot(t,x,t,v,t,a)
xlabel('Tiempo t , en s '), ylabel('x(t), v(t), a(t), en m/s') , grid on,
axis tight
legend('x(t)', 'v(t)', 'a(t)')
end

function [ wn,zeta,X,phi ] = viblva1gdlf( m,k,c,xo,vo )


% VIBLVA1GDL- Calcula respuesta de Vib Libre Visc. amortiguada de 1 GDL
% Por: Pedro Pablo Fujimori
% Al : 11/05/16
%
-----------------------------------------------------------------------------------------------------

%
% CALCULOS
wn = sqrt(k/m);
% (rad/s) Frecuencia natural no
amortiguada
tau = 2*pi/wn;
% (s) Periodo de oscilacion natural no
amortiguado
f = 1/tau ;
% (Hz) Frecuencia natural de
oscilacion no amortiguado
ccrit = 2*sqrt(k*m);
% (N.m/s) Constante critica de
amortiguamiento
zeta = c/ccrit ;
% (adim) Coeficiente de
amortiguamiento
%
wd = wn*sqrt(1-zeta^2);
% (rad/s) Frecuencia amortiguada
taud = 2*pi/wd;
% (s) Periodo de oscilacion amortiguado
fd = 1/taud;
% (Hz) Frecuencia amortiguada
%
t = 0:0.01:5*taud;
%
(s) Vector de instantes para grafica
phi = atan(wd*xo/(vo + xo*zeta*wn));
% (rad) Angulo
de fase amortiguada
X = sqrt(((wd*xo)^2 + (vo + xo*zeta*wn)^2)/wd^2);
% (m) Amplitud no
amortiguada
%
x = X*exp(-zeta*wn*t).*sin(wd*t+phi);
% (m) Respuesta - posicion en
funcion del tiempo
% v = X*wn*cos(wn*t+phi);
% (m/s) Respuesta velocidad en funcion del tiempo
% a = -X*wn^2*sin(wn*t+phi);
% (m/s^2) Respuesta aceleracion en funcion del tiempo
%
% SALIDA DE DATOS
plot(t,x), xlabel('Tiempo t , en s '), ylabel('Posicion x(t), en m'),
grid on, axis tight
title('Respuesta - posicion en funcion del tiempo')
end

function [ wn,zeta,X,phi ] = viblva1gdlf( m,k,c,xo,vo )


% VIBLVA1GDL- Calcula respuesta de Vib Libre Visc. amortiguada de 1 GDL
% Por: Pedro Pablo Fujimori
% Al : 11/05/16
%
----------------------------------------------------------------------------------------------------%
% CALCULOS
wn = sqrt(k/m);
% (rad/s) Frecuencia natural no
amortiguada

tau = 2*pi/wn;
% (s) Periodo de oscilacion natural no
amortiguado
f = 1/tau ;
% (Hz) Frecuencia natural de
oscilacion no amortiguado
ccrit = 2*sqrt(k*m);
% (N.m/s) Constante critica de
amortiguamiento
zeta = c/ccrit ;
% (adim) Coeficiente de
amortiguamiento
%
wd = wn*sqrt(1-zeta^2);
% (rad/s) Frecuencia amortiguada
taud = 2*pi/wd;
% (s) Periodo de oscilacion amortiguado
fd = 1/taud;
% (Hz) Frecuencia amortiguada
%
t = 0:0.01:5*taud;
%
(s) Vector de instantes para grafica
phi = atan(wd*xo/(vo + xo*zeta*wn));
% (rad) Angulo
de fase amortiguada
X = sqrt(((wd*xo)^2 + (vo + xo*zeta*wn)^2)/wd^2);
% (m) Amplitud no
amortiguada
%
x = X*exp(-zeta*wn*t).*sin(wd*t+phi);
% (m) Respuesta - posicion en
funcion del tiempo
% v = X*wn*cos(wn*t+phi);
% (m/s) Respuesta velocidad en funcion del tiempo
% a = -X*wn^2*sin(wn*t+phi);
% (m/s^2) Respuesta aceleracion en funcion del tiempo
%
% SALIDA DE DATOS
plot(t,x), xlabel('Tiempo t , en s '), ylabel('Posicion x(t), en m'),
grid on, axis tight
title('Respuesta - posicion en funcion del tiempo')
end

You might also like