# Multirate DSP and Its Application in A/D Conversion

2 years ago by Steve Arar## Multirate DSP leads to a more efficient A/D conversion.

This article reviews the application of multirate DSP in achieving a more efficient A/D conversion and clarifies why we need different sampling rates within a single system.

In digital signal processing, we commonly need to change the sampling rate of the signal to achieve a more efficient system. Incorporating more than one sampling rate within a system is called multirate signal processing.

An ADC converts a continuous-time signal, $$x_c(t)$$, into a digital sequence. To this end, it samples the input signal and quantizes the amplitude of each sample.

### Periodic Sampling

The sampling operation can be mathematically modeled by first multiplying the continuous-time signal by an impulse train and then converting the result into a discrete-time sequence. The final result will be a discrete-time sequence $$x(n)$$ given by

$$x(n)=x_{c}(nT)$$, $$ -\infty < n < +\infty $$

where $$T$$ is the sampling period and its reciprocal is the sampling frequency $$f_s$$. The sampling operation can be represented by a system referred to as an ideal continuous-to-discrete-time (C/D) converter. The block diagram of a C/D converter and the corresponding waveforms are shown in Figure 1.

**Figure 1.** A C/D converter multiplies the input by an impulse train s(t) and generates a discrete-time sequence. Image courtesy of Discrete-Time Signal Processing.

**Figure 1.**A C/D converter multiplies the input by an impulse train s(t) and generates a discrete-time sequence. Image courtesy of Discrete-Time Signal Processing.

Note that, in Figure 1, $$x_{s}(t)$$ is still a continuous-time signal; however, $$x(n)$$ is a discrete-time sequence in which the x-axis is normalized to $$T$$.

### The Fourier Transform of a Sampled Signal

As shown in Figure 1, during sampling operation, the input is multiplied by an impulse train and we have

$$x_{s}(t)=x_{c}(t) \times s(t)=x_{c}(t) \times \sum_{n=- \infty}^{+\infty} \delta(t-nT)$$

*Equation 1*

*Equation 1*

Multiplication in the time domain corresponds to convolution in the frequency domain, and we obtain *(Appendix, Equation A1)*

$$X_{s}(j \Omega)= \frac{1}{T} \sum_{n=- \infty}^{+ \infty}X_{c}(j(\Omega-k \Omega_{s}))$$

*Equation 2*

*Equation 2*

where $$\Omega$$ and $$\Omega_s=\frac{2 \pi}{T}$$ denote, respectively, the frequency and the sampling frequency in radians/second. $$X_s(j\Omega)$$ and $$X_c(j\Omega)$$ represent the Fourier transform of $$x_{s}(t)$$ and $$x_{c}(t)$$, respectively. Note that Equation 2 gives the Fourier transform of $$x_{s}(t)$$, not that of $$x(n)$$; however, for the purpose of this article, we don’t need to know the Fourier transform of $$x(n)$$. Equation 2 shows an important relation between the Fourier transform of $$x_c(t)$$ and $$x_s(t)$$. According to this equation, if we ignore the scaling factor $$\frac{1}{T}$$, $$X_{s}(j\Omega)$$ has replicas of $$X_{c}(j\Omega)$$ at multiples of $$\Omega _{s}$$. This is illustrated in Figure 2.

**Figure 2. **Multiplying a signal by an impulse train leads to replicas of the input spectrum at multiples of the sampling frequency. Image courtesy of Discrete-Time Signal Processing.

**Figure 2.**Multiplying a signal by an impulse train leads to replicas of the input spectrum at multiples of the sampling frequency. Image courtesy of Discrete-Time Signal Processing.

### The Nyquist Sampling Theorem

We want $$x_{s}(t)$$ to be a representation of $$x_{c}(t)$$. The question is, can we reconstruct the original continuous-time signal from $$x_{s}(t)$$? In other words, given the spectrum in Figure 2(c), can we obtain the frequency domain representation of $$x_{c}(t)$$ shown in Figure 2(a)?

Figure 2 suggests that we can reconstruct the original signal by applying a low-pass filter to $$X_{s}(j\Omega)$$ such that the frequency components below $$\Omega_N$$ are kept and replicas of $$X_{c}(j\Omega)$$ at $$\pm \Omega_s, \pm 2 \Omega_s, …,$$ are removed. However, this is possible only if $$\Omega_s-\Omega_N > \Omega_N$$, otherwise, there is no separation between the replicas and we cannot apply the required low-pass filtering. The condition $$\Omega_N \leq \frac{\Omega_s}{2}$$, which is often referred to as the Nyquist sampling theorem, prevents the replicas from overlapping with each other. The mentioned overlapping leads to a kind of distortion called aliasing distortion, or simply aliasing.

To successfully reconstruct $$x_c(t)$$ from $$x_s(t)$$, we need $$x_c(t)$$ to be a band-limited signal; otherwise, aliasing will occur. For example, Figure 2(a) shows that $$X_c(j\Omega)$$ has all its energy at $$\Omega < \Omega_N$$, i.e., $$X_c(j\Omega)=0$$ for $$\Omega > \Omega_N$$. In practice, $$x_c(t)$$ is not generally a band-limited signal. While we are mainly interested in a particular frequency band of $$x_c(t)$$, there will be strong components or, at least, noise components at frequencies above the desired band. Hence, when sampling with $$\Omega_s$$, we need to place a low-pass filter before the C/D to sufficiently attenuate all the frequency components above $$\frac{\Omega_s}{2}$$. This filter which prevents aliasing is called an anti-aliasing filter.

### Minimum Possible Sampling Rate Requires Very Sharp Filters

