
I am having trouble getting the engine speed to 0 rpm when simulating a series hybrid vehicle controller.
3 views (last 30 days)
Show older comments
Hi, I am having trouble controlling the motor block speed to 0 when the motor start signal is 0. It works fine when I give the motor speed 800rpm when the start signal is 0


However when I give the speed 0 rpm when the signal is 0, the result is that the motor speed decreases.


I have attached the simulink model and the driving cycle I built with this question. It's built on matlab r2022a and based on the model in the following link: https://www.mathworks.com/help/sdl/ug/series-hybrid-transmission.html
If someone have any idea about a solution to my problem, I will be very grateful.
Thanks in advance to anybody that awnser to this post ! :)
0 Comments
Answers (1)
Sam Chak
on 29 Apr 2025
Edited: Sam Chak
on 29 Apr 2025
Hi @Thang
The Simulink file contains many components, including blocks from Stateflow and Simscape. Could you provide the same mathematical representation of the entire system that you intend to describe in a journal article, technical report, or your thesis? The requirement must be 100% the same!

We typically do not attempt to design everything or control multiple components within a single file. Instead, we divide a large system into manageable subsystems. Once all subsystems are controllable and their performances are satisfactory, we can integrate them into a single Simulink file.
My suggestion:
If the nominal model of the subsystem is available, either derived from first principles or estimated using system identification tools, then one should attempt to design a set of linear or nonlinear input signals that stabilize the subsystem and ensure that the subsystem's output behaves like the reference signal,
.
Assume that the nominal model can be expressed in this simple form:
If the model is in transfer function, then convert it to state-space.
Design the input signal
such that all subsystem states in the state vector
are measurable. <-- This is the initial assumption!
The model's dynamics is then forcefully transformed to
which can be rearranged to
If the error signal is properly defined, then
guarantees that subsystem's output tracks the reference signal.
3 Comments
Sam Chak
on 29 Apr 2025
Do you have the mathematical model of the motor to which you would like to apply the controller? Generally, it is 90% easier to work on the mathematical model first before integrating the controller into the Simulink model.
For example, ...
%% if the motor's model is available
Gp = tf(2, [1 2 3]);
%% then we can design a controller based on the model.
opt = pidtuneOptions('PhaseMargin', 65, 'DesignFocus', 'reference-tracking');
Gc = pidtune(Gp, 'PIDF', opt)
%% closed-loop subsystem
Gcl = feedback(Gc*Gp, 1)
%% step response
step(Gp, 10), hold on
step(Gcl, 10), grid on
legend('Open-loop', 'Closed-loop')
Sam Chak
on 29 Apr 2025
Hi @Thang
The pulse wave with 50% duty cycle can be mathematically constructed in MATLAB.
Before you design the Simscape system based on a derived mathematical model, do you recall where you have stored the differential equation or transfer function of the motor? Perhaps in a personal notebook or in a piece of paper that you sandwiched in a textbook?
t = (0:0.001:200)';
amp = 4000; % amplitude
P = 50; % period
y = amp*(1 + sign(sin(2*pi/P*t)))/2;
plot(t, y), grid on, ylim([-1e3, 5e3])
xlabel('t')
ylabel('R(t)')
title('Reference Pulse signal')
See Also
Categories
Find more on Specialized Power Systems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
