Generating Complex and Analytic Bandpass Signals by Richard Lyons, Nov. 2011

There are so many different time- and frequency-domain methods for generating complex baseband and analytic bandpass signals that I had trouble keeping those techniques straight in my mind. Thus, for my own benefit, I created a kind of reference table showing those methods. I present that table for your viewing pleasure in this blog.

For clarity, I define a complex baseband signal as follows: derived from an input analog xbp(t)bandpass signal whose spectrum is shown in Figure 1(a), or discrete input xbp(n) bandpass signal whose spectrum is shown in Figure 1(b), a complex baseband signal is an xBB(n) sequence whose spectrum is that shown in Figure 1(c). The sample rate of an xbp(n) input sequence is defined as fs Hz.

Spectrum of analog

xbp(t) input signals.

(a) –f 0 f Freq c c (Hz)

Spectrum of discrete

xbp(n) input signals.

(b) ...... –f –f /2 –f 0 f f /2 f Freq s s c c s s (Hz)

Spectrum of discrete xBB(n) baseband output signal.

(c) ...... –f –f /2 0 f /2 f Freq s s s s (Hz)

Spectrum of discrete xABP(n) analytic bandpass output signal.

(d) ...... 0 –fs –fs/2 –fc fc fs/2 fs 3fs/2 Freq (Hz) Figure 1.

Based on the same analog xbp(t) or discrete xbp(n) input bandpass signal, an analytic bandpass signal is an xABP(n) sequence whose spectrum is that shown in Figure 1(d).

I realize that, by strict definition, an analytic signal has no negative- frequency spectral energy. And because our xABP(n) output bandpass signal is a discrete sequence it has spectral replications in its negative-frequency spectral region—so calling xABP(n) an analytic signal seems incorrect. We'll bypass that controversy by saying that a discrete sequence is analytic if it has no spectral energy in the frequency range of –fs/2 to zero Hz.

1 Table 1, below, presents my Hit Parade of complex baseband and analytic bandpass signal generation methods. In that table "LPF" means a lowpass, linear-phase, tapped-delay line, FIR filter. All discrete Fourier transforms (DFTs) are implemented with radix-2 fast Fourier transforms (FFTs).

Table 1: Complex baseband and analytic bandpass signal generation methods Process Input/Output Comments Quadrature Sampling Input: analog Uses analog mixing x (t) i(t) bandpass signal and analog lowpass cos x (n) LPF A/D I centered at fc filters. Difficult to control the exact x (t) Hz, with sample bp cos(2πf t) phase delays and c f rate of fs Hz.. s gains of the i(t) x (t) q(t) and q(t) signals. sin x (n) LPF A/D Q Output: discrete complex xBB(n) –sin(2πf t) x (n) = x (n) + jx (n) c BB I Q baseband signal, centered at zero Hz, with sample rate of fs Hz. Quadrature Sampling Input: analog All-digital bandpass signal downconversion centered at f facilitates exact x (n) c cos Hz, with sample control of phases LPF xI(n) x (t) and gains of the bp xbp(n) rate of fs Hz. A/D x (n) and x (n) cos(2πn/4) I Q LPF x (n) signals. A/D's fs x (n) Q Output: discrete f = 4f =1/t sin sample rate normally s c s complex x (n) –sin(2πn/4) x (n) = x (n) + jx (n) BB equal to 4fc, but BB I Q baseband signal, setting f = 0.8f centered at zero s c allows bandpass Hz, with sample sampling to reduce rate of fs Hz. the fs sample rate. fs must greater than twice the bandwidth of xbp(t). See [1] or Section 8.9 of [2]. Discrete Complex Downconversion Input: discrete Uses a time-domain real bandpass Hilbert transformer uI(n) vI(p) wI(p) xI(n') Delay 2 hhp(k) 2 signal centered and a half-band

xbp(n) at fs/4 Hz, with highpass FIR filter. sample rate of fs If hhilb(k) has an Hilbert u (n) v (p) w (p) x (n') odd number of taps, filter Q 2 Q h (k) Q 2 Q Hz. hp then half its [h (k)] hilb coefficients will be x (n') = x (n') + jx (n') BB I Q Output: discrete zero-valued. See [3] complex xBB(n) or Section 13.43 of baseband signal, [2]. centered at zero Hz, with sample rate of fs/4 Hz.

2

Table 1 Cont'd: Discrete Complex Downconversion Input: discrete Uses a time-domain x (n') real bandpass Hilbert transformer Delay 4 Delay I signal centered and simple three-tap xbp(n) at fs/4 Hz, with highpass FIR Hilbert x (n') compensation filter Compensation Q sample rate of fs filter 4 as shown in Part (a) [h (k)] filter [h(k)] Hz. (a) hilb of figure. Efficient implementation shown in Part (b) of xBB(n') = xI(n') + jxQ(n') Output: discrete complex xBB(n) figure. For reasonably xbp(n) x (n') baseband signal, –1 4 –1 I z z centered at zero acceptable operation, the –1 Hz, with sample z x (n') bandwidth of x (n) z–1 Q rate of fs/4 Hz. bp + – must not be larger than, say, fs/10. 4 z–1 See Section 13.43 of Hilbert filter [2]. (b) h(0) = –1/32 h(0) h(1) h(1) = 1/2 + 1/16

