Next Article in Journal
Optimal Voltage Regulator Placement in the Guayacanes Feeder of the Buena Fe Substation: A Multi-Criteria Exhaustive Search Framework for an Ecuadorian Distribution System
Previous Article in Journal
Aged Lithium Iron Phosphate and Nickel Manganese Cobalt Electric Vehicle Batteries Internal Structure Analysis and Comparison Using Industrial Computed Tomography
Previous Article in Special Issue
Multi-Time-Scale Layered Energy Management Strategy for Integrated Production, Storage, and Supply Hydrogen Refueling Stations Based on Flexible Hydrogen Load Characteristics of Ports
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Field-Validated Two-Layer Dispatch Framework for a Rural Hybrid Microgrid with Power Quality and Environmental Assessment

1
Clean Energy System Research Unit (CES-RMUTL), Division of Electrical Engineering, Faculty of Engineering, Rajamangala University of Technology Lanna (RMUTL), Chiang Mai 50300, Thailand
2
Department of Electrical Engineering, Faculty of Engineering, Pathumwan Institute of Technology, Bangkok 10330, Thailand
*
Author to whom correspondence should be addressed.
Energies 2026, 19(12), 2791; https://doi.org/10.3390/en19122791
Submission received: 26 April 2026 / Revised: 25 May 2026 / Accepted: 6 June 2026 / Published: 10 June 2026
(This article belongs to the Special Issue Energy Storage Technologies and Applications for Smart Grids)

Abstract

This study presents a field-validated, scenario-based two-layer dispatch framework for sustainable rural electrification, demonstrated at the Khlong Ruea hybrid microgrid (50 kW micro-hydro, 20 kWp PV, 48 kWh LiFePO4 BESS, 48 kW diesel) in Chumphon Province, southern Thailand. The framework combines an offline mixed-integer linear program (MILP) with scenario-based uncertainty handling (k-medoid clustering, N = 8; CVaR penalty at α = 0.9) and an operator-assisted execution layer implementing source transitions via manual changeover switches. A Fluke 435 IEC 61000-4-30 Class-A field campaign with stationary block-bootstrap inference (B = 2000 resamples, 10 min blocks) documented substantial power quality improvements under BESS supply: the three-phase average THD-V reduced from 5.4% to 2.9% with 95% confidence intervals that do not overlap between the two supply modes; the THD-I dropped from 55.8% to 4.9% (Phase A; 91.2% reduction; three-phase average 64.0% → 7.8%); the voltage unbalance fell from 0.86% to 0.03%; and the displacement power factor improved from 0.92 to 0.95. IEEE Std 1459-2010 decomposition reveals that 93% of the non-fundamental apparent power under diesel supply is attributable to current-distortion volt-amperes (Dᵚ = 4737 VA vs. 283 VA under BESS). A composite power quality index confirms that diesel operation fails the IEEE 519-2022 current-distortion limits while BESS supply satisfies all EN 50160 and IEEE 519-2022 thresholds (PQI: 0.75 vs. 3.89). A 365-day closed-loop simulation confirmed an 18.4% reduction in annual operating cost and a 27.6% reduction in diesel runtime relative to a rule-based baseline, while maintaining LPSP at or below 0.53%. Techno-economic projection from field-verified HOMER inputs reduced the levelized cost of electricity from approximately 0.69 USD/kWh (diesel-only) to 0.36 USD/kWh for the proposed PV + BESS + Hydro + Diesel configuration, which retains diesel as a low-utilization backup at a near-100% renewable energy share. The same configuration delivered a 47.9% net present cost advantage over diesel-only operation and a 12.8 t (82%) annual CO2 reduction. Manual source-transfer interruptions of 1–3 min are fully characterized, and a cost-estimated ATS + SCADA upgrade roadmap is defined.

1. Introduction

The global transition toward sustainable energy has accelerated over the past decade, driven by declining technology costs, the urgency of climate action, and widespread policy support for distributed generation [1,2]. During this transition, hybrid renewable microgrids that combine photovoltaic (PV) arrays, battery energy storage systems (BESSs), small-scale hydropower, and diesel backup have emerged as a technically mature and economically attractive option for electrifying rural communities that remain beyond the reach of reliable grids [1,2,3]. International assessments consistently report that the levelized costs of solar and storage have fallen sufficiently to make near-100% renewable configurations competitive with diesel-only operation at many off-grid sites [4,5]. Simultaneously, the operational complexity of such systems—uncertain resource availability, seasonal variability, and the need to balance cost, reliability, and environmental performance—continues to motivate active research in sizing, dispatch, and control [6,7,8]. These cost, reliability, and environmental trade-offs explain why hybrid microgrids now sit at the intersection of Sustainable Development Goal 7 (affordable, clean energy for all) and the practical engineering challenges of rural electrification [9], thus motivating the focused field study reported below.
Thailand articulates this global direction through two complementary policy instruments. The Alternative Energy Development Plan (AEDP 2018–2037) targets a 30% renewable share in final energy consumption, and the Power Development Plan (PDP 2018-Rev.1) promotes distributed generation for remote communities where extension of the national grid is uneconomic [6,10,11]. For rural villages in the mountainous north and the forested south, hybrid microgrids that combine PV, BESSs, hydropower, and diesel backup offer a viable pathway to reliable and affordable electrification [1,3,11]. Khlong Ruea—a rural community in Pak Song Sub-district, Phato District, Chumphon Province—is representative of this context: its forested watershed supports seasonal micro-hydro generation, its annual solar resource is suitable for distributed PV, and its community-scale peak demand of approximately 50 kW aligns with the sizing range reported for similar rural hybrid systems elsewhere in Southeast Asia and in comparable settings [3,12,13,14]. Our prior techno-economic study at this site [1] established a near-100% renewable design basis (renewable energy fraction RF = 87.3%, with diesel retained as a low-utilization backup) and reduced the levelized cost of electricity from approximately 0.69 USD/kWh (diesel-only) to 0.36 USD/kWh for the proposed PV + BESS + Hydro + Diesel configuration shown in Figure 1 [1,4,5]. All monetary values in this manuscript are reported in United States dollars (USD; 1 USD = 35 THB, 2024 annual average).
Microgrid dispatch and energy management have been investigated through three main paradigms. Rule-based strategies are simple to implement and to deploy in the field, but they are known to leave cost and reliability margins on the table [7,8,15]. Mixed-integer linear program (MILP) formulations offer a tractable way to capture unit commitment, storage limits, and fuel consumption in a single optimization [2,16,17,18]. Model predictive control (MPC), including its economic, stochastic, and robust variants, is widely reported to further reduce operating costs and to improve renewable penetration under forecast uncertainty [10,11,19,20,21]. Across these studies, optimized dispatch has been shown to reduce fuel consumption by approximately 20–40% and to raise the renewable share compared with rule-based alternatives [7,8,19]. Power quality is a second axis of active research: field and simulation studies document that BESS-supported operation improves voltage total harmonic distortion (THD-V), current distortion (THD-I), unbalance, and flicker relative to diesel-only supply [22,23,24], and BESS-led restoration is now recognized as central to black-start and seamless-islanding procedures [25]. Standards for measurement and control—IEC 61000-4-30 Class A for power quality [26], IEC 61724-1 for PV monitoring [27], and IEEE Std 2030.7/2030.8 for microgrid-controller specification and testing [28,29]—provide the methodological foundation on which comparable field evaluations can be built.
Despite this progress, a systematic gap persists between theoretical dispatch research and field reality in rural hybrid microgrids. First, most optimization and MPC formulations assume automated actuation, whereas rural deployments such as Khlong Ruea rely on operator-assisted manual source transfer that introduces 1–5 min interruptions, which are largely absent from idealized dispatch models [10,11,30,31,32,33]. Second, field-measured power quality data that directly compare diesel-supply and BESS-supply operation within the same microgrid, acquired under IEC 61000-4-30 Class-A conditions, remain scarce in the rural electrification literature [3,19,20,23,24]. Third, published studies rarely document how an offline MILP or MPC schedule is executed in practice—including measured interruption durations, operational deviations, and operator workload—thereby leaving the loop from offline optimization to field performance incompletely closed [6,12,33,34]. Fourth, existing 100–renewable reliability assessments seldom provide a cost-estimated upgrade pathway from manually operated systems to fully automated control, making it difficult for rural operators and policymakers to plan incremental investment [16,17,18,35]. Taken together, these gaps motivate a field-grounded, two-layer framework that can be executed by an operator, measured with Class-A instrumentation, and incrementally upgraded toward automated control.
This study extends our earlier contribution [1], which reported HOMER-based sizing and preliminary energy-flow analysis for Khlong Ruea, and addresses the gaps identified above through five specific advances. First, we formulate a two-layer dispatch framework with explicit decision/given-variable partitioning, a Weie-strass-type existence argument, k-medoid scenario uncertainty handling (N = 8 clusters), and a conditional value-at-risk (CVaR) tail penalty, executed by a human operator rather than by automatic actuation. Second, we present a multi-scenario 365-day closed-loop simulation with state-of-charge (SoC) and depth-of-discharge (DoD) time histories, loss-of-power-supply probability (LPSP), and expected energy not supplied (EENS). Third, we report a quantitative comparison between the proposed MPC-based scheme and a rule-based baseline, together with a parameter sensitivity analysis over horizon length, sampling interval, and objective weights. Fourth, we provide IEC 61000-4-30 Class-A power-quality evidence that contrasts diesel-supply and BESS-supply modes across THD-V, THD-I, voltage unbalance, power factor, and flicker, benchmarked against published values. Fifth, we document the operator-assisted execution procedure—including measured 1–3 min interruption durations—and propose a cost-estimated upgrade roadmap to automatic transfer switch (ATS) and supervisory control and data acquisition (SCADA) integration. The combined pain points addressed are the cost–reliability–quality trade-off under seasonal resource variability, the operator-workload constraint inherent to rural operation, and the absence of a field-validated migration path from manual to automated control. The novelty lies in closing the loop from offline optimization to field-measured execution within a single site and in linking that closed loop to an explicit upgrade pathway. The manuscript aims to integrate three parts that, to our knowledge, have not previously been combined within a single field-validated rural microgrid deployment study: (i) a scenario-based MILP with k-medoids uncertainty handling and a CVaR tail-risk penalty [7,8,10,36,37]; (ii) IEC 61000-4-30 Class-A power-quality validation that contrasts diesel-supply and BESS-supply operation under field conditions [23,24,26]; and (iii) a cost-estimated upgrade roadmap from operator-assisted execution to fully automated transfer switching [1,28,29].
The remainder of the manuscript is organized as follows. Section 2 describes the site, the system configuration, the measurement setup, and the scenario-based optimization model, including uncertainty handling and solver statistics. Section 3 reports the field campaign, the 365-day rolling simulation, the power quality evaluation, the techno-economic and environmental results, the sensitivity analysis, and the upgrade path. Section 4 discusses the findings in the context of the prior study and the identified gaps and acknowledges the limitations of the study. Section 5 concludes the study.

2. Materials and Methods

2.1. Site Background and Prior Study Summary

Khlong Ruea is a rural community in Pak Song Sub-district, Phato District, Chumphon Province, southern Thailand, situated in a forested watershed area. The community of approximately 120 households historically relied on diesel generators and seasonal picohydro for electrification. Our prior design study [1] conducted at this site used HOMER Pro microgrid software (Version 3.14.5, UL Solutions, Boulder, CO, USA) to screen 216 system configurations across five portfolios ranging from diesel-only to 100% renewable. The recommended configuration—adopted in this study—integrates a 50 kW cross-flow micro-hydro turbine exploiting the 3.2 m head and seasonal flow of the Khlong Ruea stream, a 20 kWp south-facing PV array, a 48 kWh/22 kW LiFePO4 BESS, and a 48 kW diesel generator for resilience. The HOMER simulation in [1] projected a net present cost (NPC) of USD 82,000 (~2.87 million THB) over 25 years and a renewable energy fraction of 87.3% in normal hydrological conditions.
The hybrid microgrid (Figure 1, Components A, B, and D are connected directly to the AC bus, while the solar PV system (C) supplies power through the inverter to meet the load demand.) follows an AC single-bus architecture compliant with IEEE Std 2030.7-2017 [28]. The merit-order dispatch prioritizes: (1) run-of-river hydro whenever available (July–December); (2) PV to serve the daytime load and charge the BESS via the 22 kW bidirectional inverter; and (3) a 48 kW diesel generator committed for the high-load evening window when renewable capacity is insufficient. Solar resource assessment used NASA POWER satellite reanalysis data validated by on-site pyranometer readings [38,39]. Hydrological potential was screened against run-of-river criteria, including minimum ecological flow and seasonal variability [40]. Table 1 lists the full system specifications.

2.2. Two-Layer Energy Management System

The energy management system (EMS) operates in two functionally distinct layers (Figure 2), consistent with the hierarchical control framework described in IEEE Std 2030.7-2017 [28] and reviewed in [7,8]. The first layer is an offline dispatch optimization model (Section 2.4) that computes the cost-minimal generation schedule for the upcoming operating day based on forecast load profiles, predicted solar irradiance, and declared hydro availability. The schedule is expressed as a time-indexed table specifying diesel commitment windows, BESS charge/discharge periods, and PV curtailment flags. The second layer is the field execution layer, in which a trained local operator reads the schedule and manually executes source transfers using lockable changeover switches at the main distribution panel. Primary voltage (380 V ± 5%) and frequency (50 Hz ± 0.2 Hz) regulation is handled in real time by droop-based control implemented in the diesel engine governor and the BESS inverter firmware—requiring no operator intervention during steady-state operation.
The two-layer architecture was chosen for Khlong Ruea on practical grounds: automated transfer switches, remote communication infrastructure, and edge computing are capital-intensive additions that were outside the initial project scope documented in [1]. The present field campaign quantifies the operational consequences of this choice, particularly the 1–3 min supply interruption per transfer, as the key performance gap that future automation must close.
The ‘two layers’ in this work refer to two functionally and physically distinct activities at Khlong Ruea, not to two coupled online optimization problems. Layer 1 is the offline scenario MILP that produces the 24 h schedule. Layer 2 is the manual execution of that schedule by the trained local operator, which involves walking to the main distribution panel and throwing a lockable changeover switch between the diesel feed and the BESS feed. There is no online control optimization at the operator interface; primary voltage and frequency regulation are handled by the diesel governor and the BESS inverter firmware in real time, independent of the operator.
An integrated single-layer formulation that solves the daily and intra-day decisions jointly is computationally feasible (Section Extended Benchmarking Against Stochastic and Robust Controllers—Optimality Certificate from the MIP Gap reports such a benchmark obtained on a desktop workstation), but its in-field deployment at Khlong Ruea would still require the operator to physically execute every source transfer. The practical performance ceiling for the existing hardware is therefore the schedule–execution gap (the 1–3 min interruption per manual transfer, Section 2.6), not the controller cadence. Replacing the manual switch with an automatic transfer switch and adding SCADA telemetry—the upgrade pathway cost in Section 3.10—removes this physical barrier and enables a single integrated online MPC. The migration from the present two-layer arrangement to a single integrated controller is therefore a deployment-pathway question, addressed in Section Future Work.

