Reviews & Opinions
Independent and trusted. Read before buy Matlab Simulink!

Matlab Simulink

 

 

Matlab SimulinkBasic MATLAB, Simulink, and Stateflow [Book]

By Richard Dean Colgren - American Institute of Aeronautics and Astronautics (2007) - Hardback - 485 pages - ISBN 1563478382

Taking a practical, hands-on approach to programming in MATLAB and modeling in Simulink and Stateflow for aerospace and other engineering applications, this package includes an instructors guide with CD-ROM, complete PowerPoint classroom presentation materials, homework problems, and a solutions manual.
[ Report abuse or wrong photo | Share your Matlab Simulink photo ]

Manual

Download (English)

Matlab Simulink

 

 

Video review

Simulink / Matlab Video Tutorial and Example Low Pass Filter Bode Plots ( ...

 

User reviews and opinions

<== Click here to post a new opinion, comment, review, etc.

No opinions have been provided. Be the first and add a new opinion/review.

 

Documents

doc0

From UML/SysML to Matlab/Simulink: Current State and Future Perspectives
Yves Vanderperren, Wim Dehaene EE Dept., ESAT-MICAS, Katholieke Universiteit Leuven, B-3001 Leuven, Belgium 1. Motivation
Several recent EDA surveys [1-2] confirm that The Mathworks Matlab/Simulink and the Unified Modelling Language (UML) are both gaining increased attention as Electronic System Level (ESL) languages. While Matlab is commonly used to model signal processing intensive systems, UML has the potential to support innovative ESL methodologies which tie the architecture, design and verification aspects in a unified perspective. Integrated design flows which exploit the benefits of the complementarity between UML and Matlab provide an interesting answer to the issues of mono-disciplinary modeling and the necessity of moving beyond point-tool solutions [3]. This paper summarizes how UML and Matlab/Simulink can be associated and what is the impact of SysML, a new modeling language based on UML to describe complex heterogeneous systems. tools provide a unified representation of the system at model level on top of at code level. The Simulink subsystem appears in Constellation as a component which can be opened in Matlab, whereas a UML representation of the Simulink subsystem is available in GeneralStore, based on precise bidirectional transformation rules. The co-simulation approach requires special attention to the synchronization aspect, but allows better support for the most recent advances in UML 2.0, the SoC profile and SysML, by relying on the latest UML CASE tools. On the other hand, specific development frameworks which ease the creation of a C++ executable model from UML and Matlab/Simulink allow faster simulation speed.

3. SysML

The Systems Modeling Language [6] is intended to unify the various modeling languages used by systems engineers. Several similarities exist between the methods applied in the area of Systems Engineering and complex embedded systems design [7]. SysML extends the application of UML to systems which are not purely software based, and can in particular be applied to design heterogeneous embedded systems. As an example, it provides support for the representation of continuous behavior and flow rates. SysML also introduces a requirement diagram to structure the requirements and link these to the system architecture and test procedures. However, it is essential to remember that a sound development process which suits the peculiarities of embedded system design is necessary to complement the use of UML/SysML, Matlab/Simulink, and coupling tools.
2. UML and Matlab/Simulink
Two different approaches allow coupling UML and Matlab/Simulink models: co-simulation, and integration based on a common underlying executable language. In case of co-simulation, the Simulink and the UML simulations communicate via an intermediate coupling tool. Ensuring a consistent notion of time is crucial to guarantee proper synchronization between the UML tool and Simulink. Both simulations exchange signals and run concurrently in the case of duplex synchronization, while they run alternatively in the sequential case. The former solution increases the simulation speed, whereas the time precision of the exchanged signals is higher in the latter case. As an example, the co-simulation approach is implemented in the Exite tool from Extessy AG, which allows coupling a.o. a Simulink model with ARTiSAN Software Real-Time Studio or I-Logix Rhapsody. A similar simulation platform is proposed in [4] for IBM Rational Rose RealTime. The alternative approach is to resort to a common execution language. In absence of support for Matlab code generation from UML, the classical solution is to generate C/C++ code from Matlab, using Matlab Compiler or RealTime Workshop, and link it to a C++ implementation of the UML model. This solution is adopted, for instance, in the Constellation framework from Real-Time Innovation and in the GeneralStore integration platform [5]. Both

4. References

[1] Electronics Weekly & Celoxica, "Survey of System Design Trends 2005", http://www.celoxica.com, 2005. [2] "ESL Now survey", http://www.esl-now.com, 2005. [3] Deutsche Bank F.I.T.T., "EDA Survey Results", 2005. [4] J. Hooman et al., "Coupling Simulink and UML Models", Proc. Symposium FORMS/FORMATS, 2004. [5] C. Reichmann et al., "Model Level Coupling of Heterogeneous Embedded Systems", Proc. 2nd RTAS Workshop on Model-Driven Embedded Systems, 2004. [6] OMG Systems Engineering Domain Special Interest Group, http://syseng.omg.org/SysML.htm. [7] Y. Vanderperren, W. Dehaene, "SysML and Systems Engineering Applied to UML-Based SoC Design", Proc. 2nd UML for SoC Design Workshop, 42nd DAC, 2005.

Proc. Design, Automation and Test in Europe (DATE) Conf., Munich, Germany, 6-10 March 2006.

doc1

MATLAB & Simulink Tutorial
16.06 Principles of Automatic Control & 16.07 Dynamics
Violeta Ivanova, Ph.D. Educational Technology Consultant MIT Academic Computing violeta@mit.edu

This Tutorial

Class materials
web.mit.edu/acmath/matlab/course16/

Topics

MATLAB Review Exercise 1: Matrices & ODEs Introduction to Simulink Exercise 2: Simulink Model
16.06 & 16.07 MATLAB & Simulink Tutorials

Other References

Mathematical Tools at MIT
web.mit.edu/ist/topics/math
MATLAB Mastery I (beginners tutorial) Introduction to MATLAB (IAP series)
MATLAB Tutorial for Unified
web.mit.edu/acmath/matlab/unified

MATLAB Review

Interface Matrices & Vectors Built-In Functions Script & Function M-files Differential Equations

What is MATLAB?

Computational Software
From The MathWorks: www.mathworks.com
Algorithm Development Environment MATrix LABoratory

MATLAB @ MIT

On Athena
250 floating licenses (free)
For student-owned computers
300 floating licenses (free)

Starting MATLAB

athena% add matlab athena% matlab & >> desktop

On laptops

Desktop interface starts by default.
You must be running MATLAB now

Help in MATLAB

Command line help
>> help <command> e.g. help polyval >> lookfor <keyword> e.g. lookfor polynomial

Help Browser

Help->Help MATLAB

Variables

Begin with an alphabetic character: a Case sensitive: a, A Data type detection: a=5; a=ok; a=1.3 Default output variable: ans Built-in constants: pi i j clear removes variables who lists variables Special characters

[] () {} ; % : =.

Operators

Arithmetic operators

+ < | > & / <= || \ ^ >= &&.\ == true./ ~= false.*.^
Relational operators Logical operators Operator precedence
() {} [] -> Arithmetic -> Relational -> Logical
Do not use special characters, operators, or keywords in variable names.

Numeric Data Types

Notation
>> x = 5; >> y = 5.34; >> z = 0.23e+3;

Numeric manipulation

>> y = 5.3456; x = round(y); >> format long >> format compact

Complex numbers

>> x = 5 + 6i

Vectors

Row vector
>> R1 = [5] >> R2 = [1 : 5] >> R3 = [-pi : pi/3 : pi]

Column vector

>> C1 = [1; 2; 3; 4; 5] >> C2 = R2'

Matrices

Creating a matrix
>> A = [1 2.0; 1 1.3 pi 4] >> A = [R1; R2]

Accessing elements

>> A(1,1); A(1:2, 2:4); A(:,2)

Input / Output

Import Wizard for data import

File->Import Data

File input with load

B = load(datain.txt)

File output with save

save(dataout, A, -ascii)

Matrix Operations

Operators *, /, and ^

>> Ainv = A^-1 Matrix math is default!
Operators + and >> X = [x1 x2 x3]; >> Y = [y1 y2 y3]; >> A = X + Y A = x1+y1 x2+y2

Element-Wise Operations

Operators.*,./, and.^
>> Z = [z1 z2 z3] >> B = [Z.^2 Z ones(3,1)] B = z12 zz22 zz32 z3 1

Built-In Functions

Matrices & vectors
>> >> >> >> >> >> >> [n, m]= size(A) n = length(X) M1 = ones(n, m) M0 = zeros(n, m) En = eye(n); N1 = diag(En) [evals, evecs] = eig(A) det(A); rank(A); trace(A)

And many others

>> y = exp(sin(x)+cos(t))

Polynomials

Evaluating polynomials y = p1 x n + p2 x n 1. + pn x + pn +1
>> p = [p1 p2 ] >> t = [-3 : 0.1 : 3] >> z = polyval(p, t)

Curve fitting

>> X = [x1 x2 xn]; Y = [y1 y2 yn] >> Pm = polyfit(X, Y, m)
Integration & Differentiation

Polynomial integration

p1 x n +. + pn x + pn +1dx = P1 x n +1 +. + Pn +1 x + C
>> P = polyint(p); assumes C = 0
Area under a curve from a to b
>> area = polyval(P,b) - polyval(P,a)
Polynomial differentiation
>> P = [P1 P2 Pn C] >> p = polyder(P)

2D Linear Plots

Command plot
>> plot (X, Y, ro) >> plot (X, Y, Color, [0.0], Marker, o, LineStyle, none)
Colors: b, r, g, y, m, c, k, w Markers: o, *,., +, x, d Line styles: -, --, -., :
Multiple Graphs on One Plot

Built-in function hold

>> >> >> >> >> >> p1 = hold p2 = hold p3 = hold plot(t, z, r-) on plot(t, -z, b--) on plot(T, Z, go) off

Subplots on One Figure

Built-in function subplot
>> >> >> >> >> >> s1 p1 s2 p2 s3 p3 = = = = = = subplot(1, 3, 1) plot(t, z, r-) subplot(1, 3, 2) plot(t, -z, b--) subplot(1, 3, 3) plot(T, Z, go)

Customizing Graphs

Annotating graphs
>> >> >> >> >> plot (t, z, r-) legend (z=f(t)) title (Position vs. Time) xlabel (Time) ylabel (Position)
Plot Edit mode: icon in Figure editor Property Editor: View->Property Editor Saving figures: File->Save As

M-File Programming

Script M-Files
Automate a series of steps. Share workspace with other scripts and the command line interface.

Function M-Files

Extend the MATLAB language. Can accept input arguments and return output arguments. Store variables in internal workspace.

A MATLAB Program

Always has one script M-File Uses built-in functions as well as new functions defined in function M-files Saved as <filename>.m To run: filename only (no.m extension) >> <filename> Created in Editor / Debugger

M-File Editor / Debugger

Create or open M-file in editor
>> edit <filename>.m
Type or copy commands Use % for comments Use ; to suppress output at runtime Debugging mode

k >>

Variable Types

Local (default)

Every function has its own local variables. Scripts share local variables with functions they call and with the base workspace.

Global

global speedoflight Shared by functions, scripts, and base workspace.

Persistent

persistent R, C Can be declared and used only in functions.

Program Flow Control

if, elseif and else
Example: if elseif else end planet == 1, G = 9.814; planet == 2, G = 3.688; G = input(Gravity: );
switch and case for while

Function M-File Example

See file: odeLanderVelocity.m
function DV = odeLanderVelocity(t, V)
% ODELANDERVELOCITY defines dV/dt for a Mars lander. % This is help text for help odeLanderVelocity. % The functions body is below.
Gm = 3.688; global K M DV = Gm - K/M * V^2; return

Differential Equations

Ordinary Differential Equations

y' = f (t, y)

Differential-Algebraic Expressions

M (t, y)y' = f (t, y)

Solvers for ODEs and DAEs
>> ode45; ode23; ode113

ODE and DAE Solvers

>> [T, Y] = solver(odefun, tspan, Y0)

Syntax:

solver: ode45, ode23, etc. odefun: function handle tspan: interval of integration vector >> tspan = [t0 : tstep : tfinal] Y0: vector of initial conditions [T, Y]: numerical solution in two vectors
ODE Example Problem: dv (t ) = g

Solution:

global K M K = 1.2; M = 150; V0 = 67.056;

k 2 v m

% drag coefficient % mass (kg) % velocity at t0 (m/s)
tspan = [0 : 0.05 : 6]; [t, V] = ode45(@odeLanderVelocity, tspan, V0)

Symbolic Math Toolbox

Incorporates symbolic computations into MATLABs numerical environment Functions access the Maple kernel Constructs for symbolic values & expressions >> x = sym(x) >> f = sym(cos(t)) >> syms a b c

Laplace Transforms

st Definition: F (s ) = L {f (t )}= e f (t )dt
Examples: Laplace transform of f t = s in t >> f = sym(sin(t)) >> F = laplace(f)
Inverse Laplace transform of ( ) >> G = sym(0.1/(0.1*s+1)) >> g = ilaplace(G)

0.1 G s = 0.1s + 1

Transfer Functions
System of linear differential equations State Space model

X = AX + Bu Y = CX + Du

Nu m s
X, u & Y: state, input & output vectors A, B & C: state, input & output matrices D: usually zero (feedthrough) matrix

Transfer function

( ) = C (s I A ) H ( )= s Den ( ) s
>> [Num, Den] = ss2tf(A, B, C, D)
Exercise 1: Matrices & ODEs
1-A: Mars Lander Velocity
Function file: odeLanderVelocity.m Script file: MarsLander.m
1-B: F-8 Longitudinal Time Response
Function file: LongTimeResponse.m Script file: f8long.m
Follow instructions in exercise handout

Introduction to Simulink

Interface Models Blocks Simulations

What is Simulink?

Software for modeling, simulating, and analyzing dynamic systems Tool for model-based design MATLAB Toolbox -> access to all MATLAB functions

Simulink @ MIT

Comes with MATLAB On Athena
50 floating licenses (free)
50 floating licenses (free) Student MATLAB Lite includes MATLAB, Simulink, Control System, Optimization, Signal Processing, Symbolic Math, Statistics

Starting Simulink

Run MATLAB first Type in the Control Line Window >> simulink or Click on the Simulink icon in the MATLAB toolbar You must be running Simulink now

Simulink Libraries

Model Editor
Creating a model: File->New->Model Saving a model: File->Save As <modelname>.mdl
Canvas for editing model block diagrams

Model Blocks: Sources

Example: Step Function

Model Blocks: Sinks

Example: Scope
Model Blocks: Math Operations

Example: Sum

Model Blocks: User-Defined

Example: MATLAB function

Model Blocks: Continuous State
Example: Transfer Function

Modeling: Block Diagram

Example: Continuous System
Modeling: Block Parameters

( )= 1 u ( ) s +2 s

 

Tags

UN55C9000 MMS460 Form 20 42PFP5332 10 Silverado 2003 Party RD-250S AP250 2410-304 Phonefax 47TS FJE1635 TC-1485 Bose V30 Pocket PC 37PF9631D X221W Nokia 5140 AR6L 85 Meter Pid 200ARC Versatis D100 CME UF6 Download Scope T905 ZWF16381W AA8-duramax AW-E650 AG-456 Switches Microtrack 2 For Digital Communication 500 PCI WB14B7 Applications 32LD8D20U RM-AV3100 SX-550 32PF3320 CQ-R263H SU700 MEQ230 Finepix V10 Emx212S V2500 NV-FJ623 KDC-3027G DWA-150R Watch C47 GR-D720 EWF1030 Headset Commands 41016228 ND WAR1900 Log-LOG BC909P Bladecenter TS-A6982R LX-M140D Example Antenna KX-P1150 311 2 45 STD BA-2000 XR-C540RDS KX-FP300 Scph-30004R Samsung E488 TI-5032SV Slayer DR-550 Touring 3274-6 KA Wiki VR5000 E-660 AQV12AWA KX-TCA130E 4080xcdt C410DN Device SGH-T749 Price DDX8022BT 20PFL3403 TS2GPF810K Samsung L100 SPX90 P-660HN-FX AZ1140 Playful PUP F-204RDS 14PT1563-05C 2200T DSP-AX1200 Printer IP1900 TDM-7554R Ppr21 LH-T300SC Creative 2170 DTH8005 CN 40 MS7380SG Mcbr440W

 

manuel d'instructions, Guide de l'utilisateur | Manual de instrucciones, Instrucciones de uso | Bedienungsanleitung, Bedienungsanleitung | Manual de Instruções, guia do usuário | инструкция | návod na použitie, Užívateľská príručka, návod k použití | bruksanvisningen | instrukcja, podręcznik użytkownika | kullanım kılavuzu, Kullanım | kézikönyv, használati útmutató | manuale di istruzioni, istruzioni d'uso | handleiding, gebruikershandleiding

 

Sitemap

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101