When batteries supply behind-the-meter services such as arbitrage or peak load management, an optimal controller can be designed to minimize the total electric bill. The limitations of the batteries, such as on voltage or state-of-charge, are represented in the model used to forecast the system's state dynamics. Control model inaccuracy can lead to an optimistic shortfall, where the achievable schedule will be costlier than the schedule derived using the model.
/* Style Definitions */
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-bidi-font-family:"Times New Roman";
Run instructions: Steps
1. Open config.ini (saved in scripts as a .txt file) and select the extended [CRM] parameters associated with the desired simulation case.
a. Mean parameters:
i. ChargeCapacity= 135.2366
b. Extreme case:
i. ChargeCapacity -3 sigma = 127.4366
ii. CoulombicEfficiency -3 sigma = 0.9240
iii. R0 +3 sigma = 0.016364
2. Open the file under “Case specific optimization/simulation code files” associated with the desired simulation case in a python editor / compiler (e.g. Visual Studio Code).
3. Compile and run the python program
Output description: Each program has four outputs: pyomo optimization output, relevant plots, the relevant customer bills, and an exported MATLAB data file.
1. Pyomo allows for the display of optimization conditions and variables. When the program is run it will iterate through approximately 50 steps in the command line before displaying EXIT: Optimal Solution Found. Note that this process is repeated for every recalculation step in closed-loop control but this output is not displayed.
2. The open loop programs display plots for electrical Load, Calculated Net Load, and Achieved Net Load, along with Power and State-of-Charge. The closed loop programs do not display Calculated Net Load as this line changes every time the control schedule is recalculated.
3. The command line output will print the bills calculated and achieved through the simulation. For open-loop simulations, both calculated bill and achieved bill are printed. For closed-loop simulations, only the achieved bill is printed.
4. The results of each simulation are exported into a MATLAB data file. The data files are named according to the simulation case but they all contain the same MATLAB variable (model_data) containing column vectors for each variable of interest.
This is the code and data for IS-RNN validation and research