1930708300 Book Ex

Embed Size (px)

Citation preview

  • 8/8/2019 1930708300 Book Ex

    1/26

    Introduction to Multirate Systems 1

    Chapter I

    Introduction to

    Multirate Systems

    Gordana Jovanovic-Dolecek

    INAOE, Mexico

    Copyright 2002, Idea Group Publishing.

    This chapter treats the fundamentals of multirate system theory and

    includes decimation and interpolation as the basic concepts behind the

    changing of the sampling rate. The conversion of the sampling rate by an

    integer as well as by a rational number is explained. Also discussed are some

    widely used interconnections of upsamplers and downsamplers.

    INTRODUCTIONThe process of converting the given rate of a signal into a different rate

    is calledsampling rate conversion. Systems that employ multiple sampling

    rates in the processing of digital signals are called multirate digital signal

    processing systems.

    Sample rate conversion is one of the main operations in a multirate

    system. This chapter focuses on the description of sampling rate conversion

    in both time and frequency domains.

    DECIMATIONThe reduction of a sampling rate is called decimation, because the

    original sample set is reduced (decimated).

    Decimation consists of two stages: filtering and downsampling, as

    shown in Figure 1.

    We will first consider downsampling and through its description illus-trate why it is necessary to apply filtering prior to downsampling.

  • 8/8/2019 1930708300 Book Ex

    2/26

    2 Jovanovic-Dolecek

    DownsamplingDownsamplingreduces the input sampling ratef

    iby an integer factorM,

    which is known as a downsampling factor. It is customary to use a box with

    a down-pointing arrow, followed by the downsampling factor, as a symbol to

    represent downsampling, as shown in Figure 2.

    The output signaly(m) is called a downsampled signaland is obtained by

    taking only every M-th sample of the input signal and discarding all others,

    )()( mMxmy = . (1)

    To model the downsampling process, it is convenient to divide it into twosteps. The output of thefirststep is the signalx(n), which is obtained by

    setting all samples whose indices are not integer multiples ofMto zero. In the

    secondstep, all zeros that were introduced in the preceding step are now

    discarded, and the downsampled signal is obtained.

    The downsampling operation is not invertible because it requires setting

    some of the samples to zero. In other words, we cannot recoverx(n) fromy(m)

    exactly, but can only compute an approximate value.

    Step One

    We observe that the sampling rate is not altered during thefirststep, so

    that the signalsx(n) andx(n) have the same sampling rate. The signalx(n)

    can be considered as a multiplication ofx(n) with the discrete sampling

    functioncM(n), where Mdenotes the downsampling factor

    )()()(' ncnxnx M= , (2)

    where,

    ,...1,0,1...,;0

    1

    )( =

    =

    = motherwise

    mMn

    ncM . (3)

    Mx(n)u(n)

    Filtering Downsampling

    y(m)

    DECIMATION

    h(n)

    Figure 1: Decimation

    Mx(n) y(m)=x(mM)

    fi f =f /M0 i

    Figure 2: Downsampling

  • 8/8/2019 1930708300 Book Ex

    3/26

    Introduction to Multirate Systems 3

    The sampling function cM(n) is periodic with period M, and as such can be

    represented by the Fourier series expansion (see Oppenheim and Schafer,

    1989, pp.515-516),

    MknjM

    k

    M ekCM

    nc21

    0

    )(1

    )(

    =

    = (4)

    where C(k) are complex-valued Fourier series coefficients defined by

    =

    =1

    0

    2

    )()(M

    n

    M

    knj

    M enckC

    . (5)

    Substituting (3) into (5) it follows that C(k)=1 for all k. Hence,

    =

    =1

    0

    21)(

    M

    k

    Mknj

    M eM

    nc

    . (6)

    To analyze the frequency representation of thefirststep of downsampling, let

    us now compute the Fourier transform (FT) of the sequencex(n). Using (2)

    we have

    nj

    n

    Mnj

    n

    j encnxenxeX

    =

    = == )()()(')('

    . (7)

    Using the relationship established in (6), the above becomes

    =

    =

    =n

    M

    k

    njM

    knj

    j eeM

    nxeX1

    0

    2

    )1

    )(()('

    . (8)

    Finally, by interchanging the sums in (8), the following expression for X(ejw)

    results in

    =

    =

    =

    1

    0

    )2

    (

    )(1

    )('M

    k n

    M

    kjn

    jenx

    MeX

    . (9)

    Let us now compute the Fourier transform ofx(n),

    =

    =n

    jnj enxeX )()( . (10)

    Applying the frequency-shift property of FT, we have

    =

    =

    n

    M

    kjn

    M

    kj

    enxeX)

    2()

    2(

    )()(

    . (11)

  • 8/8/2019 1930708300 Book Ex

    4/26

    4 Jovanovic-Dolecek

    Noticing that the expression on the right side of (11) looks like the one given

    in (9), we can conclude that

    =

    =

    1

    0

    )2

    (

    )(

    1

    )('

    M

    k

    M

    kj

    j

    eXMeX

    . (12)

    Observe that the amplitude is scaled by 1/Mand that the replicas of the

    input spectrum are introduced at multiples of2/M.

    Step Two

    The zeros previously introduced now have to be eliminated. This

    operation does not change the content of the signal x(n), rather it just

    introduces time scaling by a factor of1/M(samplesx(mM) become y(m)).

    Because the operations in time and frequency are inverse to each other,the frequency scale will be multiplied by M, i.e., the spectrum X(ejw/M)

    becomes Y(ejw), as shown below.

    Using the definition of FT forx(n) we have

    .)(')('

    =

    =n

    Mjn

    Mj

    enxeX

    (13)

    Becausex(n) is nonzero only forn=mM, we can write

    )(')(')(')/(/

    =

    =

    ==m

    mj

    m

    mMMjMjeMmxeMmxeX

    . (14)

    Finally, substituting (1) in (14) and using the definition of FT fory(m) we

    arrive at

    =

    ==m

    jjmMj eYemyeX ).()()(' / (15)

    Using (12) we can rewrite (15) as

    =

    ==

    1

    0

    )2

    (

    )(1

    )(')(M

    k

    M

    kj

    jjMeX

    MeXeY

    . (16)

    Sometimes it is more convenient to express the downsampled signal in terms

    ofitsz-transform. For a given sequencex(n), itsz-transform is defined as

    ,)()(

    =

    =n

    nznxzX (17)

    wherezis a complex variable, given byjrez= .

    -

  • 8/8/2019 1930708300 Book Ex

    5/26

    Introduction to Multirate Systems 5

    It is well known that when it exists, the Fourier transform is simplyX(z)

    withjez= ,

    )()(

    j

    ez eXzX j=

    = . (18)Consequently, we can express the relationship in (16) in terms of the z-

    transforms,

    =

    =

    ===1

    0

    1

    0

    /2 )(1

    )(1

    )(')(M

    k

    M

    k

    kM

    MkjM zWXM

    zeXM

    zXzY (19)

    where

    .1,...,0,

    2

    ==

    MkeW Mkj

    k

    M

    (20)

    Example 1

    To illustrate downsampling in the time domain consider the input signal

    shown in Figure 3(a) with the downsampling factorM=2. The corresponding

    sampling function forn=0,...,16, is given in Figure 3(b). Figure 3(c) demon-

    strates thefirststep of downsampling where every second sample is set to

    zero. In thesecondstep (Figure 3(d)) we eliminate zeros introduced in the

    previous step to finally obtain the downsampled singal. Observe that the

    downsampled signal is a compressed-in-time version of the input signal.Let us now consider the frequency domain representation of

    downsampling, as shown in Figure 4. During the firststep (Figure 4(b)), one

    image (M-1=1) is introduced in the interval [0,2], and the amplitude of the

    spectrum is scaled by . In the second step, shown in Figure 4(c), the

    frequency is scaled by M=2, so, for example, the frequency points 0.2 and 0.5

    become 0.4 and 1, respectively.

    We can see that the spectrum of the downsampled signal is the input

    spectrum stretched by 2. Remember that in the time domain the opposite was

    true (the resulting signal was compressed by a factor of2), because the timeand frequency representations are inverse to each other.

    AliasingAs we have already demonstrated, the individual spectra obtained during

    the first step of downsampling are the repeated replicas of the original

    spectrum. However, if the original signal is not bandlimited to /M, the

    replicas will overlap (see Figure 4(b)). This overlapping effect is called

    aliasing. In order to avoid aliasing, it is necessary to limit the spectrum of thesignal before downsampling to below /M. This is why a lowpass digital filter

  • 8/8/2019 1930708300 Book Ex

    6/26

    6 Jovanovic-Dolecek

    0 2 4 6 8 10 12 14 16

    0

    0.02

    0.04

    0.06

    0.08

    0.1

    0.12

    0.14

    0.16

    FIRST STEP

    n

    x'(n)

    0 2 4 6 8 10 12 14 160

    0.2

    0.4

    0.6

    0.8

    1

    1.2SAMPLING FUNCTION

    n

    c2(n)

    0 2 4 6 8 10 12 14 16

    0

    0.02

    0.04

    0.06

    0.08

    0.1

    0.12

    0.14

    0.16

    SECOND STEP

    n

    y(n)

    0 2 4 6 8 10 12 14 16

    0

    0.02

    0.04

    0.06

    0.08

    0.1

    0.12

    0.14

    0.16

    INPUT SIGNAL

    n

    x(n)

    Figure 3: Downsampling in time domain

    (a) Input signal (b) Discrete sampling function

    (c) First step (d) Second step

    (from Figure 1) precedes the downsampler. This filter is called a decimation

    orantialiasingfilter. The exact filter specifications depend on how much

    aliasing, if any, is permitted. Nonetheless, some applications allow a certain

    degree of aliasing during downsampling.

    The specifications for the lowpass decimation filter are given by (see

    Mitra, 2001),

    =

    M

    MeH

    cj

    /,0

    /,1)( , (21)

    where c

    represents the highest frequency that needs to be preserved.

    Properties of DownsamplingLet us first verify that the downsampling is a linear and time-varying

    operation. The operation is linear if the principle of superposition holds. That

    means that downsampling of the sum of the scaled input signals must be equalto the scaled sum of the downsampled signals.

  • 8/8/2019 1930708300 Book Ex

    7/26

    Introduction to Multirate Systems 7

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1INPUT SIGNAL

    w/pi

    abs(X)

    0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    0.35

    0.4

    0.45

    0.5FIRST STEP

    w/pi

    abs(X')

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    0.35

    0.4

    0.45

    0.5SECOND STEP

    w/pi

    abs(Y)(a) Input signal

    (b) First step

    (c) Second step

    Figure 4: Downsampling in frequency domain

    Structure 1

    MX(z) Y(z )

    M

    X (z)1a1

    X (z)NaN

    MY (z)1

    Y(z )M

    X (z)1a1

    X (z)NaN

    MY (z)N

    Structure 2

    Figure 5: Superposition principle

  • 8/8/2019 1930708300 Book Ex

    8/26

    8 Jovanovic-Dolecek

    The proof is obvious, so we omit it. Therefore, downsampling is a linear

    operation.

    Now we examine whether downsampling is a time-varying operation. In

    general, if the delayD of the input signal results in the same delayD of theoutput signal, the operation is time invariant, otherwise it rendered time-

    varying. According to the equation (1) if the input signal is delayed byD,

    ),( DmMx (22)and the downsampled signal will be

    ).()()( DmyM

    Dmy

    M

    DmMy =

    (23)

    Consequently, the delay in the input signal does not result in the same

    delay of the downsampled signal, and we can conclude that downsampling isa time-varying operation. When D/Mis not an integer, the downsampled

    signal will have a fractional delay, as (23) shows. This means that the

    downsampled signal with no input delay and the downsampled delayed signal

    will have a different shape.

    Consider the case when the delay is a multiple of the downsampling

    factorM, i.e., whenD=kM. It easily follows from (23) that the downsampled

    signal will be

    ).()( kmyM

    kMmy = (24)

    In this case, the downsampling of the input signal that is delayed by kM,

    results in a delayed-by-k version of the original downsampled signal. As we

    have already seen, the delay is not the same in the input and the output.

    Nonetheless, at the output we do obtain a delayed downsampled version of the

    input signal. This means that if a delay is a multiple of the downsampling

    factor M, the corresponding downsampled signal will have the same shape as

    a downsampled signal with no input delay.

    Useful IdentitiesThree useful identities summarize the important properties associated

    with downsampling. The first identity states that the sum of the scaled,

    individually downsampled signals is the same as the downsampled sum of

    these signals. This property follows directly from the principle of superposi-

    tion, as previously discussed.

    The second identity (Figure 6) establishes that a delay ofMsamples

    before the downsampler is equivalent to a delay of one sample after the

    downsampler (where Mrepresents the downsampling factor).

  • 8/8/2019 1930708300 Book Ex

    9/26

    Introduction to Multirate Systems 9

    Structure 1 Structure 2

    MX(z) Y(z )

    M

    z-M

    MX(z) Y(z )

    M

    z-1

    Y (z )1M

    Figure 6: Second identity

    Consider Structure 1 in Figure 6. We see that the input to the downsampler is

    X(z) z-M, so that according to (19), the output of Structure 1 is given by

    .))((1

    )(1

    0

    MM

    k

    kM

    kM

    M zWzWXM

    zY

    == (25)

    Using (20) it follows that

    ,1=

    kM

    MW (26)which simplifies the above expression into

    .)(1

    )(1

    0

    =

    =M

    k

    kM

    MM zWXzM

    zY (27)

    We now consider Structure 2 in Figure 6. The output of the downsampler is

    (note thatzbecomeszMafter downsampling),

    .)(1

    )(1

    0

    1

    =

    =M

    k

    kM

    MzWX

    M

    zY (28)

    Consequently, the output of this structure is

    .)(1

    )()()(1

    0

    11

    =

    ==M

    k

    kM

    MMMM zWXM

    zzYzzY (29)

    Comparing the expressions in (27) and (29), it follows that Structures 1 and

    2 in Figure 6 are equivalent.

    Figure 7 demonstrates the third identity. The filterG(zM) is called an

    expanded filterand is obtained by replacing each delay z-1 of the original filter

    G(z) with a delay z-M.In time domain this is equivalent to inserting M-1 zeros

    between the original samples of the impulse response.

    The identitystates that the filtering by the expanded filter followed by

    downsampling is equivalent to having downsampling first, followed by the

    filtering with the original filter. To confirm this algebraically, consider the

    structures shown in Figure 7.

    Using (19) and (26) we arrive at the output of the first structure

    .)()(1

    )()(1

    )(

    1

    )(

    1

    0

    1

    0

    1

    01

    =

    =

    =

    ==

    =M

    k

    MkM

    kMM

    MM

    k

    kM

    M

    k

    k

    M

    M

    zGzWXM

    WzGzWXM

    zWXMzY(30)

  • 8/8/2019 1930708300 Book Ex

    10/26

    10 Jovanovic-Dolecek

    Similarly, using (19), the output of the downsampler in the second

    structure is

    =

    =1

    0

    1 )(1

    )(M

    k

    kM

    M zWXM

    zY . (31)

    Finally, the output of the second structure is

    =

    == 1

    0

    1 )()(1)()()(

    M

    k

    MkM

    MMM zGzWXM

    zGzYzY . (32)

    Comparing (30) and (32), we can conclude that the two structures in Figure

    7 are equivalent.

    Polyphase DecimationWe have previously seen that in the decimation structure the filtering

    is performed at a higher rate. If we use an IIR filter for antialiasing, we

    would have to compute all of the feedback values for each new input value(Grover and Deller, 1999). On the other hand, FIR filters have no

    feedback, so that during the convolution many terms that are not used in

    the output signal are needlessly computed. Hence, a more efficient

    structure would be if the FIR filtering were performed at a lower sampling

    rate. To do this it is necessary to analyze the FIR filter through its

    polyphase components.

    The Polyphase FiltersIf the FIR filter hasNcoefficients, whereNis an integer multiple of

    M, we can obtain M different discretely sampled components of the

    impulse response. That means that the correspondingz-transform can be

    partitioned into Msubsignals. For example, forN=12 and M=4 we can

    write

    Structure 2

    MX(z) Y(z )

    M

    G( )z

    Structure 1

    MX(z) Y(z )

    M

    G(z )MX (z)1 Y (z )1

    M

    Figure 7: Third identity

  • 8/8/2019 1930708300 Book Ex

    11/26

    Introduction to Multirate Systems 11

    ].)11()7()3([z

    ])10()6()2([

    ])9()5()1([

    ])8()4()0([

    )11()7()3(

    )10()6()2(

    )9()5()1(

    )8()4()0()()(

    8403-

    8402

    8401

    8400

    1173

    1062

    951

    8401

    0

    =

    +++

    +++

    +++

    ++=

    +++

    ++++++

    ++==

    zhzhzh

    zhzhzhz

    zhzhzhz

    zhzhzhz

    zhzhzh

    zhzhzh

    zhzhzh

    zhzhzhznhzHN

    n

    n

    (33)

    This equation can now be rewritten to yield

    =

    =3

    0

    4),()(

    k

    kk zHzzH (34)

    where

    .3210;))(4()(2

    0

    44 ,,,kzknhzHn

    nk =+=

    =

    (35)

    We can generalize the expression (34) to obtain

    =

    =1

    0

    ),()(M

    k

    Mk

    kzHzzH (36)

    where

    =

    =+=1/

    0

    1,...,0;))(()(MN

    n

    nMMk MkzknMhzH . (37)

    A realization ofH(z) based on the decomposition of (36) is called a

    polyphase realization and designates the basis for the polyphase decimation.

    The equation (37) represents thepolyphase components of the filter. From the

    expressions in (33) and (37) we can notice that the polyphase components are

    obtained by the left shift of the impulse response by k samples, followed by

    discrete sampling. The zero component corresponds to the shift k=0, the first

    one to the k=1, and the M-1-th to k=M-1.

  • 8/8/2019 1930708300 Book Ex

    12/26

    12 Jovanovic-Dolecek

    By eliminating zeros introduced by discrete sampling, from (37) (recall

    that this is the second step of downsampling), we arrive at

    =

    =+=1/

    0 1,...,0;)()(

    MN

    n

    n

    k MkzknMhzH (38)

    Notice that the polyphase components in (37) are simply the expanded

    polyphase components given by (38). Therefore, the representation in (38)

    can be used in the applications of the third identity.

    Utilizing the relation (36), the decimation structure from Figure 1 can be

    redrawn as in Figure 8(a). Using thefirstand third identities we obtain a more

    efficient version in which both the number of filter operations as well as the

    amount of memory required are reduced by a factor ofM. This structure is

    shown in Figure 8(b). As we can see, the subfilters are polyphase components(38) of the decimation filter. Also notice that the filtering is now performed

    at the lower sampling rate.

    (a)

    MU(z) Y(z)

    H (z )0M

    H (z )1M

    H (z )2M

    H (z )M-1M

    ...

    ...

    ...

    H(z)

    z-1

    z-1

    Figure 8: Polyphase decimation

    MU(z) Y(z)

    H (z)0

    H (z)1

    H (z)2

    H (z )M-1

    ..

    .

    ..

    .

    ...

    z-1

    z-1

    M

    M

    M

    (b)

  • 8/8/2019 1930708300 Book Ex

    13/26

    Introduction to Multirate Systems 13

    Note that the delay/downsampler chain has the effect of distributing

    consecutive samples among the polyphase filters. Due to this, the structure is

    often represented using an input commutator as shown in Figure 9.

    INTERPOLATIONThe procedure of increasing the sampling rate is called interpolation,

    and it consists of two stages: upsampling and filtering (shown in Figure

    10). We are going to consider interpolation in detail in both time and

    frequency domains.

    UpsamplingUpsampling increases the sampling rate by an integer factorL, by

    insertingL-1 equally spaced zeros between each pair of samples,

    =

    =otherwise

    mLnforLnxny

    0

    )/()( (39)

    whereL is called an interpolation factor.

    The symbol for this operation is a box with an upward-pointing arrow,

    followed by the interpolation factor, as Figure 11 illustrates. As we can see,

    the input sampling ratefiis increasedL times.

    We can observe the following:

    1. The process of upsampling does not change the content of the input signal,

    and it only introduces the scaling of the time axis by a factorL. (The time

    U(z)

    Y(z)H (z )0

    H (z )1

    H (z )2

    H (z)M-1

    ..

    .

    ..

    .

    0 1

    2

    M-1

    Figure 9: Polyphase decimation with an input commutator

    Interpolation

    Lx(m) u(n)

    h(n)y(n)

    Upsampling Filtering

    Figure 10: Interpolation

  • 8/8/2019 1930708300 Book Ex

    14/26

    14 Jovanovic-Dolecek

    axis is divided byL). In the frequency domain, according to the principle

    of duality, the frequency scale is multiplied byL.

    To verify this observation, we will analyze the behavior of the Fourier

    transform of aL-fold upsampler.

    2. Consequently, the operation of upsampling (unlike downsampling) is

    invertible, in other words, it is possible to recover the input signalx(m)

    from samples ofy(n) exactly.

    Using (39), the Fourier transform of y(n) is given by

    )()/(

    )/()()(

    )/)((

    /

    Lj

    n

    LnLj

    LnLj

    n n

    njj

    eXeLnx

    eLnxenyeY

    ==

    ==

    =

    =

    =

    (40)

    We can notice that only frequency scaling, but no amplitude scaling is

    introduced. Why is it the case that in upsampling, unlike in downsampling,

    there is no change in the amplitude scale?In upsampling we simply add zeros between samples, and thus the

    sample amplitude of the signal remains unchanged. (Remember that in

    downsampling we have set some of the samples of the signal to zero.) On the

    other hand, the insertion of zeros results in a new time scaling, and conse-

    quently, in a new frequency scaling. This means that a given frequency inX(ej) is transformed into a new frequency /L in Y(ej). As a result of thisoperation,L-1 unwanted images of the input signal spectra are introduced in

    the interval [0, 2].

    It is often instructive to describe the process of upsampling in terms of the z-transform. Using (18) and (40) we obtain z-transform of the upsampled signal

    )()( LzXzY = . (41)

    Example 2

    We consider a signal shown in Figure 12(a). By insertingL-1=2 zeros

    between each pair of samples, the sampling rate is increased by L=3. The

    result of this operation is shown in Figure 12(b).

    Figure 13(a) illustrates the spectrum of the input signal, while Figure 13(b)shows the spectra of the upsampled signal. We can notice that the spectrum

    Lx(m) y(n)

    fi f L0=fi

    Figure 11: Upsampling

  • 8/8/2019 1930708300 Book Ex

    15/26

    Introduction to Multirate Systems 15

    Figure 12: Upsampling in time domain

    0 2 4 6 8 10 12 14 16

    0

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    m

    x(m)

    INPUT SIGNAL

    0 5 10 15 20 25 30 35 40 45

    0

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    n

    y(n)

    UPSAMPLED SIGNAL

    (a) Input Signal (b) Upsampled signal, L = 3

    Figure 13: Upsampling in frequency domain

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1INPUT SIGNAL

    w/pi

    abs(X)

    0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    w/pi

    abs(Y)

    UPSAMPLED SIGNAL

    (a) Input signal (b) Upsampled signal, L = 3

    has no change in amplitude scale and thatL-1=2 images are introduced in the

    interval [ 0,2].

    ImagingThe process of upsampling introduces the replicas of the main spectra at

    every 2/L. This is called imaging, since there are L-1 replicas (images) in 2

    (see Figure 13(b)). In order to remove the unwanted image spectra we need

    a lowpass filter immediately after upsampling. This filter is called an anti-

    imaging filter. In the time domain, the effect is that the zero-valued samples

    introduced by upsampling are filled with interpolated values. Because of

    this property, the filter is also called an interpolation filter.

  • 8/8/2019 1930708300 Book Ex

    16/26

    16 Jovanovic-Dolecek

    The specifications for the interpolation filter are given by Mitra (2001)

    =

    L

    LLeH

    cj

    /,0

    /,)( , (42)

    wherecis the highest frequency that needs to be preserved in the interpolated

    signal. Similarly to an anti-aliasing filter, an anti-imaging filter is usually

    designed as an FIR filter (Mitra, 2001).

    Comparing (21) and (42) we can notice that there is no duality between

    the gain of the anti-aliasing filter and the gain of the anti-imaging filter. Why

    does an anti-imaging filter have a gain L? The explanation is given in the

    following paragraphs.

    Assume that x(m) (see Figure 10) has been obtained by sampling abandlimited continuous signalx

    c(t) at the Nyquist rate. The Fourier transform

    of the discrete signal X(ej) is related to the Fourier transform of the

    continuous signalXc(j), ( is a continuous frequency), as

    xxk x

    c

    x

    j

    TT

    kj

    TjX

    TeX

    ==

    =

    );2

    (1

    )( , (43)

    where Tx

    denotes the sampling period.

    In a similar way, we can assume that the interpolated signal u(n) in Figure

    10 is also obtained by sampling the same continuous signal with a samplingperiod, T

    y=T

    x/L. Its Fourier transform is related toX

    c(j) as

    yxk x

    c

    xyk y

    c

    y

    j

    TT

    kL

    T

    LjX

    T

    L

    T

    k

    T

    jX

    TeU

    ===

    =

    =

    );2

    ()2

    (1

    )( . (44)

    The output signal u(n) has been passed through a low pass filter, and so

    only the base spectrum is retained. Therefore, in (44) all spectral components

    other than k=0, are eliminated, which gives

    )()(x

    c

    x

    j

    T

    LjXT

    LeU

    = , (45)

    or using (43)

    )()( Ljj eLXeU = . (46)Because no amplitude scaling was introduced during upsampling, the gainL

    in (46) must be compensated for during the filtering stage.

    Properties of Upsampling

    In this section we will verify that upsampling is a linear and time-varyingoperation. The linearity property is illustrated in Figure 14. Since it is

  • 8/8/2019 1930708300 Book Ex

    17/26

    Introduction to Multirate Systems 17

    straightforward to verify, we will state without a proof that upsampling is a

    linear operation.

    We will now consider whether this operation is time-varying. Let us

    suppose that the input of the upsampler (Figure 11) has a delay ofD samples,)( Dmx . (47)

    The upsampled signal will be

    )()()())(( DnyDLnyDLmLyLDmy == . (48)Consequently,upsampling is a time-dependent operation. Since the delay DL

    is an integer, the upsampled delayed signal and the upsampled signal with no

    delay will always have the same shape. Remember that in the case of a

    downsampled signal, this relationship holds only when the delay is a multiple

    of M.

    Useful IdentitiesWe have already seen three useful identities of the downsampled signals,

    and now we will state the corresponding identities associated with upsampling.

    Thefourth identity asserts that the output signals Y1(z),...,Y

    N(z), which are

    obtained by upsampling the input signal and then scaling by a1,...,a

    N, respec-

    tively (the first structure in Figure 15) willgive the sameresult as if the signal

    is first scaled and then downsampled (see the second structure in Figure 15).

    The proof is obvious so we omit it.Thefifth identity states that a delay of one sample before upsampling is

    equivalent to the delay ofL samples after upsampling (Figure 16).

    In the first structure we have:

    11 ))(()(

    = LLL zzXzX . (49)The output of the first structure yields

    LLL zzXzXzY == )()()( 1 . (50)

    At the upsampler output in the second structure it holds that

    )()(1LzXzY = , (51)

    Structure 1

    LX(z) Y(z)

    X (z)1a1

    X (z)NaN

    Y (z)1

    Y(z)

    X (z)1a1

    X (z)NaNY (z)N

    Structure 2

    L

    L

    Figure 14: Superposition principle

  • 8/8/2019 1930708300 Book Ex

    18/26

    18 Jovanovic-Dolecek

    resulting in

    LLL zzXzzYzY == )()()( 1 , (52)at the output. Since the above expression equals the one given by (50), the

    equivalency of the two structures is confirmed.

    Thesixth identity, which is a more general version of thefifth identity,

    states that filtering followed by upsampling is equivalent to having upsamplingfirst followed by expanded filtering. It is illustrated in Figure 17.

    In the first structure (Figure 17)we have

    )()()()(

    )()()(

    1

    1

    LLLzGzXzXzY

    zGzXzX

    ==

    =(53)

    Similarly, from the second structure we obtain

    )()()()()(

    )()(

    1

    1

    LLL

    L

    zGzXzGzYzY

    zXzY

    ==

    =(54)

    Since the equations (53) and (54) are identical, the two structures are equivalent.

    Polyphase InterpolationWe notice that in the interpolation structure, the filtering is performed

    at the higher sampling rate. That means that most of the data values going

    into the filter are zero, more precisely L-1 out of every L value. As a

    consequence, in the process of convolution there are many unnecessarymultiplications with zero.

    Structure 1

    LX(z)

    Y (z)1a1

    Y (z)NaN

    Y (z)1

    X(z)

    a1

    aNY (z)N

    Structure 2

    L

    L

    Figure 15: Fourth identity

    Structure 1

    X(z )L

    Y(z)z

    -1L

    X (z )1L

    Structure 2

    X(z )L Y(z)

    z-LL

    Y (z)1

    Figure 16: Fifth identity

  • 8/8/2019 1930708300 Book Ex

    19/26

    Introduction to Multirate Systems 19

    The convolution at the higher sampling rate can be replaced by indepen-

    dent convolutions at the lower input sampling rate using polyphase decompo-

    sition (36). We can simply replace the coefficient MbyL to obtain

    =

    =1

    0

    )()(L

    k

    Lk

    kzHzzH . (55)

    If we express the polyphase filter in the interpolation structure in Figure10, using the above expression, we obtain the first structure in Figure 18 (a).

    Its transpose (see Mitra, 2001, p.352), is shown in Structure 2 in Figure 18(a).

    According to thefourth identity, we can place the upsampler into parallel

    branches, and then using thesixth identity we can interchange filtering and

    upsampling, as illustrated in Figure 18(b). Each input sample is simulta-

    neously sent to the subfilters Ho(z),....H

    L-1(z), where filtering is performed at

    the lower sampling rate giving the components Xo(z), ..., X

    L-1(z). These

    components are upsampled (filled with zeros), and then interleaved at the

    higher sampling rate using a series of delays, and finally are combined to yieldthe output signal.

    Some authors also use a commutator in the output to present the

    combining of the componentsXo(z), ..., X

    L-1(z) into an output signal. Figure 19

    shows a polyphase interpolator with an output commutator.

    INTERCONNECTION OF

    SAMPLING RATE CONVERTERSIn this section we will discuss some of the widely used interconnec-

    tions of upsamplers and downsamplers in the multirate systems. An

    interchange of sampling converters can often lead to a computationally

    more efficient realization.

    Cascade of Sampling Rate ConvertersFirst we consider the cascade of an L-fold upsampler and an L-fold

    downsampler, as shown in Figure 20(a).

    It is straightforward to conclude that the output is equal to the input.

    X(z )

    L

    Structure 1

    Y(z)G(z) L

    X (z )1L

    Structure 2

    X(z) Y(z)G( )z

    LL

    Y1(z)

    Figure 17: Sixth identity

  • 8/8/2019 1930708300 Book Ex

    20/26

    20 Jovanovic-Dolecek

    LX(z )

    L

    Y(z)H (z )0

    L

    H (z )1L

    H (z )2L

    H (z )L-1L

    ...

    ...

    ...

    z-1

    z

    -1

    Structure 1

    H(z)

    ...

    z-1

    z-1

    LX(z )

    L

    Y(z)

    ...

    H (z )0L

    H (z )1L

    H (z )2L

    H (z )L-1L

    ...

    Structure 2

    H(z)

    Figure 18: Polyphase interpolation

    x(m)y(n)

    H (z)0

    H (z)1

    H (z)2

    H (z )L-1

    ..

    .

    ..

    .

    x (m)0

    x (m)1

    x (m)2

    x (m)L-1

    k=0

    k=L-1

    1

    2

    Figure 19: Polyphase interpolator with an output commutator

    Upsampling by a factorL introducesL-1 zeros after each sample of theinput signal, and downsampling by a same factorL removes those zeros,

    and the net result is the original signal. If upsampling precedes

    downsampling, where both operations have the same factor, namely when

    M=L, the signal is not changed.

    Now we look at the cascade in Figure 20(b). Does the output signal still

    equal the input signal? In the firststep of downsampling we set all samples

    whose indices are not integer multiples ofMto zero, and, then, in thesecond

    step, we remove those zeros. Upsampling by Magain introduces those zeros,

    and therefore this result corresponds to the firststep of downsampling. If

    LX(z) Y(z)

    H(z)0

    H(z)1

    H(z)2

    H (z )L-1

    .

    .

    .

    .

    .

    .

    .

    .

    .

    z-1

    z-1

    L

    L

    L

    X (z)0

    X (z)1

    X (z)L-1

    (b)

    (a)

  • 8/8/2019 1930708300 Book Ex

    21/26

    Introduction to Multirate Systems 21

    Figure 20: Cascading sampling converters

    L LX(z )

    LX (z)1 Y(z )

    L

    (a) Upsampler-downsampler

    (b) Downsampler-upsampler

    MMX(z)X(z) X (z )1

    MY(z)

    downsampling is performed before upsampling, with the same sampling

    factor, the output signal will be different from the input signal, and the

    operation will be equivalent to discrete sampling.

    Interchanging of the Sampling Rate ConvertersWe are going to consider whether the operations of downsampling and

    upsampling can be interchanged, i.e., whether they are commutative or not.

    Structure (a) in Figure 21 shows the operation of downsampling by a factor

    ofM, followed by upsampling by a factor ofL. The question is when we can

    perform upsampling by L first, followed by downsampling by M, (Figure 21

    (b)) and still obtain the same result. The condition for the equivalency of the

    structure (a) and (b) will provide the answer.

    Structure (a):

    .)(1

    )()(

    )(1

    )(;)(1

    )(

    1

    0

    /11

    1

    0

    /11

    1

    0

    1

    =

    =

    =

    ==

    ==

    M

    k

    kM

    MLL

    M

    k

    kM

    MM

    k

    kM

    M

    WzXM

    zXzY

    WzXM

    zXzWXM

    zX

    . (56)

    Figure 21: Interchanging of sampling rate converters

    M LX(z)X(z) X (z)1 Y (z)1

    (a) Downsampler-upsampler

    (b) Upsampler-downsampler

    L MX(z)X(z) X (z)2 Y (z)2

  • 8/8/2019 1930708300 Book Ex

    22/26

    22 Jovanovic-Dolecek

    Structure (b):

    .)(1

    )(

    )(1)(1)(

    )()(

    1

    0

    /2

    1

    0

    1

    0

    22

    2

    =

    =

    =

    =

    ==

    =

    M

    k

    kLM

    ML

    M

    k

    kLM

    LM

    k

    kM

    M

    L

    WzXM

    zY

    WzXM

    zWXM

    zY

    zXzX

    . (57)

    Obviously,M-fold downsampler can be interchanged with anL-fold upsampler

    if and only ifY1(z)=Y

    2(z). From (56) and (57) it is clear that this will only occur

    when

    kLM

    kM WW = . (58)

    This relation holds if and only ifMandL are relatively prime, i.e., Mand

    L do not have any common integer factor except for1. For the proof, see Suter

    (1998).

    Example 3

    Let us illustrate the former result by lettingL=2 and M=3, so that the

    sampling factors are relatively prime.

    { }

    { }3/23/83/40322

    23

    3/43/23

    2

    3

    ;;2,1,0;

    ;;2,1,0;

    jjjj

    kj

    k

    jjjo

    kj

    k

    eeeekeW

    eeekeW

    ==

    ==

    =

    ==

    (59)

    As expected, two sets in (59) are equivalent. Now we suppose thatL=2 andM=4,

    i.e., MandL are not relatively prime since M=2L. The corresponding sets are

    { }

    { } { }

    32024

    2/32/024

    ;;;3,2,1,0;

    ;;;3,2,1,0;

    jjjjkjk

    jjjj

    kj

    k

    eeeekeW

    eeeekeW

    ===

    =

    ==(60)

    L LH(z) X(z) X (z)1 Y (z)1 Y(z)

    LTI

    Structure 1

    H (z)0 X(z) Y(z)

    Structure 2

    Figure 22: Cascade Upsampler-LTI-Downsampler

  • 8/8/2019 1930708300 Book Ex

    23/26

    Introduction to Multirate Systems 23

    Unsurprisingly, two sets in (61) are not equivalent.

    In summary, using (56)-(58), M-fold downsampler and L-fold upsampler

    can be interchanged if and only if M and L are relatively prime.

    Sampling Rate Converters and the LTI System

    Upsampler-LTI-Downsampler

    We will consider an extended version of the previous structure in Figure

    20(a), with an LTI system between converters, as shown in Figure 22.

    The analysis of the first structure gives

    =

    =

    =

    =

    =

    ===

    ==

    =

    1

    0

    /1

    1

    0

    1

    0

    1

    0

    1

    11

    1

    )].(1

    )[()(

    )(1

    )()()(1

    )(1

    )(

    )()()()()(

    )()(

    L

    k

    kL

    L

    L

    k

    kL

    LL

    k

    kL

    kLL

    LL

    k

    kL

    L

    L

    L

    WzHL

    zXzY

    zWHL

    zXzWHWzXL

    zWYL

    zY

    zHzXzHzXzY

    zXzX

    .

    (61)

    The factor inside the middle parenthesis in the last equation (61) is a

    downsampled filter impulse response (see equation (19)), and thus, accordingto (38) is equal to the 0-th polyphase component.

    =

    =1

    0

    /10 )(

    1)(

    L

    k

    kL

    LWzH

    LzH . (62)

    Using (62) we finally arrive at

    )()()( 0 zHzXzY = . (63)According to the last relation, the cascade in the first structure is

    equivalent to the second structure, where the equivalent filtering uses only the

    0-th polyphase component (38) of the filterH(z) (the remaining polyphase

    components ofH(z) are not used). For this reason, the structure is also called

    thepolyphase identity (Vaidyanathan, 1993). The result is an engaging one

    because the upsampler and downsampler are individually time variant sys-

    MM H(z) X(z) X (z)1 Y (z)1 Y(z)

    LTI

    H(z )M

    Y(z)M

    X(z)

    Structure 1 Structure 2

    MX (z)

    1

    Figure 23: Cascade downsampler-LTI-Upsampler

  • 8/8/2019 1930708300 Book Ex

    24/26

    24 Jovanovic-Dolecek

    tems, yet the resulting structure is time invariant.

    Downsampler-LTI-Upsampler

    Let us now analyze the extended version of the structure 20(b), contain-ing an LTI system between sampling converters, as shown in Figure 23.

    Applying the sixth identity, we see that the final output results from

    filtering the output of the cascade downsampler/upsampler (discrete sam-

    pling) with an expanded filterH(zM), as shown in the equivalent Structure 2

    in Figure 23. Therefore, unlike the polyphase identity, this equivalent struc-

    ture is now time variant.

    Rational Sampling Rate Conversion

    Thus far we have discussed changing the sampling rate by integer factors,decimating by M, or interpolating byL. In this section we consider changing

    the sampling rate by a ratio of two integers,L/M. Obviously we can perform

    this by cascading decimation by a factorMand interpolation by a factorL.

    There are two possible cascade connections depending on what is

    performed first, decimation or interpolation, as shown in Figures 24(a) and

    (b). In the structure where the interpolation is performed before decimation

    (Figure 24(b)), we can notice that the interpolation and the decimation filters

    are both lowpass filters operating at the same sampling rate. Thus, they can

    be combined into one filterG(z), as shown in Figure 24(c), to yield the desired

    structure for the rational sampling rate conversion. The result is shown in

    Figure 24 (c).

    Figure 24: Rational sampling conversion

    M LH (z)1 H (z)2X(z) Y(z)

    DECIMATION INTERPOLATION

    L MH (z)1 H (z)2X(z) Y(z)

    L MG(z)X(z) Y(z)

    (a)

    (b)

    (c)

  • 8/8/2019 1930708300 Book Ex

    25/26

    Introduction to Multirate Systems 25

    Lowpass filterG(z) has a normalized stopband cutoff frequency at

    )/,/( MLmins = , (64)which suppresses the imaging caused by upsampling and at the same time

    eliminates the aliasing caused by downsampling.Recently, a new efficient time-varying filter structure for rational

    sampling rate conversion was derived in Webb (2000). This new structure

    uses a transposed filter structure, and is particularly suitable for DSP

    implementations.

    An efficient algorithm for the sampling rate conversion from 44.1kHz

    compact disc (CD) to 48 kHz digital audio tape (DAT) has been proposed by

    Rajamani et al. (2000). The method uses digital interpolation followed by a

    fractional delay filter. Another interesting result can be found in a paper by

    Russel (2000) where a new rational sampling rate conversion using IIR filters

    is presented.

    SUMMARYReduction of the sampling rate is called decimation, and it consists of two

    stages: filtering and downsampling. Downsampling reduces the input sam-

    pling rate by an integer factorM, and is a linear and time variant operation. A

    downsampled signal is a shortened time, frequency stretched version of theinput signal. To avoid the aliasing, the filtering is introduced to bandlimit the

    input signal. Polyphase decimation, which utilizes polyphase components of

    a decimation filter, is a preferred structure for decimation because it enables

    filtering to be performed at a lower sampling rate.

    The procedure of increasing the sampling rate is called interpolation, and

    it has two parts, upsampling and filtering. Upsampling increases the input

    sampling rate by an integer factorL, by insertingL-1 equally spaced zeros

    between each pair of input samples. This operation is a linear and time variant

    operation and, unlike downsampling, is invertible. This process introducesthe replicas of the main spectra at every 2/L, which is called imaging. In order

    to remove these images, a lowpass filter must be placed immediately after

    upsampling. A more efficient interpolation structure is obtained by using the

    polyphase components of the interpolation filter, so that the filtering is

    performed at lower sampling rate.

    If upsampling precedes downsampling, where both operations have the

    same factor, namely M=L, the input signal is not changed. However, if

    downsampling is performed before upsampling, with the same factorL=M,

    the equivalent operation corresponds to thefirststep of downsampling, and

    thus the output signal is different from the input signal.

  • 8/8/2019 1930708300 Book Ex

    26/26

    26 Jovanovic-Dolecek

    M-fold downsampler andL-fold downsampler can be interchanged if and

    only ifMandL are relatively prime.

    The cascade Upsampler-LTI systemDownsampler is equivalent to

    filtering with the 0-th polyphase component of the LTI, and is called thepolyphase identity. Even though both the upsampler and downsampler are

    time variant, the resulting structure is time invariant.

    On the other hand, the cascade Downsampler-LTI-Upsampler is time

    variant, and is equivalent to discrete sampling with an expanded filter.

    Rational sampling conversion can be efficiently performed as a cascade

    of upsampling and downsampling, where the interpolation and decimation

    filters are combined into one filter.

    MATLAB programs which illustrate Chapter 1 are available from the

    Web site http://www.inaoep/electronica.

    REFERENCESBurrus C. S., McClellan J. H., Oppenheim, A. O., Parks, T. W, Schafer, R. W. and Schuessler

    H. W. (1994). Computer-Based Exercises for Signal Processing Using MATLAB.New Jersey: Prentice Hall, Inc.

    Crochiere R. E. and Rabiner L. R. (1983). Multirate Digital Signal Processing. New Jersey:Prentice Hall, Inc.

    Dabrowski, A. (1997). Multirate and Multiphase Switched-Capacitor Circuits. London:

    Chapman & Hall.Fliedge, N. J. (1995). Multirate Digital Signal Processing. Chichester: The McGraw-Hill

    Companies, Inc.Grover, D. and Deller, J. R. (1999).Digital Signal Processing and the Microcontroller. New

    Jersey: Prentice Hall, Inc.Haddad, R. A. and Parson T. W. (1991).Digital Signal Processing: Theory, Applications,

    and Hardware. New York: W. H. Freeman and Company.Mitra, S. K. (2001).Digital Signal Processing: A Computer-Based Approach, (Second edition).

    New York: The McGraw-Hill Companies, Inc.Oppenheim, A. V. and Schafer, R. W. (1989). Discrete-Time Signal Processing. New

    Jersey: Prentice-Hall, Inc.

    Orfanidis, S. J. (1996). Signal Processing. New Jersey: Prentice Hall, Inc.Rajamani K., Lai Y. S. and Farrow C. W. (2000). Efficient algorithm for sample rateconversion from CD to DAT.IEEE Signal Processing Letters, October 10, 7, 288-290.

    Russel A, I. (2000). Efficient rational sampling rate alteration using IIR filters.IEEE SignalProcessing Letters, January 1, 7, 6-7.

    Stearns, S. D. and David, R. A. (1996). Signal Processing Algorithms in MATLAB. NewJersey: Prentice Hall, Inc.

    Suter, B. W. (1998). Multirate and Wavelet Signal Processing. San Diego: Academic Press.Vaidyanathan, P. P. (1993). Multirate Systems and Filter Banks. New Jersey: Prentice Hall,

    Inc.Webb, J. L. H. (2000). Transposed FIR filter structure with time-varying coefficients for

    digital data resampling.IEEE Transactions on Signal Processing, September 9, 48,2594-2600.