vlcsim.scene.rf.RF

class vlcsim.scene.rf.RF(x: float, y: float, z: float, bf: float = 5000000.0, pf: float = 40, BERf: float = 0.0001, Af: float = 10.0, Ef: float = 1.0, R_awgn: float = 3.981071705534985e-18, N_rf: int = 10, nFactor_rf: float = 1.0, A: float = 100000.0)[source]

Bases: AccessPoint

Radio Frequency (RF) access point for fallback communication.

RF represents a wireless access point that provides fallback connectivity when VLC is unavailable or congested. It implements a femtocell-based RF communication system with configurable transmission power, bandwidth, and channel characteristics.

RF access points are typically used in hybrid VLC/RF systems to ensure continuous connectivity, especially when LOS (Line of Sight) to VLed is blocked.

Class Attributes:

numberOfRFs (int): Counter tracking total number of RF instances created

Properties:
Inherited from AccessPoint:

x, y, z, position, state, ID, B, sliceTime, slicesInFrame

RF-specific:

bf (float): Femtocell bandwidth in Hz pf (float): Transmission power in dBm BERf (float): Target Bit Error Rate Af (float): Pathloss constant (dimensionless) Ef (float): Pathloss exponent (dimensionless) R_awgn (float): Normalized AWGN noise power pif (float): SNR discrepancy at target BER (read-only) N_rf (int): Number of cells using this femtocell nFactor_rf (float): RF constant factor A (float): Rayleigh distributed channel gain

Example

Creating an RF access point for fallback:

# Basic RF at room center, 1m height
rf = RF(x=5.0, y=5.0, z=1.0)

# RF with custom parameters
rf = RF(x=5.0, y=5.0, z=1.0,
       bf=5e6,      # 5 MHz bandwidth
       pf=40,       # 40 dBm transmission power
       BERf=1e-5)   # Target BER of 10^-5

# Configure TDM parameters
rf.sliceTime = 0.1
rf.slicesInFrame = 10

Note

  • Automatically calculates pif based on BERf

  • Default values suitable for indoor femtocell deployment

  • ID is auto-assigned incrementally starting from 0

  • Typically positioned at lower heights than VLeds

__init__(x: float, y: float, z: float, bf: float = 5000000.0, pf: float = 40, BERf: float = 0.0001, Af: float = 10.0, Ef: float = 1.0, R_awgn: float = 3.981071705534985e-18, N_rf: int = 10, nFactor_rf: float = 1.0, A: float = 100000.0) None[source]

Initialize an RF access point with wireless communication parameters.

Creates an RF access point with specified position and radio parameters. Automatically calculates SNR discrepancy (pif) based on target BER.

Parameters:
  • x – X-coordinate position in meters

  • y – Y-coordinate position in meters

  • z – Z-coordinate position in meters (typically lower than VLeds)

  • bf – Femtocell bandwidth in Hz (default: 5 MHz)

  • pf – Transmission power in dBm (default: 40 dBm)

  • BERf – Target Bit Error Rate (default: 10^-4)

  • Af – Pathloss constant, dimensionless (default: 10.0)

  • Ef – Pathloss exponent, dimensionless (default: 1.0)

  • R_awgn – Normalized AWGN noise power in watts (default: 10^(-17.4))

  • N_rf – Number of cells using this femtocell (default: 10)

  • nFactor_rf – RF constant factor (default: 1.0)

  • A – Rayleigh distributed channel gain (default: 0.1 MHz)

Example:

# Basic RF with defaults
rf = RF(x=10.0, y=10.0, z=1.0)

# RF with custom bandwidth and power
rf = RF(x=10.0, y=10.0, z=1.0,
       bf=10e6,     # 10 MHz
       pf=43,       # 43 dBm
       BERf=1e-6)   # Lower BER target

Note

  • pif is automatically calculated as -1.5 / ln(5 * BERf)

  • RF ID is auto-assigned from numberOfRFs class counter

  • Default parameters suitable for indoor femtocell

Methods

__init__(x, y, z[, bf, pf, BERf, Af, Ef, ...])

Initialize an RF access point with wireless communication parameters.

setBUSY()

