# 2.2 Least squared error design of fir filters  (Page 5/13)

 Page 5 / 13
$q\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}\frac{1}{\pi }{\int }_{0}^{\pi }{|{A}_{d}\left(\omega \right)-A\left(\omega \right)|}^{2}\phantom{\rule{0.166667em}{0ex}}d\omega$

where ${A}_{d}\left(\omega \right)$ is the desired ideal amplitude response, $A\left(\omega \right)={\sum }_{n}a\left(n\right)\phantom{\rule{0.166667em}{0ex}}cos\left(\omega \left(M-N\right)n\right)$ is the achieved amplitude response with the length $h\left(n\right)$ related to $h\left(n\right)$ by Equation 29 from FIR Digital Filters . This integral squared error is approximated by the discrete squared errordefined in [link] for $L>>N$ which in some cases is much easier to minimize. However for some very useful cases, formulas can be foundfor $h\left(n\right)$ that minimize [link] and that is what we will be considering in this section.

## The unweighted least integral squared error approximation

If the error measure is the unweighted integral squared error defined in [link] , Parseval's theorem gives the equivalent time-domain formulation for the error to be

$q\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}\sum _{n=-\infty }^{\infty }|{h}_{d}{\left(n\right)-h\left(n\right)|}^{2}=\phantom{\rule{0.166667em}{0ex}}\frac{1}{\pi }{\int }_{0}^{\pi }{|{A}_{d}\left(\omega \right)-A\left(\omega \right)|}^{2}\phantom{\rule{0.166667em}{0ex}}d\omega .$

In general, this ideal response is infinite in duration and, therefore, cannot be realized exactly byan actual FIR filter.

As was done in the case of the discrete error measure, we break the infinite sum in [link] into two parts, one of which depends on $h\left(n\right)$ and the other does not.

$q\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}\sum _{n=-M}^{M}\phantom{\rule{0.166667em}{0ex}}|{h}_{d}{\left(n\right)-h\left(n\right)|}^{2}\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}2\sum _{n=M+1}^{\infty }{|{h}_{d}\left(n\right)|}^{2}$

Again, we see that the minimum $q$ is achieved by using $h\left(n\right)={h}_{d}\left(n\right)$ for $-M\le n\le M$ . In other words, the infinitely long ${h}_{d}\left(n\right)$ is symmetrically truncated to give the optimal least integral squared errorapproximation. The problem then becomes one of finding the ${h}_{d}\left(n\right)$ to truncate.

Here the integral definition of approximation error is used. This is usually what we really want, but in some cases the integrals can not becarried out and the sampled method above must be used.

## Ideal constant gain passband lowpass filter

Here we assume the simplest ideal lowpass single band FIR filter to have unity passband gain for $0<\omega <{\omega }_{0}$ and zero stopband gain for ${\omega }_{0}<\omega <\pi$ similar to those in Figure 8a from FIR Digital Filters and [link] . This gives

${A}_{d}\left(\omega \right)=\left\{\begin{array}{c}1\phantom{\rule{10pt}{0ex}}((0, \omega ), {\omega }_{0})\hfill \\ 0\phantom{\rule{10pt}{0ex}}(({\omega }_{0}, \omega ), \pi )\hfill \end{array}$

as the ideal desired amplitude response. The ideal shifted filter coefficients are the inverse DTFT from Equation 15 from Chebyshev or Equal Ripple Error Approximation Filters of this amplitude which for $N$ odd are given by

${\stackrel{^}{h}}_{d}\left(n\right)\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}\frac{1}{\pi }{\int }_{0}^{\pi }{A}_{d}\left(\omega \right)\phantom{\rule{0.166667em}{0ex}}cos\left(\omega n\right)\phantom{\rule{0.166667em}{0ex}}d\omega$
$=\frac{1}{\pi }{\int }_{0}^{{\omega }_{0}}cos\left(\omega n\right)\phantom{\rule{0.166667em}{0ex}}d\omega =\left(\frac{{\omega }_{0}}{\pi }\right)\phantom{\rule{0.166667em}{0ex}}\frac{sin\left({\omega }_{0}n\right)}{{\omega }_{0}n}$

which is sometimes called a “sinc" function. Note ${\stackrel{^}{h}}_{d}\left(n\right)$ is generally infinite in length. This is now symmetricallytruncated and shifted by $M=\left(N-1\right)/2$ to give the optimal, causal length- $N$ FIR filter coefficients as

$h\left(n\right)\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}\left(\frac{{\omega }_{0}}{\pi }\right)\frac{sin\left({\omega }_{0}\left(n-M\right)\right)}{{\omega }_{0}\left(n-M\right)}\phantom{\rule{4.pt}{0ex}}\phantom{\rule{4.pt}{0ex}}\phantom{\rule{4.pt}{0ex}}\text{for}\phantom{\rule{4.pt}{0ex}}0\le n\le N-1$

and $h\left(n\right)=0$ otherwise. The corresponding derivation for an even length starts with the inverseDTFT in Equation 5 from Constrained Approximation and Mixed Criteria for a shifted even length filter is

${\stackrel{^}{h}}_{d}\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}\frac{1}{\pi }{\int }_{0}^{\pi }{A}_{d}\left(\omega \right)\phantom{\rule{0.166667em}{0ex}}cos\left(\omega \left(n+1/2\right)\right)\phantom{\rule{0.166667em}{0ex}}d\omega \phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}\left(\frac{{\omega }_{0}}{\pi }\right)\phantom{\rule{0.166667em}{0ex}}\frac{sin\left({\omega }_{0}\left(n+1/2\right)\right)}{{\omega }_{0}\left(n+1/2\right)}$

which when truncated and shifted by $N/2$ gives the same formula as for the odd length design in [link] but one should note that $M=\left(N-1\right)/2$ is not an integer for an even $N$ .

## Ideal linearly increasing gain passband lowpass filter

We now derive the design formula for a filter with an ideal amplitude response that is a linearly increasing function in the passband ratherthan a constant as was assumed above. This ideal amplitude response is given byand illustrated in [link] For $N$ odd, the ideal infinitely long shifted filter coefficients are the inverse DTFT of this amplitude given by

how can chip be made from sand
are nano particles real
yeah
Joseph
Hello, if I study Physics teacher in bachelor, can I study Nanotechnology in master?
no can't
Lohitha
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
has a lot of application modern world
Kamaluddeen
yes
narayan
what is variations in raman spectra for nanomaterials
ya I also want to know the raman spectra
Bhagvanji
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
Got questions? Join the online conversation and get instant answers!

#### Get Jobilize Job Search Mobile App in your pocket Now! By Katy Keilers By OpenStax By OpenStax By OpenStax By Christine Zeelie By Christine Zeelie By Rebecca Butterfield By Stephen Voron By JavaChamp Team By OpenStax