06.05.2015 Views

4-FilteringPart2

4-FilteringPart2

4-FilteringPart2

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Digital Filtering Part 2:<br />

Pulse Shaping<br />

ELEC 433 - Spring 2013<br />

Evan Everett and Michael Wu


Output of modulator<br />

[01]<br />

[11]<br />

[00]<br />

[10]


Output of modulator<br />

[01]<br />

[11]<br />

[00]<br />

[10]<br />

Train of symbols<br />

1 0


Output of modulator<br />

[01]<br />

[11]<br />

[00]<br />

[10]<br />

Train of symbols<br />

1 0


A single symbol in the time domain<br />

1.8<br />

1.6<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

Time<br />

5 10 15 20 25 30 35 40 45 50


A single symbol in the frequency domain<br />

·10 −2<br />

3<br />

2<br />

1<br />

0<br />

−1<br />

Frequency<br />

• A sinc in frequency → infinite bandwidth<br />

• FCC angry!<br />

• Band-limited RF/antennas


A single symbol in the frequency domain<br />

·10 −2<br />

3<br />

2<br />

1<br />

0<br />

X<br />

X<br />

−1<br />

Frequency<br />

What if we only keep a small piece?


1.8<br />

1.6<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

What if we only keep a small piece?<br />

1.8<br />

1.6<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

0.2<br />

0<br />

−0.2<br />

5 10 15 20 25 30 35 40 45 50<br />

Time<br />

5 10 15 20 25 30 35 40 45 50<br />

The downside: our signal is “wider” in time


A sequence of symbols<br />

1.8<br />

1.6<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

Symbol 1<br />

0.4<br />

0.2<br />

1.8<br />

1.6<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

Symbol 2<br />

0.4<br />

0.2<br />

Symbol 3<br />

0<br />

0<br />

Time<br />

−0.2<br />

−0.2<br />

10 15 20 25 30 5 10 35 15 40 20 45 25 50 30 5 10 35 40 15 45 20 25 50 30 35 40


A band-limited sequence of symbols<br />

1.8<br />

1.6<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

1.8<br />

1.6<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

0.6<br />

Symbol 1 Symbol 2 Symbol 3<br />

0.4<br />

0.4<br />

0.2<br />

0<br />

0.2<br />

0<br />

−0.2<br />

Time<br />

−0.2<br />

5 10 15 20 25 305 35 10 40 15 45 20 50 25 530 1035 1540 2045 2550<br />

30 35 40 45<br />

Band-limiting caused<br />

Inter-Symbol Interference (ISI)


Pulse Shaping Requirements<br />

• Frequency domain: low-pass response<br />

• H(ω)≈1 in passband, H(ω)≈0 in stopband<br />

• Time domain: zero ISI and finite extent<br />

• Impulse response needs periodic zeros<br />

• Zeros must occur at other data sample times<br />

• h[nτ] = 0 where τ is data sample period


Zero-ISI Example<br />

t<br />

-3T<br />

-2T<br />

-T<br />

T 2T 3T


Raised Cosine Function<br />

• Most common pulse shaping filter<br />

• Meets both key requirements<br />

• Easy to implement digitally<br />

• Impulse response:<br />

<br />

x(t) = sin πt cos παt<br />

τ<br />

τ<br />

2<br />

πt<br />

τ<br />

1 − 2αt<br />

τ<br />

= sinc t<br />

τ<br />

<br />

cos<br />

παt<br />

1 − 2αt<br />

τ<br />

τ<br />

2<br />

<br />

τ<br />

α<br />

: Sampling period- determines zero crossings of x(t)<br />

: Rolloff factor- determines passband (“excess bandwidth”)


Raised Cosine Function<br />

Impulse Response<br />

0.8<br />

0.6<br />

=0<br />

=.15<br />

=.3<br />

=.5<br />

=1<br />

0.4<br />

0.2<br />

0<br />

-0.2<br />

-3 -2 -1 0 1 2 3


Raised Cosine Function<br />

Properties of the Impulse Response<br />

0.8<br />

0.6<br />

=0<br />

=.15<br />

=.3<br />

