Robert McGwier wrote: > > Dawei: > > You have understood it. Can you suggest a less expensive way than a > single pole iir filter (integrator) to compute the running average of > the data so we can subtract that mean? You could use a decimating fir with no window (use all samples) and taps (1.0/ntaps,1.0/ntaps,1.0/ntaps,1.0/ntaps, .....) and decimation==ntaps followed by a single pole IIR (running at a much lower rate) What you win by this is the more efficiant SIMD implementation of FIR versus IIR. You could also make a block which just adds up a whole block of samples Then divide the result by the number of samples, followed by a single pole IIR This way you avoid the tap multiplication. (I used this once for DC-removal in a test gnuradio ADC frontend)
Note however that this is mathematically not exactly the same as only a IIR, because you work in blocks and only do the feedback after every block. Greetings, Martin > That was the only thought. We > needed a very low frequency cut off and this is computationally cheap. > > Bob > > > Dawei Shen wrote: > >> Hi Eric and other dudes >> >> I am studying the GMSK2 code now. The code is very clean and obviously >> designed sophisticatedly. I feel excited to read the code. Could you >> please help explain the following code to me? >> >> alpha = 0.0002 # FIXME, maybe 0.0008/spb >> self.freq_offset = gr.single_pole_iir_filter_ff(alpha) >> self.sub = gr.sub_ff() >> >> fg.connect(self.fmdemod, (self.sub, 0)) >> fg.connect(self.fmdemod, self.freq_offset, (self.sub, 1)) >> >> This part is following the FM demodulator. My guess is you are going >> to remove the DC offset, is that right? But why do you use an IIR filter? >> >> I plan to add comments to the codes and put them on my website once I >> finish studying them. >> >> Thanks for your time >> >> Dawei >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Discuss-gnuradio mailing list >> Discuss-gnuradio@gnu.org >> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio >> >> > > _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio