Electric powertrain simulink model help

조회 수: 48 (최근 30일)
Jope
Jope 2026년 1월 15일 19:32
이동: Sabin 2026년 1월 31일 8:24
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

답변 (1개)

Broy
Broy 2026년 1월 20일 6:10
이동: Sabin 2026년 1월 31일 8:23
@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.
  댓글 수: 1
Jope
Jope 2026년 1월 23일 13:48
이동: Sabin 2026년 1월 31일 8:24
I got it to work. Thank you Broy!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Powertrain Reference Applications에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by