Motor Control Design with MATLAB and Simulin

wafa mezzi on 13 Apr 2021
Latest activity Edit by wafa mezzi on 1 May 2021

hi everyone could you explain to me why the three phase voltages in this video are not sinusoïdale and how to change them To be sinusoidale?

Youtube video: Motor Control Design with MATLAB and Simulink

link:https://www.youtube.com/watchv=lP4jbmthiyc&t=1103s&ab_channel=MATLAB

Dakai Hu
Dakai Hu on 13 Apr 2021

The three phase voltages in the models are fairly sinusoidal. Are you talking about the sampling resolution ? Control algorithms are implemented in a fixed sample rate and so are the output three phase voltages.

Tony Lennon
Tony Lennon on 13 Apr 2021

Do you mean this video? https://www.youtube.com/watch?v=lP4jbmthiyc

wafa mezzi
wafa mezzi on 16 Apr 2021 (Edited on 16 Apr 2021)
wafa mezzi
wafa mezzi on 16 Apr 2021 (Edited on 16 Apr 2021)

First of all i would like to thank you so much for your reply, yes sir exactactly i mean that video https://www.youtube.com/watch?v=lP4jbmthiyc&t=1103s&ab_channel=MATLAB

the reason why i'm asking this is that when i plot the three phase-voltages that's what i observe (pleach check the attachements) and and for my project i need to replace the ideal phase voltage generator here by a SVPWM algorithm (i need to implement an inverter and a battery instead) could u give me some hints how to use these sampled signals in order to implement the svpwm ? because it seems like they use continuous sinusoidale signals for that..

Thank you in advance !

Dakai Hu
Dakai Hu on 16 Apr 2021

There is no "continuous signals" in a simulation environment because it is not the analog world. Signals in Simulink are always sampled either at a fixed time step or variable time step. SVPWM does not require the input voltage waveforms to be "continuous". Please check various demos that we shipped in Simscape Electrical for the implementation of SVPWM. For example, this one: https://www.mathworks.com/help/releases/R2021a/physmod/sps/ug/ipmsm-velocity-control.html

wafa mezzi
wafa mezzi on 27 Apr 2021

Dear Mr.Dakai

Can the technique used in the matlab example "IPMSM velocity control" be applied in the simulink model "flux weakening control of pmsm", using this block "pwm generator (thee-phase, two level)" to generate the gate pulses. please see the attachments how I did it. If not, could you recommend me some corrections?

because i still have an unstable torque response even after tuning the current loop pid controllers.

Dakai Hu
Dakai Hu on 27 Apr 2021

Hi, The unstable response could be caused by different reasons. the PWM Generator block should work. Unfortunately I am not able to help you debug by just looking at your waveforms.

wafa mezzi
wafa mezzi on 30 Apr 2021 (Edited on 30 Apr 2021)

Dear Mr Dakai

Here I uplod the simulink file would you please help me debug ?

Thank you in advance.

Dakai Hu
Dakai Hu on 30 Apr 2021

Hi Wafa,

I made two changes to fix your model.

1. Change Param_BaseSpeed from 6500 to the original 876 rpm.

2. The PWM Generator block will have to be sampled at a higher rate ( we recommend 100X switching frequency). I changed it from 5e-6 to 1e-6.

-Dakai

wafa mezzi
wafa mezzi on 1 May 2021 (Edited on 1 May 2021)

hello

Thank you for your valuable help. Is there any way to calculate or approximate Lq, Ld, Rs and the flux linkage parameters for any given rated speed. Also, how to calculate the flux lookup table data when increasing the rated speed to a higher value?