# Matlab 'pidtune()' function Algorithm

9 visualizzazioni (ultimi 30 giorni)
Ann-Christin Schlupek il 25 Mar 2023
Commentato: Sam Chak il 29 Mar 2023
Good evening,
can someone maybe explain me how the Algorithm of the pidtune() function works?
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposte (2)

Steven Lord il 26 Mar 2023
See the Algorithms section on its documentation page. The References section on that same page may also be of interest.
##### 1 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
Ann-Christin Schlupek il 26 Mar 2023
Thanks for your answer, but I want to understand how exactly the algorithm chooses the parameter of the controller?

Accedi per commentare.

Sam Chak il 26 Mar 2023
In slightly technical terms, pidtune() contains a set of instructions that tells MATLAB what numerical operations to perform repeatedly, in what order, and under what conditions, until all three tuning objectives are achieved:
1. Closed-loop stability
according to some tuning rules such as the popular Ziegler–Nichols, Aström's AMIGO, Skogestad's Internal Model Control, and Chien-Hrones-Reswick. Suggest you to make a Google search on these tuning rules.
I haven't looked into the algorithm. But from the perspective of control system design, those operations can range from basic arithmetic calculations (identifying the search direction of the stability regime for the PID gains via the Routh–Hurwitz criterion, computing eigenvalues, etc.) to complex data analysis (linearization, computing step-response characteristics, computing gain margin and phase margin, etc.).
By default, if the designer doesn't know what the performance requirements are or what the stakeholder really want, then the algorithm will automatically choose a crossover frequency (loop bandwidth) based on the plant dynamics, and designs for a target phase margin of 60°.
##### 2 CommentiMostra NessunoNascondi Nessuno
Ann-Christin Schlupek il 29 Mar 2023
Where can I look into the algorithm?
Sam Chak il 29 Mar 2023
The pidtune(), like most commericial software such as
is a proprietary PID tuning algorithm. However, you can search the m-file and take a glimpse.
edit pidtune

Accedi per commentare.

### Categorie

Scopri di più su PID Controller Tuning in Help Center e File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by