# Synchronization and downsampling after matched filtering - GNURadio polyphase clock sync

I am trying to model a QPSK transmission. For this, I am using the software GnuRadio and more specifically the block polyphase clock sync. This block performs timing synchronization for PAM signals by minimizing the derivative of the filtered signal. I modelised this on Matlab (for BPSK but that is the same problem) and here is a plot of the signal at the reception after matched filtering : The FIR used here is a Root Raised Cosine. The thing is that the polyphase clock sync will find the minimum derivative of this signal to know where to downsample but this is for me not the right location. Indeed, if we look on the matlab plot of the signal above, the minimum derivative is located between the two first 1 bits samples and not at the locations of these two samples...

For example, here below we try to send the bits 101001. Between the two first 1 bits, there is a maximum that the block will find as the location to sample... With GnuRadio, I use the simple blocks : which give me the plot : We see that this does not sample at the right place and does not return the right bits. Is there a problem in my comprehension of this block or of the way polyphase filters work?

Here are the parameters used on GNU Radio which are not visible on the picture above :

RRC : firdes.root_raised_cosine(gain,L,1,alpha,ntaps)

L = oversampling factor

Constellation : 00 = -1-1j, 01 = -1+1j, 10 = 1-1j, 11 = 1+1j

If I change the value of "Output SPS" (Output Samples per Symbol, to downsample) in the polyphase clock sync and replace it by the oversampling factor L, there is no decimation done and I obviously obtain the good signal which is actually a convolution between my delta of dirac + or -1 and a raised cosine : This is actually this signal which has to be sampled at the right places to find the good original bits. Nevertheless I have the impression that the real part has become the imaginary part and vice versa : real part should be the bits 110 and imaginary part 001. This is the opposite here and I do not see why.

EDIT following the question of @Marcus Müller : Here is the plot of the signal after the block constellation modulator (which upsamples and applies the RRC FIR filter for the pulse shaping) : EDIT 2 : Here is the signal obtained by replacing the polyphase clock sync block by a FIR RRC block which shows it works perfectly. The problem is that it does not synchronize the signal : • have you only tried this with six modulated bits? Could you try with a few more? This is a filter system, and you're literally asking for a 32 tap filter size in the synchronizer block, so the system simply needs a bit of data to synchronize to. – Marcus Müller Jun 19 at 6:24
• (especially, the low-derivative sections in your Matlab plot would never happen during a longer transmission – they are an artifact of what you decided to plot!) – Marcus Müller Jun 19 at 6:26
• ah, wait, can you also add a plot of the output ofthe constellation modulator? – Marcus Müller Jun 19 at 6:39
• Actually the sequence of bits 101001 is repeated as you can see in the block "Vector Source" with the option repeat. The 32 taps are maybe not enough : I would change it by the value ntaps = 2*L*3 so that the filter samples are from -3T to 3T, T being the symbol period. – Dylan Jun 19 at 11:39
• I add the plot of the signal after the constellation modulator in my post above as an edit – Dylan Jun 19 at 11:40