- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hello,I want to use the MC9S12ZVM_AMMCLIB_RTM in BLDC motor controlling,and I set as the advise:
and add the ".h" file which is necessary,but when I use the function :
GFLIB_ControllerPIrAW_F16, the output always is 0.
Can give me some advise ?
解決済! 解決策の投稿を見る。
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hello,
I can see you are changing the controller parameters every time before the controller function is called. That is not wrong except for the *.f32Acc = 0 and *.f16InErrK1 = 0 - these parameters are internal accumulator and previous error. It should be left unchanged when the controller is supposed to run. These parameters should be reset on every transition from stop to run (before the PI controller is supposed to run), but not before every call of the controller.
Another concern is your "a" variable - since it is constant and you are using it as the error input of the controller, the PI controller will integrate this error and eventually saturate with no way back.
Final comment - please use the latest version of the AMMCLib library. Your version works as well, but most of the library functions have been optimized to provide better performance.
Please let me know if it solves your issue.
Best regards,
Matej
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hello,
I can see you are changing the controller parameters every time before the controller function is called. That is not wrong except for the *.f32Acc = 0 and *.f16InErrK1 = 0 - these parameters are internal accumulator and previous error. It should be left unchanged when the controller is supposed to run. These parameters should be reset on every transition from stop to run (before the PI controller is supposed to run), but not before every call of the controller.
Another concern is your "a" variable - since it is constant and you are using it as the error input of the controller, the PI controller will integrate this error and eventually saturate with no way back.
Final comment - please use the latest version of the AMMCLib library. Your version works as well, but most of the library functions have been optimized to provide better performance.
Please let me know if it solves your issue.
Best regards,
Matej
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
It works,thank you !