Problem with PMSM motor model in Simulink - Page 1
Forum section: electronics / projects

author: Shenk123
author_rank: Newbie
timestamp: April 25, 2020, 04:29:38 pm
content: Good afternoon,I have developed a Vector Control for a PMSM motor in Simulink using Simscape Electrical but my motor is not spinning. I have tried applying various speed values but nothing happens. I am applying a step signal from 0 to 300 but the motor speed still doesn't move. My error signal, however, tracks my input as it should. I do not know what has happened. Could someone look at my simulation and tell me what is going on ? My simulink can be downloaded from my OneDrive and the screenshots of my signals are attached.Simulink File:https://1drv.ms/u/s!AlkE9jIQZ7btg33sjTBLiQkBkyKd?e=KlvTet

author: Benta
author_rank: Super Contributor
timestamp: April 25, 2020, 06:38:25 pm
content: Do you mean PMSM or sensorless PMDC? The system schematic looks more like sensorless PMDC to me, due to the phase feedback from the motor (the text labels are practically unreadable).Anyway, for both schemes you need a startup strategy to even get the motor to start turning. Is this implemented?

author: Shenk123
author_rank: Newbie
timestamp: April 25, 2020, 07:22:38 pm
content: @Benta I am using PMSM. But I don't understand when you say startup strategy. I have based my model using the block diagrams available online and this fantastastic video (which is for trapezoidal control but I have modified it for FOC) from Mathworks called Motor Control, Part 3: BLDC Speed Control Using PWM:

author: Dave
author_rank: Super Contributor
timestamp: April 25, 2020, 09:26:06 pm
content: You're measuring the 3-phase voltages and after you pass them through Clarke and Park transforms, you treat them as current.

author: Benta
author_rank: Super Contributor
timestamp: April 25, 2020, 11:26:25 pm
content: Nice girl with an interesting accent.But frankly, I think you're a bit in over your head here.Changing a BLDC motor drive from trapeziodal to sinewave does not make it a PMSM drive. The two drive strategies are two completely different things, although the motor itself looks/is the same.The PMSM drive is an open-loop system, where the idea is to run the motor as any other synchronous motor. Synchronous motors need starting help to get them into synchronous operation.Sensorless BLDC motors also need help when starting, eg, bringing the rotor to a known state before operation. When the BLDC motor has reached a certain speed, the back EMF will start controlling commutation. In other words, the rotor position will control your switching pattern (just like a mechanical commutator). This only works at higher rpms.FOC is a completely different animal, where the "transformer-like" mutual inductance between stator and rotor in induction motors is used for modulation in the control loop.

author: Shenk123
author_rank: Newbie
timestamp: April 26, 2020, 01:11:28 am
content: Thanks fo your replies @Dave and @Benta. You were right, I was feeding the voltages into my clarke transform rather than my currents. However, I still get the same graphs and it must due to no startup technique as Benta was saying above. Therefore, @Benta what would be the best method to implent open loop on the motor until it gets up to speed ? Do you know of any example for me to know how to implement both open loop and close loop controls in my Simulink model ?P.S. I have attached above zoomed-in screenshots of my Simulink model so that labels and signal names can be properly read.

author: Shenk123
author_rank: Newbie
timestamp: April 26, 2020, 01:32:23 am
content: I know you are right when you say I need a starting method for the motor but why though ? At my sum point my step input is at 300 whereas the motor speed is at 0 rad/s so an error signal of 300 should be generated from the sum point into my inverse Park transform, SVPWM, inverter and, finally go into my motor, speeding it up, shouldn't it ? Also why in the video doesn't the girl apply a starting technique for the BLDC ? In her program, which I downloaded from her GitHub, she has it the same as in the doesn't employ a starting technique.

author: Benta
author_rank: Super Contributor
timestamp: April 26, 2020, 10:25:42 am
content: The usual way to start a sensorless BLDC motor is to bring the rotor to a known angle, this can be done by energizing one of the phases only.From there on the rotor is accelerated slowly until the back-EMF can be measured and the self-commutation starts. At that point you can try to decide when you want to switch to synchronous mode (=open loop).Note that this approach does not allow you to start the motor with a load, so it's most suitable for things like driving propellers or pumps.

author: Shenk123
author_rank: Newbie
timestamp: April 26, 2020, 12:16:39 pm
content: Thanks again for your reply but how can I do that in MATLAB ? The voltage sources don't allow to be set up for a specific time and then be shut off after that. I would need a voltage surce that can bring my motor to the desired speed and then disconnect itself after a time. Also why would I need to measure back-emf if I am dealing with sensored FOC ? The ideal motion sensor is providing me with the angle and the speed of the rotor so it isn't sensorless FOC.

author: Shenk123
author_rank: Newbie
timestamp: April 26, 2020, 12:19:06 pm
content: Could perhaps ramping up the angle to a known value work as start-up technique in Simulink. (No need to power the phase ?)

author: Benta
author_rank: Super Contributor
timestamp: April 26, 2020, 05:46:48 pm
content: I can't help you with Matlab or Simulink, not my area.But another question: does your motion sensor output absolute rotor angle?