Stáhnout soubor

advertisement
O metodě konečných prvků
Lect_15.ppt
FFT and FEM
M. Okrouhlík
Ústav termomechaniky, AV ČR, Praha
Plzeň, 2010
Obsah
•
•
•
•
•
Terminologie
Fourierova řada
CFT, DFT a FFT
Pár příkladů
Mudrování o platnosti MKP výsledků
Terminologie
Fourierova řada, CFT, DFT a FFT
•
•
•
•
Fourier series
Continuous Fourier Transform
Discrete Fourier Transform
Fast Fourier Transform
Fourierova řada, 20 členů
T = Tmax = n * Timp, n = 2,4,8,16
Obdélníkový puls – CFT
tři obdélníkové pulsy různé délky – různá normalizace
C( ) = 2*abs(sin( T/2))/
-5
Amplitude spectrum
5
x 10
timp = 1e-5
timp = 2e-5
timp = 5e-5
4
3
2
1
0
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
5
x 10
C( )/T = 2*abs(sin( T/2))/( T)
Amplitude spectrum
1
timp = 1e-5
timp = 2e-5
timp = 5e-5
0.8
0.6
0.4
0.2
0
0
f3 3 fft c3.m, fig1
0.2
0.4
0.6
0.8
1
frequency in Hz
1.2
1.4
1.6
1.8
2
5
x 10
FFT je způsob výpočtu DFT
Základní vztahy_1
Sampling rate,
vzorovací frekvence
Continuous and sampled forms of a signal
20
15
10
5
0
-5
-10
-15
-20
0
5
10
15
20
25
30
35
40
30
35
40
Coarse sampling spoils the signal
20
15
10
5
0
-5
-10
-15
-20
0
5
continuous and sampled fig1
10
15
20
time
25
Základní vztahy_2
Je to vztah mezi číselnými hodnotami
Pro diskusi o významu termínu power spectrum jsou následující důležité vztahy
mean(y) = sum(y)/N
Area = tmax*sum(y)/(N–1) = tmax*mean(y)*N/(N-1) ~ tmax*mean(y)
první členy řad Y a pY
Y(1) = mean(y) * N
pY(1) = mean(y) * mean(y) * N
c0 

t final

t initial
i 0t


P
t
e
dt 

 Pt  dt
