Optimize for multiple variables in nonlinear function

1 次查看(过去 30 天)
I need to optimize the charging of a battery. I have the price for power per hour; €P(i). I want to charge the battery in t_final hours. The level of the battery after every hour, L(i) is a (nonlinear) function of the power inserted, P(i) and the Level which it had before the start of that hour; L(i) = f(L(i-1),P(i)). I need to find the optimal values for P(i) that minimize SUM( €P(i)*P(i) ) while keeping L(t_final) at 1.
How can I do this?

回答(1 个)

Torsten
Torsten 2017-7-21
编辑:Torsten 2017-7-21
min: sum_{i=1}^{t_final} Power_inserted(i)*Price(i)
s.t.
L(t_final)-1=0
Unknowns are Power_inserted(i) (i=1,...,t_final).
To get L(t_final), you will have to compute L(1),...,L(t_final-1) from the unknowns Power_inserted(i).
A typical problem for MATLAB's "fmincon".
Best wishes
Torsten.

类别

Help CenterFile Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by