<< Chapter < Page Chapter >> Page >

Filters are also classified by the length of their impulse response. If the output of a filter depends only ona specified number of samples, the filter is said to have a finite impulse response, abbreviated FIR. Otheriwse,it is said to have an infinite impulse response, abbreviated IIR.The bulk of the filters in Software Receiver Design are FIR filters with a flat passband, because these are the most commonfilters in a typical receiver. But other filter profiles are possible, and the techniques offilter design are not restricted to flat passbands. "Implementing FIR Filters" shows several ways that digital FIR filters can be implemented in M atlab . IIR filters arise whenever there is a loop(such as in a phase locked loop), and one special case (the integrator) is an intrinsic piece of theadaptive elements. "Implementing IIR Filters" shows how to implement IIR filters. "Filter Design" shows how to design filters with specific properties,and how they behave on a number of test signals.

Implementing fir filters

Suppose that the impulse response of a discrete-time filter is h [ i ] , i = 0 , 1 , 2 , ... , N - 1 . If the input to the filter is the sequence x [ i ] , i = 0 , 1 , ... , M - 1 , then the output is given by the convolution [link] . There are four ways to implement this filtering in M atlab :

  • conv directly implements the convolution equation and outputs a vector of length N + M - 1 .
  • filter implements the convolution so as to supply one output value for each input value; the output is of length M .
  • In the frequency domain, take the FFT of the input, the FFT of the output, multiply the two, and take the IFFTto return to the time domain.
  • In the time domain, pass through the input data, at each time multiplying by the impulse response and summing the result.

Probably the easiest way to see the differences is to play with the four methods.

h=[1 -1 2 -2 3 -3];                      % impulse response h[k]x=[1 2 3 4 5 6 -5 -4 -3 -2 -1];          % input data x[k]yconv=conv(h,x)                          % convolve x[k]*h[k]yfilt=filter(h,1,x)                      % filter x[k] with h[k]n=length(h)+length(x)-1;                 % pad length for FFT ffth=fft([h zeros(1,n-length(h))]);      % FFT of impulse response = H[n] fftx=fft([x, zeros(1,n-length(x))]);     % FFT of input = X[n] ffty=ffth.*fftx;                         % product of H[n] and X[n] yfreq=real(ifft(ffty))                   % IFFT of product gives y[k]z=[zeros(1,length(h)-1),x];              % initial state in filter = 0for k=1:length(x)                        % time domain method   ytim(k)=fliplr(h)*z(k:k+length(h)-1)';  % iterates once for each x[k]end                                      % to directly calculate y[k]
waystofilt.m “conv” vs. “filter” vs. “freq domain” vs. “time domain” (download file)

Observe that the first M terms of yconv , yfilt , yfreq , and ytim are the same, but that both yconv and yfreq have N-1 extra values at the end. For both the time domain method and the filter command, the output values are aligned in time with the input values,one output for each input. Effectively, the filter command is a single line implementation of the time domain for loop.

Questions & Answers

how to study physic and understand
Ewa Reply
what is conservative force with examples
Moses
what is work
Fredrick Reply
the transfer of energy by a force that causes an object to be displaced; the product of the component of the force in the direction of the displacement and the magnitude of the displacement
AI-Robot
why is it from light to gravity
Esther Reply
difference between model and theory
Esther
Is the ship moving at a constant velocity?
Kamogelo Reply
The full note of modern physics
aluet Reply
introduction to applications of nuclear physics
aluet Reply
the explanation is not in full details
Moses Reply
I need more explanation or all about kinematics
Moses
yes
zephaniah
I need more explanation or all about nuclear physics
aluet
Show that the equal masses particles emarge from collision at right angle by making explicit used of fact that momentum is a vector quantity
Muhammad Reply
yh
Isaac
A wave is described by the function D(x,t)=(1.6cm) sin[(1.2cm^-1(x+6.8cm/st] what are:a.Amplitude b. wavelength c. wave number d. frequency e. period f. velocity of speed.
Majok Reply
what is frontier of physics
Somto Reply
A body is projected upward at an angle 45° 18minutes with the horizontal with an initial speed of 40km per second. In hoe many seconds will the body reach the ground then how far from the point of projection will it strike. At what angle will the horizontal will strike
Gufraan Reply
Suppose hydrogen and oxygen are diffusing through air. A small amount of each is released simultaneously. How much time passes before the hydrogen is 1.00 s ahead of the oxygen? Such differences in arrival times are used as an analytical tool in gas chromatography.
Ezekiel Reply
please explain
Samuel
what's the definition of physics
Mobolaji Reply
what is physics
Nangun Reply
the science concerned with describing the interactions of energy, matter, space, and time; it is especially interested in what fundamental mechanisms underlie every phenomenon
AI-Robot
what is isotopes
Nangun Reply
nuclei having the same Z and different N s
AI-Robot
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Software receiver design. OpenStax CNX. Aug 13, 2013 Download for free at http://cnx.org/content/col11510/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Software receiver design' conversation and receive update notifications?

Ask