You are on page 1of 29

41614 – Dynamics of Machinery 23/03/2005 IFS

Introduction to Signal Analysis – Parts I and II

Contents
1 Topics of the Lecture – 11/03/2005 (Part I) 2

2 Fourier Analysis – Fourier Series, Integral and Complex Form 3

3 Fourier Analysis – Example with a Square Wave Function 8

4 Fourier Analysis – Example with a Triangular Wave Function 11

5 Discrete Form of Fourier Transform 15

6 Discrete Fourier Analysis – Examples 18

7 Matlab Routines – 13 Examples with 5 Different Signals 20

8 Analyzers and Signal Processing 24

9 Topics of the Lecture – 18/03/2005 (Part II) 30

10 Impulse Response 31

11 Response to an Arbitrary Input 34

12 Response to Random Input 36

13 Estimators H1, H2 and Coherence Function 43

14 Matlab Routine – FRF-general.m 48

15 Extracting the Modal Parameters 53

1
41614 – Dynamics of Machinery 18/03/2005 IFS

Introduction to Signal Analysis – Part I1

1 Topics of the Lecture – 11/03/2005 (Part I)

• Fourier Analysis
• Fourier Series
• Fourier Integral
• Complex Form of Fourier Transform
• Examples: Square Wave and Triangular Wave
• Discrete Form of Fourier Transform
• Example: Sinus with 16 points
• Frequency Response Analyzers
• Digital Signal Processing
• Aliasing
• Anti-Aliasing Filtering
• Leakage
• Windowing
• Averaging
• Overlapping

1 References

• Bendat, J. S. (1993) ”Engineering Applications of Correlation and Spectral Analysis”, John Wiley & Sons, Inc.,
New York.

• Carlson, G. E. (1998) ”Signal and Linear System Analysis with Matlab”, John Wiley & Sons, Inc., New York.

• Randall, R. B. (1987) ”Frequency Analysis”, Brüel & Kjaer, Naerum, Denmark.

• Ewins, D. J. (1984) ”Modal Testing: theory and practice”, Letchworth: Research Studies Press Ltd., England.

2
2 Fourier Analysis – Fourier Series, Integral and Complex
Form
3
4
5
6
7
3 Fourier Analysis – Example with a Square Wave Function

8
9
10
4 Fourier Analysis – Example with a Triangular Wave Func-
tion

11
12
13
14
5 Discrete Form of Fourier Transform
15
16
17
6 Discrete Fourier Analysis – Examples

• EXAMPLE 1: function x(t) = cos 4πt – It is important to see in table 1 that the spectral
coefficients ak and ·bk provides the information about the frequency of the function, i.e
4π rad/s or 2 Hz. Moreover, all coefficients bk are zero. Analyzing equations (??) and
(??) you can easily see that the spectral coefficients ak are related to the real part of
Xk or cos(k · ∆ω · t) and bk to the imaginary part of Xk or sin(k · ∆ω · t). Obviously, all
coefficients bk shall be zero.

tk [s] xk fk [Hz] ak bk
0 1.0000 0 0.0000 0.0000
0.0625 0.7071 1.0000 0.0000 0.0000
0.1250 0.0000 2.0000 8.0000 0.0000
0.1875 -0.7071 3.0000 0.0000 0.0000
0.2500 -1.0000 4.0000 0.0000 0.0000
0.3125 -0.7071 5.0000 0.0000 0.0000
0.3750 -0.0000 6.0000 0.0000 0.0000
0.4375 0.7071 7.0000 0.0000 0.0000
0.5000 1.0000 8.0000 0.0000 0.0000
0.5625 0.7071
0.6250 0.0000
0.6875 -0.7071
0.7500 -1.0000
0.8125 -0.7071
0.8750 -0.0000
0.9375 0.7071

1
x(t)

−1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1
r

0
x

−1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
tr [s]

10
ak

0
0 1 2 3 4 5 6 7 8
0
bk

−5

−10
0 1 2 3 4 5 6 7 8
fk=ωk/2π [Hz]

Table 1: Data of a digitalized cosine function x(t) = cos 4πt composed of N = 16 points in the
time domain, where T = 1 s, ∆T = T /N = 0.0625 s, ∆ωk = 2π/T = 2π [rad/s] = 1 [Hz],
fk = k · ∆ω/2π = k · 1 [Hz] (k = 0, 1, 2, ..., (N − 1)) and spectral coefficients Xk = ak − j · bk .

18
• EXAMPLE 2: function x(t) = sin 4πt – It is important to see in table 2 that the spectral
coefficients ak and ·bk provides the information about the frequency of the function, i.e
4π rad/s or 2 Hz. Moreover, all coefficients ak are zero. Analyzing equations (??) and
(??) you can easily see that the spectral coefficients ak are related to the real part of
Xk or cos(k · ∆ω · t) and bk to the imaginary part of Xk or sin(k · ∆ω · t). Obviously, all
coefficients ak shall be zero.

