control hystérésis 4 level

function dP=active(x)
err=x(1);hys=x(2);
if err>=hys
dP=2;
elseif (0<err && err<hys)
dP=1;
elseif (-hys<err && err<0)
dP=-1;
elseif err<-hys
dP=-2;
end;
end
i got problem:Not enough input arguments line (2).

4 comentarios

Dyuman Joshi
Dyuman Joshi el 23 de Jul. de 2023
How are you calling the function? What is the input provided?
laiche zeghdi
laiche zeghdi el 23 de Jul. de 2023
input it is Err
Dyuman Joshi
Dyuman Joshi el 23 de Jul. de 2023
Editada: Dyuman Joshi el 23 de Jul. de 2023
Are you working with a Simulink model?
Or are you just running the code you posted?
laiche zeghdi
laiche zeghdi el 23 de Jul. de 2023
I use simulink model. I use simulink DPC with NPC 3level (control error power direct with hystirsis 4 level )

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Modeling en Centro de ayuda y File Exchange.

Preguntada:

el 23 de Jul. de 2023

Comentada:

el 23 de Jul. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by