Building PID without transfer functions

21 views (last 30 days)
Tan Edwin
Tan Edwin on 23 Feb 2011
Is it possible for me to build a PID without transfer function in Simulink interface?
Let say i have a temperature output (bell shaped) which i want to keep constant. Is it possible to directly use this output for my PID control?

Answers (2)

Davide Ferraro
Davide Ferraro on 23 Feb 2011
You can also create your PID (discrete) block on your own based on the difference equations.
y(k) = yp(k) + yi(k) + yd(k)
yp(k) = Kp e(k)
yi(k) = yi(k-1) + Ki Ts e(k)
yd(k) = Kd / Ts (e(k) - e(k-1))
To model the delays of your error (in your case the difference by actual temperature and the set one) by usit the Unit Delay block in the Simulink library. If your goal is to learn how a PID controller works I would suggest you to try approaching the implementation from equations and then validate your results with our own block that was suggested by Rong.

Rong
Rong on 23 Feb 2011
Starting with Release 2009b, PID Controller blocks (in both continuous time and discrete time) are available in Simulink. You can set PID gains directly in these blocks. The blocks also provide advanced features such as anti-windup and tracking. If you also have license of Simulink Control Design, you can click the "Design..." button in the PID block dialog and it launches a PID Tuner that helps you tune the PID gains based on the linearized plant model.
  1 Comment
Tan Edwin
Tan Edwin on 24 Feb 2011
Ive tried the auto-tuning but it only gave me a value in integral value and the rest is 0.
If i try to add something on the P side, it gave a better performance.
So how do i get the optimum control?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!