필터 지우기
필터 지우기

speed regulation loop; how to start from non zero value?

조회 수: 3 (최근 30일)
Sardor Israilov
Sardor Israilov 2018년 9월 21일
편집: Adam Danz 2018년 9월 21일
I have a speed regulation loop with the PID and a transfer function. I generated the profile speed input from the "signal builder" and I need to start the loop from the non-zero value. How can I accomplish it?
  댓글 수: 1
Fangjun Jiang
Fangjun Jiang 2018년 9월 21일
non-zero value of what, desired speed, controller output, or current speed?

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

답변 (1개)

Adam Danz
Adam Danz 2018년 9월 21일
편집: Adam Danz 2018년 9월 21일
The question is vague but I think this is what you're looking for.
values = [-10 : 10]; %Here are the negative and positive values you need in the loop
myVariable = nan(size(values)); %allocate loop variable
for i = 1:length(values) %Loop through each value of 'values'
myVariable = doSomething(values(i)); % Here is your code that references 'values'
end

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

제품


릴리스

R2009b

Community Treasure Hunt

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

Start Hunting!

Translated by