Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

According to a study1, \"the main melody (spectral/pitch information) is most of

ID: 2083011 • Letter: A

Question

According to a study1, "the main melody (spectral/pitch information) is most often carried by the highest-pitched voice, and the rhythm (temporal foundation) is most often laid down by the lowest-pitched voice" In particular, the study used neural recordings to show that rhythmic timing information is carried in lower-pitched sound sources. In order to test this notion, you need to design a filter to cut the high-frequency components of a provided song recording that has strong beat. The desired specifications for the design is a Butterworth filter operating at 44, 100 Hz sampling rate, with a stopband attenuation of 45 dB at 1.000 Hz and at least -0.9 dB pass band edge at 500 Hz. What type of filter (e.g., lowpass, highpass) do you need to design? Explain your reasoning. (a) Design a continuous-time (CT) Butterworth filter to meet the specifications by providing the order and cutoff frequency of the filter (passband specifications must remain fixed); provide all computation steps. (b) Use MATLAB to design the CT Butterworth filter: provide the plot of the magnitude response |H(j Ohm)| and your MATLAB code. (relevant MATLAB functions: buttord.m. butter.m, freqs.m) (a) Use the impulse invariance method to obtain the discrete-time (DT) design from the CT design; provide the DT filter specifications. (b) Use MATLAB to design the DT Butterworth filter; provide the plot of the magnitude response |H(e_jw)| and your MATLAB code. (relevant functions: impinvar.m. freqz. m) Repeat 3(a) and (b) using the bilinear transformation method. (relevant functions: bilinear. m. freqz) Load the data in MATLAB using load shake_your_bootay_data. mat. Filter the data using the MATLAB command filter. m. and name the filtered data data_out. Use sound (data, fs) and sound (data_out, fs). with sampling frequency f_s, to send the original and filtered data to your PC speaker. Provide time-frequency transformation plots of the original and filtered data (see sample code below) and discuss the effect of the filter on the filtered data. Nfft = 256; window=140; overlap=window-l; [SP, freq, time] = spectrogram(data, window, overlap, Nfft, fs); [SP_f iltered, freq, time] = spectrogram (data_out, window, overlap, Nfft, fs); figure(l); subplot(211); samp_freq = 30; freq_short = freq(l:samp_freq); imagesc(time, freq_short, abs(SP(1:samp_freq, :))); axis xy xlabel ('Time, s'); y label ('Frequency, Hz'); title('Song recording'); figure(l); subplot(212) imagesc(time, freq_short, abs(SP_filtered (l:samp_freq, :))); axis xy xlabel('Time, s'); ylabel('Frequency, Hz'); title('Filtered song recording');

Explanation / Answer

fc = 300; fs = 1000; [b,a] = butter(6,fc/(fs/2)); freqz(b,a) dataIn = randn(1000,1); dataOut = filter(b,a,dataIn); [b,a] = butter(3,[0.2 0.6],'stop'); freqz(b,a) dataIn = randn(1000,1); dataOut = filter(b,a,dataIn); [z,p,k] = butter(9,300/500,'high'); sos = zp2sos(z,p,k); fvtool(sos,'Analysis','freq') [A,B,C,D] = butter(10,[500 560]/750); d = designfilt('bandpassiir','FilterOrder',20, ... 'HalfPowerFrequency1',500,'HalfPowerFrequency2',560, ... 'SampleRate',1500); sos = ss2sos(A,B,C,D); fvt = fvtool(sos,d,'Fs',1500); legend(fvt,'butter','designfilt') n = 5; f = 2e9; [zb,pb,kb] = butter(n,2*pi*f,'s'); [bb,ab] = zp2tf(zb,pb,kb); [hb,wb] = freqs(bb,ab,4096); [z1,p1,k1] = cheby1(n,3,2*pi*f,'s'); [b1,a1] = zp2tf(z1,p1,k1); [h1,w1] = freqs(b1,a1,4096); [z2,p2,k2] = cheby2(n,30,2*pi*f,'s'); [b2,a2] = zp2tf(z2,p2,k2); [h2,w2] = freqs(b2,a2,4096); [ze,pe,ke] = ellip(n,3,30,2*pi*f,'s'); [be,ae] = zp2tf(ze,pe,ke); [he,we] = freqs(be,ae,4096); plot(wb/(2e9*pi),mag2db(abs(hb))) hold on plot(w1/(2e9*pi),mag2db(abs(h1))) plot(w2/(2e9*pi),mag2db(abs(h2))) plot(we/(2e9*pi),mag2db(abs(he))) axis([0 4 -40 5]) grid xlabel('Frequency (GHz)') ylabel('Attenuation (dB)') legend('butter','cheby1','cheby2','ellip') n = 6; Wn = [2.5e6 29e6]/500e6; ftype = 'bandpass'; % Transfer Function design [b,a] = butter(n,Wn,ftype); % This is an unstable filter % Zero-Pole-Gain design [z,p,k] = butter(n,Wn,ftype); sos = zp2sos(z,p,k); % Display and compare results hfvt = fvtool(b,a,sos,'FrequencyScale','log'); legend(hfvt,'TF Design','ZPK Design')

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote