O'Reilly logo

Getting Started with Simulink by Luca Zamboni

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Our first model – a cruise controller

There aren't many things in the world funnier than a sporty car. That's a fact.

Let's imagine we want to develop a simple cruise control system for such a car. This system will perform the following tasks:

  • Read the target vehicle speed [km/h]
  • Read the current vehicle speed [km/h]
  • Command the throttle with the gas pedal [from 0 (not pressed) to 1 (fully pressed)]

This system will behave like a driver that keeps the car going straight using only the gas pedal to match the desired speed.

Let's get started!

Step 1 – create and save the model

After pointing MATLAB to your preferred working folder (for example, a folder called 1386EN_02 located in your home folder) and opening a new model, click on the Save button, or

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required