A simulation environment for developing and testing dynamic control systems for off-grid solar-powered ASIC cryptocurrency mining operations.
Running ASIC miners on solar power presents unique challenges due to intermittent energy generation. This simulator models the complex interplay between:
- Fluctuating solar generation (day/night cycle, cloud cover)
- Battery storage with degradation modeling
- ASIC miner power management and efficiency curves
- Base infrastructure loads
The goal is to develop intelligent controllers that maximize mining profitability while protecting equipment.
- Solar Panel Simulation: Configurable max output, day/night cycle, cloud cover modeling
- Battery Model: Accurate kWh energy flow, SoC tracking, charge/discharge limits, voltage simulation, wear calculation
- ASIC Miner Model: Power range control, efficiency curves (underclocking benefits), cooldown periods, hashrate calculation
- Pluggable Controllers: Easy to implement and test new control strategies
- PySide6 GUI: Real-time Plotly charts, system status monitoring, save/load state
pip install PySide6 numpy plotly pandas PySide6-WebEnginepython main.pyUse the GUI to:
- Configure simulation parameters
- Select controller logic
- Start/pause/reset simulation
- Monitor real-time metrics (SoC, hashrate, power flows)
- Save/load simulation states
Controllers are defined in controller.py. To add a new strategy:
- Define a function that accepts
SimulationStateand returns power decisions for each miner - Add it to
CONTROLLER_MAP - Select it from the GUI dropdown
The advanced_controller includes:
- Solar trend prediction
- Dynamic power buffering
- Efficiency-based allocation
- Runtime load balancing
minesimulator/
├── main.py # Entry point
├── gui.py # PySide6 GUI with Plotly charts
├── simulation.py # Core simulation logic
├── controller.py # Control strategies
└── utils.py # Constants, helpers, efficiency curves
- Maximize solar utilization - Use all available solar for mining
- Maximize profitability - Leverage underclocking efficiency gains
- Protect batteries - Minimize unnecessary cycling
- Protect miners - Prevent flapping (frequent power changes)
- Ensure stability - Balance generation and consumption in real-time