tk [s] xk fk [Hz] ak bk
0 0 0 0.0000 0.0000
0.0625 0.7071 1.0000 0.0000 0.0000
0.1250 1.0000 2.0000 0.0000 8.0000
0.1875 0.7071 3.0000 0.0000 0.0000
0.2500 0.0000 4.0000 0.0000 0.0000
0.3125 -0.7071 5.0000 0.0000 0.0000
0.3750 -1.0000 6.0000 0.0000 0.0000
0.4375 -0.7071 7.0000 0.0000 0.0000
0.5000 -0.0000 8.0000 0.0000 0.0000
0.5625 0.7071
0.6250 1.0000
0.6875 0.7071
0.7500 0.0000
0.8125 -0.7071
0.8750 -1.0000
0.9375 -0.7071

1
x(t)

−1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1
r

0
x

−1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
tr [s]

10
ak

0
0 1 2 3 4 5 6 7 8
0
bk

−5

−10
0 1 2 3 4 5 6 7 8
fk=ωk/2π [Hz]

Table 2: Data of a digitalized cosine function x(t) = cos 4πt composed of N = 16 points in the
time domain, where T = 1 s, ∆T = T /N = 0.0625 s, ∆ωk = 2π/T = 2π [rad/s] = 1 [Hz],
fk = k · ∆ω/2π = k · 1 [Hz] (k = 0, 1, 2, ..., (N − 1)) and spectral coefficients Xk = ak − j · bk .

19
7 Matlab Routines – 13 Examples with 5 Different Signals
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MACHINERY DYNAMICS LECTURES (41614) %
% IKS - DEPARTMENT OF CONTROL ENGINEERING DESIGN %
% DTU - TECHNICAL UNIVERSITY OF DENMARK %
% %
% Copenhagen, February 20th, 2002 %
% IFS %
% %
% LECTURE ABOUT SIGNAL ANALYSIS & SIGNAL PROCESSING %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all close all

% * SIGNAL WITH DIFFERENT FREQUENCIES


% (1) a perfect sinus with f= 10 Hz with 2048 points
% (2) a perfect sinus with f= 100 Hz with 2048 points
%
% * DECREASING THE RATE FREQUENCY -> ALIASING
% (3) a perfect sinus f=100.0 Hz with 1024 points
% (4) a perfect sinus f=100.0 Hz with 512 points
% (5) a perfect sinus f=100.0 Hz with 256 points
% (6) a perfect sinus f=100.0 Hz with 128 points
% (7) a perfect sinus f=100.0 Hz with 64 points
%
% * LEAKAGE
% (8) an incomplete sinus leak= 1.0 f=1.0 Hz with 128 points
% (9) an incomplete sinus leak= 1.5 f=1.0 Hz with 128 points
%
% * TRANSIENT SIGNAL & WINDOWING
% (10) xi=0.1 with a sinus f=100 Hz with 512 points
% (11) xi=0.5 with a sinus f=100 Hz with 512 points
% (12) xi=0.9 with a sinus f=100 Hz with 512 points
% (13) xi=0.1 with a sinus f=100 Hz with 128 points (aliasing)
%
% * SIGNAL WITH MULTIPLE FREQUENCY COMPONENTS - 2 COMPONENTS
%
% * SIGNAL WITH MULTIPLE FREQUENCY COMPONENTS - 4 COMPONENTS
%
% * SIGNAL CONTAMINATED BY NOISE
%
% * STEP SIGNAL
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% * SIGNAL WITH DIFFERENT FREQUENCIES

% (Case 1)
n = 2048; % number of points in the range of time
freq = 10.0; % [Hz] - frequency of the simulated signal
xi = 0.0; % - damping factor
leak = 1.0; % - leakage factor

% (Case 2)
% n = 2048; % number of points in the range of time
% freq =100.0; % [Hz] - frequency of the simulated signal

20
% xi = 0.0; % - damping factor
% leak = 1.0; % - leakage factor

% * DECREASING THE RATE FREQUENCY -> ALIASING

% (Case 3)
% n = 1024; % number of points in the range of time
% freq =100.0; % [Hz] - frequency of the simulated signal
% xi = 0.0; % - damping factor
% leak = 1.0; % - leakage factor

% (Case 4)
% n = 512; % number of points in the range of time
% freq =100.0; % [Hz] - frequency of the simulated signal
% xi = 0.0; % - damping factor
% leak = 1.0; % - leakage factor

% (Case 5)
% n = 256; % number of points in the range of time
% freq =100.0; % [Hz] - frequency of the simulated signal
% xi = 0.0; % - damping factor
% leak = 1.0; % - leakage factor

