24
© Gonçalo Tavares, Moisés Piedade 1 SPDS – Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate digital signal processing deals with the development of efficient techniques and algorithms for changing the sample rate Example: in professional audio systems the sampling frequency used is f s = 48kHz but in the compact discs (CD) it is f s = 44.1kHz it may be necessary to convert between these two sampling frequencies Important applications: 1) Spectrum (pulse) shaping in digital modulators 2) Signal filtering: if an analog signal is sampled at a rate higher than the minimum possible value given by the sampling theorem, then the anti-aliasing filter required prior to sampling and the anti-image (reconstruction) filter after D/A conversion may be much more simple 3) Information storage: the information contained in certain signals (for example, voice signals) may be coded and transmitted efficiently using low sampling frequencies. The signal reconstruction is done using multirate signal processing 4) High resolution A/D and D/A conversion: the use of oversampling techniques in A/D and D/A converters allow the quantization noise spectrum to be spread into a bandwidth much larger than the bandwidth required by the signal after filtering the effective number of bits increases (the SNR increases) 5) Narrow bandwidth filtering: the design of narrowband filters (bandwidth much lower than the sampling frequency) is complicated and requires high-order filters (many coefficients). Multirate digital filtering allows these filters to be computed at a much lower sampling frequency and so the filters may be of much lower order 6) Software defined radio (digital radio): multirate techniques allow direct sampling and demodulation of RF signals, without intermediate frequency stages The fundamental operations in multirate signal processing are decimation and interpolation

SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

Embed Size (px)

Citation preview

Page 1: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade1

SPDS – Multirate signal processing I In many applications digital information must be processed at different sampling rates.

Multirate digital signal processing deals with the development of efficient techniques and algorithms for changing the sample rate

Example: in professional audio systems the sampling frequency used is fs = 48kHz but in the compact discs (CD) it is fs = 44.1kHz it may be necessary to convert between these two sampling frequencies

Important applications:1) Spectrum (pulse) shaping in digital modulators2) Signal filtering: if an analog signal is sampled at a rate higher than the minimum

possible value given by the sampling theorem, then the anti-aliasing filter required prior to sampling and the anti-image (reconstruction) filter after D/A conversion may be much more simple

3) Information storage: the information contained in certain signals (for example, voice signals) may be coded and transmitted efficiently using low sampling frequencies. The signal reconstruction is done using multirate signal processing

4) High resolution A/D and D/A conversion: the use of oversampling techniques in A/D and D/A converters allow the quantization noise spectrum to be spread into a bandwidth much larger than the bandwidth required by the signal after filtering the effective number of bits increases (the SNR increases)

5) Narrow bandwidth filtering: the design of narrowband filters (bandwidth much lower than the sampling frequency) is complicated and requires high-order filters (many coefficients). Multirate digital filtering allows these filters to be computed at a much lower sampling frequency and so the filters may be of much lower order

6) Software defined radio (digital radio): multirate techniques allow direct sampling and demodulation of RF signals, without intermediate frequency stages

The fundamental operations in multirate signal processing are decimation and interpolation

Page 2: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade2

SPDS – Multirate signal processing II Decimation: sampling frequency reduction Sampling frequency reduction by an integer value M that is, fs fs/M In order to avoid aliasing it is necessary to verify the sampling theorem and filter

the signal with an anti-aliasing filter to eliminate signal components with frequency f> fs/(2M). This may lead to information loss

Digital anti-aliasing filter

Decimator(compressor)

Decimation amounts to filtering the original signal and keeping only onesample of the anti-aliasing filter output for every M samples produced. Mathematically w(n) is given by the convolution

and the output y(m) by

( ) ( ) ( ) ( ) ( )k

w n x n h n h k x n k

( ) ( ) ( ) ( )n mMk

y m w n h k x mM k

Example with M = 3

Page 3: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade3

SPDS – Multirate signal processing III

