vlcsim.scene
Scene Module for VLC Simulation.
This module provides the physical infrastructure components for Visible Light Communication (VLC) simulations. It defines the core classes that represent the physical environment and devices:
- Classes:
AccessPoint: Base class for all communication access points VLed: Visual Light LED access point with optical parameters RF: Radio Frequency access point for fallback communication Receiver: Mobile receiver device with photodetector capabilities Scenario: Complete simulation environment containing room and all devices
- The Scene module handles:
3D spatial positioning of all components
Physical and optical parameters of LEDs and receivers
RF parameters for hybrid VLC/RF systems
Room characteristics (dimensions, reflectance)
SNR and capacity calculations
Time-division multiplexing (TDM) frame management
Example
Creating a basic VLC scenario:
from vlcsim.scene import Scenario, VLed, RF, Receiver
# Create 10x10x3m room with 20 grid points and 0.8 reflection coefficient
scenario = Scenario(10.0, 10.0, 3.0, 20, 0.8)
# Add VLed access point at ceiling center
vled = VLed(5.0, 5.0, 3.0, 2, 2, 20, 60)
vled.sliceTime = 0.1
vled.slicesInFrame = 10
scenario.addVLed(vled)
# Add RF fallback
rf = RF(5.0, 5.0, 1.0)
scenario.addRF(rf)
# Add receiver
receiver = Receiver(3.0, 3.0, 0.85, 1e-4, 0.1, 1.5, 60.0)
# Calculate capacity
capacity = scenario.capacityVled(receiver, vled)
Note
This module uses numpy for numerical computations and supports type hints for better code documentation and IDE support.
Modules
AccessPoint base class for VLC access points. |
|
Receiver device class for VLC simulation. |
|
RF (Radio Frequency) access point class. |
|
Scenario class for managing VLC simulation environments. |
|
VLed (Visible Light LED) access point class. |