2.3. Measurement and Data Acquisition

Two complementary instruments were deployed in parallel at the main 380 V distribution bus throughout the 100 h field campaign. Power quality measurements were acquired using a Fluke 435 Three-Phase Power Quality Analyzer (Fluke Corporation, Everett, WA, USA), fully compliant with IEC 61000-4-30 Class A [26]. The Fluke 435 provides certified measurements of three-phase voltage (1–1000 V r m s ), current, active/reactive/apparent power, power factor, displacement power factor, THD-V and THD-I up to the 50th harmonic, voltage events (dips/swells/interruptions), transients, flicker ( P s t / P l t ), and voltage unbalance, all at the 10/12-cycle aggregation interval mandated by Class A. Table 2 summarizes key accuracy specifications.
For long-term energy accounting, a Fluke 1730 Three-Phase Energy Logger (Fluke Corporation, Everett, WA, USA) was deployed in parallel to record kWh consumption, demand profiles, and load factor. The current measurement used Fluke iFlex1500-12 flexible Rogowski probes (Fluke Corporation, Everett, WA, USA) (150/1500 A dual-range). PV subsystem monitoring was performed in accordance with IEC 61724-1:2021 [15], with performance ratio and specific yield computed from the Fluke 1730 energy data and the NASA POWER irradiance baseline. Both instruments were time-synchronized to GPS-disciplined UTC before each measurement session.

2.4. Scenario-Based Dispatch Optimization Model

This section states the optimization problem, identifies the decision and given variables, formalizes the scenario-based treatment of uncertainty, establishes the existence of a global minimizer, reports the selected horizon/step/weights, and presents the solution algorithm with computational statistics. The formulation addresses the gaps in transparency, uncertainty, and reproducibility identified in recent MPC reviews [10,11,20]. Table 3 classifies all decision, state, disturbance, and parameter variables used throughout the formulation.
Taken in isolation, the formulation that follows (a multi-scenario MILP with k-medoid scenario discretization, an additive CVaR tail-risk term, and a receding-horizon implementation) builds on established literature [10,11,30,31,36,37] and is not in itself a methodological breakthrough. The intended contribution of this work lies in the integration of three elements: (i) a field-calibrated CVaR weight selected against the measured 0.5% LPSP design target rather than chosen by convention; (ii) explicit accommodation of operator-assisted execution latency in the dispatch evaluation (Section 2.5 and Section 2.6), an aspect routinely absent from automated-actuation MPC formulations; (iii) a Raspberry Pi-deployable computational footprint that supports edge installation in rural settings (Section 2.4.6). The novelty in field deployment—IEC 61000-4-30 Class-A power-quality validation, IEEE Std 1459-2010 power-decomposition diagnosis, and the cost-estimated upgrade roadmap of Section 3.10—is distinct from this optimization-layer contribution and is summarized separately in the closing paragraph of Section 1.

2.4.1. Objective Function

The objective minimizes the expected total operating cost across N scenarios with probabilities π s over the scheduling horizon T (daily operating window 07:00–21:00, discretized into Δ t = 15 min steps and aggregated to 30 min for HOMER-compatible reporting):
m i n J = s = 1 N π s t = 1 T [ w f C f u e l ( P D G ( t ) ) + w O M C O & M ( t ) + w d C deg ( P B E S S ( t ) ) ]
C f u e l = c f [ a P D G ( t ) + b u D G ( t ) ] Δ t
C O & M ( t ) = k D G P D G ( t ) Δ t + k B ( P B E S S , c h ( t ) + P B E S S , d c h ( t ) ) Δ t
C deg ( t ) = c r e p 2 N c y c l e E B E S S D O D r e f ( P B E S S , c h ( t ) + P B E S S , d c h ( t ) ) Δ t
In Equation (1), C O & M ( t ) is the combined operation and maintenance cost at time step t, defined explicitly in Equation (3) as a bilinear-separable expression in diesel output power and BESS throughput ( P B E S S , c h + P B E S S , d c h ). In Equation (2), C f u e l uses a two-coefficient linear fuel consumption model [41] with slope a (L/kWh) and no-load intercept b (L/h). Baseline weighting factors are w f = w O M = w d = 1; a sensitivity sweep is reported in Section 3.9. The throughput is a convex piecewise-linear approximation [42,43] that tracks rain-flow-counted degradation within the 30–70% SoC swing band adopted here.

2.4.2. Constraints

Power balance per scenario, diesel operating envelope (with ramp and minimum up/down-time), BESS SoC dynamics, and mutual exclusion of charge/discharge modes:
P P V S ( t ) P P V , c u r t ( t ) + P H y d r o ( t ) + P D G ( t ) + P B E S S , d c h ( t ) = P L o a d S ( t ) P B E S S , c h ( t )
u D G P D G , min P D G ( t ) u D G P D G , max ; P D G ( t ) P D G ( t 1 ) R D G , max
S o C ( t + 1 ) = S o C ( t ) P B E S S , c h ( t ) Δ t η d c h E B E S S + η c h P B E S S , c h ( t ) Δ t E B E S S
S o C min S o C ( t ) S o C max ; 0 P B E S S , { c h , d c h } u { c h , d c h } P B E S S , max ; u c h ( t ) + u d c h ( t ) 1
A terminal constraint SoC (T) ≥ S o C r e f (60%) prevents horizon-end depletion and provides recursive feasibility of the receding-horizon implementation. Minimum up/down-time ( T u p , min = 4 steps, T d n , min = 2 steps) prevents diesel short-cycling. Table 4 summarizes all model parameters with field-verified values.

2.4.3. Scenario-Based Uncertainty Handling

PV generation and load are treated as stochastic processes. One year of 1 min on-site measurements (PV clear-sky index k t and load z-scores) is partitioned into N = 8 representative profiles using k-medoid clustering [44] on four daily features: mean k t , k t variance, peak load, and load factor. Cluster medoids serve as scenario trajectories P P V S ( t ) , P L o a d S ( t ) with probabilities equal to empirical cluster frequencies (Table 5). The eight clusters—clear, high-clear, partly cloudy, cloudy, overcast, monsoon, peak-load, and low-load—jointly cover 99.2% of the measured year. The expected-cost objective is augmented with a conditional value-at-risk (CVaR) term at confidence α = 0.9 weighted by λ C V a R = 0.2 [30,31,36,37].
The forecasting pipeline operates with a 24 h horizon at 15 min resolution (96 steps per horizon). The MILP is re-solved at every 15 min step (96 calls per day) and additionally at every scheduled source-transfer event so that the receding-horizon controller can incorporate the most recent measurement and ramp through the transfer in a feasible state.
At each call, the most recent 60 min measurement window (PV clear-sky index, load z-score, and hydro stream-stage normalized reading) is matched, via Euclidean distance in the four-feature space (mean, variance, peak load, and load factor), to the previously fitted set of eight cluster medoids. The matched medoid trajectory together with its two nearest neighbors in feature space is propagated forward as the active scenario set; the eight medoid probabilities are then renormalized over this active subset to reflect the empirical posterior of cluster membership in the recent window. This re-matching is the ‘persistence + k-medoids re-matching’ procedure listed in Step 2 of Algorithm 1.
Forecast accuracy was characterized against the 365-day measured baseline. The persistence-plus-k-medoids re-matching forecast keeps the daily mean absolute percentage error (MAPE) within the 10–20% range commonly reported in the rural microgrid forecasting literature [10,20]; a full forecast-error inventory will be released in the companion data note.
The forecast uncertainty propagates into the optimization through two mechanisms. First, the expected-cost term of the objective (Equation (1)) averages the operating cost over the eight active scenarios weighted by their renormalized cluster probabilities, so that the controller hedges against any one scenario being realized. Second, the CVaR term acts on the worst-α fraction of scenarios (α = 0.9 with N = 8 corresponds to the single worst medoid trajectory), so that schedules that are cheap in expectation but unsafe in the worst case are penalized. The sensitivity of the closed-loop performance to the CVaR weight λ_CVaR is reported in Section 3.9.1.

2.4.4. Existence of a Global Minimizer

Problems (1)–(5) are MILP after piecewise linearization of C f u e l and with linear C O & M and C deg . The continuous decision box is bounded: each power variable lives in a closed interval (5b,d); the integer set {0,1}^{3T} is finite. The decision set D is therefore compact. The feasible set F ⊆ D defined by the affine equalities/inequalities (5a–d) is closed as an intersection of closed half-spaces with a compact set, hence compact. The objective (1) is linear in the continuous variables and piecewise-constant in the binaries, hence lower semi-continuous on F. According to the Weierstrass extreme-value theorem, a global minimizer exists. Branch-and-bound with LP relaxations (CBC) returns a certifiably optimal incumbent within the chosen optimality gap ε g a p = 0.5%.

2.4.5. Horizon and Sampling Interval Selection

T = 24 h is the shortest horizon that spans the full PV-BESS complementarity (sunrise → post-evening discharge); Δ t = 15 min matches the 15 min settlement granularity of the PV inverter telemetry. A sensitivity sweep over T ∈ {12, 18, 24, 36, 56} h and Δ t ∈ {5, 15, 30, 60} min (Section 3.9) confirms that cost reductions beyond (T = 24, Δ t = 15) are below 0.4% while solve time grows super-linearly; coarser Δ t = 60 min loses 1.7% through under-resolved diesel ramp events.

2.4.6. Algorithm and Computational Statistics

The receding-horizon dispatch procedure is formalized in Algorithm 1.
Algorithm 1. Scenario-Based Economic MPC (Receding Horizon)
Input: k ,   SoC ( k ) ,   scenario   set   Ω   =   { ( P P V S ,   P L o a d S ,   π s ) } _{s = 1}^{N}, parameters (Table 3 and Table 4)
Output: u * ( k )   =   [ P D G * ( k ) ,   P B E S S * ( k ) ,   u D G *(k)] ← first-step optimal control
Require: CBC   2.10 ;   Pyomo   6.6 ;   ε g a p =   0.5 % ;   t i m e lim i t = 5 s
Procedure:
1 Read :           y ( k )     { SoC ( k ) ,   V b u s ( k ) ,   P H y d r o ( k ) ,   P P V (k)}
2Forecast: Regenerate Ω for [k, k + T] via persistence + k-medoids re-matching
3Build:    Assemble Equations (1)–(8) + CVaR penalty in Pyomo
4 Solve :         Call   CBC ;   stop   at   ε g a p   0.5 %   or   t i m e lim i t = 5 s
5Extract:  u*(k) ← first-step solution from MILP output
6Dispatch: Publish u*(k) to operator HMI/changeover switch
7 Advance :     k     k   +   Δ t r e ; go to Step 1
Problem   size   at   baseline   ( T   =   24   h ,   Δ t = 15 min, N = 8): ~3840 continuous + 2880 binary variables, 5760 constraints.
On a Raspberry Pi 4 (Cortex-A72, 4 GB RAM) running CBC 2.10 [45] and Pyomo 6.6 [46], the MILP contains approximately 3840 continuous variables, 2880 binary variables, and 5760 constraints for the baseline (T = 24 h, Δt = 15 min, N = 8). Across 35,040 consecutive 15 min re-optimizations (one calendar year), the wall-time distribution was a mean of 0.82 s, a 95th percentile of 1.63 s, a 99th percentile of 3.41 s, and a maximum of 4.12 s—safely within the 60 s control period. The optimality gap at termination was ≤0.5% in 99.1% of calls. Wall-time figures reported below are from the 8760 hourly resolves used during validation; the deployed 15 min cadence reduces each solve to a smaller scenario tree and gives comparable timing.

2.5. Dispatch Execution Procedure

The dispatch procedure operates on a daily schedule computed the evening prior by the offline MILP model. The schedule is printed and annotated by the trained local operator, who implements source transfers using manual lockable changeover switches at the main distribution panel. A typical summer day (dry season with full hydro availability) requires 2–4 source transitions, each executed over 1–3 min of operator labor. The execution procedure was observed during 100 h of field operation (5 consecutive days, 20 h per day at full instrumentation), during which every transition was logged with precise timestamps by the Fluke 435 power quality analyzer. Figure 3 shows a representative dispatch profile; Figure 4 and Figure 5 present seasonal load demand and irradiance patterns, respectively.

2.6. Manual Transfer Characterization

Each diesel-to-BESS or BESS-to-diesel transition involves a 1–3 min supply interruption caused by the time required to physically operate the changeover switch and for the receiving source to stabilize voltage and frequency. This interruption was characterized using time-stamped voltage and current waveforms recorded by the Fluke 435 during five representative transfer events. Figure 6 shows the control panel layout with the manual transfer switch (MTS) and main distribution board (MDB). Figure 7 presents a representative voltage and power trace during one diesel-to-BESS transfer event: diesel output voltage (~385 V) drops sharply when the switch opens, causing a ~200 ms sag; the BESS inverter then energizes the bus, reaching steady-state voltage (~382 V) within approximately 500 ms. The total interruption perceived by sensitive loads is approximately 1.2 min, dominated by operator reaction time.

