Borrar filtros
Borrar filtros

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

3 visualizaciones (últimos 30 días)
Sardor Israilov
Sardor Israilov el 21 de Sept. de 2018
Editada: Adam Danz el 21 de Sept. de 2018
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 comentario
Fangjun Jiang
Fangjun Jiang el 21 de Sept. de 2018
non-zero value of what, desired speed, controller output, or current speed?

Iniciar sesión para comentar.

Respuestas (1)

Adam Danz
Adam Danz el 21 de Sept. de 2018
Editada: Adam Danz el 21 de Sept. de 2018
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

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Productos


Versión

R2009b

Community Treasure Hunt

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

Start Hunting!

Translated by