I don't seem to understand how the pid function of matlab works without receiving an errorin input.
1 view (last 30 days)
Show older comments
with the error e(t) defined as r(t) - y(t), we know that a PID controller is defined in the following manner : u(t) = Kp x e(t) + Kd x derivative of e(t) + Ki x Integral of e(t).
Matlab documentation states : "C = pid(Kp,Ki,Kd,Tf) creates a continuous-time PID controller with proportional, integral, and derivative gains Kp, Ki, and Kd and first-order derivative filter time constant Tf:"
C=Kp+Kis+Kds/(Tfs+1).
I dont seem to understand where the error comes into play with the pid function I quoted above. I am trying to create a pid controller for reference tracking, in order words I want a controller to make the error converge to zero and make tend y(t) tend to r(t) through the the control input. I have searched a lot but found nothing useful. The last time I did such, I did it through simulink and I had no problems placing the blocks logically to get the pid in function of the error.
A good explanation would be very useful thank you !
3 Comments
Answers (0)
See Also
Categories
Find more on PID Controller Tuning in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!