Suppose that we want to sample an analog music waveform where the desired energy band is in the range $$0 < \frac{|\Omega|}{2\pi} \leq 22kHz$$ (Figure 3(a)). According to the Nyquist sampling theorem, the minimum sampling frequency which can be used in this case is $$44kHz$$; however, this requires an anti-aliasing filter with a very steep roll-off. The filter must pass the frequency components from zero to just below $$22kHz$$ and reject all the components above $$22kHz$$(Figure 3(b)). The anti-aliasing filter, which is placed before the sampler, is an analog filter and, unfortunately, analog filters cannot achieve a flat passband along with a very sharp transition from passband to stopband. Therefore, in practice, we cannot use a sampling rate of $$44kHz$$ for this example.

### Combined Analog and Digital Filter

The obvious solution for avoiding the use of a very sharp analog filter will be using a sampling rate higher than $$44kHz$$. For example, suppose that we increase the sampling rate by a factor of $$2$$ and use $$f_{s,new}=88 kHz$$. In this case, the stopband edge of the anti-aliasing filter will be $$\frac{f_{s,new}}{2}=44kHz$$ (Figure 3(c)). The passband is still the same as before and we need to pass the frequencies below $$22kHz$$. As a result, the width of the filter’s transition band will be $$22kHz$$, which is practical. Aliasing can be avoided in this way; however, the analog filter will not sufficiently suppress the frequency components from $$22kHz$$ to $$44kHz$$, and these unwanted components will enter the system.

**Figure 3. **(a) The spectrum of the input signal. (b) The ideal anti-aliasing filter required when using $$fs=44kHz$$. (c) Increasing the sample rate relaxes the analog filter requirements. (d) The overall system which uses both analog and digital filtering. Image courtesy of IEEE.

**Figure 3.**(a) The spectrum of the input signal. (b) The ideal anti-aliasing filter required when using $$fs=44kHz$$. (c) Increasing the sample rate relaxes the analog filter requirements. (d) The overall system which uses both analog and digital filtering. Image courtesy of IEEE.

Fortunately, after the ADC, we have the option of using a digital filter (Figure 3(d)), which can offer both sharp transition and linear-phase response. In this way, we can sufficiently suppress the unwanted components from $$22kHz$$ to $$44kHz$$.

So far, our system is not a multirate one because there is only one sampling rate used in the system. The overall system obtained from two filters (the analog prefilter and the digital filter) and the analog-to-digital converter is equivalent to that obtained by a sharp analog anti-aliasing filter with passband edge of 22kHzand an ADC sampling at 88 kHz.

But is this system efficient? Do we really need to use $$88,000$$ samples/second to represent a signal that does not have frequency components above $$22kHz$$? Note that after the analog prefilter, there could still be frequency components between $$22kHz$$ and $$44kHz$$, but these will be removed by the digital filter. And we know that, according to the Nyquist criterion, we only need $$44,000$$ samples/second to represent our input signal, which has all its energy below $$22kHz$$. This means that we can discard some of the output samples of the above system and still retain all the information we are interested in. Since we want to reduce the sampling rate from $$88 kHz$$ to $$44 kHz$$, we can keep one sample from every two consecutive samples. This operation is called decimation or downsampling (by a factor of $$2$$).

Now there are two sampling rates in our system; before decimation, we were using a sampling rate of $$88 kHz$$, and after decimation, the sampling rate is $$44 kHz$$. Hence, we have a multirate system. This operation reduces the number of bits used to represent the input signal by a factor of $$2$$. See page 32 of CMOS Integrated Analog-to-Digital and Digital-to-Analog Converters to read about a simple trick which can be used to even further relax the requirements of the analog prefilter in Figure 3(d).

### Decimation

A discrete-time sequence $$x(n)$$ that has been downsampled by a factor of $$M$$ is given by the following expression:

$$y_d(n)=x(Mn)$$

This means that we are using only one sample out of every M consecutive samples. In other words, if the sampling rate of $$x(n)$$ was $$f_s=\frac{1}{T}$$, the sampling rate of $$y_d(n)$$ will be $$\frac{f_s}{M}$$. The symbol used for a factor-of-M decimator, and an example of factor-of-2 decimation is illustrated in Figure 4(a), and 4(b), respectively.

**Figure 4.** (a) The symbol used for factor-of-M decimation and (b) illustration of factor-of-2 decimation. Image courtesy of IEEE.

**Figure 4.**(a) The symbol used for factor-of-M decimation and (b) illustration of factor-of-2 decimation. Image courtesy of IEEE.

Since factor-of-M decimation is equivalent to sampling the underlying analog signal, $$x_c(t)$$, with the sampling rate $$\frac{f_s}{M}$$, we obtain

$$y_d(n)=x_c(nMT)$$

According to the Nyquist criterion, if $$x_c(t)$$ has frequency components above $$\frac{f_s}{2M}$$, aliasing will occur. As a result, we usually need to place a low-pass filter with stopband edge frequency of $$\frac{f_s}{2M}$$ before the factor-of-M decimation block. In the example of Figure 3, this filtering task is accomplished by the digital filter that precedes the factor-of-2 decimation stage. The normalized cutoff frequency of this filter will be $$2 \pi \frac{f_s}{2M} T= \frac{ \pi}{M}$$. This is illustrated in Figure 5.

**Figure 5. **(a) We need a band-limiting filter prior to decimation; (b) the filter used for the factor-of-M decimation. Image courtesy of IEEE.

**Figure 5.**(a) We need a band-limiting filter prior to decimation; (b) the filter used for the factor-of-M decimation. Image courtesy of IEEE.

### Appendix

$$F \{ \sum_{n=- \infty}^{+ \infty} \delta(t-nT) \}= \frac{2 \pi}{T} \sum_{k=- \infty}^{+ \infty} \delta (j(\Omega- \frac{2 \pi k}{T})$$

*Equation A1*

*Equation A1*

0 Comments