# How to find Average radio layer latency

• ### Question

(∑ (i=0)^(HO_success)▒〖(T2,i-T1,i)〗)⁄(HO_success)
(summation is i=0 upto HO_success,with T2,i-T1,i)divided by HO success

This value measures the delay between the time instance T

1,i  that an MS transmits a serving BS its commitment to HO and the time instance T2,i that the MS achieves the success of the PHY layer synchronization (i.e., frequency and DL timing synchronization) due to handover occurrence i.

Please tell me how to code this as in above code i want to find the Average radio layer latency. How to use this formula in loop?

1,i  that an MS transmits a serving BS its commitment to HO and the time instance T2,i that the MS achieves the success of the PHY layer synchronization (i.e., frequency and DL timing synchronization) due to handover occurrence i.

Please tell me how to code this as in above code i want to find the Average radio layer latency. How to use this formula in loop?

Saturday, June 6, 2009 8:08 PM

• ???

int sum = 0;
for(int i = 0; i <= H0_Success; i++)
{
sum += that something inside those '[' ']';
}

double result = sum /  H0_Success;

What's inside those '[]'? Is it a vector? You want to sum up a vectors from i = 0 to H0_Success, or what?
• Marked as answer by Sunday, June 7, 2009 4:36 PM
Saturday, June 6, 2009 10:07 PM

### All replies

• ???

int sum = 0;
for(int i = 0; i <= H0_Success; i++)
{
sum += that something inside those '[' ']';
}

double result = sum /  H0_Success;

What's inside those '[]'? Is it a vector? You want to sum up a vectors from i = 0 to H0_Success, or what?
• Marked as answer by Sunday, June 7, 2009 4:36 PM
Saturday, June 6, 2009 10:07 PM
• Thanks Mr. Mal Loth,
Inside [] its [(T2,i-T1,i)] where i is the occurance of handover. Its is till the loop you have mentioned.I will adjust it according to VB.Net....
But where i have to fit in this T1 and T2 in the loop? I am not getting that.

T1,i
that an MS transmits a serving BS its commitment to HO and the time instance T2,i that the MS achieves the success of the PHY layer synchronization (i.e., frequency and DL timing synchronization) due to handover occurrence i.

IN my code this is T1, Mobile scan request
Me

This is T2, Syncronization

Me

These are the answers i get

T1 - MOB_SCN_REQ—Delay: 4162 ms

T2 - SYNC—Delay: 4207 ms

Do i need to find according to formula T2(Minus)T1?
I append both T1 and T2 in same text box statusHO,How can i get dislpayed results of T1 and T2 and put them in formula to find radio latency.

Please guide me further. I shall be thankful.
With Regards,
Naina

Saturday, June 6, 2009 10:56 PM
• So You're using VB.NET...(OMG, better switch to C#) For appending text use "String.Format" instead.
It will look like this:

textBox1.Text = String.Format("MS just reached Hysteris Point {0} {1} {0} {1}", vbCr, vbLf);

In {} .NET will put proper number or text which is next after the given string format.

As for the loop You're asking write an example with a bit of counting (include numbers) which will show me how do You want numbers to change. Your explanations and source code are very unclear of what do You want to achieve.
Sunday, June 7, 2009 10:11 AM
• Thanks Mr. Loth,

Yes I am using Vb.Net, Visual studio 2008. I prefer to use Vb, free from starting/closing braces. And I don’t have much know how of C#. In what sense is it better?

I will try to explain you fully my query…

I already used append text for T1, T2,….T8  somehow like this

''''''''''''''''''''''''''''''''''''''''MOB_SCN_REQ''''''''''''''''''''''''''

sw.Reset() 'Stops time interval measurement and resets the elapsed time to zero.

sw.Start() 'Starts, or resumes, measuring elapsed time for an interval.

BS.ProcessRequest(Request.MOB_SCN_REQ, bsType.Serving)

sw.[Stop]() 'Stops measuring elapsed time for an interval.

Same code pattern apply to other Ts and the I append all these Ts in same text box like this

Private Sub AddStatus(ByVal message As String, ByVal delay As Double)

statusHO.AppendText(message & "—Delay: " & +Math.Round(delay, 4) * 10000 & " ms " & vbCr & vbLf & vbCr & vbLf)

'statusHO' is a textbox.

then I get results for all Ts on user interface in text box statusHO..some thing like this…

MS is at Cross Over Point

MS just reached Threshold Point

T1- MOB_SCN_REQ—Delay: 3816 ms

T2- SYNC—Delay: 5629 ms

T3 - MOB_MSHO_REQ—Delay: 3665 ms

T4- RNG_REQ_CB—Delay: 88617 ms

T5- RNG_REQ_CF—Delay: 1301 ms

MS just reached Hysteris Point

T6- CAP_NEGO—Delay: 5933 ms

T7 - AUTH_KEY_EXG—Delay: 12803 ms

T8- REG_REQ—Delay: 6774 ms

basically I am moving, rather performing handover of Mobile station from one cell to other.Here I used the concept of location change for the MS and the I pout different points like cross over point threshold,hysterisi etc.and calculate as above result time or you can say delay Mobile station take to reach other cell/base station or other location. Eg you can see above I calculated T1- MOB_SCN_REQ—Delay: 3816 ms  to get time/delay mobile scanning request.and in this way I want to use all the steps that are involved in handover of any mobile network particularty Wimax. Upto this I am done and clear.

Now I have a text box rlLatency on which I want to have results of the formula of Radio Layer Latency. I know I have to use loop for this formula,and you also mentioned that to some extend, but I am facing problem in (T1,i - T2,i) (- means minus) how to put this in loop.

I am not getting how to store the values of delay for T1 and T2  i.e

T1- MOB_SCN_REQ—Delay: 3816 ms 'Here I have T1=3816

T2- SYNC—Delay: 5629 ms 'here I have T2=5629

and then use these values to calculate radio layer latency.

You can find these formulas in below link (PDF File) page No. 119-120

http://api.ning.com/files/XsBzTbkJcpxFlu5NEuk804k9t*hbgQIDcA3HryMEjX82DNd2a8bM0dmlytmC6SPe2e73zf2PIF6PMs2PenFwNcRgUc*8twZH/WiMAX_System_Evaluation_Methodology_071215.pdf

Somehow same pattern I have to find network entry time connection set-up time etc, using formulas in above document.

I just need to know how to store values of T1, T2 and then use them in loop.

Thanks

Regards,

Naina

Sunday, June 7, 2009 4:35 PM
• I'm getting real troubles trying to understand what You exacly want...

You can store them in array (if it's that what You want).

Should the iteration look like this?:

i =0; sum = [T2, 0 - T1, 0] = [T2, -T1, 0]
i =1; sum = sum + [T2, 1 - T1, 1]  = [2 * T2,  1 - 2*T1, 1]
i=2; sum = sum + [T2, 2 - T1, 2] = [3*T2, 3 - 3*T1, 3]
...

or what?
What exacly is in math this [(T2,i-T1,i)] ? Is it a vector, 1x3 array (table) or a data cluster?
Without this knowledge (simple, one line explanation) I won't be able to help You further.

Show me just like I showed in this post, how do You want it to be computed.

Sunday, June 7, 2009 5:15 PM
• Thanks Mr Loth, I am greatful to your help, I was able to get the results using loop. You were not able to get me full..But i did get the point what you said according to me requirement

But now when i get the results it shows Minus sign with it. T2-T1=(sometimes its in minus) as some times T2 is greater and sometimes T1 delay is more..Thats why...
I just want to know how to ignore this (minus) sign..I want results as in positive number..

like text box shows