Forums

QUESTION FOR Rick Lyons Re: tips and tricks book

Started by Dirk Bell July 30, 2009
Hi Rick,

I was reading a chapter in the DSP tips and tricks book on using comb
filtering after two-level saturated sampling for FSK demod
preprocessing. The text said a comb filter equivalent could be made
with a direct path and a delayed path input into an XOR gate because
the inputs were binary.  However, for the binary inputs, the outputs
of an XOR are normally 2 level, while the outputs of the comb filter
are 3 level. That makes it look like the equivalent XOR circuit
described isn't possible.

What am I missing?

Dirk

Dirk Bell
DSP Consultant
On Jul 30, 1:09&#2013266080;pm, Dirk Bell <bellda2...@cox.net> wrote:
> > I was reading a chapter in the DSP tips and tricks book on using comb > filtering after two-level saturated sampling for FSK demod > preprocessing. The text said a comb filter equivalent could be made > with a direct path and a delayed path input into an XOR gate because > the inputs were binary. &#2013266080;However, for the binary inputs, the outputs > of an XOR are normally 2 level, while the outputs of the comb filter > are 3 level.
yeah, i would think the output would be a 2-bit number from the following truth table: I1 I2 OUT ----------------- 0 0 10 aka "-1" 0 1 00 1 0 00 1 1 01 aka "+1" so, i think i understand what you're questioning here, Dirk. r b-j
On Jul 30, 1:47&#2013266080;pm, robert bristow-johnson <r...@audioimagination.com>
wrote:
> On Jul 30, 1:09&#2013266080;pm, Dirk Bell <bellda2...@cox.net> wrote: > > > > > I was reading a chapter in the DSP tips and tricks book on using comb > > filtering after two-level saturated sampling for FSK demod > > preprocessing. The text said a comb filter equivalent could be made > > with a direct path and a delayed path input into an XOR gate because > > the inputs were binary. &#2013266080;However, for the binary inputs, the outputs > > of an XOR are normally 2 level, while the outputs of the comb filter > > are 3 level. > > yeah, i would think the output would be a 2-bit number from the > following truth table: > > I1 &#2013266080; I2 &#2013266080; &#2013266080; OUT > ----------------- > 0 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;10 &#2013266080; &#2013266080; &#2013266080;aka "-1" > 0 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;00 > 1 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;00 > 1 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;01 &#2013266080; &#2013266080; &#2013266080;aka "+1" > > so, i think i understand what you're questioning here, Dirk. > > r b-j
Hi r b-j, With the DSP algorithm provided, the comb filter is specified as follows, and compared to the output with the XOR replacing the adder: Bit Added Delayed Bit Subtracted Numerical Output XOR -------------- --------------------------------- ------------------------- ------- 0 0 0 0 0 1 -1 1 (problem here) 1 0 1 1 1 1 0 0 Dirk Dirk Bell DSP Consultant
On Jul 30, 1:47&#2013266080;pm, robert bristow-johnson <r...@audioimagination.com>
wrote:
> On Jul 30, 1:09&#2013266080;pm, Dirk Bell <bellda2...@cox.net> wrote: > > > > > I was reading a chapter in the DSP tips and tricks book on using comb > > filtering after two-level saturated sampling for FSK demod > > preprocessing. The text said a comb filter equivalent could be made > > with a direct path and a delayed path input into an XOR gate because > > the inputs were binary. &#2013266080;However, for the binary inputs, the outputs > > of an XOR are normally 2 level, while the outputs of the comb filter > > are 3 level. > > yeah, i would think the output would be a 2-bit number from the > following truth table: > > I1 &#2013266080; I2 &#2013266080; &#2013266080; OUT > ----------------- > 0 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;10 &#2013266080; &#2013266080; &#2013266080;aka "-1" > 0 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;00 > 1 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;00 > 1 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;01 &#2013266080; &#2013266080; &#2013266080;aka "+1" > > so, i think i understand what you're questioning here, Dirk. > > r b-j
Hi r b-j, With the DSP algorithm provided, the comb filter is specified as follows, and compared to the output with the XOR replacing the adder: Bit Added Delayed Bit Subtracted Numerical Output XOR ----------------------------------------------------------------------------------------- 0 0 0 0 0 1 -1 1 (problem here) 1 0 1 1 1 1 0 0 Dirk Dirk Bell DSP Consultant
On Jul 30, 1:47&#2013266080;pm, robert bristow-johnson <r...@audioimagination.com>
wrote:
> On Jul 30, 1:09&#2013266080;pm, Dirk Bell <bellda2...@cox.net> wrote: > > > > > I was reading a chapter in the DSP tips and tricks book on using comb > > filtering after two-level saturated sampling for FSK demod > > preprocessing. The text said a comb filter equivalent could be made > > with a direct path and a delayed path input into an XOR gate because > > the inputs were binary. &#2013266080;However, for the binary inputs, the outputs > > of an XOR are normally 2 level, while the outputs of the comb filter > > are 3 level. > > yeah, i would think the output would be a 2-bit number from the > following truth table: > > I1 &#2013266080; I2 &#2013266080; &#2013266080; OUT > ----------------- > 0 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;10 &#2013266080; &#2013266080; &#2013266080;aka "-1" > 0 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;00 > 1 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;00 > 1 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;01 &#2013266080; &#2013266080; &#2013266080;aka "+1" > > so, i think i understand what you're questioning here, Dirk. > > r b-j
Hi r b-j, With the DSP algorithm provided, the comb filter is specified as follows, and compared to the output with the XOR replacing the adder: (second column is delayed bits) + Bit - Bit Out XOR -------------------&#2013266093;-------------- 0 0 0 0 0 1 -1 1 (problem here) 1 0 1 1 1 1 0 0 Dirk Dirk Bell DSP Consultant
On Jul 31, 12:20&#2013266080;am, Dirk Bell <bellda2...@cox.net> wrote:
> On Jul 30, 1:47&#2013266080;pm, robert bristow-johnson <r...@audioimagination.com> > wrote: > > > > > On Jul 30, 1:09&#2013266080;pm, Dirk Bell <bellda2...@cox.net> wrote: > > > > I was reading a chapter in the DSP tips and tricks book on using comb > > > filtering after two-level saturated sampling for FSK demod > > > preprocessing. The text said a comb filter equivalent could be made > > > with a direct path and a delayed path input into an XOR gate because > > > the inputs were binary. &#2013266080;However, for the binary inputs, the outputs > > > of an XOR are normally 2 level, while the outputs of the comb filter > > > are 3 level. > > > yeah, i would think the output would be a 2-bit number from the > > following truth table: > > > I1 &#2013266080; I2 &#2013266080; &#2013266080; OUT > > ----------------- > > 0 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;10 &#2013266080; &#2013266080; &#2013266080;aka "-1" > > 0 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;00 > > 1 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;00 > > 1 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;01 &#2013266080; &#2013266080; &#2013266080;aka "+1" > > > so, i think i understand what you're questioning here, Dirk. > > > r b-j > > Hi r b-j, > > With the DSP algorithm provided, the comb filter is specified as > follows, and compared to the output with the XOR replacing the adder: > > (second column is delayed bits) > + Bit &#2013266080; - Bit &#2013266080; Out &#2013266080;XOR > -------------------&#2013266093;-------------- > 0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; 0 > 0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080; -1 &#2013266080; &#2013266080; &#2013266080; 1 (problem here) > 1 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080; 1 > 1 &#2013266080; &#2013266080; &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; 0 >
yeah, i didn't realize i had a + and - bit here. i treated them as having identical polarity, but the analog stream was (-1)^a[n] where a [n] is a member of {-1, 1} like MLS is. then you add (and XOR) the bits when signals are multiplied (as in correlation). either way we look at it, 3 levels (and a single bit) ain't enough. r b-j
On Jul 31, 12:42&#2013266080;am, robert bristow-johnson
<r...@audioimagination.com> wrote:
> On Jul 31, 12:20&#2013266080;am, Dirk Bell <bellda2...@cox.net> wrote: > > > > > > > On Jul 30, 1:47&#2013266080;pm, robert bristow-johnson <r...@audioimagination.com> > > wrote: > > > > On Jul 30, 1:09&#2013266080;pm, Dirk Bell <bellda2...@cox.net> wrote: > > > > > I was reading a chapter in the DSP tips and tricks book on using comb > > > > filtering after two-level saturated sampling for FSK demod > > > > preprocessing. The text said a comb filter equivalent could be made > > > > with a direct path and a delayed path input into an XOR gate because > > > > the inputs were binary. &#2013266080;However, for the binary inputs, the outputs > > > > of an XOR are normally 2 level, while the outputs of the comb filter > > > > are 3 level. > > > > yeah, i would think the output would be a 2-bit number from the > > > following truth table: > > > > I1 &#2013266080; I2 &#2013266080; &#2013266080; OUT > > > ----------------- > > > 0 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;10 &#2013266080; &#2013266080; &#2013266080;aka "-1" > > > 0 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;00 > > > 1 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;00 > > > 1 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;01 &#2013266080; &#2013266080; &#2013266080;aka "+1" > > > > so, i think i understand what you're questioning here, Dirk. > > > > r b-j > > > Hi r b-j, > > > With the DSP algorithm provided, the comb filter is specified as > > follows, and compared to the output with the XOR replacing the adder: > > > (second column is delayed bits) > > + Bit &#2013266080; - Bit &#2013266080; Out &#2013266080;XOR > > -------------------&#2013266093;-------------- > > 0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; 0 > > 0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080; -1 &#2013266080; &#2013266080; &#2013266080; 1 (problem here) > > 1 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080; 1 > > 1 &#2013266080; &#2013266080; &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; 0 > > yeah, i didn't realize i had a + and - bit here. &#2013266080;i treated them as > having identical polarity, but the analog stream was (-1)^a[n] where a > [n] is a member of {-1, 1} like MLS is. &#2013266080;then you add (and XOR) the > bits when signals are multiplied (as in correlation). &#2013266080;either way we > look at it, 3 levels (and a single bit) ain't enough. > > r b-j- Hide quoted text - > > - Show quoted text -
r b-j, The "Plus bit" gets added, and the "minus bit" gets subtracted in the normal linear filter implementation with the bit values being in {0,1}. Later in the chapter (appendix?) they talk about the binary signals being represented by +-1 into the XOR. Still need 3 levels out though to reproduce the same results as the normal linear filter implementation. Dirk
On Jul 30, 10:57 pm, Dirk Bell <bellda2...@cox.net> wrote:
> On Jul 31, 12:42 am, robert bristow-johnson > > > > <r...@audioimagination.com> wrote: > > On Jul 31, 12:20 am, Dirk Bell <bellda2...@cox.net> wrote: > > > > On Jul 30, 1:47 pm, robert bristow-johnson <r...@audioimagination.com> > > > wrote: > > > > > On Jul 30, 1:09 pm, Dirk Bell <bellda2...@cox.net> wrote: > > > > > > I was reading a chapter in the DSP tips and tricks book on using comb > > > > > filtering after two-level saturated sampling for FSK demod > > > > > preprocessing. The text said a comb filter equivalent could be made > > > > > with a direct path and a delayed path input into an XOR gate because > > > > > the inputs were binary. However, for the binary inputs, the outputs > > > > > of an XOR are normally 2 level, while the outputs of the comb filter > > > > > are 3 level. > > > > > yeah, i would think the output would be a 2-bit number from the > > > > following truth table: > > > > > I1 I2 OUT > > > > ----------------- > > > > 0 0 10 aka "-1" > > > > 0 1 00 > > > > 1 0 00 > > > > 1 1 01 aka "+1" > > > > > so, i think i understand what you're questioning here, Dirk. > > > > > r b-j > > > > Hi r b-j, > > > > With the DSP algorithm provided, the comb filter is specified as > > > follows, and compared to the output with the XOR replacing the adder: > > > > (second column is delayed bits) > > > + Bit - Bit Out XOR > > > -------------------&#2013266093;-------------- > > > 0 0 0 0 > > > 0 1 -1 1 (problem here) > > > 1 0 1 1 > > > 1 1 0 0 > > > yeah, i didn't realize i had a + and - bit here. i treated them as > > having identical polarity, but the analog stream was (-1)^a[n] where a > > [n] is a member of {-1, 1} like MLS is. then you add (and XOR) the > > bits when signals are multiplied (as in correlation). either way we > > look at it, 3 levels (and a single bit) ain't enough. > > > r b-j- Hide quoted text - > > > - Show quoted text - > > r b-j, > > The "Plus bit" gets added, and the "minus bit" gets subtracted in the > normal linear filter implementation with the bit values being in > {0,1}. > > Later in the chapter (appendix?) they talk about the binary signals > being represented by +-1 into the XOR. Still need 3 levels out though > to reproduce the same results as the normal linear filter > implementation. > > Dirk
In the publication of the tip in: Filtering tricks for FSK demodulation Shiung, D. Huei-Wen Ferng Lyons, R. Signal Processing Magazine, IEEE May 2005, Volume: 22, Issue: 3, page(s): 80- 82 the figures show the comb filter output truncated to zero at those times when the output is negative. So try including this limiter for the comb filter. Dale B. Dalrymple
On Jul 31, 3:42&#2013266080;am, dbd <d...@ieee.org> wrote:
> On Jul 30, 10:57 pm, Dirk Bell <bellda2...@cox.net> wrote: > > > > > > > On Jul 31, 12:42 am, robert bristow-johnson > > > <r...@audioimagination.com> wrote: > > > On Jul 31, 12:20 am, Dirk Bell <bellda2...@cox.net> wrote: > > > > > On Jul 30, 1:47 pm, robert bristow-johnson <r...@audioimagination.com> > > > > wrote: > > > > > > On Jul 30, 1:09 pm, Dirk Bell <bellda2...@cox.net> wrote: > > > > > > > I was reading a chapter in the DSP tips and tricks book on using comb > > > > > > filtering after two-level saturated sampling for FSK demod > > > > > > preprocessing. The text said a comb filter equivalent could be made > > > > > > with a direct path and a delayed path input into an XOR gate because > > > > > > the inputs were binary. &#2013266080;However, for the binary inputs, the outputs > > > > > > of an XOR are normally 2 level, while the outputs of the comb filter > > > > > > are 3 level. > > > > > > yeah, i would think the output would be a 2-bit number from the > > > > > following truth table: > > > > > > I1 &#2013266080; I2 &#2013266080; &#2013266080; OUT > > > > > ----------------- > > > > > 0 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;10 &#2013266080; &#2013266080; &#2013266080;aka "-1" > > > > > 0 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;00 > > > > > 1 &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080;00 > > > > > 1 &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080;01 &#2013266080; &#2013266080; &#2013266080;aka "+1" > > > > > > so, i think i understand what you're questioning here, Dirk. > > > > > > r b-j > > > > > Hi r b-j, > > > > > With the DSP algorithm provided, the comb filter is specified as > > > > follows, and compared to the output with the XOR replacing the adder: > > > > > (second column is delayed bits) > > > > + Bit &#2013266080; - Bit &#2013266080; Out &#2013266080;XOR > > > > -------------------&#2013266093;-------------- > > > > 0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; 0 > > > > 0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080; -1 &#2013266080; &#2013266080; &#2013266080; 1 (problem here) > > > > 1 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080; 1 > > > > 1 &#2013266080; &#2013266080; &#2013266080; &#2013266080;1 &#2013266080; &#2013266080; &#2013266080; &#2013266080;0 &#2013266080; &#2013266080; &#2013266080; 0 > > > > yeah, i didn't realize i had a + and - bit here. &#2013266080;i treated them as > > > having identical polarity, but the analog stream was (-1)^a[n] where a > > > [n] is a member of {-1, 1} like MLS is. &#2013266080;then you add (and XOR) the > > > bits when signals are multiplied (as in correlation). &#2013266080;either way we > > > look at it, 3 levels (and a single bit) ain't enough. > > > > r b-j- Hide quoted text - > > > > - Show quoted text - > > > r b-j, > > > The "Plus bit" gets added, and the "minus bit" gets subtracted in the > > normal linear filter implementation with the bit values being in > > {0,1}. > > > Later in the chapter (appendix?) they talk about the binary signals > > being represented by +-1 into the XOR. Still need 3 levels out though > > to reproduce the same results as the normal linear filter > > implementation. > > > Dirk > > In the publication of the tip in: > > &#2013266080;Filtering tricks for FSK demodulation > Shiung, D. &#2013266080; Huei-Wen Ferng &#2013266080; Lyons, R. > Signal Processing Magazine, IEEE > &#2013266080;May 2005, Volume: 22, &#2013266080;Issue: 3, page(s): 80- 82 > > the figures show the comb filter output truncated to zero at those > times when the output is negative. So try including this limiter for > the comb filter. > > Dale B. Dalrymple- Hide quoted text - > > - Show quoted text -
Hi Dale, The limiter in the article is applied in the the same manner as the in the chapter, applied prior to the comb filtering, They get 3 level outputs in the article too. Dirk Dirk Bell DSP Consultant
On Jul 31, 5:27 am, Dirk Bell <bellda2...@cox.net> wrote:
> On Jul 31, 3:42 am, dbd <d...@ieee.org> wrote: > > > > > On Jul 30, 10:57 pm, Dirk Bell <bellda2...@cox.net> wrote: > > > > On Jul 31, 12:42 am, robert bristow-johnson > > > > <r...@audioimagination.com> wrote: > > > > On Jul 31, 12:20 am, Dirk Bell <bellda2...@cox.net> wrote: > > > > > > On Jul 30, 1:47 pm, robert bristow-johnson <r...@audioimagination.com> > > > > > wrote: > > > > > > > On Jul 30, 1:09 pm, Dirk Bell <bellda2...@cox.net> wrote: > > > > > > > > I was reading a chapter in the DSP tips and tricks book on using comb > > > > > > > filtering after two-level saturated sampling for FSK demod > > > > > > > preprocessing. The text said a comb filter equivalent could be made > > > > > > > with a direct path and a delayed path input into an XOR gate because > > > > > > > the inputs were binary. However, for the binary inputs, the outputs > > > > > > > of an XOR are normally 2 level, while the outputs of the comb filter > > > > > > > are 3 level. > > > > > > > yeah, i would think the output would be a 2-bit number from the > > > > > > following truth table: > > > > > > > I1 I2 OUT > > > > > > ----------------- > > > > > > 0 0 10 aka "-1" > > > > > > 0 1 00 > > > > > > 1 0 00 > > > > > > 1 1 01 aka "+1" > > > > > > > so, i think i understand what you're questioning here, Dirk. > > > > > > > r b-j > > > > > > Hi r b-j, > > > > > > With the DSP algorithm provided, the comb filter is specified as > > > > > follows, and compared to the output with the XOR replacing the adder: > > > > > > (second column is delayed bits) > > > > > + Bit - Bit Out XOR > > > > > -------------------&#2013266093;-------------- > > > > > 0 0 0 0 > > > > > 0 1 -1 1 (problem here) > > > > > 1 0 1 1 > > > > > 1 1 0 0 > > > > > yeah, i didn't realize i had a + and - bit here. i treated them as > > > > having identical polarity, but the analog stream was (-1)^a[n] where a > > > > [n] is a member of {-1, 1} like MLS is. then you add (and XOR) the > > > > bits when signals are multiplied (as in correlation). either way we > > > > look at it, 3 levels (and a single bit) ain't enough. > > > > > r b-j- Hide quoted text - > > > > > - Show quoted text - > > > > r b-j, > > > > The "Plus bit" gets added, and the "minus bit" gets subtracted in the > > > normal linear filter implementation with the bit values being in > > > {0,1}. > > > > Later in the chapter (appendix?) they talk about the binary signals > > > being represented by +-1 into the XOR. Still need 3 levels out though > > > to reproduce the same results as the normal linear filter > > > implementation. > > > > Dirk > > > In the publication of the tip in: > > > Filtering tricks for FSK demodulation > > Shiung, D. Huei-Wen Ferng Lyons, R. > > Signal Processing Magazine, IEEE > > May 2005, Volume: 22, Issue: 3, page(s): 80- 82 > > > the figures show the comb filter output truncated to zero at those > > times when the output is negative. So try including this limiter for > > the comb filter. > > > Dale B. Dalrymple- Hide quoted text - > > > - Show quoted text - > > Hi Dale, > > The limiter in the article is applied in the the same manner as the in > the chapter, applied prior to the comb filtering, They get 3 level > outputs in the article too. > > Dirk > > Dirk Bell > DSP Consultant
Doesn't the comb filter -output- limited to 0,1 give the desired frequency at a constant duty cycle? Dale B. Dalrymple