DSPRelated.com
Forums

Re: Re:[Matlab] Re: Help in Simulink

Started by Vipperla Ravi Chander N Rao November 3, 2003
Hi,
What I forgot to mention was that before taking the signals into the
workspace for performing cross correlation, you need make the SNR of
the channel very high. Then the received signal would be same as the
transmitted one with some delay added.
This delay can be found by cross correlation where the result would
maximise, when the shift given is equal to the delay introduced.
As Snehamoy has mentioned, to get maxima at the proper value, choose
the input random sequence of a large length.
Once the delay has been calculated, go back to your system and change
the SNR to the desired value and use the delay calculated previously,
in the error rate calculation block to get a proper estimate of BER.

regards,
Ravi 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
----- Original Message -----
From: Vipperla Ravi Chander N Rao
To:
Sent: Friday, October 31, 2003 9:27 AM
Subject: [matlab] Re: Help in Simulink 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=index-L

For more details look into the MATLAb help on 'Building a frequency
shift keying model' under communications blockset help.

regards,
Ravi
200211014,
MTech, DA-IICT

>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
____________________________________________________________________
Ravi

____________________________________________________________________
"Not everything that can be counted counts, and not everything that
counts can be counted."
-Albert Einstein
____________________________________________________________________