**2. Complex signals, analytic signals and Hilbert transformers**

446 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 1

with Type IV symmetry.

complexity in FIR filters.

subfilter was developed in [15].

elements in DSP implementations, are required in an amount linearly related with the length of the filter. A linear phase FIR Hilbert transformer, which has an anti-symmetrical impulse response, can be designed with either an odd length (Type III symmetry) or an even length (Type IV symmetry). The number of multipliers *m* is given in terms of the filter length *L* as *m CL* , where *C* = 0.25 for a filter with Type III symmetry or *C* = 0.5 for a filter

The design of optimum equiripple FIR Hilbert transformers is usually performed by Parks-McClellan algorithm. Using the MATLAB Signal Processing Toolbox, this becomes a straightforward procedure through the function firpm. However, for small transition bandwidth and small ripples the resulting filter requires a very high length. This complexity increases with more stringent specifications, i.e., narrower transition bandwidths and also smaller pass-band ripples. Therefore, different techniques have been developed in the last 2 decades for efficient design of Hilbert transformers, where the highly stringent specifications are met with an as low as possible required complexity. The most representative methods are [9]-[15], which are based in very efficient schemes to reduce

Methods [9] and [10] are based on the Frequency Response Masking (FRM) technique proposed in [16]. In [9], the design is based on reducing the complexity of a half-band filter. Then, the Hilbert transformer is derived from this half-band filter. In [10], a frequency response corrector subfilter is introduced, and all subfilters are designed simultaneously under the same framework. The method [11] is based on wide bandwidth and linear phase FIR filters with Piecewise Polynomial-Sinusoidal (PPS) impulse response. These methods offer a very high reduction in the required number of multiplier coefficients compared to the direct design based on Parks-McClellan algorithm. An important characteristic is that they are fully parallel approaches, which have the disadvantage of being area consuming

The Frequency Transformation (FT) method, proposed first in [17] and extended in [18], was modified to design FIR Hilbert transformers in [12] based on a tapped cascaded interconnection of repeated simple basic building blocks constituted by two identical subfilters. Taking advantage of the repetitive use of identical subfilters, the recent proposal [13] gives a simple and efficient method to design multiplierless Hilbert transformers, where a combination of the FT method with the Pipelining-Interleaving (PI) technique of [19] allows getting a time-multiplexed architecture which only requires three subfilters. In [14], an optimized design was developed to minimize the overall number of filter coefficients in a modified FT-PI-based structure derived from the one of [13], where only two subfilters are needed. Based on methods [13] and [14], a different architecture which just requires one

In this chapter, fundamentals on digital FIR Hilbert transformers will be covered by reviewing the characteristics of analytic signals. The main connection existing between

since they do not directly take advantage of hardware multiplexing.

A real signal is a one-dimensional variation of real values over time. A *complex signal* is a two-dimensional signal whose value at some instant in time can be specified by a single complex number. The variation of the two parts of the complex numbers, namely the real part and the imaginary part, is the reason for referring to it as two-dimensional signal [20]. A real signal can be represented in a two-dimensional plot by presenting its variations against time. Similarly, a complex signal can be represented in a three-dimensional plot by considering time as a third dimension.

Real signals always have positive and negative frequency spectral components, and these components are generally real and imaginary. For any real signal, the positive and negative parts of its real spectral component always have even symmetry around the zero-frequency point, i.e., they are mirror images of each other. Conversely, the positive and negative parts of its imaginary spectral component are always anti-symmetric, i.e., they are always negatives of each other [1]. This conjugate symmetry is the invariant nature of real signals.

Complex signals, on the other hand, are not restricted to these spectral conjugate symmetry conditions. The special case of complex signals which do not have a negative part neither in their real nor in their imaginary spectral components are known as *analytic signals*or also as quadrature signals [2]. An example of analytic signal is the complex exponential signal*xc*(*t*), presented in Figure 1, and described by

$$\mathbf{x}\_c(t) = e^{j\alpha\_0 t} = \mathbf{x}\_r(t) + j\mathbf{x}\_i(t) = \cos(\alpha\_0 t) + j\sin(\alpha\_0 t). \tag{1}$$

The real part and the imaginary part of the analytic signal are related trough the *Hilbert transform*. In simple words, given an analytic signal, its imaginary part is the Hilbert transform of its real part. Figure 1 shows the complex signal *xc*(*t*), its real part *xr*(*t*) and its imaginary part, *xi*(*t*). Figure 2 presents the frequency spectral components of these signals. It can be seen that the real part *xr*(*t*) and the imaginary part *xi*(*t*), both real signals, preserve the spectral conjugate symmetry. The complex signal *xc*(*t*) does not have negative parts neither in its real spectral component nor in its imaginary spectral component. For this reason, analytic signals are also referred as one-side spectrum signals. Finally, Figure 3 shows the Hilbert transform relation between the real and imaginary parts of *xc*(*t*).

