To find the correct PID gains for your system using Simulink's PID Autotuner, you can follow these steps:
- Before starting the tuning process, make sure your system is running in a stable state. If needed, manually set approximate PID gains (e.g., just proportional gain) to help the system stabilize.
- If you are using serial communication, double-check that the signals, like encoder data, are being transmitted and received correctly in Simulink. Any data loss or mismatched sampling rates can interfere with the tuning process.
- If the encoder signal (y) is noisy, add a low-pass filter before connecting it to the PID Autotuner block. Noise can interfere with accurate tuning.
- Configure the PID Autotuner Block using the following:
Bandwidth: Set a range such as 10–50 rad/s, depending on the desired speed of your motor's response.
Transient Behavior: Use "Moderate" or "Slow" to ensure smooth tuning and avoid aggressive oscillations.
- Once the PID Autotuner gives you the gains, test them in your model. If they don't give the expected performance, try adjusting the bandwidth or transient behavior settings and retune.
You can refer to following links related to PID autotuning: