MATLAB and Simulink In-Depth: Model-based Design with Simulink and Stateflow, User Interface, Scripting, Simulation, Visualization and Debugging
- Length: 602 pages
- Edition: 1
- Language: English
- Publisher: BPB Publications
- Publication Date: 2022-08-17
- ISBN-10: 935551199X
- ISBN-13: 9789355511997
- Sales Rank: #860758 (See Top 100 Books)
Model-based Development: Beginner’s Approach
Key Features
- Includes numerous practical examples and troubleshooting hints on using Simulink
- An extensive development guide on MATLAB, Simulink, and Stateflow principles.
- Effective instructions for passing MATLAB modeling interviews and examinations
Description
MATLAB and Simulink In-Depth’ is a thorough introduction to MATLAB, Simulink, and Stateflow principles. It establishes a solid foundation for methodologies commonly employed in model-based development. The book demonstrates how readers can perform algorithm construction and assessment faster than ever. The book covers most contemporary issues with real-world examples.
The book begins with MATLAB experience by configuring the system environment. Then, it will help readers to get acquainted with MATLAB’s history and key features. The book helps in getting familiar with the desktop user interface and fundamental instructions of MATLAB, as well as data visualization. It helps to investigate Simulink’s core features, configuration settings, and libraries. It explains the step-by-step process to design and simulate a basic Simulink model. It also helps to investigate advanced modeling techniques, including custom libraries, model referencing, and subsystems. In addition, the book explains the construction of test environments and model simulation. It explores Stateflow topics such as flow graphs, hierarchical models, conditions, actions, and transitions.
What you will learn
- Work with MATLAB syntax, commands, functions, and libraries and with the user interface and visualization.
- Create fundamental models, configure model parameters, and utilize libraries.
- Perform model referencing, simulation, visualization and debugging with Simulink.
- Familiarize yourself with Stateflow, flow graph, Statechart, truth table, including states, actions, transitions and junctions.
- Implement the hierarchical state model, perform event-based execution, parsing, and debugging operations.
Who this book is for
This book has been prepared keeping in mind the needs of students, teachers, researchers, professionals as well as technology enthusiasts. This book has been written primarily for beginners to help them realize the essential principles and capabilities of MATLAB, Simulink, and Stateflow. After reading this book, the reader will have a solid foundation of Model-based design and Simulation. Having basic programming skills will make the learning process more efficient and fun.
Cover Page Title Page Copyright Page Dedication Page About the Authors About the Reviewer Acknowledgement Preface Errata Table of Contents Section I: MATLAB 1. Introduction to MATLAB Introduction Structure Objectives History and origin The inception of classic MATLAB First version development From classic to commercial MATLAB MathWorks and PC-MATLAB debut Different MATLAB versions Applications and key users of MATLAB MATLAB products and toolboxes in brief Products for model-based design, development, and validation Simulink Stateflow AUTOSAR blockset Fixed-point designer Embedded coder Simulink coverage Popular MATLAB toolboxes MATLAB modeling vs. traditional programming approach Advantages Challenges System requirements MATLAB installation License options Installation procedure Steps to get the installer Steps to install the products on Windows OS Steps to activate the products Online activation Offline activation Important links Conclusion Points to remember Multiple choice questions Questions Answers 2. MATLAB Desktop Interface Introduction Structure Objectives MATLAB desktop Panels Command Window panel Current folder browser panel Details panel Command history panel Editor Live editor Workspace browser panel and variables editor Toolbars Toolstrip Home tab Plots tab Apps tab Editor tab Live Editor tab View tab Quick access toolbar Current folder browser toolbar Workspace browser The concept of workspace Access variables using command window Create variable Delete variable Modify variable Access variables using workspace browser Create variable Delete variable Modify variable Modify variable using open selection Workspace durability MATLAB search path setting Important links Conclusion Points to remember Multiple choice questions Questions Answers 3. MATLAB Basics Introduction Structure Objectives Command window shortcuts Variables Variable naming convention Variables classification Classification based on types or classes Strings and character arrays Classification based on sizes Matrices and operators Matrix concatenation Built-in functions and commands Environment commands System commands Session commands Help commands Vectors, matrices, and arrays functions Create array functions Combine array functions Grid functions Array size, shape, order functions Array reshape, resize functions Linear algebra matrix functions String and character array functions Type and properties functions Find, replace and remove functions Operators Arithmetic operations Rounding and division operations Relational operations Logical operations Operator precedence Important links Conclusion Points to remember Multiple choice questions Questions Answers 4. Programming Basics, Control Flow and Visualization Introduction Structure Objectives Scripts and functions Scripts Functions Debug MATLAB program Live scripts Control programming flow “if”, “else”, and “elseif” statements “switch”, “case”, and “otherwise” statements “try” and “catch” statements “for” loop while loop “break”, “continue” and “return” statements Visualization Plots Functions method Images Conclusion Points to remember Multiple choice questions Questions Answers Section II: Simulink 5. Introduction to Simulink Introduction Structure Objectives Simulink overview Highlights of Simulink Simulation and modeling Verification, validation, and testing Automatic code generation Types of mathematical models Linear models Nonlinear models Static models Dynamic models Explicit models Implicit models Discrete models Continuous models Deterministic models Stochastic (random) models Traditional system design vs. model-based design Traditional system design Traditional design workflow Model-based design Advantages of model-based design Model-based design workflow Model-based design process steps Derive the system requirements Define the system Design the system architecture Define the Simulink model behavior Simulate and verify model results Generate production code automatically Verification and validation Model-based simulation methods Getting started with modeling Create a simple Simulink model Start Simulink Open Simulink Editor Open Simulink Library browser Add blocks to model Configure the block parameters Connect the blocks Define model configuration parameters Run Simulation Conclusion Points to remember Multiple choice questions Questions Answers 6. Simulink Editor with Environment Introduction Structure Objective Introducing Simulink Editor Toolstrip Simulation Modeling Format Debug Model example: PID controller Signal loading, visualization, and logging techniques Signal loading techniques Using Simple Source blocks Using Dashboard blocks Using From Workspace block Using From File block Using From Spreadsheet block Using Signal Editor Using Root Inport mapper Signal visualization and logging techniques Using scope Using To Workspace block Using To File block Using Signal logging Using Simulation Data Inspector Using Dashboard blocks Using Outport Simulink modeling shortcuts Conclusion Points to remember Multiple choice questions Questions Answers 7. Library Browser Overview Introduction Structure Objectives Simulink Library Browser Sources Model and subsystem inputs Sinks Model and subsystem outputs Data viewers Simulation control Math operations Sum, add, subtract, and the sum of elements Gain, slider gain Product, divide, a product of elements, and dot product Logic and bit operations Continuous Integrators PID controllers Delays Discrete Discrete-time integrator example Delay block example Signal routing Ports and subsystems Lookup tables 1-D Lookup Table Conclusion Points to remember Multiple choice questions Questions Answers 8. Configuration Parameter Settings Introduction Structure Objectives Introducing model configuration parameters Solver settings Simulation time Solver selection Type Solver details Variable type and its parameter set Variable step Solver Max step size Min step size Advanced settings Example to realize the difference between Fixed step solver and Variable step Solver Data Import/Export Load from workspace Save to workspace or file Simulation data inspector Additional parameters Advanced parameters Dataset signal format Math and data types Math Data types Advanced parameters Diagnostics Solver Algebraic loop Minimize algebraic loop Block priority violation Min step size violation Consecutive zero-crossing violation Automatic solver parameter selection Extraneous discrete derivative signals State name clash Operating point interface checksum mismatch Advanced parameters Sample Time pane Data validity pane Signals sub-pane Parameters sub-pane Advanced parameter sub-pane Type Conversion pane Connectivity pane Compatibility pane Diagnostic model referencing pane Diagnostic Stateflow pane Hardware implementation pane Model referencing pane Simulation Target pane Conclusion Points to remember Multiple choice questions Questions Answers 9. Advanced Modeling Techniques-I Introduction Structure Objectives Basics of custom library creation Creating Simulink logic Creating Simulink library Library link Creating custom libraries with mask options Creating library mask Mask editor options Icon & Ports Parameters & Dialog Initialization Documentation Model callbacks Block callbacks Conclusion Points to remember Multiple choice questions Questions Answers 10. Advanced Modeling Techniques-II Introduction Structure Objectives Subsystem The execution order of the blocks Virtual subsystems Non-virtual subsystems Conditionally executable subsystems Model referencing Variant subsystem Variant model Model referencing pane Signal bus Virtual signal bus Non-virtual signal bus Signal conversion block Hardware implementation pane Conclusion Points to remember Multiple choice questions Questions Answers Section III: Stateflow 11. Getting Started with Stateflow Introduction Structure Objectives Introducing Stateflow Key features of Stateflow Designing control logic Chart execution and debugging Developing reusable logic with Stateflow Validation and code generation Stateflow Editor Title bar Drawing area Object palette Model browser Explorer bar Status bar Toolstrip Simulation Modeling Debug Format Symbols pane Property inspector Chart properties Data properties Model Explorer Stateflow diagnostics parameters Conclusion Points to remember Multiple choice questions Questions Answers 12. Flow Graph Introduction Structure Objectives Overview of a flow graph Example: simple if-else condition Implementation Data definition Simulation Transitions Transition label notation Default transition Patterns Add predefined pattern Add decision pattern Add loop pattern Add switch pattern Save as pattern Add custom pattern Graphical function Conclusion Points to remember Multiple choice questions Questions Answers 13. Statechart and Hierarchical State Model Introduction Structure Objectives Overview Chart Example: State transition diagram State State labels State name State actions Example: Vehicle exterior light control State hierarchy Example: Tax calculator Example: Vehicle exterior light control with state hierarchy State decomposition OR (exclusive) decomposition AND (parallel) decomposition Example: Water dispenser Transitions State transition Example: state transition Default transition Self-loop transition Inner transition Example: inner transition Supertransition Example: supertransition Junctions Connective junction History junction Example: history junction Group and subchart Group state Subchart Conclusion Points to remember Multiple choice questions Questions Answers 14. Event-Based Execution Introduction Structure Objectives Events Implicit events Explicit events Temporal logic Stateflow functions or graphical functions Simulink function MATLAB function Truth table Simulink state Calling external “C” function from statechart Conclusion Points to remember Multiple choice questions Questions Answers 15. Stateflow Parsing and Debugging Introduction Structure Objectives Stateflow parsing Update Chart Live Parsing Debugging options in Stateflow Breakpoints Breakpoint on transition when transition condition is valid Breakpoint on transition when transition condition is tested Breakpoint on state Stateflow animation Data display Conclusion Points to remember Multiple choice questions Questions Answers Index
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.