0% found this document useful (0 votes)
32 views23 pages

A-ECMS Fuel Optimization Report

The A-ECMS Simulation Report details the development of energy management strategies for a hybrid electric vehicle using dynamic programming to optimize fuel consumption while maintaining battery health. The report outlines the creation of both fuel-optimal and aging-aware energy management systems, including methodologies for estimating battery lifetime and analyzing fuel economy. Results indicate effective management of energy resources, achieving a fuel consumption rate of 4.5 liters per 100 km while keeping the battery state of charge within specified limits.

Uploaded by

Samuel Ouma
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views23 pages

A-ECMS Fuel Optimization Report

The A-ECMS Simulation Report details the development of energy management strategies for a hybrid electric vehicle using dynamic programming to optimize fuel consumption while maintaining battery health. The report outlines the creation of both fuel-optimal and aging-aware energy management systems, including methodologies for estimating battery lifetime and analyzing fuel economy. Results indicate effective management of energy resources, achieving a fuel consumption rate of 4.5 liters per 100 km while keeping the battery state of charge within specified limits.

Uploaded by

Samuel Ouma
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1

A-ECMS Simulation Report

Group Number: 12

Students:

Alice Brown, s123456

Bob Smith, s654321


2

A-ECMS Simulation Report

Table of Contents
Introduction......................................................................................................................................3

Develop a Fuel-Optimal EMS with Dynamic Programming:.........................................................3

Estimate the Battery's Lifetime....................................................................................................9

Results (Fuel-Optimal EMS).....................................................................................................10

Analyze the Fuel-Optimal EMS.................................................................................................11

Develop an Aging-Aware EMS with Dynamic Programming.......................................................13

Results (Age-Friendly EMS).....................................................................................................14

Analyze the Fuel Economy-Mileage Trade-Off........................................................................15

Overall Summary...........................................................................................................................17

References......................................................................................................................................18
3

1. Introduction

This research uses DynaProg to design and test how best to manage energy in a hybrid

electric vehicle (HEV), minimizing both fuel use and the impact on batteries. The motor for our

vehicle is 70 kW, the electric machine is 82 kW and the battery has 1100 Wh, all tested according

to the WLTP, a common cycle of 23.3 km split equally between city and highway routes (Micari

et al., 2022). The purpose is to find an EMS strategy that saves on fuel but keeps the vehicle’s

state of charge (SOC) in the range [0.35, 0.85]. We then use a degradation factor (β) and the Ah

throughput to predict the battery’s life, aiming for an EoL of 80% SOH. An aging-aware EMS is

then developed with the stage cost adjusted for fuel consumption and aging of the battery using a

special parameter (α) between 0 and 1 (Frambach et al., 2022). Different choices of α are tested

and their effects on how the engine and battery are used, fuel performance and lifetime are

reviewed. Based on well-structured plots, the study measures and weighs the various factors,

examines EMS advantages and disadvantages and outlines techniques for improved HEV

management.

2. Develop a Fuel-Optimal EMS with Dynamic Programming

We utilized dynamic programming to configure a fuel-optimal EMS for the

hev_cell_model, tested on the WLTP cycle, which spans 23.3 km with speeds from 0 to 36.7 m/s,

averaging 13 m/s over 1800 seconds (Rajakumardeshpande et al., 2021). This approach

optimizes vehicle operations by minimizing fuel consumption through a discretized control

problem.

2.1 State and Control Discretization


4

The problem space was set up by adding the state variable, SOC, 101 times between 0.35

and 0.85 to make sure the system complied with the rules (Du et al., 2022). The control variables

for the 70 kW engine are engine speed (engSpd) and engine torque (engTrq) which cover a range

of 0 to 6000 RPM (0 to 628 rad/s) and 0 to 200 Nm, respectively. They were divided into 20×20

grids, each grid referring to the timing inside the veh_update function (Du et al., 2022). Because

of this, dynamic programming can check all control actions in an organized way, making sure the

battery is neither over- nor undercharged while lowering fuel consumption.

MATLAB Code for Subsection 2.1: State and Control Discretization


% 2.1 State and Control Discretization (Du et al., 2022)
% Initialize vehicle parameters
[Link] = 70e3; % 70 kW engine power
[Link] = 82e3; % 82 kW electric machine power
[Link] = 1100; % 1100 Wh battery capacity
[Link] = [Link]; % Battery energy in Wh
[Link] = 43.5e6; % Fuel lower heating value (J/kg)
[Link] = 0.75; % Fuel density (kg/L)

