0
\$\begingroup\$

I would like to create simulation of speed control of BLDC motor (something based on following scheme): enter image description here

But I have a problem with understanding how to compute duty cycle in Controller block (that is PI controller based on many sources). From what I already know is that PI controller get on input difference between desired speed and actual speed and its output is treated as duty cycle but...how? Difference between desired and actual speed can be very large but based on following image: enter image description here

reference signal should take values from 0 to 1, but if I take desired speed for example 600 rad/s and have actual value for example 300 rad/s then PI controller output will be much higher than 1. On following image is showed exemplary output from PI controller in closed-loop control system:

enter image description here

I would like then to know how to convert PI controller output into duty cycle of PWM signal.
I would also like to make sure that I correctly understand PWM control system. Commutation Logic block decide which switches in Three-Phase Inverter block are closed (current is flowing) or opened (current is not flowing). But if specified switches are actually closed or opened depends of PWM signal value (if PWM signal value is 1 then switches are closed and when PWM signal value is 0 then switches are opened).

EDIT:
Several sources (e.g. https://www.researchgate.net/publication/273634792_Speed_Control_Analysis_of_Brushless_DC_Motor_Based_on_Maximum_Amplitude_DC_Current_Feedback?enrichId=rgreq-f79af632138101a2bb06fcf1df0fd5a5-XXX&enrichSource=Y292ZXJQYWdlOzI3MzYzNDc5MjtBUzoyMDc4MTIxNjU2NzI5NjhAMTQyNjU1NzY4OTkyOA%3D%3D&el=1_x_3&_esc=publicationCoverPdf) shows alternative versions of speed control:

enter image description here

Here, we have two PI controllers, where first is the one that takes as input difference between desired and actual speed, and second that takes as input difference between output from first PI divided by mechanical constant and Imax and thus I have several more quesions:

  • is Imax maximal value from ia, ib, ic or sum of them or something else?
  • several sources shows scheme where output of first PI controller (whose input is difference between desired and actual speed) isn't divided by mechanical constant. Should I divide output from first PI controller by mechanical constant or not?
  • should pwm signal with duty cycle lower than 50% reverse direction of current in phases similarly to this movie (link to specified fragment) https://youtu.be/b5J5qkR7msc?t=482 ?
\$\endgroup\$
1
  • \$\begingroup\$ "I would like then to know how to convert PI controller output into duty cycle of PWM signal.". Your Simulink screenshot already shows a block namedcontroller whose output is named duty cycle. Does it not output PWM ? \$\endgroup\$
    – AJN
    Sep 26, 2020 at 16:23

1 Answer 1

1
\$\begingroup\$

reference signal should take values from 0 to 1, but if I take desired speed for example 600 rad/s and have actual value for example 300 rad/s then PI controller output will be much higher than 1.

In a control system, the gains chosen has to be based on required dynamic response characteristics as well as the capability of the control-effector system. Here, your control-effector has a limitation of being able to accept input in range \$[0,1]\$. So for the largest error that you want the system to behave linearly (without saturation), your proportional (and integral) gains need to be small enough to naturally keep the PI output inside \$[0,1]\$. For error outside this range, you system will have non linear behaviour which will have to tolerated.

e.g. If the value of Proportional gain, P = 0.003 , then the output is (600-300)*0.003 = 0.9. It will be within the limits. Moreover, you can add logic at the output of the PI controller to limit the value to \$[0,1]\$ range. Simulink has a saturation block which can be used.

I would like then to know how to convert PI controller output into duty cycle of PWM signal.

Your Simulink screenshot already shows a block named controller whose output is named duty cycle. Does it not output PWM ? More info is need to answer this.

Commutation Logic block decide which switches in Three-Phase Inverter block are closed (current is flowing) or opened (current is not flowing). But if specified switches are actually closed or opened depends of PWM signal value (if PWM signal value is 1 then switches are closed and when PWM signal value is 0 then switches are opened).

Yes, both processes will interfere with each other if the switching frequency of the PWM and commutation are close. Keep one of the frequencies much higher than the other. The lower frequency signal will act an an enable or gating signal for the other process.

\$\endgroup\$
3
  • \$\begingroup\$ Thank you for quick response. Idea to use ideal version of PI controller instead of parallel version is something I needed. Thanks for confirmation of information about PWM way of working. Image with scheme is taken from following movie: youtube.com/watch?v=b5J5qkR7msc \$\endgroup\$
    – Zekhire
    Sep 26, 2020 at 19:48
  • \$\begingroup\$ @Zekhire Since you have added additional questions (and more details), consider opening a new question (with all the details). It will improve the chances of people seeing it and you getting an answer. \$\endgroup\$
    – AJN
    Sep 27, 2020 at 2:10
  • \$\begingroup\$ Ok. Thanks for advice. \$\endgroup\$
    – Zekhire
    Sep 27, 2020 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.