이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
purpose of state-space with pid
조회 수: 1 (최근 30일)
이전 댓글 표시
azan
2012년 10월 11일
Hi everyone! I am having problem that when I connect state space block to PID and take its output as feedback in simulink I get a plot that converges at reference value; now I have to do the same job in mfile I have done the coding for pid but I am not getting idea that; what is the purpose of state space connected with pid so that I can write code for it.
채택된 답변
Azzi Abdelmalek
2012년 10월 11일
편집: Azzi Abdelmalek
2012년 10월 11일
clear,close
%your model and its input output
mot=tf(1,[1 1]),
model=ss(mot);
[F,h,c,d]=ssdata(model);
model.u='u'
model.y='y'
%your pid controller
r=pid(5,1/0.05,10)
r.u='e'
r.y='u'
%adding a reference r with som2=r-y
som1 = sumblk('e = r - y');
%global model with all conneection
modelg=connect(som1,r,model,'r','y')
%simulation
step(modelg)
댓글 수: 27
azan
2012년 10월 11일
Sir its giving error at model y='y' and the statement of error is 'Invalid property name y'
azan
2012년 10월 11일
first code didn't work,however your code is running but I am not sure of the value P
Azzi Abdelmalek
2012년 10월 11일
p is the disturbance signal added to your output, you can set it to zero
azan
2012년 10월 11일
And sir I have to give input from my sensor and compare it with my reference value.Sir I need to know where that input value will be in this code.
Azzi Abdelmalek
2012년 10월 11일
why are 'nt you using simulink? how are you connecting your sensor to your computer and matlab?
azan
2012년 10월 11일
Sorry sir I couldn't get this what do you mean by clicking model.u and model.y? Now the error is 'Invalid property name "y". Type "help ltiprops" for more information on valid LTI properties.'
Azzi Abdelmalek
2012년 10월 11일
azan have you copied and past my code or what? because I see in your error message , model y (it's no my code) it's model.y (you missed a dote)
azan
2012년 10월 11일
No it was just a typing mistake.I have written model.y Infact I have just copied your code
Azzi Abdelmalek
2012년 10월 11일
I can't explain what is going on, because, whe I run my code it works fine
azan
2012년 10월 13일
Sir code is working now and the issue was I had to write like this model.inputname='u' model.outputname='y'
azan
2012년 10월 13일
Sir can you now tell me where is that input(e.g 6 taken from image processing part) in this code which I have to compare with the reference value
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)