# 5.4 Linear-phase fir filters: amplitude formulas

 Page 1 / 1
(Blank Abstract)

## Summary: amplitude formulas

Type $()$ $A()$
I $-(M)$ $h(M)+2\sum_{n=0}^{M-1} h(n)\cos ((M-n))$
II $-(M)$ $2\sum_{n=0}^{\frac{N}{2}-1} h(n)\cos ((M-n))$
III $-(M)+\frac{\pi }{2}$ $2\sum_{n=0}^{M-1} h(n)\sin ((M-n))$
IV $-(M)+\frac{\pi }{2}$ $2\sum_{n=0}^{\frac{N}{2}-1} h(n)\sin ((M-n))$

where $M=\frac{N-1}{2}$

## Amplitude response characteristics

To analyze or design linear-phase FIR filters, we need to know the characteristics of the amplitude response $A()$ .

Type Properties
I $A()$ is even about $=0$ $A()=A(-)$
$A()$ is even about $=\pi$ $A(\pi +)=A(\pi -)$
$A()$ is periodic with $2\pi$ $A(+2\pi )=A()$
II $A()$ is even about $=0$ $A()=A(-)$
$A()$ is odd about $=\pi$ $A(\pi +)=-A(\pi -)$
$A()$ is periodic with $4\pi$ $A(+4\pi )=A()$
III $A()$ is odd about $=0$ $A()=-A(-)$
$A()$ is odd about $=\pi$ $A(\pi +)=-A(\pi -)$
$A()$ is periodic with $2\pi$ $A(+2\pi )=A()$
IV $A()$ is odd about $=0$ $A()=-A(-)$
$A()$ is even about $=\pi$ $A(\pi +)=A(\pi -)$
$A()$ is periodic with $4\pi$ $A(+4\pi )=A()$

## Evaluating the amplitude response

The frequency response ${H}^{f}()$ of an FIR filter can be evaluated at $L$ equally spaced frequencies between 0 and $\pi$ using the DFT. Consider a causal FIR filter with an impulse response $h(n)$ of length- $N$ , with $N\le L$ . Samples of the frequency response of the filter can be written as $H(\frac{2\pi }{L}k)=\sum_{n=0}^{N-1} h(n)e^{-i\frac{2\pi }{L}nk}$ Define the $L$ -point signal $\{g(n)\colon 0\le n\le L-1\}$ as $g(n)=\begin{cases}h(n) & \text{if 0\le n\le N-1}\\ 0 & \text{if N\le n\le L-1}\end{cases}$ Then $H(\frac{2\pi }{L}k)=G(k)={\mathrm{DFT}}_{L}(g(n))$ where $G(k)$ is the $L$ -point DFT of $g(n)$ .

## Types i and ii

Suppose the FIR filter $h(n)$ is either a Type I or a Type II FIR filter. Then we have from above ${H}^{f}()=A()e^{-iM}$ or $A()={H}^{f}()e^{iM}$ Samples of the real-valued amplitude $A()$ can be obtained from samples of the function ${H}^{f}()$ as: $A(\frac{2\pi }{L}k)=H(\frac{2\pi }{L}k)e^{iM\frac{2\pi }{L}k}=G(k){W}_{L}^{Mk}$ Therefore, the samples of the real-valued amplitude function can be obtained by zero-padding $h(n)$ , taking the DFT, and multiplying by the complex exponential. This can be written as:

$A(\frac{2\pi }{L}k)={\mathrm{DFT}}_{L}()$
h n 0 L - N
W L M k

## Types iii and iv

For Type III and Type IV FIR filters, we have ${H}^{f}()=ie^{-iM}A()$ or $A()=-i{H}^{f}()e^{iM}$ Therefore, samples of the real-valued amplitude $A()$ can be obtained from samples of the function ${H}^{f}()$ as: $A(\frac{2\pi }{L}k)=-iH(\frac{2\pi }{L}k)e^{iM\frac{2\pi }{L}k}=-iG(k){W}_{L}^{Mk}$ Therefore, the samples of the real-valued amplitude function can be obtained by zero-padding $h(n)$ , taking the DFT, and multiplying by the complex exponential.

$A(\frac{2\pi }{L}k)=-i{\mathrm{DFT}}_{L}()$
h n 0 L - N
W L M k

## Evaluating the amp resp (type i)

In this example, the filter is a Type I FIR filter of length 7. An accurate plot of $A()$ can be obtained with zero padding.

The following Matlab code fragment for the plot of $A()$ for a Type I FIR filter.

h = [3 4 5 6 5 4 3]/30;N = 7; M = (N-1)/2;L = 512; H = fft([h zeros(1,L-N)]); k = 0:L-1;W = exp(j*2*pi/L); A = H .* W.^(M*k);A = real(A); figure(1)w = [0:L-1]*2*pi/(L-1);subplot(2,1,1) plot(w/pi,abs(H))ylabel('|H(\omega)| = |A(\omega)|') xlabel('\omega/\pi')subplot(2,1,2) plot(w/pi,A)ylabel('A(\omega)') xlabel('\omega/\pi')print -deps type1

The command A = real(A) removes the imaginary part which is equal to zero to within computerprecision. Without this command, Matlab takes A to be a complex vector and the following plot command will not be right.

Observe the symmetry of $A()$ due to $h(n)$ being real-valued. Because of this symmetry, $A()$ is usually plotted for $0\le \le \pi$ only.

## Evaluating the amp resp (type ii)

The following Matlab code fragment produces a plot of $A()$ for a Type II FIR filter.

h = [3 5 6 7 7 6 5 3]/42;N = 8; M = (N-1)/2;L = 512; H = fft([h zeros(1,L-N)]); k = 0:L-1;W = exp(j*2*pi/L); A = H .* W.^(M*k);A = real(A); figure(1)w = [0:L-1]*2*pi/(L-1);subplot(2,1,1) plot(w/pi,abs(H))ylabel('|H(\omega)| = |A(\omega)|') xlabel('\omega/\pi')subplot(2,1,2) plot(w/pi,A)ylabel('A(\omega)') xlabel('\omega/\pi')print -deps type2

The imaginary part of the amplitude is zero. Notice that $A(\pi )=0$ . In fact this will always be the case for a Type II FIR filter.

An exercise for the student: Describe how to obtain samples of $A()$ for Type III and Type IV FIR filters. Modify the Matlab code above for these types. Do you notice that $A()=0$ always for special values of  ?

## Modules for further study

• Zero Locations of Linear-Phase Filters
• Design of Linear-Phase FIR Filters by Interpolation
• Linear-Phase FIR Filter Design by Least Squares

Preparation and Applications of Nanomaterial for Drug Delivery
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
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
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
hi
Loga
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!