Abstract
This study addresses the techno-economic optimization of grid-connected hybrid renewable energy systems for commercial applications in Tunisia, a sun-rich developing nation facing high diesel dependency and severe summer peak demand. A nonlinear optimization model co-optimizes component sizing and hourly dispatch over a 20-year horizon under Tunisian conditions, including 2100 kWh/m2/year solar irradiance, a diesel fuel cost of 1.50/L, explicit carbon pricing of 0.15/kg CO2, and time-of-use grid tariffs. The optimized system selects 150 kW of PV and a 200 kWh battery, achieving a 57.1% PV contribution, 40.5% diesel generation, and 2.4% grid imports, with a total lifecycle cost of $610,424, a payback period of 3 years, and annual CO2 emissions of 89,074 kg CO2. Diesel fuel price emerges as the dominant lifecycle cost driver, with discount rate ranking second, underscoring the importance of financing conditions alongside fuel cost management in emerging markets. The novelty of this work lies in proposing a unified optimization framework that simultaneously integrates four high-fidelity elements under Tunisian economic constraints, including nonlinear diesel efficiency modeling, state-of-charge-dependent battery degradation, explicit carbon pricing, and time-of-use grid tariffs, whereas prior studies typically address these factors in isolation. The objectives are twofold: first to quantify cost-optimal sizing and dispatch for PV-diesel-battery-grid systems; and second to identify actionable policy thresholds that shift systems toward decarbonization without compromising reliability.