Demand response (DR) is a key strategy for strengthening the economic efficiency, planning and operational stability of microgrids. This paper proposes an incentive-based DR program implemented through agent-based reinforcement learning, designed to optimize the profit of both the distribution system operator and load operator, while maintaining customer comfort. Concurrently, an analytical technique ascertains the optimal size of distribution generators (DG) and their respective location by minimizing a multi-index objective comprising active loss voltage deviation, reactive power losses and MVA burden. To address the uncertainty inherent in renewable-based DGs, the beta probability distribution function (PDF) is applied for solar power and the Weibull probability function is applied for wind power uncertainty. The performance of the proposed methodology is tested on a modified IEEE 33-bus distribution system, which consists of DGs and load operators. Results demonstrate that integrating DR with optimally placed DGs leads to a 8.96% reduction in power demand, 11.74% reduction in power loss, and 8.86% reduction in total cost. Additionally, the total profit for the distribution system operator increases to $ 379.1310/day. The daily incentives earned for load reduction varied across agents. L1 received $4.8990 for cutting 181.9520 kW, while L2 earned $7.3743 for a 274.0533 kW reduction. L3 was awarded $15.6795 after decreasing usage by 492.3093 kW, and L4 gained $26.1324 for 820.5156 kW. The highest incentive, $71.8010, was awarded to L5 for curtailing 2025.6234 kW, and L6 received $39.9005 for a 1012.8211 kW reduction, based on their priority level. An analysis of the strategy’s efficacy in optimizing microgrid operational performance and financial sustainability.
Coordinated scheduling of distributed generation (DG), battery energy storage systems (BESS) and demand response (DR) is needed to reduce grid procurement costs without compromising customer comfort or network constraints. This paper proposes a two-stage framework for a grid-connected IEEE 33-bus microgrid. In the first stage, the Red Panda Optimization (RPO) algorithm jointly determines the locations and ratings of renewable DG units and BESS by minimizing power losses and voltage deviation. In the second stage, five customer agents with different cost–comfort preferences and three BESS agents learn their hourly schedules under real-time pricing using multi-agent Q-learning. Two incentive regimes are compared within the same decentralized framework: a price-only, customer-driven regime and an incentive-coordinated regime in which the grid operator broadcasts a shadow-price signal. Compared with the DG-only case, the two regimes reduced daily demand by 2.36% and 12.21%, energy loss by 4.53% and 27.79%, and procurement cost by 3.25% and 12.99%, respectively. Customer load curtailment provides all the demand and loss reduction and most of the cost reduction, while BESS arbitrage lowers the cost by a further 0.62 and 0.61% points at the expense of slightly higher losses. The incentive design, rather than the control architecture, largely determines how these benefits are shared between the operator and customers.