MATLAB Answers

PID tuner not working for Simulink BLDC Motor Controller

45 views (last 30 days)
CB on 17 May 2018
Commented: Arkadiy Turevskiy on 10 Dec 2018
I am using discrete PI controller for simulink BLDC Motor(Simpower systems) and controller, I have speed feedback from motor in rpm and trying to get PI block's output for duty cycle input of PWM generator. Whenever I press Tune button its says failed to linearized the model and sometimes it does not get launched. If I manually put the PI parameters my motor and controller is working fine.


Sign in to comment.

Answers (1)

Arkadiy Turevskiy
Arkadiy Turevskiy on 15 Aug 2018
Edited: Arkadiy Turevskiy on 29 Oct 2018
When you press "tune" button, PID Tuner tries to linearize the model and comes up with zero due to discontinuities introduced by PWM.
To tune PID Controller in this case use new PID Tuning capabilities introduced in recent releases. See here and watch this video which shows exactly what you are trying to do.
Hope this helps.
Arkadiy Turevskiy
P.S. There is now a shipping example in R2018b showing how to do this, please see here .


Shalini Tripathy
Shalini Tripathy on 10 Dec 2018
Hi Arkadiy,
I am using online PID tuner or Autotuner block to tune the PI controller for simulink BLDC Motor example(Simpower systems). The MATLAB version I am using is 2017b. I have already referred to the links you have attached above to use the PID Autotuner appropriately . Although I have connected the block properly and the moment I push the start and stop button of the Online tuner it does compute the P and I gains, but it is random. When I am using the computed P and I gains for the PI controller it isnt stabalizing the control loop or the motor speed.
Other than the links you have shared I have also refered Link1 and Link2. I am unble to open Link2 on MATLAB due to some missing licenses like Simscape electrical.
Could you please help me with this issue. Why the Online PID tuner or Autotuner is not working, what could be the reason?
Also if you have more examples which I can open on MATLAB for better understanding of Closed loop PID Autotuner, could you please share it with me.
Shalini Tripathy
Arkadiy Turevskiy
Arkadiy Turevskiy on 10 Dec 2018
Hello Shalini,
It is hard to diagnose what's not working without a model. It could be that experiements parameters are not chosen properly. I suggest you contact MathWorks Technical Support for assistance with your problem.

Sign in to comment.

Sign in to answer this question.

Translated by