Matlab assignment

Anonymous
timer Asked: Apr 24th, 2017

Question description

It is MATLAB assignment. Please look at the files and try do all the details required The assignment is CA2_sp17.

EE341 Homework Assignment 8 3-06-17 Due: Friday, 3-10-17 Read: Text Chapter 6, sections 6.1, 6.4, and section 6.2. Also read: the frequency response handout and filter design handout (starting on p. 683, Chebyshev filters); both documents are currently posted on the course website under “Handouts.” Problems: 1.) Determine the frequency response and the impulse response of the systems described by the following differential equations: d (a) y (t ) + 3 y (t ) = x(t ) dt d d d2 (b) 2 y (t ) + 5 y (t ) + 6 y (t ) = − x(t ) dt dt dt 2.) Determine the differential equation descriptions for the systems with the following impulse responses: (a) h(t ) = a1 e − t / a u (t ) (b) h(t ) = 2e −2t u (t ) − 2te −2t u (t ) 3.) Design a Type I Chebyshev lowpass filter with the following specifications: (i) 0.2 dB passband ripple (ii) Passband edge frequency = 10000 Hz (iii) Stopband frequency = 13000 Hz (iv) Stopband attenuation of 50 dB or more Your completed design will include: (a) The minimum number of poles N needed to satisfy the specs. (b) The poles p0, p1, ..., pN-1 (c) A MATLAB polar plot of the poles (use the “polar(angle(p),abs(p))” command, where p is your array of poles. Note: It is highly recommended that you write a MATLAB program to compute the poles, due to the number of poles involved. However, you can also do it by hand if you wish. Use of the Matlab filter design commands cheb1ord, cheby1, or cheb1ap is not allowed for this homework, although you may certainly use them to check whether or not your answer is correct.
In HW8 you were asked to design a Chebyshev Type I LPF with the following specifications: (i) 0.2 dB passband ripple (ii) Passband edge frequency = 10000 Hz (iii) Stopband frequency = 13000 Hz (iv) Stopband attenuation of 50 dB or more Your completed design specified the filter order N and the poles p0, p1, ..., pN-1. The goal of this assignment is to map your LPF design from HW8 into a band pass filter (BPF) with the following specs: (i) 0.2 dB pass band ripple (ii) The lower and upper pass band edge frequencies are fl = 40 kHz and fu = 60 kHz. Please note that this assignment requires answers to parts (a)-(h) below, with extra credit for part (i), and that you MUST turn in the MATLAB code you used to do this assignment. (a) Your original low pass filter transfer function HL(s) from HW8 can be expressed as: H L (s) = K . ( s / p 0 − 1)( s / p1 − 1)  ( s / p N −1 − 1) (1) Find the the value of the gain K so that HL(0) has the correct value for your filter. Background Information on Low Pass to Band Pass Transformation The low pass to band pass filter transformation replaces every occurrence of the variable  s ω  s in your LPF transfer function with s → ω p Q + 0  , where ωp is the lowpass filter s   ω0 ω0 pass band edge frequency in rads/sec, Q is the BPF quality factor defined as Q = , ωu − ωl ωu and ωl are the BPF upper and lower pass band edge frequencies in rads/sec, and ω 0 = ω u ω l is the BPF’s pass band center frequency. Thus, the transfer function H(s) of the new BPF will be   s ω  (2) H ( s ) = H L  ω p Q + 0  .  s    ω0  (b) The LPF-to-BPF transformation maps every pole of the LPF into two poles for the  s ω  BPF. Let p be a pole of the LPF. By setting ω p Q + 0  − p = 0 , find the s   ω0 locations of the corresponding two poles in the BPF, in terms of p, ωp , ωu and ωl. (c) Using your result from part (b) and your original N poles for your LPF in HW8, list the 2N poles of the BPF, and also plot them on a polar plot using the MATLAB command polar(angle(pn),abs(pn),’X’), where pn is a 2N x 1 array of the poles of your BPF. Please also make a polar plot of the original N poles of your LPF, and briefly comment on the similarities and differences between the two plots. (d) Does your BPF have any zeros? If so, how many, and where are they located? (Hint: Carefully examine your BPF transfer function H(s) in equation (2) above, and also the original LPF transfer function HL(s) in equation (1) above.) (e) Use MATLAB to plot 20log10|H(f)| for your BPF on the vertical axis (i.e. |H(f)| in dB), and frequency f (in Hz) on the horizontal axis. To do this, just substitute s = j2πf in your expression for H(s) in equation (1), and plot for a range of f sufficient to cover your passband and stopband (suggested range is 37kHz to 63kHz). In MATLAB, the variable “j” is used for − 1 , and the “abs()” function is used to take the magnitude of a complex number. Your plot should show the passband and stopband specifications (as horizontal lines at the appropriate dB values), and demonstrate that your filter meets at least the passband specs. It may be necessary for you to plot a zoomed-in view of the passband, as well as an overall view, in order to demonstrate that your filter meets passband specs. You can do this by using the plot tools to zoom in on your plot, or you can control the upper and lower limits of the x and y axes by giving the command “axis([xmin xmax ymin ymax])”, where xmin, xmax (ymin, ymax) are real numbers specifying the minimum and maximum values on the x (y) axis. If you are new to MATLAB, see me or the TA, or check out one of the MATLAB tutorial websites listed on the EE341 course webpage. (f) Comment on whether or not your BPF meets the stop band specs, i.e., does your plot in part e fall below −50 dB for frequencies at or below 37 kHz, and at or above 63 kHz? If the stop band specs are not met, why do you think that happened? (g) Plot the phase of H(f) vs. frequency f on another graph. The MATLAB “angle()” function finds the phase of a complex number. (h) Make sure you turn in a printout of the program you used to compute your poles and plot all your graphs.  s (i) 10 points extra credit: The LPF-to-BPF transformation s → ω p Q ω0   is s ω 0   realized at the circuit level by replacing every inductor in the original LPF with a two component network, and every capacitor in the original LPF with a different two component network. Please specify the two component network that replaces the inductor and capacitor. In each case, give: (i) The type and value of the two components; and (ii) how the two components are connected together (hint: they will either be in series or parallel). + Note: Credit will not be given if any of MATLAB’s built-in Chebyshev filter commands or functions are used to make the plots for parts (e) and (g).

Tutor Answer

(Top Tutor) Studypool Tutor
School: UIUC
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors