# Filters in GNU Radio

**URL:** <https://www.ruby-forum.com/t/filters-in-gnu-radio/243096>\
**Category:** GNU Radio\
**Created:** [August 21, 2015, 1:17am UTC](https://www.ruby-forum.com/t/filters-in-gnu-radio/243096 "2015-08-21T01:17:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [August 21, 2015, 1:17am UTC](https://www.ruby-forum.com/t/filters-in-gnu-radio/243096/1 "2015-08-21T01:17:42Z")

</div>

Am I correct in concluding when I use fir\_filter\_fff to filter, that  
because it uses its own memory space, I don’t need to use set\_history  
and  
worry about boundary crossing between calls to work? Will the output of  
the  
filter behave as expected across work call boundaries if I keep passing  
samples to the filter?

As an example, suppose the following:

1. complete input data set to be filtered, 10 samples long: [1 2 3 4 5 6  
7  
8 9 10]
2. noutput\_items = 2 always
3. filter is 3 taps long with values: [1/3 1/3 1/3]

for(int nn = 0; nn \< noutput\_items; nn++)  
{  
out[nn] = d\_shape\_filter-\>filter(&in[nn]);  
}

Will this snippet produce what you would think should be produced, a  
running average over the latest three input values?

Rich

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [August 21, 2015, 3:11am UTC](https://www.ruby-forum.com/t/filters-in-gnu-radio/243096/2 "2015-08-21T03:11:03Z")

</div>

After looking through the manual, I see there is a buffer version of fir  
filter. Documentation is pretty light on these, but I’m guessing my  
previous email is not correct. The delay line values in the non-buffered  
filter are not stored in the memory space created when we called new  
kernel::fft\_filter\_fff in the constructor. I would have to use  
set\_history  
(I think?) to maintain coherence between work calls.

On Wed, Aug 19, 2015 at 2:20 PM, Richard B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [August 21, 2015, 2:13pm UTC](https://www.ruby-forum.com/t/filters-in-gnu-radio/243096/3 "2015-08-21T14:13:00Z")

</div>

Yes you will need history set yourself.

Just look at how the actual existing FIR block does it …

Cheers,

Sylvain