Základní vztahy_3
FFT
Obdélníkový puls
a MPS
(Fast Fourier Transform)
(Matlab Power Spectrum)
sampled signal
4
3
2
1
0
0
1
2
3
4
5
6
7
time [s]
FFT spectrum - real part
FFT spectrum - imaginary part
20
20
Nyquist
10
10
0
-10
0
0
10
20
30
40
50
-10
60
counter
0
10
20
30
40
50
60
counter
FFT power spectrum
5
4
Nyquist
3
2
1
0
0
kkk c1 fig1
0.5
1
1.5
2
2.5
frequency [Hz]
3
3.5
4
4.5
5
Význam členů y(1) a Y(1)
Normalization of FFT data
Základní vztahy_4
Základní vztahy_5
Nyquistova
frekvence
závisí na
tom, zda
počet
vzorků je
sudý či
lichý.
Je-li počet
vzorků
velký,
rozdíl
nestojí za
řeč.
function [f, p_x, n_f] = power_spect_c2(t,x)
% compute fft power spectrum for x signal in time domain
% input
% t ... time ..... t(i) ... i = 1 : N
% time range ..... t = 0 : dt : tmax
% x ... signal ... x(i) ... i = 1 : N
% output
%f
frequency
f(i) ..... i = 1 : NF
% p_x
complete fft power spectrum p_x(i) ... i = 1 : N
% n_f ... Nyquist frequency
% number of sampled points
N = length(t);
% dt .. time increment, assumed uniform
dt = t(2) - t(1);
% sampling frequency = sampling rate
s_r = 1/dt;
% Nyquist frequency
n_f = 0.5*s_r;
% is N odd or even? use the reminder function
rm = rem(N,2);
% calculate increment of frequencies and frequencies
if rm == 0,,
df = s_r/N; f = (0:N/2)*df;
% N is even
else
df = s_r/(N-1); f = (0:(N-1)/2)*df; % N is odd
end
NF = length(f);
% Fourier spectrum
f_x = fft(x);
% complete power spectrum
p_x = f_x.*conj(f_x)/N;
% the first half of the power spectrum
p_x = p_x(1:NF);
% end of power_spect_c2
Obdélníkový puls – CFT
tři obdélníkové pulsy různé délky – různá normalizace
C( ) = 2*abs(sin( T/2))/
-5
Amplitude spectrum
5
x 10
timp = 1e-5
timp = 2e-5
timp = 5e-5
4
3
2
1
0
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
5
x 10
C( )/T = 2*abs(sin( T/2))/( T)
Amplitude spectrum
1
timp = 1e-5
timp = 2e-5
timp = 5e-5
0.8
0.6
0.4
0.2
0
0
f3 3 fft c3.m, fig1
0.2
0.4
0.6
0.8
1
frequency in Hz
1.2
1.4
1.6
1.8
2
5
x 10
CFT vs. FFT
three different rectangular pulses, the same sampling and the same window
time domain
timp = 0.1
timp = 0.2
timp = 0.5
1
1
1
0.8
0.8
0.8
0.6
0.6
0.6
0.4
0.4
0.4
0.2
0.2
0.2
matlab power spectrum
0
0
0.2
0.4
0.6
0.8
time [s]
1
0
0
0.2
0.4
0.6
0.8
time [s]
-4
x 10
1/dt
4
0.2
0.4
0.6
0.8
time [s]
1
-4
x 10
100
15
1/timp
3
10
50
2
5
1
0
0
0.5
1
1.5
2
0
0.5
1
1.5
2
0
20
20
20
10
10
10
1.5
frequency [Hz]
2
1.5
0
0
5
x 10
F3 3 fft c3.m, fig2 ... the same w indow and sampling rate, three different pulses
0.5
1
1.5
frequency [Hz]
2
5
x 10
2
x 10
30
1
1
5
30
0.5
0.5
x 10
x 10
0
0
5
30
0
0
20
5
0
0
x 10
5
mps/mean/timp
1
-4
0
0
0.5
1
1.5
frequency [Hz]
2
5
x 10
CFT vs. FFT
the same rectangular pulse, the same sampling and three different windows
rectangular pulse
tmax = 2*timp
tmax = 4*timp
1
1
1
0.8
0.8
0.8
0.6
0.6
0.6
0.4
0.4
0.4
0.2
0
0.2
mean1 = 0.5
0
0.2
0.4
0.6
0.8
time [s]
1
0
1.2
0
0.2
0.4
-4
x 10
0.6
0.8
time [s]
1
0
1.2
20
10
20
10
5
4
5
0
0
1
5
x 10
0.5
2
3
frequency [Hz]
4
5
1.2
-4
x 10
0
c03 = mean12 * N3
0
1
5
x 10
0.5
0.4
1
20
40
2
3
frequency [Hz]
0.6
0.8
time [s]
Nyquist = 5000000 [Hz]
15
1
0.4
c02 = mean22 * N2
c01 = mean1 * N1
0
0.2
x 10
30
0
0
-4
40
2
60
mean3 = 0.125
Nyquist = 5000000 [Hz]
80
power spectrum
0.2
mean2 = 0.25
Nyquist = 5000000 [Hz]
normalized power spectrum
tmax = 8*timp
2
3
frequency [Hz]
4
2
3
frequency [Hz]
4
5
5
x 10
0.5
df2
0.4
0.4
df1
0.3
0.3
0.3
0.2
0.2
0.2
0.1
0.1
0.1
0
0
1
2
3
frequency [Hz]
4
5
5
x 10
0
0
1
2
3
frequency [Hz]
4
5
5
x 10
0
0
1
5
5
x 10
Fyzikální význam
Denoting the discretized time evolution of reference pulse P   P1 P2 Pn T we can express its
1 n
mean value Pmean  Pi and the approximate the area under the pulse
n i 1
tfinal
 Pt  dt
