brief notes on 1st part of me579 - engineering.purdue.edubrief notes on 1st part of me579 would...
TRANSCRIPT
Brief Notes on 1st Part of ME579
Would like: X(f ), the Fourier Transform of x(t), or Ck, the Fourier Series coefficients, if signal is periodic. We have: xn=x(nΔ) samples of x(t) every Δ seconds for n = 0,1,2,3….N-1. T=NΔ seconds is the duration of the signal. And can do Discrete Fourier Transforms (DFT) to give: Xk for k=0,1,2,….N-1 with corresponding frequencies fk = 0, fs/N, 2fs/N, ….(N-1)fs/N.
What is the relationship between Xk and X(f )? For Periodic Signals:
What is the relationship between Xk and Ck?
Fourier Transforms
X( f )= x( t )e− j2π ft dt−∞
∞
∫ x-units/Hz
x( t )= X( f )e+ j2π ft df−∞
∞
∫
Both continuous functions Both involve infinite integrals Difficult to do these on a computer for any function Your measurements will be samples of signalsNeed to sample signals and spectra to do calculations. Need to sample to plot functions on the computer: pick some values of t à tn n=0,1, … and evaluate x(tn) pick some values of f à fk k=0,1,2,… and evaluate X(f)
Complex Form of Fourier Series (Periodic Signals)
Ck=1T
x( t )e− j2π k
Ttdt
0
T∫ x-units, T = period,
fk=kT
Hz
x( t )= Ck
k=−∞
∞
∑ e+ j2π k
Tt
Already discrete in frequency Continuous in time, but only integrating over 1 period
Relationship between Complex Form of Fourier Series and Sines and Cosines Form
Ck=1T
x( t )cos 2π kTt
⎛
⎝⎜
⎞
⎠⎟dt
0
T∫ − j 1
Tx( t )sin 2π k
Tt
⎛
⎝⎜
⎞
⎠⎟dt
0
T∫
=Ak2− jBk2
C−k=C*
k=Ak2+ jBk2
, because the signal is real.
x( t )=C0 + Cke+ j2π k
Tt+C
−ke− j2π k
Tt
k=1
∞
∑
=A02+ A
kk=1
∞
∑ cos 2π kTt
⎛
⎝⎜
⎞
⎠⎟+ Bk sin 2π
kTt
⎛
⎝⎜
⎞
⎠⎟
Fourier Transform to Discrete Fourier Transform
1. WINDOWED MADE LENGTH FINITE à SPECTRAL LEAKAGE Product in Time Convolution in Frequency (Smoothed Spectrum) 2. SAMPLED IN TIME ALIASING [ADC: CLIPPING, QUANTIZATION]
Multiplied by a delta train Scaled & Periodic in Frequency Calculation 3. SAMPLED IN FREQUENCY ALIASING
xw( t )= x( t ).w( t ) X
w( f )= X( g )W( f − g )dg∫
Xsf( fk)= X( f )δ( f − k.df )∑ → x
sf( t )= 1
dfx( t − rT )
r=−∞
∞
∑ =T x( t − rT )r=−∞
∞
∑
xs( t )= δ( t − nΔ )x( t )∑ X
s( f )= 1
ΔX( f − qf
s)= x( nΔ )e− j2π f Δnn=−∞
∞
∑q=−∞
∞
∑
Multiplied by a delta train in Frequency Scaled & Periodic in Time
Brief Notes on 1st Part of ME579
Discrete Fourier Transform:Signal sampled and finite in time 0àT=NΔ, fs = 1/Δ, tn=n/fs=nΔ
Spectrum sampled in frequency 0à fs, df=1/T, fk=k/T=k.fs/N
à periodic in time and frequency
à windowing in time smooths out spectrum of the sampled signal
à wrap around effects in both time and frequency (two forms of aliasing)
Discrete Fourier Transform (DFT)
Xk= x
ne− j2π nk
N
n=0
N−1∑ , k = 0,1,2,...N −1; f
k= k. fs
N Hz.
xn=
1N
Xke+ j2π nk
N
k=0
N−1∑ , n = 0,1,2,...N −1; t
n= nΔ secs.
Inverse Discrete Fourier Transform (IDFT)
(Inverse) Fast Fourier Transform - (I)FFT A clever way of calculating the Forward and Inverse Discrete Fourier Transforms that is fast if N is highly factorisable into high powers of prime integers: e.g., if N is a power of 2, e.g., 128, 1024, 8192, …. Ratio of Operations Needed (approximately): Direct DFT Formula
Radix 2 FFT = N
log2N
N Radix 2 FFT Direct Ratio (times faster)
8 24 64 2.67 128 896 16,384 18.3 1024 10,240 1,048,576 102.4 8192 106,496 67,108,864 640.1
Domains: Time and Frequency
Time Domain Frequency Domain Sampled/Discrete Periodic
Multiplication Convolution
Even Function Real Odd Function Imaginary
Real Signal Complex Conjugate
Symmetry C-k = Ck
* X(-f) = X(f)*
Narrow in Time Broad in Frequency Broad in Time Narrow in Frequency
When do we Zero Pad Signals?
1. When result of an operation should yield a longer signal than original signal(s). e.g. convolution and time-delay.
2. When we want to have a clearer picture of Xs(f), the Fourier Transform of the sampled signal, xs(t). [Would prefer to transform more data to get better resolution, i.e., a longer duration window w(t) which means a spikier, more localized W(f). Use zero padding when we don’t have any more data to transform.]
Discrete Fourier Transform (DFT), Xk Relationship to X(f) and Ck
Assume no aliasing when sampling i.e., fs > 2 fmax
Have x(nΔ) for n=0,1,2,…N-1; Xk = D.F.T.(xn); k=0,1,2,3,…N-1.
Periodic Signals: NΔ = a whole number of periods = q Tp
Ck = Xk/N for -(N/2) < k < (N/2) Transients: (some aliasing will occur)
X(f) ≈ Δ Xk for -fs/2 < f < fs/2
Discrete Fourier Transform (DFT), Xk
Symmetry about 0 and fs/2 Real Part and Magnitude: even symmetry about these points Imaginary Part and Phase: odd symmetry about these points Periodic:
Xk for k=+(N/2),+(N/2)+1, ……. N-1 equal to Xk for k=-(N/2),-(N/2)+1, ……. –1
fftshift in Matlab will rearrange the DFT for you, but you have to make the corresponding frequency vector: fk=(-N/1:(N/2)-1)/Tp Hz.
Analog to Digital - Digital to Analog
ADC Characteristics: Input/Output Range, No. of Bits, fs, ADC Type
Analog to Digital Conversion (ADC):
Quantization Error, Clipping, Sample and hold, Aliasing Anti-aliasing Filters and Sample Rate.
fhighest = highest frequency of interest fc = filter cut-off frequency fmax = highest frequency in filtered signal
Sample Rate = fs > 2 fmax
fhighest < fc < fmax < fs/2
Analog to Digital - Digital to AnalogDigital to Analog Conversion: Codes to Signal Similar issues as for ADC Zero-order hold characteristics Sinc function in frequency: Δ sinc(πfΔ) . exp(-jπfΔ) with a time delay of half one sample. Distorts signal in range -fmax< f <fmax, Distortion less if fs >>> fmax. Can pre-compensate for this delay by designing an appropriate digital filter, and pre-filtering signal. Reconstruction Filter: fmax < fc << fs/2. Similar characteristics to anti-aliasing filter in ADC.
Other Things We Have Looked At
We use the delta function, δ(t) or δ(f), in a lot of our theory and proofs. • Sifting property in integrals • Integral from -∞ to + ∞ of exp( ±j2π f t ) • Fourier Transforms of periodic signals: sines and cosines • Sampling theory – delta trains
We looked at the FFT algorithm (not on exam), which is a computationally efficient way of calculating a DFT Convolution of continuous and discrete signals: signals passing through systems.
All the Transforms: timeßàfrequency• Complex Fourier Series x(t) ⇔ Ck
periodic in time, discrete in frequency
• Fourier Transforms x(t) ⇔ X(f) continuous in time and frequency
• Fourier Transform of a sampled signal: xs(t) ⇔ Xs(f) OR x(nΔ) ⇔ Xs(f)
Xs(f) = (1/Δ) Σq X(f - q fs) discrete in time, periodic and continuous in frequency
• Discrete Fourier Transform (finite set of data used)
xn ⇔ Xk; n and k: 0,1,2…..N-1. periodic and discrete in both time and frequency
Using the Discrete Fourier TransformFourier Series coefficients (no aliasing and N corresponds to exactly a whole no. of periods)
Ck = Xk/N for k=0,1,2…N/2.
Approximate the Fourier Transform of x(t) à X(f) at frequencies: f = k.fs/N (if signal is of finite length and there is no aliasing – usually not the case)
X(f) at f = k.fs/N ≈ Δ Xk for k=0,1,2…(N/2). Sampled version of Xs(f) (sampled signal, xs(t) was of finite length = N points)
Xs(f) at f = k.fs/N = Xk Can zero pad time sequence to evaluate spectrum at more frequency points. Does not increase true resolution but gives you a better picture of the underlying Xs(f).
Using the Discrete Fourier TransformConvolution of 2 discrete signals via the frequency domain. xn is Nx points long hn is Nh points long yn = hn * xn is Nx + Nh -1 points long. Find N = 2q ≥ Nx + Nh -1.
yn = first Nx + Nh -1 points of REAL{ IDFT[ DFT[xn , N] . DFT[hn , N] ] } point by point multiplication yn start = xn start time + hn start time tyn = yn start + n.Δ, n=0,1,2,….. Nx + Nh