Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. %% Task 4: Simulated EMA
  2. L=1; width=0.020; height=0.010; rho=7870; E=210e9; Ixx=(width*height^3)/12;
  3. A=width*height; V=L*A; m=V*rho; N=5; xin=1; xout=0:.1:1;
  4. zeta=1; beta=fzero('cos(x).*cosh(x)+1',[1,2]);
  5. f0=sqrt(beta^4.*E.*Ixx./(rho*A))/(2*pi);
  6.  
  7. fs=10e3;fc=1e3;df=1/fs;
  8. force=randn(512*1024,1);
  9.  
  10. [B,A]=butter(4,fc/(fs/2));
  11. filtForce=filter(B,A,force);
  12.  
  13. psdForce=pwelch(filtForce);
  14.  
  15. figure()
  16. plot(psdForce)
  17. xlim([0 fc])
  18.  
  19. rms(psdForce)
  20. rms(filtForce)
  21.  
  22. fftSize=2^14;
  23. for i=1:11
  24. [poles(:,i),residues(:,i)]=cantilever(m,f0,xin,xout(i),N,zeta);
  25. [y(:,i),t(:,i)] = timeresv_rp(filtForce,fs,residues(:,i),poles(:,i),(1:N));
  26. FRF(:,i)=tfestimate(t(:,i),y(:,i),hann(fftSize),(fftSize/2),fftSize);
  27. figure()
  28. plot(20*log10(abs(FRF(:,i))));hold on;xlim([0 fc]);
  29. end
  30. hold off
  31. cohere=mscohere(filtForce,y(:,3));
  32. figure()
  33. plot(cohere);xlim([0 fc])
  34.  
  35. % MIF=modeind1(FRF);
  36. % figure()
  37. % plot(MIF);xlim([0 fc])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement