vlcsim.scene.receiver.Receiver
- class vlcsim.scene.receiver.Receiver(x: float, y: float, z: float, aDet: float, ts: float, index: float, fov: float, q: float = 1.6e-19, s: float = 0.54, b: float = 10000000.0, ibg: float = 0.0051, cb: float = 1.380649e-23, tk: float = 298.0, a: float = 1.0, gv: float = 10.0, n: float = 1.12e-06, fr: float = 1.5, gm: float = 0.03, i1: float = 0.562, i2: float = 0.0868)[source]
Bases:
objectRepresents a receiver device in the VLC scenario.
The Receiver class models a photodetector device with all physical and electrical parameters required for VLC simulation, including optical and electrical properties, timing information, and connection state.
- receiversCreated
Class variable tracking the total number of receivers created.
- Properties:
Position: x, y, z coordinates and position vector
Optical: aDet (detector area), ts (symbol period), index (refractive index), fov (field of view), gCon (concentrator gain)
Electrical: q (electronic charge), s (photodetector responsivity), b (bandwidth), ibg (background current), cb (Boltzmann constant), tk (temperature), gv (voltage gain), n (capacitance), fr (noise factor), gm (transconductance)
Experimental: i1, i2 (calibration constants)
Connection: capacityFromAP, timeFirstConnected, goalTime, timeActive, timeFinished
Example
>>> receiver = Receiver( ... x=2.5, y=3.0, z=0.85, ... aDet=1e-4, ts=0.1, index=1.5, fov=60.0 ... ) >>> receiver.ID 0
- __init__(x: float, y: float, z: float, aDet: float, ts: float, index: float, fov: float, q: float = 1.6e-19, s: float = 0.54, b: float = 10000000.0, ibg: float = 0.0051, cb: float = 1.380649e-23, tk: float = 298.0, a: float = 1.0, gv: float = 10.0, n: float = 1.12e-06, fr: float = 1.5, gm: float = 0.03, i1: float = 0.562, i2: float = 0.0868) None[source]
Initialize a receiver device with physical and electrical properties.
- Parameters:
x – X coordinate of the receiver position in meters
y – Y coordinate of the receiver position in meters
z – Z coordinate of the receiver position in meters
aDet – Photodetector active area in m²
ts – Symbol period in seconds
index – Refractive index of the optical concentrator
fov – Field of view half-angle in degrees
q – Electronic charge in coulombs (default: 1.6e-19 C)
s – Photodetector responsivity in A/W (default: 0.54 A/W)
b – Receiver bandwidth in Hz (default: 10 MHz)
ibg – Background current in amperes (default: 5.1e-3 A)
cb – Boltzmann constant in J/K (default: 1.380649e-23 J/K)
tk – Absolute temperature in Kelvin (default: 298.0 K)
a – Optical filter gain (default: 1.0)
gv – Open-loop voltage gain (default: 10.0)
n – Photodetector capacitance per unit area in F/m² (default: 1.12e-6 F/m²)
fr – FET channel noise factor (default: 1.5)
gm – FET transconductance in S (default: 3e-2 S)
i1 – Experimental calibration constant (default: 0.562)
i2 – Experimental calibration constant (default: 0.0868)
Note
The receiver is automatically assigned a unique ID upon creation. The concentrator gain (gCon) is calculated from the index and FOV.
Methods
__init__(x, y, z, aDet, ts, index, fov[, q, ...])Initialize a receiver device with physical and electrical properties.
Attributes
Get the unique identifier of this receiver.
Get the optical filter gain.
Get the photodetector active area.
Get the receiver bandwidth.
Get the capacity allocated from the access point.
Get the Boltzmann constant.
Get the field of view half-angle.
Get the FET channel noise factor.
Get the concentrator gain.
Get the FET transconductance.
Get the goal connection time for this receiver.
Get the open-loop voltage gain.
Get the first experimental calibration constant.
Get the second experimental calibration constant.
Get the background current.
Get the refractive index of the optical concentrator.
Get the photodetector capacitance per unit area.
Get the position vector of the receiver.
Get the electronic charge.
Class variable tracking the total number of receivers created.
Get the photodetector responsivity.
Get the effective time the receiver has been connected.
Get the time when the receiver finished its connection.
Get the time when the receiver was first connected.
Get the absolute temperature.
Get the symbol period.
Get the X coordinate of the receiver.
Get the Y coordinate of the receiver.
Get the Z coordinate of the receiver.
- property ID: int
Get the unique identifier of this receiver.
- Returns:
Unique receiver ID assigned at creation
- Return type:
int
- property a: float
Get the optical filter gain.
- Returns:
Optical filter gain (dimensionless, default: 1.0)
- Return type:
float
- property aDet: float
Get the photodetector active area.
- Returns:
Photodetector active area in m²
- Return type:
float
- property b: float
Get the receiver bandwidth.
- Returns:
Receiver bandwidth in Hz (default: 10 MHz)
- Return type:
float
- property capacityFromAP: float | None
Get the capacity allocated from the access point.
- Returns:
Capacity from AP in bits/s, or None if not connected
- Return type:
Optional[float]
- property cb: float
Get the Boltzmann constant.
- Returns:
Boltzmann constant in J/K (default: 1.380649e-23 J/K)
- Return type:
float
- property fov: float
Get the field of view half-angle.
- Returns:
Field of view half-angle in degrees
- Return type:
float
- property fr: float
Get the FET channel noise factor.
- Returns:
FET noise factor (dimensionless, default: 1.5)
- Return type:
float
- property gCon: float
Get the concentrator gain.
This is a read-only property calculated from the refractive index and FOV.
- Returns:
Concentrator gain (dimensionless)
- Return type:
float
- property gm: float
Get the FET transconductance.
- Returns:
FET transconductance in siemens (default: 3e-2 S)
- Return type:
float
- property goalTime: float | None
Get the goal connection time for this receiver.
The goal time represents the required connection duration based on SNR and capacity requirements.
- Returns:
Goal time in seconds, or None if not set
- Return type:
Optional[float]
- property gv: float
Get the open-loop voltage gain.
- Returns:
Open-loop voltage gain (dimensionless, default: 10.0)
- Return type:
float
- property i1: float
Get the first experimental calibration constant.
- Returns:
Calibration constant (default: 0.562)
- Return type:
float
- property i2: float
Get the second experimental calibration constant.
- Returns:
Calibration constant (default: 0.0868)
- Return type:
float
- property ibg: float
Get the background current.
- Returns:
Background current in amperes (default: 5.1e-3 A)
- Return type:
float
- property index: float
Get the refractive index of the optical concentrator.
- Returns:
Refractive index (dimensionless)
- Return type:
float
- property n: float
Get the photodetector capacitance per unit area.
- Returns:
Capacitance in F/m² (default: 1.12e-6 F/m²)
- Return type:
float
- property position: ndarray[Any, dtype[float64]]
Get the position vector of the receiver.
- Returns:
Position as numpy array [x, y, z]
- Return type:
np.ndarray[Any, np.dtype[np.float64]]
- property q: float
Get the electronic charge.
- Returns:
Electronic charge in coulombs (default: 1.6e-19 C)
- Return type:
float
- receiversCreated = 0
Class variable tracking the total number of receivers created.
- property s: float
Get the photodetector responsivity.
- Returns:
Photodetector responsivity in A/W (default: 0.54 A/W)
- Return type:
float
- property timeActive: float
Get the effective time the receiver has been connected.
- Returns:
Active connection time in seconds
- Return type:
float
- property timeFinished: float | None
Get the time when the receiver finished its connection.
- Returns:
Disconnection time in seconds, or None if still active
- Return type:
Optional[float]
- property timeFirstConnected: float | None
Get the time when the receiver was first connected.
- Returns:
Connection time in seconds, or None if not connected yet
- Return type:
Optional[float]
- property tk: float
Get the absolute temperature.
- Returns:
Temperature in Kelvin (default: 298.0 K)
- Return type:
float
- property ts: float
Get the symbol period.
- Returns:
Symbol period in seconds
- Return type:
float
- property x: float
Get the X coordinate of the receiver.
- Returns:
X coordinate in meters
- Return type:
float
- property y: float
Get the Y coordinate of the receiver.
- Returns:
Y coordinate in meters
- Return type:
float
- property z: float
Get the Z coordinate of the receiver.
- Returns:
Z coordinate in meters
- Return type:
float