Optimal Packet Size Wireless Communication
Optimal Packet Size Wireless Communication
Time
revised in 2018 [21], increasing coverage with wavelengths trx-tx
ACK
from 190 nm to 10,000 nm.
Light can be used as a means of communication [22] and
has several research areas, including body area networks,
communication between vehicles, smart cities, etc. Several
applications include a light positioning system [23], indoor Fig. 2: Diagram for one transmission.
location [24], [25], and the LED-LED or LED-photoreceptor
communication itself.
The optical channel modeling considered in this work is the
same as described by Zhong and Wang [26]. Equation 1 gives σshot = 2q[RPr (1 + MI2 ) + Ibg I2 ]B, (5)
the power received in the photoreceptor PR , where H(0) is
the attenuation of the optical channel, and Pt is the power where q is the electron charge, MI is the modulation index,
emitted by the transmitting LED. Ibg is the background current, I2 is the noise factor and B
is the noise bandwidth. Without generality loss, we use the
PR = H(0)Pt (1) OOK modulation standard (On-Off Keying) for this work. The
modulation index for OOK is 0.5.
Fig. 1 shows the geometry involving communication be-
tween an LED transmitting data and a photoreceptor receiving
I2 2πΓ
data. The vectors D⃗r and D ⃗s are, respectively, normal to the σthermal = 8πkTk ηAB 2 + ηAI3 B , (6)
G gm
surface of the sender and normal to the surface of the receiver.
The D⃗rs vector points from the photoreceptor’s center towards where k is the Boltzmann constant, Tk is the absolute
the transmitting LED’s center. temperature, η is the capacitance, G is the voltage gain, Γ
is the noise factor, Gm is the FET transconductance ,and I3
is the circuit noise [27].
IV. P ROBLEM M ODELING
This work aims to analyze the impact of packet size on the
efficiency of the wireless optical channel. The model proposed
here can be used to determine the optimal packet size for
transmission between two nodes from a distance d between
Fig. 1: Optical geometric scheme.
them and the θ and φ alignment angles (Equation 2 and 3).
Then, let us consider two OWC communication devices,
Assuming that the LED emits obeying the Lambertian emis-
each equipped with an LED for data transmission and a
sion model, we have that the emitted spectral radiation (R(φ) )
photoreceptor for data reception. Let E(d, Tp ) be the equation
can be obtained by Equation 2 where m is the Lambertian
ln0.5 determining the efficiency of using the channel for commu-
order given by m = ln(cosφ , where φ1/2 is the half power
1/2 ) nication. We want to choose the payload size Tp such that
angle and, for the LED, φ1/2 = 60o . it maximizes E for any value d, θ, and φ. The angles do
(m + 1)cosm φ not directly enter the efficiency calculation. However, they are
R(φ) = . (2) used to obtain the signal-to-noise ratio (SNR).
2π
The model considers the communication between two
The attenuation of the channel can then be calculated using
nodes. The transmission of a packet will be regarded as
Equation 3, where A is the photoreceptor area and d is the
correct when there is no wrong bit in the data packet and the
distance between the devices.
acknowledgment packet (ACK). Fig. 2 illustrates the Diagram
A for a complete transmission.
H(0) = R(φ) cosθ. (3) The IEEE 802.15.7 standard specifies several modulation
d2
schemes. We considered the OOK standard for this work, but
Finally, we can calculate the signal-to-noise ratio (SNR)
the same can be applied to the other modulation standards.
using Equation 4
The Bit Error Rate, Be for the OOK modulation, can be
R2 H 2 (0)Pt2 calculated using Equation 7 [28].
SN R = , (4)
σthermal + σshot √
Be = Q( SN R), (7)
where σthermal and σshot are, respectively, shot noise and √
thermal noise obtained in Equation 5 and in Equation 6. where Q( SN R) is the Marcum-Q function.
With the value obtained from the error rate, it is possible to We chose three header sizes, two of which were specified by
calculate the packet error rate Pe (Equation 8). N is the value the IEEE organization, 37 bytes and 9 bytes (Maximum and
of the total bits transmitted in a data packet plus the total bits minimum IEEE header size). The third header size chosen was
in an acknowledgment packet. 11 bytes. The value was selected to be tested experimentally
using the OpenVLC [29] platform.
Pe = 1 − (1 − Be )N (8)
Feature Symbol Value
With the packet error rate computed, it is possible to Payload TP variable (bits)
Transmission counter Pc variable1
calculate the number of packets that must be sent for error-free Header size Tc variable (296, 88, 72 bits)
transmission Pc . This calculation is based on the assumption ACK size TA 24 bits
that errors in consecutive packets are independent and that the Bandwidth b 11.67 kbps
Distance d variable in meters
number of retransmissions is infinite (geometric distribution). Light speed c 3x108 m/s
This can be obtained from Equation 9.
TABLE II: Parameters for evaluating the channel efficiency.
1
Pc = (9)
1 − Pe The parameters presented in Table II were used in Equa-
Finally, the channel efficiency E(d, Tp ) can be found as a tion 10 to define the optimal packet size that maximizes
function of the distance and the packet size (Equation 10). the channel efficiency. Fig.s 3a, 3b and 3c show the curves
obtained for the maximum channel efficiency for the headers
of 37, 11, and 9 bytes, respectively.
Tp
E(d, Tp ) = d
, All curves grow to a maximum. This maximum value is
Pc ∗ [Tp + Tc + TA + b ∗ (2 ∗ + trx−tx )]
c the efficiency limit obtained for each distance. We obtain the
(10)
payload value at the maximum points for each curve that
Where Tp is the packet size, Tc and TA are the header and maximizes the channel’s efficiency. This payload value plus
ACK sizes, respectively, the bandwidth is given by b, c is the the header size is called the optimal packet size.
speed of light, and trx−tx is the data packet processing time. The results demonstrate that header size directly impacts
Maximizing channel efficiency is crucial to determine the channel efficiency. Even though larger headers might suggest
optimal packet size, as expressed in Equation 10. This analysis bigger ideal packet sizes, the increased overhead from the
is split into two main sections. Firstly, in Section IV-A, header itself may not outweigh this benefit, especially over
we examine the influence of distance on channel efficiency, longer distances. As the payload size shrinks compared to the
keeping transmitter-receiver alignment fixed (φ and θ at zero). larger header, efficiency suffers.
Secondly, in Section IV-B, we explore channel efficiency
across various distances and angles. B. Non-aligned nodes
By defining the distance between the sender and receiver, we
A. Node alignment can analyze how the optimal packet size behaves by varying
The parameter values used to compute the channel attenu- the nodes’ alignment.
ation in Equation 3 and the SNR in Equation 4 are shown First, we set the distance to 0.2 m and the θ angle to 0º,
in Table I. The parameters used were obtained from the and we vary the φ angle. The header size chosen here is 11
datasheets of the components employed. bytes, equivalent to the OpenVLC header.
Fig. 3d shows the efficiency of using the channel as a
Feature Symbol Value
Photoreceptor area A 5.24x10−6 m2
function of the payload for several angles at 0.20 m between
Photoreceptor responsiveness R 0.45 AW the transmitter and the receiver. For angles less than 80º, occur
Transmitted Power Pt 20x10−3 W a small variation in maximum efficiency. However, maximum
Angle of the receiver φ 0o efficiency drops very quickly at angles greater than 80º.
Reception angle θ 0o
Background current Ibg 5100 µA Next, we set the distance to 0.6 m and repeated the process.
Noise factor I2 0.562 Fig. 4a shows the channel efficiency for a distance of 0.6
Absolute temperature Tk 297 K m. The model indicates that channel efficiency happens more
Capacitance η 112x10−6 pF/cm2
Voltage Gain G 10 smoothly for this distance. However, the model predicts that
Circuit noise I3 0.0868 transmissions are no longer possible at 60º due the fact no
Modulation Index OOK MI 0.5 there is a transition that does not contain an error. Such
Transconductance Gm 30−3
predictions occur for the parameters shown in Tables I and II.
TABLE I: Parameter for SNR computation. Finally, we keep our distance and vary both angles, θ and φ.
We did this using distances of 0.2 m and 0.6 m. We observed
The IEEE 802.15.7 standard specifies all header fields for the same behaviors, rapid growth to maximum efficiency and
the OWC. This header can take different sizes depending on slightly smoother decay. Fig.s 4b and 4c show the efficiency
the type of the packet, which can be the type of beacon, data of using the optical channel for several angles fixing distances
type, confirmation type, command type, etc. of 0.2 m and 0.6 m, respectively.
Channel Efficiency for 37 bytes header Channel Efficiency for 11 bytes header
1
10 cm 10 cm
30 cm 0.9 30 cm
40 cm 40 cm
50 cm 0.8 50 cm
60 cm 60 cm
70 cm 0.7 70 cm
Channel Efficiency
Channel Efficiency
80 cm 80 cm
100 cm 100 cm
0.6
0.5
0.4
0.3
0.2
0.1
0
0 500 1000 1500 2000
Payload (Bytes) Payload (Bytes)
(a) Channel efficiency for the 37-byte header. (b) Channel efficiency for the 11-byte header.
Channel Efficiency for 9 bytes header
1 Channel efficiency header 11 bytes, d = 20 cm, multiple angles
10 cm 1
0.9 30 cm
40 cm 0.9
0.8 50 cm 5 degree
60 cm 0.8
80 degree
0.7 70 cm
Channel Efficiency
85 degree
Channel Efficiency
80 cm 0.7
100 cm 88 degree
0.6
0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0 0
0 500 1000 1500 2000 0 500 1000 1500
Payload (Bytes) Payload (Bytes)
(c) Channel efficiency for the 9-byte header. (d) Channel efficiency for the 11-byte header and multiple angles.
Fig. 3: Channel efficiency in several scenarios.
0.6 45 degree
50 degree
0.5 55 degree
60 degree
0.4
0.3
0.2
0.1
0
0 500 1000 1500
Payload (Bytes)
(a) Optimal payload size and maximal chan- (b) Optimal payload size and maximal chan- (c) Optimal payload size and maximal chan-
nel usage efficiency per θ. Nodes distance nel usage efficiency. Nodes distance 0.2 me- nel usage efficiency. Nodes distance 0.6 me-
is 0.6 m. ters, the nodes varying the θ and φ angles. ters, the nodes varying the θ and φ angles.
Fig. 4: Channel efficiency usage for different angles.
Channel Efficiency
Channel Efficiency
0.8 0.8
Experiment Model
Channel Efficiency
0.7 0.7 Experiment
0.7
0.6 0.6
0.6
0.5 0.5
0.5
0.4 0.4
0.4
0.3 0.3
0.3
0.2 0.2
0.2
0.1 0.1
0.1
0 0
00
200 600 1000 1400 1800 0 50 100 150 200 250 300 350 400 450 500 0 100 200 300 400 500 600 700 800
Payload (bytes) Payload (bytes) Payload (bytes)
(a) Channel efficiency usage for a distance of (b) Channel efficiency usage for a distance of (c) Channel efficiency usage for a distance of
20 cm. 20 cm, angle = 40◦ . 60 cm.
Fig. 6: Channel efficiency usage for different distances and angles.
R EFERENCES [15] D. A. Basnayaka and H. Haas, “Hybrid rf and vlc systems: Improving
user data rate performance of vlc systems,” in 2015 IEEE 81st Vehicular
Technology Conference (VTC Spring), May 2015, pp. 1–5.
[1] D. Goldman, “Sorry, America: Your wireless airwaves are full,” https: [16] M. A. M. Vieira, R. Govindan, and G. S. Sukhatme, “An autonomous
//money.cnn.com/2012/02/21/technology/spectrum crunch/index.htm, wireless networked robotics system for backbone deployment in highly-
February 2012, [Online; access July-07-2020]. obstructed environments,” Ad Hoc Networks, vol. 11, no. 7, pp. 1963–
[2] J. P. D. Vries, L. Simić, A. Achtzehn, M. Petrova, and P. Mähönen, 1974, 2013.
“The wi-fi “congestion crisis”: Regulatory criteria for assessing spectrum [17] N. Cen, J. Jagannath, S. Moretti, Z. Guan, and T. Melodia, “Lanet:
congestion claims,” Telecommunications Policy, vol. 38, no. 8, pp. 838 Visible-light ad hoc networks,” Ad Hoc Networks, vol. 84, pp. 107–123,
– 850, 2014. 2019.
[3] CISCO, “Internet of Things,” https://www.cisco.com/c/dam/en/us/ [18] J. Jagannath and T. Melodia, “Vl-route: A cross-layer routing protocol
products/collateral/se/internet-of-things/at-a-glance-c45-731471.pdf, for visible light ad hoc network,” preprint arXiv:1904.05177, 2019.
2019, [Online; access November-27-2019]. [19] L. M. Matheus, A. B. Vieira, M. A. M. Vieira, and L. F. M. Vieira,
[4] D. Pompili, T. Melodia, and I. F. Akyildiz, “Routing algorithms for “Dyrp-vlc: A dynamic routing protocol for wireless ad-hoc visible light
delay-insensitive and delay-sensitive applications in underwater sensor communication networks,” Ad Hoc Networks, vol. 94, p. 101941, 2019.
networks,” in Proceedings of the 12th Annual International Conference [20] IEEE, “Ieee standard for local and metropolitan area networks–part 15.7:
on Mobile Computing and Networking, ser. MobiCom ’06. New York, Short-range wireless optical communication using visible light,” IEEE
NY, USA: ACM, 2006, pp. 298–309. Std 802.15.7-2011, pp. 1–309, Sep. 2011.
[5] W. A. S. Soares Junior and L. F. M. Vieira, “Redes aéreas ieee 802.15.4: [21] ——, “Ieee standard for local and metropolitan area networks–part 15.7:
tamanho ótimo do pacote e coleta de dados,” 2014. Short-range optical wireless communications,” IEEE Std 802.15.7-2018
[6] Z. Alliance, “Zigbee alliance finalizes specification,” http://www.zigbee. (Revision of IEEE Std 802.15.7-2011), pp. 1–407, April 2019.
org, 2004, [Online; acessado 25/03/2019]. [22] L. E. M. Matheus, A. B. Vieira, J. H. F. Freire, L. F. M. Vieira, M. A. M.
[7] Y. Sankarasubramaniam, I. F. Akyildiz, and S. W. McLaughlin, “Energy Vieira, and O. Gnawali, “Comunicação por Luz Visı́vel: Conceitos,
efficiency based packet size optimization in wireless sensor networks,” Aplicações e Desafios. Minicurso do Simpósio Brasileiro de Redes de
in Proceedings of the First IEEE International Workshop on Sensor Computadores e Sistemas Distribuı́dos 2017,” 2017.
Network Protocols and Applications, 2003., May 2003, pp. 1–8. [23] M. Kavehrad and W. Zhang, Light positioning
[8] L. B. Ruiz, L. H. A. Correia, L. F. M. Vieira, D. F. Macedo, E. F. Naka- system (LPS). Cambridge University Press, Feb
mura, C. M. Figueiredo, M. A. M. Vieira, E. H. B. Maia, D. Câmara, 2015. [Online]. Available: https://www.cambridge.org/core/
A. A. Loureiro et al., “Architectures for wireless sensor networks,” in books/visible-light-communication/light-positioning-system-lps/
Proceedings of the 22nd Brazilian Symposium on Computer Networks 3836D6AC658A4A5B4AD4ED3B5EFB3A5B
(SBRC’04), 2004, pp. 167–218. [24] N. U. Hassan, A. Naeem, M. A. Pasha, T. Jadoon, and C. Yuen, “Indoor
positioning using visible led lights: A survey,” ACM Comput. Surv.,
[9] L. F. M. Vieira, M. A. M. Vieira, L. B. Ruiz1, A. A. F. Loureiro,
vol. 48, no. 2, pp. 20:1–20:32, Nov. 2015.
D. C. Silva, and A. O. Fernandes, “Efficient incremental sensor network
[25] V. Kavitha, B. A. Vijayalakshmi, M. VanithaLakshmi et al., “Vlc-based
deployment algorithm,” pp. 3–14, 2004.
dco-ofdm and wsn in hospitals for medical information transmission,”
[10] Jun Yin, Xiaodong Wang, and D. P. Agrawal, “Optimal packet size in Journal of Optics, pp. 1–9, 2024.
error-prone channel for ieee 802.11 distributed coordination function,” [26] W. Zhong and Z. Wang, “Performance enhancement techniques for
in 2004 IEEE Wireless Communications and Networking Conference indoor vlc systems,” in Visible light Communication. Cambridge
(IEEE Cat. No.04TH8733), vol. 3, March 2004, pp. 1654–1659 Vol.3. University Press, 2015.
[11] A. G. Vieira, L. F. M. Vieira, M. A. M. Veira, and A. B. Vieira., [27] H. Kressel, Semiconductor devices for optical communication. Springer
“Comunicação por luz visı́vel: redução da latência via combinação de Science & Business Media, 2006, vol. 39.
pacotes,” in SBESC 2018 (), nov 2018. [Online]. Available: https://sbesc. [28] T. Komine and M. Nakagawa, “Fundamental analysis for visible-light
lisha.ufsc.br/sbesc2018/proceedings2018/S2/Comunicacao187820 1.pdf communication system using led lights,” IEEE Transactions on Con-
[12] N. dos Santos Ribeiro Júnior, R. C. Tavares, M. A. M. Vieira, L. F. M. sumer Electronics, vol. 50, no. 1, pp. 100–107, Feb 2004.
Vieira, and O. Gnawali, “Codedrip: Improving data dissemination for [29] Q. Wang, D. Giustiniano, and D. Puccinelli, “Openvlc: Software-defined
wireless sensor networks with network coding,” Ad Hoc Networks, visible light embedded networks,” in Proceedings of the 1st ACM
vol. 54, pp. 42–52, 2017. MobiCom workshop on Visible light communication systems. ACM,
[13] L. E. M. Matheus, A. B. Vieira, L. F. M. Vieira, M. A. M. Vieira, and 2014, pp. 15–20.
O. Gnawali, “Visible light communication: Concepts, applications and [30] M. Grčar, D. Mladenič, B. Fortuna, and M. Grobelnik, “Data sparsity is-
challenges,” IEEE Communications Surveys & Tutorials, vol. 21, no. 4, sues in the collaborative filtering framework,” in International Workshop
pp. 3204–3237, 2019. on Knowledge Discovery on the Web. Springer, 2005, pp. 58–76.
[14] S. Shao, A. Khreishah, M. B. Rahaim, H. Elgala, M. Ayyash, T. D. C. [31] M. Mukaka, “Statistics corner: a guide to appropriate use of correlation
Little, and J. Wu, “An indoor hybrid wifi-vlc internet access system,” in medical research,” Malawi Medical Journal, vol. 24, no. 3, pp. 69–71,
in 2014 IEEE 11th International Conference on Mobile Ad Hoc and 2012.
Sensor Systems, Oct 2014, pp. 569–574.