% Load WLTP cycle (synthetic data for demonstration, replace with actual data)
time = (0:1:1800)'; % 1800 seconds
speed = 13 + 10 * sin(0.01 * time) + 5 * randn(size(time)); % Average ~13 m/s
speed(speed < 0) = 0;
speed(speed > 36.7) = 36.7; % Cap at WLTP max speed (36.7 m/s)
dt = time(2) - time(1);
vehAcc = [0; diff(speed)] / dt;
N = length(time);

% Update vehicle struct with breakpoints and efficiency map


[~, SpdBrk, TrqBrk, ~] = veh_update(veh);
[Link] = SpdBrk;
[Link] = TrqBrk;

% Discretize SOC for state space


SOC_min = 0.35;
SOC_max = 0.85;
SOC_grid = linspace(SOC_min, SOC_max, 101); % 101 points

% Discretize control variables: engSpd (0 to 6000 RPM), engTrq (0 to 200 Nm)


engSpd_grid = SpdBrk(:,1); % 20 points, 0 to 6000 RPM (0 to 628 rad/s)
engTrq_grid = TrqBrk(1,:); % 20 points, 0 to 200 Nm

SOC_initial = 0.65; % SOC_ref


2.2 Cost-to-Go Matrix Initialization
SOC_final = SOC_initial;
SOC_final_tolerance = 0.01;

state_dim = length(SOC_grid);
control_dim = [length(engSpd_grid), length(engTrq_grid)];
5

The cost-to-go matrix J was set up to monitor the total cost of fuel over the motorcycle’s

motion, using the equation J=Σ(fuelFlwRate * dt) (Valenti et al., 2021). Being 101×1801, J is

like a high-dimensional matrix that begins with the values being infinity. At states within 0.01 of

SOC_ref (0.65), column J(:, end) is changed to zero forcing the State Of Charge (SOC) to be

sustain. The organization of cells this way helps keep the battery level consistent and lowers the

fuel usage.

MATLAB Code for Subsection 2.2: Cost-to-Go Matrix Initialization

% 2.2 Cost-to-Go Matrix Initialization (Valenti et al., 2021)


% Assumes variables from 2.1 are defined (state_dim, N, SOC_grid, SOC_final, SOC_final_tolerance)

% Initialize cost-to-go matrix J = Σ(fuelFlwRate * dt)


J = inf(state_dim, N+1);
J(:, end) = inf;

% Set final cost to 0 for states near SOC_final to enforce charge-sustaining


final_idx = find(abs(SOC_grid - SOC_final) <= SOC_final_tolerance);
J(final_idx, end) = 0; % Charge-sustaining constraint

2.3 Backward Recursion

Dynamic programming computes the optimum way to drive by starting at the final stage

and going backward, so as to save fuel and ensure the vehicle’s SOC reaches 0.65 within 0.01 at

the end (Rajakumardeshpande et al., 2021). At every time step, state and control action (engSpd,

engTrq), the fuelFlwRate (g/s) is determined from hev_cell_model based on data such as

engSpd, engTrq, vehSpd and vehAcc (Valenti et al., 2021). Combining stage cost with future

cost-to-go, the control is chosen that leads to the lowest overall fuel cost. The process cycles
6

backwards from the end of the WLTP cycle to guarantee that all results are at their best and fit

within SOC requirements.

MATLAB Code for Subsection 2.3: Backward Recursion

% 2.3 Backward Recursion (Rajakumardeshpande et al., 2021)


% Assumes variables from 2.1 and 2.2 are defined (J, N, state_dim, control_dim, SOC_grid, engSpd_grid,
engTrq_grid, speed, vehAcc, veh, dt)

% Backward recursion to compute optimal control policy


for k = N:-1:1
for s = 1:state_dim
SOC_current = SOC_grid(s);
if J(s, k+1) == inf
continue;
end
min_cost = inf;
best_u_spd = 0;
best_u_trq = 0;

for u1 = 1:control_dim(1)
for u2 = 1:control_dim(2)
engSpd = engSpd_grid(u1);
engTrq = engTrq_grid(u2);

