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 external software – a Qt5 application


The application is shipped with the code bundle provided with this chapter. It's located in the external_app folder (in code bundle), containing:

  • The 64-bit Linux executable (external_app/Linux/alfa147gta_linux64), which needs the Qt5 libraries to be installed in the system (the package is usually called qt5) and must be marked as executable (by typing chmod +x alfa147gta_linux64 in the terminal)

  • The 32-bit Windows executable (external_app\Windows\alfa147gta_win32.exe) built using MinGW; the needed libraries (the .dll files) are located in the same folder to avoid you the hassle of installing Qt5 on Windows

  • The source code (external_app/source/alfa147gta, distributed under the GPL license), made using Qt Creator

Move the application (and every .dll file, if you're on Windows) to the folder we'll use as the MATLAB working folder, and run it by double-clicking on the icon.

You should see the following window:

The application works by reading and writing...