by Pmean T .
tinitial
The physical meaning of the last expression is the mean impulse. The area under the
pulse can also be expressed by means of the first term of the continuous Fourier’s transform,
CFT [Doyle, 1997]. This is the term corresponding to zero-th frequency and has the form

c0 
 Pt  e

i 0t
dt 
t final
 Pt  dt .
t initial
Pokud je tedy vstupní veličinou síla,
pak power spectrum (výkonové)
by se mělo nazývat
momentum (hybnostní) spectrum
Momentum - hybnost
Four different input pulses and their average
The correlation between ˆc0 and Pmean values is shown in the first column of subfigures in
Fig. 12. They are plotted as functions of the pulse counter. Both of them are readily available at
the time of experiment and bear information related to the total momentum since the impulse of
the loading force is equal to the rate of momentum, i.e. P dt  m dv . Observing these two
quantities one can easily judge the magnitude of the total impulse of the loading force.
The second couple of quantities that could be correlated (see the subfigures in the righthand side column of Fig. 12) are the Euclidean norm of the time history of the loading
pulse

n
2
and the square root of the total input energy. This follows from the fact
P
i
i 1
that the energy is proportional to the quadratic form of displacements and velocities, i.e.
qT Kq  q T Mq and could also be expressed as proportional to the quadratic form of
applied forces QT K1 Q  Q T  M1 Q T  , where q, q are global arrays of
displacements and velocities ‘measured’ at time tfinal , M, K are mass and stiffness
matrices,  T is the time interval during which the mean global loading vector, defined
by Q  0 0 0 Pmean 0 0 0 T , is applied. So observing the norm value one can estimate
amount of energy being delivered by the pulse to the mechanical system.
T
Tube with four spiral slots, coarse mesh, dimensions
Four different meshes
Comparison of FE and EXP data for axial strains in different locations
C:\spiral_slot_2006_backup_from_2007_10_24\1_u_2007_december_changed_data\u_2007_data_from_urmas_march_2007\ToMila\plot_urmas_data_march_2007_c1, f6
-4
2
LOC1 - exp vs. FE 3D, NM
x 10
0
-2
experiment
FE analysis
-4
0
0.5
1
1.5
2
2.5
3
3.5
-4
-4
axial strain
2
x 10
LOC2 - exp vs. FE 3D, NM
x 10
0
-2
experiment
FE analysis
-4
0
0.5
1
1.5
2
2.5
3
time
-4
2
3.5
-4
x 10
LOC3 - exp vs. FE 3D, NM
x 10
0
-2
experiment
FE analysis
-4
0
0.5
1
1.5
2
time
2.5
3
3.5
-4
x 10
Comparison of filtered FE and EXP data for axial strains in
different locations
C:\spiral_slot_2006_backup_from_2007_10_24\1_u_2007_december_changed_data\u_2007_data_from_urmas_march_2007\ToMila\plot_urmas_data_march_2007_c1, f5
-4
2
LOC1 - exp vs. FE 3D, NM - filtered to experimental frequency cutoff
x 10
G1R90L, mesh1, medium striker for all figures
urmas data march 2007
0
-2
experiment
FE analysis, filtered
-4
0
0.5
1
1.5
2
2.5
3
3.5
-4
x 10
-4
axial strain
2
LOC2 - exp vs. FE 3D, NM
x 10
0
-2
experiment
FE analysis, filtered
-4
0
0.5
1
1.5
2
2.5
3
time
-4
2
3.5
-4
x 10
LOC3 - exp vs. FE 3D, NM
x 10
0
dt = 1e-7; sr = 1/dt; nf = sr/2 = 5000000; rel cut off = 1/50 = 0.02
-2
abs cut off = nf*rel cut off = 100000
experiment
FE analysis, filtered
f order = 2; [b,a] = butter(f order,rel cut off)
-4
0
0.5
1
1.5
2
time
2.5
3
3.5
-4
x 10
FE data were filtered by a filter having the same upper frequency as the
experiment sampling frequency
And this leads to a question.
That is, up to which frequency limit is the FE approach trustworthy?
We know that FE method is a model of continuum.
Continuum – also a model – being based on the continuity
hypothesis, disregards the corpuscular structure of matter. It is
assumed that matter within the observed specimen is distributed
continuously and its properties do not depend on the specimen
size.
Quantities describing the continuum behavior are
expressed as piecewise continuous functions of time and space. It
is known, see [2], that such a conceived continuum has no upper
frequency limit.
To find a ‘meaningful’ frequency limit of FE model, which is
of discrete – not continuous – nature, one might pursue the
following heuristic reasoning.
Rule of thump
1mm corresponds to 1 MHz
Easy to remember
Imagine a uniform finite element mesh with a characteristic element size, say s . Trying
to safely ‘grasp’ a harmonic component (having the wavelength  ) by this element size
we require that at least five-element length fits the wavelength. This leads to   5s .
What is the frequency of this harmonics? Taking a typical wave speed value in steel of
about c  5000m/s and realizing that   cT and f  1/ T , we get the sought-after
‘frequency limit’ in the form f  c /(5s) . For a one-millimeter element we
5000
 1  10 6 Hz  1 MHz . Let’s call it the five-element frequency, denoting