% (Case 6)
% n = 128; % number of points in the range of time
% freq =100.0; % [Hz] - frequency of the simulated signal
% xi = 0.0; % - damping factor
% leak = 1.0; % - leakage factor

% (Case 7)
% n = 64; % number of points in the range of time
% freq =100.0; % [Hz] - frequency of the simulated signal
% xi = 0.0; % - damping factor
% leak = 1.0; % - leakage factor

% * LEAKAGE

% (Case 8)
% n = 128; % number of points in the range of time
% freq = 1.0; % [Hz] - frequency of the simulated signal
% xi = 0.0; % - damping factor
% leak = 1.0; % - leakage factor

% (Case 9)
% n = 128; % number of points in the range of time
% freq = 1.0; % [Hz] - frequency of the simulated signal
% xi = 0.0; % - damping factor
% leak = 1.5; % - leakage factor

% * TRANSIENT SIGNAL & WINDOWING

% (Case 10)
% n = 1024; % number of points in the range of time
% freq =100.0; % [Hz] - frequency of the simulated signal
% xi = 0.1; % - damping factor

21
% leak = 1.0; % - leakage factor

% (Case 11)
% n = 1024; % number of points in the range of time
% freq =100.0; % [Hz] - frequency of the simulated signal
% xi = 0.5; % - damping factor
% leak = 1.0; % - leakage factor

% (Case 12)
% n = 1024; % number of points in the range of time
% freq =100.0; % [Hz] - frequency of the simulated signal
% xi = 0.9; % - damping factor
% leak = 1.0; % - leakage factor

% (Case 13)
% n = 512 % number of points in the range of time
% freq =100.0 % [Hz] - frequency of the simulated signal
% xi = 0.1; % - damping factor
% leak = 1.0; % - leakage factor

% (Case 14)
% n = 512; % number of points in the range of time
% freq =10.0; % [Hz] - frequency of the simulated signal
% xi = 0.0; % - damping factor
% leak = 1.0; % - leakage factor

tmax=1.0; % [s] - time in seconds


xo=1.0e-0; % [m] - signal amplitude
freqa = freq*sqrt(1-xi^2); % [Hz] - damped frequency
fmax=n/(2*tmax); % [Hz] - max. frequency

for i=1:n,
t(i)=(i-1)/n*tmax;
f(i)=(i-1)/tmax;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FIVE DIFFERENT TYPES OF SIGNAL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% (1) SINUS SIGNAL WITH 1 FREQUENCY COMPONENT
x(i)=xo*exp(-xi*freqa*t(i))*sin(2*pi*freqa*t(i)*leak);
%
% (2) SINUS SIGNAL WITH 2 FREQUENCY COMPONENT
% x(i)=xo*exp(-xi*freqa*t(i))*sin(2*pi*freqa*t(i)*leak) + ...
% xo*exp(-xi*freqa*t(i))*sin( 4*2*pi*freqa*t(i)*leak);
%
% (3) SINUS SIGNAL WITH 4 FREQUENCY COMPONENT
% x(i)=xo*exp(-xi*freqa*t(i))*sin(0*2*pi*freqa*t(i)*leak) + ...
% xo/2*exp(-xi*freqa*t(i))*sin(2*2*pi*freqa*t(i)*leak) + ...
% xo/4*exp(-xi*freqa*t(i))*sin(4*2*pi*freqa*t(i)*leak) + ...
% xo/6*exp(-xi*freqa*t(i))*sin(6*2*pi*freqa*t(i)*leak);
%
% (4) SINUS SIGNAL + NOISE
% const = 0.5;
% ruido(i) = randn;

22
% x(i)=xo*exp(-xi*freqa*t(i))*sin(2*pi*freqa*t(i)*leak)+const*ruido(i);
%
% (5) STEP WAVE
% x(i)=xo*exp(-xi*freqa*t(i))*sign(sin(2*pi*freqa*t(i)*leak));

end

y=fft(x);

figure(1)
title(’Signal Analysis in Time and Frequency Domain’,’FontSize’,18)
subplot(3,1,1), plot(t,x,’r-’)
title(’(a) Time Domain - (b)
and (c) Frequency Domain with N and N/2 points’,’FontSize’,18)
xlabel(’time [s]’,’FontSize’,18)
ylabel(’(a)’,’FontSize’,18)
grid

subplot(3,1,2), plot(f(1:n),abs(y(1:n)),’r-’)
xlabel(’frequency [Hz]’,’FontSize’,18)
ylabel(’(b)’,’FontSize’,18)
grid

subplot(3,1,3), plot(f(1:n/2),abs(y(1:n/2)),’r-’)
xlabel(’frequency [Hz]’,’FontSize’,18)
ylabel(’(c)’,’FontSize’,18)
grid

23
8 Analyzers and Signal Processing

24
25
26
27
28
29

You might also like