3. Results

3.1. Dispatch Validation (100 h Field Campaign)

Over the 100 h field campaign, 18 dispatch transitions were executed, of which 16 were logged to completion with precise timestamps. Across these 16 transitions, the average timing deviation between the MILP schedule and actual execution was 4.3 min, with a maximum deviation of 11 min. These deviations arose from two sources: (i) operator scheduling flexibility and (ii) hardware delays (changeover mechanical operation and diesel start/stop ramp times). Field execution deviated by less than 10 min on average from the optimized schedule, validating the claim that human-in-the-loop dispatch is operationally feasible in rural settings without fully automated control. The MILP schedule was resolved daily at 18:00, providing a rolling 1-day-ahead plan. No emergency shutdowns or load-shedding events occurred during the campaign.
The measured dispatch closely matched the predicted energy flows from the HOMER simulation in [1], with annual PV yield ~1540 kWh (performance ratio 0.78), hydro yield ~50 MWh seasonally, and diesel consumption reduced to ~120 L/month during the wet season versus ~850 L/month during the dry season—within ±5% of HOMER projections.

3.2. Multi-Scenario Rolling Simulation (365 Days)

A closed-loop 365-day rolling simulation was executed using one year of 1 min measured PV, load, and hydro data with the scenario MPC of Section 2.4. Table 6 aggregates key operating indicators per scenario class. Figure 8a–d show representative SoC(t) trajectories for each scenario class; Figure 8e presents the annual DoD distribution.
Annual LPSP never exceeded 0.53%, and annual EENS remained below 2.34 kWh/day, both well under the 5% and 5 kWh/day reliability thresholds commonly adopted for rural microgrids [16,17]. The cloudy and peak-load subclasses drive the largest BESS cycling and diesel runtime, yet the MPC terminal-SoC constraint prevented horizon-end depletion on every simulated day.

3.3. Proposed Scenario MPC vs. Four Benchmark Controllers (Rule-Based, Deterministic, Stochastic, Robust)

Four baselines were implemented on the same measurement stream to isolate the value of scenario-uncertainty treatment: (B1) a deterministic rule-based load-following controller; (B2) a deterministic MPC using expected-value forecasts without scenario uncertainty; (B3) two-stage stochastic programming over the eight medoid scenarios, in which the second-stage recourse variables are optimized rather than first-stage hedged; (B4) a deterministic robust optimization with box uncertainty, where forecast intervals are computed from the historical MAPE and the controller hedges against the worst case within the box. Together with the proposed scenario MPC, these four benchmarks span the heuristic, deterministic, stochastic, and robust families, while the five controllers (B1 heuristic, B2 deterministic, B3 stochastic, B4 robust, proposed CVaR) span the four classical dispatch-controller families.
Scenario MPC reduces annual operating cost by 18.4% versus rule-based and 6.6% versus deterministic MPC. The 6.6% margin is attributable to CVaR protection during cloudy and peak-load days. Diesel start events drop by 50.4% versus B1, directly extending engine overhaul intervals and reducing wet-stacking risk [33,47,48].

Extended Benchmarking Against Stochastic and Robust Controllers—Optimality Certificate from the MIP Gap

We include here an explicit optimality demonstration of the proposed dispatch method. The scenario MPC presented in Section 2.4 is, given a finite scenario tree, an exact mixed-integer linear program in the sense of Rockafellar and Uryasev [36]: a branch-and-bound solver such as CBC terminates with a certified MIP gap (Section 2.4.6) that bounds the distance from the integer optimum at any user-set tolerance. The controller is therefore not a heuristic—its solution quality on each receding-horizon call is certified by the same optimality argument that an integrated single-MILP solver would provide. To compare against stochastic and robust optimization variants, we add two further benchmarks (B3 stochastic, B4 robust) to the four-controller comparison in Section 3.3.
Four benchmarks are run on the identical 365-day field-data input stream: (B1) rule-based load-following, already used in Section 3.3; (B2) deterministic MPC with point forecasts; (B3) two-stage stochastic programming over the eight medoid scenarios; and (B4) robust optimization with box uncertainty defined by the measured per-quantity MAPE. The five controllers (B1–B4 plus the proposed scenario MPC) are summarized in Table 7. Headline figures are as follows: B1 rule-based 13.20 kUSD/yr; B2 deterministic MPC 11.50 kUSD/yr; B3 two-stage stochastic 10.71 kUSD/yr; B4 robust 11.55 kUSD/yr; proposed scenario MPC 10.80 kUSD/yr. The proposed controller dominates B1, B2, and B4 on annual cost; B3 is marginally cheaper in expected cost but its worst-class LPSP of 0.71% exceeds the 0.5% design target, whereas the proposed scenario MPC keeps the worst-class LPSP at 0.53%. The robust baseline (B4) is more reliable (worst-class LPSP 0.27%) at a 6.9% cost premium relative to the proposed controller.
Wall-time figures on the Raspberry Pi 4 deployment platform are as follows: B1 rule-based <1 ms; B2 deterministic MPC 0.31 s; B3 two-stage stochastic 4.6 s; B4 robust 1.9 s; and proposed scenario MPC 0.82 s mean. All four online controllers are deployable within the 60 s control period; the proposed scenario MPC therefore combines the lowest annual cost among the deployable controllers with the certified MIP-gap optimality bound of Section 2.4.6.
The deployed solver is open-source CBC 2.10 [45] interfaced through Pyomo 6.6 [46]. A commercial-solver license (CPLEX) was not available to our research group at the time of writing, and a cross-solver comparison is therefore left to future work. The optimality certificate that the present manuscript reports is CBC’s MIP gap (Section 2.4.6), which terminates the branch-and-bound search when (UB − LB)/UB falls below the production-set tolerance of 0.1%. This MIP-gap-based certificate is the standard optimality demonstration in MILP-based dispatch optimization [41,45,46]; it provides a per-call solution-quality bound that is independent of the specific solver implementation.

3.4. Power Quality Comparison: Diesel vs. BESS

A Fluke 435 IEC 61000-4-30 Class-A analyzer recorded continuous power quality data during the evening supply transition on 25 January 2024. Two consecutive measurement windows were extracted: 97 one-minute samples under diesel supply (18:24–20:01, mean load 20.3 kW) and 60 one-minute samples under BESS supply (20:03–21:03, mean load 13.0 kW). Because load levels differed between modes, all reported means are supplemented with (i) stationary block-bootstrap 95% confidence intervals (block length = 10 min, B = 2000 replications) robust to the observed lag-1 autocorrelation of 0.97 and (ii) load-normalized values from OLS regression at a common reference load of 15 kW (Section 3.4.3). Table 8 summarizes the three-phase IEC 61000-4-30 Class-A power quality results.
Phase B exhibits notably higher THD-I (77.3%) under diesel supply than Phases A (55.8%) and C (59.0%). The dominant non-linear single-phase loads at Khlong Ruea—community-hall refrigeration compressors and the meeting-hall LED-driver bank—are connected on the Phase-B branch. Because THD-I is normalized by the measured fundamental, the higher Phase-B fundamental current inflates the Phase-B index. This load-asymmetry diagnosis is independently corroborated by the voltage unbalance factor (VUF, IEC symmetrical components) of 0.856% under diesel supply reported in Table 8: VUF and Phase-B THD-I scale together when the imbalance is load-driven.
Under BESS supply, the inverter actively re-balances the output and the VUF drops to 0.032% (96% reduction), while the Phase-B THD-I drops to 10.55% (86% reduction), confirming that the source mode and the load topology are the two relevant variables. The proposed mitigation is the redistribution of the two compressor loads across Phases A and C plus an optional passive LC harmonic-trap filter on the Phase-B feeder; both items are included in the upgrade roadmap (Section 3.10).

3.4.1. IEEE Std 1459-2010 Power Decomposition

To quantify the source and magnitude of power quality degradation, Phase-A apparent power was decomposed following IEEE Std 1459-2010. The total apparent power S is partitioned as
S 2 = S 1 2 + S N 2
where S 1 = V 1 I 1 is the fundamental apparent power and S N is the non-fundamental apparent power, defined as:
S N = D 1 2 + D V 2 + S H 2
where Dᵚ is current distortion volt-amperes, Dᵝ is voltage distortion volt-amperes, and S H is harmonic apparent power. Fundamental voltage V 1 and current I 1 components were derived from Fluke-measured V r m s , I r m s , and THD values as
V 1 = V r m s 1 + T H D V 2
I 1 = I r m s 1 + T H D I 2
Table 9 presents the decomposition results.
Under diesel supply, 93.0% of SN (=4737/5097 VA) originates from current distortion volt-amperes Dᵚ, confirming that non-linear loads (variable-speed drives, refrigeration compressors) are the dominant harmonic source rather than voltage waveform distortion from the generator. BESS supply reduces SN by 92.9% (4756 → 336 VA), demonstrating that the BESS inverter’s internal LC output filter effectively suppresses load-generated harmonic currents from appearing at the point of common coupling. The true power factor penalty is correspondingly eliminated: PF rises from 0.814 to 0.947 (Figure 9).
The BESS Phase-A THD-I point estimate is 4.933% with a 95% stationary block-bootstrap confidence interval of [4.836, 5.086]. The point estimate is 1.3% below the IEEE 519-2022 TDD limit of 5%, but the upper bound of the confidence interval crosses the limit. The compliance ratio r_THDI = 5.0/4.933 = 1.014 that appears in Table 10, therefore, reflects only the point estimate; evaluating the same ratio at the upper-CI bound yields r_THDI = 5.0/5.086 = 0.983, indicating that the bootstrap-derived uncertainty is large enough that uncertainty-aware compliance assessment is required.
Two consequences follow: (i) The PQI value of 3.89 reported in Table 11 should be interpreted as the point-estimate PQI; an uncertainty-aware PQI computed at the upper-CI compliance ratios reduces to approximately 3.36, still well above unity but with the IEEE 519 compliance margin narrowed. (ii) The residual current distortion on Phase A is attributable to the BESS inverter’s PWM switching frequency ripple at light-load operation and to incompletely suppressed harmonic currents from the connected non-linear loads. Two mitigations are recommended in the upgrade roadmap: a passive LC trap filter tuned to the inverter switching frequency and a firmware-level harmonic-compensation upgrade in the BESS inverter control loop, which the manufacturer has indicated is feasible. Phases B and C remain comfortably above the 5% limit on both bounds and constitute the priority cases for mitigation.

3.4.2. Composite Power Quality Index

A scalar composite power quality index (PQI) aggregates compliance across all metrics using the geometric mean of headroom ratios:
P Q I = ( k = 1 K r k ) , r k = L k M k
where L k is the applicable standard limit and M k is the measured value; r k > 1 indicates compliance. For metrics with a maximum threshold (THD-V, THD-I, VUF), r k = L k / M k ; for power factor, which specifies a minimum, r k = M k / L k , preserving r k > 1 as the compliance condition in both cases. Four metrics are included (K = 4): THD-V (EN 50160: 8%), THD-I (IEEE 519-2022 TDD: 5%), voltage unbalance factor (VUF; EN 50160: 2%), and total power factor (minimum 0.85). Table 10 presents the compliance ratios and PQI.
As illustrated in Figure 10, the BESS supply achieves a PQI of 3.89 versus 0.75 under diesel supply (5.21× improvement). Diesel operation violates IEEE 519-2022 current distortion limits on all three phases and marginally fails the power factor threshold (PF = 0.81). These findings are consistent with the IEEE Std 1459-2010 analysis: the dominant failure mode is load-generated current harmonics that the synchronous generator cannot attenuate, whereas the BESS inverter’s active output filter suppresses them before they reach the PCC.

3.4.3. Load-Normalized THD-V Comparison

Because diesel and BESS measurement windows operated at different mean loads (20.3 kW vs. 13.0 kW), load-normalized comparisons are required to isolate source-type effects from load-level effects. An ordinary least squares (OLS) regression model was fitted separately for each operating mode:
T H D V ( P ) = β 0 + β 1 P l o a d + ε
where P l o a d is the total three-phase active power (kW). At a common reference load of P r e f = 15 kW (within the overlap zone of both measurement ranges), adjusted means and 95% confidence intervals are reported in Table 11.
After controlling for load level, diesel supply produces 5.07% THD-V versus 2.53% under BESS supply at the same 15 kW reference—a 50.2% load-normalized reduction (Figure 11). Both regression slopes are positive (β1 > 0, p < 0.01; Figure 12), confirming that THD-V increases with load regardless of source type, consistent with non-linear harmonic current injection from load devices. The THD-V gap between modes persists across the full load range (Figure 12 and Figure 13), affirming that the BESS inverter’s output filter, rather than incidental load difference, explains the measured improvement.

3.5. BESS Performance and SoC Profile

The BESS operated within the designed SoC corridor (30–70%) throughout the campaign. The measured cycle count averaged 0.12 equivalent full cycles per day—well below the manufacturer’s 1-cycle/day design basis—projecting a calendar life exceeding 22 years before reaching 80% capacity retention [49,50]. Figure 14 shows the 24 h SoC trajectory derived from terminal voltage using the linear LFP approximation:
S o C = V 44.0 54.4 44.0 × 100 %
where V is the measured terminal voltage (V); this linear mapping is valid for LiFePO4 cells within the 44–54.4 V operating range. Figure 15 presents the corresponding charge and discharge power profile for the same representative day.
Within the 20–80% SoC plateau, the linear voltage-to-SoC map of Equation (15) closely tracks the published LFP open-circuit-voltage characteristic [21,47]; meaningful departures occur only at the discharge knee (SoC < 20%) and the float knee (SoC > 80%), where the manufacturer-supplied BMS Coulomb-counted estimate is used in place of the linear map. In the 365-day rolling simulation the BESS is operated within the 30–70% SoC design corridor for the vast majority of the campaign, and the linear-map approximation is therefore well within its validity envelope for dispatch decisions made at the 15 min cadence. The BMS Coulomb counter, combined with an extended Kalman filter, remains responsible for warranty-grade SoC reporting and is more accurate than the linear map at high C-rates.

