Skip to content

Ruiqi-Yan/VLC4DataCenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VLC4DataCenter

The Simulation Platform of Our CS3338 Computer Networks Course Project
Visible Light Communications for Data Centers

VLC4DataCenter Logo

python mit

Project Overview

VLC4DataCenter is a comprehensive web-based simulation platform designed to visualize and analyze the physical layer of Visible Light Communication (VLC) systems. Tailored for Data Center environments, this project simulates optical channel characteristics, noise interference, multipath effects, and evaluates various signal processing algorithms for robust communication.

Key Features

  • Physical Layer Simulation: Models Lambertian radiation, free-space path loss, and optical channel gain.
  • Noise Reduction: Implements and compares multiple filtering algorithms (Wiener, Kalman, etc.).
  • Multipath & Equalization: Simulates Inter-Symbol Interference (ISI) and evaluates equalizers (ZF, MMSE, DFE).
  • Environmental Sensing: Features a polarization diversity receiver model to estimate signal power, ambient light, and polarization angle.
  • Energy Efficiency: Analyzes the trade-off between energy consumption and Block Error Rate (BLER) for $M$-PAM modulation.

Quick Start

Prerequisites

Ensure you have Python 3.8+ installed.

Installation

pip install -r requirements.txt

Usage

Start the Flask server:

python app.py

Open your browser and navigate to http://127.0.0.1:5000.


Simulation Modules & Algorithms

1. Noise Reduction / Filtering

Located in the Overview tab, this module compares raw signal decoding against filtered results.

  • Baseline (Integrate-and-Dump)

    • Concept: Averages samples per bit period to mitigate zero-mean noise.
    • Formula: $\bar{x} = \frac{1}{N}\sum_{i=1}^N x_i$, compared against threshold $\theta = \alpha \cdot h \cdot P_{tx}$.
  • Moving Average

    • Concept: Smooths high-frequency noise using a sliding window.
    • Formula: $y[n] = \frac{1}{w}\sum_{k=0}^{w-1} x[n-k]$.
  • Local Wiener Filter

    • Concept: Adaptive filtering based on local mean $\mu_{local}$ and variance $\sigma_{local}^2$.
    • Gain: $$G = \max\left(0,\ \frac{\sigma_{local}^2-\sigma_n^2}{\sigma_{local}^2}\right)$$
    • Output: $$y[n] = \mu_{local} + G\cdot(x[n]-\mu_{local})$$
  • 1D Kalman Filter

    • Concept: Recursive state estimation minimizing mean squared error.
    • Update Step: $$\hat{x}{k|k} = \hat{x}{k|k-1} + K_k(z_k - \hat{x}_{k|k-1})$$
    • Gain: $$K_k = \frac{P_{k|k-1}}{P_{k|k-1} + R}$$

2. Multipath & Equalization

Located in the Multipath tab. Simulates reflections causing ISI and applies equalization.

  • Channel Model: $y[n] = x[n] * h[n] + w[n]$, where $h[n]$ is the discrete impulse response.
  • Zero Forcing (ZF): Inverts the channel frequency response. $\hat{X}(f) = Y(f) / H(f)$.
  • MMSE Equalizer: Balances noise enhancement and ISI reduction. $$W(f) = \frac{H^*(f)}{|H(f)|^2 + \frac{\sigma_n^2}{S_x(f)}}$$

3. Environmental Sensing (Polarization Diversity)

Located in the Environment tab. Uses a 3-sensor array ($0^\circ, 60^\circ, 120^\circ$) to separate signal from ambient light.

  • Model: $y_i = \frac{1}{2} H P \cos^2(\theta_i - \alpha) + \frac{1}{2} P_{bg} + n_i$
  • Estimation: Solves the system of equations to estimate:
    • $P$: True signal power.
    • $P_{bg}$: Ambient light intensity.
    • $\alpha$: Polarization angle of the transmitter.

4. Energy Efficiency

Located in the Energy Efficiency tab.

  • Analyzes the theoretical energy cost per bit for $M$-PAM modulation under a target Block Error Rate (BLER).
  • Determines the minimum duty cycle $\alpha_{min}$ required to satisfy $P_{e,target}$.

Real-world Experiments

We constructed a hardware VLC system using Arduino and ESP32 development boards to implement basic visible light communication. Due to the frequency limitations of the boards, the speed did not reach theoretical values, but it is still the fastest among similar open-source projects known to us.

Sender Setup

Receiver Setup
Full VLC System
vlc_v1.mp4

Acknowledgment

This project was developed for the CS3338 Computer Networks course. Special thanks to the course instructors and TAs for their guidance.

About

CS3338 Computer Networks Course Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors