Contents

Forced Response and ODS Demo

ModalTools script to demo forced response, using poles and residues for plate from platedemo. Thus we have a 12-by-12 plate with a modal model. We use this modal model to compute the forced response generated by two random forces in dofs 1 and 17. The algorithm used, is the unique forced response algorithm of ModalTools (and DuraTools). See our Technical Papers section on the web for more details. This demo ends by computing an operating deflection

% Copyright (c) 2003-2006, Axiom EduTech AB, Ljusterö, Sweden. All rights reserved.
% URL: http://www.vibratools.com Email: info@vibratools.com

Load Modal Data

load result12               % Contains poles and residues from platedemo

Create Two Input Forces

Create two forces, each 100 KSamples long, and containing Gaussian noise.

fs = 1000;
force1 = randn(100*1024,1);
force2 = randn(100*1024,1);

Calculate New Residues

The residues for DOF 1 are already loaded from file. To obtain the residues corresponding to an input in point 17, we use RESISYNT.

residues17 = resisynt(residues,1,17);
%

Calculate All 144 Time Responses and Spectra

First, we assume a reference sensor in DOF 23

v23 = timeresv_rp(force1,fs,residues(:,23),poles,[1:length(poles)])+ ...
      timeresv_rp(force2,fs,residues17(:,23),poles,[1:length(poles)]);
tic
% Then we compute the time response of each dof, auto spectrum of it,
% and the cross spectrum with reference DOF 23
N=length(v23);
for n = 1:144
    if mod(n,20) == 0
        % Next two lines looks messy for the purpose of keeping the lines
        % short!
        fprintf('Computing forced response with %i samples for',N)
        fprintf(' response %i...\n',n)
    end
    vn = timeresv_rp(force1,fs,residues(:,n),poles,[1:length(poles)])+ ...
         timeresv_rp(force2,fs,residues17(:,n),poles,[1:length(poles)]);
    [rmsspec(:,n),f] = fanhann(vn,fs,2048,15,50);
%   we compute an unscaled cross spectrum, but only used for phase!
    crosspec(:,n) = csd(v23,vn,2048,fs,hann(2048),1024);
end
% Next, we create a "phase spectrum" to be used for an Operating Deflection
% Shape (ODS). We include a truncated spectrum because modes are at low
% frequencies compared to half sampling frequency.
Pspec = rmsspec(1:300,:).*exp(j*angle(crosspec(1:300,:)));
f=f(1:300);
T=toc;
% Next four lines looks messy for the purpose of keeping the lines short!
fprintf('\n\nTotal computation time for 144 responses with two forces each of\n')
fprintf('length %i samples, including producing auto and cross spectra: %8.2f secs\n',N,toc)
fprintf('\nNOTE: This demo was produced on a Laptop PC with Intel Pentium Mobile\n')
fprintf('1.5 GHz Processor, and 760 MB RAM\n');
save Syntdata vn rmsspec crosspec f
Computing forced response with 102400 samples for response 20...
Computing forced response with 102400 samples for response 40...
Computing forced response with 102400 samples for response 60...
Computing forced response with 102400 samples for response 80...
Computing forced response with 102400 samples for response 100...
Computing forced response with 102400 samples for response 120...
Computing forced response with 102400 samples for response 140...


Total computation time for 144 responses with two forces each of
length 102400 samples, including producing auto and cross spectra:   104.56 secs

NOTE: This demo was produced on a Laptop PC with Intel Pentium Mobile
1.5 GHz Processor, and 760 MB RAM

Plot First Spectrum and Select ODS Frequencies

[ODS,freqs]=odsmode(Pspec,f);

Calculate Animation and Animate ODS

[gpoint,G,ref] = animcalc(geodef,plotseq,ODS,0.2,0);
figure(2)
animate(1,gpoint,G,ref,5)
S=sprintf('ODS picked from freq. %5.2f Hz',freqs(1));
title(S)

Plot Static Mode Shape

For the web it might be better with a static mode plot

figure(3)
modeplot(3,geodef,plotseq,ODS,0.6,0,35);
pause