3.6. Techno-Economic Results

Based on a 25-year HOMER Pro simulation [51,52] parameterized with field-verified data, the LCOE hierarchy is diesel-only (~0.69 USD/kWh), PV + Diesel (~0.56 USD/kWh), PV + BESS + Diesel (~0.45 USD/kWh), optimized PV + BESS (~0.36 USD/kWh), BESS marginal (~0.15 USD/kWh), and hydropower (~0.11 USD/kWh seasonally). Figure 16 presents the LCOE comparison across energy-mix scenarios; Figure 17 presents the corresponding CO2 intensity per scenario. These values are consistent with [1] and align with global renewable LCOE trajectories reported by IRENA and Fraunhofer ISE [4,5]. The optimized PV + BESS configuration achieves a net present cost that is 47.9% below diesel-only.

3.7. Comparison with Published PQ Benchmarks

Table 12 contextualizes the field-measured PQ results against comparable published studies. BESS-supply values (THD-V 3φ avg. 2.93%, THD-I Ph.A 4.93%, and VUF 0.03%) are superior to inverter-based microgrid results reported by Choudhury et al. [23] and Hernández-Mayoral et al. [24] and satisfy EN 50160 [53] and IEEE 519-2022 limits on all metrics. Diesel supply satisfies EN 50160 THD-V and VUF limits but exceeds IEEE 519-2022 current distortion limits on all three phases (THD-I: 55.8–77.3%, vs. TDD limit of 5%).

3.8. Environmental Impact Analysis

The hybrid dispatch strategy reduces annual diesel consumption by displacing the generator from continuous 24 h operation to a 96 min evening commitment. Using field-measured parameters (a = 0.30 L/kWh, b = 1.20 L/h) and the standard diesel emission factor of 2.68 kg CO2/L, annual CO2 emissions are reduced by an estimated 12.8 tonnes versus diesel-only operation—a 65% decrease in carbon intensity (from approximately 670 g CO2/kWh to 235 g CO2/kWh). Beyond CO2, the hybrid system eliminates diesel particulate matter and NOx during PV-BESS supply, reduces noise (75–85 dBA at 7 m is eliminated during evening hours), and lowers the risk of contamination from fuel storage in the forested watershed environment.

3.9. Parameter Sensitivity (Horizon, Sampling, Weights)

The baseline (T = 24, Δt = 15) sits on the efficient frontier: halving Δt to 5 min gains only 0.18% cost at 11× wall time. In every tested setting, the ranking (scenario MPC < deterministic MPC < rule-based) is preserved in Table 13.

3.9.1. Sensitivity to Scenario Count N and CVaR Weight

The choice of N = 8 medoid clusters and the CVaR parameters α = 0.9 and λ_CVaR = 0.2 follows the convention of the scenario-based microgrid dispatch literature. N = 8 captures the eight empirically distinguishable operating classes (Table 5) which together cover 99.2% of the measured year; reducing N below 6 collapses the cloudy and overcast classes and degrades worst-class LPSP, while increasing N beyond 12 yields no further annual-cost improvement and inflates the MILP solve time super-linearly. The CVaR confidence α = 0.9 is the de facto default in the CVaR microgrid literature [36], and with N = 8 it targets the single worst-medoid trajectory in the empirical scenario set. The CVaR weight λ_CVaR = 0.2 was selected as the smallest weight that keeps the worst-class LPSP below the 0.5% design target while preserving the annual-cost reduction relative to the rule-based baseline. A formal one-at-a-time sensitivity sweep over N, α, and λ_CVaR is left to a companion data note [37].

3.9.2. Sensitivity to Input Variability

Three input parameters with the highest exogenous uncertainty—diesel fuel price (over the historical 2021–2025 range observed in Thailand), BESS round-trip efficiency (datasheet tolerance plus aging), and the hydro availability window length (climate variability of the wet-season onset)—were perturbed around their baseline values in independent re-runs of the 365-day simulation. By inspection of the cost decomposition (Section 3.6), diesel fuel price is the single dominant driver of annual cost; the hydro availability window dominates worst-class reliability; BESS round-trip efficiency has a comparatively modest effect on either metric. Importantly, the ranking of controllers (B1 rule-based, B2 deterministic, B3 stochastic, B4 robust, proposed scenario MPC) is preserved across the perturbation set, which is the qualitative robustness statement most relevant for deployment decisions. A quantitative one-at-a-time tornado analysis is included in the companion data note.

3.10. Upgrade Path: Operator-Assisted to Automated MPC

The 1–3 min supply interruption per manual source transfer is the system’s primary operational limitation. Table 14 presents a structured upgrade roadmap.

4. Discussion

4.1. Comparison with Prior Design Study [1]

The present field results confirm and extend the techno-economic projections of [1]. First, the measured LCOE hierarchy (diesel-only 0.69 USD/kWh → optimized PV + BESS 0.36 USD/kWh) closely matches the HOMER projections in [1], validating the techno-economic model with real operational data. Second, the 100 h dispatch validation shows that the MILP schedule is practically executable with less than 10 min deviation across all switching events. Third, the PQ measurements provide an entirely new dimension of system characterization absent from [1]. Together, ref. [1] and this study constitute a complete design-to-deployment evidence chain: system sizing and economic justification [1] followed by operational validation, PQ measurement, and upgrade planning (this work).

4.2. Implications of Manual-Transfer Characterization

The characterization of 1–3 min manual transfer interruptions provides, to the authors’ knowledge, the first quantitative field documentation of operator-latency effects on microgrid dispatch performance in the rural electrification literature. This gap has important implications: the 0.53% LPSP reported in the worst scenario class is partially attributable to transfer-induced non-delivery rather than solely to supply–demand imbalance. Future studies should distinguish between ‘structural LPSP’ (insufficient generation capacity) and ‘procedural LPSP’ (operator-transfer delay), as the latter is amenable to engineering solutions (ATS, pre-synchronization).

4.3. Scenario-Based CVaR vs. Distributionally Robust Optimization

Recent microgrid energy management literature has shifted towards distributionally robust optimization (DRO) formulations, which hedge against an entire ambiguity set of probability distributions rather than a fixed scenario set. Liu et al. [54] and Lin et al. [55] demonstrate that Wasserstein-ball DRO [56] achieves tighter out-of-sample LPSP guarantees than scenario-based CVaR when the training distribution departs from the test distribution. This study adopts CVaR rather than DRO for three reasons specific to the Khlong Ruea context. First, the site has twelve months of high-quality 1 min SCADA data, yielding a representative empirical distribution; the distributional shift risk that motivates DRO is lower here than in data-scarce deployments. Second, MILP + CVaR is solved by open-source CBC on a Raspberry Pi 4 within 0.82 s mean wall time; the semi-infinite program underlying Wasserstein DRO would require either a conservative scenario-tree reformulation of comparable size or a dedicated interior-point solver, both of which would increase computational burden by at least an order of magnitude [54]. Third, and most importantly, the operator-transfer latency τ o p ∈ [1,6] min constitutes a site-specific stochastic variable that has not been treated in any published DRO microgrid model; the characterization and incorporation of τ o p remain an open research question and are identified as the primary direction for future model extension. The CVaR formulation adopted here therefore represents an appropriate, computationally tractable baseline whose limitations are explicitly bounded.

4.4. Limitations

The PQ campaign was limited to 100 h during a single season; extending to a full annual cycle would reveal seasonal variation in THD, voltage unbalance, and flicker. Although the diesel and BESS measurement windows operated at different mean load levels (20.3 kW vs. 13.0 kW), the load-normalized OLS regression (Section 3.4.3) confirms a 50.2% THD-V reduction at a common 15 kW reference, mitigating this confound; residual uncertainty arises from the limited regression R2 (0.16–0.17), indicating that factors beyond load level (e.g., load composition, harmonic order mix) contribute to THD variability. The MILP uses deterministic within-scenario forecasts; a fully distributionally robust formulation (Section 4.3) would provide stronger out-of-sample guarantees. The scenario set and CVaR weight λCVaR = 0.2 are calibrated to Khlong Ruea and should be re-derived for other sites. Solver wall-time statistics reflect a Pi 4 edge device; performance on lower-specification hardware has not been characterized.

4.5. Comparative Analysis with Rural Renewable Microgrid Systems

To situate the present results within the broader rural electrification literature, Table 15 compiles twelve representative rural renewable hybrid microgrid studies published between 2022 and 2025 across Africa, Asia, and the Middle East. Parameters were drawn directly from reported values; entries marked N/R indicate that the metric was not reported in the source. The comparison encompasses three dimensions: (i) power quality, (ii) techno-economic performance, and (iii) environmental outcome.
From a power quality standpoint, the present study reports the lowest harmonic distortion among all works in Table 15 that include field-measured or laboratory-validated PQ data. The BESS-supply THD-V of 2.93% and THD-I of 4.93% (Phase A) are 25–33% lower than the values of 3.5–3.9% and 9.1–10.4% reported by Choudhury et al. [23] and Hernandez-Mayoral et al. [24] for comparable inverter-based rural microgrids and satisfy both EN 50160 (THD-V ≤ 85%) and IEEE 519-2022 (TDD ≤ 5%) limits simultaneously. The voltage unbalance factor of 0.032% is approximately 50 times below the 1.6–1.8% reported by [23,24] and well within the IEC 61000-3-13 threshold of 2.0%. Importantly, all seven studies in Table 15 that report economic and environmental outcomes are based exclusively on simulation; this study is, to the authors’ knowledge, the only study in this comparison set to provide concurrent field-measured PQ validation alongside a stochastic dispatch controller for a Thai rural hybrid microgrid.
From a techno-economic perspective, the LCOE of 0.36 USD/kWh for the optimized PV + BESS scenario occupies the mid-range of the comparison set (0.045–0.85 USD/kWh). The lowest reported LCOE (0.045 USD/kWh, Cameroon [61]) reflects a system dominated by an existing microhydropower resource with negligible capital cost; the highest (0.85 USD/kWh, Sarawak [58]) arises from elevated BESS capital cost allocation in a high-humidity tropical environment. The Philippines study [57] achieves 0.18 USD/kWh via multi-objective PSO optimization leveraging a co-located run-of-river hydro resource with a 13 kW diesel backup. When comparison is restricted to PV + BESS + Diesel configurations without dedicated hydro, the range narrows to 0.18–0.36 USD/kWh, within which the present LCOE is competitive. Crucially, the 18.4% annual cost reduction demonstrated by the CVaR MPC over a rule-based baseline represents a dispatch-layer saving not captured by HOMER sizing studies; no comparable study in Table 15 reports a validated dispatch-level cost reduction, making direct comparison of LCOE values alone insufficient to characterize controller value. The 25-year NPC of USD 82,000 for the Khlong Ruea site compares favorably with the USD 529,459 reported for an Indian tribal village system [59] of similar load scale, reflecting the favorable PV resource and existing hydro contribution at the study site.
Regarding environmental performance, the 82% CO2 intensity reduction (148 to 27 kg CO2/MWh) achieved by the proposed PV + BESS + Hydro + Diesel configuration is among the highest reported in Table 15 for hybrid (not fully renewable) configurations. The renewable energy fraction of 87.3% is comparable to the 86.7% reported in Sarawak [58] and the 91% achieved in the West Bank study [50], though the latter benefits from a PV-dominated grid without continuous diesel backup in most operating hours. The Nigerian multi-community microgrid [49] achieves ~100% CO2 reduction by targeting full electrification from zero-emission sources at a 3.2 MW scale, two orders of magnitude larger than the Khlong Ruea system, which limits the practical transferability of design parameters to smaller community deployments.
Across all three comparison dimensions, the differentiating contribution of this study is the combination of field-validated power quality at the IEC 61000-4-30 Class-A standard, stochastic MPC dispatch with a demonstrated annual cost reduction of 18.4%, and concurrent techno-economic projection from field-verified HOMER parameters, an integration not observed in any single study within the 2022–2026 comparison set. The primary limitation of this comparative analysis is data heterogeneity: PQ metrics are rarely reported in sizing-focused HOMER studies, and dispatch-layer performance indicators are absent from all comparison entries, precluding a fully symmetrical quantitative cross-study comparison.
It is observed that the LCOE values reported by other studies in Table 15 are HOMER sizing outputs without dispatch-layer optimization, whereas the present LCOE of 0.36 USD/kWh includes the 18.4% dispatch-layer reduction delivered by the proposed scenario MPC. A direct comparison of the present 0.36 USD/kWh against HOMER-only values in other rows is therefore not an equivalent comparison. To make the comparison transparent, an additional column, ‘Dispatch layer’, has been added to Table 15; each row is flagged as ‘HOMER sizing only’, ‘rule-based’, or ‘optimized’ depending on the controller reported in the source study (where this information is available; otherwise marked ‘N/R’).
For comparability with HOMER-only entries, a dispatch-adjusted equivalent LCOE for this study is also reported: backing out the 18.4% dispatch saving from the 0.36 USD/kWh operating LCOE yields an equivalent HOMER-only LCOE of approximately 0.44 USD/kWh. This is the value that should be compared against the HOMER-only entries in Table 15. The 0.36 USD/kWh figure is retained as the operating LCOE actually realized under the proposed controller.
Cross-row comparison across Table 15 is therefore indicative rather than equivalent; LCOE values from Sim. rows reflect HOMER-sizing-only outputs without dispatch-layer optimization, whereas the present row reports an LCOE averaged over the 365-day closed-loop simulation under the proposed scenario MPC. The 0.36 USD/kWh figure is retained as the operating LCOE actually realized under the proposed controller [1]. The qualitative ranking of the present configuration as ‘competitive within the PV + BESS + Diesel range’ is robust to the comparator-class differences highlighted above.

4.6. Transferability and Site-Dependent Parameters

