# 0.6 Lab 5b - digital filter design (part 2)  (Page 2/6)

 Page 2 / 6

Plot the rectangular, Hamming, Hanning, and Blackman window functions of length 21 on a single figure using the subplot command. You may use the Matlab commands hamming , hann , and blackman . Then compute and plot the DTFT magnitude of each of the four windows.Plot the magnitudes on a decibel scale (i.e., plot $20{log}_{10}|W\left({e}^{j\omega }\right)|$ ). Download and use the function DTFT.m to compute the DTFT.

Use at least 512 sample points in computing the DTFT by typing the command DTFT(window,512) . Type help DTFT for further information on this function.

Measure the null-to-null mainlobe width (in rad/sample) and the peak-to-sidelobe amplitude (in dB)from the logarithmic magnitude response plot for each window type. The Matlab command zoom is helpful for this. Make a table with these values and the theoretical ones.

Now use a Hamming window to design a lowpass filter $h\left(n\right)$ with a cutoff frequency of ${\omega }_{c}=2.0$ and length 21. Note: You need to use [link] and [link] for this design. In the same figure, plot the filter's impulse response, and the magnitude of the filter's DTFT in decibels.

## Inlab report

1. Submit the figure containing the time domain plots of the four windows.
2. Submit the figure containing the DTFT (in decibels) of the four windows.
3. Submit the table of the measured and theoretical window spectrum parameters.Comment on how close the experimental results matched the ideal values. Also commenton the relation between the width of the mainlobe and the peak-to-sidelobe amplitude.
4. Submit the plots of your designed filter's impulse response and the magnitude of the filter's DTFT.

## Filter design using the kaiser window

The standard windows of the "Filter Design Using Standard Windows" section are an improvement over simple truncation,but these windows still do not allow for arbitrary choices of transition bandwidth and ripple.In 1964, James Kaiser derived a family of near-optimal windows that can be used to design filters which meet or exceed any filter specification.The Kaiser window depends on two parameters: the window length $N$ , and a parameter $\beta$ which controls the shape of the window. Large values of $\beta$ reduce the window sidelobes and therefore result in reduced passband and stopband ripple.The only restriction in the Kaiser filter design method is that the passband and stopband ripple must be equal in magnitude.Therefore, the Kaiser filter must be designed to meet the smaller of the two ripple constraints:

$\delta =min\left\{{\delta }_{p},{\delta }_{s}\right\}$

The Kaiser window function of length $N$ is given by

$w\left(n\right)=\left\{\begin{array}{cc}\frac{{I}_{0}\left(\beta ,\frac{\sqrt{n\left(N-1-n\right)}}{N-1}\right)}{{I}_{0}\left(\beta \right)}\hfill & \phantom{\rule{4.pt}{0ex}}n=0,1,...,N-1\hfill \\ 0\hfill & \phantom{\rule{4.pt}{0ex}}\text{otherwise}\hfill \end{array}\right)$

where ${I}_{0}\left(·\right)$ is the zero'th order modified Bessel function of the first kind, $N$ is the length of the window, and $\beta$ is the shape parameter.

Kaiser found that values of $\beta$ and $N$ could be chosen to meet any set of design parameters, $\left(\delta ,{\omega }_{p},{\omega }_{s}\right)$ , by defining $A=-20{log}_{10}\delta$ and using the following two equations:

$\beta =\left\{\begin{array}{cc}0.1102\left(A-8.7\right)\hfill & A>50\hfill \\ 0.5842{\left(A-21\right)}^{0.4}+0.07886\left(A-21\right)\hfill & 21\le A\le 50\hfill \\ 0.0\hfill & A<21\hfill \end{array}\right)$
$N=⌈1,+,\frac{A-8}{2.285\left({\omega }_{s}-{\omega }_{p}\right)}⌉$

where $⌈·⌉$ is the ceiling function, i.e. $⌈x⌉$ is the smallest integer which is greater than or equal to $x$ .

#### Questions & Answers

the art of managing the production, distribution and consumption.
what is economics
okk
damfash
marginal utility is the additional satisfaction one derives from consuming additional unit of a good or service.
Fred
It's the allocation of scarce resources.
Fred
Dishan
marginal utility is the additional satisfaction one derives from consuming additional unit of a good or service.
Fred
I know the definition, but I don't understand its meaning.
Dishan
what is the must definition of economic please?
Nurudeen
demand lfs
Alpha
Economics is derived from the word Oikonomia which means management of household things. Thus, Economics is a study of household things with the constrains of allocating scare resources.
Dishan
what is Open Market Operation
dominating middlemen men activities circumstances
what Equilibrium price
what is gap
mirwais
who is good with the indifference curve
Dexter
What is diseconomic
what are the types of goods
WARIDI
how can price determination be the central problem of micro economics
marginal cost formula
you should differentiate the total cost function in order to get marginal cost function then you can get marginal cost from it
boniphace
What about total cost
Foday
ok
Foday
how can price determination be the central problem if micro economics
simon
formula of cross elasticity of demand
what is ceteris paribus
what is ceteris parabus
Priyanka
Ceteris paribus - Literally, "other things being equal"; usually used in economics to indicate that all variables except the ones specified are assumed not to change.
Abdullah
What is broker
scor
land is natural resources that is made by nature
scor
What is broker
scor
what is land
kafui
What is broker
scor
land is natural resources that is made by nature
scor
whats poppina nigga turn it up for a minute get it
what is this?
Philo
am from nigeria@ pilo
Frank
am from nigeria@ pilo
Frank
so
owusu
what is production possibility frontier
owusu
it's a summary of opportunity cost depicted on a curve.
okhiria
please help me solve this question with the aid of appropriate diagrams explain how each of the following changes will affect the market price and quantity of bread 1. A
please l need past question about economics
ok let me know some of the questions please.
Effah
ok am not wit some if den nw buh by tommorow I shall get Dem
Hi guys can I get Adam Smith's WEALTH OF NATIONS fo sale?
Ukpen
hello I'm Babaisa alhaji Mustapha. I'm studying Economics in the university of Maiduguri
Babaisa
okay
Humaira
my name is faisal Yahaya. i studied economics at Kaduna state university before proceeding to West African union university benin republic for masters
Faisal
Hi guys..I am from Bangladesh..
Mannan
Wat d meaning of management
disaster management cycle
cooperate social responsibility
igwe
Fedric Wilson Taylor also define management as the act of knowing what to do and seeing that it is done in the best and cheapest way
OLANIYI
Difference between extinct and extici spicies
Researchers demonstrated that the hippocampus functions in memory processing by creating lesions in the hippocampi of rats, which resulted in ________.
The formulation of new memories is sometimes called ________, and the process of bringing up old memories is called ________.
Got questions? Join the online conversation and get instant answers!