Decimation: sampling frequency reduction Frequency domain representation: M=3, fs=6kHz

The spectrum of x(n) has components with frequency above fs/(2M) = 1kHz

Frequency response (amplitude) of the Anti-aliasing digital filter

After filtering (the filter is processed at rate fs) the spectrum becomes limited to f < 1kHz

After decimation the spectrum appears repeatedin every multiple of fs/M

Page 4: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade4

SPDS – Multirate signal processing IV

Interpolation: sampling frequency increase Sampling frequency increase by an integer factor L that is, fs Lfs To keep the information on the Nyquist band which is now [0 Lfs/2], it is necessary to

use an anti-image digital filter to eliminate the signal components with frequency in the interval [fs/2 Lfs/2]

Anti-imagedigital filterInterpolator

(expander)

Interpolation amounts to inserting L-1 zero-valued samples by each sample of the original signal and then filter the result. Mathematically, w(n) is given by

and the filter output by the convolution

, 0, 2 ,( )

0, other

mx m L L

w n Lm

( ) ( ) ( ) ( ) ( )k

y m w m h m h k w m k

Example with L = 3

Page 5: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade5

SPDS – Multirate signal processing V

Interpolation: sampling frequency increase Frequency domain representation: L = 3, fs = 2kHz

The spectrum of x(n) has repetitions at every multiple of fs = 2kHz

After interpolation to Lfs = 6kHz, the initial image around fs is now in the Nyquist frequency band

Frequency response (amplitude) of the anti-image digital filter

After filtering the original spectrum is obtained but now with a sampling frequency Lfs = 6kHz

Page 6: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade6

0x

0

1x2x

3x

0x3x

0x

1x2x

3x

2 sT 3 sT

3

3

20 0 sE x T

3 sT0 sT

sT

20 0 sE x T

20 0 3

sTE x

sT3sT0

snT

snT

snT2 sT 3 sT

( )sx nT

( )D sx nT

( )I sx nT

SPDS – Multirate signal processing VI

Sampling frequency conversion may affect the signal energy

Example: Computation of the energy in an interval t = Ts

Decimation keeps the signal energy on average

Interpolation reduces the signal energy by a factor L necessary to compensate this effect by multiplying the samples by L

12

0

1lim ( )

K

x s sK

n

E x nT TK

1 2

0

1lim

3D

Ks

x s xK

n

nTE x T E

K

12

0

1lim

3 3I

Ks x

x sK

n

T EE x nT

K

Interpolation may be viewed as the digital equivalent of an D/A conversion in which the analog signal is recovered by sample interpolation (effect of the anti-image or reconstruction filter)

Decimation may lead to information loss

Interpolation replicates information in frequency bands of interest

Page 7: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade7

SPDS – Multirate signal processing VII

Sampling frequency conversion by a non-integer, rational factor

Example: When converting a CD to DAT it is necessary to interpolate samples by a factor 48/44.1, which is not integer but is rational

The factor is represented by the rational number L/M (in the CDDAT example: 48/44.1=160/147) and the conversion corresponds to a decimation with a factor L followed by a decimation with a factor M

To avoid possible information loss, the interpolation should be done before the decimation

Example with L = 3 and M = 2

These two filters are operated at the same sampling frequency and

may thus be combined

Page 8: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade8

SPDS – Multirate signal processing VIII Frequency domain analysis: L=3,

M=2, fs=2kHz

Multistage conversion: when large sampling frequency variations are required (either decimation or interpolation) it is better to use multiple stages because then, less selective (lower order) filters may be used

Example: decimator with M=16

032sf sf

2sf

08sf sf

2sf

16M

1 2 4M M

Difficult

Easier

Page 9: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade9

SPDS – Multirate signal processing IX

Interpolators: Polyphase filter structure

Exploit the fact that at the interpolator output, in every L samples, L-1 are zero and do not contribute to the filter output do not need to be computed