The following elements of the framework transfer directly to other rural hybrid microgrid deployments without modification: the two-layer architecture (offline optimization plus operator-assisted or automated execution); the scenario MILP plus CVaR formulation; the k-medoid clustering from one year of measurement data; the IEC 61000-4-30 Class-A measurement protocol; the IEEE Std 1459-2010 power-decomposition diagnostic workflow; the composite power quality index definition; and the cost-estimated upgrade-roadmap structure used in Section 3.10.
Six elements are site-dependent and must be re-identified at any new deployment: (a) the eight cluster medoids and their probabilities (re-clustered from the local one-year measurement campaign); (b) the linear fuel-consumption coefficients (a, b) of the local diesel generator; (c) the seasonal hydro availability window and the run-of-river flow regime; (d) the local load profile and peak-to-average ratio; (e) the operator-transfer-latency distribution (the 1–3 min observed at Khlong Ruea may be larger or smaller at other sites depending on switch design and operator training); and (f) the BESS SoC–voltage characteristic for the specific battery chemistry and pack configuration.
We recommend a minimum 30-day field measurement campaign before commissioning the dispatch controller at any new site: continuous 1 min logging of irradiance, load, hydro flow (where applicable), and at least three diesel-to-BESS source transfer events. From this dataset, the eight medoid trajectories, the fuel curve coefficients, the transfer-latency distribution, and the seasonal hydro envelope can be re-identified. The CVaR weight λ_CVaR may need re-tuning if the local reliability target differs from 0.5% LPSP.
The proposed framework does not require seasonal hydro to function. Sites without a hydro resource can use the same controller by setting the hydro term to zero throughout the year, in which case the controller reduces to a PV + BESS + Diesel scenario MPC. Conversely, sites with year-round hydro availability can use the same controller with a seasonal-availability flag held permanently at unity. The framework is therefore applicable to a range of rural hybrid microgrid configurations beyond the specific PV + BESS + Hydro + Diesel arrangement at Khlong Ruea.

5. Conclusions

This study presented and field-validated a scenario-based two-layer dispatch framework for the Khlong Ruea rural hybrid microgrid in Chumphon Province, southern Thailand, directly extending the design study reported in [1]. The offline MILP—formulated with explicit decision/given-variable partitioning, a Weierstrass-type existence proof, k-medoid scenario uncertainty handling (N = 8 clusters), and a CVaR tail penalty—produces cost-minimal generation schedules that a trained local operator can implement with less than 10 min of timing deviation on a 24 h horizon at a 15 min resolution.
Across a 365-day closed-loop simulation spanning eight scenario classes, the scenario MPC reduced annual operating cost by 18.4% and diesel runtime by 27.6% versus a rule-based baseline, while keeping LPSP not exceeding 0.53% in the worst class and BESS DoD confined to 30–70%. Field measurements using a Fluke 435 IEC 61000-4-30 Class-A analyzer with stationary block-bootstrap inference (B = 2000, 10 min blocks) demonstrated PQ improvements under BESS supply whose 95% confidence intervals do not overlap with the corresponding diesel-supply intervals on any metric: three-phase average THD-V dropped from 5.39% to 2.93% (45.7% reduction); THD-I Phase A fell from 55.8% to 4.9% (91.2% reduction); voltage unbalance reduced from 0.86% to 0.032% (96.3% reduction); and true power factor improved from 0.814 to 0.947. IEEE Std 1459-2010 power decomposition confirms that 93% of non-fundamental apparent power under diesel supply originates from current-distortion volt-amperes (D_I = 4737 VA), reduced to 283 VA under BESS supply. A composite power quality index (PQI = 3.89 vs. 0.75) confirms that BESS supply satisfies all EN 50160 and IEEE 519-2022 limits, while diesel operation violates the IEEE 519-2022 current-distortion limit on all three phases. Load-normalized OLS regression confirms a 50.2% THD-V reduction at a common 15 kW reference load, ruling out load-level confounding.
Techno-economic analysis confirmed a 47.9% net present cost reduction relative to diesel-only operation and an annual CO2 reduction of 12.8 t—equivalent to an 82% reduction in CO2 intensity (148 → 27 kg CO2/MWh, Figure 17) relative to the diesel-only counterfactual. The 1–3 min manual-transfer interruption is fully characterized, and a cost-estimated ATS + SCADA upgrade roadmap is defined. The combined evidence provides a portable, reproducible template for hybrid microgrid deployment in rural communities across Thailand and comparable Southeast Asian contexts; the framework’s site-independent components (Section 4.6) make the re-deployment workflow explicit.

Future Work

Future work will (i) implement the proposed ATS upgrade and measure the resulting transfer time, targeting sub-100 ms consistent with the IEEE Std 2030.7/2030.8 hierarchical microgrid controller specifications [28,29]; (ii) deploy a receding-horizon MPC controller with real-time LSTM load forecasting [35]; (iii) conduct a full-year PQ monitoring campaign using a permanently installed Class-A power quality meter; and (iv) extend the dispatch model to incorporate operator reaction time as a stochastic variable within a distributionally robust optimization framework, using the empirical distribution of the 16 logged transfer events as the ambiguity set basis.
To expand the microgrid into a decentralized network and assess its overall life cycle and economic criteria [1,63], future research will evaluate the economic suitability analysis of solar photovoltaic modules—including advanced configurations such as distributed MPPT controllers [64] and solar tracking systems for bifacial panels [65] and energy storage system installation in residential unit groups with optimization methods [66]. Concurrently, assessing the suitability of local islanding detection methods for grid-connected inverters in multi-distributed generation [67] is critical to ensure operational safety. Furthermore, integrating IoT technologies will enhance system monitoring and support smart agriculture, including sustainable water generation [68], through implementations like a solar battery charger with monitoring performed via a smartphone application [69] and an automatic water system using ESP8266 and the Blink IoT platform [70,71,72].
Finally, integrating uni-directional wireless power transfer systems can securely supply autonomous agricultural drones, electric shuttle minibuses, and electric boats within the community [73,74,75]. Future research will focus on designing robust WPT charging pads that can operate reliably in harsh, humid environments without exposing electrical contacts and that are directly supported by the microgrid’s renewable generation [76,77].

Author Contributions

Conceptualization, M.N.-d. and W.M.; methodology, M.N.-d. and W.M.; software, M.N.-d.; validation, M.N.-d., T.S. and J.T.; formal analysis, M.N.-d.; investigation, M.N.-d., T.S., J.T., A.N., N.P. (Nopporn Patcharaprakiti), N.K., K.S., N.P. (Nattawat Panlawan) and K.N.; resources, W.M.; data curation, M.N.-d.; writing—original draft preparation, M.N.-d. and W.M.; writing—review and editing, W.M. and S.T.; visualization, M.N.-d.; supervision, W.M.; project administration, W.M.; funding acquisition, W.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Electricity Generating Authority of Thailand (EGAT), Grant No. 65-B502000-11-IO.SS03B3008629, issued on 24 August 2022, and especially in part by the Rajamangala University of Technology Lanna (RMUTL) under the Doctoral Scholarship Grant for Montri Ngao-det and Kittinun Srasuay

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Acknowledgments

The authors thank the Electricity Generating Authority of Thailand (EGAT) for financial support and the Khlong Ruea community and village electrician for their participation throughout the field campaign.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
AbbreviationDefinition
ATSAutomatic Transfer Switch
BESSBattery Energy Storage System
CVaRConditional Value-at-Risk
DoDDepth of Discharge
EMSEnergy Management System
EENSExpected Energy Not Served
LCOELevelized Cost of Electricity
LiFePO4Lithium Iron Phosphate
LPSPLoss of Power Supply Probability
MILPMixed-Integer Linear Program
MPCModel Predictive Control
PCCPoint of Common Coupling
PQPower Quality
PVPhotovoltaics
SoCState of Charge
THDTotal Harmonic Distortion
TRLTechnology Readiness Level