Set this access point to BUSY state.

setIDLE()

Set this access point to IDLE state.

Attributes

A

Get the Rayleigh distributed channel gain.

Af

Get the pathloss constant.

B

Get the bandwidth of this access point.

BERf

Get the target Bit Error Rate for the femtocell network.

Ef

Get the pathloss exponent.

ID

Get the unique identifier of this access point.

N_rf

Get the number of cells using this femtocell.

R_awgn

Get the normalized AWGN noise power.

bf

Get the femtocell bandwidth.

nFactor_rf

Get the RF constant.

numberOfRFs

pf

Get the femtobase transmission power.

pif

Get the received SNR discrepancy.

position

Get the 3D position vector of this access point.

sliceTime

Get the time duration of each TDM slice.

slicesInFrame

Get the number of time slices in each TDM frame.

state

Get the current operational state of this access point.

x

Get the X-coordinate of this access point.

y

Get the Y-coordinate of this access point.

z

Get the Z-coordinate of this access point.

property A: float

Get the Rayleigh distributed channel gain.

Returns:

Rayleigh channel gain (dimensionless, default: 1.0)

Return type:

float

property Af: float

Get the pathloss constant.

Returns:

Pathloss constant (dimensionless, default: 10.0)

Return type:

float

property B: float

Get the bandwidth of this access point.

Returns:

Bandwidth in Hz (default: 1 MHz)

Return type:

float

property BERf: float

Get the target Bit Error Rate for the femtocell network.

Returns:

Target BER (default: 10^-4)

Return type:

float

property Ef: float

Get the pathloss exponent.

Returns:

Pathloss exponent (dimensionless, default: 3.0)

Return type:

float

property ID: int | None

Get the unique identifier of this access point.

Returns:

Access point ID, None if not yet assigned

Return type:

int or None

property N_rf: int

Get the number of cells using this femtocell.

Returns:

Number of RF cells (default: 1)

Return type:

int

property R_awgn: float

Get the normalized AWGN noise power.

Returns:

Normalized AWGN noise power in dBm (default: -203.975 dBm)

Return type:

float

property bf: float

Get the femtocell bandwidth.

Returns:

Bandwidth in Hz (default: 5 MHz)

Return type:

float

property nFactor_rf: float

Get the RF constant.

Returns:

RF constant value (dimensionless, default: 0.5)

Return type:

float

property pf: float

Get the femtobase transmission power.

Returns:

Transmission power in dBm (default: 40 dBm)

Return type:

float

property pif: float

Get the received SNR discrepancy.

The SNR discrepancy from the continuous input memoryless channel’s capacity at the target BER, calculated as:

\[pif = -1.5 \log_2^{-1}(5 \cdot BERf)\]
Returns:

SNR discrepancy value

Return type:

float

Note

This value is automatically calculated from the target BER.

property position: ndarray[Any, dtype[float64]]

Get the 3D position vector of this access point.

Returns:

Position vector [x, y, z] in meters

Return type:

ndarray

setBUSY() None

Set this access point to BUSY state.

Transitions the access point to BUSY, indicating it is actively serving connections.

setIDLE() None

Set this access point to IDLE state.

Transitions the access point to IDLE, indicating it is ready to accept new connections.

property sliceTime: float

Get the time duration of each TDM slice.

The slice time determines how long each connection can use the access point in a single time slice.

Returns:

Slice time duration in seconds (default: 0.1s)

Return type:

float

property slicesInFrame: int

Get the number of time slices in each TDM frame.

This determines the frame structure for time-division multiplexing. Total frame duration equals sliceTime * slicesInFrame.

Returns:

Number of slices per frame (default: 10)

Return type:

int

property state: state

Get the current operational state of this access point.

Returns:

Current state, either IDLE or BUSY

Return type:

stateap

stateap(value)

alias of state

property x: float

Get the X-coordinate of this access point.

Returns:

X-coordinate in meters

Return type:

float

property y: float

Get the Y-coordinate of this access point.

Returns:

Y-coordinate in meters

Return type:

float

property z: float

Get the Z-coordinate of this access point.

Returns:

Z-coordinate in meters (typically height)

Return type:

float