Electric powertrain simulink model help

34 Ansichten (letzte 30 Tage)
Jope
Jope am 15 Jan. 2026 um 19:32
Kommentiert: Jope am 23 Jan. 2026 um 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 Kommentare
Broy
Broy am 20 Jan. 2026 um 6:10
Bearbeitet: Broy am 20 Jan. 2026 um 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 am 23 Jan. 2026 um 13:48
I got it to work. Thank you Broy!

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Powertrain Reference Applications finden Sie in Help Center und File Exchange

Produkte


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by