References

  1. Ngao-Det, M.; Thongpron, J.; Namin, A.; Patcharaprakiti, N.; Muangjai, W.; Somsak, T. Systematic Optimize and Cost-Effective Design of a 100% Renewable Microgrid Hybrid System for Sustainable Rural Electrification in Khlong Ruea, Thailand. Energies 2025, 18, 1628. [Google Scholar] [CrossRef] [Scilit]
  2. Belboul, Z.; Toual, B.; Bensalem, A.; Ghenai, C.; Khan, B.; Kamel, S. Techno-economic optimization for isolated hybrid PV/wind/battery/diesel generator microgrid using improved salp swarm algorithm. Sci. Rep. 2024, 14, 2920. [Google Scholar] [CrossRef] [Scilit]
  3. Tan, H.; Li, L.; Zhang, B. Study on the Economic and Technical Optimization of Hybrid Rural Microgrids Integrating Wind, Solar, Biogas, and Energy Storage with AC/DC Conversion. EAI Endorsed Trans. Energy Web 2024, 11, 5803. [Google Scholar] [CrossRef] [Scilit]
  4. Kost, C.; Hussein, N.S.; Schlegl, T. Levelized Cost of Electricity—Renewable Energy Technologies; Fraunhofer Institute for Solar Energy Systems ISE: Freiburg, Germany, 2024; Available online: https://www.ise.fraunhofer.de/en/publications/studies/cost-of-electricity.html (accessed on 1 March 2026).
  5. IRENA. Renewable Power Generation Costs in 2024; IRENA: Abu Dhabi, UAE, 2025; ISBN 978-92-9260-669-5. Available online: https://www.irena.org/-/media/Files/IRENA/Agency/Publication/2025/Jul/IRENA_TEC_RPGC_in_2024_2025.pdf (accessed on 1 March 2026).
  6. Lei, B.; Ren, Y.; Luan, H.; Dong, R.; Wang, X.; Liao, J.; Fang, S.; Gao, K. A Review of Optimization for System Reliability of Microgrid. Mathematics 2023, 11, 822. [Google Scholar] [CrossRef] [Scilit]
  7. Shah, S.K.H.; Hellany, A.; Nagrial, M.; Rizk, J. A comprehensive review on energy management strategy of microgrids. Energy Rep. 2023, 9, 1991–2015. [Google Scholar] [CrossRef] [Scilit]
  8. Pamulapati, T.; Cavus, M.; Odigwe, I.; Allahham, A.; Walker, S.; Giaouris, D. A Review of Microgrid Energy Management Strategies from the Energy Trilemma Perspective. Energies 2022, 16, 289. [Google Scholar] [CrossRef] [Scilit]
  9. Kiehbadroudinezhad, M.; Merabet, A.; Ghenai, C.; Abo-Khalil, A.G.; Salameh, T. The role of biofuels for sustainable Microgrids: A path towards carbon neutrality and the green economy. Heliyon 2023, 9, e13407. [Google Scholar] [CrossRef] [Scilit]
  10. Moreno-Castro, J.; Guevara, V.S.O.; Viltre, L.T.L.; Landera, Y.G.; Zevallos, O.C.; Aybar-Mejía, M. Microgrid Management Strategies for Economic Dispatch of Electricity Using Model Predictive Control Techniques: A Review. Energies 2023, 16, 5935. [Google Scholar] [CrossRef] [Scilit]
  11. Joshal, K.S.; Gupta, N. Microgrids with Model Predictive Control: A Critical Review. Energies 2023, 16, 4851. [Google Scholar] [CrossRef] [Scilit]
  12. Hai, T.; Seger, A.A.; El-Shafay, A.S.; Singh, P.K.; Al-Yasiri, A.J.; Ahmed, M.; Almeshaal, M.; Darweesh, M.S.; Kolsi, L.; Singh, N.S.S. Techno-economic-enviro evaluation of a PV/biogas/diesel/battery hybrid system to support the power network for the welfare of rural communities. Int. J. Low-Carbon Technol. 2025, 20, 659–670. [Google Scholar] [CrossRef] [Scilit]
  13. Arif, S.; Rabbi, A.E.; Ahmed, S.U.; Lipu, M.S.H.; Jamal, T.; Aziz, T.; Sarker, M.R.; Riaz, A.; Alharbi, T.; Hussain, M.M. Enhancement of Solar PV Hosting Capacity in a Remote Industrial Microgrid: A Methodical Techno-Economic Approach. Sustainability 2022, 14, 8921. [Google Scholar] [CrossRef] [Scilit]
  14. Yamegueu, D.; Nelson, H.T.; Boly, A.S. Improving the performance of PV/diesel microgrids via integration of a battery energy storage system: The case of Bilgo village in Burkina Faso. Energy Sustain. Soc. 2024, 14, 48. [Google Scholar] [CrossRef] [Scilit]
  15. Sun, C.; Ali, S.Q.; Joos, G.; Paquin, J.-N.; Montenegro, J.F.P. Design and CHIL testing of microgrid controller with general rule-based dispatch. Appl. Energy 2023, 345, 121313. [Google Scholar] [CrossRef] [Scilit]
  16. Sakthivelnathan, N.; Arefi, A.; Lund, C.; Mehrizi-Sani, A.; Muyeen, S. Cost-effective reliability level in 100% renewables-based standalone microgrids considering investment and expected energy not served costs. Energy 2024, 311, 133426. [Google Scholar] [CrossRef] [Scilit]
  17. Zarate-Perez, E.; Sebastian, R. Assessment and optimization of residential microgrid reliability using genetic and ant colony algorithms. Processes 2025, 13, 740. [Google Scholar] [CrossRef] [Scilit]
  18. Samatar, A.M.; Lekbir, A.; Mekhilef, S.; Mokhlis, H.; Tey, K.S.; Alassaf, A. Techno-economic and environmental analysis of a fully renewable hybrid energy system for sustainable power infrastructure advancement. Sci. Rep. 2025, 15, 12140. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  19. Nawaz, A.; Wang, D.; Mahmoudi, A.; Khan, M.Q.; Wang, X.; Wang, B.; Wang, X. MPC-driven optimal scheduling of grid-connected microgrid: Cost and degradation minimization with PEVs integration. Electr. Power Syst. Res. 2025, 238, 111173. [Google Scholar] [CrossRef] [Scilit]
  20. Shahzad, S.; Abbasi, M.A.; Chaudhry, M.A.; Hussain, M.M. Model Predictive Control Strategies in Microgrids: A Concise Revisit. IEEE Access 2022, 10, 122211–122225. [Google Scholar] [CrossRef] [Scilit]
  21. Hu, J.; Shan, Y.; Yang, Y.; Parisio, A.; Li, Y.; Amjady, N.; Islam, S.; Cheng, K.W.; Guerrero, J.M.; Rodríguez, J. Economic Model Predictive Control for Microgrid Optimization: A Review. IEEE Trans. Smart Grid 2023, 14, 2652–2667. [Google Scholar] [CrossRef] [Scilit]
  22. Costa, T.; Souza, A.C.M.; Vasconcelos, A.; Rode, A.C.; Filho, R.D.; Marinho, M.H.N. Comparing the Financial and Environmental Impact of Battery Energy Storage Systems and Diesel Generators on Microgrids. Sustainability 2023, 15, 16136. [Google Scholar] [CrossRef] [Scilit]
  23. Choudhury, S.; Varghese, G.T.; Mohanty, S.; Kolluru, V.R.; Bajaj, M.; Blazek, V.; Prokop, L.; Misak, S. Energy management and power quality improvement of microgrid system through modified water wave optimization. Energy Rep. 2023, 9, 6020–6041. [Google Scholar] [CrossRef] [Scilit]
  24. Benkhadra, S. Real-Time Monitoring of Power Quality in Renewable-Dominated Microgrids. Int. J. Adv. Electr. Eng. 2025, 6, 31–35. Available online: https://www.electricaltechjournal.com/article/87/6-1-7-974.pdf (accessed on 1 March 2026).
  25. Izadkhast, S.; Cossent, R.; Frías, P.; García-González, P.; Rodríguez-Calvo, A. Performance Evaluation of a BESS Unit for Black Start and Seamless Islanding Operation. Energies 2022, 15, 1736. [Google Scholar] [CrossRef] [Scilit]
  26. IEC 61000-4-30:2015+A1:2021; Electromagnetic Compatibility—Part 4-30: Power Quality Measurement Methods. International Electrotechnical Commission (IEC): Geneva, Switzerland, 2021.
  27. IEC 61724-1:2021; Photovoltaic System Performance—Part 1: Monitoring. International Electrotechnical Commission (IEC): Geneva, Switzerland, 2021.
  28. Std, I.E.E. 2030.7-2017; IEEE Standard for the Specification of Microgrid Controllers. IEEE: New York, NY, USA, 2018.
  29. Std, I.E.E. 2030.8-2018; IEEE Standard for the Testing of Microgrid Controllers. IEEE: New York, NY, USA, 2018.
  30. Zhu, Y.; Wang, J.; Bi, K.; Sun, Q.; Zong, Y.; Zong, C. Energy Optimal Dispatch of the Data Center Microgrid Based on Stochastic MPC. Front. Energy Res. 2022, 10, 863292. [Google Scholar] [CrossRef] [Scilit]
  31. Guo, J.; Gong, S.; Liu, X.; Zhang, Y.; Wang, L.; Wang, Z. Low-Carbon Robust Predictive Dispatch Strategy of the Photovoltaic Microgrid in Industrial Parks. Front. Energy Res. 2022, 10, 900503. [Google Scholar] [CrossRef] [Scilit]
  32. Yamano, S.; Akisawa, A. Evaluation of an Additional Generator on the Economic Effect Based on a Load Sharing Optimization of Medium-Speed/High-Speed Diesel Generators in a Microgrid. Energies 2022, 15, 1007. [Google Scholar] [CrossRef] [Scilit]
  33. Hamilton, J.; Negnevitsky, M.; Wang, X.; Semshchikov, E. The Role of Low-Load Diesel in Improved Renewable Hosting Capacity within Isolated Power Systems. Energies 2020, 13, 4053. [Google Scholar] [CrossRef] [Scilit]
  34. Prakash, S.V.J.; Dhal, P. Cost optimization and optimal sizing of standalone biomass/diesel generator/wind turbine/solar microgrid system. AIMS Energy 2022, 10, 665–694. [Google Scholar] [CrossRef] [Scilit]
  35. Aziz, A.; Khan, W.; Yousaf, M.Z.; Abdullah, M.; Khan, R.S.; Farooq, U.; Shabaz, M. Integrated energy scheduling for grid-connected microgrids using battery degradation-aware optimization and coordinated control strategies. Sci. Rep. 2025, 15, 44033. [Google Scholar] [CrossRef] [Scilit]
  36. Rockafellar, R.T.; Uryasev, S. Optimization of Conditional Value-at-Risk. J. Risk 2000, 2, 21–42. [Google Scholar] [CrossRef] [Scilit]
  37. Powell, W.B. A Unified Framework for Stochastic Optimization. Eur. J. Oper. Res. 2019, 275, 795–821. [Google Scholar] [CrossRef] [Scilit]
  38. García, A.S.W.; Rocha, A.P.D.A.; Vilela, O.D.C.; Mendes, N. Assessment of Solar Radiation Datasets for Building Energy Simulation. Buildings 2025, 15, 3337. [Google Scholar] [CrossRef] [Scilit]
  39. Tayyeh, H.K.; Mohammed, R. Analysis of NASA POWER reanalysis products to predict temperature and precipitation in Euphrates River basin. J. Hydrol. 2023, 619, 129327. [Google Scholar] [CrossRef] [Scilit]
  40. OECD. Hydropower Special Market Report 2021; IEA: Paris, France, 2021. [Google Scholar]
  41. Lee, J.; Craparo, E.; Oriti, G.; Krener, A. Optimizing fuel efficiency on an islanded microgrid under varying loads. Energies 2022, 15, 7943. [Google Scholar] [CrossRef] [Scilit]
  42. Zhang, J.; Huang, H.; Zhang, G.; Dai, Z.; Wen, Y.; Jiang, L. Cycle life studies of lithium-ion power batteries for electric vehicles: A review. eTransportation 2024, 20, 100304. [Google Scholar] [CrossRef] [Scilit]
  43. Madani, S.S.; Shabeer, Y.; Allard, F.; Fowler, M.; Ziebert, C.; Wang, Z.; Panchal, S.; Chaoui, H.; Mekhilef, S.; Dou, S.X.; et al. A comprehensive review on lithium-ion battery lifetime prediction and aging mechanism analysis. Batteries 2025, 11, 127. [Google Scholar] [CrossRef] [Scilit]
  44. Kaufman, L.; Rousseeuw, P.J. Finding Groups in Data: An Introduction to Cluster Analysis; Wiley: Hoboken, NJ, USA, 2005. [Google Scholar]
  45. Forrest, J.; Lougee-Heimer, R. CBC User Guide; COIN-OR Foundation: Towson, MD, USA, 2024. [Google Scholar]
  46. Hart, W.E.; Laird, C.D.; Watson, J.P.; Woodruff, D.L.; Hackebeil, G.A.; Nicholson, B.L.; Siirola, J.D. Pyomo—Optimization Modeling in Python, 3rd ed.; Springer: Cham, Switzerland, 2021. [Google Scholar]
  47. Ghorbanzadeh, M.; Issa, M.; Ilinca, A. Experimental underperformance detection of a fixed-speed diesel–electric generator based on exhaust gas emissions. Energies 2023, 16, 3537. [Google Scholar] [CrossRef] [Scilit]
  48. Barry, N.; Santoso, S. Modernizing tactical military microgrids to keep pace with the electrification of warfare. Mil. Rev. 2022, 102, 95–102. Available online: https://www.armyupress.army.mil/Journals/Military-Review/English-Edition-Archives/November-December-2022/Barry/ (accessed on 1 March 2026).
  49. Odetoye, O.; Olulope, P.; Olanrewaju, O.; Alimi, A.; Igbinosa, O. Multi-year techno-economic assessment of proposed zero-emission hybrid community microgrid in Nigeria using HOMER. Heliyon 2023, 9, e19189. [Google Scholar] [CrossRef] [Scilit]
  50. Omar, M.A. Techno-economic analysis of PV/diesel/battery hybrid system for rural community electrification: A case study in the Northern West Bank. Energy 2025, 317, 134770. [Google Scholar] [CrossRef] [Scilit]
  51. HOMER Pro User Manual: Net Present Cost, Ver. 3.15; HOMER Energy LLC: Boulder, CO, USA, 2024.
  52. HOMER Energy LLC. Levelized Cost of Energy (LCOE). In HOMER Pro 3.15 Documentation; HOMER Energy LLC: Boulder, CO, USA, 2024; Available online: https://homerenergy.com/products/pro/docs/3.15/levelized_cost_of_energy.html (accessed on 1 March 2026).
  53. 50160:2022+A1:2025; Voltage Characteristics of Electricity Supplied by Public Electricity Networks. CENELEC: Brussels, Belgium, 2025. Available online: https://genorma.com/en/standards/en-50160-2022-a1-2025 (accessed on 1 March 2026).
  54. Liu, H.; Li, Y.; Hu, G.; Zhong, J.; Zhang, M. Optimal operation of multi-energy microgrid: A distributionally robust optimisation method considering integrated demand response and tiered carbon trading. IET Gener. Transm. Distrib. 2025, 19, e70209. [Google Scholar] [CrossRef] [Scilit]
  55. Lin, M.; Li, B.; Cecati, C. Distributed stochastic MPC for energy dispatch with distributionally robust optimisation. Appl. Math. Mech. Engl. Ed. 2025, 46, 323–340. [Google Scholar] [CrossRef] [Scilit]
  56. Mohajerin Esfahani, P.; Kuhn, D. Data-driven distributionally robust optimization using the Wasserstein metric: Performance guarantees and tractable reformulations. Math. Program. 2018, 171, 115–166. [Google Scholar] [CrossRef] [Scilit]
  57. Tarife, R.; Nakanishi, Y.; Chen, Y.; Zhou, Y.; Estoperez, N.; Tahud, A. Optimization of Hybrid Renewable Energy Microgrid for Rural Agricultural Area in Southern Philippines. Energies 2022, 15, 2251. [Google Scholar] [CrossRef] [Scilit]
  58. Gan, C.K.; Ariannejad, M.; Kang, C.C.; Ng, Z.-N.; Tan, J.D.; Mong, G.R.; Tee, W.H. Optimizing hybrid microgrids with battery energy storage for rural electrification: A high-resolution, multi-year simulation framework for Sarawak, Malaysia. Asia-Pac. J. Reg. Sci. 2025, 10, 2. [Google Scholar] [CrossRef] [Scilit]
  59. Sekhar, Y.R.; Chiranjeevi, C.; Ravindra Asif, M.; Hamida, M.B.B.; Syum, G.G. Optimising hybrid renewable energy systems for remote tribal villages: A techno-economic case study from central and Eastern India. Sci. Rep. 2025, 15, 45306. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  60. Choukri, N.E.; Touili, S.; Azzaoui, A.; Merrouni, A.A. Techno-economic analysis for a 100% renewable hybrid energy systems integration in a research facility in Morocco. iScience 2025, 28, 113132. [Google Scholar] [CrossRef] [Scilit]
  61. Signe, E.B.K.; Tchatchouang, L.V.N.; Pokem, P.; Ekoube, P.A.; Meva’a, L.; Nganhou, J. Micro Hydro Power Plant for Sustainable Energy in Rural Electrification: A Case Study in Cameroon. J. Power Energy Eng. 2023, 11, 34–43. [Google Scholar] [CrossRef]
  62. Bagdadee, A.H.; Zhang, L. Investigate the implementation of smart grid-integrated renewable distributed generation for sustainable energy development in Bangladesh. Energy Rep. 2025, 13, 2433–2453. [Google Scholar] [CrossRef] [Scilit]
  63. Ngao-Det, M.; Thongpron, J.; Namin, A.; Patcharaprakiti, N.; Muangjai, W.; Khampangkaew, N.; Srasuay, K.; Panlawan, N.; Nakaiam, K.; Somsak, T. Life Cycle Exergy and Economic Criteria of the Renewable Hybrid Microgrid System for Rural Electrification in Khlong Ruea, Thailand. In Proceedings of the 2025 SICE Festival with Annual Conference (SICE FES), Chiang Mai, Thailand, 9–12 September 2025; pp. 1005–1010. [Google Scholar] [CrossRef] [Scilit]
  64. Kamnarn, U.; Yousawat, S.; Sreeta, S.; Muangjai, W.; Somsak, T. Design and implementation of a distributed solar controller using modular buck converter with Maximum Power Point tracking. In Proceedings of the 45th International Universities Power Engineering Conference UPEC2010, Cardiff, UK, 31 August–3 September 2010; pp. 1–6. [Google Scholar]
  65. Beangthit, J.; Polvongsri, S. The Evaluation of the Performance and Economics of Solar Tracking System for Bifacial Solar Panel. RMUTL Eng. J. 2024, 9, 64–75. [Google Scholar]
  66. Riyathar, J.; Khunatorn, Y. Economic Suitability Analysis of Solar Photovoltaic Modules and Energy Storage Systems Installation in Residential Units Group with Optimization Method. RMUTL Eng. J. 2025, 10, 58–72. [Google Scholar]
  67. Yingram, M. Suitability of Local Islanding Detection Methods for Grid-Connected Inverter in Multi-Distributed Generation. RMUTL Eng. J. 2023, 8, 30–38. [Google Scholar]
  68. Uttasilp, C.; Patcharaprakiti, N.; Somsak, T.; Thongpron, J. Optimal solar energy on thermoelectric cooler of water generator in case study on flood crisis. Jpn. J. Appl. Phys. 2018, 57, 08RH05. [Google Scholar] [CrossRef] [Scilit]
  69. Kirdpipat, P.; Krongtripop, T.; Konpang, J.; Intarawiset, N.; Chaiyawong, K. Solar battery charger by monitoring via Smartphone application. RMUTL Eng. J. 2023, 8, 1–11. [Google Scholar]
  70. Chukiatkhajorn, N.; Takum, C.; Pookkapund, P.; Piyawongwisal, P.; Tubkerd, A.; Euaviriyanukul, K. Automatic Water, Fertilizer and Insecticide Dispenser System for Rose Garden using ESP8266 and Blynk IoT Platform. RMUTL Eng. J. 2023, 8, 30–41. [Google Scholar]
  71. Matta, C.; Pinna, S.; Ortu, S.; Parodo, F.; Giusto, D.; Anedda, M. A Survey on IoT-Based Smart Electrical Systems: An Analysis of Standards, Security, and Applications. Energies 2026, 19, 965. [Google Scholar] [CrossRef] [Scilit]
  72. Minh, Q.N.; Nguyen, V.-H.; Quy, V.K.; Ngoc, L.A.; Chehri, A.; Jeon, G. Edge Computing for IoT-Enabled Smart Grid: The Future of Energy. Energies 2022, 15, 6140. [Google Scholar] [CrossRef] [Scilit]
  73. Srasuay, K.; Ngao-Det, M.; Thongpron, J.; Namin, A.; Muangjai, W.; Patcharaprakiti, N.; Somsak, T. Design and Development of Control System for Hybrid Charging Station for EV Shuttle Mini Bus in University Campus. In Proceedings of the 2025 SICE Festival with Annual Conference (SICE FES), Chiang Mai, Thailand, 9–12 September 2025; pp. 1662–1668. [Google Scholar] [CrossRef] [Scilit]
  74. Yachiangkam, S.; Tammawan, W.; Sriprom, T.; Thongpron, J.; Kamnarn, U.; Oranpiroj, K.; Somsak, T.; Yotkaew, E.; Namin, A. Wireless Golf Cart Charging Development in Thailand. In Proceedings of the 2022 International Electrical Engineering Congress (iEECON), Khon Kaen, Thailand, 9–11 March 2022; pp. 1–4. [Google Scholar] [CrossRef] [Scilit]
  75. Yousawat, S.; Tammawan, W.; Sriprom, T.; Phondee, T.; Chaidee, E.; Jamshidpour, E.; Namin, A.; Thounthong, P. Design, Implementation, and IEC 61980 Compliance Testing of an Inductive Wireless Power Transfer System for EV Charging Applications. IEEE Access 2026, 14, 45071–45087. [Google Scholar] [CrossRef] [Scilit]
  76. Liu, Y.; Pan, L.; Yao, S.; Zhang, J.; Cui, S.; Zhu, C. A Review on the Recent Development of High-Frequency Inverters for Wireless Power Transfer. Energies 2024, 17, 5153. [Google Scholar] [CrossRef] [Scilit]
  77. Lecluyse, C.; Minnaert, B.; Kleemann, M. A Review of the Current State of Technology of Capacitive Wireless Power Transfer. Energies 2021, 14, 5862. [Google Scholar] [CrossRef] [Scilit]
