In this article, we are going to explain the torque and speed controlling methods of a Brushless Motor and compare them together and learn how you can seamlessly do it using our products and our Simulink Blockset that enables you to communicate with SOLO through USB, UART and CANopen from the Simulink environment but first, we are going to give a brief introduction to a PMSM and control scheme of it, PMSM motors are also known as AC brushless Motors too.
To get access to the source codes and the example codes please visit the link below:
The Blockset library: https://github.com/Solo-FL/SOLO-Motor-Controllers-SIMULINK
PMSM or AC brushless Motors, Dynamics and Theory
psi_m is the magnetic flux of the permanent magnet, n is the number of pole pairs,omega is the mechanical speed of the rotor, J inertia of the rotor, R_s and L_s are stator resistance and inductance respectively.
As we can see from the equation the only parameter that contributes to torque is i_sq and i_sd is just related to the joule losses, for this reason when we are controlling a PMSM, we always put the i_sd=0. It needs to mention that when we are using field weakening the is_d is not equal to zero anymore and we should calculate the value for it.
Now we are going to use the field-oriented control (FOC) technique for PMSM. The overall scheme of FOC is as below.
Figure 1 – Complete FOC scheme
Torque Controlling of a PMSM
Some applications like traction(electrical vehicles and railway) require specific torque, for these applications we should use torque control mode.
The control block diagram of torque control corresponds to the figure below.
Figure 2 – FOC scheme for torque control
As shown in the equations, when user set a reference torque, we can easily derive the i_sq, just by multiplying it by 1/npsi_m . Afterwards, we are going to regulate i_sq,ref and generate the v_sq,ref.
The use of a torque control offers several advantages such as quick, and robust torque reaction and increase efficiency. On the other hand, there are some disadvantages of it such as poor dynamic response at low speed and possible problems during the starting.
Speed Controlling of a PMSM
Figure 3 – FOC scheme for speed control
Figure 4 – Schematic of blocksets
Calibration/ Identification phase
Figure 5 – Calibration/Identification block
The first block is the calibration/identification. This block is used to find the motor parameters as resistance and inductance of the motor. In addition, it is used to find the offset as well.
To activate this block user should push one of the buttons related to calibration and identification (top right).
Note: For activating this block the motor should be off, otherwise if you push the calibration or identification, it is not going to do anything.
Figure 6 – Tx Block
The Serial Setup Block
Figure 7 – Initialization block
Figure 8 – Rx block
The user sets the preference configuration, by means of these blocks such as analog/digital mode, feedback mode (sensorless, encoder, or hall sensor), motor direction (clockwise or counterclockwise), and torque of the motor. In addition, the user can tune the current controller using these blocks.
Figure 9 – Control panel
How does it work?
It is really easy, you just need to connect SOLO and set the right COM port, motor type, and feedback mode. Now, everything is ready to run your motor.
Note: If the motor does not move when you turn it on, it is probably because the control mode is on analog mode and it is not initialized correctly and you should set it to digital by means of the switch related to it.
Note 2: you need to have the correct wiring configuration and offset, otherwise your motor is not going to move. For this purpose, you just need to push the calibration button to set the offset and then try to see if this configuration works or not, otherwise, you should change the wiring and repeat the same procedure again.
Note 3: In the speed control all the blocks are the same except the control panel. For speed control our control panel becomes as below:
Figure 10 – Control panel for speed control mode