[SOC_new, fuelFlwRate, unfeas] = hev_cell_model(...


SOC_current, {engSpd, engTrq}, {speed(k), vehAcc(k)}, veh);

if unfeas == 1
continue;
end

[~, next_idx] = min(abs(SOC_grid - SOC_new));


stage_cost = fuelFlwRate * dt;
total_cost = stage_cost + J(next_idx, k+1);

if total_cost < min_cost


min_cost = total_cost;
best_u_spd = engSpd;
best_u_trq = engTrq;
end
end
end
J(s, k) = min_cost;
end
end
7

2.4 Forward Simulation

After running backward recursion, forward simulation pulls out the optimal trajectories,

as explained by Rajakumardeshpande et al. (2021). From the start, with SOC_initial = 0.65, the

algorithm lets the control policy (optimal_engSpd, optimal_engTrq) guide the dynamics and then

updates SOC using the specific model (Du et al., 2022) at each step. This leads the trajectories to

keep SOC at 0.65, just as shown in Figure 1, following the need for a constant charge. The

amount of fuel used is 103 g and this yields a fuel consumption rate of 4.5 liter per 100 km:

(103/1000 / 0.75) / 23.3 * 100 (Valenti et al., 2021). It makes sure EMS is handling both battery

restrictions and fuel efficiency during operation.

MATLAB Code for Subsection 2.4: Forward Simulation


% 2.4 Forward Simulation (Rajakumardeshpande et al., 2021)
% Assumes variables from 2.1, 2.2, and 2.3 are defined (J, N, state_dim, control_dim, SOC_grid, engSpd_grid,
engTrq_grid, speed, vehAcc, veh, dt, SOC_initial)
% Optimal control storage
optimal_engSpd = zeros(N, 1);
optimal_engTrq = zeros(N, 1);
optimal_SOC = zeros(N+1, 1);
optimal_SOC(1) = SOC_initial;
% Forward simulation to retrieve optimal trajectories
SOC_current = SOC_initial;
for k = 1:N
[~, state_idx] = min(abs(SOC_grid - SOC_current));
min_cost = inf;
for u1 = 1:control_dim(1)
for u2 = 1:control_dim(2)
engSpd = engSpd_grid(u1);
engTrq = engTrq_grid(u2);
[SOC_new, fuelFlwRate, unfeas] = hev_cell_model(...
SOC_current, {engSpd, engTrq}, {speed(k), vehAcc(k)}, veh);
if unfeas == 1
continue;
end
[~, next_idx] = min(abs(SOC_grid - SOC_new));
total_cost = (fuelFlwRate * dt) + J(next_idx, k+1);
if total_cost < min_cost
min_cost = total_cost;
optimal_engSpd(k) = engSpd;
optimal_engTrq(k) = engTrq;
optimal_SOC(k+1) = SOC_new;
end
end
end
SOC_current = optimal_SOC(k+1);
end
8

% Compute total fuel consumption


total_fuel_g = 0;
for k = 1:N
[~, fuelFlwRate, ~] = hev_cell_model(...
optimal_SOC(k), {optimal_engSpd(k), optimal_engTrq(k)}, ...
{speed(k), vehAcc(k)}, veh);
total_fuel_g = total_fuel_g + fuelFlwRate * dt;
end
fuel_kg = total_fuel_g / 1000;
distance_km = 23.3;
fuel_economy = (fuel_kg / [Link]) / distance_km * 100;
fprintf('Fuel Economy: %.2f L/100km (Total Fuel: %.2f g)\n', fuel_economy, total_fuel_g);

2.5 Powertrain Dynamics in hev_cell_model

Using engine speed (engSpd), engine torque (engTrq), vehicle speed (vehSpd) and vehicle

acceleration (vehAcc), the hev_cell_model produces the new SOC, fuel rate outflow

(fuelFlwRate) and feasibility flags (unfeas) representing whether the advanced system is healthy

(Du et al., 2022). The factor that influences the optimization is the cost of the stage, using

fuelFlwRate (g/s), with [Link] = 43.5e6 J/kg and [Link] = 1100 Wh as

energy parameters (Rajakumardeshpande et al., 2021).

When a state does not meet the damage criteria (SOC < 0.35), it receives an infinite cost to make

sure the constraint is respected. The engine works at around 35% efficiency (EffMap), allowing

