The next few problems will explore different ways of designing a Type-1 (odd length, linear phase,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The next few problems will explore different ways of designing a Type-1 (odd length, linear phase, low-pass) FIR filter. First, write a function type1_dft that computes a filter tap vector h by determining the ideal frequency response at N equally-spaced frequencies and taking the inverse DFT of this vector. Your function should take the inputs N, an odd positive integer (>=3) w_c, a frequency cutoff in [ 0, pi) and return the outputs w, a length- N vector of equally-spaced frequency samples in [ 0, 2*pi) A_d, a length- N vector of the ideal amplitudes of a low-pass filter with cutoff w_c, corresponding to the samples in w phi, a length- N vector of the ideal phases corresponding to the samples in w (i.e., a complex vector of the form e^j(...)) h, a length- N vector of filter taps resulting from taking the inverse DFT of the frequency response samples implied by A_d and phi. I Remember that discrete-time filters must be 2*pi-periodic, and that the phase should be linear with a slope related to the filter length N. The resulting filter should be real and symmetric; you can get rid of small imaginary parts by setting h equal to real (h), but if the imaginary part is large you probably made an error. Function > 1 function [w, Ad, phi, h] 2 = 3% Create vector of equally-spaced frequencies 4 5 W... 6 7 % Create ideal amplitude response of low-pass filter (remember, it should 8% be symmetric about w = pi) 9 10 Ad=... 11 exp(-j*...); type1_dft (N, wc) 12% Compute linear phase vector using correct slope 13 14 phi = 15 16 % Compute ideal frequency samples as product of Ad and phi 17 18 H = 19 22 h = ifft (H); 23 20% Compute filter taps via inverse DFT 21 24% Make result real to get rid of near-zero imaginary parts 25 26 h = real (h); C Reset MATLAB Documentation The next few problems will explore different ways of designing a Type-1 (odd length, linear phase, low-pass) FIR filter. First, write a function type1_dft that computes a filter tap vector h by determining the ideal frequency response at N equally-spaced frequencies and taking the inverse DFT of this vector. Your function should take the inputs N, an odd positive integer (>=3) w_c, a frequency cutoff in [ 0, pi) and return the outputs w, a length- N vector of equally-spaced frequency samples in [ 0, 2*pi) A_d, a length- N vector of the ideal amplitudes of a low-pass filter with cutoff w_c, corresponding to the samples in w phi, a length- N vector of the ideal phases corresponding to the samples in w (i.e., a complex vector of the form e^j(...)) h, a length- N vector of filter taps resulting from taking the inverse DFT of the frequency response samples implied by A_d and phi. I Remember that discrete-time filters must be 2*pi-periodic, and that the phase should be linear with a slope related to the filter length N. The resulting filter should be real and symmetric; you can get rid of small imaginary parts by setting h equal to real (h), but if the imaginary part is large you probably made an error. Function > 1 function [w, Ad, phi, h] 2 = 3% Create vector of equally-spaced frequencies 4 5 W... 6 7 % Create ideal amplitude response of low-pass filter (remember, it should 8% be symmetric about w = pi) 9 10 Ad=... 11 exp(-j*...); type1_dft (N, wc) 12% Compute linear phase vector using correct slope 13 14 phi = 15 16 % Compute ideal frequency samples as product of Ad and phi 17 18 H = 19 22 h = ifft (H); 23 20% Compute filter taps via inverse DFT 21 24% Make result real to get rid of near-zero imaginary parts 25 26 h = real (h); C Reset MATLAB Documentation
Expert Answer:
Related Book For
Posted Date:
Students also viewed these databases questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Allison is paid $1,520 per week. What is the amount of federal income tax withheld from Allisons paycheck under the following conditions? Use the percentage method table in the Appendix to this...
-
Biofeedback training is often used to help people who suffer migraine headaches. A recent study found that 29 out of 50 participants reported a decrease in the frequency and severity of their...
-
A daredevil plans to bungee-jump from a balloon 65.0 m above a carnival midway (Figure P8.19). He will use a uniform elastic cord, tied to a harness around his body, to stop his fall at a point 10.0...
-
In September 2022, Hurricane Ian ravaged southwestern Florida, causing more than 60 deaths and $100 billion in damage. The storm destroyed more than 5,000 homes and other buildings and washed away...
-
Wilmington Office Equipment Corporation manufactures two types of filing cabinetsDeluxe and Executiveand applies manufacturing overhead to all units at the rate of $80 per machine hour. Production...
-
which a disk A of radius r rotates about a fixed vertical axis with angular displacement q1. A bar B of length h is pinned to A such that the axis of rotation is a radial line of A. (Note this is a...
-
a) Compute the integral f f(x) dx using 5 point composite rectangle, trapezoid and Simpson rules for the following function: f(x) = x cos(x), a = 0, b) Estimate error using a posteriori error...
-
Karen and Wayne need to buy a refrigerator because theirs just broke. Unfortunately, their savings account is depleted, and they will need to borrow money in order to buy a new refrigerator. Sears...
-
Suppose your gross monthly income is \(\$ 4,550\) and your spouse's gross monthly salary is \(\$ 3,980\). Your monthly bills are \(\$ 1,235\). The home you wish to purchase costs \(\$ 535,000\) and...
-
The owner of Sebastopol Tree Farm deposits \(\$ 650\) at the end of each quarter into an account paying \(1.75 \%\) compounded quarterly. What is the value of the account at the end of 5 years?
-
Find the amount of periodic payment necessary for each deposit to a sinking fund in Problems 35-46. Amount Needed A $55,000 quarterly Frequency n 42. Rate r 1.2% Time t 5 yr
-
If possible, find the sum of the infinite geometric series in Problems 19-24. \(1+\frac{3}{2}+\frac{9}{4}+\cdots\)
-
Which of the following is NOT a benefit of budgeting? A. Budgeting provides a benchmark to help managers evaluate performance. B. Budgeting forces managers to work in a silo, promoting only the goals...
-
What key concerns must functional tactics address in marketing? Finance? POM? Personnel?
-
An IIR filter is characterized by the following difference equation y[n] = 0.5y[n 1] + x[n] 2x[n 1], n 0, where x[n] is the input and y[n] the output of the filter. Let H(z) be the transfer...
-
A model for echo generation is shown in Figure 10.20. (a) Calculate the transfer function H(z) = Y(z)/X(z) of the echo sys-tem shown above. (b) Suppose you would like to recover the original signal...
-
Given the discrete IIR filter realization shown in Figure 12.31 where G is a gain value (a) Determine the difference equation that corresponds to the filter realization. (b) Determine the range of...
-
Hannah Gilpin is the controller of Blakemore Auto Glass, a division of Eastern Glass and Window. Her division has been under pressure to improve its divisional operating income. Currently, divisions...
-
Describe the five-step decision-making process.
-
Key success factors. Dalworth Construction Company provides construction services for major projects. Managers at the company believe that construction is a people-management business, and they list...
Study smarter with the SolutionInn App