get f 
5  0.001
it f 5elem in the text.
Bathe recommends 10 here
When looking for the upper frequency limit
of a discrete approach to continuum problems,
we could proceed as follows
s

  5s
  cT
c  5000m/s
f  1/ T
f  c /(5s)
• Characteristic element size
• Wavelength to be registered
• How many elements into the
wavelength
• Wavelength to period relation
• Wave velocity in steel
• Frequency to period relation
• The limit frequency
• For 1 mm element we have
5000
f 
 110 6 Hz  1 MHz
5  0.001
Limits of continuum, FE analysis and experiment
characteristic sizes and corresponding frequencies
atom size
austenite steel grain size
1 mm finite element
1 MHz level
1 GHz level
FE analysis range from 0.1mm to 100mm
maximum exp. sampling limit 100 MHz - 14 bits
8
10
6
frequency in [Mhz]
10
Where is the continuum limit?
4
10
2
10
10 MHz
0
10
-2
10
-10
10
-8
10
-6
10
size in [m]
-4
10
-2
10
All considered material properties within the
observed infinitesimal element are identical
with those of a specimen of finite size
10 kHz
-4
2
Back to our
example
LOC1 - exp vs. FE 3D, NM
x 10
0
-2
experiment
FE analysis
-4
0.5
0
1
2
1.5
2.5
3.5
3
-4
-4
axial strain
2
x 10
LOC2 - exp vs. FE 3D, NM
x 10
0
-2
experiment
FE analysis
-4
0.5
0
1
2
1.5
2.5
2
3.5
3
time
-4
-4
x 10
LOC3 - exp vs. FE 3D, NM
x 10
0
-2
experiment
FE analysis
-4
0
0.5
1
2
1.5
time
2.5
3
3.5
-4
x 10
Observing the original (or raw) FE signal in Fig. 4 we may notice its three significant
characteristics. First, the negative peak representing the input rectangular pulse, as it was
changed on its way from the loading face of the tube to the measurement location;
second, the slow frequency variation of the tail of the signal and finally the high
frequency components superimposed on the signal everywhere.
To estimate the low frequencies, appearing in the signal, let’s consider the lowest
frequency of the unsupported infinitely long thin shell of the radius r . In [21] there is
1
E
1 
derived the formula f 
, which when applied to our case gives
2 r  (1   )(1  2 )
the value of 93 kHz. Due to the corresponding mode of vibration, let’s call this frequency
the lowest breathing frequency.
The first eigenfrequency of an infinitely long thin-walled tube
Breathing frequency
The tube has the thickness h, which is substantially smaller than its radius r.
The material constants are Young’s modulus E, density  and the Poisson’s ratio  .
.
Assuming that the symmetry, radial and circumferential axes are denoted x, y and z
respectively, we can write

 xx 
1  
 
 
1 
E
 yy 


 
0
 xy  (1   )(1  2 )  0

 zz 

 
   xx 
   yy 
0
 
0   xy 
(1  2 ) / 2

