ST MCSDK 實戰問題
前言
此章節會針對MCSDK 常遇到問題去做講解與調整介紹,相關資料位置也會整理出來方便大家在馬達控制上更加快速上手
MCSDK程式主結構
在使用MCSDK Gen code出來,主程式段落與數學對照式如下圖
ST這邊提供3種方案去補強需求下面會介紹這3種方案MTPA/Feed Forward/Flux weakening,這3種方案都可以直接在MCSDK上勾選開啟
MTPA(Maximum Torque Per Ampere)
MTPA控制方式與id=0控制方式的區別
這個從轉矩方程最容易看出來,轉矩分為永磁轉矩Tr和磁阻轉矩Tm,而id=0只剩下Tr。這會導致電流的利用率不高,系統的效率降低。所以id=0的控制比較適用於隱極式電機(Ld=Lq),而對於凸極式電機並不最優,所以需要重新考慮控制策略。
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-
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
Speed Feedback error通常可以先調整G2的數值,再去調整PI控制器數值
資料查詢
在MCSDK6.1版本安裝完後會多一個詳細介紹各個數值,路徑如下
C:\Program Files (x86)\STMicroelectronics\MC_SDK_6.1.2\Documentation\html