Compensation filter

Discrete Complex Downconversion Input: discrete Standard complex real bandpass downconversion and xi(n) LPF 2 xI(n') signal centered lowpass FIR xbp(n) at fs/4 Hz, with filtering, with decimation by two as cos(πn/4) sample rate of fs Hz.. shown in Part (a) of LPF 2 x (n') figure. Due to the (a) x (n) Q q decimation, a very –sin(πn/4) Output: discrete efficient x (n') = x (n') + jx (n') BB I Q complex xBB(n) implementation is baseband signal, that shown in Part xi(n) In-phase (b) of figure. The x (n') centered at zero LPF I Hz, with sample coefficients of the x (n) In-phase and bp rate of f /2 Hz. 1, –1, 1, –1, ... s Quadrature phase LPFs are decimated (b) –1 Quadrature z xQ(n') versions of the x (n) LPF q coefficients in the identical Part (a) LPFs. If the Part

(a) LPFs are half- band filters, the Part (b) In-phase and Quadrature phase LPFs will be even more computationally efficient. See [4], [5], or Section 13.1.3 of [2].

3 Table 1 Cont'd: Discrete Complex Downconversion Input: discrete Negative-frequency real bandpass Set negative- components of xbp(n) x (n) X (m) signal centered are attenuated in bp N-point bp frequency at f Hz, with DFT samples c the frequency equal to zero sample rate of fs domain. Frequency 2 downconversion X (m) Hz. ABP performed by Assumes X (m=0) bp Circular rotate shifting (rotating) and Xbp(m=N/2) are zero-valued all samples in Output: discrete the frequency-domain negative-freq complex xBB(n) indices of the direction baseband signal, positive-frequency centered at zero spectral samples XBB(m) Hz, with sample prior to inverse N-point Real xI(n) DFT. inverse rate of fs Hz. Imag. DFT xQ(n) x (n) = x (n) + jx (n) BB I Q

Discrete Complex Downconversion Input: discrete Negative-frequency real bandpass components of xbp(n) xbp(n) N-point signal centered are attenuated in DFT at kfs/D Hz, with the frequency

2 Xbp(m) sample rate of fs domain. Frequency Assumes X (m=0) bp downconversion Set negative- and X (m=N/2) Hz. bp performed by frequency are zero-valued samples decimation in the equal to zero Output: discrete time domain. See complex x (n) Section 13.29 of X (m) BB ABP baseband signal, [2]. Real D x (n') N-point I centered at zero inverse Hz, with sample DFT Imag. D xQ(n') rate of fs/D Hz. x (n') = x (n') + jx (n') BB I Q

Analytic Bandpass Signal Generation Input: discrete Standard time- x (n) bandpass signal domain, tapped-delay bp (N-1) -sample delay x (n) centered at fc line, FIR Hilbert 2 I Hz, with sample transform method of discrete analytic N-tap FIR, h (k), rate of fs Hz. hilb bandpass signal xQ(n) Hilbert transformer generation. For Output: discrete proper time xABP(n) = xI(n) + jxQ(n) analytic xABP(n) synchronization of bandpass signal, xI(n) and xQ(n), N centered at fc must be an odd Hz, with sample number—in which case rate of fs Hz. half the hhilb(k) coefficients will be zero-valued. See Note 61 of [7] or Section 9.4.1 of [2].

4 Table 1 Cont'd: Analytic Bandpass Signal Generation Input: discrete A prototype lowpass bandpass signal filter (LPF) is x (n) bp hcos(k), real FIR filter x (n) centered at fc designed to have a [Real part of h (k)] I BP Hz, with sample two-sided bandwidth slightly greater rate of fs Hz. h (k), real FIR filter than the bandwidth sin x (n) Q of xbp(n). The LPF's [Imag. part of hBP(k)] Output: discrete coefficients are x (n) = x (n) + jx (n) analytic x (n) multiplied by cosine ABP I Q ABP bandpass signal, and sine sequences

centered at fc whose frequencies Windowing the two sets of filter Hz, with sample are fc Hz, creating coefficients will minimize rate of fs Hz. a positive-frequency magnitude differences between the hcos(k) complex hbp(k) and hsin(k) filters. (This method has bandpass filter. If slightly improved aggregate (overall) fc = fs/4 then half negative frequency attenuation compared to the LPF coefficients the following A(k) and B(k) dual filter will be zero-valued. method.) Using a half-band LPF, if possible, further enhances computational efficiency. See [6], Note 62 of [7], or Section 9.5 of [2]. Analytic Bandpass Signal Generation Input: discrete Clay Turner's method of designing two x (n) bandpass signal bp orthogonal real A(k) x (n) centered at f I c bandpass filters, Hz, with sample that when combined B(k) xQ(n) rate of fs Hz. yield a positive- frequency complex xABP(n) = xI(n) + jxQ(n) Output: discrete filter. If filters are centered at f /4 analytic x (n) s ABP and have an even The A(k) and B(k) filters have guaranteed bandpass signal, number of taps, then equal magnitude responses. B[k] centered at fc coefficients are a reversed-ordered half the A[k] and Hz, with sample B[k] coefficients version of the A[k] coefficients (reduces rate of f Hz. coefficient storage requirement). s will be zero-valued. Phase responses of A[k] and B[k] filters are very nearly, but not quite exactly, linear. See [8] for equations used to compute A(k) and B(k) coefficients.

5 Table 1 Cont'd: Analytic Bandpass Signal Generation Input: discrete Straightforward bandpass signal frequency-domain Set negative- X (m) method of bandpass xbp(n) bp centered at fc N-point frequency analytic signal DFT samples Hz, with sample generation. Negative- equal to zero rate of fs Hz. 2 frequency spectral

XABP(m) components of Xbp(m) Assumes X (m=0) bp Output: discrete are set to zero and Xbp(m=N/2) N-point Real xI(n) are zero-valued inverse analytic xABP(n) creating the desired DFT Imag. xQ(n) bandpass signal, analytic signal's centered at fc spectrum. x (n) = x (n) + jx (n) ABP I Q Hz, with sample See [9] or Section rate of fs Hz. 9.4.2 of [2]. Interpolated Analytic Bandpass Signal Input: discrete Frequency-domain Generation bandpass signal method of centered at fc interpolated by M x (n) X (m) Create an X (m), bp N-point bp ABP Hz, with sample bandpass analytic zero-valued, signal generation. DFT rate of fs Hz. MN-sample sequence Negative-frequency 2 spectral components Output: of Xbp(m) are set to XABP(m) = Xbp(m) for interpolated zero creating the 1 < m < (N/2)–1 discrete xABP(n) desired analytic Assumes X (m=0) bp signal's spectrum. and X (m=N/2) analytic bandpass bp XABP(m) are zero-valued signal, centered New spectrum is zero- stuffed, prior to N-point Real xI(n') at fc Hz, with inverse inverse DFT, to Imag. x (n') sample rate of DFT Q achieve time-domain Mf Hz. s interpolation by xABP(n') = xI(n') + jxQ(n') factor M. See Section 13.28.2 of [2].

For completeness, I mention that DSP pioneer Charles Rader proposed a computationally-efficient analytic bandpass signal generation method (See [10] or Note 66 in [7]) where both its xI(n) and xQ(n) output channels have identical frequency magnitude responses, however that scheme does not exhibit a linear- phase frequency response. As such, I didn't include it in Table 1.

References

[1] Considine, V. “Digital Complex Sampling,” Electronics Letters, 19, August 4, 1983. [2] Lyons, R. Understanding Digital , Prentice Hall Publishing, Hoboken, NJ, 2010. [3] Ohlsson, H., et al. “Design of a Digital Down Converter Using High Speed Digital Filters,” in Proc. Symp. on Gigahertz Electronics, Gothenburg, Sweden, March 13–14, 2000, pp. 309–312. [4] Powell, S. “Design and Implementation Issues of All Digital Broadband Modems,” DSP World Workshop Proceedings, Toronto, Canada, September 13–16, 1998, pp. 127–142.

6 [5] Frerking, M. Digital Signal Processing in Communications Systems, Chapman & Hall, New York, 1994, p. 330. [6] Reilly, A., et. al. “Analytic Signal Generation—Tips and Traps,” IEEE Trans. on Signal Proc., Vol. 42, No. 11, Nov. 1994. [7] Rorabaugh, C. Notes on Digital Signal Processing: Practical Recipes for Design, Analysis and Implementation, Prentice Hall Publishing, Hoboken, NJ, 2010. [8] Turner, C. "An Efficient Analytic Signal Generator", IEEE Signal Processing Magazine, DSP Tips & Tricks column, July 2009. [9] Marple, S., Jr. “Computing the Discrete-Time ‘Analytic’ Signal via FFT,” IEEE Trans. on Signal Proc., Vol. 47, No. 9, September 1999, pp. 2600–2603. [10] Rader, C. “A Simple Method for Sampling In-Phase and Quadrature Components,” IEEE Trans. Aerospace and Electronic Syst., Vol. 20, No. 6, pp. 821-824, Nov. 1984.

7