File Exchange

image thumbnail

PID Controller Design and Tuning with MATLAB and Simulink -

version 1.4 (90.5 KB) by Arkadiy Turevskiy
This demo file shows capabilities for PID Controller design and tuning in MATLAB and Simullink.


Updated 15 Mar 2019

View License

This is the demo file for MathWorks webinar "PID Control Made Easy".
The demo shows design and tuning of PID controllers in MATLAB and Simulink.

PID Controller is used to control engine speed.

To see how to tune the PID Controller, please see the webinar and visit the page with resources on PID design and tuning:

Cite As

Arkadiy Turevskiy (2019). PID Controller Design and Tuning with MATLAB and Simulink - (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (12)

Abhijit Das


hi sir.
thank you very much for this complete simulation.
can you send me an article that describe this subject on it.
I tried a lot but I couldn't find any thing.
It's really makes me happy if you send me some articles about this simulation.
this is my email:



The function tf that this script uses is from Control System Toolbox. As the submission description says, you need to have this toolbox in order to run these files.


running the first section of the PID_Intro.m file I have this error:
"Undefined function 'tf' for input arguments of type 'char'"
which ('tf', '-all')
I found plenty of tf.m files, how can have the system focused on the correct one?
Thanks a lot,





In Your webinar You talked about implementing PID on digital microprocessor. What kind of microprocessor should I use if would like to do that? Can you give me few certain models? Thanks for your response


In your webinar you used step function with initial value of 2000 and 2200 as a final value so engine speed went from 2000rpm to 2200rpm. I would like my engine to run at diferent speeds but every time it starts from the 2000. What's the problem?

For more resources on PID control, see:



Updated for R2018b.

Updated license

Added copyright notices.

Updated description

Added a link to PID page:

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux