310 likes | 323 Views
Filter. Fix-rate Signal Processing. Fix rate filters - same number of input and output samples. x ( n ) 8 samples. y ( n ) = h(n) * x ( n ). y ( n ) 8 samples. Figure 1. Filter. Multirate Signal Processing. Multirate filters - different numbers of input and output samples.
E N D
Filter Fix-rate Signal Processing . Fix rate filters - same number of input and output samples x(n) 8 samples y(n) = h(n) * x(n) y(n) 8 samples Figure 1
Filter Multirate Signal Processing . Multirate filters - different numbers of input and output samples x(n) 8 samples y(n) 4 samples Figure 2
Filter Multirate Signal Processing . M samples Decimation - M>N N samples M samples Interpolation - M<N N samples Filter Figure 3
Decimator x(n) y(n) M Figure 4 Basic application - reduce bit-rate by discarding samples Consequence - Distortion and Aliasing error
Interpolator x(n) y(n) M Figure 4 Basic application - Insert samples between missing gaps Consequence - Restore the number of samples before decimation
Decimation x(n) y(n) M x(n) e.g. M = 2 x’(n) -4 -3 -2 -1 0 1 2 3 4 -4 -3 -2 -1 0 1 2 3 4 y(n) Figure 5 -2 -1 0 1 2
(1) Decimation x(n) x’(n) x(n) n = 0 , +M , +2M , +3M , +4M, ... x’(n) = 0 otherwise
(1) i(n) -2M -M 0 M 2M Figure 6 Decimation i(n) is a periodic impulse train that can be expressed as (2)
Decimation (1) (2) (3)
Decimation x(n) y(n) M x(n) e.g. M = 2 x’(n) -4 -3 -2 -1 0 1 2 3 4 -4 -3 -2 -1 0 1 2 3 4 y(n) -2 -1 0 1 2
According to equation (3) hence (5) Decimation x(n) x’(n) y(n) y(n) = x’(Mn) (4)
Consider the z transform of x(n) and x’(n) (6) According to equation (3) Decimation Distortion due to Decimation can be seen in the frequency domain
(7) Decimation According to equation (3)
where p = Mn (8) (9) Decimation According to equation (4), y(n) = x’(Mn)
Key equations of Decimation x(n) x’(n) y(n) y(n) = x’(Mn)
z transform Convert to DFT with z = ej Key equations of Decimation x(n) x’(n) y(n)
Spectral Changes in Decimation x(n) x’(n) y(n) Figure 7a /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4
Spectral Changes in Decimation x(n) x’(n) y(n) Figure 7a /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4 images images Figure 7b M=4 /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4
Spectral Changes in Decimation x(n) x’(n) y(n) Figure 7a /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4 Figure 7b M=4 /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4 Figure 7c /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4
Spectral Changes in Decimation x(n) x’(n) y(n) Figure 7a /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4 Figure 7b M=4 /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4 Figure 7c /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4
x’(n) y(n) 3. Decimation by a factor of M stretches the width of the spectrum by M times Spectral Changes in Decimation x(n) x’(n) 1. Retaining one out of M samples in x(n) generates M replicated images of the original spectrum. 2. The spacing of images is 2/M
y(n) -2 -1 0 1 2 y(n) -2 -1 0 1 2 Interpolation x(n) y(n) M Figure 8 e.g. M = 2 x’(n) -4 -3 -2 -1 0 1 2 3 4 e.g. M = 3 x’(n) -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6
x(n/M) n = 0 , +M , +2M , +3M , ... y(n) = (10) 0 otherwise (11) (12) Interpolation x(n) y(n) M
(13) Spectral Changes in Interpolation x(n) y(n) M
Spectral Changes in Interpolation x(n) y(n) M Figure 9a /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4 Figure 9b M=4 /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4
Spectral Changes in Interpolation x(n) y(n) M Figure 9a /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4 Figure 9b M=4 /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4
Spectral Changes in Interpolation x(n) y(n) 1. Interpolation by a factor of M compresses the width of the spectrum by M times 2. M images separating from each other by a spacing of 2/M are generated
Decimation & Interpolation (M=4) Input Sequence -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 M -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 -2 -1 0 1 2 Output Sequence M -4 -3 -2 -1 0 1 2 3 4 Figure 10
Decimation & Interpolation (M=4) Bandwidth - /8 Figure 11 /4 0 /4 /2 /4 /4 /2 /4 /4 /2 /4 M=4 M M
It seems that the bitrate can be reduced simply by decimation Decimation & Interpolation
Decimation & Interpolation But something is wrong,what’s the problem?