Example: interpolator with L=3 and FIR anti-image filter with N=9 coefficients

Each sample x(n) originates 3 samples y(m), each of each computed as the output of one of possible 3 FIR sub-filters (L sub-filters in general) with 3 coefficients (N/L in general)

Each sub-filter operates at the lowest, pre-interpolation sampling frequency, fs

Economy: N N/L multiplications, additions, memory

(0)x

(0)x

(0)x

(0)x

(0)x

(0)x

(0)x

(0)x

(0)x

0

0 0

0 0

0 0

0 0

0 0

0 0

0 0

(1)x

(0)w

(1)x

(1)x

(1)x

(1)x

(1)x

0

0

0

0

0

0 0

0 0

(2)x

(2)x

(2)x

0

0 0

(8)w

(0), (3), (6)w w w

(3)w (5)w(1)w (2)w (4)w (6)w (7)w

(1), (4), (7)w w w

(2), (5), (8)w w w

2

3

{ (0), (3), (6)}

{ (1), (4), (7)}

{ (2), (5), (8)}

h h h

h h h

h h h

1s

s

s

Page 10: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade10

SPDS – Multirate signal processing X The interpolator is equivalent to:

In each phase, the interpolator output is taken as the corresponding sub-filter output

The polyphase filter coefficients are:

Delay line withN/L samples

0,1, , - 1

( ) ( ), 0,1, , 1

k

k L

n h k nL Nn

L

Bank of Lpolyphase FIR filters

Structure used in practice

Page 11: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade11

Decimators: Polyphase filter structure

The filters operate with the lowest, pos-decimation

sampling frequency (fs/M)

Economy: N N/M multiplications, additions

The polyphase filter coefficients are:

SPDS – Multirate signal processing XI

0 1 8

0 3 6

1 4 7

2 5 8

(0) (1) (8)

(0) (3) (6)

(1) (4) (7) output of 3 filters

(2) (5) (8)

x h x h x h

x h x h x h

x h x h x h

x h x h x h

Structure used in practice

Bank of Mpolyphase FIR filters

0,1, , - 1

( ) ( ), 0,1, , 1

k

k M

n h k nM Nn

M

Page 12: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade12

SPDS – Multirate signal processing XII Applications1) Spectrum (pulse) shaping in digital modulators

bits

( )R sx nT

Complex symbol attribution

( )sg nT

( )I sx nT( )sg nT

( )ss nT

02 cos snT

02 sin snT

Pulse shaping filters

F

Modulator

Constellation

G f

1

T

0 5.

00 1

2

T

1

2T

1

2

Tf

1

-0.4

-0.2

0.0

0.2

0.4

0.6

0.8

1.0

1.2

-5 -4 -3 -2 -1 0 1 2 3 4 5

Tempo normalizado, t /T

Raised cosine

pulses with excess bandwidth

/(2T ) Hertz

=0 35.

=0 0.

=10.

Page 13: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade13

Impulse response of the continuous time filter: raised cosine filter

FIR filter with N coefficients obtained by truncating the impulse response:

With L = 4 samples per symbol:

The interpolator output may be computed with a polyphase structure (4 filters)

SPDS – Multirate signal processing XIII

2sin / cos /

( )/ 1 4 /

t T t Tg t

t T t T

1

-1

1

1 0 0 0 -1 0 0 0 1 0 0 0 1

g0 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13

0

( )R sx nT

Sample delay line

Coefficients

1

1

0

( ) ( ) ( ), 0,1, , 1

NL

Ri

y k nL g k iL x n iL k L

Only these matter

|( ) ( ) 0, , 1ss t nTg nT g t n N

Page 14: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade14

2) Audio compact disc

To avoid saturating the power amplifier (and intermodulation distortion) it is necessary to filter spectrum images around every multiple of the sampling frequency fs=44.1kHz. This requires very good (and expensive…) analog filters because the frequency band between sucessive replicas is very small