**Figure 1.** The Hilbert transform and the analytic signal of *xr*(*t*) = cos(*ω*0*t*), *ω*0= 2*π*.

**Figure 2.** From left to right, frequency spectrum of *xr*(*t*), *xi*(*t*) and *xc*(*t*).

**Figure 3.** Hilbert transform relations between *xr*(*t*) and *xi*(*t*) to generate *xc*(*t*).

The motivation for creating analytic signals, or in other words, for eliminating the negative parts of the real and imaginary spectral components of real signals, is that these negative parts have in essence the same information than the positive parts due to the conjugate symmetry previously mentioned. The elimination of these negative parts reduces the required bandwidth for the processing. For the case of DSP applications, it is possible to form a complex sequence *xc*(*n*) given as follows,

$$\mathbf{x}\_c(n) = \mathbf{x}\_r(n) + j\mathbf{x}\_i(n),\tag{2}$$

with the special property that its frequency spectrum *Xc*(*ejω*) is equal to that of a given real sequence *x*(*n*) for the positive Nyquist interval and zero for the negative Nyquist interval, i.e.,

$$X\_c(e^{j\phi}) = \begin{cases} \begin{array}{l} X(e^{j\phi}) \ \text{for} \ 0 \le \phi < \pi, \\ 0 \qquad \text{for} \ -\pi \le \phi < 0. \end{array} \tag{3}$$

Although analyticity has no formal meaning for sequences [2], the same terminology, i.e., analytic sequence, will be applied for complex sequences whose frequency spectrum is onesided, like in (3).

If *Xr*(*ejω*) and *Xi*(*ejω*) respectively denote the frequency spectrums of *xr*(*n*) and *xi*(*n*), then

$$X\_c(e^{j\alpha}) = X\_r(e^{j\alpha}) + jX\_i(e^{j\alpha}).\tag{4}$$

The spectrums of *xr*(*n*) and *xi*(*n*) can be readily deduced as

$$X\_r(e^{j\alpha}) = \frac{1}{2} \| X\_c(e^{j\alpha}) + X\_c^\*(e^{-j\alpha}) \| \tag{5}$$

$$jX\_i(e^{j\alpha}) = \frac{1}{2} [X\_c(e^{j\alpha}) - X\_c^\*(e^{-j\alpha})] \,\tag{6}$$

where *Xc \** (*ejω*) is the complex conjugate of *Xc*(*ejω*). Note that (6) gives an expression for *jXi*(*ejω*), which is the frequency spectrum of the imaginary signal *jxi*(*n*). Also, note that *Xr*(*ejω*) and *Xi*(*ejω*) are both complex-valued functions in general. However, *Xr*(*ejω*) is conjugate symmetric, i.e., *Xr*(*ejω*) = *Xr \** (*e–jω*). Similarly, *jXi*(*ejω*) is conjugate anti-symmetric, i.e., *jXi*(*ejω*) = –*jXi \** (*e–jω*). These relations are illustrated in Figure 4.

From (5) and (6) we obtain

448 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 1

**Figure 1.** The Hilbert transform and the analytic signal of *xr*(*t*) = cos(*ω*0*t*), *ω*0= 2*π*.

0

0.5

4

2

xr (t)

xc (t)

0



0

imaginary

0

( ) *Xr* 

Imaginary

0

0 1

2

**Figure 2.** From left to right, frequency spectrum of *xr*(*t*), *xi*(*t*) and *xc*(*t*).

Freq

0.5

Real

**Figure 3.** Hilbert transform relations between *xr*(*t*) and *xi*(*t*) to generate *xc*(*t*).

Hilbert

imaginary parts of *xc*(*t*).

signals. Finally, Figure 3 shows the Hilbert transform relation between the real and

(t) ( Hilbert transform of xr

xi


0

( ) *Xc* 

Imaginary

0

Freq

1

Real


0

(t) )

1

( ) *<sup>i</sup> x t*

Freq

Real

0

0.5

( ) *<sup>r</sup> <sup>x</sup> <sup>t</sup>* ( ) *<sup>r</sup> <sup>x</sup> <sup>t</sup>* Analytic

0

( ) *Xi* 

Imaginary

( ) *<sup>c</sup> x t*

signal

2

6

time real

$$X\_c(e^{j\alpha}) = 2X\_r(e^{j\alpha}) - X\_c^\*(e^{-j\alpha}),\tag{7}$$

$$X\_c(e^{j\alpha}) = 2jX\_i(e^{j\alpha}) + X\_c^\*(e^{-j\alpha}),\tag{8}$$

and since *Xc \** (*e–jω*) = 0 for 0 <*ω*<*π* (see Figure 4b), eqs. (3), (7) and (8) give

**Figure 4.** Decomposition of an unilateral spectrum. Solid and dashed lines are, respectively, the real and imaginary parts.

Digital FIR Hilbert Transformers: Fundamentals and Efficient Design Methods 451

