Auto-tuning Simulink Gains

6 views (last 30 days)
Connor LeClaire
Connor LeClaire on 5 Dec 2021
Answered: Kothuri about 14 hours ago
Hello,
I have a Simulink model that I need to tune. Specifically it is a PD control with the Kp and Kv being a (n x n) identity matrix multiplied by some coefficient. The inputs are vectors of length 3. Is it possible to auto-tune the gains to have the output match the desired output?
If so is it possible to independently auto-tune the gains for each element along the identity matrix?
Thanks

Answers (1)

Kothuri
Kothuri about 14 hours ago
Hi,
It is possible to auto-tune the gains in a Simulink model to have the output match the desired output, for a PD (Proportional-Derivative) control system. You can use the Control System Toolbox or the PID auto tuner app to auto-tune the gains of the PD controller by setting the Integral gain to zero.
But for matrix gains, you need to use a custom script that uses optimization to minimise the error between the actual and the desired output. Your objective function can calculate the output for a given set of gain values and measure the deviation from the desired output. This approach allows for more flexibility, for tuning matrix gains element-wise.
  • Define your cost function to evaluate the performance of the PD controller for a set of (K_p) and (K_v) values.
  • Use optimization functions to find the gain values that minimize your cost function.
In this way you can auto-tune the matrix gains of the PD controller.You can refer the below link for more information on PID auto tuner

Tags

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!