Why a manually made PID controller in Simulink will show a different value when compared to the default PID controller Simulink black with both having the same Kp,Ki and Kd?

9 visualizaciones (últimos 30 días)
So I wanted to implement a manually PID controller with Ki,Kp,and Kp which are made using elementary Simulink Blocks. I attached this PID controller in a forward fashion with feedback for a 2nd order system. I had a similar system but I used the default PID controller and I used the tune feature to automatically obtain my Kp Kd and Ki values. I then used these automatically tuned Ki Kd and Kp values and inputted them into my manually created PID controller and I obtained two different graphs. Is there a reason why? My manually created PID had a transient response plot that was slower in response in comparison to my default PID controller in Simulink. I have no idea as to why this is occurring. Is there a reason why?.

Respuesta aceptada

Sam Chak
Sam Chak el 8 de Oct. de 2022
Editada: Sam Chak el 8 de Oct. de 2022
Hi @Ian
It's because the PID block in Simulink implements a PID controller in this form:
where a first-order transfer function filters the derivative action.
The continuous-time PID Formula is given by
where .
If you manually construct the PID action with the pure derivative term
using the Derivative block where the derivative term is approximated using the numerical difference method, then it is obvious that both will give different responses. It is important to note that the pure derivative term exists in math only and it cannot be physically realizable.
Even if the Derivative block is used, it is, in fact, just an approximation. Moreover, when there is an abrupt change in the setpoint, it would cause a sudden spike in the output of the controller. To circumvent this issue, the first-order filter is introduced:
.
% ---------------------------------
Reading your description the second time, if your 2nd-order system is linear, and it is assumed that the derivative state can be measured and noise-free, then you can still implement the manually designed PID controller using the rate feedback approach. The second output port 'dx' can be connected to the Gain block on the feedback loop.
The response should give the same result as predicted by the closed-loop transfer function that uses the pure PID form:
  2 comentarios
Ian
Ian el 10 de Oct. de 2022
Thank you so much!. Sorry for the late reply. You've helped me tremendously!. I can see the why now.
Sam Chak
Sam Chak el 11 de Oct. de 2022
You are welcome, @Ian. If you find the explanation is helpful, please consider accepting ✔ and voting 👍 the Answer. Thanks!

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by