$$X\_c(e^{j\phi}) = \begin{cases} 2X\_r(e^{j\phi}) & \text{for } 0 \le \phi < \pi, \\\ 0 & \text{for } -\pi \le \phi < 0. \end{cases} \tag{9}$$

$$X\_{\epsilon}(e^{j\phi}) = \begin{cases} 2jX\_i(e^{j\phi}) & \text{for } 0 \le \phi < \pi, \\\ 0 & \text{for } -\pi \le \phi < 0. \end{cases} \tag{10}$$

Thus

450 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 1

( ) *<sup>j</sup> Xc e* 

Real Imaginary

\* ( ) *<sup>j</sup> X e <sup>c</sup>* 

Imaginary

(a)

( ) *<sup>j</sup> Xr e* 

(b)

(c)

( ) *<sup>j</sup> X e <sup>i</sup>* 

Imaginary

Real Imaginary

**Figure 4.** Decomposition of an unilateral spectrum. Solid and dashed lines are, respectively, the real

(d)

Real

2

2

> 2

Real

2

and imaginary parts.

2

2

> 2

2 3

3

3

3

$$X\_i(e^{j\alpha}) = -jX\_r(e^{j\alpha}) \quad \text{for } 0 \le \alpha < \pi. \tag{11}$$

On the other hand, from (4), and since *Xc*(*ejω*) = 0 for –*π ω*< 0, we have

$$X\_j(e^{j\phi}) = jX\_r(e^{j\phi}) \quad \text{for } -\pi \le \phi < 0. \tag{12}$$

Therefore, (11) and (12) can be expressed as

$$X\_i(e^{j\alpha}) = \begin{cases} -jX\_r(e^{j\alpha}) & \text{for } 0 \le \alpha < \pi, \\\ jX\_r(e^{j\alpha}) & \text{for } -\pi \le \alpha < 0, \end{cases} \tag{13}$$

or

Freq

Freq

Freq

3

3

3

> 3

Freq

$$X\_i(e^{j\alpha}) = H(e^{j\alpha})X\_r(e^{j\alpha}),\tag{14}$$

where

$$H(e^{j\phi}) = \begin{cases} -j & \text{for } 0 \le \phi < \pi, \\\ j & \text{for } -\pi \le \phi < 0. \end{cases} \tag{15}$$

According to (14), *xi*(*n*) can be obtained by processing *xr*(*n*) with a linear time-invariant discrete-time system whose frequency response *H*(*ejω*) is given in (15). This frequency response has unity magnitude, a phase angle of –*π*/2 radians for 0 <*ω*<*π*, and a phase angle of *π*/2 radians for –*π*<*ω*< 0. A system of this type is commonly referred to as *Hilbert transformer* or sometimes as 90-degree phase shifter.

The impulse response *h*(*n*) of a Hilbert transformer is [2]

$$h(n) = \begin{cases} \frac{2}{n\pi} \sin^2\left(\frac{n\pi}{2}\right) & \text{for } n \neq 0, \\\ 0 & \text{for } n = 0. \end{cases} \tag{16}$$

This impulse response is not absolutely summable and thus the frequency response of (15) is ideal. However, approximations to the ideal Hilbert transformer can be obtained with IIR or FIR systems. Thus, Hilbert transformers are considered a special class of filter.

IIR Hilbert transformers have phase error as well as magnitude error in approximating the ideal frequency response. Basically, these filters can be designed by using two all-pass systems whose phase responses differ by approximately *π*/2 over some well-defined portion of the band 0 < |*ω*|<*π*. By taking the outputs of the two all-pass filters as the real and imaginary parts of a complex signal it can be found that the spectrum of such signal nearly vanishes over much of the negative frequency interval. As such, the outputs of the two allpass filters are quite nearly a Hilbert transformer.

FIR Hilbert transformers with constant group delay can be easily designed. The *π*/2 phase shift is realized exactly, with an additional linear phase component required for a causal FIR system. By evaluating (16) over some positive and negative values of *n*, it can be seen that the impulse response is anti-symmetric. Therefore, FIR Hilbert transformers are based on either Type III (i.e., anti-symmetric impulse response with odd length *L*) or Type IV (i.e., antisymmetric impulse response with even length *L*) symmetry. Filters with Type III symmetry have amplitude equal to zero in *ω* = 0 and *ω* = *π* and filters with Type IV symmetry have amplitude equal to zero only in *ω* = 0. Thus, the FIR approximation is acceptable over a given range of frequencies (a pass-band region) which does not include these extremes.

The exactness of the phase of Type III and Type IV FIR systems is a compelling motivation for their use in approximating Hilbert transformers. Additionally, whereas IIR Hilbert transformers can present instability and they are sensitive to rounding error in their coefficients, FIR filters have guaranteed stability, are less sensitive to the coefficients rounding and their phase response is not affected by this rounding. Because of this, FIR Hilbert transformers are often preferred [8]-[15]. The rest of this chapter will be focused on the design of FIR Hilbert transformers.
