You are on page 1of 3

EE-556 Spring 2011 LENGTHY BUT EASY TAKE HOME FINAL

1. A common filtering task raises the sample rate of an input signal by a factor of four. This can be accomplished by zero packing the input signal with three zeros between each input data signal and then filtering with a low pass filter. The zero packing raises the sample rate of the series so that four spectral copies can be observed in the spectrum of the time series. The filter removes three of the copies. This process is shown in the figure below.
x ( n ) 1 x ( 4 n : 4 ) y ( n )

(Z )

S p

In p u t e c t ru m

f s
1 - t o - 4 Z e r o P a c k e d S p e c t r u m F ilt e r F ilt e S p e c re d t ru m

f s

f s

A. The Input signal bandwidth has a nominal bandwidth of 10 kHz and is sampled at

24 kHz. To approximate a signal spanning this bandwidth form an input signal containing 600 samples of a sum of 6-sinusoids at frequencies 0, 2, 4, 6, 8, & 10 kHz. The sine waves have amplitudes of 0.2 and have uniform random phase. Plot 50 samples of the time series and the windowed spectrum of 256 samples of the time series. Display and label time axis in milliseconds and frequency axis in kHz. windowed spectrum of 1024 samples of the zero packed time series. Display and label time axis in milliseconds and frequency axis in kHz.

B. Zero-pack the time series 1-to-4 and plot 200 samples of the time series and the

C. Use the Remez algorithm to design a FIR filter for sample rate of 96 KHz, with pass

band 10 kHz and stop band selected to reject the spectral replicates. (Transition bandwidth f is 4 KHz). In-band ripple must be less than 0.1 dB, and out-of-band attenuation must be 4 times your age (in years converted to dB) or if that number exceeds 100 dB replace with 100 dB. Plot time response and frequency response of your filter design.
D. Filter the 1-to-4 zero packed time series with the filter normalized to unity peak

amplitude and plot 200 samples of the time series (after the filter length number of samples to avoid the filter transient) and the windowed spectrum of 1024 samples of

the filtered time series. Display and label time axis in milliseconds and frequency axis in kHz E. Zero pack the up-sampled sequence by another factor of 8 and plot 1600 samples of the time series and the windowed spectrum of 8192 samples of the zero packed time series. Display and label time axis in milliseconds and frequency axis in kHz
F.

Use the Remez algorithm to design a second FIR filter for sample rate of 96*8 KHz, with pass band 10 kHz and stop band selected to reject the spectral replicates. (Transition bandwidth f is 76 KHz) with dont care regions between the stop bands. In-band ripple must be less than 0.1 dB, and out-of-band attenuation equal to 4 times your age (in years converted to dB) or if that number is larger than 100 db, replace with 100 dB. Plot time response and frequency response of your filter design. peak amplitude and plot 1600 samples of the time series the filter length number of samples to avoid the filter transient) and the windowed spectrum of 8192 samples of the filtered time series. Display and label time axis in milliseconds and frequency axis in kHz.

G. Filter the 1-to-8 zero packed time series with the second filter normalized to unity

H. Process the up-sampled time series by a two-loop sigma-delta modulator shown below. a1
x (n ) w Z
- 1

w Z
- 1

b Q y (n )

The Matlab code to implement this block diagram with a 4-bit quantizer is presented below: w1=0; w2=0; b1=1.0; b2=0.5; a1=1/128;

for n = 1:N_length s3 = b1*w1 + b2*w2; y(n) = round(4*s3)/4; s0 = x(n) -y(n); s1 = s0 + (1-a1)*w1 - a1*w2; s2 = w1 + w2; w1 = s1; end w2 = s2;

Plot 1600 samples of the sigma-delta modulated time series and the windowed spectrum of 8192 samples of the zero packed time series. Display and label time axis in milliseconds and frequency axis in kHz
I.

Use the Remez algorithm to design a third FIR filter for sample rate of 96*8 KHz, with pass band 10 kHz and stop band selected to reject the quantizing noise formed by the sigma-delta converter. The filter stop band can be made to fall at rate 1/f by replacing the end points of the filter with their immediate neighbor (h(1)=h(2),, h(101)=h(1)). Plot the time response and frequency response of your filter design. Filter the sigma-delta modulated time series with the third filter and plot 1600 samples of the time series (the filter length number of samples to avoid the filter transient) and the windowed spectrum of 8192 samples of the filtered time series. Display and label time axis in milliseconds and frequency axis in kHz. impulse response and frequency response and then write the code to implement the filter and filter the output of the sigma delta modulator.

J.

K. Repeat I and J above with a recursive filter. Use the cheby2 filter and show its

Oh Boy, a DSP Exam! Ive got to get going!