Hai, I have developed a Tx  Rx chain model in simulink in which i have used buffers, selectors and some Matlab Functions. Now while calculating the error rate between Tx data and the Rx data, how do i calculate the delay tht the Tx data needs to be given so tht it can be comapred with rx data. For eg. if we use 1 buffer of parameter value 12 in the model, the delay for TX data will be 12 samples, but the delay in case of other blocks or concatenaed buffers is not as straightforward. nybody with any idea on how to take care of the delay to be provded or any references. Thanks in advance. regards, hrishikesh V ________________________________________________________________________ Yahoo! India Matrimony: Find your partner online. Go to http://yahoo.shaadi.com 

Help in Simulink
Started by ●October 30, 2003
Reply by ●October 31, 200320031031
Hi Hrishikesh, You can find the delay using crosscorrelation between the Tx signal and received signal. You can take the samples of tx and rx from simulink to Matlab workspace using the signal to workspace block. Then you apply cross correlation on the two signals to calculate the delay between the two. This is code given in Matlab help for this purpose: [m,index]=max(xcorr(Rx,Tx)); L=length(Tx); delay=indexL For more details look into the MATLAb help on 'Building a frequency shift keying model' under communications blockset help. regards, Ravi 200211014, MTech, DAIICT >Hai, > I have developed a Tx  Rx chain model in simulink in >which i have used buffers, selectors and some Matlab >Functions. >Now while calculating the error rate between Tx data >and the Rx data, how do i calculate the delay tht the >Tx data needs to be given so tht it can be comapred >with rx data. >For eg. if we use 1 buffer of parameter value 12 in >the model, the delay for TX data will be 12 samples, >but the delay in case of other blocks or concatenaed >buffers is not as straightforward. >nybody with any idea on how to take care of the delay >to be provded or any references. > Thanks in advance. >regards, >hrishikesh V ____________________________________________________________________ "Not everything that can be counted counts, and not everything that counts can be counted." Albert Einstein ____________________________________________________________________ 
Reply by ●October 31, 200320031031
Hi,
If I am to guess correctly,
you want to know the delay in order to calculate the bit error rate (BER).
For this you need not calculate the exact delay. Your system maybe
noncoherent/asynchronous and may be working on a frame basis. So in that case
you may use the length of time of one frame plus aditional 10 % as the delay
estimate parameter. For a rule of the thumb case, the delay will be
twice the sum of the length of spreding, convolutional encoder,
interleaver, scrambler (if not done at chip rate) and any buffers you use. In
case you need more help you may forward the model to me so that I can give a
better answer.
Snehamoy Banerjee

Reply by ●October 31, 200320031031
Did you check the doc page http://www.mathworks.com/access/helpdesk/help/toolbox/commblks/usersguide2.shtml on computing and manipulating delays for communication systems. Navan  Hrishikesh Venkataraman <> wrote: > > Hai, > > I have developed a Tx  Rx chain model in simulink > in > which i have used buffers, selectors and some Matlab > Functions. > > Now while calculating the error rate between Tx data > and the Rx data, how do i calculate the delay tht > the > Tx data needs to be given so tht it can be comapred > with rx data. > > For eg. if we use 1 buffer of parameter value 12 in > the model, the delay for TX data will be 12 samples, > but the delay in case of other blocks or concatenaed > buffers is not as straightforward. > > nybody with any idea on how to take care of the > delay > to be provded or any references. > > Thanks in advance. > > regards, > hrishikesh V __________________________________ 
Reply by ●November 1, 200320031101
Hi,
I think one point needs to
be clarified. The requirement of delay estimation in calculation of BER needs to
be a deterministic quantity which is required to be set as a parameter. Right?
Now what is the gaurantee that you will get a maxima only at zero shift and not
at any other value? The data is random in nature and could result in max at
other values as well. The maximum value of crosscorrelation will depend on the
sequence of data. Indeed there is a whole field of research going on to give a
maximumum peak only at zero shift and low values at other shifts. As a matter of
fact the BER calculation block works fine if we set the delay higher than the
actual delay but will be erronous if we select the delay to be lesser than the
actual. In the latter case it will be seen that the BER is 50%, since the
reciver is purely guessing.
The link to the MATLAB site
given in the other mail on this same thread addresses the issue very
well.
Snehamoy
