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

# QUESTION FOR Rick Lyons Re: tips and tricks book

Started by ●July 30, 2009

Reply by ●July 30, 20092009-07-30

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

Reply by ●July 30, 20092009-07-30

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-jHi 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

Reply by ●July 31, 20092009-07-31

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-jHi 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

Reply by ●July 31, 20092009-07-31

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-jHi 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 -------------------�-------------- 0 0 0 0 0 1 -1 1 (problem here) 1 0 1 1 1 1 0 0 Dirk Dirk Bell DSP Consultant

Reply by ●July 31, 20092009-07-31

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 > -------------------�-------------- > 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

Reply by ●July 31, 20092009-07-31

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 > > -------------------�-------------- > > 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

Reply by ●July 31, 20092009-07-31

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 > > > -------------------�-------------- > > > 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. > > DirkIn 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

Reply by ●July 31, 20092009-07-31

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 > > > > -------------------�-------------- > > > > 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

Reply by ●July 31, 20092009-07-31

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 > > > > > -------------------�-------------- > > > > > 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 ConsultantDoesn't the comb filter -output- limited to 0,1 give the desired frequency at a constant duty cycle? Dale B. Dalrymple