DFT - MindMapped

Design digital filter:
1. Draw unit circle+ mark freqs
𝑓
𝑗2πœ‹π‘“
𝑠
2. Place poles + zeros (using α𝑒
𝑓
where Ξ± usually < 1, 2πœ‹ = angle)
General form of transfer func.
Linear phase if zeros on
Symmetry about x-axis – if
H(z)=N(z)/D(z)
unit circle and/or
pole exists at z=AejΞ± there must
Unit circle
Zeros
when
H(z)οƒ 0
Shift theorem: zeros/poles at origin
be one at z=Ae-jΞ±
Poles when H(z)οƒ βˆž
π‘Œ(𝑧) = 𝑧 βˆ’π‘š 𝑋(𝑧)
2πœ‹π‘
Angle of pth
When zn=1, 𝑧 = 𝑒 𝑗 𝑛 where
𝑝
Frequency response of a
shift of m samples
root = 2πœ‹
𝑓
𝑛
from X(z) to Y(z)
p starts from 0, 1..., n
digital filter = H(ej2Ο€fT)
Z-transform:
𝑗2πœ‹
∞
𝑧 = 𝑒 𝑓𝑠
Fourier transform =
e.g. 0.7y[n-1]οƒ 0.7z-1Y(z)
𝑋(𝑧) = βˆ‘ π‘₯[𝑛]𝑧 βˆ’π‘›
X(ej2Ο€fT) of X(z)
Convolution theorem:
∞
𝑛=βˆ’βˆž
Discrete convolution:
Latches delay
∞
π‘£π‘œ (𝑑) = ∫ β„Ž(𝑑 βˆ’ 𝜏)𝑣𝑖 (𝜏)π‘‘πœ
π‘‰π‘œ (π‘—πœ”) = 𝐻(π‘—πœ”)𝑉𝑖 (π‘—πœ”)
signal by T
(j2Ο€f for cyclical frequency response)
π‘£π‘œ [𝑛] = βˆ‘ β„Ž[𝑛 βˆ’ 𝑝]𝑣𝑖 [𝑝]
βˆ’βˆž
𝑝=βˆ’βˆž
If p1 is between 0 and ½N, plot in DFT;
Amplitude of
4. Spectrum frequency represented if not, use periodicity property of DFT:
𝐴𝑁
𝑝𝑓
peak =
If a peak occurs at p, it will occur at p±N,
by pth harmonic, 𝑓𝑝 = 𝑠
2
𝑁
p±2N... do same for all p1, p2...
π‘βˆ’1
βˆ’π‘—2πœ‹π‘›π‘β„
1. Sample original signal (with duration T seconds)
𝑁
𝑋[𝑝] = βˆ‘ π‘₯(𝑛)𝑒
2. Make signal periodic to T seconds (may need window
𝑛=0
function* if there are discontinuities)
3. Expand as a Fourier series
4. Amplitude + phase spectra exist as discrete frequencies and
form the DFT.
FFT has log2(N) *
Periodically
*windowing
N calculations
reduces leakage but
1
extended signal
𝑓𝑠 =
worsens resolution
NO overlapping
𝜏
between adjacent
bands
1. Periodic
Realities:
All signals have ∞ BW so aliasing occurs
Non-ideal filters so no sharp cut-offs
discrete signal
Sampled signal
X(f)
anti-aliasing filter (LPF)
– to reduce noise
-(f+2fs) -(2fs –f) -(f+fs)
-(fs –f)
-f
0
f
fs – f
f+fs
2fs –f
f+2fs
Xs(j2Ο€f) consists of X(j2Ο€f)
plus sidebands centred at nfs
A/D
(sampling)
Shannon’s
sampling
theorem:
Analogue
signal
fs β‰₯ 2fmax
5
𝑇/2
𝑅0 (𝑓) = ∫
Bode plot for
amplitude
response, AdB(Ο‰) =
20π‘™π‘œπ‘”(|𝐻(π‘—πœ”)|)
4
𝑠(𝑑)𝑦(𝑑)𝑑𝑑
βˆ’π‘‡/2
A peak indicates frequency
of wave:
3
2
1
𝑅𝑒
𝑓𝑠
3. Transfer function, H(z)
End with y[n]
6
Transfer function, H(s)
Frequency response, H(jω)
Amplitude response, |H(jω)| or |H(ejωT)|
π‘–π‘šπ‘”
Phase response, ∠𝐻(π‘—πœ”) = π‘‘π‘Žπ‘›βˆ’1 ( )
R0
Zero close to unit circle, Zero on unit For stability, all poles must
Finite Impulse Response
|H(ejωT)| is at a minimum
circle οƒ 
be inside unit circle (⨂
filter if just zeros on plane
jωT
|H(e )|=0 at
coincident pole-zero pair
Multiple
(and ole at origin) – linear
notch filter
corresponding
cancels each other out)
phase response
frequency
IIR if there are poles in circle (sharp amplitude
Pole close to unit circle,
response if close to circle)
|H(ejωT)| becomes very large
If R0 > 0, then test wave is
synchronised with original signal
Dirac delta properties:
0
-1
-2
-10
∞
-5
0
Frequency (Hz)
5
10
𝐴𝑇
𝑅0
=
βˆ’βˆž
2
∞
Correlation coefficient,
2
𝑇/2
∫ 𝑔(𝑑)𝛿(𝑑 βˆ’ π‘Ž)𝑑𝑑 = 𝑔(π‘Ž)
π‘€π‘–π‘‘π‘‘β„Ž =
2πœ‹
βˆ’βˆž
𝑇
𝑋𝑅 (𝑓) = ∫ π‘₯(𝑑) cos(2πœ‹π‘“π‘‘) 𝑑𝑑
πœ”0 =
Dirac delta function when T=∞
βˆ’π‘‡/2
𝑇
𝑇/2
To find parameters of a wave, s(t):
Area of spike = 1 (unity)
R0 = s(t)y(t)
𝑋𝐼 (𝑓) = ∫ π‘₯(𝑑) sin(2πœ‹π‘“π‘‘) 𝑑𝑑
To get original signal back:
All waves have:
βˆ’π‘‡/2
test cosine
∞
Amplitude spectrum
π‘₯(𝑑) = ∫ 𝑋(𝑗2πœ‹π‘“)𝑒𝑗2πœ‹π‘“π‘‘ ⁑𝑑𝑓
𝐴(𝑓)
= βˆšπ‘‹π‘… 2 + 𝑋𝐼 2
Phase spectrum
βˆ’βˆž
Continuous Fourier
βˆ’1 ∞
s(t) = A cos(2Ο€ft + Ο•)
2
transform:
π‘₯(𝑑) =
∫ 𝑋(π‘—πœ”)π‘’π‘—πœ”π‘‘ β‘π‘‘πœ”
π΄π‘šπ‘π‘™π‘–π‘‘π‘’π‘‘π‘’ = 𝐴(π‘“π‘šπ‘Žπ‘₯ )
2πœ‹ βˆ’βˆž
𝑇
A(f)=|X(j2Ο€f)|
𝑋𝐼 (𝑓max )
Ο•(f) = ∠X(j2Ο€f)
π‘ƒβ„Žπ‘Žπ‘ π‘’ = π‘‘π‘Žπ‘›βˆ’1 (βˆ’
)
XR(f)
𝑋𝑅 (π‘“π‘šπ‘Žπ‘₯ )
∫ 𝛿(π‘₯)𝑑π‘₯ = 1
π‘šπ‘Žπ‘₯
∞
( f )
𝑋(π‘—πœ”) = ∫ π‘₯(𝑑)𝑒 βˆ’π‘—πœ”π‘‘ ⁑𝑑𝑑
XI(f)
X(f)
i.e. 𝑠(𝑑) = 3cos⁑(2πœ‹(1.5)𝑑 + 1.6)
Ideal ampliture spectra Ideal phase spectra
βˆ’βˆž
2
4
∞
0
Fourier transform: F(s = jω)
{replace s with jω}
3
A m plitude
𝐹(𝑠) = ∫ 𝑓(𝑑)𝑒 βˆ’π‘ π‘‘ 𝑑𝑑
Phase (radians)
3.5
2.5
2
1.5
1.5
1
0.5
1
0.5
0
0
0
0.5
1
Frequency (Hz)
1.5
2
0
0.5
1
Frequency (Hz)
1.5
2
Parsevals theorem:
To solve:
Energy associated with the frequency band Ο‰1 ≀ |Ο‰| ≀ Ο‰2
1. Laplace table
1 πœ”2
2. Fourier (s=jω) or (s=j2πt in terms of
𝐸(πœ”1 , πœ”2 ) = ∫ |𝐹(π‘—πœ”)|2 𝑑𝑀
πœ‹
cyclical frequency)
πœ”1
complex
|𝐹(π‘—πœ”)|2 = 𝐹(π‘—πœ”). 𝐹 βˆ— (π‘—πœ”)
3. Amplitude spectrum, A(f) = |F(j2Ο€ft)|
conjugate
∞
π‘₯(𝑑) = π‘Žπ‘› + βˆ‘(π‘Žπ‘› cos(π‘›πœ”0 𝑑) + 𝑏𝑛 sin⁑(π‘›πœ”0 𝑑))⁑
|𝐻(π‘—πœ”π‘ )| =
π»π‘šπ‘Žπ‘₯
√2
𝑛=1
Contribution to total power
from N harmonics:
sine (odd period
function)
𝑁
Case 1:
H(s) = s
H(jω) = jω
|H(jω)| = ω
𝐴𝑑𝐡 (πœ”) = 20log⁑(πœ”)
𝑃𝑁 = π‘Ž0
2
π‘Žπ‘› 2 + 𝑏𝑛 2
+βˆ‘
2
𝑛=1
𝑇/2
1
= ∫ [𝑓(𝑑)]2 ⁑𝑑𝑑
𝑇 βˆ’π‘‡/2
a0 = an = 0
4 𝑇/2
𝑏𝑛 = ∫ π‘₯(𝑑) sin(π‘›πœ”0 𝑑) 𝑑𝑑
𝑇 0
Fourier (correlation) coefficents:
1 𝑇/2
1 𝑇
π‘Ž0 = ∫ π‘₯(𝑑)𝑑𝑑 = ∫ π‘₯(𝑑)𝑑𝑑
𝑓 = 𝑛𝑓0 ⁑
𝑇 βˆ’π‘‡/2
𝑇 0
2 𝑇
π‘Žπ‘› = ∫ π‘₯(𝑑) cos(π‘›πœ”0 𝑑) 𝑑𝑑
a0 : DC term
𝑇 0
n = 1 : fundamental
𝑇
n β‰₯ 2 : nth harmonic 𝑏 = 2 ∫ π‘₯(𝑑) sin(π‘›πœ” 𝑑) 𝑑𝑑
𝑛
0
𝑇 0
𝑃𝑇𝑂𝑇
Nyquist freq.
Orthogonality doesn’t allow
transmission
all even n = 0
Gain margin, GM = -LGdB
correlation coefficients to
of sampled
Bode
plots
Case 2:
Analogue LPF
Reconstructed
nth harmonic: 𝐴𝑛 cos⁑(π‘›πœ”0 𝑑 + πœ™π‘› )
Loop gain, LGdB = 20log|G(jω-180)|
pick up contributions from
signal
H(s) = 1/s
analogue signal
𝑏𝑛
𝑉 (π‘—πœ”)
harmonics other than the nth
cosine (even periodic
Transfer function, 𝐻(π‘—πœ”) = π‘œ
πœ™π‘› = π‘‘π‘Žπ‘›βˆ’1 (βˆ’ )
𝐴𝑑𝐡 (πœ”) = βˆ’20log⁑(πœ”)
Case 3:
𝑉𝑖 (π‘—πœ”)
harmonic
function) x(t)=x(-t)
π‘Žπ‘›
GM and PM > 0
Phase margin, PM = ∠𝐺(π‘—πœ”1 ) + 180
H(s) = s + Ξ±
for stability
= βˆ π΄π‘‘π΅ (πœ”0 ) + 180
∞
2
When Vi(t) = Ξ΄(t) Fourier transform of
𝐴𝑛 = βˆšπ‘Žπ‘› 2 + 𝑏𝑛
|𝐻(π‘—πœ”)| ⁑ = ⁑ βˆšπœ” 2 + 𝛼 2
π‘₯(𝑑)
=
π‘Ž
+
βˆ‘
π‘Žπ‘› cos⁑(π‘›πœ”0 𝑑)
V
(t)
=
h(t)
is
V
(jω)
=
H(jω)
0
o
o
20log⁑(𝛼),
0β‰€πœ”β‰€π›Ό
ο‚½c ο‚½
𝐴𝑑𝐡 (πœ”) = {
Overall phase response is sum of phase responses.
𝑛=1
a
=
0
if
+ve
=
-ve
area
Ξ΄-function of
0
20 log(πœ”) ,
πœ”>𝛼
For amplitude
Plot H(jω) using linear scale.
height An/2 at
bn = 0
spectrum,
For cut-off frequency:
Case 4:
st
𝑠
𝑇
Butterworth 1 order:
for symmetrical waves, half the
frequency nω0
1
Ο•n = 0
𝑠 β†’ for LPF
2
2
Overall bode plot is
πœ”
𝐻(𝑠) ⁑ = ⁑
𝐺
𝑐
graph and multiply by 2
π‘Ž0 = ∫ π‘₯(𝑑)𝑑𝑑
πœ”
𝑠⁑ + ⁑𝛽
𝐻(𝑠) =
…….
sum of bode plots:
𝑇 0
𝑠 β†’ 𝑐 for HPF
…….
1+𝑠
𝑠
N
2
2
βˆšπœ” + 𝛼
𝑇/2
|𝐻(π‘—πœ”)|
⁑
=
⁑
2 +πœ” 2
𝑠
4
0
AdB ( ) ο€½ οƒ₯ AdBi ( )
𝑠→
for BPF
20log⁑(𝛽),
0β‰€πœ”β‰€π›½
π‘Žπ‘› = ∫ π‘₯(𝑑) cos(π‘›πœ”0 𝑑) 𝑑𝑑
i ο€½1
𝐡𝑠

𝐴𝑑𝐡 (πœ”) = {
𝑇 0
-2
-
0

2
βˆ’20 log(πœ”) ,
πœ”>𝛽
where Ο‰02 = πœ”
Μ‚.̌
πœ” and B = πœ”
Μ‚βˆ’πœ”
̌
n= ο€­2
n= ο€­1
n=0
n=1
n=2
n
0
0
0
0