Undefined function or method 'pid' for input arguments of type 'double'.

Hi, I am a beginner and would like to try out matlab for my assignment. I am encountering the error as ' Undefined function or method 'pid' for input arguments of type 'double'.' I can't figure out why. Please help.
clear all
clc
syms s
Gnum =exp(-0.5);
Gden = [7.724 32.317 25.220]; %((s+1)*((s+5)^2));
G=tf(Gnum,Gden);
H = 1;
T = feedback (G,H);
step(T)
hold on
Kp = 26.995;
Ki = 21.067;
Kd = 6.452;
Gc = pid(Kp,Ki,Kd);
Mc = feedback(Gc*G,H);
step = (Mc);
grid on

5 件のコメント

Guillaume
Guillaume 2014 年 11 月 24 日
What does
which pid
return?
Phyo
Phyo 2014 年 11 月 24 日
pid should return double too. just like tf or feedback function I guess. but the error encountered was
??? Undefined function or method 'pid' for input arguments of type
'double'.
Error in ==> Untitled4 at 17 Gc = pid(Kp,Ki,Kd);
Phyo
Phyo 2014 年 11 月 24 日
though I put all value as int, the error shows the same thing.
Guillaume
Guillaume 2014 年 11 月 24 日
I'll ask again, what does
which pid
return when you type that at the matlab prompt? That will tell us whether the function is visible to matlab or not.
Phyo
Phyo 2014 年 11 月 24 日
you r right. pid function is not visible. I am using 2009a currently and trying to upgrade to newer version which includes that function.

サインインしてコメントする。

回答 (1 件)

Arkadiy Turevskiy
Arkadiy Turevskiy 2014 年 11 月 26 日

0 投票

As you might have already realized, the pid objects were introduced in Control System Toolbox in release 2010b, so you would not be able to use them in 2009a.

カテゴリ

質問済み:

2014 年 11 月 24 日

回答済み:

2014 年 11 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by