Professional Documents
Culture Documents
Dr Michael Sek
Figure 2 Car body undergoing testing to acquire its FRFs (Brüel&Kjær "Structural Testing")
1
Frequency Response Function (FRF)
Dr Michael Sek
We use the simulation model as a virtual system, pretending that we do not know much about it, as the faded section of Figure
3 indicates. As in the real experiment, we will obtain the "experimental" data from the oscilloscope "Scope1". We need to
enable the scope's storage feature. Since the Scope1 has multiple inputs connected to it we choose the format "Structure with
time" as shown in Figure 4. After running the model once we can check field names in the structure ScopeData1.
2
VIRTUAL SYSTEM
Figure 3 Virtual experimental setup to acquire the data for the FRF of a system
>> ScopeData1
ScopeData1 =
time: [2048x1 double]
signals: [1x4 struct]
blockName: 'SDOF/Scope1'
>> ScopeData1.signals
ans =
1x4 struct array with fields:
values
dimensions
label
title
plotStyle
Figure 4 Data history settings for Scope1 and field names in the structure ScopeData1
It is obvious that, following the order of connections to Scope1, the essential "measurements" are accessible in the structure
ScopeData1 as shown
Time ScopeData1.time
Excitation Force ScopeData1.signals(1).values
Response Acceleration ScopeData1.signals(2).values
Response Velocity ScopeData1.signals(3).values
Response Displacement ScopeData1.signals(4).values
2
Frequency Response Function (FRF)
Dr Michael Sek
Simulation Parameters block is setup as shown in Figure 5. Note that "Save to workspace" items are ticked-off since the data is
returned via Scope1. The variables dt and tmax control the sampling interval and the duration of the virtual experiment which
resembles the real situation.
The FRFs can be found for any parameter that describes the response of the system, i.e. acceleration, velocity and
displacement. Figure 8 shows the results for random excitation obtained with the code shown in the Appendix. The resonance
is near 15Hz. The curves look noisy. Random excitation requires longer sample time and averaging. Note that the scaling and
multiplication by 2 are not required for the folding of H(f) since H(f) is the ratio.
Impact Excitation
Better results are obtained with an impact excitation (see Figure 9). In the model it can be achieved with the Pulse Generator
set up as shown in Figure 7. Pulse duration is expressed in multiples of dt.
3
Frequency Response Function (FRF)
Dr Michael Sek
Figure 8 Excitation and responses of the system under test (random excitation) and the corresponding FRFs
4
Frequency Response Function (FRF)
Dr Michael Sek
Figure 9 Excitation and responses of the system under test (impact excitation) and the corresponding FRFs
5
Frequency Response Function (FRF)
Dr Michael Sek
APPENDIX
AN EXAMPLE OF A FUNCTION USED TO GENERATE A HARMONIC SIGNAL
6
Frequency Response Function (FRF)
Dr Michael Sek
df = sFreq/nPts;
fNyquist = sFreq / 2;
spec = spec(1:nPts/2+1);
spec(2:end) = 2 * spec(2:end);
mag = abs(spec);
phase = atan(imag(spec)./real(spec));
or
phase = angle(spec);
plot(freq, mag)
plot(freq, phase);
7
Frequency Response Function (FRF)
Dr Michael Sek
The code used to obtain the FRFs of the system in Figure 3 and produce Figure 8 and
Figure 9.
%SDOF start up
m=100;
k=1e6;
%f0 = 1/(2*pi)*sqrt(k/m)
%c0 = 2*sqrt(k*m)
c=1000;
%zeta = c/c0
%initial conditions
xdot0=0;
x0=0;
samplingFrequency = 200;
dt = 1/samplingFrequency;
FFTsize = 2048;
tmax = (FFTsize-1)*dt;
Fmax = 1000;
pulseDuration = 5*dt;
SDOF
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
%THIS SECTION USES ScopeData (Structure with time)
% Time...... ScopeData1.time
% Excitation Force ScopeData1.signals(1).values
% Response Acceleration ScopeData1.signals(2).values
% Response Velocity ScopeData1.signals(3).values
% Response Displacement ScopeData1.signals(4).values
sim('SDOF');
%plotting the results
figure
subplot(4,1,1)
plot(ScopeData1.time,ScopeData1.signals(1).values)
title('Excitation')
ylabel('Force [N]')
grid on
subplot(4,1,2)
plot(ScopeData1.time,ScopeData1.signals(2).values)
ylabel('Accel [m/s^2]')
grid on
subplot(4,1,3)
plot(ScopeData1.time,ScopeData1.signals(3).values)
ylabel('Vel [m/s]')
grid on
subplot(4,1,4)
plot(ScopeData1.time,ScopeData1.signals(4).values)
ylabel('Disp [m]')
xlabel('Time [s]')
grid on
%Calculating FRFs
F = fft(ScopeData1.signals(1).values);
A = fft(ScopeData1.signals(2).values);
V = fft(ScopeData1.signals(3).values);
X = fft(ScopeData1.signals(4).values);
Ha = A ./ F;
Hv = V ./ F;
Hx = X ./ F;
8
Frequency Response Function (FRF)
Dr Michael Sek
%folding
Ha = Ha(1:FFTsize/2+1);
%No need to scale since H's are the ratio
HaMag = abs(Ha);
figure
subplot(3,1,1)
plot(freq, HaMag)
ylabel('FRF H_a[(m/s^2)/N]')
xlabel('Frequency [Hz]')
grid on
[HaMax,idx] = max(HaMag);
fResonance = freq(idx);
title(sprintf('Max=%.2e(m/s^2)/N @ %.2fHz',HaMax,fResonance))
Hv = Hv(1:FFTsize/2+1);
HvMag = abs(Hv);
subplot(3,1,2)
plot(freq, HvMag)
ylabel('FRF H_v[(m/s)/N]')
xlabel('Frequency [Hz]')
grid on
[HvMax,idx] = max(HvMag);
fResonance = freq(idx);
title(sprintf('Max=%.2e(m/s)/N @ %.2fHz',HvMax,fResonance))
Hx = Hx(1:FFTsize/2+1);
HxMag = abs(Hx);
subplot(3,1,3)
plot(freq, HxMag)
ylabel('FRF H_x[m/N]')
xlabel('Frequency [Hz]')
grid on
[HxMax,idx] = max(HxMag);
fResonance = freq(idx);
title(sprintf('Max=%.2em/N @ %.2fHz',HxMax,fResonance))