2015 The MathWorks, Inc. Simulink for System and Algorithm Modeling Introduction to System Modeling
Outline 2-2 Model-Based Design Types of modeling System modeling with Simulink Modeling steps
Model-Based Design with Simulink 2-3
System Design Process 2-4 Define Requirements & Specification System Integration, Test & Calibration Simulink Stateflow Blocksets Subsystem Design Integration and Test Subsystem Implementation
2-5 Types of Modeling First-principles modeling Simulink Finite-state machine Stateflow Physical modeling SimMechanics, SimPowerSystems, SimDriveline System identification Neural networks, system identification
System Modeling with Simulink 2-6 A graphical environment for hierarchical block diagram development Supplied with libraries of basic and compound blocks for general system buildup Supplied with functions that automate model constructions and simulations Extensible for custom feature development and distribution Supports modeling of continuous-time, discrete-time (including single-rate, multirate, and asynchronous) and hybrid systems Supports integration of custom and legacy code
Simulink Environment 2-7 Simulink Library Browser contains basic and add-on blocks. Simulink block diagram editor facilitates the buildup of a model or subsystem block diagram. The Simulink solver engine steps the model in time. The solver engine propagates signals block by block after each update. Simulink manages the interaction between the model and the solver engine during a simulation.
2-8 Simulink Dependency on MATLAB Simulink depends on the MATLAB workspace to define and evaluate model and block parameters. Simulink depends on the MATLAB workspace to define model inputs. Simulink can use the MATLAB workspace to store model outputs for analysis. Simulink can integrate calls to MATLAB operators and functions in models.
Simulink Add-Ons 2-9 Application-specific features via add-on blocksets Complex flow charts and state machine design environment via Stateflow Automatic code generation from models/subsystems via Real-Time Workshop and its add-on targets to support Rapid simulation Rapid prototyping Embedded design testing Automatic generation of model documentation or specifications via Simulink Report Generator
Modeling Steps 2-10 Defining the system. Identifying the system components. Modeling the system with equations. Building a block diagram for the model using Simulink. Simulating the model. Validating the simulation results.
Defining the System 2-11 Electronic throttle control Pedal Cable Throttle Body Pedal Position Sensor Pedal Engine Control Module Throttle Body Servomotor Position Sensor Traditional mechanical linkage throttle control Electronic throttle control (ETC) Throttle by wire
Course Layout 2-12 Chapter 6 Chapter 4 1 Pedal input PI Controller Discrete system Conversion Logic system Chapter 3 Chapter 5 1 out Conversion Algebraic system Throttle Continuous system
2-13 Identifying the System Components What are the input signals? What are the output signals? What are the intermediate signals? What are the parameters? What are the discrete states? What are the continuous states? For the electronic throttle controller you have One input the pedal position One output the throttle angle Two continuous states throttle angular position and velocity One discrete state coming from the discrete integrator in the PI controller A number of intermediate signals and parameters 2006 The MathWorks, Inc.
Overview of a General Dynamic System 2-14 Inputs u(t) DYNAMIC SYSTEM Outputs y(t) Internal state variables x(t) x c ( t) f c ( x, u, t) Continuous Dynamics x k 1 ( t) f d ( x, u, t) Discrete Dynamics y( t) q( x, u, t) Output Equation
Summary 2-15 Model-Based Design Types of modeling System modeling with Simulink Modeling steps