Design a filter that meets the above required


Introduction

Design project.

Lab Goals

The primary goals of this lab are:

- Use a pole-zero diagram to design an appropriate filter response H(z).
- Find H(ωˆ) = H(z = exp(jωˆ )). Determine whether H(ωˆ) meets the required design specifications. If not, modify your design.
- Find the filter coefficients h[n] from H(z).

2 Filter Specifications

Note: You may not use a filter design function in Matlab to design your filter.

Required Specifications

Your filter design must meet the following specifications:

1. Your filter must pass f = ±60kHz (the frequency of the National Institute of Standards and Technology radio station WWVB in Fort Collins, CO, which broadcasts a standard time signal) without any attenuation. Assume a sampling rate of fs = 500 ksamples/sec.

2. The filter passband is often defined as the region where the filter power is within 3 dB of the maximum power Pmax, or 50% of Pmax. The filter power is PH = |H(ωˆ)2, and the 3 dB power requirement translates to 10 log10(PH /Pmax) ≥ -3 dB. This means that |H(ωˆ)| = |Hmax|/√2, where |Hmax| is the filter magnitude at the frequency achieving maximum power Pmax. The filter passband should be from ±40 to 80 kHz. It is OK if your passband exceeds these values by 15 kHz to either side, but your passband should not be smaller than the specification.

3. Within the frequency range from ±50 to 70 kHz, the magnitude of the filter response |H(z)| should be within 10% of the maximum magnitude Hmax. This deviation is known as "passband ripple", although in your filter, it may look more like a slow attenuation than a ripple.

4. Your filter must attenuate all frequencies from ±125 to 250 kHz by at least a factor of 8 compared to the maximum (peak) filter response. In other words, if your magnitude Hmax is normalized to 1, your filter response between those frequencies should be < 1/8. This region is the stopband region of the filter.

5. Your filter must be both causal and stable. This requirement translates into requiring all poles to be inside (not on or outside) the unit circle.

6. All filter coefficients h[n] should be real. This means that all zeros, if complex, should occur in complex- conjugate pairs. The same holds true for all poles.

7. Your filter must have the same number of poles as zeros. The base filter score is 100 points, assuming 6 zeros and 6 poles.

Your designed filter may be either an FIR filter or an IIR filter. IIR filters have poles located outside the origin. This adds denominator coefficients, and structurally incorporates feedback into the filter design. A complexity measure will be used as part of the filter score. Thus if you can reduce the number of filter coefficients and still meet the specifications, your filter design will receive a higher score.
The complexity measure is calculated as below:

CM = (N + M )/2 (1)

where N =number of zeros, and M =poles.

The number of points added based on the complexity measure is determined by

5(6 - CM). (2)

A base complexity measure of 6 (corresponding to an FIR filter with 6 zeros and 6 poles located at the origin) does not subtract any points from your filter score. A complexity measure above 6 subtracts 5 points for each additional pole/zero from your filter score. If your filter meets the required specifications with fewer than 6 zeros and poles, than additional points are added to your filter score.

It is possible to design an FIR filter with 6 zeros and poles which meets all the required specifications.

Bonus Specifications

Bonus points are given if your filter can meet the following specifications:

1. Reduce the "ripple" in the frequency range from ±50 to 70 kHz. Each 2% reduction below 10% results in an additional 10 points.

2. In between the passband and stopband region of the filter is the transition band. Lower the starting frequency ?s of the stopband region below 125 kHz to reduce the size of the transition band. Every 10 kHz reduction in the transition band results in an additional 10 points for the filter score.

3. Reduce any extra passband range so that the passband is as close to ±40 to 80 kHz as possible. The allowable passband is 25 to 95 kHz, with a bandwidth of 70 kHz. This is 30 kHz larger than the suggested passband. Each 10 kHz reduction in the passband bandwidth, provided the passband includes all frequencies within ±40 to 80 kHz, results in an additional 10 points for the filter score.

Lab Exercise: Filter Design

Design a filter that meets the above required specifications. Then try to design a better filter, according to the bonus specifications. Additional points will be added to that filter score, as indicated in the bonus specifications section. However, note that additional poles and zeros (above 6 each) will take off from your filter score. You must determine whether the performance improvement found by using additional poles and zeros is worth the penalty for extra zeros.

For both your original filter that meets the required specifications, and for your improved filter that meets the bonus specifications, include the following:

1. Plot the pole-zero diagram of each filter using Matlab's zplane function.

2. Explain briefly why you placed each zero in that particular position, i.e. what that zero (or complex-conjugate combination of zeros) is doing to the frequency response that helps it meet the filter specifications.

3. If you designed an IIR filter, explain briefly why the position of each complex-conjugate combination of poles was chosen.

4. Determine H(z) according to your pole-zero diagram. Include in your report.

5. Plot the magnitude of the frequency response |H(ωˆ )| vs ωˆ, for -π < ωˆ exp(jωˆ )). ≤ π. Note that H(ωˆ) = H(z =

6. Show that |H(ωˆ)| meets the passband requirements by using Matlab to show exactly which indices of |H(ωˆ)| correspond to a 10% or less drop in peak magnitude, and where |H(ωˆ )| ≥ Hmax/√2.

7. Convert H(z) to a polynomial in z-1, if H(z) is not yet in that form. Note that if you are using an IIR filter, with poles off the origin, H(z) will have both numerator and denominator as polynomials in z-1. Write H(z) in this form in your lab report.

8. Convert H(z) to the filter coefficients h[n], if you used an FIR filter. Include an equation for h[n] in your lab report.

9. If you used an IIR filter, the output y[n] will be multiplied by the inverse z-transform of the denominator of H(z), and the input x[n] will be multiplied by the inverse z-transform of the numerator of H(z). This is because Y (z) = H(z)X(z). Although x[n] and X(z) are not known, you can obtain a difference equation for y[n] in terms of x[n], the numerator and denominator coefficients of H(z), and past values of y[n - k] which correspond to the powers of z-k in the denominator of H(z). Include this difference equation in your lab report, only if you used an IIR filter.

Request for Solution File

Ask an Expert for Answer!!
MATLAB Programming: Design a filter that meets the above required
Reference No:- TGS01382083

Expected delivery within 24 Hours