ST MCSDK Practical Issues
Preface
This section will address common issues encountered with MCSDK and provide explanations and adjustments. Relevant information locations will also be organized to facilitate a quicker start for everyone in motor control.
MCSDK Program Main Structure
After generating code using MCSDK, the main program section and mathematical equations are as shown in the following figure:
ST provides three solutions to enhance the requirements. Below, we will introduce these three solutions: MTPA/Feed Forward/Flux weakening. All of these solutions can be enabled directly in MCSDK.
MTPA(Maximum Torque Per Ampere)
The difference between MTPA control mode and id=0 control mode
This can be seen most easily from the torque equation, where torque is divided into permanent magnet torque (Tr) and reluctance torque (Tm), and with id=0, only Tr remains. This leads to lower current utilization and reduces system efficiency. Therefore, id=0 control is more suitable for interior permanent magnet machines (Ld=Lq), while for surface-mounted permanent magnet machines, it is not the optimal choice. Hence, a reconsideration of the control strategy is needed.
Flux Weakening
Weak field control, also known as flux weakening, involves reducing the torque at the expense of allowing the motor to operate at speeds higher than its rated speed.
Weak field control mitigates the impact of the permanent magnet’s air gap flux λpm, resulting in a decrease in the d-axis magnetic flux λd obtained, as shown in the figure.
Feed Forward
A control system that exhibits feedforward behavior responds to its control signals in a predefined manner without reacting to changes in the load. In contrast, it is compared to systems with feedback, where feedback systems adjust their output based on how the output affects the load and how the load may change. Load variations are considered part of the system’s external environment.
Common Issues
Problem: ‘SW error’ fault message appears and the motor do not even try to start
Source: the FOC execution rate is too high and computation can not be ended in time
- Solution: In Drive settings, decrease ratio between PWM frequency and Torque and flux
regulator execution rate (e.g. increasing Torque and flux regulator execution rate by one )
Problem: ‘Over-current’ fault message appears and the motor do not even try to start
- 1st possible source: wrong current sensing topology has been selected in power stage
current sensing- Solution: select right current sensing configuration
- 2nd possible source: wrong current sensing parameters
- Solution: check power stage parameters
- 3rd possible source: current regulation loop bandwidth is too high for this HW
- Solution: in drive parameters drive settings decrease current regulation bandwidth (normally down to
2000 rad/sec for 3shunt topology and 1000 rad/s for single shunt topology) - Typical current regulation loop bandwidth max values are 4500 rad/sec for 1 shunt, 9000 rad/sec for 3-
shunt
- Solution: in drive parameters drive settings decrease current regulation bandwidth (normally down to
Problem: Motor initially moves but then doesn’t rev-up, then fault message ‘Rev-up failure’ appears
- Source: typically this happens cause the current provided to the motor is not enough for making it accelerate so
fast- 1st possible solution: decrease acceleration rate by increasing Start-up parameters speed ramp duration (being
Start-up parameters speed ramp final value set to about 30% of maximum application speed) - 2nd possible solution: increase start-up current by increasing current ramp initial and final values up to motor
nominal current - Enabling ‘Alignment phase’ (at least at the beginning of the development) makes start-up more deterministic, use
around 2000ms, half of nominal current as first settings
- 1st possible solution: decrease acceleration rate by increasing Start-up parameters speed ramp duration (being
Problem: The rotor moves and accelerate following the ramp-up profile but then it stops and the fault message ‘Speed feedback’ appears
- Use speed ramps: having a target speed gently going from the start-up output speed to the final
target will avoid abrupt variations of torque demand that could spoil B-emf estimation - A mix of following problem sources can be occurring:
- 1st possible source: Observer gain G2 is too high and this makes speed reconstruction a bit
noisy (for the selected speed PI gains). A mix of following solutions could be required:- 1st possible solution: decrease observer gain G2 by successive steps: /2, /4, /6, /8
- 2nd possible solution: Run motor in torque mode, if trouble doesn’t exist in torque mode, it means speed
regulator gains are not optimal try changing them
- 2nd possible source: frequent situation when the start-up has been validated too early
- Solution: Try increasing Start-up parameters consecutive successful start-up output test (normally to
not more than 4-5) being minimum start-up output speed set to 15% of maximum application speed (if
required, decreased it later)
- Solution: Try increasing Start-up parameters consecutive successful start-up output test (normally to
The ‘Speed Feedback Error’ can typically be addressed by adjusting the G2 value first, followed by adjusting the PI controller parameters.
Detailed Information
To access detailed information about various parameters after installing MCSDK 6.1, you can navigate to the following path:
C:\Program Files (x86)\STMicroelectronics\MC_SDK_6.1.2\Documentation\html