Está en la página 1de 7

Escuela de Ingeniera en Sonido

CLASE N 5 SON 921 CONTROL DE VIBRACIONES

% funcion sintetica Fs = 200; % Sampling frequency T = 1/Fs; tiempomaximo=20*pi;%rango temporal de la seal en segundos frecuencia=1/10;%Frecuencia seal en HZ Amplitud=1;%Amplitud de seal t=0:T:tiempomaximo; t=t'; Sv=sin(2*pi*frecuencia*t) +2*cos(2*pi*frecuencia*2*t); % AQUI SE PROGRAMA CUALQUIER SEAL DE EJEMPLO %********************************************************************** T=0.5 ; %+++++++++++++++++++++++++++++++++++tiempo de intervalos datos Fs=1/T; load('C:\Users\ALDO\Desktop\acelerograma.txt'); ESC=1/1;% AJUSTAR ESCALA (si esta en GAL dividir por 100 y pasa a m/s2) Sv=ESC*acelerograma(:,2);%columna donde esta la data de aceleraciones

L = length(Sv); % Length of signal t = (0:L-1)*T; % Time vector T0=L*T; subplot(5,1,5);plot(t,Sv); title('Seal ');xlabel('tiempo (segundos)');

NFFT = 2^nextpow2(L); % Next power of 2 from length of Sv %NFFT=NUM; tic; Y = fft(Sv,NFFT)/NFFT;toc f = Fs/2*linspace(0,1,NFFT/2+1);%espaciamiento lineal % Plot single-sided amplitude spectrum. subplot(5,1,4);plot(f,2*abs(Y(1:NFFT/2+1))) title('ESPECTRO FFT') xlabel('Freq (Hz)') ylabel('|FFT(seal)|')

También podría gustarte