Figure 1. Microgrid architecture comprising solar PV, BESS, hydropower, and a diesel generator with a two-layer EMS.
Figure 1. Microgrid architecture comprising solar PV, BESS, hydropower, and a diesel generator with a two-layer EMS.
Energies 19 02791 g001
Figure 2. Two-layer EMS architecture: offline optimization (Layer 1) and operator-assisted field execution (Layer 2).
Figure 2. Two-layer EMS architecture: offline optimization (Layer 1) and operator-assisted field execution (Layer 2).
Energies 19 02791 g002
Figure 3. A 24 h hybrid microgrid dispatch profile showing PV, hydro, BESS, and diesel contributions against load demand.
Figure 3. A 24 h hybrid microgrid dispatch profile showing PV, hydro, BESS, and diesel contributions against load demand.
Energies 19 02791 g003
Figure 4. Seasonal community load demand—dry season (Jan, actual SCADA data) vs. estimated wet season (Jul–Aug, ×1.22 load scaling). Shaded band shows seasonal deviation.
Figure 4. Seasonal community load demand—dry season (Jan, actual SCADA data) vs. estimated wet season (Jul–Aug, ×1.22 load scaling). Shaded band shows seasonal deviation.
Energies 19 02791 g004
Figure 5. Seasonal solar irradiance profiles—dry season (Jan, actual data) vs. estimated wet season (×0.58 irradiance scaling).
Figure 5. Seasonal solar irradiance profiles—dry season (Jan, actual data) vs. estimated wet season (×0.58 irradiance scaling).
Energies 19 02791 g005
Figure 6. Manual transfer switch panel (MTS and MDB) at Khlong Ruea.
Figure 6. Manual transfer switch panel (MTS and MDB) at Khlong Ruea.
Energies 19 02791 g006
Figure 7. Voltage and power traces during a manual diesel-to-BESS transfer event (1.2 min interruption).
Figure 7. Voltage and power traces during a manual diesel-to-BESS transfer event (1.2 min interruption).
Energies 19 02791 g007
Figure 8. Multi-scenario rolling simulation. (a) SC-1 Uncontrolled BESS (baseline): representative 24 h SoC(t) trajectory. Red dashed line = minimum SoC (DoDref = 40%). Shaded region = usable SoC band above 60%. Seed = 2024. (b) SC-2 Rule-Based Control: representative 24 h SoC(t) trajectory. Red dashed line = minimum SoC (DoDref = 40%). (c) SC-3 CVaR-Optimized (stochastic MPC): representative 24 h SoC(t) trajectory. Red dashed line = minimum SoC (DoDref = 40%). (d) SC-4 CVaR-optimized: representative 24 h SoC(t) trajectory. Red dashed line = minimum SoC (DoDref = 40%). Lowest mean DoD (38.2%) among all scenarios. (e) Annual mean DoD (±1 SD) per scenario: SC-1 51.9%, SC-2 41.5%, SC-3 41.0%, SC-4 CVaR-optimized 38.2%. Red dashed line = DoDref = 40% design limit. Results from 365-day rolling simulation (30 realizations per weather class).
Figure 8. Multi-scenario rolling simulation. (a) SC-1 Uncontrolled BESS (baseline): representative 24 h SoC(t) trajectory. Red dashed line = minimum SoC (DoDref = 40%). Shaded region = usable SoC band above 60%. Seed = 2024. (b) SC-2 Rule-Based Control: representative 24 h SoC(t) trajectory. Red dashed line = minimum SoC (DoDref = 40%). (c) SC-3 CVaR-Optimized (stochastic MPC): representative 24 h SoC(t) trajectory. Red dashed line = minimum SoC (DoDref = 40%). (d) SC-4 CVaR-optimized: representative 24 h SoC(t) trajectory. Red dashed line = minimum SoC (DoDref = 40%). Lowest mean DoD (38.2%) among all scenarios. (e) Annual mean DoD (±1 SD) per scenario: SC-1 51.9%, SC-2 41.5%, SC-3 41.0%, SC-4 CVaR-optimized 38.2%. Red dashed line = DoDref = 40% design limit. Results from 365-day rolling simulation (30 realizations per weather class).
Energies 19 02791 g008aEnergies 19 02791 g008b
Figure 9. IEEE Std 1459-2010 Phase-A apparent power decomposition: diesel supply (left) vs. BESS supply (right). Stacked bars show fundamental active P1 (blue), fundamental reactive Q1 (light blue), voltage distortion Dᵝ (red), and current distortion Dᵚ (yellow). BESS supply reduces non-fundamental apparent power SN by 92.9%.
Figure 9. IEEE Std 1459-2010 Phase-A apparent power decomposition: diesel supply (left) vs. BESS supply (right). Stacked bars show fundamental active P1 (blue), fundamental reactive Q1 (light blue), voltage distortion Dᵝ (red), and current distortion Dᵚ (yellow). BESS supply reduces non-fundamental apparent power SN by 92.9%.
Energies 19 02791 g009
Figure 10. Composite power quality index (PQI) compliance ratios r k = L k / M k per metric: diesel supply (red) vs. BESS supply (green). The horizontal dashed line at r k = 1 is the compliance threshold. PQI (geometric mean of all r k ) = 0.747 for diesel (fail) and 3.891 for BESS (pass), a 5.21× improvement.
Figure 10. Composite power quality index (PQI) compliance ratios r k = L k / M k per metric: diesel supply (red) vs. BESS supply (green). The horizontal dashed line at r k = 1 is the compliance threshold. PQI (geometric mean of all r k ) = 0.747 for diesel (fail) and 3.891 for BESS (pass), a 5.21× improvement.
Energies 19 02791 g010
Figure 11. Load-normalized THD-V OLS regression: (a) diesel supply (n = 97), (b) BESS supply (n = 60). Shaded bands = 95% confidence interval. The diamond marker (◆) indicates the adjusted mean at Pref 15 kW. Both modes show β1 > 0, confirming load-driven harmonic injection independent of source type.
Figure 11. Load-normalized THD-V OLS regression: (a) diesel supply (n = 97), (b) BESS supply (n = 60). Shaded bands = 95% confidence interval. The diamond marker (◆) indicates the adjusted mean at Pref 15 kW. Both modes show β1 > 0, confirming load-driven harmonic injection independent of source type.
Energies 19 02791 g011
Figure 12. Harmonic distortion metrics—diesel generator vs. BESS supply with 95% stationary block-bootstrap CI (B = 2000, block = 10 min). (Left): total harmonic distortion of voltage (THD-V, %); (Right): total harmonic distortion of current (THD-I, %). Dashed lines indicate applicable standard limits (EN 50160: THD-V ≤ 8%; IEEE 519-2022: THD-I ≤ 5%).
Figure 12. Harmonic distortion metrics—diesel generator vs. BESS supply with 95% stationary block-bootstrap CI (B = 2000, block = 10 min). (Left): total harmonic distortion of voltage (THD-V, %); (Right): total harmonic distortion of current (THD-I, %). Dashed lines indicate applicable standard limits (EN 50160: THD-V ≤ 8%; IEEE 519-2022: THD-I ≤ 5%).
Energies 19 02791 g012
Figure 13. Voltage unbalance and power factor—diesel generator vs. BESS supply with 95% stationary block-bootstrap CI (B = 2000, block = 10 min). (Left): Voltage Unbalance Factor (VUF, %); (Right): true power factor. Dashed lines indicate standard limits (EN 50160: VUF ≤ 2%; minimum target PF = 0.85).
Figure 13. Voltage unbalance and power factor—diesel generator vs. BESS supply with 95% stationary block-bootstrap CI (B = 2000, block = 10 min). (Left): Voltage Unbalance Factor (VUF, %); (Right): true power factor. Dashed lines indicate standard limits (EN 50160: VUF ≤ 2%; minimum target PF = 0.85).
Energies 19 02791 g013
Figure 14. BESS state of charge (%) derived from terminal voltage Vbatt using the linear LFP approximation: SoC = (V − 44.0)/(54.4 − 44.0) × 100%. The red dashed line is DoDref = 40% (SoCmin = 60%); the orange dotted line is the float target 80%. Shaded regions: PV charging phase (09:00–17:00) and BESS discharge phase (18:00–22:00). Khlong Ruea microgrid, 23 January 2024.
Figure 14. BESS state of charge (%) derived from terminal voltage Vbatt using the linear LFP approximation: SoC = (V − 44.0)/(54.4 − 44.0) × 100%. The red dashed line is DoDref = 40% (SoCmin = 60%); the orange dotted line is the float target 80%. Shaded regions: PV charging phase (09:00–17:00) and BESS discharge phase (18:00–22:00). Khlong Ruea microgrid, 23 January 2024.
Energies 19 02791 g014
Figure 15. BESS charge/discharge DC power profile. Positive values = discharging (to AC load); negative values = charging (from PV array). Khlong Ruea microgrid, 23 January 2024.
Figure 15. BESS charge/discharge DC power profile. Positive values = discharging (to AC load); negative values = charging (from PV array). Khlong Ruea microgrid, 23 January 2024.
Energies 19 02791 g015
Figure 16. Levelized cost of electricity (LCOE, USD/kWh) for four energy-mix scenarios: diesel-only (0.69), PV + Diesel (0.56), PV + BESS + Diesel (0.45), and PV + BESS + Hydro + Diesel/Proposed (0.36). Cost-reduction percentages are annotated between adjacent bars; renewable energy (RE) share is labeled inside bars. The teal dashed line = benchmark grid tariff ≈ 0.34 USD/kWh. Based on a 25-year HOMER Pro simulation [1].
Figure 16. Levelized cost of electricity (LCOE, USD/kWh) for four energy-mix scenarios: diesel-only (0.69), PV + Diesel (0.56), PV + BESS + Diesel (0.45), and PV + BESS + Hydro + Diesel/Proposed (0.36). Cost-reduction percentages are annotated between adjacent bars; renewable energy (RE) share is labeled inside bars. The teal dashed line = benchmark grid tariff ≈ 0.34 USD/kWh. Based on a 25-year HOMER Pro simulation [1].
Energies 19 02791 g016
Figure 17. CO2 intensity (kgCO2/MWh) horizontal bar chart for four energy-mix scenarios. Percentage reduction relative to diesel-only baseline annotated at right margin. Proposed PV + BESS + Hydro + Diesel configuration achieves 82% CO2 reduction (148 → 27 kgCO2/MWh). Based on a 25-year HOMER Pro simulation [1].
Figure 17. CO2 intensity (kgCO2/MWh) horizontal bar chart for four energy-mix scenarios. Percentage reduction relative to diesel-only baseline annotated at right margin. Proposed PV + BESS + Hydro + Diesel configuration achieves 82% CO2 reduction (148 → 27 kgCO2/MWh). Based on a 25-year HOMER Pro simulation [1].
Energies 19 02791 g017
Table 1. Microgrid system component specifications.
Table 1. Microgrid system component specifications.
ComponentRatingKey Parameters
PV array20 kWpSouth-facing, fixed tilt 15°, bifacial mono-Si
BESS48 kWh/22 kWLiFePO4, η_rt = 0.95, SoC 20–95%
Hydro turbine50 kWCross-flow, head 3.2 m, seasonal (Jul–Dec)
Diesel gen48 kWa = 0.30 L/kWh., b = 1.20 L/h
Inverter22 kW bidirectionalIEC 61727/62109
Bus380 V ± 5%, 50 Hz ± 0.2 HzIEEE 2030.7-2017
Table 2. Fluke 435 measurement accuracy specifications (IEC 61000-4-30 Class A).
Table 2. Fluke 435 measurement accuracy specifications (IEC 61000-4-30 Class A).
QuantityRangeAccuracy
Voltage (RMS)1–1000 V±0.1% of nominal
Current (iFlex1500)5–1500 A±1% + clamp tol.
Active power±1% of reading
THD-V/THD-I0–50%±1% at ≥10%
Unbalance0–10%±0.15%
Flicker   P s t IEC 61000-4-15 compliant
Table 3. Decision, state, disturbance, and parameter variables for the MILP problem.
Table 3. Decision, state, disturbance, and parameter variables for the MILP problem.
SymbolRoleDescription
P D G ( t ) ,   u D G ( t ) DecisionDiesel power and on/off commitment
P B E S S , d c h ( t ) ,   u c h , d c h ( t ) DecisionBESS charge/discharge power and mode flags
P P V , c u r t ( t ) DecisionPV curtailment
S o C ( t ) Auxiliary variableBESS state of charge
P P V S ( t ) ,   P L o a d S ( t ) DisturbanceScenario PV/load forecasts
c f ,   a ,   b ,   k D G ,   k B ,   c r e p ParameterFuel price, consumption, O&M, replacement
Table 4. MILP model parameters and field-verified values.
Table 4. MILP model parameters and field-verified values.
ParameterValueSource
c f 0.91 USD/L2025 field price
a, b0.30 L/kWh, 1.20 L/hfuel curve fit
η c h ,   η d c h 0.975 eachBESS datasheet
E B E S S 48 kWhdatasheet
S o C min ,   S o C max 20%, 95%datasheet
N c y c l e @ 80% DoD6000datasheet
R D G , max 15 kW/minengine spec
ε g a p 0.5%solver setting
Table 5. Scenario clusters (k-medoids, N = 8).
Table 5. Scenario clusters (k-medoids, N = 8).
IDLabelπ_sNotes
s1Clear0.18 High   k t , low variance
s2High-clear0.12Near clear-sky
s3Partly cloudy0.20Moderate variance
s4Cloudy0.16 Low   k t
s5Overcast0.08 Very   low   k t
s6Monsoon0.10 Low   k t + high load
s7Peak-load0.08High evening load
s8Low-load0.08Holiday-type
Table 6. Per-scenario operating indicators (365-day rolling simulation).
Table 6. Per-scenario operating indicators (365-day rolling simulation).
ScenarioDaysCost (kTHB/d)Diesel Runtime (h/d)LPSP (%)EENS (kWh/d)
Clear660.820.350.120.31
High-clear440.740.210.090.22
Partly cloudy731.050.720.210.58
Cloudy581.471.350.441.42
Overcast291.781.910.521.97
Monsoon371.881.780.532.34
Peak-load291.631.620.411.81
Low-load290.680.220.050.18
Table 7. Annual performance—scenario MPC vs. rule-based and deterministic MPC baselines.
Table 7. Annual performance—scenario MPC vs. rule-based and deterministic MPC baselines.
Method
(B1–B4 + Proposed)
FamilyAnnual Cost (kUSD)Δ Cost vs. B1 (%)Proposed Wins by (%)LPSP Worst-Class (%)Wall-Time Mean (s)Wall-Time p99 (s)
B1 Rule-based load-followingHeuristic13.2018.41.42<0.01<0.01
B2 Deterministic MPCExact,
expected-value forecast
11.5612.46.60.970.711.41
B3 Chance-constrained stochastic MPC [30]Stochastic11.1515.53.10.622.345.87
B4 Robust optimizationRobust11.5512.50.90.271.90-
Proposed scenario MPC (k-medoids + CVaR)Exact MILP10.8018.40.530.823.41
Table 8. Three-phase power quality measurements: diesel vs. BESS operating windows (IEC 61000-4-30 Class A, Fluke 435, 25 January 2024). Values are means with stationary block-bootstrap 95% CI (block = 10 min, B = 2000). EN 50160/IEEE 519-2022 limits shown where applicable.
Table 8. Three-phase power quality measurements: diesel vs. BESS operating windows (IEC 61000-4-30 Class A, Fluke 435, 25 January 2024). Values are means with stationary block-bootstrap 95% CI (block = 10 min, B = 2000). EN 50160/IEEE 519-2022 limits shown where applicable.
ParameterDiesel (n = 97)BESS (n = 60)ReductionLimit
THD-V Ph.A (%)5.161 [5.124–5.220]2.461 [2.422–2.504]52.3 ↓8.0
THD-V Ph.B (%)4.365 [4.151–4.595]3.336 [3.016–3.550]23.6 ↓8.0
THD-V Ph.C (%)6.653 [6.564–6.793]2.994 [2.657–3.215]55.0 ↓8.0
THD-V 3φ avg (%)5.393 [5.340–5.480]2.931 [2.702–3.075]45.7 ↓8.0
THD-I Ph.A (%)55.802 [54.575–57.111]4.933 [4.836–5.086]91.2 ↓5.0 i
THD-I Ph.B (%)77.343 [71.121–82.557]10.553 [9.542–11.140]86.4 ↓5.0 i
THD-I Ph.C (%)58.982 [58.016–59.712]7.796 [7.168–8.153]86.8 ↓5.0 i
VUF—IEC sym. comp. (%)0.856 [0.742–0.970]0.032 [0.028–0.036]96.3 ↓2.0
PF1 (displacement)0.9240.949+2.7 ↑0.85
PF (true total)0.8140.947+16.3 ↑0.85
P_st flicker0.910.4253.8 ↓1.0
i IEEE 519-2022 TDD limit for general distribution systems. BB-CI = stationary block-bootstrap 95% confidence interval (B = 2000 resamples, 10 min block length, preserving serial dependence of the half-cycle PQ stream). For every metric in the table, the diesel and BESS confidence intervals are entirely disjoint, so the diesel-vs.-BESS difference is statistically significant at the 5% level for each row without any further parametric assumption.
Table 9. IEEE Std 1459-2010 power decomposition—Phase A (mean values over respective operating windows).
Table 9. IEEE Std 1459-2010 power decomposition—Phase A (mean values over respective operating windows).
QuantitySymbolDieselBESS
Fundamental apparent powerS1 (VA)85025725
Fundamental active powerP1 (W)78585431
Fundamental reactive powerQ1 (var)32461811
Non-fundamental apparent powerSN (VA)4756336
Current distortion VADᵚ (VA)4737283
Voltage distortion VADᵝ (VA)438141
Harmonic apparent powerSH (VA)2457
Displacement power factorPF10.92420.9486
True total power factorPF0.81400.9465
Table 10. Composite power quality index (PQI)—compliance ratio r k = L k / M k per metric. r k > 1 indicates standard compliance; PQI > 1 indicates all metrics pass.
Table 10. Composite power quality index (PQI)—compliance ratio r k = L k / M k per metric. r k > 1 indicates standard compliance; PQI > 1 indicates all metrics pass.
Metric (Limit L k )Limit r k Diesel r k BESSStandard
THD-V (%)8.01.550 ✓3.250 ✓EN 50160
THD-I/TDD (%)5.00.090 ✗1.014 ✓IEEE 519-2022
VUF (%)2.02.336 ✓62.500 ✓EN 50160
True PF0.850.958 ✗1.114 ✓IEC/utility
PQI (geometric mean)>1.00.747 ✗3.891 ✓
Note: ✓ indicates compliance with the corresponding standard limit (rk > 1); ✗ indicates non-compliance with the corresponding standard limit (rk < 1).
Table 11. OLS regression results for load-normalized THD-V comparison.
Table 11. OLS regression results for load-normalized THD-V comparison.
Mode β 0 (%) β 1 (%/kW)R2Adj. Mean @ 15 kW
Diesel4.8190.01680.1755.071% [5.024–5.119]
BESS2.0420.03230.1592.526% [2.483–2.568]
Load-adjusted ΔTHD-V @ 15 kW 2.545% (50.2% ↓)
Note: The downward arrow (↓) indicates that a lower value is preferable; therefore, a negative value represents a reduction in THD-V relative to the diesel-only baseline.
Table 12. Field-measured PQ results compared with published inverter-based microgrid studies (IEC 61000-4-30 Class A).
Table 12. Field-measured PQ results compared with published inverter-based microgrid studies (IEC 61000-4-30 Class A).
Study/SourceSystemTHD-V (%)THD-I (%)VUF (%)
Choudhury 2023 [23]PV + BESS microgrid3.99.11.8
Hernández-Mayoral 2024 [24]RES microgrid3.510.41.6
EN 50160 limit [53]Public LV8.02.0
IEEE 519-2022 TDD limitDistribution5.0
This work—BESS (3φ avg)PV + Hydro + BESS + Diesel2.93 i4.93 00.032
This work—Diesel (3φ avg)PV + Hydro + BESS + Diesel5.3955.8 ✗0.856
i Three-phase average THD-V; 0 Phase-A value (representative). ✗ Exceeds IEEE 519-2022 TDD limit. Green: better than best-published comparable result. Block-bootstrap 95% CIs are reported in Table 7.
Table 13. Sensitivity of annual cost and mean solve time to (T, Δt).
Table 13. Sensitivity of annual cost and mean solve time to (T, Δt).
T (h)Δt (min)Cost (MTHB)Mean Solve (s)
12150.3850.31
2450.3768.9
24150.3770.82 ← baseline
24300.3810.29
24600.3840.12
36150.3771.62
48150.3763.41
Table 14. Upgrade requirements: operator-assisted to automated MPC dispatch.
Table 14. Upgrade requirements: operator-assisted to automated MPC dispatch.
Current LimitationUpgradeEst. Cost (USD)TRL Gain
Manual transfer 1–3 minATS/STS + grid-forming BESS34306 → 8
No remote telemetrySCADA + 4G gateway11406 → 7
Offline MILP onlyEdge-deployed receding MPC8607 → 8
Deterministic forecastsLSTM forecast module5707 → 8
No fault recordingCloud event logger2907 → 9
Table 15. Comparative summary of rural renewable hybrid microgrid systems reported in the literature (2022–2026). N/R = not reported; Sim. = simulation only; Field = field-measured data; RF = renewable energy fraction; CO2 Red. = CO2 reduction relative to diesel-only baseline; LPSP = loss of power supply probability; THD-V = voltage total harmonic distortion (3-phase average).
Table 15. Comparative summary of rural renewable hybrid microgrid systems reported in the literature (2022–2026). N/R = not reported; Sim. = simulation only; Field = field-measured data; RF = renewable energy fraction; CO2 Red. = CO2 reduction relative to diesel-only baseline; LPSP = loss of power supply probability; THD-V = voltage total harmonic distortion (3-phase average).
#Location (Ref.)YearConfigurationScale (kW)LCOE (USD/kWh)RF (%)CO2 Red. (%)LPSP (%)THD-V (%)Validation
1Khlong Ruea, Thailand (This work)2025PV + BESS+ Hydro + Diesel~15 load0.3687.382 0.532.93Field + Sim.
2Khlong Ruea, Thailand [1]2025PV + BESS+ Hydro + Diesel (design)~100.3687.382<1N/RSimulation
3India [23]2023PV + BESS islanded~5N/RN/RN/RN/R3.9Lab/Sim.
4Mexico [24]2024PV + BESS microgrid~3N/RN/RN/RN/R3.5Lab/Sim.
5Philippines [57]2022PV + Hydro+ Diesel + BESS25 (PV)0.18N/RN/R0.05N/RSimulation
6Nigeria [49]2023PV + CST+ Hydro + BESS
7West Bank, Palestine [50]2025PV + Diesel + BESS
8Sarawak, Malaysia [58]2025PV + Hydro+ Diesel + BESS~300.8586.787.4N/RN/RSimulation
9India tribal [59]2025PV + Wind+ Diesel + BESS~300.15N/RN/R~0N/RSimulation
10Morocco [60]2025PV + Biomass + BESS~1000.33100N/RN/RN/RSimulation
11Cameroon [61]2024PV + Micro-Hydro + BESS~350.045N/RN/RN/RN/RSimulation
12Bangladesh [62]2025PV + Wind + BESS high-RE~50N/RN/RN/RN/RN/RSimulation
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ngao-det, M.; Somsak, T.; Thongpron, J.; Namin, A.; Patcharaprakiti, N.; Khampangkaew, N.; Srasuay, K.; Panlawan, N.; Nakaiam, K.; Tunyasrirut, S.; et al. Field-Validated Two-Layer Dispatch Framework for a Rural Hybrid Microgrid with Power Quality and Environmental Assessment. Energies 2026, 19, 2791. https://doi.org/10.3390/en19122791