By digital interpolating the signal by a factor L=4 the frequency band between replicas increases and the analog filter requirement is less stringent (and cheaper…)

SPDS – Multirate signal processing XIV

0 20 [kHz]f44.1sf

4LEasier

88.2

0 20 [kHz]f

44.1 88.2 132.3 4 176.4sf

Very difficult

Page 15: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade15

SPDS – Multirate signal processing XV

New processingcontext

0 [kHz]f

interpolation L M

0 [kHz]f

Easierdecimation M

Difficult to realize

0 [kHz]f2sf sf

sf

2sfM

sfM

Results in the desired filter

sf

2sfM

sfM

3) Narrow-band filtering In a narrow-band filter the passband is very small when compared to the sampling

frequency. The resulting FIR filter has many coefficients which is undesirable because it:

1. Increases the numerical error susceptibility (due to finite precision arithmetic)

2. Increases the computational effort

3. Increases the memory requirement

The effect of these problems may be reduced using multirate signal processing:

Lowpass filtering

Passband filtering

Page 16: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade16

4) Oversampling (sigma-delta) A/D converters

Quantization noise: quantizer with quantization intervals

Quantizer with B bit:

Admitting that the quantization error e is uniformly distributed over the interval [-/2, /2], its mean value is zero and the variance is, by definition

When converting a sinusoid with amplitude A, the signal power is S=A2/2 and the signal-to-quantization noise is, in dB

SPDS – Multirate signal processing XVI

A 0 A Amplitude2 2

0 e

1( )p e

2 2/22 2 2 21

/2( ) 2

12 3BA

p d d

2 22 1 2B B

A A

2

2 2 2

/2SQNR 10 log 10 log 1.76 6 [dB]

2 /3B

S AB

A

Page 17: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade17

SPDS – Multirate signal processing XVII

The useful frequency band is the interval [-fs/2, fs/2] with width fs. The power spectral density of the noise is assumed constant in this band and its value is

If the signal of interest occupies only a smaller frequency band [-fmax, fmax] then we may use a lowpass filter in this band and reject the noise in the rest of the band. This may reduce the noise power significantly

2

( ) , 2 2s s

s

f fS f f

f

22( )

max

max

f max

f s

fP S f df

f

2sf

2sf0

maxfmaxf

2

( )s

S ff

Useful band

f

Inverse of the sampling factor

Princípio: ao aumentar a frequência de amostragem para um valor acima do necessário para representar o sinal (=2fmax), o ruído de quantificação é espalhadonuma banda de frequência de largura e a sua potência pode ser reduzida do factor de sobreamostragem

22( )

max

max

f max

f s

fP S f df

f

Principle: By using a sampling frequency higher than that required to represent the signal (=2fmax), the quantization noise is spread in a frequency band of width fs and its power may be reduced by a factor equal to the oversampling factor

2s

max

fF

f

Page 18: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade18

SPDS – Multirate signal processing XVIII

Example: Consider an audio signal with unilateral bandwidth 10kHz. Determine the sampling frequency to be used by a one bit converter such that it is equivalent to a 6 bit conversion

The minimum sampling frequency with a 6 bit converter is fs=2fmax=20 kHz and the power of the quantization noise is

To have the same noise power with a one bit converter we should have

and so:

2 122 2(6 bit)

3

A

2 2 22 10

2 12

(1 bit) 2 / 3(6 bit) 2

2 / 3

AF

F A

20kHz 20.48MHzsf F

It is possible to obtain additional noise power reduction by combining oversampling with noise shaping techniques

Page 19: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade19

SPDS – Multirate signal processing XIX Consumer electronic applications, particular audio applications require high

performance, cheap A/D and D/A converters These specifications are difficult to attain with usual conversion techniques like

successive approximations, flash, dual slope, etc… due to conversion errors like Sample & Hold errors, linearity, monotonicity, etc…