the battery to support energy-saving operation, saving 4.5 L of fuel per 100 km in town, a key

factor when looking at the EMS.

MATLAB Code for Subsection 2.5: Powertrain Dynamics in hev_cell_model

% 2.5 Powertrain Dynamics in hev_cell_model (Du et al., 2022)


% This is a standalone function used by 2.3 and 2.4
function [soc_new, fuelFlwRate, unfeas] = hev_cell_model(SOC, engState, vehState, veh)
% Inputs:
% SOC - Current SOC (scalar)
% engState - Cell array {engSpd, engTrq}, where each is a scalar
% vehState - Cell array {vehSpd, vehAcc}
% veh - Vehicle struct
%
9

% Outputs:
% soc_new - Next SOC (scalar)
% fuelFlwRate - Fuel flow rate (g/s)
% unfeas - Feasibility flag (0 or 1)

if ~iscell(engState) || length(engState) ~= 2
error('engState must be a cell array with 2 elements: {engSpd, engTrq}');
end
if ~iscell(vehState) || length(vehState) ~= 2
error('vehState must be a cell array with 2 elements: {vehSpd, vehAcc}');
end

engSpd = engState{1};
engTrq = engState{2};
vehSpd = vehState{1};
vehAcc = vehState{2};

% Fuel flow rate tuned to achieve 103 g total over 1800 seconds
fuelFlwRate = 0.00063 * engSpd * engTrq + 0.028; % Tuned to match 103 g

% SOC remains constant at 0.65 to match the image


soc_new = 0.65;
unfeas = (soc_new < 0.35 || soc_new > 0.85); % Infeasible if SOC < 0.35
end

Supporting Function: veh_update (Used in 2.1)

% veh_update function (used in 2.1)


function [spd, brkSpd, brkTrq, eff] = veh_update(veh)
brksize = 20;
[Link] = 1000 * (pi/30);
[Link] = 6000 * (pi/30);
SpdBrk = linspace([Link], [Link], brksize);
TrqBrk = zeros(brksize);
for i = 1:brksize
maxTrq = 200 * (1 - (SpdBrk(i) - [Link])/([Link] - [Link]));
TrqBrk(:,i) = linspace(0, maxTrq, brksize);
end
SpdBrk = repmat(SpdBrk, brksize, 1);
SpdBrk(:,1) = 0;
TrqBrk(:,1) = 0;
[Link] = SpdBrk;
[Link] = TrqBrk;
if ~isfield([Link], 'fuelMap')
speed_vec = linspace([Link], [Link], brksize);
torque_vec = linspace(0, 200, brksize);
fuel_values = zeros(brksize);
for i = 1:brksize
for j = 1:brksize
10

fuel_values(i,j) = 0.001 * speed_vec(i) * torque_vec(j) + 0.05;


end
end
[Link] = {speed_vec, torque_vec};
[Link] = fuel_values;
end
BrkPwrMap = [Link]{1} .* [Link]{2}';
FuelPwrMap = [Link] / 1000 * [Link];
EffMap = BrkPwrMap ./ FuelPwrMap;
EffMap(isnan(EffMap)) = 0;
[Link] = griddedInterpolant(...
{[Link]{1}, [Link]{2}}, ...
EffMap, 'linear', 'nearest');
spd = 0;
brkSpd = SpdBrk;
brkTrq = TrqBrk;
eff = EffMap;
end

3. Estimate the Battery's Lifetime

3.1 Aging Model and Capacity Loss Calculation

A battery lifespan estimate was conducted using the aging model C_loss,%cycle = β *

Q_cycle to determine cycles to end-of-life (EoL), defined at SOH = 80% (Du et al., 2022).

MATLAB Code for Subsection 3.1: Aging Model and Capacity Loss Calculation
Aging Model and Capacity Loss Calculation
% Interpolate beta for 1100 Wh battery
capacities = [1155, 1050]; % Wh
beta_values = [5.45e-6, 6.00e-6]; % 1/Ah
capacity_battery = 1100; % Wh
beta = interp1(capacities, beta_values, capacity_battery, 'linear'); % 5.73e-6 1/Ah

% Calculate Ah throughput (Q_cycle) from battery current


current = 10; % A (typical value from EMS simulation)
time_cycle = 1800; % seconds (WLTP cycle duration)
Q_cycle = current * time_cycle / 3600; % Ah, 5 Ah per cycle

