Error simple program PID

조회 수: 2 (최근 30일)
JOJO
JOJO 2014년 1월 15일
편집: JOJO 2014년 5월 27일
Hello, I doing a pid project I have everything correct but this error come up what I should do?

채택된 답변

JOJO
JOJO 2014년 1월 15일
in my second compute it works, however I dont know how to find the tooboxes
  댓글 수: 1
Mischa Kim
Mischa Kim 2014년 1월 15일
Type
which -all syms
and you should get something like
C:\Program Files\MATLAB\R2013b\toolbox\symbolic\symbolic\syms.m

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

추가 답변 (5개)

Mischa Kim
Mischa Kim 2014년 1월 15일
Interesting. The code is just fine.
Try this: copy-and-paste the code from your question above and paste it into the MATLAB command window. Execute.
  댓글 수: 1
Mischa Kim
Mischa Kim 2014년 1월 15일
I assume you have the Symbolic Toolbox licensed?
Also, please post comments as comments.

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


JOJO
JOJO 2014년 1월 15일
I tried it give me this error I dont know why

David Sanchez
David Sanchez 2014년 1월 15일
I tried your code (copy-paste) and it works. Make sure you have the Symbolic Math toolbox:
Start (bottom left corner)-> Toolboxes
You should see the all the toolboxes of your system, if you do not locate the Symbolic Math toolbox, you can not use
syms

JOJO
JOJO 2014년 1월 15일
편집: JOJO 2014년 2월 2일
I used control theory it worked.
Thanks Davi

Carla
Carla 2014년 1월 15일
Is there a reason you need to do this with syms? At least in the code you showed, it doesn't look like you are using any Symbolic Toolbox functionality. You can achieve the same exact result using only Control System Toolbox as follows:
num=1; % Numerator
den=[1,3,1]; % Denominator
G=tf(num,den); % Transfer Function
H=1; % Negative Feedback Loop with Unity Feedback
Kp=1; % Increment these three varaibles to give desired output
Ki=0;
Kd=0;
C=pid(Kp,Ki,Kd); % Controller Function
T=feedback(C*G,H); % C in series with G with negative feedback H
step(T) % Step Response with Controller
If there is some reason elsewhere in your program that you need syms functionality, I suppose this won't solve your problem!

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by