One bit converters: do not use S/H, have less errors and are cheap. Performance is attained by:

Oversampling Noise shaping Decimation techniques to obtain digital multibit words

Model:

Due to negative feedback the system will have at the input a signal with zero mean (the one bit A/D is simply a comparator with very high gain)

In this way the output signal is a sequence of bits in which the density of ones represents the amplitude of the input signal

Page 20: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade20

The signal processing model is:

Transfer function (first order filter):

The signal x(n) passes to the output without modification but the quantization noise is affected by the transfer function N(z), which is highpass

The noise in the signal band is heavily attenuated

SPDS – Multirate signal processing XX

The quantization noise is added here (comparator)

11

1

( )

1( ) ( ) ( ) ( )

1 ( ) 1 ( )

N z

Y z E z X z z Y zz

X z z E z

Page 21: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade21

By each octave (sampling frequency duplication) the increase in SNR due to oversampling is 3dB. The remaining increase is due to the noise-shaping filter: 6dB for a first order filter, 12dB for second order, 18dB for third order. In general, the SNR increase is (3+6n)dB for a nth order filter

SPDS – Multirate signal processing XXIDigital filter amplitude response. This filter is the decimator anti-aliasing filter and may be implemented with polyphase structures. By rejecting most of the quantization noise spectrum the effective number of bits is increased (the SNR increases)

Signal spectrum after filtering, before decimation. The decimation does not affect the SNR.

The anti-aliasing filter introduces a group delay (which is constant because the filter is a FIR with linear phase). This is a significant inconvenient because there will be a large delay between the analog signal and the corresponding output digital sample

Page 22: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade22

5) Software-defined radio (digital radio) Example: Wideband base station digital radio (Watkins-Johnson Inc.)

The entire RF band of interest, with an width equal to 14MHz is converted into the baseband by a single demodulator

The signal is then converted by the A/D at a rate fs=30.72 MHz, slightly greater than 214MHz=28MHz. This real signal has all the information channels

Each channel is recovered digitally (software) by a complex quadrature demodulator which operates at a rate fs

After demodulation the (complex) signal is decimated by a factor M=384 and becomes sampled at a rate fs2=80kHz

SPDS – Multirate signal processing XXII

2sf

15.36MHz2sf0

f

2sf

15.36MHz2sf0

f

0( )H fsffN

2j nNep

Page 23: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade23

Decimators and interpolators for software-defined radio: CIC (Cascade Integrator Comb) filters

Efficient computing structures which may be used in any application requiring large decimation/interpolation ratios

Cascade of N integrators HI(z) with N comb filters with transfer function C(z)

SPDS – Multirate signal processing XXIII

Integrator Comb filter

11

1( ) 11 ( )

1( ) 1

NMI

M

H z zz H zzC z z

sin2( )

sin2

Ns

s

M T

H j Tzeros at , 1, , 1s

k

ff k k M

M

Page 24: SPDS Multirate signal processing I - ULisboa · SPDS –Multirate signal processing I In many applications digital information must be processed at different sampling rates. Multirate

© Gonçalo Tavares, Moisés Piedade24

SPDS – Multirate signal processing XXIV The frequency bands which may be

responsible for aliasing (after decimation) are strongly attenuated

CIC filter disadvantages:

1) The DC gain is |H(0)|=MN which may assume very large values and thus require memory registers with many bits

2) It is difficult to control the filter characteristics: only the number of sections N may be programmed (other versions of these filters allow for another parameter in the comb section which controls the location of the zeros and thus increases filter versatility

CIC filter advantages:

1) Does not require multiplications

2) Does not require coefficients to be stored in memory (coefficients are either -1 or +1)

3) The filter structure is regular, easy to replicate

Note: Two’s complement arithmetic should be used. In this case intermediate overflows or underflows will not influence the system output (provided the output is representable within the dynamic range of the arithmetic)