qwertyuiopasdfghjklzxcvbnmqwertyui

opasdfghjklzxcvbnmqwertyuiopasdfgh
jklzxcvbnmqwertyuiopasdfghjklzxcvb
nmqwertyuiopasdfghjklzxcvbnmqwer
M.Bilal Junaid
tyuiopasdfghjklzxcvbnmqwertyuiopas
Assignment :4
dfghjklzxcvbnmqwertyuiopasdfghjklzx
cvbnmqwertyuiopasdfghjklzxcvbnmq
wertyuiopasdfghjklzxcvbnmqwertyuio
pasdfghjklzxcvbnmqwertyuiopasdfghj
klzxcvbnmqwertyuiopasdfghjklzxcvbn
mqwertyuiopasdfghjklzxcvbnmqwerty
uiopasdfghjklzxcvbnmqwertyuiopasdf
ghjklzxcvbnmqwertyuiopasdfghjklzxc
vbnmqwertyuiopasdfghjklzxcvbnmrty
uiopasdfghjklzxcvbnmqwertyuiopasdf
ghjklzxcvbnmqwertyuiopasdfghjklzxc
MS(EE)-SP014-014

Advance Digital Signal Processing

'low') figure freqz(b1..a) title('Magnitude and phase of FIR Kaiser window filter '). [Gd.........Answer 1 close all clear all %FIR Kaiser window Filter.. [b1.......... figure..... %.......a1..... ylabel('Grp(H(ejw))')... plot(w..........BETA.........2.a1] = cheby1(N... Wn.256).........Gd). TYPE.0001....a1) title('Magnitude and phase of IIR Chebsev filter ')......Apass..w] = grpdelay(b1.. figure Freqz(b. % Passband Frequency Fstop = 0....... [N... title('Group Delay of IIR Chebsev filter '). which is . %Zoom in the plot to see the range from 0 to wp xlabel(' 0 <= w <= wp ')....... N = 10.... %Group delay computation [Gd. title('Group Delay of FIR Kaiser Window Filter')...Gd).... %Zoom in the plot to see the range from 0 to wp xlabel(' 0 <= w <= wp '). kaiser(N+1.....Wn.............25. % Sampling Flag % Calculate the order from the parameters using KAISERORD..... ylabel('Grp(H(ejw))').....256)....a.. % Order Wp = 0.. BETA)..25pi in our case Fpass = 0... % Passband Frequency Apass = ....... [Dstop Dpass]).. %IIR Chebsev filter %Filter.... ... [1 0].... % Stopband Attenuation flag = 'noscale'......2.. % Calculate the coefficients using the FIR1 function.....dffir(b)......... [b a] = fir1(N... % Passband Ripple Dstop = 0.. plot(w.... % Passband Ripple (dB) % Construct an FDESIGN object and call its CHEBY1 method.... flag).....TYPE] = kaiserord([Fpass Fstop]. Hd = dfilt........ figure..... %Wc=(Fpass+Fstop)/2.3......... % Stopband Frequency Dpass = 0.Wp.......w] = grpdelay(b......057501127785..

............. ........................................................

.

. %.. Wn..............Answer 2 close all....*hanning(200)'..4*pi*k).... % Stopband Frequency Dpass = 0...TYPE] = kaiserord([Fpass Fstop]....057501127785. % Passband Frequency Apass = .... plot(k. ylabel('Grp(H(ejw))')..... % Sampling Flag % Calculate the order from the parameters using KAISERORD..... [b a] = fir1(N.... TYPE.............256).*hanning(200)'...a) title('Magnitude and phase of FIR Kaiser window filter ')........ plot(k.. x2 = cos(0.. %Group delay computation [Gd............2*pi*k).......4pi x2(1:74)=0 x2(176:200)=0 figure.........................Wn............ flag)............0001.. plot(w. %IIR Chebsev filter %Filter........ % Stopband Attenuation flag = 'noscale'.with wc=.... [1 0].2..................2pi x1(1:49)=0 x1(151:200)=0 figure......... N = 10. %Zoom in the plot to see the range from 0 to wp xlabel(' 0 <= w <= wp ').......3.......................x2).. % Passband Ripple (dB) ...dffir(b).... which is . ylabel('x2').. clear all.. kaiser(N+1.....25pi in our case Fpass = 0.......BETA..w] = grpdelay(b.... figure Freqz(b. figure... %Wc=(Fpass+Fstop)/2.x1)................... k = [0:199] x1 = cos(0.25...... %...........a... [N. title('narrow band signal x1').... % Passband Frequency Fstop = 0.... [Dstop Dpass]).... %.... %narrow band signal with twice frequency and sample created at differnet points with wc=. title('narrow band signal x2').............. %narrow band %signals... ylabel('x1')..... title('Group Delay of FIR Kaiser Window Filter'). xlabel('k').. Hd = dfilt......Gd)...... xlabel('k')......... BETA)...... %narrow band signal........ % Order Wp = 0.........2.... % Passband Ripple Dstop = 0........ % Calculate the coefficients using the FIR1 function...... %FIR Kaiser window Filter..

Gd).............. %....256).....................a........ [Gd........Apass.a1....... figure............... %%Filtering the output................'low') figure freqz(b1..........................w] = grpdelay(b1....... title('Group Delay of IIR Chebsev filter ').... y2=filter(b........a1] = cheby1(N.............x1) % filtering first narrow band singal x1 figure plot(z1) title('Filtered x1 using IIR chebsev filter ').... ylabel('Grp(H(ejw))')........a1) title('Magnitude and phase of IIR Chebsev filter ')........ %Group delay in FIR filter is higher as filtered output of it is more shifted compared to IIR filter also because IIR filter has ORDER compared to FIR.. %Filter using kaiser Window y1=filter(b...x2) % filtering second narrow band singal x2 figure plot(y2) title('Filtered x2 using Kaisar window filter ')........................ %.x1) % filtering first narrow band singal x1 figure plot(y1) title('Filtered x1 using Kaisar window filter ')..... %Group delay in FIR filter is higher as filterd output of it is more %shifted compared to IIR filter %.....Wp................ %......... %Zoom in the plot to see the range from 0 to wp xlabel(' 0 <= w <= wp ').... %Filter using IIR chebsev z1=filter(b1...a1................................x2) % filtering second narrow band singal x2 figure plot(z2) title('Filtered x2 using IIR chebsev filter ')................. ................. [b1.......% Construct an FDESIGN object and call its CHEBY1 method......a1......... z2=filter(b1.a. plot(w.....

.

.

.

. %Wc=(Fpass+Fstop)/2. title('Group Delay of FIR Kaiser Window Filter')...dffir(b)...Wn... % Sampling Flag % Calculate the order from the parameters using KAISERORD..........Apass. ylabel('Grp(H(ejw))').........2...BETA....... plot(t.............Wp...0001.................. %Zoom in the plot to see the range from 0 to wp xlabel(' 0 <= w <= wp ')... [N.... [1 0]. [b1.................. % Stopband Frequency Dpass = 0..256)..TYPE] = kaiserord([Fpass Fstop]..3........ figure Freqz(b.. %Zoom in the plot to see the range from 0 to wp xlabel(' 0 <= w <= wp ').. % Calculate the coefficients using the FIR1 function................ title('Group Delay of IIR Chebsev filter '). [Gd. kaiser(N+1.... %IIR Chebsev filter %Filter. [Dstop Dpass])..... N = 10.... figure.... % Passband Frequency Fstop = 0. similar way FM is modulated %by VCO to get wideband signal fs = 10. %.... figure.a1] = cheby1(N.....a.a1. % Order Wp = 0.....25.... % Passband Ripple (dB) % Construct an FDESIGN object and call its CHEBY1 method..... t = 0:1/fs:20 x = vco(sawtooth(2*pi*t.. TYPE.... plot(w.... %FIR Kaiser window Filter..4.0. %Group delay computation [Gd..fs).w] = grpdelay(b..'low') figure freqz(b1... ......a1) title('Magnitude and phase of IIR Chebsev filter ')............256).2.........Gd).......Answer 3 %Creating wideband signal by passing via VCO>..... Hd = dfilt.Gd). % Passband Ripple Dstop = 0.............a) title('Magnitude and phase of FIR Kaiser window filter ')..... [b a] = fir1(N....... ylabel('Grp(H(ejw))')............. Wn...........25pi in our case Fpass = 0...9).......... plot(w.. % Passband Frequency Apass = .....x) figure specgram(x) %....... % Stopband Attenuation flag = 'noscale'... BETA)...057501127785... which is ... flag)... x(20:200)=0.w] = grpdelay(b1.....

................. %%Filtering the output....a1. %Filter using IIR chebsev z1=filter(b1....... %Filter using kaiser Window y1=filter(b....x) % filtering wideband signal figure plot(z1) title('Filtered wideband signal using IIR chebsev filter ')...................................................................... %.................................... %........a...................... ...............................x) % filtering wideband signal figure plot(y1) title('Filtered wideband signal using Kaisar window filter ')...............%.................................

.

.Answer 4 Group delay in FIR filter is higher as filtered output of it is more shifted compared to IIR filter also because IIR filter has ORDER compared to FIR.

A narrowband FIR filter preserves the phase of the signal but experiences a significant group delay because of the large number of taps required. An equivalent IIR filter has fewer taps and thus would consume less computer resources Narrowband In radio. . Wideband range exceeds the coherence bandwidth. the band should be smaller than the coherence bandwidth (maximum range of frequencies where channel response is flat). and therefore. narrowband communication happens in a frequency range where the frequency response of the channel is flat (where gain is constant for all the frequencies in the range). computers are connected to internet through a modem and telephone cables. wideband communication happens in a wider frequency range compared to narrowband. When the data communication (or internet connections) is concerned. and relatively smaller than broadband range (or wideband) where channel response is not necessarily flat. In dial up connections. doesn’t exhibit a flat frequency response. Dial-up internet connection (where data rate is less than 56 kbps) belongs to the narrowband internet category. Wideband In radio. and the size of the band may be in kHz. narrowband refers to the amount of data being transferred within a second (or bits per second). Therefore. MHz or GHz depending on the application. Wideband is a relative term.