Optimization of Battery Design for a EV

2 Ansichten (letzte 30 Tage)
Shardul
Shardul am 16 Nov. 2023
Beantwortet: Sam Chak am 17 Nov. 2023
How does one setup the requirement optimization function for Optimizing the Battery Design through Response Optimization App on Vehicle Composer ?
The function is of the nature : min f(x) = w1*ECR + w2*Cost
I have run the baseline simulation, now I want to do a optimization study, But I am new to this enviroment and I am trying to understand how does one setup the Optimization function for the EV.
Refrence : https://www.mathworks.com/videos/master-class-fulfill-range-acceleration-and-cost-targets-using-battery-sizing-1669124206915.html

Antworten (1)

Sam Chak
Sam Chak am 17 Nov. 2023
I didn't watch the video. However, with the cost function, you apply the optimizer:
fun = @costfun;
x0 = 1;
A = -1;
b = 0;
x = fmincon(fun, x0, A, b)
Local minimum found that satisfies the constraints. Optimization completed because the objective function is non-decreasing in feasible directions, to within the value of the optimality tolerance, and constraints are satisfied to within the value of the constraint tolerance.
x = 2.4723
% Cost function
function J = costfun(x)
w1 = 1; % a constant
w2 = 1; % a constant
ECR = x.^2 - 5*x + 6; % a formula in terms of x
Cost = tanh(x).^2; % a formula in terms of x
J = w1*ECR + w2*Cost;
end

Kategorien

Mehr zu Powertrain Blockset finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by