此章節會針對MCSDK 常遇到問題去做講解與調整介紹,相關資料位置也會整理出來方便大家在馬達控制上更加快速上手


在使用MCSDK Gen code出來,主程式段落與數學對照式如下圖

ST這邊提供3種方案去補強需求下面會介紹這3種方案MTPA/Feed Forward/Flux weakening,這3種方案都可以直接在MCSDK上勾選開啟

MTPA(Maximum Torque Per Ampere)



Flux Weakening


弱磁控制減弱了永磁體產生的氣隙磁鏈 λpm的影響,從而降低了得到的 d 軸磁通 λd。如圖

Feed Forward



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-

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
    • 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

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)

Speed Feedback error通常可以先調整G2的數值,再去調整PI控制器數值


C:\Program Files (x86)\STMicroelectronics\MC_SDK_6.1.2\Documentation\html

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart