Métodos Matemáticos de Especialidad. Especialidad de Construcción. Curso 2011-2012 VIBRACIONES ALEATORIAS Examen 8 julio 2013 SOLUCION 1. Solución: a) Es un MA(1), luego es estacionario. b) Función de medias: E[Xt ] = E[wt wt−1 ] = E[wt ]E[wt−1 ] = 0 ya que wt es independiente. Función de autocovarianza E[Xt Xt+h ] = E[wt wt−1 wt+h wt+h−1 ] h=0 2 2 4 E[Xt Xt ] = E[wt2 wt−1 ] = E[wt2 ]E[wt−1 ] = σW h=1 2 E[Xt Xt+1 ] = E[wt2 wt−1 wt+1 ] = σW E[wt−1 ]E[wt+1 ] = 0 h>1 E[Xt Xt+h ] = E[wt ]E[wt−1 ]E[wt+h ]E[wt+h−1 ] = 0 Por tanto es estacionario. c) Función de medias E[Xt ] = E[wt cos t + wt−1 sin t] = cos tE[wt ] + sin tE[wt−1 ] = 0 Función de autocovarianza E[Xt Xt+h ] = E[(wt cos t + wt−1 sin t)(wt+h cos(t + h) + wt+h−1 sin(t + h))] h=0 E[Xt Xt ] = E[(wt cos t + wt−1 sin t)2 ] = 2 2 = cos2 tE[wt2 ] + sin2 tE[wt−1 ] + 2 sin t cos tE[wt wt−1 ] = σW h=1 E[Xt Xt ] = E[(wt cos t + wt−1 sin t)(wt+1 cos(t + 1) + wt sin(t + 1)] = = cos t cos(t + 1)E[wt wt+1 ] + cos t sin(t + 1)E[wt2 ] + sin t cos(t + 1)E[wt+1 wt−1 ] 2 + sin t sin(t + 1)E[wt−1 wt ] = cos t sin(t + 1)σW Por tanto NO es estacionario. d) Xt es un AR(2). Será estacionario si las raices del polinomio característico están fuera del círculo unidad. Polinomio característico: 1 − aB 2 = 0 ⇒ (1 + √ aB)(1 − Por tanto, Xt es estacionario si a ∈ (−1, 1). 1 √ 1 aB) = 0 ⇒ B = ± √ a 2. a) Debido a las propiedades de la función de densidad de probabilidad, se tiene que fYt (y) = 0,5, x ∈ [−1, 1] Primero calculamos la esperanza Z E[Yt ] = 1 yfYt (y)dy = Z 1 y0,5dy = 0 −1 −1 ⇒ E[Zt ] = E[tY0 + Yt ] = tE[Y0 ] + E[Yt ] = 0. Por tanto Cov[Zt , Zt−1 ] = E[Zt Zt−1 ] − E[Zt ]E[Zt−1 ] = E[Zt Zt−1 ] = E[(tY0 + Yt )((t − 1)Y0 + Yt−1 )] = = E[t(t − 1)Y02 + tY0 Yt−1 + (t − 1)Y0 Yt + Yt Yt−1 ] = t(t − 1)E[Y02 ] Z 1 Z 1 1 2 2 y 2 dy = y fYt (y)dy = 0,5 E[Yt ] = 3 −1 −1 ⇒ Cov[Zt , Zt−1 ] = t(t − 1) 3 b) Para resolver el problema tenemos en cuenta sin(A + B) = sin A cos B + cos A sin B cos(A + B) = cos A cos B − sin A sin B cos2 A = 1 + cos 2A 2 La función de covarianzas se define como Cov[X(t), Y (t + h)] = E[X(t)Y (t + h)] − E[X(t)]E[Y (t + h)] Calculamos primero E[X(t)] = E[α cos(ωt + θ)] = αE[cos(ωt + θ)] = αE[cos ωt cos θ − sin ωt sin θ] = 0, E[Y (t + h)] = E[α sin(ω(t + h) + θ)] = αE[sin(ω(t + h) + θ)] = = αE[sin ω(t + h) cos θ + cos ω(t + h) sin θ] = 0, ya que E[cos θ] = Z ∞ Z ∞ cos θfθ (θ)dθ = k 2π Z 2π cos θdθ = 0 0 −∞ E[sin θ] = Z sin θfθ (θ)dθ = k sin θdθ = 0 0 −∞ Por tanto, Cov[X(t), Y (t + h)] = E[X(t)Y (t + h)] = E[α cos(ωt + θ)α sin(ω(t + h) + θ)] = α2 E[cos(ωt + θ){sin(ωt + θ) cos(ωh) + cos(ωt + θ) sin(ωh)}] = α2 E[sin(ωt + θ) cos(ωt + θ) cos(ωh) + cos2 (ωt + θ) sin(ωh)] 1 1 1 = α2 E[ sin(2ωt + 2θ) cos(ωh) + cos(2ωt + 2θ) sin(ωh) + sin(ωh)] 2 2 2 Teniendo en cuenta que E[sin 2θ] = 0 y E[cos 2θ] = 0 Cov[X(t), Y (t + h)] = α2 sin(ωh) 2 Es fácil comprobar que se obtiene el mismo resultado con Cov[X(t + h), Y (t)]. 2 Ga(f) 15 10 5 0 0 5 10 15 20 25 15 20 25 15 20 25 f (hz) −3 x 10 8 |H(f)|2 6 4 2 0 0 5 10 f (hz) Gx(f) 0.03 0.02 0.01 0 0 5 10 f (hz) Figura 1: Funcion de densidad espectral de at . 3. a) La varianza del desplazamiento se calcula como Z +∞ 2 GX (f )df σX = 0 dónde GX (f ) es la función de densidad espectral unilateral del desplazamiento: GX (f ) = |H(f )|2 Ga (f ) H(f ) es la función de transferencia entre la aceleración de la base y el desplazamiento del sistema: H(f ) = m −m ⇒ |H(f )|2 = p 2 k − 4π 2 mf 2 + i2πcf (k − 4π mf 2 )2 + (2πcf )2 Por otra parte {at } es un proceso MA(2), at = wt + φ1 wt−1 + φ2 wt−2 con función de densidad espectral conocida e igual a 2 Ga (f ) = 2σw |1 − φ1 e−i2πf − φ2 e−i4πf |2 , 0 ≤ f ≤ 1/2 Operando se puede poner como 2 Ga (f ) = 2σw (1 + φ21 + φ22 + 2φ1 (1 + φ2 ) cos 2πf + 2φ2 cos 4πf ), 0 ≤ f ≤ 1/2 En la Figura 1 se han representado Ga (f ), |H(f )|2 and Gx (f ) para los datos del problema. Integrando mediante la regla del trapecio Gx (f ) se obtiene σx2 = 0,0594 m2 . En Matlab: % datos del sistema % ***************************************** m=2; k=800*pi^2; 3 z=0.02; c=2*z*sqrt(m*k); % Espectro teorico % ***************************************** dt=0.02; % s fnq=1/(2*dt); % Hz % frecuencias del espectro teorico dfg=0.001; fg=0:dfg:0.5; % parametros del AR(2) a1=2; a2=1; % varianza s2=16; % espectro teorico for r=1:length(fg) G(r)=2*s2*(1+a1^2+a2^2+2*a1*(1+a2)*cos(2*pi*fg(r))+2*a2*cos(4*pi*fg(r)) end % frecuencias y espectro escalados f1=fg/dt; Ga1=G*dt; h1=figure; subplot(3,1,1) plot(f1,Ga1) xlim([0 fnq]) xlabel(’f (hz)’) ylabel(’G_a(f)’) % Función de transferencia % ***************************************** for r=1:length(f1) H2_1(r)=m/sqrt( (k-4*pi^2*m*f1(r)^2)^2 + (2*pi*c*f1(r))^2 ); end subplot(3,1,2) plot(f1,H2_1) xlabel(’f (hz)’) ylabel(’|H(f)|^2’) % Funcion de densidad espectral de la respuesta del sistema % ******************************************************************* subplot(3,1,3) Gx1=H2_1.*Ga1; plot(f1,Gx1) 4 xlabel(’f (hz)’) ylabel(’G_x(f)’) % calculo de la varianza a partir de la PSD % ********************************************************* df1=f1(2)-f1(1); nf1=length(f1); var1=0; for r=1:nf1-1 trapecio=(Gx1(r)+Gx1(r+1))*df1/2; var1 = var1 + trapecio; end % b) Para una realizacion se obtiene σx2 = 0,0643 m2 . % numero de instantes de tiempo nt=50/dt; % vector tiempos t=(0:nt-1)*dt; % numero de realizaciones nre=10000; % ruido blanco wt -> N(mu=0,sigma=1) wt=4*randn(nre,nt+2); % se crea el proceso estocástico MA xt = wt(:,1:nt) + a1*wt(:,2:nt+1) + a2*wt(:,3:nt+2); % se estima la psd de la realizacion 1 con el metodo de Welch [pwe,fwe]=pwelch(xt(1,:)); Ga2=pwe*2*pi*dt; f2=fwe/(2*pi*dt); h2=figure; plot(f2,Ga2,’r’,’linewidth’,1) hold on plot(f1,Ga1) % funcion de transferencia evaluada en los mismos puntos que Ga2 for r=1:length(f2) H2_2(r)=m/sqrt( (k-4*pi^2*m*f2(r)^2)^2 + (2*pi*c*f2(r))^2 ); end % densidad espectral de la respuesta Gx2=H2_2.*Ga2’; df2=f2(2)-f2(1); nf2=length(f2); var2=0; for r=1:nf2-1 5 trapecio=(Gx2(r)+Gx2(r+1))*df2/2; var2 = var2 + trapecio; end c) Para 10000 realizaciones se obtiene σx2 = 0,0593 m2 . % lo repetimos para todas las realizaciones Gr=zeros(nre,nt/2+1); for r=1:nre Xr=fft(xt(r,:)); Gr(r,:)=2*dt/nt*abs(Xr(1:nt/2+1)).^2; end f3=(0:nt/2)*(1/(nt*dt)); % estimacion Ga3=mean(Gr); h3=figure; plot(f1,Ga1,’r’,’linewidth’,1) hold on plot(f3,Ga3) % funcion de transferencia evaluada en los mismos puntos que Ga3 for r=1:length(f3) H2_3(r)=m/sqrt( (k-4*pi^2*m*f3(r)^2)^2 + (2*pi*c*f3(r))^2 ); end % densidad espectral de la respuesta Gx3=H2_3.*Ga3; df3=f3(2)-f3(1); nf3=length(f3); var3=0; for r=1:nf3-1 trapecio=(Gx3(r)+Gx3(r+1))*df3/2; var3 = var3 + trapecio; end 6