You are on page 1of 15

Recitation 5: ARQ Schemes

Hung-Bin (Bing) Chang and Yu-Yu Lin


Electrical Engineering Department University of California (UCLA), USA,
hungbin@seas.ucla.edu and skywoods2001@ucla.edu

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

1 / 15

Outline

Stop and Wait


Example 1: Stop and Wait

Go back N
Example 2: Go back N

Selective Repeat
Example 3: Selective Repeat

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

2 / 15

Stop and Wait

Stop and Wait


Half duplex
It is important to number the packet and ACK
receiver

transmitter
Send PKT 1

PKT

1
ACK

PKT

2
ACK

PKT

3
ACK

PKT

tto

4 (err

or)

Time expires
PKT

4
ACK

Figure : ARQ scheme: Stop and wait


Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

3 / 15

Stop and Wait

Example 1: Stop and Wait

Parameter setup
Transmission rate R = 32 Kbps
Each packet contains np characters.
150 data characters (i.e., nd = 150).
10 header characters (i.e., nh = 10).
160 characters in a packet (i.e., np = nd + nh = 160).

Acknowledgements consist of 10 characters (i.e., ns = 10).


There are 8 bits per character (i.e., nb = 8).
tp = tta = 0.02 sec (half duplex, line-turnaround time).
trr = ttr = 0.02 sec (full duplex, receiver reaction time, transmitter
reaction time).
Bit error rate (BER) = p = 104 .

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

4 / 15

Stop and Wait

Example 1: Stop and Wait

Example 1 - Contd

Question 1-1
What is the packet error rate?
PE = 1 (1 p)Nbp = 1 (1 104 )(150+10)8 = 0.1202,
where Npb = np nb is the number of bits in a packet.

Question 1-2
If packets are sent without error, what is the time between
successive packets by using stop and wait?
T =

(150 + 10) 8 10 8
+
+ 2 (0.02 + 0.02) = 0.1225.
32K
32K

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

5 / 15

Stop and Wait

Example 1: Stop and Wait

Example 1 - Contd
Question 1-3
Now, with errors occurring, what is the average number of
transmissions required for successful reception?
P(NT = n) = PEn1 (1 PE ), n = 1, 2, . . . ,
1
1
E[NT ] =
=
= 1.1366.
1 PE
1 0.1202

Question 1-4
What is the effective throughput rate () for stop and wait?
=

Ndb
150 8
=
= 8618 bps,
Tp
1.1366 0.1225

where Ndb is the number of data bits per packet and Tp is the time
to successfully transmit one packet.
Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

6 / 15

Stop and Wait

Example 1: Stop and Wait

Example 1 - Contd
Question 1-5
What is the normalized throughput for stop and wait scheme?
8618

=
= 26.7%,
R
32K
where R is transmission rate and can be also regarded as max
throughout rate.
The general formula for stop and wait scheme throughout is given
by
=

Ndb
Ndb (1 PE )R
=
,
Npb
Nab
1
Npb + Nab + 2R(tp + tta )
+
+ 2(tp + tta )
1P
R
R
| {z E} |
{z
}


=E[NT ]

=T

where Npb = np nb , Ndb = nd nb and Nab = na nb .


Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

7 / 15

Go back N

Go back N
Full duplex, pipelining and ensure the oldest frame transmitted
successfully
receiver

transmitter
1
2
3 1
C
A K2
ACK 3
AC4K
5
6

Time expires
4
5
6 4
ACK

Ignored by receiver
(out of sequence
packets)

5
6
5
ACK 6
ACK

Figure : ARQ scheme: Go back N


Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

8 / 15

Go back N

Example 2: Go back N

Example 2 - Contd
Question 2-1
Now consider Go Back N. If there are no errors, what is the time to
transmit one packet?
Npb
(150 + 10) 8
=
sec.
R
32K

Question 2-2
If errors occur, what is the average number of retransmissions?
P(NR = n) = PEn (1 PE ), n = 0, 1, 2, . . . ,
PE
.
E[NR ] =
1 PE

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

9 / 15

Go back N

Example 2: Go back N

Example 2 - Contd
Question 2-3
What is the optimal value of N for Go Back N?
Select N such that time-out duration (tto ) is given by

tto = (N 2)

Npb
,
R

where
&
N=

'
+2

2 0.02 + 0.02 + 0.02 +


1608
32K

where tto = 2tp + trr + ttr +


Prof. Izhak Rubin (UCLA)

Nab
R

Npb
R

&
=

2tp + trr + ttr +

108
32K

'
+ 2 = 5,

Nab
R .

EE 132B

2014 Fall

10 / 15

Go back N

Example 2: Go back N

Example 2 - Contd
Question 2-4
How many packets must be transmitted, on average, in order to
successfully receive one packet?
For each retransmission happening, we need to send N packets.


PE
+1
1 PE
NPE + 1 PE
=
1 PE
PE (N 1)
=
1 PE
0.1202 4 + 1
=
= 1.6831.
1 0.1202


N E[NR ] + 1 = N

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

11 / 15

Go back N

Example 2: Go back N

Example 2 - Contd
Question 2-5
What is the throughput for go back N scheme?
Ndb
Ndb
=
Tp
E[NT ] TR
150 8
=
= 17824 bps (55.7%),
1.6831 1608
32K

where Ndb = nd nb is the number of data bits in a packet, E[NT ] is


the average number of packet transmissions for one successful
reception and Tp is the time to transmit one packet.
The general formula for Go back N is given by
=

Ndb
.
Npb (N 1)PE + 1
R
1 PE
|{z}
|
{z
}


Tp

Prof. Izhak Rubin (UCLA)

E[NT ]

EE 132B

2014 Fall

12 / 15

Selective Repeat

Selective Repeat
Full duplex,
Receiver has the ability to receive out of sequence packet
We could have window.
receiver

transmitter
1
2
3 1
C
A 4K 2
C
A 5K 3
AC6K
5
ACK 6
AC4K

Time expires

ACK

Figure : ARQ scheme: Selective repeat


Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

13 / 15

Selective Repeat

Example 3: Selective Repeat

Example 3

Question 3
What is the throughput for selective repeat?
=

Ndb
Npb
R E[NT ]

150 8


1608
32K

Npb
R

1
10.1202

N
 db

1
1PE

 = 26394 bps (82.5%),

Note: Under a special case of no error (i.e., p = 0), Go back N


scheme is same with Selective repeat scheme.

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

14 / 15

Selective Repeat

Example 3: Selective Repeat

Q&A

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

15 / 15

You might also like