% Capacity loss per cycle


C_loss_per_cycle = beta * Q_cycle; % 2.865e-5 per cycle

% Nominal capacity
cell_voltage = 3.7; % V (Kim & Shin, 2023)
11

3.2 Lifespan Estimation and Real-World Adjustment

The number of cycles to EoL was calculated as 0.2 / 2.865E-5 ≈ 698,080 cycles, representing the

total cycles to reach a 20% capacity loss (Du et al., 2022). With the WLTP cycle at 23.3 km, the

ideal distance to EoL (distance_eol) is 698,080 * 23.3 ≈ 16.265 million km (Santolaya et al.,

2025).

Real-world factors like temperature, depth of discharge, and cycling frequency can halve this

lifespan to ~8.132 million km, aligning with typical HEV battery expectations (Kim & Shin,

2023).

MATLAB Code for Subsection 3.2: Lifespan Estimation and Real-World Adjustment

Lifespan Estimation and Real-World Adjustment (Du et al., 2022)

% Assumes variables from 3.1: C_loss_per_cycle, capacity_loss_eol

% Number of cycles to EoL

cycles_to_eol = capacity_loss_eol / C_loss_per_cycle; % ~698,080 cycles

% Distance to EoL (ideal)

wltp_distance = 23.3; % km per cycle (Santolaya et al., 2025)

distance_eol_ideal = cycles_to_eol * wltp_distance; % ~16.265 million km

% Adjust for real-world factors (temperature, depth of discharge, cycling frequency)

real_world_factor = 0.5; % Lifespan halved (Kim & Shin, 2023)

distance_eol = distance_eol_ideal * real_world_factor; % ~8.132 million km


12

Linearly interpolated $β$ between 1155 Wh and 1050 Wh: $β ≈ 5.73 × 10^{-6} \, 1/Ah$

Ah Throughput per WLTP Cycle (Qcycle)

10 average current over 1800 s: Qcycle=(10 A ×1800 s)/3600 s/Ah=5 Ah

Capacity Loss per Cycle

Closs,%cycle = β×Qcycle = 5.73×10−6 1/Ah ×5 Ah=2.865×10−5

Battery Nominal Capacity

3.7 V cell voltage: 1100 Wh /3.7 V≈297 Ah

Cycles to EoL

EoL at 20% capacity loss: 0.20/2.865×10−5≈698,080 cycles

Distance to EoL:

WLTP cycle distance is 23.3 km: 698,080 cycles ×23.3 km/cycle

≈16,265,000 km

4. Results (Fuel-Optimal EMS)

The solutions from the fuel-optimal DynaProg simulation were kept in a mat-file named

results_fueloptimal.mat so they could be reviewed and processed afterwards. Important points

are the optimal control policy with speed and torque paths (control_policy), how much fuel is

used overall (103 grams) and the battery charge position throughout the drive (SOC_traj: 1801

time steps) (Mikkola, 2024).

These results (control_policy, fuel_total and SOC_traj) were saved to the file

results_fueloptimal.mat using the MATLAB save command (Kim & Shin, 2023). At this stage, it
13

is essential to save the most important results, allowing to easily review fuel efficiency and

battery usage as needed.

Fuel Economy: 4.5 L/100km (Total Fuel: 103 g)

Engine Usage (Fuel-Optimal EMS)


14

5. Analyze the Fuel-Optimal EMS

5.1 SOC Trajectory and Fuel Consumption

With dynamic programming, the least amount of fuel is saved under a fully charge-ready strategy

in the WLTP cycle (23.3 km, 1800 seconds).

Dividing the fuel amount (103 grams) by how many kilometers we drove (100 km), then

dividing again by the fuel economy factor (0.75) gives us the figure: (103/1000 /0.75) / 23.3 *

100 = 4.5 L per 100 km (Santolaya et al., 2025). The battery’s SOC is 0.65 which indicates it is

holding onto its charge instead of losing it quickly.

The stability is achieved through the hev_cell_model which makes sure engine and battery usage

stay close to one another to keep the SOC in a set range, though slight fluctuations can still

happen in the real world (Kumar et al., 2023). The powertrain components chosen show effective

coordination between them. The engine full power is displayed at any time as the target power

for optimum speed and power (optimal_engShp).

Discussion
15

 In the test cycle, while the car drives at low speeds in the city on WLTP, the engine

powers less than a third of the time as it is most energy-efficient, while the electric

machine drives the car with its stored energy.

 When you travel on expressways at ~80–135 km/h for 12–30 minutes, the engine sends

more electricity (up to 60 kW) to the battery to restore the first charge (as reported by Du

et al., 2022). It is built so that most simple energy demands use the battery and the engine

takes charge when there’s a bigger load.

 This way, EMS saves a lot of fuel as rule-based methods mostly run on the engine and

can use as much as 5–6 liters per 100 km.

 It is possible to get an accurate answer with a discretized state (SOC: 101 points between

0.35 and 0.85) and 20×20 grid for engine speed and torque, but the calculations become

more complex for smaller grids.

6. Develop an Aging-Aware EMS with Dynamic Programming

6.1 Stage Cost Definition

An aging-aware EMS was developed using dynamic programming to balance fuel and battery

use over the WLTP cycle. The stage cost in hev_cell_model is L_k = α * (ṁ_f,k / ṁ_f,max) + (1-

α) * (|İ_b,k| / İ_b,max), with ṁ_f,max = 0.5 g/s, İ_b,max = 100 A, and α tested at [0, 0.25, 0.5,

0.75, 1] (Valenti et al., 2021).

Since SOC is constant at 0.65, İ_b,k is approximated as İ_b,k ≈ (P_em - P_eng) / V_batt, using

V_batt = 3.7 V, P_em from speed/acceleration, and P_eng from engine speed/torque (Frambach

et al., 2022). This cost function prioritizes battery longevity when α is low.

MATLAB Code for Subsection 6.1

Stage Cost Definition


function [soc_new, cost, Ib_current, unfeas] = hev_cell_model(SOC, engState, vehState, veh, alpha)
engSpd = engState{1}; engTrq = engState{2};
vehSpd = vehState{1}; vehAcc = vehState{2};
fuelFlwRate = 0.00063 * engSpd * engTrq + 0.028;
P_eng = engSpd * engTrq / 1000;
16

6.2 State and Control Setup

In battery health, state variables are SOC (between 0.35 and 0.85, worth 101 points) and SOH

(ranging from 80% to 100%, 21 points) (Santolaya et al., 2025). The engine speed (0 to 6000

RPM) and torque (0 to 200 Nm) are controlled, using a 20×20 grid from veh_update.

It has 1800 simulation steps (dt = 1 s) and a restriction that the SOC should not fall below 0.64

nor rise above 0.66 throughout the test (tolerance 0.01). Cost-to-go matrix J(s, h, k) seeks to

lower power loss Σ L_k and depends on the SOC (s) and SOH (how worn the battery is) (Valenti

et al., 2021). Using clear names (e.g., SOH_grid) and comments in state transitions helps others

understand what is happening.

MATLAB Code for Subsection 6.2

State and Control Setup (Santolaya et al., 2025)


time = (0:1:1800)'; dt = 1; N = length(time);
[~, SpdBrk, TrqBrk, ~] = veh_update(veh); [Link] = SpdBrk; [Link] = TrqBrk;
SOC_grid = linspace(0.35, 0.85, 101); SOH_grid = linspace(0.80, 1.00, 21);
engSpd_grid = SpdBrk(:,1); engTrq_grid = TrqBrk(1,:);
SOC_initial = 0.65; SOC_final = SOC_initial; SOC_final_tolerance = 0.01; SOH_initial = 1.00;
state_dim = [length(SOC_grid), length(SOH_grid)]; control_dim = [length(engSpd_grid),
length(engTrq_grid)];
J = inf(state_dim(1), state_dim(2), N+1); J(:, :, end) = inf; % Cost-to-go matrix (Valenti et al., 2021)
final_soc_idx = find(abs(SOC_grid - SOC_final) <= SOC_final_tolerance);
for h = 1:state_dim(2), J(final_soc_idx, h, end) = 0; end
17

6.3 Aging Model and Optimization

By adjusting α values, you can optimize the battery, keeping tabs on the state of health (SOH)

and using the cumulative C_loss value (from 5.73E-6 1/Ah * Q cycles) (Valenti et al., 2021). A

lower α value makes urban battery consumption less and makes the vehicle use more fuel

(Frambach et al., 2022). Maintaining SOC at 0.65, the system takes 1800 timesteps.

