2013
621.396.93(07)
32.884.173
409
:
409 . : -
[ ] / . . .
. . . : . . -, 2013. .
: PC Pentium I; 128 Mb RAM; Windows
98/XP/7; Adobe Reader V8.0 . . .
-
MATLAB Simulink ,
, .
210302.65 ( )
160905.65
-2,
210400.68
210601.65
162107.65.00.02
-3.
621.396.93(07)
32.884.173
, 2013
20.03.2013 . 441.
.
-
660041, . , . , 79
/ (391)206-21-49. E-mail rio@sfu-kras.ru
http://rio.sfu-kras.ru
......................................................................................................... 5
7
1 SIMULINK ...............................................................................
1.1 Simulink ....................................................................................................
6
1.2 ..................................................................................................
9
1.3 Simulink ............................................................................................
14
1.4 ....................................................................................
29
35
2 .............................................................................
1.
...................................................................................
36
2. ..........................................................
42
3. .........
47
4.
..........................................................................................
54
5. .....................
59
................................................................................ 65
. MATLAB Simulink: .
.
() , .
SIMULINK
MATLAB (Matrix Laboratory) , .
1.1 MATLAB,
logo
MATLAB 1970-
-. MATLAB ,
.
MATLAB.
Simulink , MATLAB. Simulink MATLAB, MATLAB
. MATLAB, (, VHDL .).
, , ,
,
MATLAB . , , VHDL, Verilog ,
(, ). MATLAB Simulink TheMathWorks (http://www.mathworks.com/).
1.1 Simulink
MATLAB, simulink Simulink (. 1.2).
Simulink ,
(Most Frequently Used Blocks).
1.3 Simulink
Simulink
:
File () Simulink:
New () (Model) (Library);
Open () ;
Close () Simulink;
Preferences ( ) Simulink ( ,
, ).
Edit () (Add
Selected Block to a New Model), (Find).
View () (
, .).
Help () MATLAB Simulink.
, MATLAB
,
. MATLAB
.
1.4 Simulink
,
(. 1.4). . .
Help
MATLAB.
1.2
File,
New, Model (. 1.5) Ctrl+N.
1.5
(Untitled) (.
1.6).
1.6 Simulink
10
1.7
(Solver):
Simulation time ( )
. ,
, (inf). , ,
.
Solver Options ( ) ,
. (Type) : (Fixed-step) (Variable-step). .
-
11
, (Max step
size, Min step size Initial step size). (Relative tolerance Absolute tolerance).
Solver (ode )
(Discrete (no continuous state)).
, . MATLAB Simulink.
1.7 Scope
Simulink.
(Enter search term) Scope ()
Enter. Found: Scope ,
(. 1.7). Simulink
Scope : Commonly Used Blocks (
) Sinks ( ). ,
. -
12
13
1.10
1.10, Sine Wave.
Scope. Autoscale
. Zoom X axis Zoom Y axis
. Scope (Number of
axis), (Decimation, ), (History, Limit data
points to last) .
14
1.3 Simulink
Simulink Sources (. 1.11).
1.11
:
Band-Limited White Noise ;
Chirp signal ;
Clock ( );
Constant ;
Counter Free-Running N-
;
Counter Limited ;
Digital Clock
( );
15
1.12
From File mat-;
From Workspace Workspace;
Ground ;
In ;
Pulse Generator ;
Ramp ;
Random Number ;
Repeating Sequence
;
Repeating Sequence Interpolated
;
Repeating Sequence Stair ;
16
Signal Generator : , , ;
Sine Wave ;
Step ;
Uniform Random Number .
Simulink Sinks (. 1.13).
1.13
:
Display ;
Out ;
Scope ;
Stop Simulation ;
Floating Scope , ;
17
Terminator ;
To File mat-;
To Workspace Workspace;
XY Graph .
1.14 Math Operations.
1.14
Math Operations :
Abs ;
Add ;
Bias ;
Complex to Real-Imag ;
Divide ;
Dot product ;
Gain
(, );
Magnitude-Angle to Complex
;
18
1.15 Simulink
19
Signal Routing:
Bus Creator ;
Bus Selector ;
Mux ;
Demux / ;
Goto From;
From Goto;
Manual Switch ;
Switch ;
Selector .
(Subsystem) Simulink
, .
. 1.16
.
1.16 Simulink
20
Subsystem
(In Out).
Enable Trigger. Enable . Trigger
.
Simulink (Continuous, . 1.17)
(Discontinuous, . 1.18).
1.17
, (-). Simulink PID Controller
(. 1.17).
Saturation
Quantizer (. 1.18).
21
1.18
1.19
22
1.19 . Delay, N .
1.20
.
1.20
:
Bit Clear i- ;
Bit Set i- ;
Bitwise Operator ;
Combinatorial Logic
;
Compare to Constant ;
Compare to Zero ;
Logical Operator ;
Relational Operator .
23
1.21 Simulink
(),
Lookup Tables (. 1.21).
(1-D Lookup Table), ( ) .
(. 1.22).
MATLAB Function MATLAB Function Block Editor,
(. 1.23). MATLAB Fcn,
.
24
1.22 Simulink
1.23 MATLAB
25
1.24
Communication System Toolbox
Random Data Sources
. Noise Generators
.
26
(Discrete-Time Eye Diagram Scope),
(Discrete-Time Scatter Plot Scope) (Discrete-Time Signal Trajectory Scope). ,
, Comm Sinks (.
1.25).
1.25
Error Rate Calculation
, . .
27
.
, Comm Filters (. 1.26).
1.26
Raised Cosine Transmit Filter .
Raised Cosine Receive Filter .
28
Simulink
(DSP System Toolbox), 1.27.
1.27
Filtering . Signal Operations (Upsample Downsample), (Variable Integer Delay Variable Fractional
Delay). Signal Processing Sinks
(Spectrum Scope).
Simulink
. MATLAB Start, Simulink, Demos. MATLAB Simulink ,
.
29
1.4
: Gaussian Noise Generator, Digital Filter Design, Spectrum Scope (. 1.28).
1.28
Sample time 1/100000 (.
1.29), 100 .
1.29
30
1.30.
1.30
(Bandstop) (FIR) 80- (Specify order), 0,3; 0,4; 0,6; 0,7. Design Filter (. 1.30).
31
1.31 .
1.31
(Buffer input) (Buffer size).
(Simulation, Start),
. , Autoscale. (. 1.32).
, - .
32
1.32
1.33.
1.33
33
, (Background Color).
90.
Sine Wave,
(. 1.34).
1.44
Real-Imag to Complex . Product ,
.
1.45 , 1.46
.
34
1.45
1.46
35
2
Simulink
MATLAB R2011b. Simulink, MATLAB simulink (. 2.1).
36
1.
:
.
:
; Simulink; ; .
2.1. .
2.1
0
1
2
3
4
5
6
7
8
9
BPSK
QPSK
8PSK
16PSK
32PSK
16QAM
32QAM
64QAM
128QAM
256QAM
2
4
8
16
32
16
32
64
128
256
1
2
3
4
5
4
5
6
7
8
:
Random Integer Generator ;
1-D Lookup Table ();
Raised Cosine Transmit Filter
;
Gain ;
Complex to Real-Imag ;
Scope ;
Discrete-Time Eye Diagram Scope ;
Discrete-Time Signal Trajectory Scope
;
Discrete-Time Scatter Plot Scope ;
37
Subsystem , ;
Spectrum Scope .
, 2.2. Modulator (. 2.3).
2.2
(M-ary number)
(Sample Time) 1/9600, 9600 /. (Spectrum Scope) 1024
1024 .
, Complex to Real-Imag.
2.3 .
(1-D Lookup Table)
. Breakpoints , , QAM16: [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]. Table Data , ,
QAM16 : [ -3+3*i -3+1*i -3-3*i -3-1*i -1+3*i -1+1*i -1-3*i -1-1*i +3+3*i
+3+1*i +3-3*i +3-1*i +1+3*i +1+1*i +1-3*i +1-1*i ]. MATLAB, [ 0 : 1 : 255 ] . .
38
2.3
(. 2.3)
: (Filter Type) (Square Root); ,
, (Group Delay) 5 ; (Rolloff
Factor) 0.8; (Upsampling
factor) 8; (Input Processing) sample based.
, .
1/K,
K
1
N
si
i 0
N .
,
(. 2.4).
39
2.4
2.5 .
(. 2.6).
40
2.5
2.6
41
:
1) , Simulink, .
2) 0 . ,
. ,
, .
( ) ( ). , .
3) 2
0.2, 0.4, 0.6, 0.8 1.
4) ,
: , Simulink, ,
2 3, .
:
1) .
2) ,
.
3) .
4) .
5) .
6) .
7) .
8) ().
9) . . BPSK, QPSK, QAM16, 8PSK.
.
10) .
11) .
12) .
13) .
.
14) . .
15) . .
42
2.
: , .
: , ; Simulink.
:
AWGN Channel ;
Phase/Frequency Offset ,
;
Variable Fractional Delay ;
Constant ();
Complex to Real-Imag ;
Scope ;
Discrete-Time Eye Diagram Scope ;
Discrete-Time Signal Trajectory Scope
;
Discrete-Time Scatter Plot Scope ;
Subsystem ,
;
Spectrum Scope .
Simulink (Subsystem) (.
2.7).
2.7
43
2.8,
,
, .
2.8
AWGN Channel (Mode) SNR / 13 . (Phase offset) (Frequency offset)
Phase/Frequency Offset. (Iterpolation
mode - Linear) Variable Fractional Delay.
. 2.9 . ,
,
. . 2.10 , . (.
2.11). , , (. 2.12).
.
44
2.9
2.10
45
2.11
2.12
46
:
1) ,
Simulink, .
2) .
.
/ 0, 10, 20, 30, 40, 50, 60 . ,
. 6 .
, .
3) 100 .
. 0, 45,
90, 135, 180, 270 360. , 10 , 100 , 1 , 3 .
, .
4) 100 .
. ,
0.1, 0.5, 1, 2, 3. ,
.
5) ,
: , Simulink, ,
2, 3 4, .
:
1) .
2) .
3) .
4) .
5) (, , ).
6) .
47
3.
:
.
: , ;
Simulink.
Simulink:
Error Rate Calculator
;
Display ();
To Workspace MATLAB;
Gain ;
Raised Cosine Receive Filter ;
Downsample ;
Add / ;
Constant ();
Complex to Real-Imag ;
Product / ;
Minimum / ;
n-D Lookup Table n- (
);
Scope ;
Discrete-Time Eye Diagram Scope ;
Discrete-Time Signal Trajectory Scope
;
Discrete-Time Scatter Plot Scope ;
Subsystem ,
;
Spectrum Scope .
2.13
Simulink.
48
2.13
2.14.
Gain
.
(Raised Cosine
Receiver Filter) : (Filter Type) (Square Root);
(Input samples per symbol (N)) 8; , , (Group Delay) 5 ;
(Rolloff Factor) 0.8; (Output Mode) None; (Input Processing)
sample based. Downsample
.
2.14
49
(.
1.37) (. 2.15). () (Constellation .
2.15).
Minimum.
2.15
n-D Lookup Table (. 2.16).
2.16
( QAM16)
2.17
,
50
. ,
.
2.17
(. 2.18).
2.18
, 2.19. (. 2.20). (. 2.21).
51
2.19
2.20
2.21
52
2.22 . ,
10 .
(Error Rate
Calculator Receive Delay).
2.22
:
1) ,
Simulink, .
2) .
. 0 ,
Error Rate Calculator. 5 10-5. ( 5 ) (10-210-5). .
, .
3) 2 5, 10, 85, 175. . .
4) 2
0.1, 0.5, 1, 3.9.
53
.
.
5) ,
: , Simulink,
, 2, 3 4, .
:
1) .
2) .
3) .
4) .
5) .
6) . . . .
54
4.
: .
: , ; Simulink.
Simulink:
Delay ;
Sign , +1 -1 .
Math Function (, , . .);
Gain ;
Add / ;
Constant ();
Complex to Real-Imag ;
Product / ;
Scope ;
Subsystem ,
.
2.23 Simulink ( ).
55
2.23
(. 2.24) (2.25),
( ) ,
(Numeric Controlled Oscillator).
2.24
2.65 . . 2.27. 2.28 , .
2.29 .
,
.
.
56
2.25
2.26
2.27
57
2.28 ,
2.29
58
:
1) ,
Simulink , .
2)
100 .
. 40
. ,
. , .
3) 10 , . , , .
4)
(
3).
10 .
5) 4.
6) ,
: , Simulink,
, 2, 3, 4 5, .
:
1) .
2) ( ). - ( ).
3) .
4) . .
5) .
59
5.
: .
: , ; Simulink.
( ). 2.30
(Timing phase recovery (Gardner detector)).
2.30
2.31 ,
- ( , . 2.32), (.
2.33), (. 2.34) ,
(. 2.35).
60
2.31
2.32 - ( )
61
2.33
2.34
( ) ,
.
62
2.35 ,
, , Modulo1, . Triggered Subsystem (. 2.36),
.
2.36
2.372.39 .
63
2.372.39
64
:
1) ,
Simulink .
2)
100 .
. ,
.
,
.
3) 0 8.
.
.
4) .
5) . ,
.
6) ,
: , Simulink,
, 2, 3, 4 5, .
:
1) .
2) .
3) , .
4) -. , -.
65
MATLAB Simulink
1) , . . . Simulink. .: -, 2012. 432 .
MATLAB Simulink
1) , . . MATLAB SIMULINK . .:
, 2011. 976 .
2) , . . .
MATLAB / . . , . . . .: -, 2008.
816 .