万本电子书0元读

万本电子书0元读

顶部广告

Getting started with Simulink电子书

售       价:¥

16人正在读 | 0人评论 6.2

作       者:Luca Zamboni

出  版  社:Packt Publishing

出版时间:2013-10-25

字       数:122.6万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
This practical and easy-to-understand learning tutorial is one big exciting exercise for students and engineers that are always short on their schedules and want to regain some lost time with the help of Simulink.This book is aimed at students and engineers who need a quick start with Simulink. Though it's not required in order to understand how Simulink works, knowledge of physics will help the reader to understand the exercises described.
目录展开

Getting Started with Simulink

Table of Contents

Getting Started with Simulink

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers and more

Why Subscribe?

Free Access for Packt account holders

Instant Updates on New Packt Books

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Simulink Facts

What is Simulink?

Programming

Graphical

Problems solved by Simulink

Software specification

Software development

Software testing

Simulink drawbacks

Where Simulink excels

Summary

2. Creating a Model

The MATLAB environment

Command Window – how MATLAB talks to us

The workspace – our treasury chest

The working folder – where MATLAB saves our work

The path – where MATLAB finds the tools

The Simulink interface

Our first model – a cruise controller

Step 1 – create and save the model

Step 2 – do comment the code!

Step 3 – open Simulink Library Browser

Step 4 – add blocks to the model from Library Browser

Step 5 – rename the blocks

Step 6 – implement the algorithm

Step 7 – nest the logic into subsystems

Step 8 – declare workspace variables

Step 9 – do a first simulation

Our second model – the Alfa Romeo 147 GTA

Getting the speed – Newton's laws

The aerodynamic drag equation

The rolling resistance approximation

The engine force – engine, wheels, and transmission

Gearbox and differential

Wheel to RPM

Engine

Torque to force

The finishing touches

Summary

3. Simulating a Model

The mandatory theory

The simulation times – when the math is done

The solvers – these great unknown

Variable-step versus fixed-step solvers

Continuous versus discrete

Stiff versus nonstiff

Build the complete closed-loop system

Configuring the simulation

Simulation times

Solvers

Run our first serious simulation

Calibrate the PI controller

Calibrating Kp

Calibrating Ki

Test with other sources

Sine Wave

Ramp

Signal Builder

Summary

4. Using the Model

The external software – a Qt5 application

The Swiss army knife – S-functions

The simulation phases

Level 2 MATLAB S-function callbacks

The mandatory callbacks

The most useful optional callbacks

The work vector – DWork

MATLAB S-functions – file source and sink blocks

The filesink_msfun block

The MATLAB code

The filesource_msfun block

The MATLAB code

A quick test

Simulink and the real world

Forcing Simulink to sync

Preparing the cruise controller model

Running the simulation on the target application

Going further – C MEX S-functions

Setting up the mex tool

UNIX-like systems (GNU/Linux in particular)

Microsoft Windows systems

How C MEX S-functions work

The required callbacks

mdlInitializeSizes

mdlInitializeSampleTimes

mdlOutputs

mdlTerminate

The most useful optional callbacks

mdlStart

mdlInitializeConditions

mdlUpdate

The DWork vector

The elementary work vectors

The filesource S-function

The beginning – headers and includes

Block properties and memory usage – mdlInitializeSizes

Timings – mdlInitializeSampleTimes

Initial tasks – mdlStart

Core logic – mdlOutputs

Update memories – mdlUpdate

Cleanup – mdlTerminate

The happy ending

Compiling the S-function

Exercise – the filesink S-function

A quick test

Go for another ride

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部