Hi, as I understand, you would like to know how to use the PID Autotune block with the C2000 in Simulink.
If you’re still interested since the PI Controller block in discrete mode does not support automated tuning, you may need to switch to the Discrete PID Controller block to access this feature.
Below are step-by-step instructions, using the closed loop control system example, to help you configure and autotune your controller:
openExample('c2b/GetStartedWithC2bMultiprocessorBlocksOnMCUsExample','supportingFile','soc_closed_loop.slx')
- In the Simulink model, double-click the "Controller algorithm" block.
- go inside 'Controller algorithm' to get into the 'PI controller' then replace 'PI controller' with 'PID controller’, replace PI Controller with PID Controller
Select Simulink > Continuous > PID Controller or Simulink > Discrete > PID Controller (choose Discrete for digital control).
3. When you double click the PID Controller Block, set the parameters like sample time, output saturation limits, as you want or according to the previous PI controller
4. Enable Automated Tuning -In the Main tab, click Tune, when prompted, select the top-level model (likely soc_closed_loop). Follow the PID Tuner instructions to auto-tune the controller. In the PID Tuner, adjust tuning as needed and apply
Kindly refer to the following MathWorks documentation links for better understanding of the PID controller configurations, also the link of the example in case you wanted to try:
Hope it helps!