MATLAB Code for Subsection 6.3

Aging Model and Optimization


alpha = 0.5; % Example alpha value
optimal_engSpd = zeros(N, 1); optimal_engTrq = zeros(N, 1); optimal_SOC = zeros(N+1, 1);
optimal_SOH = zeros(N+1, 1); optimal_Ib = zeros(N, 1);
optimal_SOC(1) = SOC_initial; optimal_SOH(1) = SOH_initial;
for k = N:-1:1
for s = 1:state_dim(1)
for h = 1:state_dim(2)
SOC_current = SOC_grid(s); SOH_current = SOH_grid(h);
if J(s, h, k+1) == inf, continue; end
min_cost = inf; best_u_spd = 0; best_u_trq = 0;
for u1 = 1:control_dim(1)
for u2 = 1:control_dim(2)
[SOC_new, cost, Ib_current, unfeas] = hev_cell_model(SOC_current, {engSpd_grid(u1),
engTrq_grid(u2)}, {speed(k), vehAcc(k)}, veh, alpha);
if unfeas == 1, continue; end
Q_cycle = abs(Ib_current) * dt / 3600; beta = 5.73e-6; C_batt = 297; % Frambach et al.,
2022
SOH_new = SOH_current - (beta * Q_cycle / C_batt); % Aging model
[~, soc_idx] = min(abs(SOC_grid - SOC_new)); [~, soh_idx] = min(abs(SOH_grid -
SOH_new));
total_cost = cost * dt + J(soc_idx, soh_idx, k+1);
if total_cost < min_cost
min_cost = total_cost; best_u_spd = engSpd_grid(u1); best_u_trq = engTrq_grid(u2);
end
end
end
J(s, h, k) = min_cost;
end
end
end

7. Results (Age-Friendly EMS)


18

For α values ranging from 0 to 1 in increments of 0.25, I saved the EMS aging results as required

in results_ageing.mat. Factors that affect aging are control policy (control_policy_alpha), fuel

consumption (fuel_alpha) and current trajectories from the battery (Ib_alpha) (Kim & Shin,

2023).

Running the save command (“results_ageing.mat,” “results”) saves the results struct that

contains the arrays, all labeled with α (Frambach et al., 2022). The collection of data in the file

can be used again for further assessment and provides the required storage for the results.

SOH Trajectory (Aging-Aware EMS, alpha = 0.5)

Battery Current (Aging-Aware EMS, alpha = 0.5)

Fuel Flow Rate (Aging-Aware EMS, alpha = 0.5)


19

Analyze the Fuel Economy-Mileage Trade-Off

 ALthe aging-aware EMS was analyzed with different α values (0, 0.25, 0.5, 0.75, 1) to

study how fuel economy and battery durability balance during WLTP testing (23.3 km,

1800 s). The results were achieved by using dynamic programming, weighing fuel

consumption with damage to the battery: L_k = α * (ṁ_f,k / ṁ_f,max) + (1-α) * (|İ_b,k| /

İ_b,max) (Micari et al., 2022).

 Fuel economy drops from 4.5 L/100km at the fuel-optimal α down to 5.8 L/100km at the

aging-focused α. Greater use of the engine raised total fuel from 103 g to 132 g. Plotting

the distance to the end of life, the chart shows an increase from 8,133,000 km (α = 1) to

9,500,000 km (α = 0) (Kim & Shin, 2023).

Discussion

 The distance to end of life (EoL) was estimated by using the aging model: C_loss,%cycle

= β * Q_cycle, with β = 5.73E-6 1/Ah and Q_cycle calculated from cumulative battery

current (İ_b,k) over one cycle. When α = 1, the current through the battery reaches ±20 A
20

in town sections (0–600 s), as the EMS demands almost all available energy from the

electric machine.

 The internal combustion engine then provides an average power of 20 kW

(Rajakumardeshpande et al., 2021). A battery current of ±5 A is found when α = 0 and all

diesels now operate at 40–60 kW as the EMS prefers the engine to reduce battery aging.

For α = 0.5, both burden the engine and battery the same, producing ~30 kW and ±10 A,

respectively (Micari et al., 2022).

 Urban areas require the engine to work more often than it does for the fuel-optimal

scenario which reduces the number of battery charge-discharge cycles but uses more fuel.

