DSPRelated.com
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&#4294967295;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. &#4294967295;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&#4294967295;pm, robert bristow-johnson <r...@audioimagination.com>
wrote:
> On Jul 30, 1:09&#4294967295;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. &#4294967295;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 &#4294967295; I2 &#4294967295; &#4294967295; OUT > ----------------- > 0 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;10 &#4294967295; &#4294967295; &#4294967295;aka "-1" > 0 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;00 > 1 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;00 > 1 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;01 &#4294967295; &#4294967295; &#4294967295;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&#4294967295;pm, robert bristow-johnson <r...@audioimagination.com>
wrote:
> On Jul 30, 1:09&#4294967295;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. &#4294967295;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 &#4294967295; I2 &#4294967295; &#4294967295; OUT > ----------------- > 0 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;10 &#4294967295; &#4294967295; &#4294967295;aka "-1" > 0 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;00 > 1 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;00 > 1 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;01 &#4294967295; &#4294967295; &#4294967295;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&#4294967295;pm, robert bristow-johnson <r...@audioimagination.com>
wrote:
> On Jul 30, 1:09&#4294967295;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. &#4294967295;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 &#4294967295; I2 &#4294967295; &#4294967295; OUT > ----------------- > 0 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;10 &#4294967295; &#4294967295; &#4294967295;aka "-1" > 0 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;00 > 1 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;00 > 1 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;01 &#4294967295; &#4294967295; &#4294967295;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 -------------------&#4294967295;-------------- 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&#4294967295;am, Dirk Bell <bellda2...@cox.net> wrote:
> On Jul 30, 1:47&#4294967295;pm, robert bristow-johnson <r...@audioimagination.com> > wrote: > > > > > On Jul 30, 1:09&#4294967295;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. &#4294967295;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 &#4294967295; I2 &#4294967295; &#4294967295; OUT > > ----------------- > > 0 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;10 &#4294967295; &#4294967295; &#4294967295;aka "-1" > > 0 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;00 > > 1 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;00 > > 1 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;01 &#4294967295; &#4294967295; &#4294967295;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 &#4294967295; - Bit &#4294967295; Out &#4294967295;XOR > -------------------&#4294967295;-------------- > 0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; 0 > 0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295; -1 &#4294967295; &#4294967295; &#4294967295; 1 (problem here) > 1 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295; 1 > 1 &#4294967295; &#4294967295; &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; 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&#4294967295;am, robert bristow-johnson
<r...@audioimagination.com> wrote:
> On Jul 31, 12:20&#4294967295;am, Dirk Bell <bellda2...@cox.net> wrote: > > > > > > > On Jul 30, 1:47&#4294967295;pm, robert bristow-johnson <r...@audioimagination.com> > > wrote: > > > > On Jul 30, 1:09&#4294967295;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. &#4294967295;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 &#4294967295; I2 &#4294967295; &#4294967295; OUT > > > ----------------- > > > 0 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;10 &#4294967295; &#4294967295; &#4294967295;aka "-1" > > > 0 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;00 > > > 1 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;00 > > > 1 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;01 &#4294967295; &#4294967295; &#4294967295;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 &#4294967295; - Bit &#4294967295; Out &#4294967295;XOR > > -------------------&#4294967295;-------------- > > 0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; 0 > > 0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295; -1 &#4294967295; &#4294967295; &#4294967295; 1 (problem here) > > 1 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295; 1 > > 1 &#4294967295; &#4294967295; &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; 0 > > yeah, i didn't realize i had a + and - bit here. &#4294967295;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. &#4294967295;then you add (and XOR) the > bits when signals are multiplied (as in correlation). &#4294967295;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 > > > -------------------&#4294967295;-------------- > > > 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&#4294967295;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. &#4294967295;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 &#4294967295; I2 &#4294967295; &#4294967295; OUT > > > > > ----------------- > > > > > 0 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;10 &#4294967295; &#4294967295; &#4294967295;aka "-1" > > > > > 0 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;00 > > > > > 1 &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295;00 > > > > > 1 &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295;01 &#4294967295; &#4294967295; &#4294967295;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 &#4294967295; - Bit &#4294967295; Out &#4294967295;XOR > > > > -------------------&#4294967295;-------------- > > > > 0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; 0 > > > > 0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295; -1 &#4294967295; &#4294967295; &#4294967295; 1 (problem here) > > > > 1 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295; 1 > > > > 1 &#4294967295; &#4294967295; &#4294967295; &#4294967295;1 &#4294967295; &#4294967295; &#4294967295; &#4294967295;0 &#4294967295; &#4294967295; &#4294967295; 0 > > > > yeah, i didn't realize i had a + and - bit here. &#4294967295;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. &#4294967295;then you add (and XOR) the > > > bits when signals are multiplied (as in correlation). &#4294967295;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: > > &#4294967295;Filtering tricks for FSK demodulation > Shiung, D. &#4294967295; Huei-Wen Ferng &#4294967295; Lyons, R. > Signal Processing Magazine, IEEE > &#4294967295;May 2005, Volume: 22, &#4294967295;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 > > > > > -------------------&#4294967295;-------------- > > > > > 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