## Transcribed Text

(Q1) Perform a filter design using a method of your choice of a one- Dimensional FIR or IIR filter at the
following normalized Band of frequencies. In each case, plot the pole, zero locations on the z-plane as
well as the frequency response. Transform the one-dimensional filter into 3-Dimensions and plot the
frequency response of the filter.
1. a) Design a low-pass filter using a Blackman Window the following specs, while keeping the
window order at a minimum
Sampling Frequency = 2Hz
Passband= 0-0.4Hz
Stopband = 0.5Hz—1 Hz
Pass ripple = 2%
Attenuation =93dB
2. b) Design a band-pass filter Using a Hamming Window with the following Specifications, while
keeping the window order at a minimum
Sampling frequency = 2
Passband = 0.45Hz – 0.6Hz
Stopband =0 – 0.4Hz and 0.65Hz – 1 Hz
Passband ripple = 4%
Stopband ripple =4%
3. c) Design a band-stop filter Using a Von Hann Window with the following Specifications: while
keeping the window order at a minimum.
Sampling frequency = 2
Stopband = 0.45Hz – 0.6Hz
Passband =0 – 0.4Hz and 0.65Hz – 1 Hz
Passband ripple = 4%
Stopband ripple =4%
4. d) Design a minimum order one-Dimensional FIR High Pass Filter using the Park-McClellan
Method with the following Specification,
Sampling Frequency = 2Hz
Stopband= 0-0.4Hz
Passband = 0.5Hz—1 Hz
Pass ripple = 2%
Stopband Ripple =4%
Digital Signal Processing
e) Design an IIR Resonant filter that selects the frequency of 0.5Hz with a Sampling frequency of 2Hz.
(Q2) Download a low-resolution image of your choice with no higher resolution than 480 X 480 pixels
into MATLAB using the “imread” function. Use the “imshow” function in MATLAB to display the picture
in Grayscale resolution. Pass image thru each 3-D filter you designed. In each case produce the
frequency response of the filtered image. Display each filtered image and comment on the result.
(Q3) The doppler shift effect can be applied to group of frequencies just as it can to a single frequency.
On the piano, the F-Major chord is made up of the notes F, A, and C which correspond to the
frequencies 349.228 Hz, 436.682 Hz, and 523.271 Hz respectively. Create three sine waves at these
frequencies and add them together to synthesize the chord. Use a sample frequency of 44100 Hz and
normalize the amplitude of the result to 1. Use the MATLAB® function to Doppler shift the F-major
Chord by sliding them laterally over a course of 5 seconds to the frequencies 449.228 Hz, 536.682 Hz,
and 623.271 Hz respectively (Essentially shifting them by 100Hz). Change the amplitude in a linear
fashion so that the amplitudes are louder at higher frequencies. Use the Sound command to play the
effect. After a 3 Second Pause, Reverse the effects with the same duration.

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction
of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.

clc;clear all;

Fp = 0.4;

Fst = 0.5;

Fs = 2;

R = (10^(0.02/20) - 1)/(10^(0.02/20) + 1); %Ripple

A = 10^(-93/20); %attenuation

Filt = firgr('minorder',[0 Fp/(Fs/2) Fst/(Fs/2) 1/(Fs/2)], [1 1 0 0],[R A]);

if (mod(length(Filt),2) == 0)

N = length(Filt);

else

N = length(Filt)+1;

end

Filt = firgr(N,[0 Fp/(Fs/2) Fst/(Fs/2) 1/(Fs/2)], [1 1 0 0],[R A]);

Filt = Filt.*blackman(length(Filt))';

figure;zplane(Filt);title('Pole-Zero Plot');

[h,w]=freqz(Filt);

H = abs(h);

H = 20*log10(H/max(H));

figure;

subplot(2,1,1);plot(w*(Fs/(2*pi)),H,'--k','Linewidth',2);

xlabel('Frequency(Hz)');ylabel('Magnitude');

title('1D Filter Magnitude Response');

subplot(2,1,2);plot(w*(Fs/(2*pi)),angle(h),'--k','Linewidth',2);

xlabel('Frequency(Hz)');ylabel('Angle (radians)');

title('1D Filter Phase Response');

H3 = ftrans2(Filt);

figure;freqz2(H3);

title('2D Filter Response');

clc;clear all;

Fs1 = 0.4;

Fp1 = 0.45;

Fp2 = 0.6;

Fs2 = 0.65;

Fs = 2;

R1 = (10^(0.04/20) - 1)/(10^(0.04/20) + 1); %Ripple1

R2 = (10^(0.04/20) - 1)/(10^(0.04/20) + 1); %Ripple2

Filt = firgr('minorder',[0,Fs1/(Fs/2),Fp1/(Fs/2),Fp2/(Fs/2),Fs2/(Fs/2),1/(Fs/2)],[0 0 1 1 0 0],[R2 R1 R2]);

if (mod(length(Filt),2) == 0)

N = length(Filt);

else

N = length(Filt)+1;

end

Filt = firgr(N,[0,Fs1/(Fs/2),Fp1/(Fs/2),Fp2/(Fs/2),Fs2/(Fs/2),1/(Fs/2)],[0 0 1 1 0 0],[R2 R1 R2]);

Filt = Filt.*hamming(length(Filt))';

figure;zplane(Filt);title('Pole-Zero Plot');

[h,w]=freqz(Filt);

H = abs(h);

H = 20*log10(H/max(H));

figure...