# 4.2 Lab 3: prelab (part 2)

 Page 1 / 1
You will design a fourth-order notch filter and investigate the effects of filter-coefficient quantization. You will compare the response of the filter having unquantized coefficients with that of a filter having coefficients quantized as a single, fourth-order stage and with that of a filter having coefficients quantized as a cascade of two, second-order stages.

## Filter-coefficient quantization

One important issue that must be considered when IIR filters are implemented on a fixed-point processor is that the filtercoefficients that are actually used are quantized from the "exact" (high-precision floating point) values computed byMATLAB. Although quantization was not a concern when we worked with FIR filters, it can cause significant deviationsfrom the expected response of an IIR filter.

By default, MATLAB uses 64-bit floating point numbers in all of its computation. These floating point numbers can typicallyrepresent 15-16 digits of precision, far more than the DSP can represent internally. For this reason, when creating filtersin MATLAB, we can generally regard the precision as "infinite," because it is high enough for any reasonable task.

Not all IIR filters are necessarily "reasonable"!
The DSP, on the other hand, operates using 16-bit fixed-point numbers in the range of -1.0 to $1.0-2^{-15}$ . This gives the DSP only 4-5 digits of precision and only if the input is properly scaled to occupy the fullrange from -1 to 1.

For this section exercise, you will examine how this difference in precision affects a notch filter generated using the butter command: [B,A] = butter(2,[0.07 0.10],'stop') .

## Quantizing coefficients in matlab

It is not difficult to use MATLAB to quantize the filter coefficients to the 16-bit precision used on the DSP. To do this, first take each vector of filtercoefficients (that is, the $A$ and $B$ vectors) and divide by the smallest power of two such that the resulting absolute value of the largest filtercoefficient is less than or equal to one. This is an easy but fairly reasonable approximation of how numbers outsidethe range of -1 to 1 are actually handled on the DSP.

Next, quantize the resulting vectors to 16 bits of precision by first multiplying them by $2^{15}=32768$ , rounding to the nearest integer (use round ), and then dividing the resulting vectors by 32768. Then multiply the resulting numbers, which will bein the range of -1 to 1, back by the power of two that you divided out.

## Effects of quantization

Explore the effects of quantization by quantizing the filter coefficients for the notch filter. Use the freqz command to compare the response of the unquantized filter with two quantized versions: first,quantize the entire fourth-order filter at once, and second, quantize the second-order ("bi-quad") sections separatelyand recombine the resulting quantized sections using the conv function. Compare the response of the unquantized filter and the two quantizedversions. Which one is "better?" Why do we always implement IIR filters using second-order sections instead ofimplementing fourth (or higher) order filters directly?

Be sure to create graphs showing the difference between the filter responses of the unquantized notch filter, the notchfilter quantized as a single fourth-order section, and the notch filter quantized as two second-order sections. Savethe MATLAB code you use to generate these graphs, and be prepared to reproduce and explain the graphs as part of yourquiz. Make sure that in your comparisons, you rescale the resulting filters to ensure that the response is unity (one)at frequencies far outside the notch.

where we get a research paper on Nano chemistry....?
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
Ali
what are the products of Nano chemistry?
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
hey
Giriraj
Preparation and Applications of Nanomaterial for Drug Delivery
revolt
da
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!