How can i use the PID controller function

조회 수: 2 (최근 30일)
William
William 2013년 6월 17일
답변: bassem adel 2016년 2월 9일
I am trying to use the PID controller in matlab but when i do, i get the message "undefined function or variable". Is there some download that i can install or if someone could give me a solution I'd appreciate it, got some assignments i need to complete.
Thanks in advance
  댓글 수: 2
David Sanchez
David Sanchez 2013년 6월 17일
Could you please give any example of how you are using the function? It is a bit difficult to guess anything by the information provided.
William
William 2013년 6월 17일
I was trying to following an example i found on this website:
Kp = 1; Ki = 1; Kd = 1;
s = tf('s');
C = Kp + Ki/s + Kd*s
C =
s^2 + s + 1
-----------
s
C = pid(Kp,Ki,Kd)
tf(C)
ans =
s^2 + s + 1
-----------
thats when i get the message undefines function or variable "pid"

댓글을 달려면 로그인하십시오.

채택된 답변

Arkadiy Turevskiy
Arkadiy Turevskiy 2013년 6월 27일
pid objects and PID Tool were added to Control System Toolbox in release 2010b. Upgrade to that release or later to be able to use pid objects.
You can still do what the example describes, you will just have to represent PID controllers as transfer functions, as discussed at the top of the example.

추가 답변 (2개)

David Sanchez
David Sanchez 2013년 6월 17일
As an example, you could take a look at the following link:

bassem adel
bassem adel 2016년 2월 9일
how can I use the pid function in MATLAB R2007b ?

카테고리

Help CenterFile Exchange에서 PID Controller Tuning에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by