Professional Documents
Culture Documents
Up - Down Sampling PDF
Up - Down Sampling PDF
9.1 Review
F
xc (t) ←→ Xc ( jΩ)
∞ ∞
1 1 2π
∑ ∑
F
xs (t) = xc (nT )δ(t − nT ) ←→ Xs ( jΩ) = Xc ( jΩ) ∗ S( jΩ) = Xc ( j(Ω − kΩs )) (Ωs = )
n=−∞ 2π T k=−∞ T
xc (t) is recoverable from xs (t) if 2ΩN < Ωs , otherwise aliasing occurs. Also
Z ∞
Xs ( jΩ) = xs (t)e− jΩt dt
−∞
∞
= ∑ xc (nT )e− jΩT n
n=−∞
∞
= ∑ x[n]e− jΩT n
n=−∞
− jω
= X(e )|ω=ΩT =Ω/ fs fs = sampling frequency
so ω is a sampling frequency normalized frequency variable.
Also n = t/T is “like” a time normalized variable.
Therefore
∞
1
X(e− jω ) =
T ∑ Xc ( j(ω/T − 2πk/T ))
k=−∞
No aliasing if 2ΩN < Ωs or 2 fN < fs .
9-1
9-2
T T
∞ ∞
sin[π(t − nT )/T ]
xc (t) = ∑ x[n]hr (t − nT ) = ∑ x[n]
π(t − nT )/T
n=−∞ n=−∞
sin(πt/T ) F
(hr (t) = ←→ Hr ( jΩ) is lowpass filter with cutoff frequency at π/T )
πt/T
∞
sin[π(t − nT )/T ]
yc (t) = ∑ y[n]
n=−∞ π(t − nT )/T
So
π
Xc ( jΩ) = T X(e jω ) |Ω| <
T
π
Yc ( jΩ) = Hc ( jΩ)Xc ( jΩ) |Ω| <
T
1 ω 1
Y (e jω ) = Yc ( j ) = Hc ( jω/T )T X(e jω ) = Hc ( jω/T )X(e jω ) |ω| < π
T T T
i.e.,
H(e jω ) = Hc ( jω/T ) |ω| < π
or
π
Hc ( jΩ) = H(e jΩT ) |Ω| < (9.1)
T
Ex Non-integer delay.
H(e jω ) = e− jω∆
When ∆ is an integer, y[n] = x[n − ∆], which is an ideal integer delay.
When ∆ is not an integer, this should shift by a non-integer delay (i.e., just a linear phase adjustment.)
Changing the sampling rate in discrete time
x[n] = xc (nT )
to
x0 [n] = xc (nT 0 )
Note, if Ωs > 2ΩN , then this should be doable. All information is contained in x[n], this is just re-sampling that same
information.
9-3
Notation:
M
x[n], period T xd [n]=x[nM]
period MT
T 0 = MT
If Xc ( jΩ) is bandlimited, i.e., Xc ( jΩ) = 0 for Ω ≥ ΩN , xd [n] is exact if
2π
Ω0s = > 2ΩN
T0
So the original sampling rate must be
2π
Ωs = > M · 2ΩN
T
Note
∞
1 ω 2πk
X(e jω ) =
T ∑ Xc ( j(
T
−
T
)) (9.2)
k=−∞
So
∞
1 ω 2πk
Xd (e jω ) = ∑
T M k=−∞
Xc ( j( −
MT MT
))
III.
Eq. (9.2): normalized frequency Ω = ω/T
Eq. (9.3): re-normalized frequency ω0 = ω/M (so stretches out the ω-axis)
9-4
Xc(j Ω)
1
−Ω N 0 ΩN Ω
jω
X(e )
1/Τ
−2π −π 0 π 2π ω
j ω/2
X(e )
−2π −π 0 π 2π ω
jω
X d(e )
−2π −π 0 π 2π ω
π Ω π ω
Figure 9.3: Samples at frequency Ωs = 2π
T = 4ΩN . T = 2ΩN ω = ΩT = 2 ΩN . X(e ) = T
jω 1
∑∞ 2πk
k=−∞ Xc ( j( T − T )).Ω =
ΩN when ω = π/2. Now downsample at M = 2. jω 1
Xd (e ) = 2 X(e jω/2 1
) + 2 X(e j(ω−2π)/2 )
jω
X(e )
1/Τ
−2π −π 0 π 2π ω
jω
X d(e )
−2π −π 0 π 2π ω
Aliasing
ω
Figure 9.4: X(e jω ) = 1
T ∑∞ 2πk
k=−∞ Xc ( j( T − T )). Now downsample at M = 2. Aliasing occurs.
9-5
Ex As illustrated in Fig. 9.3 and Fig. 9.4. In Fig. 9.4, aliasing occurred.
What if aliasing occurs? Suppose Ωs = 2π
T = 3ΩN , Ω = ΩN occurs when ω = 2π/3.
So to avoid aliasing, need
2π
Ω0s = > 2ΩN (9.4)
T0
or
π
M< (9.5)
T ΩN
or
ωN M < π (9.6)
where ωN is discrete time analog of Nyquist frequency.
We can lowpass filter the signal at first to assume no aliasing, as shown in Fig. 9.5. This is called a decimator system.
LPF
Gain = 1 ~ M ~ ~
x[n]
Cutoff = π /T x[n], period T xd [n]=x[nM]
period MT
9.3 Upsampling
Obtain xi [n] = xc (nT 0 ) from x[n] = xc (nT ) when T 0 < T , i.e. T 0 = T /L.
Question: Is this possible?
Note:
xi [n] = x[n/L] = xc (nT /L)
when n = kL and k is an integer. How to do this in discrete time?
∞
x[n/L] n = kL
xe [n] = = ∑ x[k]δ[n − kL] (9.7)
0 else k=−in f ty
Notation for upsampling is shown in Fig. 9.6 Note there are L − 1 zeros between each sample.
L
x[n] xe [n]
∞ ∞ ∞
!
jω
Xe (e ) = ∑ ∑ x[k]δ[n − kL] e− jωn = ∑ x[k]e− jωkL = X(e jωL ) (9.8)
n=−∞ k=−in f ty k=−in f ty
So this scales (shrinking here) frequency axis by a factor of L, since ω0 = ωL, or ω = ΩT 0 or T 0 = T /L.
If we then lowpass filter the output xe [n], we get general expander, as shown in Fig. 9.7. Note: need gain L in the
9-6
LPF
L Gain L
x[n] xe [n] xi [n]
Cutoff π /L
period T period T/L
jω
X(e )
1/Τ
−2π −π 0 π 2π ω
j 2ω
X(e )
−2π −π 0 π 2π ω
jω
H LPF (e )
−2π −π 0 π 2π ω
jω
X i (e )
−2π −π 0 π 2π ω
lowpass filter if sampling period had been T 0 = T /L. Originally, gain would be L/T so need to “correct” for this to be
consistent.
Ex (frequency domain) Shown in Fig. 9.8 Note: using more samples to encode the same amount of information, we
would expect the spectrum to have some “gapa” where we could place other signals. Note the spectrum of Hi (e jω ).
We are using a system with more capacity than necessary to encode X(e jω ).
Also if T 0 = T /L, and T matches Nyquist criterion, then Ωs > L · 2ΩN , again higher than necessary.
Why might we do this? This allows simpler LPF design “oversampling”. We only need a “cheap” LPF to get back to
continuous time.
Consider the system shown in Fig. 9.9 versus the system shown in Fig. 9.10, the output signal both have a sampling
LPF LPF
L Gain L Gain 1 M
x[n] xe [n] xi [n] ~
xi [n] ~
xd [n]
Cutoff π /L Cutoff π /M
period T period T/L period T/L period TM/L
LPF
L Gain L M
x[n] xe [n] ~
xi [n] ~
xd [n]
Cutoff min(π /L,π /M)
period T period T/L period TM/L
period of T 0 = T M/L. Hence the sampling rate can have any rational change.
Ex: M = 22 and L = 7 produces a change in rate by about 2π.
Note: we might want to reduce sample rate to data storage, etc.