View Single Post
  #11 (permalink)  
Old 03-07-2007, 04:05 AM
Fred Marshall
Guest
 
Posts: n/a
Default Re: Time domain convolution in a real-time situation


"DSP-Newbie" <[email protected]> wrote in message
news:[email protected]..
> [email protected] wrote:
>
>>
>> Explicitly padding the input signal with zeros like this will work.
>> However, note that you're essentially delaying the input signal by
>> length(H) samples, so your output signal (even before you see any
>> transients) will also be delayed by length(H) samples.
>>

>
> I am aware of that, but its is not a problem; the delay is the same for
> all samples.
>
>
>
>>> My problem now was, which part of Y[] should I extract and use?
>>> After much and trial & error and some hair-pulling, I finally found a
>>> intuitive solution that actually works:

>>
>> -snipped-
>>
>> I forgot to ask before: why do you want to discard the transients? The
>> filter "startup" time is valid data, and occurs as your input signal
>> gradually fills up the delay lines that feed each filter tap.

>
> Perhaps I have not explained my problem clearly.
> I have set the soundcard to sample at 11.025 KHz, and to report the
> samples in blocks of 2048 samples, so I have to process about 5
> samples/sec.
>
> Each of these samples - after filtering, envelope detection, PLL bit
> sampler etc... - represents a number of bits, not necessarily a *whole*
> number of bits, which I have to cobble together block by block to
> reconstruct the original synchronous bitstream.
>
> Now, if I apply the algorithm as found in the book for each incoming
> datablock, I will have a startup transient for *each* block.


There's a problem you don't need to carry along. Don't do what the book
did. Do continuous processing - if even the continous process has to wait
between availability of data. Something like this:

Get 2048 data points:
Compute 2048 output points. Initially this will include the M-1 startup
transient points.
Wait for another 2048 block.
Continue where you left off using M-1 values of the last input block still
in the filter and the one next new input point.
There will be no transients in the second and succeeding blocks.

The code won't look all that much different from what you're using.

Take a look at the circular code at:
http://www.dspguru.com/sw/lib/fir_algs_1-0.c

Fred



Reply With Quote