# Polyphase Clock Synchronization with Matched Filter

**URL:** <https://www.ruby-forum.com/t/polyphase-clock-synchronization-with-matched-filter/241730>\
**Category:** GNU Radio\
**Created:** [April 27, 2015, 3:28pm UTC](https://www.ruby-forum.com/t/polyphase-clock-synchronization-with-matched-filter/241730 "2015-04-27T15:28:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [April 27, 2015, 3:28pm UTC](https://www.ruby-forum.com/t/polyphase-clock-synchronization-with-matched-filter/241730/1 "2015-04-27T15:28:03Z")

</div>

* * *

Discuss-gnuradio mailing list  
removed\_email\_address@domain.invalid  
[https://lists.gnu.org/mailman/listinfo/discuss-gnuradio](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

---

<div class="post-metadata">

**Author:** ![Su\_Li](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@Su\_Li](https://www.ruby-forum.com/u/Su_Li)\
**Post date:** [April 27, 2015, 3:35pm UTC](https://www.ruby-forum.com/t/polyphase-clock-synchronization-with-matched-filter/241730/2 "2015-04-27T15:35:39Z")

</div>

Hi,

I am trying to use Polyphase Clock Synchronization (PCS) block to  
conduct

> timing synchronization for QPSK signal with half-sine pulse shaping. In the  
> doxygen document of PCS, it says that the “taps” parameter could be the  
> matched filter. Thus, I put the matched filter of half-sine pulse here,  
> [0,sin(pi/4),1,sin(3\*pi/4)]. However, the output is all 0.
> 
> Is there anyone knows how to generate the “taps” parameter here? Any  
> suggestion would be appreciated. Thanks in advance.

I’m not an expert in all the details, but what I know is that the taps  
there need to be generated at “Filter Size” \* “Sample Rate”.

So I’d try something like [math.sin(math.pi_i/(32_4)) for i in  
range(32\*4)]

Cheers,

Sylvain

---

<div class="post-metadata">

**Author:** ![Su\_Li](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@Su\_Li](https://www.ruby-forum.com/u/Su_Li)\
**Post date:** [April 27, 2015, 4:00pm UTC](https://www.ruby-forum.com/t/polyphase-clock-synchronization-with-matched-filter/241730/3 "2015-04-27T16:00:11Z")

</div>

On Mon, Apr 27, 2015 at 9:34 AM, Sylvain M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > 
> 
> I’m not an expert in all the details, but what I know is that the taps  
> there need to be generated at “Filter Size” \* “Sample Rate”.
> 
> So I’d try something like [math.sin(math.pi_i/(32_4)) for i in range(32\*4)]
> 
> Cheers,
> 
> Sylvain

What Sylvain said should work, I believe. But you should study the  
manual  
page on this block:

> **[GNU Radio Manual and C++ API Reference: gr::digital::pfb\_clock\_sync\_ccf Class...](https://www.gnuradio.org/doc/doxygen/classgr_1_1digital_1_1pfb __clock__ sync__ccf.html)**

Hopefully understanding the way it works will help you understand why  
the  
taps need to be this way.

Tom

---

<div class="post-metadata">

**Author:** ![Su\_Li](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@Su\_Li](https://www.ruby-forum.com/u/Su_Li)\
**Post date:** [April 27, 2015, 4:13pm UTC](https://www.ruby-forum.com/t/polyphase-clock-synchronization-with-matched-filter/241730/4 "2015-04-27T16:13:38Z")

</div>

Hi Sylvain and Tom,

Thanks a lot. It works.

So the “Taps” should contain all the matched filter coefficients for  
Filter\_Size (32) filters instead of just one filter. Then each filter  
takes  
SPS (4) out of them to generate a phase-shifted shaping filter. Hence,  
we  
have a filterbank with different phases. The optimal sample timing could  
be  
estimated as described in Tutorial 7.

Best regards,

Su Li

2015-04-27 15:58 GMT+02:00 Tom R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
