Back to Blog
SimulationPythonOptimizationEnergy

Multi-Objective Optimization for Off-Grid Mining Operations

·10 min

Building a simulation environment for solar-powered ASIC mining. Pluggable controller architecture balancing three competing objectives: maximize mining revenue, protect battery health, prevent power spikes.

Three Objectives, One System

Off-grid solar mining faces competing goals. Maximize revenue by running miners at full power when electricity is free. Protect batteries because deep discharge cycles kill lithium cells. Prevent sudden load spikes because they stress inverters and panels.

These objectives conflict. Running at full power maximizes revenue but damages batteries. Protecting batteries means leaving money on the table. Any control strategy must navigate these tradeoffs.

The Physical Constraints

The system has four components with distinct characteristics.

Solar panels produce power proportional to irradiance, degraded by temperature and time. Output varies continuously with weather and sun angle. The resource is free but unpredictable.

Battery banks store energy but degrade with use. Depth of discharge matters: shallow cycles do minimal damage while deep cycles accumulate wear. Temperature accelerates degradation through Arrhenius kinetics—damage roughly doubles for every 10°C above optimal.

Inverters convert DC to AC but have power limits. Exceeding those limits risks equipment damage or shutdown. The limit is hard, not soft.

Miners consume power and produce cryptocurrency. Revenue scales linearly with hashrate, but hashrate scales linearly with power. More power means more money, up to the miner's maximum draw.

Control Strategies

We evaluated three control strategies representing different positions on the tradeoff curve.

The naive strategy maximizes short-term power. If battery state of charge exceeds a floor, run miners at full power. This captures maximum hashrate but treats batteries as consumables. Degradation is fast.

The conservative strategy prioritizes battery health. Limit discharge rates, maintain high minimum state of charge, avoid deep cycles. Batteries last longer, but significant solar generation goes unused. Revenue suffers.

The predictive strategy uses solar forecasts to optimize timing. During peak generation, run hard—solar power is flowing anyway. As afternoon wanes, throttle back to preserve charge for overnight. Plan the day's mining around the day's expected generation.

The Value of Forecasts

Even imperfect solar forecasts enable substantially better outcomes. The forecast doesn't need to be precise—knowing that tomorrow will be sunny versus cloudy changes optimal behavior today.

With forecasts, the controller can reason about future states. If significant generation is expected, it's safe to discharge batteries now. If clouds are coming, preserve charge. This temporal reasoning is impossible for reactive controllers that only see current conditions.

The forecasting problem is well-studied. Weather services provide irradiance predictions. Historical data at the site calibrates predictions to local conditions. The marginal improvement from better forecasts diminishes—a simple forecast captures most of the value.

Pareto Frontiers

No controller dominates all objectives. This is the definition of a Pareto frontier: improvements in one dimension come at the cost of another.

The naive controller sits at one extreme: maximum hashrate, maximum battery degradation. The conservative controller sits at another: minimum degradation, significant hashrate sacrifice. The predictive controller finds a middle ground, capturing most of the hashrate while substantially reducing degradation.

The "right" choice depends on economics. If battery replacement is cheap relative to electricity costs (which are zero in this off-grid scenario), aggressive strategies make sense. If batteries are the primary capital cost, conservative strategies pencil out better.

This framing transforms a control problem into an economic optimization. The objective function weights hashrate and degradation according to their monetary values. Different hardware costs and cryptocurrency prices change the optimal operating point.

Temperature as Hidden Variable

Battery temperature affects both immediate performance and long-term health. Hot batteries degrade faster. But active cooling requires power, reducing net hashrate.

The optimization becomes three-dimensional: balance power draw, cooling investment, and operating temperature. In hot climates, aggressive cooling pays for itself through extended battery life. In temperate climates, passive cooling suffices.

This is a common pattern in physical systems: the obvious variables (power, revenue) interact with hidden variables (temperature, degradation) that only matter over long time horizons. Short-term optimization that ignores hidden variables leads to poor long-term outcomes.

Simulation Before Hardware

The best time to optimize a system is before building it. Simulation lets you explore configurations, test control strategies, and find failure modes without physical risk.

We built the simulation first, validated it against published battery degradation data, then used it to specify hardware. The simulation told us which panel capacity and battery size matched our goals. It identified control strategies that would fail and strategies that would succeed.

Simulation is cheap. Hardware is expensive. Learning in simulation before deploying in reality is straightforward return on investment.

The General Pattern

This project illustrates a broader pattern in control systems. Physical constraints create tradeoffs. Multiple objectives compete. No single strategy dominates.

The solution isn't to eliminate tradeoffs—that's usually impossible. The solution is to make tradeoffs explicit, quantifiable, and navigable. When you understand the Pareto frontier, you can choose your operating point deliberately rather than discovering it through failure.

The mathematics of multi-objective optimization gives us language and tools for this navigation. The specific domain is solar mining, but the structure applies wherever physical systems serve multiple masters.

Questions about this article?

Happy to dive deeper on any of these topics.

Get in Touch