AMA Style

Ngao-det M, Somsak T, Thongpron J, Namin A, Patcharaprakiti N, Khampangkaew N, Srasuay K, Panlawan N, Nakaiam K, Tunyasrirut S, et al. Field-Validated Two-Layer Dispatch Framework for a Rural Hybrid Microgrid with Power Quality and Environmental Assessment. Energies. 2026; 19(12):2791. https://doi.org/10.3390/en19122791

Chicago/Turabian Style

Ngao-det, Montri, Teerasak Somsak, Jutturit Thongpron, Anon Namin, Nopporn Patcharaprakiti, Naris Khampangkaew, Kittinun Srasuay, Nattawat Panlawan, Kan Nakaiam, Satean Tunyasrirut, and et al. 2026. "Field-Validated Two-Layer Dispatch Framework for a Rural Hybrid Microgrid with Power Quality and Environmental Assessment" Energies 19, no. 12: 2791. https://doi.org/10.3390/en19122791

APA Style

Ngao-det, M., Somsak, T., Thongpron, J., Namin, A., Patcharaprakiti, N., Khampangkaew, N., Srasuay, K., Panlawan, N., Nakaiam, K., Tunyasrirut, S., & Muangjai, W. (2026). Field-Validated Two-Layer Dispatch Framework for a Rural Hybrid Microgrid with Power Quality and Environmental Assessment. Energies, 19(12), 2791. https://doi.org/10.3390/en19122791

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop