Auto-tuning Simulink Gains

4 次查看(过去 30 天)
Connor LeClaire
Connor LeClaire 2021-12-5
回答: Kothuri 2024-4-29
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

回答(1 个)

Kothuri
Kothuri 2024-4-29
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

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by