View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
PID Controller Design and Tuning with MATLAB and Simulink - Engine Control

4.7 | 7 ratings Rate this file 32 Downloads (last 30 days) File Size: 63.3 KB File ID: #28713 Version:
image thumbnail

PID Controller Design and Tuning with MATLAB and Simulink - Engine Control



14 Sep 2010 (Updated )

This demo file shows capabilities for PID Controller design and tuning in MATLAB and Simullink.

| Watch this File

File Information

This is the demo file for MathWorks webinar "PID Control Made Easy" from September 201-
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:

Required Products Control System Toolbox
Simulink Control Design
MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (12)
10 Feb 2016 TJK

TJK (view profile)

09 Jan 2016 Rahime Monsef

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:

15 Jun 2013 Tanmay

Tanmay (view profile)

18 Mar 2013 Arkadiy Turevskiy


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.

Comment only
03 Mar 2013 Stefano

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,

03 Mar 2013 Stefano

10 Sep 2012 muhammad

20 Dec 2011 ehs

ehs (view profile)

25 Aug 2011 clipix68

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

Comment only
20 Jun 2011 Arkadiy Turevskiy

The reason engine starts at 2,000 rpm is that the model's initial condition is set this way. To start at a different speed, the model initial condition has to be set appropriately. This inclused two states in the plant and the integrator in the PID controller.

Take a look at this video for how to trim the model at a desired speed:

In the linearization GUI, specify output to be at the speed you want, keep states at steady state.

Get the resulting state values and the input value. Initialize your states and PID integrator accordingly.


Comment only
19 Jun 2011 clipix68

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?

Comment only
27 Apr 2011 Denise Tarbox

For more resources on PID control, see:

Comment only
26 Apr 2011 1.1

Added a link to PID page:

29 Mar 2013 1.2

Updated description

29 Mar 2013 1.3

Added copyright notices.

01 Sep 2016

Updated license

Contact us