Machine-learning assisted solar tracking platform featuring simulation engineering, FastAPI deployment, and an interactive web dashboard.
This project combines mathematical modeling, simulation engineering, and machine learning to optimize solar panel orientation based on the Sun direction vector.
This project demonstrates how mathematical modeling, machine learning, backend engineering, and simulation systems can be integrated into a single real-time engineering workflow.
- Stewart-platform inspired solar tracking simulation
- Six-leg parallel mechanism architecture
- Machine learning angle prediction using Random Forest Regressor
- R² Score > 0.99
- Average prediction error ≈ 0.1°
- FastAPI REST API deployment
- Interactive frontend dashboard
- Constraint-aware tracking logic
- Mechanical tilt and actuator limit validation
Frontend: https://sun-tracking-six-leg-panel-system.vercel.app
Backend API: https://sun-tracking-six-leg-panel-system.onrender.com
API Docs: https://sun-tracking-six-leg-panel-system.onrender.com/docs
Sun Vector
↓
ML Model (Random Forest)
↓
Predicted Zenith
↓
Constraint Validation
↓
3D Simulation Engine
↓
Frontend Dashboard
- sun_x
- sun_y
- sun_z
- required_zenith_deg
- Random Forest Regressor
- R² > 0.99
- Average prediction error ≈ 0.1°
Resolved real-world inference mismatch by aligning training data normalization with production API inputs.
- Handling physically impossible tracking states caused by actuator constraints
- Preventing unstable panel motion near maximum tilt angles
- Aligning ML training data normalization with production API inputs
- Designing a modular architecture between simulation, ML inference, and backend API
- Improving prediction stability during real-time simulation updates
- Real-time animated Sun movement
- Dynamic panel orientation tracking
- Six-leg actuator geometry
- Zenith tilt constraints
- Leg length limit detection
- Color-coded system states
- Live diagnostics panel
- Python
- NumPy
- Pandas
- Matplotlib
- scikit-learn
- FastAPI
- Uvicorn
- SQLite
- HTML
- CSS
- JavaScript
- Git
- GitHub
- PyCharm
- Render
- Vercel
- Docker
uvicorn src.api:app --reloadPOST /predict
Predicts the required panel zenith angle from the given Sun vector.
GET /history
Returns recent prediction history including:
- predicted zenith
- analytic zenith
- prediction error
{
"sun_x": 35,
"sun_y": 69,
"sun_z": 42
}{
"predicted_zenith": 61.32,
"analytic_zenith": 61.50
}
git clone https://github.com/aleynaozdogann/sun-tracking-six-leg-panel-system.git cd sun-tracking-six-leg-panel-system
pip install -r requirements.txt
python src/train_model.py
uvicorn src.api:app --reload
python src/main.py
This project demonstrates the combination of:
- Machine learning in production
- Real-time simulation systems
- Mathematical modeling
- Backend API engineering
- Frontend integration
- Debugging real-world ML deployment issues
- Reinforcement learning based adaptive tracking
- Real-time monitoring dashboard
- Hardware actuator integration
- GPU accelerated simulation
- Cloud-native deployment pipeline
Aleyna Özdoğan
Mathematics graduate focused on:
- Artificial Intelligence
- Backend Development
- Simulation Engineering
- Computational Modeling