Electric powertrain simulink model help

35 visualizzazioni (ultimi 30 giorni)
Jope
Jope il 15 Gen 2026 alle 19:32
Commentato: Jope il 23 Gen 2026 alle 13:48
Hey, I'm trying to model braking cycle with electric powertrain. Problem is my plot is not matching graders plot, but it is very close so something must be wrong in my model. I suspect the problem to be in my torque and power limits subsystem or in brake control subsystem. How it should be: Max regen power 140 kW and max regen torque 265 Nm. Regen disabled at speeds of 10 km/h and below. Positive torque and power provided by the electric motor should be limited to 140 kW and 265 Nm.
My code inside Matlab function block:
function T_req_lim = TorqueLimiter(T_req, v_actual)
% Torque & power limiter without motor speed
% v_actual is in m/s
% ===== Parameters =====
T_max = 265; % [Nm] max torque (motoring & regen)
P_max = 140e3; % [W] max power (motoring & regen)
v_min_regen = 10/3.6; % [m/s] regen disabled below 10 km/h
% Avoid division by zero at standstill
v_eps = max(abs(v_actual), 0.1);
% Approximate power-based torque limit
% Vehicle-level approximation: P ≈ T * v
T_power_max = P_max / v_eps;
% ===== Torque saturation =====
T_req_lim = min(max(T_req, -T_max), T_max);
% ===== Power limitation =====
T_req_lim = min(max(T_req_lim, -T_power_max), T_power_max);
% ===== Disable regeneration at low speed =====
if v_actual <= v_min_regen && T_req_lim < 0
T_req_lim = 0;
end
end
  2 Commenti
Broy
Broy il 20 Gen 2026 alle 6:10
Modificato: Broy il 20 Gen 2026 alle 6:10
@Jope, I was looking over your torque and power limit logic. The structure is really solid! I did notice one small thing that might explain why your results are not matching the reference plot.
It looks like there is a unit mismatch in the power limitation calculation:
T_power_max = P_max / v_eps;
% P_max is in Watts [W]
% v_eps is in meters per sec [m/s]
Your formula calculates Tractive Force (Newtons), not Motor Torque (Nm). To fix this, you just need to convert your vehicle speed (v) into motor angular velocity (w) using your gear ratio and wheel radius.
Jope
Jope il 23 Gen 2026 alle 13:48
I got it to work. Thank you Broy!

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Powertrain Reference Applications in Help Center e File Exchange

Prodotti


Release

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by