# Computing Translated Frequencies in Digitizing and Downsampling Analog Bandpass Signals

October 31, 20131 comment

In digital signal processing (DSP) we're all familiar with the processes of bandpass sampling an analog bandpass signal and downsampling a digital bandpass signal. The overall spectral behavior of those operations are well-documented. However, mathematical expressions for computing the translated frequency of individual spectral components, after bandpass sampling or downsampling, are not available in the standard DSP textbooks. The following three sections explain how to compute the frequencies of translated spectral components and provide the desired equations in the hope that they are of use to you.

Bandpass Sampling
In bandpass sampling (also called undersampling), we apply an analog bandpass signal to an A/D converter and obtain a digitized time-domain sequence representing that analog signal. By analog bandpass signal we mean an analog signal having the spectrum shown in Figure 1(a) with its spectral energy centered at ±fc Hz. (By bandpass sampling we mean sampling with an fs sample rate that is less than twice the highest-frequency content of the Figure 1(a) signal, but greater than twice that signal's bandwidth.) Figure 1

The are two scenarios associated with bandpass sampling. Assuming you've correctly chosen an fs sampling rate that avoids any digital spectral image overlap, the first scenario is the situation shown in Figure 1(b). In that figure, the lowest positive-frequency spectral image of the digitized signal (the bold curve in Figure 1(b)) has the same spectral orientation as the positive frequency spectrum of the input analog signal. That lowest positive-frequency spectral image is said to be not inverted.

The second bandpass sampling scenario is where the lowest positive-frequency spectral image of the digitized signal has a flipped spectral orientation as shown in Figure 1(c). In this case the lowest positive-frequency spectral image is called inverted. Which situation, Figure 1(b) or Figure 1(c), you experience depends on your choice of the fs sampling rate.

The purpose of this section of this blog is to show how to compute the post-sampled frequency, fbs, of an arbitrary fo spectral component of interest contained in the analog bandpass signal as shown in Figure 1(a). (The bs subscript in the term fbs means bandpass sampled.) Given the frequencies fo in Figure 1(a) and the fs sample rate (both in Hz), the frequency of the sampled fbs spectral component is: where the notation |p| means absolute value of p, and ⌊q⌋ means the integer part of q. The implementation of Eq. (1) using Matlab code is as follows:

fbs = abs(fo -fs*floor((fo + fs/2)/fs));

An example of using Eq. (1) is computing the center frequency of the lowest positive-frequency spectral image of the bandpass sampled signal. If we call that center frequency fIF, as shown in Figure 2, the value of fIF can be computed by replacing fo with fc, and replacing fbs with fIF, in Eq. (1). Figure 2

In many DSP applications it's convenient to ensure that the fIF is one fourth the sample rate. Use of Eq. (1) shows why setting fs = 4fc/K, where the odd integer K = 3,5,7,9,11,..., positions the sampled spectrum at fIF = fs/4 Hz.

Downsampling a Digital Bandpass Signal
Next we show how to compute the post-downsampled frequency, fd, of an arbitrary fo spectral component of interest contained in a digital bandpass signal with its spectral energy centered at ±fc Hz. (The d subscript in the term fd means downsampled.) For us, downsampling by positive integer factor D means retain every Dth sample of a discrete sequence and discarding the remaining samples. We provide two downsampling examples in Figure 3 where the sample rate of the original bandpass signal is fs Hz and the sample rate of the downsampled signals is fs/D Hz. (We're assuming that fs/D is greater than twice the bandpass signal's bandwidth.) Figure 3

Given the frequency fo and the fs sample rate (both in Hz), and the downsampling factor D, the frequency of the downsampled fd spectral component is: The implementation of Eq. (2) using Matlab code is as follows:

fd = abs(fo -(fs/D)*floor((D*fo + fs/2)/fs));

An example of using Eq. (2) is computing the center frequency of the lowest positive-frequency spectral image of the downsampled signal. If we call that center frequency fIF, as shown in Figure 4, the value of fIF can be computed by replacing fo with fc, and replacing fd with fIF, in Eq. (2). Figure 4

Downsampling a Complex Bandpass Signal
Finally we show how to compute the post-downsampled frequency, fd, of an arbitrary fo spectral component of interest contained in a complex-valued digital bandpass signal with its positive-frequency-only spectral energy centered at fc Hz. Figure 5(a) provides an example of such a complex bandpass signal, with a spectral component of interest shown as fo.

Figure 5(b) shows the spectral result of downsampling the Figure 5(a) complex signal by a factor of D = 2. After downsampling the original fo spectral component has been translated to the frequency of fd Hz. The sample rate of the downsampled signals is fs/D Hz. (We're assuming that fs/D is greater than the complex bandpass signal's bandwidth.) Figure 5

Given the frequency fo and the fs sample rate (both in Hz), and the downsampling factor D, the frequency of the downsampled fd spectral component is: The implementation of Eq. (3) using Matlab code is as follows:

fd = fo -(fs/D)*floor((D*fo + fs/2)/fs);

The downsampling shown in Figure 5 may not seem to be too useful, but experimentation with Eq. (3) leads to very useful downsampling results. Those results are shown in Figure 6. In Figure 6(a) we have a complex bandpass signal centered at a frequency of kfs/D Hz, where k is a positive integer. We can frequency-translate the complex bandpass signal to be centered at zero Hz by downsampling the original bandpass signal by a factor of mD where m is a positive integer. (Of course we must always ensure that the downsampled fs/(mD) sample rate is greater than the bandwidth of the bandpass signal.) Figure 6

If the original complex bandpass signal was obtained from a real-valued modulated signal (a communications signal), then high-performance demodulation can easily be implemented using the downsampled Figure 6(b) signal.

No taxpayer money was used, and no animals were injured, in the creation of this blog. [ - ]
Comment by April 11, 2014 Hi Rick,

Thanks for the article.
Ignoring decimation factor D, am I right to summarize it all that for a given fo you simply do (fo - fs) until result is = Nyquist or < Nyquist.
discard negative sign if digital signal is real.

Regards

Kaz

To post reply to a comment, click on the 'reply' button attached to each comment. To post a new comment (not a reply to a comment) check out the 'Write a Comment' tab at the top of the comments.