=.5<br />

=1<br />

0.4<br />

0.2<br />

0<br />

-0.2<br />

-3 -2 -1 0 1 2 3<br />

x(0) = 1 for all α


Raised Cosine Function<br />

Properties of the Impulse Response<br />

0.8<br />

0.6<br />

=0<br />

=.15<br />

=.3<br />

=.5<br />

=1<br />

0.4<br />

0.2<br />

0<br />

-0.2<br />

-3 -2 -1 0 1 2 3<br />

Zeros do not depend on α


Raised Cosine Function<br />

Properties of the Impulse Response<br />

0.8<br />

0.6<br />

=0<br />

=.15<br />

=.3<br />

=.5<br />

=1<br />

0.4<br />

0.2<br />

0<br />

-0.2<br />

-3 -2 -1 0 1 2 3<br />

Size of ripples depend on α


Raised Cosine Function<br />

Properties of the Impulse Response<br />

0.8<br />

0.6<br />

=0<br />

=.15<br />

=.3<br />

=.5<br />

=1<br />

0.4<br />

0.2<br />

0<br />

-0.2<br />

-3 -2 -1 0 1 2 3<br />

α=0 gives sinc(x)


Raised Cosine Function<br />

Frequency Response:<br />

X(ω) =<br />

( )<br />

⎧⎧<br />

⎪⎪τ, ω ≤ π 1− α<br />

τ<br />

⎪⎪<br />

⎪⎪τ<br />

⎡⎡<br />

2 1− sin ⎛⎛ ⎛⎛ τ ⎞⎞<br />

⎝⎝<br />

⎜⎜<br />

2α ⎠⎠<br />

⎟⎟ ⎛⎛<br />

ω − π ⎞⎞ ⎞⎞ ⎤⎤<br />

⎨⎨ ⎢⎢<br />

⎝⎝<br />

⎜⎜ ⎝⎝<br />

⎜⎜<br />

τ ⎠⎠<br />

⎟⎟<br />

⎠⎠<br />

⎟⎟<br />

⎣⎣<br />

⎦⎦<br />

⎥⎥ , π ( 1 − α)<br />

⎪⎪<br />

τ<br />

⎪⎪<br />

⎪⎪0, ω ≥ π 1+ α<br />

⎩⎩<br />

τ<br />

< ω < π ( 1 + α)<br />

τ<br />

( )<br />

τ : Sampling period- determines zero crossings of x(t)<br />

α: Rolloff factor- determines passband (“excess bandwidth”)


Raised Cosine Function<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

Frequency Response<br />

=0<br />

=.15<br />

=.3<br />

=.5<br />

=1<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.5 1 1.5 2


Raised Cosine Function<br />

Properties of the Frequency Response<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

=0<br />

=.15<br />

=.3<br />

=.5<br />

=1<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.5 1 1.5 2<br />

α=0 gives notch filter


Raised Cosine Function<br />

Properties of the Frequency Response<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

(1- α)<br />

(1+ α)<br />

=0<br />

=.15<br />

=.3<br />

=.5<br />

=1<br />

0<br />

0 0.5 1 1.5 2<br />

α sets the filter’s passband


Raised Cosine Function<br />

Properties of the Frequency Response<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

=0<br />

=.15<br />

=.3<br />

=.5<br />

=1<br />

0.6<br />

0.5<br />

0.4<br />

X(ω(1+α))=0<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.5 1 1.5 2


Raised Cosine Function<br />

Properties of the Frequency Response<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

