Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Battery charges in 5kW increments #1

Open
apigott opened this issue May 9, 2020 · 0 comments
Open

Battery charges in 5kW increments #1

apigott opened this issue May 9, 2020 · 0 comments

Comments

@apigott
Copy link
Contributor

apigott commented May 9, 2020

The battery model currently charges in large chunks cycling the battery (typically p_batt_ch = battery_max_rate until SOC = 100%).

This is caused by the GLPK_MI solver which uses the revised simplex method [1]. The revised simplex method promotes a large basis (prefers solutions in which the highest number of decision variables is 0). In the linear case/for the L1 norm this causes large peaks in the decision variable p_batt_ch and other energy storage systems.

A simple example (you can think of c as the TOU price vector and x as p_batt_ch):

max (sum(c*x[i]))
subject to: sum(x[i]) <= 13
x[i] <=5
c = [1, 1, 1, 1.1, 1]

Intuitively there are many solutions to this problem. The non-uniformity of c promotes charging the maximum amount at i=4 but the rest of the time steps have equivalent rewards.

argmax = {[5, 0, 0, 5, 3], or [5, 3, 0, 5, 0], or [2, 2, 2, 5, 2]}. The revised simplex method promotes solutions 1 and 2. However, generally we desire solution 3 in which the battery charges for a longer time period at a slower rate [cite?].

This can be solved linearly if we explicitly penalize the change in charge rate by some weighting factor lambda. Let x_init be the observed rate of charge taken in the last time step.

max (sum(c*x[i]) + lambda * sum [abs(dx)])
subject to: sum(x[i]) <= 13
dx[0] = x_init - x[0]
dx[i] = x[i-1] - x[i]
x[i] <=5
c = [1, 1, 1, 1.1, 1]

image

[1] https://www.gnu.org/software/glpk/
[2] https://www.researchgate.net/publication/226205536_Hyper-Sparsity_in_the_Revised_Simplex_Method_and_How_to_Exploit_it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant