.


:




:

































 

 

 

 


Storage class . , Real-Time Workshop.

..

 

 

 

 

 

2009


 

 


 

 

- 5

1 -- 9

1.1 MatLab + Simulink- 9

1.2 . . 46

1.3 . 50

1.4 . 57

2 -- 61

2.1 - 61

3 -- 65

3.1 - 65

4 -- 69

4.1 - 69

4.2 - 71

4.3 - 78

4.4 . 81

 

- 86

-- 87

 


 

 


 

 

 

, , , , - . , , .

, (, , , ), , , .

() , MatLab.

, . . . VisSim, System View MatLab.

 

VisSim

Visual Solutions VisSim. VisSim - , , . , VisSim, .

, , , . , .

VisSim . . . "sin" , 10- . VisSim 100 , . - , VisSim .

VisSim , . , VisSim . , VisSim. , VisSim , MathCAD.

VisSim , . . , .

VisSim . , , , , VisSim.

VisSim , .

 

System View

System View . System View , . ( ) . System View , , , . , , , (, , ). , . . , , , , .

 

MatLab

( ) MatLab. MatLab (MathWorks Inc.) , - , , , , .

MatLab Simulink. MatLab Simulink . , - , , . , , , , , ..

MatLab + Simulink MatLab Simulink . Toolbox , Blockset, - Simulink.

MatLab , , . , .

. m- ( .m) , . , . m- MatLab, Microsoft XP. C MatLab , MathCAD, Maple Mathematica. MS Word. , MatLab Notebook Word 98/2000/XP MatLab , , . , , . , .

MatLab . , , , . .

MatLab , , , , . MatLab , Maple. , , , , , MatLab .

(API) MatLab , , Fortran Java. , , Fortran Java MatLab, MatLab Fortran, MatLab .

- MatLab MatLab Web Server, MatLab HTML.

, , MatLab , . , MatLab , , , , . , MatLab Toolbox - .

, . , , , , MatLab , , MatLab.

 

.

, . ӻ .


 

1

1.1 MatLab + Simulink

Simulink

 

MATLAB. MATLAB 1.1.1. Simulink .

 

 

1.1.1- MATLAB

 

MATLAB Simulink. :

(Simulink) MATLAB.

MATLAB Simulink Enter .

Open File (mdl - ).

 

, . Simulink ( 1.1.2).

 

 

1.1.2

 

1.1.2 Simulink ( ) ( ).

Simulink :

Continuous ;

Discontinuities ;

Discrete ;

Look Up Tables ;

Math Operations ;

Model Verification ;

Model Wide Utilities ;

Ports & Subsystems ;

Signal Attributes ;

Signal Routing ;

Sinks ;

Sources ;

User Defined Function , ;

Simulink , :

" + ", " - ".

, ().

( 1.1.3).

 

 

1.1.3

 

File/New/Model, . 1.1.4.

 

 

1.1.4 -

 

1. . (, Sources - ). , - . .

2. ( ), Delete .

 

 

. . . 1.1.5 .

 

 

1.1.5


 

 

, . ().

, . . .

, , [Shift] , , . [Shift] .

. , , , , . , , , , .

, -, Select All ( ) Edit () [Ctrl+A].

 

 

, Edit/Copy .

, Edit/Cut . , MATLAB . Edit/Copy model to Clipboard Windows , , .

: , , . , .

, , Edit/Paste .

 

 

, Edit/Clear Delete . , Clear . File/Undo.

 

 

. ( 1.1.6). , . . . , , . . , , .

 

 

1.1.6

 

. , . 1.1.7 . .

 

 

1.1.7.

 

. :

;

[Shift] ; , ;

() ;

[Shift] .

1.1.8, , Step Scope,

 

 

1.1.8

 

 

, . , ( ) . 1.1.9 . .

 

 

1.1.9

 

 

, , , . , , . , . .

 

 

Format ( , ) . :

1. :

Font ;

Text alignment ;

Flip name ;

Show/Hide name .

2. :

Foreground color .

Background color .

Screen color .

3. :

Flip block .

Rotate block 900 .

Show drop shadow .

Show port labels .

4.

Format/Font , , , . . .

5. :

Library link display .

Sample time colors .

Wide nonscalar lines / .

Signal dimensions .

Port data types .

Storage class . , Real-Time Workshop.

Execution order .

 

 

, . , .. .

. [Ctrl], . , .

, .

, , [Shift], [Del] [Backspace]. .

 

 

 

(-) Save () Save As ( ) File () . Simulink ( ) , .mdl.

(-), Print () File () .

Simulink

 

Sources

Constant

:

: .

:

 

1.1.10 Constant

1. Constant value - . , ,

2. Interpret vector parameters as 1-D

 

Sine Wave

:

: , , .

. Sine Type ( ):

Time-based .

Sample-based .

 

:

 

1.1.11 Sine Wave

:

:

y = Amplitude* sin(frequency* time + phase) + bias.

:

Amplitude - .

Bias .

Frequency (rads/sec) - (/).

Phase (rads) - ().

Sample time . . :

0 ( ) .

>0 ( ) . .

-1 , , .. , .

 

Ramp

:

: y=Slope* time + Initial value.

:

 

1.1.12 Ramp

 

Slope .

Start time .

Initial value .

 


 

Step

:

:

:

 

1.1.13 Step

 

Step time - ().

Initial value - .

Final value - .

 

( ), ( ). , .


 

Pulse Generator

:

: .

:

 

1.1.14 Pulse Generator

 

Pulse Type . : Time-based . Sample-based .

Amplitude -.

