Hossein Sameti Department of Computer Engineering Sharif University of Technology
Our focus 2 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
3
4
In practice, the sampling is performed by a S/H circuit. Sample-and-hold (S/H) S/H is an analog circuit that tracks the analog signal during the sample mode and holds it during the hold mode. The time needed for conversion should be less than the hold mode duration. The sampling period T should be greater than the duration of sample & hold mode Copyright: NEC 5
The goal of the S/H is to continuously sample the input and then hold the value constant as long as it takes the A/D converter to digitally represent (code) the samples. Thus, it allows the A/D converter to operate more slowly than the time needed to acquire a sample. S/H is of critical importance in digital conversion of signals that change rapidly (i.e. the signals with large bandwidth). 6 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Quantization: conversion of continuous-valued signal into discrete-valued. Quantization effects: reducing quantized levels results in signal quality degradation. Quantization is irreversible: results in loss of information. 7 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
8
9
Uses a reference and a comparator for each of the discrete levels represented in the digital output Number of comparators = number of quantization levels generally fast but expensive 10
Theoretically, the extreme decision levels are x 1 = - and x L+1 = (i.e. cover the entire dynamic range of the signal). However,in practice, A/D converters can only handle a finite range R. 11 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
During coding, A/D converters assign a unique binary representation to each quantization level. If we have L quantization levels, then we need to have where B is the number of bits needed for the binary representation. Quantization error: 12 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Each sample of the signal is quantized to one of the amplitude levels, where B is the number of bits used to represent each sample. The quantized waveform is modeled as : e(n) represent the quantization error, Which we treat as an additive noise. 13 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
◦ For small, it is reasonable to assume that is a random variable uniformly distributed from to. Where the step size of the quantizer is 14 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
◦ If is the maximum amplitude of signal, ◦ The mean square value of the quantization error is : ◦ Measured in dB, The mean square value of the noise is : 15 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
16 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Ideal C.T. to D.T. Converter: 17 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
18 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Shifting property 19 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
CTFT (1) (2) (1), (2) (eq.3) 20 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Frequency Domain: (Eq.4) 21 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
(eq.3) (eq.4) (eq.3) and (eq.4) 22 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
t t -3T -2T –T 0 T 2T 3T t 0 23
t -3T -2T –T 0 T 2T 3T To avoid aliasing: n –
25
26 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Anti-aliasing (i.e. pre-) filters are analog filters serving two purposes: ◦ That the bandwidth of the signal to be sampled is limited to the desired frequency range (thus no aliasing). ◦ Limiting the additive noise spectrum and other interference corrupting the desired signal. Thus, it rejects the out-of-band noise. General configuration of digital processing systems 27 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Changing the Sampling Rate 28
n – a b cd e f n b df Downsample by a factor of 2 Downsample by a factor of N: Keep one sample, throw away (N-1) samples Advantage? 29 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
-3T -2T –T 0 T 2T 3T A continuous-time signal Suppose we now sample at two rates: C/D T (1) C/D MT (2) Q: Relationship between the DTFT’s of these two signals? 30 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
C/D T (1) C/D MT (2) Change of variable: 31 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Change of variable: 32 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Change of variable: 33
If M=2, 34
35
What could go wrong here? 36
37 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
38 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
39 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Application? It is the process of increasing the sampling rate by an integer factor. C/D T (1) C/D T/L (2) 40 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
n – a b cd e f b df 41 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
42
Question: How can we obtain from ? Proposed Solution: L Low-pass filter with gain L and cut-off frequency 43 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
n – a b cd e f b df n df 44 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Q: Relationship between the DTFT’s of these three signals? Shifting property: 45
On the other hand: (Eq.2) (Eq.1) (Eq.1) and (Eq.2) 46 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
In order to get from we thus need an ideal low-pass filter. L 47
L 48
The input and output plots of a factor-of-5/3 interpolator are given below 49 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
fractional changesampling rate To implement a fractional change in the sampling rate we need to employ a cascade of an up-sampler and a down-sampler. 50 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
51
52
Reviewed sampling of continuous time signals and the relationship between CTFT and DTFT. Derived the effect of downsampling and upsampling of signals in the frequency domain. Adjusting the sampling rate is especially important before applying pattern recognition algorithms, as it can decrease the complexity of the subsequent signal processing algorithms (by decreasing the length of the signal of interest). 53 Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology