Ask questions for Matlab PID()

1.What is the meaning of demon = [1 3 1]?
2.What is the meaning of Gp=tr(num,demon)?
3.How to interpret this line:
M=feedback(Gp,H)
This is a website address for this PIC control:
https://www.bilibili.com/video/BV1Aq4y1U7bg?from=search&seid=281292339855222775&spm_id_from=333.337.0.0
Thanks

1 Kommentar

Walter Roberson
Walter Roberson am 26 Mär. 2022
you miscopied. The code does not use tr(), it uses tf()
Control systems are often expressed as transfer functions, each deals with derivatives. The higher the power of s you see, the higher the derivative. The overall expression is the laplace transform of the time function.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Sam Chak
Sam Chak am 26 Mär. 2022
Bearbeitet: Sam Chak am 26 Mär. 2022

1 Stimme

It is actually not "demon", but "denom", a shortened form of the word "Denominator". A Demon generally means an evil spirit or devil, whereas the denominator is the part below the fraction line:
.
  1. The line denom = [1 3 1] creates a horizonatal vector of numbers with 3 elements in it. These numbers are actually coefficients for that will be used for creating the transfer function model later. Similarly, num = [1] creates the coefficient for in the numerator (the part above the fraction line).
  2. The line Gp = tf(num, denom) creates the transfer function model for the Plant (a control theory term that stands for a dynamical system to be controlled).
  3. The line M = feedback(Gp, H) creates the closed-loop transfer function that loops around the the feedforward transfer function and the feedback transfer function . The transfer function commonly relates the reference input to the output . Since there is only one feedforward element, (no controller ), then the formula is given by .
Hope the explanations help. Also suggest you to take these TWO (2) short courses:

Kategorien

Mehr zu Control System Toolbox finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2021b

Gefragt:

am 26 Mär. 2022

Bearbeitet:

am 26 Mär. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by