SignalProcessing - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Signal Processing : Filtering : SignalProcessing/FiniteImpulseResponseFilter

SignalProcessing

 FiniteImpulseResponseFilter
 filter a signal with a finite impulse response filter

 Calling Sequence FiniteImpulseResponseFilter( A, taps, delayline, numiters ) FIRFilter( A, taps, delayline, numiters )

Parameters

 A - Array of real numeric values; the signal to filter taps - Array of real numeric values; the tap coefficients delayline - (optional) Array of real numeric values; initial values for the delay line numiters - (optional) posint, number of iterations

Options

 • container : Array, predefined Array for holding the result

Description

 • The FiniteImpulseResponseFilter( A, taps, delayline, numiters ) command filters the signal (sample) in the array A using the tap coefficients in the array taps.  The taps array may be generated by using the GenerateFiniteImpulseResponseFilterTaps command, or you may provide your own custom filtering coefficients.
 • The delayline and numiters arguments are optional.  If delayline is provided, it must be an Array of real numeric values and the same length as taps, and numiters must be a positive integer.  By default, the delayline Array is all zero, and numiters defaults to the number of sample points.
 • Before the code performing the computation runs, the input Arrays A, taps, and (if present) delayline are converted to datatype float[8] if they do not have that datatype already. For this reason, it is most efficient if the input Arrays have this datatype beforehand.
 • If the container=C option is provided, then the results are put into C and C is returned. With this option, no additional memory is allocated to store the result. The container must be an Array of the same length as A having datatype float[8].
 • The FIRFilter command is provided as an alias.

 • The SignalProcessing[FiniteImpulseResponseFilter] command is thread-safe as of Maple 17.

Examples

 > $\mathrm{with}\left(\mathrm{SignalProcessing}\right):$
 > $\mathrm{with}\left(\mathrm{plots}\right):$
 > $A≔\mathrm{GenerateTone}\left(100,0.6,\frac{1}{\mathrm{\pi }},\mathrm{\pi }\right):$
 > $\mathrm{PA}≔\mathrm{SignalPlot}\left(A,'\mathrm{title}'="Original Signal"\right):$
 > $\mathrm{taps}≔\mathrm{GenerateFiniteImpulseResponseFilterTaps}\left(6,0.2,\mathrm{filtertype}="lowpass"\right):$
 > $B≔\mathrm{FiniteImpulseResponseFilter}\left(A,\mathrm{taps}\right):$
 > $\mathrm{PB}≔\mathrm{SignalPlot}\left(B,\mathrm{title}="Filtered Signal"\right):$
 > $\mathrm{display}\left(⟨⟨⟨\mathrm{PA}⟩,⟨\mathrm{PB}⟩⟩⟩\right)$

 > $A≔\mathrm{GenerateJaehne}\left(512,4095\right):$
 > $\mathrm{PA}≔\mathrm{SignalPlot}\left(A,\mathrm{title}="Signal"\right):$
 > $\mathrm{taps}≔\mathrm{GenerateFiniteImpulseResponseFilterTaps}\left(27,0.2,\mathrm{window}="Bartlett",\mathrm{normalize}=\mathrm{true}\right):$
 > $B≔\mathrm{FiniteImpulseResponseFilter}\left(A,\mathrm{taps}\right):$
 > $\mathrm{PB}≔\mathrm{SignalPlot}\left(B,\mathrm{title}="Filtered Signal"\right):$
 > $\mathrm{display}\left(⟨⟨⟨\mathrm{PA}⟩,⟨\mathrm{PB}⟩⟩⟩\right)$

 > 

Compatibility

 • The SignalProcessing[FiniteImpulseResponseFilter] command was introduced in Maple 17.