Book Image

Getting Started with Simulink

By : Luca Zamboni
Book Image

Getting Started with Simulink

By: Luca Zamboni

Overview of this book

Simulink is an engineer's Swiss army knife: instead of spending the day typing out complex formulas, Simulink enables you to both draw and execute them. Block after block, you can develop your ideas without struggling with obscure programming languages and you don't have to wait to debug your algorithm - just launch a simulation! Getting Started with Simulink will give you comprehensive knowledge of Simulink's capabilities. From the humble constant block to the S-function block, you will have a clear understanding of what modelling really means, without feeling that something has been left out. By the time you close the book, you'll be able to further extend your modelling skills without any help. We''ll start with a brief introduction, and immediately start placing the first blocks. Little by little, you'll build a car cruise controller model, followed by the mathematical model of a sports car in order to calibrate it. Then you'll learn how to interface your Simulink model with the external world. This book will give you an easy understanding of the tools Simulink offers you, guiding you through a complex exercise split into the three main phases of Simulink development: modelling, testing, and interfacing.
Table of Contents (11 chapters)

The MATLAB environment


Simulink is not a standalone tool, but lies on MATLAB's shoulders; it's almost impossible to use Simulink without keeping an eye on MATLAB's main window, not to mention that you need to start MATLAB before even opening a model.

Simulink inherits from MATLAB the current working folder, the workspace, and the path and uses MATLAB's Command Window to report errors, warnings, and notes.

The first time you open MATLAB, you should see the default main window view with the following sections:

  • The Workspace panel and the Command History panel on the right

  • The Command Window panel in the middle

  • The Current Folder panel with the folder contents on the left.

  • The current path is displayed above the three

An example is shown in the following screenshot:

Command Window – how MATLAB talks to us

The Command Window panel is the place where Simulink will report most of the errors, warnings, and information—always keep an eye on it while debugging a model!

The Command Window panel also allows...