1     zz 
0
0
Let’s assume that in this case only radial displacement u y is non-zero.
Assume the free body diagram of the mass element whose elementary mass
is dm   rh d dz . The radial displacement evokes stresses  zz acting on both sides of the
element having the surface area hdz. The corresponding elementary forces are dP   zz h dz .
The equation of motion for the radial direction with the resultant of P-forces is
dm uy  2 dP sin(d / 2)  0 .
Furthermore
 zz 
u
E (1   )
 zz ;  zz  y ; sin(d / 2)  d / 2.
(1   )(1  2 )
r
Assuming the harmonic motion in the form u y  U eit and its second time derivative,
substituting this and the previous relations into the equation of motion, and rearranging we get

1 E
1 
.
r  (1   )(1  2 )
Zig-zag frequency
The faster frequency appearing in time distributions of displacements and strains is
called the zig-zag frequency in the text.
For the zig-zag frequency estimation let’s pursue the following reasoning. The
case we are dealing with is three-dimensional even if its axial dimension is predominant
and the thickness of the tube is rather small comparing to its axial length. Also the
applied loading is rather mild – meaning that the time length of the pulse is relatively
long with respect to time needed for a wave to pass through the overall length of the
tube. Still, in reality there is a fully 3D wave motion pattern appearing within the tube
cross section that is dutifully detected by the FE modeling we are employing.
According to Huygens’ Principle each point on the surface being hit by a wave is
a source of two kinds of waves – the longitudinal and transversal (shear) waves,
respectively. [3].
2D wavefronts, Huygen’s principle
Material points having been hit
by primary wave become
sources of both types of waves
i.e. P and S
transversal,
shear,
S-wave
Von Schmidt wavefront
primary,
longitudinal,
P-wave
dp007
At the beginning of the loading process the frequencies of evoked waves can be
crudely estimated the following way. Each type of wave, being emanated from the outer
surface, propagates through the tube thickness, is reflected from the inner surface, and
hits the outer surface after the time interval
2s
2s
,
tS  , tL 
cL
cT
where the tube thickness is denoted by s . The process is repeated. The corresponding
estimates of frequencies of S- and L-waves hitting the outer surface are
1
1
fS  , f L  .
tL
tS
Considering the given geometry and material properties the numerical values for
these frequencies are
fS  0.54 MHz, f L  0.93 MHz.
In the text we will call them zig-zag frequencies with attributes L (for
longitudinal waves) and with S (for shear waves) respectively.
Transfer function for mesh1. NM vs.CD. Limit frequencies.
C:\miok_2007\spiral_slot_2006_backup_from_2007_10_24\axisym\mesh_refinement_medium_striker_nm\ check_data_10.m, f5
imput pulse
4
2.5
x 10
-5
x 10
radial NM
axial NM
radial CD
axial CD
3
2
1.5
2
1
1
0.5
0
0
0
1
2
time
3
4
0
1
2
time
-5
x 10
transfer function, input vs. rad. disp
-10
6
mesh1, disp, corner node
x 10
4
-5
x 10
NM
CD
breathing frequency
zig-zag L frequency
zig-zag S frequency
FE limit frequency cons
FE limit frequency diag
5elem frequency
4
2
0
0
3
0.5
1
1.5
2
2.5
3
frequency from 0 to Nyquist
3.5
4
4.5
5
6
x 10
Transfer functions for different meshes from 0 to Nyquist
C:\miok_2007\spiral_slot_2006_backup_from_2007_10_24\axisym\mesh_refinement_medium_striker_nm\ check_data_10.m, f13
6
x 10
-10
axisym, corner, rad. disp, mesh1
3
NM
CD
breathing frequency
zig-zag L frequency
zig-zag S frequency
FE limit frequency cons
FE limit frequency diag
5elem limit frequency
transfer function
5
4
3
2
1
0
0
1
2
3
4
x 10
transfer function
1.5
1
0.5
0
0
-5
NM
CD
breathing frequency
zig-zag L frequency
zig-zag S frequency
FE limit frequency cons
FE limit frequency diag
5elem limit frequency
1.5
1
0.5
0
0
2
4
6
8
6
NM
CD
breathing frequency
zig-zag L frequency
zig-zag S frequency
FE limit frequency cons
FE limit frequency diag
5elem limit frequency
1.2
1
0.8
0.6
0.4
0.2
2
7
10
x 10
x 10
x 10
axisym, corner, rad. disp, mesh2
2
axisym, corner, rad. disp, mesh3
0.5
1
1.5
frequency from 0 to Nyquist [Hz]
-5
2.5
5
x 10
x 10
0
0
-5
6
axisym, corner, rad. disp, mesh4
NM
CD
breathing frequency
zig-zag L frequency
zig-zag S frequency
FE limit frequency cons
FE limit frequency diag
5elem limit frequency
1
2
3
frequency from 0 to Nyquist [Hz]
4
x 10
7
Transfer functions for different meshes from 0 to 2 MHz
C:\miok_2007\spiral_slot_2006_backup_from_2007_10_24\axisym\mesh_refinement_medium_striker_nm\ check_data_10.m, f14
transfer function
4
x 10
-10
axisym, corner, rad. disp, mesh1
1
NM
CD
breathing frequency
zig-zag L frequency
zig-zag S frequency
3
2
-5
axisym, corner, rad. disp, mesh2
NM
CD
breathing frequency
zig-zag L frequency
zig-zag S frequency
0.8
0.6
0.4
1
0.2
0
0
0.5
1
1.5
2
x 10
1
transfer function
x 10
x 10
0.8
0.6
-5
0
0
axisym, corner, rad. disp, mesh3
1
NM
CD
breathing frequency
zig-zag L frequency
zig-zag S frequency
0.6
0.2
0.2
2
x 10
x 10
0.8
0.4
0.5
1
1.5
frequency range from 0 to 2 MHz
1
1.5
6
2
x 10
0.4
0
0
0.5
6
0
0
-5
6
axisym, corner, rad. disp, mesh1
NM
CD
breathing frequency
zig-zag L frequency
zig-zag S frequency
0.5
1
1.5
frequency range from 0 to 2 MHz
2
x 10
6
Observing Fig. 7 one should notice the subsequent ‘convergence’ of CD and NM
peaks within the zig-zag frequency interval. The natural explanation is that with the finer
meshsize, and with the correspondingly smaller timestep, both methods operate in ‘good’
frequency intervals where their spatial and temporal discretization errors are minimized.
The presented transfer spectra for four studied meshes show




