A comprehensive, full-stack WiFi planning solution that combines advanced electromagnetic simulation with modern web interfaces. This project enables precise WiFi coverage prediction, optimal access point placement, and interactive floor plan annotation for indoor wireless network design.
wifi-planning-system/
βββ src/ # Python Backend & Simulation Engine
β βββ physics/ # Electromagnetic physics models
β βββ propagation/ # Signal propagation engines
β βββ models/ # Machine learning models
β βββ visualization/ # Advanced heatmap generation
β βββ data_collection/ # WiFi data simulation
β βββ preprocessing/ # Data preprocessing utilities
β βββ utils/ # Performance optimization tools
β βββ GUI.py # Desktop GUI application (Tkinter)
β βββ main_four_ap.py # Main simulation engine
β βββ requirements.txt # Python dependencies
βββ wifi-planner-ui/ # React Frontend Web Interface
β βββ src/components/ # React components
β βββ src/store/ # State management (Zustand)
β βββ src/types/ # TypeScript definitions
β βββ package.json # Node.js dependencies
βββ README.md # This file
- Physics-Based Modeling: Electromagnetic wave propagation with material properties
- Multiple Propagation Models: Fast Ray Tracing (FRT), COST-231 Hata, Variable Path Loss Exponent (VPLE)
- Material Science Integration: 20+ building materials with frequency-dependent properties
- 3D Signal Modeling: Full 3D space simulation with height considerations
- Machine Learning: Signal strength prediction and coverage optimization
- High-Resolution Analysis: Up to 200x120 grid sampling for precise predictions
- Interactive Floor Plan Annotation: Drag-and-drop image upload with real-time drawing
- Material Line Definition: Draw walls and obstacles with specific material properties
- Access Point Placement: Manual and automatic AP positioning with drag-and-drop
- Real-Time Validation: Instant feedback on design completeness and validity
- 3D Building Modeling: Define regions, rooms, and multi-story structures
- Export/Import: JSON configuration for seamless backend integration
- Electromagnetic Physics: Precise Maxwell's equations implementation
- Material Attenuation: Real-world material properties (concrete, glass, metal, etc.)
- Multipath Propagation: Direct, reflected, and diffracted signal paths
- Interference Analysis: Co-channel and adjacent channel interference modeling
- Coverage Optimization: AI-driven optimal AP placement algorithms
# Navigate to backend directory
cd src
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Navigate to frontend directory
cd wifi-planner-ui
# Install dependencies
npm install
# Start development server
npm run dev- Python: 3.8+ (Backend)
- Node.js: 16+ (Frontend)
- Memory: 8GB+ RAM recommended for large simulations
- OS: Windows 10+, macOS 10.15+, Linux Ubuntu 18.04+
cd src
python GUI.py- Upload floor plan image
- Define scale (click two points, enter real distance)
- Draw ROI polygons for coverage areas
- Add material lines for walls/obstacles
- Place access points manually
- Generate heatmap via API or local processing
cd wifi-planner-ui
npm run dev
# Open http://localhost:3000- Floor Plan Setup: Upload image, define scale and building dimensions
- Material Definition: Draw material lines and regions with properties
- AP Placement: Use manual or automatic optimization modes
- Parameter Configuration: Set propagation models and target coverage
- Export Configuration: Generate JSON for backend processing
- API Integration: Generate heatmaps directly from web interface
cd src
python main_four_ap.py --config config.jsonMaterial lines represent physical barriers (walls, partitions) that affect WiFi signals:
# Example material properties
materials = {
'concrete': {'permittivity': 4.5, 'conductivity': 0.014, 'thickness': 0.2},
'glass': {'permittivity': 6.0, 'conductivity': 0.004, 'thickness': 0.006},
'drywall': {'permittivity': 2.0, 'conductivity': 0.001, 'thickness': 0.016}
}How it works in simulation:
- Ray Tracing: Traces signal paths from APs to measurement points
- Material Intersection: Identifies which materials the signal traverses
- Attenuation Calculation: Applies frequency-dependent loss for each material
- Multipath Modeling: Calculates reflections, diffractions, and scattering
- Fast Ray Tracing (FRT): High-accuracy 3D electromagnetic simulation
- COST-231 Hata: Industry-standard path loss model with material corrections
- VPLE: Machine learning enhanced variable path loss exponent model
# Optimization strategies
strategies = {
'material_aware': 'Consider building materials in placement',
'signal_propagation': 'Maximize signal strength uniformity',
'coverage_gaps': 'Fill coverage holes and dead zones'
}- Coverage Heatmaps: Signal strength distribution across floor plan
- AP-Specific Maps: Individual access point coverage analysis
- Statistical Analysis: Coverage percentages, signal distribution plots
- 3D Visualizations: Multi-floor and height-dependent analysis
- Interference Maps: Co-channel interference visualization
- PNG/SVG: High-resolution heatmap images
- CSV: Raw signal strength data for analysis
- JSON: Complete configuration and results
- PDF: Professional reports with statistics
// Heatmap generation
POST /api/v1/heatmap/generate
{
"floor_plan": {...},
"ap_locations": [...],
"material_regions": [...],
"signal_model": "FRT",
"grid_resolution": 0.5
}
// Asynchronous processing
POST /api/v1/heatmap/generate-async
GET /api/v1/heatmap/status/{job_id}
GET /api/v1/heatmap/result/{job_id}{
"floor_plan": {
"width_meters": 20.0,
"height_meters": 15.0,
"building_height": 3.0
},
"ap_locations": [
{"x": 5.0, "y": 7.5, "z": 2.7, "tx_power": 20.0}
],
"material_regions": [
{
"x": 10.0, "y": 0.0,
"width": 0.2, "height": 15.0,
"material": "concrete",
"thickness": 0.2
}
],
"global_parameters": {
"frequency": 2.4e9,
"target_coverage": 0.9,
"noise_floor": -95.0
}
}The system implements Maxwell's equations for wireless propagation:
- Free Space Path Loss:
FSPL = 20*log10(4Οd/Ξ») - Material Attenuation: Frequency-dependent complex permittivity
- Reflection Coefficients: Fresnel equations for material interfaces
- Diffraction: Knife-edge and multiple obstacle diffraction
- Neural Networks: Signal strength prediction based on environmental features
- Genetic Algorithms: Optimal AP placement optimization
- Reinforcement Learning: Adaptive coverage optimization (planned)
- Real-World Validation: Compared against actual WiFi measurements
- Industry Standards: Compliance with IEEE 802.11 specifications
- Benchmarking: Performance comparison with commercial tools
- Vectorized Calculations: NumPy/SciPy for fast computation
- Parallel Processing: Multi-core utilization for large simulations
- Memory Management: Efficient handling of high-resolution grids
- Caching: Material property and calculation result caching
# Backend development
cd src
pip install -r requirements.txt
pip install -e . # Editable install
# Frontend development
cd wifi-planner-ui
npm install
npm run dev
# Full system test
npm run build
python src/main_four_ap.py --test- Backend: Python with NumPy, SciPy, scikit-learn, matplotlib
- Frontend: React 18, TypeScript, Tailwind CSS, Konva.js
- State Management: Zustand (frontend), direct Python objects (backend)
- API: FastAPI for backend communication
- Testing: pytest (backend), Jest (frontend)
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Add comprehensive tests for new functionality
- Ensure scientific accuracy for physics-related changes
- Update documentation for API changes
- Submit pull request with detailed description
- Small Building (20x15m): ~2-5 seconds
- Medium Building (50x40m): ~10-30 seconds
- Large Building (100x80m): ~1-3 minutes
- Multi-Floor (3 floors): ~2-10 minutes
- Signal Prediction Error: Β±3 dBm (typical)
- Coverage Prediction: Β±5% area accuracy
- Material Modeling: Validated against IEEE standards