X(ω(1+α))=0 (1+ 0<br />

0 0.5 1 1.5 2<br />

α=0 α gives sets the notch filter’s passband


Square Root Raised Cosine<br />

H RC (ω)<br />

H RRC (ω) = H RC (ω)<br />

1<br />

1<br />

0.9<br />

=0<br />

=.15<br />

0.9<br />

=0<br />

=.15<br />

0.8<br />

=.3<br />

=.5<br />

0.8<br />

=.3<br />

=.5<br />

0.7<br />

=1<br />

0.7<br />

=1<br />

0.6<br />

0.6<br />

0.5<br />

0.5<br />

0.4<br />

0.4<br />

0.3<br />

0.3<br />

0.2<br />

0.2<br />

0.1<br />

0.1<br />

0<br />

0 0.5 1 1.5 2<br />

0<br />

0 0.5 1 1.5 2<br />

Why is this useful?<br />

• Split pulse shaping filter between Tx and Rx<br />

• Pulse shaping becomes matched filtering


Matched Filtering with RRC<br />

TX:<br />

Prevent out-of-band<br />

interference<br />

H RRC (ω)<br />

RX:<br />

Reject out-of-band<br />

interference/noise<br />

H RRC (ω)<br />

Data<br />

Mod<br />

∼ ∼<br />

Matched RRC Filters<br />

H(ω) = H RRC (ω)H RRC (ω)<br />

= H RC (ω) H RC (ω)<br />

Data<br />

Demod<br />

Net response is<br />

zero ISI, unity at<br />

sample times!<br />

= H RC (ω) (1


Raised Cosine Filtering<br />

Adapted from MATLAB’s ‘playshow rcosdemo’<br />

1.5<br />

1<br />

0.5<br />

Amplitude<br />

0<br />

-0.5<br />

-1<br />

-1.5<br />

0 5 10 15 20 25 30<br />

Time<br />

Start with a binary data stream


Raised Cosine Filtering<br />

Adapted from MATLAB’s ‘playshow rcosdemo’<br />

1.5<br />

1<br />

0.5<br />

Amplitude<br />

0<br />

-0.5<br />

-1<br />

-1.5<br />

0 5 10 15 20 25 30<br />

Time<br />

Apply the raised cosine filter to the data


Raised Cosine Filtering<br />

Adapted from MATLAB’s ‘playshow rcosdemo’<br />

1.5<br />

1<br />

0.5<br />

Amplitude<br />

0<br />

-0.5<br />

-1<br />

-1.5<br />

0 5 10 15 20 25 30<br />

Time<br />

Delay the data to see the preservation of the information


Raised Cosine Filtering<br />

Adapted from MATLAB’s ‘playshow rcosdemo’<br />

1.5<br />

1<br />

α=0.2<br />

α=0.5<br />

0.5<br />

Amplitude<br />

0<br />

-0.5<br />

-1<br />

-1.5<br />

0 5 10 15 20 25 30<br />

Time<br />

See the effect of changing α


Raised Cosine Filtering<br />

Adapted from MATLAB’s ‘playshow rcosdemo’<br />

1.5<br />

1<br />

0.5<br />

Amplitude<br />

0<br />

-0.5<br />

-1<br />

-1.5<br />

0 5 10 15 20 25 30<br />

Time<br />

Using a square root raised cosine filter instead


Raised Cosine Filtering<br />

Adapted from MATLAB’s ‘playshow rcosdemo’<br />

1.5<br />

1<br />

0.5<br />

Amplitude<br />

0<br />

-0.5<br />

-1<br />

-1.5<br />

0 5 10 15 20 25 30<br />

Time<br />

Data reconstructed using root-raised filter again


Digital Pulse-shaping: Tx<br />

1.5<br />

1.5<br />

1.5<br />

1<br />

1<br />

1<br />

0.5<br />

0.5<br />

0.5<br />

Amplitude<br />

0<br />

Amplitude<br />

0<br />

Amplitude<br />

0<br />

−0.5<br />

−0.5<br />

−0.5<br />

−1<br />

−1<br />

−1<br />

Data<br />

−1.5<br />

−1.5<br />

−1.5<br />

0 5 10 15<br />

0<br />

20<br />

5<br />

25<br />

10<br />

30<br />

15 20 25 30<br />

0 5 10 15<br />

Time<br />

Time<br />

Tim<br />

Modulator Interpolating Filter<br />

∼<br />

D/A Tx


1.5<br />

1.5<br />

Digital Pulse-shaping: Rx<br />

1.5<br />

1<br />

1<br />

1<br />

0.5<br />

0.5<br />

0.5<br />

0<br />

Amplitude<br />

0<br />

Amplitude<br />

0<br />

0.5<br />

−0.5<br />

−0.5<br />

−1<br />

−1<br />

−1<br />

−1.5<br />

1.5<br />

−1.5<br />

0 5 10 15 20 25 30<br />

0 5 10 15 20 25 30<br />

Time 0 5 10 15 20 25 30<br />

Rx A/D<br />

Time<br />

∼<br />

Time<br />

Data<br />

Decimating Filter<br />

Demodulator


Interpolating Filters<br />

• Commonly required in DSP/Comm<br />

• DSP: smoothing, softening pixelation<br />

• Comm: upsampling without aliasing, pulse shaping<br />

• Example:<br />

Original<br />

Enlarged w/o<br />

interpolation<br />

Interpolated


Implementing Multi-rate Filters<br />

Interpolation<br />

M<br />

N-tap LPF<br />

• Example: interpolate by a factor of M = 8<br />

• Low-pass filter of length N = 32<br />

• Suppose we upsample (zero pad) and then use a serial filter<br />

• How much faster does the internal rate have to be than input<br />

rate?<br />

• M*N = 8*32 = 256x as fast<br />

• If the input rate is near the speed of our FPGA, this is hopeless


Implementing Multi-rate Filters<br />

• Basic multi-rate filters are very inefficient<br />

• Inputs are mostly zeros after upsampling<br />

• Outputs are mostly discarded after downsampling<br />

• Smarter design can save a lot of resources<br />

Interpolation<br />

M<br />

Mostly Zeros<br />

N-tap LPF<br />

Decimation<br />

Mostly Discarded<br />

N-tap LPF<br />

M


4x Interpolation Example<br />

x0 x1 x2 …<br />

M<br />

M=4<br />

N-tap LPF<br />

Impulse Response


Impulse Response<br />

Data<br />

4x Interpolation Example<br />

x 0 0 0 0 x 1 0 0 0 x 2 0 0 0 x 3 0 0 0


Impulse Response<br />

4x Interpolation Example<br />

Data<br />

x 0 0 0 0 x 1 0 0 0 x 2 0 0 0 x 3 0 0 0<br />

0 x 0 0 0 0 x 1 0 0 0 x 2 0 0 0 x 3 0 0


Impulse Response<br />

4x Interpolation Example<br />

Data<br />

x 0 0 0 0 x 1 0 0 0 x 2 0 0 0 x 3 0 0 0<br />

0 x 0 0 0 0 x 1 0 0 0 x 2 0 0 0 x 3 0 0<br />

0 0 x 0 0 0 0 x 1 0 0 0 x 2 0 0 0 x 3 0


Impulse Response<br />

4x Interpolation Example<br />

Data<br />

x 0 0 0 0 x 1 0 0 0 x 2 0 0 0 x 3 0 0 0<br />

0 x 0 0 0 0 x 1 0 0 0 x 2 0 0 0 x 3 0 0<br />

0 0 x 0 0 0 0 x 1 0 0 0 x 2 0 0 0 x 3 0<br />

0 0 0 x 0 0 0 0 x 1 0 0 0 x 2 0 0 0 x 3


Polyphase Filters<br />

• Break impulse response into M sub-filters<br />

• h[0...N-1] is broken down as:<br />

• h0=h[0,M,2M,3M,...]<br />

• h1=h[1,M+1,2M+1,3M+1,...]<br />

• h2=h[2,M+2,2M+2,3M+2,...]<br />

• ... and so on


Parallel Polyphase Filter<br />

• Then cycle through sub-filter outputs at rate M<br />

• Output is the same as basic version<br />

• Only the multiplexer runs at rate M<br />

h 0<br />

h 1<br />

h 2<br />

...<br />

h M-1


Serial Polyphase Filters<br />

• Replace subfilters with clever ROM/RAM indexing<br />

• Most efficient implementation: no unused logic<br />

• Core runs at rate N*M/M (for original h[0...N-1])<br />

Data<br />

Addressable<br />

Shift Register<br />

X +<br />

Counter<br />

Branch Index<br />

+<br />

Coefficient<br />

ROM z -1<br />

Serial Interpolating Polyphase Filter

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!