comm.ltemodel module¶
Module ltemodel contains the signal, channel and transceiver to describe LTE operation. The relationship among them is given in the following table:
Channel |
Signal |
Transceiver |
|---|---|---|
LTESub6GModel |
QualityBasedSignal |
TransceiverLTE |
Note
The implementation remains unfinished. Do not use. - Created by: CH Foh (2021)
-
class
comm.ltemodel.LTESub6GModel(freq, radius: float)¶ Bases:
comm.channel.BaseChannelThis is a subclass of BaseChannel implementing an LTE channel.
The channel uses comm.signalwave.QualityBasedSignal to record the received signal. The sender needs to specify the transmit power (tx_power) when instantating the signal. The transmit power is attentuated at the receiver. Based on the received power, a corresponding CQI is recorded.
The class uses LTE 4-bit CQI to indicate signal quality into 15 different levels. (see also https://www.sharetechnote.com/html/Handbook_LTE_CQI.html):
CQI Code Spectral SINR [dB] code Modulation Rate Efficiency ======== ==== ========== ==== ========== <-6.7 dB 0 =====OUT-OF-RANGE===== -6.7 1 QPSK 0.076 0.15 -4.7 2 QPSK 0.12 0.23 -2.3 3 QPSK 0.19 0.38 0.2 4 QPSK 0.3 0.60 2.4 5 QPSK 0.44 0.88 4.3 6 QPSK 0.59 1.18 5.9 7 16QAM 0.37 1.48 8.1 8 16QAM 0.48 1.91 10.3 9 16QAM 0.6 2.41 11.7 10 64QAM 0.45 2.73 14.1 11 64QAM 0.55 3.32 16.3 12 64QAM 0.65 3.90 18.7 13 64QAM 0.75 4.52 21.0 14 64QAM 0.85 5.12 22.7 15 64QAM 0.93 5.55 ===============================================
The determination of CQI is somewhat complex. Here we simply use receiver SNR to decide the CQI. The receiver SNR is calculated by the following:
Path loss PL(d) = 32.4 + 20*log10(fc) + 20*log10(sqrt(d_min^2+d^2)) - G_tx - G_rx
d is the horizontal distance between the transmitter and receiver, and d_min is the antenna height.
the formula excludes scattering, diffraction, multipath, penetration losses, and atmospheric absorption.
X_g is the slow and fast fading. For slow fading, it is log-normal shadowing, which is a Normal Distribution with mean=0, variance=σ^2. Typical values for NLOS σ are between 6 dB and 12 dB (or 8 to 9 dB for 28 GHz), LOS around 1.1 dB. For fast fading, it can be Rayleigh or Racian. However, we do not include fast fading here.
Receive power, P_rx (in dB) = P_tx - Max(PL - G_tx - G_rx, MCL) where PL is the pathloss, G_tx is tx antenna gain, G_rx is rx antenna gain, MCL is the minimum coupling loss (70dB for MacroUrban, or 80dB for MacroRural)
Receiver SNR = P_rx / thermal_noise
Receiver power P_rx = p_0 * PL(d) * G(delta_angle)
Transmit power is p_0
Methods
do_propagation(source, destination, signal)This method derives the received signal sent by source to destination.
get_range([threshold])This method returns an illustrative range of the channel.
-
__init__(freq, radius: float)¶ This is the constructor.
- Parameters
- freqfloat
The frequency of this channel.
- radiusfloat
The transmission radius.
-
do_propagation(source, destination, signal: comm.signalwave.QualityBasedSignal) → comm.signalwave.QualityBasedSignal¶ This method derives the received signal sent by source to destination. See also the base class for the usage.
In this implementation, the quality of the signal is recorded based on the distance between the sender and the receiver, and normalized to 1. When receiver is located at the sender, signal quality is 1 (i.e. the best), and when the receiver is at or outside the edge of the radiation disc, the signal quality is 0 (i.e. no connection).
- Parameters
- sourcenode.node.BaseNode subclass instance
The node that is transmitting the signal.
- destinationnode.node.BaseNode subclass instance
The receiving node.
- signalcomm.signalwave.QualityBasedSignal
The transmitted signal. This instance will be modified appropriately within this method. The modification describes how the signal would be attenuated and distorted.
- ant_heightfloat
Height of the sender antenna.
- Returns
- comm.signalwave.QualityBasedSignal
The received signal instance.
-
class
comm.ltemodel.TransceiverLTE(freq, radius: float)¶ Bases:
comm.transceiver.BaseTransceiverThis is a subclass of BaseTransceiver implementing an LTE transceiver.
It uses
comm.signalwave.QualityBasedSignalto exchange information. The sender needs to specify the transmit power (tx_power) when instantating the signal. The transmit power is attentuated at the receiver. Based on the received power, a corresponding CQI is recorded. In LTE, the CQI is reported by a UE, then the BS selects an appropriate MSE for transmission aiming for lower than 0.1 error rate.It uses
comm.channel.Sub6GModelfor communication. The channel is responsible for simulating signal propagation (mainly pathloss and fading).The class uses LTE 4-bit CQI to indicate signal quality into 15 different levels. (see also https://www.sharetechnote.com/html/Handbook_LTE_CQI.html):
CQI Code Spectral SINR [dB] code Modulation Rate Efficiency ======== ==== ========== ==== ========== <-6.7 dB 0 =====OUT-OF-RANGE===== -6.7 1 QPSK 0.076 0.15 -4.7 2 QPSK 0.12 0.23 -2.3 3 QPSK 0.19 0.38 0.2 4 QPSK 0.3 0.60 2.4 5 QPSK 0.44 0.88 4.3 6 QPSK 0.59 1.18 5.9 7 16QAM 0.37 1.48 8.1 8 16QAM 0.48 1.91 10.3 9 16QAM 0.6 2.41 11.7 10 64QAM 0.45 2.73 14.1 11 64QAM 0.55 3.32 16.3 12 64QAM 0.65 3.90 18.7 13 64QAM 0.75 4.52 21.0 14 64QAM 0.85 5.12 >22.7 15 64QAM 0.93 5.55 ===============================================
The determination of CQI is somewhat complex. Here we simply use receiver SNR to decide the CQI. The receiver SNR is calculated by the following:
Path loss PL(d) = 32.4 + 20*log10(fc) + 20*log10(sqrt(d_min^2+d^2)) - G_tx - G_rx
d is the horizontal distance between the transmitter and receiver, and d_min is the antenna height.
the formula excludes scattering, diffraction, multipath, penetration losses, and atmospheric absorption.
X_g is the slow and fast fading. For slow fading, it is log-normal shadowing, which is a Normal Distribution with mean=0, variance=σ^2. Typical values for NLOS σ are between 6 dB and 12 dB (or 8 to 9 dB for 28 GHz), LOS around 1.1 dB. For fast fading, it can be Rayleigh or Racian. However, we do not include fast fading here.
Receive power, P_rx (in dB) = P_tx - Max(PL - G_tx - G_rx, MCL) where PL is the pathloss, G_tx is tx antenna gain, G_rx is rx antenna gain, MCL is the minimum coupling loss (70dB for MacroUrban, or 80dB for MacroRural)
Receiver SNR = P_rx / thermal_noise
Receiver power P_rx = p_0 * PL(d) * G(delta_angle)
Transmit power is p_0
Methods
broadcast(signal)This method allows a node to perform a broadcast on the channel, and the method returns a list of tuple (node,received_signal) that the broadcast signal can be decoded, or None if no node can decode the signal.
can_detect(signal)This method allows a receiving node to check if a receiving signal can be successfully detected and decoded.
can_reach(source, destination, signal)This method tests if a node can reach another when transmitting a particualr signal.
create_signal()Create a signal for transmission.
do_propagation(source, destination, signal)This method derives the received signal sent by source to destination.
get_carrier_freq()Return the carrier frequency used by the channel.
get_property([property])The method returns the property of the transceiver.
get_type()This method returns the type of the transceiver.
multicast(signal, node_list)This method allows a node to perform a multicast on the channel, and the method returns a list of tuple (node,received_signal) that the multicast signal can decoded, or an empty list if no node can decode the signal.
set_property(key, value)Set a property to this transceiver.
unicast(signal, node)This method allows a node to perform a unicast on the channel, and the method returns a received_signal if the signal can be decoded, or None.
-
__init__(freq, radius: float)¶ This is the constructor.
- Parameters
- freqfloat
The frequency of this channel.
- radiusfloat
The transmission radius.
-
can_reach(source, destination, signal)¶ This method tests if a node can reach another when transmitting a particualr signal. See the base class for the usage.
-
do_propagation(source, destination, signal: comm.signalwave.QualityBasedSignal) → comm.signalwave.QualityBasedSignal¶ This method derives the received signal sent by source to destination. See also the base class for the usage.
In this implementation, the quality of the signal is recorded based on the distance between the sender and the receiver, and normalized to 1. When receiver is located at the sender, signal quality is 1 (i.e. the best), and when the receiver is at or outside the edge of the radiation disc, the signal quality is 0 (i.e. no connection).
- Parameters
- sourcenode.node.BaseNode subclass instance
The node that is transmitting the signal.
- destinationnode.node.BaseNode subclass instance
The receiving node.
- signalcomm.signalwave.QualityBasedSignal
The transmitted signal. This instance will be modified appropriately within this method. The modification describes how the signal would be attenuated and distorted.
- ant_heightfloat
Height of the sender antenna.
- Returns
- comm.signalwave.QualityBasedSignal
The received signal instance.