how to write PID function in .m file
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
sujan
el 14 de Mayo de 2012
Comentada: Sam Chak
el 11 de Mayo de 2023
i need a pid function in my m file. could anyone please write the function.
2 comentarios
PUJARI MURAGA
el 1 de Dic. de 2016
You are having state space model. Suppose I have differential equations then is it possible to do without converting them in state space/laplace ?
Respuesta aceptada
Arkadiy Turevskiy
el 14 de Mayo de 2012
Editada: Arkadiy Turevskiy
el 27 de Oct. de 2014
This demo might help.
Arkadiy
2 comentarios
Arkadiy Turevskiy
el 17 de Mayo de 2012
well, how many inputs and outputs does you system have? If is a single-input-single output system, then everything shown in the demo is still applicable.If you more comfortable dealing with transfer functions, convert your state space system to a transfer function using tf:
ss_sys=ss(a,b,c,d);
tf_sys=tf(ss_sys);
Más respuestas (2)
Krishnendu Mukherjee
el 14 de Mayo de 2012
a way is there : suppose ur tf is (1/a+s) which is to be fed to a pid controler. then the overall tf will be: (Kp+Ki/S+Kd.S).(i/S+a)/(1+(Kp+Ki/S+Kd.S).(i/S+a)). now if you want to give step input then : num=[............] den=[............] tf=num/den ster(tf) so you have to transfer the PID and the tf to a overall transfer function.
Daniel
el 24 de Oct. de 2014
Please where's the demo? I'm also trying to write a matlab function for pid using the user-defined function block
3 comentarios
Ver también
Categorías
Más información sobre Gain Scheduling en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!