I am generating series of 1 and 0. then pulse shaped them with root raised cosine and after than deciding to do match filtering and recovering the bits however it turns out that I am not getting the correct bits. What I do is as follow:

  1. generate 0 and 1.
  2. pulse shape them with RRC.
  3. match filter using the same transmited filter
  4. Remove samples up to peak using [val,pos]=max(mysignal)
  5. sample using mysingal(pos:overample:end)

But what I get is not correct. I simulated this using 10 bits but I get only 2. I know there is something wrong but I do not know why. My method works when I only have one bit.

I am wondering if I have more than one bit should I do this procedure for every bit.How can I approach this problem.

This is also my code assume RX2 is the pulse shaped version of my signal and os is the oversampling factor and 0.25 is the roll of factor. I am wondering how to detect all the bits like all 10 or 100?


The first one is the signal after passing through matched filter using conv command and no built in command like filter. the original bits are 0 0 1 1 1 Can anyone tell me how can I sample signal to get these bits back. what command I should use. simply downsampling will not work.

The second one is for the same bits but using filter command for 0 0 1 1 1 can anyone please tell me how to obtain correct bits back from any of these figures.

enter image description here

enter image description here

  • $\begingroup$ well, you cut off samples at the start, and it doesn't look like you're appending "zero stuffing" at the end of your input bits, so you're losing signal, right? $\endgroup$ – Marcus Müller Jun 13 '16 at 11:16
  • $\begingroup$ From the looks of it, your filter delay is about 34 samples on the TX RRC and the same on the RX RRC, so you need to add that many zero-input samples to be able to see he last bit you've modulated. $\endgroup$ – Marcus Müller Jun 13 '16 at 11:17
  • 1
    $\begingroup$ Use conv instead of filter. Then read the pulse shaping chapter in the book linked at the bottom of this page: ece.wisc.edu/~sethares/telebreak.html $\endgroup$ – MBaz Jun 13 '16 at 13:25
  • $\begingroup$ @MarcusMüller,I am upsampling the input signal when I want to apply the transmitter filter. I would like to know when you say I should add more zeros, you mean after applying match filter? and why should I do that? $\endgroup$ – user59419 Jun 13 '16 at 17:05
  • $\begingroup$ @MBaz, is there anything wrong about filter command I know filter command kind of truncate my symbol but I used in the input side as well/ $\endgroup$ – user59419 Jun 13 '16 at 17:07

I can visibly see from your figure that you have done the two cascaded RRC's properly. I circled the samples I would expect to see for your 00111 data sequence after RC filtering. Clearly you are using 8 samples per symbol, and a longer data sequence would continue in similar fashion after the initial delay that you have as shown.

enter image description here

To demodulate this, you typically would have a timing recovery loop to establish the ideal sampling locations. There are several approaches to establish timing, but one recently discussed on this forum is the use of the Gardner TED (Timing Error Detector) which would create an error signal that you could use to control a timing sample location (increment up or down a position pointer based on the accumulated error, forming a timing recovery loop. This would be done using a (discardable) training sequence with lots of transitions, typically as part of the header for the data packet that would be significantly longer than your short data set.

Another synchronizer I like is the M&M synchronizer (Mueller & Meuller) as well as excellent approaches I learned from fred harris using polyphase filters for timing synchronization (thank you fred!).

Below are links to recent discussions on the Gardner TED, but in particular I want to copy here the figure for the eye diagram of the transmitted symbols after they have gone through a root raised cosine (RRC) filter ("Before RRC Filter") the received signal after it has been passed through a second RRC filter as you are doing. Conveniently this was done with same alpha= 0.25 roll-off factor you have used, and what it shows is the continuous time representation of every possible trajectory between symbols based on previous symbol patterns. In your case, you have eight samples per symbol, landing on one of these trajectories.

RRC Eye diagram

Links to recent discussions on the Gardner TED:

Location of Matched Filter

Gardner Timing Recovery for Repeated Sybmols

  • $\begingroup$ Thanks But how do you find the initial point for sampling that is the problem I have. How do you know you should start from sample 65 or 69? how can I find this number with different oversampling factor ?what figure or graph determines the initial delay or staring point of sampling is determined ? $\endgroup$ – user59419 Jun 15 '16 at 5:17
  • $\begingroup$ You could start from any sample and the timing recovery loop will converge with enough symbol transition information in your header (training) sequence. Once you establish timing, (and carrier offset and equalization in a real world system) you can establish alignment via framing information in the header. $\endgroup$ – Dan Boschen Jun 15 '16 at 11:20
  • $\begingroup$ However in your plots I do not see as I pointed out any evidence of lost bits (if you could confirm that you are indeed over-sampling by a factor of 8), however I cannot tell if your sequence is reversed. Please show us what you get with this sequence: 10110111000 $\endgroup$ – Dan Boschen Jun 15 '16 at 11:24
  • $\begingroup$ Thank you so much.However I meant in my case how did you know you should start from sample 66 and how did you know my oversampling factor since I did not mention them? $\endgroup$ – user59419 Jun 16 '16 at 2:07
  • $\begingroup$ I am familiar with what the RC shape should look like (see the eye diagrams I plotted- not sure if you know how to read them, but this is the waveform over 2 symbols repeated over itself many times for all combinations of prior symbols.), and I could see from your plot that "1" is the symbol convergence point (like what happens at sample 6 and 16 in my eye diagram) as that is the only point on your graph where there are 3 interceptions with a horizontal line (given your data ends in 1 1 1). From there I could see that there were 8 samples between those positions. Hope that helps. $\endgroup$ – Dan Boschen Jun 16 '16 at 5:08

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.