You are on page 1of 6

2017-5-27 Control Tutorials for MATLAB and Simulink - Cruise Control: Simulink Modeling

Tips Effects SearchControlTutorials


TIPS ABOUT BASICS HARDWARE INDEX NEXT

INTRODUCTION CRUISECONTROL MOTORSPEED

SYSTEM

MODELING CruiseControl:SimulinkModeling
ANALYSIS

Contents
CONTROL
Physicalsetupandsystemequations
PID
Buildingthemodel
ROOTLOCUS
Openloopresponse

FREQUENCY

Physicalsetupandsystemequations
STATESPACE

DIGITAL Themodelofthecruisecontrolsystemisrelativelysimple.Ifitisassumed

thatrollingresistanceandairdragareproportionaltothecar'sspeed,then

the problem is reduced to the simple mass and damper system shown
SIMULINK
below.

MODELING

CONTROL

UsingNewton's2ndlaw,thegoverningequationforthissystembecomes:

(1)

where u is the force generated between the road/tire interface and can be

controlleddirectly.Forthisexample,let'sassumethat

m = 1000 kg
b = 50 N.sec/m

u = 500 N

Buildingthemodel

http://ctms.engin.umich.edu/CTMS/index.php?example=CruiseControl&section=SimulinkModeling 1/6
2017-5-27 Control Tutorials for MATLAB and Simulink - Cruise Control: Simulink Modeling

Thissystemwillbemodeledbysummingtheforcesactingonthemassand

integratingtheaccelerationtogivethevelocity.OpenSimulinkandopena
newmodelwindow.First,wewillmodeltheintegralofacceleration.

(2)

Insert an IntegratorBlock(fromtheContinuous library) and draw lines

toandfromitsinputandoutputterminals.

Label the input line "vdot" and the output line "v" as shown below. To
addsuchalabel,doubleclickintheemptyspacejustabovetheline.

Since the acceleration (dv/dt) is equal to the sum of the forces divided by
mass,wewilldividetheincomingsignalbythemass.

InsertaGainblock(fromtheMathOperationslibrary)connectedtothe
Integrator block input line and draw a line leading to the input of the

Gainblock.

Edit the Gain block by doubleclicking on it and change its value to


"1/m".

Change the label of the Gain block to "inertia" by clicking on the word
"Gain"underneaththeblock.

http://ctms.engin.umich.edu/CTMS/index.php?example=CruiseControl&section=SimulinkModeling 2/6
2017-5-27 Control Tutorials for MATLAB and Simulink - Cruise Control: Simulink Modeling

Now,wewilladdintheforceswhicharerepresentedinEquation(1).First,
wewilladdinthedampingforce.

Attach a Sum block (from the Math Operations library) to the line
leadingtotheinertiaGainblock.

ChangethesignsoftheSumblockto"+".

InsertaGainblockbelowtheInertiablock,selectitbysingleclickingon
it,andselectFlipfromtheFormatmenu(ortypeCtrlF)toflipitleftto

right.

Settheblock'svalueto"b"andrenamethisblockto"damping".

Tapaline(holdCtrlwhiledrawing)offtheIntegratorblock'soutputand

connectittotheinputofthedampingGainblock.

DrawalinefromthedampingGainblockoutputtothenegativeinputof
theSumBlock.

http://ctms.engin.umich.edu/CTMS/index.php?example=CruiseControl&section=SimulinkModeling 3/6
2017-5-27 Control Tutorials for MATLAB and Simulink - Cruise Control: Simulink Modeling

Thesecondforceactingonthemassisthecontrolinput,u.Wewillapplya
stepinput.

InsertaStepblock(fromtheSourceslibrary)andconnectitwithaline
tothepositiveinputoftheSumBlock.

Toviewtheoutputvelocity,insertaScopeblock(fromtheSinkslibrary)
connectedtotheoutputoftheIntegrator.

Toprovideanappropriatestepinputof500attimeequalzero,double
clicktheStepblockandsettheStepTimeto"0"andtheFinalValueto

"u".

http://ctms.engin.umich.edu/CTMS/index.php?example=CruiseControl&section=SimulinkModeling 4/6
2017-5-27 Control Tutorials for MATLAB and Simulink - Cruise Control: Simulink Modeling

Youcandownloadamodelfileforthecompletesystemhere,ccmodel.mdl.

Openloopresponse

Tosimulatethissystem,first,anappropriatesimulationtimemustbeset.

Select Parameters from the Simulation menu and enter "120" in the
Stop Time field. 120 seconds is long enough to view the openloop
response.

Thephysicalparametersmustnowbeset.Runthefollowingcommandsat

theMATLABprompt:

m = 1000;

b = 50;
u = 500;

Run the simulation (hit CtrlT or select Start from the Simulation menu).

When the simulation is finished, doubleclick on the Scope and hit its
autoscalebutton.Youshouldseethefollowingoutput.

http://ctms.engin.umich.edu/CTMS/index.php?example=CruiseControl&section=SimulinkModeling 5/6
2017-5-27 Control Tutorials for MATLAB and Simulink - Cruise Control: Simulink Modeling

Observing the above, we would like to improve the response of the cruise

control system. The model created here will be employed for controller

design and analysis within Simulink in the Cruise Control: Simulink


ControllerDesignpage.

PublishedwithMATLAB7.14

AllcontentslicensedunderaCreativeCommonsAttributionShareAlike4.0
InternationalLicense.

http://ctms.engin.umich.edu/CTMS/index.php?example=CruiseControl&section=SimulinkModeling 6/6

You might also like