Unable to get electric drive train model working

4 views (last 30 days)
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.
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.
SBmachine
SBmachine on 3 Jan 2025
Edited: SBmachine on 3 Jan 2025
Thanks for the response.
The SOC decreases gradually, but the output for the rotor speed wm from PMSM is =0.
The g input for the two-level converter, was suggested to input outputs from the PWM generator. Then again, i am just copying from references and trying things out.
I feedback rotor speed wm back to w input of PMSM because I was not sure what should be the input for w input. Hence, i plugged it in.
Again, I apologise for a lot of the confusion and uncertainity. I am currently exploring into the topic and would love to get guidance and correction needed for my model.

Sign in to comment.

Answers (1)

Joel Van Sickel
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.
  1 Comment
SBmachine
SBmachine on 9 Jan 2025
Thank you @Joel Van Sickel! I am currently going through the link provided and will abstract the motor that is suitable for me. Will revert back with changes and solutions I have come up with to share :)
I wanted to run the courses, however I have some time constraints that wont allow me to go through it. Will go through it when I can.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!