Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Getting Started with Simulink

You're reading from  Getting Started with Simulink

Product type Book
Published in Oct 2013
Publisher Packt
ISBN-13 9781782171386
Pages 132 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Luca Zamboni Luca Zamboni
Profile icon Luca Zamboni

Build the complete closed-loop system


So far we've got two models: a simple cruise controller and a beautiful car. Until now, they've been treated separately in an open loop. Remembering what we learned in the previous chapter, we're going to place the required blocks and connect them in a closed loop.

Let's open both the models and copy them to a new model named cruise_control_sim.slx. If their workspaces aren't loaded automatically, load them by dragging them from their folders to the MATLAB's Command Window and save the new workspace as cruise_control_sim.mat. It's suggested to have the new workspace loaded automatically via the PreLoadFcn model callback as we have learned in the previous chapter.

In order to see what's happening inside the engine, let's pull out the Gear and RPM signals from Alfa Romeo 147 GTA | Engine force | Gearbox and differential until we reach the root block, by adding and connecting the output ports to every parent subsystem.

Then we need to make the important connections...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}