Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
SR2009
Fourier Transforms 1
SHORT TIME FOURIER TRANSFORMS
Erwin M. BakkerLML LIACS
SR 2009, March 5th 2009
- SR2009 - Fourier Transforms 2 / 54
OverviewOverview
• Analog and Digital Signals• Fourier Transforms
Material slightly adapted from lectures byDr M.E. Angoletta at DISP2003, a DSP course given by CERN and University of Lausanne
(UNIL) http://humanresources.web.cern.ch/humanresources/external/training/tech/spe
cial/DISP2003.asp
- SR2009 - Fourier Transforms 3 / 54
Analog and Digital SignalsAnalog and Digital Signals
1. From Analog to Digital Signal
2. Sampling & Aliasing
- SR2009 - Fourier Transforms 4 / 54
Analog and Digital SignalsAnalog and Digital Signals
Continuous functionContinuous function F of a continuouscontinuous variable t (t can be time, space etc) : F(t)
Analog SignalsDiscrete functionDiscrete function Fk of a discretediscrete (sampling) variable tk, with k an integer: Fk = F(tk).
Digital Signals
Uniform (periodic) sampling with sampling frequency fS = 1/ tS, e.g., ts = 0.001 sec => fs = 1000Hz
SR2009
Fourier Transforms 2
- SR2009 - Fourier Transforms 5 / 54
Digital System ImplementationDigital System Implementation
• Sampling rate.
• Pass / stop bands.
KEY DECISION POINTS:KEY DECISION POINTS:Analysis bandwidth, Dynamic range
• No. of bits. Parameters.
Digital Processing
A/D
AntialiasingFilter
ANALOG INPUTANALOG INPUT
DIGITAL OUTPUTDIGITAL OUTPUT
• Digital format.
- SR2009 - Fourier Transforms 6 / 54
SamplingSamplingHow fast must we sample a continuous signal to preserve its info content?
Ex: wheels in a movie.
25 frames (=samples) per second.
Frequency misidentification due to low sampling frequency.
Train starts wheels ‘go’ clockwise.
Train accelerates wheels ‘go’ counter-clockwise.
1
Why?Why?
* Sampling: independent variable (ex: time) continuous → discrete.Quantisation: dependent variable (ex: voltage) continuous → discrete.Here we’ll talk about uniform sampling.
**
- SR2009 - Fourier Transforms 7 / 54
Sampling - 2Sampling - 2
__ s(t) = sin(2πf0t)
-1.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
t
s(t) @ fSf0 = 1 Hz, fS = 3 Hz
-1.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
t
__ s1(t) = sin(8πf0t)
-1.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
t
__ s2(t) = sin(14πf0t)-1.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
t
sk (t) = sin( 2π (f0 + k fS) t ) , k ∈
s(t) @ fS represents exactly all sine-waves sk(t) defined by:
1
- SR2009 - Fourier Transforms 8 / 54
The sampling theoremThe sampling theoremA signal s(t) with maximum frequency fMAX can be recovered if sampled at frequency fS > 2 fMAX .
Condition on fS?
fS > 300 Hz
t)cos(100πt)πsin(30010t)πcos(503s(t) −⋅+⋅=
F1=25 Hz, F2 = 150 Hz, F3 = 50 Hz
F1 F2 F3
fMAX
Example
1
Theorem
* Multiple proposers: Whittaker(s), Nyquist, Shannon, Kotel’nikov.
Nyquist frequency (rate) fN = 2 fMAX
SR2009
Fourier Transforms 3
- SR2009 - Fourier Transforms 9 / 54
Frequency DomainFrequency Domain
•• Time & frequencyTime & frequency: two complementary signal descriptions. Signals seen as “projected’ onto time or frequency domains.
1
•• BandwidthBandwidth: indicates rate of change of a signal. High bandwidth signal changes fast.
EarEar + brain act as frequency analyser: audio spectrum split into many narrow bands low-power sounds detected out of loud background.
Example
- SR2009 - Fourier Transforms 10 / 54
Sampling low-pass signalsSampling low-pass signals
-B 0 B f
Continuous spectrum (a) Band-limited signal: frequencies in [-B, B] (fMAX = B).
(a)
-B 0 B fS/2 f
Discrete spectrumNo aliasing (b) Time sampling frequency
repetition.
fS > 2 B no aliasing.
(b)
1
0 fS/2 f
Discrete spectrum Aliasing & corruption (c)
(c) fS 2 B aliasing !aliasing !
Aliasing: signal ambiguity Aliasing: signal ambiguity in frequency domainin frequency domain
sk (t) = sin( 2π (f0 + k fS) t ) , k ∈ N
Note: s(t) at fS represents all sine-waves sk(t) defined by:k = 1 k=0 k = 1
- SR2009 - Fourier Transforms 11 / 54
Antialiasing filterAntialiasing filter
-B 0 B f
Signal of interest
Out of band noise Out of band
noise
-B 0 B fS/2 f
(a),(b) Out-of-band noise can aliaseinto band of interest. Filter it before!Filter it before!
(a)
(b)
-B 0 B f
Antialiasing filter Passband
frequency
(c)
Passband: depends on bandwidth of interest.
(c) AntialiasingAntialiasing filterfilter
1
- SR2009 - Fourier Transforms 12 / 54
Under-samplingUnder-sampling1
Using spectral replications to reduce Using spectral replications to reduce sampling frequency sampling frequency ffSS requirements.requirements.
mBCf2
Sf1mBCf2 −⋅
≤≤+
+⋅
m∈ , selected so that fS > 2B
B
0 fC
Bandpass signalcentered on fC
-fS 0 fS 2fS fC
AdvantagesAdvantages
Slower ADCs / electronics Slower ADCs / electronics needed.needed.
Simpler Simpler antialiasingantialiasing filters.filters.
fC = 20 MHz, B = 5MHz
Without under-sampling fS > 40 MHz.
With under-sampling fS = 22.5 MHz (m=1);
= 17.5 MHz (m=2); = 11.66 MHz (m=3).
ExampleExample
SR2009
Fourier Transforms 4
- SR2009 - Fourier Transforms 13 / 54
Over-samplingOver-sampling1
fOS = over-sampling frequency,w = additional bits required.fOS = 4w · fS
Each additional bit implies/requires overEach additional bit implies/requires over--sampling by a factor of four. sampling by a factor of four.
Oversampling : sampling at frequencies fS >> 2 fMAX .
Over- sampling & averaging may improve ADC resolution( i.e. SNR, see )2
- SR2009 - Fourier Transforms 14 / 54
(Some) ADC parameters(Some) ADC parameters1. Number of bits N (~resolution)
2. Data throughput (~speed)
3. Signal-to-noise ratio (SNR)
4. Signal-to-noise-&-distortion rate (SINAD)
5. Effective Number of Bits (ENOB)
6. …
NB: Definitions may be slightly manufacturerNB: Definitions may be slightly manufacturer--dependent!dependent!
Different applications Different applications have different needs.have different needs.
2
Static distortionStatic distortion
Imaging / video
Communication
Radar systems
- SR2009 - Fourier Transforms 15 / 54
ADC - Number of bits NADC - Number of bits NContinuous input signal digitized into 2N levels.
-4
-3
-2
-1
0
1
2
3
-4 -3 -2 -1 0 1 2 3 4
000
001
111
010
V
VFSR
Uniform, bipolar transfer function (N=3)Uniform, bipolar transfer function (N=3)
Quantisation stepQuantisation step q =V max
2N
Ex: Vmax = 1V , N = 12 q = 244.1 µV
Voltage ( = q)
Scale factor (= 1 / 2N )
Percentage (= 100 / 2N )
-1
-0.5
0
0.5
1
-4 -3 -2 -1 0 1 2 3 4
- q / 2
q / 2
Quantisation errorQuantisation error
2
- SR2009 - Fourier Transforms 16 / 54
ADC - Quantisation errorADC - Quantisation error2
• Quantisation Error eq in[-0.5 q, +0.5 q].
• eq limits ability to resolve small signal.
• Higher resolution means lower eq.
-0.2
-0.1
0
0.1
0.2
0.3
0 2 4 6 8 10
time [ms]
Volta
ge [V
]
QE forN = 12VFS = 1
0 2 4 6 8 10
Sampling time, tk
|e q
| [V
]
10-4
2 10-4
SR2009
Fourier Transforms 5
- SR2009 - Fourier Transforms 17 / 54
SNR of ideal ADCSNR of ideal ADC2
( )
⋅=
)qRMS(einputRMS
10log20idealSNR (1)
Also called SQNR(signal-to-quantisation-noise ratio)
(RMS = root mean square)
Ideal ADC: only quantisation error eeqq(p(e)p(e) constant, no stuck bits…)
eeqq uncorrelated with signal.
ADC performance constant in time.
AssumptionsAssumptions
( ) ( )22
FSRVT
0dt
2ωtsin
2FSRV
T1inputRMS =
⋅⋅= ∫ Input(t) = ½ VInput(t) = ½ VFSRFSR sin(sin(ωω t).t).
( )12N2
FSRV12q
q/2
q/2-qdeqep2
qe)qRMS(e⋅
==⋅= ∫
eeqq Error value
pp((ee)) quantisation error probability density
1q
q2
q2
(sampling frequency fS = 2 fMAX)
- SR2009 - Fourier Transforms 18 / 54
SNR of ideal ADC - 2SNR of ideal ADC - 2
[dB]1.76N6.02SNRideal +⋅= (2)Substituting in (1) =>
One additional bit SNR increased by 6 dBOne additional bit SNR increased by 6 dB
2
Actually (2) needs correction factor depending on ratio between sampling freq & Nyquist freq. Processing gain due to oversampling.
- Real signals have noise.
- Forcing input to full scale unwise.
- Real ADCs have additional noise (aperture jitter, non-linearities etc).
Real SNR lower because:Real SNR lower because:
- SR2009 - Fourier Transforms 19 / 54
ADC selection dilemmaADC selection dilemmaSpeed & resolution:Speed & resolution:
a tradeoff.a tradeoff.Effective Number of Bits (ENOB)
2
High resolution (bit #)- Higher cost & dissipation.
- Tailored onto DSP word width.
High speed- Large amount of data to store/analyse.
- Lower accuracy & input impedance.
**
** DIFFICULTDIFFICULT area moves down & right every year. Rule of thumb: 1 bit improvement every 3 years.
may increase SNR.2OversamplingOversampling & averaging& averaging (see ).
DitheringDithering ( = adding small random noise before quantisation).
Sound cards: x
- SR2009 - Fourier Transforms 20 / 54
Finite word-length effects Finite word-length effects
Dynamic Dynamic rangerangedBdB = 20 log10largest value
smallest value
Fixed point ~ 180 dB
Floating point ~1500 dB
High dynamic range wide data set representation with no overflow.
NB: Different applications have different needs. Ex: telecomms: 50 dB; HiFi audio: 90 dB.
OverflowOverflow : arises when arithmetic operation result has one too many bits to be represented in a certain format.
SR2009
Fourier Transforms 6
- SR2009 - Fourier Transforms 21 / 54
Fourier TransformsFourier Transforms
1. Frequency analysis: a powerful tool
2. A tour of Fourier Transforms
3. Continuous Fourier Series (FS)
4. Discrete Fourier Series (DFS)
- SR2009 - Fourier Transforms 22 / 54
Frequency AnalysisFrequency Analysis• Fast & efficient insight on signal’s building blocks.
• Simplifies original problem - ex.: solving Part. Diff. Eqns. (PDE).
• Powerful & complementary to time domain analysis techniques.
• Several transforms: Fourier, Discrete Cosine, Laplace, z, Wavelet, etc.
time, t frequency, fF
s(t) S(f) = F[s(t)]
analysisanalysis
synthesissynthesis
s(t), S(f) : Transform Pair
General Transform as General Transform as problemproblem--solving toolsolving tool
- SR2009 - Fourier Transforms 23 / 54
Fourier Analysis - ApplicationsFourier Analysis - ApplicationsWide range of applications:Wide range of applications:
•• TelecommsTelecomms - GSM/cellular phones, codec's,
•• Electronics/ITElectronics/IT - most DSP-based applications
•• Imaging, image processing, Compression techniquesImaging, image processing, Compression techniques
•• MMultimedia: sound, image, audio, video
• Remote sensing: SAR
•• Industry/researchIndustry/research - X-ray spectrometry, chemical analysis (FT spectrometry), PDE solution, radar design,
•• MedicalMedical - PET scanner, CAT scans & MRI interpretation for sleep disorder & heart malfunction diagnosis,
•• Speech analysisSpeech analysis: speech recognition, speech synthesis,
- SR2009 - Fourier Transforms 24 / 54
Fourier Analysis - Tools Fourier Analysis - Tools Input Time Signal Frequency spectrum
∑−
=
−⋅=
1N
0n
Nnkπ2j
k es[n]N1c~
Discrete
DiscreteDFSDFSPeriodic (period T)
ContinuousDTFTAperiodic
DiscreteDFTDFT
nfπ2jen
s[n]S(f) −⋅∞+
−∞== ∑
0
0.5
1
1.5
2
2.5
0 2 4 6 8 10 12time, tk
0
0.5
1
1.5
2
2.5
0 1 2 3 4 5 6 7 8
time, tk
∑−
=
−⋅=
1N
0nN
nkπ2jes[n]
N1
kc~
**
**
Calculated via FFT**
dttfπj2
es(t)S(f)−∞+
∞−⋅= ∫
dtT
0
tωkjes(t)T1
kc ∫ −⋅⋅=Periodic (period T)
Discrete
ContinuousFTFTAperiodic
FSFSContinuous
0
0.5
1
1.5
2
2.5
0 1 2 3 4 5 6 7 8
time, t
0
0.5
1
1.5
2
2.5
0 2 4 6 8 10 12
time, t
Note: j =√-1, ω = 2π/T, s[n]=s(tn), N = No. of samples
SR2009
Fourier Transforms 7
- SR2009 - Fourier Transforms 25 / 54
History Fourier TransformHistory Fourier Transform16691669: Newton stumbles upon light spectra (specter = ghost) but fails to recognise “frequency” concept (corpuscularcorpuscular theory of light, & no waves).
1818thth centurycentury: two outstanding problemstwo outstanding problems→ celestial bodies orbits: Lagrange, Euler & Clairaut approximate observation data
with linear combination of periodic functions; Clairaut,1754(!) first DFT formula.
→ vibrating strings: Euler describes vibrating string motion by sinusoids (wave equation). BUTBUT peers’ consensus is that sum of sinusoids onlyonly represents smooth curves. Big blow to utility of such sums for all but Fourier ...
18071807: Fourier presents his work on heat conduction Fourier presents his work on heat conduction ⇒⇒ Fourier analysis born.Fourier analysis born.→ Diffusion equation ⇔ series (infinite) of sines & cosines. Strong criticism by peers
blocks publication. Work published, 1822 (“Theorie Analytique de la chaleur”).
- SR2009 - Fourier Transforms 26 / 54
History Fourier Transform -2History Fourier Transform -21919thth / 20/ 20thth centurycentury: two paths for Fourier analysis two paths for Fourier analysis -- Continuous & Discrete.Continuous & Discrete.
CONTINUOUSCONTINUOUS
→ Fourier extends the analysis to arbitrary function (Fourier Transform).
→ Dirichlet, Poisson, Riemann, Lebesgue address FS convergence.
→ Other FT variants born from varied needs (ex.: Short Time FT - speech analysis).
DISCRETE: Fast calculation methods (FFT)DISCRETE: Fast calculation methods (FFT)
→ 18051805 - Gauss, first usage of FFT (manuscript in Latin went unnoticed!!! Published 1866).
→ 19651965 - IBM’s Cooley & Tukey “rediscover” FFT algorithm (“An algorithm for the machine calculation of complex Fourier series”).
→ Other DFT variants for different applications (ex.: Warped DFT - filter design & signal compression).
→ FFT algorithm refined & modified for most computer platforms.
- SR2009 - Fourier Transforms 27 / 54
Bases of Vector Spaces Bases of Vector Spaces
v = xe1+ye2+ze3
e1
e2
e3
v is a linear combination of the
basis vectors ei (i = 1,2,3)
eit
e2it
e3it
f(t) = k1eit+ k2e2it+k3e3it
f is a linear combination of the
basis functions eit,e2it,e3it
- SR2009 - Fourier Transforms 28 / 54
Fourier CoefficientsFourier Coefficients
w
v
cw
v-cw
Let <.,.> an in-product for our vector space V. Then we calculate
the Fourier coefficient of v in V with respect to (basis) vector w by:
cw is the component of v along the direction of w.><><
=wwwvc
,,
SR2009
Fourier Transforms 8
- SR2009 - Fourier Transforms 29 / 54
Another Space, Another BaseAnother Space, Another Base
F(t) = sin(2π.t)
- SR2009 - Fourier Transforms 30 / 54
Another Space, Another BaseAnother Space, Another Base
F(t) = sin(2π.2t)F(t) = sin(2π.t) F(t) = sin(2π.3t)
F(t) = cos(2π.t) F(t) = cos(2π.2t) F(t) = cos(2π.3t)
{ cos(2π.kt), sin(2 π.kt) }k forms a orthogonal basis
- SR2009 - Fourier Transforms 31 / 54
Linear Combination of FunctionsLinear Combination of Functions
F(t) = sin(2π.2t)
F(t) = sin(2π.t)
F(t) = sin(2π.t) + sin(2π.2t)
- SR2009 - Fourier Transforms 32 / 54
Linear Combination of FunctionsLinear Combination of Functions
F(t) = sin(2π.2t)F(t) = sin(2π.3t)
F(t) = sin(2π.t) + sin(2π.2t) + sin(2π.3t)
F(t) = sin(2π.t) + sin(2π.2t)
SR2009
Fourier Transforms 9
- SR2009 - Fourier Transforms 33 / 54
Linear Combination of FunctionsLinear Combination of Functions
F(t) = sin(2π.t) + sin(2π.2t) + sin(2π.30t)
F(t) = sin(2π.t) + sin(2π.2t) F(t) = sin(2π.t) + sin(2π.2t) + sin(2π.3t)
F(t) = sin(2π.t) + sin(2π.2t) + sin(2π.4t)
- SR2009 - Fourier Transforms 34 / 54
Linear Combination of FunctionsLinear Combination of Functions
F(t) = sin(2π.t)
F(t) = cos(2π.t) – 2.sin(2π.2t)
Phase Shift:
- SR2009 - Fourier Transforms 35 / 54
Low Band Pass FiltersLow Band Pass Filters
F(t) = sin(2π.t) + sin(2π.2t) F(t) = sin(2π.t) + sin(2π.2t) + <- low freq.
sin(2π.30t) + sin(2π.120t) <- high freq.
- SR2009 - Fourier Transforms 36 / 54
Fourier TransformsFourier Transforms
The values h of some process can be described in the time domain:• h(t) values as a function of time t (-∞< t <∞)
The same process can be described as amplitudes and phases (complex values) H in the frequency domain:
• H(f) values as a function of frequency f (-∞< f <∞)
One can transform the representation in the time domain to the representation in the frequency domain by using the Fourier Transform equation:
∫∞
∞−= dtethfH iftπ2).()(
∫∞
∞−
−= dfefHth iftπ2).()(And back, using the FT-equation:
SR2009
Fourier Transforms 10
- SR2009 - Fourier Transforms 37 / 54
Fourier Series (FS)Fourier Series (FS)
** see next slidesee next slide
A A periodicperiodic function s(t) satisfying function s(t) satisfying Dirichlet’sDirichlet’s conditions conditions ** can be expressed can be expressed as a Fourier series, with harmonically related sine/cosine termsas a Fourier series, with harmonically related sine/cosine terms..
[ ]∑∞+
=⋅−⋅+=
1kt)ω(ksinkbt)ω(kcoska0as(t)
a0, ak, bk : Fourier coefficients.
k: harmonic number,
T: period, ω = 2π/TFor all t but discontinuitiesFor all t but discontinuities
Note: {cos(kωt), sin(kωt) }kform orthogonal base of function space.
∫⋅=T
0s(t)dt
T1
0a
∫ ⋅⋅=T
0dtt)ωsin(ks(t)
T2
kb-
∫ ⋅⋅=T
0dtt)ωcos(ks(t)
T2
ka
(signal average over a period, i.e. DC term & zero-frequency component.)
analysis
analysis
synthesis
synthesis
- SR2009 - Fourier Transforms 38 / 54
Fourier Series Convergence Fourier Series Convergence
s(t) piecewise-continuous;
s(t) piecewise-monotonic;
s(t) absolutely integrable , ∞<∫T
0dts(t)
(a)
(b)
(c)
Dirichlet conditions
In any period:
Example: square wave
T
(a)
(b)
T
s(t)
(c)
if s(t) discontinuous then |ak|<M/k for large k (M>0)
Rate of convergenceRate of convergence
- SR2009 - Fourier Transforms 39 / 54
Fourier Series Analysis - 1Fourier Series Analysis - 1
* Even & Odd functions
Odd :
s(-x) = -s(x)
x
s(x)
s(x)
x
Even :
s(-x) = s(x)
FS of odd* function: square wave.
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10 t
squa
re s
igna
l, sw
(t)
2 π
0π
0
2π
π1)dt(dt
2π1
0a =
−+⋅= ∫ ∫
0π
0
2π
πdtktcosdtktcos
π1
ka =
−⋅= ∫ ∫
{ }=−⋅⋅
==
−⋅= ∫ ∫ kπcos1πk
2...π
0
2π
πdtktsindtktsin
π1
kb-
⋅
=evenk,0
oddk,πk
4
1ω2πT =⇒=
(zero average)(zero average)
(odd function)(odd function)
...t5sinπ5
4t3sinπ3
4tsinπ4sw(t) +⋅⋅
⋅+⋅⋅
⋅+⋅=
- SR2009 - Fourier Transforms 40 / 54
Fourier Series Analysis - 2Fourier Series Analysis - 2
-π/2
f1 3f1 5f1 f
f1 3f1 5f1 f
rk
θk
4/π
4/3π
fk=k ω/2π
rK = amplitude, θK = phase
rk
θk
ak
bkθk = arctan(bk/ak)rk = ak
2 + bk2
zk = (rk , θk)
vk = rk cos (ωk t + θk)
Polar
Fourier spectrum Fourier spectrum representationsrepresentations
∑∞
==
0k(t)kvs(t)
Rectangularvk = akcos(ωk t) - bksin(ωk t)
4/π
f1 2f1 3f1 4f1 5f1 6f1 f
f1 2f1 3f1 4f1 5f1 6f1 f
4/3π
ak
-bk
Fourier spectrum Fourier spectrum of squareof square--wave.wave.
SR2009
Fourier Transforms 11
- SR2009 - Fourier Transforms 41 / 54
[ ]∑=
⋅=7
1ksin(kt)kb-(t)7sw
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10t
squa
re s
igna
l, sw
(t)
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10t
squa
re s
igna
l, sw
(t)
[ ]∑=
⋅=5
1ksin(kt)kb-(t)5sw [ ]∑
=⋅=
3
1ksin(kt)kb-(t)3sw
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10t
squa
re s
igna
l, sw
(t)
[ ]∑=
⋅=1
1ksin(kt)kb-(t)1sw
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10t
squa
re s
igna
l, sw
(t)
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10t
squa
re s
igna
l, sw
(t)
[ ]∑=
⋅=9
1ksin(kt)kb-(t)9sw
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10t
squa
re s
igna
l, sw
(t)
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10t
squa
re s
igna
l, sw
(t)
[ ]∑=
⋅=11
1ksin(kt)kb-(t)11sw
Fourier Series SynthesisFourier Series SynthesisSquare wave reconstruction Square wave reconstruction
from spectral termsfrom spectral terms
Convergence may be slow (~1/k) - ideally need infinite terms.Practically, series truncated when remainder below computer tolerance(⇒ errorerror). BUTBUT … Gibbs’ Phenomenon.
- SR2009 - Fourier Transforms 42 / 54
Gibbs PhenomenonGibbs Phenomenon
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10t
squa
re s
igna
l, sw
(t)
[ ]∑=
⋅=79
1kk79 sin(kt)b-(t)sw
Overshoot exist @ Overshoot exist @ each discontinuityeach discontinuity
• Max overshoot pk-to-pk = 8.95% of discontinuity magnitude.Just a minor annoyance.
• FS converges to (-1+1)/2 = 0 @ discontinuities, in this casein this case.
• First observed by Michelson, 1898. Explained by Gibbs.
- SR2009 - Fourier Transforms 43 / 54
Fourier Series Time Shifting Fourier Series Time Shifting
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10 t
squa
re s
igna
l, sw
(t)
2 πFS of even function:FS of even function:ππ/2/2--advanced sadvanced squarequare--wavewave
π
f1 3f1 5f1 7f1 f
f1 3f1 5f1 7f1 f
rk
θk
4/π
4/3π
00a =
0=kb-
=⋅
−
=⋅
=
even.k,0
11...7,3,kodd,k,πk
4
9...5,1,kodd,k,πk
4
ka
(even function)
(zero average)
phas
eph
ase
ampli
tude
ampli
tude
Note: amplitudes unchanged BUTBUTphases advance by k⋅π/2.
- SR2009 - Fourier Transforms 44 / 54
Complex Fourier SeriesComplex Fourier Series
Complex form of FS (Laplace 1782). Harmonics ck separated by ∆f = 1/T on frequency plot.
rθ
a
bθ = arctan(b/a)r = a2 + b2
z = r ejθ
2eecos(t)
jtjt −+=
j2eesin(t)
jtjt
⋅−
=−
Euler’s notation:
e-jt = (ejt)* = cos(t) - j·sin(t) “phasor”
NoteNote: c-k = (ck)*
( ) ( )kbjka21
kbjka21
kc −⋅−−⋅=⋅+⋅=
0a0c =Link to FS real Link to FS real coeffscoeffs..
∑∞
−∞=⋅=
k
tωkjekcs(t)
∫ ⋅⋅=T
0dttωkj-es(t)
T1
kcanalysis
analysis
synthesis
synthesis
SR2009
Fourier Transforms 12
- SR2009 - Fourier Transforms 45 / 54
Fourier Series PropertiesFourier Series PropertiesTime FrequencyTime Frequency
Homogeneity a·s(t) a·S(k)
Additivity s(t) + u(t) S(k)+U(k)
Linearity a·s(t) + b·u(t) a·S(k)+b·U(k)
Time reversal s(-t) S(-k)
Multiplication * s(t)·u(t)
Convolution * S(k)·U(k)
Time shifting
Frequency shifting S(k - m)
∑∞
−∞=−
mm)U(m)S(k
td)tT
0u()ts(t
T1
∫ ⋅−⋅
S(k)e Ttk2πj
⋅⋅
−
s(t)Ttm2πj
e ⋅+
)ts(t −
- SR2009 - Fourier Transforms 46 / 54
Fourier Series – ‘Oddities’Fourier Series – ‘Oddities’
k = - ∞, … -2,-1,0,1,2, …+ ∞, ωk = kω, φk = ωkt, phasor turns anti-clockwise.
Negative k ⇒ phasor turns clockwise (negative phase φk ), equivalent to negative time t,
⇒ time reversal.
Negative frequencies & time reversal
Fourier components {Fourier components {uukk} form orthonormal base of signal space:} form orthonormal base of signal space:
uk = (1/√T) exp(jkωt) (|k| = 0,1 2, …+∞) Def.: Internal product ⊗:
uk ⊗ um = δk,m (1 if k = m, 0 otherwise). (Remember (ejt)* = e-jt )
Then ck = (1/√T) s(t) ⊗ uk i.e. (1/√T) times projectionprojection of signal s(t) on component uk
Orthonormal base
∫ ⋅=⊗T
o
*mkmk dtuuuu
- SR2009 - Fourier Transforms 47 / 54
0 50 100 150 200
k f
Wk/W0
10-3
10-2
10-1
12
Wk = 2 W0 sync2(k δ)
W0 = (δ sMAX)2
∞
=+⋅= ∑
1k 0WkW10WW
Fourier Series - Power Fourier Series - Power
•• FS convergence FS convergence ~1/k~1/k
⇒⇒ lower frequency terms
Wk = |ck|2 carry most power.
•• WWkk vs. vs. ωωkk: Power density spectrum: Power density spectrum.
Example
sync(u) = sin(π u)/(π u)
Pulse train, duty cycle Pulse train, duty cycle δδ = 2 = 2 τ τ / T/ T
T
2 τ
t
s(t)
bk = 0 a0 = δ sMAX
ak = 2δsMAX sync(k δ)
Average power WAverage power W : s(t)s(t)T
odt2s(t)
T1W ⊗≡= ∫
∑∑∞
=
++=
∞
−∞==
1k
2kb2
ka212
0ak
2kcW
Parseval’s TheoremParseval’s Theorem
- SR2009 - Fourier Transforms 48 / 54
Fourier Series of Some WaveformsFourier Series of Some Waveforms
SR2009
Fourier Transforms 13
- SR2009 - Fourier Transforms 49 / 54
Discrete Fourier Series (DFS)Discrete Fourier Series (DFS)
N consecutive samples of s[n] N consecutive samples of s[n] completely describe s in time completely describe s in time or frequency domains.or frequency domains.
DFS generate periodic ckwith same signal period
∑−
=⋅=
1N
0kN
nk2πjekcs[n] ~
Synthesis: finite sum ⇐ band-limited s[n]
Band-limited signal s[n], period = N.
mk,δ1N
0nN
-m)n(k2πje
N1
=−
=∑
Kronecker’s delta
Orthogonality in DFS:
synthesis
synthesis
∑−
=
−⋅=
1N
0nN
nk2πjes[n]
N1
kc~
Note:Note: ck+N = ck ⇔ same period N i.e. time periodicity propagates to frequencies!i.e. time periodicity propagates to frequencies!
DFS defined as:DFS defined as:
~~~~
analysis
analysis
- SR2009 - Fourier Transforms 50 / 54
Discrete Fourier Series AnalysisDiscrete Fourier Series AnalysisDFS of periodic discreteDFS of periodic discrete
11--Volt squareVolt square--wavewave
⋅
−−
±+=
=
otherwise,
Nkπsin
NkLπsin
NN
1)(Lkπje
2N,...N,0,k,NL
kc~
0.6
0 1 2 3 4 5 6 7 8 9 10 k
1
0 2 4 5 6 7 8 9 10 n
θk
-0.4π
0.2 0.24 0.24
0.6 0.6
0.24
1
0.24
-0.2π
0.4π
0.2π
-0.4π
-0.2π
0.4π
0.2π
0.6 ck ~
ampli
tude
ampli
tude
phas
eph
ase
Discrete signals Discrete signals ⇒⇒ periodic frequency spectra.periodic frequency spectra.Compare to continuous rectangular function (slide # 10, “FS analysis - 1”)
-5 0 1 2 3 4 5 6 7 8 9 10 n 0 L N
s[n] 1
s[n]: period NN, duty factor L/NL/N
- SR2009 - Fourier Transforms 51 / 54
Discrete Fourier Series PropertiesDiscrete Fourier Series PropertiesTime FrequencyTime Frequency
Homogeneity a·s[n] a·S(k)
Additivity s[n] + u[n] S(k)+U(k)
Linearity a·s[n] + b·u[n] a·S(k)+b·U(k)
Multiplication s[n] ·u[n]
Convolution S(k)·U(k)
Time shifting s[n - m]
Frequency shifting S(k - h)
∑−
=⋅
1N
0hh)-S(h)U(k
N1
∑−
=−⋅
1N
0mm]u[ns[m]
S(k)e Tmk2πj
⋅⋅−
s[n]Tth2πj
e ⋅+
- SR2009 - Fourier Transforms 52 / 54
References-1References-1
1. On bandwidth, David Slepian, IEEE Proceedings, Vol. 64, No 3, pp 291 - 300.
2. The Shannon sampling theorem - Its various extensions and applications: a tutorial review, A. J. Jerri, IEEE Proceedings, Vol. 65, no 11, pp 1565 – 1598.
3. What every computer scientist should know about floating-point arithmetic, David Goldberg.
4. IEEE Standard for radix-independent floating-point arithmetic, ANSI/IEEE Std 854-1987.
PapersPapers
1.Understanding digital signal processing, R. G. Lyons, Addison-Wesley Publishing, 1996.
2.The scientist and engineer’s guide to digital signal processing, S. W. Smith, at http://www.dspguide.com.
3.Discrete-time signal processing, A. V. Oppeheim & R. W. Schafer, Prentice Hall, 1999.
BooksBooks
SR2009
Fourier Transforms 14
- SR2009 - Fourier Transforms 53 / 54
References - 2References - 2
1. Tom, Dick and Mary discover the DFT, J. R. Deller Jr, IEEE Signal Processing Magazine, pg 36 - 50, April 1994.
2. On the use of windows for harmonic analysis with the Discrete Fourier Transform, F. J. Harris, IEEE Proceedings, Vol. 66, No 1, January 1978.
3. Some windows with a very good sidelobe behaviour, A. H. Nuttall, IEEE Trans. on acoustics, speech and signal processing, Vol ASSP-29, no. 1, February 1981.
4. Some novel windows and a concise tutorial comparison of windows families, N. C. Geckinli, D. Yavuz, IEEE Trans. on acoustics, speech and signal processing, VolASSP-26, no. 6, December 1978.
5. Study of the accuracy and computation time requirements of a FFT-based measurement of the frequency, amplitude and phase of betatron oscillations in LEP, H.J. Schmickler, LEP/BI/Note 87-10.
6. Causes et corrections des erreurs dans la mesure des caracteristiques des oscillations betatroniques obtenues a partir d’une transformation de Fourier, E. Asseo, CERN PS 85-9 (LEA).
Papers
- SR2009 - Fourier Transforms 54 / 54
References - 3References - 3
1. The Fourier Transform and its applications, R. N. Bracewell, McGraw-Hill, 1986.
2. A History of scientific computing, edited by S. G. Nash, ACM Press, 1990.
3. Introduction to Fourier analysis, N. Morrison, John Wiley & Sons, 1994.
4. The DFT: An owner’s manual for the Discrete Fourier Transform, W. L. Briggs, SIAM, 1995.
5. The FFT: Fundamentals and concepts, R. W. Ramirez, Prentice Hall, 1985.
Books
7. Precise measurements of the betatron tune, R. Bartolini et al., Particle Accel., 1996, vol. 55, pp 247-256.
8. How the FFT gained acceptance, J. W. Cooley, IEEE Signal Processing Magazine, January 1992.
9. A comparative analysis of FFT algorithms, A. Ganapathiraju et al., IEEE Trans.on Signal Processing, December 1997.