Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 Filter Desgn with some algorithms This exercise uses speksitIIR.m function from Mycourses. The function has to be in the same folder as this skript
2 Filter Desgn with some algorithms This exercise uses speksitIIR.m function from Mycourses. The function has to be in the same folder as this skript to work. You can write 'help speksitIIR to Command Window to get information about speksitIIR function. Sampling frequency in both sections is 48000 Hz. Use legend() to name each magnitude response clearly. Helpful functions: butter, buttord, chebl, cheblord, ellip, ellipord, freqz a) Design digital minimum order (lowest possible order) I) Butterworth, II) Chebyshev 1 and III) Elliptic high-pass filters that fulfill specs drawn on the figure(1) and plot them to figure(1). b) Design digital minimum order (lowest possible order) I) Butterworth, II) Chebyshev 1, III) and Elliptic band-pass filters that fulfill specs drawn on the figure(2) and plot them to figure(1). c) What are the orders of each filters and what differences: butterworth, chebyshev 1 and elliptic filter have? 08/02/21 17:21 C:\Users\User\Desktop\speksitIIR.m 1 of 5 function lines - speksitIIR(Wp, Ws, Rp, Rs, type, Fa) SPEKSITIIR piirtha aktiiviseen ikkunaan annetut IIR-suotimen speksit. % SPEKSITIIR draws the specifications in the axis 8 [lines] = speksitIIR(Wp, vis, Rp, Rs, type, [F]); 8 % Soveltuu vain LP/HP/BP/BS-suotimille, IIR-suunnittelun spekseilla. Maksimi tulee olla skaalattuna 0 dB:en. / Only for LP/HP/BP/BS-filters using IIR filter specifications. The maximum has to be scaled to 0 dB. $ The input variables Wp, Ws, Rp, Rs as explained in "help buttord", filter types as in "help butter" 3 wp paastokaistan rajataajuus / cut-off for passband estokaistan rajataajuus / cut-off for stopband pstn rippeli / maximum ripple in passband eston minimivaimennus / minimum attenuation in stopbana LE: " (default), HP: 'high', BP: ", BS: 'stop' Nytteenottotaajuus / Sampling frequency, default-2 Ws Rp RS type ES 3 % 3 8 lines kahvat viivoihin / handles to line objects % EXAMPLE % Wp = 0.3; W = 0.4; Rp = 3; R = 20; ET = 22050; IN, Wn] = ellipord (Wp, Ws, Rp, Rs); % [B, A 1 = ellip(N, Rp, Rs, Wn); freq2/B, A, 512, ET); speksitIIR (Up, Ws, Rp, Rs, "IT); Jukka Parviainen, parvi@hut.fi, 2011 / 7.4.2008 / 20.10.2004 if nargin6 error('Liian paljon argumentteja / Too many arguments, "help speksit"); end; 08/02/21 17:21 C:\Users\User\Desktop\speksitIIR.m 2 of 5 #XL - get (gca, 'XLim'); BYL = get igca, 'YLim'); if ((strcmp(type,'high')==1) 1 (strcmp(type,'stop')==1) 1 (strcmp(type,'')==1) ) % OK else error('Vr "type" / wrong "type"; "help speksit"'); end; if (length (Wp) ==2 & length(s) ==2) if isempty(type) type = 'pass', BANDpass ondi elseif (length(ip) ==1 & length(Ws) ==1) if isempty(type) type = 'low'; enai else error('wp ja Ws eivt saman kokoiset / Wp and Wis not of same size, "help speksit"'); end; if (any ([Wp Wis) >=1) | any [[ Tip Wis]6 error('Liian paljon argumentteja / Too many arguments, "help speksit"); end; 08/02/21 17:21 C:\Users\User\Desktop\speksitIIR.m 2 of 5 #XL - get (gca, 'XLim'); BYL = get igca, 'YLim'); if ((strcmp(type,'high')==1) 1 (strcmp(type,'stop')==1) 1 (strcmp(type,'')==1) ) % OK else error('Vr "type" / wrong "type"; "help speksit"'); end; if (length (Wp) ==2 & length(s) ==2) if isempty(type) type = 'pass', BANDpass ondi elseif (length(ip) ==1 & length(Ws) ==1) if isempty(type) type = 'low'; enai else error('wp ja Ws eivt saman kokoiset / Wp and Wis not of same size, "help speksit"'); end; if (any ([Wp Wis) >=1) | any [[ Tip Wis]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started