RSE-AS: Research Code, Five Trained SAC Models, and Evaluation Results for Renewable Microgrid Energy Management
Authors/Creators
Description
RSE-AS: Research Code, Trained SAC Models, and Evaluation Results for Renewable Microgrid Energy Management
This repository accompanies the research study entitled “Causality-Aware Economic Action Selection for Battery-Constrained Microgrid Energy Management: A Computational Trade-off Between Soft Actor-Critic and Model Predictive Control.”
It provides the original research code, five pretrained Soft Actor-Critic (SAC) models, experimental evaluation results, and additional numerical verification artifacts for Causality-Aware Risk-Sensitive Economic Action Selection (RSE-AS).
RSE-AS is a post-policy economic action-selection mechanism that evaluates battery-feasible candidate actions using chronologically available forecasts, economic scoring, and uncertainty-dependent regularization without retraining the underlying SAC policies.
Repository Contents
Original research archive (Version 1)
-
Research notebooks: Two Google Colab notebooks documenting the research workflow and dataset preparation.
-
Pretrained SAC models: Five saved policies corresponding to random seeds 42, 43, 44, 45, and 46, each trained for 100,000 environment interactions.
-
Chronological evaluation: Results for validation in 2021, full-year testing in 2022, and the available 8,753 hourly observations from 2023.
-
Distribution-shift evaluation: Results under increased electricity demand (+20%), reduced photovoltaic (PV) generation (−30%), increased electricity tariffs (+50%), and combined perturbations.
-
Ablation analysis: Comparisons among RSE-AS, Economic-Only, Fixed attenuation, Adaptive attenuation, and unmodified SAC actions.
-
Statistical analysis: Seed-level results, paired cost differences, nominal confidence intervals, and exact two-sided sign tests.
-
Documentation: README, software requirements, reproducibility notes, data-source attribution, and licensing information.
Additional verification archive (Version 2)
-
reproduce_rse_2023.py— Python source code for the numerical replay audit. -
RSE_AS_2023_hourly_all_seeds.csv— Hourly replay trajectories for five frozen SAC policies. -
replay_vs_original.csv— Comparison of replayed and previously recorded results. -
verification_report.csv— Results of the 16 implemented verification checks. -
verification_metadata.json— Evaluation configuration, numerical discrepancies, and software environment information. -
README_VERIFICATION.md— Documentation of the additional audit and its limitations.
The Version 2 verification materials are included in RSE_AS_2023_Verification_Update.zip, alongside the retained original research archive.
Experimental Configuration
The investigated grid-connected microgrid includes a battery energy storage system with the following parameters:
-
Nominal battery capacity: 200 kWh.
-
Maximum charging/discharging power: 50 kW.
-
State-of-charge (SOC) limits: 20%–90%.
-
Charging and discharging efficiencies: 95%.
-
Nominal initial SOC: 50%.
-
Dispatch interval: 1 hour.
-
SAC observation dimension: 12.
-
SAC action dimension: 1.
The SAC policies were trained using the 2017–2020 dataset, with 2021 reserved for validation and controller development. The complete 2022 period was used for primary chronological testing, while the available 2023 observations provided an additional evaluation period.
The 2023 data were examined during research development and are not presented as a previously untouched holdout.
Key Research Results
Chronological economic performance
During the primary 2022 test, RSE-AS achieved a mean SOC-adjusted operating cost of USD 40,954.93, compared with USD 41,760.10 for Fixed attenuation, representing a saving of USD 805.17 (1.93%) across five pretrained SAC policies.
Under four controlled distribution-shift scenarios, cost savings relative to Fixed attenuation ranged from 1.46% to 1.76%.
Uncertainty-dependent penalty ablation
The Economic-Only ablation demonstrated that feasible economic candidate selection accounted for approximately 96.5% of the 2022 improvement relative to Fixed attenuation.
The explicit uncertainty-dependent quadratic penalty contributed an additional saving of USD 28.13 (0.0686%) relative to Economic-Only during 2022.
Its incremental economic effect was modest and scenario-dependent. The method does not establish calibrated probabilistic risk reduction.
Statistical evaluation
All five SAC seeds favored RSE-AS over Fixed attenuation in the primary test. However, the exact two-sided sign test yielded p = 0.0625, and statistical significance at the conventional 5% level is therefore not claimed on the basis of this test.
Ridge MPC comparison
During the available 2023 evaluation period, Ridge-based model predictive control (MPC) achieved an SOC-adjusted operating cost of USD 41,520.30, compared with the five-seed mean of USD 42,706.88 for RSE-AS. This represents an approximately 2.78% economic advantage for MPC.
In a computational benchmark involving 300 decision points, the measured median decision latency was approximately 0.151 ms for RSE-AS and 3.737 ms for Ridge MPC.
These measurements characterize the tested implementations and do not establish end-to-end real-time performance or hardware-independent computational superiority.
Reproducibility
All five saved SAC models were successfully loaded and evaluated using frozen policies. An additional numerical replay audit covered 8,753 hourly intervals in 2023 for each policy, yielding 43,765 evaluated control decisions.
The replayed results closely matched the previously archived seed-level operating costs and final state-of-charge values.
All 16 implemented replay and cross-controller consistency checks passed. The maximum absolute discrepancies were:
-
SOC-adjusted operating cost: USD 9.05 × 10⁻⁶.
-
Final SOC: 4.14 × 10⁻⁸.
The implemented checks covered battery power and SOC limits, SOC state-transition calculations, hourly continuity, grid-import and cost accounting, evaluation timestamps, and common nominal initial-state and battery-dynamics assumptions in the comparison with the recorded Ridge MPC trajectory.
These results support numerical reproducibility of the investigated RSE-AS evaluation and consistency of the principal physical and accounting assumptions.
The archived research notebooks retain research-development stages rather than providing a fully automated, single-command reproduction pipeline. Complete independent simulator equivalence, end-to-end forecasting provenance, and reproduction of all additional MPC analyses are not claimed.
Version 2 Update — Numerical Replay Verification (2023)
Version 2 supplements the original research archive with additional numerical verification artifacts while retaining the previously published code, pretrained SAC models, and evaluation results.
The new verification archive contains the Python replay source, hourly trajectories for all five SAC seeds, comparisons with previously recorded economic results, a verification-check report, metadata, and documentation.
The numerical replay was conducted without retraining the saved SAC policies or retuning the RSE-AS decision parameters.
The update strengthens the transparency and reproducibility of the reported 2023 evaluation. It should not be interpreted as independent verification of every forecasting, optimization, or simulation component.
Associated Dataset
The processed causal microgrid dataset is archived separately on Zenodo:
Dataset DOI: https://doi.org/10.5281/zenodo.23638036
The dataset and the archived software are complementary research artifacts. Reproduction of the evaluation requires the relevant processed data, saved model checkpoints, and documented dependencies.
Licensing
The researchers' original software is provided under the MIT License.
The researchers' model artifacts and numerical results are provided under Creative Commons Attribution 4.0 International (CC BY 4.0), subject to the rights notices and third-party licensing information included in the archives.
Users should consult the included license and attribution files to determine the applicable terms for individual components.
Scope and Limitations
The findings are specific to the investigated microgrid configuration and operating datasets. The distribution-shift scenarios are controlled perturbations rather than independent deployment environments.
RSE-AS is a finite-candidate post-policy action-selection mechanism, not a new reinforcement learning algorithm, globally optimal dispatch strategy, or formally calibrated risk-control system.
The modeled battery constraints exclude detailed electrochemical degradation and network-level voltage, frequency, and power-flow requirements.
Although the numerical replay confirms substantial agreement with the archived results, full independent forecasting provenance, implementation-level simulator parity, and generalization across independent microgrids remain outside the demonstrated verification scope.
Files
RSE_AS_2023_Verification_Update.zip
Additional details
Related works
- References
- Dataset: 10.5281/zenodo.23638036 (DOI)
Software
- Programming language
- Python