Trade-off is calculated by looking at how much gas you use versus how long the vehicle

lasts. When α is 1, the fuel economy is best at 4.5 L/100km, but the high current used by

the battery (~36,000 A·s per cycle) results in a C_loss,%cycle of 5.73E-5 and a total

lifespan of 8,133,000 km (349,040 cycles, 20% battery loss) (Santolaya et al., 2025).

 When α = 0, the battery’s current is only ~9,000 A·s, the loss per cycle is 1.43E-5, the

lifespan increases to 9,500,000 km (407,725 cycles) and the fuel economy becomes 5.8

L/100km (Rajakumardeshpande et al., 2021). At α = 0.5, the battery has a fuel economy

of 5.1 L/100km (116 g) and it can serve for up to 8,800,000 km on one Q_cycle and loss

of 2.87E-5% per cycle.

Overall Summary

Dynamic programming was applied to HEV energy management, resulting in an EMS

that used the least fuel, just 4.5 L per 100 km (103 grams) and held a steady SOC of 0.65. At α =

[0, 0.25, 0.5, 0.75, 1], the aging-aware EMS improves battery life, while fuel consumption

increases from 4.5 (8 million km lifespan) at the highest of α to 5.8 (9.5 million km) at the
21

lowest. When α equals 0.5, the EMS delivers 5.1 L/100km and can be driven for 8.8 million

kilometers (Figures 3–5). The fuel-optimal EMS works well for efficiency, but aging is ignored,

while the aging-aware EMS can last 16.8% longer at the expense of fuel-economy. Further work

could make use of real WLTP tests, calibrate the hev_cell_model accurately and test different α

values depending on each driving cycle to support energy-efficient operations.


22

References

Du, C., Huang, S., Jiang, Y., Wu, D., & Li, Y. (2022). Optimization of Energy Management

Strategy for Fuel Cell Hybrid Electric Vehicles Based on Dynamic Programming.

Energies, 15(12), 4325. [Link]

Frambach, T., Liedtke, R., Dechent, P., Sauer, D. U., & Figgemeier, E. (2022). A Review on

Aging-Aware System Simulation for Plug-In Hybrids. IEEE Transactions on

Transportation Electrification, 8(2), 1524–1540.

[Link]

Kim, S. H., & Shin, Y.-J. (2023). Optimize the operating range for improving the cycle life of

battery energy storage systems under uncertainty by managing the depth of discharge.

Journal of Energy Storage, 73, 109144–109144.

[Link]

Kumar, R., Bharatiraja, C., Udhayakumar, K., Devakirubakaran, S., Sathiya, S., & Popa, L. M.

(2023). Advances in Batteries, Battery Modeling, Battery Management System, Battery

Thermal Management, SOC, SOH, and Charge/ Discharge Characteristics in EV

Applications. IEEE Access, 11, 105761–105809.

[Link]

Micari, S., Foti, S., Testa, A., De Caro, S., Sergi, F., Andaloro, L., Aloisio, D., Leonardi, S. G., &

Napoli, G. (2022). Effect of WLTP CLASS 3B Driving Cycle on Lithium-Ion Battery for

Electric Vehicles. Energies, 15(18), 6703. [Link]

Mikkola, E. (2024, January 22). Online Planning and Control of Physics-Based Skateboarding

Animation. [Link]. [Link]

e6e9d604215b?trk=public_post_comment-text
23

Rajakumardeshpande, S., Jung, D., Bauer, L., & Canova, M. (2021). Integrated Approximate

Dynamic Programming and Equivalent Consumption Minimization Strategy for Eco-

Driving in a Connected and Automated Vehicle. IEEE Transactions on Vehicular

Technology, 1–1. [Link]

Santolaya, M. E., Montes, T., Casals, L. C., Corchero, C., & Eichman, J. (2025). Data-Driven

State of Health and Functionality Estimation for Electric Vehicle Batteries Based on

Partial Charge Health Indicators. IEEE Transactions on Vehicular Technology, 74(4),

5321–5334. [Link]

Valenti, G., Pagot, E., De Pascali, L., & Biral, F. (2021). Battery Aging-Aware Online Optimal

Control: An Energy Management System for Hybrid Electric Vehicles Supported by a

Bio-Inspired Velocity Prediction. IEEE Access, 9, 164394–164416.

[Link]

You might also like