Unable to get electric drive train model working
4 views (last 30 days)
Show older comments
Happy new year to all.
I am currently trying to create a simple electric drive train model, where it uses a battery connected to a converter to a motor and then calculate the thrust generated from the torque/rpm provided by the motor. I was also planning to include a simple feedback loop to ensure the input RPM was fulfiled.
In short, what i want to learn is, by having varying RPM input, how the motor would adjust itself to achieve the required RPM and how would this affect the battery SOC and the thrust calculation.
However, the output of my results is forever 0. Does anyone know where I gone wrong and if anyone could help me remedy my model. This would mean a lot, thank you in advance!
p.s. i am not an expert in electrical component, so do advise on what could be done.

2 Comments
Pavl M.
on 2 Jan 2025
OK, let it further mean a lot.
What about timing?
Do you mean the rotor speed ^2 *01 is zero from your PMSM.
What were your simulation settings?
What is the SOC waveform you observed?
I don't know what is g input in 2level converter, what is w input in PMSM, while BL input = 0,
why you feedback rotor speed wm back to w input of PMSM,
I think the PWM generator output actually sets the motor rotor(shaft) rotational angular velocity(which is frequency also, rpm, rps, rad/sec).
You can add gain scheduling to your PID, how will it help?
Then can it be controlled just by inverter g input or just by PMSM w input or both is the main region to amend.
Answers (1)
Joel Van Sickel
on 8 Jan 2025
your problem is that you haven't set up the controls properly for a three phase machine. You would need to use clark and park transforms, and have an additional dimension, at the least, to implement a feedback controller like that. Also, your fixed time step is way too large for a switched simulation. You are running at 1s time stpe, where a typical motor, switching at 10 kHz, would be better served by a 1us time step, 6 orders of magnitude smaller. I recommend picking a working closed loop motor model from the example list here to start with:
However, you could make your life a lot easier and abstract out the motor drive using this block: https://www.mathworks.com/help/sdl/ref/motordrive.html
but you'll need to get some more familiarity with simscape before you can pull off the simulation, please look at the onramps, take the simscape one, the circuits one, the power electronics one and the battery one.
See Also
Categories
Find more on Switches and Breakers 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!