a distinct indication of the breathing and zig-zag frequencies,
the ‘convergence’ of CD and NM responses,
subsequent disappearance of ‘false’ CD responses and
that the ‘dubious’ CD frequency peaks do not have their counterparts in NM
responses.
What remains to be compared is the ‘raw’ FE signal with that the frequencies
higher than the five-element frequency were filtered out. The results for the ‘raw’ and
filtered FE signals, for the mesh1 and the NM operator with consistent mass matrix, are
presented in Fig. 8.
FE raw signal compared to that in which the frequencies
higher than five-element ones were filtered out.
C:\spiral_slot_2006_backup_from_2007_10_24\1_u_2007_december_changed_data\u_2007_data_from_urmas_march_2007\ToMila\plot_urmas_data_march_2007_c1.m, f10
-4
1
LOC1 - FE 3D, mesh1, NM raw signal vs. filtered to FE 5elem cutoff
x 10
axial strain
0
In future these results might be
confirmed by a new and more
sophisticated experiment having a
lower observational threshold, a higher
sampling rate and also a higher
frequency amplifier cut-off .
-1
-2
-3
FE analysis, filtered to 5elem cutoff
FE analysis, raw data
-4
0.6
0.7
0.8
0.9
1
time [s]
1.1
1.2
1.3
1.4
1.5
-4
x 10
Conclusions
The FE analysis is a robust tool giving reliable results with a
satisfactory engineering precision in standard tasks of continuum mechanics.
Nevertheless, employing the FE method in cases on borders of their
applicability is tricky and obtained results have to be treated with utmost care,
since they might be profoundly influenced by intricacies of finite element
technology.
It should be emphasized, however, that testing the methods in the
vicinity of borders of their applicability we do not want to discredit them, on
the contrary, the more precise knowledge of their imperfections makes us –
users – more confident in them.
Download