Period - . Time-based Pulse Type Sample-based Pulse Type.

Pulse width - . % Time-based Pulse Type Sample-based Pulse Type.

Phase delay - . Time-based Pulse Type Sample-based Pulse Type.

Smple time - . Sample-based Pulse Type.


 

Clock

:

: , .

:

 

 

1.1.15 Clock

 

Decimation - , ( , Display time). . , Simulation parameters 0.01 , Decimation Clock 1000, 10 .

 

Sinks

Scope

:

: . .

 

, . . , , .

( 1.1.16).

1.1.16. Scope

11 :

1. Print .

2. Parameters .

3. Zoom .

4. Zoom X-axis .

5. Zoom Y-axis .

6. Autoscale .

7. Save current axes settings .

8. Restore saved axes settings .

9. Floating scope .

10. Lock/Unlock axes selection / . , Floating scope.

11. Signal selection . , Floating scope.

 

:

1. (, ) . 2,5 .

2. (, ) , , .

3. , Axes properties . , Y-min Y-max . (Title), %< SignalLabel > . 1.1.18.

 

:

Scope parameters,

 

 

1.1.17.

 

 

1.1.18.

 

(Parameters) . :

General .

Data history MATLAB.

1.1.19.

 

 

1.1.19. General

 

General :

1. Number of axes ( ) . .

2. Time range . Time range, , Time range.

3. Tick labels / . ( ):

all ,

none ,

bottom axis only .

4. Sampling . .

5. floating scope ( ).


 

Data history ( 1.1.20) :

1. Limit data points to last . . , Limit data points to last , Simulink .

2. Save data to workspace MATLAB.

3. Variable name MATLAB.

4. Format MATLAB. :

Array ,

Structure ,

Structure with time .

 

 

1.1.20. Data history

 

XY Graph

:

: . . , (X), (Y).


:

 

 

1.1.21 XY Graph

 

x-min X.

x-max X

y-min Y.

y-max Y

Sample time .

 

Display

:

: .

:

 

1.1.22 Display


 

Continuous

 

Derivative

:

: .

 

Integrator

:

:

:

 

1.1.23 Integrator

 

Initial condition source . :

internal

external . , x0, .

Initial condition . . , .

Transfer Fcn

:

:

 

 

:

 

1.1.24 Transfer Fcn

 

, . . s.

Numerator .

Denominator .

Absolute tolerance .

.


 

Zero-Pole

:

: Zero-Pole :

:

 

1.1.25 Zero-Pole

 

Zeros .

Poles .

Gain .

Absolute tolerance .

.


 

Discrete

 

Discrete Time Integrator

:

: .

 

:

 

 

1.1.26 Discrete Time Integrator

 

Integration method : Forward Euler ( ), Backward Euler ( ), Trapeziodal ( ).

Sample time .


Discrete Transfer Fcn

:

:

:

 

1.1.27 Discrete Transfer Fcn

 

Numerator

Denominator

Sample time .

.

 

Discrete Filter

:

 

: (1/z):


:

 

1.1.28 Discrete Filter

 

Numerator

Denominator

Sample time .


 

Discrete Zero Pole

:

: :

 

:

 

1.1.29 Discrete Zero Pole

 

Zeros .

Poles .

Gain .

Sample time .

.

Discontinuities


 

Relay

:

:

:

 

1.1.30 Relay

 

Switch on point - . , .

Switch off point - . , .

Output when on - .

Output when off - .

 

. , - . . , . , .


 

Saturation

:

: .

:

 

1.1.31 Saturation

 

Upper limit - .

Lower limit - .

Treat as gain when linearizing () - 1 .

.

 


 

Math Operation

 

Sum

:

: .

:

 

1.1.32 Sum

 

Icon shape . : round , rectangular .

List of sign . : + ( ), - () | ( ).

Saturate on integer overflow () . .

( ) List of sign, . List of sign . .

1 ( ), .


 

Product

:

: .

:

 

 

1.1.33 Product

 

Number of inputs . . * ( ) / ().

Multiplication . : Element-wise (), Matrix ()

Saturate on integer overflow () . .

Number of inputs , , .

, . . 1 ( ), .


 

Gain

:

: .

:

 

1.1.34 Gain

 

Gain .

Multiplication . : Element-wise K*u (), Matrix K*u (), Matrix u*K (.)

Saturate on integer overflow () - .

Gain , , 1. , , .


 

 

, :

,

k=1 ( )

T=0.1 ( )

ζ=0,3 ( )

1.1.35

 

 

1.1.35

 

 

h(t) , , .

, 1.1.35. :

Simulink Library Browser . Simulink Library Browser Continuous simulink. Transfer Fcn ( ) untitled.

Simulink Library Browser Sources () simulink. . Step untitled. Step .

Simulink Library Browser Sinks () simulink. Scope () untitled. , untitled.

, : ( ). , , . . . .

 

, , Start simulation . Scope. 1.1.36

 

 

1.1.36

 

h(t) LTI Viewer.

untitled Tools, Linear Analysis : LTI Viewer, ( , , .. ), , , Model_Inputs_and_Outputs. Input Point , Output Point .

Transfer Fcn. Model_Inputs_and_Outputs untitled Input Point Output Point. untitled 1.1.37

 

 

1.1.37

 

LTI Viewer. Simulink, Get Linearized Model. .

.

Edit, - Viewer Preferences. Style Show Grind



<== | ==>
- | 5: .
:


: 2017-01-21; !; : 611 |


:

:

, ,
==> ...

1474 - | 1392 -


© 2015-2024 lektsii.org - -

: 0.564 .