DSPRelated.com
Forums

How to sample received pulse after root raised cosine

Started by chess 8 years ago13 replieslatest reply 8 years ago455 views

Hi everyone

I am generating series of 1 and 0. then pulse shaped them with root raised cosine (#RRC) 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 mysignal(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.

The first figure is the signal itself so it is 0 0  1 1 1 


signal_61922.jpg

The second one is impulse response of filer with delay 33

impulse_response_filter_71719.jpg

The third one is signal after passing through matched filter using conv command.

raside-cosine_convolution_6863.jpg

The fourth one signal after passing through matched filter using filter command

raisedcosine_filter_88486.jpg



Can anyone please please tell me how to get the 0 0 1 1 1 back by sampling the either of the last two figures. What command and what procedure I should use.

[ - ]
Reply by Tim WescottJune 14, 2016
  • You aren't telling us the data pattern, unless you really mean that it's a single 0 and a single 1.
  • Normally you'd be using NRZ data before filtering -- i.e., a zero bit value maps to a transmitted -1 before filtering, while a one bit value maps to a transmitted +1.
  • Finding the maximum of your entire data set is simply not the way to synchronize. Since you're doing this in an environment where you know the bit timing and the filter delay, why are you not sampling at the known bit times?  Later on you can figure out how to do bit timing recovery.


[ - ]
Reply by chessJune 14, 2016

Thanks. That is my question how can I sample correctly? 

I know finding maximum entire data is not correct for matched filter I know I should sample at the peak value so how can I do this correctly ? should I find the peak value in each period of interval oversampling and then sample it or is there any other technique?



[ - ]
Reply by Tim WescottJune 14, 2016

There's several things going on here.

First, you shouldn't be finding peaks and sampling there -- you should be sampling where the peak should be.  More correctly, you should be sampling at an instant that's equal to all the delays in the system -- filter and transmission -- after the center of the pulse in the transmitter.  That sounds very round-about, because that's not what receivers do -- they do bit timing recovery.

Second, I think you are doing your filtering wrong somehow, but I don't know how that is.  Why don't you generate a waveform for us that's from a single 1 in a bunch of zeros (i.e., start with 0,0,0,1,0,0,0).  Show us transmitted and received waveforms.  I can't guarantee that the light will dawn, but it should help.  Tell us what value you're using for beta.

Third, what Kaz said -- you _are_ giving us more than one sample per pulse, yes?  Otherwise the filtering is pretty meaningless.  For the purposes of where you're at now, enough samples/pulse to approximate continuous-time (i.e., at least ten, 100 is better) would be nice.

Fourth, you _are_ either filtering an impulse in the transmitter, or directly generating pulses?  What you want coming out of the transmitter is a string of RRC impulses, appropriately summed.

[ - ]
Reply by chessJune 14, 2016

Post deleted by author

[ - ]
Reply by kazJune 14, 2016

when you apply shaping filter you need to upsample by 2(minimum). when you receive upsampled shaped stream you apply matched filter then downsample and choose correct phase of output.


Kaz

[ - ]
Reply by chessJune 14, 2016

yes I upsampled first and oversampling factor is 8.and step 5 is doing downsampling but still I am not receiving correct bits.After downsampling not enough bits is remained meaning that I start with 10 bits and I ended up with 2. what is the problem

[ - ]
Reply by chessJune 14, 2016

Post deleted by author

[ - ]
Reply by Tim WescottJune 14, 2016

AH!  AH HA!

Your filter has a delay of 32 samples.  You're only treating a vector that's 40 samples long.  Try padding the vector with 64 zeros (32 + 32) and run it again -- the pulses should become more clear.

[ - ]
Reply by chessJune 14, 2016

This is the zero padded version of pulses after passing through transmitted filter and matched-filter. I added 66 zeros to end of the vector. But now how can I sample it. for example find the maximum value and downsample it from that position on. 

raisecosine_zerospadded.docx

[ - ]
Reply by Tim WescottJune 14, 2016

I'm pretty sure that when you say "how can I sample this" you don't just mean how can you sample _this data_, but rather "what is the proper way to do this in real life".

The first question is answered by -- just sample 64 samples after the nominal bit time, and there you are.

The second question is answered in two parts: first, do bit timing recovery, and second, sample at the correct instants as found by your bit timing recovery algorithm.  I am _not_ going to try to explain bit timing recovery here (a detailed explanation of all the different ways to do it would be a book-length work).  Instead, I give you the term -- go search on it, and pick an algorithm that seems suited to what you want to do.

[ - ]
Reply by chessJune 14, 2016

Thank you. However I cannot even obtain the correct bits in the first case. below waveform corresponds to 0 0 1 1 1 so how can I obtain 0 0 1 1 1 back. it seems there is no way. Below figure is obtained by Conv command instead of filter.

raside-cosine_convolution_82736.jpg

This figure is after passing through matched filter with filter command for 0 0 1 1 1. Can you please tell me how to get these 0 0  1 1 1 back from the above or below pictures.

raisedcosine_filter_69051.jpg

[ - ]
Reply by Tim WescottJune 14, 2016
I see zeros in the neighborhood of 56, 64, & 72, and then ones in the neighborhood of 80, 88, and 96.  Then a zero again around 104.


What's the problem?

[ - ]
Reply by chessJune 14, 2016

The problem is as I stated above this corresponds to 0 0 1 1 1. what you said is like 0 0 0 1 1 1 0