2019-04-10 06:10 AM
i want to set PID gains by auto tuning process how can i achieve this by using STM32 C code or any eample ?
Solved! Go to Solution.
2019-04-11 06:11 AM
Yes, you can convert your Simulink into C code for STM32 using Embedded Coder. The code generated is ANSI / ISO C code that is optimized for deployment on embedded systems. You would import the code generated for your algorithm (so auto-tuned PID in this case) into your existing SW project / IDE and integrate it there for deployment to STM32. This is the generic workflow.
There are some custom workflows you can also look at using STM32-MAT/Target (authored by ST) and Nucleo / Discovery Support packages (authored by MathWorks).
-b
2019-04-10 06:45 AM
Attach the controlled system, the input and output circuitry, and implement your own algorithms to tune the control parameters.
Or use a simulation tool like Matlab/Simulink, Mathematica, Maple, Octave, Scilab, etc.
2019-04-10 12:23 PM
You can Use Simulink and Control System Toolbox to do this: https://www.mathworks.com/help/control/ug/pid-controller-tuning-in-simulink.html
2019-04-10 08:22 PM
can i export auto tuning block of simulink in to c code and then use this code in to STM32
for auto tuning it is possible?
2019-04-11 06:11 AM
Yes, you can convert your Simulink into C code for STM32 using Embedded Coder. The code generated is ANSI / ISO C code that is optimized for deployment on embedded systems. You would import the code generated for your algorithm (so auto-tuned PID in this case) into your existing SW project / IDE and integrate it there for deployment to STM32. This is the generic workflow.
There are some custom workflows you can also look at using STM32-MAT/Target (authored by ST) and Nucleo / Discovery Support packages (authored by MathWorks).
-b