# 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

#### Questions & Answers

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
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
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
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
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!