can we generate C/C++ code for closed loop Autotuner?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello there,
I am using cloded loop Autotuner for motor controller application. I want to know that, can we get C/C++ code for simulink model "Closed loop PID Autotuner"?
If 'Yes' than how?
Thank you!!!
댓글 수: 2
Walter Roberson
2020년 4월 29일
Yes. If you look at the bottom of https://www.mathworks.com/help/slcontrol/ug/closedlooppidautotuner.html you can see C/C++ Code Generation under Extended Capabilities.
채택된 답변
Zhao Wang
2020년 4월 29일
Let me answer the "how" part of this question. There is a documentation page about the complete workflow of using the Closed-Loop PID Autotuner block in real time:
You can try the workflow using another example: https://www.mathworks.com/help/slcontrol/ug/tune-pid-controller-in-real-time-using-closed-loop-pid-autotuner-block.html
Since there are usually multiple control loops in motor control, you may want to start with tuning one controller at a time.
Besides directly generating code, you can also run the autotuning algorithm on hardware using External Mode. Here is the relevant documentation page: https://www.mathworks.com/help/slcontrol/ug/control-real-time-pid-autotuning-in-simulink.html
You can try the external mode workflow by referring to another example about Open-Loop PID Autotuner: https://www.mathworks.com/help/slcontrol/ug/tune-pid-controller-in-real-time-using-open-loop-pid-autotuner-block.html
추가 답변 (0개)
커뮤니티
더 많은 답변 보기: Power Electronics Community
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!