Skip to content

System Optimization

The Differential Evolution Solver

At the algorithmic core of SPARK (core/dashboard_service.py) lies the optimization engine. The simulator utilizes scipy.optimize.differential_evolution to find the optimal hybrid-electric powertrain configuration.

Differential Evolution was chosen because it is a global, population-based stochastic search algorithm. Traditional gradient-descent methods often fail in this context due to the highly non-linear, non-convex nature of the objective function. A primary cause of this non-convexity is the "stair-step" behavior of battery replacement costs: a fractional increase in battery degradation might trigger an entire additional replacement cycle, creating a discontinuous jump in operational costs. A population-based approach naturally navigates these discrete steps and avoids getting trapped in local minima.

The 7-Dimensional Search Space

The optimization problem explores a 7-dimensional continuous search space, bounded between 0 and 1 (or predefined constraints), to dictate the aircraft's energy management strategy. The optimized decision variables are:

  1. \(\alpha_{\text{Taxi}}\): Hybridization proportion during the Taxi phase.
  2. \(\alpha_{\text{Takeoff}}\): Hybridization proportion during the Takeoff phase.
  3. \(\alpha_{\text{Climb}}\): Hybridization proportion during the Climb phase.
  4. \(\alpha_{\text{Cruise}}\): Hybridization proportion during the Cruise phase.
  5. \(\alpha_{\text{Descent}}\): Hybridization proportion during the Descent phase.
  6. \(\alpha_{\text{Reserve}}\): Hybridization proportion allocated for regulatory Reserve energy.
  7. oversize_factor: A factor determining the excess capacity built into the battery pack beyond strict mission requirements (to reduce Depth of Discharge and increase lifecycle).

An \(\alpha\) value of 0 implies a 100% thermal/conventional power split, while an \(\alpha\) of 1 implies 100% electric power for that specific phase.

Multi-Objective Cost Function

The solver evaluates each configuration against a multi-objective cost function that balances environmental and economic targets. The raw fitness value to be minimized is defined as:

\[ J = (w_{\text{eco}} \cdot \text{co2_ratio}) + (w_{\text{econ}} \cdot \text{profit_penalty}) \]

Where \(w_{\text{eco}}\) and \(w_{\text{econ}}\) are user-defined weights prioritizing either ecological impact or economic profitability.

To ensure both objectives scale comparably, they are normalized against a 100% thermal baseline aircraft: - \(\text{co2_ratio} = \frac{CO_{2,\text{hybrid}}}{CO_{2,\text{thermal}}}\) - \(\text{profit_penalty} = \frac{\text{Profit}_{\text{thermal}} - \text{Profit}_{\text{hybrid}}}{\text{Profit}_{\text{thermal}}}\)

This formulation ensures that the optimizer seeks a Pareto-optimal frontier, finding the best compromise between reducing carbon emissions and maintaining airline profitability.

Revenue Management & Offloading Penalties

A critical challenge in hybrid aircraft design is managing the mass penalty of batteries. As the optimizer increases the electrical hybridization (Alphas), the required battery mass increases. If the Maximum Takeoff Weight (MTOW) constraint is violated, the model enforces a strict penalty by "offloading" payload.

The solver must arbitrate between the benefits of carrying a larger battery (less fuel burn, lower emissions) and the severe economic penalty of offloading paying passengers. The opportunity cost is calculated directly into the economics:

\[ \text{Revenue Lost} = \text{pax_offloaded} \cdot \text{ticket_price} \]

If a configuration requires offloading too many passengers to carry the battery, the resulting profit penalty will cause the optimizer to reject that solution, pushing the algorithm toward a feasible, financially viable design point.