# Help in Simulink

Started by October 30, 2003
 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
 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 ____________________________________________________________________
 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 non-coherent/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 ----- Original Message ----- From: Hrishikesh Venkataraman To: m...@yahoogroups.com Cc: v...@ifn.et.tu-dresden.de Sent: Thursday, October 30, 2003 6:08 PM Subject: [matlab] Help in Simulink   Hai,I have developed a Tx - Rx chain model in simulink inwhich i have used buffers, selectors and some MatlabFunctions.Now while calculating the error rate between Tx dataand the Rx data, how do i calculate the delay tht theTx data needs to be given so tht it can be comapredwith rx data. For eg. if we use 1 buffer of parameter value 12 inthe model, the delay for TX data will be 12 samples,but the delay in case of other blocks or concatenaedbuffers is not as straightforward. nybody with any idea on how to take care of the delayto be provded or any references. Thanks in advance.regards,hrishikesh V________________________________________________________________________Yahoo! India Matrimony: Find your partner online.Go to http://yahoo.shaadi.com_____________________________________Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group._____________________________________About this discussion group:To Join:  m...@yahoogroups.comTo Post:  m...@yahoogroups.comTo Leave: m...@yahoogroups.comArchives: http://www.yahoogroups.com/group/matlabMore DSP-Related Groups: http://www.dsprelated.com/groups.php3 ">Yahoo! Terms of Service.
 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 __________________________________
 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: m...@yahoogroups.com 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-LFor more details look into the MATLAb help on 'Building a frequency shift keying model' under communications blockset help.regards,Ravi200211014,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_________________________________________________________________________________________________________Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group._____________________________________About this discussion group:To Join:  m...@yahoogroups.comTo Post:  m...@yahoogroups.comTo Leave: m...@yahoogroups.comArchives: http://www.yahoogroups.com/group/matlabMore DSP-Related Groups: http://www.dsprelated.com/groups.php3 ">Yahoo! Terms of Service.